diff --git a/.gitignore b/.gitignore index a9144d6699af12319a67e8bad5cec982f3ae6a8c..20b98c30c5b3edb0983578b0a5f74fb1c1f3025e 100644 --- a/.gitignore +++ b/.gitignore @@ -171,5 +171,8 @@ local_k8s_deployment.sh # asdf configuration .tool-versions +# libyang build files +libyang/ + # Other logs **/logs/*.log.* diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c3626b2f576dae2135de2030c01ada133aa89d7..e2d653e0360b694891adc966d6d0b1124ed72ac4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,10 +17,9 @@ stages: #- dependencies - build - unit_test - #- deploy - #- end2end_test + - end2end_test -# include the individual .gitlab-ci.yml of each micro-service +# include the individual .gitlab-ci.yml of each micro-service and tests include: #- local: '/manifests/.gitlab-ci.yml' - local: '/src/monitoring/.gitlab-ci.yml' @@ -31,7 +30,8 @@ include: - local: '/src/dbscanserving/.gitlab-ci.yml' - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - local: '/src/opticalattackdetector/.gitlab-ci.yml' - # - local: '/src/opticalattackmanager/.gitlab-ci.yml' + - local: '/src/opticalattackmanager/.gitlab-ci.yml' + - local: '/src/opticalcontroller/.gitlab-ci.yml' - local: '/src/ztp/.gitlab-ci.yml' - local: '/src/policy/.gitlab-ci.yml' - local: '/src/forecaster/.gitlab-ci.yml' @@ -39,8 +39,12 @@ include: #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml' #- local: '/src/l3_attackmitigator/.gitlab-ci.yml' - #- local: '/src/slice/.gitlab-ci.yml' + - local: '/src/slice/.gitlab-ci.yml' #- local: '/src/interdomain/.gitlab-ci.yml' - local: '/src/pathcomp/.gitlab-ci.yml' #- local: '/src/dlt/.gitlab-ci.yml' - local: '/src/load_generator/.gitlab-ci.yml' + - local: '/src/bgpls_speaker/.gitlab-ci.yml' + + # This should be last one: end-to-end integration tests + - local: '/src/tests/.gitlab-ci.yml' diff --git a/README.md b/README.md index 5bfb6d70d947f631e8694b3dcf6c872cf1248ea4..8825795b864938af9fd2eb67e181c719ee9fbd26 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,25 @@ # ETSI TeraFlowSDN Controller -[ETSI OpenSource Group for TeraFlowSDN](https://tfs.etsi.org/) +The [ETSI Software Development Group TeraFlowSDN (SDG TFS)](https://tfs.etsi.org/) is developing an open source cloud native SDN controller enabling smart connectivity services for future networks beyond 5G. -Former, [Teraflow H2020 project](https://teraflow-h2020.eu/) - Secured autonomic traffic management for a Tera of SDN Flows +The project originated from "[Teraflow H2020 project](https://teraflow-h2020.eu/) - Secured autonomic traffic management for a Tera of SDN Flows", a project funded by the European Union’s Horizon 2020 Research and Innovation programme that finished on 30th June 2023. -Branch "master" : [![pipeline status](https://labs.etsi.org/rep/tfs/controller/badges/master/pipeline.svg)](https://labs.etsi.org/rep/tfs/controller/-/commits/master) [![coverage report](https://labs.etsi.org/rep/tfs/controller/badges/master/coverage.svg)](https://labs.etsi.org/rep/tfs/controller/-/commits/master) -Branch "develop" : [![pipeline status](https://labs.etsi.org/rep/tfs/controller/badges/develop/pipeline.svg)](https://labs.etsi.org/rep/tfs/controller/-/commits/develop) [![coverage report](https://labs.etsi.org/rep/tfs/controller/badges/develop/coverage.svg)](https://labs.etsi.org/rep/tfs/controller/-/commits/develop) +## Available branches and releases -# Installation Instructions and Functional Tests -The [TeraFlowSDN Wiki](https://labs.etsi.org/rep/tfs/controller/-/wikis/home) pages include details on using the ETSI TeraFlowSDN release 2.0. +[![Latest Release](https://labs.etsi.org/rep/tfs/controller/-/badges/release.svg)](https://labs.etsi.org/rep/tfs/controller/-/releases) -The documentation, installation instructions, and description of the functional tests defined to enable experimentation with the ETSI TeraFlowSDN Controller can be found in the Wiki pages +- The branch `master` ([![pipeline status](https://labs.etsi.org/rep/tfs/controller/badges/master/pipeline.svg)](https://labs.etsi.org/rep/tfs/controller/-/commits/master) [![coverage report](https://labs.etsi.org/rep/tfs/controller/badges/master/coverage.svg)](https://labs.etsi.org/rep/tfs/controller/-/commits/master)), points always to the latest stable version of the TeraFlowSDN controller. + +- The branches `release/X.Y.Z`, point to the code for the different release versions indicated in the branch name. + - Code in these branches can be considered stable, and no new features are planned. + - In case of bugs, point releases increasing revision number (Z) might be created. + +- The `develop` ([![pipeline status](https://labs.etsi.org/rep/tfs/controller/badges/develop/pipeline.svg)](https://labs.etsi.org/rep/tfs/controller/-/commits/develop) [![coverage report](https://labs.etsi.org/rep/tfs/controller/badges/develop/coverage.svg)](https://labs.etsi.org/rep/tfs/controller/-/commits/develop)) branch is the main development branch and contains the latest contributions. + - **Use it with care! It might not be stable.** + - The latest developments and contributions are added to this branch for testing and validation before reaching a release. + + +## Documentation +The [TeraFlowSDN Wiki](https://labs.etsi.org/rep/tfs/controller/-/wikis/home) pages include the main documentation for the ETSI TeraFlowSDN Controller. +The documentation includes project documentation, installation instructions, functional tests, supported NBIs and SBIs, etc. diff --git a/clean_testing_environment.sh b/clean_testing_environment.sh index b9c502ade6f34e3a19ebeafa67c222b10ea3f99d..f037a2a39309abb192c36943c014c4a3b893dd98 100755 --- a/clean_testing_environment.sh +++ b/clean_testing_environment.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/common_requirements.in b/common_requirements.in index 37b70c993e913602f9d5e509d0c887802c5d0b1e..3aa30e174f43d6f8758f49b3104a20cc8580a7ff 100644 --- a/common_requirements.in +++ b/common_requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/coverage/.coveragerc.template b/coverage/.coveragerc.template index 4421399ca30027e3032001dae64e6fa0b7fa41cb..3d8065acabefc65daad28fd4bd2e166b84d11d8b 100644 --- a/coverage/.coveragerc.template +++ b/coverage/.coveragerc.template @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/data/perf/old/MW/generate.sh b/data/perf/old/MW/generate.sh index a7fd03b2ffc8f546e7778e77bc3197661bcb0336..ccef4e113b3216bc4e4dddcd4be793c2bba32501 100755 --- a/data/perf/old/MW/generate.sh +++ b/data/perf/old/MW/generate.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/data/perf/old/MW/generate_plot.py b/data/perf/old/MW/generate_plot.py index 3d2d3a77c130ab4a3aac6bb5e9fba3eab59de67a..22befef305bf33b4aa150bf60fbd39fac3c61402 100644 --- a/data/perf/old/MW/generate_plot.py +++ b/data/perf/old/MW/generate_plot.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/data/perf/old/OpenConfig/generate.sh b/data/perf/old/OpenConfig/generate.sh index 6a6123bab2c2a1d0f475a0503a0af8d1612e7cac..5147d49626143919814a6184e02cbabdaf32b5cf 100755 --- a/data/perf/old/OpenConfig/generate.sh +++ b/data/perf/old/OpenConfig/generate.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/data/perf/old/OpenConfig/generate_plot.py b/data/perf/old/OpenConfig/generate_plot.py index 63166d7ac67802d1dcd37fafa6299cb6af898c8e..8d50ab81fd41d5dc8963aa3a9dc317bd3487fd54 100644 --- a/data/perf/old/OpenConfig/generate_plot.py +++ b/data/perf/old/OpenConfig/generate_plot.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/data/perf/old/TE/te-cdf.py b/data/perf/old/TE/te-cdf.py index fdcc1f679e7f5c3c1523ee1edaaa260727d72884..a3e7cc53006f5b1f513ee2b3b23938d33cb93fcd 100644 --- a/data/perf/old/TE/te-cdf.py +++ b/data/perf/old/TE/te-cdf.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/data/perf/old/XR/generate.sh b/data/perf/old/XR/generate.sh index a2663295956aa20e4ed4f10a32a4f56f0df6fe29..d5b70476331f3a3e6ffcaa77cd3f2ef68008bc67 100755 --- a/data/perf/old/XR/generate.sh +++ b/data/perf/old/XR/generate.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/data/perf/old/XR/generate_plot.py b/data/perf/old/XR/generate_plot.py index d9cf628a1fd1608b5d312ebb443714a980040790..f27c37e53a287d90c209620282a25d5f92152f1e 100644 --- a/data/perf/old/XR/generate_plot.py +++ b/data/perf/old/XR/generate_plot.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/data/perf/old/emulated/generate.sh b/data/perf/old/emulated/generate.sh index c6140652514a8f35e01d7e788668d8c94e9aa064..7b978c1fd4f2962693926f9cf443a6d03ee17161 100755 --- a/data/perf/old/emulated/generate.sh +++ b/data/perf/old/emulated/generate.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/data/perf/old/emulated/generate_plot.py b/data/perf/old/emulated/generate_plot.py index 0f74bc401a518b706e9d17ab18a0e501edb7edcd..d049386c3cf010ae53e8f2a91a8354bdd54f910b 100644 --- a/data/perf/old/emulated/generate_plot.py +++ b/data/perf/old/emulated/generate_plot.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/deploy/all.sh b/deploy/all.sh index 7760d9dcd6366a5887edbedb285e59ef2ec97d81..332eb6ac65b62e21d0ce2276e7639fdcfde008d4 100755 --- a/deploy/all.sh +++ b/deploy/all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/deploy/component.sh b/deploy/component.sh index e2648818684f672c41cca19a7ac1281b797f4382..89d2383d7c62393753de27abf9d0a15f67066c76 100755 --- a/deploy/component.sh +++ b/deploy/component.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -40,6 +40,21 @@ export TFS_GRAFANA_PASSWORD=${TFS_GRAFANA_PASSWORD:-"admin123+"} # Automated steps start here ######################################################################################################################## +DOCKER_BUILD="docker build" +DOCKER_MAJOR_VERSION=$(docker --version | grep -o -E "Docker version [0-9]+\." | grep -o -E "[0-9]+" | cut -c 1-3) +if [[ $DOCKER_MAJOR_VERSION -ge 23 ]]; then + # If Docker version >= 23, build command was migrated to docker-buildx + # In Ubuntu, in practice, means to install package docker-buildx together with docker.io + # Check if docker-buildx plugin is installed + docker buildx version 1>/dev/null 2>/dev/null + if [[ $? -ne 0 ]]; then + echo "Docker buildx command is not installed. Check: https://docs.docker.com/build/architecture/#install-buildx" + echo "If you installed docker through APT package docker.io, consider installing also package docker-buildx" + exit 1; + fi + DOCKER_BUILD="docker buildx build" +fi + # Constants GITLAB_REPO_URL="labs.etsi.org:5050/tfs/controller" TMP_FOLDER="./tmp" @@ -60,17 +75,17 @@ for COMPONENT in $TFS_COMPONENTS; do BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log" if [ "$COMPONENT" == "ztp" ] || [ "$COMPONENT" == "policy" ]; then - docker build -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile ./src/"$COMPONENT"/ > "$BUILD_LOG" + $DOCKER_BUILD -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile ./src/"$COMPONENT"/ > "$BUILD_LOG" elif [ "$COMPONENT" == "pathcomp" ]; then BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-frontend.log" - docker build -t "$COMPONENT-frontend:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/frontend/Dockerfile . >> "$BUILD_LOG" + $DOCKER_BUILD -t "$COMPONENT-frontend:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/frontend/Dockerfile . >> "$BUILD_LOG" BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-backend.log" - docker build -t "$COMPONENT-backend:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/backend/Dockerfile . >> "$BUILD_LOG" + $DOCKER_BUILD -t "$COMPONENT-backend:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/backend/Dockerfile . >> "$BUILD_LOG" # next command is redundant, but helpful to keep cache updated between rebuilds - docker build -t "$COMPONENT-backend:$TFS_IMAGE_TAG-builder" --target builder -f ./src/"$COMPONENT"/backend/Dockerfile . >> "$BUILD_LOG" + $DOCKER_BUILD -t "$COMPONENT-backend:$TFS_IMAGE_TAG-builder" --target builder -f ./src/"$COMPONENT"/backend/Dockerfile . >> "$BUILD_LOG" else - docker build -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile . > "$BUILD_LOG" + $DOCKER_BUILD -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile . > "$BUILD_LOG" fi if [ -n "$TFS_REGISTRY_IMAGES" ]; then diff --git a/deploy/crdb.sh b/deploy/crdb.sh index 5d87adf60bbb3303e9abe9cc17c4a68cbe295370..c979ad4f2c18861c6a93b6b04e5d8e3e71aae41e 100755 --- a/deploy/crdb.sh +++ b/deploy/crdb.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -158,9 +158,19 @@ function crdb_undeploy_single() { function crdb_drop_database_single() { echo "Drop database if exists" - CRDB_PORT_SQL=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') - CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@cockroachdb-0:${CRDB_PORT_SQL}/defaultdb?sslmode=require" - kubectl exec -it --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ + + if [[ -z "${GITLAB_CI}" ]]; then + #kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o yaml + CRDB_HOST=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.clusterIP}') + CRDB_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') + else + CRDB_HOST="127.0.0.1" + CRDB_PORT=${CRDB_EXT_PORT_SQL} + fi + + 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};" echo @@ -343,7 +353,7 @@ function crdb_undeploy_cluster() { function crdb_drop_database_cluster() { echo "Drop database if exists" - kubectl exec -it --namespace ${CRDB_NAMESPACE} cockroachdb-client-secure -- \ + 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};" echo diff --git a/deploy/expose_dashboard.sh b/deploy/expose_dashboard.sh index d42a340ac18f50a93fd42bbfc03f40176a0ec9d6..7180c4ca5c1147c27bd5a6a8f7aded9b2fcbd24e 100755 --- a/deploy/expose_dashboard.sh +++ b/deploy/expose_dashboard.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/deploy/mock_blockchain.sh b/deploy/mock_blockchain.sh index 74d62cd526a38298c8f197fedf0c0169dbb8efca..fafa435b10f7c027e088435997ec01ebf1858d0f 100755 --- a/deploy/mock_blockchain.sh +++ b/deploy/mock_blockchain.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -58,9 +58,24 @@ echo "Processing '$COMPONENT' component..." IMAGE_NAME="$COMPONENT:$IMAGE_TAG" IMAGE_URL=$(echo "$REGISTRY_IMAGE/$IMAGE_NAME" | sed 's,//,/,g' | sed 's,http:/,,g') +DOCKER_BUILD="docker build" +DOCKER_MAJOR_VERSION=$(docker --version | grep -o -E "Docker version [0-9]+\." | grep -o -E "[0-9]+" | cut -c 1-3) +if [[ $DOCKER_MAJOR_VERSION -ge 23 ]]; then + # If Docker version >= 23, build command was migrated to docker-buildx + # In Ubuntu, in practice, means to install package docker-buildx together with docker.io + # Check if docker-buildx plugin is installed + docker buildx version 1>/dev/null 2>/dev/null + if [[ $? -ne 0 ]]; then + echo "Docker buildx command is not installed. Check: https://docs.docker.com/build/architecture/#install-buildx" + echo "If you installed docker through APT package docker.io, consider installing also package docker-buildx" + exit 1; + fi + DOCKER_BUILD="docker buildx build" +fi + echo " Building Docker image..." BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log" -docker build -t "$IMAGE_NAME" -f ./src/dlt/mock_blockchain/Dockerfile . > "$BUILD_LOG" +$DOCKER_BUILD -t "$IMAGE_NAME" -f ./src/dlt/mock_blockchain/Dockerfile . > "$BUILD_LOG" if [ -n "$REGISTRY_IMAGE" ]; then echo " Pushing Docker image to '$REGISTRY_IMAGE'..." diff --git a/deploy/nats.sh b/deploy/nats.sh index b730cec4af66920e5a7d8a2235e63beff70e8694..366270a6915a1eef969846446ecc9152c3fa9531 100755 --- a/deploy/nats.sh +++ b/deploy/nats.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,6 +47,10 @@ function nats_deploy_single() { helm3 repo add nats https://nats-io.github.io/k8s/helm/charts/ echo + echo "Upgrade NATS Helm Chart" + helm3 repo update nats + echo + echo "Install NATS (single-node)" echo ">>> Checking if NATS is deployed..." if kubectl get --namespace ${NATS_NAMESPACE} statefulset/${NATS_NAMESPACE} &> /dev/null; then @@ -81,6 +85,10 @@ function nats_deploy_single() { echo "NATS Port Mapping" echo ">>> Expose NATS Client port (4222->${NATS_EXT_PORT_CLIENT})" NATS_PORT_CLIENT=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="client")].port}') + if [ -z "$NATS_PORT_CLIENT" ]; then + # NATS charts updated and port name changed from "client" to "nats"; fix to support new name and enable backward compatibility + NATS_PORT_CLIENT=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="nats")].port}') + fi PATCH='{"data": {"'${NATS_EXT_PORT_CLIENT}'": "'${NATS_NAMESPACE}'/'${NATS_NAMESPACE}':'${NATS_PORT_CLIENT}'"}}' kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}" diff --git a/deploy/qdb.sh b/deploy/qdb.sh index e930b5a6cfdba8897ec138e97e3115da8917554f..acbcfd4f96ccbd2b09d5d82f66a1bf801a710780 100755 --- a/deploy/qdb.sh +++ b/deploy/qdb.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -160,10 +160,17 @@ function qdb_undeploy() { } function qdb_drop_tables() { - QDB_HOST=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.clusterIP}') - QDB_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}') - echo "Drop tables, if exist" + + if [[ -z "${GITLAB_CI}" ]]; then + #kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o yaml + QDB_HOST=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.clusterIP}') + QDB_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}') + else + QDB_HOST="127.0.0.1" + QDB_PORT=${QDB_EXT_PORT_HTTP} + fi + curl "http://${QDB_HOST}:${QDB_PORT}/exec?fmt=json&query=DROP+TABLE+IF+EXISTS+${QDB_TABLE_MONITORING_KPIS}+;" echo curl "http://${QDB_HOST}:${QDB_PORT}/exec?fmt=json&query=DROP+TABLE+IF+EXISTS+${QDB_TABLE_SLICE_GROUPS}+;" diff --git a/deploy/show.sh b/deploy/show.sh index a4084ac65402c7987504fbcacdf6aa5b44029fc4..4fa1ce3a6dac5194e967ccbe0826a6ed9a64e3f8 100755 --- a/deploy/show.sh +++ b/deploy/show.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/deploy/tfs.sh b/deploy/tfs.sh index 41dcdc2a6c75846757de709ee2880c42e3eac42d..e93cb35442bca4aa555d0589df4fc90391d9376a 100755 --- a/deploy/tfs.sh +++ b/deploy/tfs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -150,6 +150,10 @@ printf "\n" echo "Create secret with NATS data" NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="client")].port}') +if [ -z "$NATS_CLIENT_PORT" ]; then + # NATS charts updated and port name changed from "client" to "nats"; fix to support new name and enable backward compatibility + NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="nats")].port}') +fi kubectl create secret generic nats-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ --from-literal=NATS_NAMESPACE=${NATS_NAMESPACE} \ --from-literal=NATS_CLIENT_PORT=${NATS_CLIENT_PORT} @@ -297,8 +301,13 @@ 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 - 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) + 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" fi @@ -362,7 +371,13 @@ for COMPONENT in $TFS_COMPONENTS; do echo "Waiting for '$COMPONENT' component..." COMPONENT_OBJNAME=$(echo "${COMPONENT}" | sed "s/\_/-/") kubectl wait --namespace $TFS_K8S_NAMESPACE \ - --for='condition=available' --timeout=300s deployment/${COMPONENT_OBJNAME}service + --for='condition=available' --timeout=90s deployment/${COMPONENT_OBJNAME}service + WAIT_EXIT_CODE=$? + if [[ $WAIT_EXIT_CODE != 0 ]]; then + echo " Failed to deploy '${COMPONENT}' component, exit code '${WAIT_EXIT_CODE}', exiting..." + kubectl logs --namespace $TFS_K8S_NAMESPACE deployment/${COMPONENT_OBJNAME}service --all-containers=true + exit $WAIT_EXIT_CODE + fi printf "\n" done @@ -572,3 +587,9 @@ if [[ "$TFS_COMPONENTS" == *"monitoring"* ]] && [[ "$TFS_COMPONENTS" == *"webui" printf "\n\n" fi + +if [ "$DOCKER_BUILD" == "docker buildx build" ]; then + echo "Pruning Docker Buildx Cache..." + docker buildx prune --force + printf "\n\n" +fi diff --git a/hackfest/containerlab/tfs-scenario.clab.yml b/hackfest/containerlab/tfs-scenario.clab.yml index df197ebea70906874515240f18d2f06c4c307c88..f79378757827ff706be849b03277b947ee85f7fb 100644 --- a/hackfest/containerlab/tfs-scenario.clab.yml +++ b/hackfest/containerlab/tfs-scenario.clab.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/gnmi/srlinux.clab.yml b/hackfest/gnmi/srlinux.clab.yml index a589292ac5b58664646ab7d3cccebfd62c28a540..6cfeb6108cd88cb52bd5925a374ea8c6724f4c69 100644 --- a/hackfest/gnmi/srlinux.clab.yml +++ b/hackfest/gnmi/srlinux.clab.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/grpc/connection.proto b/hackfest/grpc/connection.proto index 0e8522768614ec4c698b87647118101ae0479aaa..0da1059f3d65357f520b5123cc29d4c6230e8388 100644 --- a/hackfest/grpc/connection.proto +++ b/hackfest/grpc/connection.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/hackfest/grpc/connection/create.py b/hackfest/grpc/connection/create.py index 7d134105d04b155abc2d3d4ad3e4efeef085c81a..9e32dd8d4e3c89555c039d417b5aab2f6d9ef321 100644 --- a/hackfest/grpc/connection/create.py +++ b/hackfest/grpc/connection/create.py @@ -1,5 +1,5 @@ #! /usr/bin/env python3 -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/grpc/connection/list.py b/hackfest/grpc/connection/list.py index 5b1926d3cac8dbdf00d889726b1638e0a70ad6b2..e852b69b7cee16e02ca2021db83bbc11cd9c7538 100644 --- a/hackfest/grpc/connection/list.py +++ b/hackfest/grpc/connection/list.py @@ -1,5 +1,5 @@ #! /usr/bin/env python3 -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/grpc/connectionService.proto b/hackfest/grpc/connectionService.proto index 8f6b5a6e781ba074239bfdbc2d05bea638b153a3..0a80f2c1a49056ce76766e720b427283fd63969d 100644 --- a/hackfest/grpc/connectionService.proto +++ b/hackfest/grpc/connectionService.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/hackfest/grpc/connectionService/connectionService_client.py b/hackfest/grpc/connectionService/connectionService_client.py index e5c1bf48186b4c5e7e3425e3601e32642e7d2fcc..2ed97ae97c4ef50c036635f8d5fb5812ad92c5b5 100644 --- a/hackfest/grpc/connectionService/connectionService_client.py +++ b/hackfest/grpc/connectionService/connectionService_client.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/grpc/connectionService/connectionService_server.py b/hackfest/grpc/connectionService/connectionService_server.py index f1632db90cd6d7dbfd186fe3c4bad9da32195b28..ff991f44c16ac12ec7042f922dc9558ec08fcfbe 100644 --- a/hackfest/grpc/connectionService/connectionService_server.py +++ b/hackfest/grpc/connectionService/connectionService_server.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/grpc/connectionServiceWithNotif.proto b/hackfest/grpc/connectionServiceWithNotif.proto index f2f5b17e317cd5c15461979cf2cf20462d3d72de..778203e2619aa938194107d855ea4949fdf550da 100644 --- a/hackfest/grpc/connectionServiceWithNotif.proto +++ b/hackfest/grpc/connectionServiceWithNotif.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_client.py b/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_client.py index 9518bf743221c0a2e2c1191be063aafff8eaccb5..2503f424f4dd3445d91c82daa235f4677e6f910a 100644 --- a/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_client.py +++ b/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_client.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_server.py b/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_server.py index 922f91837bc013f038985cbb0ef44aa234556696..d5c413064968c9ef30e015cf818e66066d45ceb9 100644 --- a/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_server.py +++ b/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_server.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/grpc/topologyService.proto b/hackfest/grpc/topologyService.proto index 775e45addedd8fd30c888ddcd7f3de92a9b66a4b..6a38bf9c7dd1762743eda91b01c639f9bc5ae3ab 100644 --- a/hackfest/grpc/topologyService.proto +++ b/hackfest/grpc/topologyService.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/hackfest/grpc/topologyService/topologyService_client.py b/hackfest/grpc/topologyService/topologyService_client.py index ef628183bed45452f191fc3be07a87db97ed6650..aa1ffc2bf6269ebd7495c9f01438cfc73315c687 100644 --- a/hackfest/grpc/topologyService/topologyService_client.py +++ b/hackfest/grpc/topologyService/topologyService_client.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/grpc/topologyService/topologyService_server.py b/hackfest/grpc/topologyService/topologyService_server.py index ff1c80e82a9bf3404c6e9da9b3c0f7c534d01889..dfd62aa13adf189c10477840c747fb34b610d5fc 100644 --- a/hackfest/grpc/topologyService/topologyService_server.py +++ b/hackfest/grpc/topologyService/topologyService_server.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/kafka/pub.py b/hackfest/kafka/pub.py index e80dd5db82632b9ef17e7fdf017b8964ab357623..77564dfcb710677ecbd8fa9b2cbe8e6145c5baac 100644 --- a/hackfest/kafka/pub.py +++ b/hackfest/kafka/pub.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/kafka/sub.py b/hackfest/kafka/sub.py index 233b9f9d0c8b4a4a744859beeaff0141c04e0560..2253c64674ce421d288344315649fbee64058432 100644 --- a/hackfest/kafka/sub.py +++ b/hackfest/kafka/sub.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/mock_osm/MockOSM.py b/hackfest/mock_osm/MockOSM.py index 338db0e19becc8a9dd277beec7f3b4ceb2e765a3..7ced57d3efa64038d09f5cea21fb7098b8ceb2ba 100644 --- a/hackfest/mock_osm/MockOSM.py +++ b/hackfest/mock_osm/MockOSM.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/mock_osm/__init__.py b/hackfest/mock_osm/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/hackfest/mock_osm/__init__.py +++ b/hackfest/mock_osm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/mock_osm/__main__.py b/hackfest/mock_osm/__main__.py index 4ed25eaedbf4eba1f04ea41c72a751ecd7d6380b..48866fb2db7ac92c37f57561abc58c2d45df810a 100644 --- a/hackfest/mock_osm/__main__.py +++ b/hackfest/mock_osm/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/netconf-oc/device_definition.py b/hackfest/netconf-oc/device_definition.py index 6e737f55675e811ebdd96a4d7471f1b4438c8e52..ecd3dd6ce5a7091d5223153ddd0f6e3cca7fc39d 100644 --- a/hackfest/netconf-oc/device_definition.py +++ b/hackfest/netconf-oc/device_definition.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hackfest/netconf-oc/interfaces.xml b/hackfest/netconf-oc/interfaces.xml index c47fc44e3ba9ea0290823eb42feaa444d6179526..f04504bd408a7735ccdaa55c63c85ba25a7bde2d 100644 --- a/hackfest/netconf-oc/interfaces.xml +++ b/hackfest/netconf-oc/interfaces.xml @@ -1,6 +1,6 @@ dst: %s", link_id_src) + context_client.close() + return Empty() diff --git a/src/bgpls_speaker/service/__init__.py b/src/bgpls_speaker/service/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..839e45e3b646bc60de7edd81fcfb91b7b38feadf --- /dev/null +++ b/src/bgpls_speaker/service/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. \ No newline at end of file diff --git a/src/bgpls_speaker/service/__main__.py b/src/bgpls_speaker/service/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..564711b3b2766ddd79f555679d9eea94e718a85a --- /dev/null +++ b/src/bgpls_speaker/service/__main__.py @@ -0,0 +1,63 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 .tools.DiscoveredDBManager import DiscoveredDBManager +from .BgplsService import BgplsService +from .tools.GrpcServer import GrpcServer + +terminate = threading.Event() +LOGGER : logging.Logger = None +_ONE_DAY_IN_SECONDS = 60 * 60 * 24 + +def signal_handler(signal, frame): + LOGGER.warning('Terminate signal received') + LOGGER.warning(signal) + terminate.set() + +def main(): + global LOGGER + + log_level = get_log_level() + logging.basicConfig(level=log_level, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") + LOGGER = logging.getLogger(__name__) + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + LOGGER.info('Starting...') + + # Start metrics server + metrics_port = get_metrics_port() + start_http_server(metrics_port) + # One common database for all bgpls_speakers connection + DB=DiscoveredDBManager() + + speaker_server = GrpcServer(DB) + speaker_server.Connect() + + grpc_service = BgplsService(DB,speaker_server) + grpc_service.start() + + # Wait for termination signal + while not terminate.wait(timeout=0.1): pass + LOGGER.info('Terminating...') + speaker_server.terminateGrpcServer() + grpc_service.stop() + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/bgpls_speaker/service/java/BGP4Parameters_3.xml b/src/bgpls_speaker/service/java/BGP4Parameters_3.xml new file mode 100644 index 0000000000000000000000000000000000000000..b945caa8307e89447a8ec1230d440e9dab6a43c4 --- /dev/null +++ b/src/bgpls_speaker/service/java/BGP4Parameters_3.xml @@ -0,0 +1,65 @@ + + + + + 12179 + 7.7.7.7 + + 1112 + + + 10.95.90.43 + false + true + 179 + + + + BGP4Parser2.log + BGP4Client2.log + BGP4Server2.log + + true + + 40000 + true + + + 180 + + 4 + + 65006 + + + + false + + true + + fromBGP + + + + + + 0.0.0.0 + \ No newline at end of file diff --git a/src/bgpls_speaker/service/java/exec_speakear_java.sh b/src/bgpls_speaker/service/java/exec_speakear_java.sh new file mode 100644 index 0000000000000000000000000000000000000000..4e38174fb070070106a8f0f7951d72ffb3f93fa0 --- /dev/null +++ b/src/bgpls_speaker/service/java/exec_speakear_java.sh @@ -0,0 +1,19 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash +cd netphony-topology/ +"/home/ubuntu/downloads/apache-maven-3.8.8/bin/mvn" clean package -P bgp-ls-speaker assembly:single -DskipTests +cd .. +sudo java -jar netphony-topology/target/bgp-ls-speaker-jar-with-dependencies.jar BGP4Parameters_3.xml \ No newline at end of file diff --git a/src/bgpls_speaker/service/java/netphony-topology/.settings/org.eclipse.jdt.core.prefs b/src/bgpls_speaker/service/java/netphony-topology/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..cb635b1c2a6bee7b1279cac6db56bd9ee2f6c271 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/src/bgpls_speaker/service/java/netphony-topology/BGP4Parameters_3.xml b/src/bgpls_speaker/service/java/netphony-topology/BGP4Parameters_3.xml new file mode 100644 index 0000000000000000000000000000000000000000..50dce7ed17613cd9fa4d8f612751e4c045b30cab --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/BGP4Parameters_3.xml @@ -0,0 +1,65 @@ + + + + + 12179 + 7.7.7.7 + + 1112 + + + 10.95.90.43 + false + true + 179 + + + + BGP4Parser2.log + BGP4Client2.log + BGP4Server2.log + + true + + 40000 + true + + + 180 + + 4 + + 100 + + + + false + + true + + fromBGP + + + + + + 0.0.0.0 + \ No newline at end of file diff --git a/src/bgpls_speaker/service/java/netphony-topology/CHANGELOG b/src/bgpls_speaker/service/java/netphony-topology/CHANGELOG new file mode 100644 index 0000000000000000000000000000000000000000..01a2b22efe4a23f2381d01d8b295dc34d8a7fda5 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/CHANGELOG @@ -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. + +v1.3.3 +- Topology Module added +- Topology Module: Export via RESCONF with COP model +- Topology Module: Export via RESTCONF with IETF model (nodes only) +- Topology Module: Export via UNIFY model +- Topology Module: Import via XML +- Topology Module: Import/Export via BGP-LS +v1.3.2 +- Supports network-protocols 1.3.2 +- Update to support reading multiple AS_PATH +- Apache 2.0 license +- Moved to slf4j logging framework +- Added method to pass multiple TEDs from en external program +- Added docker support in travis +v1.3 +- Compile with networking-protocols v1.3.0 (available in maven central) +- JUnit Test upgrade to check intraTEDBs after sending +- Added functionality: read multiple intraTEDBs from xml file +- Added support to draft-previdi-idr-bgpls-te-metric-extensions-00 +v1.2.2 +- Added travis integration +- Javadoc errors fixed +- Ready to meet maven central requirements +- Compile with networking-protocols v1.2.3 (available in maven central) +v1.2.1 +- Compile with networking-protocols v1.2.1 +v1.2 +- JUnit Test added +- Bugfixes +- Reduced number of logs +- Updated README with explanation of parameters +v1.1.1 +- Added configuration instructions of the standalone BGP Peer +- Added dependencies to pom.xml +v1.1.0 +First Public Release diff --git a/src/bgpls_speaker/service/java/netphony-topology/LICENSE b/src/bgpls_speaker/service/java/netphony-topology/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/bgpls_speaker/service/java/netphony-topology/VERSION b/src/bgpls_speaker/service/java/netphony-topology/VERSION new file mode 100644 index 0000000000000000000000000000000000000000..31e5c843497c24df077777c05af122d8b3a60ddb --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/VERSION @@ -0,0 +1 @@ +1.3.3 diff --git a/src/bgpls_speaker/service/java/netphony-topology/doc/Examples.md b/src/bgpls_speaker/service/java/netphony-topology/doc/Examples.md new file mode 100644 index 0000000000000000000000000000000000000000..88f7a7bd5c7a268857a7a4ec2642c388daf715d3 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/doc/Examples.md @@ -0,0 +1,133 @@ + + +#Examples + +##Topology Module Examples + +Two sets of basic configuration files are here included with Topology Module software: the setup for running three TM within the same machine (configuration A) and the setup for running three TM in three dedicated machines (configuration B). In both cases three example network topologies are provided to represent the abstract topology of 2 end-point providers and 1 transit provider. + +### Example TM1: 1 Way Test in the same virtual machine, BPG-LS Plugin and UNIFY Export. + +The setup has been provided just for testing purpose and configures 3 TADS in the same machine to perform unidirectional information exchange. + +![1WayTest](figures/1wayTest.png?raw=true "Test with 3 TM") + +The reference files, including Topology Module configuration, BGP-LS Plugin configuration and abstracted topologies are copiend in the folder target/conf1wayTest after the maven installation. Be sure to compile also the Topology Module as indicated in README.md. + +To execute TM1 run: + ```bash + sudo java -Dlog4j.configurationFile=target/log4j2.xml -jar target/topology-1.3.3-shaded.jar target/conf1wayTest/TM1.xml + ``` + +To execute TM2 run: + ```bash + sudo java -Dlog4j.configurationFile=target/log4j2.xml -jar target/topology-1.3.3-shaded.jar target/conf1wayTest/TM2.xml + ``` + +To execute TM3 run: + ```bash + sudo java -Dlog4j.configurationFile=target/log4j2.xml -jar target/topology-1.3.3-shaded.jar target/conf1wayTest/TM3.xml + ``` + +To verify the retrieved information: + ```bash +curl http://localhost:8087/restconf/data/virtualizer/ | python -m json.tool + ``` +[for TADS2] + ```bash +curl http://localhost:8088/restconf/data/virtualizer/ | python -m json.tool + ``` +[for TADS3] + ```bash +curl http://localhost:8089/restconf/data/virtualizer/ | python -m json.tool + ``` + +### Example TM2: 2 Way Test in the different virtual machines, BPG-LS Plugin and UNIFY Export. +The setup has been provided as reference configuration for the configuration of 3 TM in dedicated machines to perform bidirectional exchange of information +![1WayTest](figures/2wayTest.png?raw=true "Test with 3 TM in 3 different machines") +The reference files, including Topology Module configuration, BGP-LS Plugin configuration and abstracted topologies are in + ```bash +target/conf2waysReal + ``` +Before running the reference scenario be sure to complete the IP configuration in the 3 modules, in fact, according to previous description, minor ad-hoc changes are needed. + +In the Topology Module configuration files (TM*.xml): +• set the IP address used for the BGP-LS communication as Identifier + +In the BGP-LS Plugin configuration (BGPLS*_2way.xml): +• set the IP address used for the BGP-LS communication as BGPIdentifier +• configure the peers as needed (IP address and port) + +[where * = 1,2,3] + +To execute TADS1 in machine 1 run: + ```bash + sudo java -Dlog4j.configurationFile=target/log4j2.xml -jar target/topology-1.3.3-shaded.jar target/conf1wayTest/TM1.xml + ``` + +To execute TADS1 in machine 2 run: + ```bash + sudo java -Dlog4j.configurationFile=target/log4j2.xml -jar target/topology-1.3.3-shaded.jar target/conf1wayTest/TM2.xml + ``` + +To execute TADS1 in machine 3 run: + ```bash + sudo java -Dlog4j.configurationFile=target/log4j2.xml -jar target/topology-1.3.3-shaded.jar target/conf1wayTest/TM3.xml + ``` + +To verify the retrieved information: +[for TADS2, in machine 1] + ```bash +curl http://localhost:8088/restconf/data/virtualizer/ | python -m json.tool + ``` +[for TADS2, in machine 2] + ```bash +>curl http://localhost:8088/restconf/data/virtualizer/ | python -m json.tool + ``` +[for TADS3, in machine 3] + ```bash +>curl http://localhost:8088/restconf/data/virtualizer/ | python -m json.tool + ``` +### Topology module with BGP-LS and COP plugins and BGP-LS speaker + +In this example there are 2 BGP-LS speakers, one acting as sender of topology, and the other as consumer. A small topology is loaded from an xml file in BGP-LS Speaker #1. This topology is sent to BGP-LS Speaker #2. + ```bash +TBD + ``` +### Topology module with BGP-LS and COP plugins and Topology module with BGP-LS speaker + +In this example there are 2 BGP-LS speakers, one acting as sender of topology, and the other as consumer. A small topology is loaded from an xml file in BGP-LS Speaker #1. This topology is sent to BGP-LS Speaker #2. + ```bash +TBD + ``` +## BGP-LS Speaker Examples + +### BPP-LS Speaker Example 1 + +In this example there are 2 BGP-LS speakers, one acting as sender of topology, and the other as consumer. A small topology is loaded from an xml file in BGP-LS Speaker #1. This topology is sent to BGP-LS Speaker #2. +To launch BGP-LS Speaker #1: + ```bash +sudo java -Dlog4j.configurationFile=target/log4j2.xml -jar target/bgp-ls-speaker-jar-with-dependencies.jar target/bgpls_example1/BGP4Parameters_1.xml + ``` + BGP-LS Speaker #2: + ```bash +sudo java -Dlog4j.configurationFile=target/log4j2.xml -jar target/bgp-ls-speaker-jar-with-dependencies.jar target/bgpls_example1/BGP4Parameters_2.xml + ``` +To verify the retrieved information: + ```bash +telnet localhost 1112 +show topology + ``` +Then, the topology is printed on screen. diff --git a/src/bgpls_speaker/service/java/netphony-topology/doc/TAPIExample.md b/src/bgpls_speaker/service/java/netphony-topology/doc/TAPIExample.md new file mode 100644 index 0000000000000000000000000000000000000000..9b0c48c8ed24fe8ca5c06f118b3d440653c686e5 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/doc/TAPIExample.md @@ -0,0 +1,27 @@ + + +# Example 1: TM with XML Plugin and TAPI Plugin +- First of all, compile the full-jar if you have not done so +```bash + mvn package -P generate-full-jar +``` +Execute the server +```bash +sudo java -Dlog4j.configurationFile=target/examples/log4j2.xml -jar target/topology-1.3.4-SNAPSHOT-shaded.jar target/TM_TAPI_example1/TMConfTAPI.xml +``` +Make the query +```bash +curl http://localhost:8089/config/context/topology -X GET -i -H "Content-Type: application/json" -H "Accept: application/json" +``` diff --git a/src/bgpls_speaker/service/java/netphony-topology/doc/TopologyFileDescription.md b/src/bgpls_speaker/service/java/netphony-topology/doc/TopologyFileDescription.md new file mode 100644 index 0000000000000000000000000000000000000000..452050b65106b8393ac8a7df98ea472b7705e608 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/doc/TopologyFileDescription.md @@ -0,0 +1,127 @@ + + +# Topology XML File + +This section describes the topology file format, used by the TADS to load the abstracted view of the local provider. + +The reference file for this description is + +``` +target/conf1wayTest/network1.xml +``` + +The main tag of the file is **network** that can include multiple **domains**, each domain represents a provider. + +```xml + + + + + + +``` + +In this case the network topology includes two providers. + +The first part of the each domain contains some general information: + + - **domain_id**: the AS number of the domain represented in IPv4 format + - the **reachability_entry**: that summarizes the prefix network for the provider (IPv4 network prefix and mask) + - **it_resources**: here the information related to overall IT resources availability is described considering + - **controller_it**: the entry point for 5GEx orchestration + - **cpu**: overall available CPUs + - **mem**: overall available memory + - **storage**: overall available storage + +```xml +0.0.0.1 + + 172.16.101.0 + 24 + + + https://openstack.5Gex.com/url + 100 + 100Gbyte + 100Tbyte + +``` + +Then the file is organized considering a list of nodes and a list unidirectional links. + +Each node is represented with a tag **node** and is identified with an IPv4 id called **router_id** + +```xml + + 172.16.101.101 + + + 172.16.101.102 + + + 172.16.101.103 + + + 172.16.101.104 + +``` + +In the reference case 4 nodes are considered. +Each link is identified by the tag **edge**. +The link description include: + + + - **source**: the source node of the link, identified with the pair **router_id** and interface id, **if_id** + - **destination**: the destination node of the link, identified with the pair router_id and interface + - **TE parameters**: several possibilities are available, in the considered example the focus was on + - unidirectional link delay + - minimum experienced delay + - maximum experienced delay + +```xml + + + 172.16.101.101 + 1 + + + 172.16.101.104 + 1 + + 99 + + 23 + 250 + + + +``` + +For setting up default TE parameters for all the network links, the **edgeCommon** tag is used. + +```xml + + 99 + + 23 + 43 + + 1 + 102 + 802 + 500 + 436 + +``` diff --git a/src/bgpls_speaker/service/java/netphony-topology/doc/figures/1wayTest.png b/src/bgpls_speaker/service/java/netphony-topology/doc/figures/1wayTest.png new file mode 100644 index 0000000000000000000000000000000000000000..021dd3ee5c6dff653af4131f8060e0b7cac88f1d Binary files /dev/null and b/src/bgpls_speaker/service/java/netphony-topology/doc/figures/1wayTest.png differ diff --git a/src/bgpls_speaker/service/java/netphony-topology/doc/figures/2wayTest.png b/src/bgpls_speaker/service/java/netphony-topology/doc/figures/2wayTest.png new file mode 100644 index 0000000000000000000000000000000000000000..4800df6d96874c480059be8cc905e753b8614f2b Binary files /dev/null and b/src/bgpls_speaker/service/java/netphony-topology/doc/figures/2wayTest.png differ diff --git a/src/bgpls_speaker/service/java/netphony-topology/log4j2.xml b/src/bgpls_speaker/service/java/netphony-topology/log4j2.xml new file mode 100644 index 0000000000000000000000000000000000000000..47cf97472ebc0ab692e33da88c70a762c1bb429c --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/log4j2.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/pom.xml b/src/bgpls_speaker/service/java/netphony-topology/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..0b83a126198f9b5a082bedac224f01ffe486e059 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/pom.xml @@ -0,0 +1,497 @@ + + + 4.0.0 + es.tid.netphony + topology + 1.4.0-SNAPSHOT + jar + Netphony TED and BGP-LS peer + Traffic Engineering Database, BGP-LS peer, Topology Module + http://telefonicaid.github.io/netphony-topology/ + + + Apache License 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + + + + + + + + + + + + + + + + + + + com.sun.jersey + jersey-json + ${jersey-version} + + + + org.slf4j + slf4j-api + ${slf4j-version} + + + + org.slf4j + slf4j-simple + ${slf4j-version} + + + es.tid.netphony + network-protocols + 1.4.1 + + + + + org.jgrapht + jgrapht-core + ${jgrapht-core-version} + + + com.google.code.gson + gson + 2.2.2 + + + com.googlecode.json-simple + json-simple + 1.1.1 + + + com.metaparadigm + json-rpc + 1.0 + + + redis.clients + jedis + 2.1.0 + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-datatype-joda-version} + + + + joda-time + joda-time + ${jodatime-version} + + + + + io.grpc + grpc-netty-shaded + ${grpc-protobuf-version} + + + io.grpc + grpc-protobuf + ${grpc-protobuf-version} + + + io.grpc + grpc-stub + ${grpc-stub-version} + + + javax.annotation + javax.annotation-api + ${javax-annotation-api-version} + + + + com.google.guava + guava + 31.1-jre + + + + + + Telefonica I+D + oscar.gonzalezdedios@telefonica.com + Telefonica I+D + https://www.tid.es + + + + scm:git:git@github.com:telefonicaid/netphony-topology.git + scm:git:git@github.com:telefonicaid/netphony-topology.git + git@github.com:telefonicaid/netphony-topology.git + + + + + oss.sonatype.org-snapshot + http://oss.sonatype.org/content/repositories/snapshots + + false + + + true + + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + ${basedir}/src/main/java + + + kr.motd.maven + os-maven-plugin + 1.6.2 + + + + + + org.xolstice.maven.plugins + protobuf-maven-plugin + 0.6.1 + + com.google.protobuf:protoc:3.9.0:exe:${os.detected.classifier} + grpc-java + io.grpc:protoc-gen-grpc-java:1.24.0:exe:${os.detected.classifier} + + + + + compile + compile-custom + + + + + + maven-compiler-plugin + 3.8.1 + + 8 + 8 + UTF-8 + + + + maven-resources-plugin + 2.6 + + UTF-8 + + + + copy-resources + validate + + copy-resources + + + ${basedir}/target + + + ${basedir}/src/main/resources + true + + + ${basedir}/src/main/sample-config-files + true + + + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.0 + + + + true + lib/ + eu.teraflow.tid.bgp4Peer.peer.BGPPeerMain + + + + + + + + + deploy-maven-central + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + -Xdoclint:none + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + + + + bgp-ls-speaker + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.5 + + + org.apache.logging.log4j + log4j-api + 2.5 + + + org.apache.logging.log4j + log4j-core + 2.5 + + + io.netty + netty-transport-native-epoll + 4.1.77.Final + linux-x86_64 + + + + + + maven-assembly-plugin + 3.3.0 + + + jar-with-dependencies + + bgp-ls-speaker + + + eu.teraflow.tid.bgp4Peer.peer.BGPPeerMain + + + + + + + + + generate-javadoc + + + + org.apache.maven.plugins + maven-javadoc-plugin + + false + + 2.9.1 + + + attach-javadocs + + jar + + + + + + + + + integration-test + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.13 + + + integration-test + + integration-test + + + + verify + + verify + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.19.1 + + true + + + + + + + + generate-full-jar + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.5 + + + org.apache.logging.log4j + log4j-api + 2.5 + + + org.apache.logging.log4j + log4j-core + 2.5 + + + + + + org.apache.maven.plugins + maven-shade-plugin + 2.4.3 + + + package + + shade + + + true + + + *:* + + + + false + + + + eu.teraflow.tid.bgp.bgp4Peer.peer.BGPPeerMain + + + + + + + make-assembly + package + + single + + + + + + + + + + + 1.19.4 + 2.0.6 + 4.8.1 + 2.5 + 2.4.2 + 2.3 + 2.19.1 + 0.9.1 + 1.3.2 + 1.24.0 + 1.46.0 + 2.1.5 + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4PeerInitiatedSession.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4PeerInitiatedSession.java new file mode 100644 index 0000000000000000000000000000000000000000..9651d78761d267fdb10bcb1994aa0a90d9c17cf8 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4PeerInitiatedSession.java @@ -0,0 +1,188 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.bgp4session; + +import es.tid.bgp.bgp4.messages.BGP4Message; +import es.tid.bgp.bgp4.messages.BGP4MessageTypes; +import es.tid.bgp.bgp4.messages.BGP4Update; +import eu.teraflow.tid.bgp4Peer.peer.BGP4Exception; +import eu.teraflow.tid.bgp4Peer.updateTEDB.UpdateDispatcher; + +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.net.Inet4Address; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.SocketException; +import java.util.Timer; + +/** + * BGP4 session server + * + * @author mcs + * + */ +public class BGP4PeerInitiatedSession extends GenericBGP4Session{ + /** + * Class to dispatch the BGP4 update messages. + * If a BGP5 update message is received, it is stored in a queue of UpdateDispatcher. + */ + private UpdateDispatcher updateDispatcher; + + + /** + * Constructor of the BGP4 Session + * @param s Socket of the BGP4Peer-BGP4Peer Communication + * @param bgp4SessionsInformation bgp4SessionsInformation + * @param updateDispatcher updateDispatcher + * @param holdTime holdTime + * @param BGPIdentifier BGPIdentifier + * @param version version + * @param myAutonomousSystem myAutonomousSystem + * @param noDelay noDelay + * @param keepAliveTimer keepAliveTimer + */ + public BGP4PeerInitiatedSession(Socket s, BGP4SessionsInformation bgp4SessionsInformation, UpdateDispatcher updateDispatcher,int holdTime,Inet4Address BGPIdentifier,int version,int myAutonomousSystem,boolean noDelay,int keepAliveTimer ){ + super(bgp4SessionsInformation, holdTime, BGPIdentifier, version, myAutonomousSystem,keepAliveTimer); + + this.setFSMstate(BGP4StateSession.BGP4_STATE_IDLE); + log=LoggerFactory.getLogger("BGP4Server"); + log.debug("New BGP4Session: "+s); + this.socket = s; + try { + s.setTcpNoDelay(noDelay); + } catch (SocketException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + this.newSessionId(); + + this.remotePeerIP =(Inet4Address) ((InetSocketAddress) socket.getRemoteSocketAddress()).getAddress(); + + + timer=new Timer(); + this.updateDispatcher = updateDispatcher; + //this.keepAliveLocal=params.getKeepAliveTimer(); + //this.deadTimerLocal=params.getDeadTimer(); + } + + + + /** + * Initiates a Session the BGP-4 Peers + */ + public void run() { + try { + initializeBGP4Session(); + } catch (BGP4Exception e2) { + // TODO Auto-generated catch block + try { + this.socket.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return; + } + log.info("BGP4 Session established with peer "+this.remotePeerIP); + this.deadTimerT=new DeadTimerThread(this, this.holdTime); + startDeadTimer(); + this.keepAliveT=new KeepAliveThread(out, this.keepAliveTimer); + startKeepAlive(); + + //Listen to new messages + try{ + while(this.FSMstate==BGP4StateSession.BGP4_STATE_SESSION_UP) { + try { + this.msg = readBGP4Msg(in);//Read a new message + + }catch (IOException e){ + cancelDeadTimer(); + cancelKeepAlive(); + timer.cancel(); + try { + in.close(); + out.close(); + } catch (Exception e1) { + log.warn("Exception Closing BGP4 Session with "+this.remotePeerIP); + } + log.debug("Finishing BGP4 Session with "+this.remotePeerIP); + return; + } + if (this.msg != null) {//If null, it is not a valid PCEP message + boolean bgp4Msg = true;//By now, we assume a valid PCEP message has arrived + //Depending on the type a different action is performed + switch(BGP4Message.getMessageType(this.msg)) { + + case BGP4MessageTypes.MESSAGE_OPEN: + log.debug("OPEN message received"); + //After the session has been started, ignore subsequent OPEN messages + log.warn("OPEN message ignored"); + break; + + case BGP4MessageTypes.MESSAGE_KEEPALIVE: + log.debug("KEEPALIVE message received from "+this.remotePeerIP); + //The Keepalive message allows to reset the deadtimer + break; + + case BGP4MessageTypes.MESSAGE_NOTIFICATION: + log.info("NOTIFICATION message from "+this.remotePeerIP); + break; + + case BGP4MessageTypes.MESSAGE_UPDATE: + log.debug("UPDATE message from "+this.remotePeerIP); + BGP4Update bgp4Update = new BGP4Update(msg); + log.debug(bgp4Update.toString()); + bgp4Update.setLearntFrom(this.getRemotePeerIP().toString()); + updateDispatcher.dispatchRequests(bgp4Update); + break; + + default: + log.warn("ERROR: unexpected message from "+this.remotePeerIP); + bgp4Msg = false; + } + + if (bgp4Msg) { + //Reseting Dead Timer as BGP4 Session Message has arrived + resetDeadTimer(); + } + } + } + }finally{ + log.error("BGP4 session with peer "+this.remotePeerIP+" has been closed"); + cancelDeadTimer(); + cancelKeepAlive(); + this.FSMstate=BGP4StateSession.BGP4_STATE_IDLE; + endSession(); + } + } + + @Override + public void close() { + // TODO Auto-generated method stub + + } + + + + @Override + protected void endSession() { + // TODO Auto-generated method stub + log.debug("Ending session with id "+this.getSessionId()+" from peer "+this.remotePeerIP); + BGP4SessionsInformation.deleteSession(this.getSessionId()); + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4Session.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4Session.java new file mode 100644 index 0000000000000000000000000000000000000000..0c1a656c4b2f74c63ffc09143ec93a274116d5f1 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4Session.java @@ -0,0 +1,44 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.bgp4session; + +import es.tid.bgp.bgp4.messages.BGP4Message; + + +/** + * BGP Session Interface + * + * @author mcs + * + */ +public interface BGP4Session { + /** + * Send close message and finish the BGP Session + */ + public void close(/*int reason*/); + /** + * Finish the BGP Session abruptly, + */ + public void killSession(); + + /** + * Encodes and sends BGP Message + * If the message is bad encoded, the session is closed + * @param message BGP4 Message + */ + public void sendBGP4Message(BGP4Message message); + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionClient.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionClient.java new file mode 100644 index 0000000000000000000000000000000000000000..b96359b6cb00fae27e50ac08b7e3fe07772275eb --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionClient.java @@ -0,0 +1,222 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.bgp4session; + +import es.tid.bgp.bgp4.messages.BGP4Message; +import es.tid.bgp.bgp4.messages.BGP4MessageTypes; +import es.tid.bgp.bgp4.messages.BGP4Update; +import eu.teraflow.tid.bgp4Peer.peer.BGP4Exception; +import eu.teraflow.tid.bgp4Peer.updateTEDB.UpdateDispatcher; + +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.net.Inet4Address; +import java.net.Socket; +import java.util.Timer; +/** + * Client session + * + * @author mcs + * + */ +public class BGP4SessionClient extends GenericBGP4Session{ + /** + * Peer BGP port to which the session is connected + */ + private int peerBGP_port; + /** + * Delay + */ + + + private boolean no_delay=true; + private String localBGP4Address; + private int localBGP4Port; + /** + * Class to dispatch the BGP4 update messages. + * If a BGP5 update message is received, it is stored in a queue of UpdateDispatcher. + */ + private UpdateDispatcher updateDispatcher; + + public BGP4SessionClient(BGP4SessionsInformation bgp4SessionsInformation,UpdateDispatcher updateDispatcher, Inet4Address peerBGP_IPaddress, int peerBGP_port, int holdTime,Inet4Address BGPIdentifier,int version,int myAutonomousSystem, String localBGP4Address, int localBGP4Port,int keepAliveTimer){ + super(bgp4SessionsInformation, holdTime, BGPIdentifier, version, myAutonomousSystem,keepAliveTimer); + timer=new Timer(); + log = LoggerFactory.getLogger("BGP4Client"); + this.peerBGP_port = peerBGP_port; + this.updateDispatcher=updateDispatcher; + this.localBGP4Address=localBGP4Address; + this.localBGP4Port=localBGP4Port; + this.remotePeerIP = peerBGP_IPaddress; + } + /** + * Initiates a Session between the local BGP Peer and the remote BGP Peer + */ + public void run() { + + log.info("Opening new BGP4 Session with host "+ this.remotePeerIP.getHostAddress() + " on port " + this.peerBGP_port); + log.debug("Do we want to update from peer?" + updateFrom); + log.debug("Do we want to send to peer?" + sendTo); + try { + Inet4Address addr = (Inet4Address) Inet4Address.getByName(localBGP4Address); + Inet4Address addrPeer = remotePeerIP; + socket = new Socket(addrPeer, peerBGP_port, addr, 0); + if (no_delay){ + this.socket.setTcpNoDelay(true); + log.debug("No delay activated"); + } + + } catch (IOException e) { + log.info("Connection refused trying to connect " + remotePeerIP.getHostAddress() + " on port " + peerBGP_port); + //As there is not yet a session added (it is added in the beginning of initializeBGP4Session()); + //endSession(); + return; + } + + try { + initializeBGP4Session(); + log.info("BGP4 Session established with peer "+this.remotePeerIP); + this.keepAliveT= new KeepAliveThread(this.getOut(),this.keepAliveTimer); + keepAliveT.start(); + } catch (BGP4Exception e2) { + // TODO Auto-generated catch block + e2.printStackTrace(); + log.debug("Session with "+this.remotePeerIP+" already exists: "+e2.getMessage()); + try { + socket.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + log.error("Problem closing socket "+e.getMessage()); + } + return; + } + + + + + try{ + while(this.FSMstate==BGP4StateSession.BGP4_STATE_SESSION_UP) { + try { + + this.msg = readBGP4Msg(in);//Read a new message + + }catch (IOException e){ + cancelDeadTimer(); + cancelKeepAlive(); + timer.cancel(); + try { + in.close(); + out.close(); + } catch (Exception e1) { + log.warn("problem closing sockets"); + } + log.debug("Finishing BGP4 Session abruptly!"); + return; + } + if (this.msg != null) {//If null, it is not a valid PCEP message + boolean bgp4Msg = true;//By now, we assume a valid PCEP message has arrived + //Depending on the type a different action is performed + switch(BGP4Message.getMessageType(this.msg)) { + + case BGP4MessageTypes.MESSAGE_OPEN: + log.debug("BGP OPEN message received from "+this.remotePeerIP); + //After the session has been started, ignore subsequent OPEN messages + log.warn("OPEN message ignored"); + break; + + case BGP4MessageTypes.MESSAGE_KEEPALIVE: + log.debug("BGP KEEPALIVE message received from "+this.remotePeerIP); + //The Keepalive message allows to reset the deadtimer + break; + + case BGP4MessageTypes.MESSAGE_NOTIFICATION: + log.debug("BGP NOTIFICATION message received from "+this.remotePeerIP); + break; + + case BGP4MessageTypes.MESSAGE_UPDATE: + log.debug("BGP UPDATE message received from "+this.remotePeerIP); + if(this.getUpdateFrom()){ + BGP4Update bgp4Update = new BGP4Update(msg); + log.debug(bgp4Update.toString()); + bgp4Update.setLearntFrom(this.remotePeerIP.getHostAddress() ); + updateDispatcher.dispatchRequests(bgp4Update); + } + else + log.debug("Update message from " + this.remotePeerIP + " discarded"); + break; + + default: + log.warn("ERROR: unexpected message received"); + bgp4Msg = false; + } + + if (bgp4Msg) { + //Reseting Dead Timer as BGP4 Session Message has arrived + resetDeadTimer(); + } + } + } + }finally{ + //log.error("SESSION "+ internalSessionID+" IS KILLED"); + log.info("BGP4 session with peer "+this.remotePeerIP+" has been closed"); + cancelDeadTimer(); + cancelKeepAlive(); + this.FSMstate=BGP4StateSession.BGP4_STATE_IDLE; + endSession(); + } + } + + + public int getPeerBGP_port() { + return peerBGP_port; + } + public void setPeerBGP_port(int peerBGP_port) { + this.peerBGP_port = peerBGP_port; + } + public Boolean getUpdateFrom() { + return updateFrom; + } + public void setUpdateFrom(Boolean updateFrom) { + this.updateFrom = updateFrom; + } + public Boolean getSendTo() { + return sendTo; + } + public void setSendTo(Boolean sendTo) { + this.sendTo = sendTo; + } + public boolean isNo_delay() { + return no_delay; + } + public void setNo_delay(boolean no_delay) { + this.no_delay = no_delay; + } + + + @Override + public void close() { + // TODO Auto-generated method stub + + } + + + @Override + protected void endSession() { + // TODO Auto-generated method stub + log.debug("Ending session with id "+this.getSessionId()); + this.BGP4SessionsInformation.deleteSession(this.getSessionId()); + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionExistsException.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionExistsException.java new file mode 100644 index 0000000000000000000000000000000000000000..4f6f4af856ad4293d5c999cc2cc8cde6203b60f0 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionExistsException.java @@ -0,0 +1,24 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.bgp4session; + +public class BGP4SessionExistsException extends Exception { + + /** + * + */ + private static final long serialVersionUID = 1L; + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionsInformation.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionsInformation.java new file mode 100644 index 0000000000000000000000000000000000000000..963406700f327ec47eb213ec943f29476714f76c --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionsInformation.java @@ -0,0 +1,146 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.bgp4session; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import eu.teraflow.tid.bgp4Peer.peer.BGP4Exception; + +import java.io.DataOutputStream; +import java.net.Inet4Address; +import java.util.Enumeration; +import java.util.Hashtable; + + +/** + * Class where the oppened BGP4 sessions are stored. + * + * @author mcs + * + */ +public class BGP4SessionsInformation { + public Hashtable sessionList; + public Hashtable sessionListByPeerIP; + private boolean isTest = false; + Logger log; + //FIXME: ya lo tenemos a trav�s de la lista de sesiones + DataOutputStream out; + + public BGP4SessionsInformation(){ + sessionList=new Hashtable(); + sessionListByPeerIP=new Hashtable(); + log = LoggerFactory.getLogger("BGP4Parser"); + } + + public BGP4SessionsInformation(boolean test){ + sessionList=new Hashtable(); + sessionListByPeerIP=new Hashtable(); + log = LoggerFactory.getLogger("BGP4Parser"); + isTest= test; + } + + + public synchronized void notifySessionStart(Inet4Address addr) throws BGP4SessionExistsException{ + if (sessionListByPeerIP.containsKey(addr)){ + throw new BGP4SessionExistsException(); + } + } + + public synchronized void addSession(long sessionId, GenericBGP4Session session) throws BGP4Exception{ + Enumeration sessions = sessionList.elements(); + log.debug("Looking to add session with id "+sessionId+" --> "+session.toString()); + + //Check if there is already a session with the remote peer. + //Only one session allowed with each remote peer + GenericBGP4Session existingSession=sessionListByPeerIP.get(session.remotePeerIP); + if(isTest){ + //If there is no existing session with the peer + sessionList.put(new Long(sessionId),session); + sessionListByPeerIP.put(session.getPeerIP() , session); + log.debug("Registering new session with Peer "+session.getPeerIP() +" with ID "+sessionId); + } + else{ + if (existingSession!=null){ + log.debug("Session with id "+existingSession.getSessionId()+" against "+session.remotePeerIP.getHostAddress()+" already exists"); + throw new BGP4Exception();//si no existe throw new BGP4Exception(); + } + + //If there is no existing session with the peer + sessionList.put(new Long(sessionId),session); + sessionListByPeerIP.put(session.getPeerIP() , session); + log.debug("Registering new session with Peer "+session.getPeerIP() +" with ID "+sessionId); + + } + + } + + public synchronized void deleteSession(long sessionId){ + GenericBGP4Session ses=sessionList.get(sessionId); + if (ses!=null) { + Inet4Address ip=sessionList.get(sessionId).getPeerIP(); + sessionList.remove(new Long(sessionId)); + sessionListByPeerIP.remove(ses.getPeerIP()); + log.debug("Deleted Session with id "+sessionId +" with peer "+ses.getPeerIP().getHostAddress()); + }else { + log.info("SESSION WAS NOT REGISTERED NULL"); + } + + + } + + @Override + public String toString() { + StringBuffer sb=new StringBuffer(2000); + int counter = 1; + Enumeration sessions = sessionList.elements(); + + //Comprobar si ya existe la session con ese peer + while (sessions.hasMoreElements()){ + sb.append("Session number "+(counter++)+"\n"); + sb.append(sessions.nextElement().toString()+"\n"); + + } + return sb.toString(); + } + + public String printSession(long sessionId){ + GenericBGP4Session ses=sessionList.get(new Long(sessionId)); + if (ses!=null){ + return ses.toString(); + }else { + return "session "+sessionId+" does not exist"; + } + } + + + + public DataOutputStream getOut() { + return out; + } + + public void setOut(DataOutputStream out) { + this.out = out; + } + + public Hashtable getSessionList() { + return sessionList; + } + public void setSessionList(Hashtable sessionList) { + this.sessionList = sessionList; + } + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4StateSession.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4StateSession.java new file mode 100644 index 0000000000000000000000000000000000000000..5a1a5119a6fc213c0c923673dd6dbdaa108b755c --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4StateSession.java @@ -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. + +package eu.teraflow.tid.bgp4Peer.bgp4session; +/** + * The state session attribute indicates the current state of the BGP + FSM + * @author mcs + * + */ +public class BGP4StateSession { + public static final int BGP4_STATE_IDLE=0; + public static final int BGP4_STATE_TCP_PENDING=1; + public static final int BGP4_STATE_OPEN_WAIT=2; + public static final int BGP4_STATE_KEEP_WAIT=3; + public static final int BGP4_STATE_SESSION_UP=4; +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/ConnectRetryTimer.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/ConnectRetryTimer.java new file mode 100644 index 0000000000000000000000000000000000000000..0eba7b30963ec9254ba8b892a057b6d4996513a5 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/ConnectRetryTimer.java @@ -0,0 +1,30 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.bgp4session; + +import java.util.TimerTask; + +public class ConnectRetryTimer extends TimerTask { + int initialValue; + ConnectRetryTimer(int initialValue){ + this.initialValue=initialValue; + } + @Override + public void run() { + // TODO Auto-generated method stub + + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/DeadTimerThread.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/DeadTimerThread.java new file mode 100644 index 0000000000000000000000000000000000000000..ee9dd662320914cec0afb7fff9ebed74a4f06756 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/DeadTimerThread.java @@ -0,0 +1,72 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.bgp4session; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * BGP4 DeadTimer management Thread + * + */ +public class DeadTimerThread extends Thread { + + + private BGP4Session bgp4Session = null; + private int deadTimer = 0; + private Logger log; + private boolean running; + + public DeadTimerThread(BGP4Session p, int d) { + this.deadTimer = d; + this.bgp4Session = p; + log=LoggerFactory.getLogger("BGP4Server"); + } + + public void run() { + running=true; + while (running) { + try { + sleep(deadTimer * 1000); + /* + * Time's over, close PCEP Session + */ + log.warn("DeadTimer OVER"); + this.bgp4Session.close(/*ObjectParameters.REASON_DEADTIMER*/); + return; + } catch (InterruptedException e) { + //return; + if (running==false){ + log.debug("Ending DeadTimerThread"); + return; + } + else { + log.debug("Reseting Dead Timer"); + } + } catch (Exception e) { + //FIXME: Ver que hacer aqui, por ahora, solo saco un log + log.warn("Unhandled exception: " + e.getMessage()); + } + + } + + + } + + public void stopRunning(){ + running=false; + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/GenericBGP4Session.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/GenericBGP4Session.java new file mode 100644 index 0000000000000000000000000000000000000000..c42423affbb415a40e6697a56285e9f77f55c59c --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/GenericBGP4Session.java @@ -0,0 +1,908 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.bgp4session; + +import es.tid.bgp.bgp4.messages.BGP4Keepalive; +import es.tid.bgp.bgp4.messages.BGP4Message; +import es.tid.bgp.bgp4.messages.BGP4MessageTypes; +import es.tid.bgp.bgp4.messages.BGP4Open; +import es.tid.bgp.bgp4.open.BGP4CapabilitiesOptionalParameter; +import es.tid.bgp.bgp4.open.BGP4OctetsASByteCapabilityAdvertisement; +import es.tid.bgp.bgp4.open.MultiprotocolExtensionCapabilityAdvertisement; +import es.tid.bgp.bgp4.update.fields.pathAttributes.AFICodes; +import es.tid.bgp.bgp4.update.fields.pathAttributes.SAFICodes; +import eu.teraflow.tid.bgp4Peer.peer.BGP4Exception; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.net.Inet4Address; +import java.net.Socket; +import java.util.Timer; + + +/** + * Generic BGP4 Session. + * Implements the basics of a BGP4 Session + * Any particular session must inherit this one + * + * @author ogondio + * + */ +public abstract class GenericBGP4Session extends Thread implements BGP4Session { + + /** + * PCEP Session Manager + */ + protected BGP4SessionsInformation BGP4SessionsInformation; + + /** + * Thread to send periodic Keepalives + */ + protected KeepAliveThread keepAliveT = null; + + /** + * Value of the Keepalive timer set by the Local PCE. Used to send keepalives + */ + + protected int keepAliveLocal; + + /** + * Value of the Keepalive timer of the peer PCC. It is not used in the server!!! + */ + protected int keepAlivePeer; + + /** + * Thread to check if the connection is still alive. + * If in this time the PCE has not received anything, it closes the session + * It is set by the PCC (in this case, the remote peer) + */ + protected DeadTimerThread deadTimerT = null; + + /** + * Value of the deadtimer that the PCC sends. It is used in the PCC in the thread + */ + protected int deadTimerPeer; + + /** + * Socket of the communication between BGP peers + */ + protected Socket socket = null; + + /** + * Remote Peer IP Address + * Obtained from the socket for convenience + */ + protected Inet4Address remotePeerIP=null; + + /** + * DataOutputStream to send messages to the peer + */ + protected DataOutputStream out=null; + + + + /** + * DataInputStream to receive messages from PCC + */ + protected DataInputStream in=null;// + /** + * Queue to send the Computing Path Requests + */ + //protected RequestQueueSend req; + + /** + * Logger to write the Parent PCE server log + */ + protected Logger log; + + /** + * Timer to schedule KeepWait and OpenWait Timers + */ + protected Timer timer; + + /** + * Finite State Machine of the PCEP protocol + */ + protected int FSMstate; + + /** + * Remote Domain ID + * null if not sent + */ + protected Inet4Address remoteDomainId=null; + + /** + * Remote List of OF Codes + * If sent by the peer PCE + */ + //private LinkedList remoteOfCodes;//FIME: What do we do with them? + + /** + * RemoteOK: a boolean that is set to 1 if the system has received an + acceptable Open message. + */ + private boolean remoteOK=false; + + /** + * + */ + private boolean localOK=false; + + /** + * + */ + private int openRetry=0; + + /** + * Byte array to store the last PCEP message read. + */ + protected byte[] msg = null; + + /** + * Initial number of the session ID (internal use only) + */ + public static long sessionIdCounter=0; + + /** + * + */ + protected Boolean updateFrom; + protected boolean sendTo; + + /** + * Session ID (internal use only) + */ + private long sessionId; + /**************** PARAMETROS DE LA SESION ********************/ + private int ConnectRetryCounter=0; + private ConnectRetryTimer connectRetryTimer = null; + private int connectRetryTime; //FIXME: esto aun no se que es. + + /**************PARAMETROS OPEN MESSAGE************************/ + protected int holdTime; + /** + * Time between sending keepalives + */ + protected int keepAliveTimer; + /** + * IP address that is assigned to that BGP speaker + */ + protected Inet4Address BGPIdentifier; + /** + * Autonomous System number of the sender + */ + protected int myAutonomousSystem; + /** + * version indicates the protocol version number of the message + * it must be 4 + */ + protected int version; + + + public GenericBGP4Session(BGP4SessionsInformation bgp4SessionsInformation,int holdTime,Inet4Address BGPIdentifier,int version,int myAutonomousSystem,int mykeepAliveTimer) { + log=LoggerFactory.getLogger("BGP4Parser"); + this.BGP4SessionsInformation=bgp4SessionsInformation; + this.holdTime=holdTime; + this.BGPIdentifier=BGPIdentifier; + this.version = version; + this.myAutonomousSystem=myAutonomousSystem; + this.keepAliveTimer = mykeepAliveTimer; + this.newSessionId(); + + } + + /** + * Read PCE message from TCP stream + * @param in InputStream + * @return byte array with a BGP4 Message + * @throws IOException Execption thrown trying to read message + */ + protected byte[] readBGP4Msg(DataInputStream in) throws IOException{ + byte[] ret = null; + + byte[] hdr = new byte[BGP4Message.getBGPHeaderLength()]; + byte[] temp = null; + boolean endHdr = false; + int r = 0; + int length = 0; + boolean endMsg = false; + int offset = 0; + + while (!endMsg) { + try { + if (endHdr) { + r = in.read(temp, offset, 1); + } + else { + r = in.read(hdr, offset, 1); + } + } catch (IOException e){ + log.warn("Error reading data: "+ e.getMessage()); + throw e; + }catch (Exception e) { + log.warn("readMsg Oops: " + e.getMessage()); + throw new IOException(); + } + + if (r > 0) { + if (offset == BGP4Message.getBGPMarkerLength()) { + length = ((int)hdr[offset]&0xFF) << 8; + } + if (offset == BGP4Message.getBGPMarkerLength() + 1) { + length = length | (((int)hdr[offset]&0xFF)); + temp = new byte[length]; + endHdr = true; + System.arraycopy(hdr, 0, temp, 0, BGP4Message.getBGPHeaderLength()); + } + if ((length > 0) && (offset == length - 1)) { + endMsg = true; + } + offset++; + } + else if (r==-1){ + log.debug("End of stream has been reached"); + throw new IOException(); + } + } + if (length > 0) { + ret = new byte[length]; + System.arraycopy(temp, 0, ret, 0, length); + } + return ret; + } + + /** + * Read PCE message from TCP stream + * @param in InputStream + * @return byte array with a BGP4 Message + * @throws IOException Execption thrown trying to read message + */ + protected byte[] readMsgOptimized(DataInputStream in) throws IOException{ + byte[] ret = null; + + byte[] hdr = new byte[4]; + byte[] temp = null; + boolean endHdr = false; + int r = 0; + int length = 0; + boolean endMsg = false; + int offset = 0; + + + while (!endMsg) { + try { + if (endHdr) { + //log.info("Vamos a leer datos "); + r = in.read(temp, offset, length-offset); + if (r>0){ + if ((offset+r)>=length){ + //log.info("Bien "); + endMsg=true; + }else { + offset=offset+r; + } + + } + else if (r<0){ + log.error("End of stream has been reached reading data"); + throw new IOException(); + } + } + else { + //log.info("Vamos a leer la cabecera "); + r = in.read(hdr, offset, 4-offset); + if (r < 0) { + log.error("End of stream has been reached reading header"); + throw new IOException(); + }else if (r >0){ + if ((offset+r)>=4){ + length = ( (hdr[offset+2]&0xFF) << 8) | ((hdr[offset+3]&0xFF)); + offset=4; + temp = new byte[length]; + endHdr = true; + System.arraycopy(hdr, 0, temp, 0, 4); + if (length==4){ + endMsg=true; + } + }else { + offset=offset+r; + } + + } + + } + } catch (IOException e){ + log.error("Error reading data: "+ e.getMessage()); + throw e; + }catch (Exception e) { + log.error("readMsg Oops: " + e.getMessage()); + log.error("Failure reason : "+e.getStackTrace()); + throw new IOException(); + } + + } + if (length > 0) { + ret = new byte[length]; + System.arraycopy(temp, 0, ret, 0, length); + } + return ret; + } + + + // /** + // *

Close the PCE session

+ // *

List of reasons (RFC 5440):

+ // * Value Meaning + // 1 No explanation provided + // 2 DeadTimer expired + // 3 Reception of a malformed PCEP message + // 4 Reception of an unacceptable number of unknown + // requests/replies + // 5 Reception of an unacceptable number of unrecognized + // PCEP messages + // * @param reason Reason for closing the PCEP Session + // * @return PCEP Session closed OK + // */ + // public void close(int reason){ + // log.info("Closing PCEP Session"); + // BGP4Close p_close=new BGP4Close(); + // p_close.setReason(reason); + // sendPCEPMessage(p_close); + // killSession(); + // } + public DataOutputStream getOut() { + return out; + } + + public void setOut(DataOutputStream out) { + this.out = out; + } + + /** + * Starts the deadTimerThread + */ + protected void startDeadTimer() { + this.deadTimerT.start(); + } + /** + * Resets the DeadTimerThread + * To be called every time a message in the session is received + */ + protected void resetDeadTimer() { + if (this.deadTimerT != null) { + this.deadTimerT.interrupt(); + } + } + + public Socket getSocket() { + return socket; + } + + /** + * Ends the DeadTimer Thread + */ + protected void cancelDeadTimer() { + log.debug("Cancelling DeadTimer"); + if (this.deadTimerT != null) { + this.deadTimerT.stopRunning(); + this.deadTimerT.interrupt(); + this.deadTimerT=null; + } + } + + /** + * Starts the Keep Alive Thread + */ + public void startKeepAlive() { + this.keepAliveT.start(); + } + + /** + * Ends the KeepAlive Thread + */ + public void cancelKeepAlive() { + log.debug("Cancelling KeepAliveTimer"); + if (this.keepAliveT != null) { + this.keepAliveT.stopRunning(); + this.keepAliveT.interrupt(); + this.keepAliveT=null; + } + } + + /** + * Ends current connections + */ + protected void endConnections(){ + try { + if (in != null) { + in.close(); + } + if (out != null) { + out.close(); + } + if (this.socket != null) { + log.warn("Closing socket"); + this.socket.close(); + } + + } catch (Exception e) { + log.warn("Error closing connections: " + e.getMessage()); + } + } + + public int getFSMstate() { + return FSMstate; + } + + protected void setFSMstate(int fSMstate) { + FSMstate = fSMstate; + } + + public void killSession(){ + log.warn("Killing Session"); + timer.cancel(); + this.endConnections(); + this.cancelDeadTimer(); + this.cancelKeepAlive(); + this.endSession(); + this.BGP4SessionsInformation.deleteSession(this.sessionId); + log.warn("Interrupting thread!!!!"); + this.interrupt(); + } + + /** + * DO HERE ANYTHING NEEDED AT CLOSING?? + * STATISTICS, ETC + */ + protected abstract void endSession(); + + protected void initializeBGP4Session() throws BGP4Exception { + this.BGP4SessionsInformation.addSession(this.getSessionId(), this); + + /** + * Byte array to store the last PCEP message read. + */ + byte[] msg = null; + //First get the input and output stream + try { + out = new DataOutputStream(socket.getOutputStream()); + in = new DataInputStream(socket.getInputStream()); + } catch (IOException e) { + log.warn("Problem in the sockets, ending BGP4Session"); + killSession(); + return; + } + //- Starts the ConnectRetryTimer with initial value + int initialValue=1000;//FIXME: no tengo ni idea de este parametro aun + connectRetryTimer= new ConnectRetryTimer(initialValue) ; + + //STARTING PCEP SESSION ESTABLISHMENT PHASE + //It begins in Open Wait State + this.setFSMstate(BGP4StateSession.BGP4_STATE_OPEN_WAIT); + log.debug("Entering BGP4_STATE_OPEN_WAIT, Scheduling Open Wait Timer"); + + //Create the 60 seconds Open Wait Timer to wait for an OPEN message + OpenWaitTimerTask owtt= new OpenWaitTimerTask(this); + this.timer.schedule(owtt, 60000); + //Define (Not use yet), the keepwait timer + KeepWaitTimerTask kwtt=new KeepWaitTimerTask(this); + BGP4Open open_msg=new BGP4Open(); + //Rellenar: + // - My autonomous system + // - holdTime + // - BGPIdentifier + open_msg.setMyAutonomousSystem(myAutonomousSystem); + open_msg.setBGPIdentifier(BGPIdentifier); + open_msg.setHoldTime(holdTime); + //Chek optional parameters + BGP4CapabilitiesOptionalParameter cop = new BGP4CapabilitiesOptionalParameter(); + open_msg.getParametersList().add(cop); + MultiprotocolExtensionCapabilityAdvertisement multProtExtCapAdv = new MultiprotocolExtensionCapabilityAdvertisement(); + multProtExtCapAdv.setAFI(AFICodes.AFI_BGP_LS); + multProtExtCapAdv.setSAFI(SAFICodes.SAFI_BGP_LS); + cop.getCapabilityList().add(multProtExtCapAdv); + BGP4OctetsASByteCapabilityAdvertisement fouroctects = new BGP4OctetsASByteCapabilityAdvertisement(); + fouroctects.setAS(myAutonomousSystem); + cop.getCapabilityList().add(fouroctects); + + //Send the OPEN message + this.sendBGP4Message(open_msg); + //Now, read messages until we are in SESSION UP + while (this.FSMstate!=BGP4StateSession.BGP4_STATE_SESSION_UP){ + //log.info("State session "+this.FSMstate); + try { + //Read a new message + msg = readBGP4Msg(in); + + }catch (IOException e){ + log.warn("Error reading message, ending session"+e.getMessage()); + killSession(); + return; + } + if (msg != null) {//If null, it is not a valid PCEP message + //log.info("Read a message"); + switch(BGP4Message.getMessageType(msg)) { + case BGP4MessageTypes.MESSAGE_OPEN: + //log.info("OPEN Message Received"); + if (this.FSMstate==BGP4StateSession.BGP4_STATE_OPEN_WAIT){ + log.debug("FSMstate = BGP4_STATE_OPEN_WAIT"); + BGP4Open open_received; + // try { + open_received=new BGP4Open(msg); + log.debug("**** Open received ****\n"+ open_received.toString());//FIXME!!! Cambiar a finest + owtt.cancel(); + //Check parameters + if (openRetry==1){ + boolean checkOK=true; + this.version = open_received.getVersion(); + if (this.version != 4){ + checkOK=false; + } + // this.deadTimerPeer=open_received.getDeadTimer(); + // this.keepAlivePeer=open_received.getKeepalive(); + // + // if (this.deadTimerPeer>maxDeadTimerAccepted){ + // checkOK=false; + // } + // if (this.deadTimerPeer==0){ + // if(zeroDeadTimerAccepted==false){ + // checkOK=false; + // } + // } + // if (this.keepAlivePeer perrobjlist=new LinkedList(); + // perrobjlist.add(perrorObject); + // perror.setErrorObjList(perrobjlist); + // perror.setOpen(open_received.getOpen()); + // log.info("Sending Error with new proposal"); + // this.sendPCEPMessage(perror); + // this.openRetry=this.openRetry+1; + /** + * o If LocalOK=1, the system restarts the OpenWait timer and stays in + the OpenWait state. + o If LocalOK=0, the system clears the OpenWait timer, starts the + KeepWait timer, and moves to the KeepWait state. + */ + if (localOK==true){ + //log.info("Local ok esta a true, vamos a open wait"); + owtt.cancel(); + owtt= new OpenWaitTimerTask(this); + this.timer.schedule(owtt, 60000); + this.setFSMstate(BGP4StateSession.BGP4_STATE_OPEN_WAIT); + } + else { + //log.info("Local ok esta a false, vamos a keep wait"); + owtt.cancel(); + this.setFSMstate(BGP4StateSession.BGP4_STATE_KEEP_WAIT); + this.timer.schedule(kwtt, 60000); + } + } + else { + /* + * If no errors are detected, and the session characteristics are + acceptable to the local system, the system: + o Sends a Keepalive message to the PCEP peer, + o Starts the Keepalive timer, + o Sets the RemoteOK variable to 1. + If LocalOK=1, the system clears the OpenWait timer and moves to the + UP state. + If LocalOK=0, the system clears the OpenWait timer, starts the + KeepWait timer, and moves to the KeepWait state. + */ + this.BGPIdentifier=open_received.getBGPIdentifier(); + this.myAutonomousSystem=open_received.getMyAutonomousSystem(); + this.holdTime=open_received.getHoldTime(); +// if (open_received.getOptionalParameterLength() != 0){ +// log.info("Tiene parametros opcionales"); +// } + //this.BGP4SessionsInformation.addSession(this.getSessionId(), this); + BGP4Keepalive p_ka= new BGP4Keepalive(); + //log.info("Sending Keepalive message"); + sendBGP4Message(p_ka); //Creates the Keep Wait Timer to wait for a KA to acknowledge the OPEN sent + //FIXME: START KA TIMER! + this.remoteOK=true; + if(this.localOK==true){ + //log.info("Entering STATE_SESSION_UP"); + //He conseguido establecer sesion. Hay que matar el otro hilo + + this.setFSMstate(BGP4StateSession.BGP4_STATE_SESSION_UP); + //La sesion se ha establecido + + } + else { + //log.info("Entering STATE_KEEP_WAIT"); + //log.fine("Scheduling KeepwaitTimer"); + timer.schedule(kwtt, 60000); + this.setFSMstate(BGP4StateSession.BGP4_STATE_KEEP_WAIT); + } + } + } + } + else{ + log.debug("Ignore OPEN message, already one received!!"); + } + + break; + case BGP4MessageTypes.MESSAGE_KEEPALIVE: + //log.info("KeepAlive Message Received"); + this.localOK=true; + if(this.FSMstate==BGP4StateSession.BGP4_STATE_KEEP_WAIT){ + // If RemoteOK=1, the system clears the KeepWait timer and moves to + // the UP state. + // If RemoteOK=0, the system clears the KeepWait timer, starts the + // OpenWait timer, and moves to the OpenWait State. + + if (remoteOK==true){ + kwtt.cancel(); + //log.info("Entering STATE_SESSION_UP"); + this.setFSMstate(BGP4StateSession.BGP4_STATE_SESSION_UP); + } + else{ + kwtt.cancel(); + //log.info("Entering OPEN WAIT STATE"); + owtt=new OpenWaitTimerTask(this); + this.timer.schedule(owtt, 60000); + this.setFSMstate(BGP4StateSession.BGP4_STATE_OPEN_WAIT); + } + + } + //If not... seguimos igual que estabamos + //Mas KA no hacen mal... + break; + + default: + log.error("UNEXPECTED Message Received"); + if (this.FSMstate!=BGP4StateSession.BGP4_STATE_OPEN_WAIT){ + log.debug("Ignore OPEN message, already one received!!"); + } + else { + log.error("Unexpected message RECEIVED, closing"); + + } + break; + } + } + else { + if (this.FSMstate!=BGP4StateSession.BGP4_STATE_OPEN_WAIT){ + log.info("Ignore message, already one received!!"); + } + else { + log.error("Unexpected message RECEIVED, closing"); + + } + }//Fin del else + }//Fin del WHILE + } + + + @Override + public void sendBGP4Message(BGP4Message message) { + message.encode(); + try { + out.write(message.getBytes()); + out.flush(); + } catch (Exception e) { + log.error("Problem writing message, finishing session "+e.getMessage()); + killSession(); + } + + } + + + public Inet4Address getRemotePeerIP() { + return remotePeerIP; + } + + + public Inet4Address getBGPIdentifier() { + return BGPIdentifier; + } + + public void setBGPIdentifier(Inet4Address bGPIdentifier) { + BGPIdentifier = bGPIdentifier; + } + + public Boolean getUpdateFrom() { + return updateFrom; + } + + public void setUpdateFrom(Boolean updateFrom) { + this.updateFrom = updateFrom; + } + + public Boolean getSendTo(){ + return sendTo; + } + + public void setSendTo(boolean sendTo) { + this.sendTo = sendTo; + } + + public int getMyAutonomousSystem() { + return myAutonomousSystem; + } + + public void setMyAutonomousSystem(int myAutonomousSystem) { + this.myAutonomousSystem = myAutonomousSystem; + } + + + + public String shortInfo(){ + StringBuffer sb=new StringBuffer(1000); + if (this.socket!=null){ + sb.append("remAddr: "); + sb.append(this.socket.getRemoteSocketAddress()); + sb.append(" state: "); + if (this.FSMstate==BGP4StateSession.BGP4_STATE_OPEN_WAIT){ + sb.append("OPEN_WAIT"); + }else if (this.FSMstate==BGP4StateSession.BGP4_STATE_IDLE){ + sb.append("IDLE"); + }else if (this.FSMstate==BGP4StateSession.BGP4_STATE_KEEP_WAIT){ + sb.append("KEEP_WAIT"); + }else if (this.FSMstate==BGP4StateSession.BGP4_STATE_SESSION_UP){ + sb.append("SESSION_UP"); + }else if (this.FSMstate==BGP4StateSession.BGP4_STATE_SESSION_UP){ + sb.append("TCP_PENDING"); + }else { + sb.append("UNKNOWN"); + } + + } + + return sb.toString(); + } + + public String toString(){ + StringBuffer sb=new StringBuffer(1000); + sb.append("\t> Session ID: "+this.sessionId+"\n"); + sb.append("\t> BGP Remote Peer: "+this.remotePeerIP+"\n"); + sb.append("\t> BGPIdentifier: "+this.BGPIdentifier+"\n"); + if (this.socket!=null){ + sb.append("\t> remAddr: "); + sb.append(this.socket.getRemoteSocketAddress()+"\n"); + sb.append("\t> state: "); + if (this.FSMstate==BGP4StateSession.BGP4_STATE_OPEN_WAIT){ + sb.append("OPEN_WAIT\n"); + }else if (this.FSMstate==BGP4StateSession.BGP4_STATE_IDLE){ + sb.append("IDLE\n"); + }else if (this.FSMstate==BGP4StateSession.BGP4_STATE_KEEP_WAIT){ + sb.append("KEEP_WAIT\n"); + }else if (this.FSMstate==BGP4StateSession.BGP4_STATE_SESSION_UP){ + sb.append("SESSION_UP\n"); + }else if (this.FSMstate==BGP4StateSession.BGP4_STATE_SESSION_UP){ + sb.append("TCP_PENDING\n"); + }else { + sb.append("UNKNOWN"); + } + } + + return sb.toString(); + } + + public synchronized void newSessionId(){ + this.sessionId=GenericBGP4Session.sessionIdCounter+1; + sessionIdCounter=sessionIdCounter+1; + } + + public long getSessionId() { + return sessionId; + } + + + @Override + public void close() { + // TODO Auto-generated method stub + + } + + @Override + public boolean equals(Object obj) { + if (remotePeerIP != null){ + if (this.remotePeerIP.equals(((GenericBGP4Session)obj).getBGPIdentifier())){ + return true; + } + } + else { + log.info("TODO NUL!! en el equals!"); + } + return false; + } + + + public Inet4Address getPeerIP(){ + return (Inet4Address)this.socket.getInetAddress(); + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepAliveThread.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepAliveThread.java new file mode 100644 index 0000000000000000000000000000000000000000..32112e01bd99bb5371e4cc966255ad7ff8b425ba --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepAliveThread.java @@ -0,0 +1,98 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.bgp4session; +import es.tid.bgp.bgp4.messages.BGP4Keepalive; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.DataOutputStream; +import java.io.IOException; + + +public class KeepAliveThread extends Thread { + + private int keepAlive = 0; + private boolean running; + private Logger log; + private DataOutputStream out=null; //Use this to send messages to peer + + /* + * @param p + * @param k + */ + public KeepAliveThread(DataOutputStream out, int k) { + this.keepAlive = k; + this.out = out; + log=LoggerFactory.getLogger("BGP4Server"); + } + + /** + * Starts the Keepalive process + */ + public void run() { + running=true; + while (running) { + try { + if (keepAlive > 0) { + sleep(keepAlive * 1000); + sendKeepAlive(); + } + else { + log.debug("Ending KEEPALIVE mechanism"); + return; + } + } catch (InterruptedException e) { + if (running==false){ + log.debug("Ending KeepAliveThread"); + return; + } + else { + //Keepalive Timer is reseted + log.debug("Reseting Keepalive timer"); + } + } + } + } + + /** + * Sets the running variable to false. After this, an interrupt will cause + * the KeepaliveThread to end. + */ + public void stopRunning(){ + running=false; + } + /** + * Sends KeepAlive Message. It does not wait for any response. + */ + private void sendKeepAlive() { + BGP4Keepalive p_ka= new BGP4Keepalive(); + //try { + p_ka.encode(); +// } catch (PCEPProtocolViolationException e1) { +// // TODO Auto-generated catch block +// e1.printStackTrace(); +// } + try { + log.debug("Sending Keepalive message"); + out.write(p_ka.getBytes()); + out.flush(); + } catch (IOException e) { + log.warn("Error sending KEEPALIVE: " + e.getMessage()); + } + } + + } + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepWaitTimerTask.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepWaitTimerTask.java new file mode 100644 index 0000000000000000000000000000000000000000..94e39fb19c927c4dd6c4c89f222dbbab9e4e48a4 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepWaitTimerTask.java @@ -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. + +package eu.teraflow.tid.bgp4Peer.bgp4session; + + +import java.util.TimerTask; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * If no Open message is received before the expiration of the OpenWait + timer, the PCEP peer sends a PCErr message with Error-Type=1 and + Error-value=2, the system releases the PCEP resources for the PCEP + peer, closes the TCP connection, and moves to the Idle state. + + * @author Oscar Gonzalez de Dios + * + */ +public class KeepWaitTimerTask extends TimerTask { + +// private DataOutputStream out=null; //Use this to send messages to peer + private BGP4Session bgp4Session; + private Logger log; + + public KeepWaitTimerTask(BGP4Session bgp4Session){ + this.bgp4Session=bgp4Session; + log=LoggerFactory.getLogger("PCEServer"); + } + + + public void run() { + log.warn("KEEP WAIT Timer OVER"); +// PCEPError perror=new PCEPError(); +// PCEPErrorObject perrorObject=new PCEPErrorObject(); +// perrorObject.setErrorType(ObjectParameters.ERROR_ESTABLISHMENT); +// perrorObject.setErrorValue(ObjectParameters.ERROR_ESTABLISHMENT_NO_KA_OR_ERROR_KEEPWAIT_TIMER); +// ErrorConstruct error_c=new ErrorConstruct(); +// error_c.getErrorObjList().add(perrorObject); +// perror.setError(error_c); +// bgp4Session.sendBGP4Message(perror); + this.bgp4Session.killSession(); + return; + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/OpenWaitTimerTask.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/OpenWaitTimerTask.java new file mode 100644 index 0000000000000000000000000000000000000000..fbb9aca1adb8448c837ce0e437684f4b4e1999a9 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/OpenWaitTimerTask.java @@ -0,0 +1,59 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.bgp4session; + +import java.util.TimerTask; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + + +/** + * If no Open message is received before the expiration of the OpenWait + timer, the PCEP peer sends a PCErr message with Error-Type=1 and + Error-value=2, the system releases the PCEP resources for the PCEP + peer, closes the TCP connection, and moves to the Idle state. + + * @author Oscar Gonzalez de Dios + * + */ +public class OpenWaitTimerTask extends TimerTask { + +// private DataOutputStream out=null; //Use this to send messages to peer + private BGP4Session bgp4Session; + private Logger log; + + public OpenWaitTimerTask(BGP4Session bgp4Session){ + this.bgp4Session=bgp4Session; + log=LoggerFactory.getLogger("PCEServer"); + } + + + public void run() { + log.warn("OPEN WAIT Timer OVER"); +// PCEPError perror=new PCEPError(); +// PCEPErrorObject perrorObject=new PCEPErrorObject(); +// perrorObject.setErrorType(ObjectParameters.ERROR_ESTABLISHMENT); +// perrorObject.setErrorValue(ObjectParameters.ERROR_ESTABLISHMENT_NO_OPEN_MESSAGE); +// ErrorConstruct error_c=new ErrorConstruct(); +// error_c.getErrorObjList().add(perrorObject); +// perror.setError(error_c); +// log.info("Sending Error"); +// bgp4Session.sendPCEPMessage(perror); + this.bgp4Session.killSession(); + return; + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcApp.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcApp.java new file mode 100644 index 0000000000000000000000000000000000000000..02cfbaf91bc0e6652ab8f558f48c68e707f15a3b --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcApp.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 eu.teraflow.tid.bgp4Peer.grpc; + +import io.grpc.Server; +import io.grpc.ServerBuilder; + +public class grpcApp { + + public static void main( String[] args ) throws Exception + { + // Create a new server to listen on port 8080 + Server server = ServerBuilder.forPort(2021) + .addService(new updateServiceImpl()) + .build(); + + // Start the server + server.start(); + + // Server threads are running in the background. + System.out.println("Server started"); + // Don't exit the main thread. Wait until server is terminated. + server.awaitTermination(); + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcClient.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcClient.java new file mode 100644 index 0000000000000000000000000000000000000000..ca9b13007bc3ed427bf89fd1f1847d511b7af0d7 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcClient.java @@ -0,0 +1,368 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.grpc; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import com.google.common.net.InetAddresses; + +import eu.teraflow.tid.bgp4Peer.models.LinkNLRIMsg; +import eu.teraflow.tid.bgp4Peer.models.NodeNLRIMsg; +import eu.teraflow.tid.bgp4Peer.models.UpdateMsg; +import eu.teraflow.tid.bgp4Peer.models.UpdateMsgList; +import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; +import io.grpc.stub.StreamObserver; +import jdk.javadoc.internal.doclets.toolkit.util.links.LinkInfo; +import src.main.proto.GrpcService.linkInfo; +import src.main.proto.GrpcService.nodeInfo; +import src.main.proto.GrpcService.NodeDescriptors; +import src.main.proto.GrpcService.updateRequest; +import src.main.proto.GrpcService.updateResponse; +import src.main.proto.updateServiceGrpc; +import src.main.proto.updateServiceGrpc.updateServiceBlockingStub; +import src.main.proto.updateServiceGrpc.updateServiceStub; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import java.util.logging.Logger; + +public class grpcClient { + + private static final Logger logger = Logger.getLogger(grpcClient.class.getName()); + + public static void sendGrpcUpdateMsg(UpdateMsg update) throws Exception{ + + updateRequest request=null; + nodeInfo n=null; + linkInfo unic=null; + List l = new ArrayList<>(); + List nodes = new ArrayList<>(); + if(update.nodeCheck()==false && update.linkCheck()==false){ + return; + } +// Build node for grpc message + if(update.nodeCheck()!=false) { + for(NodeNLRIMsg node : update.getNodeList()){ + n = nodeInfo.newBuilder().setNodeName(node.getNodeName()). + setIgpID(node.getRouterID()). + setBgplsID(node.getLocalBgplsID()). + setAsID(InetAddresses.coerceToInteger(node.getAs_number())). + setLearntFrom(node.getLearntFrom()). + buildPartial(); + nodes.add(n); + } + } + for(LinkNLRIMsg link : update.getLinkList()) { + +// String strIPlocal; +// String strIPremote; + String strIgpR; + String strIgpL; + // LinkNLRIMsg link=update.getLink(); + +// if(link.getiPv4RouterIDLocalNodeLATLV()==null) +// strIPlocal="-"; +// else { +// strIPlocal=link.getiPv4RouterIDLocalNodeLATLV(); +// } +// if(link.getiPv4RouterIDNeighborNodeLATLV()==null) +// strIPremote="-"; +// else { +// strIPremote=link.getiPv4RouterIDNeighborNodeLATLV(); +// } + + if(link.getRemoteNodeIGPId()==null) + strIgpR="-"; + else { + strIgpR=link.getRemoteNodeIGPId().toString(); + } + if(link.getLocalNodeIGPId()==null) + strIgpL="-"; + else { + strIgpL=link.getLocalNodeIGPId().toString(); + } + String ipv4R; + if(link.getiPv4RouterIDLocalNodeLATLV()==null) + ipv4R="-"; + else { + ipv4R=link.getiPv4RouterIDLocalNodeLATLV(); + } + String ipv4L; + if(link.getiPv4RouterIDNeighborNodeLATLV()==null) + ipv4L="-"; + else { + ipv4L=link.getiPv4RouterIDNeighborNodeLATLV(); + } + +// Build link for grpc message. need non null values in some cases + + unic = linkInfo.newBuilder().setLocalID(strIgpR). + setLocalIPv4ID(ipv4L). + setRemoteID(strIgpL). + setRemoteIPv4ID(ipv4R). + setLocal(NodeDescriptors.newBuilder(). + setAsNumber(link.getLocalDomainID().toString()). + setBgplsID(link.getLocalBgplsID())). + setRemote(NodeDescriptors.newBuilder(). + setAsNumber(link.getRemoteDomainID().toString()). + setBgplsID(link.getRemoteBgplsID())). + setAvailableBw(link.getAvailableBw()). + setResidualBw(link.getResidualBw()).setUtilized(link.getUtilizedBw()). + setMinLinkDelay(link.getMinDelay()).setMaxLinkDelay(link.getMaxDelay()). + setDelayVariation(link.getLinkDelayVar()).setDelay(link.getLinkDelay()). + setTEDefaultMetric(1).setAdjacencySid("0").setLearntFrom(link.getLearntFrom()).buildPartial(); + + l.add(unic); + } + + if(nodes.size()==0 && l.size()>0) { + request=updateRequest.newBuilder(). + setNextHop(update.getNextHop().toString()). + setAddressFamilyID(Integer.toString(update.getAFI())). + setAsPathSegment(Integer.toString(update.getAsPathSegment())). + addAllLink(l).build(); + }else if(nodes.size()>0&& l.size()==0) { + // logger.debug("ADDING NODE"); + request=updateRequest.newBuilder(). + setNextHop(update.getNextHop().toString()). + setAddressFamilyID(Integer.toString(update.getAFI())). + setAsPathSegment(Integer.toString(update.getAsPathSegment())). + addAllNode(nodes).build(); + }else { + //Error if node name is null + // TODO: handle seng grpc error? + // logger.debug("ADDING NODE AND LINK"); + request=updateRequest.newBuilder(). + setNextHop("-"+update.getNextHop().toString()). + setAddressFamilyID(Integer.toString(update.getAFI())). + setAsPathSegment(Integer.toString(update.getAsPathSegment())). + addAllNode(nodes).addAllLink(l).build(); + + } + final ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost",2021).usePlaintext().build(); + updateServiceBlockingStub stub = updateServiceGrpc.newBlockingStub(channel); + + //TODO: this to a function + System.out.println("grpcClient request: "+request.toString()); + + // channel.awaitTermination(20, TimeUnit.SECONDS); + // updateResponse response = stub.update(request); + // Espera hasta que el canal esté inactivo + updateResponse response = stub.update(request); + + System.out.println("\nRESPUESTA RECIBIDA"); + System.out.println(response); + } + // private void shutdownManagedChannel(ManagedChannel managedChannel) { + // managedChannel.shutdown(); + // try { + // managedChannel.awaitTermination(mChannelShutdownTimeoutMs, TimeUnit.MILLISECONDS); + // } catch (InterruptedException e) { + // Thread.currentThread().interrupt(); + // // Allow thread to exit. + // } finally { + // managedChannel.shutdownNow(); + // } + // Verify.verify(managedChannel.isShutdown()); + // } + // stub.update(request, new StreamObserver () { + + // public void onNext(updateResponse response) { + // System.out.println("respuesta del server: "+response); + // } + // public void onError(Throwable t) { + // System.out.println("error: "+t.getMessage()); + // latch.countDown(); + // } + // public void onCompleted() { + // // Typically you'll shutdown the channel somewhere else. + // // But for the purpose of the lab, we are only making a single + // // request. We'll shutdown as soon as this request is done. + // latch.countDown(); + // logger.info("gRPC call completed"); + // System.out.println("OnCompleted"); + // // channel.shutdownNow(); + // // try{ + // // channel.shutdown().awaitTermination(5, TimeUnit.SECONDS); + // // }catch (InterruptedException e){ + // // System.out.println("channel error"+e.toString()); + // // } + + // } + // }); + // latch.await(5, TimeUnit.SECONDS); + // channel.shutdown().awaitTermination(5, TimeUnit.SECONDS); + + public static void sendGrpc(UpdateMsgList update) { + //construir mensaje + //update get node,lin,path + //getname,ids,as + final ManagedChannel channel = ManagedChannelBuilder.forTarget("localhost:2021").usePlaintext().build(); + updateServiceStub stub = updateServiceGrpc.newStub(channel); + + + if(update.getNodeList().isEmpty()&&update.getLinkList().isEmpty()) { + return; + } + updateRequest request=null; + nodeInfo n=null; + linkInfo l=null; + if(!update.getNodeList().isEmpty()) { + + for(NodeNLRIMsg node: update.getNodeList()) { + + n = nodeInfo.newBuilder().setNodeName(node.getNodeName()).setIgpID(node.getLocalBgplsID()). + setBgplsID(node.getBgplsID().toString()).setAsID(InetAddresses.coerceToInteger(node.getAs_number())). + buildPartial(); + } + + + } + if(!update.getLinkList().isEmpty()) { + + String strIPlocal; + String strIPremote; + String strIgpR; + String strIgpL; + + for(LinkNLRIMsg link: update.getLinkList()) { + + if(link.getiPv4RouterIDLocalNodeLATLV()==null) + strIPlocal="-"; + else { + strIPlocal=link.getiPv4RouterIDLocalNodeLATLV(); + } + if(link.getiPv4RouterIDNeighborNodeLATLV()==null) + strIPremote="-"; + else { + strIPremote=link.getiPv4RouterIDNeighborNodeLATLV(); + } + + if(link.getRemoteNodeIGPId()==null) + strIgpR="-"; + else { + strIgpR=link.getRemoteNodeIGPId().toString(); + } + if(link.getLocalNodeIGPId()==null) + strIgpL="-"; + else { + strIgpL=link.getLocalNodeIGPId().toString(); + } + String ipv4R; + if(link.getiPv4RouterIDNeighborNodeLATLV()==null) + ipv4R="-"; + else { + ipv4R=link.getiPv4RouterIDNeighborNodeLATLV(); + } + String ipv4L; + if(link.getiPv4RouterIDLocalNodeLATLV()==null) + ipv4L="-"; + else { + ipv4L=link.getiPv4RouterIDLocalNodeLATLV(); + } + +// NodeDescriptors local= NodeDescriptors.newBuilder(). +// setAsNumber(link.getLocalDomainID().toString()). +// setBgplsID(link.getLocalBgplsID()).buildPartial(); + + + l = linkInfo.newBuilder().setLocalID(strIgpR). + setLocalIPv4ID(ipv4L). + setRemoteID(strIgpL). + setRemoteIPv4ID(ipv4R). + setLocal(NodeDescriptors.newBuilder(). + setAsNumber(link.getLocalDomainID().toString()). + setBgplsID(link.getLocalBgplsID())). + setRemote(NodeDescriptors.newBuilder(). + setAsNumber(link.getRemoteDomainID().toString()). + setBgplsID(link.getRemoteBgplsID())). + setAvailableBw(link.getAvailableBw()). + setResidualBw(link.getResidualBw()).setUtilized(link.getUtilizedBw()). + setMinLinkDelay(link.getMinDelay()).setMaxLinkDelay(link.getMaxDelay()). + setDelayVariation(link.getLinkDelayVar()).setDelay(link.getLinkDelay()). + setTEDefaultMetric(1).setAdjacencySid("0").buildPartial(); + } + + } + if(n==null) { + request = updateRequest.newBuilder().addLink(l).build(); + }else if(l==null) { + request = updateRequest.newBuilder().addNode(n).build(); + }else { + request = updateRequest.newBuilder().addNode(n).addLink(l).build(); + } + + + + + + stub.update(request, new StreamObserver () { + + public void onNext(updateResponse response) { + System.out.println("respuesta del server: "+response); + } + public void onError(Throwable t) { + System.out.println("error: "+t.getMessage()); + } + public void onCompleted() { + // Typically you'll shutdown the channel somewhere else. + // But for the purpose of the lab, we are only making a single + // request. We'll shutdown as soon as this request is done. + System.out.println("channel shutdown"); + channel.shutdownNow(); + } + }); + + + + + + } + public static void main( String[] args ) throws Exception + { + final ManagedChannel channel = ManagedChannelBuilder.forTarget("localhost:2021").usePlaintext().build(); + + // Replace the previous synchronous code with asynchronous code. + // This time use an async stub: + updateServiceStub stub = updateServiceGrpc.newStub(channel); + + // Construct a request + int a = 123; + nodeInfo n = nodeInfo.newBuilder().setNodeName("router 3").setIgpID("1341234").buildPartial(); + updateRequest request = + updateRequest.newBuilder().addNode(n).build(); + + // Make an Asynchronous call. Listen to responses w/ StreamObserver + stub.update(request, new StreamObserver () { + + public void onNext(updateResponse response) { + System.out.println("respuesta del server: "+response); + } + public void onError(Throwable t) { + System.out.println("error: "+t.getMessage()); + } + public void onCompleted() { + // Typically you'll shutdown the channel somewhere else. + // But for the purpose of the lab, we are only making a single + // request. We'll shutdown as soon as this request is done. + System.out.println("channel shutdown"); + channel.shutdownNow(); + } + }); + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/updateServiceImpl.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/updateServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..e9dff709fabd84fe14426e52057542e70e496e1d --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/updateServiceImpl.java @@ -0,0 +1,42 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.grpc; + +import io.grpc.stub.StreamObserver; +import src.main.proto.GrpcService.updateRequest; +import src.main.proto.GrpcService.updateResponse; +import src.main.proto.updateServiceGrpc.updateServiceImplBase; + + +public class updateServiceImpl extends updateServiceImplBase{ + +public void update(updateRequest request, StreamObserver responseObserver) { + + System.out.println(request); + + updateResponse response = updateResponse.newBuilder() + .setAck("Update procesado, " + request ) + .build(); + + // Use responseObserver to send a single response back + responseObserver.onNext(response); + + + // When you are done, you must call onCompleted. + responseObserver.onCompleted(); + + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/json/bgpMarshal.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/json/bgpMarshal.java new file mode 100644 index 0000000000000000000000000000000000000000..f4bdcc587d7f56c8d690a2e69ba5944c670e2b91 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/json/bgpMarshal.java @@ -0,0 +1,82 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.json; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileWriter; +import java.io.IOException; +import java.util.LinkedList; +import java.util.List; + +import org.codehaus.jackson.JsonEncoding; +import org.codehaus.jackson.JsonGenerationException; +import org.codehaus.jackson.JsonGenerator; +import org.codehaus.jackson.map.JsonMappingException; +import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +import eu.teraflow.tid.bgp4Peer.models.LinkNLRIMsg; +import eu.teraflow.tid.bgp4Peer.models.NodeNLRIMsg; +import eu.teraflow.tid.bgp4Peer.models.PathAttributeMsg; +import eu.teraflow.tid.bgp4Peer.models.UpdateMsg; +import eu.teraflow.tid.bgp4Peer.models.UpdateMsgList; + +public class bgpMarshal { + + + ObjectMapper mapper = new ObjectMapper(); + JsonGenerator g; + FileWriter fWriter; + public void bgpMarshaller() throws IOException{ + + + mapper.setSerializationInclusion(Inclusion.NON_NULL); + mapper.setSerializationInclusion(Inclusion.NON_EMPTY); + + + +// String jsonStr = mapper.writeValueAsString(node); +// mapper.writeValue(new File("target/node.json"), nodeList); +// System.out.println(jsonStr); + + } + public void writeFile(UpdateMsgList update) throws JsonGenerationException, JsonMappingException, IOException { + + g = mapper.getJsonFactory().createJsonGenerator(new File("node.json"), JsonEncoding.UTF8); +// update=update.id2Name(); + mapper.writeValue(g, update); + String temp = mapper.writeValueAsString(update)+"\n"; +// FileOutputStream fos = new FileOutputStream("target/update.json", true); +// fos.write(temp.getBytes()); +// fos.close(); + fWriter = new FileWriter("updateWriter.json"); +// if(temp.length()>2) + fWriter.write(temp); + + + + } + public void closeFile() throws IOException { + g.close(); + fWriter.close(); + } + + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementServer.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementServer.java new file mode 100644 index 0000000000000000000000000000000000000000..3a813e93678f6e92002543cf92b3092957c23a42 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementServer.java @@ -0,0 +1,85 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.management; + +import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionsInformation; +import eu.teraflow.tid.bgp4Peer.peer.SendTopology; +import eu.teraflow.tid.tedb.MultiDomainTEDB; +import eu.teraflow.tid.tedb.TEDB; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.net.ServerSocket; +import java.util.Hashtable; +/** + * To manage the server + * + * @author mcs + * + */ +public class BGP4ManagementServer extends Thread { + private Logger log; + private int BGP4ManagementPort = 8888; + private BGP4SessionsInformation bgp4SessionsInformation; + /** + * Topology database for interDomain Links. + */ + private MultiDomainTEDB multiTEDB; + /** + * Topology database for intradomain Links. It owns several domains. + */ + private Hashtable intraTEDBs; + + /** + * Class to send the topology. It is needes to set the parameters sendTopology to true or false. + */ + private SendTopology sendTopology; + + public BGP4ManagementServer(int BGP4ManagementPort, MultiDomainTEDB multiTEDB, Hashtable intraTEDBs, BGP4SessionsInformation bgp4SessionsInformation, SendTopology sendTopology){ + log =LoggerFactory.getLogger("BGP4Server"); + this.BGP4ManagementPort = BGP4ManagementPort; + this.multiTEDB=multiTEDB; + this.intraTEDBs=intraTEDBs; + this.bgp4SessionsInformation =bgp4SessionsInformation; + this.sendTopology=sendTopology; + + } + /** + * RUN + */ + public void run(){ + ServerSocket serverSocket = null; + boolean listening=true; + try { + log.debug("Listening management on port "+BGP4ManagementPort); + serverSocket = new ServerSocket(BGP4ManagementPort); + } + catch (Exception e){ + log.error("Could not listen management on port "+BGP4ManagementPort); + e.printStackTrace(); + return; + } + + try { + while (listening) { + new BGP4ManagementSession(serverSocket.accept(),multiTEDB,intraTEDBs,bgp4SessionsInformation, sendTopology).start(); + } + serverSocket.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementSession.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementSession.java new file mode 100644 index 0000000000000000000000000000000000000000..476628728a45176791e364c42469086fed7a03e6 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementSession.java @@ -0,0 +1,199 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.management; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintStream; +import java.net.Inet4Address; +import java.net.Socket; +import java.util.Enumeration; +import java.util.Hashtable; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionsInformation; +import eu.teraflow.tid.bgp4Peer.peer.SendTopology; +import eu.teraflow.tid.bgp4Peer.tedb.IntraTEDBS; +import eu.teraflow.tid.tedb.DomainTEDB; +import eu.teraflow.tid.tedb.MultiDomainTEDB; +import eu.teraflow.tid.tedb.SimpleTEDB; +import eu.teraflow.tid.tedb.TEDB; + +/** + * + * @author mcs + * + */ +public class BGP4ManagementSession extends Thread { + /** + * The socket of the management session + */ + private Socket socket; + + /** + * Logger + */ + private Logger log; + + /** + * Output Stream of the managament session, to write the answers. + */ + private PrintStream out; + /** + * Topology database for interDomain Links. + */ + private MultiDomainTEDB multiTEDB; + /** + * Topology database for intradomain Links. It owns several domains. + */ + private Hashtable intraTEDBs; + + /** + * The infomation of all the active sessions + */ + private BGP4SessionsInformation bgp4SessionsInformation; + /** + * Class to send the topology. It is needes to set the parameters sendTopology to true or false. + */ + private SendTopology sendTopology; + + public BGP4ManagementSession(Socket s,MultiDomainTEDB multiTEDB, Hashtable intraTEDBs,BGP4SessionsInformation bgp4SessionsInformation, SendTopology sendTopology){ + this.socket=s; + log=LoggerFactory.getLogger("BGP4Server"); + this.multiTEDB=multiTEDB; + this.intraTEDBs=intraTEDBs; + this.bgp4SessionsInformation= bgp4SessionsInformation; + this.sendTopology=sendTopology; + } + + public void run(){ + log.info("Starting Management session"); + boolean running=true; + try { + out=new PrintStream(socket.getOutputStream()); + } catch (IOException e) { + log.warn("Management session cancelled: "+e.getMessage()); + return; + } + try { + BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream())); + while (running) { + //out.print("BGP4:>"); + + + + out.print("Available commands:\r\n"); + out.print(" > show topology\r\n"); + out.print(" > show sessions\r\n"); + out.print(" > set traces on\r\n"); + out.print(" > set traces off\r\n"); + out.print(" > send topology on\r\n"); + out.print(" > send topology off\r\n"); + out.print(" > quit\r\n"); + + + String command = null; + try { + command = br.readLine(); + } catch (IOException ioe) { + log.warn("IO error trying to read your command"); + return; + } + if (command.equals("quit")) { + log.info("Ending Management Session"); + out.println("bye!"); + try { + out.close(); + } catch (Exception e){ + e.printStackTrace(); + } + try { + br.close(); + } catch (Exception e){ + e.printStackTrace(); + } + return; + } + +// else if (command.equals("help")){ +// out.print("Available commands:\r\n"); +// out.print(" > show topology\r\n"); +// out.print(" > show sessions\r\n"); +// out.print(" > set traces on\r\n"); +// out.print(" > set traces off\r\n"); +// out.print(" > send topology on\r\n"); +// out.print(" > send topology off\r\n"); +// out.print(" > quit\r\n"); +// +// } + else if (command.equals("show sessions")){ + //Print intradomain and interDomain links + out.print(bgp4SessionsInformation.toString()); + } + else if (command.equals("show topology")){ + //Print intradomain and interDomain links + if (multiTEDB != null) + out.println(multiTEDB.printTopology()); + Enumeration domainTedbs=intraTEDBs.keys(); + while (domainTedbs.hasMoreElements()){ + String domainID=domainTedbs.nextElement(); + TEDB ted=intraTEDBs.get(domainID); + if (ted instanceof DomainTEDB) { + out.println("Intradomain TEDB with ID "+domainID); + out.println(ted.printTopology()); + } + + } + + } + else if (command.equals("set traces on")) { + //log.setLevel(Level.ALL); + Logger log2=LoggerFactory.getLogger("BGP4Parser"); + //log2.setLevel(Level.ALL); + Logger log3=LoggerFactory.getLogger("BGP4Client"); + //log3.setLevel(Level.ALL); + out.print("traces on!\r\n"); + } + else if (command.equals("set traces off")) { + //log.setLevel(Level.SEVERE); + Logger log2=LoggerFactory.getLogger("BGP4Parser"); + //log2.setLevel(Level.SEVERE); + Logger log3=LoggerFactory.getLogger("BGP4Client"); + //log3.setLevel(Level.SEVERE); + out.print("traces off!\r\n"); + } + else if (command.equals("send topology on")) { + sendTopology.setSendTopology(true); + } + else if (command.equals("send topology off")) { + sendTopology.setSendTopology(false); + } + else{ + out.print("invalid command\n"); + out.print("\n"); + } + + } + } catch (Exception e) { + e.printStackTrace(); + return; + } + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/LinkNLRIMsg.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/LinkNLRIMsg.java new file mode 100644 index 0000000000000000000000000000000000000000..fb9a08d7e9be664cd712d148c1edda69661ddf2f --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/LinkNLRIMsg.java @@ -0,0 +1,298 @@ + +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.models; + +import java.net.Inet4Address; +import java.util.ArrayList; + +import org.slf4j.Logger; + +import es.tid.bgp.bgp4.update.fields.LinkNLRI; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.NodeDescriptorsSubTLV; + +public class LinkNLRIMsg { + + private ArrayList nodeDescriptorsSubTLV; + // Dominios + private Inet4Address localDomainID; + private Inet4Address remoteDomainID; + + private Inet4Address areaID; + private Inet4Address bgplsID; + + private Inet4Address LocalNodeIGPId; + private Inet4Address RemoteNodeIGPId; + + private int linkDelay; + private int linkDelayVar; + private int minDelay; + private int maxDelay; + private int linkLoss; + private int residualBw; + private int availableBw; + private int utilizedBw; + + private Inet4Address iPv4RouterIDLocalNodeLATLV; + private Inet4Address iPv4RouterIDNeighborNodeLATLV; + + private int IGP_type; + private String localIGPID = null; + private String remoteIGPID = null; + private String localBgplsID; + private String remoteBgplsID; + private Logger log; + private String learntFrom; + + public LinkNLRIMsg(LinkNLRI linkNLRI, String learntFrom) { + + // LinkState vs Link?? + this.learntFrom = learntFrom; + + if (linkNLRI.getLocalNodeDescriptors().getAutonomousSystemSubTLV() != null) { + localDomainID = linkNLRI.getLocalNodeDescriptors().getAutonomousSystemSubTLV().getAS_ID(); + } + if (linkNLRI.getLocalNodeDescriptors().getAreaID() != null) { + areaID = linkNLRI.getLocalNodeDescriptors().getAreaID().getAREA_ID(); + } + if (linkNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV() != null) { + bgplsID = linkNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV().getBGPLS_ID(); + } + if (linkNLRI.getLocalNodeDescriptors().getIGPRouterID() != null) { + LocalNodeIGPId = linkNLRI.getLocalNodeDescriptors().getIGPRouterID().getIpv4AddressOSPF(); + } + + if (linkNLRI.getRemoteNodeDescriptorsTLV().getAutonomousSystemSubTLV() != null) { + remoteDomainID = linkNLRI.getRemoteNodeDescriptorsTLV().getAutonomousSystemSubTLV().getAS_ID(); + } + if (linkNLRI.getRemoteNodeDescriptorsTLV().getAreaID() != null) { + areaID = linkNLRI.getRemoteNodeDescriptorsTLV().getAreaID().getAREA_ID(); + } + if (linkNLRI.getRemoteNodeDescriptorsTLV().getBGPLSIDSubTLV() != null) { + bgplsID = linkNLRI.getRemoteNodeDescriptorsTLV().getBGPLSIDSubTLV().getBGPLS_ID(); + } + if (linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID() != null) { + RemoteNodeIGPId = linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID().getIpv4AddressOSPF(); + } + if (linkNLRI.getUndirectionalLinkDelayTLV() != null) { + linkDelay = linkNLRI.getUndirectionalLinkDelayTLV().getDelay(); + } + if (linkNLRI.getUndirectionalDelayVariationTLV() != null) { + linkDelayVar = linkNLRI.getUndirectionalDelayVariationTLV().getDelayVar(); + } + if (linkNLRI.getMinMaxUndirectionalLinkDelayTLV() != null) { + maxDelay = linkNLRI.getMinMaxUndirectionalLinkDelayTLV().getHighDelay(); + minDelay = linkNLRI.getMinMaxUndirectionalLinkDelayTLV().getLowDelay(); + } + if (linkNLRI.getUndirectionalLinkLossTLV() != null) { + linkLoss = linkNLRI.getUndirectionalLinkLossTLV().getLinkLoss(); + } + if (linkNLRI.getUndirectionalResidualBwTLV() != null) { + residualBw = linkNLRI.getUndirectionalResidualBwTLV().getResidualBw(); + } + if (linkNLRI.getUndirectionalAvailableBwTLV() != null) { + availableBw = linkNLRI.getUndirectionalAvailableBwTLV().getAvailableBw(); + } + if (linkNLRI.getUndirectionalUtilizedBwTLV() != null) { + utilizedBw = linkNLRI.getUndirectionalUtilizedBwTLV().getUtilizedBw(); + } + if (linkNLRI.getIpv4InterfaceAddressTLV() != null) { + iPv4RouterIDLocalNodeLATLV = linkNLRI.getIpv4InterfaceAddressTLV().getIpv4Address(); + } + if (linkNLRI.getIpv4NeighborAddressTLV() != null) { + iPv4RouterIDNeighborNodeLATLV = linkNLRI.getIpv4NeighborAddressTLV().getIpv4Address(); + } + if (linkNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV().getBGPLS_ID() != null) {// alguna condicion? + localBgplsID = linkNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV().getBGPLS_ID().toString(); + } + if (linkNLRI.getRemoteNodeDescriptorsTLV().getBGPLSIDSubTLV().getBGPLS_ID() != null) {// alguna condicion? + remoteBgplsID = linkNLRI.getRemoteNodeDescriptorsTLV().getBGPLSIDSubTLV().getBGPLS_ID().toString(); + } + if (linkNLRI.getLocalNodeDescriptors().getIGPRouterID() != null) { + IGP_type = linkNLRI.getLocalNodeDescriptors().getIGPRouterID().getIGP_router_id_type(); + switch (IGP_type) { + case 1: + localIGPID = Integer.toString(linkNLRI.getLocalNodeDescriptors().getIGPRouterID().getISIS_ISO_NODE_ID()); + break; + case 2: + localIGPID = Integer.toString(linkNLRI.getLocalNodeDescriptors().getIGPRouterID().getISIS_ISO_NODE_ID()); + break; + case 3: + localIGPID = linkNLRI.getLocalNodeDescriptors().getIGPRouterID().getIpv4AddressOSPF().toString(); + + break; + default: + log.info("añadir este tipo de IGP Identifier por implementar "); + } + } + if (linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID() != null) { + IGP_type = linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID().getIGP_router_id_type(); + switch (IGP_type) { + case 1: + remoteBgplsID = Integer.toString(linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID().getISIS_ISO_NODE_ID()); + break; + case 2: + remoteBgplsID = Integer.toString(linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID().getISIS_ISO_NODE_ID()); + case 3: + remoteIGPID = linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID().getIpv4AddressOSPF().toString(); + break; + default: + log.info("añadir este tipo de IGP Identifier por implementar "); + } + } + + } + + @Override + public int hashCode() { + int result = 17; + result = 31 * result + localBgplsID.hashCode(); + result = 31 * result + iPv4RouterIDLocalNodeLATLV.hashCode(); + result = 31 * result + iPv4RouterIDNeighborNodeLATLV.hashCode(); + return result; + } + + @Override + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof LinkNLRIMsg)) { + return false; + } + LinkNLRIMsg linkCk = (LinkNLRIMsg) o; + return linkCk.localBgplsID == localBgplsID && linkCk.iPv4RouterIDLocalNodeLATLV == iPv4RouterIDLocalNodeLATLV + && linkCk.localBgplsID == localBgplsID + && linkCk.iPv4RouterIDLocalNodeLATLV == iPv4RouterIDLocalNodeLATLV; + } + + public String toString() {// check type + String out = ""; + if (this.localBgplsID != null) + out = out + "ID: " + this.localBgplsID + " ";// esto es id router?? + if (this.iPv4RouterIDLocalNodeLATLV != null) + out = out + this.iPv4RouterIDLocalNodeLATLV.toString(); + if(this.localIGPID!=null) + out = out + " localIGPID: "+ this.localIGPID; + if (this.iPv4RouterIDNeighborNodeLATLV != null) + out = out + "---->" + this.iPv4RouterIDNeighborNodeLATLV.toString(); + if(this.remoteIGPID!=null) + out = out + " remoteIGPID: "+ this.remoteIGPID; + if (this.remoteBgplsID != null) + out = out + "ID: " + this.remoteBgplsID + " "; + if (this.localDomainID != null) + out = out + "\n AS_ID local: " + this.localDomainID.toString() + " "; + if (this.remoteDomainID != null) + out = out + "\n AS_ID remote: " + this.remoteDomainID.toString() + " "; + if (this.availableBw != 0) + out = out + "\n availableBW: " + this.availableBw + " "; + if (this.residualBw != 0) + out = out + "\n residualBw: " + this.residualBw + " "; + if (this.linkDelay != 0) + out = out + "\n linkDelay: " + this.linkDelay + " "; + return out; + + } + + public String getLearntFrom() { + return learntFrom; + } + + public void setLearntFrom(String learntFrom) { + this.learntFrom = learntFrom; + } + + public String getiPv4RouterIDLocalNodeLATLV() { + if (iPv4RouterIDLocalNodeLATLV != null) + return iPv4RouterIDLocalNodeLATLV.toString(); + else + return null;// NO DEBERIA SER NULL + } + + public void setiPv4RouterIDLocalNodeLATLV(Inet4Address iPv4RouterIDLocalNodeLATLV) { + this.iPv4RouterIDLocalNodeLATLV = iPv4RouterIDLocalNodeLATLV; + } + + public String getiPv4RouterIDNeighborNodeLATLV() { + if (iPv4RouterIDNeighborNodeLATLV != null) + return iPv4RouterIDNeighborNodeLATLV.toString(); + else + return null;// NO DEBERIA SER NULL + } + + public void setiPv4RouterIDNeighborNodeLATLV(Inet4Address iPv4RouterIDNeighborNodeLATLV) { + this.iPv4RouterIDNeighborNodeLATLV = iPv4RouterIDNeighborNodeLATLV; + } + + public Inet4Address getLocalDomainID() { + return localDomainID; + } + + public Inet4Address getRemoteDomainID() { + return remoteDomainID; + } + + public String getLocalBgplsID() { + return this.localBgplsID; + } + + public void setLocalBgplsID(String localBgplsID) { + this.localBgplsID = localBgplsID; + } + + public String getRemoteBgplsID() { + return this.remoteBgplsID; + } + + public void setRemoteBgplsID(String remoteBgplsID) { + this.remoteBgplsID = remoteBgplsID; + } + + public Inet4Address getLocalNodeIGPId() { + return LocalNodeIGPId; + } + + public Inet4Address getRemoteNodeIGPId() { + return RemoteNodeIGPId; + } + + public int getLinkDelay() { + return linkDelay; + } + + public int getLinkDelayVar() { + return linkDelayVar; + } + + public int getMinDelay() { + return minDelay; + } + + public int getMaxDelay() { + return maxDelay; + } + + public int getResidualBw() { + return residualBw; + } + + public int getAvailableBw() { + return availableBw; + } + + public int getUtilizedBw() { + return utilizedBw; + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/NodeNLRIMsg.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/NodeNLRIMsg.java new file mode 100644 index 0000000000000000000000000000000000000000..d206cf7e234fb8bcd936a192a5dd68f05dc062c0 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/NodeNLRIMsg.java @@ -0,0 +1,197 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.models; + +import java.net.Inet4Address; +import java.net.InetAddress; +import java.util.ArrayList; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.net.InetAddresses; + +import es.tid.bgp.bgp4.update.fields.LinkNLRI; +import es.tid.bgp.bgp4.update.fields.NodeNLRI; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.NodeDescriptorsSubTLV; + +public class NodeNLRIMsg { + + private ArrayList nodeDescriptorsSubTLV; + // Dominios + private Inet4Address localDomainID; + private Inet4Address remoteDomainID; + private Inet4Address areaID; + private Inet4Address bgplsID; + + private Inet4Address LocalNodeBGPId; + + private Inet4Address iPv4RouterIDLocalNodeLATLV; + private Inet4Address iPv4RouterIDNeighborNodeLATLV; + + private String localBgplsID; + private int remoteBgplsID; + + private Inet4Address as_number; + + private int IGP_type; + private Inet4Address IGPID = null; + private Logger log; + private String nodeName; + private String ISIS_ID_str; + private String router_id="-"; + + private String learntFrom; + + public NodeNLRIMsg(NodeNLRI nodeNLRI, String learntFrom, String nodeName) { + + log = LoggerFactory.getLogger("BGP4Server");// prueba logger + + this.learntFrom = learntFrom; + + if (nodeNLRI.getLocalNodeDescriptors().getAutonomousSystemSubTLV() != null) { + // inetAddr??? + as_number = nodeNLRI.getLocalNodeDescriptors().getAutonomousSystemSubTLV().getAS_ID(); + } + if (nodeNLRI.getLocalNodeDescriptors().getAreaID() != null) { + areaID = nodeNLRI.getLocalNodeDescriptors().getAreaID().getAREA_ID(); + } + if (nodeNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV() != null) { + localBgplsID=nodeNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV().getBGPLS_ID().toString(); + } + + if (nodeNLRI.getLocalNodeDescriptors().getIGPRouterID() != null) { + IGP_type = nodeNLRI.getLocalNodeDescriptors().getIGPRouterID().getIGP_router_id_type(); + switch (IGP_type) { + case 1: + ISIS_ID_str = Integer.toString(nodeNLRI.getLocalNodeDescriptors().getIGPRouterID().getISIS_ISO_NODE_ID()); + router_id=ISIS_ID_str; + case 2: + ISIS_ID_str = Integer.toString(nodeNLRI.getLocalNodeDescriptors().getIGPRouterID().getISIS_ISO_NODE_ID()); + router_id=ISIS_ID_str; + case 3: + IGPID = nodeNLRI.getLocalNodeDescriptors().getIGPRouterID().getIpv4AddressOSPF(); + if(IGPID!=null){ + router_id=IGPID.toString(); + }else{ + System.out.println("Null IGPID (type OSPF)"); + } + break; + default: + log.info("añadir este tipo de IGP Identifier por implementar "); + } + } + + if (nodeNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV() != null) { + if (nodeNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV().getBGPLS_ID() != null) { + LocalNodeBGPId = nodeNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV().getBGPLS_ID(); + } + } + + if (nodeName != null) { + this.nodeName = nodeName; + }else{ + this.nodeName= this.router_id; + } + log.info("End node processing"); + } + + public String toString() {// check type + // TODO: concatenate with stringBuffer + + String out = ""; + if (this.router_id != null) + out = out + "ID: " + this.router_id + " ";// esto es id router?? + if (this.iPv4RouterIDLocalNodeLATLV != null) + out = out + this.iPv4RouterIDLocalNodeLATLV.toString(); + if (this.iPv4RouterIDNeighborNodeLATLV != null) + out = out + "---->" + this.iPv4RouterIDNeighborNodeLATLV.toString(); + if(this.LocalNodeBGPId!=null) + out=out+"BGP_ID: "+this.LocalNodeBGPId+" "; + if(this.as_number!=null) + out=out+"AS_number: "+InetAddresses.coerceToInteger(this.as_number)+" "; + if (this.nodeName != null) + out = out + "Name node attribute: " + nodeName + " "; + if (this.ISIS_ID_str != null) + out = out + "ID node: " + this.ISIS_ID_str + " "; + if (this.as_number != null) + out = out + "AS number: " + this.as_number.toString() + " "; + return out; + + } + + public String getLearntFrom() { + return learntFrom; + } + + public void setLearntFrom(String learntFrom) { + this.learntFrom = learntFrom; + } + + public String getLocalBgplsID() { + return this.localBgplsID; + } + + public void setLocalBgplsID(String localBgplsID) { + this.localBgplsID = localBgplsID; + } + + public String getNodeName() { + return nodeName; + } + + public Inet4Address getIGPID() { + return IGPID; + } + + public Inet4Address getBgplsID() { + return bgplsID; + } + + public String getRouterID(){ + return router_id; + } + + public void setBgplsID(Inet4Address bgplsID) { + this.bgplsID = bgplsID; + } + + public Inet4Address getAs_number() { + return as_number; + } + + @Override + public int hashCode() { + int result = 17; + result = 31 * result + localBgplsID.hashCode(); + result = 31 * result + iPv4RouterIDLocalNodeLATLV.hashCode(); + result = 31 * result + iPv4RouterIDNeighborNodeLATLV.hashCode(); + return result; + } + + @Override + public boolean equals(Object o) { + if (o == this) + return true; + if (!(o instanceof NodeNLRIMsg)) { + return false; + } + NodeNLRIMsg nodeCk = (NodeNLRIMsg) o; + return nodeCk.localBgplsID == localBgplsID && nodeCk.iPv4RouterIDLocalNodeLATLV == iPv4RouterIDLocalNodeLATLV + && nodeCk.localBgplsID == localBgplsID + && nodeCk.iPv4RouterIDLocalNodeLATLV == iPv4RouterIDLocalNodeLATLV; + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/PathAttributeMsg.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/PathAttributeMsg.java new file mode 100644 index 0000000000000000000000000000000000000000..4f036b8a1ec89b1dd14f07d194d6af6f84dbcab1 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/PathAttributeMsg.java @@ -0,0 +1,89 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.models; + +import java.net.Inet4Address; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +import es.tid.bgp.bgp4.update.fields.pathAttributes.LinkStateAttribute; +import es.tid.bgp.bgp4.update.tlv.BGP4TLVFormat; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IPv4RouterIDLocalNodeLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.NodeNameNodeAttribTLV; + +public class PathAttributeMsg { + + + private NodeNameNodeAttribTLV nodeNameTLV; + private byte[] data; + private String nodeName; + private Inet4Address addrLocal; + + + public PathAttributeMsg(LinkStateAttribute att) { + + + if(att.getNodeNameTLV()!=null) { + + nodeNameTLV=att.getNodeNameTLV(); + data=nodeNameTLV.getTlv_bytes(); + int b = nodeNameTLV.getTotalTLVLength(); + int c = nodeNameTLV.getTLVValueLength(); + byte [] fin= Arrays.copyOfRange(data, b - c, b); + nodeName = new String(fin , StandardCharsets.UTF_8); + } + if(att.getIPv4RouterIDLocalNodeLATLV()!=null) { + addrLocal=att.getIPv4RouterIDLocalNodeLATLV().getIpv4Address(); + } + + } + public String toString() { + String out=""; + if(this.nodeName!=null) + out=out+"NODE name "+nodeName; + if(this.addrLocal!=null) + out=out+"NODE IP "+addrLocal.toString(); + + return out; + } + + public String getNodeName() { + return nodeName; + } + public void setNodeName(String nodeName) { + this.nodeName = nodeName; + } + + @Override + public int hashCode() { + int result = 17; + result = 31 * result + nodeName.hashCode(); + return result; + } + @Override + public boolean equals(Object o) { + if (o == this) return true; + if (!(o instanceof PathAttributeMsg)) { + return false; + } + PathAttributeMsg pathCk = (PathAttributeMsg) o; + return pathCk.nodeName == nodeName; + } + public Inet4Address getAddrLocal() { + return addrLocal; + } + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsg.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsg.java new file mode 100644 index 0000000000000000000000000000000000000000..aba3dcef54c813bce1e0093c5f1289ad42902101 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsg.java @@ -0,0 +1,99 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.models; + +import java.net.InetAddress; +import java.util.ArrayList; +import java.util.List; + +public class UpdateMsg { + + private int AFI; + private int asPathSegment; + private InetAddress nextHop; + private String learntFrom; + + private NodeNLRIMsg node; + private LinkNLRIMsg link; + private PathAttributeMsg path; + private List linkList = new ArrayList<>(); + private List nodeList = new ArrayList<>(); + + public List getLinkList(){ + return this.linkList; + } + public List getNodeList(){ + return this.nodeList; + } + public void addNode(NodeNLRIMsg node) { + this.nodeList.add(node); + } + public int getAFI() { + return AFI; + } + public String getLearntFrom() { + return learntFrom; + } + public void setLearntFrom(String learntFrom) { + this.learntFrom = learntFrom; + } + public void setAFI(int aFI) { + AFI = aFI; + } + public int getAsPathSegment() { + return asPathSegment; + } + public void setAsPathSegment(int asPathSegment) { + this.asPathSegment = asPathSegment; + } + public InetAddress getNextHop() { + return nextHop; + } + public void setNextHop(InetAddress nextHop) { + this.nextHop = nextHop; + } + public NodeNLRIMsg getNode() { + return node; + } + public void setNode(NodeNLRIMsg node) { + this.node = node; + } + // public LinkNLRIMsg getLink() { + // return link; + // } + public boolean linkCheck(){ + return linkList.size()>0; + } + public boolean nodeCheck(){ + return nodeList.size()>0; + } + public void setLink(LinkNLRIMsg link) { + this.link = link; + } + public void addLink(LinkNLRIMsg link) { + this.linkList.add(link); + } + public PathAttributeMsg getPath() { + return path; + } + public void setPath(PathAttributeMsg path) { + this.path = path; + } + + + + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsgList.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsgList.java new file mode 100644 index 0000000000000000000000000000000000000000..e274a87aaaf31c4eeff4592ea71f4408d6dfde43 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsgList.java @@ -0,0 +1,151 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.models; + +import java.net.InetAddress; +import java.util.LinkedList; +import java.util.List; + +public class UpdateMsgList { + + + /* Print purposes and debug*/ + List nodeList = new LinkedList<>(); + List linkList = new LinkedList<>(); + List pathList = new LinkedList<>(); + /**/ + public UpdateMsgList() { + } + + + public String toString() { + + String out ="Update Message: "; + if(nodeList!=null) { + out=out+nodeList.toString()+"\n"; + } + if(linkList!=null) { + out=out+linkList.toString()+"\n"; + } + if(pathList!=null) { + out=out+pathList.toString()+"\n"; + } + + return out; + + } + public void addLinkToJson(LinkNLRIMsg link) { + + if(link==null) + return; + boolean exists = false; + for (LinkNLRIMsg linkInList : linkList) { // list being the LinkedList + if (link.equals(linkInList)) { + exists = true; + break; + } + } + if (!exists) { + linkList.add(link); + } + } + public void addNodeToJson(NodeNLRIMsg node, String currentName) {//comprobar que existe? + + if(node==null) + return; + boolean exists = false; + for (NodeNLRIMsg nodeInList : nodeList) { // list being the LinkedList + if (node.equals(nodeInList)) { + exists = true; + break; + } + } + if (!exists) { + nodeList.add(node); + } + + } + public void addpathToJson(PathAttributeMsg path) { + + boolean exists = false; + if(path.getNodeName()==null) { + return; + } + for (PathAttributeMsg pathInList : pathList) { // list being the LinkedList + if (path.equals(pathInList) ) { + exists = true; + break; + } + } + if (!exists) { + pathList.add(path); + } + + } + + public List getNodeList() { + return nodeList; + } + + public List getLinkList() { + return linkList; + } + + public List getPathList() { + return pathList; + } + + public void addNodeToList(NodeNLRIMsg node) { + nodeList.add(node); + } + public void addLinkToList(LinkNLRIMsg link) { + linkList.add(link); + } + public void addPathToList(PathAttributeMsg path) { + pathList.add(path); + } + + public UpdateMsgList id2Name() { + + UpdateMsgList update=new UpdateMsgList(); + update.nodeList=this.nodeList; + update.pathList=this.pathList; + List newLinkList = new LinkedList<>(); + + for (LinkNLRIMsg linkInList : linkList) { + LinkNLRIMsg link=linkInList; + + for(NodeNLRIMsg nodeInList: update.nodeList) { + if((linkInList.getLocalBgplsID().equals(nodeInList.getLocalBgplsID()))) { + link.setLocalBgplsID(nodeInList.getNodeName()); + } + } + + for(NodeNLRIMsg nodeInList: update.nodeList) { + if((linkInList.getRemoteBgplsID().equals(nodeInList.getLocalBgplsID()))) { + link.setRemoteBgplsID(nodeInList.getNodeName()); + } + } + + + newLinkList.add(link); + } + update.linkList=newLinkList; + + return update; + + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Exception.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Exception.java new file mode 100644 index 0000000000000000000000000000000000000000..6bd951501bb09d3de40cfc5e7c3bc43cf259cfee --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Exception.java @@ -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. + +package eu.teraflow.tid.bgp4Peer.peer; + +public class BGP4Exception extends Exception { + + private static final long serialVersionUID = 1L; +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4LSPeerInfo.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4LSPeerInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..d751622ee03bb80099e1ab88914945fe4f04c29b --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4LSPeerInfo.java @@ -0,0 +1,85 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.peer; + +import java.net.Inet4Address; + +public class BGP4LSPeerInfo { + /** + * IP Address of the remote Peer + */ + private Inet4Address peerIP; + + /** + * Experimental USE Only + * Default port is 179 + * For testing and development, alternative ports are allowed. + */ + private int peerPort; + + /** + * If the remote peer is a consumer and we need to send the topology + */ + private boolean sendToPeer; + + /** + * If the remote peer is a generator of topology and we are consumers + */ + private boolean updateFromPeer; + + + + public BGP4LSPeerInfo() { + this.peerPort=179; + } + + public Inet4Address getPeerIP() { + return peerIP; + } + + public void setPeerIP(Inet4Address peerIP) { + this.peerIP = peerIP; + } + + public int getPeerPort() { + return peerPort; + } + + public void setPeerPort(int peerPort) { + this.peerPort = peerPort; + } + + public boolean isSendToPeer() { + return sendToPeer; + } + + public void setSendToPeer(boolean sendToPeer) { + this.sendToPeer = sendToPeer; + } + + public boolean isUpdateFromPeer() { + return updateFromPeer; + } + + public void setUpdateFromPeer(boolean updateFromPeer) { + this.updateFromPeer = updateFromPeer; + } + + + + + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Parameters.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Parameters.java new file mode 100644 index 0000000000000000000000000000000000000000..3c83a9a776f88a85e165f70fc23bb3aa62c0f33b --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Parameters.java @@ -0,0 +1,540 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.peer; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; +import java.net.Inet4Address; +import java.net.UnknownHostException; +import java.util.LinkedList; + +/** + * Parameters to configure the BGP4 session + * @author mcs + * + */ +public class BGP4Parameters { + + private Logger log = LoggerFactory.getLogger("BGP4Peer"); + /** + * TCP port where the BGP is listening for incoming bgp4 connections + * Experimental use only. Default and standard is 179 + */ + private int BGP4Port = 179; + + /** + * TCP port to connect to manage the BGP connection + */ + private int BGP4ManagementPort = 1112; + /** + * Local BGP4 address of this peer + */ + private String localBGPAddress = "127.0.0.1"; + /** + * Local port to connect with BGP Peer. + */ + private int localBGPPort = 0; + /** + * Log file + */ + private String BGP4LogFile="BGP4Parser.log"; + /** + * Log file Client + */ + private String BGP4LogFileClient="BGP4Client.log"; + + + /** + * Log file Client + */ + private String BGP4LogFileServer="BGP4Server.log"; + + + /** + * Name of the configuration file + */ + private String confFile; + + /** + * If the tcp no delay option is used or not. + */ + private boolean nodelay=false; + /** + * Waiting Time to connect to clients + */ + long delay = 6000; + /** + * List of peers to establish connection. + */ + private LinkedList peersToConnect; + + /** + * Parameter used to set traces meanwhile the execution. + */ + private boolean setTraces=true; + /** + * OPEN PARAMENTERS + */ + int holdTime=90; + /** + * OPEN PARAMENTERS + */ + + private boolean isTest=false; + + /** + * Time between sending keepalives + */ + int keepAliveTimer=30; + + /** + * Time between topology updates + */ + long sendTopoDelay=30000; + + private boolean saveTopologyDB=false; + + private Inet4Address topologyDBIP; + + private int topologyDBport; + + public int getKeepAliveTimer() { + return keepAliveTimer; + } + public void setKeepAliveTimer(int keepAliveTimer) { + this.keepAliveTimer = keepAliveTimer; + } + String BGPIdentifier = null; + int myAutonomousSystem=1; + int version=0x04; + + /** + * This parameter can have three options: fromXML, fromOSPF, fromBGP + * Explain the way the topology module learns the topology + */ + private String learnTopology="fromBGP"; + /** + * XML File to read and generate the topology + */ + private String topologyFile; + + + private int numberTriesToConnect=3; + /** + * True: This peer sends the interdomain links of the topology to other peers + * False: This peer does NOT send the topology to other peers + */ + private boolean sendTopology=false; + /** + * True: This peer sends the whole topology to other peers + * False: This peer does NOT send the intradomain linksto other peers + */ + private boolean sendIntradomainLinks=false; + + + + /** + * Instance identifier for NodeNLRI (Types defined in class InstanceIDTypes) + */ + private int instanceID=0; + /** + * Constructor + */ + BGP4Parameters(){ + confFile="BGP4Parameters.xml"; + peersToConnect =new LinkedList(); + } + /** + * Constructor + */ + BGP4Parameters(String confFile){ + peersToConnect =new LinkedList(); + + if (confFile!=null){ + this.confFile=confFile; + }else { + confFile="BGP4Parameters.xml"; + } + + } + + + + public void initialize(){ + + try { + + System.out.println("Parsing Config File::"+confFile); + + SAXParserFactory factory = SAXParserFactory.newInstance(); + SAXParser saxParser = factory.newSAXParser(); + + + DefaultHandler handler = new DefaultHandler() { + boolean peer = false; + boolean send = false; + boolean receive = false; + boolean peerPort = false; + BGP4LSPeerInfo peerInfo=null; + + String tempVal; + + public void startElement(String uri, String localName, + String qName, Attributes attributes) + throws SAXException { + + if (qName.equalsIgnoreCase("configPeer")){ + log.debug("Found peer configuration"); + } + else if (qName.equalsIgnoreCase("peer")){ + peer = true; + } + else if (qName.equalsIgnoreCase("export")){ + send = true; + } + else if (qName.equalsIgnoreCase("import")){ + receive = true; + }else if (qName.equalsIgnoreCase("peerPort")){ + peerPort = true; + } + + } + + public void endElement(String uri, String localName, + String qName) + throws SAXException { + if(qName.equalsIgnoreCase("BGP4Port")) { + BGP4Port=Integer.parseInt(tempVal.trim()); + + } + else if (qName.equalsIgnoreCase("BGP4ManagementPort")){ + BGP4ManagementPort = Integer.parseInt(tempVal.trim()); + } + + else if (qName.equalsIgnoreCase("BGP4LogFile")) { + BGP4LogFile=tempVal.trim(); + } + else if (qName.equalsIgnoreCase("BGP4LogFileClient")) { + BGP4LogFileClient=tempVal.trim(); + } + else if (qName.equalsIgnoreCase("BGP4LogFileServer")) { + BGP4LogFileServer=tempVal.trim(); + } + else if (qName.equalsIgnoreCase("nodelay")) { + nodelay=Boolean.parseBoolean(tempVal.trim()); + } + else if (qName.equalsIgnoreCase("isTest")) { + isTest=Boolean.parseBoolean(tempVal.trim()); + } + + else if (qName.equalsIgnoreCase("setTraces")) { + setTraces=Boolean.parseBoolean(tempVal.trim()); + } + else if (qName.equalsIgnoreCase("saveTopologyDB")) { + saveTopologyDB=Boolean.parseBoolean(tempVal.trim()); + } + else if (qName.equalsIgnoreCase("topologyDBIP")) { + try { + topologyDBIP =(Inet4Address)Inet4Address.getByName(tempVal.trim()); + } catch (UnknownHostException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + else if (qName.equalsIgnoreCase("topologyDBport")) { + topologyDBport=Integer.parseInt(tempVal.trim()); + } + else if (qName.equalsIgnoreCase("sendTopology")) { + sendTopology=Boolean.parseBoolean(tempVal.trim()); + } + else if (qName.equalsIgnoreCase("sendIntradomainLinks")) { + sendIntradomainLinks=Boolean.parseBoolean(tempVal.trim()); + sendTopology = true;//si se envian los intradomain entonces se enviara la topologia entera + } + + + else if(qName.equalsIgnoreCase("holdTime")) { + holdTime=Integer.parseInt(tempVal.trim()); + } + else if(qName.equalsIgnoreCase("keepAliveTimer")) { + keepAliveTimer=Integer.parseInt(tempVal.trim()); + } + else if (qName.equalsIgnoreCase("version")){ + version = Integer.parseInt(tempVal.trim()); + } + else if (qName.equalsIgnoreCase("myAutonomousSystem")){ + myAutonomousSystem = Integer.parseInt(tempVal.trim()); + } + else if (qName.equalsIgnoreCase("localBGPAddress")){//El BGP Identifier es la local BGP Address. + //BGPIdentifier = tempVal.trim(); + localBGPAddress=tempVal.trim(); + } + else if (qName.equalsIgnoreCase("BGPIdentifier")){//El BGP Identifier es la local BGP Address. + BGPIdentifier = tempVal.trim(); + } + else if (qName.equalsIgnoreCase("delay")){ + delay = Long.parseLong(tempVal.trim()); + } + else if (qName.equalsIgnoreCase("sendTopoDelay")){ + sendTopoDelay = Long.parseLong(tempVal.trim()); + } + /* + else if (qName.equalsIgnoreCase("peer")){ + String peerBGP_IPaddress = tempVal.trim(); + peersToConnect.add(peerBGP_IPaddress); + }*/ + else if (qName.equalsIgnoreCase("TopologyFile")) { + topologyFile=tempVal.trim(); + } + else if (qName.equalsIgnoreCase("learnTopology")) { + learnTopology=tempVal.trim(); + } + else if (qName.equalsIgnoreCase("numberTriesToConnect")){ + numberTriesToConnect = Integer.parseInt(tempVal.trim()); + } + else if (qName.equalsIgnoreCase("instanceID")){ + instanceID = Integer.parseInt(tempVal.trim()); + } + else if (qName.equalsIgnoreCase("localBGPPort")){ + localBGPPort = Integer.parseInt(tempVal.trim()); + } +// else if (qName.equalsIgnoreCase("configPeer")){ +// log.info("peers....." + peersToConnect.toString()); +// } + } + + + public void characters(char[] ch, int start, int length) throws SAXException { + tempVal = new String(ch,start,length); + + if(peer){ + peerInfo= new BGP4LSPeerInfo(); + + String peerBGP_IPaddress = new String(ch, start, length); + Inet4Address peerBGPIP; + try { + peerBGPIP=(Inet4Address)Inet4Address.getByName(peerBGP_IPaddress.trim()); + peerInfo.setPeerIP(peerBGPIP); + } catch (UnknownHostException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + peersToConnect.add(peerInfo); + peer = false; + } + else if(send){ + String sendInfo = new String(ch, start, length); + peerInfo.setSendToPeer(Boolean.parseBoolean(sendInfo.trim())); + send = false; + } + else if(receive){ + String update_from = new String(ch, start, length); + peerInfo.setUpdateFromPeer(Boolean.parseBoolean(update_from.trim())); + receive = false; + }else if (peerPort){ + String peer_port = new String(ch, start, length); + peerInfo.setPeerPort(Integer.parseInt(peer_port.trim())); + peerPort = false; + } + } + }; + saxParser.parse(confFile, handler); + + }catch (Exception e) { + log.error("Problems reading config"); + e.printStackTrace(); + System.exit(1); + } + + } + public int getBGP4Port() { + return BGP4Port; + } + public void setBGP4Port(int bGP4Port) { + BGP4Port = bGP4Port; + } + public int getBGP4ManagementPort() { + return BGP4ManagementPort; + } + public void setBGP4ManagementPort(int bGP4ManagementPort) { + BGP4ManagementPort = bGP4ManagementPort; + } + public String getBGP4LogFile() { + return BGP4LogFile; + } + public void setBGP4LogFile(String bGP4LogFile) { + BGP4LogFile = bGP4LogFile; + } + public boolean isSetTraces() { + return setTraces; + } + public void setSetTraces(boolean setTraces) { + this.setTraces = setTraces; + } + public boolean isTest() { + return isTest; + } + public void setisTest(boolean test) { + this.isTest = test; + } + + public String getConfFile() { + return confFile; + } + public void setConfFile(String confFile) { + this.confFile = confFile; + } + public boolean isNodelay() { + return nodelay; + } + public void setNodelay(boolean nodelay) { + this.nodelay = nodelay; + } + public int getHoldTime() { + return holdTime; + } + public void setHoldTime(int holdTime) { + this.holdTime = holdTime; + } + public String getBGPIdentifier() { + return BGPIdentifier; + } + public void setBGPIdentifier(String bGPIdentifier) { + BGPIdentifier = bGPIdentifier; + } + public int getMyAutonomousSystem() { + return myAutonomousSystem; + } + public void setMyAutonomousSystem(int myAutonomousSystem) { + this.myAutonomousSystem = myAutonomousSystem; + } + public int getVersion() { + return version; + } + public void setVersion(int version) { + this.version = version; + } + + public LinkedList getPeersToConnect() { + return peersToConnect; + } + public void setPeersToConnect(LinkedList peersToConnect) { + this.peersToConnect = peersToConnect; + } + + public String getLearnTopology() { + return learnTopology; + } + public void setLearnTopology(String learnTopology) { + this.learnTopology = learnTopology; + } + public String getTopologyFile() { + return topologyFile; + } + public void setTopologyFile(String topologyFile) { + this.topologyFile = topologyFile; + } + + public int getNumberTriesToConnect() { + return numberTriesToConnect; + } + public void setNumberTriesToConnect(int numberTriesToConnect) { + this.numberTriesToConnect = numberTriesToConnect; + } + public long getDelay() { + return delay; + } + public void setDelay(long delay) { + this.delay = delay; + } + public boolean isSendTopology() { + return sendTopology; + } + public void setSendTopology(boolean sendTopology) { + this.sendTopology = sendTopology; + } + public String getBGP4LogFileClient() { + return BGP4LogFileClient; + } + public void setBGP4LogFileClient(String bGP4LogFileClient) { + BGP4LogFileClient = bGP4LogFileClient; + } + public String getBGP4LogFileServer() { + return BGP4LogFileServer; + } + public void setBGP4LogFileServer(String bGP4LogFileServer) { + BGP4LogFileServer = bGP4LogFileServer; + } + public int getInstanceID() { + return instanceID; + } + public void setInstanceID(int instanceID) { + this.instanceID = instanceID; + } + public boolean isSendIntradomainLinks() { + return sendIntradomainLinks; + } + + public void setSendIntradomainLinks(boolean sendIntradomainLinks) { + this.sendIntradomainLinks = sendIntradomainLinks; + } + + + public String getLocalBGPAddress() { + return localBGPAddress; + } + public void setLocalBGPAddress(String localBGPAddress) { + this.localBGPAddress = localBGPAddress; + } + public int getLocalBGPPort() { + return localBGPPort; + } + + public long getSendTopoDelay() { + return sendTopoDelay; + } + public void setSendTopoDelay(long sendTopoDelay) { + this.sendTopoDelay = sendTopoDelay; + } + public boolean isSaveTopologyDB() { + return saveTopologyDB; + } + public void setSaveTopologyDB(boolean saveTopologyDB) { + this.saveTopologyDB = saveTopologyDB; + } + public Inet4Address getTopologyDBIP() { + return topologyDBIP; + } + public void setTopologyDBIP(Inet4Address topologyDBIP) { + this.topologyDBIP = topologyDBIP; + } + public int getTopologyDBport() { + return topologyDBport; + } + public void setTopologyDBport(int topologyDBport) { + this.topologyDBport = topologyDBport; + } + + + + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionClientManager.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionClientManager.java new file mode 100644 index 0000000000000000000000000000000000000000..9e54e64c1cbda7fb77ffec543d2f1977cb635fa6 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionClientManager.java @@ -0,0 +1,160 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.peer; + +import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionClient; +import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionExistsException; +import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionsInformation; +import eu.teraflow.tid.bgp4Peer.updateTEDB.UpdateDispatcher; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.net.Inet4Address; + +/** + * Client session manager + * @author mcs + * + */ +public class BGP4SessionClientManager implements Runnable{ + + + + private BGP4SessionClient bgp4SessionClient; + private Logger log; + + BGP4SessionsInformation bgp4SessionInformation; + /** + * peer contains the IP address and port where the peer listens. + */ + private BGP4LSPeerInfo peer; + private Inet4Address peerIP; + private String localBGP4Address; + private int localBGP4Port; + private int holdTime; + private int keepAliveTimer; + private Inet4Address BGPIdentifier; + private int version = 4; + private int myAutonomousSystem; + private UpdateDispatcher ud; + private Boolean updateFrom; + private Boolean sendTo; + + public BGP4SessionClientManager(BGP4SessionsInformation bgp4SessionInformation,UpdateDispatcher ud, BGP4LSPeerInfo peer,int bgp4Port,String my_IPAddress,int my_bgp4Port , int holdTime,Inet4Address BGPIdentifier,int version,int myAutonomousSystem, int my_keepAliveTimer){ + log=LoggerFactory.getLogger("BGP4Peer"); + this.bgp4SessionInformation=bgp4SessionInformation; + this.holdTime=holdTime; + this.BGPIdentifier=BGPIdentifier; + this.version = version; + this.myAutonomousSystem=myAutonomousSystem; + this.peer = peer; + this.ud=ud; + this.localBGP4Address=my_IPAddress; + this.localBGP4Port=my_bgp4Port; + this.keepAliveTimer = my_keepAliveTimer; + this.peerIP=peer.getPeerIP(); + this.setSendTo(peer.isSendToPeer()); + this.setUpdateFrom(peer.isUpdateFromPeer()); + + } + + /** + * + * + * + */ + public void run(){ + if(bgp4SessionClient != null){ + if (bgp4SessionClient.isAlive()){ + if (bgp4SessionClient.isInterrupted()){ + log.debug("Thread alive... backup session dead"); + + } + log.debug("Session alive and not interrupted"); + return; + } + else{ + try{ + bgp4SessionInformation.notifySessionStart(peerIP); + log.debug("Session with BGP-LS peer"+peer +" dead, trying to establish new session"); + bgp4SessionClient= new BGP4SessionClient(bgp4SessionInformation,ud,peer.getPeerIP(),peer.getPeerPort(),holdTime,BGPIdentifier,version,myAutonomousSystem,localBGP4Address, localBGP4Port,keepAliveTimer); + bgp4SessionClient.setSendTo(sendTo); + bgp4SessionClient.setUpdateFrom(updateFrom); + bgp4SessionClient.start(); + } catch(BGP4SessionExistsException e){ + log.debug("Checked that there is already a peer initiated session with "+this.peerIP); + } + + return; + } + } else { + try{ + bgp4SessionInformation.notifySessionStart(peerIP); + log.info("Trying to establish new session with peer "+ peer.getPeerIP()+" on port "+peer.getPeerPort()); + bgp4SessionClient = new BGP4SessionClient(bgp4SessionInformation,ud, peer.getPeerIP(), peer.getPeerPort(), holdTime, BGPIdentifier, + version,myAutonomousSystem,localBGP4Address, localBGP4Port ,keepAliveTimer); + bgp4SessionClient.setSendTo(sendTo); + bgp4SessionClient.setUpdateFrom(updateFrom); + bgp4SessionClient.start(); + + } catch(BGP4SessionExistsException e){ + log.debug("No need to start new connection with "+this.peerIP); + } + + + return; + + } + + } + public BGP4SessionClient getBgp4SessionClient() { + return bgp4SessionClient; + } + + public void setBgp4SessionClient(BGP4SessionClient bgp4SessionClient) { + this.bgp4SessionClient = bgp4SessionClient; + } + + public void killBGP4Session(){ + bgp4SessionClient.killSession(); + } + + public void closeBGP4Session(){ + log.info("Closing BGP4Session"); + if (bgp4SessionClient.isAlive()){ + //FIXME reason for close???? + bgp4SessionClient.close(); + } + + } + + public Boolean getUpdateFrom() { + return updateFrom; + } + + public void setUpdateFrom(Boolean updateFrom) { + this.updateFrom = updateFrom; + } + + public Boolean getSendTo() { + return sendTo; + } + + public void setSendTo(Boolean sendTo) { + this.sendTo = sendTo; + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionServerManager.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionServerManager.java new file mode 100644 index 0000000000000000000000000000000000000000..0d337bb6140841bd27e37fcbd3c238445c0797d2 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionServerManager.java @@ -0,0 +1,160 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.peer; + +import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4PeerInitiatedSession; +import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionsInformation; +import eu.teraflow.tid.bgp4Peer.updateTEDB.UpdateDispatcher; +import eu.teraflow.tid.tedb.TEDB; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.net.Inet4Address; +import java.net.ServerSocket; +import java.net.Socket; +import java.util.LinkedList; + +public class BGP4SessionServerManager implements Runnable { + private BGP4PeerInitiatedSession bgp4SessionServer; + private Logger log; + BGP4SessionsInformation bgp4SessionsInformation; + int bgp4Port; + private int holdTime; + private int keepAliveTimer; + private Inet4Address BGPIdentifier; + private int version = 4; + private int myAutonomousSystem; + private boolean noDelay; + private boolean isTest=false; + private TEDB tedb; + private UpdateDispatcher ud; + Inet4Address localBGP4Address; + private Boolean updateFrom; + private Boolean sendTo; + + private LinkedList peersToConnect; + + public BGP4SessionServerManager(BGP4SessionsInformation bgp4SessionInformation, TEDB tedb,UpdateDispatcher ud, int bgp4Port,int holdTime,Inet4Address BGPIdentifier,int version,int myAutonomousSystem,boolean noDelay,Inet4Address localAddress ,int mykeepAliveTimer, LinkedList peersToConnect ){ + log = LoggerFactory.getLogger("BGP4Peer"); + this.holdTime=holdTime; + this.BGPIdentifier=BGPIdentifier; + this.version = version; + this.myAutonomousSystem=myAutonomousSystem; + this.bgp4SessionsInformation=bgp4SessionInformation; + this.bgp4Port=bgp4Port; + this.noDelay=noDelay; + this.tedb=tedb; + this.ud=ud; + this.localBGP4Address=localAddress; + this.keepAliveTimer = mykeepAliveTimer; + this.peersToConnect=peersToConnect; + } + + public BGP4SessionServerManager(BGP4SessionsInformation bgp4SessionInformation, TEDB tedb,UpdateDispatcher ud, int bgp4Port,int holdTime,Inet4Address BGPIdentifier,int version,int myAutonomousSystem,boolean noDelay,Inet4Address localAddress ,int mykeepAliveTimer, LinkedList peersToConnect, boolean test){ + log = LoggerFactory.getLogger("BGP4Peer"); + this.holdTime=holdTime; + this.BGPIdentifier=BGPIdentifier; + this.version = version; + this.myAutonomousSystem=myAutonomousSystem; + this.bgp4SessionsInformation=bgp4SessionInformation; + this.bgp4Port=bgp4Port; + this.noDelay=noDelay; + this.tedb=tedb; + this.ud=ud; + this.localBGP4Address=localAddress; + this.keepAliveTimer = mykeepAliveTimer; + this.peersToConnect=peersToConnect; + this.isTest=test; + } + + + public Boolean getSendTo() { + return sendTo; + } + + public void setSendTo(Boolean sendTo) { + this.sendTo = sendTo; + } + + public Boolean getUpdateFrom() { + return updateFrom; + } + + public void setUpdateFrom(Boolean updateFrom) { + this.updateFrom = updateFrom; + } + + @Override + public void run() { + + + + ServerSocket serverSocket = null; + boolean listening = true; + try { + log.debug("SERVER Listening on port: "+ bgp4Port); + log.debug("SERVER Listening on address: "+ localBGP4Address); + serverSocket = new ServerSocket( bgp4Port,0,localBGP4Address); + } catch (IOException e) { + log.error("Could not listen on port: "+ bgp4Port); + System.exit(-1); + } + while (listening) { + try { + Socket sock=serverSocket.accept(); + bgp4SessionServer = new BGP4PeerInitiatedSession(sock,bgp4SessionsInformation,ud,holdTime,BGPIdentifier,version,myAutonomousSystem,noDelay,keepAliveTimer); + if (isTest){ + log.info("isTest"); + bgp4SessionServer.setSendTo(true); + bgp4SessionServer.start(); + } + else { + log.info("Not Test"); + for (int i = 0; i < this.peersToConnect.size(); i++) { + try { + Inet4Address add = peersToConnect.get(i).getPeerIP(); + if (add == null) { + log.warn("peer IP address shouldn't be null"); + } else { + if (add.equals(sock.getInetAddress())) { + log.debug("FOUND " + add); + bgp4SessionServer.setSendTo(this.peersToConnect.get(i).isSendToPeer()); + } + } + + } catch (Exception e) { + e.printStackTrace(); + } + + } + bgp4SessionServer.start(); + } + }catch (Exception e) { + e.printStackTrace(); + } + } + try { + log.info("Closing the socket"); + serverSocket.close(); + + }catch (Exception e) { + e.printStackTrace(); + } + + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeer.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeer.java new file mode 100644 index 0000000000000000000000000000000000000000..9894a89663bcc7b64df18e10083d2fe560a2bcca --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeer.java @@ -0,0 +1,407 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.peer; + +import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionsInformation; +import eu.teraflow.tid.bgp4Peer.management.BGP4ManagementServer; +import eu.teraflow.tid.bgp4Peer.updateTEDB.UpdateDispatcher; +import eu.teraflow.tid.tedb.*; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.net.Inet4Address; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Hashtable; +import java.util.LinkedList; +import java.util.concurrent.ScheduledThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + + +/** + * BGP-LS Speaker. + * This class is a BGP-LS peer which has two modes: + * - Listens to incoming connections + * - Launches new BGP session with a list of peers. + * It can send periodically its learnt topology to other peers. + * TEDB can be initialized from: + * - XML file with the topolgoy + * - Other BGP-LS Sessions + * + * @author pac ogondio + * + */ +public class BGPPeer { + /** + * Session server. It opens a socket to listen to new connections. + */ + private BGP4SessionServerManager bgp4SessionServer; + /** + * Session client. It connects to peers. + */ + private BGP4SessionClientManager bgp4SessionClientManager; + /** + * BGP4 parameters. Needed to configure the connections. + */ + private BGP4Parameters params; + + /** + * List of opened BGP4 sessions. + */ + private BGP4SessionsInformation bgp4SessionsInformation; + + /** + * Topology database only for interDomain Links. + */ + private MultiDomainTEDB multiDomainTEDB; + + /** + * Table with domainID - TEDB. + * The BGP-LS Peer can have several domains + */ + private Hashtable intraTEDBs; + + /** + * Full TEDB with all Links + */ + + private SimpleTEDB fullTEDB; + + + /** + * Class to send periodically the topology + */ + //private DomainTEDB readDomainTEDB; + + /** + * True: This peer sends the topology to other peers + * False: This peer does NOT send the topology to other peers + */ + private boolean sendTopology; + /** + * + */ + private SendTopology sendTopologyTask; + /** + * + */ + private boolean saveTopology; + + private SaveTopologyinDB saveTopologyDB; + + /** + * + */ + /** + * List of peers to establish connections. + */ + private LinkedList peersToConnect; + + //Whitelist and blacklist not yet implemented + + /** + * Loggers + */ + private Logger logParser; + private Logger logClient; + private Logger logServer; + /** + * Class to read and process the BGP4 update messages + */ + private UpdateDispatcher ud; + /** + * Executor. To execute the session server, to execute periodically the session client. + */ + private ScheduledThreadPoolExecutor executor; + + /** + * Function to configure the BGP4 Peer without specifying the file. It will read a file with name: BGP4Parameters.xml + */ + public void configure (){ + this.configure (null); + } + + /** + * Function to configure the BGP4 peer. + * It created the loggers, the executor, + * @param nameParametersFile Name of the Parameters File + */ + public void configure(String nameParametersFile){ + configure(nameParametersFile, null, null); + } + + /** + * Function to configure the BGP4 peer. + * It created the loggers, the executor, + * @param nameParametersFile Name of the Parameters File + * @param multiTEDB multidomain database + * @param iTEDBs internal domains database + */ + public void configure(String nameParametersFile, MultiDomainTEDB multiTEDB, Hashtable iTEDBs){ + //First of all, read the parameters + if (nameParametersFile != null){ + params=new BGP4Parameters(nameParametersFile); + }else{ + params=new BGP4Parameters(); + } + params.initialize(); + peersToConnect = params.getPeersToConnect(); + sendTopology = params.isSendTopology(); + saveTopology = params.isSaveTopologyDB(); + + //Initialize loggers +// FileHandler fh; +// FileHandler fh1; +// FileHandler fh2; +// try { +// fh=new FileHandler(params.getBGP4LogFile()); + logParser=LoggerFactory.getLogger("BGP4Parser"); +// logParser.addHandler(fh); +// logParser.setLevel(Level.ALL); +// fh1=new FileHandler(params.getBGP4LogFileClient()); + logClient=LoggerFactory.getLogger("BGP4Client"); +// logClient.addHandler(fh1); +// logClient.setLevel(Level.ALL); +// fh2=new FileHandler(params.getBGP4LogFileServer()); + logServer=LoggerFactory.getLogger("BGP4Peer"); +// logServer.addHandler(fh2); +// logServer.setLevel(Level.ALL); +// +// } catch (Exception e1) { +// e1.printStackTrace(); +// System.exit(1); +// } + logServer.info("Inizializing BGP4 Peer"); + if (iTEDBs!= null) intraTEDBs=iTEDBs; + else intraTEDBs=new Hashtable(); + + if (multiTEDB!= null) multiDomainTEDB = multiTEDB; + else multiDomainTEDB = new MDTEDB(); + + if (params.getLearnTopology().equals("fromXML")){ + //intraTEDBs=new Hashtable(); + //multiDomainTEDB = new MDTEDB(); + //intraTEDBs = FileTEDBUpdater.readMultipleDomainSimpleNetworks(params.getTopologyFile(), null, false,0,Integer.MAX_VALUE, false); + logParser.info("BGPIdentifier: "+params.getBGPIdentifier()); + intraTEDBs = FileTEDBUpdater.readMultipleDomainSimpleNetworks(params.getTopologyFile(), null, false,0,Integer.MAX_VALUE, false, params.getBGPIdentifier()); + + //multiDomainTEDB.initializeFromFile(params.getTopologyFile()); + multiDomainTEDB.initializeFromFile(params.getTopologyFile(), params.getBGPIdentifier()); + + } + // Create Thread executor + //FIXME: Actualizar n�mero de threads que se crean + executor = new ScheduledThreadPoolExecutor(20);//1 para el servidor, 1 para el que lanza y vigila los clientes + // Information about all the sessions of the PCE + if (params.isTest()) { + bgp4SessionsInformation = new BGP4SessionsInformation(params.isTest()); + } + else{ + bgp4SessionsInformation = new BGP4SessionsInformation(); + } + //Create the task to send the topology. It has to be created because you can start sending the topology in the management (wirting): send topology on. + sendTopologyTask = new SendTopology(); + saveTopologyDB= new SaveTopologyinDB(); + if (params.isSaveTopologyDB() == true){ + saveTopologyDB.configure(intraTEDBs, multiDomainTEDB, params.isSaveTopologyDB(), params.getTopologyDBIP().getHostAddress(), params.getTopologyDBport()); + } + + } + + public void setWriteMultiTEDB(MultiDomainTEDB multiTEDB) { + + this.multiDomainTEDB = multiTEDB; + saveTopologyDB.setMultiDomainTEDB(multiTEDB); + } + + /* + //new function from Andrea + public void setWriteMultiAndIntraTEDB(MultiDomainTEDB multiTEDB, Hashtable intraTEDBs) { + + this.multiDomainTEDB = multiTEDB; + this.intraTEDBs = intraTEDBs; + saveTopologyDB.setMultiDomainTEDB(multiTEDB); + saveTopologyDB.setIntraTEDBs(intraTEDBs); + } + */ + + + public void setReadDomainTEDB(DomainTEDB readDomainTEDB) { + //this.readDomainTEDB = readDomainTEDB; + //System.out.println("setReadDomain: readFomainTEDB().getDomainID()="+readDomainTEDB.getDomainID()); + //System.out.println("setReadDomain: readFomainTEDB="+readDomainTEDB.printTopology()); + if(readDomainTEDB.getDomainID() == null) + this.intraTEDBs.put("default", readDomainTEDB); + else + this.intraTEDBs.put(readDomainTEDB.getDomainID().toString(), readDomainTEDB); + } + public void createUpdateDispatcher(){ + //Updater dispatcher + ud = new UpdateDispatcher(multiDomainTEDB,intraTEDBs); + } + + /** + * Function to create the TEDBs of the peer. + * @param nameParametersFile Name of the Parameters File + */ + + + /** + * Start the session for the management of the BGP4. + */ + public void startManagementServer(){ + logServer.debug("Initializing Management Server"); + BGP4ManagementServer bms=new BGP4ManagementServer(params.getBGP4ManagementPort(),multiDomainTEDB,intraTEDBs,bgp4SessionsInformation,sendTopologyTask); + bms.start(); + } + /** + * Function which start the peer as a client which try to establish new sessions with peers. + * It starts a new process for each peer. + */ + public void startClient(){ + logClient.debug("Initializing Session Manager to connect as client"); + if (params.getBGPIdentifier() != null){ + Inet4Address BGPIdentifier=null; + try { + BGPIdentifier = (Inet4Address) InetAddress.getByName(params.getBGPIdentifier()); + } catch (UnknownHostException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return; + } + for (int i =0;i."); + System.exit(1); + } + + } + /** + * Function which starts the peer (listening BGP4 protocol) as a server. + * It starts once the session server manager. + */ + public void startServer(){ + logServer.info("Initializing Session Manager to connect as server"); + Inet4Address localAddress=null; + Inet4Address BGPIdentifier=null; + if (params.getBGPIdentifier() != null){ + try { + localAddress = (Inet4Address) InetAddress.getByName(params.getLocalBGPAddress()); + BGPIdentifier = (Inet4Address) InetAddress.getByName(params.getBGPIdentifier()); + } catch (UnknownHostException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + return; + } + if (params.isTest()) { + bgp4SessionServer = new BGP4SessionServerManager(bgp4SessionsInformation, multiDomainTEDB, ud, params.getBGP4Port(), params.getHoldTime(), BGPIdentifier, params.getVersion(), params.getMyAutonomousSystem(), params.isNodelay(), localAddress, params.getKeepAliveTimer(), peersToConnect, params.isTest()); + executor.execute(bgp4SessionServer); + } + else { + bgp4SessionServer = new BGP4SessionServerManager(bgp4SessionsInformation, multiDomainTEDB, ud, params.getBGP4Port(), params.getHoldTime(), BGPIdentifier, params.getVersion(), params.getMyAutonomousSystem(), params.isNodelay(), localAddress, params.getKeepAliveTimer(), peersToConnect); + executor.execute(bgp4SessionServer); + } + + }else{ + logServer.error("ERROR: BGPIdentifier is not configured. To configure: XML file (BGP4Parameters.xml) ."); + System.exit(1); + } + } + + public void startSendTopology(){ + if (params.isTest()) { + sendTopologyTask.configure(intraTEDBs, bgp4SessionsInformation, sendTopology, params.getInstanceID(),params.isSendIntradomainLinks(),this.multiDomainTEDB, params.isTest()); + } + else{ + sendTopologyTask.configure(intraTEDBs, bgp4SessionsInformation, sendTopology, params.getInstanceID(),params.isSendIntradomainLinks(),this.multiDomainTEDB); + } + executor.scheduleWithFixedDelay(sendTopologyTask, 0,params.getSendTopoDelay(), TimeUnit.MILLISECONDS); + } + + + + public void startSaveTopology(){ + //FIXME: ADD param to configure the delay + executor.scheduleWithFixedDelay(saveTopologyDB, 0,5000, TimeUnit.MILLISECONDS); + } + + + public SaveTopologyinDB getSaveTopologyDB() { + return saveTopologyDB; + } + + public void setSaveTopologyDB(SaveTopologyinDB saveTopologyDB) { + this.saveTopologyDB = saveTopologyDB; + } + + public boolean isSaveTopology() { + return saveTopology; + } + + public void setSaveTopology(boolean saveTopology) { + this.saveTopology = saveTopology; + } + + public UpdateDispatcher getUd() { + return ud; + } + + public void setUd(UpdateDispatcher ud) { + this.ud = ud; + } + + public void addSimpleTEDB(SimpleTEDB simpleTEDB, String domainID) { + this.intraTEDBs.put(domainID, simpleTEDB); + } + + public void setSimpleTEDB(SimpleTEDB simpleTEDB) { + if(simpleTEDB.getDomainID() == null) + this.intraTEDBs.put("default", simpleTEDB); + else + this.intraTEDBs.put(simpleTEDB.getDomainID().toString(), simpleTEDB); + } + + + public void stopPeer(){ + executor.shutdown(); + } + public MultiDomainTEDB getMultiDomainTEDB() { + return multiDomainTEDB; + } + + + public Hashtable getIntraTEDBs() { + return intraTEDBs; + } + + public void setIntraTEDBs(Hashtable intraTEDBs) { + this.intraTEDBs = intraTEDBs; + } + + public void setMultiDomainTEDB(MultiDomainTEDB multiDomainTEDB) { + this.multiDomainTEDB = multiDomainTEDB; + } + + + + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeerMain.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeerMain.java new file mode 100644 index 0000000000000000000000000000000000000000..aa2a5cc6a0b371eb29615a200f5a1c71505f2a75 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeerMain.java @@ -0,0 +1,37 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.peer; + +public class BGPPeerMain { + + /** + * @param args Command line arguments. First argument, config file. + */ + public static void main(String[] args) { + BGPPeer bgpPeer = new BGPPeer(); + if (args.length != 0) + bgpPeer.configure(args[0]); + else + bgpPeer.configure(); + + //bgpPeer.createTEDB("hola"); //did it in configure + bgpPeer.createUpdateDispatcher(); + bgpPeer.startClient(); + bgpPeer.startServer(); + bgpPeer.startSaveTopology(); + bgpPeer.startManagementServer(); + bgpPeer.startSendTopology(); + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java new file mode 100644 index 0000000000000000000000000000000000000000..d66f2485d4f7f04d92f6d61e17c7fa49836ea25e --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java @@ -0,0 +1,300 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +package eu.teraflow.tid.bgp4Peer.peer; + +import java.net.Inet4Address; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.Set; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import eu.teraflow.tid.tedb.DatabaseControlSimplifiedLSA; +import eu.teraflow.tid.tedb.DomainTEDB; +import eu.teraflow.tid.tedb.InterDomainEdge; +import eu.teraflow.tid.tedb.IntraDomainEdge; +import eu.teraflow.tid.tedb.MultiDomainTEDB; +import eu.teraflow.tid.tedb.TEDB; +import eu.teraflow.tid.tedb.TE_Information; +import redis.clients.jedis.Jedis; + +/** + * Class to save periodically the topology. It sends the topology to the active BGP4 sessions. + * @author pac + * + */ +public class SaveTopologyinDB implements Runnable { + + //FIXME: Configure from file + private Jedis jedis; + private String host="localhost"; + private int port=6379; + + //TEDBs + private Hashtable intraTEDBs; + + // Multi-domain TEDB to redistribute Multi-domain Topology + private MultiDomainTEDB multiDomainTEDB; + + private boolean writeTopology; + + private Logger log; + + + public SaveTopologyinDB(){ + log = LoggerFactory.getLogger("BGP4Peer"); + jedis = new Jedis(host,port); + } + + public void configure( Hashtable intraTEDBs,MultiDomainTEDB multiTED, boolean writeTopology, String host, int port){ + this.intraTEDBs=intraTEDBs; + this.writeTopology=writeTopology; + this.multiDomainTEDB=multiTED; + //rdh.setHost(host); + //rdh.setPort(port); + + + if (writeTopology){ + jedis = new Jedis(host,port); + jedis.connect(); + } + } + + /** + * Function to send the topology database. + */ + + + public void run(){ + try { + if (writeTopology){ + log.info("Going to save Topology in Redis DB"); + if (jedis==null){ + jedis = new Jedis(host,port); + jedis.connect(); + }else if (jedis.isConnected()==false){ + jedis.connect(); + } + if (multiDomainTEDB!=null){ + log.info("save Multi-Domain TEDB"); + writeLinkDBInter( multiDomainTEDB.getInterDomainLinks()); + } + else { + log.info("save form TEDB"); + Enumeration iter = intraTEDBs.elements(); + while (iter.hasMoreElements()){ + writeLinkDBInter( iter.nextElement().getInterDomainLinks()); + } + } + + log.info("sendIntraDomainLinks activated"); + Enumeration iter = intraTEDBs.keys(); + while (iter.hasMoreElements()){ + String domainID = iter.nextElement(); + log.info("Sending TED from domain "+domainID); + DomainTEDB ted=(DomainTEDB)intraTEDBs.get(domainID); + //writeLinkDB( ted.getNetworkGraph().edgeSet(),domainID); + writeLinkDB(ted.getIntraDomainLinks(),domainID); + } + + + } + }catch (Exception e) { + e.printStackTrace(); + log.error("PROBLEM Writing TOPOLOGY: "+e.toString()); + } + + } + + /** + * This function write a BGP4 update message in Data Base for each link in the list + * @param intradomainLinks + */ + private void writeLinkDB(Set intradomainLinks, String domainID){ + + Iterator edgeIt = intradomainLinks.iterator(); + + while (edgeIt.hasNext()){ + + IntraDomainEdge edge = edgeIt.next(); + + DatabaseControlSimplifiedLSA dcsl =createSimplifiedLSA(edge); + String jsonLSA = dcsl.logJsonSimplifiedLSA(); + + if (jedis == null) + log.info("JEDIS IS NULL"); + + String ret = jedis.set("LSA:"+dcsl.getAdvertisingRouter().getHostAddress()+":"+dcsl.getLinkId().getHostAddress(), jsonLSA); + } + + } + + private DatabaseControlSimplifiedLSA createSimplifiedLSA(IntraDomainEdge edge){ + DatabaseControlSimplifiedLSA dcsl = new DatabaseControlSimplifiedLSA(); + + //Inet4Address source = (Inet4Address)edge.getSrc_router_id(); + //Inet4Address dst = (Inet4Address)edge.getDst_router_id(); + + Inet4Address source = (Inet4Address)edge.getSource(); + dcsl.setAdvertisingRouter(source); + Inet4Address dst = (Inet4Address)edge.getTarget(); + dcsl.setLinkId(dst); + + TE_Information te_info = ((IntraDomainEdge) edge).getTE_info(); + + if (te_info != null){ + + if (te_info.getLinkLocalRemoteIdentifiers() != null){ + dcsl.linkLocalIdentifier = te_info.getLinkLocalRemoteIdentifiers().getLinkLocalIdentifier(); + } + + if (te_info.getLinkLocalRemoteIdentifiers() != null){ + dcsl.linkRemoteIdentifier = te_info.getLinkLocalRemoteIdentifiers().getLinkRemoteIdentifier(); + } + + if (te_info.getMaximumBandwidth() != null) { + dcsl.maximumBandwidth = te_info.getMaximumBandwidth().getMaximumBandwidth(); + } + + if (te_info.getUnreservedBandwidth() != null) { + dcsl.unreservedBandwidth = te_info.getUnreservedBandwidth().getUnreservedBandwidth()[0]; + } + + if (te_info.getMaximumReservableBandwidth() != null) + dcsl.maximumReservableBandwidth = te_info.getMaximumReservableBandwidth().getMaximumReservableBandwidth(); + + String ret = ""; + + if (te_info.getAvailableLabels() != null){ + + if (te_info.getAvailableLabels().getLabelSet() != null){ + + ret=ret+" Bitmap: {"; + + for (int i=0;i interdomainLinks){ + + Iterator edgeIt = interdomainLinks.iterator(); + + while (edgeIt.hasNext()){ + + InterDomainEdge edge = edgeIt.next(); + + DatabaseControlSimplifiedLSA dcsl =createSimplifiedLSAInter(edge); + String jsonLSA = dcsl.logJsonSimplifiedLSA(); + //rdh.write("LSA:"+dcsl.getAdvertisingRouter().getHostAddress()+":"+dcsl.getLinkId().getHostAddress(),jsonLSA); + String ret = jedis.set("LSA:"+dcsl.getAdvertisingRouter().getHostAddress()+":"+dcsl.getLinkId().getHostAddress(), jsonLSA); + } + + } + + private DatabaseControlSimplifiedLSA createSimplifiedLSAInter(InterDomainEdge edge){ + DatabaseControlSimplifiedLSA dcsl = new DatabaseControlSimplifiedLSA(); + + //Inet4Address source = (Inet4Address)edge.getSrc_router_id(); + //Inet4Address dst = (Inet4Address)edge.getDst_router_id(); + + Inet4Address source = (Inet4Address)edge.getSource(); + dcsl.setAdvertisingRouter(source); + Inet4Address dst = (Inet4Address)edge.getTarget(); + dcsl.setLinkId(dst); + + TE_Information te_info = ((InterDomainEdge) edge).getTE_info(); + + if (te_info != null){ + + if (te_info.getLinkLocalRemoteIdentifiers() != null){ + dcsl.linkLocalIdentifier = te_info.getLinkLocalRemoteIdentifiers().getLinkLocalIdentifier(); + } + + if (te_info.getLinkLocalRemoteIdentifiers() != null){ + dcsl.linkRemoteIdentifier = te_info.getLinkLocalRemoteIdentifiers().getLinkRemoteIdentifier(); + } + + if (te_info.getMaximumBandwidth() != null) { + dcsl.maximumBandwidth = te_info.getMaximumBandwidth().getMaximumBandwidth(); + } + + if (te_info.getUnreservedBandwidth() != null) { + dcsl.unreservedBandwidth = te_info.getUnreservedBandwidth().getUnreservedBandwidth()[0]; + } + + if (te_info.getMaximumReservableBandwidth() != null) + dcsl.maximumReservableBandwidth = te_info.getMaximumReservableBandwidth().getMaximumReservableBandwidth(); + + String ret = ""; + + if (te_info.getAvailableLabels() != null){ + + if (te_info.getAvailableLabels().getLabelSet() != null){ + + ret=ret+" Bitmap: {"; + + for (int i=0;i intraTEDBs; + + // Multi-domain TEDB to redistribute Multi-domain Topology + private MultiDomainTEDB multiDomainTEDB; + + private boolean sendTopology; + private boolean isTest=false; + private BGP4SessionsInformation bgp4SessionsInformation; + private Logger log; + private int instanceId=1; + private boolean sendIntraDomainLinks=false; + + private boolean send4AS=false; + + + + + private Inet4Address localBGPLSIdentifer; + private Inet4Address localAreaID; + + public SendTopology(){ + log = LoggerFactory.getLogger("BGP4Peer"); + } + + public void configure( Hashtable intraTEDBs,BGP4SessionsInformation bgp4SessionsInformation,boolean sendTopology,int instanceId,boolean sendIntraDomainLinks, MultiDomainTEDB multiTED){ + this.intraTEDBs=intraTEDBs; + this.bgp4SessionsInformation=bgp4SessionsInformation; + this.sendTopology= sendTopology; + this.instanceId = instanceId; + this.sendIntraDomainLinks=sendIntraDomainLinks; + this.multiDomainTEDB=multiTED; + try { + this.localAreaID=(Inet4Address)Inet4Address.getByName("0.0.0.0"); + this.localBGPLSIdentifer=(Inet4Address)Inet4Address.getByName("1.1.1.1"); + } catch (UnknownHostException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + + public void configure( Hashtable intraTEDBs,BGP4SessionsInformation bgp4SessionsInformation,boolean sendTopology,int instanceId,boolean sendIntraDomainLinks, MultiDomainTEDB multiTED, boolean test){ + this.intraTEDBs=intraTEDBs; + this.bgp4SessionsInformation=bgp4SessionsInformation; + this.sendTopology= sendTopology; + this.instanceId = instanceId; + this.sendIntraDomainLinks=sendIntraDomainLinks; + this.multiDomainTEDB=multiTED; + this.isTest=test; + try { + this.localAreaID=(Inet4Address)Inet4Address.getByName("0.0.0.0"); + this.localBGPLSIdentifer=(Inet4Address)Inet4Address.getByName("1.1.1.1"); + } catch (UnknownHostException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + /** + * Function to send the topology database. + */ + + + public void run(){ + try { + if (sendTopology){ + if (!(bgp4SessionsInformation.getSessionList().isEmpty())){ + if (multiDomainTEDB!=null){ + log.debug("Sending Multi-Domain TEDB"); + sendLinkNLRI( multiDomainTEDB.getInterDomainLinks()); + } + else { + log.debug("Sending from TEDB"); + Enumeration iter = intraTEDBs.elements(); + while (iter.hasMoreElements()){ + sendLinkNLRI( iter.nextElement().getInterDomainLinks()); + } + } + + if (sendIntraDomainLinks){//Intradomain Links + log.debug("sendIntraDomainLinks activated"); + Enumeration iter = intraTEDBs.keys(); + while (iter.hasMoreElements()){ + String domainID = iter.nextElement(); + //Andrea + log.debug("Sending TED from domain "+domainID); + + TEDB ted=intraTEDBs.get(domainID); + if (ted instanceof DomainTEDB) { + sendLinkNLRI( ((DomainTEDB)ted).getIntraDomainLinks(),domainID); + //log.info(" XXXX ted.getNodeTable():"+ted.getNodeTable()); + sendNodeNLRI( ((DomainTEDB)ted).getIntraDomainLinksvertexSet(), ((DomainTEDB)ted).getNodeTable()); + if (((DomainTEDB)ted).getItResources()!=null){ + sendITNodeNLRI( domainID, ((DomainTEDB)ted).getItResources()); + } + + } + + + + } + + } + + } + } + }catch (Exception e) { + e.printStackTrace(); + log.error("PROBLEM SENDING TOPOLOGY: "+e.toString()); + } + + } + /** + * This function sends a BGP4 update message (encoded in a NodeNLRI) for each node in the set + * @param vertexIt + */ + private void sendNodeNLRI(Set vertexSet, Hashtable NodeTable){ + Iterator vertexIt = vertexSet.iterator(); + //Enviamos primero los nodos. Un Node NLRI por cada nodo. + while (vertexIt.hasNext()){ + Inet4Address node=null; + Object v = vertexIt.next(); + if( v instanceof eu.teraflow.tid.tedb.elements.Node){ + try { + node = (Inet4Address)Inet4Address.getByName(((eu.teraflow.tid.tedb.elements.Node)v).getAddress().get(0)); + } catch (UnknownHostException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + }else{ + node = (Inet4Address)v; + } + + + //log.info(" XXXX node: "+ node); + Node_Info node_info = NodeTable.get(node); + //log.info(" XXXX node_info: "+ node_info); + if (node_info!=null){ + log.debug("Sending node: ("+node+")"); + //Mandamos NodeNLRI + BGP4Update update = createMsgUpdateNodeNLRI(node_info); + sendMessage(update); + }else { + log.debug("Node "+node+ " HAS NO node_info in NodeTable"); + } + + + } + } + + /** + * This function sends a BGP4 update message (encoded in a ITNodeNLRI) for each node in the set + * @param vertexIt + */ + + + private void sendITNodeNLRI(String domainID, IT_Resources itResources){ + //Andrea + log.debug("Sending IT REsources"); + BGP4Update update = createMsgUpdateITNodeNLRI(domainID, itResources); + sendMessage(update); +// Iterator vertexIt = vertexSet.iterator(); +// //Enviamos primero los nodos. Un Node NLRI por cada nodo. +// while (vertexIt.hasNext()){ +// Inet4Address node = (Inet4Address)vertexIt.next(); +// //log.info(" XXXX node: "+ node); +// Node_Info node_info = NodeTable.get(node); +// //log.info(" XXXX node_info: "+ node_info); +// if (node_info!=null){ +// log.debug("Sending node: ("+node+")"); +// //Mandamos NodeNLRI +// BGP4Update update = createMsgUpdateNodeNLRI(node_info); +// sendMessage(update); +// }else { +// log.error("Node "+node+ " HAS NO node_info in NodeTable"); +// } +// +// +// } + } + + /** + * This function sends a BGP4 update message (encoded in a LinkNLRI) for each link in the list + * @param interdomainLinks + */ + private void sendLinkNLRI(LinkedList interdomainLinks){ + if (true){ + int lanID = 1; ///INVENTADOO + ArrayList addressList = new ArrayList(); + Iterator edgeIt = interdomainLinks.iterator(); + while (edgeIt.hasNext()){ + + InterDomainEdge edge = edgeIt.next(); + Inet4Address source = (Inet4Address)edge.getSrc_router_id(); + Inet4Address dst = (Inet4Address)edge.getDst_router_id(); + log.debug("Sending ID edge: ("+source.toString() +":"+((InterDomainEdge) edge).getSrc_if_id()+","+dst.toString()+")"); + addressList = new ArrayList(); + addressList.add(0,source); + addressList.add(1,dst); + + + + //Link Local Remote Identifiers + ArrayList localRemoteIfList =null; + localRemoteIfList= new ArrayList (); + localRemoteIfList.add(0,((InterDomainEdge) edge).getSrc_if_id());//te_info.getLinkLocalRemoteIdentifiers().getLinkLocalIdentifier()); + localRemoteIfList.add(1,((InterDomainEdge) edge).getDst_if_id());//te_info.getLinkLocalRemoteIdentifiers().getLinkRemoteIdentifier()); + + + ArrayList domainList = new ArrayList(2); + //FIXME: chequear + TE_Information te_info = ((InterDomainEdge) edge).getTE_info(); + + domainList.add(((Inet4Address)edge.getDomain_src_router()).getHostAddress().toString()); + //System.out.println("SRC Domain is "+((Inet4Address)edge.getDomain_src_router()).getHostAddress().toString() ); + domainList.add( ((Inet4Address)edge.getDomain_dst_router()).getHostAddress().toString()); + log.debug("SRC Domain is "+(Inet4Address)edge.getDomain_dst_router()); + BGP4Update update = createMsgUpdateLinkNLRI(addressList,localRemoteIfList, lanID, domainList, false, te_info); + update.setLearntFrom(edge.getLearntFrom()); + log.debug("Update message Created"); + sendMessage(update); + } + } + + } + /** + * This function sends a BGP4 update message (encoded in a LinkNLRI) for each link in the set + * @param edgeIt + */ + private void sendLinkNLRI(Set edgeSet, String domainID){ + int lanID = 1; ///INVENTADOO + ArrayList addressList = new ArrayList(); + Iterator edgeIt = edgeSet.iterator(); + while (edgeIt.hasNext()){ + + IntraDomainEdge edge = edgeIt.next(); + Inet4Address source=null; + if(edge.getSource() instanceof eu.teraflow.tid.tedb.elements.Node){ + try { + source=(Inet4Address)Inet4Address.getByName(((eu.teraflow.tid.tedb.elements.Node)edge.getSource()).getAddress().get(0)); + } catch (UnknownHostException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + }else{ + source = (Inet4Address)edge.getSource(); + } + + Inet4Address dst=null; + if(edge.getTarget() instanceof eu.teraflow.tid.tedb.elements.Node){ + try { + dst=(Inet4Address)Inet4Address.getByName(((eu.teraflow.tid.tedb.elements.Node)edge.getTarget()).getAddress().get(0)); + } catch (UnknownHostException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + }else{ + dst = (Inet4Address)edge.getTarget(); + } + log.debug("Sending: ("+source.toString() +","+dst.toString()+")"); + addressList = new ArrayList(); + addressList.add(0,source); + addressList.add(1,dst); + //Link Local Remote Identifiers + ArrayList localRemoteIfList =null; + localRemoteIfList= new ArrayList (); + localRemoteIfList.add(0,((IntraDomainEdge) edge).getSrc_if_id());//te_info.getLinkLocalRemoteIdentifiers().getLinkLocalIdentifier()); + localRemoteIfList.add(1,((IntraDomainEdge) edge).getDst_if_id());//te_info.getLinkLocalRemoteIdentifiers().getLinkRemoteIdentifier()); + + //MPLS + float maximumBandwidth = 0; + float[] unreservedBandwidth = null; + float maximumReservableBandwidth = 0; + int undirLinkDelay = 0; + int metric = 0; + long te_metric =0; + + //GMPLS + AvailableLabels availableLabels = null; + MF_OTPAttribTLV mfOTP = null; + + + TE_Information te_info = ((IntraDomainEdge) edge).getTE_info(); + + ArrayList domainList = new ArrayList(2); + domainList.add(domainID); + domainList.add(domainID); + BGP4Update update = createMsgUpdateLinkNLRI(addressList,localRemoteIfList, lanID, domainList, true, te_info); + update.setLearntFrom(edge.getLearntFrom()); + sendMessage(update); + + } + + } + /** + * Function to send a BGP4 update message to the connected peers. + * @param update + */ + private void sendMessage (BGP4Update update){ + + Enumeration sessions = bgp4SessionsInformation.getSessionList().elements(); + + log.debug("Sending a BGP4 update message:"+update.toString()); + while (sessions.hasMoreElements()){ + GenericBGP4Session session = sessions.nextElement(); + if (session==null) { + log.error("SESSION NULL"); + }else { + if (session.getSendTo()) { + String destination = session.getRemotePeerIP().getHostAddress(); + log.debug("BGP4 Update learnt from:" + update.getLearntFrom()); + if (isTest){ + log.debug("Sending BGP4 update to:" + destination+" with no check on the ID since it is test"); + session.sendBGP4Message(update); + } + else{ + try { + if ((update.getLearntFrom() != null) && (update.getLearntFrom().contains("/"))) { + //log.info(update.getLearntFrom().substring(1)); + if (!destination.equals(update.getLearntFrom().substring(1))) { + //log.info("id da getLearnt "+ update.getLearntFrom()); + log.debug("Sending update to destination " + destination + " for info learnt from " + update.getLearntFrom().substring(1)); + log.debug("Sending BGP4 update to:" + destination); + session.sendBGP4Message(update); + + } else + log.debug("destination " + destination + " and source of information " + update.getLearntFrom().substring(1) + " are equal"); + + + } + else{ + if (!destination.equals(update.getLearntFrom())) { + //log.info("id da getLearnt "+ update.getLearntFrom()); + log.debug("Sending update to destination " + destination + " for info learnt from " + update.getLearntFrom()); + log.debug("Sending BGP4 update to:" + destination); + session.sendBGP4Message(update); + } else + log.debug("destination " + destination + " and source of information " + update.getLearntFrom() + " are equal"); + } + } + catch (Exception e){ + e.printStackTrace(); + } + } + } + } + + } + } + /** + * This function create a BGP4 Message with NodeNLRI field + + * @param node_info + */ + private BGP4Update createMsgUpdateNodeNLRI(Node_Info node_info){ + try{ + + + BGP4Update update= new BGP4Update(); + //Path Attributes + ArrayList pathAttributes = update.getPathAttributes(); + //Origin + OriginAttribute or = new OriginAttribute(); + or.setValue(PathAttributesTypeCode.PATH_ATTRIBUTE_ORIGIN_IGP); + pathAttributes.add(or); + //AS_PATH + if (send4AS==true) { + AS_Path_Attribute as_path = new AS_Path_Attribute(); + AS_Path_Segment as_path_seg = new AS_Path_Segment(); + long[] segs = new long[1]; + segs[0] = 65522; + as_path_seg.set4Segments(segs); + as_path.getAsPathSegments().add(as_path_seg); + pathAttributes.add(as_path); + } + else { + AS_Path_Attribute as_path = new AS_Path_Attribute(); + AS_Path_Segment as_path_seg = new AS_Path_Segment(); + int[] segs = new int[1]; + segs[0] = 65522; + as_path_seg.setSegments(segs); + as_path.getAsPathSegments().add(as_path_seg); + pathAttributes.add(as_path); + } + + //Node Attribute + + LinkStateAttribute linkStateAttribute = new LinkStateAttribute(); + boolean linkStateNeeded=false; + + if (node_info.getSid()!=0){ + int sid = node_info.getSid(); + SidLabelNodeAttribTLV sidLabelTLV = new SidLabelNodeAttribTLV(); + sidLabelTLV.setSid(sid); + linkStateAttribute.setSidLabelTLV(sidLabelTLV); + linkStateNeeded=true; + } + + if (linkStateNeeded){ + log.debug("Node Attribute added...."); + pathAttributes.add(linkStateAttribute); + } + + //NLRI + NodeNLRI nodeNLRI = new NodeNLRI(); + nodeNLRI.setProtocolID(ProtocolIDCodes.Unknown_Protocol_ID); + nodeNLRI.setRoutingUniverseIdentifier(identifier); + LocalNodeDescriptorsTLV localNodeDescriptors = new LocalNodeDescriptorsTLV(); + + //igp router id + if(node_info.getIpv4Address()!=null){ + IGPRouterIDNodeDescriptorSubTLV igpRouterIDLNSubTLV = new IGPRouterIDNodeDescriptorSubTLV(); + igpRouterIDLNSubTLV.setIpv4AddressOSPF(node_info.getIpv4Address()); + igpRouterIDLNSubTLV.setIGP_router_id_type(IGPRouterIDNodeDescriptorSubTLV.IGP_ROUTER_ID_TYPE_OSPF_NON_PSEUDO); + localNodeDescriptors.setIGPRouterID(igpRouterIDLNSubTLV); + + } + + //as number + if(node_info.getAs_number()!=null){ + AutonomousSystemNodeDescriptorSubTLV asNodeDescrSubTLV = new AutonomousSystemNodeDescriptorSubTLV(); + asNodeDescrSubTLV.setAS_ID(node_info.getAs_number()); + localNodeDescriptors.setAutonomousSystemSubTLV(asNodeDescrSubTLV); + } + //Complete Dummy TLVs + BGPLSIdentifierNodeDescriptorSubTLV bGPLSIDSubTLV =new BGPLSIdentifierNodeDescriptorSubTLV(); + bGPLSIDSubTLV.setBGPLS_ID(this.localBGPLSIdentifer); + localNodeDescriptors.setBGPLSIDSubTLV(bGPLSIDSubTLV); + AreaIDNodeDescriptorSubTLV areaID = new AreaIDNodeDescriptorSubTLV(); + areaID.setAREA_ID(this.localAreaID); + localNodeDescriptors.setAreaID(areaID); + + nodeNLRI.setLocalNodeDescriptors(localNodeDescriptors); + BGP_LS_MP_Reach_Attribute ra= new BGP_LS_MP_Reach_Attribute(); + ra.setLsNLRI(nodeNLRI); + pathAttributes.add(ra); + update.setLearntFrom(node_info.getLearntFrom()); + return update; + } catch (Exception e) { + e.printStackTrace(); + return null; + } + + } + + /** + * This function create a BGP4 Message with NodeNLRI field + * @param addressList + * @param node_info + */ + private BGP4Update createMsgUpdateITNodeNLRI(String domainID, IT_Resources itResources){ + try{ + + BGP4Update update= new BGP4Update(); + //Path Attributes + ArrayList pathAttributes = update.getPathAttributes(); + //Origin + OriginAttribute or = new OriginAttribute(); + or.setValue(PathAttributesTypeCode.PATH_ATTRIBUTE_ORIGIN_IGP); + pathAttributes.add(or); + + //AS_PATH + if (send4AS==true) { + AS_Path_Attribute as_path = new AS_Path_Attribute(); + AS_Path_Segment as_path_seg = new AS_Path_Segment(); + long[] segs = new long[1]; + segs[0] = 65522; + as_path_seg.set4Segments(segs); + as_path.getAsPathSegments().add(as_path_seg); + pathAttributes.add(as_path); + } + else { + AS_Path_Attribute as_path = new AS_Path_Attribute(); + AS_Path_Segment as_path_seg = new AS_Path_Segment(); + int[] segs = new int[1]; + segs[0] = 65522; + as_path_seg.setSegments(segs); + as_path.getAsPathSegments().add(as_path_seg); + pathAttributes.add(as_path); + } + + + + + //NLRI + ITNodeNLRI itNodeNLRI = new ITNodeNLRI(); + itNodeNLRI.setNodeId(domainID); + itNodeNLRI.setControllerIT(itResources.getControllerIT()); + itNodeNLRI.setCpu(itResources.getCpu()); + itNodeNLRI.setMem(itResources.getMem()); + itNodeNLRI.setStorage(itResources.getStorage()); + update.setLearntFrom(itResources.getLearntFrom()); + log.info("Creating IT Update related to domain "+domainID+" learnt from "+itResources.getLearntFrom()); + LocalNodeDescriptorsTLV localNodeDescriptors = new LocalNodeDescriptorsTLV(); + + //Complete Dummy TLVs + BGPLSIdentifierNodeDescriptorSubTLV bGPLSIDSubTLV =new BGPLSIdentifierNodeDescriptorSubTLV(); + bGPLSIDSubTLV.setBGPLS_ID(this.localBGPLSIdentifer); + localNodeDescriptors.setBGPLSIDSubTLV(bGPLSIDSubTLV); + AreaIDNodeDescriptorSubTLV areaID = new AreaIDNodeDescriptorSubTLV(); + areaID.setAREA_ID(this.localAreaID); + localNodeDescriptors.setAreaID(areaID); + + //itNodeNLRI.setLocalNodeDescriptors(localNodeDescriptors); + BGP_LS_MP_Reach_Attribute ra= new BGP_LS_MP_Reach_Attribute(); + ra.setLsNLRI(itNodeNLRI); + pathAttributes.add(ra); + return update; + + } catch (Exception e) { + e.printStackTrace(); + return null; + } + + } + + /** + * Function to create a BGP4 update message with a link NRLI field. To send the links. + * + * @param addressList + * @param addressInterfaceList + * @param localRemoteIfList + * @param lanID + * @param maximumBandwidth + * @param unreservedBandwidth + * @param maximumReservableBandwidth + * @param availableLabels + * @param metric + * @param domainList + * @param intradomain + * @param linkDelay + */ + private BGP4Update createMsgUpdateLinkNLRI(ArrayList addressList,ArrayList localRemoteIfList,int lanID, ArrayList domainList, boolean intradomain, TE_Information te_info ){ + BGP4Update update= new BGP4Update(); + //1. Path Attributes + ArrayList pathAttributes = update.getPathAttributes(); + //1.1. Origin + OriginAttribute or = new OriginAttribute(); + if (intradomain) + or.setValue(PathAttributesTypeCode.PATH_ATTRIBUTE_ORIGIN_IGP); + else + or.setValue(PathAttributesTypeCode.PATH_ATTRIBUTE_ORIGIN_EGP); + pathAttributes.add(or); + ///Andreaaaaa + //update.setLearntFrom("192.168.0.1"); + //1.2. AS-PATH + + if (send4AS==true) { + AS_Path_Attribute as_path = new AS_Path_Attribute(); + AS_Path_Segment as_path_seg = new AS_Path_Segment(); + long[] segs = new long[1]; + segs[0] = 65522; + as_path_seg.set4Segments(segs); + as_path.getAsPathSegments().add(as_path_seg); + pathAttributes.add(as_path); + } + else { + AS_Path_Attribute as_path = new AS_Path_Attribute(); + AS_Path_Segment as_path_seg = new AS_Path_Segment(); + int[] segs = new int[1]; + segs[0] = 65522; + as_path_seg.setSegments(segs); + as_path.getAsPathSegments().add(as_path_seg); + pathAttributes.add(as_path); + } + + + //1.2. LINK-STATE + //MPLS + float maximumBandwidth = 0; + float[] unreservedBandwidth = null; + float maximumReservableBandwidth = 0; + + //GMPLS + AvailableLabels availableLabels = null; + MF_OTPAttribTLV mfOTP = null; + + int metric = 0; + int te_metric = 0; + + + if (te_info != null){ + if (te_info.getLinkLocalRemoteIdentifiers() != null){ + + } + //MPLS + if (te_info.getMaximumBandwidth() != null) { + maximumBandwidth = te_info.getMaximumBandwidth().getMaximumBandwidth(); + } + if (te_info.getUnreservedBandwidth() != null) + unreservedBandwidth = te_info.getUnreservedBandwidth().getUnreservedBandwidth(); + if (te_info.getMaximumReservableBandwidth() != null) + maximumReservableBandwidth = te_info.getMaximumReservableBandwidth().getMaximumReservableBandwidth(); + //GMPLS + if (te_info.getAvailableLabels() != null) + availableLabels = te_info.getAvailableLabels(); + if(te_info.getDefaultTEMetric()!=null){ + metric = (int) te_info.getDefaultTEMetric().getLinkMetric(); + log.debug("Metric en el metodo sendLinkNLRI es: " + metric); + } + if(te_info.getTrafficEngineeringMetric()!=null){ + te_metric = (int) te_info.getTrafficEngineeringMetric().getLinkMetric() ; + log.debug("Metric en el metodo sendLinkNLRI es: " + metric); + } + if(te_info.getMfOTF()!=null){ + mfOTP = te_info.getMfOTF(); + } + + }else{ + log.debug("TE_Info es null"); + } + + + boolean linkStateNeeded = false; + LinkStateAttribute linkStateAttribute = new LinkStateAttribute(); + //1.2.1. MaxReservableBandwidth + if (maximumReservableBandwidth != 0){ + MaxReservableBandwidthLinkAttribTLV maxReservableBandwidthTLV = new MaxReservableBandwidthLinkAttribTLV(); + maxReservableBandwidthTLV.setMaximumReservableBandwidth(maximumReservableBandwidth); + linkStateAttribute.setMaxReservableBandwidthTLV(maxReservableBandwidthTLV); + linkStateNeeded=true; + } + //1.2.2. maxBandwidth + if (maximumBandwidth != 0){ + MaximumLinkBandwidthLinkAttribTLV maximumLinkBandwidthTLV = new MaximumLinkBandwidthLinkAttribTLV(); + maximumLinkBandwidthTLV.setMaximumBandwidth(maximumBandwidth); + linkStateAttribute.setMaximumLinkBandwidthTLV(maximumLinkBandwidthTLV); + linkStateNeeded=true; + } + //1.2.3. unreservedBandwidth + if (unreservedBandwidth != null){ + UnreservedBandwidthLinkAttribTLV unreservedBandwidthTLV = new UnreservedBandwidthLinkAttribTLV(); + unreservedBandwidthTLV.setUnreservedBandwidth(unreservedBandwidth); + linkStateAttribute.setUnreservedBandwidthTLV(unreservedBandwidthTLV); + linkStateNeeded=true; + } + //1.2.4. AvailableLabels + if (availableLabels != null){ + log.debug("Available labels fields: "+availableLabels.getLabelSet().getNumLabels()); + AvailableLabels al = new AvailableLabels(); + + BitmapLabelSet bl = new BitmapLabelSet(); + bl.setBytesBitmap(((BitmapLabelSet)availableLabels.getLabelSet()).getBytesBitMap()); + bl.setNumLabels(availableLabels.getLabelSet().getNumLabels()); + bl.setDwdmWavelengthLabel(((BitmapLabelSet)availableLabels.getLabelSet()).getDwdmWavelengthLabel()); + + bl.setBytesBitmapReserved(((BitmapLabelSet)availableLabels.getLabelSet()).getBytesBitmapReserved()); + + al.setLabelSet(bl); + + log.debug("Campo BytesBitmap: "+Integer.toHexString(((int)bl.getBytesBitMap()[0])&0xFF)); + log.debug("Campo DwdmWavelengthLabel: "+bl.getDwdmWavelengthLabel()); + if (bl.getBytesBitmapReserved()!=null){ + log.debug("Campo BytesBitmapReserved: "+bl.getBytesBitmapReserved()[0]); + } + linkStateAttribute.setAvailableLabels(al); + + linkStateNeeded=true; + } + //1.2.5 metric +// if (metric != 0){ +// DefaultTEMetricLinkAttribTLV defaultMetric = new DefaultTEMetricLinkAttribTLV(); +// defaultMetric.setLinkMetric(metric); +// log.info("Metric en el metodo createMsgUpdateLinkNLRI es: " + metric); +// linkStateAttribute.setTEMetricTLV(defaultMetric); +// linkStateNeeded=true; +// } + + if (te_metric != 0){ + DefaultTEMetricLinkAttribTLV defaultMetric = new DefaultTEMetricLinkAttribTLV(); + //defaultMetric.setLinkMetric(metric); + defaultMetric.setLinkMetric(te_metric); + log.debug("Metric en el metodo createMsgUpdateLinkNLRI es: " + te_metric); + linkStateAttribute.setTEMetricTLV(defaultMetric); + linkStateNeeded=true; + } + + //1.2.6 MF_OPT + if (mfOTP != null){ + MF_OTPAttribTLV mfOTPTLV = mfOTP.duplicate(); + log.debug("SENDING MFOTP OSCAR"); + linkStateAttribute.setMF_OTP_ATLV(mfOTPTLV); + linkStateNeeded=true; + } + + if (linkStateNeeded){ + pathAttributes.add(linkStateAttribute); + } + //2. NLRI + LinkNLRI linkNLRI = new LinkNLRI(); + linkNLRI.setProtocolID(ProtocolIDCodes.Unknown_Protocol_ID); + linkNLRI.setIdentifier(instanceId); + + //2.1. Local Y Remote Descriptors + LocalNodeDescriptorsTLV localNodeDescriptors = new LocalNodeDescriptorsTLV(); + RemoteNodeDescriptorsTLV remoteNodeDescriptors = new RemoteNodeDescriptorsTLV(); + + //2.1.1. IPv4 + IGPRouterIDNodeDescriptorSubTLV igpRouterIDLNSubTLV = new IGPRouterIDNodeDescriptorSubTLV(); + igpRouterIDLNSubTLV.setIpv4AddressOSPF(addressList.get(0)); + igpRouterIDLNSubTLV.setIGP_router_id_type(IGPRouterIDNodeDescriptorSubTLV.IGP_ROUTER_ID_TYPE_OSPF_NON_PSEUDO); + localNodeDescriptors.setIGPRouterID(igpRouterIDLNSubTLV); + //Complete Dummy TLVs + BGPLSIdentifierNodeDescriptorSubTLV bGPLSIDSubTLV =new BGPLSIdentifierNodeDescriptorSubTLV(); + bGPLSIDSubTLV.setBGPLS_ID(this.localBGPLSIdentifer); + localNodeDescriptors.setBGPLSIDSubTLV(bGPLSIDSubTLV); + AreaIDNodeDescriptorSubTLV areaID = new AreaIDNodeDescriptorSubTLV(); + areaID.setAREA_ID(this.localAreaID); + localNodeDescriptors.setAreaID(areaID); + + IGPRouterIDNodeDescriptorSubTLV igpRouterIDDNSubTLV = new IGPRouterIDNodeDescriptorSubTLV(); + igpRouterIDDNSubTLV.setIpv4AddressOSPF(addressList.get(1)); + igpRouterIDDNSubTLV.setIGP_router_id_type(IGPRouterIDNodeDescriptorSubTLV.IGP_ROUTER_ID_TYPE_OSPF_NON_PSEUDO); + remoteNodeDescriptors.setIGPRouterID(igpRouterIDDNSubTLV); + //2.1.2. AS + if (domainList != null){ + AutonomousSystemNodeDescriptorSubTLV as_local = new AutonomousSystemNodeDescriptorSubTLV(); + try { + as_local.setAS_ID((Inet4Address) Inet4Address.getByName(domainList.get(0))); + localNodeDescriptors.setAutonomousSystemSubTLV(as_local); + AutonomousSystemNodeDescriptorSubTLV as_remote = new AutonomousSystemNodeDescriptorSubTLV(); + as_remote.setAS_ID((Inet4Address) Inet4Address.getByName(domainList.get(1))); + remoteNodeDescriptors.setAutonomousSystemSubTLV(as_remote); + } catch (UnknownHostException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + //Complete Dummy TLVs + remoteNodeDescriptors.setBGPLSIDSubTLV(bGPLSIDSubTLV); + remoteNodeDescriptors.setAreaID(areaID); + + linkNLRI.setLocalNodeDescriptors(localNodeDescriptors); + linkNLRI.setRemoteNodeDescriptorsTLV(remoteNodeDescriptors); + + //2.2. Link NLRI TLVs + //2.2.1. Ipv4 interface and neighbour address + IPv4InterfaceAddressLinkDescriptorsSubTLV ipv4InterfaceAddressTLV = new IPv4InterfaceAddressLinkDescriptorsSubTLV(); + IPv4NeighborAddressLinkDescriptorSubTLV ipv4NeighborAddressTLV = new IPv4NeighborAddressLinkDescriptorSubTLV(); + ipv4InterfaceAddressTLV.setIpv4Address(addressList.get(0)); + ipv4NeighborAddressTLV.setIpv4Address(addressList.get(1)); + linkNLRI.setIpv4InterfaceAddressTLV(ipv4InterfaceAddressTLV); + linkNLRI.setIpv4NeighborAddressTLV(ipv4NeighborAddressTLV); + + //2.2.2. Link Local/Remote identifiers TLV + if (localRemoteIfList != null){ + LinkLocalRemoteIdentifiersLinkDescriptorSubTLV linkIdentifiersTLV = new LinkLocalRemoteIdentifiersLinkDescriptorSubTLV(); + linkIdentifiersTLV.setLinkLocalIdentifier(localRemoteIfList.get(0)); + linkIdentifiersTLV.setLinkRemoteIdentifier(localRemoteIfList.get(1)); + linkNLRI.setLinkIdentifiersTLV(linkIdentifiersTLV); + } + + //2.2.3 LinkDelay + if (te_info != null){ + if(te_info.getUndirLinkDelay() != null){ + int undirLinkDelay = te_info.getUndirLinkDelay().getDelay(); + UndirectionalLinkDelayDescriptorSubTLV uSTLV =new UndirectionalLinkDelayDescriptorSubTLV(); + uSTLV.setDelay(undirLinkDelay); + linkNLRI.setUndirectionalLinkDelayTLV(uSTLV); + } + if(te_info.getUndirDelayVar() != null){ + int undirDelayVar = te_info.getUndirDelayVar().getDelayVar(); + UndirectionalDelayVariationDescriptorSubTLV uSTLV =new UndirectionalDelayVariationDescriptorSubTLV(); + uSTLV.setDelayVar(undirDelayVar); + linkNLRI.setUndirectionalDelayVariationTLV(uSTLV); + } + if(te_info.getMinMaxUndirLinkDelay() != null){ + int minDelay = te_info.getMinMaxUndirLinkDelay().getLowDelay(); + int maxDelay = te_info.getMinMaxUndirLinkDelay().getHighDelay(); + MinMaxUndirectionalLinkDelayDescriptorSubTLV uSTLV =new MinMaxUndirectionalLinkDelayDescriptorSubTLV(); + uSTLV.setHighDelay(maxDelay); + uSTLV.setLowDelay(minDelay); + linkNLRI.setMinMaxUndirectionalLinkDelayTLV(uSTLV); + } + if(te_info.getUndirLinkLoss() != null){ + int linkLoss = te_info.getUndirLinkLoss().getLinkLoss(); + UndirectionalLinkLossDescriptorSubTLV uSTLV =new UndirectionalLinkLossDescriptorSubTLV(); + uSTLV.setLinkLoss(linkLoss); + linkNLRI.setUndirectionalLinkLossTLV(uSTLV); + } + if(te_info.getUndirResidualBw() != null){ + int resBw = te_info.getUndirResidualBw().getResidualBw(); + UndirectionalResidualBandwidthDescriptorSubTLV uSTLV =new UndirectionalResidualBandwidthDescriptorSubTLV(); + uSTLV.setResidualBw(resBw); + linkNLRI.setUndirectionalResidualBwTLV(uSTLV); + } + if(te_info.getUndirAvailableBw() != null){ + int availableBw = te_info.getUndirAvailableBw().getAvailableBw(); + UndirectionalAvailableBandwidthDescriptorSubTLV uSTLV =new UndirectionalAvailableBandwidthDescriptorSubTLV(); + uSTLV.setAvailableBw(availableBw); + linkNLRI.setUndirectionalAvailableBwTLV(uSTLV); + } + if(te_info.getUndirUtilizedBw() != null){ + int utilizedBw = te_info.getUndirUtilizedBw().getUtilizedBw(); + UndirectionalUtilizedBandwidthDescriptorSubTLV uSTLV =new UndirectionalUtilizedBandwidthDescriptorSubTLV(); + uSTLV.setUtilizedBw(utilizedBw); + linkNLRI.setUndirectionalUtilizedBwTLV(uSTLV); + } + + } + linkNLRI.setIdentifier(this.identifier); + BGP_LS_MP_Reach_Attribute ra= new BGP_LS_MP_Reach_Attribute(); + ra.setLsNLRI(linkNLRI); + + pathAttributes.add(ra); + return update; + } + /** + * Funcion que crea un mensaje OSPF inventado desde cero. + * Solo se meten en el mensaje los campos: + * - source + * - destino + * - maximun bandwithd + * @return OSPFv2 Link State Update Packet + */ + public static OSPFv2LinkStateUpdatePacket createMsgOSPF(){ + Inet4Address src = null; + Inet4Address dst = null; + MaximumBandwidth maximumBandwidth = new MaximumBandwidth(); + maximumBandwidth.setMaximumBandwidth(100); + UnreservedBandwidth unreservedBandwidth = new UnreservedBandwidth(); + float[] unReservedB = new float[8]; + unReservedB[0]=18309; + unReservedB[1]=130; + unreservedBandwidth.setUnreservedBandwidth(unReservedB); + try { + src = (Inet4Address) Inet4Address.getByName( "179.123.123.123"); + dst = (Inet4Address) Inet4Address.getByName( "179.123.123.111"); + } catch (UnknownHostException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + OSPFv2LinkStateUpdatePacket ospfv2Packet = new OSPFv2LinkStateUpdatePacket(); + ospfv2Packet.setRouterID(src); + LinkedList lsaList = new LinkedList(); + OSPFTEv2LSA lsa = new OSPFTEv2LSA(); + LinkTLV linkTLV=new LinkTLV(); + lsa.setLinkTLV(linkTLV); + + linkTLV.setMaximumBandwidth(maximumBandwidth); + linkTLV.setUnreservedBandwidth(unreservedBandwidth); + LocalInterfaceIPAddress localInterfaceIPAddress= new LocalInterfaceIPAddress(); + LinkedList lista =localInterfaceIPAddress.getLocalInterfaceIPAddressList(); + lista.add(src); + linkTLV.setLocalInterfaceIPAddress(localInterfaceIPAddress); + RemoteInterfaceIPAddress remoteInterfaceIPAddress= new RemoteInterfaceIPAddress(); + LinkedList listar = remoteInterfaceIPAddress.getRemoteInterfaceIPAddressList(); + listar.add(dst); + linkTLV.setRemoteInterfaceIPAddress(remoteInterfaceIPAddress); + LinkID linkID = new LinkID(); + linkID.setLinkID(dst); + linkTLV.setLinkID(linkID); + // if (edge.getTE_info().getAvailableLabels() != null){ + // linkTLV.setAvailableLabels(edge.getTE_info().getAvailableLabels()); + // } + lsaList.add(lsa); + + ospfv2Packet.setLSAlist(lsaList); + return ospfv2Packet; + } + + //* Funcion que decodifica un mensaje OSPFv2LinkStateUpdatePacket creando con los campos extraidos un mensaje BGP4 update. + public BGP4Update decodificarMsgOSPF(OSPFv2LinkStateUpdatePacket ospfv2Packet){ + boolean intradomain = true; + Inet4Address localIPAddress = ospfv2Packet.getRouterID(); + Inet4Address remoteIPAddress = null; + long localInterfaceIPAddress = -1; + long remoteInterfaceIPAddress = -1; + Inet4Address remoteASNumber = null; + LinkedList lsaList; + OSPFTEv2LSA lsa; + //GMPLS Parameter + AvailableLabels al = null; + //MPLS Parameter + float maxBandwidth = 0; + float[] unBandwidth = null; + float maximumReservableBandwidth=0; + + lsaList = ((OSPFv2LinkStateUpdatePacket)ospfv2Packet).getLSAlist(); + for (int i =0;i< lsaList.size();i++){ + if (lsaList.get(i).getLStype() == LSATypes.TYPE_10_OPAQUE_LSA){ + lsa=(OSPFTEv2LSA)lsaList.get(i); + log.debug("Starting to process LSA"); + + LinkTLV linkTLV = lsa.getLinkTLV(); + if (linkTLV!=null){ + //Local and Remote interface IP address + remoteIPAddress = linkTLV.getLinkID().getLinkID(); + log.debug("Remote IP Address: "+remoteIPAddress); + localInterfaceIPAddress = linkTLV.getLinkLocalRemoteIdentifiers().getLinkLocalIdentifier(); + log.debug("Local Interface: "+localInterfaceIPAddress); + remoteInterfaceIPAddress =linkTLV.getLinkLocalRemoteIdentifiers().getLinkRemoteIdentifier(); + log.debug("Remote Interface: "+remoteInterfaceIPAddress); + + //MPLS fields + if (linkTLV.getMaximumBandwidth() != null) + maxBandwidth = linkTLV.getMaximumBandwidth().getMaximumBandwidth(); + if (linkTLV.getUnreservedBandwidth() != null) + unBandwidth = linkTLV.getUnreservedBandwidth().getUnreservedBandwidth(); + if (linkTLV.getMaximumReservableBandwidth()!= null) + maximumReservableBandwidth = linkTLV.getMaximumReservableBandwidth().getMaximumReservableBandwidth(); + + //GMPLS + al = linkTLV.getAvailableLabels(); + //FIXME: Como ver si es inter o intra domain + if (linkTLV.getRemoteASNumber() != null) + remoteASNumber = linkTLV.getRemoteASNumber().getRemoteASNumber(); + + } + } + + } + //Create the address list + ArrayList addressList = new ArrayList(); + addressList.add(localIPAddress); + addressList.add(remoteIPAddress); + //Create the interface list + ArrayList localRemoteIfList = new ArrayList(); + localRemoteIfList.add(localInterfaceIPAddress); + localRemoteIfList.add(remoteInterfaceIPAddress); + + + //Create the domain List + ArrayList domainList = new ArrayList(2); + //FIXME CHECK IF THIS METHOD IS USED + //return createMsgUpdateLinkNLRI(addressList,localRemoteIfList,23,maxBandwidth,unBandwidth,maximumReservableBandwidth,al, 0,0, domainList, intradomain, null); + return null; + } + + public boolean isSendTopology() { + return sendTopology; + } + + + public void setSendTopology(boolean sendTopology) { + this.sendTopology = sendTopology; + } + + public void setisTest(boolean test) { + this.isTest = test; + } + + public boolean getisTest() { + return this.isTest; + } + + + public BGP4SessionsInformation getBgp4SessionsInformation() { + return bgp4SessionsInformation; + } + + + public void setBgp4SessionsInformation( + BGP4SessionsInformation bgp4SessionsInformation) { + this.bgp4SessionsInformation = bgp4SessionsInformation; + } + + + public void setInstanceId(int instanceId) { + this.instanceId = instanceId; + } + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4DomainTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4DomainTEDB.java new file mode 100644 index 0000000000000000000000000000000000000000..cbea17cc524ee98088573cf133004087519ad064 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4DomainTEDB.java @@ -0,0 +1,51 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.tedb; + +import java.util.LinkedList; +import eu.teraflow.tid.tedb.InterDomainEdge; +import eu.teraflow.tid.tedb.TEDB; + +public class BGP4DomainTEDB implements TEDB { + + @Override + public void initializeFromFile(String file) { + // TODO Auto-generated method stub + + } + + @Override + public void initializeFromFile(String file, String learnFrom) { + + } + + @Override + public boolean isITtedb() { + // TODO Auto-generated method stub + return false; + } + + @Override + public String printTopology() { + // TODO Auto-generated method stub + return null; + } + + @Override + public LinkedList getInterDomainLinks() { + // TODO Auto-generated method stub + return null; + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4IntradomainTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4IntradomainTEDB.java new file mode 100644 index 0000000000000000000000000000000000000000..19aad7115d5fab5d14824a3e26df01996c3458e5 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4IntradomainTEDB.java @@ -0,0 +1,67 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.tedb; + +import java.net.Inet4Address; +import java.util.Hashtable; +import java.util.LinkedList; + +import eu.teraflow.tid.tedb.InterDomainEdge; + +public class BGP4IntradomainTEDB implements IntraTEDBS { + + Hashtable tedb; + @Override + public void initializeFromFile(String file) { + // TODO Auto-generated method stub + + } + + @Override + public void initializeFromFile(String file, String learnFrom) { + + } + + @Override + public boolean isITtedb() { + // TODO Auto-generated method stub + return false; + } + + @Override + public String printTopology() { + // TODO Auto-generated method stub + return null; + } + + @Override + public LinkedList getInterDomainLinks() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void addIntradomainEdge() { + // TODO Auto-generated method stub + + } + + @Override + public void addIntradomainNode(Inet4Address domain, Inet4Address node) { + BGP4DomainTEDB bgp4TEDB = tedb.get(domain); + + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/IntraTEDBS.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/IntraTEDBS.java new file mode 100644 index 0000000000000000000000000000000000000000..22319122a7a154fe048b47ea6457ef8dd63d2264 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/IntraTEDBS.java @@ -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. + +package eu.teraflow.tid.bgp4Peer.tedb; + +import java.net.Inet4Address; +import eu.teraflow.tid.tedb.TEDB; + +public interface IntraTEDBS extends TEDB { + + + //Metodo (annadir enlace intradominio) que le pases un domain id, + cosas que necesites para el intradomain edge. + //Las clases que implemente para esta interface ya tengra que ver c�mo hacerlo. Tener una hashtable. + public void addIntradomainEdge(); + public void addIntradomainNode(Inet4Address domain, Inet4Address node); + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateDispatcher.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateDispatcher.java new file mode 100644 index 0000000000000000000000000000000000000000..0da582030271a0ca0beed213d5c03d29086927b9 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateDispatcher.java @@ -0,0 +1,56 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.updateTEDB; + +import java.net.Inet4Address; +import java.util.Hashtable; +import java.util.concurrent.LinkedBlockingQueue; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import es.tid.bgp.bgp4.messages.BGP4Update; +import eu.teraflow.tid.bgp4Peer.tedb.IntraTEDBS; +import eu.teraflow.tid.tedb.DomainTEDB; +import eu.teraflow.tid.tedb.MultiDomainTEDB; +import eu.teraflow.tid.tedb.SimpleTEDB; +import eu.teraflow.tid.tedb.TEDB; + + +/** + * This class is in charge of storing the BGP4 update messages in a queue to be processing + * + * @author pac + * + */ +public class UpdateDispatcher { + + private Logger log; + private LinkedBlockingQueue updateList; + private UpdateProccesorThread upt; + + + public UpdateDispatcher(MultiDomainTEDB multiTedb,Hashtable intraTEDBs ){ + this.updateList=new LinkedBlockingQueue(); + this.upt=new UpdateProccesorThread(updateList, multiTedb,intraTEDBs ); + upt.start(); + log=LoggerFactory.getLogger("BGP4Server"); + } + public void dispatchRequests(BGP4Update updateMessage){ + updateList.add(updateMessage); + } + + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateLink.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateLink.java new file mode 100644 index 0000000000000000000000000000000000000000..bf7a0b84a31c80f694c1dfeaf7fad44fc85882ff --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateLink.java @@ -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. + +package eu.teraflow.tid.bgp4Peer.updateTEDB; + +import java.net.Inet4Address; +import java.util.ArrayList; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import es.tid.bgp.bgp4.update.fields.LinkNLRI; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MaxReservableBandwidthLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MaximumLinkBandwidthLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.UnreservedBandwidthLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.AutonomousSystemNodeDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.NodeDescriptorsSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.NodeDescriptorsSubTLVTypes; +import es.tid.ospf.ospfv2.lsa.LSA; +/** + * This class is used to control BGP updates (not changing database when is a 'refresh BGP message') + * + * WARNING: we only control when adding new link or when bitmap changes. + * @author baam + * + */ +public class UpdateLink { + + + private MaximumLinkBandwidthLinkAttribTLV maximumLinkBandwidthTLV; + private MaxReservableBandwidthLinkAttribTLV maxReservableBandwidthTLV; + private UnreservedBandwidthLinkAttribTLV unreservedBandwidthTLV; + private LinkNLRI linkNLRI; + private Inet4Address localDomainID; + private Inet4Address localRouterASBR; + private Inet4Address remoteDomainID; + private Inet4Address remoteRouterASBR; + private byte[] bitmap; + private byte[] bitmapReserved; + + public UpdateLink(Inet4Address remote, Inet4Address local, byte[] bitMap, byte[] bitmapRes) { + this.bitmap=new byte[bitMap.length]; + for(int i=0; i updateList; + + /** LINK ATTRIBUTE TLVs */ + MaximumLinkBandwidthLinkAttribTLV maximumLinkBandwidthTLV; + MaxReservableBandwidthLinkAttribTLV maxReservableBandwidthTLV; + UnreservedBandwidthLinkAttribTLV unreservedBandwidthTLV; + AdministrativeGroupLinkAttribTLV administrativeGroupTLV; + LinkProtectionTypeLinkAttribTLV linkProtectionTLV; + MetricLinkAttribTLV metricTLV; + IPv4RouterIDLocalNodeLinkAttribTLV iPv4RouterIDLocalNodeLATLV; + IPv4RouterIDRemoteNodeLinkAttribTLV iPv4RouterIDRemoteNodeLATLV; + DefaultTEMetricLinkAttribTLV TEMetricTLV; + TransceiverClassAndAppAttribTLV transceiverClassAndAppATLV; + MF_OTPAttribTLV mF_OTP_ATLV; + int linkDelay; + int linkDelayVar; + int minDelay; + int maxDelay; + int linkLoss; + int residualBw; + int availableBw; + int utilizedBw; + /** NODE ATTRIBUTE TLVs + * Ipv4 of local node link attribute TLV also used + * + * */ + NodeFlagBitsNodeAttribTLV nodeFlagBitsTLV = new NodeFlagBitsNodeAttribTLV(); + NodeNameNodeAttribTLV nodeNameTLV = new NodeNameNodeAttribTLV(); + IS_IS_AreaIdentifierNodeAttribTLV areaIDTLV = new IS_IS_AreaIdentifierNodeAttribTLV(); + SidLabelNodeAttribTLV sidTLV = new SidLabelNodeAttribTLV(); + + /**PREFIX ATTRIBUTE TLVs */ + IGPFlagBitsPrefixAttribTLV igpFlagBitsTLV = new IGPFlagBitsPrefixAttribTLV(); + RouteTagPrefixAttribTLV routeTagTLV = new RouteTagPrefixAttribTLV(); + PrefixMetricPrefixAttribTLV prefixMetricTLV = new PrefixMetricPrefixAttribTLV(); + OSPFForwardingAddressPrefixAttribTLV OSPFForwardingAddrTLV = new OSPFForwardingAddressPrefixAttribTLV(); + + private AvailableLabels availableLabels; + /** + * Logger + */ + private Logger log; + /** + * Topology database for interDomain Links which will be updated. + */ + private MultiDomainTEDB multiTedb; + /** + * Topology database for intradomain Links. It owns several domains and. + */ + private Hashtable intraTEDBs; + + private LinkedList updateLinks; + + private TE_Information te_info; + + + + + public UpdateProccesorThread(LinkedBlockingQueue updateList, + MultiDomainTEDB multiTedb ,Hashtable intraTEDBs ){ + log=LoggerFactory.getLogger("BGP4Server"); + running=true; + this.updateList=updateList; + this.multiTedb = multiTedb; + + this.intraTEDBs=intraTEDBs; + this.availableLabels= new AvailableLabels(); + this.updateLinks=new LinkedList(); + } + + /** + * Starts processing updates + */ + public void run(){ + + BGP4Update updateMsg; + UpdateMsgList updateMsgList = new UpdateMsgList();//write nodes and links info to a file + bgpMarshal m = new bgpMarshal();//add to json file + try { + m.bgpMarshaller(); + } catch (IOException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + int j=0; //debug coverage + while (running && j<100) { + try { + clearAttributes(); + UpdateMsg update = new UpdateMsg();//class to send grpc message + PathAttribute att_ls = null; + PathAttribute att_mpreach = null; + PathAttribute att = null; + PathAttribute att_path = null; + updateMsg= updateList.take(); + + + log.info("Update Procesor Thread Reading the message: \n"+ updateMsg.toString()); + log.info("\n \n"); + //guille update processor + + + + log.debug("END string UPDATE msg"); + //Andrea To be checked + String learntFrom = updateMsg.getLearntFrom(); + log.info("Received from "+learntFrom); + ArrayList pathAttributeList = updateMsg.getPathAttributes(); + ArrayList pathAttributeListUtil = new ArrayList(); + update.setLearntFrom(learntFrom); + + + + // buscamos los dos atributos que nos interesan... + for (int i=0;i as_path_segments= ((AS_Path_Attribute)att_path).getAsPathSegments(); + AS_Path_Segment as_path_segment; + int as_path=0; + if(as_path_segments.size()>0){ + as_path_segment=as_path_segments.get(0); + int numberOfSeg=as_path_segment.getNumberOfSegments(); + as_path=as_path_segment.getSegments()[0]; + } + update.setAsPathSegment(as_path); + } + + if (pathAttributeListUtil != null){ + for (int i=0;i) ((BGP_LS_MP_Reach_Attribute)att).getLsNLRIList()){ + log.info("Link_NLRI"); + LinkNLRIMsg LnlriMsg = new LinkNLRIMsg((LinkNLRI)linkstateNLRI,learntFrom); + log.info("Link info: " + LnlriMsg.toString()); + updateMsgList.addLinkToJson(LnlriMsg); + update.addLink(LnlriMsg);//set for grpc msg + } + // } + continue; + case NLRITypes.Node_NLRI: + // NodeNLRIMsg NnlriMsg = new NodeNLRIMsg((NodeNLRI)nlri,learntFrom,currentName); + // log.info("Node_NLRI"); + // log.info("Node info: " + NnlriMsg.toString()); + // updateMsgList.addNodeToJson(NnlriMsg,currentName); + // update.setNode(NnlriMsg);//set for grpc msg + // currentName=null; + for(LinkStateNLRI linkstateNLRI : (List) ((BGP_LS_MP_Reach_Attribute)att).getLsNLRIList()){ + log.info("Node_NLRI"); + NodeNLRIMsg NnlriMsg = new NodeNLRIMsg((NodeNLRI)linkstateNLRI,learntFrom,currentName); + log.info("Node info: " + NnlriMsg.toString()); + updateMsgList.addNodeToJson(NnlriMsg,currentName); + update.addNode(NnlriMsg);//set for grpc msg + } + currentName=null; + continue; + case NLRITypes.Prefix_v4_NLRI://POR HACER... + log.info("Prefix_v4_NLRI"); + continue; + case NLRITypes.IT_Node_NLRI: + log.info("IT_Node_NLRI"); + continue; + default: + log.debug("Attribute Code unknown"); + } + + } + continue; + default: + log.debug("Attribute Code unknown"); + } + + + + }//fin for + try {m.writeFile(updateMsgList);} catch (IOException e) {e.printStackTrace();} + } + + // + + + log.warn("\n"); +// System.out.println(update.toString()); + //cambiar clase? + log.info("--->Sending to grpc manager"); + try { + grpcClient.sendGrpcUpdateMsg(update); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + //fin guille + + + + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + j++; + }//fin while + // try { + // channel.shutdown().awaitTermination(5, TimeUnit.SECONDS); + // } catch (InterruptedException e) { + // // TODO Auto-generated catch block + // e.printStackTrace(); + // } + System.exit(0); + } + + + + /** + * Function which process the attribute link State. It updates the fields passed by argument. + */ + private void processAttributeLinkState(LinkStateAttribute lsAtt){ + + if (lsAtt.getMaximumLinkBandwidthTLV() != null){ + maximumLinkBandwidthTLV = lsAtt.getMaximumLinkBandwidthTLV(); + } + + if (lsAtt.getMaxReservableBandwidthTLV() != null){ + maxReservableBandwidthTLV = lsAtt.getMaxReservableBandwidthTLV(); + } + if (lsAtt.getUnreservedBandwidthTLV() != null){ + unreservedBandwidthTLV = lsAtt.getUnreservedBandwidthTLV(); + } + if(lsAtt.getAdministrativeGroupTLV() != null){ + administrativeGroupTLV = lsAtt.getAdministrativeGroupTLV(); + } + if(lsAtt.getLinkProtectionTLV() != null){ + linkProtectionTLV = lsAtt.getLinkProtectionTLV(); + } + if(lsAtt.getIPv4RouterIDLocalNodeLATLV()!= null){ + iPv4RouterIDLocalNodeLATLV = lsAtt.getIPv4RouterIDLocalNodeLATLV(); + } + if(lsAtt.getIPv4RouterIDRemoteNodeLATLV()!=null){ + iPv4RouterIDRemoteNodeLATLV = lsAtt.getIPv4RouterIDRemoteNodeLATLV(); + } + if(lsAtt.getMetricTLV() != null){ + metricTLV = lsAtt.getMetricTLV(); + } + if(lsAtt.getTEMetricTLV()!=null){ + TEMetricTLV = lsAtt.getTEMetricTLV(); + } + if(lsAtt.getNodeFlagBitsTLV()!= null){ + nodeFlagBitsTLV = lsAtt.getNodeFlagBitsTLV(); + } + if(lsAtt.getNodeNameTLV() != null){ + nodeNameTLV = lsAtt.getNodeNameTLV(); + } + if(lsAtt.getAreaIDTLV() != null){ + areaIDTLV = lsAtt.getAreaIDTLV(); + } + if(lsAtt.getIgpFlagBitsTLV() != null){ + igpFlagBitsTLV= lsAtt.getIgpFlagBitsTLV(); + } + if(lsAtt.getRouteTagTLV() != null){ + routeTagTLV = lsAtt.getRouteTagTLV(); + } + if(lsAtt.getOSPFForwardingAddrTLV() != null){ + OSPFForwardingAddrTLV = lsAtt.getOSPFForwardingAddrTLV(); + } + if(lsAtt.getSidLabelTLV()!=null){ + sidTLV = lsAtt.getSidLabelTLV(); + } + + if (lsAtt.getAvailableLabels() != null){ + this.availableLabels =lsAtt.getAvailableLabels(); + } + if (lsAtt.getMF_OTP_ATLV() != null){ + this.mF_OTP_ATLV =lsAtt.getMF_OTP_ATLV(); + } + + if (lsAtt.getTransceiverClassAndAppATLV() != null){ + this.transceiverClassAndAppATLV =lsAtt.getTransceiverClassAndAppATLV(); + } + + } + /** + * Function which process the link NLRI. It updates the fields passed by argument. + * @param linkNLRI + * @param maximumLinkBandwidthTLV + * @param maxReservableBandwidthTLV + * @param unreservedBandwidthTLV + * @param availableLabels + */ + + + /** Procesar un link significa: + * crear los vertices si no existen ya + * crear la edge si no existe ya + * crear la te_info o actualizarla + * @param linkNLRI + * @param learntFrom + */ + + + + private void clearAttributes(){ + maximumLinkBandwidthTLV= null; + maxReservableBandwidthTLV= null; + unreservedBandwidthTLV= null; + administrativeGroupTLV = null; + linkProtectionTLV =null; + metricTLV = null; + iPv4RouterIDLocalNodeLATLV = null; + iPv4RouterIDRemoteNodeLATLV = null; + TEMetricTLV = null; + transceiverClassAndAppATLV = null; + mF_OTP_ATLV = null; + availableLabels=null; + linkDelay=0; + linkDelayVar=0; + minDelay=0; + maxDelay=0; + linkLoss=0; + residualBw=0; + availableBw=0; + utilizedBw=0; + + } + + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdaterThreadRedisTED.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdaterThreadRedisTED.java new file mode 100644 index 0000000000000000000000000000000000000000..4c0fd13800b30f3b6b77407b95acda5fc71f5618 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdaterThreadRedisTED.java @@ -0,0 +1,77 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.bgp4Peer.updateTEDB; + +import java.util.LinkedList; +import java.util.concurrent.LinkedBlockingQueue; + +import redis.clients.jedis.Jedis; +import es.tid.ospf.ospfv2.OSPFv2LinkStateUpdatePacket; +import es.tid.ospf.ospfv2.lsa.LSA; +import es.tid.ospf.ospfv2.lsa.LSATypes; +import es.tid.ospf.ospfv2.lsa.OSPFTEv2LSA; +import eu.teraflow.tid.tedb.DatabaseControlSimplifiedLSA; + +public class UpdaterThreadRedisTED extends Thread{ + //FIXME: Configure from file + private Jedis jedis; + private String host="localhost"; + + private int port=6379; + + private LinkedBlockingQueue redisOspfv2PacketQueue; + + public UpdaterThreadRedisTED(LinkedBlockingQueue redisOspfv2PacketQueue) { + // TODO Auto-generated constructor stub + + this.redisOspfv2PacketQueue = redisOspfv2PacketQueue; + jedis = new Jedis(host,port); + + + + } + + public void run() { + + LinkedList lsaList; + OSPFTEv2LSA lsa; + OSPFv2LinkStateUpdatePacket ospfv2Packet; + jedis.connect(); + //FIXE: Add disconnect + while(true){ + try { + + ospfv2Packet = redisOspfv2PacketQueue.take(); + lsaList = ((OSPFv2LinkStateUpdatePacket)ospfv2Packet).getLSAlist(); + for (int i =0;i< lsaList.size();i++){ + if (lsaList.get(i).getLStype() == LSATypes.TYPE_10_OPAQUE_LSA){ + lsa=(OSPFTEv2LSA)lsaList.get(i); + DatabaseControlSimplifiedLSA dcsl = new DatabaseControlSimplifiedLSA(); + dcsl.fillSimplifiedLsa(lsa); + String jsonLSA = dcsl.logJsonSimplifiedLSA(); + //RedisDatabaseHandler rdh = new RedisDatabaseHandler(); + String key="LSA:"+dcsl.getAdvertisingRouter().getHostAddress()+":"+dcsl.getLinkId().getHostAddress(); + String ret = jedis.set(key, jsonLSA); + jedis.sadd("TEDB",key); + } + } + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + +} \ No newline at end of file diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DatabaseControlSimplifiedLSA.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DatabaseControlSimplifiedLSA.java new file mode 100644 index 0000000000000000000000000000000000000000..436263a47ca453b6f7454d08e14976d13dc03cb8 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DatabaseControlSimplifiedLSA.java @@ -0,0 +1,174 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import java.net.Inet4Address; + +import com.google.gson.Gson; + +import es.tid.ospf.ospfv2.lsa.OSPFTEv2LSA; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet; + +/** + * + * Class for simplified database write of LSAs + * + * @author Fernando Mu�oz del Nuevo + * + * + * + */ + +public class DatabaseControlSimplifiedLSA { + + public Inet4Address advertisingRouter; + + public Inet4Address linkId; + + public long linkLocalIdentifier; + + public long linkRemoteIdentifier; + + public String bitmapLabelSet; + + public float maximumBandwidth; + + public float unreservedBandwidth; + + public float maximumReservableBandwidth; + + //protected LinkedList labelSet; + + public Inet4Address getAdvertisingRouter() { + return advertisingRouter; + } + + public void setAdvertisingRouter(Inet4Address advertisingRouter) { + this.advertisingRouter = advertisingRouter; + } + + public Inet4Address getLinkId() { + return linkId; + } + + public void setLinkId(Inet4Address linkId) { + this.linkId = linkId; + } + + public long getLinkLocalIdentifier() { + return linkLocalIdentifier; + } + + public void setLinkLocalIdentifier(long linkLocalIdentifier) { + this.linkLocalIdentifier = linkLocalIdentifier; + } + + public long getLinkRemoteIdentifier() { + return linkRemoteIdentifier; + } + + public void setLinkRemoteIdentifier(long linkRemoteIdentifier) { + this.linkRemoteIdentifier = linkRemoteIdentifier; + } + + public String getBitmapLabelSet() { + return bitmapLabelSet; + } + + public void setBitmapLabelSet(String bitmapLabelSet) { + this.bitmapLabelSet = bitmapLabelSet; + } + + public float getMaximumBandwidth() { + return maximumBandwidth; + } + + public void setMaximumBandwidth(float maximumBandwidth) { + this.maximumBandwidth = maximumBandwidth; + } + + public float getUnreservedBandwidth() { + return unreservedBandwidth; + } + + public void setUnreservedBandwidth(float unreservedBandwidth) { + this.unreservedBandwidth = unreservedBandwidth; + } + + public float getMaximumReservableBandwidth() { + return maximumReservableBandwidth; + } + + public void setMaximumReservableBandwidth(float maximumReservableBandwidth) { + this.maximumReservableBandwidth = maximumReservableBandwidth; + } + + public void fillBitmap(AvailableLabels availableLabels){ + + int num_wavelength = 0; + + + bitmapLabelSet = ""; + + while(num_wavelength < availableLabels.getLabelSet().getNumLabels()){ + + int num_byte=num_wavelength/8; + boolean isFree = ((((BitmapLabelSet)availableLabels.getLabelSet()).getBytesBitMap()[num_byte]&(0x80>>>(num_wavelength%8)))==0); + + if(isFree){ + bitmapLabelSet = bitmapLabelSet + "0"; + }else{ + bitmapLabelSet = bitmapLabelSet + "1"; + } + + num_wavelength++; + } + } + + public void fillSimplifiedLsa(OSPFTEv2LSA lsa){ + if (lsa.getAdvertisingRouter()!=null) + this.setAdvertisingRouter(lsa.getAdvertisingRouter()); + if (lsa.getLinkTLV().getLinkID().getLinkID()!=null) + this.setLinkId(lsa.getLinkTLV().getLinkID().getLinkID()); + if (lsa.getLinkTLV().getLinkLocalRemoteIdentifiers()!=null){ + this.setLinkLocalIdentifier(lsa.getLinkTLV().getLinkLocalRemoteIdentifiers().getLinkLocalIdentifier()); + this.setLinkRemoteIdentifier(lsa.getLinkTLV().getLinkLocalRemoteIdentifiers().getLinkRemoteIdentifier()); + } + if (lsa.getLinkTLV().getMaximumBandwidth()!=null) + this.setMaximumBandwidth(lsa.getLinkTLV().getMaximumBandwidth().getMaximumBandwidth()); + if (lsa.getLinkTLV().getUnreservedBandwidth()!=null){ + this.setMaximumBandwidth(lsa.getLinkTLV().getUnreservedBandwidth().unreservedBandwidth[0]); + } if (lsa.getLinkTLV().getMaximumReservableBandwidth()!=null){ + this.setMaximumReservableBandwidth(lsa.getLinkTLV().getMaximumReservableBandwidth().maximumReservableBandwidth); + } + + if (lsa.getLinkTLV().getAvailableLabels()!=null){ + this.fillBitmap(lsa.getLinkTLV().getAvailableLabels()); + } + } + + + public String logJsonSimplifiedLSA(){ + + Gson gson = new Gson(); + String json = gson.toJson(this); + + + return json; + + //IPInterfaceTrafficRequest iitr2 = gson.fromJson(json, DatabaseControlSimplifiedLSA.class); + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DomainTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DomainTEDB.java new file mode 100644 index 0000000000000000000000000000000000000000..44d2973b2ae3463031d3bba42bbe9f754e193c90 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DomainTEDB.java @@ -0,0 +1,85 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import java.net.Inet4Address; +import java.util.Hashtable; +import java.util.LinkedList; +import java.util.Set; + +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet; + + +public interface DomainTEDB extends TEDB { + + public Inet4Address getDomainID(); + + + public boolean belongsToDomain(Object addr); + + //public Object getDomainId(); + public ReachabilityEntry getReachabilityEntry(); + + //public byte[] getDomainReachabilityIPv4Prefix(); + + public LinkedList getInterDomainLinks(); + public Set getIntraDomainLinks(); + public String printInterDomainLinks(); + + public boolean containsVertex(Object vertex); + public WSONInformation getWSONinfo(); + public void setWSONinfo(WSONInformation wSONinfo); + public SSONInformation getSSONinfo(); + public void setSSONinfo(SSONInformation sSONinfo); + public void notifyWavelengthReservation(LinkedList sourceVertexList, LinkedList targetVertexList, int wavelength, boolean bidirectional); + public void notifyWavelengthReservationSSON (LinkedList sourceVertexList, LinkedList targetVertexList, int wavelength, boolean bidirectional, int m); + public void notifyWavelengthEndReservation(LinkedList sourceVertexList, LinkedList targetVertexList, int wavelength, boolean bidirectional); + public void notifyWavelengthChange(Object localInterfaceIPAddress,Object remoteInterfaceIPAddress,BitmapLabelSet previousBitmapLabelSet,BitmapLabelSet newBitmapLabelSet ); + public void notifyNewEdgeIP(Object source, Object destination, TE_Information informationTEDB); + public void register(TEDListener compAlgPreComp); + public void registerSSON(SSONListener compAlgPreComp); + + public void notifyNewVertex(Object vertex); + + public void notifyNewEdge (Object source, Object destination); + + public void clearAllReservations(); + + public void notifyWavelengthEndReservationSSON( + LinkedList sourceVertexList, + LinkedList targetVertexList, int wavelength, + boolean bidirectional, int m); + public void notifyWavelengthReservationWLAN( + LinkedList sourceVertexList, + LinkedList targetVertexList, LinkedList wlans, + boolean bidirectional); + + + public void createGraph(); + + + public Set getIntraDomainLinksvertexSet(); + + + public Hashtable getNodeTable(); + + public IT_Resources getItResources(); + public void setItResources(IT_Resources itResources); + + + + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/EdgeUtils.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/EdgeUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..79ad7f82c5159c6f18e21afaba493ee2a0b31357 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/EdgeUtils.java @@ -0,0 +1,34 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import java.net.Inet4Address; + +import es.tid.of.DataPathID; + +public class EdgeUtils { + + public static Object getEdge(String edge){ + Object router_id_addr; + try { //Router_type: IPv4 + router_id_addr = (Inet4Address) Inet4Address.getByName(edge); + } catch (Exception e) { //Router_type: DatapathID + router_id_addr = (DataPathID) DataPathID.getByName(edge); + //FIXME: See what to do if it is not IPv4 or DatapahID + } + return router_id_addr; + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/FileTEDBUpdater.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/FileTEDBUpdater.java new file mode 100644 index 0000000000000000000000000000000000000000..16ba2de9b5ddc43de899adb996abad2541cb4020 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/FileTEDBUpdater.java @@ -0,0 +1,3585 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.DefaultTEMetricLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.*; +import es.tid.of.DataPathID; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.MaximumBandwidth; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.UnreservedBandwidth; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet; + +import es.tid.rsvp.constructs.gmpls.DWDMWavelengthLabel; +import es.tid.rsvp.objects.subobjects.IPv4prefixEROSubobject; +import org.jgrapht.graph.DirectedWeightedMultigraph; +import org.jgrapht.graph.SimpleDirectedWeightedGraph; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.w3c.dom.*; +import org.w3c.dom.CharacterData; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import java.io.File; +import java.net.Inet4Address; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.LinkedList; + + +/** + * Convenience class to read Traffic Engineering Databases from XML files. + * + * @author ogondio + * + */ +public class FileTEDBUpdater { + + + /** + * Read a full network (no specific layer) + * @param fileName Name of the XML file + * @return Graph of the Network + */ + public static SimpleDirectedWeightedGraph readNetwork(String fileName){ + return FileTEDBUpdater.readNetwork(fileName,null,false,0,Integer.MAX_VALUE); + } + + /** + * Reads a specific layer from a Network XML file + * @param fileName Name of the XML file + * @param layer Layer + * @return Graph of the network + */ + public static SimpleDirectedWeightedGraph readNetwork(String fileName,String layer){ + return FileTEDBUpdater.readNetwork(fileName,layer,false,0,Integer.MAX_VALUE, false); + } + /** + * Reads a specific layer from a Network XML file + * It can treat all domains as a single domain + * @param fileName Name of the XML file + * @param layer Layer + * @param allDomains if all domains are read or not + * @return Graph of the network + */ + public static SimpleDirectedWeightedGraph readNetwork(String fileName,String layer,boolean allDomains){ + return FileTEDBUpdater.readNetwork(fileName,layer,allDomains,0,Integer.MAX_VALUE, false); + } + /** + * Reads a specific layer from a Network XML file + * It can treat all domains as a single domain + * @param fileName Name of the XML file + * @param layer Layer + * @param allDomains if all domains are read or not + * @param lambdaIni first lambda (n) + * @param lambdaEnd last lamnda (n) + * @return Graph of the network + */ + + public static SimpleDirectedWeightedGraph readNetwork(String fileName, String layer,boolean allDomains,int lambdaIni, int lambdaEnd) { + return FileTEDBUpdater.readNetwork(fileName,layer,allDomains,0,Integer.MAX_VALUE, false); + } + + + /** + * Reads a specific layer from a Network XML file. + * It can treat all domains as a single domain. + * + * @param fileName Name of the XML file + * @param layer Layer + * @param allDomains if all domains are read or not + * @param lambdaIni first lambda (n) + * @param lambdaEnd last lamnda (n) + * @param isSSONnetwork If the network supports Flexi Grid + * @return Graph of the network. + */ + public static SimpleDirectedWeightedGraph readNetwork(String fileName, String layer,boolean allDomains,int lambdaIni, int lambdaEnd, boolean isSSONnetwork) { + Logger log = LoggerFactory.getLogger("BGP4Peer"); + Object router_id_addr = null; + Object s_router_id_addr = null; + Object d_router_id_addr = null; + Object src_Numif_id = null; + Object dst_Numif_id = null; + + + //First, create the graph + SimpleDirectedWeightedGraph graph = new SimpleDirectedWeightedGraph(IntraDomainEdge.class); + + log.debug("1. SimpleDirectedWeightedGraph"); + + File file = new File(fileName); + try { + String domain_id = ""; + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + HashMapSIDS = new HashMap(); + HashMapSIDSDP = new HashMap(); + + NodeList nodes_domains = doc.getElementsByTagName("domain"); + if (layer!=null){ + log.debug("Reading topology, looking for layer "+ layer); + } + + + //First pass to get all the nodes + //If we need to read all the domains + for (int j = 0; j < nodes_domains.getLength(); j++) { + boolean readNetwork=false; + Element element1 = (Element) nodes_domains.item(j); + + if (layer!=null){ + NodeList domain_layer = element1.getElementsByTagName("layer"); + if (domain_layer.getLength()==1){ + Element layer_type = (Element) domain_layer.item(0); + log.debug("Layer: " + layer_type.getAttributeNode("type").getValue()); + log.debug("Reading network topology"); + if (layer_type.getAttributeNode("type").getValue().equals(layer)){ + readNetwork = true; + + } + if (layer.equals("interlayer")){ + readNetwork = true; + } + } + }else { + readNetwork=true; + } + if (readNetwork){ + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + for (int k = 0; k < nodes_domain_id.getLength(); k++) { + Element domain_id_e = (Element) nodes_domain_id.item(0); + domain_id = getCharacterDataFromElement(domain_id_e); + log.debug("Loading nodes for domain: " + domain_id); + log.info("Loading topology from domain " + domain_id); + } + + NodeList nodes = element1.getElementsByTagName("node"); + for (int i = 0; i < nodes.getLength(); i++) { + Element element = (Element) nodes.item(i); + NodeList router_id_node = element.getElementsByTagName("router_id"); + Element router_id_e = (Element) router_id_node.item(0); + String router_id = getCharacterDataFromElement(router_id_e); + + log.info("Adding node " + router_id); + router_id_addr = EdgeUtils.getEdge(router_id); + graph.addVertex(router_id_addr); + + log.debug("About to look for SID"); + NodeList SID_aux = element.getElementsByTagName("sid"); + Element SID_e = (Element) SID_aux.item(0); + if (SID_e!=null) + { + log.debug("SID exist"); + int SID = Integer.parseInt(getCharacterDataFromElement(SID_e)); + + try { //Router_type: DatapathID + SIDS.put((Inet4Address) router_id_addr,SID); + log.debug("SID of node Inet4Address: "+SID); + } catch (Exception e) { //Router_type: DatapathID + SIDSDP.put((DataPathID)router_id_addr, SID); + log.debug("SID of node DataPathID: "+SID); + } + } + else + { + log.debug("SID not found"); + } + + } + } + } + + + //Next pass to get all the links + for (int j = 0; j < nodes_domains.getLength(); j++) { + + boolean readNetwork=false; + Element element1 = (Element) nodes_domains.item(j); + + if (layer!=null){ + NodeList domain_layer = element1.getElementsByTagName("layer"); + if (domain_layer.getLength()==1){ + Element layer_type = (Element) domain_layer.item(0); + log.debug("Layer: " + layer_type.getAttributeNode("type").getValue()); + log.debug("Reading Topology"); + if (layer_type.getAttributeNode("type").getValue().equals(layer)){ + readNetwork = true; + } + } + }else { + readNetwork=true; + } + log.debug("Read network = "+readNetwork); + if (readNetwork){ + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + + for (int k = 0; k < nodes_domain_id.getLength(); k++) { + Element domain_id_e = (Element) nodes_domain_id.item(0); + domain_id = getCharacterDataFromElement(domain_id_e); + log.debug("Looking for links in domain: " + domain_id); + } + int numLabels=0; + + Boolean commonBitmapLabelSet = false; + NodeList edgeCommon = doc.getElementsByTagName("edgeCommon"); + int grid=0; + int cs=0; + int n=0; + for (int i = 0; i < edgeCommon.getLength(); i++) { + + Element edgeCommonElement = (Element) edgeCommon.item(i); + NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels"); + for (int k = 0; k < availableLabels_node.getLength(); k++) { + + Element availableLabels_e = (Element) availableLabels_node.item(k); + NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField"); + Element labelSetField_el = (Element) labelSetField_node.item(0); + if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet + //Crear un BitMapSet + + NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels"); + + Element numbLabels_e = (Element) numbLabels_node.item(0); + String numbLabels_s = getCharacterDataFromElement(numbLabels_e); + numLabels=Integer.parseInt(numbLabels_s); + + NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel"); + Element baseLabel_e = (Element) baseLabel_node.item(0); + + float min_frequency; + + grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue()); + + cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue()); + boolean n_frequency_included=false; + if (baseLabel_e.getAttributeNode("n") != null ){ + n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue()); + n_frequency_included = true; + } + else if (baseLabel_e.getAttributeNode("min_frequency") != null){ + String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue(); + + min_frequency=Float.parseFloat(s_min_frequency); + n = ((int)min_frequency - 1471)/20; + n_frequency_included=true; + } + if (n_frequency_included){ + commonBitmapLabelSet = true; + }else{ + log.error("ERROR reading the xml file of the topology, you should enter "); + } + + } + } + + } + /*if(isSSONnetwork ==true){ + if(cs==4){ + numLabels=numLabels*4; + } + else if (cs==5){ + numLabels=numLabels*8; + } + }*/ + + NodeList edges = element_domain.getElementsByTagName("edge"); + for (int i = 0; i < edges.getLength(); i++) { + log.info("New Edge"); + Element element = (Element) edges.item(i); + //By default, all nodes are intradomain + String type; + Attr attr_type=element.getAttributeNode("type"); + if (attr_type==null){ + type="intradomain"; + }else { + type=attr_type.getValue(); + if (allDomains){ + if (type.equals("interdomain")){ + type="intradomain"; + } + } + + else if (type.equals("interlayer")){ + if (layer.equals("interlayer")){ + type="intradomain"; + } + + } + } + log.debug("type::"+type); + if (type.equals("intradomain")) { + IntraDomainEdge edge = new IntraDomainEdge(); + log.info("New Intradomain Edge"); + NodeList source = element.getElementsByTagName("source"); + Element source_router_el = (Element) source.item(0); + + NodeList source_router_id = source_router_el.getElementsByTagName("router_id"); + Element source_router_id_el = (Element) source_router_id.item(0); + String s_r_id = getCharacterDataFromElement(source_router_id_el); + s_router_id_addr= EdgeUtils.getEdge(s_r_id); + + NodeList source_if_id_nl = source_router_el.getElementsByTagName("if_id"); + Element source_if_id_el = (Element) source_if_id_nl.item(0); + String s_source_if_id; + int src_if_id = -1; + if (source_if_id_el!=null){ + s_source_if_id = getCharacterDataFromElement(source_if_id_el); + src_if_id = Integer.parseInt(s_source_if_id); + } + if (src_if_id!=-1) { + log.debug("SRC if id: "+src_if_id); + } + + NodeList source_Numif_id_nl = source_router_el.getElementsByTagName("NumIf_id"); + Element source_Numif_id_el = (Element) source_Numif_id_nl.item(0); + String s_source_Numif_id=null; + if (source_Numif_id_el!=null){ + s_source_Numif_id = getCharacterDataFromElement(source_Numif_id_el); + try { // src_Numif_id type : Inet4Address + src_Numif_id = (Inet4Address) Inet4Address.getByName(s_source_Numif_id); + } catch (Exception e) { // src_Numif_id type : DataPathID + src_Numif_id = DataPathID.getByName(s_source_Numif_id); + } + } + if (s_source_Numif_id!=null) { + log.debug("NumIf_id id: "+src_Numif_id); + } + + NodeList dest_nl = element.getElementsByTagName("destination"); + Element dest_el = (Element) dest_nl.item(0); + + NodeList dest_router_id_nl = dest_el.getElementsByTagName("router_id"); + Element dest_router_id_el = (Element) dest_router_id_nl.item(0); + String d_r_id = getCharacterDataFromElement(dest_router_id_el); + d_router_id_addr= EdgeUtils.getEdge(d_r_id); + + //Anyadimos los SID + if (SIDS.get(s_router_id_addr)!=null && SIDS.get(d_router_id_addr)!=null) + { + log.debug("setting SIDS src: "+SIDS.get(s_router_id_addr)+" dst: "+SIDS.get(d_router_id_addr)); + edge.setSrc_sid(SIDS.get(s_router_id_addr)); + edge.setDst_sid(SIDS.get(d_router_id_addr)); + log.debug("edge.getSrc_sid(): "+edge.getSrc_sid()); + log.debug("edge.getDst_sid(): "+edge.getDst_sid()); + } + else if (SIDSDP.get(s_router_id_addr)!=null && SIDSDP.get(d_router_id_addr)!=null) + { + log.debug("setting SIDSDP src: "+SIDSDP.get(s_router_id_addr)+" dst: "+SIDSDP.get(d_router_id_addr)); + edge.setSrc_sid(SIDSDP.get(s_router_id_addr)); + edge.setDst_sid(SIDSDP.get(d_router_id_addr)); + log.debug("edge.getSrc_sid(): "+edge.getSrc_sid()); + log.debug("edge.getDst_sid(): "+edge.getDst_sid()); + } + + + NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id"); + Element dest_if_id_el= (Element) dest_if_id_nl.item(0); + String s_dest_if_id; + int dst_if_id = -1; + if (dest_if_id_el!=null){ + s_dest_if_id = getCharacterDataFromElement(dest_if_id_el); + dst_if_id = Integer.parseInt(s_dest_if_id); + } + if (dst_if_id!=-1) { + log.debug("DST if id: "+dst_if_id); + } + + + NodeList dest_Numif_id_nl = dest_el.getElementsByTagName("NumIf_id"); + Element dest_Numif_id_el = (Element) dest_Numif_id_nl.item(0); + String s_dest_Numif_id=null; + + if (source_Numif_id_el!=null){ + s_dest_Numif_id = getCharacterDataFromElement(dest_Numif_id_el); + + try { // s_dest_Numif_id type : Inet4Address + dst_Numif_id = (Inet4Address) Inet4Address.getByName(s_dest_Numif_id); + } catch (Exception e) { // s_dest_Numif_id type : DataPathID + dst_Numif_id = DataPathID.getByName(s_dest_Numif_id); + } + } + if (s_dest_Numif_id!=null) { + log.debug("DST NumIf_id id: "+dst_Numif_id); + } + + // Añadimos interfaces Numeradas + if (src_Numif_id!=null){ + edge.setSrc_Numif_id(src_Numif_id); + }if (dst_Numif_id!=null){ + edge.setDst_Numif_id(dst_Numif_id); + }else{ + if (src_if_id != -1){ + edge.setSrc_if_id(src_if_id); + } + if (dst_if_id != -1){ + edge.setDst_if_id(dst_if_id); + } + } + + //DELAY, IF IT COMES.. + NodeList delay_ms_nl = element.getElementsByTagName("delay"); + if (delay_ms_nl.getLength()>0){ + + Element delay_ms_el = (Element)delay_ms_nl.item(0); + String s_delay_ms=getCharacterDataFromElement(delay_ms_el); + double delay_ms=Double.parseDouble(s_delay_ms); + edge.setDelay_ms(delay_ms); + } + + //TE Link information + NodeList maximum_bandwidth_nl = element.getElementsByTagName("maximum_bandwidth"); + if (maximum_bandwidth_nl!=null){ + if (maximum_bandwidth_nl.getLength()>0){ + if(edge.getTE_info()==null){ + TE_Information tE_info= new TE_Information(); + if (commonBitmapLabelSet){ + if(lambdaEnd!=Integer.MAX_VALUE){ + + tE_info.createBitmapLabelSet(numLabels, grid, cs, n,lambdaIni,lambdaEnd); + } + else + tE_info.createBitmapLabelSet(numLabels, grid, cs, n); + } + //tid.util.FuncionesUtiles.printByte(((BitmapLabelSet)tE_info.getAvailableLabels().getLabelSet()).getBytesBitmapReserved(),"getBytesBitmapReserved1:"); + edge.setTE_info(tE_info); + + } else { + TE_Information te_info = edge.getTE_info(); + if (commonBitmapLabelSet){ + // if(lambdaEnd!=Integer.MAX_VALUE){ + + // te_info.createBitmapLabelSet(numLabels, grid, cs, n,lambdaIni,lambdaEnd); + // } + // else + te_info.createBitmapLabelSet(numLabels, grid, cs, n); + } + //tid.util.FuncionesUtiles.printByte(((BitmapLabelSet)tE_info.getAvailableLabels().getLabelSet()).getBytesBitmapReserved(),"getBytesBitmapReserved1:"); + edge.setTE_info(te_info); + } + + Element maximum_bandwidth_el = (Element) maximum_bandwidth_nl.item(0); + String s_maximum_bandwidth = getCharacterDataFromElement(maximum_bandwidth_el); + + float maximum_bandwidth=Float.parseFloat(s_maximum_bandwidth); + MaximumBandwidth maximumBandwidth =new MaximumBandwidth(); + maximumBandwidth.setMaximumBandwidth(maximum_bandwidth); + (edge.getTE_info()).setMaximumBandwidth(maximumBandwidth); + + } + } + /** + * NodeList SID_aux = element.getElementsByTagName("sid"); + Element SID_e = (Element) SID_aux.item(0); + if (SID_e!=null) + { + log.info("SID existe"); + int SID = Integer.parseInt(getCharacterDataFromElement(SID_e)); + SIDS.put(router_id_addr,SID); + log.info("SID of node: "+SID); + } + else + { + log.info("SID not found"); + } + */ + + NodeList defaultmetric = element.getElementsByTagName("default_te_metric"); + Element metric_aux = (Element) defaultmetric.item(0); + + if (metric_aux != null){ + String s_metric_aux = getCharacterDataFromElement(metric_aux); + TE_Information tE_info; + int metric = Integer.parseInt(s_metric_aux); + DefaultTEMetricLinkAttribTLV defaultTeMetric= new DefaultTEMetricLinkAttribTLV(); + if(edge.getTE_info()==null){ + tE_info= new TE_Information(); + } + else{ + tE_info = edge.getTE_info(); + } + defaultTeMetric.setLinkMetric((long)metric); + tE_info.setDefaultTEMetric(defaultTeMetric); + edge.setTE_info(tE_info); + } + + NodeList unreserved_bandwidth_nl = element.getElementsByTagName("unreserved_bandwidth"); + if (unreserved_bandwidth_nl!=null){ + int num_u_b=unreserved_bandwidth_nl.getLength(); + UnreservedBandwidth unreservedBandwidth; + if (num_u_b>0){ + if(edge.getTE_info()==null){ + TE_Information tE_info= new TE_Information(); + if (commonBitmapLabelSet){ + if(lambdaEnd!=Integer.MAX_VALUE) + tE_info.createBitmapLabelSet(numLabels, grid, cs, n,lambdaIni,lambdaEnd); + else + tE_info.createBitmapLabelSet(numLabels, grid, cs, n); + } + edge.setTE_info(tE_info); + } + unreservedBandwidth =new UnreservedBandwidth(); + (edge.getTE_info()).setUnreservedBandwidth(unreservedBandwidth); + for(int k=0;k0){ + if(edge.getTE_info()==null){ + TE_Information tE_info= new TE_Information(); + + if (commonBitmapLabelSet){ + if(lambdaEnd!=Integer.MAX_VALUE){ + + tE_info.createBitmapLabelSet(numLabels, grid, cs, n,lambdaIni,lambdaEnd); + } + else + tE_info.createBitmapLabelSet(numLabels, grid, cs, n); + } + //tid.util.FuncionesUtiles.printByte(((BitmapLabelSet)tE_info.getAvailableLabels().getLabelSet()).getBytesBitmapReserved(),"getBytesBitmapReserved1:"); + edge.setTE_info(tE_info); + + } + + Element number_wlan_el = (Element) maximum_wlans_nl.item(0); + String s_number_wlans = getCharacterDataFromElement(number_wlan_el); + + int number_wlans=Integer.parseInt(s_number_wlans.replace("\n", "").replaceAll("\\s","")); + (edge.getTE_info()).setNumberWLANs(number_wlans); + (edge.getTE_info()).initWLANs(); + + } + } + + if(edge.getTE_info()==null){ + TE_Information tE_info= new TE_Information(); + edge.setTE_info(tE_info); + } + if (commonBitmapLabelSet){ + if(lambdaEnd!=Integer.MAX_VALUE) + edge.getTE_info().createBitmapLabelSet(numLabels, grid, cs, n,lambdaIni,lambdaEnd); + else + edge.getTE_info().createBitmapLabelSet(numLabels, grid, cs, n); + } + + NodeList availableLabels_node = element.getElementsByTagName("AvailableLabels"); + if ( availableLabels_node != null){ + for (int k = 0; k < availableLabels_node.getLength(); k++) { + Element availableLabels_e = (Element) availableLabels_node.item(k); + NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField"); + Element labelSetField_el = (Element) labelSetField_node.item(0); + if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet + + NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels"); + + Element numbLabels_e = (Element) numbLabels_node.item(0); + String numbLabels_s = getCharacterDataFromElement(numbLabels_e); + numLabels=Integer.parseInt(numbLabels_s); + + NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel"); + Element baseLabel_e = (Element) baseLabel_node.item(0); + + byte[] bitmap=new byte[1]; + NodeList bitmap_node = labelSetField_el.getElementsByTagName("bitmap"); + int result=0; + Element bitmap_e = (Element) bitmap_node.item(0); + if (bitmap_e!=null){ + String bitmap_string=getCharacterDataFromElement(bitmap_e); + log.debug("Bitmap read: "+bitmap_string); + for (int p =0; p "); + } + } + } + + } + log.debug("Preparing to add edge"); + try{ + if(graph.containsEdge(s_router_id_addr, d_router_id_addr)){ + graph.getEdge(s_router_id_addr, d_router_id_addr).setNumberFibers(graph.getEdge(s_router_id_addr, d_router_id_addr).getNumberFibers()+1); + }else{ + log.debug("s_router_id_addr: "+s_router_id_addr.toString()+"; d_router_id_addr: "+d_router_id_addr.toString()+"; edge: "+edge); + graph.addEdge(s_router_id_addr, d_router_id_addr, edge); + graph.getEdge(s_router_id_addr, d_router_id_addr).setNumberFibers(1); + } + log.info("Adding edge from "+s_router_id_addr.toString()+" to "+d_router_id_addr.toString()+"; \n "+edge); + + }catch(Exception e){ + log.error("Problem with source "+s_router_id_addr+" destination "+d_router_id_addr); + e.printStackTrace(); + System.exit(-1); + } + } + } + } + } + } catch (Exception e) { + e.printStackTrace(); + } + log.debug("Info graph edge :: "+graph.edgeSet()); + return graph; + } + + /*private static SimpleDirectedWeightedGraph readGraphIntraDomain(Element element1, String layer, Logger log){ + + Object router_id_addr = null; + + HashMapSIDS = new HashMap(); + HashMapSIDSDP = new HashMap(); + + SimpleDirectedWeightedGraph graph = new SimpleDirectedWeightedGraph(IntraDomainEdge.class); + //NodeList nodes_domains = doc.getElementsByTagName("domain"); + boolean readNetwork=false; + //Element element1 = (Element) nodes_domains.item(j); + String domain_id = ""; + + if (layer!=null){ + NodeList domain_layer = element1.getElementsByTagName("layer"); + if (domain_layer.getLength()==1){ + Element layer_type = (Element) domain_layer.item(0); + log.info("Layer: " + layer_type.getAttributeNode("type").getValue()); + log.info("Reading network topology"); + if (layer_type.getAttributeNode("type").getValue().equals(layer)){ + readNetwork = true; + + } + if (layer.equals("interlayer")){ + readNetwork = true; + } + } + }else { + readNetwork=true; + } + if (readNetwork){ + Element element_domain = element1; + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + for (int k = 0; k < nodes_domain_id.getLength(); k++) { + Element domain_id_e = (Element) nodes_domain_id.item(0); + domain_id = getCharacterDataFromElement(domain_id_e); + //log.info("Looking for nodes in domain: " + domain_id); + } + + NodeList nodes = element1.getElementsByTagName("node"); + for (int i = 0; i < nodes.getLength(); i++) { + Element element = (Element) nodes.item(i); + NodeList router_id_node = element.getElementsByTagName("router_id"); + Element router_id_e = (Element) router_id_node.item(0); + String router_id = getCharacterDataFromElement(router_id_e); + + //log.info("Adding router_id " + router_id); + router_id_addr = EdgeUtils.getEdge(router_id); + graph.addVertex(router_id_addr); + + //log.info("About to look for SID"); + NodeList SID_aux = element.getElementsByTagName("sid"); + Element SID_e = (Element) SID_aux.item(0); + if (SID_e!=null) + { + //log.info("SID existe"); + int SID = Integer.parseInt(getCharacterDataFromElement(SID_e)); + + try { //Router_type: DatapathID + SIDS.put((Inet4Address) router_id_addr,SID); + //log.info("SID of node Inet4Address: "+SID); + } catch (Exception e) { //Router_type: DatapathID + SIDSDP.put((DataPathID)router_id_addr, SID); + //log.info("SID of node DataPathID: "+SID); + } + } + else + { + //log.info("SID not found"); + } + + } + } + return graph; + }*/ + + public static Hashtable readMultipleDomainSimpleNetworks(String fileName, String layer,boolean allDomains,int lambdaIni, int lambdaEnd, boolean isSSONnetwork) { + Logger log = LoggerFactory.getLogger("BGP4Peer"); + Object router_id_addr = null; + Object s_router_id_addr = null; + Object d_router_id_addr = null; + Object src_Numif_id = null; + Object dst_Numif_id = null; + + + Hashtable TEDBs = new Hashtable(); + + //First, create the graph + + log.debug("1. SimpleDirectedWeightedGraph"); + + File file = new File(fileName); + try { + String domain_id = ""; + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + HashMapSIDS = new HashMap(); + HashMapSIDSDP = new HashMap(); + + NodeList nodes_domains = doc.getElementsByTagName("domain"); + if (layer!=null){ + log.debug("Reading topology, looking for layer "+ layer); + } + + + //First pass to get all the nodes + //If we need to read all the domains + for (int j = 0; j < nodes_domains.getLength(); j++) { + boolean readNetwork=false; + Element element1 = (Element) nodes_domains.item(j); + SimpleTEDB tedb = new SimpleTEDB(); + SimpleDirectedWeightedGraph graph = new SimpleDirectedWeightedGraph(IntraDomainEdge.class); + + if (layer!=null){ + NodeList domain_layer = element1.getElementsByTagName("layer"); + if (domain_layer.getLength()==1){ + Element layer_type = (Element) domain_layer.item(0); + log.debug("Layer: " + layer_type.getAttributeNode("type").getValue()); + log.debug("Reading network topology"); + if (layer_type.getAttributeNode("type").getValue().equals(layer)){ + readNetwork = true; + + } + if (layer.equals("interlayer")){ + readNetwork = true; + } + } + }else { + readNetwork=true; + } + if (readNetwork){ + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + for (int k = 0; k < nodes_domain_id.getLength(); k++) { + Element domain_id_e = (Element) nodes_domain_id.item(0); + domain_id = getCharacterDataFromElement(domain_id_e); + log.debug("Looking for nodes in domain: " + domain_id); + log.info("Loading topology from domain " + domain_id); + } + + NodeList itResourcesElement = element1.getElementsByTagName("it_resources"); + for (int i = 0; i < itResourcesElement.getLength(); i++) { + Element element = (Element) itResourcesElement.item(i); + + NodeList itResourcesControllerITList = element.getElementsByTagName("controller_it"); + Element itResourcesControllerITElement = (Element) itResourcesControllerITList.item(0); + String itResourcesControllerIT = getCharacterDataFromElement(itResourcesControllerITElement); + + NodeList itResourcesCpuList = element.getElementsByTagName("cpu"); + Element itResourcesCpuElement = (Element) itResourcesCpuList.item(0); + String itResourcesCpu = getCharacterDataFromElement(itResourcesCpuElement); + + NodeList itResourcesMemList = element.getElementsByTagName("mem"); + Element itResourcesMemElement = (Element) itResourcesMemList.item(0); + String itResourcesMem = getCharacterDataFromElement(itResourcesMemElement); + + NodeList itResourcesStorageList = element.getElementsByTagName("storage"); + Element itResourcesStorageElement = (Element) itResourcesStorageList.item(0); + String itResourcesStorage = getCharacterDataFromElement(itResourcesStorageElement); + + IT_Resources itResources = new IT_Resources(); + if (itResourcesControllerIT!=null) itResources.setControllerIT(itResourcesControllerIT); + if (itResourcesCpu!=null) itResources.setCpu(itResourcesCpu); + if (itResourcesMem!=null) itResources.setMem(itResourcesMem); + if (itResourcesStorage!=null) itResources.setStorage(itResourcesStorage); + + + tedb.setItResources(itResources); + + } + NodeList nodes = element1.getElementsByTagName("node"); + for (int i = 0; i < nodes.getLength(); i++) { + Element element = (Element) nodes.item(i); + NodeList router_id_node = element.getElementsByTagName("router_id"); + Element router_id_e = (Element) router_id_node.item(0); + String router_id = getCharacterDataFromElement(router_id_e); + + log.info("Adding node " + router_id); + router_id_addr = EdgeUtils.getEdge(router_id); + graph.addVertex(router_id_addr); + + log.debug("About to look for SID"); + NodeList SID_aux = element.getElementsByTagName("sid"); + Element SID_e = (Element) SID_aux.item(0); + if (SID_e!=null) + { + log.debug("SID exist"); + int SID = Integer.parseInt(getCharacterDataFromElement(SID_e)); + + try { //Router_type: DatapathID + SIDS.put((Inet4Address) router_id_addr,SID); + log.debug("SID of node Inet4Address: "+SID); + } catch (Exception e) { //Router_type: DatapathID + SIDSDP.put((DataPathID)router_id_addr, SID); + log.debug("SID of node DataPathID: "+SID); + } + } + else + { + log.debug("SID not found"); + } + + } + } + + tedb.setNetworkGraph(graph); + tedb.setDomainID((Inet4Address) Inet4Address.getByName(domain_id)); + TEDBs.put(domain_id,tedb); + } + + + //Next pass to get all the links + for (int j = 0; j < nodes_domains.getLength(); j++) { + SimpleDirectedWeightedGraph graph=null; + boolean readNetwork=false; + Element element1 = (Element) nodes_domains.item(j); + + if (layer!=null){ + NodeList domain_layer = element1.getElementsByTagName("layer"); + if (domain_layer.getLength()==1){ + Element layer_type = (Element) domain_layer.item(0); + log.debug("Layer: " + layer_type.getAttributeNode("type").getValue()); + log.debug("Reading Topology"); + if (layer_type.getAttributeNode("type").getValue().equals(layer)){ + readNetwork = true; + } + } + }else { + readNetwork=true; + } + log.debug("Read network = "+readNetwork); + if (readNetwork){ + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + + for (int k = 0; k < nodes_domain_id.getLength(); k++) { + Element domain_id_e = (Element) nodes_domain_id.item(0); + domain_id = getCharacterDataFromElement(domain_id_e); + log.debug("Looking for links in domain: " + domain_id); + } + //System.out.println("VVV debug domain id:"+domain_id); + SimpleTEDB domainTEDB = (SimpleTEDB)TEDBs.get( domain_id); + graph = domainTEDB.getNetworkGraph(); + + int numLabels=0; + TE_Information tE_info_common=null; + Boolean commonBitmapLabelSet = false; + NodeList edgeCommon = element1.getElementsByTagName("edgeCommon"); + int grid=0; + int cs=0; + int n=0; + for (int i = 0; i < edgeCommon.getLength(); i++) { + Element edgeCommonElement = (Element) edgeCommon.item(i); + tE_info_common =readTE_INFOfromXml(tE_info_common,edgeCommonElement, false,numLabels, grid, cs, n, 0, Integer.MAX_VALUE); + NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels"); + for (int k = 0; k < availableLabels_node.getLength(); k++) { + Element availableLabels_e = (Element) availableLabels_node.item(k); + NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField"); + Element labelSetField_el = (Element) labelSetField_node.item(0); + if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet + //Crear un BitMapSet + + NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels"); + + Element numbLabels_e = (Element) numbLabels_node.item(0); + String numbLabels_s = getCharacterDataFromElement(numbLabels_e); + numLabels=Integer.parseInt(numbLabels_s); + + NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel"); + Element baseLabel_e = (Element) baseLabel_node.item(0); + + float min_frequency; + + grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue()); + + cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue()); + boolean n_frequency_included=false; + if (baseLabel_e.getAttributeNode("n") != null ){ + n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue()); + n_frequency_included = true; + } + else if (baseLabel_e.getAttributeNode("min_frequency") != null){ + String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue(); + + min_frequency=Float.parseFloat(s_min_frequency); + n = ((int)min_frequency - 1471)/20; + n_frequency_included=true; + } + if (n_frequency_included){ + commonBitmapLabelSet = true; + }else{ + log.error("ERROR reading the xml file of the topology, you should enter "); + } + } + } + + } + /*if(isSSONnetwork ==true){ + if(cs==4){ + numLabels=numLabels*4; + } + else if (cs==5){ + numLabels=numLabels*8; + } + }*/ + + NodeList edges = element_domain.getElementsByTagName("edge"); + for (int i = 0; i < edges.getLength(); i++) { + log.debug("New Link"); + Element element = (Element) edges.item(i); + //By default, all nodes are intradomain + String type; + Attr attr_type=element.getAttributeNode("type"); + if (attr_type==null){ + type="intradomain"; + }else { + type=attr_type.getValue(); + /*if (allDomains){ + if (type.equals("interdomain")){ + type="intradomain"; + } + }*/ + //else if (type.equals("interlayer")){ + if (layer!=null && layer.equals("interlayer")){ + type="intradomain"; + } + + //} + } + log.debug("type::"+type); + if (type.equals("intradomain")) { + IntraDomainEdge edge = new IntraDomainEdge(); + NodeList source = element.getElementsByTagName("source"); + Element source_router_el = (Element) source.item(0); + + NodeList source_router_id = source_router_el.getElementsByTagName("router_id"); + Element source_router_id_el = (Element) source_router_id.item(0); + String s_r_id = getCharacterDataFromElement(source_router_id_el); + s_router_id_addr= EdgeUtils.getEdge(s_r_id); + + NodeList source_if_id_nl = source_router_el.getElementsByTagName("if_id"); + Element source_if_id_el = (Element) source_if_id_nl.item(0); + String s_source_if_id; + int src_if_id = -1; + if (source_if_id_el!=null){ + s_source_if_id = getCharacterDataFromElement(source_if_id_el); + src_if_id = Integer.parseInt(s_source_if_id); + } + log.debug("SRC if id: "+src_if_id); + + NodeList source_Numif_id_nl = source_router_el.getElementsByTagName("NumIf_id"); + Element source_Numif_id_el = (Element) source_Numif_id_nl.item(0); + String s_source_Numif_id; + if (source_Numif_id_el!=null){ + s_source_Numif_id = getCharacterDataFromElement(source_Numif_id_el); + try { // src_Numif_id type : Inet4Address + src_Numif_id = (Inet4Address) Inet4Address.getByName(s_source_Numif_id); + } catch (Exception e) { // src_Numif_id type : DataPathID + src_Numif_id = DataPathID.getByName(s_source_Numif_id); + } + } + + NodeList dest_nl = element.getElementsByTagName("destination"); + Element dest_el = (Element) dest_nl.item(0); + + NodeList dest_router_id_nl = dest_el.getElementsByTagName("router_id"); + Element dest_router_id_el = (Element) dest_router_id_nl.item(0); + String d_r_id = getCharacterDataFromElement(dest_router_id_el); + d_router_id_addr= EdgeUtils.getEdge(d_r_id); + + //Anyadimos los SID + if (SIDS.get(s_router_id_addr)!=null && SIDS.get(d_router_id_addr)!=null) + { + log.debug("setting SIDS src: "+SIDS.get(s_router_id_addr)+" dst: "+SIDS.get(d_router_id_addr)); + edge.setSrc_sid(SIDS.get(s_router_id_addr)); + edge.setDst_sid(SIDS.get(d_router_id_addr)); + log.debug("edge.getSrc_sid(): "+edge.getSrc_sid()); + log.debug("edge.getDst_sid(): "+edge.getDst_sid()); + } + else if (SIDSDP.get(s_router_id_addr)!=null && SIDSDP.get(d_router_id_addr)!=null) + { + log.debug("setting SIDSDP src: "+SIDSDP.get(s_router_id_addr)+" dst: "+SIDSDP.get(d_router_id_addr)); + edge.setSrc_sid(SIDSDP.get(s_router_id_addr)); + edge.setDst_sid(SIDSDP.get(d_router_id_addr)); + log.debug("edge.getSrc_sid(): "+edge.getSrc_sid()); + log.debug("edge.getDst_sid(): "+edge.getDst_sid()); + } + + + NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id"); + Element dest_if_id_el= (Element) dest_if_id_nl.item(0); + String s_dest_if_id; + int dst_if_id = -1; + if (dest_if_id_el!=null){ + s_dest_if_id = getCharacterDataFromElement(dest_if_id_el); + dst_if_id = Integer.parseInt(s_dest_if_id); + } + log.debug("DST if id: "+dst_if_id); + + NodeList dest_Numif_id_nl = dest_el.getElementsByTagName("NumIf_id"); + Element dest_Numif_id_el = (Element) dest_Numif_id_nl.item(0); + String s_dest_Numif_id; + + if (source_Numif_id_el!=null){ + s_dest_Numif_id = getCharacterDataFromElement(dest_Numif_id_el); + + try { // s_dest_Numif_id type : Inet4Address + dst_Numif_id = (Inet4Address) Inet4Address.getByName(s_dest_Numif_id); + } catch (Exception e) { // s_dest_Numif_id type : DataPathID + dst_Numif_id = DataPathID.getByName(s_dest_Numif_id); + } + } + // Añadimos interfaces Numeradas + if (src_Numif_id!=null){ + edge.setSrc_Numif_id(src_Numif_id); + }if (dst_Numif_id!=null){ + edge.setDst_Numif_id(dst_Numif_id); + }else{ + if (src_if_id != -1){ + edge.setSrc_if_id(src_if_id); + } + if (dst_if_id != -1){ + edge.setDst_if_id(dst_if_id); + } + } + + //DELAY, IF IT COMES.. + NodeList delay_ms_nl = element.getElementsByTagName("delay"); + if (delay_ms_nl.getLength()>0){ + + Element delay_ms_el = (Element)delay_ms_nl.item(0); + String s_delay_ms=getCharacterDataFromElement(delay_ms_el); + double delay_ms=Double.parseDouble(s_delay_ms); + edge.setDelay_ms(delay_ms); + } + + //TE Link information + edge.setTE_info(readTE_INFOfromXml(tE_info_common, element, commonBitmapLabelSet,numLabels, grid, cs, n,lambdaIni,lambdaEnd)); + + + NodeList availableLabels_node = element.getElementsByTagName("AvailableLabels"); + if ( availableLabels_node != null){ + for (int k = 0; k < availableLabels_node.getLength(); k++) { + Element availableLabels_e = (Element) availableLabels_node.item(k); + NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField"); + Element labelSetField_el = (Element) labelSetField_node.item(0); + if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet + + NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels"); + + Element numbLabels_e = (Element) numbLabels_node.item(0); + String numbLabels_s = getCharacterDataFromElement(numbLabels_e); + numLabels=Integer.parseInt(numbLabels_s); + + NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel"); + Element baseLabel_e = (Element) baseLabel_node.item(0); + + byte[] bitmap=new byte[1]; + NodeList bitmap_node = labelSetField_el.getElementsByTagName("bitmap"); + int result=0; + Element bitmap_e = (Element) bitmap_node.item(0); + if (bitmap_e!=null){ + String bitmap_string=getCharacterDataFromElement(bitmap_e); + System.out.println("Bitmap read: "+bitmap_string); + for (int p =0; p "); + } + } + } + + } + log.debug("Preparing to add edge"); + log.debug("NODES IN GRAPH:: "+graph.vertexSet()); + try{ + if(graph.containsEdge(s_router_id_addr, d_router_id_addr)){ + log.debug("New Intradomain Edge"); + graph.getEdge(s_router_id_addr, d_router_id_addr).setNumberFibers(graph.getEdge(s_router_id_addr, d_router_id_addr).getNumberFibers()+1); + log.debug("s_router_id_addr: "+s_router_id_addr.toString()+"; d_router_id_addr: "+d_router_id_addr.toString()+"; edge: "+edge); + log.info("New intradomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString());//+" \n "+edge); + + }else{ + log.debug("s_router_id_addr: "+s_router_id_addr.toString()+"; d_router_id_addr: "+d_router_id_addr.toString()+"; edge: "+edge); + if(graph.containsVertex(d_router_id_addr)==false){ + //interDomain edge + //TODO + type="interdomain"; + + }else{ + graph.addEdge(s_router_id_addr, d_router_id_addr, edge); + graph.getEdge(s_router_id_addr, d_router_id_addr).setNumberFibers(1); + log.debug("New Intradomain Edge"); + log.info("New intradomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString());//+" \n "+edge); + + } + } + }catch(Exception e){ + log.error("Problem with source "+s_router_id_addr+" destination "+d_router_id_addr); + e.printStackTrace(); + System.exit(-1); + } + } + if(type.equals("interdomain")){ + log.debug("New Interdomain Edge"); + InterDomainEdge edge = new InterDomainEdge(); + TE_Information tE_info=readTE_INFOfromXml(tE_info_common,element, false,numLabels, grid, cs, n, 0, Integer.MAX_VALUE); + edge.setTE_info(tE_info); + NodeList source = element.getElementsByTagName("source"); + Element source_router_el = (Element) source.item(0); + NodeList source_router_id = source_router_el + .getElementsByTagName("router_id"); + Element source_router_id_el = (Element) source_router_id + .item(0); + String s_r_id = getCharacterDataFromElement(source_router_id_el); + log.debug("Edge Source router_id: " + s_r_id); + + try { // s_router_id_addr type: Inet4Address + s_router_id_addr = (Inet4Address) Inet4Address.getByName(s_r_id); + } catch (Exception e) {// s_router_id_addr type: DataPathID + s_router_id_addr = DataPathID.getByName(s_r_id); + } + Inet4Address source_domain_id = (Inet4Address) Inet4Address.getByName(domain_id); + log.debug("Edge Source domain_id: " + source_domain_id); + + NodeList source_if_id_nl = source_router_el + .getElementsByTagName("if_id"); + Element source_if_id_el = (Element) source_if_id_nl.item(0); + String s_source_if_id = getCharacterDataFromElement(source_if_id_el); + log.debug("Edge Source if_id: " + s_source_if_id); + int src_if_id = Integer.parseInt(s_source_if_id); + + NodeList dest_nl = element.getElementsByTagName("destination"); + Element dest_el = (Element) dest_nl.item(0); + NodeList dest_router_id_nl = dest_el + .getElementsByTagName("router_id"); + Element dest_router_id_el = (Element) dest_router_id_nl.item(0); + String d_r_id = getCharacterDataFromElement(dest_router_id_el); + log.debug("Edge Destination router_id: " + d_r_id); + try { // d_router_id_addr type: Inet4Address + d_router_id_addr = (Inet4Address) Inet4Address.getByName(d_r_id); + } catch (Exception e) { // d_router_id_addr type: DataPathID + d_router_id_addr = DataPathID.getByName(d_r_id); + } + //Inet4Address dest_domain_id = router_id_domain_ed.get(d_router_id_addr); + log.debug("Destination domain_id: "); + + NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id"); + Element dest_if_id_el = (Element) dest_if_id_nl.item(0); + String s_dest_if_id = getCharacterDataFromElement(dest_if_id_el); + log.debug("Edge Dest if_id: " + s_dest_if_id); + int dst_if_id = Integer.parseInt(s_dest_if_id); + + //router_id_domain_ed + //edge.setDomain_src_router(source_domain_id); + + edge.setSrc_if_id(src_if_id); + edge.setDst_if_id(dst_if_id); + edge.setDomain_src_router(source_domain_id); + //edge.setDomain_dst_router(dest_domain_id); + + edge.setSrc_router_id(s_router_id_addr); + edge.setDst_router_id(d_router_id_addr); + if(domainTEDB.getInterDomainLinks()==null){ + LinkedList interDomainLinks= new LinkedList(); + interDomainLinks.add(edge); + domainTEDB.setInterDomainLinks(interDomainLinks); + log.info("New interdomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString());//+"; \n "+edge); + + }else{ + domainTEDB.getInterDomainLinks().add(edge); + log.info("New interdomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString());//+"; \n "+edge); + + } + + } + } + + } + log.debug("Info graph edge :: "+graph.edgeSet()); + + } + } catch (Exception e) { + e.printStackTrace(); + } + + return TEDBs; + } + + public static Hashtable readMultipleDomainSimpleNetworks(String fileName, String layer,boolean allDomains,int lambdaIni, int lambdaEnd, boolean isSSONnetwork, String learntFrom) { + Logger log = LoggerFactory.getLogger("BGP4Peer"); + Object router_id_addr = null; + Object s_router_id_addr = null; + Object d_router_id_addr = null; + Object src_Numif_id = null; + Object dst_Numif_id = null; + + + Hashtable TEDBs = new Hashtable(); + + //First, create the graph + + log.debug("1. SimpleDirectedWeightedGraph"); + + File file = new File(fileName); + try { + String domain_id = ""; + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + HashMapSIDS = new HashMap(); + HashMapSIDSDP = new HashMap(); + + NodeList nodes_domains = doc.getElementsByTagName("domain"); + if (layer!=null){ + log.debug("Reading topology, looking for layer "+ layer); + } + + + //First pass to get all the nodes + //If we need to read all the domains + for (int j = 0; j < nodes_domains.getLength(); j++) { + boolean readNetwork=false; + Element element1 = (Element) nodes_domains.item(j); + SimpleTEDB tedb = new SimpleTEDB(); + SimpleDirectedWeightedGraph graph = new SimpleDirectedWeightedGraph(IntraDomainEdge.class); + + if (layer!=null){ + NodeList domain_layer = element1.getElementsByTagName("layer"); + if (domain_layer.getLength()==1){ + Element layer_type = (Element) domain_layer.item(0); + log.debug("Layer: " + layer_type.getAttributeNode("type").getValue()); + log.debug("Reading network topology"); + if (layer_type.getAttributeNode("type").getValue().equals(layer)){ + readNetwork = true; + + } + if (layer.equals("interlayer")){ + readNetwork = true; + } + } + }else { + readNetwork=true; + } + if (readNetwork){ + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + for (int k = 0; k < nodes_domain_id.getLength(); k++) { + Element domain_id_e = (Element) nodes_domain_id.item(0); + domain_id = getCharacterDataFromElement(domain_id_e); + log.debug("Looking for nodes in domain: " + domain_id); + log.info("Loading topology from domain " + domain_id); + } + + NodeList itResourcesElement = element1.getElementsByTagName("it_resources"); + for (int i = 0; i < itResourcesElement.getLength(); i++) { + Element element = (Element) itResourcesElement.item(i); + + NodeList itResourcesControllerITList = element.getElementsByTagName("controller_it"); + Element itResourcesControllerITElement = (Element) itResourcesControllerITList.item(0); + String itResourcesControllerIT = getCharacterDataFromElement(itResourcesControllerITElement); + + NodeList itResourcesCpuList = element.getElementsByTagName("cpu"); + Element itResourcesCpuElement = (Element) itResourcesCpuList.item(0); + String itResourcesCpu = getCharacterDataFromElement(itResourcesCpuElement); + + NodeList itResourcesMemList = element.getElementsByTagName("mem"); + Element itResourcesMemElement = (Element) itResourcesMemList.item(0); + String itResourcesMem = getCharacterDataFromElement(itResourcesMemElement); + + NodeList itResourcesStorageList = element.getElementsByTagName("storage"); + Element itResourcesStorageElement = (Element) itResourcesStorageList.item(0); + String itResourcesStorage = getCharacterDataFromElement(itResourcesStorageElement); + + IT_Resources itResources = new IT_Resources(); + if (itResourcesControllerIT!=null){ + itResources.setControllerIT(itResourcesControllerIT); + itResources.setLearntFrom(learntFrom); + } + if (itResourcesCpu!=null) itResources.setCpu(itResourcesCpu); + if (itResourcesMem!=null) itResources.setMem(itResourcesMem); + if (itResourcesStorage!=null) { + itResources.setStorage(itResourcesStorage); + log.info("set learn from for it resources "+ itResources.toString()); + } + + tedb.setItResources(itResources); + + } + NodeList nodes = element1.getElementsByTagName("node"); + for (int i = 0; i < nodes.getLength(); i++) { + Element element = (Element) nodes.item(i); + NodeList router_id_node = element.getElementsByTagName("router_id"); + Element router_id_e = (Element) router_id_node.item(0); + String router_id = getCharacterDataFromElement(router_id_e); + + log.info("Adding node " + router_id); + router_id_addr = EdgeUtils.getEdge(router_id); + graph.addVertex(router_id_addr); + + log.debug("About to look for SID"); + NodeList SID_aux = element.getElementsByTagName("sid"); + Element SID_e = (Element) SID_aux.item(0); + if (SID_e!=null) + { + log.debug("SID exist"); + int SID = Integer.parseInt(getCharacterDataFromElement(SID_e)); + + try { //Router_type: DatapathID + SIDS.put((Inet4Address) router_id_addr,SID); + log.debug("SID of node Inet4Address: "+SID); + } catch (Exception e) { //Router_type: DatapathID + SIDSDP.put((DataPathID)router_id_addr, SID); + log.debug("SID of node DataPathID: "+SID); + } + } + else + { + log.debug("SID not found"); + } + + } + } + + tedb.setNetworkGraph(graph); + tedb.setDomainID((Inet4Address) Inet4Address.getByName(domain_id)); + TEDBs.put(domain_id,tedb); + } + + + //Next pass to get all the links + for (int j = 0; j < nodes_domains.getLength(); j++) { + SimpleDirectedWeightedGraph graph=null; + boolean readNetwork=false; + Element element1 = (Element) nodes_domains.item(j); + + if (layer!=null){ + NodeList domain_layer = element1.getElementsByTagName("layer"); + if (domain_layer.getLength()==1){ + Element layer_type = (Element) domain_layer.item(0); + log.debug("Layer: " + layer_type.getAttributeNode("type").getValue()); + log.debug("Reading Topology"); + if (layer_type.getAttributeNode("type").getValue().equals(layer)){ + readNetwork = true; + } + } + }else { + readNetwork=true; + } + log.debug("Read network = "+readNetwork); + if (readNetwork){ + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + + for (int k = 0; k < nodes_domain_id.getLength(); k++) { + Element domain_id_e = (Element) nodes_domain_id.item(0); + domain_id = getCharacterDataFromElement(domain_id_e); + log.debug("Looking for links in domain: " + domain_id); + } + //System.out.println("VVV debug domain id:"+domain_id); + SimpleTEDB domainTEDB = (SimpleTEDB)TEDBs.get( domain_id); + graph = domainTEDB.getNetworkGraph(); + + int numLabels=0; + TE_Information tE_info_common=null; + Boolean commonBitmapLabelSet = false; + NodeList edgeCommon = element1.getElementsByTagName("edgeCommon"); + int grid=0; + int cs=0; + int n=0; + for (int i = 0; i < edgeCommon.getLength(); i++) { + Element edgeCommonElement = (Element) edgeCommon.item(i); + tE_info_common =readTE_INFOfromXml(tE_info_common,edgeCommonElement, false,numLabels, grid, cs, n, 0, Integer.MAX_VALUE); + NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels"); + for (int k = 0; k < availableLabels_node.getLength(); k++) { + Element availableLabels_e = (Element) availableLabels_node.item(k); + NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField"); + Element labelSetField_el = (Element) labelSetField_node.item(0); + if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet + //Crear un BitMapSet + + NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels"); + + Element numbLabels_e = (Element) numbLabels_node.item(0); + String numbLabels_s = getCharacterDataFromElement(numbLabels_e); + numLabels=Integer.parseInt(numbLabels_s); + + NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel"); + Element baseLabel_e = (Element) baseLabel_node.item(0); + + float min_frequency; + + grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue()); + + cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue()); + boolean n_frequency_included=false; + if (baseLabel_e.getAttributeNode("n") != null ){ + n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue()); + n_frequency_included = true; + } + else if (baseLabel_e.getAttributeNode("min_frequency") != null){ + String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue(); + + min_frequency=Float.parseFloat(s_min_frequency); + n = ((int)min_frequency - 1471)/20; + n_frequency_included=true; + } + if (n_frequency_included){ + commonBitmapLabelSet = true; + }else{ + log.error("ERROR reading the xml file of the topology, you should enter "); + } + } + } + + } + /*if(isSSONnetwork ==true){ + if(cs==4){ + numLabels=numLabels*4; + } + else if (cs==5){ + numLabels=numLabels*8; + } + }*/ + + NodeList edges = element_domain.getElementsByTagName("edge"); + for (int i = 0; i < edges.getLength(); i++) { + log.debug("New Link"); + Element element = (Element) edges.item(i); + //By default, all nodes are intradomain + String type; + Attr attr_type=element.getAttributeNode("type"); + if (attr_type==null){ + type="intradomain"; + }else { + type=attr_type.getValue(); + /*if (allDomains){ + if (type.equals("interdomain")){ + type="intradomain"; + } + }*/ + //else if (type.equals("interlayer")){ + if (layer!=null && layer.equals("interlayer")){ + type="intradomain"; + } + + //} + } + log.debug("type::"+type); + if (type.equals("intradomain")) { + IntraDomainEdge edge = new IntraDomainEdge(); + NodeList source = element.getElementsByTagName("source"); + Element source_router_el = (Element) source.item(0); + edge.setLearntFrom(learntFrom); + NodeList source_router_id = source_router_el.getElementsByTagName("router_id"); + Element source_router_id_el = (Element) source_router_id.item(0); + String s_r_id = getCharacterDataFromElement(source_router_id_el); + s_router_id_addr= EdgeUtils.getEdge(s_r_id); + + NodeList source_if_id_nl = source_router_el.getElementsByTagName("if_id"); + Element source_if_id_el = (Element) source_if_id_nl.item(0); + String s_source_if_id; + int src_if_id = -1; + if (source_if_id_el!=null){ + s_source_if_id = getCharacterDataFromElement(source_if_id_el); + src_if_id = Integer.parseInt(s_source_if_id); + } + log.debug("SRC if id: "+src_if_id); + + NodeList source_Numif_id_nl = source_router_el.getElementsByTagName("NumIf_id"); + Element source_Numif_id_el = (Element) source_Numif_id_nl.item(0); + String s_source_Numif_id; + if (source_Numif_id_el!=null){ + s_source_Numif_id = getCharacterDataFromElement(source_Numif_id_el); + try { // src_Numif_id type : Inet4Address + src_Numif_id = (Inet4Address) Inet4Address.getByName(s_source_Numif_id); + } catch (Exception e) { // src_Numif_id type : DataPathID + src_Numif_id = DataPathID.getByName(s_source_Numif_id); + } + } + + NodeList dest_nl = element.getElementsByTagName("destination"); + Element dest_el = (Element) dest_nl.item(0); + + NodeList dest_router_id_nl = dest_el.getElementsByTagName("router_id"); + Element dest_router_id_el = (Element) dest_router_id_nl.item(0); + String d_r_id = getCharacterDataFromElement(dest_router_id_el); + d_router_id_addr= EdgeUtils.getEdge(d_r_id); + + //Anyadimos los SID + if (SIDS.get(s_router_id_addr)!=null && SIDS.get(d_router_id_addr)!=null) + { + log.debug("setting SIDS src: "+SIDS.get(s_router_id_addr)+" dst: "+SIDS.get(d_router_id_addr)); + edge.setSrc_sid(SIDS.get(s_router_id_addr)); + edge.setDst_sid(SIDS.get(d_router_id_addr)); + log.debug("edge.getSrc_sid(): "+edge.getSrc_sid()); + log.debug("edge.getDst_sid(): "+edge.getDst_sid()); + } + else if (SIDSDP.get(s_router_id_addr)!=null && SIDSDP.get(d_router_id_addr)!=null) + { + log.debug("setting SIDSDP src: "+SIDSDP.get(s_router_id_addr)+" dst: "+SIDSDP.get(d_router_id_addr)); + edge.setSrc_sid(SIDSDP.get(s_router_id_addr)); + edge.setDst_sid(SIDSDP.get(d_router_id_addr)); + log.debug("edge.getSrc_sid(): "+edge.getSrc_sid()); + log.debug("edge.getDst_sid(): "+edge.getDst_sid()); + } + + + NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id"); + Element dest_if_id_el= (Element) dest_if_id_nl.item(0); + String s_dest_if_id; + int dst_if_id = -1; + if (dest_if_id_el!=null){ + s_dest_if_id = getCharacterDataFromElement(dest_if_id_el); + dst_if_id = Integer.parseInt(s_dest_if_id); + } + log.debug("DST if id: "+dst_if_id); + + NodeList dest_Numif_id_nl = dest_el.getElementsByTagName("NumIf_id"); + Element dest_Numif_id_el = (Element) dest_Numif_id_nl.item(0); + String s_dest_Numif_id; + + if (source_Numif_id_el!=null){ + s_dest_Numif_id = getCharacterDataFromElement(dest_Numif_id_el); + + try { // s_dest_Numif_id type : Inet4Address + dst_Numif_id = (Inet4Address) Inet4Address.getByName(s_dest_Numif_id); + } catch (Exception e) { // s_dest_Numif_id type : DataPathID + dst_Numif_id = DataPathID.getByName(s_dest_Numif_id); + } + } + // Añadimos interfaces Numeradas + if (src_Numif_id!=null){ + edge.setSrc_Numif_id(src_Numif_id); + }if (dst_Numif_id!=null){ + edge.setDst_Numif_id(dst_Numif_id); + }else{ + if (src_if_id != -1){ + edge.setSrc_if_id(src_if_id); + } + if (dst_if_id != -1){ + edge.setDst_if_id(dst_if_id); + } + } + + //DELAY, IF IT COMES.. + NodeList delay_ms_nl = element.getElementsByTagName("delay"); + if (delay_ms_nl.getLength()>0){ + + Element delay_ms_el = (Element)delay_ms_nl.item(0); + String s_delay_ms=getCharacterDataFromElement(delay_ms_el); + double delay_ms=Double.parseDouble(s_delay_ms); + edge.setDelay_ms(delay_ms); + } + + //TE Link information + edge.setTE_info(readTE_INFOfromXml(tE_info_common, element, commonBitmapLabelSet,numLabels, grid, cs, n,lambdaIni,lambdaEnd)); + + + NodeList availableLabels_node = element.getElementsByTagName("AvailableLabels"); + if ( availableLabels_node != null){ + for (int k = 0; k < availableLabels_node.getLength(); k++) { + Element availableLabels_e = (Element) availableLabels_node.item(k); + NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField"); + Element labelSetField_el = (Element) labelSetField_node.item(0); + if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet + + NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels"); + + Element numbLabels_e = (Element) numbLabels_node.item(0); + String numbLabels_s = getCharacterDataFromElement(numbLabels_e); + numLabels=Integer.parseInt(numbLabels_s); + + NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel"); + Element baseLabel_e = (Element) baseLabel_node.item(0); + + byte[] bitmap=new byte[1]; + NodeList bitmap_node = labelSetField_el.getElementsByTagName("bitmap"); + int result=0; + Element bitmap_e = (Element) bitmap_node.item(0); + if (bitmap_e!=null){ + String bitmap_string=getCharacterDataFromElement(bitmap_e); + System.out.println("Bitmap read: "+bitmap_string); + for (int p =0; p "); + } + } + } + + } + log.debug("Preparing to add edge"); + log.debug("NODES IN GRAPH:: "+graph.vertexSet()); + try{ + if(graph.containsEdge(s_router_id_addr, d_router_id_addr)){ + log.debug("New Intradomain Edge"); + graph.getEdge(s_router_id_addr, d_router_id_addr).setNumberFibers(graph.getEdge(s_router_id_addr, d_router_id_addr).getNumberFibers()+1); + log.debug("s_router_id_addr: "+s_router_id_addr.toString()+"; d_router_id_addr: "+d_router_id_addr.toString()+"; edge: "+edge); + log.info("New intradomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString());//+" \n "+edge); + + }else{ + log.debug("s_router_id_addr: "+s_router_id_addr.toString()+"; d_router_id_addr: "+d_router_id_addr.toString()+"; edge: "+edge); + if(graph.containsVertex(d_router_id_addr)==false){ + //interDomain edge + //TODO + type="interdomain"; + + }else{ + graph.addEdge(s_router_id_addr, d_router_id_addr, edge); + graph.getEdge(s_router_id_addr, d_router_id_addr).setNumberFibers(1); + log.debug("New Intradomain Edge"); + log.info("New intradomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString()+" learnt "+edge.getLearntFrom());//+" \n "+edge); + + } + } + }catch(Exception e){ + log.error("Problem with source "+s_router_id_addr+" destination "+d_router_id_addr); + e.printStackTrace(); + System.exit(-1); + } + } + if(type.equals("interdomain")){ + log.debug("New Interdomain Edge"); + InterDomainEdge edge = new InterDomainEdge(); + TE_Information tE_info=readTE_INFOfromXml(tE_info_common,element, false,numLabels, grid, cs, n, 0, Integer.MAX_VALUE); + edge.setTE_info(tE_info); + edge.setLearntFrom(learntFrom); + NodeList source = element.getElementsByTagName("source"); + Element source_router_el = (Element) source.item(0); + NodeList source_router_id = source_router_el + .getElementsByTagName("router_id"); + Element source_router_id_el = (Element) source_router_id + .item(0); + String s_r_id = getCharacterDataFromElement(source_router_id_el); + log.debug("Edge Source router_id: " + s_r_id); + + try { // s_router_id_addr type: Inet4Address + s_router_id_addr = (Inet4Address) Inet4Address.getByName(s_r_id); + } catch (Exception e) {// s_router_id_addr type: DataPathID + s_router_id_addr = DataPathID.getByName(s_r_id); + } + Inet4Address source_domain_id = (Inet4Address) Inet4Address.getByName(domain_id); + log.debug("Edge Source domain_id: " + source_domain_id); + + NodeList source_if_id_nl = source_router_el + .getElementsByTagName("if_id"); + Element source_if_id_el = (Element) source_if_id_nl.item(0); + String s_source_if_id = getCharacterDataFromElement(source_if_id_el); + log.debug("Edge Source if_id: " + s_source_if_id); + int src_if_id = Integer.parseInt(s_source_if_id); + + NodeList dest_nl = element.getElementsByTagName("destination"); + Element dest_el = (Element) dest_nl.item(0); + NodeList dest_router_id_nl = dest_el + .getElementsByTagName("router_id"); + Element dest_router_id_el = (Element) dest_router_id_nl.item(0); + String d_r_id = getCharacterDataFromElement(dest_router_id_el); + log.debug("Edge Destination router_id: " + d_r_id); + try { // d_router_id_addr type: Inet4Address + d_router_id_addr = (Inet4Address) Inet4Address.getByName(d_r_id); + } catch (Exception e) { // d_router_id_addr type: DataPathID + d_router_id_addr = DataPathID.getByName(d_r_id); + } + //Inet4Address dest_domain_id = router_id_domain_ed.get(d_router_id_addr); + log.debug("Destination domain_id: "); + + NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id"); + Element dest_if_id_el = (Element) dest_if_id_nl.item(0); + String s_dest_if_id = getCharacterDataFromElement(dest_if_id_el); + log.debug("Edge Dest if_id: " + s_dest_if_id); + int dst_if_id = Integer.parseInt(s_dest_if_id); + + //router_id_domain_ed + //edge.setDomain_src_router(source_domain_id); + + edge.setSrc_if_id(src_if_id); + edge.setDst_if_id(dst_if_id); + edge.setDomain_src_router(source_domain_id); + //edge.setDomain_dst_router(dest_domain_id); + + edge.setSrc_router_id(s_router_id_addr); + edge.setDst_router_id(d_router_id_addr); + if(domainTEDB.getInterDomainLinks()==null){ + LinkedList interDomainLinks= new LinkedList(); + interDomainLinks.add(edge); + domainTEDB.setInterDomainLinks(interDomainLinks); + log.info("New interdomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString()+" learnt "+edge.getLearntFrom());//+"; \n "+edge); + + }else{ + domainTEDB.getInterDomainLinks().add(edge); + log.info("New interdomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString()+" learnt "+edge.getLearntFrom());//+"; \n "+edge); + + } + + } + } + + } + log.debug("Info graph edge :: "+graph.edgeSet()); + + } + } catch (Exception e) { + e.printStackTrace(); + } + + return TEDBs; + } + + + private static TE_Information readTE_INFOfromXml(TE_Information tE_info_common,Element element, Boolean commonBitmapLabelSet, int numLabels, int grid, int cs, int n, int lambdaIni, int lambdaEnd) { + + TE_Information tE_info= new TE_Information(); + if (commonBitmapLabelSet){ + if(lambdaEnd!=Integer.MAX_VALUE) + tE_info.createBitmapLabelSet(numLabels, grid, cs, n,lambdaIni,lambdaEnd); + else + tE_info.createBitmapLabelSet(numLabels, grid, cs, n); + } + + NodeList maximum_bandwidth_nl = element.getElementsByTagName("maximum_bandwidth"); + if (maximum_bandwidth_nl!=null){ + if (maximum_bandwidth_nl.getLength()>0){ + Element maximum_bandwidth_el = (Element) maximum_bandwidth_nl.item(0); + String s_maximum_bandwidth = getCharacterDataFromElement(maximum_bandwidth_el); + + float maximum_bandwidth=Float.parseFloat(s_maximum_bandwidth); + MaximumBandwidth maximumBandwidth =new MaximumBandwidth(); + maximumBandwidth.setMaximumBandwidth(maximum_bandwidth); + tE_info.setMaximumBandwidth(maximumBandwidth); + + } + }else if(tE_info_common!=null && tE_info_common.getMaximumBandwidth()!=null){ + MaximumBandwidth maximumBandwidth =new MaximumBandwidth(); + maximumBandwidth.setMaximumBandwidth(tE_info_common.getMaximumBandwidth().getMaximumBandwidth()); + tE_info.setMaximumBandwidth(maximumBandwidth); + } + /** + * NodeList SID_aux = element.getElementsByTagName("sid"); + Element SID_e = (Element) SID_aux.item(0); + if (SID_e!=null) + { + log.info("SID existe"); + int SID = Integer.parseInt(getCharacterDataFromElement(SID_e)); + SIDS.put(router_id_addr,SID); + log.info("SID of node: "+SID); + } + else + { + log.info("SID not found"); + } + */ + + NodeList defaultmetric = element.getElementsByTagName("default_te_metric"); + Element metric_aux = (Element) defaultmetric.item(0); + + if (metric_aux != null){ + String s_metric_aux = getCharacterDataFromElement(metric_aux); + int metric = Integer.parseInt(s_metric_aux); + DefaultTEMetricLinkAttribTLV defaultTeMetric= new DefaultTEMetricLinkAttribTLV(); + defaultTeMetric.setLinkMetric((long)metric); + tE_info.setDefaultTEMetric(defaultTeMetric); + }else if(tE_info_common!=null && tE_info_common.getDefaultTEMetric()!=null){ + DefaultTEMetricLinkAttribTLV defaultTeMetric= new DefaultTEMetricLinkAttribTLV(); + defaultTeMetric.setLinkMetric(tE_info_common.getDefaultTEMetric().getLinkMetric()); + tE_info.setDefaultTEMetric(defaultTeMetric); + } + + NodeList unreserved_bandwidth_nl = element.getElementsByTagName("unreserved_bandwidth"); + if (unreserved_bandwidth_nl!=null){ + int num_u_b=unreserved_bandwidth_nl.getLength(); + UnreservedBandwidth unreservedBandwidth; + if (num_u_b>0){ + unreservedBandwidth =new UnreservedBandwidth(); + tE_info.setUnreservedBandwidth(unreservedBandwidth); + for(int k=0;k0){ + Element number_wlan_el = (Element) maximum_wlans_nl.item(0); + String s_number_wlans = getCharacterDataFromElement(number_wlan_el); + + int number_wlans=Integer.parseInt(s_number_wlans.replace("\n", "").replaceAll("\\s","")); + tE_info.setNumberWLANs(number_wlans); + tE_info.initWLANs(); + } + } + + NodeList undirDelayLinks = element.getElementsByTagName("undir_delay_link"); + Element undirDelayLink = (Element) undirDelayLinks.item(0); + + if (undirDelayLink != null){ + String s_undirDelayLink = getCharacterDataFromElement(undirDelayLink); + int undirDelayLinkValue = Integer.parseInt(s_undirDelayLink); + UndirectionalLinkDelayDescriptorSubTLV uldSTLV = new UndirectionalLinkDelayDescriptorSubTLV(); + uldSTLV.setDelay(undirDelayLinkValue); + tE_info.setUndirLinkDelay(uldSTLV); + }else if(tE_info_common!=null && tE_info_common.getUndirLinkDelay()!=null){ + UndirectionalLinkDelayDescriptorSubTLV uldSTLV = new UndirectionalLinkDelayDescriptorSubTLV(); + uldSTLV.setDelay(tE_info_common.getUndirLinkDelay().getDelay()); + tE_info.setUndirLinkDelay(uldSTLV); + } + + NodeList undirDelayVars = element.getElementsByTagName("undir_delay_variation"); + Element undirDelayVar = (Element) undirDelayVars.item(0); + if (undirDelayVar != null){ + String s_undirDelayVar = getCharacterDataFromElement(undirDelayVar); + int undirDelayVarValue = Integer.parseInt(s_undirDelayVar); + UndirectionalDelayVariationDescriptorSubTLV udvSTLV = new UndirectionalDelayVariationDescriptorSubTLV(); + udvSTLV.setDelayVar(undirDelayVarValue); + tE_info.setUndirDelayVar(udvSTLV); + }else if(tE_info_common!=null && tE_info_common.getUndirDelayVar()!=null){ + UndirectionalDelayVariationDescriptorSubTLV uldSTLV = new UndirectionalDelayVariationDescriptorSubTLV(); + uldSTLV.setDelayVar(tE_info_common.getUndirDelayVar().getDelayVar()); + tE_info.setUndirDelayVar(uldSTLV); + } + + NodeList undirLinkLosss = element.getElementsByTagName("undir_link_loss"); + Element undirLinkLoss = (Element) undirLinkLosss.item(0); + if (undirLinkLoss != null){ + String s_undirLinkLoss = getCharacterDataFromElement(undirLinkLoss); + int undirLinkLossValue = Integer.parseInt(s_undirLinkLoss); + UndirectionalLinkLossDescriptorSubTLV uSTLV = new UndirectionalLinkLossDescriptorSubTLV(); + uSTLV.setLinkLoss(undirLinkLossValue); + tE_info.setUndirLinkLoss(uSTLV); + }else if(tE_info_common!=null && tE_info_common.getUndirLinkLoss()!=null){ + UndirectionalLinkLossDescriptorSubTLV uldSTLV = new UndirectionalLinkLossDescriptorSubTLV(); + uldSTLV.setLinkLoss(tE_info_common.getUndirLinkLoss().getLinkLoss()); + tE_info.setUndirLinkLoss(uldSTLV); + } + + NodeList undirReBws = element.getElementsByTagName("undir_residual_bandwidth"); + Element undirReBw = (Element) undirReBws.item(0); + if (undirReBw != null){ + String s_undirReBw = getCharacterDataFromElement(undirReBw); + int undirReBwValue = Integer.parseInt(s_undirReBw); + UndirectionalResidualBandwidthDescriptorSubTLV uSTLV = new UndirectionalResidualBandwidthDescriptorSubTLV(); + uSTLV.setResidualBw(undirReBwValue); + tE_info.setUndirResidualBw(uSTLV); + }else if(tE_info_common!=null && tE_info_common.getUndirResidualBw()!=null){ + UndirectionalResidualBandwidthDescriptorSubTLV uldSTLV = new UndirectionalResidualBandwidthDescriptorSubTLV(); + uldSTLV.setResidualBw( tE_info_common.getUndirResidualBw().getResidualBw()); + tE_info.setUndirResidualBw(uldSTLV); + } + + NodeList undirAvalBws = element.getElementsByTagName("undir_available_bandwidth"); + Element undirAvalBw = (Element) undirAvalBws.item(0); + if (undirAvalBw != null){ + String s_undirAvalBw = getCharacterDataFromElement(undirAvalBw); + int undirAvalBwValue = Integer.parseInt(s_undirAvalBw); + UndirectionalAvailableBandwidthDescriptorSubTLV uSTLV = new UndirectionalAvailableBandwidthDescriptorSubTLV(); + uSTLV.setAvailableBw(undirAvalBwValue); + tE_info.setUndirAvailableBw(uSTLV); + }else if(tE_info_common!=null && tE_info_common.getUndirAvailableBw()!=null){ + UndirectionalAvailableBandwidthDescriptorSubTLV uldSTLV = new UndirectionalAvailableBandwidthDescriptorSubTLV(); + uldSTLV.setAvailableBw( tE_info_common.getUndirAvailableBw().getAvailableBw()); + tE_info.setUndirAvailableBw(uldSTLV); + } + + NodeList undirUtilBws = element.getElementsByTagName("undir_utilized_bandwidth"); + Element undirUtilBw = (Element) undirUtilBws.item(0); + if (undirUtilBw != null){ + String s_undirUtilBw = getCharacterDataFromElement(undirUtilBw); + int undirUtilBwValue = Integer.parseInt(s_undirUtilBw); + UndirectionalUtilizedBandwidthDescriptorSubTLV uSTLV = new UndirectionalUtilizedBandwidthDescriptorSubTLV(); + uSTLV.setUtilizedBw(undirUtilBwValue); + tE_info.setUndirUtilizedBw(uSTLV); + }else if(tE_info_common!=null && tE_info_common.getUndirUtilizedBw()!=null){ + UndirectionalUtilizedBandwidthDescriptorSubTLV uldSTLV = new UndirectionalUtilizedBandwidthDescriptorSubTLV(); + uldSTLV.setUtilizedBw( tE_info_common.getUndirUtilizedBw().getUtilizedBw()); + tE_info.setUndirUtilizedBw(uldSTLV); + } + + NodeList minMaxDelays = element.getElementsByTagName("undir_min_max_delay"); + Element minMaxDelay = (Element) minMaxDelays.item(0); + if (minMaxDelay != null){ + NodeList minDelays = minMaxDelay.getElementsByTagName("min"); + Element minDelay = (Element) minDelays.item(0); + NodeList maxDelays = minMaxDelay.getElementsByTagName("max"); + Element maxDelay = (Element) maxDelays.item(0); + if(minDelay !=null && maxDelay!=null){ + String s_minDelay = getCharacterDataFromElement(minDelay); + String s_maxDelay = getCharacterDataFromElement(maxDelay); + int minDelayValue = Integer.parseInt(s_minDelay); + int maxDelayValue = Integer.parseInt(s_maxDelay); + MinMaxUndirectionalLinkDelayDescriptorSubTLV ummSTLV = new MinMaxUndirectionalLinkDelayDescriptorSubTLV(); + ummSTLV.setHighDelay(maxDelayValue); + ummSTLV.setLowDelay(minDelayValue); + tE_info.setMinMaxUndirLinkDelay(ummSTLV); + } + }else if(tE_info_common!=null && tE_info_common.getMinMaxUndirLinkDelay()!=null){ + MinMaxUndirectionalLinkDelayDescriptorSubTLV uldSTLV = new MinMaxUndirectionalLinkDelayDescriptorSubTLV(); + uldSTLV.setHighDelay( tE_info_common.getMinMaxUndirLinkDelay().getHighDelay()); + uldSTLV.setLowDelay( tE_info_common.getMinMaxUndirLinkDelay().getLowDelay()); + tE_info.setMinMaxUndirLinkDelay(uldSTLV); + } + + return tE_info; + + } + + public static SimpleDirectedWeightedGraph readITNetwork(String fileName){ + Logger log=LoggerFactory.getLogger("BGP4Peer"); + SimpleDirectedWeightedGraph graph =new SimpleDirectedWeightedGraph(IntraDomainEdge.class); + Object router_id_addr = null; + Object it_site_id_addr = null; + Object resource_addr = null; + Object s_id_addr = null; + Object d_id_addr = null; + Object s_router_id_addr = null; + Object d_router_id_addr = null; + Object s_it_site_id_addr = null; + Object d_it_site_id_addr = null; + Object s_resource_id_addr = null; + Object d_resource_id_addr = null; + + log.debug("2. SimpleDirectedWeightedGraph"); + + File file = new File(fileName); + try { + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + NodeList nodes_domains = doc.getElementsByTagName("domain"); + HashMapSIDS = new HashMap(); + HashMapSIDSDP = new HashMap(); + + for (int j = 0; j < nodes_domains.getLength(); j++) { + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + for (int k = 0; k < nodes_domain_id.getLength(); k++) { + Element domain_id_e = (Element) nodes_domain_id.item(0); + String domain_id=getCharacterDataFromElement(domain_id_e); + log.debug("Network domain: "+domain_id); + } + + NodeList nodes = doc.getElementsByTagName("node"); + for (int i = 0; i < nodes.getLength(); i++) { + Element element = (Element) nodes.item(i); + NodeList router_id_node = element.getElementsByTagName("router_id"); + Element router_id_e = (Element) router_id_node.item(0); + String router_id=getCharacterDataFromElement(router_id_e); + log.debug("El router_id es "+router_id); + + try { // router_id_addr type: Inet4Address + router_id_addr = (Inet4Address) Inet4Address.getByName(router_id); + } catch (Exception e) { // router_id_addr type: DataPathID + router_id_addr = DataPathID.getByName(router_id); + } + + graph.addVertex(router_id_addr); + + Element SID_e = (Element) element.getElementsByTagName("sid"); + if (SID_e!=null) + { int SID = Integer.parseInt(getCharacterDataFromElement(SID_e)); + + try { // router_id_addr type: Inet4Address + SIDS.put((Inet4Address)router_id_addr,SID); + } catch (Exception e) { // router_id_addr type: DataPathID + SIDSDP.put((DataPathID)router_id_addr,SID); + } + } + } + + NodeList it_sites = doc.getElementsByTagName("it_site"); + for (int i = 0; i < it_sites.getLength(); i++) { + Element element = (Element) it_sites.item(i); + NodeList it_site_id_node = element.getElementsByTagName("it_site_id"); + Element it_site_id_e = (Element) it_site_id_node.item(0); + String it_site_id=getCharacterDataFromElement(it_site_id_e); + log.debug("El IT_site_id es "+it_site_id); + + try { // it_site_id_addr type: Inet4Address + it_site_id_addr = (Inet4Address) Inet4Address.getByName(it_site_id); + } catch (Exception e) { // it_site_id_addr type: DataPathID + it_site_id_addr = DataPathID.getByName(it_site_id); + } + graph.addVertex(it_site_id_addr); + } + + NodeList storages = doc.getElementsByTagName("storage"); + for (int i = 0; i < storages.getLength(); i++) { + Element element = (Element) storages.item(i); + NodeList resource_id_node = element.getElementsByTagName("resource_id"); + Element resource_id_e = (Element) resource_id_node.item(0); + String resource_id=getCharacterDataFromElement(resource_id_e); + log.debug("El resource_id es "+resource_id); + + try { + resource_addr = (Inet4Address) Inet4Address.getByName(resource_id); + } catch (Exception e) { + resource_addr = DataPathID.getByName(resource_id); + } + graph.addVertex(resource_addr); + } + + NodeList edges = doc.getElementsByTagName("edge"); + for (int i = 0; i < edges.getLength(); i++) { + + Element element = (Element) edges.item(i); + + // We only want those routers which have type="intradomain" //MARTA + if (element.getAttributeNode("type").getValue().equals("intradomain")) {//MARTA + //IntraDomainEdge edge = new IntraDomainEdge(); + + IntraDomainEdge edge = new IntraDomainEdge(); + + NodeList source = element.getElementsByTagName("source"); + Element source_router_el = (Element)source.item(0); + NodeList source_router_id= source_router_el.getElementsByTagName("router_id"); + if (source_router_id.getLength()>0){ + Element source_router_id_el=(Element)source_router_id.item(0); + String s_r_id=getCharacterDataFromElement(source_router_id_el); + + try { // s_router_id_addr type: Inet4Address + s_router_id_addr = (Inet4Address) Inet4Address.getByName(s_r_id); + } catch (Exception e) { // s_router_id_addr type: DataPathID + s_router_id_addr = DataPathID.getByName(s_r_id); + } + + s_id_addr=s_router_id_addr; + } + + NodeList source_it_site_id= source_router_el.getElementsByTagName("it_site_id"); + if (source_it_site_id.getLength()>0){ + Element source_it_site_id_el=(Element)source_it_site_id.item(0); + String s_itsite_id=getCharacterDataFromElement(source_it_site_id_el); + log.debug("Edge Source IT_site_id: "+s_itsite_id); + + try { // s_it_site_id_addr type: Inet4Address + s_it_site_id_addr = (Inet4Address) Inet4Address.getByName(s_itsite_id); + } catch (Exception e) { // s_it_site_id_addr type: DataPathID + s_it_site_id_addr = DataPathID.getByName(s_itsite_id); + } + s_id_addr=s_it_site_id_addr; + } + + NodeList source_resource_id= source_router_el.getElementsByTagName("resource_id"); + if (source_resource_id.getLength()>0){ + Element source_resource_id_el=(Element)source_resource_id.item(0); + String s_resource_id=getCharacterDataFromElement(source_resource_id_el); + log.debug("Edge Source resource_id: "+s_resource_id); + + try {// s_resource_id_addr type: Inet4Address + s_resource_id_addr = (Inet4Address) Inet4Address.getByName(s_resource_id); + } catch (Exception e) { // s_resource_id_addr type: DataPathID + s_resource_id_addr = DataPathID.getByName(s_resource_id); + } + s_id_addr=s_resource_id_addr; + } + + NodeList source_if_id_nl= source_router_el.getElementsByTagName("if_id"); + Element source_if_id_el=(Element)source_if_id_nl.item(0); + String s_source_if_id=getCharacterDataFromElement(source_if_id_el); + log.debug("Edge Source if_id: "+s_source_if_id); + int src_if_id=Integer.parseInt(s_source_if_id); + + + + NodeList dest_nl = element.getElementsByTagName("destination"); + Element dest_el = (Element)dest_nl.item(0); + NodeList dest_router_id_nl= dest_el.getElementsByTagName("router_id"); + if (dest_router_id_nl.getLength()>0){ + Element dest_router_id_el=(Element)dest_router_id_nl.item(0); + String d_r_id=getCharacterDataFromElement(dest_router_id_el); + log.debug("Edge Destination router_id: "+d_r_id); + + try { // d_router_id_addr type: Inet4Address + d_router_id_addr = (Inet4Address) Inet4Address.getByName(d_r_id); + } catch (Exception e) { // d_router_id_addr type: DataPathID + d_router_id_addr = DataPathID.getByName(d_r_id); + + } + d_id_addr=d_router_id_addr; + } + + + NodeList dest_it_site_id_nl= dest_el.getElementsByTagName("it_site_id"); + if (dest_it_site_id_nl.getLength()>0){ + Element dest_it_site_id_el=(Element)dest_it_site_id_nl.item(0); + String d_it_site_id=getCharacterDataFromElement(dest_it_site_id_el); + log.debug("Edge Destination IT_site_id: "+d_it_site_id); + + try { // d_it_site_id_addr type: Inet4Address + d_it_site_id_addr = (Inet4Address) Inet4Address.getByName(d_it_site_id); + } catch (Exception e) { // d_it_site_id_addr type: DataPathID + d_it_site_id_addr = DataPathID.getByName(d_it_site_id); + } + d_id_addr=d_it_site_id_addr; + } + + NodeList dest_resource_id_nl= dest_el.getElementsByTagName("resource_id"); + if (dest_resource_id_nl.getLength()>0){ + Element dest_resource_id_el=(Element)dest_resource_id_nl.item(0); + String d_resource_id=getCharacterDataFromElement(dest_resource_id_el); + log.debug("Edge Destination resource_id: "+d_resource_id); + try { // d_resource_id_addr type: Inet4Address + d_resource_id_addr = (Inet4Address) Inet4Address.getByName(d_resource_id); + } catch (Exception e) { // d_resource_id_addr type: DataPathID + d_resource_id_addr = DataPathID.getByName(d_resource_id); + + } + d_id_addr=d_resource_id_addr; + } + + NodeList dest_if_id_nl= dest_el.getElementsByTagName("if_id"); + Element dest_if_id_el=(Element)dest_if_id_nl.item(0); + String s_dest_if_id=getCharacterDataFromElement(dest_if_id_el); + log.debug("Edge Dest if_id: "+s_dest_if_id); + int dst_if_id=Integer.parseInt(s_dest_if_id); + + + edge.setSrc_if_id(src_if_id); + edge.setDst_if_id(dst_if_id); + + + //TODO: Tal vez pete aqui + //Anyadimos los SID + if (SIDS.get(s_id_addr)!=null && SIDS.get(d_id_addr)!=null) + { + edge.setSrc_sid(SIDS.get(s_id_addr)); + edge.setSrc_sid(SIDS.get(d_id_addr)); + } + + graph.addEdge(s_id_addr, d_id_addr,edge); + }//MARTA + } + } + } + catch (Exception e) { + e.printStackTrace(); + } + + return graph; + } + + + public static Inet4Address readNetworkDomain(String fileName) { + Logger log = LoggerFactory.getLogger("BGP4Peer"); + File file = new File(fileName); + try { + DocumentBuilder builder = DocumentBuilderFactory.newInstance() + .newDocumentBuilder(); + Document doc = builder.parse(file); + + NodeList nodes_domains = doc.getElementsByTagName("domain"); + Element element_domain = (Element) nodes_domains.item(0); + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + Element domain_id_e = (Element) nodes_domain_id.item(0); + String domain_id = getCharacterDataFromElement(domain_id_e); + log.info("Network domain: " + domain_id); + Inet4Address domId = (Inet4Address) Inet4Address + .getByName(domain_id); + return domId; + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + public static String getCharacterDataFromElement(Element e) { + Node child = e.getFirstChild(); + if (child instanceof CharacterData) { + CharacterData cd = (CharacterData) child; + return cd.getData(); + } else { + return "?"; + } + } + + /** + * Reads the inter-domain Topology from a topology XML file. + * Needs update to work with datapath IDs. + * @param fileName Name of the XML + * @return Graph of the network. + */ + public static DirectedWeightedMultigraph readMDNetwork( + String fileName) { + Logger log = LoggerFactory.getLogger("BGP4Peer"); + DirectedWeightedMultigraph graph = new DirectedWeightedMultigraph( + InterDomainEdge.class); + Hashtable router_id_domain_ed = new Hashtable(); + Hashtable router_id_domain_ed_dp = new Hashtable(); + + HashMapSIDS = new HashMap(); + HashMapSIDSDP = new HashMap(); + + Object router_id_addr = null; + Object s_router_id_addr = null; + Object d_router_id_addr = null; + + File file = new File(fileName); + try { + DocumentBuilder builder = DocumentBuilderFactory.newInstance() + .newDocumentBuilder(); + Document doc = builder.parse(file); + + NodeList nodes_domains = doc.getElementsByTagName("domain"); + // First pass to read all the nodes and domains + log.info("Multidomain Graph"); + for (int j = 0; j < nodes_domains.getLength(); j++) { + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain + .getElementsByTagName("domain_id"); + Element domain_id_e = (Element) nodes_domain_id.item(0); + String domain_id_str = getCharacterDataFromElement(domain_id_e); + Inet4Address domain_id = (Inet4Address) Inet4Address + .getByName(domain_id_str); + + log.info("Adding Domain: " + domain_id); + graph.addVertex(domain_id); + NodeList nodes = element_domain.getElementsByTagName("node"); + for (int i = 0; i < nodes.getLength(); i++) { + Element element = (Element) nodes.item(i); + NodeList router_id_node = element + .getElementsByTagName("router_id"); + Element router_id_e = (Element) router_id_node.item(0); + String router_id = getCharacterDataFromElement(router_id_e); + log.debug("Router_id: " + router_id); + try { // router_id_addr type: Inet4Address + router_id_addr = (Inet4Address) Inet4Address.getByName(router_id); + } catch (Exception e) { // router_id_addr type: DataPathID + router_id_addr = DataPathID.getByName(router_id); + } + router_id_domain_ed.put(router_id_addr, domain_id); + NodeList nl_sid=element.getElementsByTagName("sid"); + + Element SID_e = (Element) nl_sid.item(0); + if (SID_e!=null) + { int SID = Integer.parseInt(getCharacterDataFromElement(SID_e)); + try { + SIDS.put((Inet4Address)router_id_addr,SID); + } catch (Exception e) { + SIDSDP.put((DataPathID)router_id_addr,SID); + } + } + } + + } + log.debug("Domain_ids read"); + + int numLabels=0; + + Boolean commonBitmapLabelSet = false; + NodeList edgeCommon = doc.getElementsByTagName("edgeCommon"); + int grid=0; + int cs=0; + int n=0; + for (int i = 0; i < edgeCommon.getLength(); i++) { + + Element edgeCommonElement = (Element) edgeCommon.item(i); + NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels"); + for (int k = 0; k < availableLabels_node.getLength(); k++) { + + Element availableLabels_e = (Element) availableLabels_node.item(k); + NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField"); + Element labelSetField_el = (Element) labelSetField_node.item(0); + if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet + //Crear un BitMapSet + + NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels"); + + Element numbLabels_e = (Element) numbLabels_node.item(0); + String numbLabels_s = getCharacterDataFromElement(numbLabels_e); + numLabels=Integer.parseInt(numbLabels_s); + + NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel"); + Element baseLabel_e = (Element) baseLabel_node.item(0); + + float min_frequency; + + grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue()); + + cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue()); + boolean n_frequency_included=false; + if (baseLabel_e.getAttributeNode("n") != null ){ + n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue()); + n_frequency_included = true; + } + else if (baseLabel_e.getAttributeNode("min_frequency") != null){ + String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue(); + + min_frequency=Float.parseFloat(s_min_frequency); + n = ((int)min_frequency - 1471)/20; + n_frequency_included=true; + } + if (n_frequency_included){ + commonBitmapLabelSet = true; + }else{ + log.error("ERROR reading the xml file of the topology, you should enter "); + } + + } + } + + } + NodeList edges = doc.getElementsByTagName("edge"); + boolean a =true; + for (int i = 0; i < edges.getLength(); i++) { + log.debug("Looking at edge"); + + Element element = (Element) edges.item(i); + InterDomainEdge edge = new InterDomainEdge(); + TE_Information tE_info=readTE_INFOfromXml(null, element, false,numLabels, grid, cs, n, 0, Integer.MAX_VALUE); + edge.setTE_info(tE_info); + NodeList source = element.getElementsByTagName("source"); + Element source_router_el = (Element) source.item(0); + NodeList source_router_id = source_router_el + .getElementsByTagName("router_id"); + Element source_router_id_el = (Element) source_router_id + .item(0); + String s_r_id = getCharacterDataFromElement(source_router_id_el); + log.debug("Edge Source router_id: " + s_r_id); + + try { // s_router_id_addr type: Inet4Address + s_router_id_addr = (Inet4Address) Inet4Address.getByName(s_r_id); + } catch (Exception e) {// s_router_id_addr type: DataPathID + s_router_id_addr = DataPathID.getByName(s_r_id); + } + Inet4Address source_domain_id = router_id_domain_ed.get(s_router_id_addr); + log.debug("Edge Source domain_id: " + source_domain_id); + + NodeList source_if_id_nl = source_router_el + .getElementsByTagName("if_id"); + Element source_if_id_el = (Element) source_if_id_nl.item(0); + String s_source_if_id = getCharacterDataFromElement(source_if_id_el); + log.debug("Edge Source if_id: " + s_source_if_id); + int src_if_id = Integer.parseInt(s_source_if_id); + + NodeList dest_nl = element.getElementsByTagName("destination"); + Element dest_el = (Element) dest_nl.item(0); + NodeList dest_router_id_nl = dest_el + .getElementsByTagName("router_id"); + Element dest_router_id_el = (Element) dest_router_id_nl.item(0); + String d_r_id = getCharacterDataFromElement(dest_router_id_el); + log.debug("Edge Destination router_id: " + d_r_id); + try { // d_router_id_addr type: Inet4Address + d_router_id_addr = (Inet4Address) Inet4Address.getByName(d_r_id); + } catch (Exception e) { // d_router_id_addr type: DataPathID + d_router_id_addr = DataPathID.getByName(d_r_id); + } + Inet4Address dest_domain_id = router_id_domain_ed.get(d_router_id_addr); + log.debug("Destination domain_id: " + dest_domain_id); + + NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id"); + Element dest_if_id_el = (Element) dest_if_id_nl.item(0); + String s_dest_if_id = getCharacterDataFromElement(dest_if_id_el); + log.debug("Edge Dest if_id: " + s_dest_if_id); + int dst_if_id = Integer.parseInt(s_dest_if_id); + + //router_id_domain_ed + //edge.setDomain_src_router(source_domain_id); + + edge.setSrc_if_id(src_if_id); + edge.setDst_if_id(dst_if_id); + edge.setDomain_src_router(source_domain_id); + edge.setDomain_dst_router(dest_domain_id); + + edge.setSrc_router_id(s_router_id_addr); + edge.setDst_router_id(d_router_id_addr); + if (!source_domain_id.equals(dest_domain_id)) { + log.info("Adding interdomain link "+source_domain_id.toString()+"-->"+dest_domain_id.toString());//edge.toString()); + //Only add if the source and destination domains are different + graph.addEdge(source_domain_id, dest_domain_id, edge); + } + + } + + + } catch (Exception e) { + e.printStackTrace(); + } + + return graph; + + } + + public static DirectedWeightedMultigraph readMDNetwork( + String fileName, String LearntFrom) { + Logger log = LoggerFactory.getLogger("BGP4Peer"); + DirectedWeightedMultigraph graph = new DirectedWeightedMultigraph( + InterDomainEdge.class); + Hashtable router_id_domain_ed = new Hashtable(); + Hashtable router_id_domain_ed_dp = new Hashtable(); + + HashMapSIDS = new HashMap(); + HashMapSIDSDP = new HashMap(); + + Object router_id_addr = null; + Object s_router_id_addr = null; + Object d_router_id_addr = null; + + File file = new File(fileName); + try { + DocumentBuilder builder = DocumentBuilderFactory.newInstance() + .newDocumentBuilder(); + Document doc = builder.parse(file); + + NodeList nodes_domains = doc.getElementsByTagName("domain"); + // First pass to read all the nodes and domains + log.info("Multidomain Graph"); + for (int j = 0; j < nodes_domains.getLength(); j++) { + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain + .getElementsByTagName("domain_id"); + Element domain_id_e = (Element) nodes_domain_id.item(0); + String domain_id_str = getCharacterDataFromElement(domain_id_e); + Inet4Address domain_id = (Inet4Address) Inet4Address + .getByName(domain_id_str); + + log.info("Adding Domain: " + domain_id); + graph.addVertex(domain_id); + NodeList nodes = element_domain.getElementsByTagName("node"); + for (int i = 0; i < nodes.getLength(); i++) { + Element element = (Element) nodes.item(i); + NodeList router_id_node = element + .getElementsByTagName("router_id"); + Element router_id_e = (Element) router_id_node.item(0); + String router_id = getCharacterDataFromElement(router_id_e); + log.debug("Router_id: " + router_id); + try { // router_id_addr type: Inet4Address + router_id_addr = (Inet4Address) Inet4Address.getByName(router_id); + } catch (Exception e) { // router_id_addr type: DataPathID + router_id_addr = DataPathID.getByName(router_id); + } + router_id_domain_ed.put(router_id_addr, domain_id); + NodeList nl_sid=element.getElementsByTagName("sid"); + + Element SID_e = (Element) nl_sid.item(0); + if (SID_e!=null) + { int SID = Integer.parseInt(getCharacterDataFromElement(SID_e)); + try { + SIDS.put((Inet4Address)router_id_addr,SID); + } catch (Exception e) { + SIDSDP.put((DataPathID)router_id_addr,SID); + } + } + } + + } + log.debug("Domain_ids read"); + + int numLabels=0; + + Boolean commonBitmapLabelSet = false; + NodeList edgeCommon = doc.getElementsByTagName("edgeCommon"); + int grid=0; + int cs=0; + int n=0; + for (int i = 0; i < edgeCommon.getLength(); i++) { + + Element edgeCommonElement = (Element) edgeCommon.item(i); + NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels"); + for (int k = 0; k < availableLabels_node.getLength(); k++) { + + Element availableLabels_e = (Element) availableLabels_node.item(k); + NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField"); + Element labelSetField_el = (Element) labelSetField_node.item(0); + if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet + //Crear un BitMapSet + + NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels"); + + Element numbLabels_e = (Element) numbLabels_node.item(0); + String numbLabels_s = getCharacterDataFromElement(numbLabels_e); + numLabels=Integer.parseInt(numbLabels_s); + + NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel"); + Element baseLabel_e = (Element) baseLabel_node.item(0); + + float min_frequency; + + grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue()); + + cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue()); + boolean n_frequency_included=false; + if (baseLabel_e.getAttributeNode("n") != null ){ + n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue()); + n_frequency_included = true; + } + else if (baseLabel_e.getAttributeNode("min_frequency") != null){ + String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue(); + + min_frequency=Float.parseFloat(s_min_frequency); + n = ((int)min_frequency - 1471)/20; + n_frequency_included=true; + } + if (n_frequency_included){ + commonBitmapLabelSet = true; + }else{ + log.error("ERROR reading the xml file of the topology, you should enter "); + } + + } + } + + } + NodeList edges = doc.getElementsByTagName("edge"); + boolean a =true; + for (int i = 0; i < edges.getLength(); i++) { + log.debug("Looking at edge"); + + Element element = (Element) edges.item(i); + InterDomainEdge edge = new InterDomainEdge(); + TE_Information tE_info=readTE_INFOfromXml(null, element, false,numLabels, grid, cs, n, 0, Integer.MAX_VALUE); + edge.setTE_info(tE_info); + edge.setLearntFrom(LearntFrom); + NodeList source = element.getElementsByTagName("source"); + Element source_router_el = (Element) source.item(0); + NodeList source_router_id = source_router_el + .getElementsByTagName("router_id"); + Element source_router_id_el = (Element) source_router_id + .item(0); + String s_r_id = getCharacterDataFromElement(source_router_id_el); + log.debug("Edge Source router_id: " + s_r_id); + + try { // s_router_id_addr type: Inet4Address + s_router_id_addr = (Inet4Address) Inet4Address.getByName(s_r_id); + } catch (Exception e) {// s_router_id_addr type: DataPathID + s_router_id_addr = DataPathID.getByName(s_r_id); + } + Inet4Address source_domain_id = router_id_domain_ed.get(s_router_id_addr); + log.debug("Edge Source domain_id: " + source_domain_id); + + NodeList source_if_id_nl = source_router_el + .getElementsByTagName("if_id"); + Element source_if_id_el = (Element) source_if_id_nl.item(0); + String s_source_if_id = getCharacterDataFromElement(source_if_id_el); + log.debug("Edge Source if_id: " + s_source_if_id); + int src_if_id = Integer.parseInt(s_source_if_id); + + NodeList dest_nl = element.getElementsByTagName("destination"); + Element dest_el = (Element) dest_nl.item(0); + NodeList dest_router_id_nl = dest_el + .getElementsByTagName("router_id"); + Element dest_router_id_el = (Element) dest_router_id_nl.item(0); + String d_r_id = getCharacterDataFromElement(dest_router_id_el); + log.debug("Edge Destination router_id: " + d_r_id); + try { // d_router_id_addr type: Inet4Address + d_router_id_addr = (Inet4Address) Inet4Address.getByName(d_r_id); + } catch (Exception e) { // d_router_id_addr type: DataPathID + d_router_id_addr = DataPathID.getByName(d_r_id); + } + Inet4Address dest_domain_id = router_id_domain_ed.get(d_router_id_addr); + log.debug("Destination domain_id: " + dest_domain_id); + + NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id"); + Element dest_if_id_el = (Element) dest_if_id_nl.item(0); + String s_dest_if_id = getCharacterDataFromElement(dest_if_id_el); + log.debug("Edge Dest if_id: " + s_dest_if_id); + int dst_if_id = Integer.parseInt(s_dest_if_id); + + //router_id_domain_ed + //edge.setDomain_src_router(source_domain_id); + + edge.setSrc_if_id(src_if_id); + edge.setDst_if_id(dst_if_id); + edge.setDomain_src_router(source_domain_id); + edge.setDomain_dst_router(dest_domain_id); + + edge.setSrc_router_id(s_router_id_addr); + edge.setDst_router_id(d_router_id_addr); + if (!source_domain_id.equals(dest_domain_id)) { + log.info("Adding interdomain link "+source_domain_id.toString()+"-->"+dest_domain_id.toString()+" learnt "+edge.getLearntFrom());//edge.toString()); + //Only add if the source and destination domains are different + graph.addEdge(source_domain_id, dest_domain_id, edge); + } + + } + + + } catch (Exception e) { + e.printStackTrace(); + } + + return graph; + + } + + + public static void initializeReachabilityFromFile(String fileName, + ReachabilityManager rm) { + Logger log = LoggerFactory.getLogger("BGP4Peer"); + log.debug("Initializing reachability from " + fileName); + File file = new File(fileName); + try { + DocumentBuilder builder = DocumentBuilderFactory.newInstance() + .newDocumentBuilder(); + Document doc = builder.parse(file); + + NodeList nodes_domains = doc.getElementsByTagName("domain"); + for (int j = 0; j < nodes_domains.getLength(); j++) { + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain + .getElementsByTagName("domain_id"); + Element domain_id_e = (Element) nodes_domain_id.item(0); + String domain_id_str = getCharacterDataFromElement(domain_id_e); + Inet4Address domain_id = (Inet4Address) Inet4Address + .getByName(domain_id_str); + + log.debug("Network domain es: " + domain_id); + + NodeList nodes = element_domain + .getElementsByTagName("reachability_entry"); + log.debug("HAY : " + nodes.getLength()); + + for (int i = 0; i < nodes.getLength(); i++) { + Element element = (Element) nodes.item(i); + NodeList ipv4_address_node = element + .getElementsByTagName("ipv4_address"); + Element ipv4_address_el = (Element) ipv4_address_node + .item(0); + String ipv4_address_str = getCharacterDataFromElement(ipv4_address_el); + log.debug("ipv4_address: " + ipv4_address_str); + Inet4Address ipv4_address = (Inet4Address) Inet4Address + .getByName(ipv4_address_str); + IPv4prefixEROSubobject eroso = new IPv4prefixEROSubobject(); + eroso.setIpv4address(ipv4_address); + NodeList prefix_node = element + .getElementsByTagName("prefix"); + Element prefix_el = (Element) prefix_node.item(0); + String prefix_str = getCharacterDataFromElement(prefix_el); + int prefix = Integer.parseInt(prefix_str); + eroso.setPrefix(prefix); + rm.addEROSubobject(domain_id, eroso); + + } + + } + + } catch (Exception e) { + e.printStackTrace(); + } + } + + // IT update del GEYSERS + + public static DirectedWeightedMultigraph readITMDNetwork(String fileName){ + Logger log=LoggerFactory.getLogger("BGP4Peer"); + DirectedWeightedMultigraphgraph =new DirectedWeightedMultigraph(InterDomainEdge.class); + Hashtable router_id_domain_ed=new Hashtable (); + Hashtable it_site_id_domain_ed2=new Hashtable (); + Hashtable resource_id_domain_ed=new Hashtable (); + + File file = new File(fileName); + try { + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + + NodeList nodes_domains = doc.getElementsByTagName("domain"); + + for (int j = 0; j < nodes_domains.getLength(); j++) { + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + Element domain_id_e = (Element) nodes_domain_id.item(0); + String domain_id_str=getCharacterDataFromElement(domain_id_e); + Inet4Address domain_id= (Inet4Address) Inet4Address.getByName(domain_id_str); + + log.info("Network domain: "+domain_id); + graph.addVertex(domain_id); + NodeList nodes = element_domain.getElementsByTagName("node"); + for (int i = 0; i < nodes.getLength(); i++) { + Element element = (Element) nodes.item(i); + NodeList router_id_node = element.getElementsByTagName("router_id"); + Element router_id_e = (Element) router_id_node.item(0); + String router_id=getCharacterDataFromElement(router_id_e); + log.debug("El router_id es "+router_id); + Inet4Address router_id_addr= (Inet4Address) Inet4Address.getByName(router_id); + + NodeList domain_id_node = element.getElementsByTagName("domain_id"); + router_id_domain_ed.put(router_id_addr, domain_id); + //graph.addVertex(router_id_addr); + + } + + NodeList ITsites = element_domain.getElementsByTagName("it_site"); + for (int i = 0; i < ITsites.getLength(); i++) { + Element element = (Element) ITsites.item(i); + NodeList it_site_id_node = element.getElementsByTagName("it_site_id"); + Element it_site_id_e = (Element) it_site_id_node.item(0); + String it_site_id=getCharacterDataFromElement(it_site_id_e); + log.info("El it_site_id es "+it_site_id); + Inet4Address it_site_id_addr= (Inet4Address) Inet4Address.getByName(it_site_id); + + NodeList domain_id_node = element.getElementsByTagName("domain_id"); + it_site_id_domain_ed2.put(it_site_id_addr, domain_id); + //graph.addVertex(router_id_addr); + + } + + NodeList storages = element_domain.getElementsByTagName("storage"); + for (int i = 0; i < storages.getLength(); i++) { + Element element = (Element) storages.item(i); + NodeList resource_id_node = element.getElementsByTagName("resource_id"); + Element resource_id_e = (Element) resource_id_node.item(0); + String resource_id=getCharacterDataFromElement(resource_id_e); + log.info("El resource_id es "+resource_id); + Inet4Address resource_id_addr= (Inet4Address) Inet4Address.getByName(resource_id); + + NodeList domain_id_node = element.getElementsByTagName("domain_id"); + resource_id_domain_ed.put(resource_id_addr, domain_id); + //graph.addVertex(router_id_addr); + + } + + + } + + + + NodeList edges = doc.getElementsByTagName("edge"); + for (int i = 0; i < edges.getLength(); i++) { + log.info("New interdomain edge"); + Inet4Address s_router_id_addr= null; + Inet4Address d_router_id_addr= null; + Inet4Address s_itsite_id_addr= null; + Inet4Address d_itsite_id_addr= null; + Inet4Address s_resource_id_addr= null; + Inet4Address d_resource_id_addr= null; + Inet4Address source_domain_id=null; + Inet4Address dest_domain_id=null; + + + Element element = (Element) edges.item(i); + InterDomainEdge edge =new InterDomainEdge(); + + NodeList source = element.getElementsByTagName("source"); + Element source_router_el = (Element)source.item(0); + NodeList source_router_id= source_router_el.getElementsByTagName("router_id"); + if (source_router_id.getLength()>0){ + Element source_router_id_el=(Element)source_router_id.item(0); + String s_r_id=getCharacterDataFromElement(source_router_id_el); + log.info("Edge Source router_id: "+s_r_id); + s_router_id_addr= (Inet4Address) Inet4Address.getByName(s_r_id); + source_domain_id= (Inet4Address)router_id_domain_ed.get(s_router_id_addr); + log.info("Edge Source domain_id: "+source_domain_id); + } + + NodeList source_it_site_id= source_router_el.getElementsByTagName("it_site_id"); + if (source_it_site_id.getLength()>0){ + Element source_it_site_id_el=(Element)source_it_site_id.item(0); + String s_itsite_id=getCharacterDataFromElement(source_it_site_id_el); + log.info("Edge Source it_site_id: "+s_itsite_id); + s_itsite_id_addr= (Inet4Address) Inet4Address.getByName(s_itsite_id); + source_domain_id= (Inet4Address)it_site_id_domain_ed2.get(s_itsite_id_addr); + log.info("Edge Source ITsite domain_id: "+source_domain_id); + } + + NodeList source_resource_id= source_router_el.getElementsByTagName("resource_id"); + if (source_resource_id.getLength()>0){ + Element source_resource_id_el=(Element)source_resource_id.item(0); + String s_resource_id=getCharacterDataFromElement(source_resource_id_el); + log.info("Edge Source resource_id: "+s_resource_id); + s_resource_id_addr= (Inet4Address) Inet4Address.getByName(s_resource_id); + source_domain_id= (Inet4Address)resource_id_domain_ed.get(s_resource_id_addr); + log.info("Edge Source ITsite domain_id: "+source_domain_id); + } + + NodeList source_if_id_nl= source_router_el.getElementsByTagName("if_id"); + Element source_if_id_el=(Element)source_if_id_nl.item(0); + String s_source_if_id=getCharacterDataFromElement(source_if_id_el); + log.info("Edge Source if_id: "+s_source_if_id); + int src_if_id=Integer.parseInt(s_source_if_id); + + NodeList dest_nl = element.getElementsByTagName("destination"); + Element dest_el = (Element)dest_nl.item(0); + NodeList dest_router_id_nl= dest_el.getElementsByTagName("router_id"); + if (dest_router_id_nl.getLength()>0){ + Element dest_router_id_el=(Element)dest_router_id_nl.item(0); + String d_r_id=getCharacterDataFromElement(dest_router_id_el); + log.info("Edge Destination router_id: "+d_r_id); + d_router_id_addr= (Inet4Address) Inet4Address.getByName(d_r_id); + dest_domain_id= (Inet4Address)router_id_domain_ed.get(d_router_id_addr); + log.info("Destination domain_id: "+dest_domain_id); + } + + NodeList dest_it_site_id_nl= dest_el.getElementsByTagName("it_site_id"); + if (dest_it_site_id_nl.getLength()>0){ + Element dest_it_site_id_el=(Element)dest_it_site_id_nl.item(0); + String d_itsite_id=getCharacterDataFromElement(dest_it_site_id_el); + log.info("Edge Destination it_site_id: "+d_itsite_id); + d_itsite_id_addr= (Inet4Address) Inet4Address.getByName(d_itsite_id); + dest_domain_id= (Inet4Address)it_site_id_domain_ed2.get(d_itsite_id_addr); + log.info("Destination ITsite domain_id: "+dest_domain_id); + } + + NodeList dest_resource_id_nl= dest_el.getElementsByTagName("resource_id"); + if (dest_resource_id_nl.getLength()>0){ + Element dest_resource_id_el=(Element)dest_resource_id_nl.item(0); + String d_resource_id=getCharacterDataFromElement(dest_resource_id_el); + log.info("Edge Destination resource_id: "+d_resource_id); + d_resource_id_addr= (Inet4Address) Inet4Address.getByName(d_resource_id); + dest_domain_id= (Inet4Address)resource_id_domain_ed.get(d_resource_id_addr); + log.info("Destination ITsite domain_id: "+dest_domain_id); + } + + NodeList dest_if_id_nl= dest_el.getElementsByTagName("if_id"); + Element dest_if_id_el=(Element)dest_if_id_nl.item(0); + String s_dest_if_id=getCharacterDataFromElement(dest_if_id_el); + log.info("Edge Dest if_id: "+s_dest_if_id); + int dst_if_id=Integer.parseInt(s_dest_if_id); + + edge.setSrc_if_id(src_if_id); + edge.setDst_if_id(dst_if_id); + + if (source_router_id.getLength()>0){ + edge.setSrc_router_id(s_router_id_addr); + }else if(source_it_site_id.getLength()>0){ + edge.setSrc_router_id(s_itsite_id_addr); + }else if(source_resource_id.getLength()>0){ + edge.setSrc_router_id(s_resource_id_addr); + } + + if (dest_router_id_nl.getLength()>0){ + edge.setDst_router_id(d_router_id_addr); + }else if(dest_it_site_id_nl.getLength()>0){ + edge.setDst_router_id(d_itsite_id_addr); + }else if(dest_resource_id_nl.getLength()>0){ + edge.setDst_router_id(d_resource_id_addr); + } + graph.addEdge(source_domain_id, dest_domain_id,edge); + } + } + catch (Exception e) { + e.printStackTrace(); + } + + return graph; + + } + + + public static WSONInformation getWSONInformation(String fileName){ + return FileTEDBUpdater.getWSONInformation(fileName,null); + } + + public static WSONInformation getWSONInformation(String fileName, String layer){ + Logger log = LoggerFactory.getLogger("BGP4Peer"); + File file = new File(fileName); + AvailableLabels commonAvailableLabels = null; + WSONInformation WSONinfo = null; + int numLabels = 0; + int grid=0; + int cs=0; + int n=0; + log.debug("FileName:::"+fileName); + try { + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + // NodeList nodes_domains = doc.getElementsByTagName("domain"); + // for (int j = 0; j < nodes_domains.getLength(); j++) { + // Element element_domain = (Element) nodes_domains.item(j); + + NodeList edgeCommon = doc.getElementsByTagName("edgeCommon"); + + for (int i = 0; i < edgeCommon.getLength(); i++) { + + Element edgeCommonElement = (Element) edgeCommon.item(i); + NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels"); + for (int k = 0; k < availableLabels_node.getLength(); k++) { + commonAvailableLabels = new AvailableLabels(); + Element availableLabels_e = (Element) availableLabels_node.item(k); + NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField"); + Element labelSetField_el = (Element) labelSetField_node.item(0); + if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet + //Crear un BitMapSet + + NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels"); + + Element numbLabels_e = (Element) numbLabels_node.item(0); + String numbLabels_s = getCharacterDataFromElement(numbLabels_e); + numLabels=Integer.parseInt(numbLabels_s); + + NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel"); + Element baseLabel_e = (Element) baseLabel_node.item(0); + + float min_frequency; + + grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue()); + + cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue()); + boolean n_frequency_included=false; + if (baseLabel_e.getAttributeNode("n") != null ){ + n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue()); + n_frequency_included = true; + } + else if (baseLabel_e.getAttributeNode("min_frequency") != null){ + String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue(); + + min_frequency=Float.parseFloat(s_min_frequency); + n = ((int)min_frequency - 1471)/20; + n_frequency_included=true; + } + if (n_frequency_included){ + createBitmapLabelSet(commonAvailableLabels,numLabels,grid,cs,n); + }else{ + log.error("ERROR reading the xml file of the topology, you should enter "); + } + + } + } + + } + //} + } catch (Exception e) { + log.error(e.toString()); + e.printStackTrace(); + } + if (commonAvailableLabels !=null){ + WSONinfo = new WSONInformation(); + WSONinfo.setCommonAvailableLabels(commonAvailableLabels); + WSONinfo.setNumLambdas(numLabels); + WSONinfo.setCs(cs); + WSONinfo.setGrid(grid); + WSONinfo.setnMin(n); + } + return WSONinfo; + + } + + public static SSONInformation getSSONInformation(String fileName){ + return FileTEDBUpdater.getSSONInformation(fileName,null); + } + + public static SSONInformation getSSONInformation(String fileName, String layer){ + Logger log = LoggerFactory.getLogger("BGP4Peer"); + File file = new File(fileName); + AvailableLabels commonAvailableLabels = null; + SSONInformation SSONinfo = null; + int numLabels = 0; + int grid=0; + int cs=0; + int n=0; + try { + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + // NodeList nodes_domains = doc.getElementsByTagName("domain"); + // for (int j = 0; j < nodes_domains.getLength(); j++) { + // Element element_domain = (Element) nodes_domains.item(j); + + NodeList edgeCommon = doc.getElementsByTagName("edgeCommon"); + + for (int i = 0; i < edgeCommon.getLength(); i++) { + + Element edgeCommonElement = (Element) edgeCommon.item(i); + NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels"); + for (int k = 0; k < availableLabels_node.getLength(); k++) { + commonAvailableLabels = new AvailableLabels(); + Element availableLabels_e = (Element) availableLabels_node.item(k); + NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField"); + Element labelSetField_el = (Element) labelSetField_node.item(0); + if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet + //Crear un BitMapSet + + NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels"); + + Element numbLabels_e = (Element) numbLabels_node.item(0); + String numbLabels_s = getCharacterDataFromElement(numbLabels_e); + numLabels=Integer.parseInt(numbLabels_s); + + NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel"); + Element baseLabel_e = (Element) baseLabel_node.item(0); + + float min_frequency; + + grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue()); + + cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue()); + boolean n_frequency_included=false; + if (baseLabel_e.getAttributeNode("n") != null ){ + n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue()); + n_frequency_included = true; + } + else if (baseLabel_e.getAttributeNode("min_frequency") != null){ + String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue(); + + min_frequency=Float.parseFloat(s_min_frequency); + n = ((int)min_frequency - 1471)/20; + n_frequency_included=true; + } + if (n_frequency_included){ + createBitmapLabelSet(commonAvailableLabels,numLabels,grid,cs,n); + }else{ + log.error("ERROR reading the xml file of the topology, you should enter "); + } + + } + } + + } + //} + } catch (Exception e) { + e.printStackTrace(); + } + if (commonAvailableLabels !=null){ + SSONinfo = new SSONInformation(); + SSONinfo.setCommonAvailableLabels(commonAvailableLabels); + // if(cs==5){ + // SSONinfo.setNumLambdas(numLabels*8); + // } + SSONinfo.setNumLambdas(numLabels); + SSONinfo.setCs(cs); + SSONinfo.setGrid(grid); + SSONinfo.setnMin(n); + } + return SSONinfo; + + } + public static void createBitmapLabelSet(AvailableLabels availableLabels,int numLabels,int grid, int cs,int n){ + //FIXME: no hay problema de que se salga el ancho de banda + BitmapLabelSet bitmapLabelSet = new BitmapLabelSet(); + DWDMWavelengthLabel dwdmWavelengthLabel = new DWDMWavelengthLabel(); + dwdmWavelengthLabel.setGrid(grid); + dwdmWavelengthLabel.setChannelSpacing(cs); + dwdmWavelengthLabel.setN(n); + bitmapLabelSet.setDwdmWavelengthLabel(dwdmWavelengthLabel); + + int numberBytes = numLabels/8; + if ((numberBytes*8)>> 24 & 0xFF); + mask[1] = (byte) (maskLong >>> 16 & 0xFF); + mask[2] = (byte) (maskLong >>> 8 & 0xFF); + mask[3] = (byte) (maskLong & 0xFF); + //Meto la mascara + reachabilityEntry.setMask(mask); + + + } + } + } + + } catch (Exception e) { + e.printStackTrace(); + } + } + + + /** + * Read the interdomain Topology from a topology file + * @param fileName Name of the xml file. + * @return List of interdomain edges. + */ + public static LinkedList readInterDomainLinks(String fileName) { + + LinkedList interDomainLinks = new LinkedList(); + Logger log = LoggerFactory.getLogger("BGP4Peer"); + File file = new File(fileName); + Inet4Address domain_id=null; + try { + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + + NodeList nodes_domains = doc.getElementsByTagName("domain"); + if (nodes_domains!=null){ + if (nodes_domains.getLength()>=1){ + for (int j = 0; j < nodes_domains.getLength(); j++) { + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + Element domain_id_e = (Element) nodes_domain_id.item(0); + String domain_id_str=getCharacterDataFromElement(domain_id_e); + domain_id= (Inet4Address) Inet4Address.getByName(domain_id_str); + } + } + } + + + + Boolean commonBitmapLabelSet = false; + NodeList edgeCommon = doc.getElementsByTagName("edgeCommon"); + int grid=0; + int cs=0; + int n=0; + int numLabels=0; + for (int i = 0; i < edgeCommon.getLength(); i++) { + + Element edgeCommonElement = (Element) edgeCommon.item(i); + NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels"); + for (int k = 0; k < availableLabels_node.getLength(); k++) { + + Element availableLabels_e = (Element) availableLabels_node.item(k); + NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField"); + Element labelSetField_el = (Element) labelSetField_node.item(0); + if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet + //Crear un BitMapSet + + NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels"); + + Element numbLabels_e = (Element) numbLabels_node.item(0); + String numbLabels_s = getCharacterDataFromElement(numbLabels_e); + numLabels=Integer.parseInt(numbLabels_s); + + NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel"); + Element baseLabel_e = (Element) baseLabel_node.item(0); + + float min_frequency; + + grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue()); + + cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue()); + boolean n_frequency_included=false; + if (baseLabel_e.getAttributeNode("n") != null ){ + n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue()); + n_frequency_included = true; + } + else if (baseLabel_e.getAttributeNode("min_frequency") != null){ + String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue(); + + min_frequency=Float.parseFloat(s_min_frequency); + n = ((int)min_frequency - 1471)/20; + n_frequency_included=true; + } + if (n_frequency_included){ + commonBitmapLabelSet = true; + }else{ + log.error("ERROR reading the xml file of the topology, you should enter "); + } + + } + } + + } + + + // Read the nodes of the domain which has interdomain connection + NodeList edges = doc.getElementsByTagName("edge"); + for (int i = 0; i < edges.getLength(); i++) { + Element element = (Element) edges.item(i); + + // We only want those routers which have type="interdomain" + //if (((String)element.getAttributeNode("type").getValue()).equals("interdomain")) { + + if (element.getAttributeNode("type")!=null) { + + + if (element.getAttributeNode("type").getValue().equals("interdomain")) { + + // Create a variable InterDomainEdge where we include + // the two nodes of the connection. + InterDomainEdge connection = new InterDomainEdge(); + NodeList source = element.getElementsByTagName("source"); + Element source_router_el = (Element) source.item(0); + //Read the source router IP + NodeList source_router_id = source_router_el.getElementsByTagName("router_id"); + Element source_router_id_el = (Element) source_router_id.item(0); + String s_r_id = getCharacterDataFromElement(source_router_id_el); + + Inet4Address s_router_id_addr = (Inet4Address) Inet4Address.getByName(s_r_id); + //Read the source router interface identifier of the connection + NodeList source_if_id_nl = source_router_el.getElementsByTagName("if_id"); + Element source_if_id_el = (Element) source_if_id_nl.item(0); + String s_source_if_id = getCharacterDataFromElement(source_if_id_el); + + int src_if_id = Integer.parseInt(s_source_if_id); + NodeList src_domain_nl = source_router_el.getElementsByTagName("domain_id"); + Inet4Address s_router_domain=null; + + if (src_domain_nl!=null) + { + if (src_domain_nl.getLength()>=1){ + Element domain_id_el = (Element) src_domain_nl.item(0); + String s_r_domain = getCharacterDataFromElement(domain_id_el).trim(); + s_router_domain = (Inet4Address) Inet4Address.getByName(s_r_domain); + + }else{ + s_router_domain= domain_id; + + } + }else { + s_router_domain= domain_id; + + } + + + + //Read the router destination + NodeList dest_nl = element.getElementsByTagName("destination"); + Element dest_el = (Element) dest_nl.item(0); + NodeList dest_router_id_nl = dest_el.getElementsByTagName("router_id"); + Element dest_router_id_el = (Element) dest_router_id_nl.item(0); + String d_r_id = getCharacterDataFromElement(dest_router_id_el); + log.info("Edge Destination router_id: "+ d_r_id); + Inet4Address d_router_id_addr = (Inet4Address) Inet4Address.getByName(d_r_id); + NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id"); + Element dest_if_id_el = (Element) dest_if_id_nl.item(0); + String s_dest_if_id = getCharacterDataFromElement(dest_if_id_el); + log.info("Edge Dest if_id: " + s_dest_if_id); + int dst_if_id = Integer.parseInt(s_dest_if_id); + NodeList domain = dest_el.getElementsByTagName("domain_id"); + Element domain_id_el = (Element) domain.item(0); + String d_r_domain = getCharacterDataFromElement(domain_id_el); + log.info("Destination router domain: "+ d_r_domain); + Inet4Address d_router_domain= (Inet4Address) Inet4Address.getByName(d_r_domain); + + + // Include the connection between both nodes + connection.setSrc_if_id(src_if_id); + connection.setSrc_router_id(s_router_id_addr); + connection.setDst_if_id(dst_if_id); + connection.setDst_router_id(d_router_id_addr); + connection.setDomain_src_router(s_router_domain); + connection.setDomain_dst_router(d_router_domain); + if(connection.getTE_info()==null){ + TE_Information tE_info= new TE_Information(); + if (commonBitmapLabelSet){ + tE_info.createBitmapLabelSet(numLabels, grid, cs, n); + } + connection.setTE_info(tE_info); + } + //add the connection to the LinkedList. + interDomainLinks.add(connection); + + } + } + } + //}//end for domains + } catch (Exception e) { + e.printStackTrace(); + } + + return interDomainLinks; + + } + + public static int readWSONLambdas(String fileName){ + Logger log=LoggerFactory.getLogger("BGP4Peer"); + File file = new File(fileName); + int num_wavelengths=4; + try { + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + NodeList nodes_domains = doc.getElementsByTagName("domain"); + + for (int j = 0; j < nodes_domains.getLength(); j++) { + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_wl= element_domain.getElementsByTagName("num_wavelengths"); + for (int k = 0; k < nodes_wl.getLength(); k++) { + Element nodes_wl_e = (Element) nodes_wl.item(0); + String num_wavelengths_id=getCharacterDataFromElement(nodes_wl_e ); + num_wavelengths=Integer.parseInt(num_wavelengths_id); + log.info("num_wavelength: "+num_wavelengths); + } + + } + } + catch (Exception e) { + e.printStackTrace(); + } + + return num_wavelengths; + } + + + public static Hashtable getITSites(String fileName){ + Hashtable it_site_id_domain_ed=new Hashtable (); + + File file2 = new File(fileName); + try { + DocumentBuilder builder2 = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc2 = builder2.parse(file2); + + NodeList nodes_domains = doc2.getElementsByTagName("domain"); + + for (int j = 0; j < nodes_domains.getLength(); j++) { + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + Element domain_id_e = (Element) nodes_domain_id.item(0); + String domain_id_str=getCharacterDataFromElement(domain_id_e); + Inet4Address domain_id= (Inet4Address) Inet4Address.getByName(domain_id_str); + + NodeList ITsites = element_domain.getElementsByTagName("it_site"); + for (int i = 0; i < ITsites.getLength(); i++) { + Element element = (Element) ITsites.item(i); + NodeList it_site_id_node = element.getElementsByTagName("it_site_id"); + Element it_site_id_e = (Element) it_site_id_node.item(0); + String it_site_id=getCharacterDataFromElement(it_site_id_e); + Inet4Address it_site_id_addr= (Inet4Address) Inet4Address.getByName(it_site_id); + + NodeList domain_id_node = element.getElementsByTagName("domain_id"); + it_site_id_domain_ed.put(it_site_id_addr, domain_id); + //graph.addVertex(router_id_addr); + } + + } + + } + catch (Exception e) { + e.printStackTrace(); + } + + return it_site_id_domain_ed; + + } + + + public static Hashtable getResource(String fileName){ + Hashtable resource_id_domain_ed=new Hashtable (); + + File file2 = new File(fileName); + try { + DocumentBuilder builder2 = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc2 = builder2.parse(file2); + + NodeList nodes_domains = doc2.getElementsByTagName("domain"); + + for (int j = 0; j < nodes_domains.getLength(); j++) { + Element element_domain = (Element) nodes_domains.item(j); + NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id"); + Element domain_id_e = (Element) nodes_domain_id.item(0); + String domain_id_str=getCharacterDataFromElement(domain_id_e); + Inet4Address domain_id= (Inet4Address) Inet4Address.getByName(domain_id_str); + + NodeList storages = element_domain.getElementsByTagName("storage"); + for (int i = 0; i < storages.getLength(); i++) { + Element element = (Element) storages.item(i); + NodeList resource_id_node = element.getElementsByTagName("resource_id"); + Element resource_id_e = (Element) resource_id_node.item(0); + String resource_id=getCharacterDataFromElement(resource_id_e); + Inet4Address resource_id_addr= (Inet4Address) Inet4Address.getByName(resource_id); + + NodeList domain_id_node = element.getElementsByTagName("domain_id"); + resource_id_domain_ed.put(resource_id_addr, domain_id); + //graph.addVertex(router_id_addr); + + } + + } + + } + catch (Exception e) { + e.printStackTrace(); + } + return resource_id_domain_ed; + + } + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IT_Resources.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IT_Resources.java new file mode 100644 index 0000000000000000000000000000000000000000..dac19068fa67be60b200262e0bbc7396238943c5 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IT_Resources.java @@ -0,0 +1,147 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.DefaultTEMetricLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IPv4RouterIDLocalNodeLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IPv4RouterIDRemoteNodeLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.LinkProtectionTypeLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MF_OTPAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MetricLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.TransceiverClassAndAppAttribTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.MinMaxUndirectionalLinkDelayDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalAvailableBandwidthDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalDelayVariationDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalLinkDelayDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalLinkLossDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalResidualBandwidthDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalUtilizedBandwidthDescriptorSubTLV; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AdministrativeGroup; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.IPv4RemoteASBRID; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.InterfaceSwitchingCapabilityDescriptor; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.LinkLocalRemoteIdentifiers; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.LinkProtectionType; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.MaximumBandwidth; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.MaximumReservableBandwidth; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.RemoteASNumber; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.SharedRiskLinkGroup; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.TrafficEngineeringMetric; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.UnreservedBandwidth; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet; +import es.tid.rsvp.constructs.gmpls.DWDMWavelengthLabel; + +public class IT_Resources { + + private String controllerIT; + private String cpu; + private String mem; + private String storage; + private String learntFrom; + private String domainID; + + /** + * TEDB logger + */ + public IT_Resources() + { + //initWLANs(); + } + + public String getCpu() { + return cpu; + } + + public void setCpu(String cpu) { + this.cpu = cpu; + } + + + public String getMem() { + return mem; + } + + public void setMem(String mem) { + this.mem = mem; + } + + + public String getStorage() { + return storage; + } + + public void setStorage(String storage) { + this.storage = storage; + } + + /** + * Funcion que transforma una cantidad de bits en el numero de bytes que necesita + * @param numBit + */ + private int getNumberBytes(int numBits){ + int numberBytes = numBits/8; + if ((numberBytes*8) "+dst_router_id.toString()+":"+dst_if_id+" ("+((Object)super.getTarget()).toString()+")"; + ideString=src_router_id.toString()+": "+src_if_id+" --> "+dst_router_id.toString()+": "+dst_if_id; + /*if (TE_info==null){ + return ideString; + } + else + { + if ((this.TE_info.getAvailableLabels()!=null) &&(this.TE_info.getAvailableLabels().getLabelSet()!=null)){ + ideString=ideString+" Bitmap: {"; + for (int i=0;i"+this.getTarget()+":"+this.getDst_if_id()+" NumFibers = "+numFibers; + if (TE_info==null){ + return ret; + } + else + { + if ((this.TE_info.getAvailableLabels()!=null) &&(this.TE_info.getAvailableLabels().getLabelSet()!=null)){ + ret=ret+" Bitmap: {"; + for (int i=0;i"+this.getTarget()+":"+this.getDst_if_id(); + if (TE_info==null){ + return ret; + } + else + { + if (this.TE_info.getAvailableLabels()!=null){ + ret=ret+" Bitmap: {"; + for (int i=0;i networkDomainGraph; + public SimpleDirectedWeightedGraph networkGraph; + + //private LinkedList interDomainLinks; + + public SimpleTEDB simple_ted; + + private Logger log; + + private boolean addBidirectional; + + /** + * Table with IP address/prefix --> domain + */ + LinkedList reachability; + + public MDTEDB(){ + log=LoggerFactory.getLogger("BGP4Peer"); + networkDomainGraph=new DirectedWeightedMultigraph (InterDomainEdge.class); + addBidirectional=true;//FIXME: ESTO ES UN APA�O TEMPORAL + reachability=new LinkedList(); + //interDomainLinks = new LinkedList(); + } + + public DirectedWeightedMultigraph getDuplicatedMDNetworkGraph(){ + + DirectedWeightedMultigraph graphCopy= (DirectedWeightedMultigraph) networkDomainGraph.clone(); + return graphCopy; + } + + public DirectedWeightedMultigraph getNetworkDomainGraph() { + return networkDomainGraph; + } + + public void setNetworkDomainGraph( + DirectedWeightedMultigraph networkDomainGraph) { + this.networkDomainGraph = networkDomainGraph; + } + + public void initializeFromFile(String file){ + networkDomainGraph=FileTEDBUpdater.readMDNetwork(file); + } + + public void initializeFromFile(String file, String learntFrom){ + networkDomainGraph=FileTEDBUpdater.readMDNetwork(file, learntFrom); + } + + public void initializeFromFileInterDomainLinks(String file){ + } + + public void initializeFullTEDFromFile(String file){ + networkGraph=FileTEDBUpdater.readNetwork(file); + } + + public long getGraphId() { + return graphId; + } + public void setGraphId(long graphId) { + this.graphId = graphId; + } + + + public SimpleDirectedWeightedGraph getDuplicatedNetworkGraph() { + return networkGraph; + } + + public synchronized void addInterdomainLink( Object localDomainID, Object localRouterASBR, long localRouterASBRIf, Object remoteDomainID, Object remoteRouterASBR, long remoteRouterASBRIf, TE_Information te_info){ + + if (!networkDomainGraph.containsVertex(localDomainID)){ + networkDomainGraph.addVertex(localDomainID); + log.debug("Vertex (domain) "+localDomainID+" added"); + } + if (!networkDomainGraph.containsVertex(remoteDomainID)){ + networkDomainGraph.addVertex(remoteDomainID); + log.debug("Vertex (domain) "+remoteDomainID+" added"); + } + log.debug("Looking to add "+localRouterASBR+":"+localRouterASBRIf+" ("+localDomainID+") -->"+remoteRouterASBR+":"+remoteRouterASBRIf+" ("+remoteDomainID+")"); + Set edgeset= networkDomainGraph.edgesOf(localDomainID); + Iterator iterador=edgeset.iterator(); + boolean edgeFound=false; + InterDomainEdge interDomainEdgeFound=null; + if (edgeset.size() == 0) + log.debug("Edge set size = 0"); + while (iterador.hasNext()){ + InterDomainEdge interDomainEdge=iterador.next(); + log.debug("existing edge: "+interDomainEdge.toString()); + if (interDomainEdge.getSrc_router_id().equals(localRouterASBR)){ + log.debug("Local router is the same!!!"); + if (interDomainEdge.getDst_router_id().equals(remoteRouterASBR)){ + log.debug("Destination router is the same!!!"); + edgeFound=true; + interDomainEdgeFound=interDomainEdge; + } + else { + log.debug("Destination router is NOT the same!!!"); + } + }else { + log.debug("Local router is NOT the same!!!"); + } + } + + if (edgeFound==false) { + InterDomainEdge newInterDomainEdge =new InterDomainEdge(); + newInterDomainEdge.setSrc_router_id(localRouterASBR); + newInterDomainEdge.setDst_router_id(remoteRouterASBR); + newInterDomainEdge.setSrc_if_id(localRouterASBRIf); + newInterDomainEdge.setDst_if_id(remoteRouterASBRIf); + newInterDomainEdge.setDomain_dst_router(remoteDomainID); + newInterDomainEdge.setDomain_src_router(localDomainID); + if (te_info != null) + newInterDomainEdge.setTE_info(te_info); + networkDomainGraph.addEdge(localDomainID, remoteDomainID, newInterDomainEdge); + log.info("New interdomain edge between "+localDomainID+" and "+remoteDomainID+" received"); + + }else { + + if (te_info != null){ + //FIXME: Update of TE info to be optimized + log.debug("TE_info updated"); + interDomainEdgeFound.setTE_info(te_info); + } + + + } + } + + + public void addReachabilityIPv4(Inet4Address domainId,Inet4Address aggregatedIPRange,int prefix){ + ReachabilityEntry ra=new ReachabilityEntry(); + ra.setAggregatedIPRange(aggregatedIPRange); + long resta=((long)0x1<>>24 & 0xFF); + mask[1]=(byte)(maskLong>>>16 & 0xFF); + mask[2]=(byte)(maskLong>>>8 & 0xFF); + mask[3]=(byte)(maskLong& 0xFF); + ra.setMask(mask); + ra.setDomainId(domainId); + ra.setPrefix(prefix); + if (!(reachability.contains(ra))){ + reachability.add(ra); + } + return; + } + + + public String printMDTopology(){ + String topoString; + Set vetexSet= networkDomainGraph.vertexSet(); + Iterator vertexIterator=vetexSet.iterator(); + topoString="Domains: \r\n"; + while (vertexIterator.hasNext()){ + Object vertex= vertexIterator.next(); + topoString=topoString+"\t"+vertex.toString()+"\r\n"; + } + topoString=topoString+"Interdomain list: \r\n"; + Set edgeSet= networkDomainGraph.edgeSet(); + Iterator edgeIterator=edgeSet.iterator(); + while (edgeIterator.hasNext()){ + InterDomainEdge edge= edgeIterator.next(); + topoString=topoString+"\t"+edge.toString()+"\r\n"; + } + + return topoString; + } + +// public String printMD2Topology(){ +// String topoString; +// Set vetexSet= networkDomainGraph.vertexSet(); +// Iterator vertexIterator=vetexSet.iterator(); +// topoString="Domains: \r\n"; +// while (vertexIterator.hasNext()){ +// Object vertex= vertexIterator.next(); +// topoString=topoString+"\t"+vertex.toString()+"\r\n"; +// } +// topoString=topoString+"Interdomain list: \r\n"; +// Iterator edgeIterator=interDomainLinks.iterator(); +// while (edgeIterator.hasNext()){ +// InterDomainEdge edge= edgeIterator.next(); +// topoString=topoString+"\t"+edge.toString()+"\r\n"; +// } +// +// return topoString; +// } + + //Check resources SSON and WSON + public boolean CheckLocalResources(long ifID, Object ip){ + Iterator iteredges = networkDomainGraph.edgeSet().iterator(); + InterDomainEdge link; + while (iteredges.hasNext()) + { + link = iteredges.next(); + if ((link.getSrc_if_id()==(ifID))) + { + log.info("InterDomain Link Found to "+link.getDst_router_id().toString()); + return true; + } + } + return false; + } + + @Override + public String printTopology() { + // TODO Auto-generated method stub + return printMDTopology(); + } + + public LinkedList getInterDomainLinks() { + return new LinkedList(networkDomainGraph.edgeSet()); + } + + @Override + public boolean isITtedb() { + // TODO Auto-generated method stub + return false; + } + + public SimpleTEDB getSimple_ted() { + return simple_ted; + } + + public void setSimple_ted(SimpleTEDB simple_ted) { + this.simple_ted = simple_ted; + } + + public LinkedList getReachability() { + return reachability; + } + + public void setReachability(LinkedList reachability) { + this.reachability = reachability; + } + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiDomainTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiDomainTEDB.java new file mode 100644 index 0000000000000000000000000000000000000000..746338df2e4b02787e56f0ce88f338c3a0dcfaa8 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiDomainTEDB.java @@ -0,0 +1,25 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import java.net.Inet4Address; + + +public interface MultiDomainTEDB extends TEDB { + + public void addInterdomainLink( Object localDomainID, Object localRouterASBR, long localRouterASBRIf, Object remoteDomainID, Object remoteRouterASBR, long remoteRouterASBRIf, TE_Information te_info ); + public void addReachabilityIPv4(Inet4Address domainId,Inet4Address aggregatedIPRange,int prefix); + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiLayerTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiLayerTEDB.java new file mode 100644 index 0000000000000000000000000000000000000000..bed570fedf5cca39a8a580521d7918f76b773cc8 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiLayerTEDB.java @@ -0,0 +1,473 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet; +import org.jgrapht.graph.SimpleDirectedWeightedGraph; + +import java.net.Inet4Address; +import java.util.*; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + + +public class MultiLayerTEDB implements DomainTEDB { + + private ArrayList registeredAlgorithms; + /** + * Graph of the Upper Layer Network + */ + /** + * + */ + private SimpleDirectedWeightedGraph upperLayerGraph; + + /** + * Graph of the Upper Layer Network + */ + private SimpleDirectedWeightedGraph lowerLayerGraph; + + /** + * InterLayer Graph + */ + private SimpleDirectedWeightedGraph interLayerGraph; + /** + * Reachability information + */ + private ReachabilityEntry reachabilityEntry; + + /** + * WSON Information of the lower Layer + */ + private WSONInformation WSONinfo=null; + + private Lock TEDBlock; + + + /** + * List of interdomain Links + */ + private LinkedList interDomainLinks; + + private Hashtable RelationNodesInterlayer; + + + + + public MultiLayerTEDB(){ + registeredAlgorithms= new ArrayList(); + TEDBlock=new ReentrantLock(); + } + + + public SimpleDirectedWeightedGraph getUpperLayerGraph() { + return upperLayerGraph; + } + + public void setUpperLayerGraph( + SimpleDirectedWeightedGraph upperLayerGraph) { + this.upperLayerGraph = upperLayerGraph; + } + + + public SimpleDirectedWeightedGraph getLowerLayerGraph() { + return lowerLayerGraph; + } + + public void setLowerLayerGraph( + SimpleDirectedWeightedGraph lowerLayerGraph) { + this.lowerLayerGraph = lowerLayerGraph; + } + + + public SimpleDirectedWeightedGraph getInterLayerGraph() { + return interLayerGraph; + } + + public void setInterLayerGraph( + SimpleDirectedWeightedGraph interLayerGraph) { + this.interLayerGraph = interLayerGraph; + } + + + + public SimpleDirectedWeightedGraph getDuplicatedUpperLayerkGraph(){ + SimpleDirectedWeightedGraph graphCopy; + TEDBlock.lock(); + try{ + graphCopy= (SimpleDirectedWeightedGraph) upperLayerGraph.clone(); + } finally{ + TEDBlock.unlock(); + } + return graphCopy; + } + public Hashtable getRelationNodesInterlayer() { + return RelationNodesInterlayer; + } + public SimpleDirectedWeightedGraph getDuplicatedLowerLayerkGraph(){ + SimpleDirectedWeightedGraph graphCopy; + TEDBlock.lock(); + try{ + graphCopy= (SimpleDirectedWeightedGraph) lowerLayerGraph.clone(); + } finally{ + TEDBlock.unlock(); + } + return graphCopy; + } + + public SimpleDirectedWeightedGraph getDuplicatedInterLayerGraph(){ + SimpleDirectedWeightedGraph graphCopy; + TEDBlock.lock(); + try{ + graphCopy= (SimpleDirectedWeightedGraph) interLayerGraph.clone(); + } finally{ + TEDBlock.unlock(); + } + return graphCopy; + } + + public void initializeFromFile(String file) { + upperLayerGraph=FileTEDBUpdater.readNetwork(file, "mpls"); + lowerLayerGraph=FileTEDBUpdater.readNetwork(file, "wson"); + interLayerGraph=FileTEDBUpdater.readNetwork(file, "interlayer"); + WSONinfo = FileTEDBUpdater.getWSONInformation(file, "wson"); + interDomainLinks = FileTEDBUpdater.readInterDomainLinks(file); + + reachabilityEntry = new ReachabilityEntry(); + //domainReachabilityIPv4Prefix=new byte[4]; + FileTEDBUpdater.getDomainReachabilityFromFile(file,reachabilityEntry,"mpls"); + } + + @Override + public void initializeFromFile(String file, String learnFrom) { + + } + + @Override + public boolean isITtedb() { + // TODO Auto-generated method stub + return false; + } + + @Override + public String printTopology() { + String topoString; + Set vetexSet= upperLayerGraph.vertexSet(); + Iterator vertexIterator=vetexSet.iterator(); + topoString="MPLS Nodes: \r\n"; + while (vertexIterator.hasNext()){ + Object vertex= vertexIterator.next(); + topoString=topoString+"\t"+vertex.toString()+"\r\n"; + } + topoString=topoString+"MPLS Link list: \r\n"; + Set edgeSet= upperLayerGraph.edgeSet(); + Iterator edgeIterator=edgeSet.iterator(); + while (edgeIterator.hasNext()){ + IntraDomainEdge edge= edgeIterator.next(); + topoString=topoString+"\t"+edge.toString()+"\r\n"; + } + vetexSet= lowerLayerGraph.vertexSet(); + vertexIterator=vetexSet.iterator(); + topoString="GMPLS Nodes: \r\n"; + while (vertexIterator.hasNext()){ + Object vertex= vertexIterator.next(); + topoString=topoString+"\t"+vertex.toString()+"\r\n"; + } + topoString=topoString+"gmpls Link list: \r\n"; + edgeSet= lowerLayerGraph.edgeSet(); + edgeIterator=edgeSet.iterator(); + while (edgeIterator.hasNext()){ + IntraDomainEdge edge= edgeIterator.next(); + topoString=topoString+"\t"+edge.toString()+"\r\n"; + } + topoString=topoString+"InterLayer list: \r\n"; + edgeSet= interLayerGraph.edgeSet(); + edgeIterator=edgeSet.iterator(); + while (edgeIterator.hasNext()){ + IntraDomainEdge edge= edgeIterator.next(); + topoString=topoString+"\t"+edge.toString()+"\r\n"; + } + + topoString=topoString+printInterDomainLinks(); + return topoString; + } + + @Override + public boolean belongsToDomain(Object addr) { + int i; + byte[] addrbytes= ((Inet4Address)addr).getAddress(); + for (i=0;i<4;++i){ + addrbytes[i]=(byte) (addrbytes[i]&(reachabilityEntry.getMask())[i]); + } + return Arrays.equals(addrbytes,reachabilityEntry.getAggregatedIPRange().getAddress()); + } + + public ReachabilityEntry getReachabilityEntry() { + return reachabilityEntry; + } + + public LinkedList getInterDomainLinks() { + return interDomainLinks; + } + + @Override + public String printInterDomainLinks(){ + String topoString=""; + + int size = interDomainLinks.size(); + topoString="Interdomain Link list: \r\n"; + for (int i=0;i sourceVertexList, LinkedList targetVertexList, int wavelength, boolean bidirectional){ + TEDBlock.lock(); + try { + for (int i=0;i sourceVertexList, LinkedList targetVertexList, int wavelength, boolean bidirectional){ + // TODO Auto-generated method stub + //Delete the resource reservation + TEDBlock.lock(); + try { + for (int i=0;i graph= ted.getNetworkGraph(); + IntraDomainEdge edge=lowerLayerGraph.getEdge(sourceVertexList.get(i),targetVertexList.get(i) ); + edge.getTE_info().setWavelengthUnReserved(wavelength); + if (bidirectional == true) + { + edge=lowerLayerGraph.getEdge(targetVertexList.get(i), sourceVertexList.get(i)); + edge.getTE_info().setWavelengthUnReserved(wavelength); + } + } + }finally{ + TEDBlock.unlock(); + } + for (int i=0;i edgeSet= lowerLayerGraph.edgeSet(); + Iterator edgeIterator=edgeSet.iterator(); + while (edgeIterator.hasNext()){ + IntraDomainEdge edge= edgeIterator.next(); + edge.TE_info.setAllWavelengtshUnReserved(); + } + }finally{ + TEDBlock.unlock(); + } + for (int i=0;i sourceVertexList, + LinkedList targetVertexList, int wavelength, + boolean bidirectional, int m) { + // TODO Auto-generated method stub + } + + @Override + public void notifyWavelengthReservationSSON( + LinkedList sourceVertexList, + LinkedList targetVertexList, int wavelength, + boolean bidirectional, int m) { + // TODO Auto-generated method stub + } + + @Override + public SSONInformation getSSONinfo() { + // TODO Auto-generated method stub + return null; + } + + + @Override + public Set getIntraDomainLinks() { + // TODO Auto-generated method stub + return null; + } + + + @Override + public void notifyWavelengthReservationWLAN( + LinkedList sourceVertexList, + LinkedList targetVertexList, + LinkedList wlans, boolean bidirectional) { + // TODO Auto-generated method stub + + } + + + @Override + public void registerSSON(SSONListener compAlgPreComp) { + // TODO Auto-generated method stub + + } + + + @Override + public Inet4Address getDomainID() { + // TODO Auto-generated method stub + return null; + } + + + @Override + public void setWSONinfo(WSONInformation wSONinfo) { + // TODO Auto-generated method stub + + } + + + @Override + public void setSSONinfo(SSONInformation sSONinfo) { + // TODO Auto-generated method stub + + } + + + @Override + public void createGraph() { + // TODO Auto-generated method stub + + } + + + @Override + public Set getIntraDomainLinksvertexSet() { + // TODO Auto-generated method stub + return null; + } + + + @Override + public Hashtable getNodeTable() { + // TODO Auto-generated method stub + return null; + } + + + @Override + public IT_Resources getItResources() { + // TODO Auto-generated method stub + return null; + } + + + @Override + public void setItResources(IT_Resources itResources) { + // TODO Auto-generated method stub + + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Node_Info.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Node_Info.java new file mode 100644 index 0000000000000000000000000000000000000000..b0f3bb3acaba9f1d5c915cf64e9f44241f8456a8 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Node_Info.java @@ -0,0 +1,207 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import java.net.Inet4Address; +import java.util.LinkedList; + +import es.tid.of.DataPathID; + +public class Node_Info { + + //we specify we we learn the topology from + + private String learntFrom = null; + // for the moment only ospf-non pseudo supported + private Inet4Address igp_ident = null; + + //caracterizacion + private Inet4Address as_number, area_id, bgpls_ident, ipv4AddressLocalNode= null; + private DataPathID dataPathIDLocalNode; + private boolean overload_bit = false; + private boolean attached_bit = false; + private boolean external_bit = false; + private boolean abr_bit = false; + private byte[] name; + private LinkedList ipv4areaIDs = new LinkedList (); + private int sid; + + + + + public Node_Info() { + // TODO Auto-generated constructor stub + } + + public Node_Info(Inet4Address ipv4Address_ospf, Inet4Address as_number, + boolean overload_bit, boolean attached_bit, boolean external_bit, + boolean abr_bit, byte[] name, LinkedList ipv4areaIDs, Inet4Address ipv4AdddressLN) { + super(); + this.igp_ident = ipv4Address_ospf; + this.as_number = as_number; + this.overload_bit = overload_bit; + this.attached_bit = attached_bit; + this.external_bit = external_bit; + this.abr_bit = abr_bit; + this.name = name; + this.ipv4areaIDs = ipv4areaIDs; + this.ipv4AddressLocalNode = ipv4AdddressLN; + } + + public LinkedList getIpv4areaIDs() { + return ipv4areaIDs; + } + + public void setIpv4areaIDs(LinkedList ipv4areaIDs) { + this.ipv4areaIDs = ipv4areaIDs; + } + + public byte[] getName() { + return name; + } + + + public void setName(byte[] name) { + this.name = name; + } + + public boolean isOverload_bit() { + return overload_bit; + } + + + public void setOverload_bit(boolean overload_bit) { + this.overload_bit = overload_bit; + } + + + public boolean isAttached_bit() { + return attached_bit; + } + + + public void setAttached_bit(boolean attached_bit) { + this.attached_bit = attached_bit; + } + + + public boolean isExternal_bit() { + return external_bit; + } + + + public void setExternal_bit(boolean external_bit) { + this.external_bit = external_bit; + } + + + public Inet4Address getArea_id() { + return area_id; + } + + public void setArea_id(Inet4Address area_id) { + this.area_id = area_id; + } + + public boolean isAbr_bit() { + return abr_bit; + } + + + public void setAbr_bit(boolean abr_bit) { + this.abr_bit = abr_bit; + } + + + public Inet4Address getIpv4Address() { + return igp_ident; + } + + + public void setIpv4Address(Inet4Address ipv4Address_ospf) { + this.igp_ident = ipv4Address_ospf; + } + + + public Inet4Address getIpv4AddressLocalNode() { + return ipv4AddressLocalNode; + } + + public void setIpv4AddressLocalNode(Inet4Address ipv4AddressLocalNode) { + this.ipv4AddressLocalNode = ipv4AddressLocalNode; + } + + public DataPathID getDataPathLocalNode() { + return dataPathIDLocalNode; + } + + public void setDataPathLocalNode(DataPathID dataPathLocalNode) { + this.dataPathIDLocalNode = dataPathLocalNode; + } + + public Inet4Address getAs_number() { + return as_number; + } + + + public void setAs_number(Inet4Address as_number) { + this.as_number = as_number; + } + + public Inet4Address getBgpls_ident() { + return bgpls_ident; + } + + public void setBgpls_ident(Inet4Address bgpls_ident) { + this.bgpls_ident = bgpls_ident; + } + + public String getLearntFrom() { + return learntFrom; + } + + public void setLearntFrom(String learntFrom) { + this.learntFrom = learntFrom; + } + + public void setSID(int sid) { + this.sid = sid; + } + + public int getSid(){ + return sid; + } + public String toString(){ + String ret = ""; + + if(igp_ident!=null) + ret = ret + "IGP-ID:" + this.getIpv4Address() +"\t"; + if(as_number!=null) + ret = ret + "as_num:" + this.getAs_number() +"\t"; + if(bgpls_ident != null) + ret = ret + "BGPLS-ident:" + this.getBgpls_ident() +"\t"; + if(name != null) + ret = ret + "Name :" + this.getName() +"\t"; + if(ipv4AddressLocalNode!=null) + ret = ret +"Local Node IP Address: " + this.getIpv4AddressLocalNode() + "\t"; + if(sid!=0) + ret = ret + "SID:" + this.getSid() +"\t"; + + return ret; + + } + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityEntry.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityEntry.java new file mode 100644 index 0000000000000000000000000000000000000000..e65a0ec3f0a27d27640e3437d144044374775a20 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityEntry.java @@ -0,0 +1,85 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import java.net.Inet4Address; + +public class ReachabilityEntry { + + public Inet4Address domainId; + public byte[] mask; + public int prefix; + + //public byte[] aggregatedIPRange; + public Inet4Address aggregatedIPRange; + + public ReachabilityEntry(){ + mask = new byte[4]; + + } + public ReachabilityEntry(Inet4Address domainId){ + mask = new byte[4]; + + } + + public int getPrefix() { + return prefix; + } + + public Inet4Address getAggregatedIPRange() { + return aggregatedIPRange; + } + + public void setAggregatedIPRange(Inet4Address aggregatedIPRange) { + this.aggregatedIPRange = aggregatedIPRange; + } + + public byte[] getMask() { + return mask; + } + + + public Inet4Address getDomainId() { + return domainId; + } + + public void setDomainId(Inet4Address domainId) { + this.domainId = domainId; + } + + public void setMask(byte[] mask) { + this.mask = mask; + } + public void setPrefix(int prefix) { + this.prefix = prefix; + } + public String toString(){ + String ret=aggregatedIPRange.toString()+"\\"+prefix+" ("+domainId.toString()+")"; + return ret; + } + + @Override + public boolean equals(Object reachabilityObject) { + if ((domainId.equals(((ReachabilityEntry)reachabilityObject).getDomainId()))&& + (aggregatedIPRange.equals(((ReachabilityEntry)reachabilityObject).getAggregatedIPRange()))&& + (prefix == ((ReachabilityEntry)reachabilityObject).getPrefix())){ + return true; + } + + return false; + } + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityManager.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityManager.java new file mode 100644 index 0000000000000000000000000000000000000000..161d27f1f8b87c0e20c3f2425c060362dea37eb6 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityManager.java @@ -0,0 +1,162 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import java.net.Inet4Address; +import java.util.Iterator; +import java.util.LinkedList; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import es.tid.rsvp.objects.subobjects.EROSubobject; +import es.tid.rsvp.objects.subobjects.IPv4prefixEROSubobject; +import es.tid.rsvp.objects.subobjects.SubObjectValues; + +/** + * Class that maintains a table with Reachability entries. + * It has a method to add a reachability entry + * It has a method to query the domain of an IPv4 endpoint + * It has a method to query if an address begins to a given IP range + * KNOWN BUGS: + * * When a reachability entry is added, it is not checked if + * it is already there or not. + * * Reachability entries cannot be removed + * + * @author ogondio + * + */ +public class ReachabilityManager { + + /** + * Table with IP address/prefix --> domain + */ + LinkedList reachability; + /** + * The logger + */ + private Logger log; + + /** + * ReachabilityManager constructor + */ + public ReachabilityManager(){ + log=LoggerFactory.getLogger("PCEServer"); + reachability=new LinkedList(); + } + + /** + * gets the domain of an IPv4 EndpointAddress + * @param endpointAddress the address to query + * @return The domain id if the endpointAddress belongs to a domain, null otherwise. + */ + public Inet4Address getDomain(Inet4Address endpointAddress) { + //String domain="0.0.0.1"; + Iterator it=reachability.iterator(); + while (it.hasNext()){ + ReachabilityEntry ra=it.next(); + //log.info("reachability entry "+ra.aggregatedIPRange+" mask "+(ra.mask[0]&0xFF)+"."+(ra.mask[1]&0xFF)+"."+(ra.mask[2]&0xFF)+"."+(ra.mask[3]&0xFF)); + if (belongsToDomain(endpointAddress, ra.mask, ra.aggregatedIPRange)){ + return ra.domainId; + } + } + return null; + + } + + /** + * Method to determine if the address 'nodeAdrress' belongs to the aggregated IP address range given by the mask and the addresss 'aggregatedIPRange' + * @param nodeAddress The address to query + * @param mask The 32 bit network mask + * @param aggregatedIPRange The aggregated IP address + * @return true if it belongs to the range, false if it does not belong to the range + */ + public boolean belongsToDomain(Inet4Address nodeAddress, byte []mask, Inet4Address aggregatedIPRange){ + int i; + //byte [] networkAddress=new byte[4]; + byte [] bytesAggregatedIPRange=aggregatedIPRange.getAddress(); + byte [] bytesNodeAddress=nodeAddress.getAddress(); + boolean found=true; + for (i=0;i<4;++i){ + //networkAddress[i]= (byte) ((bytesNodeAddress[i]&mask[i])&0xFF) ; + //log.info("network Node Address[i]: "+(networkAddress[i]&0xFF)); + //log.info("bytesAggregatedIPRange["+i+"]: "+((bytesAggregatedIPRange[i]&mask[i])&0xFF)); + //log.info("bytesNodeAddress["+i+"]: "+((bytesNodeAddress[i]&mask[i])&0xFF)); + if ((byte)((bytesAggregatedIPRange[i]&mask[i])&0xFF)!=(byte)((bytesNodeAddress[i]&mask[i])&0xFF)){ + found=false; + return found; + } + } + return found; + } + + /** + * Adds a ERO Subobject associated with a given domainId to the reachability table + * @param domainId Domain ID + * @param eroso ERO Subobject + */ + public void addEROSubobject(Inet4Address domainId, EROSubobject eroso ){ + if (eroso.getType()==SubObjectValues.ERO_SUBOBJECT_IPV4PREFIX){ + log.info("Adding IPv4 ERO Subobject to the Reachability Database"); + IPv4prefixEROSubobject ipv4eroso=(IPv4prefixEROSubobject)eroso; + //long mask=(long)0xFFFFFFFF-(long)Math.pow(2, 32-ipv4eroso.getPrefix())-1; + log.info("prefix "+ipv4eroso.getPrefix()); + long resta=((long)0x1<>>24 & 0xFF); + mask[1]=(byte)(maskLong>>>16 & 0xFF); + mask[2]=(byte)(maskLong>>>8 & 0xFF); + mask[3]=(byte)(maskLong& 0xFF); + log.info("mask: "+(mask[0]&0xFF)+"."+(mask[1]&0xFF)+"."+(mask[2]&0xFF)+"."+(mask[3]&0xFF)); + log.info("Domain ID: "+domainId+" mask "+mask+" IPv4 Address: "+ipv4eroso.getIpv4address());//Pasar a FINE + addIPv4Entry(domainId,mask,ipv4eroso.getIpv4address(),ipv4eroso.getPrefix()); + } + + } + + private void addIPv4Entry(Inet4Address domainId,byte [] mask,Inet4Address aggregatedIPRange,int prefix){ + ReachabilityEntry ra=new ReachabilityEntry(); + ra.aggregatedIPRange=aggregatedIPRange; + ra.mask=mask; + ra.domainId=domainId; + ra.prefix=prefix; + if (!(reachability.contains(ra))){ + reachability.add(ra); + } + return; + } + + /** + * Print the reachability table + * @return String with the reachability information + */ + public String printReachability(){ + String reachabilityString; + Iterator reachabIterator=reachability.iterator(); + reachabilityString="Reachability entries: \r\n"; + while (reachabIterator.hasNext()){ + ReachabilityEntry entry= reachabIterator.next(); + reachabilityString=reachabilityString+"\t"+entry.toString()+"\r\n"; + } + + return reachabilityString; + } + + public LinkedList getReachability() { + return reachability; + } + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONInformation.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONInformation.java new file mode 100644 index 0000000000000000000000000000000000000000..78a234ee1320a463b7fd7cbea4d3c3d591fde159 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONInformation.java @@ -0,0 +1,88 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; + +/** + * Label information in the special case of a Switched Spectrum Optical Network based on Flexgrid. + * @author amll + * + */ + +public class SSONInformation { + /** + * In case the Network is SSON, this is the list of available Labels + */ + private AvailableLabels commonAvailableLabels; + + /** + * In case the Network is SSON, this is the number of wavelengths. -1 means it is not WSON. + */ + private int numLambdas=-1; + /** + * Spectral Grid of the optical network. + */ + public int grid=0; + /** + * Channel Spacing + */ + public int cs=0; + /** + * Minimum central frequency available in the spectral grid available to be assigned to a LSP. + */ + public int nMin=0; + + public int getGrid() { + return grid; + } + + public void setGrid(int grid) { + this.grid = grid; + } + + public int getCs() { + return cs; + } + + public void setCs(int cs) { + this.cs = cs; + } + + + public int getnMin() { + return nMin; + } + + public void setnMin(int nMin) { + this.nMin = nMin; + } + + public AvailableLabels getCommonAvailableLabels() { + return commonAvailableLabels; + } + + public void setCommonAvailableLabels(AvailableLabels commonAvailableLabels) { + this.commonAvailableLabels = commonAvailableLabels; + } + + public int getNumLambdas() { + return numLambdas; + } + + public void setNumLambdas(int numLambdas) { + this.numLambdas = numLambdas; + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONListener.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONListener.java new file mode 100644 index 0000000000000000000000000000000000000000..22b91b98614f9256a7b829a6196c43e3e161a996 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONListener.java @@ -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. + +package eu.teraflow.tid.tedb; + +import java.util.LinkedList; + +public interface SSONListener extends TEDListener{ + + public void notifyWavelengthReservationSSON(LinkedList sourceVertexList, + LinkedList targetVertexList, int wavelength, int m); + + void notifyWavelengthEndReservationSSON( + LinkedList sourceVertexList, + LinkedList targetVertexList, int wavelength, int m); + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SimpleTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SimpleTEDB.java new file mode 100644 index 0000000000000000000000000000000000000000..4e74e445b04ba27e04bfbe2ecdab8d2672bcb468 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SimpleTEDB.java @@ -0,0 +1,786 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import java.net.Inet4Address; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.Set; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.jgrapht.graph.SimpleDirectedWeightedGraph; + +import es.tid.of.DataPathID; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet; + +/** + * Traffic Engineering Database of a Domain. + * + * + * @author ogondio, mcs, b.mvas + * + */ +public class SimpleTEDB implements DomainTEDB{ + + private Inet4Address domainID; + + private IT_Resources itResources; + + /** + * List of algorithms that will be notified when there are significant changes in the TED + */ + private ArrayList registeredAlgorithms; + /** + * List of algorithms SSON that will be notified when there are significant changes in the TED + */ + private ArrayList registeredAlgorithmssson; + /** + * Graph of the Network + */ + private SimpleDirectedWeightedGraph networkGraph; + + /** + * List of interdomain Links + */ + private LinkedList interDomainLinks = new LinkedList(); + + /* + * List of Intradomain Edges + * Please, It's not the same as intraDomainLinks + * This has been created to support multiedges between two nodes + */ + private LinkedList intraDomainEdges = new LinkedList(); + + + /** + * Reachability information + */ + private ReachabilityEntry reachabilityEntry; + /** + * Information about the labels in a WSON network. + */ + private WSONInformation WSONinfo=null; + /** + * Information about the labels in a SSON network. + */ + private SSONInformation SSONinfo=null; + + private Lock TEDBlock; + + private Hashtable NodeTable; + + private boolean multidomain=false;//By default, the TED has only one domain + Logger log; + public SimpleTEDB(){ + log=LoggerFactory.getLogger("TEDBParser"); + registeredAlgorithms= new ArrayList(); + registeredAlgorithmssson= new ArrayList(); + TEDBlock=new ReentrantLock(); + NodeTable = new Hashtable(); + } + + public SimpleDirectedWeightedGraph getDuplicatedNetworkGraph(){ + SimpleDirectedWeightedGraph graphCopy; + TEDBlock.lock(); + try{ + graphCopy= (SimpleDirectedWeightedGraph) networkGraph.clone(); + } finally{ + TEDBlock.unlock(); + } + return graphCopy; + } + public void createGraph(){ + networkGraph = new SimpleDirectedWeightedGraph(IntraDomainEdge.class); + reachabilityEntry = new ReachabilityEntry(); + } + + public void initializeFromFile(String file){ + initializeFromFile(file, null, false,0,Integer.MAX_VALUE, false,false); + } + public void initializeFromFile(String file, String layer){ + initializeFromFile(file, layer, false,0,Integer.MAX_VALUE, false,false); + } + public void initializeFromFile(String file, String layer, boolean multidomain){ + initializeFromFile(file, layer, multidomain,0,Integer.MAX_VALUE, false,false); + } + public void initializeFromFile(String file, String layer, boolean multidomain, boolean isSSON){ + initializeFromFile(file, layer, multidomain,0,Integer.MAX_VALUE, isSSON,false); + } + public void initializeFromFile(String file, String layer, boolean multidomain,int lambdaIni, int lambdaEnd){ + initializeFromFile(file, layer, multidomain,0,Integer.MAX_VALUE, false,false); + } + public void initializeFromFile(String file, String layer, boolean multidomain, int lambdaIni, int lambdaEnd, boolean isSSON,boolean readOnlyInterDomainLinks){ + initializeFromFile( file, layer, multidomain, lambdaIni, lambdaEnd, isSSON, readOnlyInterDomainLinks, false); + } + + public void initializeFromFile(String file, String layer, boolean multidomain, int lambdaIni, int lambdaEnd, boolean isSSON,boolean readOnlyInterDomainLinks, boolean isWLAN){ + domainID=FileTEDBUpdater.getDomainIDfromSimpleDomain(file); + if (readOnlyInterDomainLinks){ + log.info("Read Only Inter Domain Links"); + networkGraph = new SimpleDirectedWeightedGraph(IntraDomainEdge.class); + if (!multidomain){ + interDomainLinks = FileTEDBUpdater.readInterDomainLinks(file); + } + reachabilityEntry = new ReachabilityEntry(); + if (!multidomain){ + FileTEDBUpdater.getDomainReachabilityFromFile(file,reachabilityEntry); + } + if((isSSON==true)&(!isWLAN)){ + SSONinfo = FileTEDBUpdater.getSSONInformation(file); + }else if (isWLAN) + { + + } + else + { + WSONinfo = FileTEDBUpdater.getWSONInformation(file); + } + }else{ + if((isSSON==true)&&(!isWLAN)){ + networkGraph=FileTEDBUpdater.readNetwork(file,layer, multidomain,lambdaIni,lambdaEnd, isSSON); + SSONinfo = FileTEDBUpdater.getSSONInformation(file); + } + else if (isWLAN) + { + networkGraph=FileTEDBUpdater.readNetwork(file,layer, multidomain,lambdaIni,lambdaEnd, isSSON); + } + else{ + networkGraph=FileTEDBUpdater.readNetwork(file,layer, multidomain,lambdaIni,lambdaEnd); + WSONinfo = FileTEDBUpdater.getWSONInformation(file); + } + // if (lambdaEnd!=Integer.MAX_VALUE){ + // notifyAlgorithms( lambdaIni, lambdaEnd); + // } + Iterator itervertex=networkGraph.vertexSet().iterator(); + + /** Se podrian sacar a una funcion externa ambos 'while' + * Rellenar info table + * Rellenar info edge + * Preguntar a Oscar + */ + while (itervertex.hasNext()) { + Object address = itervertex.next(); + Node_Info ni = new Node_Info(); + if (address instanceof Inet4Address){ + ni.setIpv4AddressLocalNode((Inet4Address)address); + ni.setIpv4Address((Inet4Address)address);//de momento asumimos que aprendemos ospf + } else if (address instanceof DataPathID) { + ni.setDataPathLocalNode((DataPathID)address); + } + ni.setLearntFrom("Fom XML"); + ni.setAs_number(domainID); + NodeTable.put(address, ni); + } + + Iterator iteredge=networkGraph.edgeSet().iterator(); + while (iteredge.hasNext()) { + IntraDomainEdge id = (IntraDomainEdge) iteredge.next(); + try{ + Inet4Address ipSource = (Inet4Address) (id.getSource()); + Inet4Address ipDest = (Inet4Address) (id.getTarget()); + id.setLearntFrom("From XML"); + Node_Info origin = new Node_Info(); + Node_Info destination = new Node_Info(); + origin.setIpv4AddressLocalNode(ipSource); + origin.setAs_number(domainID); + origin.setLearntFrom("FromXML"); + destination.setIpv4AddressLocalNode(ipDest); + destination.setAs_number(domainID); + destination.setLearntFrom("FromXML"); + id.setLocal_Node_Info(origin); + id.setRemote_Node_Info(destination); + NodeTable.get(ipSource).setSID(id.getSrc_sid()); + NodeTable.get(ipDest).setSID(id.getDst_sid()); + }catch (Exception e1){ + DataPathID dpSource = (DataPathID) (id.getSource()); + DataPathID dpDest = (DataPathID) (id.getTarget()); + id.setLearntFrom("From XML"); + Node_Info origin = new Node_Info(); + Node_Info destination = new Node_Info(); + origin.setDataPathLocalNode(dpSource); + origin.setAs_number(domainID); + origin.setLearntFrom("FromXML"); + destination.setDataPathLocalNode(dpDest); + destination.setAs_number(domainID); + destination.setLearntFrom("FromXML"); + id.setLocal_Node_Info(origin); + id.setRemote_Node_Info(destination); + //NodeTableDataPath.get(dpSource).setSID(id.getSrc_sid()); + //NodeTableDataPath.get(dpDest).setSID(id.getDst_sid()); + } + + } + } + + + if (!multidomain){ + interDomainLinks = FileTEDBUpdater.readInterDomainLinks(file); + } + else { + interDomainLinks = new LinkedList(); + } + reachabilityEntry = new ReachabilityEntry(); + if (!multidomain){ + FileTEDBUpdater.getDomainReachabilityFromFile(file,reachabilityEntry); + } + + Iterator edgeIt = interDomainLinks.iterator(); + while (edgeIt.hasNext()) { + InterDomainEdge id = (InterDomainEdge) edgeIt.next(); + try { + Inet4Address ipSource = (Inet4Address) (id.src_router_id); + Inet4Address ipDest = (Inet4Address) (id.dst_router_id); + id.setLearntFrom("From XML"); + Node_Info origin = new Node_Info(); + Node_Info destination = new Node_Info(); + origin.setIpv4AddressLocalNode(ipSource); + origin.setAs_number(domainID); + origin.setLearntFrom("FromXML"); + destination.setIpv4AddressLocalNode(ipDest); + destination.setAs_number((Inet4Address) id.domain_dst_router); + destination.setLearntFrom("FromXML"); + id.setLocal_Node_Info(origin); + id.setRemote_Node_Info(destination); + } catch (Exception e) { + DataPathID dpSource = (DataPathID) (id.src_router_id); + DataPathID dpDest = (DataPathID) (id.dst_router_id); + id.setLearntFrom("From XML"); + Node_Info origin = new Node_Info(); + Node_Info destination = new Node_Info(); + origin.setDataPathLocalNode(dpSource); + origin.setAs_number(domainID); + origin.setLearntFrom("FromXML"); + destination.setDataPathLocalNode(dpDest); + destination.setAs_number((Inet4Address) id.domain_dst_router); + destination.setLearntFrom("FromXML"); + id.setLocal_Node_Info(origin); + id.setRemote_Node_Info(destination); + } + } + + } + + public void notifyAlgorithms( int lambdaIni,int lambdaEnd){ + LinkedList ipListScr = new LinkedList (); + LinkedList ipListDst = new LinkedList (); + Set it =this.networkGraph.edgeSet(); + int numLabels=0; + for (IntraDomainEdge edge:it){ + numLabels=edge.TE_info.getAvailableLabels().getLabelSet().getNumLabels(); + for (int i=0;i getIntraDomainEdges() { + return intraDomainEdges; + } + + public void setIntraDomainEdges(LinkedList intraDomainEdges) { + this.intraDomainEdges = intraDomainEdges; + } + + public ReachabilityEntry getReachabilityEntry() { + return reachabilityEntry; + } + + public void setReachabilityEntry(ReachabilityEntry reachabilityEntry) { + this.reachabilityEntry = reachabilityEntry; + } + + public SimpleDirectedWeightedGraph getNetworkGraph() { + return networkGraph; + } + + public void setNetworkGraph( + SimpleDirectedWeightedGraph networkGraph) { + this.networkGraph = networkGraph; + } + + public LinkedList getInterDomainLinks() { + return interDomainLinks; + } + public void setInterDomainLinks(LinkedList interDomainLinks) { + this.interDomainLinks = interDomainLinks; + } + + /** + * Return true if scr and dst are linked by an InterDomainLink + * @param src Source + * @param dst Destination + * @return true if scr and dst are linked by an InterDomainLink + */ + public InterDomainEdge getInterdomainLink(Object src, Object dst){ + + int size = interDomainLinks.size(); + InterDomainEdge edge= new InterDomainEdge(src,dst); + for (int i=0;i vetexSet= networkGraph.vertexSet(); + Iterator vertexIterator=vetexSet.iterator(); + topoString="Nodes: \r\n"; + while (vertexIterator.hasNext()){ + Object vertex= vertexIterator.next(); + topoString=topoString+"\t"+vertex.toString()+"\r\n"; + } + topoString=topoString+"Node Information Table::: \r\n"+NodeTable.toString()+"\r\n"; + Set edgeSet= networkGraph.edgeSet(); + if (edgeSet != null){ + Iterator edgeIterator=edgeSet.iterator(); + topoString=topoString+"Intradomain Link list: \r\n"; + while (edgeIterator.hasNext()){ + IntraDomainEdge edge= edgeIterator.next(); + topoString=topoString+"\t"+edge.toString()+"\n"; + } + } + if (interDomainLinks != null) + topoString=topoString+printInterDomainLinks(); + return topoString; + } + + public String printInterDomainLinks(){ + String topoString=""; + + int size = interDomainLinks.size(); + log.info("Size of InterDomainLinks: "+size); + topoString="Interdomain Link list: \r\n"; + for (int i=0;i sourceVertexList,LinkedList targetVertexList,LinkedList wlans, boolean bidirectional) + { + TEDBlock.lock(); + try { + for (int i=0;i sourceVertexList, LinkedList targetVertexList, int wavelength, boolean bidirectional){ + TEDBlock.lock(); + try { + for (int i=0;i sourceVertexList, LinkedList targetVertexList, int wavelength, boolean bidirectional, int m){ + TEDBlock.lock(); + try { + for (int j=0;j<2*m;j++){ + for (int i=0;i sourceVertexList, LinkedList targetVertexList, int wavelength, boolean bidirectional, int m){ + // TODO Auto-generated method stub + //Delete the resource reservation + TEDBlock.lock(); + try { + for (int j=0;j<2*m;j++){ + for (int i=0;i graph= ted.getNetworkGraph(); + IntraDomainEdge edge=networkGraph.getEdge(sourceVertexList.get(i),targetVertexList.get(i) ); + edge.getTE_info().setWavelengthUnReserved(wavelength-m+j); + //log.info("Derreserving in TEDB: "+edge.toString()); + if (bidirectional == true) + { + edge=networkGraph.getEdge(targetVertexList.get(i), sourceVertexList.get(i)); + edge.getTE_info().setWavelengthUnReserved(wavelength-m+j); + //log.info("Derreserving in TEDB: "+edge.toString()); + } + } + } + }finally{ + TEDBlock.unlock(); + } + for (int i=0;i sourceVertexList, LinkedList targetVertexList, int wavelength, boolean bidirectional){ + // TODO Auto-generated method stub + //Delete the resource reservation + TEDBlock.lock(); + try { + for (int i=0;i graph= ted.getNetworkGraph(); + IntraDomainEdge edge=networkGraph.getEdge(sourceVertexList.get(i),targetVertexList.get(i) ); + edge.getTE_info().setWavelengthUnReserved(wavelength); + //log.info(""+edge.toString()); + if (bidirectional == true) + { + edge=networkGraph.getEdge(targetVertexList.get(i), sourceVertexList.get(i)); + edge.getTE_info().setWavelengthUnReserved(wavelength); + //log.info(""+edge.toString()); + } + } + }finally{ + TEDBlock.unlock(); + } + for (int i=0;i getNodeTable() { + return NodeTable; + } + + public void setNodeTable(Hashtable nodeTable) { + NodeTable = nodeTable; + } + + public boolean isMultidomain() { + return multidomain; + } + + public void setMultidomain(boolean multidomain) { + this.multidomain = multidomain; + } + + public void registerSSON (SSONListener algo){ + registeredAlgorithmssson.add(algo); + } + + public void register (TEDListener algo){ + registeredAlgorithms.add(algo); + } + + @Override + public void notifyWavelengthChange(Object localInterfaceIPAddress, Object remoteInterfaceIPAddress, BitmapLabelSet previousBitmapLabelSet, BitmapLabelSet newBitmapLabelSet) { + for (int i=0;i edgeSet= networkGraph.edgeSet(); + Iterator edgeIterator=edgeSet.iterator(); + while (edgeIterator.hasNext()){ + IntraDomainEdge edge= edgeIterator.next(); + edge.TE_info.setAllWavelengtshUnReserved(); + } + }finally{ + TEDBlock.unlock(); + } + for (int i=0;i vetexSet= networkGraph.vertexSet(); + Iterator vertexIterator=vetexSet.iterator(); + topoString="NodesFEO: \r\n"; + while (vertexIterator.hasNext()){ + Object vertex= vertexIterator.next(); + topoString=topoString+"\t"+vertex.toString()+"\r\n"; + } + topoString=topoString+"Intradomain Link list: \r\n"; + Set edgeSet= networkGraph.edgeSet(); + Iterator edgeIterator=edgeSet.iterator(); + while (edgeIterator.hasNext()){ + IntraDomainEdge edge= edgeIterator.next(); + topoString=topoString+"\t"+edge.toString()+"\r\n"; + } + return topoString; + } + + @Override + public Inet4Address getDomainID() { + // TODO Auto-generated method stub + return domainID; + } + + public void setDomainID(Inet4Address domainID) { + this.domainID = domainID; + } + + @Override + public Set getIntraDomainLinks() { + return this.getNetworkGraph().edgeSet(); + } + + public Set getIntraDomainLinksvertexSet() { + return this.getNetworkGraph().vertexSet(); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((domainID == null) ? 0 : domainID.hashCode()); + result = prime * result + ((intraDomainEdges == null) ? 0 : intraDomainEdges.hashCode()); + result = prime * result + ((networkGraph == null) ? 0 : networkGraph.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + SimpleTEDB other = (SimpleTEDB) obj; + if (intraDomainEdges == null) { + if (other.intraDomainEdges != null) + return false; + } else if (!intraDomainEdges.equals(other.intraDomainEdges)) + return false; + if (networkGraph == null) { + if (other.networkGraph != null) + return false; + } + for(Object v : networkGraph.vertexSet()){ + if(!other.networkGraph.containsVertex(v)) + return false; + } + + for(IntraDomainEdge e :networkGraph.edgeSet()){ + boolean flagEqual=false; + for(IntraDomainEdge otherE : other.networkGraph.edgeSet()){ + if(e.toString().equals(otherE.toString()))flagEqual=true; + } + if(flagEqual==false)return false; //edge not present in other + } + for(IntraDomainEdge e :other.networkGraph.edgeSet()){ + boolean flagEqual=false; + for(IntraDomainEdge otherE : networkGraph.edgeSet()){ + if(e.toString().equals(otherE.toString()))flagEqual=true; + } + if(flagEqual==false)return false; //edge not present in other + } + return true; + } + + public IT_Resources getItResources() { + return itResources; + } + + public void setItResources(IT_Resources itResources) { + this.itResources = itResources; + } + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDB.java new file mode 100644 index 0000000000000000000000000000000000000000..ca937a5aa603aefdd796c0165a33bdb419f0a6f6 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDB.java @@ -0,0 +1,37 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import java.util.LinkedList; + +/** + * Base Interface for a Generic Traffic Engineering Database + * @author ogondio + * + */ +public interface TEDB { + + public void initializeFromFile(String file); + + public void initializeFromFile(String file, String learnFrom); + + + public boolean isITtedb(); //FIXME: Remove! + + public String printTopology(); + + public LinkedList getInterDomainLinks(); + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDBUpdater.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDBUpdater.java new file mode 100644 index 0000000000000000000000000000000000000000..6b0aa6176e733704993686629d2bb5c7563957e7 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDBUpdater.java @@ -0,0 +1,19 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +public class TEDBUpdater { + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDListener.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDListener.java new file mode 100644 index 0000000000000000000000000000000000000000..ec1b2e650c56de37ed1289aa864c643a58134da2 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDListener.java @@ -0,0 +1,41 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import java.util.LinkedList; + +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet; + +public interface TEDListener { + + public void notifyNewVertex(Object vertex); + + public void notifyNewEdge(Object source, Object destination); + + public void notifyWavelengthStatusChange(Object source, Object destination, BitmapLabelSet previousBitmapLabelSet, BitmapLabelSet newBitmapLabelSet); + + public void notifyWavelengthReservation(LinkedList sourceVertexList, LinkedList targetVertexList, int wavelength); + + public void notifyWavelengthEndReservation(LinkedList sourceVertexList, LinkedList targetVertexList, int wavelength); + + public void notifyTEDBFullUpdate(); + + public void notifyNewEdgeIP(Object source, Object destination, TE_Information informationTEDB); + + public void notificationEdgeIP_AuxGraph(Object src, Object dst, TE_Information informationTEDB); + + public void notificationEdgeOPTICAL_AuxGraph(Object src, Object dst, int lambda); + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TE_Information.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TE_Information.java new file mode 100644 index 0000000000000000000000000000000000000000..f1842a6ced8f8788e6242c0e4d15805be48718eb --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TE_Information.java @@ -0,0 +1,679 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.DefaultTEMetricLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IPv4RouterIDLocalNodeLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IPv4RouterIDRemoteNodeLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.LinkProtectionTypeLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MF_OTPAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MetricLinkAttribTLV; +import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.TransceiverClassAndAppAttribTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.MinMaxUndirectionalLinkDelayDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalAvailableBandwidthDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalDelayVariationDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalLinkDelayDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalLinkLossDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalResidualBandwidthDescriptorSubTLV; +import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalUtilizedBandwidthDescriptorSubTLV; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AdministrativeGroup; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.IPv4RemoteASBRID; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.InterfaceSwitchingCapabilityDescriptor; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.LinkLocalRemoteIdentifiers; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.LinkProtectionType; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.MaximumBandwidth; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.MaximumReservableBandwidth; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.RemoteASNumber; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.SharedRiskLinkGroup; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.TrafficEngineeringMetric; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.UnreservedBandwidth; +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet; +import es.tid.rsvp.constructs.gmpls.DWDMWavelengthLabel; + +public class TE_Information { + + private TrafficEngineeringMetric trafficEngineeringMetric; + + private DefaultTEMetricLinkAttribTLV defaultTEMetric; + + private MaximumBandwidth maximumBandwidth; + + private MaximumReservableBandwidth maximumReservableBandwidth; + + private UnreservedBandwidth unreservedBandwidth; + + private AdministrativeGroup administrativeGroup; + + private LinkLocalRemoteIdentifiers linkLocalRemoteIdentifiers; + + private LinkProtectionType linkProtectionType; + + private LinkProtectionTypeLinkAttribTLV linkProtectionBGPLS; + + private InterfaceSwitchingCapabilityDescriptor interfaceSwitchingCapabilityDescriptor; + + private SharedRiskLinkGroup sharedRiskLinkGroup; + + private RemoteASNumber remoteASNumber; + + private IPv4RemoteASBRID iPv4RemoteASBRID; + + private IPv4RouterIDLocalNodeLinkAttribTLV iPv4LocalNode; + + private IPv4RouterIDRemoteNodeLinkAttribTLV iPv4RemoteNode; + + + private UndirectionalLinkDelayDescriptorSubTLV undirLinkDelay; + private MinMaxUndirectionalLinkDelayDescriptorSubTLV minMaxUndirLinkDelay; + private UndirectionalDelayVariationDescriptorSubTLV undirDelayVar; + private UndirectionalLinkLossDescriptorSubTLV undirLinkLoss; + private UndirectionalResidualBandwidthDescriptorSubTLV undirResidualBw; + private UndirectionalAvailableBandwidthDescriptorSubTLV undirAvailableBw; + private UndirectionalUtilizedBandwidthDescriptorSubTLV undirUtilizedBw; + + + private MetricLinkAttribTLV metric; + + private AvailableLabels availableLabels; + + private MF_OTPAttribTLV mfOTF; + + private TransceiverClassAndAppAttribTLV trans; + + private int NumberWLANs = 15; + + private boolean withWLANs = false; + + private boolean[] occupiedWLANs; + private boolean[] reservedWLANs; + + private boolean vlanLink = false; + + private int vlan; + + /** + * TEDB logger + */ + public TE_Information() + { + //initWLANs(); + } + + public AvailableLabels getAvailableLabels() { + return availableLabels; + } + + public void setAvailableLabels(AvailableLabels availableLabels) { + this.availableLabels = availableLabels; + } + + public TrafficEngineeringMetric getTrafficEngineeringMetric() { + return trafficEngineeringMetric; + } + + public void setTrafficEngineeringMetric( + TrafficEngineeringMetric trafficEngineeringMetric) { + this.trafficEngineeringMetric = trafficEngineeringMetric; + } + + public MaximumBandwidth getMaximumBandwidth() { + return maximumBandwidth; + } + + public void setMaximumBandwidth(MaximumBandwidth maximumBandwidth) { + this.maximumBandwidth = maximumBandwidth; + } + + public MaximumReservableBandwidth getMaximumReservableBandwidth() { + return maximumReservableBandwidth; + } + + public IPv4RouterIDRemoteNodeLinkAttribTLV getiPv4RemoteNode() { + return iPv4RemoteNode; + } + + public void setiPv4RemoteNode(IPv4RouterIDRemoteNodeLinkAttribTLV iPv4RemoteNode) { + this.iPv4RemoteNode = iPv4RemoteNode; + } + + public void setMaximumReservableBandwidth( + MaximumReservableBandwidth maximumReservableBandwidth) { + this.maximumReservableBandwidth = maximumReservableBandwidth; + } + + public UnreservedBandwidth getUnreservedBandwidth() { + return unreservedBandwidth; + } + + public void setUnreservedBandwidth(UnreservedBandwidth unreservedBandwidth) { + this.unreservedBandwidth = unreservedBandwidth; + } + + public UndirectionalLinkDelayDescriptorSubTLV getUndirLinkDelay() { + return undirLinkDelay; + } + + public void setUndirLinkDelay(UndirectionalLinkDelayDescriptorSubTLV undirLinkDelay) { + this.undirLinkDelay = undirLinkDelay; + } + + public MinMaxUndirectionalLinkDelayDescriptorSubTLV getMinMaxUndirLinkDelay() { + return minMaxUndirLinkDelay; + } + + public void setMinMaxUndirLinkDelay(MinMaxUndirectionalLinkDelayDescriptorSubTLV minMaxUndirLinkDelay) { + this.minMaxUndirLinkDelay = minMaxUndirLinkDelay; + } + + public UndirectionalDelayVariationDescriptorSubTLV getUndirDelayVar() { + return undirDelayVar; + } + + public void setUndirDelayVar(UndirectionalDelayVariationDescriptorSubTLV undirDelayVar) { + this.undirDelayVar = undirDelayVar; + } + + public UndirectionalLinkLossDescriptorSubTLV getUndirLinkLoss() { + return undirLinkLoss; + } + + public void setUndirLinkLoss(UndirectionalLinkLossDescriptorSubTLV undirLinkLoss) { + this.undirLinkLoss = undirLinkLoss; + } + + public UndirectionalResidualBandwidthDescriptorSubTLV getUndirResidualBw() { + return undirResidualBw; + } + + public void setUndirResidualBw(UndirectionalResidualBandwidthDescriptorSubTLV undirResidualBw) { + this.undirResidualBw = undirResidualBw; + } + + public UndirectionalAvailableBandwidthDescriptorSubTLV getUndirAvailableBw() { + return undirAvailableBw; + } + + public void setUndirAvailableBw(UndirectionalAvailableBandwidthDescriptorSubTLV undirAvailableBw) { + this.undirAvailableBw = undirAvailableBw; + } + + public UndirectionalUtilizedBandwidthDescriptorSubTLV getUndirUtilizedBw() { + return undirUtilizedBw; + } + + public void setUndirUtilizedBw(UndirectionalUtilizedBandwidthDescriptorSubTLV undirUtilizedBw) { + this.undirUtilizedBw = undirUtilizedBw; + } + + public AdministrativeGroup getAdministrativeGroup() { + return administrativeGroup; + } + + public void setAdministrativeGroup(AdministrativeGroup administrativeGroup) { + this.administrativeGroup = administrativeGroup; + } + + public LinkLocalRemoteIdentifiers getLinkLocalRemoteIdentifiers() { + return linkLocalRemoteIdentifiers; + } + + public void setLinkLocalRemoteIdentifiers( + LinkLocalRemoteIdentifiers linkLocalRemoteIdentifiers) { + this.linkLocalRemoteIdentifiers = linkLocalRemoteIdentifiers; + } + + public LinkProtectionType getLinkProtectionType() { + return linkProtectionType; + } + + public void setLinkProtectionType(LinkProtectionType linkProtectionType) { + this.linkProtectionType = linkProtectionType; + } + + public InterfaceSwitchingCapabilityDescriptor getInterfaceSwitchingCapabilityDescriptor() { + return interfaceSwitchingCapabilityDescriptor; + } + + public void setInterfaceSwitchingCapabilityDescriptor( + InterfaceSwitchingCapabilityDescriptor interfaceSwitchingCapabilityDescriptor) { + this.interfaceSwitchingCapabilityDescriptor = interfaceSwitchingCapabilityDescriptor; + } + + public SharedRiskLinkGroup getSharedRiskLinkGroup() { + return sharedRiskLinkGroup; + } + + public void setSharedRiskLinkGroup(SharedRiskLinkGroup sharedRiskLinkGroup) { + this.sharedRiskLinkGroup = sharedRiskLinkGroup; + } + + public RemoteASNumber getRemoteASNumber() { + return remoteASNumber; + } + + public void setRemoteASNumber(RemoteASNumber remoteASNumber) { + this.remoteASNumber = remoteASNumber; + } + + public IPv4RemoteASBRID getiPv4RemoteASBRID() { + return iPv4RemoteASBRID; + } + + public void setiPv4RemoteASBRID(IPv4RemoteASBRID iPv4RemoteASBRID) { + this.iPv4RemoteASBRID = iPv4RemoteASBRID; + } + + public int getNumberWLANs() { + return NumberWLANs; + } + + public void setNumberWLANs(int numberWLANs) { + NumberWLANs = numberWLANs; + } + + public boolean isWLANFree() + { + /* + for (int i = 0; i < reservedWLANs.length; i++) + { + if (reservedWLANs[i] == false) + { + return true; + } + } + return false; + */ + return true; + } + + public Integer getFreeWLAN() + { + for (int i = 0; i < reservedWLANs.length; i++) + { + if (reservedWLANs[i] == false) + { + return i; + } + } + return null; + } + + public void initWLANs() + { + withWLANs = true; + occupiedWLANs = new boolean[NumberWLANs]; + reservedWLANs = new boolean[NumberWLANs]; + for (int i = 0 ; i < NumberWLANs ; i++) + { + occupiedWLANs[i] = false; + reservedWLANs[i] = false; + } + } + + public void createBitmapLabelSet(int numLabels,int grid, int cs,int n){ + + createBitmapLabelSet(numLabels,grid,cs,n,0,numLabels); + } + public void createBitmapLabelSet(int numLabels,int grid, int cs,int n,int lambdaIni, int lambdaEnd){ + //FIXME: no hay problema de que se salga el ancho de banda + //log.info("Creamos bit map"); + BitmapLabelSet bitmapLabelSet = new BitmapLabelSet(); + DWDMWavelengthLabel dwdmWavelengthLabel = new DWDMWavelengthLabel(); + dwdmWavelengthLabel.setGrid(grid); + dwdmWavelengthLabel.setChannelSpacing(cs); + dwdmWavelengthLabel.setN(n); + bitmapLabelSet.setDwdmWavelengthLabel(dwdmWavelengthLabel); + + int numberBytes = getNumberBytes(numLabels); + + byte[] bytesBitMap = new byte[numberBytes]; + for (int i=0;i>>(num_wavelength%8))); + } + } + public void setWavelengthFree(int num_wavelength) + { + if (withWLANs) + { + occupiedWLANs[num_wavelength] = false; + reservedWLANs[num_wavelength] = false; + } + else + { + int num_byte=num_wavelength/8; + ((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitMap()[num_byte]=(byte)(((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitMap()[num_byte]&(0xFFFF7F>>>(num_wavelength%8))); + } + } + + public void setWavelengthReserved(int num_wavelength){ + if (withWLANs) + { + reservedWLANs[num_wavelength] = true; + } + else + { + int num_byte=num_wavelength/8; +// if ( this.getAvailableLabels()==null){ +// PCEServer.log.info("AvailableLabels ES NULL"); +// +// } +// if ( this.getAvailableLabels().getLabelSet()==null){ +// PCEServer.log.info("AvailableLabels LABEL SET ES NULL"); +// +// } +// if (((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()==null){ +// PCEServer.log.info("BytesBitmapReserved ES NULL"); +// +// } + + ((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()[num_byte]=(byte)((((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()[num_byte])|(0x80>>>(num_wavelength%8))); + } + } + + public void setWavelengthUnReserved(int num_wavelength){ + if (withWLANs) + { + reservedWLANs[num_wavelength] = false; + } + else + { + int num_byte=num_wavelength/8; + ((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()[num_byte]=(byte)(((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()[num_byte]&(0xFFFF7F>>>(num_wavelength%8))); + } + } + public void setAllWavelengtshUnReserved(){ + if (withWLANs) + { + for (int i = 0; i < reservedWLANs.length; i++) + { + reservedWLANs[i] = false; + } + } + else + { + int num_bytes=((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved().length; + for (int i=0;i>>(num_wavelength%8)))==0); + } + + } + public boolean isWavelengthUnreserved(int num_wavelength){//si es true esta unreserved + if (withWLANs) + { + return (!reservedWLANs[num_wavelength]); + } + else + { + int num_byte=num_wavelength/8; + if (((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()==null){ + return false; + } + else{ + return ((((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()[num_byte]&(0x80>>>(num_wavelength%8)))==0); + } + } + } + + + public String toString(){ + String ret=""; +// if (linkType!=null){ +// ret=ret+linkType.toString()+"\t"; +// } +// if (linkID!=null){ +// ret=ret+linkID.toString()+"\t"; +// } +// if (localInterfaceIPAddress!=null){ +// ret=ret+localInterfaceIPAddress.toString()+"\r\n"; +// } +// if (remoteInterfaceIPAddress!=null){ +// ret=ret+remoteInterfaceIPAddress.toString()+"\r\n"; +// } + + if (maximumBandwidth!=null){ + ret=ret+maximumBandwidth.toStringShort()+"\t"; + } + if (maximumReservableBandwidth!=null){ + ret=ret+maximumReservableBandwidth.toString()+"\t"; + } + + if (unreservedBandwidth!=null){ + ret=ret+unreservedBandwidth.toStringShort()+"\t"; + } + + if (administrativeGroup!=null){ + ret=ret+administrativeGroup.toString()+"\t"; + } + + if (remoteASNumber!=null){ + ret=ret+remoteASNumber.toString()+"\t"; + } + + if (iPv4RemoteASBRID!=null){ + ret=ret+iPv4RemoteASBRID.toString()+"\t"; + } + + if (availableLabels!= null){ + ret=ret+availableLabels.toString()+"\r\n"; + } + + if (iPv4LocalNode!=null){ + ret=ret+iPv4LocalNode.toString()+"\r\n"; + } + + if (iPv4RemoteNode!=null){ + ret=ret+iPv4RemoteNode.toString()+"\r\n"; + } + + if(linkProtectionBGPLS!=null){ + ret=ret+linkProtectionBGPLS.toString()+"\r\n"; + } + + if(trafficEngineeringMetric!=null){ + ret=ret+trafficEngineeringMetric.toString()+"\r\n"; + } + + if(metric!=null){ + ret=ret+metric.toString()+"\r\n"; + } + + if(defaultTEMetric!=null){ + ret=ret+defaultTEMetric.toString()+"\r\n"; + } + + if(this.mfOTF !=null){ + ret=ret+mfOTF.toString()+"\r\n"; + } + + + if(this.trans !=null){ + ret=ret+trans.toString()+"\r\n"; + } + if(undirLinkDelay!=null){ + ret=ret+undirLinkDelay.toString()+"\r\n"; + } + if(minMaxUndirLinkDelay!=null){ + ret=ret+minMaxUndirLinkDelay.toString()+"\r\n"; + } + if(undirDelayVar!=null){ + ret=ret+undirDelayVar.toString()+"\r\n"; + } + + if(undirLinkLoss!=null){ + ret=ret+undirLinkLoss.toString()+"\r\n"; + } + if(undirResidualBw!=null){ + ret=ret+undirResidualBw.toString()+"\r\n"; + } + if(undirAvailableBw!=null){ + ret=ret+undirAvailableBw.toString()+"\r\n"; + } + + if(undirUtilizedBw!=null){ + ret=ret+undirUtilizedBw.toString()+"\r\n"; + } + + return ret; + } + + public boolean isVlanLink() { + return vlanLink; + } + + public void setVlanLink(boolean vlanLink) { + this.vlanLink = vlanLink; + } + + public int getVlan() { + return vlan; + } + + public void setVlan(int vlan) { + this.vlan = vlan; + } + + public void setiPv4LocalNode(IPv4RouterIDLocalNodeLinkAttribTLV iPv4RouterIDLocalNode) { + this.iPv4LocalNode = iPv4RouterIDLocalNode; + } + public IPv4RouterIDLocalNodeLinkAttribTLV getiPv4LocalNode() { + return iPv4LocalNode; + } + + public MetricLinkAttribTLV getMetric() { + return metric; + } + + public void setMetric(MetricLinkAttribTLV metric) { + this.metric = metric; + } + + public LinkProtectionTypeLinkAttribTLV getLinkProtectionBGPLS() { + return linkProtectionBGPLS; + } + + public void setLinkProtectionBGPLS(LinkProtectionTypeLinkAttribTLV linkProtectionBGPLS) { + this.linkProtectionBGPLS = linkProtectionBGPLS; + } + + public DefaultTEMetricLinkAttribTLV getDefaultTEMetric() { + return defaultTEMetric; + } + + public void setDefaultTEMetric(DefaultTEMetricLinkAttribTLV defaultTEMetric) { + this.defaultTEMetric = defaultTEMetric; + } + + public MF_OTPAttribTLV getMfOTF() { + return mfOTF; + } + + public void setMfOTF(MF_OTPAttribTLV mfOTF) { + this.mfOTF = mfOTF; + } + + public TransceiverClassAndAppAttribTLV getTrans() { + return trans; + } + + public void setTrans(TransceiverClassAndAppAttribTLV trans) { + this.trans = trans; + } + + + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONInformation.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONInformation.java new file mode 100644 index 0000000000000000000000000000000000000000..2b344a342c320101bba2b21c3dc4a7b828022600 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONInformation.java @@ -0,0 +1,74 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels; + +public class WSONInformation { + /** + * In case the Network is WSON, this is the list of available Labels + */ + private AvailableLabels commonAvailableLabels; + + /** + * In case the Network is WSON, this is the number of wavelengths. -1 means it is not WSON. + */ + private int numLambdas=-1; + int grid=0; + int cs=0; + int nMin=0; + + public int getGrid() { + return grid; + } + + public void setGrid(int grid) { + this.grid = grid; + } + + public int getCs() { + return cs; + } + + public void setCs(int cs) { + this.cs = cs; + } + + + public int getnMin() { + return nMin; + } + + public void setnMin(int nMin) { + this.nMin = nMin; + } + + public AvailableLabels getCommonAvailableLabels() { + return commonAvailableLabels; + } + + public void setCommonAvailableLabels(AvailableLabels commonAvailableLabels) { + this.commonAvailableLabels = commonAvailableLabels; + } + + public int getNumLambdas() { + return numLambdas; + } + + public void setNumLambdas(int numLambdas) { + this.numLambdas = numLambdas; + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONListener.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONListener.java new file mode 100644 index 0000000000000000000000000000000000000000..a802fae9e029c34f91000d6d37866e81026f5a16 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONListener.java @@ -0,0 +1,19 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb; + +public interface WSONListener { + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterController.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterController.java new file mode 100644 index 0000000000000000000000000000000000000000..853aa217e264924c395b37439e53e528241f10a5 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterController.java @@ -0,0 +1,272 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.controllers; + +import java.io.File; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.Map; +import java.util.concurrent.locks.Lock; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; + +import org.jgrapht.graph.SimpleDirectedWeightedGraph; +import org.w3c.dom.CharacterData; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import eu.teraflow.tid.tedb.DomainTEDB; +import eu.teraflow.tid.tedb.IntraDomainEdge; +import eu.teraflow.tid.tedb.SimpleTEDB; +import eu.teraflow.tid.tedb.TE_Information; +import eu.teraflow.tid.tedb.elements.RouterInfoPM; + +/** + * + * @author jaume i la humiltat + * + * + * Class that receives a DomainTED and updates. Then it dies. + */ + +public class TEDUpdaterController extends Thread +{ + protected Hashtable interDomainLinks = new Hashtable(); + protected ArrayList ips = null; + protected ArrayList ports = null; + protected String topologyPathNodes = ""; + protected String topologyPathLinks = ""; + protected SimpleTEDB TEDB; + protected Logger log; + protected Lock lock = null; + protected String interDomainFile = null; + + public TEDUpdaterController(){}; + + public TEDUpdaterController(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log) + { + ips = new ArrayList(); + ports = new ArrayList(); + + ips.add(ip); + ports.add(port); + + this.topologyPathLinks = topologyPathLinks; + this.topologyPathNodes = topologyPathNodes; + this.TEDB = (SimpleTEDB)ted; + this.log = log; + } + + + public TEDUpdaterController(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log, Lock lock) + { + ips = new ArrayList(); + ports = new ArrayList(); + + ips.add(ip); + ports.add(port); + + this.topologyPathLinks = topologyPathLinks; + this.topologyPathNodes = topologyPathNodes; + this.TEDB = (SimpleTEDB)ted; + this.log = log; + this.lock = lock; + } + + public TEDUpdaterController(ArrayList ips, ArrayListports , String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log) + { + this.ips = ips; + this.ports = ports; + this.topologyPathLinks = topologyPathLinks; + this.topologyPathNodes = topologyPathNodes; + this.TEDB = (SimpleTEDB)ted; + this.log = log; + } + + public static void parseRemainingLinksFromXML(DomainTEDB TEDB, String interDomainFile) + { + Hashtable interDomainLinks = readInterDomainFile(interDomainFile); + Map map = interDomainLinks; + Iterator> it = map.entrySet().iterator(); + while (it.hasNext()) + { + Map.Entry entry = it.next(); + + MyEdge edgeAux = entry.getValue(); + + IntraDomainEdge edge= new IntraDomainEdge(); + edge.setSrc_if_id(new Long(edgeAux.source_port)); + edge.setDst_if_id(new Long(edgeAux.dest_port)); + + TE_Information tE_info = new TE_Information(); + tE_info.setNumberWLANs(15); + tE_info.initWLANs(); + + tE_info.setVlanLink(true); + tE_info.setVlan(edgeAux.vlan); + + edge.setTE_info(tE_info); + + + System.out.println("Adding InterDomain Edge!!::Vlan::"+edgeAux.vlan); + + + SimpleDirectedWeightedGraph sdwg = ((SimpleTEDB)TEDB).getNetworkGraph(); + if (!sdwg.containsVertex(new RouterInfoPM(edgeAux.source))) + { + sdwg.addVertex(new RouterInfoPM(edgeAux.source)); + } + + if (!sdwg.containsVertex(new RouterInfoPM(edgeAux.dest))) + { + sdwg.addVertex(new RouterInfoPM(edgeAux.dest)); + } + + + ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(new RouterInfoPM(edgeAux.source), new RouterInfoPM(edgeAux.dest), edge); + } + } + + + public static Hashtable readInterDomainFile(String interDomainFile) + { + System.out.println("Parsing intradomain File"); + Hashtable interDomainLinks = new Hashtable(); + try + { + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + File confFile = new File(interDomainFile); + Document doc = builder.parse(confFile); + + NodeList list_nodes_Edges = doc.getElementsByTagName("edge"); + System.out.println("num edges: " + list_nodes_Edges.getLength()); + for (int i = 0; i < list_nodes_Edges.getLength(); i++) + { + Element nodes_servers = (Element) list_nodes_Edges.item(i); + String source = getCharacterDataFromElement((Element) nodes_servers.getElementsByTagName("source").item(0)); + String dest = getCharacterDataFromElement((Element) nodes_servers.getElementsByTagName("dest").item(0)); + Integer vlan = Integer.parseInt(getCharacterDataFromElement((Element) nodes_servers.getElementsByTagName("vlan").item(0))); + String direction = getCharacterDataFromElement((Element) nodes_servers.getElementsByTagName("direction").item(0)); + int source_port = Integer.parseInt(getCharacterDataFromElement((Element) nodes_servers.getElementsByTagName("source_port").item(0))); + int dest_port = Integer.parseInt(getCharacterDataFromElement((Element) nodes_servers.getElementsByTagName("dest_port").item(0))); + + System.out.println("Adding IntraDomain Link! source: "+source+", dest: "+dest+", source_port: "+source_port+", dest_port: "+dest_port); + + MyEdge auxEdge = new TEDUpdaterController().new MyEdge(source, dest, vlan, source_port, dest_port); + interDomainLinks.put(auxEdge.hashCode(), auxEdge); + + if (direction.equals("bidirectional")) + { + MyEdge reverseEdge = new TEDUpdaterController().new MyEdge(dest, source, vlan, source_port, dest_port); + interDomainLinks.put(reverseEdge.hashCode(), reverseEdge); + } + } + } + catch (Exception e) + { + System.out.println(e.toString()); + } + + return interDomainLinks; + } + + private static String getCharacterDataFromElement(Element e) + { + Node child = e.getFirstChild(); + if (child instanceof CharacterData) + { + CharacterData cd = (CharacterData) child; + return cd.getData(); + } + else + { + return "?"; + } + } + + public class MyEdge + { + String source; + String dest; + Integer source_port; + Integer dest_port; + Integer vlan; + + MyEdge(String source, String dest) + { + this.source = source; + this.dest = dest; + } + + MyEdge(String source, String dest, Integer vlan, Integer source_port, Integer dest_port) + { + this.source = source; + this.dest = dest; + this.source_port = source_port; + this.dest_port = dest_port; + this.vlan = vlan; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((dest == null) ? 0 : dest.hashCode()); + result = prime * result + + ((source == null) ? 0 : source.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + MyEdge other = (MyEdge) obj; + if (dest == null) { + if (other.dest != null) + return false; + } else if (!dest.equals(other.dest)) + return false; + if (source == null) { + if (other.source != null) + return false; + } else if (!source.equals(other.source)) + return false; + return true; + } + + } + + public String getInterDomainFile() + { + return interDomainFile; + } + + public void setInterDomainFile(String interDomainFile) + { + this.interDomainFile = interDomainFile; + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterFloodlight.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterFloodlight.java new file mode 100644 index 0000000000000000000000000000000000000000..401e4bc9ca25017f1ceb3d8a32332965cbc60121 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterFloodlight.java @@ -0,0 +1,367 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.controllers; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.concurrent.locks.Lock; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; +import org.w3c.dom.CharacterData; +import org.w3c.dom.Element; +import org.w3c.dom.Node; + +import eu.teraflow.tid.tedb.DomainTEDB; +import eu.teraflow.tid.tedb.IntraDomainEdge; +import eu.teraflow.tid.tedb.SimpleTEDB; +import eu.teraflow.tid.tedb.TE_Information; +import eu.teraflow.tid.tedb.elements.RouterInfoPM; + +/** + * Thread that reads topology from Openflow controller and from XML if there are intradomain links + * @author jaume + * + */ + +public class TEDUpdaterFloodlight extends TEDUpdaterController +{ + public static String controllerName = "Floodlight"; + + + private String topologyPathLinks = "/wm/topology/links/json"; + private String topologyPathNodes = "/wm/core/controller/switches/json"; + + public TEDUpdaterFloodlight(String ip,String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log) + { + super(); + ips = new ArrayList(); + ports = new ArrayList(); + + ips.add(ip); + ports.add(port); + this.TEDB = (SimpleTEDB)ted; + this.log = log; + } + + public TEDUpdaterFloodlight(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log, Lock lock) + { + super( ip, port, topologyPathLinks, topologyPathNodes, ted, log, lock); + } + + public TEDUpdaterFloodlight(ArrayList ips, ArrayListports , String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log) + { + super(ips, ports , topologyPathLinks, topologyPathNodes, ted, log); + } + + + + + + + @Override + public void run() + { + + if(interDomainFile != null) + { + interDomainLinks = TEDUpdaterController.readInterDomainFile(interDomainFile); + } + + String responseLinks = ""; + String responseNodes = ""; + + try + { + //log.info("TopologyUpdaterWLAN thread, Updating TEDB"); + + Hashtable nodes = new Hashtable(); + + + log.info("ips.size():"+ips.size()); + + for (int i = 0; i < ips.size(); i++) + { + responseNodes = queryForNodes(ips.get(i), ports.get(i)); + parseNodes(responseNodes, nodes, ips.get(i), ports.get(i)); + log.info("responseNodes:::"+responseNodes); + } + + for (int i = 0; i < ips.size(); i++) + { + responseLinks = queryForLinks(ips.get(i), ports.get(i)); + + log.info("responseLinks:::"+responseLinks); + + lock(); + parseLinks(responseLinks, nodes); + unlock(); + + } + + + //parseJSON("[{\"src-switch\":\"00:14:2c:59:e5:5e:2b:00\",\"src-port\":20,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:64:21:00\",\"dst-port\":19,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:64:21:00\",\"src-port\":19,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:5e:2b:00\",\"dst-port\":20,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:66:ed:00\",\"src-port\":9,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:64:21:00\",\"dst-port\":20,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:64:21:00\",\"src-port\":20,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:66:ed:00\",\"dst-port\":9,\"dst-port-state\":0,\"type\":\"internal\"}]"); + //System.out.println(response); + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + + + private void parseNodes(String response, Hashtable routerInfoList, String ip, String port) + { + try + { + JSONParser parser = new JSONParser(); + Object obj = parser.parse(response); + + JSONArray msg = (JSONArray) obj; + Iterator iterator = msg.iterator(); + while (iterator.hasNext()) + { + JSONObject jsonObject = (JSONObject) iterator.next(); + + RouterInfoPM rInfo = new RouterInfoPM(); + rInfo.setMacAddress((String)jsonObject.get("mac")); + rInfo.setRouterID((String)jsonObject.get("dpid")); + rInfo.setControllerType(TEDUpdaterFloodlight.controllerName); + + + JSONArray ports = (JSONArray) jsonObject.get("ports"); + Iterator portIterator = ports.iterator(); + while (portIterator.hasNext()) + { + JSONObject jsonPortObject = (JSONObject) portIterator.next(); + rInfo.setMacAddress((String)jsonPortObject.get("hardwareAddress")); + } + + log.info("(String)((JSONObject)jsonObject.get(description)).get(manufacturer)::"+(String)((JSONObject)jsonObject.get("description")).get("manufacturer")); + rInfo.setRouterType((String)((JSONObject)jsonObject.get("description")).get("manufacturer")); + rInfo.setConfigurationMode("Openflow"); + + rInfo.setControllerIdentifier(ip, port); + rInfo.setControllerIP(ip); + rInfo.setControllerPort(port); + rInfo.setHardware((String)((JSONObject)jsonObject.get("description")).get("hardware")); + + routerInfoList.put(rInfo.getRouterID(),rInfo); + + + log.info("Adding Vertex::"+rInfo); + ((SimpleTEDB)TEDB).getNetworkGraph().addVertex(rInfo); + } + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + private void parseLinks(String links,Hashtable nodes) + { + try { + //log.info("Inside parseJSON"); + JSONParser parser = new JSONParser(); + Object obj = parser.parse(links); + + JSONArray msg = (JSONArray) obj; + Iterator iterator = msg.iterator(); + while (iterator.hasNext()) + { + JSONObject jsonObject = (JSONObject) iterator.next(); + //System.out.println(jsonObject.get("src-switch")); + IntraDomainEdge edge= new IntraDomainEdge(); + + RouterInfoPM source = nodes.get(jsonObject.get("src-switch")); + RouterInfoPM dest = nodes.get(jsonObject.get("dst-switch")); + + + //((SimpleTEDB)TEDB).getNetworkGraph().addVertex(source); + //((SimpleTEDB)TEDB).getNetworkGraph().addVertex(dest); + + log.info("Adding Vertex->"+source+" hashcode:"+source.hashCode()); + log.info("Adding Vertex->"+dest+" hashcode:"+dest.hashCode()); + + edge.setSrc_if_id((Long)jsonObject.get("src-port")); + edge.setDst_if_id((Long)jsonObject.get("dst-port")); + + + // This is a big problem because info is not initialized from file + // and the controller doesn't give information about how many wlans + // the are + + TE_Information tE_info = new TE_Information(); + tE_info.setNumberWLANs(15); + tE_info.initWLANs(); + + if (interDomainFile != null) + { + completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID()); + } + + edge.setTE_info(tE_info); + + String isBidirectional = (String)jsonObject.get("direction"); + + + + //log.info("isBidirectional::"+isBidirectional); + + if ((1==1)||(isBidirectional != null) && (isBidirectional.equals("bidirectional"))) + { + //((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); + + TE_Information tE_infoOtherWay = new TE_Information(); + tE_infoOtherWay.setNumberWLANs(15); + tE_infoOtherWay.initWLANs(); + IntraDomainEdge edgeOtherWay= new IntraDomainEdge(); + + edgeOtherWay.setSrc_if_id((Long)jsonObject.get("dst-port")); + edgeOtherWay.setDst_if_id((Long)jsonObject.get("src-port")); + edgeOtherWay.setTE_info(tE_infoOtherWay); + + ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); + ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(dest, source, edgeOtherWay); + + completeTE_Information(tE_info, dest.getRouterID(), source.getRouterID()); + + log.info("source::"+source); + log.info("dest::"+dest); + log.info("edgeOtherWay::"+edgeOtherWay); + log.info("edge::"+edge); + //log.info("Adding two!"); + } + else + { + ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); + } + + //log.info("Edge added:"+edge); + //log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString()); + } + //parseRemainingLinksFromXML(nodes); + + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + private void completeTE_Information(TE_Information tE_info, String source, String dest) + { + MyEdge auxEdge = new MyEdge(source, dest); + MyEdge completEdge = interDomainLinks.get(auxEdge.hashCode()); + if ((completEdge != null)&&(completEdge.vlan != null)) + { + tE_info.setVlanLink(true); + tE_info.setVlan(completEdge.vlan); + //If it has been found it will be removed so the rest can be proccessed later + interDomainLinks.remove(completEdge.vlan); + } + else + { + tE_info.setVlanLink(false); + } + } + + private String queryForLinks(String ip, String port) + { + String response = ""; + try + { + URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathLinks); + + //log.info("URL::"+"http://"+ip+":"+port+topologyPathLinks); + + URLConnection yc = topoplogyURL.openConnection(); + BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); + String inputLine; + + while ((inputLine = in.readLine()) != null) + { + response = response + inputLine; + } + } + catch (Exception e) + { + log.info(e.toString()); + } + return response; + } + + private String queryForNodes(String ip, String port) + { + String response = ""; + try + { + URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathNodes); + + log.info("http://+port+topologyPathNodes:::"+"http://"+ip+":"+port+topologyPathNodes); + + URLConnection yc = topoplogyURL.openConnection(); + BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); + + String inputLine; + while ((inputLine = in.readLine()) != null) + { + response = response + inputLine; + } + in.close(); + } + catch (Exception e) + { + log.info(e.toString()); + } + return response; + } + + private void lock() + { + if (lock != null) + { + lock.lock(); + } + } + + private void unlock() + { + if (lock != null) + { + lock.unlock(); + } + } + + private String getCharacterDataFromElement(Element e) { + Node child = e.getFirstChild(); + if (child instanceof CharacterData) { + CharacterData cd = (CharacterData) child; + return cd.getData(); + } else { + return "?"; + } + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterNOX.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterNOX.java new file mode 100644 index 0000000000000000000000000000000000000000..5b8e65f0c3dc751b6513a8248f6a445a721a78ce --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterNOX.java @@ -0,0 +1,419 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.controllers; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.concurrent.locks.Lock; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import eu.teraflow.tid.tedb.DomainTEDB; +import eu.teraflow.tid.tedb.IntraDomainEdge; +import eu.teraflow.tid.tedb.SimpleTEDB; +import eu.teraflow.tid.tedb.TE_Information; +import eu.teraflow.tid.tedb.elements.RouterInfoPM; + +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; + +public class TEDUpdaterNOX extends TEDUpdaterController +{ + public static String controllerName = "NOX"; + private Hashtable interDomainLinks = new Hashtable(); + + + //Overwritten father variables and fixing the topology urls in code + private String topologyPathNodes = "/get_vtopology/"; + private String topologyPathLinks = "/get_graph/";//?? + + public TEDUpdaterNOX(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log) + { + super( ip, port, topologyPathLinks, topologyPathNodes, ted, log); + } + + public TEDUpdaterNOX(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log, Lock lock) + { + super( ip, port, topologyPathLinks, topologyPathNodes, ted, log, lock); + } + + public TEDUpdaterNOX(ArrayList ips, ArrayListports , String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log) + { + super(ips, ports , topologyPathLinks, topologyPathNodes, ted, log); + } + + + @Override + public void run() + { + + if(interDomainFile != null) + { + interDomainLinks = TEDUpdaterController.readInterDomainFile(interDomainFile); + } + + String responseLinks = ""; + String responseNodes = ""; + + try + { + + Hashtable nodes = new Hashtable(); + + for (int i = 0; i < ips.size(); i++) + { + responseNodes = queryForNodes(ips.get(i), ports.get(i));//query for topology + parseNodes(responseNodes, nodes, ips.get(i), ports.get(i)); + log.info("responseNodes:::"+responseNodes); + } + + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + + private String BristoltoFloodlight(String BristolFormat) + { + String floodFormat = new String(BristolFormat); + //Por algo se me conoce como el hacker + for (int i = 2; i < floodFormat.length(); i += 3) + { + floodFormat = floodFormat.substring(0, i) + ":" + floodFormat.substring(i, floodFormat.length()); + } + log.info("BristolFormat--> " + BristolFormat + ", floodFormat-->" + floodFormat); + return floodFormat; + } + + private void parseNodes(String response, Hashtable routerInfoList, String ip, String port) + { + try + { + JSONParser parser = new JSONParser(); + Object obj = parser.parse(response); + + JSONObject jsonaux=(JSONObject) obj; + Iterator iterkeys=jsonaux.keySet().iterator(); + Hashtable nodes= new Hashtable(); + while (iterkeys.hasNext()) { + String dpid = iterkeys.next(); + System.out.println("Key: "+dpid.replace("-", ":")); + RouterInfoPM rInfo = new RouterInfoPM(); + + rInfo.setRouterID(dpid.replace("-", ":"));//Bristol to floodlight? + rInfo.setConfigurationMode("Openflow"); + rInfo.setControllerType(TEDUpdaterNOX.controllerName); + + rInfo.setControllerIdentifier(ip, port); + rInfo.setControllerIP(ip); + rInfo.setControllerPort(port); + + routerInfoList.put(rInfo.getRouterID(),rInfo); + nodes.put(dpid.replace("-", ":"),rInfo); + ((SimpleTEDB)TEDB).getNetworkGraph().addVertex(rInfo); + } + //Getting Links + Iterator nodeiter=nodes.keySet().iterator(); + while (nodeiter.hasNext()){ + String node= nodeiter.next(); + parseLinks(node, (String)jsonaux.get(node.replace(":", "-")).toString(), nodes); + } + //parseLinks(dpid, jsonarray) + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + private void parseLinks(String dpid,String links, Hashtable nodes) + { + try { + //log.info("Inside parseJSON"); + JSONParser parser = new JSONParser(); + Object obj = parser.parse(links); + + JSONArray msg = (JSONArray) obj; + Iterator iterator = msg.iterator(); + while (iterator.hasNext()) + { + JSONObject jsonObject = (JSONObject) iterator.next(); + //System.out.println(jsonObject.get("src-switch")); + IntraDomainEdge edge= new IntraDomainEdge(); + + String labels = (String) jsonObject.get("labels");//?? + String destnode = ((String) jsonObject.get("peer_node")).replace("-", ":"); + String type = (String) jsonObject.get("port_type"); + + RouterInfoPM source = nodes.get(dpid); + RouterInfoPM dest = nodes.get(destnode); + + //((SimpleTEDB)TEDB).getNetworkGraph().addVertex(source); + //((SimpleTEDB)TEDB).getNetworkGraph().addVertex(dest); + + System.out.println("Srcnode: "+dpid); + System.out.println("Dstnode: "+destnode); + + System.out.println("Srcport: "+jsonObject.get("port_id")); + System.out.println("Dstport: "+jsonObject.get("peer_port")); + + if ((dest!= null)&&(source!=null)){ + + + edge.setSrc_if_id(Long.parseLong((String)jsonObject.get("port_id"))); + edge.setDst_if_id(Long.parseLong((String)jsonObject.get("peer_port"))); + + edge.setType(type); + + // This is a big problem because info is not initialized from file + // and the controller doesn't give information about how many wlans + // the are + + TE_Information tE_info = new TE_Information(); + System.out.println("Labels: Original ("+labels+") and Parsed ("+labels.substring(labels.indexOf(",")+1,labels.indexOf("]"))+")"); + tE_info.setNumberWLANs(Integer.parseInt(labels.substring(labels.indexOf(",")+1,labels.indexOf("]")))); + tE_info.initWLANs(); + + if (interDomainFile != null) + { + completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID()); + } + + edge.setTE_info(tE_info); + + + edge.setDirectional(true); + //Bidirectional case? See other TEDUpdaters. + + ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); + + } else { + System.out.println("Link with an unknown node. Ingnoring..."); + } + //log.info("Edge added:"+edge); + //log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString()); + } + //parseRemainingLinksFromXML(nodes); + + + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + +// private void parseLinks(String links,Hashtable nodes) +// { +// try { +// //log.info("Inside parseJSON"); +// JSONParser parser = new JSONParser(); +// Object obj = parser.parse(links); +// +// JSONArray msg = (JSONArray) obj; +// Iterator iterator = msg.iterator(); +// while (iterator.hasNext()) +// { +// JSONObject jsonObject = (JSONObject) iterator.next(); +// //System.out.println(jsonObject.get("src-switch")); +// IntraDomainEdge edge= new IntraDomainEdge(); +// +// JSONObject jsonObject_src = (JSONObject) jsonObject.get("src"); +// JSONObject jsonObject_dst = (JSONObject) jsonObject.get("dst"); +// +// RouterInfoPM source = nodes.get(BristoltoFloodlight((String)jsonObject_src.get("dpid"))); +// RouterInfoPM dest = nodes.get(BristoltoFloodlight((String)jsonObject_dst.get("dpid"))); +// +// //((SimpleTEDB)TEDB).getNetworkGraph().addVertex(source); +// //((SimpleTEDB)TEDB).getNetworkGraph().addVertex(dest); +// +// log.info("Adding Vertex->"+source+" hashcode:"+source.hashCode()); +// log.info("Adding Vertex->"+dest+" hashcode:"+dest.hashCode()); +// +// edge.setSrc_if_id((Long)jsonObject_src.get("port_no")); +// edge.setDst_if_id((Long)jsonObject_dst.get("port_no")); +// +// +// // This is a big problem because info is not initialized from file +// // and the controller doesn't give information about how many wlans +// // the are +// +// TE_Information tE_info = new TE_Information(); +// tE_info.setNumberWLANs(15); +// tE_info.initWLANs(); +// +// if (interDomainFile != null) +// { +// completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID()); +// } +// +// edge.setTE_info(tE_info); +// +// String isBidirectional = (String)jsonObject.get("direction"); +// +// +// // En Bristol los enlaces son unidirecctionales, pero asumimos que hay uno en una direccion +// // esta el otro +// isBidirectional = "bidirectional"; +// +// //log.info("isBidirectional::"+isBidirectional); +// +// if ((1==1)||(isBidirectional != null) && (isBidirectional.equals("bidirectional"))) +// { +// //((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); +// +// TE_Information tE_infoOtherWay = new TE_Information(); +// tE_infoOtherWay.setNumberWLANs(15); +// tE_infoOtherWay.initWLANs(); +// IntraDomainEdge edgeOtherWay= new IntraDomainEdge(); +// +// edgeOtherWay.setSrc_if_id((Long)jsonObject_src.get("port_no")); +// edgeOtherWay.setDst_if_id((Long)jsonObject_dst.get("port_no")); +// edgeOtherWay.setTE_info(tE_infoOtherWay); +// +// ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); +// ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(dest, source, edgeOtherWay); +// +// completeTE_Information(tE_info, dest.getRouterID(), source.getRouterID()); +// +// log.info("source::"+source); +// log.info("dest::"+dest); +// log.info("edgeOtherWay::"+edgeOtherWay); +// log.info("edge::"+edge); +// //log.info("Adding two!"); +// } +// else +// { +// ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); +// } +// +// //log.info("Edge added:"+edge); +// //log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString()); +// } +// //parseRemainingLinksFromXML(nodes); +// +// +// } +// catch (Exception e) +// { +// log.info(UtilsFunctions.exceptionToString(e)); +// } +// } + + private void completeTE_Information(TE_Information tE_info, String source, String dest) + { + MyEdge auxEdge = new MyEdge(source, dest); + MyEdge completEdge = interDomainLinks.get(auxEdge.hashCode()); + if ((completEdge != null)&&(completEdge.vlan != null)) + { + tE_info.setVlanLink(true); + tE_info.setVlan(completEdge.vlan); + //If it has been found it will be removed so the rest can be proccessed later + interDomainLinks.remove(completEdge.vlan); + } + else + { + tE_info.setVlanLink(false); + } + } + + private String queryForLinks(String ip, String port) + { + String response = ""; + try + { + URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathLinks); + + log.info("URL::"+"http://"+ip+":"+port+topologyPathLinks); + + URLConnection yc = topoplogyURL.openConnection(); + BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); + String inputLine; + + while ((inputLine = in.readLine()) != null) + { + response = response + inputLine; + } + } + catch (Exception e) + { + log.info(e.toString()); + } + return response; + } + + private String queryForNodes(String ip, String port) + { + String response = ""; + try + { + URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathNodes); + + log.info("http://+port+topologyPathNodes:::"+"http://"+ip+":"+port+topologyPathNodes); + + URLConnection yc = topoplogyURL.openConnection(); + BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); + + String inputLine; + while ((inputLine = in.readLine()) != null) + { + response = response + inputLine; + } + in.close(); + } + catch (Exception e) + { + log.info(e.toString()); + } + return response; + } + + public String getInterDomainFile() + { + return interDomainFile; + } + + public void setInterDomainFile(String interDomainFile) + { + this.interDomainFile = interDomainFile; + } + + + private void lock() + { + if (lock != null) + { + lock.lock(); + } + } + + private void unlock() + { + if (lock != null) + { + lock.unlock(); + } + } +} + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterODL.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterODL.java new file mode 100644 index 0000000000000000000000000000000000000000..1bdbc624d06482763638af631e906ce483d9fc3d --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterODL.java @@ -0,0 +1,351 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.controllers; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.concurrent.locks.Lock; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; +import org.w3c.dom.CharacterData; +import org.w3c.dom.Element; +import org.w3c.dom.Node; + +import eu.teraflow.tid.tedb.DomainTEDB; +import eu.teraflow.tid.tedb.IntraDomainEdge; +import eu.teraflow.tid.tedb.SimpleTEDB; +import eu.teraflow.tid.tedb.TE_Information; +import eu.teraflow.tid.tedb.elements.RouterInfoPM; + + + +/** + * Thread that reads topology from Openflow controller and from XML if there are intradomain links + * @author jaume + * + */ + +public class TEDUpdaterODL extends TEDUpdaterController +{ + public static String controllerName = "ODL"; + + + private String topologyPathLinks = "/controller/nb/v2/topology/default"; + private String topologyPathNodes = "/controller/nb/v2/switchmanager/default/nodes"; + + public TEDUpdaterODL(String ip,String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log) + { + super(); + ips = new ArrayList(); + ports = new ArrayList(); + + ips.add(ip); + ports.add(port); + this.TEDB = (SimpleTEDB)ted; + this.log = log; + } + + public TEDUpdaterODL(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log, Lock lock) + { + super( ip, port, topologyPathLinks, topologyPathNodes, ted, log, lock); + } + + public TEDUpdaterODL(ArrayList ips, ArrayListports , String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log) + { + super(ips, ports , topologyPathLinks, topologyPathNodes, ted, log); + } + + + + + + + @Override + public void run() + { + + if(interDomainFile != null) + { + interDomainLinks = TEDUpdaterController.readInterDomainFile(interDomainFile); + } + + String responseLinks = ""; + String responseNodes = ""; + + try + { + + Hashtable nodes = new Hashtable(); + + + log.info("ips.size():"+ips.size()); + log.info("ODL updates_______________________________________________________START____"); + for (int i = 0; i < ips.size(); i++) + { + responseNodes = queryForNodes(ips.get(i), ports.get(i)); + parseNodes(responseNodes, nodes, ips.get(i), ports.get(i)); + } + + for (int i = 0; i < ips.size(); i++) + { + responseLinks = queryForLinks(ips.get(i), ports.get(i)); + lock(); + parseLinks(responseLinks, nodes); + unlock(); + + } + log.info("ODL updates_______________________________________________________END____"); + + + //parseJSON("[{\"src-switch\":\"00:14:2c:59:e5:5e:2b:00\",\"src-port\":20,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:64:21:00\",\"dst-port\":19,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:64:21:00\",\"src-port\":19,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:5e:2b:00\",\"dst-port\":20,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:66:ed:00\",\"src-port\":9,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:64:21:00\",\"dst-port\":20,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:64:21:00\",\"src-port\":20,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:66:ed:00\",\"dst-port\":9,\"dst-port-state\":0,\"type\":\"internal\"}]"); + //System.out.println(response); + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + + + private void parseNodes(String response, Hashtable routerInfoList, String ip, String port) + { + try + { + JSONParser parser = new JSONParser(); + Object obj = parser.parse(response); + + JSONArray msg = (JSONArray) ((JSONObject) obj).get("nodeProperties"); + Iterator iterator = msg.iterator(); + while (iterator.hasNext()) + { + JSONObject jsonObject = iterator.next(); + + RouterInfoPM rInfo = new RouterInfoPM(); + + String dpid = (String) (((JSONObject) jsonObject.get("node")).get("id")); + + rInfo.setRouterID(dpid); + rInfo.setConfigurationMode("Openflow"); + rInfo.setControllerType(TEDUpdaterODL.controllerName); + rInfo.setControllerIdentifier(ip, port); + rInfo.setControllerIP(ip); + rInfo.setControllerPort(port); + + routerInfoList.put(rInfo.getRouterID(),rInfo); + log.info("Adding Vertex::"+rInfo); + ((SimpleTEDB)TEDB).getNetworkGraph().addVertex(rInfo); + + + + } + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + private void parseLinks(String links,Hashtable nodes) + { + try { + JSONParser parser = new JSONParser(); + Object obj = parser.parse(links); + + JSONArray msg = (JSONArray) ((JSONObject) obj).get("edgeProperties"); + Iterator iterator = msg.iterator(); + while (iterator.hasNext()) + { + JSONObject jsonObject = (JSONObject) iterator.next().get("edge"); + JSONObject jSrc = (JSONObject) jsonObject.get("headNodeConnector"); + JSONObject jDst = (JSONObject) jsonObject.get("tailNodeConnector"); + + + + IntraDomainEdge edge= new IntraDomainEdge(); + + RouterInfoPM source = nodes.get(((JSONObject) jSrc.get("node")).get("id"));// jsonObject.get("src-switch")); + RouterInfoPM dest = nodes.get(((JSONObject) jDst.get("node")).get("id"));// jsonObject.get("dst-switch")); + + + + edge.setSrc_if_id(Long.parseLong((String)jSrc.get("id"))); //jsonObject.get("src-port")); + edge.setDst_if_id(Long.parseLong((String)jDst.get("id"))); //jsonObject.get("dst-port")); + + // This is a big problem because info is not initialized from file + // and the controller doesn't give information about how many wlans + // the are + + TE_Information tE_info = new TE_Information(); + tE_info.setNumberWLANs(15); + tE_info.initWLANs(); + + if (interDomainFile != null) + { + completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID()); + } + + edge.setTE_info(tE_info); + + String isBidirectional = (String)jsonObject.get("direction"); + + + + //log.info("isBidirectional::"+isBidirectional); + + if ((1==1)||(isBidirectional != null) && (isBidirectional.equals("bidirectional"))) + { + //((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); + + TE_Information tE_infoOtherWay = new TE_Information(); + tE_infoOtherWay.setNumberWLANs(15); + tE_infoOtherWay.initWLANs(); + IntraDomainEdge edgeOtherWay= new IntraDomainEdge(); + + edgeOtherWay.setSrc_if_id(Long.parseLong((String)jDst.get("id"))); + edgeOtherWay.setDst_if_id(Long.parseLong((String)jSrc.get("id"))); + edgeOtherWay.setTE_info(tE_infoOtherWay); + + ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); + ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(dest, source, edgeOtherWay); + + completeTE_Information(tE_info, dest.getRouterID(), source.getRouterID()); + + log.info("________EDGE_____"); + log.info("source::"+source); + log.info("dest::"+dest); + log.info("edgeOtherWay::"+edgeOtherWay); + log.info("edge::"+edge); + log.info("--------EDGE-----"); + } + else + { + ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); + } + + //log.info("Edge added:"+edge); + //log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString()); + } + //parseRemainingLinksFromXML(nodes); + + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + private void completeTE_Information(TE_Information tE_info, String source, String dest) + { + MyEdge auxEdge = new MyEdge(source, dest); + MyEdge completEdge = interDomainLinks.get(auxEdge.hashCode()); + if ((completEdge != null)&&(completEdge.vlan != null)) + { + tE_info.setVlanLink(true); + tE_info.setVlan(completEdge.vlan); + //If it has been found it will be removed so the rest can be proccessed later + interDomainLinks.remove(completEdge.vlan); + } + else + { + tE_info.setVlanLink(false); + } + } + + private String queryForLinks(String ip, String port) + { + return query("http://"+ip+":"+port+topologyPathLinks); + } + + private String queryForNodes(String ip, String port) + { + return query("http://"+ip+":"+port+topologyPathNodes); + } + + private String query(String url) + { + log.info("Attempting to curl: "+url); + String response = ""; + try + { + String credentials = "admin:admin"; + String credentialsEncoded = "YWRtaW46YWRtaW4="; + + URL topoplogyURL = new URL(url); + URLConnection yc = topoplogyURL.openConnection(); + + HttpURLConnection httpcon = (HttpURLConnection) yc; + httpcon.setDoOutput(true); + httpcon.setRequestProperty("Content-Type", "application/json"); + httpcon.setRequestProperty("Authorization", "Basic "+credentialsEncoded); + + BufferedReader in = new BufferedReader( + new InputStreamReader( + httpcon.getInputStream())); + String inputLine; + + while ((inputLine = in.readLine()) != null) + { + response = response + inputLine; + } + in.close(); + return response; + } + catch (Exception e) + { + log.info(e.toString()); + } + + return ""; + + } + + + private void lock() + { + if (lock != null) + { + lock.lock(); + } + } + + private void unlock() + { + if (lock != null) + { + lock.unlock(); + } + } + + private String getCharacterDataFromElement(Element e) { + Node child = e.getFirstChild(); + if (child instanceof CharacterData) { + CharacterData cd = (CharacterData) child; + return cd.getData(); + } else { + return "?"; + } + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterRYU.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterRYU.java new file mode 100644 index 0000000000000000000000000000000000000000..74b0a1f4e6b9e3dda9d7163c739e2df820b7332e --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterRYU.java @@ -0,0 +1,355 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.controllers; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.concurrent.locks.Lock; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import eu.teraflow.tid.tedb.DomainTEDB; +import eu.teraflow.tid.tedb.IntraDomainEdge; +import eu.teraflow.tid.tedb.SimpleTEDB; +import eu.teraflow.tid.tedb.TE_Information; +import eu.teraflow.tid.tedb.elements.RouterInfoPM; + +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; + +/** + * Thread that reads topology from Openflow controller and from XML if there are intradomain links + * @author jaume + * + */ + + +public class TEDUpdaterRYU extends TEDUpdaterController +{ + public static String controllerName = "RYU"; + private Hashtable interDomainLinks = new Hashtable(); + + + //Overwritten father variables and fixing the topology urls in code + private String topologyPathNodes = "/v1.0/topology/switches"; + private String topologyPathLinks = "/v1.0/topology/links"; + + public TEDUpdaterRYU(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log) + { + super( ip, port, topologyPathLinks, topologyPathNodes, ted, log); + } + + public TEDUpdaterRYU(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log, Lock lock) + { + super( ip, port, topologyPathLinks, topologyPathNodes, ted, log, lock); + } + + public TEDUpdaterRYU(ArrayList ips, ArrayListports , String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log) + { + super(ips, ports , topologyPathLinks, topologyPathNodes, ted, log); + } + + + @Override + public void run() + { + + if(interDomainFile != null) + { + interDomainLinks = TEDUpdaterController.readInterDomainFile(interDomainFile); + } + + String responseLinks = ""; + String responseNodes = ""; + + try + { + + Hashtable nodes = new Hashtable(); + + for (int i = 0; i < ips.size(); i++) + { + responseNodes = queryForNodes(ips.get(i), ports.get(i)); + parseNodes(responseNodes, nodes, ips.get(i), ports.get(i)); + log.info("responseNodes:::"+responseNodes); + } + + for (int i = 0; i < ips.size(); i++) + { + responseLinks = queryForLinks(ips.get(i), ports.get(i)); + + log.info("responseLinks:::"+responseLinks); + + lock(); + parseLinks(responseLinks, nodes); + unlock(); + + } + + //parseJSON("[{\"src-switch\":\"00:14:2c:59:e5:5e:2b:00\",\"src-port\":20,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:64:21:00\",\"dst-port\":19,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:64:21:00\",\"src-port\":19,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:5e:2b:00\",\"dst-port\":20,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:66:ed:00\",\"src-port\":9,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:64:21:00\",\"dst-port\":20,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:64:21:00\",\"src-port\":20,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:66:ed:00\",\"dst-port\":9,\"dst-port-state\":0,\"type\":\"internal\"}]"); + //System.out.println(response); + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + + private String RYUtoFloodlight(String RYUFormat) + { + String floodFormat = new String(RYUFormat); + //Por algo se me conoce como el hacker + for (int i = 2; i < floodFormat.length(); i += 3) + { + floodFormat = floodFormat.substring(0, i) + ":" + floodFormat.substring(i, floodFormat.length()); + } + log.info("RYUFormat--> " + RYUFormat + ", floodFormat-->" + floodFormat); + return floodFormat; +} + + private void parseNodes(String response, Hashtable routerInfoList, String ip, String port) + { + try + { + JSONParser parser = new JSONParser(); + Object obj = parser.parse(response); + + JSONArray msg = (JSONArray) obj; + Iterator iterator = msg.iterator(); + while (iterator.hasNext()) + { + JSONObject jsonObject = (JSONObject) iterator.next(); + + log.info("(String)jsonObject.get(dpid)::"+(String)jsonObject.get("dpid")); + + RouterInfoPM rInfo = new RouterInfoPM(); + + rInfo.setRouterID(RYUtoFloodlight((String)jsonObject.get("dpid"))); + rInfo.setConfigurationMode("Openflow"); + rInfo.setControllerType(TEDUpdaterRYU.controllerName); + + rInfo.setControllerIdentifier(ip, port); + rInfo.setControllerIP(ip); + rInfo.setControllerPort(port); + + routerInfoList.put(rInfo.getRouterID(),rInfo); + + ((SimpleTEDB)TEDB).getNetworkGraph().addVertex(rInfo); + } + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + private void parseLinks(String links,Hashtable nodes) + { + try { + //log.info("Inside parseJSON"); + JSONParser parser = new JSONParser(); + Object obj = parser.parse(links); + + JSONArray msg = (JSONArray) obj; + Iterator iterator = msg.iterator(); + while (iterator.hasNext()) + { + JSONObject jsonObject = (JSONObject) iterator.next(); + //System.out.println(jsonObject.get("src-switch")); + IntraDomainEdge edge= new IntraDomainEdge(); + + JSONObject jsonObject_src = (JSONObject) jsonObject.get("src"); + JSONObject jsonObject_dst = (JSONObject) jsonObject.get("dst"); + + RouterInfoPM source = nodes.get(RYUtoFloodlight((String)jsonObject_src.get("dpid"))); + RouterInfoPM dest = nodes.get(RYUtoFloodlight((String)jsonObject_dst.get("dpid"))); + + //((SimpleTEDB)TEDB).getNetworkGraph().addVertex(source); + //((SimpleTEDB)TEDB).getNetworkGraph().addVertex(dest); + + log.info("Adding Vertex->"+source+" hashcode:"+source.hashCode()); + log.info("Adding Vertex->"+dest+" hashcode:"+dest.hashCode()); + + edge.setSrc_if_id(Long.parseLong((String) jsonObject_src.get("port_no"))); + edge.setDst_if_id(Long.parseLong((String) jsonObject_dst.get("port_no"))); + + + // This is a big problem because info is not initialized from file + // and the controller doesn't give information about how many wlans + // the are + + TE_Information tE_info = new TE_Information(); + tE_info.setNumberWLANs(15); + tE_info.initWLANs(); + + if (interDomainFile != null) + { + completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID()); + } + + edge.setTE_info(tE_info); + + String isBidirectional = (String)jsonObject.get("direction"); + + + // En RYU los enlaces son unidirecctionales, pero asumimos que hay uno en una direccion + // esta el otro + isBidirectional = "bidirectional"; + + //log.info("isBidirectional::"+isBidirectional); + + if ((1==1)||(isBidirectional != null) && (isBidirectional.equals("bidirectional"))) + { + //((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); + + TE_Information tE_infoOtherWay = new TE_Information(); + tE_infoOtherWay.setNumberWLANs(15); + tE_infoOtherWay.initWLANs(); + IntraDomainEdge edgeOtherWay= new IntraDomainEdge(); + + edgeOtherWay.setSrc_if_id(Long.parseLong((String) jsonObject_src.get("port_no"))); + edgeOtherWay.setDst_if_id(Long.parseLong((String) jsonObject_dst.get("port_no"))); + edgeOtherWay.setTE_info(tE_infoOtherWay); + + ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); + ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(dest, source, edgeOtherWay); + + completeTE_Information(tE_info, dest.getRouterID(), source.getRouterID()); + + log.info("source::"+source); + log.info("dest::"+dest); + log.info("edgeOtherWay::"+edgeOtherWay); + log.info("edge::"+edge); + } + else + { + ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); + } + + //log.info("Edge added:"+edge); + //log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString()); + } + //parseRemainingLinksFromXML(nodes); + + + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + private void completeTE_Information(TE_Information tE_info, String source, String dest) + { + MyEdge auxEdge = new MyEdge(source, dest); + MyEdge completEdge = interDomainLinks.get(auxEdge.hashCode()); + if ((completEdge != null)&&(completEdge.vlan != null)) + { + tE_info.setVlanLink(true); + tE_info.setVlan(completEdge.vlan); + //If it has been found it will be removed so the rest can be proccessed later + interDomainLinks.remove(completEdge.vlan); + } + else + { + tE_info.setVlanLink(false); + } + } + + private String queryForLinks(String ip, String port) + { + String response = ""; + try + { + URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathLinks); + + log.info("URL::"+"http://"+ip+":"+port+topologyPathLinks); + + URLConnection yc = topoplogyURL.openConnection(); + BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); + String inputLine; + + while ((inputLine = in.readLine()) != null) + { + response = response + inputLine; + } + } + catch (Exception e) + { + log.info(e.toString()); + } + return response; + } + + private String queryForNodes(String ip, String port) + { + String response = ""; + try + { + URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathNodes); + + log.info("http://+port+topologyPathNodes:::"+"http://"+ip+":"+port+topologyPathNodes); + + URLConnection yc = topoplogyURL.openConnection(); + BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); + + String inputLine; + while ((inputLine = in.readLine()) != null) + { + response = response + inputLine; + } + in.close(); + } + catch (Exception e) + { + log.info(e.toString()); + } + return response; + } + + public String getInterDomainFile() + { + return interDomainFile; + } + + public void setInterDomainFile(String interDomainFile) + { + this.interDomainFile = interDomainFile; + } + + + private void lock() + { + if (lock != null) + { + lock.lock(); + } + } + + private void unlock() + { + if (lock != null) + { + lock.unlock(); + } + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterTREMA.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterTREMA.java new file mode 100644 index 0000000000000000000000000000000000000000..ac11500b7c3c34655996a07e67a49633a35e678a --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterTREMA.java @@ -0,0 +1,449 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.controllers; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.concurrent.locks.Lock; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; + +import com.metaparadigm.jsonrpc.JSONSerializer; + +import eu.teraflow.tid.tedb.DomainTEDB; +import eu.teraflow.tid.tedb.IntraDomainEdge; +import eu.teraflow.tid.tedb.SimpleTEDB; +import eu.teraflow.tid.tedb.TE_Information; +import eu.teraflow.tid.tedb.controllers.TEDUpdaterController.MyEdge; +import eu.teraflow.tid.tedb.elements.RouterInfoPM; + +public class TEDUpdaterTREMA extends TEDUpdaterController +{ + public static String controllerName = "TREMA"; + private Hashtable interDomainLinks = new Hashtable(); + + + //Overwritten father variables and fixing the topology urls in code + private String topologyPathNodes = "/get_topology/"; + private String topologyPathLinks = "/get_graph/";//?? + + public TEDUpdaterTREMA(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log) + { + super( ip, port, topologyPathLinks, topologyPathNodes, ted, log); + } + + public TEDUpdaterTREMA(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log, Lock lock) + { + super( ip, port, topologyPathLinks, topologyPathNodes, ted, log, lock); + } + + public TEDUpdaterTREMA(ArrayList ips, ArrayListports , String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log) + { + super(ips, ports , topologyPathLinks, topologyPathNodes, ted, log); + } + + + @Override + public void run() + { + + if(interDomainFile != null) + { + interDomainLinks = TEDUpdaterController.readInterDomainFile(interDomainFile); + } + + String responseLinks = ""; + String responseNodes = ""; + + try + { + + Hashtable nodes = new Hashtable(); + + for (int i = 0; i < ips.size(); i++) + { + responseNodes = queryForNodes(ips.get(i), ports.get(i));//query for topology + parseNodes(responseNodes, nodes, ips.get(i), ports.get(i)); + log.info("responseNodes:::"+responseNodes); + } + + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + + private String KDDItoFloodlight(String BristolFormat) + { + String floodFormat = new String(BristolFormat); + //Por algo se me conoce como el hacker + for (int i = 2; i < floodFormat.length(); i += 3) + { + floodFormat = floodFormat.substring(0, i) + ":" + floodFormat.substring(i, floodFormat.length()); + } + log.info("BristolFormat--> " + BristolFormat + ", floodFormat-->" + floodFormat); + return floodFormat; + } + + private void parseNodes(String response, Hashtable routerInfoList, String ip, String port) + { + try + { + JSONParser parser = new JSONParser(); + Object obj = parser.parse(response); + + JSONObject jsonaux=(JSONObject) obj; + String host=(String)jsonaux.get("hostConfig").toString(); + obj=parser.parse(host); + JSONObject jsonhost=(JSONObject) obj; + + //FIXME: This info has been taken from TREMA controller but is not used. Take a look if it's necessary + String OPS_Label=(String)jsonhost.get("OPS label"); + String Port_id=(String)jsonhost.get("Port_id"); + String reach_nodes=(String)jsonhost.get("Reachable nodes"); + String node_type=(String)jsonhost.get("nodeType");//Used for RouterType + + RouterInfoPM rInfo = new RouterInfoPM(); + String dpid=((String)jsonhost.get("Virtual_node_id")).replace("-", ":"); + rInfo.setRouterID(dpid);//Bristol to floodlight? + rInfo.setConfigurationMode("Openflow"); + rInfo.setControllerType(TEDUpdaterNOX.controllerName); + rInfo.setRouterType(node_type); + + rInfo.setReachable_nodes(parseReachability(reach_nodes)); + + rInfo.setControllerIdentifier(ip, port); + rInfo.setControllerIP(ip); + rInfo.setControllerPort(port); + + routerInfoList.put(rInfo.getRouterID(),rInfo); + ((SimpleTEDB)TEDB).getNetworkGraph().addVertex(rInfo); + //Getting Links + //parseLinks(???); + //parseLinks(dpid, jsonarray) + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + private LinkedList parseReachability(String reach_nodes) { + boolean end=false; + int beginIndex=0; + LinkedList nodes= new LinkedList(); + reach_nodes=reach_nodes.replace(" ", ""); + System.out.println("Reachable Nodes:"+reach_nodes); + while (!end){ + int pointer=reach_nodes.indexOf(","); + if (pointer==-1) + end=true; + else { + String node=reach_nodes.substring(beginIndex, pointer); + System.out.println("Reachable Node:"+node); + reach_nodes=reach_nodes.substring(pointer+1); + nodes.add(node); + } + } + if (reach_nodes.length()>0){ + System.out.println("Reachable Node:"+reach_nodes); + nodes.add(reach_nodes); + } + return nodes; + } + + private void parseLinks(String dpid,String links, Hashtable nodes) //NOX Parse Links. it's not used in TREMA + { + try { + //log.info("Inside parseJSON"); + JSONParser parser = new JSONParser(); + Object obj = parser.parse(links); + + JSONArray msg = (JSONArray) obj; + Iterator iterator = msg.iterator(); + while (iterator.hasNext()) + { + JSONObject jsonObject = (JSONObject) iterator.next(); + //System.out.println(jsonObject.get("src-switch")); + IntraDomainEdge edge= new IntraDomainEdge(); + + String labels = (String) jsonObject.get("labels");//?? + String destnode = ((String) jsonObject.get("peer_node")).replace("-", ":"); + String type = (String) jsonObject.get("port_type"); + + RouterInfoPM source = nodes.get(dpid); + RouterInfoPM dest = nodes.get(destnode); + + //((SimpleTEDB)TEDB).getNetworkGraph().addVertex(source); + //((SimpleTEDB)TEDB).getNetworkGraph().addVertex(dest); + + System.out.println("Srcnode: "+dpid); + System.out.println("Dstnode: "+destnode); + + System.out.println("Srcport: "+jsonObject.get("port_id")); + System.out.println("Dstport: "+jsonObject.get("peer_port")); + + if ((dest!= null)&&(source!=null)){ + + + edge.setSrc_if_id(Long.parseLong((String)jsonObject.get("port_id"))); + edge.setDst_if_id(Long.parseLong((String)jsonObject.get("peer_port"))); + + edge.setType(type); + + // This is a big problem because info is not initialized from file + // and the controller doesn't give information about how many wlans + // the are + + TE_Information tE_info = new TE_Information(); + System.out.println("Labels: Original ("+labels+") and Parsed ("+labels.substring(labels.indexOf(",")+1,labels.indexOf("]"))+")"); + tE_info.setNumberWLANs(Integer.parseInt(labels.substring(labels.indexOf(",")+1,labels.indexOf("]")))); + tE_info.initWLANs(); + + if (interDomainFile != null) + { + completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID()); + } + + edge.setTE_info(tE_info); + + + edge.setDirectional(true); + //Bidirectional case? See other TEDUpdaters. + + ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); + + } else { + System.out.println("Link with an unknown node. Ingnoring..."); + } + //log.info("Edge added:"+edge); + //log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString()); + } + //parseRemainingLinksFromXML(nodes); + + + } + catch (Exception e) + { + log.info(e.toString()); + } + } + + +// private void parseLinks(String links,Hashtable nodes) +// { +// try { +// //log.info("Inside parseJSON"); +// JSONParser parser = new JSONParser(); +// Object obj = parser.parse(links); +// +// JSONArray msg = (JSONArray) obj; +// Iterator iterator = msg.iterator(); +// while (iterator.hasNext()) +// { +// JSONObject jsonObject = (JSONObject) iterator.next(); +// //System.out.println(jsonObject.get("src-switch")); +// IntraDomainEdge edge= new IntraDomainEdge(); +// +// JSONObject jsonObject_src = (JSONObject) jsonObject.get("src"); +// JSONObject jsonObject_dst = (JSONObject) jsonObject.get("dst"); +// +// RouterInfoPM source = nodes.get(BristoltoFloodlight((String)jsonObject_src.get("dpid"))); +// RouterInfoPM dest = nodes.get(BristoltoFloodlight((String)jsonObject_dst.get("dpid"))); +// +// //((SimpleTEDB)TEDB).getNetworkGraph().addVertex(source); +// //((SimpleTEDB)TEDB).getNetworkGraph().addVertex(dest); +// +// log.info("Adding Vertex->"+source+" hashcode:"+source.hashCode()); +// log.info("Adding Vertex->"+dest+" hashcode:"+dest.hashCode()); +// +// edge.setSrc_if_id((Long)jsonObject_src.get("port_no")); +// edge.setDst_if_id((Long)jsonObject_dst.get("port_no")); +// +// +// // This is a big problem because info is not initialized from file +// // and the controller doesn't give information about how many wlans +// // the are +// +// TE_Information tE_info = new TE_Information(); +// tE_info.setNumberWLANs(15); +// tE_info.initWLANs(); +// +// if (interDomainFile != null) +// { +// completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID()); +// } +// +// edge.setTE_info(tE_info); +// +// String isBidirectional = (String)jsonObject.get("direction"); +// +// +// // En Bristol los enlaces son unidirecctionales, pero asumimos que hay uno en una direccion +// // esta el otro +// isBidirectional = "bidirectional"; +// +// //log.info("isBidirectional::"+isBidirectional); +// +// if ((1==1)||(isBidirectional != null) && (isBidirectional.equals("bidirectional"))) +// { +// //((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); +// +// TE_Information tE_infoOtherWay = new TE_Information(); +// tE_infoOtherWay.setNumberWLANs(15); +// tE_infoOtherWay.initWLANs(); +// IntraDomainEdge edgeOtherWay= new IntraDomainEdge(); +// +// edgeOtherWay.setSrc_if_id((Long)jsonObject_src.get("port_no")); +// edgeOtherWay.setDst_if_id((Long)jsonObject_dst.get("port_no")); +// edgeOtherWay.setTE_info(tE_infoOtherWay); +// +// ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); +// ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(dest, source, edgeOtherWay); +// +// completeTE_Information(tE_info, dest.getRouterID(), source.getRouterID()); +// +// log.info("source::"+source); +// log.info("dest::"+dest); +// log.info("edgeOtherWay::"+edgeOtherWay); +// log.info("edge::"+edge); +// //log.info("Adding two!"); +// } +// else +// { +// ((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge); +// } +// +// //log.info("Edge added:"+edge); +// //log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString()); +// } +// //parseRemainingLinksFromXML(nodes); +// +// +// } +// catch (Exception e) +// { +// log.info(UtilsFunctions.exceptionToString(e)); +// } +// } + + private void completeTE_Information(TE_Information tE_info, String source, String dest) + { + MyEdge auxEdge = new MyEdge(source, dest); + MyEdge completEdge = interDomainLinks.get(auxEdge.hashCode()); + if ((completEdge != null)&&(completEdge.vlan != null)) + { + tE_info.setVlanLink(true); + tE_info.setVlan(completEdge.vlan); + //If it has been found it will be removed so the rest can be proccessed later + interDomainLinks.remove(completEdge.vlan); + } + else + { + tE_info.setVlanLink(false); + } + } + + private String queryForLinks(String ip, String port) + { + String response = ""; + try + { + URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathLinks); + + log.info("URL::"+"http://"+ip+":"+port+topologyPathLinks); + + URLConnection yc = topoplogyURL.openConnection(); + BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); + String inputLine; + + while ((inputLine = in.readLine()) != null) + { + response = response + inputLine; + } + } + catch (Exception e) + { + log.info(e.toString()); + } + return response; + } + + private String queryForNodes(String ip, String port) + { + String response = ""; + try + { + URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathNodes); + + log.info("http://+port+topologyPathNodes:::"+"http://"+ip+":"+port+topologyPathNodes); + + URLConnection yc = topoplogyURL.openConnection(); + BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); + + String inputLine; + while ((inputLine = in.readLine()) != null) + { + response = response + inputLine; + } + in.close(); + } + catch (Exception e) + { + log.info(e.toString()); + } + return response; + } + + public String getInterDomainFile() + { + return interDomainFile; + } + + public void setInterDomainFile(String interDomainFile) + { + this.interDomainFile = interDomainFile; + } + + + private void lock() + { + if (lock != null) + { + lock.lock(); + } + } + + private void unlock() + { + if (lock != null) + { + lock.unlock(); + } + } +} + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/AuthInfo.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/AuthInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..223c1940efbed133f7633ec3aca75815f8b4d38e --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/AuthInfo.java @@ -0,0 +1,52 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.elements; + +public class AuthInfo { + /**User ID to be used for authentication */ + private String userID; + + /**password assicoated with the user ID*/ + private String passwd; + + /** + * @return the userID + */ + public String getUserID() { + return userID; + } + + /** + * @param userID the userID to set + */ + public void setUserID(String userID) { + this.userID = userID; + } + + /** + * @return the passwd + */ + public String getPasswd() { + return passwd; + } + + /** + * @param passwd the passwd to set + */ + public void setPasswd(String passwd) { + this.passwd = passwd; + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Bandwidth.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Bandwidth.java new file mode 100644 index 0000000000000000000000000000000000000000..fd5f7aa882effab93ab24dd598260447822ff0e6 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Bandwidth.java @@ -0,0 +1,63 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.elements; + + public class Bandwidth { + + double maxBandwidth; + double unreservedBw; + + + public Bandwidth (double initBandwidth){ + maxBandwidth = initBandwidth; + unreservedBw = initBandwidth; + } + + + public Bandwidth (double max, double unresv){ + maxBandwidth = max; + unreservedBw = unresv; + } + + + public String toString(){ + return "Unreserved Bw = " + unreservedBw + ", Max Bandwidth = " + maxBandwidth; + } + + /** + * @return the maxBandwidth + */ + public double getMaxBandwidth() { + return maxBandwidth; + } + /** + * @param maxBandwidth the maxBandwidth to set + */ + public void setMaxBandwidth(double maxBandwidth) { + this.maxBandwidth = maxBandwidth; + } + /** + * @return the unreservedBw + */ + public double getUnreservedBw() { + return unreservedBw; + } + /** + * @param unreservedBw the unreservedBw to set + */ + public void setUnreservedBw(double unreservedBw) { + this.unreservedBw = unreservedBw; + } + } diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/BgpParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/BgpParams.java new file mode 100644 index 0000000000000000000000000000000000000000..37fab22972d14c23739c910b8d23d2fc29a2f22b --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/BgpParams.java @@ -0,0 +1,19 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.elements; + +public class BgpParams { + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/EndPoint.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/EndPoint.java new file mode 100644 index 0000000000000000000000000000000000000000..845bcf416f0977bd3e619768fe6cb02159b9301d --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/EndPoint.java @@ -0,0 +1,81 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.elements; + +public class EndPoint { + String node; + + String intf; + + public EndPoint(String node, String intf){ + this.node = node; + this.intf = intf; + } + + /** + * @return the node + */ + public String getNode() { + return node; + } + + /** + * @param node the node to set + */ + public void setNode(String node) { + this.node = node; + } + + /** + * @return the intf + */ + public String getIntf() { + return intf; + } + + /** + * @param intf the intf to set + */ + public void setIntf(String intf) { + this.intf = intf; + } + + + public int compareTo(EndPoint arg0) { + if ((arg0.intf.compareTo(this.intf)==0) && (arg0.node.compareTo(this.node)==0)) + return 0; + else + return 1; + } + @Override + public boolean equals(Object obj) { + if ((this.node.equals(((EndPoint)obj).getNode()))&& + (this.intf.equals(((EndPoint)obj).getIntf()))) + return true; + return false; + } + + @Override + public String toString() { + // TODO Auto-generated method stub + String temp=""; + temp += "Node = " + node + " - "; + temp += "Interface = " + intf ; + return temp; + } + + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IPNodeParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IPNodeParams.java new file mode 100644 index 0000000000000000000000000000000000000000..0c56d240c3560885782ea00c5ed621c91de290df --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IPNodeParams.java @@ -0,0 +1,23 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.elements; +import java.util.ArrayList; + +public class IPNodeParams { + ArrayList staticRoutingParams; + ArrayList bgpParams; + ArrayList isisParams; + ArrayList ospfParams; +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Intf.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Intf.java new file mode 100644 index 0000000000000000000000000000000000000000..57010b9997870f1aaadc1e389eaad1fbf0c6c656 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Intf.java @@ -0,0 +1,211 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.elements; + +import java.util.ArrayList; + +public class Intf { + + String name; + + //TODO should the address not be mapped to a layer ?? + ArrayList address; + + //TODO should the list of layers in an interface be selected using an ENUM + ArrayList layering; + + //TODO should the list of supported Counters be an ENUM + ArrayList supportedCounters; + + Boolean isPhysical; + + //TODO for a virtual interface, should there be an association with a parent interface + String parentInterfaceName; + + Boolean intfUp; + + int label; + + public int getLabel() { + return label; + } + + public void setLabel(int label) { + this.label = label; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the address + */ + public ArrayList getAddress() { + return address; + } + + /** + * @param address the address to set + */ + public void setAddress(ArrayList address) { + this.address = address; + } + + /** + * @return the layering + */ + public ArrayList getLayering() { + return layering; + } + + /** + * @param layering the layering to set + */ + public void setLayering(ArrayList layering) { + this.layering = layering; + } + + /** + * @return the supportedCounters + */ + public ArrayList getSupportedCounters() { + return supportedCounters; + } + + /** + * @param supportedCounters the supportedCounters to set + */ + public void setSupportedCounters(ArrayList supportedCounters) { + this.supportedCounters = supportedCounters; + } + + /** + * @return the isPhysical + */ + public Boolean isPhysical() { + return isPhysical; + } + + /** + * @param isPhysical the isPhysical to set + */ + public void setPhysical(Boolean isPhysical) { + this.isPhysical = isPhysical; + } + + /** + * @return the parentInterfaceName + */ + public String getParentInterfaceName() { + return parentInterfaceName; + } + + /** + * @param parentInterfaceName the parentInterfaceName to set + */ + public void setParentInterfaceName(String parentInterfaceName) { + this.parentInterfaceName = parentInterfaceName; + } + + public Boolean isIntfUp() { + return intfUp; + } + + public void setIntfUp(Boolean intfUp) { + this.intfUp = intfUp; + } + + @Override + public boolean equals(Object arg0) { + // TODO Auto-generated method stub + if (((Intf)arg0).getName().equals(this.name) + //&&((Intf)arg0).isPhysical() == (this.isPhysical) + //&&((Intf)arg0).getParentInterfaceName().equals(this.parentInterfaceName) + &&(this.address.size() == ((Intf)arg0).getAddress().size())){ + for (int i =0; i< address.size();i++){ + if (!((Intf)arg0).getAddress().get(i).equals(address.get(i))){ + return false; + } + } + if((supportedCounters!= null)&&(((Intf)arg0).getSupportedCounters() != null)){ + if (supportedCounters.size() == (((Intf)arg0).getSupportedCounters().size())) + for (int i =0; i< supportedCounters.size(); i++){ + if (!((Intf)arg0).getSupportedCounters().get(i).equals(supportedCounters.get(i))){ + return false; + } + } + else{ + return false; + } + } + if (((Intf)arg0).getLayering() != null){ + if (layering.size() == (((Intf)arg0).getLayering().size())){ + for (int i =0; i< layering.size(); i++){ + if (!((Intf)arg0).getLayering().get(i).equals(layering.get(i))){ + return false; + } + } + } + else + return false; + } + + } + else{ + return false; + } + return true; + + } + + public String toString(){ + String temp=""; + temp += "Name = " + name + " "; + temp += "Address = ("; + for (int i=0;i address; + boolean isPhysical; + ArrayList intfList; + int domain; + Location location; + IPNodeParams ipParams; + String parentRouter; + String layer; + String configurationMode; + String dataPathID; + /**Router Vendor Type*/ + String routerType; + String controllerIP; + String controllerPort; + /**IOS version*/ + String rotuerModel; + ArrayList unnumberedIntfList=null; + + public ArrayList getUnnumberedIntfList() { + return unnumberedIntfList; + } + public void setUnnumberedIntfList(ArrayList unnumberedIntfList) { + this.unnumberedIntfList = unnumberedIntfList; + } + public String getDataPathID() { + return dataPathID; + } + public void setDataPathID(String dpid) { + this.dataPathID = dpid; + } + public String getConfigurationMode() { + return configurationMode; + } + public void setConfigurationMode(String configurationMode) { + this.configurationMode = configurationMode; + } + public String getRouterType() { + return routerType; + } + public void setRouterType(String routerType) { + this.routerType = routerType; + } + public Object getControllerIP() { + return controllerIP; + } + public void setControllerIP(String controllerIP) { + this.controllerIP = controllerIP; + } + public Object getControllerPort() { + return controllerPort; + } + public void setControllerPort(String controllerPort) { + this.controllerPort = controllerPort; + } + public String getRotuerModel() { + return rotuerModel; + } + public void setRotuerModel(String iosVersion) { + this.rotuerModel = iosVersion; + } + /** + * @return the nodeID + */ + public String getNodeID() { + return nodeID; + } + /** + * @param nodeID the nodeID to set + */ + public void setNodeID(String nodeID) { + this.nodeID = nodeID; + } + /** + * @return the address + */ + public ArrayList getAddress() { + return address; + } + /** + * @param address the address to set + */ + public void setAddress(ArrayList address) { + this.address = address; + } + /** + * @return the isPhysical + */ + public boolean isPhysical() { + return isPhysical; + } + /** + * @param isPhysical the isPhysical to set + */ + public void setPhysical(boolean isPhysical) { + this.isPhysical = isPhysical; + } + /** + * @return the intfList + */ + public ArrayList getIntfList() { + return intfList; + } + /** + * @param intfList the intfList to set + */ + public void setIntfList(ArrayList intfList) { + this.intfList = intfList; + } + /** + * @return the domain + */ + public int getDomain() { + return domain; + } + /** + * @param domain the domain to set + */ + public void setDomain(int domain) { + this.domain = domain; + } + /** + * @return the location + */ + public Location getLocation() { + return location; + } + /** + * @param location the location to set + */ + public void setLocation(Location location) { + this.location = location; + } + /** + * @return the ipParams + */ + public IPNodeParams getIpParams() { + return ipParams; + } + /** + * @param ipParams the ipParams to set + */ + public void setIpParams(IPNodeParams ipParams) { + this.ipParams = ipParams; + } + /** + * @return the parentRouter + */ + public String getParentRouter() { + return parentRouter; + } + /** + * @param parentRouter the parentRouter to set + */ + public void setParentRouter(String parentRouter) { + this.parentRouter = parentRouter; + } + + public String getLayer() { + return layer; + } + public void setLayer(String layer) { + this.layer = layer; + } + public String toString(){ + String temp = ""; + temp += "NodeID = " + nodeID +" " ; + if (location!=null) + temp += "Location = (" + location.xCoord + ", " + location.yCoord + ")" + " " ; + temp+= "Addresses ("; + for (int i=0;i (); + address = new ArrayList (); + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/OspfParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/OspfParams.java new file mode 100644 index 0000000000000000000000000000000000000000..4b06f38680f5289620a22aaa49c82c98a4fe13c2 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/OspfParams.java @@ -0,0 +1,19 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.elements; + +public class OspfParams { + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Path.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Path.java new file mode 100644 index 0000000000000000000000000000000000000000..d77a7039774239d55c07d5a3b1dfff7a7f4b9d39 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Path.java @@ -0,0 +1,67 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.elements; + +import java.util.ArrayList; + +public class Path { + //TODO change to enumeration with values working/protection + String pathType; + + ArrayList links; + + public String toString(){ + String temp = ""; + if (links!=null){ + for (int i=0;i" + links.get(i).getDest() ; + } + return temp; + } + + public Path(ArrayList links){ + this.links = links; + } + + /** + * @return the pathType + */ + public String getPathType() { + return pathType; + } + + /** + * @param pathType the pathType to set + */ + public void setPathType(String pathType) { + this.pathType = pathType; + } + + /** + * @return the links + */ + public ArrayList getLinks() { + return links; + } + + /** + * @param links the links to set + */ + public void setLinks(ArrayList links) { + this.links = links; + } + + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/PhyLinkParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/PhyLinkParams.java new file mode 100644 index 0000000000000000000000000000000000000000..739508b41f44ddbf122354b33fb05e6830eebdf8 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/PhyLinkParams.java @@ -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. + +package eu.teraflow.tid.tedb.elements; + +public class PhyLinkParams { + //Create parameters for Physical Link + double transmissionDelay; + + boolean isActive; + + public PhyLinkParams(double delay, boolean active){ + isActive = active; + transmissionDelay = delay; + } + + /** + * @return the transmissionDelay + */ + public double getTransmissionDelay() { + return transmissionDelay; + } + + /** + * @param transmissionDelay the transmissionDelay to set + */ + public void setTransmissionDelay(double transmissionDelay) { + this.transmissionDelay = transmissionDelay; + } + + /** + * @return the isActive + */ + public boolean isActive() { + return isActive; + } + + /** + * @param isActive the isActive to set + */ + public void setActive(boolean isActive) { + this.isActive = isActive; + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterDesc.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterDesc.java new file mode 100644 index 0000000000000000000000000000000000000000..71cd098a5d0e12ea9f9117805f4162846475c555 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterDesc.java @@ -0,0 +1,133 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.elements; + +import java.net.Inet4Address; + +public class RouterDesc { + + /**ID for the router*/ + protected String routerID; + + /**Description of the physical Location */ + private String phyDesc; + + /**Addres for the configuration of the router*/ + private Inet4Address managementAddress; + + private int configurationPort; + + /**Authentication Info for configuring the router*/ + private AuthInfo authInfo; + + /**Router Vendor Type*/ + private String routerType; + + /**IOS version*/ + private String iosVersion; + + private String macAddress; + /** + * @return the routerID + */ + public String getRouterID() { + return routerID; + } + /** + * @param routerID the routerID to set + */ + public void setRouterID(String routerID) { + this.routerID = routerID; + } + /** + * @return the phyDesc + */ + public String getPhyDesc() { + return phyDesc; + } + /** + * @param phyDesc the phyDesc to set + */ + public void setPhyDesc(String phyDesc) { + this.phyDesc = phyDesc; + } +/* *//** + * @return the confAddress + *//* + public Address getConfAddress() { + return confAddress; + } + *//** + * @param confAddress the confAddress to set + *//* + public void setConfAddress(Address confAddress) { + this.confAddress = confAddress; + }*/ + /** + * @return the authInfo + */ + public AuthInfo getAuthInfo() { + return authInfo; + } + /** + * @param authInfo the authInfo to set + */ + public void setAuthInfo(AuthInfo authInfo) { + this.authInfo = authInfo; + } + /** + * @return the routerType + */ + public String getRouterType() { + return routerType; + } + /** + * @param routerType the routerType to set + */ + public void setRouterType(String routerType) { + this.routerType = routerType; + } + /** + * @return the iosVersion + */ + public String getIosVersion() { + return iosVersion; + } + /** + * @param iosVersion the iosVersion to set + */ + public void setIosVersion(String iosVersion) { + this.iosVersion = iosVersion; + } + public Inet4Address getManagementAddress() { + return managementAddress; + } + public void setManagementAddress(Inet4Address managementAddress) { + this.managementAddress = managementAddress; + } + public int getConfigurationPort() { + return configurationPort; + } + public void setConfigurationPort(int configurationPort) { + this.configurationPort = configurationPort; + } + public String getMacAddress() { + return macAddress; + } + public void setMacAddress(String macAddress) { + this.macAddress = macAddress; + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterInfoPM.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterInfoPM.java new file mode 100644 index 0000000000000000000000000000000000000000..037e6a1eb8eba8a43f8c9ef38dd574f74a4c5379 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterInfoPM.java @@ -0,0 +1,243 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.elements; + +import java.net.Inet4Address; +import java.net.UnknownHostException; +import java.util.LinkedList; + +/** + * + * @author Anonimo + * + */ + +public class RouterInfoPM extends RouterDesc +{ + private String configurationMode; + private Inet4Address oppositeInterface; + private String controllerId; + private String controllerIP; + private String controllerPort; + private String controllerType; + private String routerModel; + private String routerType_Son; + private String layer; + private Intf srcIntf; + private String hardware; + private LinkedList reachable_nodes; + private Intf dstIntf; + + public void logAllInfo(){ + System.out.println("configurationMode: "+this.getConfigurationMode()+" Reachable_nodes: "+this.getReachable_nodes()+" SrcIntf: "+this.getSrcIntf()+" DstIntf: "+this.getDstIntf()+" OppositeInterface: "+this.getOppositeInterface()+" RouterModel: "+this.getRouterModel()+" Layer: "+this.getLayer()+" getControllerId: "+this.getControllerId()+" getControllerIP: "+this.getControllerIP()+" ControllerPort: "+this.getControllerPort()+" Hardware: "+this.getHardware()+" ControllerType: "+this.getControllerType()); + } + + public LinkedList getReachable_nodes() + { + return this.reachable_nodes; + } + + public void setReachable_nodes(LinkedList reachable_nodes) { + this.reachable_nodes = reachable_nodes; + } + + public Intf getSrcIntf() { + return this.srcIntf; + } + + public void setSrcIntf(Intf srcIntf) { + this.srcIntf = srcIntf; + } + + public Intf getDstIntf() { + return this.dstIntf; + } + + public void setDstIntf(Intf dstIntf) { + this.dstIntf = dstIntf; + } + + public RouterInfoPM() + { + } + + public RouterInfoPM(String id) + { + this.routerID = id; + } + + public String getConfigurationMode() { + return this.configurationMode; + } + + public void setConfigurationMode(String configurationMode) { + this.configurationMode = configurationMode; + } + + public Inet4Address getOppositeInterface() { + return this.oppositeInterface; + } + + public void setOppositeInterface(Inet4Address oppositeInterface) { + this.oppositeInterface = oppositeInterface; + } + + public void fromNode(Node node) { + this.configurationMode = node.getConfigurationMode(); + this.routerType_Son = node.getRouterType(); + this.routerModel = node.getRotuerModel(); + this.layer = node.getLayer(); + setConfigurationMode(node.getConfigurationMode()); + setRouterID(node.getNodeID()); + try + { + setManagementAddress((Inet4Address)Inet4Address.getByName((String)node.getAddress().get(0))); + } + catch (UnknownHostException e) { + e.printStackTrace(); + } + } + + public String getRouterModel() { + return this.routerModel; + } + + public void setRouterModel(String routerModel) { + this.routerModel = routerModel; + } + + public String getRouterType() { + return this.routerType_Son; + } + + public void setRouterType(String routerType) { + this.routerType_Son = routerType; + } + + public String getLayer() { + return this.layer; + } + + public void setLayer(String layer) { + this.layer = layer; + } + + public int hashCode() + { + int prime = 31; + int result = 1; + if (this.routerID == null) + { + return 0; + } + String idAux = this.routerID.substring(0, 17); + + result = 31 * result + (idAux == null ? 0 : idAux.hashCode()); + + return result; + } + + public boolean equals(Object obj) + { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + RouterInfoPM other = (RouterInfoPM)obj; + + if ((this.routerID.contains(other.getRouterID())) || (other.getRouterID().contains(this.routerID))) + { + return true; + } + + if (this.routerID == null) + { + if (other.routerID != null) + { + return false; + } + } + else if (!this.routerID.equals(other.routerID)) + { + return false; + } + + return true; + } + + public String toString() + { + if (this.oppositeInterface != null) + return "[RouterInfoPM]->" + this.routerID + " [OppositeInterface]->" + this.oppositeInterface; + return "[RouterInfoPM]->" + this.routerID; + } + + public void setControllerIdentifier(String ip, String port) + { + this.controllerId = getUniqueIdentifierForController(ip, port); + } + + public void setControllerIP(String ip) + { + this.controllerIP = ip; + } + + public void setControllerPort(String port) + { + this.controllerPort = port; + } + + public String getControllerId() + { + return this.controllerId; + } + + public String getControllerIP() + { + return this.controllerIP; + } + + public String getControllerPort() + { + return this.controllerPort; + } + + private String getUniqueIdentifierForController(String ip, String port) + { + return ip + ":" + port; + } + + public String getHardware() + { + return this.hardware; + } + + public void setHardware(String hardware) + { + this.hardware = hardware; + } + + public String getControllerType() + { + return this.controllerType; + } + + public void setControllerType(String controllerType) + { + this.controllerType = controllerType; + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Service.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Service.java new file mode 100644 index 0000000000000000000000000000000000000000..a60bb60ffca8f5e1f39492365e1dfe179e41d61d --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Service.java @@ -0,0 +1,177 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.elements; + +import java.util.ArrayList; + +public class Service { + + //TODO change to enumeration with possible values active/potential + String status; + + //TODO change to enumeration with possible services like Ethernet/OTN etc. (or based on the layering available in interfaces + String serviceType; + + Bandwidth bw; + + //Change to Enumeration based on protection types + String protection; + + EndPoint source; + + EndPoint dest; + + Path servicePath; + + ArrayList srlg; + + String baseEncapsulation; + + /** + * @return the status + */ + public String getStatus() { + return status; + } + + public String toString(){ + String temp = ""; + temp += "\n\t ServiceType = " + serviceType; + temp += "\n\t Status = " + status; + temp += "\n\t Protection = " + protection; + temp += "\n\t Path = " + servicePath; + temp += "\n\t Bandwidth = " + bw; + return temp; + } + + /** + * @param status the status to set + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * @return the serviceType + */ + public String getServiceType() { + return serviceType; + } + + /** + * @param serviceType the serviceType to set + */ + public void setServiceType(String serviceType) { + this.serviceType = serviceType; + } + + /** + * @return the bw + */ + public Bandwidth getBw() { + return bw; + } + + /** + * @param bw the bw to set + */ + public void setBw(Bandwidth bw) { + this.bw = bw; + } + + /** + * @return the protection + */ + public String getProtection() { + return protection; + } + + /** + * @param protection the protection to set + */ + public void setProtection(String protection) { + this.protection = protection; + } + + /** + * @return the source + */ + public EndPoint getSource() { + return source; + } + + /** + * @param source the source to set + */ + public void setSource(EndPoint source) { + this.source = source; + } + + /** + * @return the dest + */ + public EndPoint getDest() { + return dest; + } + + /** + * @param dest the dest to set + */ + public void setDest(EndPoint dest) { + this.dest = dest; + } + + /** + * @return the servicePath + */ + public Path getServicePath() { + return servicePath; + } + + /** + * @param servicePath the servicePath to set + */ + public void setServicePath(Path servicePath) { + this.servicePath = servicePath; + } + + /** + * @return the srlg + */ + public ArrayList getSrlg() { + return srlg; + } + + /** + * @param srlg the srlg to set + */ + public void setSrlg(ArrayList srlg) { + this.srlg = srlg; + } + + /** + * @return the baseEncapsulation + */ + public String getBaseEncapsulation() { + return baseEncapsulation; + } + + /** + * @param baseEncapsulation the baseEncapsulation to set + */ + public void setBaseEncapsulation(String baseEncapsulation) { + this.baseEncapsulation = baseEncapsulation; + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/StaticRoutingParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/StaticRoutingParams.java new file mode 100644 index 0000000000000000000000000000000000000000..efae987626a62cc01bb6c07105d8d9e2fa70723f --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/StaticRoutingParams.java @@ -0,0 +1,19 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package eu.teraflow.tid.tedb.elements; + +public class StaticRoutingParams { + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto b/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto new file mode 100644 index 0000000000000000000000000000000000000000..89ab745e1fe6eb32b2038ef2ed89d3ee70c14aee --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto @@ -0,0 +1,80 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package src.main.proto; + +message updateRequest { + + string addressFamilyID = 1; + string nextHop = 2; + string asPathSegment = 3; + + repeated nodeInfo node = 4; + // repeated : se da la posibilidad de mandar 0 o varios + repeated linkInfo link = 5; + + } + +message nodeInfo{ + string nodeName=1; + string igpID=2; + string bgplsID=3; + int32 asID=4; + string learntFrom = 5; +} + +message linkInfo{ + + string remoteID=1; + string localID=2; + + string remoteIPv4ID=3; + string localIPv4ID=4; + + NodeDescriptors local=5; + NodeDescriptors remote=6; + + float availableBw=7; + float residualBw = 8; + float utilized = 9; + + float maxLinkDelay = 10; + float minLinkDelay = 11; + float delayVariation = 12; + float delay = 13; + + int32 TEDefaultMetric = 14; + string adjacencySid = 15; + + string learntFrom = 16; + +} + +message NodeDescriptors{ + + string asNumber=1; + string bgplsID=2; + +} + +message updateResponse { + string ack = 1; +} + +// Defining a Service, a Service can have multiple RPC operations +service updateService { + // MODIFY HERE: Update the return to streaming return. + rpc update(updateRequest) returns (updateResponse); +} \ No newline at end of file diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/TMConfCOP.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/TMConfCOP.xml new file mode 100644 index 0000000000000000000000000000000000000000..c83d4ec1a146d5742b7a422c0fd4b7658dea4f32 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/TMConfCOP.xml @@ -0,0 +1,27 @@ + + + + + localhost + 5008 + + 8089 + + + TM + fromXML + target/TM_COP_example1/network1.xml + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/network1.xml new file mode 100644 index 0000000000000000000000000000000000000000..aa4efaa720a89915cfc775a5d745932dcce878c6 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/network1.xml @@ -0,0 +1,220 @@ + + + + + + + + + 0.0.0.1 + + 172.16.101.0 + 29 + + + + 172.16.101.101 + + + 172.16.101.102 + + + 172.16.101.103 + + + + 172.16.101.104 + + + + 99 + + 23 + 43 + + 1 + 102 + 802 + 500 + 436 + + + + + 172.16.101.101 + 1 + + + 172.16.101.104 + 1 + + 3.35 + 99 + + 23 + 43 + + 1 + 102 + 802 + 500 + 436 + + + + 172.16.101.104 + 1 + + + 172.16.101.101 + 1 + + + + + 172.16.101.101 + 2 + + + 172.16.101.102 + 1 + + + + + 172.16.101.102 + 1 + + + 172.16.101.101 + 2 + + + + + 172.16.101.102 + 2 + + + 172.16.101.103 + 1 + + 102103 + + + + 172.16.101.103 + 1 + + + 172.16.101.102 + 2 + + + + + 172.16.101.103 + 2 + + + 172.16.101.104 + 2 + + + + + 172.16.101.104 + 2 + + + 172.16.101.103 + 2 + + + + + + 172.16.101.102 + 3 + + + 172.16.101.104 + 3 + + + + + 172.16.101.104 + 3 + + + 172.16.101.102 + 3 + + + + + + 172.16.101.104 + 13 + + + 172.16.102.101 + 11 + + 1 + + + + + + + + + + 0.0.0.2 + + 172.16.102.0 + 29 + + + + + https://UC3MController.5Gex.com/url + 222 + 222Gbyte + 222Tbyte + + + + 172.16.102.101 + + + 172.16.102.102 + + + + 172.16.102.101 + 14 + + + 172.16.102.102 + 13 + + 2 + + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/TMConfTAPI.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/TMConfTAPI.xml new file mode 100644 index 0000000000000000000000000000000000000000..c00e1f2df7e76757c11957b9599d8b3ea076e92a --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/TMConfTAPI.xml @@ -0,0 +1,27 @@ + + + + + localhost + 5008 + + 8089 + + + TM + fromXML + target/TM_TAPI_example1/network1.xml + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/network1.xml new file mode 100644 index 0000000000000000000000000000000000000000..9309064a165227fc3e8b25879a62def1deeac1bd --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/network1.xml @@ -0,0 +1,171 @@ + + + + + + + + + 0.0.0.1 + + 172.16.101.0 + 29 + + + + 172.16.101.101 + + + 172.16.101.102 + + + 172.16.101.103 + + + + 172.16.101.104 + + + + 99 + + 23 + 43 + + 1 + 102 + 802 + 500 + 436 + + + + + 172.16.101.101 + 1 + + + 172.16.101.104 + 1 + + 3.35 + 99 + + 23 + 43 + + 1 + 102 + 802 + 500 + 436 + + + + 172.16.101.104 + 1 + + + 172.16.101.101 + 1 + + + + + 172.16.101.101 + 2 + + + 172.16.101.102 + 1 + + + + + 172.16.101.102 + 1 + + + 172.16.101.101 + 2 + + + + + 172.16.101.102 + 2 + + + 172.16.101.103 + 1 + + 102103 + + + + 172.16.101.103 + 1 + + + 172.16.101.102 + 2 + + + + + 172.16.101.103 + 2 + + + 172.16.101.104 + 2 + + + + + 172.16.101.104 + 2 + + + 172.16.101.103 + 2 + + + + + + 172.16.101.102 + 3 + + + 172.16.101.104 + 3 + + + + + 172.16.101.104 + 3 + + + 172.16.101.102 + 3 + + + + + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..a472b7855e3d05fb66c08a93b4e872a572185c7d --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_1.xml @@ -0,0 +1,67 @@ + + + + + + 11179 + 10.95.205.12 + + 1111 + + + localhost + true + false + 22179 + + + BGP4Parser.log + BGP4Client.log + BGP4Server.log + + true + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + fromXML + + target/bgpls_example1/network1.xml + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..2059250b51dccde80d448e6e46f1e3ebac6608bd --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_2.xml @@ -0,0 +1,66 @@ + + + + + + 22179 + 1.1.1.1 + + 1112 + + + localhost + false + true + 11179 + + + + BGP4Parser2.log + BGP4Client2.log + BGP4Server2.log + + true + + 40000 + true + + + 180 + + 4 + + 1 + + + + false + + true + + fromBGP + + + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/network1.xml new file mode 100644 index 0000000000000000000000000000000000000000..aa4efaa720a89915cfc775a5d745932dcce878c6 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/network1.xml @@ -0,0 +1,220 @@ + + + + + + + + + 0.0.0.1 + + 172.16.101.0 + 29 + + + + 172.16.101.101 + + + 172.16.101.102 + + + 172.16.101.103 + + + + 172.16.101.104 + + + + 99 + + 23 + 43 + + 1 + 102 + 802 + 500 + 436 + + + + + 172.16.101.101 + 1 + + + 172.16.101.104 + 1 + + 3.35 + 99 + + 23 + 43 + + 1 + 102 + 802 + 500 + 436 + + + + 172.16.101.104 + 1 + + + 172.16.101.101 + 1 + + + + + 172.16.101.101 + 2 + + + 172.16.101.102 + 1 + + + + + 172.16.101.102 + 1 + + + 172.16.101.101 + 2 + + + + + 172.16.101.102 + 2 + + + 172.16.101.103 + 1 + + 102103 + + + + 172.16.101.103 + 1 + + + 172.16.101.102 + 2 + + + + + 172.16.101.103 + 2 + + + 172.16.101.104 + 2 + + + + + 172.16.101.104 + 2 + + + 172.16.101.103 + 2 + + + + + + 172.16.101.102 + 3 + + + 172.16.101.104 + 3 + + + + + 172.16.101.104 + 3 + + + 172.16.101.102 + 3 + + + + + + 172.16.101.104 + 13 + + + 172.16.102.101 + 11 + + 1 + + + + + + + + + + 0.0.0.2 + + 172.16.102.0 + 29 + + + + + https://UC3MController.5Gex.com/url + 222 + 222Gbyte + 222Tbyte + + + + 172.16.102.101 + + + 172.16.102.102 + + + + 172.16.102.101 + 14 + + + 172.16.102.102 + 13 + + 2 + + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS1.xml new file mode 100644 index 0000000000000000000000000000000000000000..584b8ea7fda5990c4f34c00ec4517e9b50b575da --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS1.xml @@ -0,0 +1,74 @@ + + + + + + 179 + 10.0.0.2 + + 1111 + + + + 10.0.0.1 + true + false + 1790 + + + BGP4Parser-BGPLS1.log + BGP4Client-BGPLS1.log + BGP4Server-BGPLS1.log + + true + true + + 40000 + false + + + 180 + + 4 + + 65522 + + + + true + + 5000 + + true + + fromBGP + + + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS2.xml new file mode 100644 index 0000000000000000000000000000000000000000..81ec02ead7aba875c10203b24388f17b481834fd --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS2.xml @@ -0,0 +1,80 @@ + + + + + + 22179 + 2.2.2.2 + + 1112 + + + + localhost + true + false + 11179 + + + localhost + false + true + 33179 + + + BGP4Parser-BGPLS2.log + BGP4Client-BGPLS2.log + BGP4Server-BGPLS2.log + + true + true + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + fromBGP + + + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS3.xml new file mode 100644 index 0000000000000000000000000000000000000000..22d32b1cfad88852e7815cadfcf6999a75537610 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS3.xml @@ -0,0 +1,80 @@ + + + + + + 33179 + 3.3.3.3 + + 1113 + + + + localhost + true + false + 11179 + + + localhost + true + false + 22179 + + + BGP4Parser-BGPLS3.log + BGP4Client-BGPLS3.log + BGP4Server-BGPLS3.log + + true + true + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + fromBGP + + + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM1.xml new file mode 100644 index 0000000000000000000000000000000000000000..cf5f3e7e991ffc5b3445d109f898ebc76611cad7 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM1.xml @@ -0,0 +1,41 @@ + + + + + localhost + 5001 + + + TM + target/conf1wayTest/network1.xml + 1.1.1.1> + + + initFromXML + + + + 8087 + + + True + True + target/conf1wayTest/BGPLS1.xml + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM2.xml new file mode 100644 index 0000000000000000000000000000000000000000..d34a2e7eb869af59741a9f4f0ef5650cb3d5a674 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM2.xml @@ -0,0 +1,41 @@ + + + + + localhost + 5002 + + + TM + target/conf1wayTest/network2.xml + 2.2.2.2> + + + initFromXML + + + + 8088 + + + True + True + target/conf1wayTest/BGPLS2.xml + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM3.xml new file mode 100644 index 0000000000000000000000000000000000000000..a26f7affa0e8b4f3a5f9868a8d0181112364eb5a --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM3.xml @@ -0,0 +1,41 @@ + + + + + localhost + 5003 + + + TM + target/conf1wayTest/network3.xml + 3.3.3.3> + + + initFromXML + + + + 8089 + + + True + True + target/conf1wayTest/BGPLS3.xml + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TMConfiguration_BGPLSreader_UNIFYwriter.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TMConfiguration_BGPLSreader_UNIFYwriter.xml new file mode 100644 index 0000000000000000000000000000000000000000..2472142f4c9207c36b7cd92028147b8590fa5800 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TMConfiguration_BGPLSreader_UNIFYwriter.xml @@ -0,0 +1,40 @@ + + + + + localhost + 5001 + + + + initFromXML + + + localhost + 9876 + + + 8088 + + + True + False + conf/TM1.xml + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network1.xml new file mode 100644 index 0000000000000000000000000000000000000000..7c986efc2e3a9b337380716232a3c2427390e89c --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network1.xml @@ -0,0 +1,233 @@ + + + + + + + + + 0.0.0.1 + + 172.16.101.0 + 24 + + + + + 172.16.101.101 + + + 172.16.101.102 + + + 172.16.101.103 + + + 172.16.101.104 + + + + 172.16.101.101 + 1 + + + 172.16.101.104 + 1 + + 99 + + 23 + 250 + + + + + 172.16.101.104 + 1 + + + 172.16.101.101 + 1 + + 99 + + 23 + 250 + + + + + 172.16.101.101 + 2 + + + 172.16.101.102 + 1 + + 3000 + + 150 + 4000 + + + + + 172.16.101.102 + 1 + + + 172.16.101.101 + 2 + + 3000 + + 150 + 4000 + + + + + 172.16.101.102 + 2 + + + 172.16.101.103 + 1 + + 1003 + + 150 + 4000 + + + + + 172.16.101.103 + 1 + + + 172.16.101.102 + 2 + + 1003 + + 150 + 4000 + + + + + 172.16.101.103 + 2 + + + 172.16.101.104 + 2 + + 323 + + 150 + 4000 + + + + + 172.16.101.104 + 2 + + + 172.16.101.103 + 2 + + 323 + + 150 + 4000 + + + + + 172.16.101.102 + 3 + + + 172.16.101.104 + 3 + + 2232 + + 150 + 4000 + + + + + 172.16.101.104 + 3 + + + 172.16.101.102 + 3 + + 2232 + + 150 + 4000 + + + + + 172.16.101.104 + 13 + + + 172.16.102.101 + 11 + + 102 + + + + 172.16.101.103 + 13 + + + 172.16.102.102 + 11 + + 230 + + + + + + + + + + 0.0.0.2 + + 172.16.102.0 + 24 + + + 172.16.102.101 + + + 172.16.102.102 + + + + \ No newline at end of file diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network2.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f039172f7dbbe1d9e9eaa657dc733b2b2426fc8 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network2.xml @@ -0,0 +1,274 @@ + + + + + + + + + 0.0.0.2 + + 172.16.102.0 + 24 + + + + https://openstack2.5Gex.com/url + 200 + 200GByte + 200TByte + + + + 172.16.102.101 + + + 172.16.102.102 + + + 172.16.102.103 + + + 172.16.102.104 + + + + 172.16.102.101 + 1 + + + 172.16.102.104 + 1 + + 99 + + 23 + 250 + + + + + 172.16.102.104 + 1 + + + 172.16.102.101 + 1 + + 99 + + 23 + 250 + + + + + 172.16.102.101 + 2 + + + 172.16.102.102 + 1 + + 3000 + + 150 + 4000 + + + + + 172.16.102.102 + 1 + + + 172.16.102.101 + 2 + + 3000 + + 150 + 4000 + + + + + 172.16.102.102 + 2 + + + 172.16.102.103 + 1 + + 1003 + + 150 + 4000 + + + + + 172.16.102.103 + 1 + + + 172.16.102.102 + 2 + + 1003 + + 150 + 4000 + + + + + 172.16.102.103 + 2 + + + 172.16.102.104 + 2 + + 323 + + 150 + 4000 + + + + + 172.16.102.104 + 2 + + + 172.16.102.103 + 2 + + 323 + + 150 + 4000 + + + + + 172.16.102.102 + 3 + + + 172.16.102.104 + 3 + + 2232 + + 150 + 4000 + + + + + 172.16.102.104 + 3 + + + 172.16.102.102 + 3 + + 2232 + + 150 + 4000 + + + + + 172.16.102.101 + 13 + + + 172.16.101.104 + 11 + + 102 + + + + 172.16.102.102 + 13 + + + 172.16.101.103 + 11 + + 230 + + + + 172.16.102.104 + 13 + + + 172.16.103.101 + 11 + + 102 + + + + 172.16.102.103 + 13 + + + 172.16.103.102 + 11 + + 230 + + + + + + + 0.0.0.1 + + 172.16.101.0 + 24 + + + 172.16.101.103 + + + 172.16.101.104 + + + + + + 0.0.0.3 + + 172.16.103.0 + 24 + + + 172.16.103.101 + + + 172.16.103.102 + + + + + \ No newline at end of file diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network3.xml new file mode 100644 index 0000000000000000000000000000000000000000..562bf78cc39af45028251802c8108e25e7823556 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network3.xml @@ -0,0 +1,239 @@ + + + + + + + + + 0.0.0.3 + + 172.16.103.0 + 24 + + + + https://openstack3.5Gex.com/url + 300 + 300Gbyte + 300Tbyte + + + + 172.16.103.101 + + + 172.16.103.102 + + + 172.16.103.103 + + + 172.16.103.104 + + + + 172.16.103.101 + 1 + + + 172.16.103.104 + 1 + + 99 + + 23 + 250 + + + + + 172.16.103.104 + 1 + + + 172.16.103.101 + 1 + + 99 + + 23 + 250 + + + + + 172.16.103.101 + 2 + + + 172.16.103.102 + 1 + + 3000 + + 150 + 4000 + + + + + 172.16.103.102 + 1 + + + 172.16.103.101 + 2 + + 3000 + + 150 + 4000 + + + + + 172.16.103.102 + 2 + + + 172.16.103.103 + 1 + + 1003 + + 150 + 4000 + + + + + 172.16.103.103 + 1 + + + 172.16.103.102 + 2 + + 1003 + + 150 + 4000 + + + + + 172.16.103.103 + 2 + + + 172.16.103.104 + 2 + + 323 + + 150 + 4000 + + + + + 172.16.103.104 + 2 + + + 172.16.103.103 + 2 + + 323 + + 150 + 4000 + + + + + 172.16.103.102 + 3 + + + 172.16.103.104 + 3 + + 2232 + + 150 + 4000 + + + + + 172.16.103.104 + 3 + + + 172.16.103.102 + 3 + + 2232 + + 150 + 4000 + + + + + 172.16.103.101 + 13 + + + 172.16.102.104 + 11 + + 102 + + + + 172.16.103.102 + 13 + + + 172.16.102.103 + 11 + + 230 + + + + + + + + + + 0.0.0.2 + + 172.16.102.0 + 24 + + + 172.16.102.103 + + + 172.16.102.104 + + + + \ No newline at end of file diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS1_2way.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS1_2way.xml new file mode 100644 index 0000000000000000000000000000000000000000..35b19221998485c04cf46733439103e8970050d0 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS1_2way.xml @@ -0,0 +1,68 @@ + + + + + + 179 + 172.17.11.201 + + 1111 + + + 172.17.11.202 + true + true + 179 + + + BGP4Parser-BGPLS1.log + BGP4Client-BGPLS1.log + BGP4Server-BGPLS1.log + + true + false + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + fromBGP + + + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS2_2way.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS2_2way.xml new file mode 100644 index 0000000000000000000000000000000000000000..a9bcac60932370c873b1c3431d2fd6a4a4a8c990 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS2_2way.xml @@ -0,0 +1,74 @@ + + + + + + 179 + 172.17.11.202 + + 1112 + + + 172.17.11.201 + true + true + 179 + + + 172.17.11.203 + true + true + 179 + + + BGP4Parser-BGPLS2.log + BGP4Client-BGPLS2.log + BGP4Server-BGPLS2.log + + true + false + + 40000 + false + + + 180 + + 4 + + 2 + + + + true + + 5000 + + true + + fromBGP + + + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS3_2way.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS3_2way.xml new file mode 100644 index 0000000000000000000000000000000000000000..108f214b3160cc7713cea775dc9e1c1519242cc0 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS3_2way.xml @@ -0,0 +1,68 @@ + + + + + + 179 + 172.17.11.203 + + 1113 + + + 172.17.11.202 + true + true + 179 + + + BGP4Parser-BGPLS3.log + BGP4Client-BGPLS3.log + BGP4Server-BGPLS3.log + + true + false + + 40000 + false + + + 180 + + 4 + + 3 + + + + true + + 5000 + + true + + fromBGP + + + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/README b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/README new file mode 100644 index 0000000000000000000000000000000000000000..56bebb238a6c413d8880ad3d2644b7097e616bc2 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/README @@ -0,0 +1,37 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#put the conf folder in the root directory of topology project +mv conf/ ~/netphony-topology/ + +cd ~/netphony-topology/ + +#update the BGP4SessionsInformation.java file to permit multiple connection with the same ip address +cp conf/BGP4SessionsInformation.java src/main/java/es/tid/bgp/bgp4Peer/bgp4session/ + +#compile again the project +mvn clean package -P generate-full-jar -P bgp-ls-speaker assembly:single + +#run the Topology Module for MdO1, only a TM can be present within a single VM +java -jar target/topology-1.3.2-shaded.jar conf/TMConfiguration_BGPLSreader_UNIFYwriter.xml + +#run the BGPLS speaker for MdO1 +java -Dlog4j.configurationFile=log4j2.xml -jar target/bgp-ls-speaker-jar-with-dependencies.jar conf/BGPLS1.xml + +#run the BGPLS speaker for MdO2 +java -Dlog4j.configurationFile=log4j2.xml -jar target/bgp-ls-speaker-jar-with-dependencies.jar conf/BGPLS2.xml + +#run the BGPLS speaker for MdO3 +java -Dlog4j.configurationFile=log4j2.xml -jar target/bgp-ls-speaker-jar-with-dependencies.jar conf/BGPLS3.xml + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM1.xml new file mode 100644 index 0000000000000000000000000000000000000000..7f46c6c44ca34a00af46c0048f706fe534420a1f --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM1.xml @@ -0,0 +1,41 @@ + + + + + localhost + 5001 + + + TM + target/conf2waysReal/network1.xml + 172.17.11.201 + + + initFromXML + + + + 8088 + + + True + True + target/conf2waysReal/BGPLS1_2way.xml + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM2.xml new file mode 100644 index 0000000000000000000000000000000000000000..851f0281d43f1b59fac7fb10bf2e5f9431977b96 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM2.xml @@ -0,0 +1,41 @@ + + + + + localhost + 5001 + + + TM + target/conf2waysReal/network2.xml + 172.17.11.202 + + + initFromXML + + + + 8088 + + + True + True + target/conf2waysReal/BGPLS2_2way.xml + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM3.xml new file mode 100644 index 0000000000000000000000000000000000000000..1348ed615c313dc5ca4605fae7a9a801dd97f51f --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM3.xml @@ -0,0 +1,41 @@ + + + + + localhost + 5001 + + + TM + target/conf2waysReal/network3.xml + 172.17.11.203 + + + initFromXML + + + + 8088 + + + True + True + target/conf2waysReal/BGPLS3_2way.xml + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network1.xml new file mode 100644 index 0000000000000000000000000000000000000000..981697a3548ea0eb0028c7ae8c5913a454e64280 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network1.xml @@ -0,0 +1,239 @@ + + + + + + + + + 0.0.0.1 + + 172.16.101.0 + 24 + + + + https://openstack.5Gex.com/url + 100 + 100Gbyte + 100Tbyte + + + + 172.16.101.101 + + + 172.16.101.102 + + + 172.16.101.103 + + + 172.16.101.104 + + + + 172.16.101.101 + 1 + + + 172.16.101.104 + 1 + + 99 + + 23 + 250 + + + + + 172.16.101.104 + 1 + + + 172.16.101.101 + 1 + + 99 + + 23 + 250 + + + + + 172.16.101.101 + 2 + + + 172.16.101.102 + 1 + + 3000 + + 150 + 4000 + + + + + 172.16.101.102 + 1 + + + 172.16.101.101 + 2 + + 3000 + + 150 + 4000 + + + + + 172.16.101.102 + 2 + + + 172.16.101.103 + 1 + + 1003 + + 150 + 4000 + + + + + 172.16.101.103 + 1 + + + 172.16.101.102 + 2 + + 1003 + + 150 + 4000 + + + + + 172.16.101.103 + 2 + + + 172.16.101.104 + 2 + + 323 + + 150 + 4000 + + + + + 172.16.101.104 + 2 + + + 172.16.101.103 + 2 + + 323 + + 150 + 4000 + + + + + 172.16.101.102 + 3 + + + 172.16.101.104 + 3 + + 2232 + + 150 + 4000 + + + + + 172.16.101.104 + 3 + + + 172.16.101.102 + 3 + + 2232 + + 150 + 4000 + + + + + 172.16.101.104 + 13 + + + 172.16.102.101 + 11 + + 102 + + + + 172.16.101.103 + 13 + + + 172.16.102.102 + 11 + + 230 + + + + + + + + + + 0.0.0.2 + + 172.16.102.0 + 24 + + + 172.16.102.101 + + + 172.16.102.102 + + + + \ No newline at end of file diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network2.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f039172f7dbbe1d9e9eaa657dc733b2b2426fc8 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network2.xml @@ -0,0 +1,274 @@ + + + + + + + + + 0.0.0.2 + + 172.16.102.0 + 24 + + + + https://openstack2.5Gex.com/url + 200 + 200GByte + 200TByte + + + + 172.16.102.101 + + + 172.16.102.102 + + + 172.16.102.103 + + + 172.16.102.104 + + + + 172.16.102.101 + 1 + + + 172.16.102.104 + 1 + + 99 + + 23 + 250 + + + + + 172.16.102.104 + 1 + + + 172.16.102.101 + 1 + + 99 + + 23 + 250 + + + + + 172.16.102.101 + 2 + + + 172.16.102.102 + 1 + + 3000 + + 150 + 4000 + + + + + 172.16.102.102 + 1 + + + 172.16.102.101 + 2 + + 3000 + + 150 + 4000 + + + + + 172.16.102.102 + 2 + + + 172.16.102.103 + 1 + + 1003 + + 150 + 4000 + + + + + 172.16.102.103 + 1 + + + 172.16.102.102 + 2 + + 1003 + + 150 + 4000 + + + + + 172.16.102.103 + 2 + + + 172.16.102.104 + 2 + + 323 + + 150 + 4000 + + + + + 172.16.102.104 + 2 + + + 172.16.102.103 + 2 + + 323 + + 150 + 4000 + + + + + 172.16.102.102 + 3 + + + 172.16.102.104 + 3 + + 2232 + + 150 + 4000 + + + + + 172.16.102.104 + 3 + + + 172.16.102.102 + 3 + + 2232 + + 150 + 4000 + + + + + 172.16.102.101 + 13 + + + 172.16.101.104 + 11 + + 102 + + + + 172.16.102.102 + 13 + + + 172.16.101.103 + 11 + + 230 + + + + 172.16.102.104 + 13 + + + 172.16.103.101 + 11 + + 102 + + + + 172.16.102.103 + 13 + + + 172.16.103.102 + 11 + + 230 + + + + + + + 0.0.0.1 + + 172.16.101.0 + 24 + + + 172.16.101.103 + + + 172.16.101.104 + + + + + + 0.0.0.3 + + 172.16.103.0 + 24 + + + 172.16.103.101 + + + 172.16.103.102 + + + + + \ No newline at end of file diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network3.xml new file mode 100644 index 0000000000000000000000000000000000000000..562bf78cc39af45028251802c8108e25e7823556 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network3.xml @@ -0,0 +1,239 @@ + + + + + + + + + 0.0.0.3 + + 172.16.103.0 + 24 + + + + https://openstack3.5Gex.com/url + 300 + 300Gbyte + 300Tbyte + + + + 172.16.103.101 + + + 172.16.103.102 + + + 172.16.103.103 + + + 172.16.103.104 + + + + 172.16.103.101 + 1 + + + 172.16.103.104 + 1 + + 99 + + 23 + 250 + + + + + 172.16.103.104 + 1 + + + 172.16.103.101 + 1 + + 99 + + 23 + 250 + + + + + 172.16.103.101 + 2 + + + 172.16.103.102 + 1 + + 3000 + + 150 + 4000 + + + + + 172.16.103.102 + 1 + + + 172.16.103.101 + 2 + + 3000 + + 150 + 4000 + + + + + 172.16.103.102 + 2 + + + 172.16.103.103 + 1 + + 1003 + + 150 + 4000 + + + + + 172.16.103.103 + 1 + + + 172.16.103.102 + 2 + + 1003 + + 150 + 4000 + + + + + 172.16.103.103 + 2 + + + 172.16.103.104 + 2 + + 323 + + 150 + 4000 + + + + + 172.16.103.104 + 2 + + + 172.16.103.103 + 2 + + 323 + + 150 + 4000 + + + + + 172.16.103.102 + 3 + + + 172.16.103.104 + 3 + + 2232 + + 150 + 4000 + + + + + 172.16.103.104 + 3 + + + 172.16.103.102 + 3 + + 2232 + + 150 + 4000 + + + + + 172.16.103.101 + 13 + + + 172.16.102.104 + 11 + + 102 + + + + 172.16.103.102 + 13 + + + 172.16.102.103 + 11 + + 230 + + + + + + + + + + 0.0.0.2 + + 172.16.102.0 + 24 + + + 172.16.102.103 + + + 172.16.102.104 + + + + \ No newline at end of file diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters.xml new file mode 100644 index 0000000000000000000000000000000000000000..9b1cf5aad9d3887d9fc70832686ac6697915e463 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters.xml @@ -0,0 +1,69 @@ + + + + + + 179 + 10.95.205.12 + + 1111 + + + 10.95.86.37 + false + true + 179 + + + BGP4Parser.log + BGP4Client.log + BGP4Server.log + + true + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + false + + fromXML + + network1.xml + + + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersRX.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersRX.xml new file mode 100644 index 0000000000000000000000000000000000000000..70aa79dd0bfce5a675ed11a4b87e9b62eff4a1b7 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersRX.xml @@ -0,0 +1,68 @@ + + + + + + 11179 + 1.1.1.1 + + 1111 + + + localhost + false + true + 22179 + + + BGP4Parser.log + BGP4Client.log + BGP4Server.log + + true + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + fromXML + + + total.xml + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTX.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTX.xml new file mode 100644 index 0000000000000000000000000000000000000000..8ed9e8fd34ba38f942d3cd0f6df64a377998f04a --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTX.xml @@ -0,0 +1,68 @@ + + + + + + 33179 + 3.3.3.3 + + 1113 + + + localhost + true + false + 22179 + + + BGP4Parser.log + BGP4Client.log + BGP4Server.log + + true + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + fromXML + + + total101.xml + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTXRX.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTXRX.xml new file mode 100644 index 0000000000000000000000000000000000000000..0379914fdf33b137a0833d120e179eabfdab3d87 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTXRX.xml @@ -0,0 +1,74 @@ + + + + + + 22179 + 2.2.2.2 + + 1112 + + + localhost + true + false + 11179 + + + localhost + false + true + 33179 + + + BGP4Parser.log + BGP4Client.log + BGP4Server.log + + true + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + fromXML + + + total10v2.xml + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..fd3c0745258c6bedfd081a41eff5202af14a4df5 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1.xml @@ -0,0 +1,67 @@ + + + + + + 11179 + 10.95.205.12 + + 1111 + + + localhost + true + false + 22179 + + + BGP4Parser.log + BGP4Client.log + BGP4Server.log + + true + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + fromXML + + src/test/resources/network1.xml + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1_IT.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1_IT.xml new file mode 100644 index 0000000000000000000000000000000000000000..80b0186452a14c08259f1caa8260151cc9a1ea30 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1_IT.xml @@ -0,0 +1,67 @@ + + + + + + 11179 + 10.95.205.12 + + 1111 + + + docker_host + true + false + 22179 + + + BGP4Parser.log + BGP4Client.log + BGP4Server.log + + true + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + fromXML + + src/test/resources/network1.xml + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..2059250b51dccde80d448e6e46f1e3ebac6608bd --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_2.xml @@ -0,0 +1,66 @@ + + + + + + 22179 + 1.1.1.1 + + 1112 + + + localhost + false + true + 11179 + + + + BGP4Parser2.log + BGP4Client2.log + BGP4Server2.log + + true + + 40000 + true + + + 180 + + 4 + + 1 + + + + false + + true + + fromBGP + + + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_PCE.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_PCE.xml new file mode 100644 index 0000000000000000000000000000000000000000..616a97b3448dffcf936f7c2cd94e4eb5e63e726f --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_PCE.xml @@ -0,0 +1,67 @@ + + + + + + 11179 + 10.95.205.12 + + 1111 + + + localhost + true + false + 22179 + + + BGP4Parser.log + BGP4Client.log + BGP4Server.log + + true + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + fromXML + + src/test/resources/network1_pce.xml + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_TM.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_TM.xml new file mode 100644 index 0000000000000000000000000000000000000000..37903eac45ed7d468ee600fac26376b54e3fa62f --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_TM.xml @@ -0,0 +1,67 @@ + + + + + + 11179 + 10.95.205.12 + + 1111 + + + localhost + true + false + 22179 + + + BGP4Parser.log + BGP4Client.log + BGP4Server.log + + true + + 10000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + + + + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopology.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopology.xml new file mode 100644 index 0000000000000000000000000000000000000000..d56d9db29ed3db3c944c75eb39ee6cb409f6ebc8 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopology.xml @@ -0,0 +1,604 @@ + + + + + + + + 0.0.0.1 + + 192.168.0.0 + 12 + + + + + Source + +
10.0.50.3
+
+ 10.0.50.3 + true + transport + COPMode + Discus + localhost + 8080 + + + 1 + + + 50.50.50.1 + + + transport + + + true + + + + 2 + + + 50.50.50.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + TN1 + +
192.168.1.1
+
+ 192.168.1.1 + true + transport + COPMode + Idealist + pceserver + 4445 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + TN2 + +
192.168.1.2
+
+ 192.168.1.2 + true + transport + COPMode + Idealist + pceserver + 4445 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + TN3 + +
192.168.1.3
+
+ 192.168.1.3 + true + transport + COPMode + Idealist + pceserver + 4445 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + OLT1 + +
10.0.50.2
+
+ 00:00:00:00:00:00:03:04 + true + transport + COPMode + Discus + localhost + 8080 + + + 1 + + + 50.50.50.1 + + + transport + + + true + + + + 2 + + + 50.50.50.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + + ONU + +
10.0.50.1
+
+ 00:00:00:00:00:00:03:03 + true + transport + COPMode + Discus + localhost + 8080 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + + GPU_rendition + +
10.0.50.4
+
+ 00:00:00:00:00:00:00:10 + true + transport + COPMode + Discus + localhost + 8080 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + + + + + + + + + + + Source_1_TN1_1 + true + + Source + 1 + + + TN1 + 1 + + transport + transport + + + + TN1_1_Source_1 + true + + TN1 + 1 + + + Source + 1 + + transport + transport + + + + + TN1_2_TN2_1 + true + + TN1 + 2 + + + TN2 + 1 + + transport + transport + + + TN2_1_TN1_2 + true + + TN2 + 1 + + + TN1 + 2 + + transport + transport + + + + + TN2_2_OLT1_1 + true + + TN2 + 2 + + + OLT1 + 1 + + transport + transport + + + OLT1_1_TN2_2 + true + + OLT1 + 1 + + + TN2 + 2 + + transport + transport + + + + + OLT1_2_ONU_1 + true + + OLT1 + 2 + + + ONU + 1 + + transport + transport + + + ADVA_1_OLT1_2 + true + + ONU + 1 + + + OLT1 + 2 + + transport + transport + + + + + ONU_2_GPU_rendition_2 + true + + ONU + 2 + + + GPU_rendition + 2 + + transport + transport + + + CTTC_2_ONU_2 + true + + GPU_rendition + 2 + + + ONU + 2 + + transport + transport + + + +
+
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopologyECOC.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopologyECOC.xml new file mode 100644 index 0000000000000000000000000000000000000000..87196b5e0efb513d6f4aee4840dc80a54d5990f7 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopologyECOC.xml @@ -0,0 +1,340 @@ + + + + + + + + 0.0.0.1 + + 192.168.0.0 + 12 + + + + + + UNIVBRIS + +
200.0.0.3
+
+ 00:00:00:00:00:00:03:04 + true + transport + COPMode + BRISTOL + 10.0.34.106 + 8080 + + + 1 + + + 50.50.50.1 + + + transport + + + true + + + + 2 + + + 50.50.50.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + + CTTC + +
200.0.0.4
+
+ 00:00:00:00:00:00:03:03 + true + transport + COPMode + CTTC + 10.0.34.128 + 8080 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + + ADVA + +
20.0.0.5
+
+ 00:00:00:00:00:00:00:10 + true + transport + COPMode + ADVA + 10.0.34.104 + 8080 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + + + + + + + + + + + + + + + + UNIVBRIS_2_CTTC_1 + true + + UNIVBRIS + 2 + + + CTTC + 1 + + transport + transport + + + CTTC_1_UNIVBRIS_2 + true + + CTTC + 1 + + + UNIVBRIS + 2 + + transport + transport + + + + + + + + ADVA_2_CTTC_2 + true + + ADVA + 2 + + + CTTC + 2 + + transport + transport + + + CTTC_2_ADVA_2 + true + + CTTC + 2 + + + ADVA + 2 + + transport + transport + + + +
+
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration.xml new file mode 100644 index 0000000000000000000000000000000000000000..d1c670cfc42b86851a57e76315e211829423b4eb --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration.xml @@ -0,0 +1,40 @@ + + + + + localhost + 5007 + + + IP + src/test/resources/EmulatedTopology.xml + + + initFromXML + + + localhost + 9876 + + + 8087 + + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration2.xml new file mode 100644 index 0000000000000000000000000000000000000000..69b61f93a80732437130e218af28dd62598285f1 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration2.xml @@ -0,0 +1,34 @@ + + + + + localhost + 5007 + + + IP + src/test/resources/EmulatedTopology.xml + + + 8086 + + + localhost + 9876 + + + initFromXML + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfigurationCOP.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfigurationCOP.xml new file mode 100644 index 0000000000000000000000000000000000000000..caf6d59506e4d0f7b98953826e8e2228c383593c --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfigurationCOP.xml @@ -0,0 +1,36 @@ + + + + + localhost + 5008 + + + localhost + 8087 + 8088 + + + localhost + 8086 + + + localhost + 9877 + + + initFromXML + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_COPwriter.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_COPwriter.xml new file mode 100644 index 0000000000000000000000000000000000000000..b698140819bbf9dd9650bdd4658514e192765bc0 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_COPwriter.xml @@ -0,0 +1,40 @@ + + + + + localhost + 5008 + + + + initFromXML + + + localhost + 9876 + + + 8088 + + + True + False + src/test/resources/BGP4Parameters_2.xml + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_IETFwriter.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_IETFwriter.xml new file mode 100644 index 0000000000000000000000000000000000000000..862588bb0427c8a3f1573380a8f6cb0988a4f9f8 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_IETFwriter.xml @@ -0,0 +1,40 @@ + + + + + localhost + 5008 + + + + initFromXML + + + localhost + 9876 + + + 8088 + + + True + False + src/test/resources/BGP4Parameters_2.xml + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_UNIFYwriter.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_UNIFYwriter.xml new file mode 100644 index 0000000000000000000000000000000000000000..038be7480de38bdd222f6bae87d8cf347257f0ed --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_UNIFYwriter.xml @@ -0,0 +1,40 @@ + + + + + localhost + 5008 + + + + initFromXML + + + localhost + 9876 + + + 8088 + + + True + False + src/test/resources/BGP4Parameters_2.xml + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPreader_BGPLSsender.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPreader_BGPLSsender.xml new file mode 100644 index 0000000000000000000000000000000000000000..4ec8b8530c6c6037d490da4567c2e79ae589a2b0 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPreader_BGPLSsender.xml @@ -0,0 +1,42 @@ + + + + + localhost + 5008 + + + + initFromXML + + + localhost + 9876 + + + 8088 + 10.95.86.27 + 8070 + + + False + True + src/test/resources/BGP4Parameters_TM.xml + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPsender.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPsender.xml new file mode 100644 index 0000000000000000000000000000000000000000..d1c670cfc42b86851a57e76315e211829423b4eb --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPsender.xml @@ -0,0 +1,40 @@ + + + + + localhost + 5007 + + + IP + src/test/resources/EmulatedTopology.xml + + + initFromXML + + + localhost + 9876 + + + 8087 + + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/log4j2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/log4j2.xml new file mode 100644 index 0000000000000000000000000000000000000000..60ff89ddc08062411e36b09e18682462cb7dbbff --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/log4j2.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/network1_pce.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/network1_pce.xml new file mode 100644 index 0000000000000000000000000000000000000000..28e69211460d77ccfc4b3e4d9d0dd51c73167386 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/network1_pce.xml @@ -0,0 +1,172 @@ + + + + + + + + 0.0.0.1 + + 192.168.1.0 + 12 + + + + 192.168.1.1 + + + 192.168.1.2 + + + 192.168.1.3 + + + + + 160 + + + + + + + + + + + 192.168.1.1 + 2 + + + 192.168.1.3 + 1 + + + 3.14 + + + 100 + + + 100 + + + + + + + 192.168.1.3 + 1 + + + 192.168.1.1 + 2 + + + 3.14 + + + 100 + + + 100 + + + + + + + 192.168.1.2 + 2 + + + 192.168.1.3 + 2 + + + 3.13 + + + 100 + + + 100 + + + + + + + 192.168.1.3 + 2 + + + 192.168.1.2 + 2 + + + 3.13 + + + 100 + + + 100 + + + + + + + 192.168.1.1 + 1 + + + 192.168.1.2 + 1 + + + 3.12 + + + 100 + + + 100 + + + + + + + 192.168.1.2 + 1 + + + 192.168.1.1 + 1 + + + 3.12 + + + 100 + + + 100 + + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total.xml new file mode 100644 index 0000000000000000000000000000000000000000..12466fdd0386d81aba8a49082bc600a050a56957 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total.xml @@ -0,0 +1,213 @@ + + + + + + +1.0.0.103 + +172.16.0.0 +24 + + + + https://openstack1.5Gex.com/url + 111 + 111Gbyte + 111Tbyte + + + + + +172.16.0.1 + + +172.16.0.2 + + +172.16.0.3 + + +172.16.0.4 + + + +172.16.0.1 +1 + + +172.16.10.1 +1 + +72 + +100 +3560 + + + + +172.16.0.2 +1 + + +172.16.10.2 +1 + +150 + +100 +3560 + + + + +172.16.0.1 +1 + + +172.16.0.3 +1 + +303 + +100 +3560 + + + + +172.16.0.3 +1 + + +172.16.0.1 +1 + +303 + +100 +3560 + + + + +172.16.0.1 +1 + + +172.16.0.4 +1 + +542 + +100 +3560 + + + + +172.16.0.4 +1 + + +172.16.0.1 +1 + +542 + +100 +3560 + + + + +172.16.0.2 +1 + + +172.16.0.3 +1 + +221 + +100 +3560 + + + + +172.16.0.3 +1 + + +172.16.0.2 +1 + +221 + +100 +3560 + + + + +172.16.0.2 +1 + + +172.16.0.4 +1 + +198 + +100 +3560 + + + + +172.16.0.4 +1 + + +172.16.0.2 +1 + +198 + +100 +3560 + + + + + + + +0.0.0.10 + +172.16.10.0 +24 + + +172.16.10.1 + + +172.16.10.2 + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total101.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total101.xml new file mode 100644 index 0000000000000000000000000000000000000000..d6c68fbc9829a40ef936b94525e46aa434e49699 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total101.xml @@ -0,0 +1,144 @@ + + + + + + +0.0.0.101 + +10.19.1.0 +24 + + +10.19.1.1 + + +10.19.1.2 + + +10.19.1.5 + + + +10.19.1.1 + 1 + + +10.19.1.5 + 1 + +422 + +100 +3560 + + + + +10.19.1.5 + 1 + + +10.19.1.1 + 1 + +422 + +100 +3560 + + + + + +10.19.1.2 + 1 + + +10.19.1.5 + 1 + +722 + +100 +3560 + + + + +10.19.1.5 + 1 + + +10.19.1.2 + 1 + +722 + +100 +3560 + + + + + +10.19.1.1 +1 + + +172.16.10.3 +1 + +123 + +100 +3560 + + + + + +10.19.1.2 +1 + + +172.16.10.4 +1 + +55 + +100 +3560 + + + + + + + + +0.0.0.10 + +172.16.10.0 +24 + + +172.16.10.3 + + +172.16.10.4 + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total10v2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total10v2.xml new file mode 100644 index 0000000000000000000000000000000000000000..c1c8cbbfc849ae9917da0f1b1a585ca61befaf29 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total10v2.xml @@ -0,0 +1,261 @@ + + + + + + +0.0.0.10 + +172.16.10.0 +24 + + +172.16.10.1 + + +172.16.10.2 + + +172.16.10.3 + + +172.16.10.4 + + + +172.16.10.1 + 1 + + +172.16.10.3 + 1 + +422 + +100 +3560 + + + + +172.16.10.3 + 1 + + +172.16.10.1 + 1 + +422 + +100 +3560 + + + + + +172.16.10.1 + 1 + + + +172.16.10.4 + 1 + +722 + +100 +3560 + + + + +172.16.10.4 + 1 + + +172.16.10.1 + 1 + +722 + +100 +3560 + + + + + + +172.16.10.2 + 1 + + +172.16.10.3 + 1 + +122 + +100 +3560 + + + + +172.16.10.3 + 1 + + +172.16.10.2 + 1 + +122 + +100 +3560 + + + + + +172.16.10.2 + 1 + + +172.16.10.4 + 1 + +200 + +100 +3560 + + + + +172.16.10.4 + 1 + + +172.16.10.2 + 1 + +200 + +100 +3560 + + + + + + +172.16.10.1 + +1 + + +172.16.0.1 +1 + +72 + +100 +3560 + + + + + +172.16.10.2 +1 + + +172.16.0.2 +1 + +150 + +100 +3560 + + + + + +172.16.10.3 +1 + + +10.19.1.1 +1 + +123 + +100 +3560 + + + + + +172.16.10.4 +1 + + +10.19.1.2 +1 + +55 + +100 +3560 + + + + + + + + +0.0.0.101 + +10.19.1.0 +24 + + +10.19.1.1 + + +10.19.1.2 + + + + + + +0.0.0.103 + +172.16.0.0 +24 + + +172.16.0.1 + + +172.16.0.2 + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/java/es/tid/bgp/bgp4Peer/tests/BGP4PeerTest.java b/src/bgpls_speaker/service/java/netphony-topology/src/test/java/es/tid/bgp/bgp4Peer/tests/BGP4PeerTest.java new file mode 100644 index 0000000000000000000000000000000000000000..9c23d708d91b25c867d074a091636e0a8b59051c --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/java/es/tid/bgp/bgp4Peer/tests/BGP4PeerTest.java @@ -0,0 +1,130 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package es.tid.bgp.bgp4Peer.tests; + +import static org.junit.Assert.*; + +import java.net.Inet4Address; +import java.util.Set; + +import eu.teraflow.tid.bgp4Peer.peer.BGPPeer; +import eu.teraflow.tid.tedb.MDTEDB; + +public class BGP4PeerTest { + + public BGP4PeerTest(){ + + } + + /** + * This tests starts a BGL-LS Speaker, reads the topology from a File and Sends it. + * A second speaker is started and reads the topology. + * The first speaker is configured to read only the multidomain topology and send the + * multidomain topology + * The second speaker is configured as Consumer. + * The speakers are launched in separated non-standard ports for testing purposes. + * Both speakers talk and the topology is sent from BGP-Speaker 1 to BGP-Speaker 2 + * It checks after 10 seconds if the topology of BGP-Speaker 2 is the same as BGP + * Speaker 1. + */ + @org.junit.Test + public void testPeer(){ + try { + //Create BGP4Peer 1 + BGPPeer bgpPeer = new BGPPeer(); + bgpPeer.configure("src/test/resources/BGP4Parameters_1.xml"); + //Create the TEDB + //bgpPeer.createTEDB("test"); //did it in configure + assertTrue("MD Topology has not 2 domains",((MDTEDB)bgpPeer.getMultiDomainTEDB()).getNetworkDomainGraph().vertexSet().size()==2); + bgpPeer.createUpdateDispatcher(); + bgpPeer.startClient(); + bgpPeer.startServer(); + bgpPeer.startSaveTopology(); + bgpPeer.startManagementServer(); + bgpPeer.startSendTopology(); + String topoOriginal=bgpPeer.getMultiDomainTEDB().printTopology(); + + System.out.println("Topology1: "); + System.out.println(topoOriginal); + + + //Launch BGP4Peer + //bgpPeer.stopPeer(); + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + BGPPeer bgpPeer2 = new BGPPeer(); + bgpPeer2.configure("src/test/resources/BGP4Parameters_2.xml"); + //Create the TEDB + //bgpPeer2.createTEDB("test"); //did it in configure + bgpPeer2.createUpdateDispatcher(); + //bgpPeer2.startClient(); + bgpPeer2.startServer(); + bgpPeer2.startSaveTopology(); + bgpPeer2.startManagementServer(); + //bgpPeer2.startSendTopology(); + try { + Thread.sleep(10000); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + String topo2=bgpPeer2.getMultiDomainTEDB().printTopology(); + + System.out.println("---------------------------------------"); + System.out.println("---------------------------------------"); + System.out.println("---------------------------------------"); + System.out.println("Topology of BGP-LS Speaker 1: "); + System.out.println("---------------------------------------"); + System.out.println(topoOriginal); + Set keySet = bgpPeer.getIntraTEDBs().keySet(); + for(String key : keySet){ + System.out.println("---IntraTEDB: domain_id= "+key); + System.out.println(bgpPeer.getIntraTEDBs().get(key).printTopology()); + } + System.out.println("---------------------------------------"); + System.out.println("Topology of BGP-LS Speaker 2: "); + System.out.println("---------------------------------------"); + System.out.println(topo2); + System.out.println("---------------------------------------"); + Set keySet2 = bgpPeer2.getIntraTEDBs().keySet(); + for(String key : keySet2){ + System.out.println("---IntraTEDB: domain_id= "+key); + System.out.println(bgpPeer2.getIntraTEDBs().get(key).printTopology()); + } + /*try { + Thread.sleep(10000); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + }*/ + for(String key : keySet){ + //assertTrue("Checking if topos are equals, IntraTEDBs, don't have the same domains", bgpPeer2.getIntraTEDBs().keySet().contains(key)); + //assertTrue("->Checking if topos are equals, IntraTEDB (domains="+key+") are not equal:\nTED1:\n"+bgpPeer.getIntraTEDBs().get(key).printTopology()+"\nTED2:\n"+bgpPeer.getIntraTEDBs().get(key).printTopology(), bgpPeer.getIntraTEDBs().get(key).equals(bgpPeer2.getIntraTEDBs().get(key))); + } + assertTrue("Checking if topos are equal",topoOriginal.equals(topo2)); + } catch (Exception exc){ + exc.printStackTrace(); + assertTrue("Exception "+exc.getMessage(),false); + } + + + } + +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..fd3c0745258c6bedfd081a41eff5202af14a4df5 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1.xml @@ -0,0 +1,67 @@ + + + + + + 11179 + 10.95.205.12 + + 1111 + + + localhost + true + false + 22179 + + + BGP4Parser.log + BGP4Client.log + BGP4Server.log + + true + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + fromXML + + src/test/resources/network1.xml + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1_IT.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1_IT.xml new file mode 100644 index 0000000000000000000000000000000000000000..80b0186452a14c08259f1caa8260151cc9a1ea30 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1_IT.xml @@ -0,0 +1,67 @@ + + + + + + 11179 + 10.95.205.12 + + 1111 + + + docker_host + true + false + 22179 + + + BGP4Parser.log + BGP4Client.log + BGP4Server.log + + true + + 40000 + false + + + 180 + + 4 + + 1 + + + + true + + 5000 + + true + + fromXML + + src/test/resources/network1.xml + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..2059250b51dccde80d448e6e46f1e3ebac6608bd --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_2.xml @@ -0,0 +1,66 @@ + + + + + + 22179 + 1.1.1.1 + + 1112 + + + localhost + false + true + 11179 + + + + BGP4Parser2.log + BGP4Client2.log + BGP4Server2.log + + true + + 40000 + true + + + 180 + + 4 + + 1 + + + + false + + true + + fromBGP + + + + + + 0.0.0.0 + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopology.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopology.xml new file mode 100644 index 0000000000000000000000000000000000000000..d56d9db29ed3db3c944c75eb39ee6cb409f6ebc8 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopology.xml @@ -0,0 +1,604 @@ + + + + + + + + 0.0.0.1 + + 192.168.0.0 + 12 + + + + + Source + +
10.0.50.3
+
+ 10.0.50.3 + true + transport + COPMode + Discus + localhost + 8080 + + + 1 + + + 50.50.50.1 + + + transport + + + true + + + + 2 + + + 50.50.50.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + TN1 + +
192.168.1.1
+
+ 192.168.1.1 + true + transport + COPMode + Idealist + pceserver + 4445 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + TN2 + +
192.168.1.2
+
+ 192.168.1.2 + true + transport + COPMode + Idealist + pceserver + 4445 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + TN3 + +
192.168.1.3
+
+ 192.168.1.3 + true + transport + COPMode + Idealist + pceserver + 4445 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + OLT1 + +
10.0.50.2
+
+ 00:00:00:00:00:00:03:04 + true + transport + COPMode + Discus + localhost + 8080 + + + 1 + + + 50.50.50.1 + + + transport + + + true + + + + 2 + + + 50.50.50.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + + ONU + +
10.0.50.1
+
+ 00:00:00:00:00:00:03:03 + true + transport + COPMode + Discus + localhost + 8080 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + + GPU_rendition + +
10.0.50.4
+
+ 00:00:00:00:00:00:00:10 + true + transport + COPMode + Discus + localhost + 8080 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + + + + + + + + + + + Source_1_TN1_1 + true + + Source + 1 + + + TN1 + 1 + + transport + transport + + + + TN1_1_Source_1 + true + + TN1 + 1 + + + Source + 1 + + transport + transport + + + + + TN1_2_TN2_1 + true + + TN1 + 2 + + + TN2 + 1 + + transport + transport + + + TN2_1_TN1_2 + true + + TN2 + 1 + + + TN1 + 2 + + transport + transport + + + + + TN2_2_OLT1_1 + true + + TN2 + 2 + + + OLT1 + 1 + + transport + transport + + + OLT1_1_TN2_2 + true + + OLT1 + 1 + + + TN2 + 2 + + transport + transport + + + + + OLT1_2_ONU_1 + true + + OLT1 + 2 + + + ONU + 1 + + transport + transport + + + ADVA_1_OLT1_2 + true + + ONU + 1 + + + OLT1 + 2 + + transport + transport + + + + + ONU_2_GPU_rendition_2 + true + + ONU + 2 + + + GPU_rendition + 2 + + transport + transport + + + CTTC_2_ONU_2 + true + + GPU_rendition + 2 + + + ONU + 2 + + transport + transport + + + +
+
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopologyECOC.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopologyECOC.xml new file mode 100644 index 0000000000000000000000000000000000000000..87196b5e0efb513d6f4aee4840dc80a54d5990f7 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopologyECOC.xml @@ -0,0 +1,340 @@ + + + + + + + + 0.0.0.1 + + 192.168.0.0 + 12 + + + + + + UNIVBRIS + +
200.0.0.3
+
+ 00:00:00:00:00:00:03:04 + true + transport + COPMode + BRISTOL + 10.0.34.106 + 8080 + + + 1 + + + 50.50.50.1 + + + transport + + + true + + + + 2 + + + 50.50.50.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + + CTTC + +
200.0.0.4
+
+ 00:00:00:00:00:00:03:03 + true + transport + COPMode + CTTC + 10.0.34.128 + 8080 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + + ADVA + +
20.0.0.5
+
+ 00:00:00:00:00:00:00:10 + true + transport + COPMode + ADVA + 10.0.34.104 + 8080 + + + 1 + + + 51.51.51.1 + + + transport + + + true + + + + 2 + + + 51.51.51.1 + + + transport + + + true + + + + 1 + + 2 + 1 + + + +
+ + + + + + + + + + + + + + + + + + + UNIVBRIS_2_CTTC_1 + true + + UNIVBRIS + 2 + + + CTTC + 1 + + transport + transport + + + CTTC_1_UNIVBRIS_2 + true + + CTTC + 1 + + + UNIVBRIS + 2 + + transport + transport + + + + + + + + ADVA_2_CTTC_2 + true + + ADVA + 2 + + + CTTC + 2 + + transport + transport + + + CTTC_2_ADVA_2 + true + + CTTC + 2 + + + ADVA + 2 + + transport + transport + + + +
+
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/log4j2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/log4j2.xml new file mode 100644 index 0000000000000000000000000000000000000000..e2b01769b5e250fdb38e0262a97a6cc406226a86 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/log4j2.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/network1.xml new file mode 100644 index 0000000000000000000000000000000000000000..6ee18e6a041605d3dca576a860560144742076aa --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/network1.xml @@ -0,0 +1,227 @@ + + + + + + + + + 0.0.0.1 + + 172.16.101.0 + 29 + + + + https://openstack.5Gex.com/url + 100 + 100Gbyte + 100Tbyte + + + + 172.16.101.101 + + + 172.16.101.102 + + + 172.16.101.103 + + + + 172.16.101.104 + + + + 99 + + 23 + 43 + + 1 + 102 + 802 + 500 + 436 + + + + + 172.16.101.101 + 1 + + + 172.16.101.104 + 1 + + 3.35 + 99 + + 23 + 43 + + 1 + 102 + 802 + 500 + 436 + + + + 172.16.101.104 + 1 + + + 172.16.101.101 + 1 + + + + + 172.16.101.101 + 2 + + + 172.16.101.102 + 1 + + + + + 172.16.101.102 + 1 + + + 172.16.101.101 + 2 + + + + + 172.16.101.102 + 2 + + + 172.16.101.103 + 1 + + 102103 + + + + 172.16.101.103 + 1 + + + 172.16.101.102 + 2 + + + + + 172.16.101.103 + 2 + + + 172.16.101.104 + 2 + + + + + 172.16.101.104 + 2 + + + 172.16.101.103 + 2 + + + + + + 172.16.101.102 + 3 + + + 172.16.101.104 + 3 + + + + + 172.16.101.104 + 3 + + + 172.16.101.102 + 3 + + + + + + 172.16.101.104 + 13 + + + 172.16.102.101 + 11 + + 1 + + + + + + + + + + 0.0.0.2 + + 172.16.102.0 + 29 + + + + + https://UC3MController.5Gex.com/url + 222 + 222Gbyte + 222Tbyte + + + + 172.16.102.101 + + + 172.16.102.102 + + + + 172.16.102.101 + 14 + + + 172.16.102.102 + 13 + + 2 + + + + \ No newline at end of file diff --git a/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java b/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java new file mode 100644 index 0000000000000000000000000000000000000000..a069d6c0b72a5450ea385c542982175beccd8d65 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java @@ -0,0 +1,320 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package src.main.proto; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + *
+ * Defining a Service, a Service can have multiple RPC operations
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.24.0)", + comments = "Source: grpcService.proto") +public final class updateServiceGrpc { + + private updateServiceGrpc() {} + + public static final String SERVICE_NAME = "src.main.proto.updateService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getUpdateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "update", + requestType = src.main.proto.GrpcService.updateRequest.class, + responseType = src.main.proto.GrpcService.updateResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateMethod() { + io.grpc.MethodDescriptor getUpdateMethod; + if ((getUpdateMethod = updateServiceGrpc.getUpdateMethod) == null) { + synchronized (updateServiceGrpc.class) { + if ((getUpdateMethod = updateServiceGrpc.getUpdateMethod) == null) { + updateServiceGrpc.getUpdateMethod = getUpdateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "update")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + src.main.proto.GrpcService.updateRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + src.main.proto.GrpcService.updateResponse.getDefaultInstance())) + .setSchemaDescriptor(new updateServiceMethodDescriptorSupplier("update")) + .build(); + } + } + } + return getUpdateMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static updateServiceStub newStub(io.grpc.Channel channel) { + return new updateServiceStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static updateServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new updateServiceBlockingStub(channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static updateServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + return new updateServiceFutureStub(channel); + } + + /** + *
+   * Defining a Service, a Service can have multiple RPC operations
+   * 
+ */ + public static abstract class updateServiceImplBase implements io.grpc.BindableService { + + /** + *
+     * MODIFY HERE: Update the return to streaming return.
+     * 
+ */ + public void update(src.main.proto.GrpcService.updateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getUpdateMethod(), + asyncUnaryCall( + new MethodHandlers< + src.main.proto.GrpcService.updateRequest, + src.main.proto.GrpcService.updateResponse>( + this, METHODID_UPDATE))) + .build(); + } + } + + /** + *
+   * Defining a Service, a Service can have multiple RPC operations
+   * 
+ */ + public static final class updateServiceStub extends io.grpc.stub.AbstractStub { + private updateServiceStub(io.grpc.Channel channel) { + super(channel); + } + + private updateServiceStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected updateServiceStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new updateServiceStub(channel, callOptions); + } + + /** + *
+     * MODIFY HERE: Update the return to streaming return.
+     * 
+ */ + public void update(src.main.proto.GrpcService.updateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Defining a Service, a Service can have multiple RPC operations
+   * 
+ */ + public static final class updateServiceBlockingStub extends io.grpc.stub.AbstractStub { + private updateServiceBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private updateServiceBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected updateServiceBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new updateServiceBlockingStub(channel, callOptions); + } + + /** + *
+     * MODIFY HERE: Update the return to streaming return.
+     * 
+ */ + public src.main.proto.GrpcService.updateResponse update(src.main.proto.GrpcService.updateRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Defining a Service, a Service can have multiple RPC operations
+   * 
+ */ + public static final class updateServiceFutureStub extends io.grpc.stub.AbstractStub { + private updateServiceFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private updateServiceFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected updateServiceFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new updateServiceFutureStub(channel, callOptions); + } + + /** + *
+     * MODIFY HERE: Update the return to streaming return.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture update( + src.main.proto.GrpcService.updateRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_UPDATE = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final updateServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(updateServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_UPDATE: + serviceImpl.update((src.main.proto.GrpcService.updateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class updateServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + updateServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return src.main.proto.GrpcService.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("updateService"); + } + } + + private static final class updateServiceFileDescriptorSupplier + extends updateServiceBaseDescriptorSupplier { + updateServiceFileDescriptorSupplier() {} + } + + private static final class updateServiceMethodDescriptorSupplier + extends updateServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + updateServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (updateServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new updateServiceFileDescriptorSupplier()) + .addMethod(getUpdateMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/src/bgpls_speaker/service/java/netphony-topology/topology.iml b/src/bgpls_speaker/service/java/netphony-topology/topology.iml new file mode 100644 index 0000000000000000000000000000000000000000..dacd0b12903059bdfd5b0afedaf87ecf5b3dac60 --- /dev/null +++ b/src/bgpls_speaker/service/java/netphony-topology/topology.iml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/bgpls_speaker/service/tools/DiscoveredDBManager.py b/src/bgpls_speaker/service/tools/DiscoveredDBManager.py new file mode 100644 index 0000000000000000000000000000000000000000..eacc75e594c3bbb74d91d525833b4f2b75bb6dcf --- /dev/null +++ b/src/bgpls_speaker/service/tools/DiscoveredDBManager.py @@ -0,0 +1,318 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 List, Tuple, Union +from bgpls_speaker.service.tools.Tools import UpdateRequest,NodeInfo,LinkInfo +from common.proto.bgpls_pb2 import NodeDescriptors +from common.proto.context_pb2 import ContextId, ContextList,Topology,TopologyId,Device,DeviceDriverEnum,ContextId,Empty, TopologyList +from common.Constants import DEFAULT_CONTEXT_NAME +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient + +import logging,json +LOGGER = logging.getLogger(__name__) + +def json_to_list(json_str : str) -> List[Union[str, Tuple[str, str]]]: + try: + data = json.loads(json_str) + except: # pylint: disable=bare-except + return [('item', str(json_str))] + + if isinstance(data, dict): + return [('kv', (key, value)) for key, value in data.items()] + elif isinstance(data, list): + return [('item', ', '.join(data))] + else: + return [('item', str(data))] + +class DiscoveredDBManager: + def __init__(self): + self.discoveredDB=[] + # Añadir topoDB + + def AddToDB(self,update_request : UpdateRequest): + """ + Add BGP Update message to discoveredDB. Checks if node exists in discoveredDB. + TODO: check if node exists in context + """ + # TODO: with self.lock + # Check if node info message + if(self.checkIfNodeInUpdate(update_request)): + # Check if node exists + node_count=len(update_request.nodes) + for node in update_request.nodes: + if(self.CheckIfNodeNameInDb(node) or CheckIfNodeInContext(node.node_name)): + # Replace info from node if exists + LOGGER.debug("(AddToDB) Node already in DB!!!") + update_request.nodes.remove(node) + node_count=node_count-1 + else: + LOGGER.debug("(AddToDB) Node NOT in DB!!!") + if(node_count>0): + self.discoveredDB.append(update_request) + else: + # is a link + # Compare and update + self.discoveredDB.append(update_request) + LOGGER.debug("(AddToDB) Actual DB: ") + LOGGER.debug("%s", [up.toString() for up in self.discoveredDB]) + return True + + def GetDiscoveredDB(self): + return self.discoveredDB + + def checkIfNodeInUpdate(self,update_request : UpdateRequest): + """ + Returns true if the update message contains a node info type . + """ + if(update_request.nodes): + return True + return False + + + def CheckIfNodeNameInDb(self,new_node : NodeInfo) -> bool: + """ + Returns true if new node is in the discovered data base already + """ + for update in self.discoveredDB: + for node in update.nodes: + if(node.igp_id==new_node.igp_id): + return True + return False + + def GetNodeNamesFromDiscoveredDB(self): + """ + Return a list of node_names from the current discovered devices + saved in the discoveredDB + """ + node_list =[update_request.nodes for update_request in self.discoveredDB if update_request.nodes] + # LOGGER.info("nodes (GetNodeNamesFromDiscoveredDB) %s",node_list ) + # Inside an update there is a list of nodes , TODO posible FIX: + node_info= [node for nodes in node_list for node in nodes] + return [node.node_name for node in node_info] + + def GetNodesFromDiscoveredDB(self): + """ + Return a list of nodes of class type: tools.NodeInfo from the current discovered devices + saved in the discoveredDB. Skips the ones already addded to context. + """ + + node_list =[update_request.nodes for update_request in self.discoveredDB if update_request.nodes] + return [node for nodes in node_list for node in nodes if (not CheckIfNodeInContext(node.node_name))] + + def GetLinksFromDiscoveredDB(self): + """ + Return a list of links of class type: tools.LinkInfo from the current discovered links + saved in the discoveredDB + """ + link_list= [update_request.links for update_request in self.discoveredDB if update_request.links] + return [link for links in link_list for link in links] + + def UpdateDiscoveredDBWithContext(self): + """ + Check if device discovered by bgpls is already in the topology. + """ + # device_names,device_ips=AddContextDevices(context_client) + return True + + def GetNodeNameFromLinkId(self,link_igpid): + """ + Return the node name given an igp id if exists in the discoveredDB. + """ + for update in self.discoveredDB: + for node in update.nodes: + if(node.igp_id==link_igpid): + return node.node_name + return None + + def GetIgpIdFromNodeName(self,name): + """ + Return the IGP ID given a node name if exists in the discoveredDB. + """ + for update in self.discoveredDB: + LOGGER.debug("(GetIgpIdFromNodeName)checking update: %s",update.toString()) + for node in update.nodes: + LOGGER.debug("(GetIgpIdFromNodeName)checking nodes: %s",node.node_name) + if(node.node_name==name): + return node.igp_id + return None + + def UpdateNodeNameInLink(self): + """ + Check if the igp id has a node name asigned in the discoveredDB and + assign it to the NodeDescriptor name. + """ + for update in self.discoveredDB: + for link in update.links: + if(self.GetNodeNameFromLinkId(link.local_id) is not None): + LOGGER.info("(UpdateNodeNameInLink) local %s: %s",link.local_id, self.GetNodeNameFromLinkId(link.local_id)) + link.local.node_name=self.GetNodeNameFromLinkId(link.local_id) + else: + link.local.node_name=link.local_id + if(self.GetNodeNameFromLinkId(link.remote_id) is not None): + LOGGER.info("(UpdateNodeNameInLink) remote %s: %s",link.remote_id, self.GetNodeNameFromLinkId(link.remote_id)) + link.remote.node_name=self.GetNodeNameFromLinkId(link.remote_id) + else: + link.remote.node_name=link.remote_id + return True + + def RemoveLinkFromDB(self): + """ + Removes a link from the DB if matches the source and the destination. + """ + return True + + def FindConnectedNodes(self,new_node): + """ + Returns a list of nodes connected to the actual node using the discovered + link list and comparing de IGP ID. Returns None in case there are no connections. + """ + # find links where the node appears + links_to_node=[] + nodes_conected=[] + link_local=[] + link_remote=[] + for update in self.discoveredDB: + for link in update.links: + LOGGER.debug("(FindConnectedNodes) link in up:%s %s", + link.local_id, link.remote_id) + LOGGER.debug("(FindConnectedNodes) comparing ...:%s",new_node) + if(link.local_id == new_node): + links_to_node.append(link) + nodes_conected.append(link.remote.node_name) + link_local.append(link) + if(link.remote_id == new_node): + links_to_node.append(link) + nodes_conected.append(link.local.node_name) + link_remote.append(link) + + if(nodes_conected): + LOGGER.debug("(FindConnectedNodes) links to local node:%s",new_node) + LOGGER.debug("(FindConnectedNodes) %s", nodes_conected) + return nodes_conected, link_local, link_remote + LOGGER.debug("(FindConnectedNodes) NO LINKS TO OTHER NODES") + return None + + def DeleteNodeFromDiscoveredDB(self, node_name) -> bool: + """ + Deletes a node from de DiscoveredDB given the node name. TODO: igpid¿ + """ + LOGGER.info("(DeleteNodeFromDiscoveredDB)") + + for i,update in enumerate(self.discoveredDB): + for node in update.nodes: + if(node_name==node.node_name): + del self.discoveredDB[i] + return True + +def AddContextDevicesFull(context_client : ContextClient) -> bool: + """ + debug purposes + """ + LOGGER.info("(AddContextDevices)") + contexts : ContextList = context_client.ListContexts(Empty()) + for context_ in contexts.contexts: + context_uuid : str = context_.context_id.context_uuid.uuid + context_name : str = context_.name + topologies : TopologyList = context_client.ListTopologies(context_.context_id) + # topologies : TopologyList=context_client.ListTopologies(context_client) + for topology_ in topologies.topologies: + #topology_uuid : str = topology_.topology_id.topology_uuid.uuid + topology_name : str = topology_.name + context_topology_name = 'Context({:s}):Topology({:s})'.format(context_name, topology_name) + # Topos=context.GetTopology(list_topo.topology_id) + LOGGER.debug("topo (AddContextDevices) %s",topology_) + # details=context_client.GetTopologyDetails(topology_.topology_id) + # LOGGER.info("details (AddContextDevices) %s",details) + devices=context_client.ListDevices(Empty()) + # LOGGER.info("devices (driverSettings) %s",devices) + device_names=[] + device_ips=[] + for device_ in devices.devices: + LOGGER.info("device_ (AddContextDevices) %s",device_.name) + device_names.append(device_.name) + for config_rule_ in device_.device_config.config_rules: + if config_rule_.custom.resource_key == "_connect/address": + LOGGER.info("device_.resource_value-addr (driverSettings) %s", + config_rule_.custom.resource_value) + device_ips=config_rule_.custom.resource_value + + return device_names,device_ips + +def GetContextDevices(context_client : ContextClient) -> bool: + """ + Returns de device name and its corresponding device_ip existing in context. + """ + LOGGER.info("(AddContextDevices)") + devices=context_client.ListDevices(Empty()) + device_names=[] + device_ips=[] + for device_ in devices.devices: + LOGGER.debug("device_ (AddContextDevices) %s",device_.name) + device_names.append(device_.name) + for config_rule_ in device_.device_config.config_rules: + if config_rule_.custom.resource_key == "_connect/address": + # LOGGER.info("device_.resource_value-addr (driverSettings) %s", + # config_rule_.custom.resource_value) + device_ips=config_rule_.custom.resource_value + + return device_names,device_ips + +def CheckIfNodeInContext(node_name) -> bool: + """ + Returns true if the node exists in the context. + """ + context_client=ContextClient() + context_client.connect() + device_names,device_ips=GetContextDevices(context_client) + LOGGER.info("(CheckIfNodeInContext) device_names: %s nodena %s",device_names,node_name) + for node in device_names: + if(node==node_name): + LOGGER.info("(CheckIfNodeInContext) Node already in context") + return True + LOGGER.info("(CheckIfNodeInContext) Node NOT in context") + return False + +def getEndpointFromIpInterface(device,ipv4): + """ + Get TFS endpoint uuid drom given device having the IPv4 interface. + """ + for config in device.device_config.config_rules: + if config.WhichOneof('config_rule') == 'custom': + # for item_type, item in json_to_list(config.custom.resource_value): + # if item_type == 'kv': + # # LOGGER.debug("(getEndpointFromIpInterface) item: %s",item) + # endpoint_item=item + # LOGGER.debug("(getEndpointFromIpInterface) config: %s",config.custom.resource_key) + if "/interface" in config.custom.resource_key: + iface=config.custom.resource_key.split("/interface")[1].strip("[]") + LOGGER.debug("(getEndpointFromIpInterface) interface: %s",iface) + if ipv4 in config.custom.resource_value: + LOGGER.debug("(getEndpointFromIpInterface) value: %s",config.custom.resource_value) + resource_dict=json.loads(config.custom.resource_value) + interface = resource_dict['name'] + resource_ip=resource_dict['address_ip'] + # Search for endpoint uuid assigned to interface + for config in device.device_config.config_rules: + if config.WhichOneof('config_rule') == 'custom': + if "/endpoints/endpoint" in config.custom.resource_key: + key=config.custom.resource_key.split("/endpoints/endpoint")[1].strip("[]") + LOGGER.debug("(getEndpointFromIpInterface) key: %s",key) + if interface in key: + LOGGER.debug("(getEndpointFromIpInterface) value: %s",config.custom.resource_value) + endpoint=config.custom.resource_key.split("/endpoints/endpoint")[1].strip("[]") + resource_dict_endpoint=json.loads(config.custom.resource_value) + return resource_dict_endpoint['uuid'],resource_ip + + return None,ipv4 \ No newline at end of file diff --git a/src/bgpls_speaker/service/tools/GrpcServer.py b/src/bgpls_speaker/service/tools/GrpcServer.py new file mode 100644 index 0000000000000000000000000000000000000000..998b50f26262ea1b2391d14496f95569a75e923e --- /dev/null +++ b/src/bgpls_speaker/service/tools/GrpcServer.py @@ -0,0 +1,170 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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,threading, queue,time,signal +from datetime import datetime, timedelta +from typing import Any, Iterator, List, Optional, Tuple, Union + +import logging,threading +import grpc + +from bgpls_speaker.service.tools.DiscoveredDBManager import DiscoveredDBManager +from .protos import grpcService_pb2_grpc +from .protos import grpcService_pb2 +from .Tools import UpdateRequest + +from concurrent import futures +import os +import subprocess +from multiprocessing import Pool +import logging + +from .JavaRunner import JavaRunner + +LOGGER = logging.getLogger(__name__) + +_ONE_DAY_IN_SECONDS = 60 * 60 * 24 +SERVER_ADDRESS = 'localhost:2021' + +class GrpcServer(): + + """ + This class gets the current topology from a bgps speaker module in java + and updates the posible new devices to add in the context topology. + Needs the address, port and as_number from the device that will provide the information via bgpls + to the java module. + """ + def __init__(self,DiscoveredDB : DiscoveredDBManager) -> None: # pylint: disable=super-init-not-called + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + self.__out_samples = queue.Queue() + self.__server=grpc.aio.server() + self.__javaLocalPort=0 + self.__mngPort=0 + self.__runnerList=[] + self.__discoveredDB=DiscoveredDB + + def ConnectThread(self) -> bool: + if self.__started.is_set(): return True + self.__started.set() + self.__server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) + grpcService_pb2_grpc.add_updateServiceServicer_to_server(self, self.__server) + self.__server.add_insecure_port(SERVER_ADDRESS) + LOGGER.info("Starting server on %s", SERVER_ADDRESS) + self.__server.start() + try: + while True: + time.sleep(_ONE_DAY_IN_SECONDS) + except KeyboardInterrupt: + LOGGER.info("DISCONNECT") + self.Disconnect() + return True + + def Connect(self): + grpcThread = threading.Thread(target=self.ConnectThread) + grpcThread.start() + return True + + def Disconnect(self) -> bool: + self.__terminate.set() + if not self.__started.is_set(): return True + LOGGER.info("Keyboard interrupt, stop server") + self.__server.stop(0) + return True + + def update(self,request, context) -> bool: + """ + Processes the messages recived by de grpc server + """ + with self.__lock: + LOGGER.info("(server) Update message from bgpls speaker: \n %s" % (request)) + response = grpcService_pb2.updateResponse(ack="OK") + update_request = UpdateRequest.from_proto(request) + self.__discoveredDB.AddToDB(update_request) + return response + + def connectToJavaBgpls(self, address : str = "10.95.86.214", port : str = "179", asNumber : str = "65006"): + self.setLocalPort() + runner = JavaRunner(self.__javaLocalPort,address,self.__mngPort) + runner.setAsNumber(asNumber) + runner.setPort(port) + runner.setPeer() + process=runner.execBGPLSpeaker() + self.__runnerList.append(runner) + + return process.pid + + def terminateRunners(self): + for runner in self.__runnerList: + runner.endBGPSpeaker() + return True + + def terminateGrpcServer(self): + LOGGER.debug("Terminating java programs...") + self.terminateRunners() + LOGGER.debug("Disconnecting grpc server...") + self.Disconnect() + return True + + def terminateRunnerById(self,speaker_id): + """ + Disconnect from BGP-LS speaker given an speaker Id. Its the same + as the java running proccess PID. + """ + for runner in self.__runnerList: + if(runner.getPid()==speaker_id): + runner.endBGPSpeaker() + self.__runnerList.remove(runner) + return True + + def setLocalPort(self,initPort=12179): + """ + If java already running add 1 to current used port, + else initialize port . + initPort --> BGP4Port, usually 179 corresponding to BGP + """ + with self.__lock: + if(self.__runnerList): + LOGGER.debug("Port exists %s",self.__javaLocalPort) + lastRunner=self.__runnerList[-1] + self.__javaLocalPort=lastRunner.getCurrentLocalPort()+1 + self.__mngPort=lastRunner.getCurrentMngPort()+1 + else: + LOGGER.debug("Port DONT exists %s",self.__javaLocalPort) + self.__javaLocalPort=initPort + self.__mngPort=1112 + return self.__javaLocalPort + + def getSpeakerListIds(self): + return [runner.getPid() for runner in self.__runnerList] + + def getSpeakerFromId(self,speaker_id): + """ + Returns address,as_number,peer_port + """ + for runner in self.__runnerList: + if(runner.getPid()==speaker_id): + return runner.getRunnerInfo() + return None + + def getSpeakerIdFromIpAddr(self,addr): + """ + Returns Id from the speaker IP Address + """ + for runner in self.__runnerList: + ip_addr,asN,port=runner.getRunnerInfo() + if(ip_addr==addr): + return runner.getPid() + return diff --git a/src/bgpls_speaker/service/tools/JavaRunner.py b/src/bgpls_speaker/service/tools/JavaRunner.py new file mode 100644 index 0000000000000000000000000000000000000000..10634f52f00a6c40f1853a43207084371642ca6f --- /dev/null +++ b/src/bgpls_speaker/service/tools/JavaRunner.py @@ -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. + +import json, logging,threading, queue,time,signal +from datetime import datetime, timedelta +from typing import Any, Iterator, List, Optional, Tuple, Union +import logging +import grpc + +from concurrent import futures +from lxml import etree +import os +import subprocess +from multiprocessing import Pool + +SERVER_ADDRESS = 'localhost:2021' +SERVER_ID = 1 +_ONE_DAY_IN_SECONDS = 60 * 60 * 24 + +XML_FILE="/var/teraflow/bgpls_speaker/service/java/BGP4Parameters_3.xml" +XML_CONFIG_FILE="BGP4Parameters_3.xml" + +LOGGER = logging.getLogger(__name__) + +class JavaRunner: + + def __init__(self,localPort : int, address : str ="", mngPort : int = 1112): + self.__peerPort=179 + self.__localPort=localPort + self.__managementPort=mngPort + self.__configFile=XML_CONFIG_FILE + self.__process=0 + self.__lock = threading.Lock() + self.__address = address + self.__portConf=5007 + self.__asNumber=65000 + + def getCurrentLocalPort(self): + with self.__lock: + return self.__localPort + + def getCurrentMngPort(self): + with self.__lock: + return self.__managementPort + def getPid(self): + return self.__process.pid + + def execBGPLSpeaker(self) -> bool: + """ + Executes java BGPLS speaker in non-blocking process + """ + LOGGER.debug("Before exec") + os.chdir("/var/teraflow/bgpls_speaker/service/java/") + self.__process=subprocess.Popen(['java' , '-jar' , 'bgp_ls.jar' , XML_CONFIG_FILE], + shell=False,start_new_session=True) + return self.__process + + def setPort(self,port): + self.__peerPort=port + return True + def setAsNumber(self,asNumber): + self.__asNumber=asNumber + return True + + def setPeer(self) -> bool: + """ + Sets XML existing config file with peer address and port. TODO: as_number + """ + + XMLParser = etree.XMLParser(remove_blank_text=False) + tree = etree.parse(XML_FILE, parser=XMLParser) + root = tree.getroot() + peerAddress = root.find(".//peer") + peerAddress.text=self.__address + peerPort = root.find(".//peerPort") + peerPort.text=str(self.__peerPort) + localPort = root.find(".//BGP4Port") + localPort.text=str(self.__localPort) + myAutonomousSystem = root.find(".//myAutonomousSystem") + myAutonomousSystem.text=str(self.__asNumber) + managePort = root.find(".//BGP4ManagementPort") + managePort.text=str(self.__managementPort) + tree.write(XML_FILE) #with ... as .. + return True + + def endBGPSpeaker(self) -> bool: + """ + Kills java program connected to BGPLS Speaker with SIGKILL signal + """ + LOGGER.debug("sending kill signal to process %s",self.__process.pid) + LOGGER.debug("PID: %d",self.__process.pid) + self.__process.kill() + return True + + def getRunnerInfo(self): + return self.__address,self.__asNumber,self.__peerPort diff --git a/src/bgpls_speaker/service/tools/Tools.py b/src/bgpls_speaker/service/tools/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..3d67c4518f62d2ade80f257c12d972179015dde2 --- /dev/null +++ b/src/bgpls_speaker/service/tools/Tools.py @@ -0,0 +1,202 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 .protos import grpcService_pb2_grpc +from .protos import grpcService_pb2 + +import logging +LOGGER = logging.getLogger(__name__) +import os + +# AUTOGENERATED +class UpdateRequest: + def __init__(self, address_family_id, next_hop, as_path_segment, nodes, links): + self.address_family_id = address_family_id + self.next_hop = next_hop + self.as_path_segment = as_path_segment + self.nodes = nodes + self.links = links + + @classmethod + def from_proto(cls, update_request): + nodes = [] + for node in update_request.node: + nodes.append(NodeInfo.from_proto(node)) + + links = [] + for link in update_request.link: + links.append(LinkInfo.from_proto(link)) + + return cls( + address_family_id=update_request.addressFamilyID, + next_hop=update_request.nextHop, + as_path_segment=update_request.asPathSegment, + nodes=nodes, + links=links + ) + def toString(self): + # Debug purposes + out = " " + out+=self.address_family_id + out+=self.next_hop + out+=self.as_path_segment + + for node in self.nodes: + out+="name" + out+=node.node_name + out+=node.igp_id + out+=str(node.bgpls_id) + out+=str(node.as_id) + for link in self.links: + out+=link.remote_id + out+=link.local_id + out+=link.remote_ipv4_id + out+=link.local_ipv4_id + out+=str(link.local.as_number) + out+=link.local.bgpls_id + out+=link.remote.as_number + out+=link.remote.bgpls_id + out+=str(link.available_bw) + out+=str(link.residual_bw) + out+=str(link.utilized) + out+=str(link.max_link_delay) + out+=str(link.min_link_delay) + out+=str(link.delay_variation) + out+=str(link.delay) + out+=str(link.te_default_metric) + out+=str(link.adjacency_sid) + return out + +class NodeInfo: + def __init__(self, node_name, igp_id, bgpls_id, as_id,learnt_from): + self.node_name = node_name.strip("/") + self.igp_id = igp_id.strip("/") + self.bgpls_id = bgpls_id.strip("/") + self.as_id = as_id + self.learnt_from=learnt_from + def toString(self): + # Debug purposes + out = "name" + out+=self.node_name + out+=self.igp_id + out+=str(self.bgpls_id) + out+=str(self.as_id) + out+=self.learnt_from + + @classmethod + def from_proto(cls, proto_node): + return cls( + node_name=proto_node.nodeName, + igp_id=proto_node.igpID, + bgpls_id=proto_node.bgplsID, + as_id=proto_node.asID, + learnt_from=proto_node.learntFrom + ) + +class LinkInfo: + def __init__(self, remote_id, local_id, remote_ipv4_id, local_ipv4_id, local, remote, available_bw, residual_bw, utilized, max_link_delay, min_link_delay, delay_variation, delay, te_default_metric, adjacency_sid,learnt_from): + self.remote_id = remote_id.strip("/") + self.local_id = local_id.strip("/") + self.remote_ipv4_id = remote_ipv4_id.strip("/") + self.local_ipv4_id = local_ipv4_id.strip("/") + self.local = local + self.remote = remote + self.available_bw = available_bw + self.residual_bw = residual_bw + self.utilized = utilized + self.max_link_delay = max_link_delay + self.min_link_delay = min_link_delay + self.delay_variation = delay_variation + self.delay = delay + self.te_default_metric = te_default_metric + self.adjacency_sid = adjacency_sid + self.learnt_from=learnt_from + + @classmethod + def from_proto(cls, proto_link): + return cls( + remote_id=proto_link.remoteID, + local_id=proto_link.localID, + remote_ipv4_id=proto_link.remoteIPv4ID, + local_ipv4_id=proto_link.localIPv4ID, + local=NodeDescriptors.from_proto(proto_link.local), + remote=NodeDescriptors.from_proto(proto_link.remote), + available_bw=proto_link.availableBw, + residual_bw=proto_link.residualBw, + utilized=proto_link.utilized, + max_link_delay=proto_link.maxLinkDelay, + min_link_delay=proto_link.minLinkDelay, + delay_variation=proto_link.delayVariation, + delay=proto_link.delay, + te_default_metric=proto_link.TEDefaultMetric, + adjacency_sid=proto_link.adjacencySid, + learnt_from=proto_link.learntFrom + ) + +class NodeDescriptors: + def __init__(self, as_number, bgpls_id): + self.as_number = as_number + self.bgpls_id = bgpls_id + self.node_name=None + @classmethod + def from_proto(cls, descriptor): + return cls( + as_number=descriptor.asNumber, + bgpls_id=descriptor.bgplsID + ) + + + +""" +message Device { + DeviceId device_id = 1; + string name = 2; + string device_type = 3; + DeviceConfig device_config = 4; + DeviceOperationalStatusEnum device_operational_status = 5; + repeated DeviceDriverEnum device_drivers = 6; + repeated EndPoint device_endpoints = 7; + repeated Component component = 8; // Used for inventory +} +message DeviceId { + Uuid device_uuid = 1; +} +message TopologyId { + ContextId context_id = 1; + Uuid topology_uuid = 2; +} + +message Topology { + TopologyId topology_id = 1; + string name = 2; + repeated DeviceId device_ids = 3; + repeated LinkId link_ids = 4; +} + +message TopologyDetails { + TopologyId topology_id = 1; + string name = 2; + repeated Device devices = 3; + repeated Link links = 4; +} +message LinkId { + Uuid link_uuid = 1; +} + +message Link { + LinkId link_id = 1; + string name = 2; + repeated EndPointId link_endpoint_ids = 3; +} +""" \ No newline at end of file diff --git a/src/bgpls_speaker/service/tools/__init__.py b/src/bgpls_speaker/service/tools/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfc943b68af13a11e562abbc8680ade71db8f02 --- /dev/null +++ b/src/bgpls_speaker/service/tools/__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/bgpls_speaker/service/tools/json_loader.py b/src/bgpls_speaker/service/tools/json_loader.py new file mode 100644 index 0000000000000000000000000000000000000000..9781c8e8dae39763ad7153f78567141f1aaa44f7 --- /dev/null +++ b/src/bgpls_speaker/service/tools/json_loader.py @@ -0,0 +1,42 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json + +def getInterfaceFromJson(): + json_file = open('interfaces.json', 'r',encoding='utf-8') + interface_data = json.load(json_file) + return interface_data + +def getInterfaceFromNodeNames(json_file,node_name_src,node_name_dst): + + interface_src=[] + interface_dst=[] + for device in json_file['devices']: + print("dev: %s",device.keys()) + if device['name'] == node_name_src: + interface_src=list(device['links'].keys())[list(device['links'].values()).index(node_name_dst)] + if device['name'] == node_name_dst: + interface_dst=list(device['links'].keys())[list(device['links'].values()).index(node_name_src)] + + return interface_src,interface_dst + + +if __name__ == "__main__": + data=getInterfaceFromJson() + print("data: %s",data['devices']) + # for device in data['devices']: + # print(device['interfaces'].keys()) + + print(getInterfaceFromNodeNames(data,"HL2-2-1","HL2-2-2")) \ No newline at end of file diff --git a/src/bgpls_speaker/service/tools/protos/grpcService.proto b/src/bgpls_speaker/service/tools/protos/grpcService.proto new file mode 100644 index 0000000000000000000000000000000000000000..fe135de011c675f857508dd1b6ebc8ca11a18f73 --- /dev/null +++ b/src/bgpls_speaker/service/tools/protos/grpcService.proto @@ -0,0 +1,81 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package src.main.proto; + +//el modulo java abre la comunicacion +//cliente(java) manda la info al servidor(python) +//el modulo en python responde con ok + +message updateRequest { + + string addressFamilyID = 1; + string nextHop = 2; + string asPathSegment = 3; + + repeated nodeInfo node = 4; + // repeated : se da la posibilidad de mandar 0 o varios + repeated linkInfo link = 5; + } + +message nodeInfo{ + string nodeName=1; + string igpID=2; + string bgplsID=3; + int32 asID=4; + string learntFrom = 5; +} + +message linkInfo{ + + string remoteID=1; + string localID=2; + + string remoteIPv4ID=3; + string localIPv4ID=4; + + NodeDescriptors local=5; + NodeDescriptors remote=6; + + float availableBw=7; + float residualBw = 8; + float utilized = 9; + + float maxLinkDelay = 10; + float minLinkDelay = 11; + float delayVariation = 12; + float delay = 13; + + int32 TEDefaultMetric = 14; + string adjacencySid = 15; + + string learntFrom = 16; + +} + +message NodeDescriptors{ + string asNumber=1; + string bgplsID=2; +} + +message updateResponse { + string ack = 1; +} + +// Defining a Service, a Service can have multiple RPC operations +service updateService { + // MODIFY HERE: Update the return to streaming return. + rpc update(updateRequest) returns (updateResponse); +} diff --git a/src/bgpls_speaker/service/tools/protos/grpcService_pb2.py b/src/bgpls_speaker/service/tools/protos/grpcService_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..f219859999a97087966886770d4208b8bcb71464 --- /dev/null +++ b/src/bgpls_speaker/service/tools/protos/grpcService_pb2.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: grpcService.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11grpcService.proto\x12\x0esrc.main.proto\"\xa0\x01\n\rupdateRequest\x12\x17\n\x0f\x61\x64\x64ressFamilyID\x18\x01 \x01(\t\x12\x0f\n\x07nextHop\x18\x02 \x01(\t\x12\x15\n\rasPathSegment\x18\x03 \x01(\t\x12&\n\x04node\x18\x04 \x03(\x0b\x32\x18.src.main.proto.nodeInfo\x12&\n\x04link\x18\x05 \x03(\x0b\x32\x18.src.main.proto.linkInfo\"^\n\x08nodeInfo\x12\x10\n\x08nodeName\x18\x01 \x01(\t\x12\r\n\x05igpID\x18\x02 \x01(\t\x12\x0f\n\x07\x62gplsID\x18\x03 \x01(\t\x12\x0c\n\x04\x61sID\x18\x04 \x01(\x05\x12\x12\n\nlearntFrom\x18\x05 \x01(\t\"\x8a\x03\n\x08linkInfo\x12\x10\n\x08remoteID\x18\x01 \x01(\t\x12\x0f\n\x07localID\x18\x02 \x01(\t\x12\x14\n\x0cremoteIPv4ID\x18\x03 \x01(\t\x12\x13\n\x0blocalIPv4ID\x18\x04 \x01(\t\x12.\n\x05local\x18\x05 \x01(\x0b\x32\x1f.src.main.proto.NodeDescriptors\x12/\n\x06remote\x18\x06 \x01(\x0b\x32\x1f.src.main.proto.NodeDescriptors\x12\x13\n\x0b\x61vailableBw\x18\x07 \x01(\x02\x12\x12\n\nresidualBw\x18\x08 \x01(\x02\x12\x10\n\x08utilized\x18\t \x01(\x02\x12\x14\n\x0cmaxLinkDelay\x18\n \x01(\x02\x12\x14\n\x0cminLinkDelay\x18\x0b \x01(\x02\x12\x16\n\x0e\x64\x65layVariation\x18\x0c \x01(\x02\x12\r\n\x05\x64\x65lay\x18\r \x01(\x02\x12\x17\n\x0fTEDefaultMetric\x18\x0e \x01(\x05\x12\x14\n\x0c\x61\x64jacencySid\x18\x0f \x01(\t\x12\x12\n\nlearntFrom\x18\x10 \x01(\t\"4\n\x0fNodeDescriptors\x12\x10\n\x08\x61sNumber\x18\x01 \x01(\t\x12\x0f\n\x07\x62gplsID\x18\x02 \x01(\t\"\x1d\n\x0eupdateResponse\x12\x0b\n\x03\x61\x63k\x18\x01 \x01(\t2X\n\rupdateService\x12G\n\x06update\x12\x1d.src.main.proto.updateRequest\x1a\x1e.src.main.proto.updateResponseb\x06proto3') + + + +_UPDATEREQUEST = DESCRIPTOR.message_types_by_name['updateRequest'] +_NODEINFO = DESCRIPTOR.message_types_by_name['nodeInfo'] +_LINKINFO = DESCRIPTOR.message_types_by_name['linkInfo'] +_NODEDESCRIPTORS = DESCRIPTOR.message_types_by_name['NodeDescriptors'] +_UPDATERESPONSE = DESCRIPTOR.message_types_by_name['updateResponse'] +updateRequest = _reflection.GeneratedProtocolMessageType('updateRequest', (_message.Message,), { + 'DESCRIPTOR' : _UPDATEREQUEST, + '__module__' : 'grpcService_pb2' + # @@protoc_insertion_point(class_scope:src.main.proto.updateRequest) + }) +_sym_db.RegisterMessage(updateRequest) + +nodeInfo = _reflection.GeneratedProtocolMessageType('nodeInfo', (_message.Message,), { + 'DESCRIPTOR' : _NODEINFO, + '__module__' : 'grpcService_pb2' + # @@protoc_insertion_point(class_scope:src.main.proto.nodeInfo) + }) +_sym_db.RegisterMessage(nodeInfo) + +linkInfo = _reflection.GeneratedProtocolMessageType('linkInfo', (_message.Message,), { + 'DESCRIPTOR' : _LINKINFO, + '__module__' : 'grpcService_pb2' + # @@protoc_insertion_point(class_scope:src.main.proto.linkInfo) + }) +_sym_db.RegisterMessage(linkInfo) + +NodeDescriptors = _reflection.GeneratedProtocolMessageType('NodeDescriptors', (_message.Message,), { + 'DESCRIPTOR' : _NODEDESCRIPTORS, + '__module__' : 'grpcService_pb2' + # @@protoc_insertion_point(class_scope:src.main.proto.NodeDescriptors) + }) +_sym_db.RegisterMessage(NodeDescriptors) + +updateResponse = _reflection.GeneratedProtocolMessageType('updateResponse', (_message.Message,), { + 'DESCRIPTOR' : _UPDATERESPONSE, + '__module__' : 'grpcService_pb2' + # @@protoc_insertion_point(class_scope:src.main.proto.updateResponse) + }) +_sym_db.RegisterMessage(updateResponse) + +_UPDATESERVICE = DESCRIPTOR.services_by_name['updateService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _UPDATEREQUEST._serialized_start=38 + _UPDATEREQUEST._serialized_end=198 + _NODEINFO._serialized_start=200 + _NODEINFO._serialized_end=294 + _LINKINFO._serialized_start=297 + _LINKINFO._serialized_end=691 + _NODEDESCRIPTORS._serialized_start=693 + _NODEDESCRIPTORS._serialized_end=745 + _UPDATERESPONSE._serialized_start=747 + _UPDATERESPONSE._serialized_end=776 + _UPDATESERVICE._serialized_start=778 + _UPDATESERVICE._serialized_end=866 +# @@protoc_insertion_point(module_scope) diff --git a/src/bgpls_speaker/service/tools/protos/grpcService_pb2_grpc.py b/src/bgpls_speaker/service/tools/protos/grpcService_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..c8bbda558d60b1108bfcb1ff60fbe755bb2d75c3 --- /dev/null +++ b/src/bgpls_speaker/service/tools/protos/grpcService_pb2_grpc.py @@ -0,0 +1,70 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import grpcService_pb2 as grpcService__pb2 + + +class updateServiceStub(object): + """Defining a Service, a Service can have multiple RPC operations + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.update = channel.unary_unary( + '/src.main.proto.updateService/update', + request_serializer=grpcService__pb2.updateRequest.SerializeToString, + response_deserializer=grpcService__pb2.updateResponse.FromString, + ) + + +class updateServiceServicer(object): + """Defining a Service, a Service can have multiple RPC operations + """ + + def update(self, request, context): + """MODIFY HERE: Update the return to streaming return. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_updateServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'update': grpc.unary_unary_rpc_method_handler( + servicer.update, + request_deserializer=grpcService__pb2.updateRequest.FromString, + response_serializer=grpcService__pb2.updateResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'src.main.proto.updateService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class updateService(object): + """Defining a Service, a Service can have multiple RPC operations + """ + + @staticmethod + def update(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/src.main.proto.updateService/update', + grpcService__pb2.updateRequest.SerializeToString, + grpcService__pb2.updateResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/bgpls_speaker/tests/.gitignore b/src/bgpls_speaker/tests/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..6b97d6fe3ad32f39097745229ab7f547f26ecb12 --- /dev/null +++ b/src/bgpls_speaker/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/bgpls_speaker/tests/__init__.py b/src/bgpls_speaker/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfc943b68af13a11e562abbc8680ade71db8f02 --- /dev/null +++ b/src/bgpls_speaker/tests/__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/bgpls_speaker/tests/test_unitary.py b/src/bgpls_speaker/tests/test_unitary.py new file mode 100644 index 0000000000000000000000000000000000000000..aeb81df67b9689d2fdc70b2bbc991600aeb9b66c --- /dev/null +++ b/src/bgpls_speaker/tests/test_unitary.py @@ -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. + +import logging + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) diff --git a/src/common/Constants.py b/src/common/Constants.py index 04d1dc565f303545ef36d8b34cfb16244ff60390..62711a28c4a94fa10a8051294d5dfd86d03c8d75 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -60,6 +60,9 @@ class ServiceNameEnum(Enum): FORECASTER = 'forecaster' ALTO = 'alto' + E2EORCHESTRATOR = 'e2eorchestrator' + OPTICALCONTROLLER = 'opticalcontroller' + BGPLS = 'bgpls-speaker' # Used for test and debugging only DLT_GATEWAY = 'dltgateway' @@ -87,6 +90,9 @@ DEFAULT_SERVICE_GRPC_PORTS = { ServiceNameEnum.TE .value : 10030, ServiceNameEnum.FORECASTER .value : 10040, ServiceNameEnum.ALTO .value : 10050, + ServiceNameEnum.E2EORCHESTRATOR .value : 10050, + ServiceNameEnum.OPTICALCONTROLLER .value : 10060, + ServiceNameEnum.BGPLS .value : 20030, # Used for test and debugging only ServiceNameEnum.DLT_GATEWAY .value : 50051, diff --git a/src/common/DeviceTypes.py b/src/common/DeviceTypes.py index bb8948585f163aeb84ee758b8581bc6509d29799..9ed321d5328aa17a856a3a6401bc35576eef679f 100644 --- a/src/common/DeviceTypes.py +++ b/src/common/DeviceTypes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,9 @@ class DeviceTypeEnum(Enum): NETWORK = 'network' # Emulated device types + EMULATED_CLIENT = 'emu-client' EMULATED_DATACENTER = 'emu-datacenter' + EMULATED_IP_SDN_CONTROLLER = 'emu-ip-sdn-controller' EMULATED_MICROWAVE_RADIO_SYSTEM = 'emu-microwave-radio-system' EMULATED_OPEN_LINE_SYSTEM = 'emu-open-line-system' EMULATED_OPTICAL_ROADM = 'emu-optical-roadm' @@ -33,7 +35,9 @@ class DeviceTypeEnum(Enum): EMULATED_XR_CONSTELLATION = 'emu-xr-constellation' # Real device types + CLIENT = 'client' DATACENTER = 'datacenter' + IP_SDN_CONTROLLER = 'ip-sdn-controller' MICROWAVE_RADIO_SYSTEM = 'microwave-radio-system' OPEN_LINE_SYSTEM = 'open-line-system' OPTICAL_ROADM = 'optical-roadm' diff --git a/src/common/Settings.py b/src/common/Settings.py index 5d6fba2fdca0530851fabdc06954976b29f2f2b4..edc74c776d7818468c0162d26b03698aa3ef25ef 100644 --- a/src/common/Settings.py +++ b/src/common/Settings.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/__init__.py b/src/common/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/__init__.py +++ b/src/common/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/logger.py b/src/common/logger.py index f5e9d2a7708e0cc1a11de6be82a007a8e911679f..39cf9a1670089be303a4161494958c86f30a5b59 100644 --- a/src/common/logger.py +++ b/src/common/logger.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/Constants.py b/src/common/message_broker/Constants.py index 8011ae41771f07a441da39cbc8e164e538dbaa52..82339df6543368eb1205cd75423af4c859101479 100644 --- a/src/common/message_broker/Constants.py +++ b/src/common/message_broker/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/Factory.py b/src/common/message_broker/Factory.py index 7d5a469a22e6a33947b337a8d39e034e7415d19f..7bb1a717f1c30de24db7a4a6beb886a248e83e34 100644 --- a/src/common/message_broker/Factory.py +++ b/src/common/message_broker/Factory.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/Message.py b/src/common/message_broker/Message.py index 6e43cf80e54acfc2794f2e7507acfb63564ed1c6..0bc8e5d06490fa80f3e41c270819149a5251ec34 100644 --- a/src/common/message_broker/Message.py +++ b/src/common/message_broker/Message.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/MessageBroker.py b/src/common/message_broker/MessageBroker.py index dded94dc1da362ed2f71f2635160f76d06a026b0..83df0e460c9ab17c59d1ef8101e9d3441a544bfc 100644 --- a/src/common/message_broker/MessageBroker.py +++ b/src/common/message_broker/MessageBroker.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/__init__.py b/src/common/message_broker/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/message_broker/__init__.py +++ b/src/common/message_broker/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/backend/BackendEnum.py b/src/common/message_broker/backend/BackendEnum.py index 0a4cf865e69b7bd88954d06f089b4719dd0f20ad..ab6156deba45968c82daaeda7a3a6003d700ae8e 100644 --- a/src/common/message_broker/backend/BackendEnum.py +++ b/src/common/message_broker/backend/BackendEnum.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/backend/_Backend.py b/src/common/message_broker/backend/_Backend.py index dd2337b17f2f1e89652f1cd340bf2ecd9a0c710e..68ee9b9d22518c8fbb919e0c4365157cb2cbfb46 100644 --- a/src/common/message_broker/backend/_Backend.py +++ b/src/common/message_broker/backend/_Backend.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/backend/__init__.py b/src/common/message_broker/backend/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/message_broker/backend/__init__.py +++ b/src/common/message_broker/backend/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/backend/inmemory/InMemoryBackend.py b/src/common/message_broker/backend/inmemory/InMemoryBackend.py index 600581a7feacf8a83d897035be147c32c177fa7d..0d5e18b40a21a0ae7d0b92c55e3bd3284c163121 100644 --- a/src/common/message_broker/backend/inmemory/InMemoryBackend.py +++ b/src/common/message_broker/backend/inmemory/InMemoryBackend.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/backend/inmemory/__init__.py b/src/common/message_broker/backend/inmemory/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/message_broker/backend/inmemory/__init__.py +++ b/src/common/message_broker/backend/inmemory/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/backend/nats/NatsBackend.py b/src/common/message_broker/backend/nats/NatsBackend.py index bcbf2a721e5d41ef122f239ee5a536eb575edcbe..a8f2c7d28bf1956368e4a1af2dab657fbb9fb484 100644 --- a/src/common/message_broker/backend/nats/NatsBackend.py +++ b/src/common/message_broker/backend/nats/NatsBackend.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/backend/nats/NatsBackendThread.py b/src/common/message_broker/backend/nats/NatsBackendThread.py index 3ac32b0cb8f7b4be2d693753e39919b82ab3948f..ced4f383ba72a0f96e636a9d41af8198fa6c1a07 100644 --- a/src/common/message_broker/backend/nats/NatsBackendThread.py +++ b/src/common/message_broker/backend/nats/NatsBackendThread.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/backend/nats/__init__.py b/src/common/message_broker/backend/nats/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/message_broker/backend/nats/__init__.py +++ b/src/common/message_broker/backend/nats/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/backend/redis/RedisBackend.py b/src/common/message_broker/backend/redis/RedisBackend.py index 7038605130c9607dea601344af8fb7520ca42bde..d0e6b7966d666f39f13e7240869b95c48c1928fe 100644 --- a/src/common/message_broker/backend/redis/RedisBackend.py +++ b/src/common/message_broker/backend/redis/RedisBackend.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/backend/redis/__init__.py b/src/common/message_broker/backend/redis/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/message_broker/backend/redis/__init__.py +++ b/src/common/message_broker/backend/redis/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/tests/__init__.py b/src/common/message_broker/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/message_broker/tests/__init__.py +++ b/src/common/message_broker/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/message_broker/tests/test_unitary.py b/src/common/message_broker/tests/test_unitary.py index 9cbb757f1550c7f7a3d66ba1c11ff3cafae4547f..c1f37632cab4ea7c2295e0fcee366353252449b8 100644 --- a/src/common/message_broker/tests/test_unitary.py +++ b/src/common/message_broker/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/method_wrappers/Decorator.py b/src/common/method_wrappers/Decorator.py index b241d3b62821c0bfe319546cbeadce79fce59db9..71b3999bf6e42c3cd9130747af2cdcbe2d9a570e 100644 --- a/src/common/method_wrappers/Decorator.py +++ b/src/common/method_wrappers/Decorator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/method_wrappers/ServiceExceptions.py b/src/common/method_wrappers/ServiceExceptions.py index 8a0862a0e4e8385ff01a3a6335fb8190967e09ec..6f78c28ac8778dc77f010920bba5b8762cbbba99 100644 --- a/src/common/method_wrappers/ServiceExceptions.py +++ b/src/common/method_wrappers/ServiceExceptions.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/method_wrappers/__init__.py b/src/common/method_wrappers/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/method_wrappers/__init__.py +++ b/src/common/method_wrappers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/method_wrappers/tests/DummyDeviceDriver.py b/src/common/method_wrappers/tests/DummyDeviceDriver.py index ace7ce7958ef1c3147e1f9d76a687d2f1edb7a0e..f1c51fcf9192c8328a8ce19edae1d055ab4b24d2 100644 --- a/src/common/method_wrappers/tests/DummyDeviceDriver.py +++ b/src/common/method_wrappers/tests/DummyDeviceDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/method_wrappers/tests/__init__.py b/src/common/method_wrappers/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/method_wrappers/tests/__init__.py +++ b/src/common/method_wrappers/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/method_wrappers/tests/__main__.py b/src/common/method_wrappers/tests/__main__.py index b17d1cc31da5b7df864e11199b8e9fc745ca80f5..9cb2fe2b09e27cd88902fdb6abc291da166dcd08 100644 --- a/src/common/method_wrappers/tests/__main__.py +++ b/src/common/method_wrappers/tests/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/method_wrappers/tests/deploy_specs.sh b/src/common/method_wrappers/tests/deploy_specs.sh index 1f41d2348e5a2d60c816071ef3414df281caeaaa..c185c05f563b6e39237f6982e28df576821af985 100755 --- a/src/common/method_wrappers/tests/deploy_specs.sh +++ b/src/common/method_wrappers/tests/deploy_specs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/method_wrappers/tests/old/docker_grafana.sh b/src/common/method_wrappers/tests/old/docker_grafana.sh index 14a01ed6eafed8d826550b126fd113b5d42a4c4d..43fd40b57c3917be6e2a1c0151e7e36f3dc3ab6a 100755 --- a/src/common/method_wrappers/tests/old/docker_grafana.sh +++ b/src/common/method_wrappers/tests/old/docker_grafana.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/method_wrappers/tests/old/prometheus.yml b/src/common/method_wrappers/tests/old/prometheus.yml index ede59acb55403e99e4165b63d1ef61a5d19f659f..5fbb0ae3135e1a5bcbe6fb77829330a4fc7f2df2 100644 --- a/src/common/method_wrappers/tests/old/prometheus.yml +++ b/src/common/method_wrappers/tests/old/prometheus.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/method_wrappers/tests/test_unitary.py b/src/common/method_wrappers/tests/test_unitary.py index 7e3cb6b038ada388a08200376190f49f6262882b..31d676f02106609ebe575ed9bd6c41b5039f5698 100644 --- a/src/common/method_wrappers/tests/test_unitary.py +++ b/src/common/method_wrappers/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tests/EventTools.py b/src/common/tests/EventTools.py index f90808fc324bfff47455bb12c1afdc4a0aca8d8f..fd1b972f006faa1e8b6cfdffc75e1fdf9fa5b209 100644 --- a/src/common/tests/EventTools.py +++ b/src/common/tests/EventTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tests/InMemoryObjectDatabase.py b/src/common/tests/InMemoryObjectDatabase.py index 21697a4355795775cc25112671c4e436fbbecb8c..ceaeb6fdcc84d52965abe6fc763914b91721d039 100644 --- a/src/common/tests/InMemoryObjectDatabase.py +++ b/src/common/tests/InMemoryObjectDatabase.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -37,7 +37,9 @@ class InMemoryObjectDatabase: LOGGER.debug('[get_entry] BEFORE database={:s}'.format(str(self._database))) container = self._get_container(container_name) if entry_uuid not in container: - context.abort(grpc.StatusCode.NOT_FOUND, str('{:s}({:s}) not found'.format(container_name, entry_uuid))) + MSG = '{:s}({:s}) not found; available({:s})' + msg = str(MSG.format(container_name, entry_uuid, str(container.keys()))) + context.abort(grpc.StatusCode.NOT_FOUND, msg) return container[entry_uuid] def set_entry(self, container_name : str, entry_uuid : str, entry : Any) -> Any: diff --git a/src/common/tests/InMemoryTimeSeriesDatabase.py b/src/common/tests/InMemoryTimeSeriesDatabase.py index 1c4c86da88bfb3ca99ecd92e5baab7244bea414c..0ebbc454743cda1abb2be025da9d04b529a400e4 100644 --- a/src/common/tests/InMemoryTimeSeriesDatabase.py +++ b/src/common/tests/InMemoryTimeSeriesDatabase.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tests/MockMessageBroker.py b/src/common/tests/MockMessageBroker.py index 27613a64d3f63a55276bb1c1f82fdb6c20a8e534..373a299a90d61be17ab43326fa356a5c6178cf9e 100644 --- a/src/common/tests/MockMessageBroker.py +++ b/src/common/tests/MockMessageBroker.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tests/MockServicerImpl_Context.py b/src/common/tests/MockServicerImpl_Context.py index 55f87b7b0c03a7ae563dc10bd5e4964a07317c21..03098dae138793958dc2fa2c4ddaebd7ff03c2e5 100644 --- a/src/common/tests/MockServicerImpl_Context.py +++ b/src/common/tests/MockServicerImpl_Context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,10 +25,13 @@ from common.proto.context_pb2 import ( Slice, SliceEvent, SliceFilter, SliceId, SliceIdList, SliceList, Topology, TopologyDetails, TopologyEvent, TopologyId, TopologyIdList, TopologyList) from common.proto.context_pb2_grpc import ContextServiceServicer +from common.proto.policy_pb2 import PolicyRule, PolicyRuleId, PolicyRuleIdList, PolicyRuleList from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string +from common.tools.object_factory.Device import json_device_id +from common.tools.object_factory.Link import json_link_id from .InMemoryObjectDatabase import InMemoryObjectDatabase from .MockMessageBroker import ( - TOPIC_CONNECTION, TOPIC_CONTEXT, TOPIC_DEVICE, TOPIC_LINK, TOPIC_SERVICE, TOPIC_SLICE, TOPIC_TOPOLOGY, + TOPIC_CONNECTION, TOPIC_CONTEXT, TOPIC_DEVICE, TOPIC_LINK, TOPIC_SERVICE, TOPIC_SLICE, TOPIC_TOPOLOGY, TOPIC_POLICY, MockMessageBroker, notify_event) LOGGER = logging.getLogger(__name__) @@ -60,58 +63,58 @@ class MockServicerImpl_Context(ContextServiceServicer): # ----- Context ---------------------------------------------------------------------------------------------------- - def ListContextIds(self, request: Empty, context : grpc.ServicerContext) -> ContextIdList: + def ListContextIds(self, request : Empty, context : grpc.ServicerContext) -> ContextIdList: LOGGER.debug('[ListContextIds] request={:s}'.format(grpc_message_to_json_string(request))) reply = ContextIdList(context_ids=[context.context_id for context in self.obj_db.get_entries('context')]) LOGGER.debug('[ListContextIds] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def ListContexts(self, request: Empty, context : grpc.ServicerContext) -> ContextList: + def ListContexts(self, request : Empty, context : grpc.ServicerContext) -> ContextList: LOGGER.debug('[ListContexts] request={:s}'.format(grpc_message_to_json_string(request))) reply = ContextList(contexts=self.obj_db.get_entries('context')) LOGGER.debug('[ListContexts] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetContext(self, request: ContextId, context : grpc.ServicerContext) -> Context: + def GetContext(self, request : ContextId, context : grpc.ServicerContext) -> Context: LOGGER.debug('[GetContext] request={:s}'.format(grpc_message_to_json_string(request))) reply = self.obj_db.get_entry('context', request.context_uuid.uuid, context) LOGGER.debug('[GetContext] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def SetContext(self, request: Context, context : grpc.ServicerContext) -> ContextId: + def SetContext(self, request : Context, context : grpc.ServicerContext) -> ContextId: LOGGER.debug('[SetContext] request={:s}'.format(grpc_message_to_json_string(request))) reply,_ = self._set(request, 'context', request.context_id.context_uuid.uuid, 'context_id', TOPIC_CONTEXT) LOGGER.debug('[SetContext] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def RemoveContext(self, request: ContextId, context : grpc.ServicerContext) -> Empty: + def RemoveContext(self, request : ContextId, context : grpc.ServicerContext) -> Empty: LOGGER.debug('[RemoveContext] request={:s}'.format(grpc_message_to_json_string(request))) reply = self._del(request, 'context', request.context_uuid.uuid, 'context_id', TOPIC_CONTEXT, context) LOGGER.debug('[RemoveContext] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetContextEvents(self, request: Empty, context : grpc.ServicerContext) -> Iterator[ContextEvent]: + def GetContextEvents(self, request : Empty, context : grpc.ServicerContext) -> Iterator[ContextEvent]: LOGGER.debug('[GetContextEvents] request={:s}'.format(grpc_message_to_json_string(request))) for message in self.msg_broker.consume({TOPIC_CONTEXT}): yield ContextEvent(**json.loads(message.content)) # ----- Topology --------------------------------------------------------------------------------------------------- - def ListTopologyIds(self, request: ContextId, context : grpc.ServicerContext) -> TopologyIdList: + def ListTopologyIds(self, request : ContextId, context : grpc.ServicerContext) -> TopologyIdList: LOGGER.debug('[ListTopologyIds] request={:s}'.format(grpc_message_to_json_string(request))) topologies = self.obj_db.get_entries('topology[{:s}]'.format(str(request.context_uuid.uuid))) reply = TopologyIdList(topology_ids=[topology.topology_id for topology in topologies]) LOGGER.debug('[ListTopologyIds] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def ListTopologies(self, request: ContextId, context : grpc.ServicerContext) -> TopologyList: + def ListTopologies(self, request : ContextId, context : grpc.ServicerContext) -> TopologyList: LOGGER.debug('[ListTopologies] request={:s}'.format(grpc_message_to_json_string(request))) topologies = self.obj_db.get_entries('topology[{:s}]'.format(str(request.context_uuid.uuid))) reply = TopologyList(topologies=[topology for topology in topologies]) LOGGER.debug('[ListTopologies] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetTopology(self, request: TopologyId, context : grpc.ServicerContext) -> Topology: + def GetTopology(self, request : TopologyId, context : grpc.ServicerContext) -> Topology: LOGGER.debug('[GetTopology] request={:s}'.format(grpc_message_to_json_string(request))) container_name = 'topology[{:s}]'.format(str(request.context_id.context_uuid.uuid)) reply = self.obj_db.get_entry(container_name, request.topology_uuid.uuid, context) @@ -141,48 +144,96 @@ class MockServicerImpl_Context(ContextServiceServicer): LOGGER.debug('[GetTopologyDetails] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def SetTopology(self, request: Topology, context : grpc.ServicerContext) -> TopologyId: + def SetTopology(self, request : Topology, context : grpc.ServicerContext) -> TopologyId: LOGGER.debug('[SetTopology] request={:s}'.format(grpc_message_to_json_string(request))) - container_name = 'topology[{:s}]'.format(str(request.topology_id.context_id.context_uuid.uuid)) + context_uuid = str(request.topology_id.context_id.context_uuid.uuid) + container_name = 'topology[{:s}]'.format(context_uuid) topology_uuid = request.topology_id.topology_uuid.uuid + + if self.obj_db.has_entry(container_name, topology_uuid): + # merge device_ids and link_ids from database and request, and update request + db_topology = self.obj_db.get_entry(container_name, topology_uuid, context) + + device_uuids = set() + for device_id in request.device_ids: device_uuids.add(device_id.device_uuid.uuid) + for device_id in db_topology.device_ids: device_uuids.add(device_id.device_uuid.uuid) + + link_uuids = set() + for link_id in request.link_ids: link_uuids.add(link_id.link_uuid.uuid) + for link_id in db_topology.link_ids: link_uuids.add(link_id.link_uuid.uuid) + + rw_request = Topology() + rw_request.CopyFrom(request) + + # pylint: disable=no-member + del rw_request.device_ids[:] + for device_uuid in sorted(device_uuids): + rw_request.device_ids.append(DeviceId(**json_device_id(device_uuid))) + + # pylint: disable=no-member + del rw_request.link_ids[:] + for link_uuid in sorted(link_uuids): + rw_request.link_ids.append(LinkId(**json_link_id(link_uuid))) + + request = rw_request + reply,_ = self._set(request, container_name, topology_uuid, 'topology_id', TOPIC_TOPOLOGY) + + context_ = self.obj_db.get_entry('context', context_uuid, context) + for _topology_id in context_.topology_ids: + if _topology_id.topology_uuid.uuid == topology_uuid: break + else: + # topology not found, add it + topology_id = context_.topology_ids.add() + topology_id.context_id.context_uuid.uuid = context_uuid + topology_id.topology_uuid.uuid = topology_uuid + LOGGER.debug('[SetTopology] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def RemoveTopology(self, request: TopologyId, context : grpc.ServicerContext) -> Empty: + def RemoveTopology(self, request : TopologyId, context : grpc.ServicerContext) -> Empty: LOGGER.debug('[RemoveTopology] request={:s}'.format(grpc_message_to_json_string(request))) - container_name = 'topology[{:s}]'.format(str(request.context_id.context_uuid.uuid)) + context_uuid = str(request.context_id.context_uuid.uuid) + container_name = 'topology[{:s}]'.format(context_uuid) topology_uuid = request.topology_uuid.uuid reply = self._del(request, container_name, topology_uuid, 'topology_id', TOPIC_TOPOLOGY, context) + + context_ = self.obj_db.get_entry('context', context_uuid, context) + for _topology_id in context_.topology_ids: + if _topology_id.context_id.context_uuid.uuid != context_uuid: continue + if _topology_id.topology_uuid.uuid != topology_uuid: continue + context_.topology_ids.remove(_topology_id) + break + LOGGER.debug('[RemoveTopology] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetTopologyEvents(self, request: Empty, context : grpc.ServicerContext) -> Iterator[TopologyEvent]: + def GetTopologyEvents(self, request : Empty, context : grpc.ServicerContext) -> Iterator[TopologyEvent]: LOGGER.debug('[GetTopologyEvents] request={:s}'.format(grpc_message_to_json_string(request))) for message in self.msg_broker.consume({TOPIC_TOPOLOGY}): yield TopologyEvent(**json.loads(message.content)) # ----- Device ----------------------------------------------------------------------------------------------------- - def ListDeviceIds(self, request: Empty, context : grpc.ServicerContext) -> DeviceIdList: + def ListDeviceIds(self, request : Empty, context : grpc.ServicerContext) -> DeviceIdList: LOGGER.debug('[ListDeviceIds] request={:s}'.format(grpc_message_to_json_string(request))) reply = DeviceIdList(device_ids=[device.device_id for device in self.obj_db.get_entries('device')]) LOGGER.debug('[ListDeviceIds] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def ListDevices(self, request: Empty, context : grpc.ServicerContext) -> DeviceList: + def ListDevices(self, request : Empty, context : grpc.ServicerContext) -> DeviceList: LOGGER.debug('[ListDevices] request={:s}'.format(grpc_message_to_json_string(request))) reply = DeviceList(devices=self.obj_db.get_entries('device')) LOGGER.debug('[ListDevices] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetDevice(self, request: DeviceId, context : grpc.ServicerContext) -> Device: + def GetDevice(self, request : DeviceId, context : grpc.ServicerContext) -> Device: LOGGER.debug('[GetDevice] request={:s}'.format(grpc_message_to_json_string(request))) reply = self.obj_db.get_entry('device', request.device_uuid.uuid, context) LOGGER.debug('[GetDevice] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def SetDevice(self, request: Context, context : grpc.ServicerContext) -> DeviceId: + def SetDevice(self, request : Context, context : grpc.ServicerContext) -> DeviceId: LOGGER.debug('[SetDevice] request={:s}'.format(grpc_message_to_json_string(request))) device_uuid = request.device_id.device_uuid.uuid reply, device = self._set(request, 'device', device_uuid, 'device_id', TOPIC_DEVICE) @@ -208,7 +259,7 @@ class MockServicerImpl_Context(ContextServiceServicer): LOGGER.debug('[SetDevice] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def RemoveDevice(self, request: DeviceId, context : grpc.ServicerContext) -> Empty: + def RemoveDevice(self, request : DeviceId, context : grpc.ServicerContext) -> Empty: LOGGER.debug('[RemoveDevice] request={:s}'.format(grpc_message_to_json_string(request))) device_uuid = request.device_uuid.uuid device = self.obj_db.get_entry('device', device_uuid, context) @@ -234,7 +285,7 @@ class MockServicerImpl_Context(ContextServiceServicer): LOGGER.debug('[RemoveDevice] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetDeviceEvents(self, request: Empty, context : grpc.ServicerContext) -> Iterator[DeviceEvent]: + def GetDeviceEvents(self, request : Empty, context : grpc.ServicerContext) -> Iterator[DeviceEvent]: LOGGER.debug('[GetDeviceEvents] request={:s}'.format(grpc_message_to_json_string(request))) for message in self.msg_broker.consume({TOPIC_DEVICE}): yield DeviceEvent(**json.loads(message.content)) @@ -268,25 +319,25 @@ class MockServicerImpl_Context(ContextServiceServicer): # ----- Link ------------------------------------------------------------------------------------------------------- - def ListLinkIds(self, request: Empty, context : grpc.ServicerContext) -> LinkIdList: + def ListLinkIds(self, request : Empty, context : grpc.ServicerContext) -> LinkIdList: LOGGER.debug('[ListLinkIds] request={:s}'.format(grpc_message_to_json_string(request))) reply = LinkIdList(link_ids=[link.link_id for link in self.obj_db.get_entries('link')]) LOGGER.debug('[ListLinkIds] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def ListLinks(self, request: Empty, context : grpc.ServicerContext) -> LinkList: + def ListLinks(self, request : Empty, context : grpc.ServicerContext) -> LinkList: LOGGER.debug('[ListLinks] request={:s}'.format(grpc_message_to_json_string(request))) reply = LinkList(links=self.obj_db.get_entries('link')) LOGGER.debug('[ListLinks] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetLink(self, request: LinkId, context : grpc.ServicerContext) -> Link: + def GetLink(self, request : LinkId, context : grpc.ServicerContext) -> Link: LOGGER.debug('[GetLink] request={:s}'.format(grpc_message_to_json_string(request))) reply = self.obj_db.get_entry('link', request.link_uuid.uuid, context) LOGGER.debug('[GetLink] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def SetLink(self, request: Context, context : grpc.ServicerContext) -> LinkId: + def SetLink(self, request : Context, context : grpc.ServicerContext) -> LinkId: LOGGER.debug('[SetLink] request={:s}'.format(grpc_message_to_json_string(request))) link_uuid = request.link_id.link_uuid.uuid reply, link = self._set(request, 'link', link_uuid, 'link_id', TOPIC_LINK) @@ -312,7 +363,7 @@ class MockServicerImpl_Context(ContextServiceServicer): LOGGER.debug('[SetLink] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def RemoveLink(self, request: LinkId, context : grpc.ServicerContext) -> Empty: + def RemoveLink(self, request : LinkId, context : grpc.ServicerContext) -> Empty: LOGGER.debug('[RemoveLink] request={:s}'.format(grpc_message_to_json_string(request))) link_uuid = request.link_uuid.uuid link = self.obj_db.get_entry('link', link_uuid, context) @@ -338,51 +389,71 @@ class MockServicerImpl_Context(ContextServiceServicer): LOGGER.debug('[RemoveLink] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetLinkEvents(self, request: Empty, context : grpc.ServicerContext) -> Iterator[LinkEvent]: + def GetLinkEvents(self, request : Empty, context : grpc.ServicerContext) -> Iterator[LinkEvent]: LOGGER.debug('[GetLinkEvents] request={:s}'.format(grpc_message_to_json_string(request))) for message in self.msg_broker.consume({TOPIC_LINK}): yield LinkEvent(**json.loads(message.content)) # ----- Slice ------------------------------------------------------------------------------------------------------ - def ListSliceIds(self, request: ContextId, context : grpc.ServicerContext) -> SliceIdList: + def ListSliceIds(self, request : ContextId, context : grpc.ServicerContext) -> SliceIdList: LOGGER.debug('[ListSliceIds] request={:s}'.format(grpc_message_to_json_string(request))) slices = self.obj_db.get_entries('slice[{:s}]'.format(str(request.context_uuid.uuid))) reply = SliceIdList(slice_ids=[slice.slice_id for slice in slices]) LOGGER.debug('[ListSliceIds] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def ListSlices(self, request: ContextId, context : grpc.ServicerContext) -> SliceList: + def ListSlices(self, request : ContextId, context : grpc.ServicerContext) -> SliceList: LOGGER.debug('[ListSlices] request={:s}'.format(grpc_message_to_json_string(request))) slices = self.obj_db.get_entries('slice[{:s}]'.format(str(request.context_uuid.uuid))) reply = SliceList(slices=[slice for slice in slices]) LOGGER.debug('[ListSlices] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetSlice(self, request: SliceId, context : grpc.ServicerContext) -> Slice: + def GetSlice(self, request : SliceId, context : grpc.ServicerContext) -> Slice: LOGGER.debug('[GetSlice] request={:s}'.format(grpc_message_to_json_string(request))) container_name = 'slice[{:s}]'.format(str(request.context_id.context_uuid.uuid)) reply = self.obj_db.get_entry(container_name, request.slice_uuid.uuid, context) LOGGER.debug('[GetSlice] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def SetSlice(self, request: Slice, context : grpc.ServicerContext) -> SliceId: + def SetSlice(self, request : Slice, context : grpc.ServicerContext) -> SliceId: LOGGER.debug('[SetSlice] request={:s}'.format(grpc_message_to_json_string(request))) - container_name = 'slice[{:s}]'.format(str(request.slice_id.context_id.context_uuid.uuid)) + context_uuid = str(request.slice_id.context_id.context_uuid.uuid) + container_name = 'slice[{:s}]'.format(context_uuid) slice_uuid = request.slice_id.slice_uuid.uuid reply,_ = self._set(request, container_name, slice_uuid, 'slice_id', TOPIC_SLICE) + + context_ = self.obj_db.get_entry('context', context_uuid, context) + for _slice_id in context_.slice_ids: + if _slice_id.slice_uuid.uuid == slice_uuid: break + else: + # slice not found, add it + slice_id = context_.slice_ids.add() + slice_id.context_id.context_uuid.uuid = context_uuid + slice_id.slice_uuid.uuid = slice_uuid + LOGGER.debug('[SetSlice] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def RemoveSlice(self, request: SliceId, context : grpc.ServicerContext) -> Empty: + def RemoveSlice(self, request : SliceId, context : grpc.ServicerContext) -> Empty: LOGGER.debug('[RemoveSlice] request={:s}'.format(grpc_message_to_json_string(request))) - container_name = 'slice[{:s}]'.format(str(request.context_id.context_uuid.uuid)) + context_uuid = str(request.context_id.context_uuid.uuid) + container_name = 'slice[{:s}]'.format(context_uuid) slice_uuid = request.slice_uuid.uuid reply = self._del(request, container_name, slice_uuid, 'slice_id', TOPIC_SLICE, context) + + context_ = self.obj_db.get_entry('context', context_uuid, context) + for _slice_id in context_.slice_ids: + if _slice_id.context_id.context_uuid.uuid != context_uuid: continue + if _slice_id.slice_uuid.uuid != slice_uuid: continue + context_.slice_ids.remove(_slice_id) + break + LOGGER.debug('[RemoveSlice] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetSliceEvents(self, request: Empty, context : grpc.ServicerContext) -> Iterator[SliceEvent]: + def GetSliceEvents(self, request : Empty, context : grpc.ServicerContext) -> Iterator[SliceEvent]: LOGGER.debug('[GetSliceEvents] request={:s}'.format(grpc_message_to_json_string(request))) for message in self.msg_broker.consume({TOPIC_SLICE}): yield SliceEvent(**json.loads(message.content)) @@ -420,44 +491,64 @@ class MockServicerImpl_Context(ContextServiceServicer): # ----- Service ---------------------------------------------------------------------------------------------------- - def ListServiceIds(self, request: ContextId, context : grpc.ServicerContext) -> ServiceIdList: + def ListServiceIds(self, request : ContextId, context : grpc.ServicerContext) -> ServiceIdList: LOGGER.debug('[ListServiceIds] request={:s}'.format(grpc_message_to_json_string(request))) services = self.obj_db.get_entries('service[{:s}]'.format(str(request.context_uuid.uuid))) reply = ServiceIdList(service_ids=[service.service_id for service in services]) LOGGER.debug('[ListServiceIds] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def ListServices(self, request: ContextId, context : grpc.ServicerContext) -> ServiceList: + def ListServices(self, request : ContextId, context : grpc.ServicerContext) -> ServiceList: LOGGER.debug('[ListServices] request={:s}'.format(grpc_message_to_json_string(request))) services = self.obj_db.get_entries('service[{:s}]'.format(str(request.context_uuid.uuid))) reply = ServiceList(services=[service for service in services]) LOGGER.debug('[ListServices] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetService(self, request: ServiceId, context : grpc.ServicerContext) -> Service: + def GetService(self, request : ServiceId, context : grpc.ServicerContext) -> Service: LOGGER.debug('[GetService] request={:s}'.format(grpc_message_to_json_string(request))) container_name = 'service[{:s}]'.format(str(request.context_id.context_uuid.uuid)) reply = self.obj_db.get_entry(container_name, request.service_uuid.uuid, context) LOGGER.debug('[GetService] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def SetService(self, request: Service, context : grpc.ServicerContext) -> ServiceId: + def SetService(self, request : Service, context : grpc.ServicerContext) -> ServiceId: LOGGER.debug('[SetService] request={:s}'.format(grpc_message_to_json_string(request))) - container_name = 'service[{:s}]'.format(str(request.service_id.context_id.context_uuid.uuid)) + context_uuid = str(request.service_id.context_id.context_uuid.uuid) + container_name = 'service[{:s}]'.format(context_uuid) service_uuid = request.service_id.service_uuid.uuid reply,_ = self._set(request, container_name, service_uuid, 'service_id', TOPIC_SERVICE) + + context_ = self.obj_db.get_entry('context', context_uuid, context) + for _service_id in context_.service_ids: + if _service_id.service_uuid.uuid == service_uuid: break + else: + # service not found, add it + service_id = context_.service_ids.add() + service_id.context_id.context_uuid.uuid = context_uuid + service_id.service_uuid.uuid = service_uuid + LOGGER.debug('[SetService] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def RemoveService(self, request: ServiceId, context : grpc.ServicerContext) -> Empty: + def RemoveService(self, request : ServiceId, context : grpc.ServicerContext) -> Empty: LOGGER.debug('[RemoveService] request={:s}'.format(grpc_message_to_json_string(request))) - container_name = 'service[{:s}]'.format(str(request.context_id.context_uuid.uuid)) + context_uuid = str(request.context_id.context_uuid.uuid) + container_name = 'service[{:s}]'.format(context_uuid) service_uuid = request.service_uuid.uuid reply = self._del(request, container_name, service_uuid, 'service_id', TOPIC_SERVICE, context) + + context_ = self.obj_db.get_entry('context', context_uuid, context) + for _service_id in context_.service_ids: + if _service_id.context_id.context_uuid.uuid != context_uuid: continue + if _service_id.service_uuid.uuid != service_uuid: continue + context_.service_ids.remove(_service_id) + break + LOGGER.debug('[RemoveService] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetServiceEvents(self, request: Empty, context : grpc.ServicerContext) -> Iterator[ServiceEvent]: + def GetServiceEvents(self, request : Empty, context : grpc.ServicerContext) -> Iterator[ServiceEvent]: LOGGER.debug('[GetServiceEvents] request={:s}'.format(grpc_message_to_json_string(request))) for message in self.msg_broker.consume({TOPIC_SERVICE}): yield ServiceEvent(**json.loads(message.content)) @@ -490,7 +581,7 @@ class MockServicerImpl_Context(ContextServiceServicer): # ----- Connection ------------------------------------------------------------------------------------------------- - def ListConnectionIds(self, request: ServiceId, context : grpc.ServicerContext) -> ConnectionIdList: + def ListConnectionIds(self, request : ServiceId, context : grpc.ServicerContext) -> ConnectionIdList: LOGGER.debug('[ListConnectionIds] request={:s}'.format(grpc_message_to_json_string(request))) container_name = 'service_connections[{:s}/{:s}]'.format( str(request.context_id.context_uuid.uuid), str(request.service_uuid.uuid)) @@ -498,7 +589,7 @@ class MockServicerImpl_Context(ContextServiceServicer): LOGGER.debug('[ListConnectionIds] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def ListConnections(self, request: ServiceId, context : grpc.ServicerContext) -> ConnectionList: + def ListConnections(self, request : ServiceId, context : grpc.ServicerContext) -> ConnectionList: LOGGER.debug('[ListConnections] request={:s}'.format(grpc_message_to_json_string(request))) container_name = 'service_connections[{:s}/{:s}]'.format( str(request.context_id.context_uuid.uuid), str(request.service_uuid.uuid)) @@ -506,13 +597,13 @@ class MockServicerImpl_Context(ContextServiceServicer): LOGGER.debug('[ListConnections] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetConnection(self, request: ConnectionId, context : grpc.ServicerContext) -> Connection: + def GetConnection(self, request : ConnectionId, context : grpc.ServicerContext) -> Connection: LOGGER.debug('[GetConnection] request={:s}'.format(grpc_message_to_json_string(request))) reply = self.obj_db.get_entry('connection', request.connection_uuid.uuid, context) LOGGER.debug('[GetConnection] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def SetConnection(self, request: Connection, context : grpc.ServicerContext) -> ConnectionId: + def SetConnection(self, request : Connection, context : grpc.ServicerContext) -> ConnectionId: LOGGER.debug('[SetConnection] request={:s}'.format(grpc_message_to_json_string(request))) container_name = 'service_connection[{:s}/{:s}]'.format( str(request.service_id.context_id.context_uuid.uuid), str(request.service_id.service_uuid.uuid)) @@ -522,7 +613,7 @@ class MockServicerImpl_Context(ContextServiceServicer): LOGGER.debug('[SetConnection] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def RemoveConnection(self, request: ConnectionId, context : grpc.ServicerContext) -> Empty: + def RemoveConnection(self, request : ConnectionId, context : grpc.ServicerContext) -> Empty: LOGGER.debug('[RemoveConnection] request={:s}'.format(grpc_message_to_json_string(request))) connection = self.obj_db.get_entry('connection', request.connection_uuid.uuid, context) container_name = 'service_connection[{:s}/{:s}]'.format( @@ -533,6 +624,45 @@ class MockServicerImpl_Context(ContextServiceServicer): LOGGER.debug('[RemoveConnection] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply - def GetConnectionEvents(self, request: Empty, context : grpc.ServicerContext) -> Iterator[ConnectionEvent]: + def GetConnectionEvents(self, request : Empty, context : grpc.ServicerContext) -> Iterator[ConnectionEvent]: LOGGER.debug('[GetConnectionEvents] request={:s}'.format(grpc_message_to_json_string(request))) for message in self.msg_broker.consume({TOPIC_CONNECTION}): yield ConnectionEvent(**json.loads(message.content)) + + def ListPolicyRuleIds(self, request : Empty, context : grpc.ServicerContext): # pylint: disable=unused-argument + LOGGER.debug('[ListPolicyRuleIds] request={:s}'.format(grpc_message_to_json_string(request))) + reply = PolicyRuleIdList(policyRuleIdList=[ + getattr(policy_rule, policy_rule.WhichOneof('policy_rule')).policyRuleBasic.policyRuleId + for policy_rule in self.obj_db.get_entries('policy') + ]) + LOGGER.debug('[ListPolicyRuleIds] reply={:s}'.format(grpc_message_to_json_string(reply))) + return reply + + def ListPolicyRules(self, request : Empty, context : grpc.ServicerContext): # pylint: disable=unused-argument + LOGGER.debug('[ListPolicyRules] request={:s}'.format(grpc_message_to_json_string(request))) + reply = PolicyRuleList(policyRules=self.obj_db.get_entries('policy')) + LOGGER.debug('[ListPolicyRules] reply={:s}'.format(grpc_message_to_json_string(reply))) + return reply + + def GetPolicyRule(self, request : PolicyRuleId, context : grpc.ServicerContext): + LOGGER.debug('[GetPolicyRule] request={:s}'.format(grpc_message_to_json_string(request))) + reply = self.obj_db.get_entry('policy_rule', request.uuid.uuid, context) + LOGGER.debug('[GetPolicyRule] reply={:s}'.format(grpc_message_to_json_string(reply))) + return reply + + def SetPolicyRule(self, request : PolicyRule, context : grpc.ServicerContext): # pylint: disable=unused-argument + LOGGER.debug('[SetPolicyRule] request={:s}'.format(grpc_message_to_json_string(request))) + policy_type = request.WhichOneof('policy_rule') + policy_uuid = getattr(request, policy_type).policyRuleBasic.policyRuleId.uuid.uuid + rule_id_field = '{:s}.policyRuleBasic.policyRuleId'.format(policy_type) + reply, _ = self._set(request, 'policy', policy_uuid, rule_id_field, TOPIC_POLICY) + LOGGER.debug('[SetPolicyRule] reply={:s}'.format(grpc_message_to_json_string(reply))) + return reply + + def RemovePolicyRule(self, request : PolicyRuleId, context : grpc.ServicerContext): + LOGGER.debug('[RemovePolicyRule] request={:s}'.format(grpc_message_to_json_string(request))) + policy_type = request.WhichOneof('policy_rule') + policy_uuid = getattr(request, policy_type).policyRuleBasic.policyRuleId.uuid.uuid + rule_id_field = '{:s}.policyRuleBasic.policyRuleId'.format(policy_type) + reply = self._del(request, 'policy', policy_uuid, rule_id_field, TOPIC_CONTEXT, context) + LOGGER.debug('[RemovePolicyRule] reply={:s}'.format(grpc_message_to_json_string(reply))) + return reply diff --git a/src/common/tests/MockServicerImpl_Device.py b/src/common/tests/MockServicerImpl_Device.py index ca1c8893d4e502a783a8c00923daf30f260a23e2..04d1da457551984453b87bf2f248f7d74dbdf2aa 100644 --- a/src/common/tests/MockServicerImpl_Device.py +++ b/src/common/tests/MockServicerImpl_Device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tests/MockServicerImpl_DltGateway.py b/src/common/tests/MockServicerImpl_DltGateway.py index 3dfeb02cf3f54117e0d3b664cd7073fffc476f16..f505420f9069830ce249f86718a0883745d06ea7 100644 --- a/src/common/tests/MockServicerImpl_DltGateway.py +++ b/src/common/tests/MockServicerImpl_DltGateway.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tests/MockServicerImpl_Monitoring.py b/src/common/tests/MockServicerImpl_Monitoring.py index 4aadb8e5e20575321df2003c69a5ab9fe2390af8..b7fd422da623963c8af71e0ac0d477926c12a6c1 100644 --- a/src/common/tests/MockServicerImpl_Monitoring.py +++ b/src/common/tests/MockServicerImpl_Monitoring.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tests/MockServicerImpl_Service.py b/src/common/tests/MockServicerImpl_Service.py index 454a0c5f0661a8dd8b32db23d9a9a39426800624..a3d70d2280bf6641881516743f56c0284cb4a94d 100644 --- a/src/common/tests/MockServicerImpl_Service.py +++ b/src/common/tests/MockServicerImpl_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tests/MockServicerImpl_Slice.py b/src/common/tests/MockServicerImpl_Slice.py index d2278c73e4bdf60f988248d3a874727f3af18ac4..72bd47b82b884d65b2b9722bcc3128768f45c7d8 100644 --- a/src/common/tests/MockServicerImpl_Slice.py +++ b/src/common/tests/MockServicerImpl_Slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tests/PytestGenerateTests.py b/src/common/tests/PytestGenerateTests.py index 43b3fa28468394764931eac7cc7264020506b97e..aff535028e7037b837f542cb6d3213fbba21a155 100644 --- a/src/common/tests/PytestGenerateTests.py +++ b/src/common/tests/PytestGenerateTests.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tests/__init__.py b/src/common/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/tests/__init__.py +++ b/src/common/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/__init__.py b/src/common/tools/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/tools/__init__.py +++ b/src/common/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/client/RetryDecorator.py b/src/common/tools/client/RetryDecorator.py index 554b6d17ece34e2588af3516da9b1fa0346270c7..cddb4ec7237f2e45e459fb85e562a414dea3bd77 100644 --- a/src/common/tools/client/RetryDecorator.py +++ b/src/common/tools/client/RetryDecorator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/client/__init__.py b/src/common/tools/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/tools/client/__init__.py +++ b/src/common/tools/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/context_queries/CheckType.py b/src/common/tools/context_queries/CheckType.py index 7121d2583e5b62ea7688a878c6426dd021f2e263..87d6142f4ef07b03a4d30fbc44d3f493807aa2ea 100644 --- a/src/common/tools/context_queries/CheckType.py +++ b/src/common/tools/context_queries/CheckType.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/context_queries/Connection.py b/src/common/tools/context_queries/Connection.py index 3021335131332dab73d6d645f4c7937f499732ef..8edf15563b752313bb40ca480a1048d2449af693 100644 --- a/src/common/tools/context_queries/Connection.py +++ b/src/common/tools/context_queries/Connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/context_queries/Context.py b/src/common/tools/context_queries/Context.py index 5e1facf2e077cd043c4ac9193941ac0a47372613..ef8e17376e45c890aa34a39dab944beb9101d11f 100644 --- a/src/common/tools/context_queries/Context.py +++ b/src/common/tools/context_queries/Context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/context_queries/Device.py b/src/common/tools/context_queries/Device.py index 95f0e90b740d3b167f09db394e259599db20a59b..b5581a4e9eae2baf8e8533fbadd97f04fc421719 100644 --- a/src/common/tools/context_queries/Device.py +++ b/src/common/tools/context_queries/Device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/context_queries/EndPoint.py b/src/common/tools/context_queries/EndPoint.py index b54ef8f2d65c5b1887cf08dd8618948b4419d28c..7a0ffe8ede8d9d29e5a1e27d08bd5f6cfdb8e818 100644 --- a/src/common/tools/context_queries/EndPoint.py +++ b/src/common/tools/context_queries/EndPoint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/context_queries/InterDomain.py b/src/common/tools/context_queries/InterDomain.py index aee7cbf7ff496aa8cb90bca62a0af402b6f7be3f..4e9f2caff20030ab32472697eedad4a99990fe31 100644 --- a/src/common/tools/context_queries/InterDomain.py +++ b/src/common/tools/context_queries/InterDomain.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/context_queries/InterDomain_old.py b/src/common/tools/context_queries/InterDomain_old.py index ef4f6aa808696d7290a2c80220c3212d3e586307..e541328143486598a1f5fb9da5772c1e0c14e7da 100644 --- a/src/common/tools/context_queries/InterDomain_old.py +++ b/src/common/tools/context_queries/InterDomain_old.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/context_queries/Link.py b/src/common/tools/context_queries/Link.py index 291cdcf375d942b72008daea5c2c5ff357a994ef..cc47371ab8fd1bdf6e2238aad42e1b89ca1982cc 100644 --- a/src/common/tools/context_queries/Link.py +++ b/src/common/tools/context_queries/Link.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/context_queries/Service.py b/src/common/tools/context_queries/Service.py index b3b74827a5c86838cb4330ae89c1297652dc59b0..1a43bdb3c832072327bf27fd5eb3676460dbd669 100644 --- a/src/common/tools/context_queries/Service.py +++ b/src/common/tools/context_queries/Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/context_queries/Slice.py b/src/common/tools/context_queries/Slice.py index c3ce572fce8b3fb209b46b561a4004979dce4913..4f69c3c17fe1e1b57bb1e4e43f9d08b1c1cf812d 100644 --- a/src/common/tools/context_queries/Slice.py +++ b/src/common/tools/context_queries/Slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/context_queries/Topology.py b/src/common/tools/context_queries/Topology.py index caf03ed0eb5271aa6e00a2c107a06f9e496d37dc..350fc5467482898e2c08b53e0279c705fcd2835c 100644 --- a/src/common/tools/context_queries/Topology.py +++ b/src/common/tools/context_queries/Topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -65,7 +65,7 @@ def get_topology( def get_topology_details( context_client : ContextClient, topology_uuid : str, context_uuid : str = DEFAULT_CONTEXT_NAME, rw_copy : bool = False - ) -> Optional[Topology]: + ) -> Optional[TopologyDetails]: try: # pylint: disable=no-member topology_id = TopologyId() diff --git a/src/common/tools/context_queries/__init__.py b/src/common/tools/context_queries/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/tools/context_queries/__init__.py +++ b/src/common/tools/context_queries/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/descriptor/Loader.py b/src/common/tools/descriptor/Loader.py index 916a73d300011c62fc008fc7437df8a71f6a9838..f2f54bbd70eae2722f29e254495dddedadf2617b 100644 --- a/src/common/tools/descriptor/Loader.py +++ b/src/common/tools/descriptor/Loader.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,7 +46,7 @@ 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_devices_by_rules) + get_descriptors_add_topologies, split_controllers_and_network_devices, split_devices_by_rules) LOGGER = logging.getLogger(__name__) LOGGERS = { @@ -56,9 +56,10 @@ LOGGERS = { } ENTITY_TO_TEXT = { - # name => singular, plural + # name => singular, plural 'context' : ('Context', 'Contexts' ), 'topology' : ('Topology', 'Topologies' ), + 'controller': ('Controller', 'Controllers'), 'device' : ('Device', 'Devices' ), 'link' : ('Link', 'Links' ), 'service' : ('Service', 'Services' ), @@ -68,8 +69,8 @@ ENTITY_TO_TEXT = { ACTION_TO_TEXT = { # action => infinitive, past - 'add' : ('Add', 'Added'), - 'update' : ('Update', 'Updated'), + 'add' : ('Add', 'Added' ), + 'update' : ('Update', 'Updated' ), 'config' : ('Configure', 'Configured'), } @@ -231,20 +232,27 @@ 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) - self._process_descr('device', 'add', self.__ctx_cli.SetDevice, Device, self.__devices ) + self._process_descr('controller', 'add', self.__ctx_cli.SetDevice, Device, controllers ) + self._process_descr('device', 'add', self.__ctx_cli.SetDevice, Device, network_devices ) self._process_descr('link', 'add', self.__ctx_cli.SetLink, Link, self.__links ) self._process_descr('service', 'add', self.__ctx_cli.SetService, Service, self.__services ) self._process_descr('slice', 'add', self.__ctx_cli.SetSlice, Slice, self.__slices ) self._process_descr('connection', 'add', self.__ctx_cli.SetConnection, Connection, self.__connections ) - # Update context and topology is useless: - # - devices and links are assigned to topologies automatically by Context component - # - topologies, services, and slices are assigned to contexts automatically by Context component + # By default the Context component automatically assigns devices and links to topologies based on their + # endpoints, and assigns topologies, services, and slices to contexts based on their identifiers. + + # The following statement is useless; up to now, any use case requires assigning a topology, service, or + # slice to a different context. #self._process_descr('context', 'update', self.__ctx_cli.SetContext, Context, self.__contexts ) - #self._process_descr('topology', 'update', self.__ctx_cli.SetTopology, Topology, self.__topologies ) + + # In some cases, it might be needed to assign devices and links to multiple topologies; the + # following statement performs that assignment. + self._process_descr('topology', 'update', self.__ctx_cli.SetTopology, Topology, self.__topologies ) #self.__ctx_cli.close() @@ -257,26 +265,34 @@ class DescriptorLoader: self.__services_add = get_descriptors_add_services(self.__services) self.__slices_add = get_descriptors_add_slices(self.__slices) + controllers_add, network_devices_add = split_controllers_and_network_devices(self.__devices_add) + self.__ctx_cli.connect() self.__dev_cli.connect() self.__svc_cli.connect() self.__slc_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) - self._process_descr('device', 'add', self.__dev_cli.AddDevice, Device, self.__devices_add ) - self._process_descr('device', 'config', self.__dev_cli.ConfigureDevice, Device, self.__devices_config) - self._process_descr('link', 'add', self.__ctx_cli.SetLink, Link, self.__links ) - self._process_descr('service', 'add', self.__svc_cli.CreateService, Service, self.__services_add ) - self._process_descr('service', 'update', self.__svc_cli.UpdateService, Service, self.__services ) - self._process_descr('slice', 'add', self.__slc_cli.CreateSlice, Slice, self.__slices_add ) - self._process_descr('slice', 'update', self.__slc_cli.UpdateSlice, Slice, self.__slices ) - - # Update context and topology is useless: - # - devices and links are assigned to topologies automatically by Context component - # - topologies, services, and slices are assigned to contexts automatically by Context component + 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) + self._process_descr('controller', 'add', self.__dev_cli.AddDevice, Device, controllers_add ) + self._process_descr('device', 'add', self.__dev_cli.AddDevice, Device, network_devices_add ) + self._process_descr('device', 'config', self.__dev_cli.ConfigureDevice, Device, self.__devices_config) + self._process_descr('link', 'add', self.__ctx_cli.SetLink, Link, self.__links ) + self._process_descr('service', 'add', self.__svc_cli.CreateService, Service, self.__services_add ) + self._process_descr('service', 'update', self.__svc_cli.UpdateService, Service, self.__services ) + self._process_descr('slice', 'add', self.__slc_cli.CreateSlice, Slice, self.__slices_add ) + self._process_descr('slice', 'update', self.__slc_cli.UpdateSlice, Slice, self.__slices ) + + # By default the Context component automatically assigns devices and links to topologies based on their + # endpoints, and assigns topologies, services, and slices to contexts based on their identifiers. + + # The following statement is useless; up to now, any use case requires assigning a topology, service, or + # slice to a different context. #self._process_descr('context', 'update', self.__ctx_cli.SetContext, Context, self.__contexts ) - #self._process_descr('topology', 'update', self.__ctx_cli.SetTopology, Topology, self.__topologies ) + + # In some cases, it might be needed to assign devices and links to multiple topologies; the + # following statement performs that assignment. + self._process_descr('topology', 'update', self.__ctx_cli.SetTopology, Topology, self.__topologies ) #self.__slc_cli.close() #self.__svc_cli.close() diff --git a/src/common/tools/descriptor/Tools.py b/src/common/tools/descriptor/Tools.py index f03c635b802e5c003a6ea80af46ef740b97e500b..531544313f5a2644472b76ffeb5c85b2f49e6a7f 100644 --- a/src/common/tools/descriptor/Tools.py +++ b/src/common/tools/descriptor/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ import copy, json from typing import Dict, List, Optional, Tuple, Union +from common.DeviceTypes import DeviceTypeEnum +from common.proto.context_pb2 import DeviceDriverEnum def get_descriptors_add_contexts(contexts : List[Dict]) -> List[Dict]: contexts_add = copy.deepcopy(contexts) @@ -57,6 +59,8 @@ def format_custom_config_rules(config_rules : List[Dict]) -> List[Dict]: if isinstance(custom_resource_value, (dict, list)): custom_resource_value = json.dumps(custom_resource_value, sort_keys=True, indent=0) config_rule['custom']['resource_value'] = custom_resource_value + elif not isinstance(custom_resource_value, str): + config_rule['custom']['resource_value'] = str(custom_resource_value) return config_rules def format_device_custom_config_rules(device : Dict) -> Dict: @@ -92,7 +96,8 @@ def split_devices_by_rules(devices : List[Dict]) -> Tuple[List[Dict], List[Dict] if len(connect_rules) > 0: device_add = copy.deepcopy(device) - device_add['device_endpoints'] = [] + if (device['device_drivers'][0] != DeviceDriverEnum.DEVICEDRIVER_OC): + device_add['device_endpoints'] = [] device_add['device_config'] = {'config_rules': connect_rules} devices_add.append(device_add) @@ -101,3 +106,24 @@ def split_devices_by_rules(devices : List[Dict]) -> Tuple[List[Dict], List[Dict] devices_config.append(device) return devices_add, devices_config + +CONTROLLER_DEVICE_TYPES = { + DeviceTypeEnum.EMULATED_IP_SDN_CONTROLLER.value, + DeviceTypeEnum.EMULATED_MICROWAVE_RADIO_SYSTEM.value, + DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM.value, + DeviceTypeEnum.IP_SDN_CONTROLLER.value, + DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM.value, + DeviceTypeEnum.OPEN_LINE_SYSTEM.value, + DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value, +} + +def split_controllers_and_network_devices(devices : List[Dict]) -> Tuple[List[Dict], List[Dict]]: + controllers : List[Dict] = list() + network_devices : List[Dict] = list() + for device in devices: + device_type = device.get('device_type') + if device_type in CONTROLLER_DEVICE_TYPES: + controllers.append(device) + else: + network_devices.append(device) + return controllers, network_devices diff --git a/src/common/tools/descriptor/__init__.py b/src/common/tools/descriptor/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/tools/descriptor/__init__.py +++ b/src/common/tools/descriptor/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/descriptor/old/BuildDescriptors.py b/src/common/tools/descriptor/old/BuildDescriptors.py index 98b78863318a7ad682fc5f970d44d02240b45a26..cfd29eea0cb80306f402ef71530016599b570eb1 100644 --- a/src/common/tools/descriptor/old/BuildDescriptors.py +++ b/src/common/tools/descriptor/old/BuildDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/descriptor/old/LoadDescriptors.py b/src/common/tools/descriptor/old/LoadDescriptors.py index b63d32e7a7a60499a10ba90277a582b5393cc4c4..39e45faed0b92a3fac41b2d17d03efac1babd4b0 100644 --- a/src/common/tools/descriptor/old/LoadDescriptors.py +++ b/src/common/tools/descriptor/old/LoadDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/grpc/ConfigRules.py b/src/common/tools/grpc/ConfigRules.py index 8eaf138fd03e81e4d43861742301adff70dd875a..b29744e02b096e8cfc2ebc8156c6079a1a0882ea 100644 --- a/src/common/tools/grpc/ConfigRules.py +++ b/src/common/tools/grpc/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/grpc/Constraints.py b/src/common/tools/grpc/Constraints.py index 07f0b7782dbd93479774af6324683753f906c5a1..009ca7f9665446626c9a333341296e403d164f2f 100644 --- a/src/common/tools/grpc/Constraints.py +++ b/src/common/tools/grpc/Constraints.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,11 +18,12 @@ import json from typing import Any, Dict, List, Optional, Tuple -from common.proto.context_pb2 import Constraint, EndPointId +from common.proto.context_pb2 import Constraint, ConstraintActionEnum, EndPointId from common.tools.grpc.Tools import grpc_message_to_json_string def update_constraint_custom_scalar( - constraints, constraint_type : str, value : Any, raise_if_differs : bool = False + constraints, constraint_type : str, value : Any, raise_if_differs : bool = False, + new_action : ConstraintActionEnum = ConstraintActionEnum.CONSTRAINTACTION_SET ) -> Constraint: for constraint in constraints: @@ -36,6 +37,8 @@ def update_constraint_custom_scalar( constraint.custom.constraint_type = constraint_type json_constraint_value = None + constraint.action = new_action + if (json_constraint_value is None) or not raise_if_differs: # missing or raise_if_differs=False, add/update it json_constraint_value = value @@ -47,7 +50,10 @@ def update_constraint_custom_scalar( constraint.custom.constraint_value = json.dumps(json_constraint_value, sort_keys=True) return constraint -def update_constraint_custom_dict(constraints, constraint_type : str, fields : Dict[str, Tuple[Any, bool]]) -> Constraint: +def update_constraint_custom_dict( + constraints, constraint_type : str, fields : Dict[str, Tuple[Any, bool]], + new_action : ConstraintActionEnum = ConstraintActionEnum.CONSTRAINTACTION_SET +) -> Constraint: # fields: Dict[field_name : str, Tuple[field_value : Any, raise_if_differs : bool]] for constraint in constraints: @@ -61,6 +67,8 @@ def update_constraint_custom_dict(constraints, constraint_type : str, fields : D constraint.custom.constraint_type = constraint_type json_constraint_value = {} + constraint.action = new_action + for field_name,(field_value, raise_if_differs) in fields.items(): if (field_name not in json_constraint_value) or not raise_if_differs: # missing or raise_if_differs=False, add/update it @@ -75,7 +83,8 @@ def update_constraint_custom_dict(constraints, constraint_type : str, fields : D def update_constraint_endpoint_location( constraints, endpoint_id : EndPointId, - region : Optional[str] = None, gps_position : Optional[Tuple[float, float]] = None + region : Optional[str] = None, gps_position : Optional[Tuple[float, float]] = None, + new_action : ConstraintActionEnum = ConstraintActionEnum.CONSTRAINTACTION_SET ) -> Constraint: # gps_position: (latitude, longitude) if region is not None and gps_position is not None: @@ -103,6 +112,8 @@ def update_constraint_endpoint_location( _endpoint_id.topology_id.topology_uuid.uuid = topology_uuid _endpoint_id.topology_id.context_id.context_uuid.uuid = context_uuid + constraint.action = new_action + location = constraint.endpoint_location.location if region is not None: location.region = region @@ -111,7 +122,10 @@ def update_constraint_endpoint_location( location.gps_position.longitude = gps_position[1] return constraint -def update_constraint_endpoint_priority(constraints, endpoint_id : EndPointId, priority : int) -> Constraint: +def update_constraint_endpoint_priority( + constraints, endpoint_id : EndPointId, priority : int, + new_action : ConstraintActionEnum = ConstraintActionEnum.CONSTRAINTACTION_SET +) -> Constraint: endpoint_uuid = endpoint_id.endpoint_uuid.uuid device_uuid = endpoint_id.device_id.device_uuid.uuid topology_uuid = endpoint_id.topology_id.topology_uuid.uuid @@ -134,10 +148,15 @@ def update_constraint_endpoint_priority(constraints, endpoint_id : EndPointId, p _endpoint_id.topology_id.topology_uuid.uuid = topology_uuid _endpoint_id.topology_id.context_id.context_uuid.uuid = context_uuid + constraint.action = new_action + constraint.endpoint_priority.priority = priority return constraint -def update_constraint_sla_capacity(constraints, capacity_gbps : float) -> Constraint: +def update_constraint_sla_capacity( + constraints, capacity_gbps : float, + new_action : ConstraintActionEnum = ConstraintActionEnum.CONSTRAINTACTION_SET +) -> Constraint: for constraint in constraints: if constraint.WhichOneof('constraint') != 'sla_capacity': continue break # found, end loop @@ -145,10 +164,15 @@ def update_constraint_sla_capacity(constraints, capacity_gbps : float) -> Constr # not found, add it constraint = constraints.add() # pylint: disable=no-member + constraint.action = new_action + constraint.sla_capacity.capacity_gbps = capacity_gbps return constraint -def update_constraint_sla_latency(constraints, e2e_latency_ms : float) -> Constraint: +def update_constraint_sla_latency( + constraints, e2e_latency_ms : float, + new_action : ConstraintActionEnum = ConstraintActionEnum.CONSTRAINTACTION_SET +) -> Constraint: for constraint in constraints: if constraint.WhichOneof('constraint') != 'sla_latency': continue break # found, end loop @@ -156,11 +180,14 @@ def update_constraint_sla_latency(constraints, e2e_latency_ms : float) -> Constr # not found, add it constraint = constraints.add() # pylint: disable=no-member + constraint.action = new_action + constraint.sla_latency.e2e_latency_ms = e2e_latency_ms return constraint def update_constraint_sla_availability( - constraints, num_disjoint_paths : int, all_active : bool, availability : float + constraints, num_disjoint_paths : int, all_active : bool, availability : float, + new_action : ConstraintActionEnum = ConstraintActionEnum.CONSTRAINTACTION_SET ) -> Constraint: for constraint in constraints: if constraint.WhichOneof('constraint') != 'sla_availability': continue @@ -169,12 +196,17 @@ def update_constraint_sla_availability( # not found, add it constraint = constraints.add() # pylint: disable=no-member + constraint.action = new_action + constraint.sla_availability.num_disjoint_paths = num_disjoint_paths constraint.sla_availability.all_active = all_active constraint.sla_availability.availability = availability return constraint -def update_constraint_sla_isolation(constraints, isolation_levels : List[int]) -> Constraint: +def update_constraint_sla_isolation( + constraints, isolation_levels : List[int], + new_action : ConstraintActionEnum = ConstraintActionEnum.CONSTRAINTACTION_SET +) -> Constraint: for constraint in constraints: if constraint.WhichOneof('constraint') != 'sla_isolation': continue break # found, end loop @@ -182,6 +214,8 @@ def update_constraint_sla_isolation(constraints, isolation_levels : List[int]) - # not found, add it constraint = constraints.add() # pylint: disable=no-member + constraint.action = new_action + for isolation_level in isolation_levels: if isolation_level in constraint.sla_isolation.isolation_level: continue constraint.sla_isolation.isolation_level.append(isolation_level) diff --git a/src/common/tools/grpc/EndPointIds.py b/src/common/tools/grpc/EndPointIds.py index 5aafaaf7175615c863f3502e444cfd2b95dac219..24bee3f844cb1cca02cc2633e2c5b2301274d196 100644 --- a/src/common/tools/grpc/EndPointIds.py +++ b/src/common/tools/grpc/EndPointIds.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/grpc/ServiceIds.py b/src/common/tools/grpc/ServiceIds.py index 6264a8311e3663dfce58facb7fb944b82ab6d74b..b1718a4e7b8d19c33df757cf348a8b9e6e391679 100644 --- a/src/common/tools/grpc/ServiceIds.py +++ b/src/common/tools/grpc/ServiceIds.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/grpc/Tools.py b/src/common/tools/grpc/Tools.py index 04775bbb479c08995d83686c78f55dad1144ba40..02a23012ff45e1edcea77d65acd0a237a96f85f7 100644 --- a/src/common/tools/grpc/Tools.py +++ b/src/common/tools/grpc/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/grpc/__init__.py b/src/common/tools/grpc/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/tools/grpc/__init__.py +++ b/src/common/tools/grpc/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/mutex_queues/MutexQueues.py b/src/common/tools/mutex_queues/MutexQueues.py index 96e22a86f012cb8326c380a0ebbf0c1b40cae21c..7f0ce386aedef76c984e2362a4a65cd0c0582683 100644 --- a/src/common/tools/mutex_queues/MutexQueues.py +++ b/src/common/tools/mutex_queues/MutexQueues.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,7 +46,16 @@ class MutexQueues: # dictionaty of queues of mutexes: queue_name => queue[mutex] # first mutex is the running one self.mutex_queues : Dict[str, Queue[threading.Event]] = dict() - + + def add_alias(self, queue_name_a : str, queue_name_b : str) -> None: + with self.lock: + if queue_name_a in self.mutex_queues and queue_name_b not in self.mutex_queues: + self.mutex_queues[queue_name_b] = self.mutex_queues[queue_name_a] + elif queue_name_b in self.mutex_queues and queue_name_a not in self.mutex_queues: + self.mutex_queues[queue_name_a] = self.mutex_queues[queue_name_b] + elif queue_name_b not in self.mutex_queues and queue_name_a not in self.mutex_queues: + self.mutex_queues[queue_name_b] = self.mutex_queues.setdefault(queue_name_a, Queue()) + def wait_my_turn(self, queue_name : str) -> None: # create my mutex and enqueue it mutex = threading.Event() diff --git a/src/common/tools/mutex_queues/__init__.py b/src/common/tools/mutex_queues/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/tools/mutex_queues/__init__.py +++ b/src/common/tools/mutex_queues/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/object_factory/ConfigRule.py b/src/common/tools/object_factory/ConfigRule.py index a83931e802a660e3ac0d023931af3fa97493cb26..e098f0de3f445177145289927bf413eac3ccb212 100644 --- a/src/common/tools/object_factory/ConfigRule.py +++ b/src/common/tools/object_factory/ConfigRule.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/object_factory/Connection.py b/src/common/tools/object_factory/Connection.py index f1fb983060bf4cc8e6229a51c51cc76162942e44..4d05625213130bc3e9ee859cdca326826749ef08 100644 --- a/src/common/tools/object_factory/Connection.py +++ b/src/common/tools/object_factory/Connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/object_factory/Constraint.py b/src/common/tools/object_factory/Constraint.py index 9fccd9d5f97d64cac2dea441bbbb374d638df114..aa454ccece248d048a7494104d07516552c491a0 100644 --- a/src/common/tools/object_factory/Constraint.py +++ b/src/common/tools/object_factory/Constraint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/object_factory/Context.py b/src/common/tools/object_factory/Context.py index 6bf2281cbf43fdb6002021b1204223fdc0932bd7..f93484ce59e329757b169a71af01404671682960 100644 --- a/src/common/tools/object_factory/Context.py +++ b/src/common/tools/object_factory/Context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/object_factory/Device.py b/src/common/tools/object_factory/Device.py index bc5c28740d5635df99c26ef56124c471d2c77d91..f37141239afa6f9f440e38d0bcee5efed861fdba 100644 --- a/src/common/tools/object_factory/Device.py +++ b/src/common/tools/object_factory/Device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,6 +46,10 @@ DEVICE_P4_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_P4] DEVICE_TFS_TYPE = DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value DEVICE_TFS_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN] +DEVICE_IETF_ACTN_TYPE = DeviceTypeEnum.OPEN_LINE_SYSTEM.value +DEVICE_IETF_ACTN_DRIVERS = [DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN] + + def json_device_id(device_uuid : str): return {'device_uuid': {'uuid': device_uuid}} @@ -136,6 +140,14 @@ def json_device_tfs_disabled( device_uuid, DEVICE_TFS_TYPE, DEVICE_DISABLED, name=name, endpoints=endpoints, config_rules=config_rules, drivers=drivers) +def json_device_ietf_actn_disabled( + device_uuid : str, name : Optional[str] = None, endpoints : List[Dict] = [], config_rules : List[Dict] = [], + drivers : List[Dict] = DEVICE_IETF_ACTN_DRIVERS + ): + return json_device( + device_uuid, DEVICE_IETF_ACTN_TYPE, DEVICE_DISABLED, name=name, endpoints=endpoints, config_rules=config_rules, + drivers=drivers) + def json_device_connect_rules(address : str, port : int, settings : Dict = {}) -> List[Dict]: return [ json_config_rule_set('_connect/address', address), diff --git a/src/common/tools/object_factory/EndPoint.py b/src/common/tools/object_factory/EndPoint.py index a776dfebb42cea5b51bf0a2566038859ffc02fa5..85a5d4494184567447d6d16fa7df2c530106c6ba 100644 --- a/src/common/tools/object_factory/EndPoint.py +++ b/src/common/tools/object_factory/EndPoint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/object_factory/Link.py b/src/common/tools/object_factory/Link.py index c0a4c48d1beea64e6591e47441509fa2cc42c02b..5865582466f5e61e4d955fd08b28063aeb0051a3 100644 --- a/src/common/tools/object_factory/Link.py +++ b/src/common/tools/object_factory/Link.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/object_factory/Location.py b/src/common/tools/object_factory/Location.py index ac44ef4c64d8466be123c5a722bf7fe69f5e48a8..05aa6ed334807e3e7f39422a41c86621dae1dbb5 100644 --- a/src/common/tools/object_factory/Location.py +++ b/src/common/tools/object_factory/Location.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/object_factory/PolicyRule.py b/src/common/tools/object_factory/PolicyRule.py index 75dedc4155d4da0746947992cc3ba650142ae7ed..64feacd4fa6055e571dea7c3f2f5f1aad5e50445 100644 --- a/src/common/tools/object_factory/PolicyRule.py +++ b/src/common/tools/object_factory/PolicyRule.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/object_factory/Service.py b/src/common/tools/object_factory/Service.py index a4ec3cd76f31b25ea471e9d040d57ebeac818c69..32b99a31f22072874ab894de2a87ce2b7d56ba85 100644 --- a/src/common/tools/object_factory/Service.py +++ b/src/common/tools/object_factory/Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/object_factory/Slice.py b/src/common/tools/object_factory/Slice.py index 9f2cf56fd10390e46fec418487264dfbd633412e..1e1a96cc973cfe19f0293b7e5715c819c1ed38ca 100644 --- a/src/common/tools/object_factory/Slice.py +++ b/src/common/tools/object_factory/Slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/object_factory/Topology.py b/src/common/tools/object_factory/Topology.py index e847d58e7b280e68ef6e0eee5210e45b842e48ad..55609024a5bedf21f0720feeeccb6237f1a297af 100644 --- a/src/common/tools/object_factory/Topology.py +++ b/src/common/tools/object_factory/Topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/object_factory/__init__.py b/src/common/tools/object_factory/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/tools/object_factory/__init__.py +++ b/src/common/tools/object_factory/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/service/GenericGrpcService.py b/src/common/tools/service/GenericGrpcService.py index 286c8564383aa3f1eaf652c43d365704e040b882..9a44721278fb6b18f37053eea79c20e8299bbaea 100644 --- a/src/common/tools/service/GenericGrpcService.py +++ b/src/common/tools/service/GenericGrpcService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/service/GenericRestServer.py b/src/common/tools/service/GenericRestServer.py index 51d3f828fabea1a6d3b9a4d7da526750a50fcbf9..5dd2c1677a7a41ca2244ab38e1c84c1dd637d4d1 100644 --- a/src/common/tools/service/GenericRestServer.py +++ b/src/common/tools/service/GenericRestServer.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -37,7 +37,8 @@ class GenericRestServer(threading.Thread): self.bind_port = bind_port self.base_url = base_url self.bind_address = get_http_bind_address() if bind_address is None else bind_address - self.endpoint = 'http://{:s}:{:s}{:s}'.format(str(self.bind_address), str(self.bind_port), str(self.base_url)) + self.endpoint = 'http://{:s}:{:s}'.format(str(self.bind_address), str(self.bind_port)) + if self.base_url is not None: self.endpoint += str(self.base_url) self.srv = None self.ctx = None self.app = Flask(__name__) diff --git a/src/common/tools/service/__init__.py b/src/common/tools/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/tools/service/__init__.py +++ b/src/common/tools/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/timestamp/Converters.py b/src/common/tools/timestamp/Converters.py index 7918017390e60bd7830d3513216fc0b8f6cf83ef..eea5172cc22e051b283fa41ef745c8bf2c1daf9a 100644 --- a/src/common/tools/timestamp/Converters.py +++ b/src/common/tools/timestamp/Converters.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/tools/timestamp/__init__.py b/src/common/tools/timestamp/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/tools/timestamp/__init__.py +++ b/src/common/tools/timestamp/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/type_checkers/Assertions.py b/src/common/type_checkers/Assertions.py index 286ae179d325b6e70d6ebf509de92e354ba42bc8..90b7d976b0f6fff9d478ce7b40188240a8eea2d6 100644 --- a/src/common/type_checkers/Assertions.py +++ b/src/common/type_checkers/Assertions.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Dict +import logging +from typing import Callable, Dict + +LOGGER = logging.getLogger(__name__) # ----- Enumerations --------------------------------------------------------------------------------------------------- def validate_config_action_enum(message): @@ -23,6 +26,14 @@ def validate_config_action_enum(message): 'CONFIGACTION_DELETE', ] +def validate_constraint_action_enum(message): + assert isinstance(message, str) + assert message in [ + 'CONSTRAINTACTION_UNDEFINED', + 'CONSTRAINTACTION_SET', + 'CONSTRAINTACTION_DELETE', + ] + def validate_device_driver_enum(message): assert isinstance(message, str) assert message in [ @@ -35,6 +46,8 @@ def validate_device_driver_enum(message): 'DEVICEDRIVER_XR', 'DEVICEDRIVER_IETF_L2VPN', 'DEVICEDRIVER_GNMI_OPENCONFIG', + 'DEVICEDRIVER_OPTICAL_TFS', + 'DEVICEDRIVER_IETF_ACTN', ] def validate_device_operational_status_enum(message): @@ -64,6 +77,8 @@ def validate_service_type_enum(message): 'SERVICETYPE_L3NM', 'SERVICETYPE_L2NM', 'SERVICETYPE_TAPI_CONNECTIVITY_SERVICE', + 'SERVICETYPE_TE', + 'SERVICETYPE_E2E', ] def validate_service_state_enum(message): @@ -77,6 +92,17 @@ def validate_service_state_enum(message): 'SERVICESTATUS_SLA_VIOLATED', ] +def validate_slice_status_enum(message): + assert isinstance(message, str) + assert message in [ + 'SLICESTATUS_UNDEFINED', + 'SLICESTATUS_PLANNED', + 'SLICESTATUS_INIT', + 'SLICESTATUS_ACTIVE', + 'SLICESTATUS_DEINIT', + 'SLICESTATUS_SLA_VIOLATED', + ] + # ----- Common --------------------------------------------------------------------------------------------------------- def validate_uuid(message, allow_empty=False): @@ -114,28 +140,61 @@ def validate_config_rules(message): assert 'config_rules' in message for config_rule in message['config_rules']: validate_config_rule(config_rule) -CONSTRAINT_TYPES = { - 'custom', - 'schedule', - 'endpoint_location', - 'sla_capacity', - 'sla_latency', - 'sla_availability', - 'sla_isolation', +def validate_constraint_custom(message): + assert isinstance(message, dict) + assert len(message.keys()) == 2 + assert 'constraint_type' in message + assert isinstance(message['constraint_type'], str) + assert 'constraint_value' in message + assert isinstance(message['constraint_value'], str) + +def validate_constraint_sla_capacity(message): + assert isinstance(message, dict) + assert len(message.keys()) == 1 + assert 'capacity_gbps' in message + assert isinstance(message['capacity_gbps'], (int, float)) + +def validate_constraint_sla_latency(message): + assert isinstance(message, dict) + assert len(message.keys()) == 1 + assert 'e2e_latency_ms' in message + assert isinstance(message['e2e_latency_ms'], (int, float)) + +def validate_constraint_sla_availability(message): + assert isinstance(message, dict) + assert len(message.keys()) == 3 + assert 'num_disjoint_paths' in message + assert isinstance(message['num_disjoint_paths'], int) + assert message['num_disjoint_paths'] >= 0 + assert 'all_active' in message + assert isinstance(message['all_active'], bool) + assert 'availability' in message + assert isinstance(message['availability'], (int, float)) + assert message['availability'] >= 0 and message['availability'] <= 100 + +CONSTRAINT_TYPE_TO_VALIDATOR = { + 'custom' : validate_constraint_custom, + #'schedule' : validate_constraint_schedule, + #'endpoint_location' : validate_constraint_endpoint_location, + #'endpoint_priority' : validate_constraint_endpoint_priority, + 'sla_capacity' : validate_constraint_sla_capacity, + 'sla_latency' : validate_constraint_sla_latency, + 'sla_availability' : validate_constraint_sla_availability, + #'sla_isolation' : validate_constraint_sla_isolation, + #'exclusions' : validate_constraint_exclusions, } + def validate_constraint(message): assert isinstance(message, dict) - assert len(message.keys()) == 1 - other_keys = list(message.keys()) - constraint_type = other_keys[0] - assert constraint_type in CONSTRAINT_TYPES - assert constraint_type == 'custom', 'Constraint Type Validator for {:s} not implemented'.format(constraint_type) - custom : Dict = message['custom'] - assert len(custom.keys()) == 2 - assert 'constraint_type' in custom - assert isinstance(custom['constraint_type'], str) - assert 'constraint_value' in custom - assert isinstance(custom['constraint_value'], str) + assert len(message.keys()) == 2 + assert 'action' in message + validate_constraint_action_enum(message['action']) + other_keys = set(list(message.keys())) + other_keys.discard('action') + constraint_type = other_keys.pop() + validator : Callable = CONSTRAINT_TYPE_TO_VALIDATOR.get(constraint_type) + assert validator is not None, 'Constraint Type Validator for {:s} not implemented'.format(constraint_type) + validator(message[constraint_type]) # ----- Identifiers ---------------------------------------------------------------------------------------------------- @@ -192,6 +251,15 @@ def validate_connection_id(message): assert 'connection_uuid' in message validate_uuid(message['connection_uuid']) +def validate_slice_id(message, context_uuid = None): + assert isinstance(message, dict) + assert len(message.keys()) == 2 + assert 'context_id' in message + validate_context_id(message['context_id']) + if context_uuid is not None: assert message['context_id']['context_uuid']['uuid'] == context_uuid + assert 'slice_uuid' in message + validate_uuid(message['slice_uuid']) + # ----- Lists of Identifiers ------------------------------------------------------------------------------------------- @@ -209,6 +277,13 @@ def validate_service_ids(message, context_uuid=None): assert isinstance(message['service_ids'], list) for service_id in message['service_ids']: validate_service_id(service_id, context_uuid=context_uuid) +def validate_slice_ids(message, context_uuid=None): + assert isinstance(message, dict) + assert len(message.keys()) == 1 + assert 'slice_ids' in message + assert isinstance(message['slice_ids'], list) + for slice_id in message['slice_ids']: validate_slice_id(slice_id, context_uuid=context_uuid) + def validate_topology_ids(message, context_uuid=None): assert isinstance(message, dict) assert len(message.keys()) == 1 @@ -242,16 +317,21 @@ def validate_connection_ids(message): def validate_context(message): assert isinstance(message, dict) - assert len(message.keys()) == 3 + assert len(message.keys()) == 5 assert 'context_id' in message validate_context_id(message['context_id']) context_uuid = message['context_id']['context_uuid']['uuid'] - assert 'service_ids' in message - assert isinstance(message['service_ids'], list) - for service_id in message['service_ids']: validate_service_id(service_id, context_uuid=context_uuid) + assert 'name' in message + assert isinstance(message['name'], str) assert 'topology_ids' in message assert isinstance(message['topology_ids'], list) for topology_id in message['topology_ids']: validate_topology_id(topology_id, context_uuid=context_uuid) + assert 'service_ids' in message + assert isinstance(message['service_ids'], list) + for service_id in message['service_ids']: validate_service_id(service_id, context_uuid=context_uuid) + assert 'slice_ids' in message + assert isinstance(message['slice_ids'], list) + for slice_id in message['slice_ids']: validate_slice_id(slice_id, context_uuid=context_uuid) def validate_service_state(message): assert isinstance(message, dict) @@ -259,11 +339,19 @@ def validate_service_state(message): assert 'service_status' in message validate_service_state_enum(message['service_status']) +def validate_slice_status(message): + assert isinstance(message, dict) + assert len(message.keys()) == 1 + assert 'slice_status' in message + validate_slice_status_enum(message['slice_status']) + def validate_service(message): assert isinstance(message, dict) - assert len(message.keys()) == 6 + assert len(message.keys()) == 7 assert 'service_id' in message validate_service_id(message['service_id']) + assert 'name' in message + assert isinstance(message['name'], str) assert 'service_type' in message validate_service_type_enum(message['service_type']) assert 'service_endpoint_ids' in message @@ -277,11 +365,44 @@ def validate_service(message): assert 'service_config' in message validate_config_rules(message['service_config']) +def validate_slice(message): + assert isinstance(message, dict) + assert len(message.keys()) in {8, 9} + assert 'slice_id' in message + validate_slice_id(message['slice_id']) + assert 'name' in message + assert isinstance(message['name'], str) + assert 'slice_endpoint_ids' in message + assert isinstance(message['slice_endpoint_ids'], list) + for endpoint_id in message['slice_endpoint_ids']: validate_endpoint_id(endpoint_id) + assert 'slice_constraints' in message + assert isinstance(message['slice_constraints'], list) + for constraint in message['slice_constraints']: validate_constraint(constraint) + assert 'slice_service_ids' in message + assert isinstance(message['slice_service_ids'], list) + for service_id in message['slice_service_ids']: validate_service_id(service_id) + assert 'slice_subslice_ids' in message + assert isinstance(message['slice_subslice_ids'], list) + for slice_id in message['slice_subslice_ids']: validate_slice_id(slice_id) + assert 'slice_status' in message + validate_slice_status(message['slice_status']) + assert 'slice_config' in message + validate_config_rules(message['slice_config']) + if len(message.keys()) == 9: + assert 'slice_owner' in message + assert isinstance(message['slice_owner'], dict) + assert 'owner_uuid' in message['slice_owner'] + validate_uuid(message['slice_owner']['owner_uuid']) + assert 'owner_string' in message['slice_owner'] + assert isinstance(message['slice_owner']['owner_string'], str) + def validate_topology(message, num_devices=None, num_links=None): assert isinstance(message, dict) - assert len(message.keys()) == 3 + assert len(message.keys()) == 4 assert 'topology_id' in message validate_topology_id(message['topology_id']) + assert 'name' in message + assert isinstance(message['name'], str) assert 'device_ids' in message assert isinstance(message['device_ids'], list) if num_devices is not None: assert len(message['device_ids']) == num_devices @@ -293,20 +414,49 @@ def validate_topology(message, num_devices=None, num_links=None): def validate_endpoint(message): assert isinstance(message, dict) - assert len(message.keys()) == 3 + assert len(message.keys()) == 4 assert 'endpoint_id' in message validate_endpoint_id(message['endpoint_id']) + assert 'name' in message + assert isinstance(message['name'], str) assert 'endpoint_type' in message assert isinstance(message['endpoint_type'], str) assert 'kpi_sample_types' in message assert isinstance(message['kpi_sample_types'], list) for kpi_sample_type in message['kpi_sample_types']: validate_kpi_sample_types_enum(kpi_sample_type) +def validate_component(component): + assert isinstance(component, dict) + assert len(component.keys()) == 5 + assert 'component_uuid' in component + validate_uuid(component['component_uuid']) + assert 'name' in component + assert isinstance(component['name'], str) + assert 'type' in component + assert isinstance(component['type'], str) + assert 'attributes' in component + assert isinstance(component['attributes'], dict) + for k,v in component['attributes'].items(): + assert isinstance(k, str) + assert isinstance(v, str) + assert 'parent' in component + assert isinstance(component['parent'], str) + +def validate_link_attributes(link_attributes): + assert isinstance(link_attributes, dict) + assert len(link_attributes.keys()) == 2 + assert 'total_capacity_gbps' in link_attributes + assert isinstance(link_attributes['total_capacity_gbps'], (int, float)) + assert 'used_capacity_gbps' in link_attributes + assert isinstance(link_attributes['used_capacity_gbps'], (int, float)) + def validate_device(message): assert isinstance(message, dict) - assert len(message.keys()) == 6 + assert len(message.keys()) in {8, 9} assert 'device_id' in message validate_device_id(message['device_id']) + assert 'name' in message + assert isinstance(message['name'], str) assert 'device_type' in message assert isinstance(message['device_type'], str) assert 'device_config' in message @@ -319,19 +469,30 @@ def validate_device(message): assert 'device_endpoints' in message assert isinstance(message['device_endpoints'], list) for endpoint in message['device_endpoints']: validate_endpoint(endpoint) + assert 'components' in message + assert isinstance(message['components'], list) + for component in message['components']: validate_component(component) + if len(message.keys()) == 9: + assert 'controller_id' in message + if len(message['controller_id']) > 0: + validate_device_id(message['controller_id']) def validate_link(message): assert isinstance(message, dict) - assert len(message.keys()) == 2 + assert len(message.keys()) == 4 assert 'link_id' in message validate_link_id(message['link_id']) + assert 'name' in message + assert isinstance(message['name'], str) assert 'link_endpoint_ids' in message assert isinstance(message['link_endpoint_ids'], list) for endpoint_id in message['link_endpoint_ids']: validate_endpoint_id(endpoint_id) + assert 'attributes' in message + validate_link_attributes(message['attributes']) def validate_connection(message): assert isinstance(message, dict) - assert len(message.keys()) == 4 + assert len(message.keys()) in {4, 5} assert 'connection_id' in message validate_connection_id(message['connection_id']) assert 'service_id' in message @@ -342,6 +503,50 @@ def validate_connection(message): assert 'sub_service_ids' in message assert isinstance(message['sub_service_ids'], list) for sub_service_id in message['sub_service_ids']: validate_service_id(sub_service_id) + if len(message.keys()) == 5: + assert 'settings' in message + assert isinstance(message['settings'], dict) + # TODO: improve validation of data types, especially for uint values, IP/MAC addresses, TCP/UDP ports, etc. + if 'l0' in message['settings']: + assert isinstance(message['settings']['l0'], dict) + if 'lsp_symbolic_name' in message['settings']['l0']: + assert isinstance(message['settings']['l0']['lsp_symbolic_name'], str) + if 'l2' in message['settings']: + assert isinstance(message['settings']['l2'], dict) + if 'src_mac_address' in message['settings']['l2']: + assert isinstance(message['settings']['l2']['src_mac_address'], str) + if 'dst_mac_address' in message['settings']['l2']: + assert isinstance(message['settings']['l2']['dst_mac_address'], str) + if 'ether_type' in message['settings']['l2']: + assert isinstance(message['settings']['l2']['ether_type'], int) + if 'vlan_id' in message['settings']['l2']: + assert isinstance(message['settings']['l2']['vlan_id'], int) + if 'mpls_label' in message['settings']['l2']: + assert isinstance(message['settings']['l2']['mpls_label'], int) + if 'mpls_traffic_class' in message['settings']['l2']: + assert isinstance(message['settings']['l2']['mpls_traffic_class'], int) + if 'l3' in message['settings']: + assert isinstance(message['settings']['l3'], dict) + if 'src_ip_address' in message['settings']['l3']: + assert isinstance(message['settings']['l3']['src_ip_address'], str) + if 'dst_ip_address' in message['settings']['l3']: + assert isinstance(message['settings']['l3']['dst_ip_address'], str) + if 'dscp' in message['settings']['l3']: + assert isinstance(message['settings']['l3']['dscp'], int) + if 'protocol' in message['settings']['l3']: + assert isinstance(message['settings']['l3']['protocol'], int) + if 'ttl' in message['settings']['l3']: + assert isinstance(message['settings']['l3']['ttl'], int) + if 'l4' in message['settings']: + assert isinstance(message['settings']['l4'], dict) + if 'src_port' in message['settings']['l4']: + assert isinstance(message['settings']['l4']['src_port'], int) + if 'dst_port' in message['settings']['l4']: + assert isinstance(message['settings']['l4']['dst_port'], int) + if 'tcp_flags' in message['settings']['l4']: + assert isinstance(message['settings']['l4']['tcp_flags'], int) + if 'ttl' in message['settings']['l4']: + assert isinstance(message['settings']['l4']['ttl'], int) # ----- Lists of Objects ----------------------------------------------------------------------------------------------- @@ -360,6 +565,13 @@ def validate_services(message): assert isinstance(message['services'], list) for service in message['services']: validate_service(service) +def validate_slices(message): + assert isinstance(message, dict) + assert len(message.keys()) == 1 + assert 'slices' in message + assert isinstance(message['slices'], list) + for slice_ in message['slices']: validate_slice(slice_) + def validate_topologies(message): assert isinstance(message, dict) assert len(message.keys()) == 1 diff --git a/src/common/type_checkers/Checkers.py b/src/common/type_checkers/Checkers.py index e61bd3ccd338b922598a2b7b37af56b22cc11267..2ea6bdb3cc53ff8c49d7244e1a7ef7b60d925481 100644 --- a/src/common/type_checkers/Checkers.py +++ b/src/common/type_checkers/Checkers.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/common/type_checkers/__init__.py b/src/common/type_checkers/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/common/type_checkers/__init__.py +++ b/src/common/type_checkers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/.gitlab-ci.yml b/src/context/.gitlab-ci.yml index 5de4bc1fcbb5bea98a7675253efe060df03a1237..c1caed6679e9c24599f1992e49eb0874e81bea49 100644 --- a/src/context/.gitlab-ci.yml +++ b/src/context/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build context: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: diff --git a/src/context/Config.py b/src/context/Config.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..cf5cb4c6b21012d17fef849d3563d7493fdecfa9 100644 --- a/src/context/Config.py +++ b/src/context/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,3 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +from common.Settings import get_setting + +TRUE_VALUES = {'Y', 'YES', 'T', 'TRUE', 'E', 'ENABLE', 'ENABLED'} +def is_enabled(setting_name : str, default_value : bool) -> bool: + _is_enabled = get_setting(setting_name, default=None) + if _is_enabled is None: return default_value + str_is_enabled = str(_is_enabled).upper() + return str_is_enabled in TRUE_VALUES + +DEFAULT_VALUE = False +ALLOW_EXPLICIT_ADD_DEVICE_TO_TOPOLOGY = is_enabled('ALLOW_EXPLICIT_ADD_DEVICE_TO_TOPOLOGY', DEFAULT_VALUE) +ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY = is_enabled('ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY', DEFAULT_VALUE) diff --git a/src/context/Dockerfile b/src/context/Dockerfile index 18a7fbc54788d70724716b3f0b5b532de3e7054b..b5c3cdb860c3a8a51b890ef201d2d14c4abda6a3 100644 --- a/src/context/Dockerfile +++ b/src/context/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/__init__.py b/src/context/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/context/__init__.py +++ b/src/context/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/client/ContextClient.py b/src/context/client/ContextClient.py index 13d9dc0035b45845bf11367e02c8830b5151c1d6..2776a0d294e9a9ee7b00e46bfd3fbb068133741f 100644 --- a/src/context/client/ContextClient.py +++ b/src/context/client/ContextClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,7 +26,9 @@ from common.proto.context_pb2 import ( Link, LinkEvent, LinkId, LinkIdList, LinkList, Service, ServiceEvent, ServiceFilter, ServiceId, ServiceIdList, ServiceList, Slice, SliceEvent, SliceFilter, SliceId, SliceIdList, SliceList, - Topology, TopologyDetails, TopologyEvent, TopologyId, TopologyIdList, TopologyList) + Topology, TopologyDetails, TopologyEvent, TopologyId, TopologyIdList, TopologyList, + OpticalConfig, OpticalConfigId, OpticalConfigList +) from common.proto.context_pb2_grpc import ContextServiceStub from common.proto.context_policy_pb2_grpc import ContextPolicyServiceStub from common.proto.policy_pb2 import PolicyRuleIdList, PolicyRuleId, PolicyRuleList, PolicyRule @@ -436,3 +438,26 @@ class ContextClient: response = self.policy_stub.RemovePolicyRule(request) LOGGER.debug('RemovePolicyRule result: {:s}'.format(grpc_message_to_json_string(response))) return response + + #//////////////// Experimental ////////////////// + + @RETRY_DECORATOR + def SetOpticalConfig(self, request : OpticalConfig) -> OpticalConfigId: + LOGGER.debug('SetOpticalConfig request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.SetOpticalConfig(request) + LOGGER.debug('SetOpticalConfig result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def GetOpticalConfig(self, request : Empty) -> OpticalConfigList: + LOGGER.debug('GetOpticalConfig request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.GetOpticalConfig(request) + LOGGER.debug('GetOpticalConfig result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def SelectOpticalConfig(self,request : OpticalConfigId) -> OpticalConfigList: + LOGGER.debug('SelectOpticalConfig request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.SelectOpticalConfig(request) + LOGGER.debug('SelectOpticalConfig result: {:s}'.format(grpc_message_to_json_string(response))) + return response diff --git a/src/context/client/EventsCollector.py b/src/context/client/EventsCollector.py index c661e0cab3ab4a550dfca84c9e112759c31b9c8c..9fb2fbd6901b6e91edad20bad316412f1ba1d6a7 100644 --- a/src/context/client/EventsCollector.py +++ b/src/context/client/EventsCollector.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/client/__init__.py b/src/context/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/context/client/__init__.py +++ b/src/context/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/data/cleanup_commands.sql b/src/context/data/cleanup_commands.sql index d72950276a5217612b866e8ba48a072d224c802d..506db2f34abdb71f55b56a5f2ff95c9fcde31eae 100644 --- a/src/context/data/cleanup_commands.sql +++ b/src/context/data/cleanup_commands.sql @@ -1,4 +1,4 @@ --- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. diff --git a/src/context/data/sql_hash_join_full_scan_tests.sql b/src/context/data/sql_hash_join_full_scan_tests.sql index ebead1be6cae62bce06ab9324c0381b9266eee9c..29ac593e2e7ba6df50ad0d94f40dd8da07db2e8f 100644 --- a/src/context/data/sql_hash_join_full_scan_tests.sql +++ b/src/context/data/sql_hash_join_full_scan_tests.sql @@ -1,3 +1,17 @@ +-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + -- When inserting config rules, for instance related to device -- If we insert few rules (3~4 rows), does a lookup join with more rows does hash join which is less performant... -- To be investigated... diff --git a/src/context/requirements.in b/src/context/requirements.in index 7ea6622fb43f409c76b3362b7a3986a7a0c31aa6..3800c30c75a05cdb0b681f646621331653225118 100644 --- a/src/context/requirements.in +++ b/src/context/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/ContextService.py b/src/context/service/ContextService.py index eeac981ea444155ec7b5d0635a764eb8851dc01c..0f77288ef70e2e20e50136a73f44a533a3820d61 100644 --- a/src/context/service/ContextService.py +++ b/src/context/service/ContextService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/ContextServiceServicerImpl.py b/src/context/service/ContextServiceServicerImpl.py index 93f078e75545c93a2cd312cf48e8f64cdeea87ac..be32372108e059625801d14c660d18cbe0df677f 100644 --- a/src/context/service/ContextServiceServicerImpl.py +++ b/src/context/service/ContextServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,9 @@ from common.proto.context_pb2 import ( Link, LinkEvent, LinkId, LinkIdList, LinkList, Service, ServiceEvent, ServiceFilter, ServiceId, ServiceIdList, ServiceList, Slice, SliceEvent, SliceFilter, SliceId, SliceIdList, SliceList, - Topology, TopologyDetails, TopologyEvent, TopologyId, TopologyIdList, TopologyList) + Topology, TopologyDetails, TopologyEvent, TopologyId, TopologyIdList, TopologyList, + OpticalConfigList, OpticalConfigId, OpticalConfig +) from common.proto.policy_pb2 import PolicyRuleIdList, PolicyRuleId, PolicyRuleList, PolicyRule from common.proto.context_pb2_grpc import ContextServiceServicer from common.proto.context_policy_pb2_grpc import ContextPolicyServiceServicer @@ -43,6 +45,7 @@ from .database.Slice import ( slice_delete, slice_get, slice_list_ids, slice_list_objs, slice_select, slice_set, slice_unset) from .database.Topology import ( topology_delete, topology_get, topology_get_details, topology_list_ids, topology_list_objs, topology_set) +from .database.OpticalConfig import set_opticalconfig, select_opticalconfig, get_opticalconfig LOGGER = logging.getLogger(__name__) @@ -127,7 +130,7 @@ class ContextServiceServicerImpl(ContextServiceServicer, ContextPolicyServiceSer return device_list_objs(self.db_engine) @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def GetDevice(self, request : ContextId, context : grpc.ServicerContext) -> Device: + def GetDevice(self, request : DeviceId, context : grpc.ServicerContext) -> Device: return device_get(self.db_engine, request) @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) @@ -296,3 +299,20 @@ class ContextServiceServicerImpl(ContextServiceServicer, ContextPolicyServiceSer @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def RemovePolicyRule(self, request : PolicyRuleId, context: grpc.ServicerContext) -> Empty: return policyrule_delete(self.db_engine, self.messagebroker, request) + + # ---------------------------- Experimental ------------------- + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetOpticalConfig(self, request : Empty, context : grpc.ServicerContext) -> OpticalConfigList: + result = get_opticalconfig(self.db_engine) + return OpticalConfigList(opticalconfigs=result) + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def SetOpticalConfig(self, request : OpticalConfig, context : grpc.ServicerContext) -> OpticalConfigId: + result = set_opticalconfig(self.db_engine, request) + return OpticalConfigId(**result) + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def SelectOpticalConfig(self, request : OpticalConfigId, context : grpc.ServicerContext) -> OpticalConfig: + result = select_opticalconfig(self.db_engine, request) + return OpticalConfig(config=result.config, opticalconfig_id=result.opticalconfig_id) diff --git a/src/context/service/__init__.py b/src/context/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/context/service/__init__.py +++ b/src/context/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/__main__.py b/src/context/service/__main__.py index 5ac91f233504a25bb787df5be9b1a36848f4e5c4..21d0bf26e6cc5d5ff3328550e0852f4237b18264 100644 --- a/src/context/service/__main__.py +++ b/src/context/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/Component.py b/src/context/service/database/Component.py index ae873855b1c01c80c101eb4e97e3bf7688619fae..f165a83d060114ce9915d07c8c4fc5be2b5ff881 100644 --- a/src/context/service/database/Component.py +++ b/src/context/service/database/Component.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/ConfigRule.py b/src/context/service/database/ConfigRule.py index c5b259a2dfc2ba684f6881dfb2a9a79b3a36032a..7d816b3e87803f71678511f4fadc6bbe7eba548e 100644 --- a/src/context/service/database/ConfigRule.py +++ b/src/context/service/database/ConfigRule.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/Connection.py b/src/context/service/database/Connection.py index 0a659f662c5ca4116211b7939afc3f5fe39b835c..2eaef31c563deddd3e914a118e66aac3c812d443 100644 --- a/src/context/service/database/Connection.py +++ b/src/context/service/database/Connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/Constraint.py b/src/context/service/database/Constraint.py index 79970eacde5f6a08a22287cc72f1d75a954f969c..db96ed9dece96cd5b77412c5d031e7337e360668 100644 --- a/src/context/service/database/Constraint.py +++ b/src/context/service/database/Constraint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/Context.py b/src/context/service/database/Context.py index 403dcd2320d0ce925a95e92331a634785cfa2289..a0de252aa0b6130294447d81a53a3b01071c610c 100644 --- a/src/context/service/database/Context.py +++ b/src/context/service/database/Context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/Device.py b/src/context/service/database/Device.py index 3aff20ade14532dcb7fbf8ec1033c084aaeead3c..beeae59c5967723f2cccfa365fca67dd3acd0096 100644 --- a/src/context/service/database/Device.py +++ b/src/context/service/database/Device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,9 @@ from typing import Dict, List, Optional, Set, Tuple from common.method_wrappers.ServiceExceptions import InvalidArgumentException, NotFoundException from common.message_broker.MessageBroker import MessageBroker from common.proto.context_pb2 import ( - Device, DeviceFilter, DeviceId, DeviceIdList, DeviceList, Empty, EventTypeEnum, TopologyId) + Device, DeviceDriverEnum, DeviceFilter, DeviceId, DeviceIdList, DeviceList, + Empty, EventTypeEnum, TopologyId +) from common.tools.grpc.Tools import grpc_message_to_json_string from common.tools.object_factory.Device import json_device_id from context.service.database.uuids.Topology import topology_get_uuid @@ -103,10 +105,12 @@ def device_set(db_engine : Engine, messagebroker : MessageBroker, request : Devi }) topology_uuids.add(topology_uuid) + is_oc_driver = DeviceDriverEnum.DEVICEDRIVER_OC in set(request.device_drivers) + endpoints_data : List[Dict] = list() for i, endpoint in enumerate(request.device_endpoints): endpoint_device_uuid = endpoint.endpoint_id.device_id.device_uuid.uuid - if len(endpoint_device_uuid) == 0: endpoint_device_uuid = device_uuid + if len(endpoint_device_uuid) == 0 or is_oc_driver : endpoint_device_uuid = device_uuid if endpoint_device_uuid not in {raw_device_uuid, device_uuid}: raise InvalidArgumentException( 'request.device_endpoints[{:d}].device_id.device_uuid.uuid'.format(i), endpoint_device_uuid, @@ -199,15 +203,15 @@ def device_set(db_engine : Engine, messagebroker : MessageBroker, request : Devi stmt = stmt.returning(TopologyDeviceModel.topology_uuid) topology_uuids = session.execute(stmt).fetchall() - LOGGER.warning('RAW topology_uuids={:s}'.format(str(topology_uuids))) + #LOGGER.warning('RAW topology_uuids={:s}'.format(str(topology_uuids))) if len(topology_uuids) > 0: topology_uuids = [topology_uuid[0] for topology_uuid in topology_uuids] - LOGGER.warning('NEW topology_uuids={:s}'.format(str(topology_uuids))) + #LOGGER.warning('NEW topology_uuids={:s}'.format(str(topology_uuids))) query = session.query(TopologyModel) query = query.filter(TopologyModel.topology_uuid.in_(topology_uuids)) device_topologies : List[TopologyModel] = query.all() device_topology_ids = [obj.dump_id() for obj in device_topologies] - LOGGER.warning('device_topology_ids={:s}'.format(str(device_topology_ids))) + #LOGGER.warning('device_topology_ids={:s}'.format(str(device_topology_ids))) updated_components = False @@ -229,7 +233,7 @@ def device_set(db_engine : Engine, messagebroker : MessageBroker, request : Devi changed_config_rules = upsert_config_rules(session, config_rules, device_uuid=device_uuid) - return updated or updated_endpoints or changed_config_rules, device_topology_ids + return updated or updated_endpoints or updated_components or changed_config_rules, device_topology_ids updated, device_topology_ids = run_transaction(sessionmaker(bind=db_engine), callback) device_id = json_device_id(device_uuid) @@ -302,4 +306,4 @@ def device_select(db_engine : Engine, request : DeviceFilter) -> DeviceList: 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) \ No newline at end of file + return DeviceList(devices=devices) diff --git a/src/context/service/database/EndPoint.py b/src/context/service/database/EndPoint.py index d7445b951dbd2d846900c21799e2fc03164ae6c5..48a8cf334c3967d5b84e8da70c9fbd99ca213d68 100644 --- a/src/context/service/database/EndPoint.py +++ b/src/context/service/database/EndPoint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/Engine.py b/src/context/service/database/Engine.py index 5924329900dda78d7a15ce7eebc6cbc69e954f8f..ec86618218cc396dea31404b88d33e46d320ed58 100644 --- a/src/context/service/database/Engine.py +++ b/src/context/service/database/Engine.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/Events.py b/src/context/service/database/Events.py index 36774a5170ba20914555b0adc47a5c2faa592799..a88a4656a8cf078d2b90fe3a0c0ea22a4ec15a75 100644 --- a/src/context/service/database/Events.py +++ b/src/context/service/database/Events.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/Link.py b/src/context/service/database/Link.py index 4ca3cee68e45cc9b5a8f4e0d9f1b07a3ec39f268..8aa2563e4b3bb5b46ffdefe4644cdfe321f1e734 100644 --- a/src/context/service/database/Link.py +++ b/src/context/service/database/Link.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -102,14 +102,17 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) total_capacity_gbps, used_capacity_gbps = None, None if request.HasField('attributes'): attributes = request.attributes + # In proto3, HasField() does not work for scalar fields, using ListFields() instead. attribute_names = set([field.name for field,_ in attributes.ListFields()]) + if 'total_capacity_gbps' in attribute_names: total_capacity_gbps = attributes.total_capacity_gbps + if 'used_capacity_gbps' in attribute_names: used_capacity_gbps = attributes.used_capacity_gbps - elif total_capacity_gbps is not None: - used_capacity_gbps = total_capacity_gbps + else: + used_capacity_gbps = 0.0 link_data = [{ 'link_uuid' : link_uuid, @@ -156,15 +159,15 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) stmt = stmt.returning(TopologyLinkModel.topology_uuid) topology_uuids = session.execute(stmt).fetchall() - LOGGER.warning('RAW topology_uuids={:s}'.format(str(topology_uuids))) + #LOGGER.warning('RAW topology_uuids={:s}'.format(str(topology_uuids))) if len(topology_uuids) > 0: topology_uuids = [topology_uuid[0] for topology_uuid in topology_uuids] - LOGGER.warning('NEW topology_uuids={:s}'.format(str(topology_uuids))) + #LOGGER.warning('NEW topology_uuids={:s}'.format(str(topology_uuids))) query = session.query(TopologyModel) query = query.filter(TopologyModel.topology_uuid.in_(topology_uuids)) link_topologies : List[TopologyModel] = query.all() link_topology_ids = [obj.dump_id() for obj in link_topologies] - LOGGER.warning('link_topology_ids={:s}'.format(str(link_topology_ids))) + #LOGGER.warning('link_topology_ids={:s}'.format(str(link_topology_ids))) return updated or updated_endpoints, link_topology_ids diff --git a/src/context/service/database/OpticalConfig.py b/src/context/service/database/OpticalConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..663c3bd0b16ac8af20cb1acf9176764d719b3046 --- /dev/null +++ b/src/context/service/database/OpticalConfig.py @@ -0,0 +1,88 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, 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 common.proto.context_pb2 import OpticalConfig, OpticalConfigId +from .models.OpticalConfigModel import OpticalConfigModel + +LOGGER = logging.getLogger(__name__) + +def get_opticalconfig(db_engine : Engine): + def callback(session:Session): + optical_configs = list() + results = session.query(OpticalConfigModel).all() + for obj in results: + optical_config = OpticalConfig() + optical_config.config = json.dump(obj.config) + optical_config.opticalconfig_id.opticalconfig_uuid = obj.opticalconfig_uuid + optical_configs.append(optical_config) + return optical_configs + obj = run_transaction(sessionmaker(bind=db_engine), callback) + return obj + +def set_opticalconfig(db_engine : Engine, request : OpticalConfig): + opticalconfig_id = OpticalConfigId() + opticalconfig_id.opticalconfig_uuid = request.opticalconfig_id.opticalconfig_uuid + my_config_data = [] + if request.config: + channels = [] + transceivers = [] + config = json.loads(request.config) + if 'channels' in config and len(config['channels']) > 0: + channels = [channel['name']['index'] for channel in config['channels']] + if 'transceivers' in config and len(config['transceivers']['transceiver']) > 0: + transceivers = [transceiver for transceiver in config['transceivers']['transceiver']] + + my_config_data = [ + { + "opticalconfig_uuid": request.opticalconfig_id.opticalconfig_uuid, + "channels" : channels, + "transcievers" : transceivers, + "interfaces" : json.dumps(config["interfaces"]["interface"]), + "channel_namespace" : config["channel_namespace"], + "endpoints" : [json.dumps(endpoint) for endpoint in config["endpoints"]], + "frequency" : config["frequency"] if "frequency" in config else 0, + "operational_mode" : config["operational_mode"] if "operational_mode" in config else 0, + "output_power" : config["output_power"] if "output_power" in config else '', + } + ] + + def callback(session:Session)->bool: + stmt = insert(OpticalConfigModel).values(my_config_data) + stmt = stmt.on_conflict_do_update( + index_elements=[OpticalConfigModel.opticalconfig_uuid], + set_=dict( + channel_namespace=stmt.excluded.channel_namespace + ) + ) + stmt = stmt.returning(OpticalConfigModel.opticalconfig_uuid) + id = session.execute(stmt).fetchone() + opticalconfig_id = run_transaction(sessionmaker(bind=db_engine), callback) + return {'opticalconfig_uuid': opticalconfig_id} + +def select_opticalconfig(db_engine:Engine,request:OpticalConfigId): + def callback(session : Session) -> OpticalConfig: + result = OpticalConfig() + stmt = session.query(OpticalConfigModel) + stmt = stmt.filter_by(opticalconfig_uuid=request.opticalconfig_uuid) + obj = stmt.first() + if obj is not None: + result.config = json.dumps(obj.dump()) + result.opticalconfig_id.opticalconfig_uuid = obj.opticalconfig_uuid + return result + return run_transaction(sessionmaker(bind=db_engine, expire_on_commit=False), callback) diff --git a/src/context/service/database/PolicyRule.py b/src/context/service/database/PolicyRule.py index 3db0696a49cd851608d34797ce138ea0e63a1c51..46322188079bfd8e55514f23a02e6b9d71f36e10 100644 --- a/src/context/service/database/PolicyRule.py +++ b/src/context/service/database/PolicyRule.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/Service.py b/src/context/service/database/Service.py index fc196ddded291aa82c8f9df932c15611d13121e4..ba042fe8fd079172df66526732edbea660d2d9fa 100644 --- a/src/context/service/database/Service.py +++ b/src/context/service/database/Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,9 @@ from sqlalchemy.orm import Session, selectinload, sessionmaker from sqlalchemy_cockroachdb import run_transaction from typing import Dict, List, Optional, Set from common.proto.context_pb2 import ( - ContextId, Empty, EventTypeEnum, Service, ServiceFilter, ServiceId, ServiceIdList, ServiceList) + ContextId, Empty, EventTypeEnum, Service, ServiceFilter, ServiceId, ServiceIdList, + ServiceList, ServiceTypeEnum +) from common.message_broker.MessageBroker import MessageBroker from common.method_wrappers.ServiceExceptions import InvalidArgumentException, NotFoundException from common.tools.object_factory.Context import json_context_id @@ -84,6 +86,9 @@ def service_set(db_engine : Engine, messagebroker : MessageBroker, request : Ser context_uuid,service_uuid = service_get_uuid(request.service_id, service_name=service_name, allow_random=True) service_type = grpc_to_enum__service_type(request.service_type) + if service_type is None and request.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + service_type = "OPTICAL_CONNECTIVITY" + service_status = grpc_to_enum__service_status(request.service_status.service_status) now = datetime.datetime.utcnow() diff --git a/src/context/service/database/Slice.py b/src/context/service/database/Slice.py index 98a5ef7a8dd5d6f489c11bc2798ea16fc5b9c128..95116313dd6ec6db0853850ba5ecff15f6753a31 100644 --- a/src/context/service/database/Slice.py +++ b/src/context/service/database/Slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/Topology.py b/src/context/service/database/Topology.py index 1f0fb6c0b3c400d58ea83bc857e97bc50a1324a3..e1c59ea118915e2ad0d69d4b8cacf59c354b8297 100644 --- a/src/context/service/database/Topology.py +++ b/src/context/service/database/Topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,17 +17,20 @@ from sqlalchemy.dialects.postgresql import insert from sqlalchemy.engine import Engine from sqlalchemy.orm import Session, selectinload, sessionmaker from sqlalchemy_cockroachdb import run_transaction -from typing import Dict, List, Optional +from typing import Dict, List, Optional, Set from common.proto.context_pb2 import ( ContextId, Empty, EventTypeEnum, Topology, TopologyDetails, TopologyId, TopologyIdList, TopologyList) from common.message_broker.MessageBroker import MessageBroker from common.method_wrappers.ServiceExceptions import NotFoundException from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.Topology import json_topology_id +from context.Config import ALLOW_EXPLICIT_ADD_DEVICE_TO_TOPOLOGY, ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY from .models.DeviceModel import DeviceModel from .models.LinkModel import LinkModel from .models.TopologyModel import TopologyDeviceModel, TopologyLinkModel, TopologyModel from .uuids.Context import context_get_uuid +from .uuids.Device import device_get_uuid +from .uuids.Link import link_get_uuid from .uuids.Topology import topology_get_uuid from .Events import notify_event_context, notify_event_topology @@ -94,15 +97,40 @@ def topology_set(db_engine : Engine, messagebroker : MessageBroker, request : To if len(topology_name) == 0: topology_name = request.topology_id.topology_uuid.uuid context_uuid,topology_uuid = topology_get_uuid(request.topology_id, topology_name=topology_name, allow_random=True) - # Ignore request.device_ids and request.link_ids. They are used for retrieving devices and links added into the - # topology. Explicit addition into the topology is done automatically when creating the devices and links, based - # on the topologies specified in the endpoints associated with the devices and links. + # By default, ignore request.device_ids and request.link_ids. They are used for retrieving + # devices and links added into the topology. Explicit addition into the topology is done + # automatically when creating the devices and links, based on the topologies specified in + # the endpoints associated with the devices and links. + # In some cases, it might be needed to add them explicitly; to allow that, activate flags + # ALLOW_EXPLICIT_ADD_DEVICE_TO_TOPOLOGY and/or ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY. - if len(request.device_ids) > 0: # pragma: no cover - LOGGER.warning('Items in field "device_ids" ignored. This field is used for retrieval purposes only.') + related_devices : List[Dict] = list() + if ALLOW_EXPLICIT_ADD_DEVICE_TO_TOPOLOGY: + device_uuids : Set[str] = set() + for device_id in request.device_ids: + device_uuid = device_get_uuid(device_id) + if device_uuid not in device_uuids: continue + related_devices.append({'topology_uuid': topology_uuid, 'device_uuid': device_uuid}) + device_uuids.add(device_uuid) + else: + if len(request.device_ids) > 0: # pragma: no cover + MSG = 'ALLOW_EXPLICIT_ADD_DEVICE_TO_TOPOLOGY={:s}; '.format(str(ALLOW_EXPLICIT_ADD_DEVICE_TO_TOPOLOGY)) + MSG += 'Items in field "device_ids" ignored. This field is used for retrieval purposes only.' + LOGGER.warning(MSG) - if len(request.link_ids) > 0: # pragma: no cover - LOGGER.warning('Items in field "link_ids" ignored. This field is used for retrieval purposes only.') + related_links : List[Dict] = list() + if ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY: + link_uuids : Set[str] = set() + for link_id in request.link_ids: + link_uuid = link_get_uuid(link_id) + if link_uuid not in link_uuids: continue + related_links.append({'topology_uuid': topology_uuid, 'link_uuid': link_uuid}) + link_uuids.add(link_uuid) + else: + if len(request.link_ids) > 0: # pragma: no cover + MSG = 'ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY={:s}; '.format(str(ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY)) + MSG += 'Items in field "link_ids" ignored. This field is used for retrieval purposes only.' + LOGGER.warning(MSG) now = datetime.datetime.utcnow() topology_data = [{ @@ -124,7 +152,28 @@ def topology_set(db_engine : Engine, messagebroker : MessageBroker, request : To ) stmt = stmt.returning(TopologyModel.created_at, TopologyModel.updated_at) created_at,updated_at = session.execute(stmt).fetchone() - return updated_at > created_at + + updated = updated_at > created_at + + updated_topology_device = False + if len(related_devices) > 0: + stmt = insert(TopologyDeviceModel).values(related_devices) + stmt = stmt.on_conflict_do_nothing( + index_elements=[TopologyDeviceModel.topology_uuid, TopologyDeviceModel.device_uuid] + ) + topology_device_inserts = session.execute(stmt) + updated_topology_device = int(topology_device_inserts.rowcount) > 0 + + updated_topology_link = False + if len(related_links) > 0: + stmt = insert(TopologyLinkModel).values(related_links) + stmt = stmt.on_conflict_do_nothing( + index_elements=[TopologyLinkModel.topology_uuid, TopologyLinkModel.link_uuid] + ) + topology_link_inserts = session.execute(stmt) + updated_topology_link = int(topology_link_inserts.rowcount) > 0 + + return updated or updated_topology_device or updated_topology_link updated = run_transaction(sessionmaker(bind=db_engine), callback) context_id = json_context_id(context_uuid) diff --git a/src/context/service/database/__init__.py b/src/context/service/database/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/context/service/database/__init__.py +++ b/src/context/service/database/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/ComponentModel.py b/src/context/service/database/models/ComponentModel.py index c9acfaeabe95c55fc464732d54459d99f9b5b054..937d37e22e86d8034c9e33f137ae8a781f553b67 100644 --- a/src/context/service/database/models/ComponentModel.py +++ b/src/context/service/database/models/ComponentModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/ConfigRuleModel.py b/src/context/service/database/models/ConfigRuleModel.py index 5d14b62a83b71d7a146f74e649435ed941dad6d3..f57c90b82b950e68103e1381c6ff0b118e6307df 100644 --- a/src/context/service/database/models/ConfigRuleModel.py +++ b/src/context/service/database/models/ConfigRuleModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/ConnectionModel.py b/src/context/service/database/models/ConnectionModel.py index f71d4177893d146af2f413781b51930c9909d827..1659a55468285b76b5915e2c41e0332b6d82e257 100644 --- a/src/context/service/database/models/ConnectionModel.py +++ b/src/context/service/database/models/ConnectionModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/ConstraintModel.py b/src/context/service/database/models/ConstraintModel.py index 112a5f35c8d23f4b4b84f5472c14dc3b1bc7fbec..fc56a1145983776f1604a8cc6a6b36cbd12370b3 100644 --- a/src/context/service/database/models/ConstraintModel.py +++ b/src/context/service/database/models/ConstraintModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/ContextModel.py b/src/context/service/database/models/ContextModel.py index 25f8a37c4539486779e161c33de973767c621237..89d186e0e7c6f5225bdaf32c4318b0ba8b641092 100644 --- a/src/context/service/database/models/ContextModel.py +++ b/src/context/service/database/models/ContextModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/DeviceModel.py b/src/context/service/database/models/DeviceModel.py index 376dc98c4053f68c511a8c717117d58d9eda1cca..2aeb90dfdeaa57ba96ff9c9ed095f363c5f8f0fb 100644 --- a/src/context/service/database/models/DeviceModel.py +++ b/src/context/service/database/models/DeviceModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/EndPointModel.py b/src/context/service/database/models/EndPointModel.py index 9bb2adb2d4209bde8cee4299d10521887f371428..6355f14af453b3695bb688285aa19c8641aac4c0 100644 --- a/src/context/service/database/models/EndPointModel.py +++ b/src/context/service/database/models/EndPointModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/LinkModel.py b/src/context/service/database/models/LinkModel.py index d91666652e6b7e506b9718903d0fb095b4ea69c4..cece4cc163516bfaa4af46a9450410ff0875e966 100644 --- a/src/context/service/database/models/LinkModel.py +++ b/src/context/service/database/models/LinkModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/OpticalConfigModel.py b/src/context/service/database/models/OpticalConfigModel.py new file mode 100644 index 0000000000000000000000000000000000000000..d7274da17070e0f21774d8173abcfad12e1dcae7 --- /dev/null +++ b/src/context/service/database/models/OpticalConfigModel.py @@ -0,0 +1,42 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json +from sqlalchemy import Column, String, Integer +from sqlalchemy.dialects.postgresql import ARRAY +from ._Base import _Base + +class OpticalConfigModel(_Base): + __tablename__ = 'optical_config' + opticalconfig_uuid = Column(String, primary_key=True) + channels = Column(ARRAY(String), nullable=True) + transcievers = Column(ARRAY(String), nullable=True) + interfaces = Column(String, nullable=True) + channel_namespace = Column(String, nullable=True) + endpoints = Column(ARRAY(String), nullable=True) + frequency = Column(Integer, nullable=True) + operational_mode = Column(Integer, nullable=True) + output_power = Column(String, nullable=True) + + def dump(self): + return { + "channels" : [{'name': {'index': channel}} for channel in self.channels], + "transceivers" : {"transceiver": [transciever for transciever in self.transcievers]}, + "interfaces" : {"interface": json.loads(self.interfaces)}, + "channel_namespace" : self.channel_namespace, + "endpoints" : [json.loads(endpoint) for endpoint in self.endpoints], + "frequency" : self.frequency, + "output_power" : self.output_power, + "operational_mode" : self.operational_mode, + } diff --git a/src/context/service/database/models/PolicyRuleModel.py b/src/context/service/database/models/PolicyRuleModel.py index 32364e289cf68fe760c60eb27cde933f7cf448a4..d54bfec1ad69ad740bb8308f21559f3c0d01fbe4 100644 --- a/src/context/service/database/models/PolicyRuleModel.py +++ b/src/context/service/database/models/PolicyRuleModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/ServiceModel.py b/src/context/service/database/models/ServiceModel.py index 2895a7ce9ddfeefd025a9397040a01423c9682a4..6ac287205d33b7a3b3336b1d6f388caff80598fd 100644 --- a/src/context/service/database/models/ServiceModel.py +++ b/src/context/service/database/models/ServiceModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/SliceModel.py b/src/context/service/database/models/SliceModel.py index d3befa66b4c7ecba4a28fefa745a7c2214f37caf..d952fec92ed83fc5077b5f511badc75c8840c3f5 100644 --- a/src/context/service/database/models/SliceModel.py +++ b/src/context/service/database/models/SliceModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/TopologyModel.py b/src/context/service/database/models/TopologyModel.py index 68d97edf36ee42c04948cc6782b86bce028cb76a..995abab3a40bfacb446360c55c784b0a5f4207ec 100644 --- a/src/context/service/database/models/TopologyModel.py +++ b/src/context/service/database/models/TopologyModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/_Base.py b/src/context/service/database/models/_Base.py index 52eb6b088210b8edc8d121221458ae11ece484a5..d73dda442ba1c3936370f1fa392f304a161080ff 100644 --- a/src/context/service/database/models/_Base.py +++ b/src/context/service/database/models/_Base.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/__init__.py b/src/context/service/database/models/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/context/service/database/models/__init__.py +++ b/src/context/service/database/models/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/enums/ConfigAction.py b/src/context/service/database/models/enums/ConfigAction.py index 526024a1fedf3331ca45e3cb517ff9d58ce28c25..3e06fc408e05f78d165670964b24a3e89e7b7b7e 100644 --- a/src/context/service/database/models/enums/ConfigAction.py +++ b/src/context/service/database/models/enums/ConfigAction.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/enums/ConstraintAction.py b/src/context/service/database/models/enums/ConstraintAction.py index 2a53b8e1c5e97e48cbda9648c8473313bce6f4cd..efb1f12a221ae2c1599e514831240e823c9164d3 100644 --- a/src/context/service/database/models/enums/ConstraintAction.py +++ b/src/context/service/database/models/enums/ConstraintAction.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/enums/DeviceDriver.py b/src/context/service/database/models/enums/DeviceDriver.py index 66635decc5369c8b7601863da85f497626d70ac8..06d73177036d8bfe8b6f72d6c97b03f78aaf7531 100644 --- a/src/context/service/database/models/enums/DeviceDriver.py +++ b/src/context/service/database/models/enums/DeviceDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,6 +31,9 @@ class ORM_DeviceDriverEnum(enum.Enum): XR = DeviceDriverEnum.DEVICEDRIVER_XR IETF_L2VPN = DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN GNMI_OPENCONFIG = DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG + OPTICAL_TFS = DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS + IETF_ACTN = DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN + OC = DeviceDriverEnum.DEVICEDRIVER_OC grpc_to_enum__device_driver = functools.partial( grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum) diff --git a/src/context/service/database/models/enums/DeviceOperationalStatus.py b/src/context/service/database/models/enums/DeviceOperationalStatus.py index 9e98869dce025e51c20ff0aca0dcd78a9ab57fe1..3e1fd531d82b25719fffe1c9f9954ac6de692daa 100644 --- a/src/context/service/database/models/enums/DeviceOperationalStatus.py +++ b/src/context/service/database/models/enums/DeviceOperationalStatus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/enums/KpiSampleType.py b/src/context/service/database/models/enums/KpiSampleType.py index a229b5698ecc393afced41f885bf4c88ede4543f..7600c0fb575baefd765f607649bc99d99e1b2388 100644 --- a/src/context/service/database/models/enums/KpiSampleType.py +++ b/src/context/service/database/models/enums/KpiSampleType.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/enums/PolicyRuleState.py b/src/context/service/database/models/enums/PolicyRuleState.py index e16ee01e36b5e2ec2ad8e07f7cb6201ee091e76f..6905dd3b657bfee2f678e0dac82622e355b4b95c 100644 --- a/src/context/service/database/models/enums/PolicyRuleState.py +++ b/src/context/service/database/models/enums/PolicyRuleState.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/enums/ServiceStatus.py b/src/context/service/database/models/enums/ServiceStatus.py index ae0ad55bcfe327b981881bcd304124c9bb6576ab..04d55a06527bc8bb299119df448131134b46b7fd 100644 --- a/src/context/service/database/models/enums/ServiceStatus.py +++ b/src/context/service/database/models/enums/ServiceStatus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/enums/ServiceType.py b/src/context/service/database/models/enums/ServiceType.py index 0ed1938a7ca1e566bea815d9ce936150bb91d9dc..62d5380b56803b3cc21dd1456292ec9df470cb15 100644 --- a/src/context/service/database/models/enums/ServiceType.py +++ b/src/context/service/database/models/enums/ServiceType.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -27,6 +27,8 @@ class ORM_ServiceTypeEnum(enum.Enum): L2NM = ServiceTypeEnum.SERVICETYPE_L2NM TAPI_CONNECTIVITY_SERVICE = ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE TE = ServiceTypeEnum.SERVICETYPE_TE + E2E = ServiceTypeEnum.SERVICETYPE_E2E + OPTICAL_CONNECTIVITY = ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY grpc_to_enum__service_type = functools.partial( grpc_to_enum, ServiceTypeEnum, ORM_ServiceTypeEnum) diff --git a/src/context/service/database/models/enums/SliceStatus.py b/src/context/service/database/models/enums/SliceStatus.py index 32ef0cc4a3d65aa96346b038534ca65bc3e4f95c..deb3337de91fd13fb8f87208d3911f9b613c0c1d 100644 --- a/src/context/service/database/models/enums/SliceStatus.py +++ b/src/context/service/database/models/enums/SliceStatus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/models/enums/_GrpcToEnum.py b/src/context/service/database/models/enums/_GrpcToEnum.py index 0cde8ac5eebdb724d749b63663f30afd02435884..27410f900af1df6e54571cc21f14db08cb959f50 100644 --- a/src/context/service/database/models/enums/_GrpcToEnum.py +++ b/src/context/service/database/models/enums/_GrpcToEnum.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,16 +14,21 @@ import re from enum import Enum -from typing import Optional +from typing import Any, Optional # Enumeration classes are redundant with gRPC classes, but gRPC does not provide a programmatical method to retrieve # the values it expects from strings containing the desired value symbol or its integer value, so a kind of mapping is # required. Besides, ORM Models expect Enum classes in EnumeratedFields; we create specific and conveniently defined # Enum classes to serve both purposes. -def grpc_to_enum(grpc_enum_class, orm_enum_class : Enum, grpc_enum_value, grpc_enum_prefix : Optional[str] = None): +def grpc_to_enum( + grpc_enum_class, orm_enum_class : Enum, grpc_enum_value, grpc_enum_prefix : Optional[str] = None, + fail_if_not_found : bool = False +) -> Optional[Any]: enum_name = grpc_enum_class.Name(grpc_enum_value) + _orig_enum_name = enum_name + _orig_grpc_enum_prefix = grpc_enum_prefix if grpc_enum_prefix is None: grpc_enum_prefix = orm_enum_class.__name__.upper() #grpc_enum_prefix = re.sub(r'^ORM_(.+)$', r'\1', grpc_enum_prefix) @@ -35,4 +40,7 @@ def grpc_to_enum(grpc_enum_class, orm_enum_class : Enum, grpc_enum_value, grpc_e enum_name = enum_name.replace(grpc_enum_prefix, '') orm_enum_value = orm_enum_class._member_map_.get(enum_name) + if orm_enum_value is None and fail_if_not_found: + MSG = 'Unable to map gRPC Enum Value ({:s} / {:s}) to ORM Enum Value; grpc_enum_prefix={:s}' + raise Exception(MSG.format(str(grpc_enum_value), str(_orig_enum_name), str(_orig_grpc_enum_prefix))) return orm_enum_value diff --git a/src/context/service/database/models/enums/__init__.py b/src/context/service/database/models/enums/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/context/service/database/models/enums/__init__.py +++ b/src/context/service/database/models/enums/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/tools/FastHasher.py b/src/context/service/database/tools/FastHasher.py index 167f36dba42eaf9d7c607d816732ef5a8ef61c50..63e5d8682e0f05f282600bf228a865fa54c91ce5 100644 --- a/src/context/service/database/tools/FastHasher.py +++ b/src/context/service/database/tools/FastHasher.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/tools/__init__.py b/src/context/service/database/tools/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/context/service/database/tools/__init__.py +++ b/src/context/service/database/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/uuids/Connection.py b/src/context/service/database/uuids/Connection.py index 1ecced6b40dbda96e447859331f666e98d4528c9..83187c6432a5d3144d646a91e4a27d3a4328ef3d 100644 --- a/src/context/service/database/uuids/Connection.py +++ b/src/context/service/database/uuids/Connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/uuids/Context.py b/src/context/service/database/uuids/Context.py index a452415745ec702aa3319a25f51ee7b9ab5b7a4b..6af02de9af720c466206f87acb0e29b966a2f7b6 100644 --- a/src/context/service/database/uuids/Context.py +++ b/src/context/service/database/uuids/Context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/uuids/Device.py b/src/context/service/database/uuids/Device.py index bea1d888d0d18450fa53512661afcd9174f17754..5f67e63f5a970af4ea0427c55c1dc2f42c8e7892 100644 --- a/src/context/service/database/uuids/Device.py +++ b/src/context/service/database/uuids/Device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/uuids/EndPoint.py b/src/context/service/database/uuids/EndPoint.py index bf5f30ec36bf4b9fb176c777522451f1c6300b6b..b8c97a1bbe584d927d8d5bab0ef9036794f3e9a8 100644 --- a/src/context/service/database/uuids/EndPoint.py +++ b/src/context/service/database/uuids/EndPoint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/uuids/Link.py b/src/context/service/database/uuids/Link.py index 77babc7d902cdce6dd1b734f53d404831a0fd7ab..56d7791b54b435dcea94355e7f69d577a047f78f 100644 --- a/src/context/service/database/uuids/Link.py +++ b/src/context/service/database/uuids/Link.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/uuids/PolicuRule.py b/src/context/service/database/uuids/PolicuRule.py index e020d5697165edffd35555029d5407baf79b1329..459f0d367f540a8b2ac5b3dc9c443742ecb8508b 100644 --- a/src/context/service/database/uuids/PolicuRule.py +++ b/src/context/service/database/uuids/PolicuRule.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/uuids/Service.py b/src/context/service/database/uuids/Service.py index bbddc08eabcc1a11464a737b3b84353e81482310..108e2e9007e603267abec279db108149f85591a3 100644 --- a/src/context/service/database/uuids/Service.py +++ b/src/context/service/database/uuids/Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/uuids/Slice.py b/src/context/service/database/uuids/Slice.py index bbe36a906c638129a3556c73fda00e968f66aa11..673a3415139892d34595df06fda45988ad162665 100644 --- a/src/context/service/database/uuids/Slice.py +++ b/src/context/service/database/uuids/Slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/uuids/Topology.py b/src/context/service/database/uuids/Topology.py index c17485eff14373afd5827e8bed4bc27f2b854b3d..ae6859f6ccd6c669632edc75805b4dbada3ee6c3 100644 --- a/src/context/service/database/uuids/Topology.py +++ b/src/context/service/database/uuids/Topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/uuids/_Builder.py b/src/context/service/database/uuids/_Builder.py index 75fe51bc060f57e68db6b3b0b00ca647c3b61bc7..39c98de69d577ce2722693e57c4ee678124f9e30 100644 --- a/src/context/service/database/uuids/_Builder.py +++ b/src/context/service/database/uuids/_Builder.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/service/database/uuids/__init__.py b/src/context/service/database/uuids/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/context/service/database/uuids/__init__.py +++ b/src/context/service/database/uuids/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/tests/Constants.py b/src/context/tests/Constants.py index 470a724458795f04cf38353e4a124552e1c36a10..44c193fe70bde66ae0017d407fb1c5eb1ff2845f 100644 --- a/src/context/tests/Constants.py +++ b/src/context/tests/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/tests/Objects.py b/src/context/tests/Objects.py index 785a50e1934269150381a1d6d3b08001574a0cee..3d8db065bec0fffec432bde7c3d5e317e6628114 100644 --- a/src/context/tests/Objects.py +++ b/src/context/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/tests/__init__.py b/src/context/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/context/tests/__init__.py +++ b/src/context/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/tests/conftest.py b/src/context/tests/conftest.py index 0f00820768523b315a3134b746b8ca4d35213da5..905c87c3179aec400e35d12c4d0c5ddbcc21529f 100644 --- a/src/context/tests/conftest.py +++ b/src/context/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/tests/test_connection.py b/src/context/tests/test_connection.py index 92a4db23cd514268409453c48eb4506f51c6e5a8..841f0cb35529d924ed239a538d7ac303b12de9ab 100644 --- a/src/context/tests/test_connection.py +++ b/src/context/tests/test_connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/tests/test_context.py b/src/context/tests/test_context.py index 552eb7853d80ff78b1264d1c175a70200e1657e9..b1392a810a635212c0c1d6b34696b3ed24300e44 100644 --- a/src/context/tests/test_context.py +++ b/src/context/tests/test_context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/tests/test_device.py b/src/context/tests/test_device.py index ee9e743d781471d378c9824dd27686cfbff4a98c..9f53be52bb8553572304b7a08928ec9e0e5ad3a6 100644 --- a/src/context/tests/test_device.py +++ b/src/context/tests/test_device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/tests/test_hasher.py b/src/context/tests/test_hasher.py index 3eab3198c9b1bfac02e210f4c9b36c974bda02b7..8e8fe92e2592dd7b02cc82b1f52384ae2a3b26c4 100644 --- a/src/context/tests/test_hasher.py +++ b/src/context/tests/test_hasher.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/tests/test_link.py b/src/context/tests/test_link.py index 8b07f0230cc12add4ab0f2db78f3663cb021ca3a..49112a993ac6f651e6cd93517b317171bed13f9c 100644 --- a/src/context/tests/test_link.py +++ b/src/context/tests/test_link.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -100,8 +100,13 @@ def test_link(context_client : ContextClient) -> None: attribute_names = set([field.name for field,_ in response.attributes.ListFields()]) assert 'total_capacity_gbps' in attribute_names assert abs(response.attributes.total_capacity_gbps - 100) < 1.e-12 - assert 'used_capacity_gbps' in attribute_names - assert abs(response.attributes.used_capacity_gbps - response.attributes.total_capacity_gbps) < 1.e-12 + assert ( + ('used_capacity_gbps' not in attribute_names) or ( + ('used_capacity_gbps' in attribute_names) and ( + abs(response.attributes.used_capacity_gbps - response.attributes.total_capacity_gbps) < 1.e-12 + ) + ) + ) # ----- List when the object exists -------------------------------------------------------------------------------- response = context_client.ListLinkIds(Empty()) diff --git a/src/context/tests/test_policy.py b/src/context/tests/test_policy.py index 42289b484a92feac677d4ee0fb5f0aa203de2f15..aa257b97272daab04faefb4b7b4a392e0a29b534 100644 --- a/src/context/tests/test_policy.py +++ b/src/context/tests/test_policy.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/tests/test_service.py b/src/context/tests/test_service.py index ac6db33a7f3ed0c0ee634ac7635762d1f74d6519..290ec31a2f8639c73297d893fb1a144b6a06d5c3 100644 --- a/src/context/tests/test_service.py +++ b/src/context/tests/test_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/tests/test_slice.py b/src/context/tests/test_slice.py index ea52fa487e19fcdd8f8787ce27fc186d888c2cb6..a38d8ff4e3db38850eed9254ca955405910bd57e 100644 --- a/src/context/tests/test_slice.py +++ b/src/context/tests/test_slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/context/tests/test_topology.py b/src/context/tests/test_topology.py index 8785cabde76b75ee9f2f43b361d696b99ab26d7c..de5c593f4735c5fcca3ea0c242ab4d3d86f849a9 100644 --- a/src/context/tests/test_topology.py +++ b/src/context/tests/test_topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dbscanserving/.gitlab-ci.yml b/src/dbscanserving/.gitlab-ci.yml index d665bdaf2993bc578024cfc7ef8517ae44ccef7a..a9d99f41e8d32d596effe166a95ac38c7cfe991f 100644 --- a/src/dbscanserving/.gitlab-ci.yml +++ b/src/dbscanserving/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build dbscanserving: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: diff --git a/src/dbscanserving/Config.py b/src/dbscanserving/Config.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dbscanserving/Config.py +++ b/src/dbscanserving/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dbscanserving/Dockerfile b/src/dbscanserving/Dockerfile index 2f3f62d6b41e145a419fde54ef37aed47561da50..703a36efaec97351581ac5a472295bb1959934cc 100644 --- a/src/dbscanserving/Dockerfile +++ b/src/dbscanserving/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dbscanserving/__init__.py b/src/dbscanserving/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dbscanserving/__init__.py +++ b/src/dbscanserving/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dbscanserving/client/DbscanServingClient.py b/src/dbscanserving/client/DbscanServingClient.py index d8a74948d8c68b1ffabb1fc12c7d04a4817b90e0..d834453eec772411c94529099dd6b21402c907a1 100644 --- a/src/dbscanserving/client/DbscanServingClient.py +++ b/src/dbscanserving/client/DbscanServingClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dbscanserving/client/__init__.py b/src/dbscanserving/client/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dbscanserving/client/__init__.py +++ b/src/dbscanserving/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dbscanserving/requirements.in b/src/dbscanserving/requirements.in index 83af2a77d2b7dc65f40695f49f6caddb15b1991c..83227dfcfea6e265be91a5be02d3873d97452344 100644 --- a/src/dbscanserving/requirements.in +++ b/src/dbscanserving/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dbscanserving/service/DbscanService.py b/src/dbscanserving/service/DbscanService.py index 834baa8c224cbb695f91941a02d57d5a591feb07..28a1964a16fd682b7e4c89229d632b5ce94f09e0 100644 --- a/src/dbscanserving/service/DbscanService.py +++ b/src/dbscanserving/service/DbscanService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dbscanserving/service/DbscanServiceServicerImpl.py b/src/dbscanserving/service/DbscanServiceServicerImpl.py index ac4f4c90b51f31de36c6c3b05cf5064840786018..d64d6ddb714940634ec42e94f2e16718aa7afa87 100644 --- a/src/dbscanserving/service/DbscanServiceServicerImpl.py +++ b/src/dbscanserving/service/DbscanServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dbscanserving/service/__init__.py b/src/dbscanserving/service/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dbscanserving/service/__init__.py +++ b/src/dbscanserving/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dbscanserving/service/__main__.py b/src/dbscanserving/service/__main__.py index fc0f8346e01b7ec30c4404990148915981ba1cd7..792e390ad03c77c496e89aab9548ada5ee4c3cf8 100644 --- a/src/dbscanserving/service/__main__.py +++ b/src/dbscanserving/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dbscanserving/tests/__init__.py b/src/dbscanserving/tests/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dbscanserving/tests/__init__.py +++ b/src/dbscanserving/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dbscanserving/tests/test_unitary.py b/src/dbscanserving/tests/test_unitary.py index a9d5c7e139d84e854ef58976ca6edba31cea6d11..ccc14652be244505c4904a21b8b02f07d6540a0c 100644 --- a/src/dbscanserving/tests/test_unitary.py +++ b/src/dbscanserving/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/.gitlab-ci.yml b/src/device/.gitlab-ci.yml index 5fed57be6b7963f776425c2196e232aacddee04f..9106c96a8bed2cea406dd150fe656927311958cf 100644 --- a/src/device/.gitlab-ci.yml +++ b/src/device/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build device: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: @@ -48,15 +48,26 @@ unit_test device: - build device 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 + - > + 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 -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary_emulated.py --junitxml=/opt/results/${IMAGE_NAME}_report.xml" + - 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: @@ -77,7 +88,7 @@ unit_test device: artifacts: when: always reports: - junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml + junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report_*.xml ## Deployment of the service in Kubernetes Cluster #deploy device: diff --git a/src/device/Config.py b/src/device/Config.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..7635da2d23fd798535c311583886123a73e58065 100644 --- a/src/device/Config.py +++ b/src/device/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,3 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. + +import os + +TRUE_VALUES = {'T', 'TRUE', 'YES', '1'} +DEVICE_EMULATED_ONLY = os.environ.get('DEVICE_EMULATED_ONLY') +LOAD_ALL_DEVICE_DRIVERS = (DEVICE_EMULATED_ONLY is None) or (DEVICE_EMULATED_ONLY.upper() not in TRUE_VALUES) diff --git a/src/device/Dockerfile b/src/device/Dockerfile index 6566625527f8ceaa8de4639d558c92572c4835cb..42bf4335cc6b0c6337c166dae8680e18d46d1360 100644 --- a/src/device/Dockerfile +++ b/src/device/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -62,9 +62,17 @@ RUN python3 -m pip install -r requirements.txt # Add component files into working directory WORKDIR /var/teraflow -COPY src/context/. context/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/monitoring/__init__.py monitoring/__init__.py +COPY src/monitoring/client/. monitoring/client/ COPY src/device/. device/ -COPY src/monitoring/. monitoring/ + +RUN mkdir -p tests/tools/mock_ietf_actn_sdn_ctrl +RUN touch tests/__init__.py +RUN touch tests/tools/__init__.py +RUN touch tests/tools/mock_ietf_actn_sdn_ctrl/__init__.py +COPY src/tests/tools/mock_ietf_actn_sdn_ctrl/. tests/tools/mock_ietf_actn_sdn_ctrl/ # Start the service ENTRYPOINT ["python", "-m", "device.service"] diff --git a/src/device/__init__.py b/src/device/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/__init__.py +++ b/src/device/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/client/DeviceClient.py b/src/device/client/DeviceClient.py index b88727983474f1f815caa959b8ee8ccfb5b3623b..d479b21cd1223e06abb48213cecc23db4fd651dc 100644 --- a/src/device/client/DeviceClient.py +++ b/src/device/client/DeviceClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,12 +15,12 @@ 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 Device, DeviceConfig, DeviceId, Empty +from common.proto.context_pb2 import Device, DeviceConfig, DeviceId, Empty,OpticalConfig,OpticalConfigId from common.proto.device_pb2 import MonitoringSettings from common.proto.device_pb2_grpc import DeviceServiceStub 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) @@ -34,12 +34,14 @@ class DeviceClient: LOGGER.debug('Creating channel to {:s}...'.format(str(self.endpoint))) self.channel = None self.stub = None + self.openconfig_stub=None self.connect() LOGGER.debug('Channel created') def connect(self): self.channel = grpc.insecure_channel(self.endpoint) self.stub = DeviceServiceStub(self.channel) + self.openconfig_stub=OpenConfigServiceStub(self.channel) def close(self): if self.channel is not None: self.channel.close() @@ -80,3 +82,8 @@ class DeviceClient: response = self.stub.MonitorDeviceKpi(request) LOGGER.debug('MonitorDeviceKpi result: {:s}'.format(grpc_message_to_json_string(response))) return response + def ConfigureOpticalDevice(self, request : OpticalConfig) -> OpticalConfigId: + LOGGER.debug('ConfigureOpticalDevice request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.openconfig_stub.ConfigureOpticalDevice(request) + LOGGER.debug('ConfigureOpticalDevice result: {:s}'.format(grpc_message_to_json_string(response))) + return response diff --git a/src/device/client/__init__.py b/src/device/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/client/__init__.py +++ b/src/device/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/requirements.in b/src/device/requirements.in index ece761571ec2ff9c3376b1062787d76047d71e7c..73ea741d16dcdafd7a9be87ad79b457ccb6c5d5e 100644 --- a/src/device/requirements.in +++ b/src/device/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,12 @@ anytree==2.8.0 APScheduler==3.10.1 cryptography==36.0.2 +deepdiff==6.7.* +deepmerge==1.1.* #fastcache==1.1.0 +Flask==2.1.3 +Flask-HTTPAuth==4.5.0 +Flask-RESTful==0.3.9 Jinja2==3.0.3 ncclient==0.6.13 p4runtime==1.3.0 @@ -32,9 +37,10 @@ tabulate ipaddress macaddress yattag -pyang +pyang==2.6.0 git+https://github.com/robshakir/pyangbind.git websockets==10.4 +werkzeug==2.3.7 # pip's dependency resolver does not take into account installed packages. # p4runtime does not specify the version of grpcio/protobuf it needs, so it tries to install latest one diff --git a/src/device/service/DeviceService.py b/src/device/service/DeviceService.py index 6d27ef96eef4b93fa7d6ca294d1fd645e815af03..1769a16afb49aab6cb986b49e3ca74b9f3b572be 100644 --- a/src/device/service/DeviceService.py +++ b/src/device/service/DeviceService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,13 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. +import os from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc from common.proto.device_pb2_grpc import add_DeviceServiceServicer_to_server +from common.proto.openconfig_device_pb2_grpc import add_OpenConfigServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService +from device.Config import LOAD_ALL_DEVICE_DRIVERS from .driver_api.DriverInstanceCache import DriverInstanceCache from .DeviceServiceServicerImpl import DeviceServiceServicerImpl from .monitoring.MonitoringLoops import MonitoringLoops +from .OpenConfigServicer import OpenConfigServicer # Custom gRPC settings # Multiple clients might keep connections alive waiting for RPC methods to be executed. @@ -31,10 +35,14 @@ class DeviceService(GenericGrpcService): super().__init__(port, max_workers=GRPC_MAX_WORKERS, cls_name=cls_name) self.monitoring_loops = MonitoringLoops() self.device_servicer = DeviceServiceServicerImpl(driver_instance_cache, self.monitoring_loops) + if LOAD_ALL_DEVICE_DRIVERS: + self.openconfig_device_servicer = OpenConfigServicer(driver_instance_cache,self.monitoring_loops) def install_servicers(self): self.monitoring_loops.start() add_DeviceServiceServicer_to_server(self.device_servicer, self.server) + if LOAD_ALL_DEVICE_DRIVERS: + add_OpenConfigServiceServicer_to_server(self.openconfig_device_servicer,self.server) def stop(self): super().stop() diff --git a/src/device/service/DeviceServiceServicerImpl.py b/src/device/service/DeviceServiceServicerImpl.py index eeffdd7b0592b5166c06c1597e17f79adcfd25bb..ebbf19607a7c591f3414d0a9b276930a6b7b1c00 100644 --- a/src/device/service/DeviceServiceServicerImpl.py +++ b/src/device/service/DeviceServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,9 @@ from common.Settings import ENVVAR_SUFIX_SERVICE_HOST, get_env_var_name from common.method_wrappers.Decorator import MetricTypeEnum, MetricsPool, safe_and_metered_rpc_method from common.method_wrappers.ServiceExceptions import NotFoundException, OperationFailedException from common.proto.context_pb2 import ( - Device, DeviceConfig, DeviceDriverEnum, DeviceId, DeviceOperationalStatusEnum, Empty, Link) + Device, DeviceConfig, DeviceDriverEnum, DeviceId, DeviceOperationalStatusEnum, Empty, Link, + OpticalConfig, OpticalConfigId +) from common.proto.device_pb2 import MonitoringSettings from common.proto.device_pb2_grpc import DeviceServiceServicer from common.tools.context_queries.Device import get_device @@ -58,7 +60,8 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): device_uuid = request.device_id.device_uuid.uuid connection_config_rules = check_connect_rules(request.device_config) - check_no_endpoints(request.device_endpoints) + if request.device_drivers[0] != DeviceDriverEnum.DEVICEDRIVER_OC: + check_no_endpoints(request.device_endpoints) t1 = time.time() @@ -73,14 +76,23 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): device.device_operational_status = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED device.device_drivers.extend(request.device_drivers) # pylint: disable=no-member device.device_config.CopyFrom(request.device_config) # pylint: disable=no-member + + if request.HasField('controller_id'): + controller_id = request.controller_id + if controller_id.HasField('device_uuid'): + controller_device_uuid = controller_id.device_uuid.uuid + device.controller_id.device_uuid.uuid = controller_device_uuid + device_id = context_client.SetDevice(device) device = get_device(context_client, device_id.device_uuid.uuid, rw_copy=True) # update device_uuid to honor UUID provided by Context device_uuid = device.device_id.device_uuid.uuid + device_name = device.name t2 = time.time() + self.mutex_queues.add_alias(device_uuid, device_name) self.mutex_queues.wait_my_turn(device_uuid) t3 = time.time() try: @@ -131,6 +143,13 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): else: # ZTP is not deployed; assume the device is ready while onboarding and set them as enabled. device.device_operational_status = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + # temporary line + if request.device_drivers[0] == DeviceDriverEnum.DEVICEDRIVER_OC and len(request.device_endpoints) > 0: + #for endpoint in request.device_endpoints: + # #endpoint.endpoint_id.device_id.CopyFrom(device.device_id) + # pass + device.device_endpoints.extend(request.device_endpoints) device_id = context_client.SetDevice(device) diff --git a/src/device/service/ErrorMessages.py b/src/device/service/ErrorMessages.py index bb7702e4e629bad43df4870d923f0a1829378e2e..f30319121762e91ef21f680a0cc5c8092c0590bc 100644 --- a/src/device/service/ErrorMessages.py +++ b/src/device/service/ErrorMessages.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/OpenConfigServicer.py b/src/device/service/OpenConfigServicer.py new file mode 100644 index 0000000000000000000000000000000000000000..1dddade18e171380132ed4e5850dfbc7e180b4d8 --- /dev/null +++ b/src/device/service/OpenConfigServicer.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 grpc, logging, json +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.method_wrappers.ServiceExceptions import NotFoundException +from common.proto.context_pb2 import ( + Device, DeviceId, DeviceOperationalStatusEnum, Empty, OpticalConfig, OpticalConfig +) +from common.proto.device_pb2_grpc import DeviceServiceServicer +from common.tools.context_queries.Device import get_device +from common.tools.mutex_queues.MutexQueues import MutexQueues +from context.client.ContextClient import ContextClient +from .driver_api._Driver import _Driver +from .driver_api.DriverInstanceCache import DriverInstanceCache, get_driver +from .monitoring.MonitoringLoops import MonitoringLoops +from .Tools import extract_resources +from .Tools import check_no_endpoints + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('Device', 'RPC') + +METRICS_POOL_DETAILS = MetricsPool('Device', 'execution', labels={ + 'driver': '', 'operation': '', 'step': '', +}) + +class OpenConfigServicer(DeviceServiceServicer): + def __init__(self, driver_instance_cache : DriverInstanceCache, monitoring_loops : MonitoringLoops) -> None: + LOGGER.debug('Creating Servicer...') + self.driver_instance_cache = driver_instance_cache + self.monitoring_loops = monitoring_loops + self.mutex_queues = MutexQueues() + LOGGER.debug('Servicer Created') + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def AddOpenConfigDevice(self, request : OpticalConfig, context : grpc.ServicerContext) -> DeviceId: + device_uuid = request.device_id.device_uuid.uuid + check_no_endpoints(request.device_endpoints) + + context_client = ContextClient() + device = get_device(context_client, device_uuid, rw_copy=True) + if device is None: + # not in context, create blank one to get UUID, and populate it below + device = Device() + device.device_id.CopyFrom(request.device_id) # pylint: disable=no-member + device.name = request.name + device.device_type = request.device_type + device.device_operational_status = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED + device.device_drivers.extend(request.device_drivers) # pylint: disable=no-member + device.device_config.CopyFrom(request.device_config) + device.device_endpoints.extend(request.device_endpoints) + # pylint: disable=no-member + device_id = context_client.SetDevice(device) + device = get_device(context_client, device_id.device_uuid.uuid, rw_copy=True) + + # update device_uuid to honor UUID provided by Context + device_uuid = device.device_id.device_uuid.uuid + self.mutex_queues.wait_my_turn(device_uuid) + try: + device_id = context_client.SetDevice(device) + except Exception as error : + LOGGER.debug("error %s",error) + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def ConfigureOpticalDevice (self, request : OpticalConfig, context : grpc.ServicerContext) -> Empty: + device_uuid = request.opticalconfig_id.opticalconfig_uuid + resources=[] + config =json.loads(request.config) + try: + context_client = ContextClient() + device = get_device( + context_client, device_uuid, rw_copy=True, include_endpoints=True, include_components=False, + include_config_rules=False) + if device is None: + raise NotFoundException('Device', device_uuid, extra_details='loading in ConfigureDevice') + resources,conditions=extract_resources(config=config,device=device) + driver : _Driver = get_driver(self.driver_instance_cache, device) + result = driver.SetConfig(resources=resources,conditions=conditions) + #TODO: add a control with the NETCONF get + #driver.GetConfig(resource_keys=filter_fields) + except Exception as e: + LOGGER.info("error in configuring %s",e) + return Empty() diff --git a/src/device/service/Tools.py b/src/device/service/Tools.py index b2b206471e07b654e5339f81db632699ae8b95df..91926b9e59cccac2e233ac14bbac497bbb0ac15c 100644 --- a/src/device/service/Tools.py +++ b/src/device/service/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,12 +15,14 @@ import json, logging from typing import Any, Dict, List, Optional, Tuple, Union from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.method_wrappers.ServiceExceptions import InvalidArgumentException -from common.proto.context_pb2 import ConfigActionEnum, ConfigRule_ACL, Device, DeviceConfig, Link, Location +from common.DeviceTypes import DeviceTypeEnum +from common.method_wrappers.ServiceExceptions import InvalidArgumentException, NotFoundException +from common.proto.context_pb2 import ConfigActionEnum, ConfigRule_ACL, Device, DeviceConfig, EndPoint, Link, Location from common.proto.device_pb2 import MonitoringSettings from common.proto.kpi_sample_types_pb2 import KpiSampleType from common.tools.grpc.ConfigRules import update_config_rule_custom from common.tools.grpc.Tools import grpc_message_to_json +from common.type_checkers.Checkers import chk_length, chk_type from .driver_api._Driver import _Driver, RESOURCE_ENDPOINTS from .monitoring.MonitoringLoops import MonitoringLoops from .ErrorMessages import ( @@ -30,6 +32,21 @@ from .ErrorMessages import ( LOGGER = logging.getLogger(__name__) +def get_endpoint_matching(device : Device, endpoint_uuid_or_name : str) -> EndPoint: + for endpoint in device.device_endpoints: + choices = {endpoint.endpoint_id.endpoint_uuid.uuid, endpoint.name} + if endpoint_uuid_or_name in choices: return endpoint + + device_uuid = device.device_id.device_uuid.uuid + extra_details = 'Device({:s})'.format(str(device_uuid)) + raise NotFoundException('Endpoint', endpoint_uuid_or_name, extra_details=extra_details) + +def get_device_endpoint_uuids(endpoint : Tuple[str, str, Optional[str]]) -> Tuple[str, str]: + chk_type('endpoint', endpoint, (tuple, list)) + chk_length('endpoint', endpoint, min_length=2, max_length=3) + device_uuid, endpoint_uuid = endpoint[0:2] # ignore topology_uuid by now + return device_uuid, endpoint_uuid + def check_connect_rules(device_config : DeviceConfig) -> Dict[str, Any]: connection_config_rules = dict() unexpected_config_rules = list() @@ -434,3 +451,74 @@ def update_endpoints(src_device : Device, dst_device : Device) -> None: dst_topology_id = dst_endpoint_id.topology_id if len(src_topology_uuid) > 0: dst_topology_id.topology_uuid.uuid = src_topology_uuid if len(src_context_uuid) > 0: dst_topology_id.context_id.context_uuid.uuid = src_context_uuid + +def get_edit_target(device : Device, is_opticalband : bool) -> str: + if is_opticalband: return 'optical-band' + if device.device_type == DeviceTypeEnum.OPTICAL_ROADM: return 'media-channel' + return 'optical-channel' + +def is_key_existed(key : str, keys_dic = dict, key_name_to_use = None) -> dict: + dic = {} + dic['resource_key'] = key + if key_name_to_use is not None: + dic['resource_key'] = key_name_to_use + if key in keys_dic: + dic['value'] = keys_dic[key] + else: + dic['value'] = None + return dic + +def extract_resources(config : dict, device : Device) -> list: + conditions = {} + resources = [] + resources.append(is_key_existed('channel_namespace', config)) + resources.append(is_key_existed('add_transceiver', config)) + is_opticalband = config.get('is_opticalband', False) + conditions['is_opticalband'] = is_opticalband + conditions['edit_type'] = get_edit_target(device, is_opticalband) + if 'flow' in config: + #for tuple_value in config['flow'][device.name]: + source_vals = [] + dest_vals = [] + for tuple_value in config['flow']: + source_port = None + destination_port = None + source_port_uuid, destination_port_uuid = tuple_value + if source_port_uuid != '0': + src_endpoint_obj = get_endpoint_matching(device, source_port_uuid) + source_port = src_endpoint_obj.name + source_vals.append(source_port) + if destination_port_uuid != '0': + dst_endpoint_obj = get_endpoint_matching(device, destination_port_uuid) + destination_port = dst_endpoint_obj.name + dest_vals.append(destination_port) + resources.append({'resource_key': 'source_port', 'value': source_vals}) + resources.append({'resource_key': 'destination_port', 'value': dest_vals }) + + if 'new_config' in config: + lower_frequency = None + upper_frequency = None + resources.append(is_key_existed('target-output-power', keys_dic=config['new_config'])) + resources.append(is_key_existed('frequency', keys_dic=config['new_config'])) + resources.append(is_key_existed('operational-mode', keys_dic=config['new_config'])) + resources.append(is_key_existed('line-port', keys_dic=config['new_config'])) + resources.append(is_key_existed('band_type', keys_dic=config['new_config'], key_name_to_use='name')) + resources.append(is_key_existed('ob_id', keys_dic=config['new_config'], key_name_to_use='optical-band-parent')) + resources.append(is_key_existed('name', keys_dic=config['new_config'], key_name_to_use='channel_name')) + if not is_opticalband: + if 'frequency' in config['new_config'] and 'band' in config['new_config'] and conditions['edit_type'] == 'media-channel': + lower_frequency = int(int(config['new_config']['frequency']) - (int(config['new_config']['band'])/2)) + upper_frequency = int(int(config['new_config']['frequency']) + (int(config['new_config']['band'])/2)) + #lower_frequency = (config['new_config']['frequency'] - config['new_config']['band'])/2 + #upper_frequency = (config['new_config']['frequency'] + config['new_config']['band'])/2 + resources.append(is_key_existed('flow_id', keys_dic=config['new_config'], key_name_to_use='index')) + #resources.append({'resource_key':'index','value':config['new_config']['flow_id'] if 'flow_id' in config['new_config'] else None}) + else: + lower_frequency = config['new_config']['low-freq'] if 'low-freq' in config['new_config'] else None + upper_frequency = config['new_config']['up-freq' ] if 'up-freq' in config['new_config'] else None + resources.append(is_key_existed('ob_id', keys_dic=config['new_config'], key_name_to_use='index')) + #resources.append({'resource_key':'index','value':config['new_config']['ob_id'] if 'ob_id' in config['new_config'] else None}) + resources.append({'resource_key': 'lower-frequency', 'value': lower_frequency}) + resources.append({'resource_key': 'upper-frequency', 'value': upper_frequency}) + + return [resources, conditions] diff --git a/src/device/service/__init__.py b/src/device/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/service/__init__.py +++ b/src/device/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/__main__.py b/src/device/service/__main__.py index 401711b4e366dad5347cf771651516fe5e125d55..e69b7fd3c4518b5cbc3833c457f8803e26b2c8e3 100644 --- a/src/device/service/__main__.py +++ b/src/device/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/driver_api/AnyTreeTools.py b/src/device/service/driver_api/AnyTreeTools.py index 61fcc090de7bf8068396cf60a486271329e0e9f1..fedb0564dabfd92bad99a3945d44a77d93d79bec 100644 --- a/src/device/service/driver_api/AnyTreeTools.py +++ b/src/device/service/driver_api/AnyTreeTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/driver_api/DriverFactory.py b/src/device/service/driver_api/DriverFactory.py index 2e89bd4c565d425dab7556d30dc82151271fcb3b..860b8d1608b832ab33ab4d2f762186facdd76a02 100644 --- a/src/device/service/driver_api/DriverFactory.py +++ b/src/device/service/driver_api/DriverFactory.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/driver_api/DriverInstanceCache.py b/src/device/service/driver_api/DriverInstanceCache.py index 1f92059a63889c002eb28ca7eaecc43199f66794..11e12884ef24e694f09822f1afccb1c705a5771e 100644 --- a/src/device/service/driver_api/DriverInstanceCache.py +++ b/src/device/service/driver_api/DriverInstanceCache.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -52,7 +52,12 @@ class DriverInstanceCache: driver_class = self._driver_factory.get_driver_class(**filter_fields) MSG = 'Driver({:s}) selected for device({:s}) with filter_fields({:s})...' LOGGER.info(MSG.format(str(driver_class.__name__), str(device_uuid), str(filter_fields))) - driver_instance : _Driver = driver_class(address, port, **settings) + + if driver_class.__name__ == "OCDriver": + driver_instance : _Driver = driver_class(address, port, device_uuid=device_uuid, **settings) + else: + driver_instance : _Driver = driver_class(address, port, **settings) + self._device_uuid__to__driver_instance[device_uuid] = driver_instance return driver_instance diff --git a/src/device/service/driver_api/Exceptions.py b/src/device/service/driver_api/Exceptions.py index 4b4d5760e987d2ae0b95b570155dce982cf2a57c..09ecfbc7249bf630d8394cdda6dc9f389260f351 100644 --- a/src/device/service/driver_api/Exceptions.py +++ b/src/device/service/driver_api/Exceptions.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/driver_api/FilterFields.py b/src/device/service/driver_api/FilterFields.py index 4084a78da0e85423955e5ce90b74b5919442c784..0d2e792f205caf5244ad4b757a533e75c7abbd36 100644 --- a/src/device/service/driver_api/FilterFields.py +++ b/src/device/service/driver_api/FilterFields.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/driver_api/ImportTopologyEnum.py b/src/device/service/driver_api/ImportTopologyEnum.py index 06f0ff9c2db1f1baccc4b46c5babc4458ca6ffb6..b8925f7cf16ba1bdcfeeae4ec4aac4092acbc7dd 100644 --- a/src/device/service/driver_api/ImportTopologyEnum.py +++ b/src/device/service/driver_api/ImportTopologyEnum.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/driver_api/_Driver.py b/src/device/service/driver_api/_Driver.py index 0aa1a6c5a8697d4c75f7044981221c6dd47e3aff..9612952fe4c1da3beb2534f26da68f630f2acacb 100644 --- a/src/device/service/driver_api/_Driver.py +++ b/src/device/service/driver_api/_Driver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/driver_api/__init__.py b/src/device/service/driver_api/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/service/driver_api/__init__.py +++ b/src/device/service/driver_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index 0d85e8ff9668c5715dfc9d830027a5ae1faed9b5..cb6158b965a21c974605a27582340620f368bdb9 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,12 +15,9 @@ import os from common.DeviceTypes import DeviceTypeEnum from common.proto.context_pb2 import DeviceDriverEnum +from device.Config import LOAD_ALL_DEVICE_DRIVERS from ..driver_api.FilterFields import FilterFieldEnum -TRUE_VALUES = {'T', 'TRUE', 'YES', '1'} -DEVICE_EMULATED_ONLY = os.environ.get('DEVICE_EMULATED_ONLY') -LOAD_ALL_DEVICE_DRIVERS = (DEVICE_EMULATED_ONLY is None) or (DEVICE_EMULATED_ONLY.upper() not in TRUE_VALUES) - DRIVERS = [] from .emulated.EmulatedDriver import EmulatedDriver # pylint: disable=wrong-import-position @@ -84,6 +81,15 @@ DRIVERS.append( } ])) +from .ietf_actn.IetfActnDriver import IetfActnDriver # pylint: disable=wrong-import-position +DRIVERS.append( + (IetfActnDriver, [ + { + FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.OPEN_LINE_SYSTEM, + FilterFieldEnum.DRIVER: DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN, + } + ])) + if LOAD_ALL_DEVICE_DRIVERS: from .openconfig.OpenConfigDriver import OpenConfigDriver # pylint: disable=wrong-import-position DRIVERS.append( @@ -148,3 +154,27 @@ if LOAD_ALL_DEVICE_DRIVERS: FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_XR, } ])) + +if LOAD_ALL_DEVICE_DRIVERS: + from .optical_tfs.OpticalTfsDriver import OpticalTfsDriver # pylint: disable=wrong-import-position + DRIVERS.append( + (OpticalTfsDriver, [ + { + FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.OPEN_LINE_SYSTEM, + FilterFieldEnum.DRIVER: DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS, + } + ])) + +if LOAD_ALL_DEVICE_DRIVERS: + from .oc_driver.OCDriver import OCDriver # pylint: disable=wrong-import-position + DRIVERS.append( + (OCDriver, [ + { + # Real Packet Router, specifying OpenConfig Driver => use OpenConfigDriver + FilterFieldEnum.DEVICE_TYPE: [ + DeviceTypeEnum.OPTICAL_ROADM, + DeviceTypeEnum.OPTICAL_TRANSPONDER + ], + FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_OC, + } + ])) diff --git a/src/device/service/drivers/emulated/Constants.py b/src/device/service/drivers/emulated/Constants.py index b2b42de0149d40d905dbcf2fcca0a5e30af35b9b..612052eed8e193a86eefc44ed3afe19c133372a7 100644 --- a/src/device/service/drivers/emulated/Constants.py +++ b/src/device/service/drivers/emulated/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/emulated/EmulatedDriver.py b/src/device/service/drivers/emulated/EmulatedDriver.py index 8f9453574a7333e599ea56158204627fcfdd3680..fff92fc9a5d3d05e27268503dfe4e4dfa73f536d 100644 --- a/src/device/service/drivers/emulated/EmulatedDriver.py +++ b/src/device/service/drivers/emulated/EmulatedDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/emulated/SyntheticSamplingParameters.py b/src/device/service/drivers/emulated/SyntheticSamplingParameters.py index 5bbbf89e84e764677638b7e4e3f4934336321576..a0d01200e855984b79314d6a7c303d865d4a8642 100644 --- a/src/device/service/drivers/emulated/SyntheticSamplingParameters.py +++ b/src/device/service/drivers/emulated/SyntheticSamplingParameters.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/emulated/Tools.py b/src/device/service/drivers/emulated/Tools.py index 15fa342388159a19bf071985ab1a7fc74d8b28a2..cdd84fccf0d3b2c373b99e5f229201e8967de9c2 100644 --- a/src/device/service/drivers/emulated/Tools.py +++ b/src/device/service/drivers/emulated/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/emulated/__init__.py b/src/device/service/drivers/emulated/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/service/drivers/emulated/__init__.py +++ b/src/device/service/drivers/emulated/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/DeltaSampleCache.py b/src/device/service/drivers/gnmi_openconfig/DeltaSampleCache.py index 5083082fe5694a95e95d95cd8ed72563d77dc098..daf04be5a1ff82a79031d8c3ffe19da10739fbcb 100644 --- a/src/device/service/drivers/gnmi_openconfig/DeltaSampleCache.py +++ b/src/device/service/drivers/gnmi_openconfig/DeltaSampleCache.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/GnmiOpenConfigDriver.py b/src/device/service/drivers/gnmi_openconfig/GnmiOpenConfigDriver.py index 882c0de07440c3b89c4a82f522d08155329b5d7e..9d22dcf798532fe2aa27f8a79aa729d174786ff4 100644 --- a/src/device/service/drivers/gnmi_openconfig/GnmiOpenConfigDriver.py +++ b/src/device/service/drivers/gnmi_openconfig/GnmiOpenConfigDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py b/src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py index 04dae4f5fcc6427c735b528b0ab32ba1c967709a..4428fb81ca304d20ee4b3bce259924278400249f 100644 --- a/src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py +++ b/src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/MonitoringThread.py b/src/device/service/drivers/gnmi_openconfig/MonitoringThread.py index 7cbd0da87d15b6fac0ea7f4a5de3c02259a07dc8..8bf6704a854542b3a085af05d55391e23c8d224f 100644 --- a/src/device/service/drivers/gnmi_openconfig/MonitoringThread.py +++ b/src/device/service/drivers/gnmi_openconfig/MonitoringThread.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/__init__.py b/src/device/service/drivers/gnmi_openconfig/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/service/drivers/gnmi_openconfig/__init__.py +++ b/src/device/service/drivers/gnmi_openconfig/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/gnmi/__init__.py b/src/device/service/drivers/gnmi_openconfig/gnmi/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/service/drivers/gnmi_openconfig/gnmi/__init__.py +++ b/src/device/service/drivers/gnmi_openconfig/gnmi/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Component.py b/src/device/service/drivers/gnmi_openconfig/handlers/Component.py index 0b3c1f9705353548025cb4365ea31e68978c79f1..5ac8754c6081245f79f28b89e026d5a859bc363a 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Component.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Component.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index 20f79b3c2e15b58ab99166a68422fd35d40fd00f..e97855aa8b97fc855b07848f1a7f0c7e93717a70 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/InterfaceCounter.py b/src/device/service/drivers/gnmi_openconfig/handlers/InterfaceCounter.py index a45dc9e7f972445691143df15d6d56d079384fc4..502868c2204553d30e7cdd529184cf994d03fd21 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/InterfaceCounter.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/InterfaceCounter.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstance.py b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstance.py index aed821a06fa7fcafe96a21ad5f5fa06be2902038..d522eec964b2c6beffe953075411dbba2594eaa4 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstance.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstance.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py index 205373fca870ea7338a3c9c043c60306b535c1c0..cc22618bc4179ba6eabdd2b4232b8cbfb92f1587 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceStaticRoute.py b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceStaticRoute.py index 9d75e9ac66e023c8f7be44d892cb6eec647761eb..6294f9c9bf46b3b60da48f19c08ad57f096fa39b 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceStaticRoute.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceStaticRoute.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Tools.py b/src/device/service/drivers/gnmi_openconfig/handlers/Tools.py index 30343ac28a46a0c1d24bcb66d07fa03fa377f9fa..358c7de9fa3b9c46c4a7c70142deb1c2ab396ad0 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Tools.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/_Handler.py b/src/device/service/drivers/gnmi_openconfig/handlers/_Handler.py index d20c77b1165decce7ea07243beb782a6b749734b..f051c43534ab4e1d6c15a34ae2070067034ba9e1 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/_Handler.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/_Handler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/__init__.py b/src/device/service/drivers/gnmi_openconfig/handlers/__init__.py index 39cd7c66ad5e8c16e89192ad0f2ffb7c43ae6c50..4ff8e8b38b4a76ba9bb0d2b91fb70b54b06a170e 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/__init__.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/old_bgp_handler.txt b/src/device/service/drivers/gnmi_openconfig/handlers/old_bgp_handler.txt index 595a19788bce7ff0990346ef249ad3ce71f55efa..89dee2a177141cca428a5981c8ce45b9a79cc9a8 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/old_bgp_handler.txt +++ b/src/device/service/drivers/gnmi_openconfig/handlers/old_bgp_handler.txt @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/tools/Capabilities.py b/src/device/service/drivers/gnmi_openconfig/tools/Capabilities.py index b90bf3db887874d3c9015336cc105b3429c8e64e..093a96233f26399be4e224a48a78ea6329da4304 100644 --- a/src/device/service/drivers/gnmi_openconfig/tools/Capabilities.py +++ b/src/device/service/drivers/gnmi_openconfig/tools/Capabilities.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/tools/Channel.py b/src/device/service/drivers/gnmi_openconfig/tools/Channel.py index 264dd032166117873702643e17acb344b408b194..72d45d32227cd8133e36940d4f14cfd19ca3e3dd 100644 --- a/src/device/service/drivers/gnmi_openconfig/tools/Channel.py +++ b/src/device/service/drivers/gnmi_openconfig/tools/Channel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/tools/Path.py b/src/device/service/drivers/gnmi_openconfig/tools/Path.py index 40ab28dc6bbaf8a65b667804dfe9285f36864e29..7ce0631dada58ce581900c974a0b24d170df2f39 100644 --- a/src/device/service/drivers/gnmi_openconfig/tools/Path.py +++ b/src/device/service/drivers/gnmi_openconfig/tools/Path.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/tools/Subscriptions.py b/src/device/service/drivers/gnmi_openconfig/tools/Subscriptions.py index 18b6445ae31c00495c4f3a84922c9c8d4198b3f7..ad3e63e58f86ea5115d6e73ce3124bcb38212542 100644 --- a/src/device/service/drivers/gnmi_openconfig/tools/Subscriptions.py +++ b/src/device/service/drivers/gnmi_openconfig/tools/Subscriptions.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/tools/Value.py b/src/device/service/drivers/gnmi_openconfig/tools/Value.py index 4797930a17360d8a780e99ea9ac05c0e3a1f7abc..077bdd40ec8859202b8e8e6053b731339edfe7fe 100644 --- a/src/device/service/drivers/gnmi_openconfig/tools/Value.py +++ b/src/device/service/drivers/gnmi_openconfig/tools/Value.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/gnmi_openconfig/tools/__init__.py b/src/device/service/drivers/gnmi_openconfig/tools/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/service/drivers/gnmi_openconfig/tools/__init__.py +++ b/src/device/service/drivers/gnmi_openconfig/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/ietf_actn/IetfActnDriver.py b/src/device/service/drivers/ietf_actn/IetfActnDriver.py new file mode 100644 index 0000000000000000000000000000000000000000..19e4429f48b6474aa8cea6100262ced117310c15 --- /dev/null +++ b/src/device/service/drivers/ietf_actn/IetfActnDriver.py @@ -0,0 +1,172 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging, requests, threading +from typing import Any, Iterator, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.type_checkers.Checkers import chk_string, chk_type +from device.service.driver_api._Driver import _Driver, RESOURCE_ENDPOINTS, RESOURCE_SERVICES +from .handlers.EthtServiceHandler import EthtServiceHandler +from .handlers.OsuTunnelHandler import OsuTunnelHandler +from .handlers.RestApiClient import RestApiClient +from .Tools import get_etht_services, get_osu_tunnels, parse_resource_key + +LOGGER = logging.getLogger(__name__) + +ALL_RESOURCE_KEYS = [ + RESOURCE_ENDPOINTS, + RESOURCE_SERVICES, +] + +DRIVER_NAME = 'ietf_actn' +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) + +class IetfActnDriver(_Driver): + def __init__(self, address: str, port: int, **settings) -> None: + super().__init__(DRIVER_NAME, address, port, **settings) + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + self._rest_api_client = RestApiClient(address, port, settings=settings) + self._handler_osu_tunnel = OsuTunnelHandler(self._rest_api_client) + self._handler_etht_service = EthtServiceHandler(self._rest_api_client) + + def Connect(self) -> bool: + with self.__lock: + if self.__started.is_set(): return True + try: + self._rest_api_client.get('Check Credentials', '') + except requests.exceptions.Timeout: + LOGGER.exception('Timeout exception checking connectivity') + return False + except Exception: # pylint: disable=broad-except + LOGGER.exception('Unhandled exception checking connectivity') + return False + else: + self.__started.set() + return True + + def Disconnect(self) -> bool: + with self.__lock: + self.__terminate.set() + return True + + @metered_subclass_method(METRICS_POOL) + def GetInitialConfig(self) -> List[Tuple[str, Any]]: + with self.__lock: + return [] + + @metered_subclass_method(METRICS_POOL) + def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: + chk_type('resources', resource_keys, list) + results = [] + with self.__lock: + if len(resource_keys) == 0: resource_keys = ALL_RESOURCE_KEYS + for i, resource_key in enumerate(resource_keys): + chk_string('resource_key[#{:d}]'.format(i), resource_key, allow_empty=False) + + try: + _results = list() + + if resource_key == RESOURCE_ENDPOINTS: + # Add mgmt endpoint by default + resource_key = '/endpoints/endpoint[mgmt]' + resource_value = {'uuid': 'mgmt', 'name': 'mgmt', 'type': 'mgmt'} + results.append((resource_key, resource_value)) + elif resource_key == RESOURCE_SERVICES: + get_osu_tunnels(self._handler_osu_tunnel, _results) + get_etht_services(self._handler_etht_service, _results) + else: + # check if resource key is for a specific OSU tunnel or ETHT service, and get them accordingly + osu_tunnel_name, etht_service_name = parse_resource_key(resource_key) + if osu_tunnel_name is not None: + get_osu_tunnels(self._handler_osu_tunnel, _results, osu_tunnel_name=osu_tunnel_name) + if etht_service_name is not None: + get_etht_services(self._handler_etht_service, _results, etht_service_name=etht_service_name) + + results.extend(_results) + except Exception as e: + results.append((resource_key, e)) + + return results + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + results = [] + if len(resources) == 0: return results + with self.__lock: + for resource_key, resource_value in resources: + LOGGER.info('resource: key({:s}) => value({:s})'.format(str(resource_key), str(resource_value))) + try: + _results = list() + + if isinstance(resource_value, str): resource_value = json.loads(resource_value) + osu_tunnel_name, etht_service_name = parse_resource_key(resource_key) + + if osu_tunnel_name is not None: + succeeded = self._handler_osu_tunnel.update(resource_value) + _results.append(succeeded) + + if etht_service_name is not None: + succeeded = self._handler_etht_service.update(resource_value) + _results.append(succeeded) + + results.extend(_results) + except Exception as e: + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + results = [] + if len(resources) == 0: return results + with self.__lock: + for resource_key, resource_value in resources: + LOGGER.info('resource: key({:s}) => value({:s})'.format(str(resource_key), str(resource_value))) + try: + _results = list() + + if isinstance(resource_value, str): resource_value = json.loads(resource_value) + osu_tunnel_name, etht_service_name = parse_resource_key(resource_key) + + if osu_tunnel_name is not None: + succeeded = self._handler_osu_tunnel.delete(osu_tunnel_name) + _results.append(succeeded) + + if etht_service_name is not None: + succeeded = self._handler_etht_service.delete(etht_service_name) + _results.append(succeeded) + + results.extend(_results) + except Exception as e: + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + # TODO: IETF ACTN does not support monitoring by now + return [False for _ in subscriptions] + + @metered_subclass_method(METRICS_POOL) + def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + # TODO: IETF ACTN does not support monitoring by now + return [False for _ in subscriptions] + + def GetState( + self, blocking=False, terminate : Optional[threading.Event] = None + ) -> Iterator[Tuple[float, str, Any]]: + # TODO: IETF ACTN does not support monitoring by now + return [] diff --git a/src/device/service/drivers/ietf_actn/Tools.py b/src/device/service/drivers/ietf_actn/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..1d71e28d3fe2857ea8d400504e2a895de4c78b9c --- /dev/null +++ b/src/device/service/drivers/ietf_actn/Tools.py @@ -0,0 +1,52 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, re +from typing import Any, List, Optional, Tuple, Union +from .handlers.EthtServiceHandler import EthtServiceHandler +from .handlers.OsuTunnelHandler import OsuTunnelHandler + +LOGGER = logging.getLogger(__name__) + +RE_OSU_TUNNEL = re.compile(r'^\/osu\_tunnels\/osu\_tunnel\[([^\]]+)\]$') +RE_ETHT_SERVICE = re.compile(r'^\/etht\_services\/etht\_service\[([^\]]+)\]$') + +def parse_resource_key(resource_key : str) -> Tuple[Optional[str], Optional[str]]: + re_match_osu_tunnel = RE_OSU_TUNNEL.match(resource_key) + osu_tunnel_name = None if re_match_osu_tunnel is None else re_match_osu_tunnel.group(1) + + re_match_etht_service = RE_ETHT_SERVICE.match(resource_key) + etht_service_name = None if re_match_etht_service is None else re_match_etht_service.group(1) + + return osu_tunnel_name, etht_service_name + +def get_osu_tunnels( + handler_osu_tunnel : OsuTunnelHandler, results : List[Tuple[str, Union[Any, None, Exception]]], + osu_tunnel_name : Optional[str] = None +) -> None: + osu_tunnels = handler_osu_tunnel.get(osu_tunnel_name=osu_tunnel_name) + for osu_tunnel in osu_tunnels: + osu_tunnel_name = osu_tunnel['name'] + resource_key = '/osu_tunnels/osu_tunnel[{:s}]'.format(osu_tunnel_name) + results.append((resource_key, osu_tunnel)) + +def get_etht_services( + handler_etht_service : EthtServiceHandler, results : List[Tuple[str, Union[Any, None, Exception]]], + etht_service_name : Optional[str] = None +) -> None: + etht_services = handler_etht_service.get(etht_service_name=etht_service_name) + for etht_service in etht_services: + etht_service_name = etht_service['name'] + resource_key = '/etht_services/etht_service[{:s}]'.format(etht_service_name) + results.append((resource_key, etht_service)) diff --git a/src/device/service/drivers/ietf_actn/__init__.py b/src/device/service/drivers/ietf_actn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfc943b68af13a11e562abbc8680ade71db8f02 --- /dev/null +++ b/src/device/service/drivers/ietf_actn/__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/device/service/drivers/ietf_actn/handlers/EthtServiceHandler.py b/src/device/service/drivers/ietf_actn/handlers/EthtServiceHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..86176ea40605d7bb6fd30a0deb5dbd981598ac1a --- /dev/null +++ b/src/device/service/drivers/ietf_actn/handlers/EthtServiceHandler.py @@ -0,0 +1,221 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import enum, logging +from typing import Dict, List, Optional, Tuple, Union +from .RestApiClient import HTTP_STATUS_CREATED, HTTP_STATUS_NO_CONTENT, HTTP_STATUS_OK, RestApiClient + +LOGGER = logging.getLogger(__name__) + +class BandwidthProfileTypeEnum(enum.Enum): + MEF_10_BWP = 'ietf-eth-tran-types:mef-10-bwp' + +class EndpointLayerSpecificAccessTypeEnum(enum.Enum): + PORT = 'port' + +class EndpointProtectionRoleEnum(enum.Enum): + WORK = 'work' + +class OptimizationMetricRole(enum.Enum): + WORK = 'work' + +class OptimizationMetricType(enum.Enum): + PATH_METRIC_TE = 'ietf-te-types:path-metric-te' + +class OuterTagTypeEnum(enum.Enum): + CLASSIFY_C_VLAN = 'ietf-eth-tran-types:classify-c-vlan' + +class ServiceClassificationTypeEnum(enum.Enum): + VLAN_CLASSIFICATION = 'ietf-eth-tran-type:vlan-classification' + +class ServiceTypeEnum(enum.Enum): + MP2MP = 'op-mp2mp-svc' + P2MP = 'op-p2mp-svc' + +def compose_outer_tag(tag_type : OuterTagTypeEnum, vlan_value : int) -> Dict: + return {'tag-type': tag_type.value, 'vlan-value': vlan_value} + +def compose_ingress_egress_bandwidth_profile() -> Dict: + return { + 'bandwidth-profile-type': BandwidthProfileTypeEnum.MEF_10_BWP.value, + 'CIR': 10_000_000, + 'EIR': 10_000_000, + } + +def compose_layer_specific_access_type() -> Dict: + return {'access-type': EndpointLayerSpecificAccessTypeEnum.PORT.value} + +def compose_static_route(prefix : str, mask : int, next_hop : str) -> Dict: + return {'destination': prefix, 'destination-mask': mask, 'next-hop': next_hop} + +def compose_static_route_list(static_routes : List[Tuple[str, int, str]]) -> List[Dict]: + return [ + compose_static_route(prefix, mask, next_hop) + for prefix, mask, next_hop in static_routes + ] + +def compose_etht_service_endpoint( + node_id : str, tp_id : str, vlan_value : int, static_routes : List[Tuple[str, int, str]] = list() +) -> Dict: + return { + 'node-id' : node_id, + 'tp-id' : tp_id, + 'protection-role' : EndpointProtectionRoleEnum.WORK.value, + 'layer-specific' : compose_layer_specific_access_type(), + 'is-extendable' : False, + 'is-terminal' : True, + 'static-route-list' : compose_static_route_list(static_routes), + 'outer-tag' : compose_outer_tag(OuterTagTypeEnum.CLASSIFY_C_VLAN, vlan_value), + 'service-classification-type' : ServiceClassificationTypeEnum.VLAN_CLASSIFICATION.value, + 'ingress-egress-bandwidth-profile': compose_ingress_egress_bandwidth_profile(), + } + +def compose_optimizations() -> Dict: + return {'optimization-metric': [{ + 'metric-role': OptimizationMetricRole.WORK.value, + 'metric-type': OptimizationMetricType.PATH_METRIC_TE.value, + }]} + +def compose_etht_service( + name : str, service_type : ServiceTypeEnum, osu_tunnel_name : str, + src_node_id : str, src_tp_id : str, src_vlan_tag : int, dst_node_id : str, dst_tp_id : str, dst_vlan_tag : int, + src_static_routes : List[Tuple[str, int, str]] = list(), dst_static_routes : List[Tuple[str, int, str]] = list() +) -> Dict: + return {'ietf-eth-tran-service:etht-svc': {'etht-svc-instances': [{ + 'etht-svc-name' : name, + 'etht-svc-title': name.upper(), + 'etht-svc-type' : service_type.value, + 'source-endpoints': {'source-endpoint': [ + compose_etht_service_endpoint(src_node_id, src_tp_id, src_vlan_tag, src_static_routes), + ]}, + 'destination-endpoints': {'destination-endpoint': [ + compose_etht_service_endpoint(dst_node_id, dst_tp_id, dst_vlan_tag, dst_static_routes), + ]}, + 'svc-tunnel': [{'tunnel-name': osu_tunnel_name}], + 'optimizations': compose_optimizations(), + }]}} + +class EthtServiceHandler: + def __init__(self, rest_api_client : RestApiClient) -> None: + self._rest_api_client = rest_api_client + self._object_name = 'EthtService' + self._subpath_root = '/ietf-eth-tran-service:etht-svc' + self._subpath_item = self._subpath_root + '/etht-svc-instances="{etht_service_name:s}"' + + def _rest_api_get(self, etht_service_name : Optional[str] = None) -> Union[Dict, List]: + if etht_service_name is None: + subpath_url = self._subpath_root + else: + subpath_url = self._subpath_item.format(etht_service_name=etht_service_name) + return self._rest_api_client.get( + self._object_name, subpath_url, expected_http_status={HTTP_STATUS_OK} + ) + + def _rest_api_update(self, data : Dict) -> bool: + return self._rest_api_client.update( + self._object_name, self._subpath_root, data, expected_http_status={HTTP_STATUS_CREATED} + ) + + def _rest_api_delete(self, etht_service_name : str) -> bool: + if etht_service_name is None: raise Exception('etht_service_name is None') + subpath_url = self._subpath_item.format(etht_service_name=etht_service_name) + return self._rest_api_client.delete( + self._object_name, subpath_url, expected_http_status={HTTP_STATUS_NO_CONTENT} + ) + + def get(self, etht_service_name : Optional[str] = None) -> Union[Dict, List]: + data = self._rest_api_get(etht_service_name=etht_service_name) + + if not isinstance(data, dict): raise ValueError('data should be a dict') + if 'ietf-eth-tran-service:etht-svc' not in data: + raise ValueError('data does not contain key "ietf-eth-tran-service:etht-svc"') + data = data['ietf-eth-tran-service:etht-svc'] + if 'etht-svc-instances' not in data: + raise ValueError('data["ietf-eth-tran-service:etht-svc"] does not contain key "etht-svc-instances"') + data = data['etht-svc-instances'] + if not isinstance(data, list): + raise ValueError('data["ietf-eth-tran-service:etht-svc"]["etht-svc-instances"] should be a list') + + etht_services : List[Dict] = list() + for item in data: + src_endpoints = item['source-endpoints']['source-endpoint'] + if len(src_endpoints) != 1: + MSG = 'EthtService({:s}) has zero/multiple source endpoints' + raise Exception(MSG.format(str(item))) + src_endpoint = src_endpoints[0] + + dst_endpoints = item['destination-endpoints']['destination-endpoint'] + if len(dst_endpoints) != 1: + MSG = 'EthtService({:s}) has zero/multiple destination endpoints' + raise Exception(MSG.format(str(item))) + dst_endpoint = dst_endpoints[0] + + svc_tunnels = item['svc-tunnel'] + if len(svc_tunnels) != 1: + MSG = 'EthtService({:s}) has zero/multiple service tunnels' + raise Exception(MSG.format(str(item))) + svc_tunnel = svc_tunnels[0] + + etht_service = { + 'name' : item['etht-svc-name'], + 'service_type' : item['etht-svc-type'], + 'osu_tunnel_name' : svc_tunnel['tunnel-name'], + + 'src_node_id' : src_endpoint['node-id'], + 'src_tp_id' : src_endpoint['tp-id'], + 'src_vlan_tag' : src_endpoint['outer-tag']['vlan-value'], + 'src_static_routes': [ + [static_route['destination'], static_route['destination-mask'], static_route['next-hop']] + for static_route in src_endpoint.get('static-route-list', list()) + ], + + 'dst_node_id' : dst_endpoint['node-id'], + 'dst_tp_id' : dst_endpoint['tp-id'], + 'dst_vlan_tag' : dst_endpoint['outer-tag']['vlan-value'], + 'dst_static_routes': [ + [static_route['destination'], static_route['destination-mask'], static_route['next-hop']] + for static_route in dst_endpoint.get('static-route-list', list()) + ], + } + etht_services.append(etht_service) + + return etht_services + + def update(self, parameters : Dict) -> bool: + name = parameters['name' ] + service_type = parameters['service_type' ] + osu_tunnel_name = parameters['osu_tunnel_name'] + + src_node_id = parameters['src_node_id' ] + src_tp_id = parameters['src_tp_id' ] + src_vlan_tag = parameters['src_vlan_tag' ] + src_static_routes = parameters.get('src_static_routes', []) + + dst_node_id = parameters['dst_node_id' ] + dst_tp_id = parameters['dst_tp_id' ] + dst_vlan_tag = parameters['dst_vlan_tag' ] + dst_static_routes = parameters.get('dst_static_routes', []) + + service_type = ServiceTypeEnum._value2member_map_[service_type] + + data = compose_etht_service( + name, service_type, osu_tunnel_name, + src_node_id, src_tp_id, src_vlan_tag, dst_node_id, dst_tp_id, dst_vlan_tag, + src_static_routes=src_static_routes, dst_static_routes=dst_static_routes + ) + + return self._rest_api_update(data) + + def delete(self, etht_service_name : str) -> bool: + return self._rest_api_delete(etht_service_name) diff --git a/src/device/service/drivers/ietf_actn/handlers/OsuTunnelHandler.py b/src/device/service/drivers/ietf_actn/handlers/OsuTunnelHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..d04418ff1abddfca9f797a1fb6f5f80a98e8e96d --- /dev/null +++ b/src/device/service/drivers/ietf_actn/handlers/OsuTunnelHandler.py @@ -0,0 +1,176 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import enum, logging +from typing import Dict, List, Optional, Union +from .RestApiClient import HTTP_STATUS_CREATED, HTTP_STATUS_NO_CONTENT, HTTP_STATUS_OK, RestApiClient + +LOGGER = logging.getLogger(__name__) + +class EndpointProtectionRoleEnum(enum.Enum): + WORK = 'work' + +class LspProtectionTypeEnum(enum.Enum): + UNPROTECTED = 'ietf-te-types:lsp-protection-unprotected' + +class LspRestorationTypeEnum(enum.Enum): + NOT_APPLICABLE = 'ietf-te-types:lsp-restoration-not-applicable' + +class TunnelAdminStateEnum(enum.Enum): + UP = 'ietf-te-types:tunnel-admin-state-up' + +class OduTypeEnum(enum.Enum): + OSUFLEX = 'osuflex' + +def compose_osu_tunnel_endpoint( + node_id : str, tp_id : str, ttp_channel_name : str, + protection_role : EndpointProtectionRoleEnum = EndpointProtectionRoleEnum.WORK +) -> Dict: + return { + 'node-id': node_id, 'tp-id': tp_id, 'ttp-channel-name': ttp_channel_name, + 'protection-role': protection_role.value + } + +def compose_osu_tunnel_te_bandwidth_odu(odu_type : OduTypeEnum, number : int) -> Dict: + return {'layer': 'odu', 'odu-type': odu_type.value, 'number': number} + +def compose_osu_tunnel_protection( + type_ : LspProtectionTypeEnum = LspProtectionTypeEnum.UNPROTECTED, reversion_disable : bool = True +) -> Dict: + return {'protection-type': type_.value, 'protection-reversion-disable': reversion_disable} + +def compose_osu_tunnel_restoration( + type_ : LspRestorationTypeEnum = LspRestorationTypeEnum.NOT_APPLICABLE, restoration_lock : bool = False +) -> Dict: + return {'restoration-type': type_.value, 'restoration-lock': restoration_lock} + +def compose_osu_tunnel( + name : str, + src_node_id : str, src_tp_id : str, src_ttp_channel_name : str, + dst_node_id : str, dst_tp_id : str, dst_ttp_channel_name : str, + odu_type : OduTypeEnum, osuflex_number : int, + delay : int, bidirectional : bool = True, + admin_state : TunnelAdminStateEnum = TunnelAdminStateEnum.UP +) -> Dict: + return {'ietf-te:tunnel': [{ + 'name': name, + 'title': name.upper(), + 'admin-state': admin_state.value, + 'delay': delay, + 'te-bandwidth': compose_osu_tunnel_te_bandwidth_odu(odu_type, osuflex_number), + 'bidirectional': bidirectional, + 'source-endpoints': {'source-endpoint': [ + compose_osu_tunnel_endpoint(src_node_id, src_tp_id, src_ttp_channel_name), + ]}, + 'destination-endpoints': {'destination-endpoint': [ + compose_osu_tunnel_endpoint(dst_node_id, dst_tp_id, dst_ttp_channel_name), + ]}, + 'restoration': compose_osu_tunnel_restoration(), + 'protection': compose_osu_tunnel_protection(), + }]} + +class OsuTunnelHandler: + def __init__(self, rest_api_client : RestApiClient) -> None: + self._rest_api_client = rest_api_client + self._object_name = 'OsuTunnel' + self._subpath_root = '/ietf-te:te/tunnels' + self._subpath_item = self._subpath_root + '/tunnel="{osu_tunnel_name:s}"' + + def _rest_api_get(self, osu_tunnel_name : Optional[str] = None) -> Union[Dict, List]: + if osu_tunnel_name is None: + subpath_url = self._subpath_root + else: + subpath_url = self._subpath_item.format(osu_tunnel_name=osu_tunnel_name) + return self._rest_api_client.get( + self._object_name, subpath_url, expected_http_status={HTTP_STATUS_OK} + ) + + def _rest_api_update(self, data : Dict) -> bool: + return self._rest_api_client.update( + self._object_name, self._subpath_root, data, expected_http_status={HTTP_STATUS_CREATED} + ) + + def _rest_api_delete(self, osu_tunnel_name : str) -> bool: + if osu_tunnel_name is None: raise Exception('osu_tunnel_name is None') + subpath_url = self._subpath_item.format(osu_tunnel_name=osu_tunnel_name) + return self._rest_api_client.delete( + self._object_name, subpath_url, expected_http_status={HTTP_STATUS_NO_CONTENT} + ) + + def get(self, osu_tunnel_name : Optional[str] = None) -> Union[Dict, List]: + data = self._rest_api_get(osu_tunnel_name=osu_tunnel_name) + + if not isinstance(data, dict): raise ValueError('data should be a dict') + if 'ietf-te:tunnel' not in data: raise ValueError('data does not contain key "ietf-te:tunnel"') + data = data['ietf-te:tunnel'] + if not isinstance(data, list): raise ValueError('data[ietf-te:tunnel] should be a list') + + osu_tunnels : List[Dict] = list() + for item in data: + src_endpoints = item['source-endpoints']['source-endpoint'] + if len(src_endpoints) != 1: + MSG = 'OsuTunnel({:s}) has zero/multiple source endpoints' + raise Exception(MSG.format(str(item))) + src_endpoint = src_endpoints[0] + + dst_endpoints = item['destination-endpoints']['destination-endpoint'] + if len(dst_endpoints) != 1: + MSG = 'OsuTunnel({:s}) has zero/multiple destination endpoints' + raise Exception(MSG.format(str(item))) + dst_endpoint = dst_endpoints[0] + + osu_tunnel = { + 'name' : item['name'], + 'src_node_id' : src_endpoint['node-id'], + 'src_tp_id' : src_endpoint['tp-id'], + 'src_ttp_channel_name': src_endpoint['ttp-channel-name'], + 'dst_node_id' : dst_endpoint['node-id'], + 'dst_tp_id' : dst_endpoint['tp-id'], + 'dst_ttp_channel_name': dst_endpoint['ttp-channel-name'], + 'odu_type' : item['te-bandwidth']['odu-type'], + 'osuflex_number' : item['te-bandwidth']['number'], + 'delay' : item['delay'], + 'bidirectional' : item['bidirectional'], + } + osu_tunnels.append(osu_tunnel) + + return osu_tunnels + + def update(self, parameters : Dict) -> bool: + name = parameters['name' ] + + src_node_id = parameters['src_node_id' ] + src_tp_id = parameters['src_tp_id' ] + src_ttp_channel_name = parameters['src_ttp_channel_name'] + + dst_node_id = parameters['dst_node_id' ] + dst_tp_id = parameters['dst_tp_id' ] + dst_ttp_channel_name = parameters['dst_ttp_channel_name'] + + odu_type = parameters.get('odu_type', OduTypeEnum.OSUFLEX.value) + osuflex_number = parameters.get('osuflex_number', 1 ) + delay = parameters.get('delay', 20 ) + bidirectional = parameters.get('bidirectional', True ) + + odu_type = OduTypeEnum._value2member_map_[odu_type] + + data = compose_osu_tunnel( + name, src_node_id, src_tp_id, src_ttp_channel_name, dst_node_id, dst_tp_id, dst_ttp_channel_name, + odu_type, osuflex_number, delay, bidirectional=bidirectional + ) + + return self._rest_api_update(data) + + def delete(self, osu_tunnel_name : str) -> bool: + return self._rest_api_delete(osu_tunnel_name) diff --git a/src/device/service/drivers/ietf_actn/handlers/RestApiClient.py b/src/device/service/drivers/ietf_actn/handlers/RestApiClient.py new file mode 100644 index 0000000000000000000000000000000000000000..ea72d2f547a02f0dd80cf3804407bdff856298f7 --- /dev/null +++ b/src/device/service/drivers/ietf_actn/handlers/RestApiClient.py @@ -0,0 +1,104 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import copy, json, logging, requests +from requests.auth import HTTPBasicAuth +from typing import Any, Dict, List, Set, Union + +LOGGER = logging.getLogger(__name__) + +DEFAULT_BASE_URL = '/restconf/v2/data' +DEFAULT_SCHEME = 'https' +DEFAULT_TIMEOUT = 120 +DEFAULT_VERIFY = False + +HTTP_STATUS_OK = 200 +HTTP_STATUS_CREATED = 201 +HTTP_STATUS_ACCEPTED = 202 +HTTP_STATUS_NO_CONTENT = 204 + +HTTP_OK_CODES = { + HTTP_STATUS_OK, + HTTP_STATUS_CREATED, + HTTP_STATUS_ACCEPTED, + HTTP_STATUS_NO_CONTENT, +} + +class RestApiClient: + def __init__(self, address : str, port : int, settings : Dict[str, Any] = dict()) -> None: + username = settings.get('username') + password = settings.get('password') + self._auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None + + scheme = settings.get('scheme', DEFAULT_SCHEME ) + base_url = settings.get('base_url', DEFAULT_BASE_URL) + self._base_url = '{:s}://{:s}:{:d}{:s}'.format(scheme, address, int(port), base_url) + + self._timeout = int(settings.get('timeout', DEFAULT_TIMEOUT)) + self._verify = bool(settings.get('verify', DEFAULT_VERIFY)) + + def get( + self, object_name : str, url : str, + expected_http_status : Set[int] = {HTTP_STATUS_OK} + ) -> Union[Dict, List]: + MSG = 'Get {:s}({:s})' + LOGGER.info(MSG.format(str(object_name), str(url))) + response = requests.get( + self._base_url + url, + timeout=self._timeout, verify=self._verify, auth=self._auth + ) + LOGGER.info(' Response[{:s}]: {:s}'.format(str(response.status_code), str(response.content))) + + if response.status_code in expected_http_status: return json.loads(response.content) + + MSG = 'Could not get {:s}({:s}): status_code={:s} reply={:s}' + raise Exception(MSG.format(str(object_name), str(url), str(response.status_code), str(response))) + + def update( + self, object_name : str, url : str, data : Dict, headers : Dict[str, Any] = dict(), + expected_http_status : Set[int] = HTTP_OK_CODES + ) -> None: + headers = copy.deepcopy(headers) + if 'content-type' not in {header_name.lower() for header_name in headers.keys()}: + headers.update({'content-type': 'application/json'}) + + MSG = 'Create/Update {:s}({:s}, {:s})' + LOGGER.info(MSG.format(str(object_name), str(url), str(data))) + response = requests.post( + self._base_url + url, data=json.dumps(data), headers=headers, + timeout=self._timeout, verify=self._verify, auth=self._auth + ) + LOGGER.info(' Response[{:s}]: {:s}'.format(str(response.status_code), str(response.content))) + + if response.status_code in expected_http_status: return + + MSG = 'Could not create/update {:s}({:s}, {:s}): status_code={:s} reply={:s}' + raise Exception(MSG.format(str(object_name), str(url), str(data), str(response.status_code), str(response))) + + def delete( + self, object_name : str, url : str, + expected_http_status : Set[int] = HTTP_OK_CODES + ) -> None: + MSG = 'Delete {:s}({:s})' + LOGGER.info(MSG.format(str(object_name), str(url))) + response = requests.delete( + self._base_url + url, + timeout=self._timeout, verify=self._verify, auth=self._auth + ) + LOGGER.info(' Response[{:s}]: {:s}'.format(str(response.status_code), str(response.content))) + + if response.status_code in expected_http_status: return + + MSG = 'Could not delete {:s}({:s}): status_code={:s} reply={:s}' + raise Exception(MSG.format(str(object_name), str(url), str(response.status_code), str(response))) diff --git a/src/device/service/drivers/ietf_actn/handlers/__init__.py b/src/device/service/drivers/ietf_actn/handlers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfc943b68af13a11e562abbc8680ade71db8f02 --- /dev/null +++ b/src/device/service/drivers/ietf_actn/handlers/__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/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py b/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py index c79dde99a4d3c48f2f27ff00451f50aa1af9bee2..dc4946ca51913af9e9dfd39004ad0ec541c15b98 100644 --- a/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py +++ b/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ from common.tools.object_factory.EndPoint import json_endpoint_id from common.type_checkers.Checkers import chk_string, chk_type from device.service.driver_api._Driver import _Driver, RESOURCE_ENDPOINTS, RESOURCE_SERVICES from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum, get_import_topology -from device.service.drivers.ietf_l2vpn.TfsDebugApiClient import TfsDebugApiClient +from device.service.drivers.ietf_l2vpn.TfsApiClient import TfsApiClient from .Tools import connection_point, wim_mapping from .WimconnectorIETFL2VPN import WimconnectorIETFL2VPN @@ -56,7 +56,7 @@ class IetfL2VpnDriver(_Driver): wim_account = {'user': username, 'password': password} # Mapping updated dynamically with each request config = {'mapping_not_needed': False, 'service_endpoint_mapping': []} - self.dac = TfsDebugApiClient(self.address, int(self.port), scheme=scheme, username=username, password=password) + self.tac = TfsApiClient(self.address, int(self.port), scheme=scheme, username=username, password=password) self.wim = WimconnectorIETFL2VPN(wim, wim_account, config=config) self.conn_info = {} # internal database emulating OSM storage provided to WIM Connectors @@ -101,8 +101,8 @@ class IetfL2VpnDriver(_Driver): try: chk_string(str_resource_name, resource_key, allow_empty=False) if resource_key == RESOURCE_ENDPOINTS: - # return endpoints through debug-api and list-devices method - results.extend(self.dac.get_devices_endpoints(self.__import_topology)) + # return endpoints through TFS NBI API and list-devices method + results.extend(self.tac.get_devices_endpoints(self.__import_topology)) elif resource_key == RESOURCE_SERVICES: # return all services through reply = self.wim.get_all_active_connectivity_services() diff --git a/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py b/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py similarity index 94% rename from src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py rename to src/device/service/drivers/ietf_l2vpn/TfsApiClient.py index 2d3901695abc4c0124a7f443ffa59f825d4e13bf..8a03cb943839eab0b6bc8727e9892fa550d7287b 100644 --- a/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py +++ b/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ from requests.auth import HTTPBasicAuth from typing import Dict, List, Optional from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum -GET_DEVICES_URL = '{:s}://{:s}:{:d}/restconf/debug-api/devices' -GET_LINKS_URL = '{:s}://{:s}:{:d}/restconf/debug-api/links' +GET_DEVICES_URL = '{:s}://{:s}:{:d}/tfs-api/devices' +GET_LINKS_URL = '{:s}://{:s}:{:d}/tfs-api/links' TIMEOUT = 30 HTTP_OK_CODES = { @@ -44,13 +44,16 @@ MAPPING_DRIVER = { 'DEVICEDRIVER_XR' : 6, 'DEVICEDRIVER_IETF_L2VPN' : 7, 'DEVICEDRIVER_GNMI_OPENCONFIG' : 8, + 'DEVICEDRIVER_OPTICAL_TFS' : 9, + 'DEVICEDRIVER_IETF_ACTN' : 10, + 'DEVICEDRIVER_OC' : 11, } MSG_ERROR = 'Could not retrieve devices in remote TeraFlowSDN instance({:s}). status_code={:s} reply={:s}' LOGGER = logging.getLogger(__name__) -class TfsDebugApiClient: +class TfsApiClient: def __init__( self, address : str, port : int, scheme : str = 'http', username : Optional[str] = None, password : Optional[str] = None diff --git a/src/device/service/drivers/ietf_l2vpn/Tools.py b/src/device/service/drivers/ietf_l2vpn/Tools.py index 45dfa23c984e175c01efa77371e94454b98ea94e..3b0ab84875486370d72b4156e19547f5407d2d1a 100644 --- a/src/device/service/drivers/ietf_l2vpn/Tools.py +++ b/src/device/service/drivers/ietf_l2vpn/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/ietf_l2vpn/__init__.py b/src/device/service/drivers/ietf_l2vpn/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/device/service/drivers/ietf_l2vpn/__init__.py +++ b/src/device/service/drivers/ietf_l2vpn/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/microwave/IETFApiDriver.py b/src/device/service/drivers/microwave/IETFApiDriver.py index a8ef9094652378df8d1f1a55868849316b7ec95b..3588eb9293ade4a155f05f11e9d94271e0fbeaf0 100644 --- a/src/device/service/drivers/microwave/IETFApiDriver.py +++ b/src/device/service/drivers/microwave/IETFApiDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/microwave/Tools.py b/src/device/service/drivers/microwave/Tools.py index 4490c0f63fe6a517e5f31a5acd62208013bbaad0..fa74d3e7477e7cfcabac3ac9bdc2d9ac7eeaad0e 100644 --- a/src/device/service/drivers/microwave/Tools.py +++ b/src/device/service/drivers/microwave/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/microwave/__init__.py b/src/device/service/drivers/microwave/__init__.py index 2d3f6df3276f063cd9b414f47bba41b656682049..42b68d76cdc980efe931dc717e142d545f2305b4 100644 --- a/src/device/service/drivers/microwave/__init__.py +++ b/src/device/service/drivers/microwave/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/oc_driver/OCDriver.py b/src/device/service/drivers/oc_driver/OCDriver.py new file mode 100644 index 0000000000000000000000000000000000000000..89dc791f6982239c3eb878662b02f7f845c6746b --- /dev/null +++ b/src/device/service/drivers/oc_driver/OCDriver.py @@ -0,0 +1,315 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 anytree, copy, logging, pytz, queue, re, threading +#import lxml.etree as ET +from datetime import datetime, timedelta +from typing import Any, Dict, Iterator, List, Optional, Tuple, Union +from apscheduler.executors.pool import ThreadPoolExecutor +import xml.etree.ElementTree as ET +from apscheduler.job import Job +from apscheduler.jobstores.memory import MemoryJobStore +from apscheduler.schedulers.background import BackgroundScheduler +from ncclient.manager import Manager, connect_ssh +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.tools.client.RetryDecorator import delay_exponential +from common.type_checkers.Checkers import chk_length, chk_string, chk_type, chk_float +from device.service.driver_api.Exceptions import UnsupportedResourceKeyException +from device.service.driver_api._Driver import _Driver +from device.service.driver_api.AnyTreeTools import TreeNode, get_subnode, set_subnode_value #dump_subtree +#from .Tools import xml_pretty_print, xml_to_dict, xml_to_file +from .templates.Interfaces.interfaces import interface_template +from .templates.VPN.physical import create_optical_channel,add_transceiver,create_media_channel,create_optical_band +from .RetryDecorator import retry +from context.client.ContextClient import ContextClient +from common.proto.context_pb2 import ( + OpticalConfig, + ConfigActionEnum, Device, DeviceDriverEnum, DeviceId, DeviceList, DeviceOperationalStatusEnum, Empty + ,OpticalConfigId,Uuid) +from .templates.Tools import extractor +from .Tools import generate_uuid_from_numbers +DEBUG_MODE = False +logging.getLogger('ncclient.manager').setLevel(logging.DEBUG if DEBUG_MODE else logging.WARNING) +logging.getLogger('ncclient.transport.ssh').setLevel(logging.DEBUG if DEBUG_MODE else logging.WARNING) +logging.getLogger('apscheduler.executors.default').setLevel(logging.INFO if DEBUG_MODE else logging.ERROR) +logging.getLogger('apscheduler.scheduler').setLevel(logging.INFO if DEBUG_MODE else logging.ERROR) +logging.getLogger('monitoring-client').setLevel(logging.INFO if DEBUG_MODE else logging.ERROR) + +RE_GET_ENDPOINT_FROM_INTERFACE_KEY = re.compile(r'.*interface\[([^\]]+)\].*') +RE_GET_ENDPOINT_FROM_INTERFACE_XPATH = re.compile(r".*interface\[oci\:name\='([^\]]+)'\].*") + +# Collection of samples through NetConf is very slow and each request collects all the data. +# Populate a cache periodically (when first interface is interrogated). +# Evict data after some seconds, when data is considered as outdated + +SAMPLE_EVICTION_SECONDS = 30.0 # seconds +SAMPLE_RESOURCE_KEY = 'interfaces/interface/state/counters' +filter_fields= ["frequency","target-output-power","interface","operational-mode","line-port"] +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') +context_client= ContextClient() +port_xml_filter=f"/components/component[state[type='oc-platform-types:PORT']]/*" +transceiver_xml_filter="/components/component[state[type='oc-platform-types:TRANSCEIVER']]/*" +class NetconfSessionHandler: + def __init__(self, address : str, port : int, **settings) -> None: + self.__lock = threading.RLock() + self.__connected = threading.Event() + self.__address = address + self.__port = int(port) + self.__username = settings.get('username') + self.__password = settings.get('password') + self.__vendor = settings.get('vendor') + self.__version = settings.get('version', "1") + self.__key_filename = settings.get('key_filename') + self.__hostkey_verify = settings.get('hostkey_verify', True) + self.__look_for_keys = settings.get('look_for_keys', True) + self.__allow_agent = settings.get('allow_agent', True) + self.__force_running = settings.get('force_running', False) + self.__commit_per_rule = settings.get('commit_per_rule', False) + self.__device_params = settings.get('device_params', {}) + self.__manager_params = settings.get('manager_params', {}) + self.__nc_params = settings.get('nc_params', {}) + self.__message_renderer = settings.get('message_renderer','jinja') + self.__manager : Manager = None + self.__candidate_supported = False + + def connect(self): + with self.__lock: + self.__manager = connect_ssh( + host=self.__address, port=self.__port, username=self.__username, password=self.__password, + device_params=self.__device_params, manager_params=self.__manager_params, nc_params=self.__nc_params, + key_filename=self.__key_filename, hostkey_verify=self.__hostkey_verify, allow_agent=self.__allow_agent, + look_for_keys=self.__look_for_keys) + self.__candidate_supported = ':candidate' in self.__manager.server_capabilities + self.__connected.set() + + def disconnect(self): + if not self.__connected.is_set(): return + with self.__lock: + self.__manager.close_session() + + @property + def use_candidate(self): return self.__candidate_supported and not self.__force_running + + @property + def commit_per_rule(self): return self.__commit_per_rule + + @property + def vendor(self): return self.__vendor + + @property + def version(self): return self.__version + + @property + def message_renderer(self): return self.__message_renderer + + @RETRY_DECORATOR + def get(self, filter=None, with_defaults=None): # pylint: disable=redefined-builtin + with self.__lock: + config=self.__manager.get(filter=filter, with_defaults=with_defaults) + + return config + + @RETRY_DECORATOR + def edit_config( + self, config, target='running', default_operation=None, test_option=None, + error_option=None, format='xml' # pylint: disable=redefined-builtin + ): + + + + with self.__lock: + response= self.__manager.edit_config( + config, target=target, default_operation=default_operation, test_option=test_option, + error_option=error_option, format=format) + + + @RETRY_DECORATOR + def locked(self, target): + return self.__manager.locked(target=target) + + @RETRY_DECORATOR + def commit(self, confirmed=False, timeout=None, persist=None, persist_id=None): + return self.__manager.commit(confirmed=confirmed, timeout=timeout, persist=persist, persist_id=persist_id) + +DRIVER_NAME = 'oc' +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) +def edit_config( # edit the configuration of openconfig devices + netconf_handler : NetconfSessionHandler, logger : logging.Logger, resources : List[Tuple[str, Any]] + ,conditions, delete=False, + commit_per_rule=False, target='running', default_operation='merge', test_option=None, error_option=None, + format='xml' +): + #str_method = 'DeleteConfig' if delete else 'SetConfig' + results = [] + + str_config_messages=[] + + + if (conditions['edit_type']=='optical-channel'): + #transponder + str_config_messages = create_optical_channel(resources) + elif (conditions['edit_type']=='optical-band'): + #roadm optical-band + str_config_messages = create_optical_band(resources) + else : + #roadm media-channel + str_config_messages=create_media_channel(resources) + + + + for str_config_message in str_config_messages: + # configuration of the received templates + if str_config_message is None: raise UnsupportedResourceKeyException("CONFIG") + + netconf_handler.edit_config( # configure the device + config=str_config_message, target=target, default_operation=default_operation, + test_option=test_option, error_option=error_option, format=format) + if commit_per_rule: + netconf_handler.commit() # configuration commit + + #results[i] = True + results.append(True) + + +class OCDriver(_Driver): + def __init__(self, address : str, port : int,device_uuid=None, **settings) -> None: + super().__init__(DRIVER_NAME, address, port, **settings) + self.__logger = logging.getLogger('{:s}:[{:s}:{:s}]'.format(str(__name__), str(self.address), str(self.port))) + self.__lock = threading.Lock() + #self.__initial = TreeNode('.') + #self.__running = TreeNode('.') + self.__subscriptions = TreeNode('.') + self.__started = threading.Event() + self.__terminate = threading.Event() + self.__scheduler = BackgroundScheduler(daemon=True) # scheduler used to emulate sampling events + self.__scheduler.configure( + jobstores = {'default': MemoryJobStore()}, + executors = {'default': ThreadPoolExecutor(max_workers=1)}, # important! 1 = avoid concurrent requests + job_defaults = {'coalesce': False, 'max_instances': 3}, + timezone=pytz.utc) + self._temp_address=f"{address}{port}" + self.__out_samples = queue.Queue() + self.__netconf_handler = NetconfSessionHandler(self.address, self.port, **(self.settings)) + + self.__device_uuid=device_uuid + + self.Connect() + #self.GetConfig() + #self.__samples_cache = SamplesCache(self.__netconf_handler, self.__logger) + + def Connect(self) -> bool: + with self.__lock: + if self.__started.is_set(): return True + self.__netconf_handler.connect() + # Connect triggers activation of sampling events that will be scheduled based on subscriptions + self.__scheduler.start() + self.__started.set() + return True + + def Disconnect(self) -> bool: + with self.__lock: + # Trigger termination of loops and processes + self.__terminate.set() + # If not started, assume it is already disconnected + if not self.__started.is_set(): return True + # Disconnect triggers deactivation of sampling events + self.__scheduler.shutdown() + self.__netconf_handler.disconnect() + return True + + @metered_subclass_method(METRICS_POOL) + def GetInitialConfig(self) -> List[Tuple[str, Any]]: + with self.__lock: + return [] + + @metered_subclass_method(METRICS_POOL) + def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: + + + chk_type('resources', resource_keys, list) + results = [] + opticalConfig= OpticalConfig() + j=0 + + with self.__lock: + + + context_client.connect() + config={} + channels_lst=[] + transceivers={} + + try: + xml_data = self.__netconf_handler.get().data_xml + transceivers,interfaces,channels_lst,channel_namespace,endpoints=extractor(data_xml=xml_data,resource_keys=filter_fields,dic=config) + + + except Exception as e: # pylint: disable=broad-except + MSG = 'Exception retrieving {:s}' + self.__logger.info("error from getConfig %s",e) + self.__logger.exception(MSG.format(e)) + #results.append((resource_key, e)) # if validation fails, store the exception + + #///////////////////////// divider //////////////////////////////////////////////////////// + + + value_dic={} + value_dic["channels"]=channels_lst + value_dic["transceivers"]=transceivers + value_dic["interfaces"]=interfaces + value_dic["channel_namespace"]=channel_namespace + value_dic["endpoints"]=endpoints + + opticalConfig.config=json.dumps(value_dic) + opticalConfig.opticalconfig_id.opticalconfig_uuid=self.__device_uuid if self.__device_uuid is not None else "" + config_id=context_client.SetOpticalConfig(opticalConfig) + + context_client.close() + + return results + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources : List[Tuple[str, Any]],conditions:dict) -> List[Union[bool, Exception]]: + if len(resources) == 0: return [] + results=[] + with self.__lock: + if self.__netconf_handler.use_candidate: + with self.__netconf_handler.locked(target='candidate'): + results = edit_config( + self.__netconf_handler, self.__logger, resources,conditions, target='candidate', + commit_per_rule=self.__netconf_handler.commit_per_rule + ,) + else: + results = edit_config(self.__netconf_handler, self.__logger, resources,conditions=conditions + ) + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + with self.__lock: + if self.__netconf_handler.use_candidate: + with self.__netconf_handler.locked(target='candidate'): + results = edit_config( + self.__netconf_handler, self.__logger, resources, target='candidate', delete=True, + commit_per_rule=self.__netconf_handler.commit_per_rule) + else: + results = edit_config(self.__netconf_handler, self.__logger, resources, delete=True) + return results + + diff --git a/src/device/service/drivers/oc_driver/RetryDecorator.py b/src/device/service/drivers/oc_driver/RetryDecorator.py new file mode 100644 index 0000000000000000000000000000000000000000..6c2060ce969c1e575497594db7129480aa0d2607 --- /dev/null +++ b/src/device/service/drivers/oc_driver/RetryDecorator.py @@ -0,0 +1,46 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, time +from common.tools.client.RetryDecorator import delay_linear + +LOGGER = logging.getLogger(__name__) + +def retry(max_retries=0, delay_function=delay_linear(initial=0, increment=0), + prepare_method_name=None, prepare_method_args=[], prepare_method_kwargs={}): + def _reconnect(func): + def wrapper(self, *args, **kwargs): + if prepare_method_name is not None: + prepare_method = getattr(self, prepare_method_name, None) + if prepare_method is None: raise Exception('Prepare Method ({}) not found'.format(prepare_method_name)) + num_try, given_up = 0, False + while not given_up: + try: + return func(self, *args, **kwargs) + except OSError as e: + if str(e) != 'Socket is closed': raise + + num_try += 1 + given_up = num_try > max_retries + if given_up: raise Exception('Giving up... {:d} tries failed'.format(max_retries)) from e + if delay_function is not None: + delay = delay_function(num_try) + time.sleep(delay) + LOGGER.info('Retry {:d}/{:d} after {:f} seconds...'.format(num_try, max_retries, delay)) + else: + LOGGER.info('Retry {:d}/{:d} immediate...'.format(num_try, max_retries)) + + if prepare_method_name is not None: prepare_method(*prepare_method_args, **prepare_method_kwargs) + return wrapper + return _reconnect diff --git a/src/device/service/drivers/oc_driver/Tools.py b/src/device/service/drivers/oc_driver/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..526d91c868a1b91a63663f4e8e5d3c5c00c04465 --- /dev/null +++ b/src/device/service/drivers/oc_driver/Tools.py @@ -0,0 +1,38 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import hashlib +import uuid +import xml.dom.minidom, xmltodict + +def xml_pretty_print(data : str): + return xml.dom.minidom.parseString(data).toprettyxml() + +def xml_to_file(data : str, file_path : str) -> None: + with open(file_path, mode='w', encoding='UTF-8') as f: + f.write(xml_pretty_print(data)) + +def xml_to_dict(data : str): + return xmltodict.parse(data) + +def generate_uuid_from_numbers(code:str) ->str: + # Concatenate the numbers into a single string + + + # Generate a hash value using MD5 algorithm + hash_value = hashlib.md5(code.encode()).hexdigest() + + # Convert the hash value into a UUID + generated_uuid = uuid.UUID(hash_value) + + return str(generated_uuid) diff --git a/src/device/service/drivers/oc_driver/__init__.py b/src/device/service/drivers/oc_driver/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/device/service/drivers/oc_driver/__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/device/service/drivers/oc_driver/templates/Interfaces/__init__.py b/src/device/service/drivers/oc_driver/templates/Interfaces/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c7568fdb6e3b1446aa9412ad32a0a5948ba949b --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/Interfaces/__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/device/service/drivers/oc_driver/templates/Interfaces/interfaces.py b/src/device/service/drivers/oc_driver/templates/Interfaces/interfaces.py new file mode 100644 index 0000000000000000000000000000000000000000..87ba8835ac6f7ad66a709be90195e6597bc2bf6c --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/Interfaces/interfaces.py @@ -0,0 +1,43 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 yattag import Doc, indent +import logging +def interface_template (interface_data:dict) : + data={"name":"eth0","ip":"192.168.1.1","prefix-length":'24'} + doc, tag, text = Doc().tagtext() + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('interfaces', xmlns="http://openconfig.net/yang/interfaces"): + with tag('interface'): + with tag('name'):text(interface_data['name']) + with tag('config'): + with tag('name'):text(interface_data['name']) + with tag("enabled"):text(interface_data["enabled"]) + with tag('ipv4',xmlns="http://openconfig.net/yang/interfaces/ip") : + with tag("addresses"): + with tag("address"): + with tag('ip'):text(interface_data["ip"]) + with tag('config'): + with tag('ip'):text(interface_data["ip"]) + with tag('prefix-length'):text(interface_data["prefix-length"]) + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '\r\n' + ) + logging.info("interfaces %s",result) + return result + + \ No newline at end of file diff --git a/src/device/service/drivers/oc_driver/templates/Tools.py b/src/device/service/drivers/oc_driver/templates/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..98086adf7bcc1877ca719fec6ef3f7b9dc890941 --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/Tools.py @@ -0,0 +1,257 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import re,logging +import json +import lxml.etree as ET +from typing import Collection, Dict, Any + +from yattag import Doc, indent +from .VPN.physical import create_optical_channel +def add_value_from_tag(target : Dict, field_name: str, field_value : ET.Element, cast=None) -> None: + if isinstance(field_value,str) or field_value is None or field_value.text is None: return + field_value = field_value.text + if cast is not None: field_value = cast(field_value) + target[field_name] = field_value + +def add_value_from_collection(target : Dict, field_name: str, field_value : Collection) -> None: + if field_value is None or len(field_value) == 0: return + target[field_name] = field_value + +""" +# Method Name: generate_templates + +# Parameters: + - resource_key: [str] Variable to identify the rule to be executed. + - resource_value: [str] Variable with the configuration parameters of the rule to be executed. + - delete: [bool] Variable to identify whether to create or delete the rule. + - vendor: [str] Variable to identify the vendor of the equipment to be configured. + +# Functionality: + This method generates the template to configure the equipment using pyangbind. + To generate the template the following steps are performed: + 1) Get the first parameter of the variable "resource_key" to identify the main path of the rule. + 2) Search for the specific configuration path + 3) Call the method with the configuration parameters (resource_data variable). + +# Return: + [dict] Set of templates generated according to the configuration rule +""" +def generate_templates(resource_key: str, resource_value: str, channel:str) -> str: # template management to be configured + + result_templates = [] + data={} + data['name']=channel + data['resource_key']=resource_key + data['value']=resource_value + result_templates.append(create_physical_config(data)) + + return result_templates +def extract_channel_xmlns (data_xml:str,is_opticalband:bool): + xml_bytes = data_xml.encode("utf-8") + root = ET.fromstring(xml_bytes) + + namespace=None + channels=None + + if (not is_opticalband) : + + optical_channel_namespaces = { + 'ns': 'urn:ietf:params:xml:ns:netconf:base:1.0', + 'oc': 'http://openconfig.net/yang/platform', + } + + channels= root.find('.//{*}optical-channel',optical_channel_namespaces) + if channels is not None : + optical_channel_namespace = channels.tag.replace("optical-channel", "") + namespace=optical_channel_namespace.replace("{", "").replace("}", "") + else : + optical_band_namespaces= { + 'oc':'http://openconfig.net/yang/wavelength-router' + } + + channels= root.find('.//{*}optical-bands',optical_band_namespaces) + if channels is not None: + optical_channel_namespace = channels.tag.replace("optical-bands", "") + namespace=optical_channel_namespace.replace("{", "").replace("}", "") + + + return namespace +def extract_channels_based_on_channelnamespace (xml_data:str,channel_namespace:str,is_opticalband:bool): + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + channels=[] + + # Find the component names whose children include the "optical-channel" element + if (not is_opticalband): + namespace = {'namespace': 'http://openconfig.net/yang/platform','cn':channel_namespace} + + component_names = root.findall('.//namespace:component[cn:optical-channel]',namespace) + + # Extract and print the component names + for component in component_names: + component_name = component.find('namespace:name', namespace).text + channels.append({"index":component_name}) + else : + namespaces = { + 'wr': 'http://openconfig.net/yang/wavelength-router', + 'fs': channel_namespace + } + + wl = root.findall('.//fs:optical-band',namespaces=namespaces) + + for component in wl : + index=component.find('.//fs:index',namespaces).text + dest_port_name = component.find('.//fs:dest/fs:config/fs:port-name', namespaces).text + + # Retrieve port-name for source (assuming it exists in the XML structure) + source_port_name = component.find('.//fs:source/fs:config/fs:port-name', namespaces).text + channels.append({"index":index,"endpoints":(source_port_name,dest_port_name)}) + + # Retrieve port-name for dest + + return channels +def extract_channels_based_on_type (xml_data:str): + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + + namespace = {'oc': 'http://openconfig.net/yang/platform', 'typex': 'http://openconfig.net/yang/platform-types'} + channel_names = [] + components = root.findall('.//oc:component', namespace) + for component in components: + + type_element = component.find('.//oc:state/oc:type[.="oc-opt-types:OPTICAL_CHANNEL"]',namespaces=namespace) + + if type_element is not None and type_element.text == 'oc-opt-types:OPTICAL_CHANNEL': + name_element = component.find('oc:name', namespace) + if name_element is not None: + channel_names.append(name_element.text) + return channel_names + +def extract_value(resource_key:str,xml_data:str,dic:dict,channel_name:str,channel_namespace:str): + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + + namespace = {'oc': 'http://openconfig.net/yang/platform', + 'td': channel_namespace} + + element = root.find(f'.//oc:component[oc:name="{channel_name}"]', namespace) + + if element is not None: + parameter= element.find(f'.//td:{resource_key}',namespace) + if (parameter is not None): + value = parameter.text + dic[resource_key]=value + + else: + print(" element not found.") + + return dic + + +def extract_port_value (xml_string:list,port_name:str): + + xml_bytes = xml_string.encode("utf-8") + root = ET.fromstring(xml_bytes) + + namespace = {"oc": "http://openconfig.net/yang/platform"} + component=root.find(f".//oc:component[oc:name='{port_name}']", namespace) + onos_index = component.find( + f".//oc:property//oc:state/oc:name[.='onos-index']/../oc:value", namespace + ).text + + return (port_name,onos_index) + + + + +def extract_tranceiver (data_xml:str,dic:dict): + xml_bytes = data_xml.encode("utf-8") + root = ET.fromstring(xml_bytes) + namespaces = { + 'ns': 'urn:ietf:params:xml:ns:netconf:base:1.0', + 'oc': 'http://openconfig.net/yang/platform', + 'oc-terminal': 'http://openconfig.net/yang/terminal-device', + 'oc-platform-types': 'http://openconfig.net/yang/platform-types' + } + + + transceiver_components = root.findall('.//oc:component/oc:state/[oc:type="oc-platform-types:TRANSCEIVER"]../oc:state/oc:name', namespaces) + + component_names = [component.text for component in transceiver_components] + dic['transceiver']=component_names + return dic +def extract_interface (xml_data:str,dic:dict): + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + namespaces = { + 'ns': 'urn:ietf:params:xml:ns:netconf:base:1.0', + 'oc': 'http://openconfig.net/yang/interfaces', + } + ip_namespaces = { + 'oc': 'http://openconfig.net/yang/interfaces', + 'ip': 'http://openconfig.net/yang/interfaces/ip', + } + + interfaces = root.findall('.//oc:interfaces/oc:interface', namespaces) + interface_names = [interface.find('oc:name', namespaces).text for interface in interfaces] + interface_enabled=[interface.find('oc:config/oc:enabled', namespaces).text for interface in interfaces] + ip_address_element = root.find('.//ip:ip', ip_namespaces) + interface_prefix_length=root.find('.//ip:prefix-length',ip_namespaces) + if (len(interface_names) > 0): + dic['interface']={"name":interface_names[0],'ip':ip_address_element.text,'enabled':interface_enabled[0],"prefix-length":interface_prefix_length.text} + else : + dic['interface']={} + return dic +def has_opticalbands(xml_data:str): + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + + has_opticalbands=False + elements= root.find('.//{*}optical-bands') + + if (elements is not None and len(elements) >0): + has_opticalbands=True + else : + has_opticalbands=False + return has_opticalbands + +def extractor(data_xml:str,resource_keys:list,dic:dict): + + endpoints=[] + is_opticalband=has_opticalbands(xml_data=data_xml) + + channel_namespace=extract_channel_xmlns(data_xml=data_xml,is_opticalband=is_opticalband) + # channel_names=extract_channels_based_on_type(xml_data=data_xml) + # if len(channel_names)==0 : + channel_names= extract_channels_based_on_channelnamespace(xml_data=data_xml,channel_namespace=channel_namespace,is_opticalband=is_opticalband) + + lst_dic=[] + if (is_opticalband): + endpoints=channel_names + else: + + for channel_name in channel_names: + dic={} + for resource_key in resource_keys : + + if (resource_key != 'interface'): + dic=extract_value(dic=dic,resource_key=resource_key,xml_data=data_xml,channel_name=channel_name,channel_namespace=channel_namespace) + dic["name"]=channel_name + endpoints.append({"endpoint_uuid":{"uuid":channel_name}}) + lst_dic.append(dic) + transceivers_dic=extract_tranceiver(data_xml=data_xml,dic={}) + interfaces_dic=extract_interface(xml_data=data_xml,dic={}) + + return [transceivers_dic,interfaces_dic,lst_dic,channel_namespace,endpoints] \ No newline at end of file diff --git a/src/device/service/drivers/oc_driver/templates/VPN/__init__.py b/src/device/service/drivers/oc_driver/templates/VPN/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/VPN/__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/device/service/drivers/oc_driver/templates/VPN/physical.py b/src/device/service/drivers/oc_driver/templates/VPN/physical.py new file mode 100644 index 0000000000000000000000000000000000000000..0db6ffa5065ad3013250c3bde4dd160d8c12a498 --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/VPN/physical.py @@ -0,0 +1,210 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 yattag import Doc, indent +import logging + +def seperate_port_config(resources:list,unwanted_keys:list[str])->list[list,dict,str]: + config=[] + ports={} + index=None + for item in resources : + + if (item['value'] is not None and (item['resource_key'] not in unwanted_keys)): + config.append({'resource_key':item['resource_key'], 'value':item['value']} ) + #if (item['resource_key'] == 'destination_port' or item['resource_key'] == 'source_port') and item['value'] is not None: + # ports[item['resource_key']]=item['value'] + if (item['resource_key'] == 'destination_port' or item['resource_key'] == 'source_port'): + ports[item['resource_key']]=item['value'] + if (item['resource_key']=='index' and item['value'] is not None) : + index=item['value'] + + return [config,ports,index] + + +def create_optical_channel(resources): + + unwanted_keys=['destination_port','source_port','channel_namespace','optical-band-parent','index', 'name'] + results =[] + data={"name":i["value"] for i in resources if i["resource_key"]=="channel_name"} + data["channel_namespace"]=next((i["value"] for i in resources if i["resource_key"] == "channel_namespace"), None) + config,ports,index=seperate_port_config(resources,unwanted_keys=unwanted_keys) + + port_val = "" + if 'destination_port' in ports and ports['destination_port'][0] is not None: + port_val = ports['destination_port'][0] + else: + port_val = ports['source_port'][0] + + + doc, tag, text = Doc().tagtext() + #with tag('config'): + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('components', xmlns="http://openconfig.net/yang/platform"): + with tag('component'): + with tag('name'):text("channel-{}".format(port_val)) + with tag('config'): + with tag('name'):text("channel-{}".format(port_val)) + with tag('optical-channel',xmlns=data["channel_namespace"]): + with tag('config'): + for resource in config: + with tag(resource['resource_key']):text(resource['value']) + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + + + return results + +def add_transceiver (transceiver_name:str): + + doc, tag, text = Doc().tagtext() + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('components', xmlns="http://openconfig.net/yang/platform"): + with tag('component'): + with tag('name'):text(transceiver_name) + with tag("config"): + with tag('name'):text(transceiver_name) + with tag("state"): + with tag('name'):text(transceiver_name) + with tag("type",('xmlns:oc-platform-types',"http://openconfig.net/yang/platform-types")):text("oc-platform-types:TRANSCEIVER") + with tag("transceiver",xmlns="http://openconfig.net/yang/platform/transceiver"): + with tag("config"): + with tag("enabled"):text("true") + with tag("form-factor-preconf",("xmlns:oc-opt-types","http://openconfig.net/yang/transport-types")):text("oc-opt-types:QSFP56_DD_TYPE1") + with tag("ethernet-pmd-preconf",("xmlns:oc-opt-types","http://openconfig.net/yang/transport-types")):text("oc-opt-types:ETH_400GBASE_ZR") + with tag("fec-mode",("xmlns:oc-platform-types","http://openconfig.net/yang/platform-types")):text("oc-platform-types:FEC_AUTO") + with tag("module-functional-type",("xmlns:oc-opt-types","http://openconfig.net/yang/transport-types")):text("oc-opt-types:TYPE_DIGITAL_COHERENT_OPTIC") + with tag("state"): + with tag("enabled"):text("true") + with tag("form-factor-preconf",("xmlns:oc-opt-types","http://openconfig.net/yang/transport-types")):text("oc-opt-types:QSFP56_DD_TYPE1") + with tag("ethernet-pmd-preconf",("xmlns:oc-opt-types","http://openconfig.net/yang/transport-types")):text("oc-opt-types:ETH_400GBASE_ZR") + with tag("fec-mode",("xmlns:oc-platform-types","http://openconfig.net/yang/platform-types")):text("oc-platform-types:FEC_AUTO") + with tag("module-functional-type",("xmlns:oc-opt-types","http://openconfig.net/yang/transport-types")):text("oc-opt-types:TYPE_DIGITAL_COHERENT_OPTIC") + with tag("vendor"):text("Cisco") + with tag("vendor-part"):text("400zr-QSFP-DD") + with tag("vendor-rev"):text("01") + with tag("serial-no"):text("1567321") + with tag("physical-channels"): + with tag("channel"): + with tag("index"):text("1") + with tag("config"): + with tag("index"):text("1") + with tag("associated-optical-channel"):text("channel-4") + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + + + return result + +def create_optical_band (resources) : + results =[] + unwanted_keys=['destination_port','source_port','channel_namespace','frequency','optical-band-parent'] + config,ports,index= seperate_port_config(resources,unwanted_keys=unwanted_keys) + doc, tag, text = Doc().tagtext() + #with tag('config'): + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): + with tag('optical-bands',xmlns="http://flex-scale-project.eu/yang/flex-scale-mg-on"): + n = 0 + if 'destination_port' in ports: + n = len(ports['destination_port']) + else: + n = len(ports['source_port']) + for i in range(0, n): + #with tag('optical-band', operation="create"): + with tag('optical-band'): + if index is not None: + with tag('index'):text(str(int(index)+i)) + with tag('config'): + #if index is not None: + # with tag('index'):text(str(int(index)+i)) + for resource in config: + if resource['resource_key'] == "index": + with tag('index'):text(str(int(index)+i)) + else: + with tag(resource['resource_key']):text(resource['value']) + with tag('admin-status'):text('ENABLED') + #with tag('fiber-parent'):text(ports['destination_port'] if 'destination_port' in ports else ports['source_port']) + if ('destination_port' in ports) and (ports['destination_port'][i] is not None): + with tag('dest'): + with tag('config'): + with tag('port-name'):text(ports['destination_port'][i]) + if ('source_port' in ports) and (ports['source_port'][i] is not None): + with tag('source'): + with tag('config'): + with tag('port-name'):text(ports['source_port'][i]) + + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + return results + +def create_media_channel (resources): + results=[] + unwanted_keys=['destination_port','source_port','channel_namespace','frequency','operational-mode', 'optical-band-parent'] + config,ports,index= seperate_port_config(resources,unwanted_keys=unwanted_keys) + doc, tag, text = Doc().tagtext() + #with tag('config'): + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): + with tag('media-channels'): + n = 0 + if 'destination_port' in ports: + n = len(ports['destination_port']) + else: + n = len(ports['source_port']) + for i in range(0, n): + #with tag('channel', operation="create"): + with tag('channel'): + with tag('index'):text(str(int(index)+i)) + with tag('config'): + #with tag('index'):text(index) + for resource in config: + + if resource['resource_key'] == "index": + with tag('index'):text(str(int(index)+i)) + else: + with tag(resource['resource_key']):text(resource['value']) + if ('destination_port' in ports) and (ports['destination_port'][i] is not None): + with tag('dest'): + with tag('config'): + with tag('port-name'):text(ports['destination_port'][i]) + if ('source_port' in ports) and (ports['source_port'][i] is not None): + with tag('source'): + with tag('config'): + with tag('port-name'):text(ports['source_port'][i]) + + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + return results + + + \ No newline at end of file diff --git a/src/device/service/drivers/oc_driver/templates/__init__.py b/src/device/service/drivers/oc_driver/templates/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/__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/device/service/drivers/openconfig/OpenConfigDriver.py b/src/device/service/drivers/openconfig/OpenConfigDriver.py index 8c6e07b3f00a975a909161006e59e89de0ceaaf3..fd36e2dc40e38a125f1812f00eeb304106a40c8a 100644 --- a/src/device/service/drivers/openconfig/OpenConfigDriver.py +++ b/src/device/service/drivers/openconfig/OpenConfigDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import time import json import anytree, copy, logging, pytz, queue, re, threading #import lxml.etree as ET @@ -237,6 +238,8 @@ def edit_config( test_option=test_option, error_option=error_option, format=format) if commit_per_rule: netconf_handler.commit() # configuration commit + if 'table_connections' in resource_key: + time.sleep(5) # CPU usage might exceed critical level after route redistribution, BGP daemon needs time to reload #results[i] = True results.append(True) diff --git a/src/device/service/drivers/openconfig/RetryDecorator.py b/src/device/service/drivers/openconfig/RetryDecorator.py index deb1b4ed89346a99e9821f049375a1977914832b..6c2060ce969c1e575497594db7129480aa0d2607 100644 --- a/src/device/service/drivers/openconfig/RetryDecorator.py +++ b/src/device/service/drivers/openconfig/RetryDecorator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/openconfig/Tools.py b/src/device/service/drivers/openconfig/Tools.py index a736bd1ae198205fe4a291a7e3037602635f23b9..ac7f3d7c3c5be3220737e23545acae7b894f3507 100644 --- a/src/device/service/drivers/openconfig/Tools.py +++ b/src/device/service/drivers/openconfig/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/openconfig/__init__.py b/src/device/service/drivers/openconfig/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/service/drivers/openconfig/__init__.py +++ b/src/device/service/drivers/openconfig/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/openconfig/templates/ACL/ACL_multivendor.py b/src/device/service/drivers/openconfig/templates/ACL/ACL_multivendor.py index 91d05d3d18f1b19374a38f9149dc7bd6b7c518b6..47e7567232853d699158b2b4f7f2ce60c216d6d0 100755 --- a/src/device/service/drivers/openconfig/templates/ACL/ACL_multivendor.py +++ b/src/device/service/drivers/openconfig/templates/ACL/ACL_multivendor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/openconfig/templates/ACL/__init__.py b/src/device/service/drivers/openconfig/templates/ACL/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/service/drivers/openconfig/templates/ACL/__init__.py +++ b/src/device/service/drivers/openconfig/templates/ACL/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/openconfig/templates/Acl.py b/src/device/service/drivers/openconfig/templates/Acl.py index c316772a56fefc1a7a27eef526f8c4f5a2e0aa83..cc3da6434fba0442fc11a33b4d8e380ad4e50bd8 100644 --- a/src/device/service/drivers/openconfig/templates/Acl.py +++ b/src/device/service/drivers/openconfig/templates/Acl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/openconfig/templates/EndPoints.py b/src/device/service/drivers/openconfig/templates/EndPoints.py index 0e86af7af012131561388b15377c831ce5ad1959..882cf2147e7ea913d6c4f00751698cc5b2ca3043 100644 --- a/src/device/service/drivers/openconfig/templates/EndPoints.py +++ b/src/device/service/drivers/openconfig/templates/EndPoints.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/openconfig/templates/Interfaces.py b/src/device/service/drivers/openconfig/templates/Interfaces.py index 3d4c73fc11c686b4d4e181a1f98ed3f5922f7c15..137d405c05866fba5ebdb25215e0190c1cd36388 100644 --- a/src/device/service/drivers/openconfig/templates/Interfaces.py +++ b/src/device/service/drivers/openconfig/templates/Interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,10 +31,6 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]: interface = {} - interface_name = xml_interface.find('oci:name', namespaces=NAMESPACES) - if interface_name is None or interface_name.text is None: continue - add_value_from_tag(interface, 'name', interface_name) - #interface_type = xml_interface.find('oci:config/oci:type', namespaces=NAMESPACES) #add_value_from_tag(interface, 'type', interface_type) @@ -42,8 +38,11 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]: interface_type = xml_interface.find('oci:config/oci:type', namespaces=NAMESPACES) elif xml_interface.find('oci:state/oci:type', namespaces=NAMESPACES) is not None: interface_type = xml_interface.find('oci:state/oci:type', namespaces=NAMESPACES) - else: - interface_type = '' + else: continue + + interface_name = xml_interface.find('oci:name', namespaces=NAMESPACES) + if interface_name is None or interface_name.text is None: continue + add_value_from_tag(interface, 'name', interface_name) # Get the type of interface according to the vendor's type if 'ianaift:' in interface_type.text: diff --git a/src/device/service/drivers/openconfig/templates/Inventory.py b/src/device/service/drivers/openconfig/templates/Inventory.py index 2ae67ba47dad162b8c8e4a15d3004b27359d4ca2..9897f04f9df2dd6c1ce4010d9ad9878ae0d04242 100644 --- a/src/device/service/drivers/openconfig/templates/Inventory.py +++ b/src/device/service/drivers/openconfig/templates/Inventory.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -54,7 +54,6 @@ XPATH_PORTS = "//ocp:components/ocp:component" def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]: response = [] - LOGGER.debug("InventoryPrueba") parent_types = {} for xml_component in xml_data.xpath(XPATH_PORTS, namespaces=NAMESPACES): LOGGER.info('xml_component inventario = {:s}'.format(str(ET.tostring(xml_component)))) @@ -78,9 +77,9 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]: add_value_from_tag(inventory['attributes'], 'location', component_location) component_type = xml_component.find('ocp:state/ocp:type', namespaces=NAMESPACES) - component_type.text = component_type.text.replace('oc-platform-types:','') - if component_type is None: continue - add_value_from_tag(inventory, 'class', component_type) + if component_type is not None: + component_type.text = component_type.text.replace('oc-platform-types:','') + add_value_from_tag(inventory, 'class', component_type) if inventory['class'] == 'CPU' or inventory['class'] == 'STORAGE': continue diff --git a/src/device/service/drivers/openconfig/templates/Namespace.py b/src/device/service/drivers/openconfig/templates/Namespace.py index bdc27a1ff30d5ac18b9233cdd420cd8493e7a419..3c1ed0ad7985520ccc6f7d334c6ad049f5f5d4f1 100644 --- a/src/device/service/drivers/openconfig/templates/Namespace.py +++ b/src/device/service/drivers/openconfig/templates/Namespace.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/openconfig/templates/NetworkInstances.py b/src/device/service/drivers/openconfig/templates/NetworkInstances.py index c00995b3aa4060363113f5743e2687ca6d1e7fd9..7bed281812c4097124f4794a7d6232993b125957 100644 --- a/src/device/service/drivers/openconfig/templates/NetworkInstances.py +++ b/src/device/service/drivers/openconfig/templates/NetworkInstances.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/openconfig/templates/RoutingPolicy.py b/src/device/service/drivers/openconfig/templates/RoutingPolicy.py index acafa021824f94f929e849117824e8120974d0b1..e7ac614809528077577ff14a6b376bb20aeed390 100644 --- a/src/device/service/drivers/openconfig/templates/RoutingPolicy.py +++ b/src/device/service/drivers/openconfig/templates/RoutingPolicy.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]: #LOGGER.info('xml_policy_definition = {:s}'.format(str(ET.tostring(xml_policy_definition)))) policy_definition = {} - + statement_name = '' policy_name = xml_policy_definition.find('ocrp:name', namespaces=NAMESPACES) if policy_name is None or policy_name.text is None: continue add_value_from_tag(policy_definition, 'policy_name', policy_name) diff --git a/src/device/service/drivers/openconfig/templates/Tools.py b/src/device/service/drivers/openconfig/templates/Tools.py index 79bebef5179b3464c33ce7fa0663b0cd35a51fc0..c4ef22b1e3c11f1e512026bea8e2122ab703a9e5 100644 --- a/src/device/service/drivers/openconfig/templates/Tools.py +++ b/src/device/service/drivers/openconfig/templates/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -61,7 +61,8 @@ def generate_templates(resource_key: str, resource_value: str, delete: bool,vend elif "inter_instance_policies" in resource_key: result_templates.append(associate_RP_to_NI(data)) elif "protocols" in resource_key: - if vendor == "ADVA": result_templates.append(add_protocol_NI(data, vendor, delete)) + if vendor is None or vendor == "ADVA": + result_templates.append(add_protocol_NI(data, vendor, delete)) elif "table_connections" in resource_key: result_templates.append(create_table_conns(data, delete)) elif "interface" in resource_key: diff --git a/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py b/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py index d6f72ee6556fd5ca5dc08c5349a41e0db736bd4d..ab57ce3bd26e9183f931a1a6e13a44a9a85bef7d 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py +++ b/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -54,7 +54,7 @@ def create_If_SubIf(data,vendor, DEL): with tag('enabled'):text('true') with tag('subinterfaces'): with tag('subinterface'): - if vendor == 'ADVA': + if vendor is None or vendor == 'ADVA': with tag('index'): text('0') with tag('config'): with tag('index'): text('0') @@ -65,8 +65,10 @@ def create_If_SubIf(data,vendor, DEL): with tag('single-tagged'): with tag('config'): with tag('vlan-id'):text(data['vlan_id']) - if "l3ipvlan" in data['type']: + if "l3ipvlan" in data['type'] and 'address_ip' in data: with tag('ipv4', xmlns="http://openconfig.net/yang/interfaces/ip"): + if 'mtu' in data: + with tag('mtu'):text(data['mtu']) with tag('addresses'): with tag('address'): with tag('ip'):text(data['address_ip']) diff --git a/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py b/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py index c4d494ea61a307fbb5a53780f4ab37af2e7091a4..157dd0ab89a0eb625d428dd95109faabc399bcf0 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py +++ b/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -64,10 +64,12 @@ def create_NI(parameters,vendor,DEL): elif "L3VRF" in parameters['type']: with tag('config'): with tag('name'):text(parameters['name']) - if vendor == "ADVA": + if "router_id" in parameters: + with tag('router-id'):text(parameters['router_id']) + if vendor is None or vendor == 'ADVA': with tag('type', 'xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types"'):text('oc-ni-types:',parameters['type']) with tag('route-distinguisher'):text(parameters['route_distinguisher']) - if vendor == "ADVA": + if vendor is None or vendor == 'ADVA': with tag('encapsulation'): with tag('config'): with tag('encapsulation-type', 'xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types"') :text('oc-ni-types:MPLS') @@ -123,14 +125,29 @@ def add_protocol_NI(parameters,vendor, DEL): with tag('config'): with tag('identifier', 'xmlns:oc-pol-types="http://openconfig.net/yang/policy-types"'):text('oc-pol-types:',parameters['identifier']) with tag('name') :text(parameters['protocol_name']) + with tag('enabled'): text('true') if "BGP" in parameters['identifier']: with tag('bgp'): + with tag('name'): text(parameters['as']) with tag('global'): with tag('config'): with tag('as') :text(parameters['as']) - if "router-id" in parameters: - with tag('router-id'):text(parameters['router-id']) - if vendor == "ADVA": + if "router_id" in parameters: + with tag('router-id'):text(parameters['router_id']) + if 'neighbors' in parameters: + with tag('neighbors'): + for neighbor in parameters['neighbors']: + with tag('neighbor'): + with tag('neighbor-address'): text(neighbor['ip_address']) + with tag('afi-safis'): + with tag('afi-safi', 'xmlns:oc-bgp-types="http://openconfig.net/yang/bgp-types"'): + with tag('afi-safi-name'): text('oc-bgp-types:IPV4_UNICAST') + with tag('enabled'): text('true') + with tag('config'): + with tag('neighbor-address'): text(neighbor['ip_address']) + with tag('enabled'): text('true') + with tag('peer-as'): text(parameters['as']) + if vendor is None or vendor == 'ADVA': with tag('tables'): with tag('table'): with tag('protocol', 'xmlns:oc-pol-types="http://openconfig.net/yang/policy-types"'):text('oc-pol-types:',parameters['identifier']) @@ -177,6 +194,9 @@ def associate_If_to_NI(parameters, DEL): else: with tag('network-instance'): with tag('name'):text(parameters['name']) + with tag('config'): + with tag('name'):text(parameters['name']) + with tag('type', 'xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types"'):text('oc-ni-types:',parameters['type']) with tag('interfaces'): with tag('interface'): with tag('id'):text(parameters['id']) @@ -315,7 +335,7 @@ def create_table_conns(parameters,DEL): with tag('table-connection','xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="delete"'): with tag('src-protocol','xmlns:oc-pol-types="http://openconfig.net/yang/policy-types"'): text('oc-pol-types:',parameters['src_protocol']) with tag('dst-protocol','xmlns:oc-pol-types="http://openconfig.net/yang/policy-types"'): text('oc-pol-types:',parameters['dst_protocol']) - with tag('address-family', 'xmlns:oc-types="http://openconfig.net/yang/openconfig-types"'):text('oc-types:',parameters['dst_protocol']) + with tag('address-family', 'xmlns:oc-types="http://openconfig.net/yang/openconfig-types"'):text('oc-types:',parameters['address_family']) else: with tag('table-connections'): with tag('table-connection'): @@ -326,6 +346,8 @@ def create_table_conns(parameters,DEL): with tag('src-protocol','xmlns:oc-pol-types="http://openconfig.net/yang/policy-types"'): text('oc-pol-types:',parameters['src_protocol']) with tag('dst-protocol','xmlns:oc-pol-types="http://openconfig.net/yang/policy-types"'): text('oc-pol-types:',parameters['dst_protocol']) with tag('address-family', 'xmlns:oc-types="http://openconfig.net/yang/openconfig-types"'):text('oc-types:',parameters['address_family']) + # for OCNOS: check if needed + #with tag('dst-instance', 'xmlns="http://www.ipinfusion.com/yang/ocnos/ipi-oc-ni-augments"'):text('65000') if len(parameters['default_import_policy']) != 0: with tag('default-import-policy'):text(parameters['default_import_policy']) result = indent( diff --git a/src/device/service/drivers/openconfig/templates/VPN/Routing_policy.py b/src/device/service/drivers/openconfig/templates/VPN/Routing_policy.py index 54e6c1c013fe0b0c84af0483def8dc944b4568a8..69fdd2cc52ec179665b6fc5a766b04b0e6c2a6ae 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/Routing_policy.py +++ b/src/device/service/drivers/openconfig/templates/VPN/Routing_policy.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -133,14 +133,14 @@ data_2 = {'ext_community_member' : '65001:101', 'ext_community_set_name' : 'set_srv_101_a'} print('\nRouting Policy Statement - CREATE\n') -print(rp_statement(data_1, False)) +print(create_rp_statement(data_1, False)) print('\nRouting Policy Statement - DELETE\n') -print(rp_statement(data_1, True)) +print(create_rp_statement(data_1, True)) print('\nRouting Policy Defined Set - CREATE\n') -print(rp_defined_set(data_2, False)) +print(create_rp_def(data_2, False)) print('\nRouting Policy Defined Set - DELETE\n') -print(rp_defined_set(data_2, True)) +print(create_rp_def(data_2, True)) ''' ''' diff --git a/src/device/service/drivers/openconfig/templates/VPN/__init__.py b/src/device/service/drivers/openconfig/templates/VPN/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/__init__.py +++ b/src/device/service/drivers/openconfig/templates/VPN/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/openconfig/templates/__init__.py b/src/device/service/drivers/openconfig/templates/__init__.py index 87eea1f0b6673c4bff3222598d81a16b383b4c3b..969ca9f60bd870ca7474f8b06a8b1948a03e84f6 100644 --- a/src/device/service/drivers/openconfig/templates/__init__.py +++ b/src/device/service/drivers/openconfig/templates/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -121,7 +121,8 @@ def compose_config( # template generation templates.append(JINJA_ENV.get_template('acl/acl-set/acl-entry/edit_config.xml')) templates.append(JINJA_ENV.get_template('acl/interfaces/ingress/edit_config.xml')) data : Dict[str, Any] = json.loads(resource_value) - operation = 'delete' if delete else 'merge' + operation = 'delete' if delete else 'merge' # others + #operation = 'delete' if delete else '' # ipinfusion? return [ '{:s}'.format( diff --git a/src/device/service/drivers/openconfig/templates/interface/subinterface/edit_config.xml b/src/device/service/drivers/openconfig/templates/interface/subinterface/edit_config.xml index e441004006e4cdd445f1d0244a9582b57956af40..2d8d3ee07b3a8df20a4b51be755e18b7aec982de 100644 --- a/src/device/service/drivers/openconfig/templates/interface/subinterface/edit_config.xml +++ b/src/device/service/drivers/openconfig/templates/interface/subinterface/edit_config.xml @@ -1,5 +1,4 @@ - + {{name}} {% if operation is defined and operation != 'delete' %} @@ -31,17 +30,20 @@ {% endif %} {% if address_ip is defined %} - - - - {{address_ip}} - - {{address_ip}} - {{address_prefix}} - - - - + + + {% if mtu is defined %}{{mtu}}{% endif%} + + +
+ {{address_ip}} + + {{address_ip}} + {{address_prefix}} + +
+
+
{% endif %} diff --git a/src/device/service/drivers/openconfig/templates/network_instance/interface/edit_config.xml b/src/device/service/drivers/openconfig/templates/network_instance/interface/edit_config.xml index 855f321b4a69ba1e660487c108a05d0ec4b5d475..e926796d039d54e30f6ba13eb5eb66bcec079c08 100644 --- a/src/device/service/drivers/openconfig/templates/network_instance/interface/edit_config.xml +++ b/src/device/service/drivers/openconfig/templates/network_instance/interface/edit_config.xml @@ -1,6 +1,10 @@ {{name}} + + {{name}} + oc-ni-types:{{type}} + {{id}} diff --git a/src/device/service/drivers/openconfig/templates/network_instance/protocols/edit_config.xml b/src/device/service/drivers/openconfig/templates/network_instance/protocols/edit_config.xml index c9c068e480c0569cfe5f97b78b28fbe03e2595f8..da66d97f053f509a1a595cdb1abc0bd1791ad0bc 100644 --- a/src/device/service/drivers/openconfig/templates/network_instance/protocols/edit_config.xml +++ b/src/device/service/drivers/openconfig/templates/network_instance/protocols/edit_config.xml @@ -9,15 +9,37 @@ oc-pol-types:{{identifier}} {{protocol_name}} + true {% if identifier=='BGP' %} + {{as}} {{as}} {{router_id}} + {% if neighbors is defined %} + + {% for neighbor in neighbors %} + + {{neighbor['ip_address']}} + + + oc-bgp-types:IPV4_UNICAST + true + + + + {{neighbor['ip_address']}} + true + {{as}} + + + {% endfor %} + + {% endif %} {% endif %} {% endif %} diff --git a/src/device/service/drivers/openconfig/templates/network_instance/table_connections/edit_config.xml b/src/device/service/drivers/openconfig/templates/network_instance/table_connections/edit_config.xml index 46bf5e387789c7efc800ad96ed759748273bed34..35c535c6bd3f78e30fc2177ecc722b1115f54fc5 100644 --- a/src/device/service/drivers/openconfig/templates/network_instance/table_connections/edit_config.xml +++ b/src/device/service/drivers/openconfig/templates/network_instance/table_connections/edit_config.xml @@ -11,6 +11,9 @@ oc-pol-types:{{src_protocol}} oc-pol-types:{{dst_protocol}} oc-types:{{address_family}} + {% if False %} + {{as}} + {% endif %} {% if default_import_policy is defined %}{{default_import_policy}}{% endif %} {% endif %} diff --git a/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py b/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py new file mode 100644 index 0000000000000000000000000000000000000000..dbaa956450a5598154c09f8ec7946ba3d7a64502 --- /dev/null +++ b/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py @@ -0,0 +1,151 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging, requests, threading +from requests.auth import HTTPBasicAuth +from typing import Any, Iterator, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.type_checkers.Checkers import chk_string, chk_type +from device.service.driver_api._Driver import _Driver +from . import ALL_RESOURCE_KEYS +from .Tools import find_key, add_lightpath, del_lightpath, get_lightpaths +from device.service.driver_api._Driver import _Driver, RESOURCE_ENDPOINTS +from device.service.drivers.ietf_l2vpn.TfsApiClient import TfsApiClient +from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum, get_import_topology + +LOGGER = logging.getLogger(__name__) + +DRIVER_NAME = 'optical_tfs' +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) + + +class OpticalTfsDriver(_Driver): + def __init__(self, address: str, port: int, **settings) -> None: + super().__init__(DRIVER_NAME, address, port, **settings) + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + username = self.settings.get('username') + password = self.settings.get('password') + self.__auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None + scheme = self.settings.get('scheme', 'http') + self.tac = TfsApiClient(self.address, int(self.port), scheme=scheme, username=username, password=password) + self.__base_url = '{:s}://{:s}:{:d}'.format(scheme, self.address, int(self.port)) + self.__timeout = int(self.settings.get('timeout', 120)) + + # Options are: + # disabled --> just import endpoints as usual + # devices --> imports sub-devices but not links connecting them. + # (a remotely-controlled transport domain might exist between them) + # topology --> imports sub-devices and links connecting them. + # (not supported by XR driver) + self.__import_topology = get_import_topology(self.settings, default=ImportTopologyEnum.TOPOLOGY) + + + def Connect(self) -> bool: + url = self.__base_url + '/OpticalTFS/GetLightpaths' + with self.__lock: + if self.__started.is_set(): return True + try: + requests.get(url, timeout=self.__timeout, verify=False, auth=self.__auth) + except requests.exceptions.Timeout: + LOGGER.exception('Timeout connecting {:s}'.format(str(self.__tapi_root))) + return False + except Exception: # pylint: disable=broad-except + LOGGER.exception('Exception connecting {:s}'.format(str(self.__tapi_root))) + return False + else: + self.__started.set() + return True + + def Disconnect(self) -> bool: + with self.__lock: + self.__terminate.set() + return True + + @metered_subclass_method(METRICS_POOL) + def GetInitialConfig(self) -> List[Tuple[str, Any]]: + with self.__lock: + return [] + + @metered_subclass_method(METRICS_POOL) + def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: + chk_type('resources', resource_keys, list) + results = [] + with self.__lock: + if len(resource_keys) == 0: resource_keys = ALL_RESOURCE_KEYS + for i, resource_key in enumerate(resource_keys): + str_resource_name = 'resource_key[#{:d}]'.format(i) + chk_string(str_resource_name, resource_key, allow_empty=False) + + if resource_key == RESOURCE_ENDPOINTS: + # return endpoints through TFS NBI API and list-devices method + results.extend(self.tac.get_devices_endpoints(self.__import_topology)) + + # results.extend(get_lightpaths( + # self.__base_url, resource_key, timeout=self.__timeout, auth=self.__auth)) + return results + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + results = [] + if len(resources) == 0: + return results + with self.__lock: + for _, resource in resources: + LOGGER.info('resource = {:s}'.format(str(resource))) + + src_node = find_key(resource, 'src_node') + dst_node = find_key(resource, 'dst_node') + bitrate = find_key(resource, 'bitrate') + + response = add_lightpath(self.__base_url, src_node, dst_node, bitrate, + auth=self.__auth, timeout=self.__timeout) + + results.extend(response) + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + results = [] + if len(resources) == 0: + return results + with self.__lock: + for _, resource in resources: + LOGGER.info('resource = {:s}'.format(str(resource))) + flow_id = find_key(resource, 'flow_id') + src_node = find_key(resource, 'src_node') + dst_node = find_key(resource, 'dst_node') + bitrate = find_key(resource, 'bitrate') + + response = del_lightpath(self.__base_url, flow_id, src_node, dst_node, bitrate) + results.extend(response) + + return results + + @metered_subclass_method(METRICS_POOL) + def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + # Optical TFS does not support monitoring by now + return [False for _ in subscriptions] + + @metered_subclass_method(METRICS_POOL) + def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + # Optical TFS does not support monitoring by now + return [False for _ in subscriptions] + + def GetState( + self, blocking=False, terminate : Optional[threading.Event] = None + ) -> Iterator[Tuple[float, str, Any]]: + # Optical TFS does not support monitoring by now + return [] diff --git a/src/device/service/drivers/optical_tfs/Tools.py b/src/device/service/drivers/optical_tfs/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..d13bac4832a8de3b802f8362b0c2b8516dfd2250 --- /dev/null +++ b/src/device/service/drivers/optical_tfs/Tools.py @@ -0,0 +1,143 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging, requests +from requests.auth import HTTPBasicAuth +from typing import Optional + +LOGGER = logging.getLogger(__name__) + +HTTP_OK_CODES = { + 200, # OK + 201, # Created + 202, # Accepted + 204, # No Content +} + +def find_key(resource, key): + return json.loads(resource[1])[key] + +def get_lightpaths(root_url : str, resource_key : str,auth : Optional[HTTPBasicAuth] = None, + timeout : Optional[int] = None): + headers = {'accept': 'application/json'} + url = '{:s}/OpticalTFS/GetLightpaths'.format(root_url) + + result = [] + try: + response = requests.get(url, timeout=timeout, headers=headers, verify=False, auth=auth) + except requests.exceptions.Timeout: + LOGGER.exception('Timeout connecting {:s}'.format(url)) + return result + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Exception retrieving {:s}'.format(resource_key)) + result.append((resource_key, e)) + return result + + try: + flows = json.loads(response.content) + except Exception as e: # pylint: disable=broad-except + LOGGER.warning('Unable to decode reply: {:s}'.format(str(response.content))) + result.append((resource_key, e)) + return result + + for flow in flows: + flow_id = flow.get('flow_id') + source = flow.get('src') + destination = flow.get('dst') + bitrate = flow.get('bitrate') + + endpoint_url = '/flows/flow[{:s}]'.format(flow_id) + endpoint_data = {'flow_id': flow_id, 'src': source, 'dst': destination, 'bitrate': bitrate} + result.append((endpoint_url, endpoint_data)) + + return result + + +def add_lightpath(root_url, src_node, dst_node, bitrate, + auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None): + + headers = {'accept': 'application/json'} + url = '{:s}/OpticalTFS/AddLightpath/{:s}/{:s}/{:s}'.format( + root_url, src_node, dst_node, bitrate) + + results = [] + try: + LOGGER.info('Lightpath request: {:s} <-> {:s} with {:s} bitrate'.format( + str(src_node), str(dst_node), str(bitrate))) + response = requests.put(url=url, timeout=timeout, headers=headers, verify=False, auth=auth) + results.append(response.json()) + LOGGER.info('Response: {:s}'.format(str(response))) + + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Exception requesting Lightpath: {:s} <-> {:s} with {:s} bitrate'.format( + str(src_node), str(dst_node), str(bitrate))) + results.append(e) + else: + if response.status_code not in HTTP_OK_CODES: + msg = 'Could not create Lightpath(status_code={:s} reply={:s}' + LOGGER.error(msg.format(str(response.status_code), str(response))) + results.append(response.status_code in HTTP_OK_CODES) + + return results + + + +def del_lightpath(root_url, flow_id, src_node, dst_node, bitrate, + auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None): + url = '{:s}/OpticalTFS/DelLightpath/{:s}/{:s}/{:s}/{:s}'.format( + root_url, flow_id, src_node, dst_node, bitrate) + headers = {'accept': 'application/json'} + + results = [] + + try: + response = requests.delete( + url=url, timeout=timeout, headers=headers, verify=False, auth=auth) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Exception deleting Lightpath(uuid={:s})'.format(str(flow_id))) + results.append(e) + else: + if response.status_code not in HTTP_OK_CODES: + msg = 'Could not delete Lightpath(flow_id={:s}). status_code={:s} reply={:s}' + LOGGER.error(msg.format(str(flow_id), str(response.status_code), str(response))) + results.append(response.status_code in HTTP_OK_CODES) + + return results + + +def get_topology(root_url : str, resource_key : str,auth : Optional[HTTPBasicAuth] = None, + timeout : Optional[int] = None): + headers = {'accept': 'application/json'} + url = '{:s}/OpticalTFS/GetLinks'.format(root_url) + + result = [] + try: + response = requests.get(url, timeout=timeout, headers=headers, verify=False, auth=auth) + except requests.exceptions.Timeout: + LOGGER.exception('Timeout connecting {:s}'.format(url)) + return result + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Exception retrieving {:s}'.format(resource_key)) + result.append((resource_key, e)) + return result + + try: + response = json.loads(response.content) + except Exception as e: # pylint: disable=broad-except + LOGGER.warning('Unable to decode reply: {:s}'.format(str(response.content))) + result.append((resource_key, e)) + return result + + result.append(response) + return result diff --git a/src/device/service/drivers/optical_tfs/__init__.py b/src/device/service/drivers/optical_tfs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4f3d1a042c69720452803e994c38f7c2e966c684 --- /dev/null +++ b/src/device/service/drivers/optical_tfs/__init__.py @@ -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. + +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_SERVICES + +ALL_RESOURCE_KEYS = [ + RESOURCE_ENDPOINTS, + RESOURCE_SERVICES, +] diff --git a/src/device/service/drivers/p4/__init__.py b/src/device/service/drivers/p4/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/device/service/drivers/p4/__init__.py +++ b/src/device/service/drivers/p4/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/p4/p4_client.py b/src/device/service/drivers/p4/p4_client.py index 28f5d961334d86eecf02e50b1ae8a6775a661ba5..367419776638e2ff2be762b46890bfa16e88c6bb 100644 --- a/src/device/service/drivers/p4/p4_client.py +++ b/src/device/service/drivers/p4/p4_client.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/p4/p4_common.py b/src/device/service/drivers/p4/p4_common.py index 92612e3542d51353ce501c5da6a09cbb118734cc..bf23c2e064c53ff1fc69b9790b2dc21e0462f9af 100644 --- a/src/device/service/drivers/p4/p4_common.py +++ b/src/device/service/drivers/p4/p4_common.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/p4/p4_context.py b/src/device/service/drivers/p4/p4_context.py index 8bc4f08a9f13b01350641e67fdc8c61baa2f0f84..c964a866963ad53c90cd853ba8c9422e4d484d0e 100644 --- a/src/device/service/drivers/p4/p4_context.py +++ b/src/device/service/drivers/p4/p4_context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/p4/p4_driver.py b/src/device/service/drivers/p4/p4_driver.py index 6bb5fbe41b02ec07a86422ab79afce1bc40c01cd..dbee6cf2fe17eaa243c327448de263861356b0f0 100644 --- a/src/device/service/drivers/p4/p4_driver.py +++ b/src/device/service/drivers/p4/p4_driver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/p4/p4_exception.py b/src/device/service/drivers/p4/p4_exception.py index 450dac941d7af279a1e057a2eb472b40bdb7993c..69e5e7b9ededbf32fe94eefd8ca014c7b616c70d 100644 --- a/src/device/service/drivers/p4/p4_exception.py +++ b/src/device/service/drivers/p4/p4_exception.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/p4/p4_global_options.py b/src/device/service/drivers/p4/p4_global_options.py index 9fea3c25c5b81d7a4e1bcfcd2d694331f4e15c95..640c8ffa9f7812f0d4c686aad41d628ce18b748c 100644 --- a/src/device/service/drivers/p4/p4_global_options.py +++ b/src/device/service/drivers/p4/p4_global_options.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/p4/p4_manager.py b/src/device/service/drivers/p4/p4_manager.py index b93c86b5fd7bc1e187f95fa0fb58e6b0ae6c971b..7786a4ea21e3cc118e3af9cb0f284d2745081c85 100644 --- a/src/device/service/drivers/p4/p4_manager.py +++ b/src/device/service/drivers/p4/p4_manager.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/transport_api/Tools.py b/src/device/service/drivers/transport_api/Tools.py index bbd4247f0debdd17885c5aadccafc32607e4cbe5..faa04400d5c9002d92169f49095ec58ddc6f560d 100644 --- a/src/device/service/drivers/transport_api/Tools.py +++ b/src/device/service/drivers/transport_api/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/transport_api/TransportApiDriver.py b/src/device/service/drivers/transport_api/TransportApiDriver.py index 98ed8e6aae613ea45519143c89e72af32f3b2620..f3a89064d471fc4018cce1158c0a59bd9418a18b 100644 --- a/src/device/service/drivers/transport_api/TransportApiDriver.py +++ b/src/device/service/drivers/transport_api/TransportApiDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/transport_api/__init__.py b/src/device/service/drivers/transport_api/__init__.py index d5073c330b89bed63f08b0da86c4a7649c87b3dd..4f3d1a042c69720452803e994c38f7c2e966c684 100644 --- a/src/device/service/drivers/transport_api/__init__.py +++ b/src/device/service/drivers/transport_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/XrDriver.py b/src/device/service/drivers/xr/XrDriver.py index 46269ff8904a0e20dbcb08202220412e64cb6283..fc203f0b06a3bf94edd81e2ecc9e682994b5863f 100644 --- a/src/device/service/drivers/xr/XrDriver.py +++ b/src/device/service/drivers/xr/XrDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/__init__.py b/src/device/service/drivers/xr/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/device/service/drivers/xr/__init__.py +++ b/src/device/service/drivers/xr/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm-cli.py b/src/device/service/drivers/xr/cm-cli.py index 9aefe969c0549819568882a6215ae3dd86b7df3b..c959eba657adbcd3e2aca4ff6839b471ee0be56e 100755 --- a/src/device/service/drivers/xr/cm-cli.py +++ b/src/device/service/drivers/xr/cm-cli.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/__init__.py b/src/device/service/drivers/xr/cm/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/device/service/drivers/xr/cm/__init__.py +++ b/src/device/service/drivers/xr/cm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/cm_connection.py b/src/device/service/drivers/xr/cm/cm_connection.py index bcd62862de82f115c7c1ef7e98039e6398e62891..4b25f80059fb86aea19687c765efb22e5bd6170e 100644 --- a/src/device/service/drivers/xr/cm/cm_connection.py +++ b/src/device/service/drivers/xr/cm/cm_connection.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/connection.py b/src/device/service/drivers/xr/cm/connection.py index 321922b1cb81eb1cedee673f40b232c038abd8af..8e08e1ea5d8d9010858f958be938d69f558973a6 100644 --- a/src/device/service/drivers/xr/cm/connection.py +++ b/src/device/service/drivers/xr/cm/connection.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/constellation.py b/src/device/service/drivers/xr/cm/constellation.py index f93be0eaeb9195bfe409242f6f535e3b4d8dd7b0..74ef01afee7092788d89783ae6c5debbfce7d9d1 100644 --- a/src/device/service/drivers/xr/cm/constellation.py +++ b/src/device/service/drivers/xr/cm/constellation.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring, wildcard-import, unused-wildcard-import -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/tests/__init__.py b/src/device/service/drivers/xr/cm/tests/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/device/service/drivers/xr/cm/tests/__init__.py +++ b/src/device/service/drivers/xr/cm/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/tests/test_cm_connection.py b/src/device/service/drivers/xr/cm/tests/test_cm_connection.py index 22b74f36a60e3eda4a0d08d9791cae112b7fd605..13c0694b20360ac7ee4dad22a5756bf960d48508 100644 --- a/src/device/service/drivers/xr/cm/tests/test_cm_connection.py +++ b/src/device/service/drivers/xr/cm/tests/test_cm_connection.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/tests/test_connection.py b/src/device/service/drivers/xr/cm/tests/test_connection.py index dc330a1e015726d875dfab6a1b52bfa2689c3eed..ad21b23392914a65fef42fbba1b8e0986e552270 100644 --- a/src/device/service/drivers/xr/cm/tests/test_connection.py +++ b/src/device/service/drivers/xr/cm/tests/test_connection.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/tests/test_constellation.py b/src/device/service/drivers/xr/cm/tests/test_constellation.py index b0f5803caa2c5832ceba28991fef9744e45f4795..49fa8adc4d6c08c3408b428a233f39907f92233d 100644 --- a/src/device/service/drivers/xr/cm/tests/test_constellation.py +++ b/src/device/service/drivers/xr/cm/tests/test_constellation.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py b/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py index 1897b11110e4bcd790769ed29f8e9f5521f461db..f3170f95fd42fa680baade1b2d9f969ee679406a 100644 --- a/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py +++ b/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/tests/test_xr_service_set_config.py b/src/device/service/drivers/xr/cm/tests/test_xr_service_set_config.py index 42785caad79f4ba6000877e81d3caf403c463c1a..a619a9306f0894faa9447cd0eb4aea1e34c60632 100644 --- a/src/device/service/drivers/xr/cm/tests/test_xr_service_set_config.py +++ b/src/device/service/drivers/xr/cm/tests/test_xr_service_set_config.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/tf.py b/src/device/service/drivers/xr/cm/tf.py index 4b1352216d79aea46beca8c5383f64f39869f91b..719075f6c774c3dff2aadd3344697d3843221c7d 100644 --- a/src/device/service/drivers/xr/cm/tf.py +++ b/src/device/service/drivers/xr/cm/tf.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/tf_service.py b/src/device/service/drivers/xr/cm/tf_service.py index 98b122fa5f72c69f19ef02e4f5179111b594c041..37e61a61868387495e0f41fad8afb284f466b1cf 100644 --- a/src/device/service/drivers/xr/cm/tf_service.py +++ b/src/device/service/drivers/xr/cm/tf_service.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring, wildcard-import, unused-wildcard-import -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/transport_capacity.py b/src/device/service/drivers/xr/cm/transport_capacity.py index a13073d003ddca20888f8b0ef3c60ae59d0c8b32..aa7e777986f850ddbe9dc99cab08abf63a0ba6cd 100644 --- a/src/device/service/drivers/xr/cm/transport_capacity.py +++ b/src/device/service/drivers/xr/cm/transport_capacity.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/cm/utils.py b/src/device/service/drivers/xr/cm/utils.py index 9bfdc93853b233a8085b0ebcbce86032840f8578..b9d72b2a84472cc90e40839181359f71f0960888 100644 --- a/src/device/service/drivers/xr/cm/utils.py +++ b/src/device/service/drivers/xr/cm/utils.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/service-cli.py b/src/device/service/drivers/xr/service-cli.py index 88631682b66a38e0e6bbc23216890cb0da2f5b94..9016a087d2f87b2f85806d213f94b730dcf6fbdb 100755 --- a/src/device/service/drivers/xr/service-cli.py +++ b/src/device/service/drivers/xr/service-cli.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/drivers/xr/setup_test_env.sh b/src/device/service/drivers/xr/setup_test_env.sh index f0573e5d11813c7830436a018e47daf24cded986..39acfece94d8d7d36b51c65fef60c34a3bdebd01 100755 --- a/src/device/service/drivers/xr/setup_test_env.sh +++ b/src/device/service/drivers/xr/setup_test_env.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/monitoring/MonitoringLoop.py b/src/device/service/monitoring/MonitoringLoop.py index 296ff8f7e51d9a98ca3ec9f0b885228087cf88de..d112f1b67a8371a568cf1f9b7f82d76b6b971ae9 100644 --- a/src/device/service/monitoring/MonitoringLoop.py +++ b/src/device/service/monitoring/MonitoringLoop.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/monitoring/MonitoringLoops.py b/src/device/service/monitoring/MonitoringLoops.py index 2acbfdf53293373c03a6470301547ff0b5c7b34b..00b6e4bcc49b4218f49742614b3e4a85943f6d3c 100644 --- a/src/device/service/monitoring/MonitoringLoops.py +++ b/src/device/service/monitoring/MonitoringLoops.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/service/monitoring/__init__.py b/src/device/service/monitoring/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/service/monitoring/__init__.py +++ b/src/device/service/monitoring/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/CommonObjects.py b/src/device/tests/CommonObjects.py index ce41c4a2ab585284c7646038b3c223fa8a8531a7..748242c51ce04ff4f0502b9d716e23b103b3ca67 100644 --- a/src/device/tests/CommonObjects.py +++ b/src/device/tests/CommonObjects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/Device_Emulated.py b/src/device/tests/Device_Emulated.py index 0dffd7ad5a1d6da3bb58ca1c874a797c34ca5357..02070bea9df003aed3e699aa53f44c206042e73a 100644 --- a/src/device/tests/Device_Emulated.py +++ b/src/device/tests/Device_Emulated.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/Device_Microwave_Template.py b/src/device/tests/Device_Microwave_Template.py index 38e96e2b0fcf30282068334157d634d98164e2e5..b9069c2cdca76c4fe13f470cc106d479b7eb8d52 100644 --- a/src/device/tests/Device_Microwave_Template.py +++ b/src/device/tests/Device_Microwave_Template.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/Device_OpenConfig_Template.py b/src/device/tests/Device_OpenConfig_Template.py index b9aae79a2b0e5a38a556e50dd2445592caca4daf..bebf1008be113022235d79788a6d7ff21f9b2625 100644 --- a/src/device/tests/Device_OpenConfig_Template.py +++ b/src/device/tests/Device_OpenConfig_Template.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/Device_Transport_Api_Template.py b/src/device/tests/Device_Transport_Api_Template.py index 73408ebc070b8df3e07ddfaed19785b825a92975..1f762024fe88df86d69e8a2f4c370738086bb571 100644 --- a/src/device/tests/Device_Transport_Api_Template.py +++ b/src/device/tests/Device_Transport_Api_Template.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/MockService_Dependencies.py b/src/device/tests/MockService_Dependencies.py index 8216b0f8e07b1d76dbfd7b2a9d39909486636431..b91b364bf39e77a6ecb81d18883495cea01ee34c 100644 --- a/src/device/tests/MockService_Dependencies.py +++ b/src/device/tests/MockService_Dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/PrepareTestScenario.py b/src/device/tests/PrepareTestScenario.py index c8e72dd77ff8b9d96290b996d346b4f2f2ac7c4b..c4e951eb4bd70bed70a4fa5a819f076714e3d43f 100644 --- a/src/device/tests/PrepareTestScenario.py +++ b/src/device/tests/PrepareTestScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/__init__.py b/src/device/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/device/tests/__init__.py +++ b/src/device/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/data/ietf_actn/config_rules.json b/src/device/tests/data/ietf_actn/config_rules.json new file mode 100644 index 0000000000000000000000000000000000000000..d106a5a8f9eb705e975c14aacd489ecfa042625f --- /dev/null +++ b/src/device/tests/data/ietf_actn/config_rules.json @@ -0,0 +1,32 @@ +[ + {"action": 1, "custom": {"resource_key": "/osu_tunnels/osu_tunnel[osu_tunnel_1]", "resource_value": { + "name": "osu_tunnel_1", "odu_type": "osuflex", "osuflex_number": 40, "bidirectional": true, "delay": 20, + "src_node_id": "10.0.10.1", "src_tp_id": "200", "src_ttp_channel_name": "och:1-odu2:1-oduflex:1-osuflex:2", + "dst_node_id": "10.0.30.1", "dst_tp_id": "200", "dst_ttp_channel_name": "och:1-odu2:1-oduflex:3-osuflex:1" + }}}, + {"action": 1, "custom": {"resource_key": "/osu_tunnels/osu_tunnel[osu_tunnel_2]", "resource_value": { + "name": "osu_tunnel_2", "odu_type": "osuflex", "osuflex_number": 40, "bidirectional": true, "delay": 20, + "src_node_id": "10.0.10.1", "src_tp_id": "200", "src_ttp_channel_name": "och:1-odu2:1-oduflex:1-osuflex:2", + "dst_node_id": "10.0.30.1", "dst_tp_id": "200", "dst_ttp_channel_name": "och:1-odu2:1-oduflex:3-osuflex:1" + }}}, + {"action": 1, "custom": {"resource_key": "/etht_services/etht_service[etht_service_1]", "resource_value": { + "name": "etht_service_1", "osu_tunnel_name": "osu_tunnel_1", "service_type": "op-mp2mp-svc", + "src_node_id": "10.0.10.1", "src_tp_id": "200", "src_vlan_tag": 21, "src_static_routes": [ + ["128.32.10.5", 24, "128.32.33.5"], + ["128.32.20.5", 24, "128.32.33.5"] + ], + "dst_node_id": "10.0.30.1", "dst_tp_id": "200", "dst_vlan_tag": 101, "dst_static_routes": [ + ["172.1.101.22", 24, "172.10.33.5"] + ] + }}}, + {"action": 1, "custom": {"resource_key": "/etht_services/etht_service[etht_service_2]", "resource_value": { + "name": "etht_service_2", "osu_tunnel_name": "osu_tunnel_2", "service_type": "op-mp2mp-svc", + "src_node_id": "10.0.10.1", "src_tp_id": "200", "src_vlan_tag": 31, "src_static_routes": [ + ["128.32.10.5", 24, "128.32.33.5"], + ["128.32.20.5", 24, "128.32.33.5"] + ], + "dst_node_id": "10.0.30.1", "dst_tp_id": "200", "dst_vlan_tag": 201, "dst_static_routes": [ + ["172.1.201.22", 24, "172.10.33.5"] + ] + }}} +] diff --git a/src/device/tests/data/ietf_actn/deconfig_rules.json b/src/device/tests/data/ietf_actn/deconfig_rules.json new file mode 100644 index 0000000000000000000000000000000000000000..f18e5fb2db8b4d077ea68a499d61577030ce7f48 --- /dev/null +++ b/src/device/tests/data/ietf_actn/deconfig_rules.json @@ -0,0 +1,14 @@ +[ + {"action": 2, "custom": {"resource_key": "/osu_tunnels/osu_tunnel[osu_tunnel_1]", "resource_value": { + "name": "osu_tunnel_1" + }}}, + {"action": 2, "custom": {"resource_key": "/osu_tunnels/osu_tunnel[osu_tunnel_2]", "resource_value": { + "name": "osu_tunnel_2" + }}}, + {"action": 2, "custom": {"resource_key": "/etht_services/etht_service[etht_service_1]", "resource_value": { + "name": "etht_service_1" + }}}, + {"action": 2, "custom": {"resource_key": "/etht_services/etht_service[etht_service_2]", "resource_value": { + "name": "etht_service_2" + }}} +] diff --git a/src/device/tests/data/ietf_actn/expected_etht_services.json b/src/device/tests/data/ietf_actn/expected_etht_services.json new file mode 100644 index 0000000000000000000000000000000000000000..72c48e6b3351a4adc5737bbc1f63952363893f96 --- /dev/null +++ b/src/device/tests/data/ietf_actn/expected_etht_services.json @@ -0,0 +1,176 @@ +{ + "ietf-eth-tran-service:etht-svc": { + "etht-svc-instances": [ + { + "etht-svc-name": "etht_service_1", + "etht-svc-title": "ETHT_SERVICE_1", + "etht-svc-type": "op-mp2mp-svc", + "source-endpoints": { + "source-endpoint": [ + { + "node-id": "10.0.10.1", + "tp-id": "200", + "protection-role": "work", + "layer-specific": { + "access-type": "port" + }, + "is-extendable": false, + "is-terminal": true, + "static-route-list": [ + { + "destination": "128.32.10.5", + "destination-mask": 24, + "next-hop": "128.32.33.5" + }, + { + "destination": "128.32.20.5", + "destination-mask": 24, + "next-hop": "128.32.33.5" + } + ], + "outer-tag": { + "tag-type": "ietf-eth-tran-types:classify-c-vlan", + "vlan-value": 21 + }, + "service-classification-type": "ietf-eth-tran-type:vlan-classification", + "ingress-egress-bandwidth-profile" : { + "bandwidth-profile-type": "ietf-eth-tran-types:mef-10-bwp", + "CIR": 10000000, + "EIR": 10000000 + } + } + ] + }, + "destination-endpoints": { + "destination-endpoint": [ + { + "node-id": "10.0.30.1", + "tp-id": "200", + "protection-role": "work", + "layer-specific": { + "access-type": "port" + }, + "is-extendable": false, + "is-terminal": true, + "static-route-list": [ + { + "destination": "172.1.101.22", + "destination-mask": 24, + "next-hop": "172.10.33.5" + } + ], + "outer-tag": { + "tag-type": "ietf-eth-tran-types:classify-c-vlan", + "vlan-value": 101 + }, + "service-classification-type": "ietf-eth-tran-type:vlan-classification", + "ingress-egress-bandwidth-profile" : { + "bandwidth-profile-type": "ietf-eth-tran-types:mef-10-bwp", + "CIR": 10000000, + "EIR": 10000000 + } + } + ] + }, + "svc-tunnel": [ + { + "tunnel-name": "osu_tunnel_1" + } + ], + "optimizations": { + "optimization-metric": [ + { + "metric-role": "work", + "metric-type": "ietf-te-types:path-metric-te" + } + ] + } + }, + { + "etht-svc-name": "etht_service_2", + "etht-svc-title": "ETHT_SERVICE_2", + "etht-svc-type": "op-mp2mp-svc", + "source-endpoints": { + "source-endpoint": [ + { + "node-id": "10.0.10.1", + "tp-id": "200", + "protection-role": "work", + "layer-specific": { + "access-type": "port" + }, + "is-extendable": false, + "is-terminal": true, + "static-route-list": [ + { + "destination": "128.32.10.5", + "destination-mask": 24, + "next-hop": "128.32.33.5" + }, + { + "destination": "128.32.20.5", + "destination-mask": 24, + "next-hop": "128.32.33.5" + } + ], + "outer-tag": { + "tag-type": "ietf-eth-tran-types:classify-c-vlan", + "vlan-value": 31 + }, + "service-classification-type": "ietf-eth-tran-type:vlan-classification", + "ingress-egress-bandwidth-profile" : { + "bandwidth-profile-type": "ietf-eth-tran-types:mef-10-bwp", + "CIR": 10000000, + "EIR": 10000000 + } + } + ] + }, + "destination-endpoints": { + "destination-endpoint": [ + { + "node-id": "10.0.30.1", + "tp-id": "200", + "protection-role": "work", + "layer-specific": { + "access-type": "port" + }, + "is-extendable": false, + "is-terminal": true, + "static-route-list": [ + { + "destination": "172.1.201.22", + "destination-mask": 24, + "next-hop": "172.10.33.5" + } + ], + "outer-tag": { + "tag-type": "ietf-eth-tran-types:classify-c-vlan", + "vlan-value": 201 + }, + "service-classification-type": "ietf-eth-tran-type:vlan-classification", + "ingress-egress-bandwidth-profile" : { + "bandwidth-profile-type": "ietf-eth-tran-types:mef-10-bwp", + "CIR": 10000000, + "EIR": 10000000 + } + } + ] + }, + "svc-tunnel": [ + { + "tunnel-name": "osu_tunnel_2" + } + ], + "optimizations": { + "optimization-metric": [ + { + "metric-role": "work", + "metric-type": "ietf-te-types:path-metric-te" + } + ] + } + } + ] + } +} \ No newline at end of file diff --git a/src/device/tests/data/ietf_actn/expected_osu_tunnels.json b/src/device/tests/data/ietf_actn/expected_osu_tunnels.json new file mode 100644 index 0000000000000000000000000000000000000000..1debf555b7219b1f62c4f04782aeaf0eefca62f9 --- /dev/null +++ b/src/device/tests/data/ietf_actn/expected_osu_tunnels.json @@ -0,0 +1,84 @@ +{ + "ietf-te:tunnel": [ + { + "name": "osu_tunnel_1", + "title": "OSU_TUNNEL_1", + "admin-state": "ietf-te-types:tunnel-admin-state-up", + "delay": 20, + "te-bandwidth": { + "layer": "odu", + "odu-type": "osuflex", + "number": 40 + }, + "bidirectional": true, + "destination-endpoints": { + "destination-endpoint": [ + { + "node-id": "10.0.30.1", + "tp-id": "200", + "ttp-channel-name": "och:1-odu2:1-oduflex:3-osuflex:1", + "protection-role": "work" + } + ] + }, + "source-endpoints": { + "source-endpoint": [ + { + "node-id": "10.0.10.1", + "tp-id": "200", + "ttp-channel-name": "och:1-odu2:1-oduflex:1-osuflex:2", + "protection-role": "work" + } + ] + }, + "restoration": { + "restoration-type": "ietf-te-types:lsp-restoration-not-applicable", + "restoration-lock": false + }, + "protection": { + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "protection-reversion-disable": true + } + }, + { + "name": "osu_tunnel_2", + "title": "OSU_TUNNEL_2", + "admin-state": "ietf-te-types:tunnel-admin-state-up", + "delay": 20, + "te-bandwidth": { + "layer": "odu", + "odu-type": "osuflex", + "number": 40 + }, + "bidirectional": true, + "destination-endpoints": { + "destination-endpoint": [ + { + "node-id": "10.0.30.1", + "tp-id": "200", + "ttp-channel-name": "och:1-odu2:1-oduflex:3-osuflex:1", + "protection-role": "work" + } + ] + }, + "source-endpoints": { + "source-endpoint": [ + { + "node-id": "10.0.10.1", + "tp-id": "200", + "ttp-channel-name": "och:1-odu2:1-oduflex:1-osuflex:2", + "protection-role": "work" + } + ] + }, + "restoration": { + "restoration-type": "ietf-te-types:lsp-restoration-not-applicable", + "restoration-lock": false + }, + "protection": { + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "protection-reversion-disable": true + } + } + ] +} diff --git a/src/device/tests/device_p4.py b/src/device/tests/device_p4.py index de796c2f7c6e1d4d97a48999cece483b2156a43f..ef4f30b7f3fc629dcc5c13e6461b5cff9198c4fe 100644 --- a/src/device/tests/device_p4.py +++ b/src/device/tests/device_p4.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/mock_p4runtime_service.py b/src/device/tests/mock_p4runtime_service.py index f06a43bb84282fc7b87cb03df0c5d0fab1c98043..e046fa6cdf77aa82a9067f0f09635e7dadbbe71a 100644 --- a/src/device/tests/mock_p4runtime_service.py +++ b/src/device/tests/mock_p4runtime_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/mock_p4runtime_servicer_impl.py b/src/device/tests/mock_p4runtime_servicer_impl.py index 65bcfab502105c826bd48d4dc6de928245cda4bd..15888e177045da5c52b3419206316dc306dc6115 100644 --- a/src/device/tests/mock_p4runtime_servicer_impl.py +++ b/src/device/tests/mock_p4runtime_servicer_impl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/test_gnmi.py b/src/device/tests/test_gnmi.py index 50c9155822d5285fda5fc75777363c066ffb215a..ebd026a206ddf9444d30c01e8ac2d097307cc0db 100644 --- a/src/device/tests/test_gnmi.py +++ b/src/device/tests/test_gnmi.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/test_internal_p4.py b/src/device/tests/test_internal_p4.py index a09ec79ef97e7b83f366f1b60966d3cc68134a37..6ce87349707892903f32408710f4c7a7b7c1ceb1 100644 --- a/src/device/tests/test_internal_p4.py +++ b/src/device/tests/test_internal_p4.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/test_netconf.py b/src/device/tests/test_netconf.py index 70551eed759867d26b46d399fba998a2d8007d21..e5530efb5d8dfd7b18f2134d1e6c0f64b92e348d 100644 --- a/src/device/tests/test_netconf.py +++ b/src/device/tests/test_netconf.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/test_unitary_emulated.py b/src/device/tests/test_unitary_emulated.py index cbad108a848a6b0106330f7d22143910542997c3..2ffcfa5369b8844801136c99ec4cf7d83010c36b 100644 --- a/src/device/tests/test_unitary_emulated.py +++ b/src/device/tests/test_unitary_emulated.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/test_unitary_ietf_actn.py b/src/device/tests/test_unitary_ietf_actn.py new file mode 100644 index 0000000000000000000000000000000000000000..aa9fd9945fc526749eaa2596a90fbf90e9d0ed07 --- /dev/null +++ b/src/device/tests/test_unitary_ietf_actn.py @@ -0,0 +1,294 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import copy, deepdiff, json, logging, operator, os, pytest, time +from flask import Flask, jsonify, make_response +from flask_restful import Resource +from common.proto.context_pb2 import ConfigActionEnum, Device, DeviceId +from common.tools.descriptor.Tools import format_custom_config_rules +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Device import ( + json_device_connect_rules, json_device_id, json_device_ietf_actn_disabled +) +from common.tools.service.GenericRestServer import GenericRestServer +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from device.service.DeviceService import DeviceService +from device.service.driver_api._Driver import _Driver +from tests.tools.mock_ietf_actn_sdn_ctrl.ResourceEthServices import EthService, EthServices +from tests.tools.mock_ietf_actn_sdn_ctrl.ResourceOsuTunnels import OsuTunnel, OsuTunnels + +os.environ['DEVICE_EMULATED_ONLY'] = 'TRUE' +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + mock_service, device_service, context_client, device_client, monitoring_client, test_prepare_environment +) + +DEVICE_UUID = 'DEVICE-IETF-ACTN' +DEVICE_ADDRESS = '127.0.0.1' +DEVICE_PORT = 8080 +DEVICE_USERNAME = 'admin' +DEVICE_PASSWORD = 'admin' +DEVICE_SCHEME = 'http' +DEVICE_BASE_URL = '/restconf/v2/data' +DEVICE_TIMEOUT = 120 +DEVICE_VERIFY = False + +DEVICE_ID = json_device_id(DEVICE_UUID) +DEVICE = json_device_ietf_actn_disabled(DEVICE_UUID) + +DEVICE_CONNECT_RULES = json_device_connect_rules(DEVICE_ADDRESS, DEVICE_PORT, { + 'scheme' : DEVICE_SCHEME, + 'username': DEVICE_USERNAME, + 'password': DEVICE_PASSWORD, + 'base_url': DEVICE_BASE_URL, + 'timeout' : DEVICE_TIMEOUT, + 'verify' : DEVICE_VERIFY, +}) + +DATA_FILE_CONFIG_RULES = 'device/tests/data/ietf_actn/config_rules.json' +DATA_FILE_DECONFIG_RULES = 'device/tests/data/ietf_actn/deconfig_rules.json' +DATA_FILE_EXPECTED_OSU_TUNNELS = 'device/tests/data/ietf_actn/expected_osu_tunnels.json' +DATA_FILE_EXPECTED_ETHT_SERVICES = 'device/tests/data/ietf_actn/expected_etht_services.json' + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +@pytest.fixture(scope='session') +def ietf_actn_sdn_ctrl( + device_service : DeviceService, # pylint: disable=redefined-outer-name +) -> Flask: + _rest_server = GenericRestServer(DEVICE_PORT, DEVICE_BASE_URL, bind_address=DEVICE_ADDRESS) + _rest_server.app.config['DEBUG' ] = True + _rest_server.app.config['ENV' ] = 'development' + _rest_server.app.config['SERVER_NAME'] = '{:s}:{:d}'.format(DEVICE_ADDRESS, DEVICE_PORT) + _rest_server.app.config['TESTING' ] = True + + class Root(Resource): + def get(self): + return make_response(jsonify({}), 200) + + add_rsrc = _rest_server.add_resource + add_rsrc(Root, '/') + add_rsrc(OsuTunnels, '/ietf-te:te/tunnels') + add_rsrc(OsuTunnel, '/ietf-te:te/tunnels/tunnel=""') + add_rsrc(EthServices, '/ietf-eth-tran-service:etht-svc') + add_rsrc(EthService, '/ietf-eth-tran-service:etht-svc/etht-svc-instances=""') + + _rest_server.start() + time.sleep(1) # bring time for the server to start + yield _rest_server + _rest_server.shutdown() + _rest_server.join() + + +def test_device_ietf_actn_add( + device_client : DeviceClient, # pylint: disable=redefined-outer-name + device_service : DeviceService, # pylint: disable=redefined-outer-name + ietf_actn_sdn_ctrl : GenericRestServer, # pylint: disable=redefined-outer-name +) -> None: + DEVICE_WITH_CONNECT_RULES = copy.deepcopy(DEVICE) + DEVICE_WITH_CONNECT_RULES['device_config']['config_rules'].extend(DEVICE_CONNECT_RULES) + device_client.AddDevice(Device(**DEVICE_WITH_CONNECT_RULES)) + driver_instance_cache = device_service.device_servicer.driver_instance_cache + driver: _Driver = driver_instance_cache.get(DEVICE_UUID) + assert driver is not None + + +def test_device_ietf_actn_get( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name + ietf_actn_sdn_ctrl : GenericRestServer, # pylint: disable=redefined-outer-name +) -> None: + + initial_config = device_client.GetInitialConfig(DeviceId(**DEVICE_ID)) + LOGGER.info('initial_config = {:s}'.format(grpc_message_to_json_string(initial_config))) + + device_data = context_client.GetDevice(DeviceId(**DEVICE_ID)) + LOGGER.info('device_data = {:s}'.format(grpc_message_to_json_string(device_data))) + + +def test_device_ietf_actn_configure( + device_client : DeviceClient, # pylint: disable=redefined-outer-name + device_service : DeviceService, # pylint: disable=redefined-outer-name + ietf_actn_sdn_ctrl : GenericRestServer, # pylint: disable=redefined-outer-name +) -> None: + ietf_actn_client = ietf_actn_sdn_ctrl.app.test_client() + + driver_instance_cache = device_service.device_servicer.driver_instance_cache + driver : _Driver = driver_instance_cache.get(DEVICE_UUID) + assert driver is not None + + retrieved_osu_tunnels = ietf_actn_client.get('/restconf/v2/data/ietf-te:te/tunnels') + retrieved_osu_tunnels = retrieved_osu_tunnels.json + LOGGER.info('osu_tunnels = {:s}'.format(str(retrieved_osu_tunnels))) + expected_osu_tunnels = {'ietf-te:tunnel': []} + osu_tunnels_diff = deepdiff.DeepDiff(expected_osu_tunnels, retrieved_osu_tunnels) + if len(osu_tunnels_diff) > 0: + LOGGER.error('PRE OSU TUNNELS - Differences:\n{:s}'.format(str(osu_tunnels_diff.pretty()))) + assert len(osu_tunnels_diff) == 0 + + retrieved_etht_services = ietf_actn_client.get('/restconf/v2/data/ietf-eth-tran-service:etht-svc') + retrieved_etht_services = retrieved_etht_services.json + LOGGER.info('etht_services = {:s}'.format(str(retrieved_etht_services))) + expected_etht_services = {'ietf-eth-tran-service:etht-svc': {'etht-svc-instances': []}} + etht_services_diff = deepdiff.DeepDiff(expected_etht_services, retrieved_etht_services) + if len(etht_services_diff) > 0: + LOGGER.error('PRE ETHT SERVICES - Differences:\n{:s}'.format(str(etht_services_diff.pretty()))) + assert len(etht_services_diff) == 0 + + retrieved_driver_config_rules = sorted(driver.GetConfig(), key=operator.itemgetter(0)) + LOGGER.info('driver_config = {:s}'.format(str(retrieved_driver_config_rules))) + assert isinstance(retrieved_driver_config_rules, list) + retrieved_driver_config_rules = [ + (resource_key, resource_value) + for resource_key, resource_value in retrieved_driver_config_rules + if resource_key != '/endpoints/endpoint[mgmt]' + ] + if len(retrieved_driver_config_rules) > 0: + LOGGER.error('PRE DRIVER CONFIG RULES - Differences:\n{:s}'.format(str(retrieved_driver_config_rules))) + assert len(retrieved_driver_config_rules) == 0 + + DEVICE_WITH_CONFIG_RULES = copy.deepcopy(DEVICE) + with open(DATA_FILE_CONFIG_RULES, 'r', encoding='UTF-8') as f: + config_rules = format_custom_config_rules(json.load(f)) + DEVICE_WITH_CONFIG_RULES['device_config']['config_rules'].extend(config_rules) + device_client.ConfigureDevice(Device(**DEVICE_WITH_CONFIG_RULES)) + + retrieved_osu_tunnels = ietf_actn_client.get('/restconf/v2/data/ietf-te:te/tunnels') + retrieved_osu_tunnels = retrieved_osu_tunnels.json + LOGGER.info('osu_tunnels = {:s}'.format(str(retrieved_osu_tunnels))) + with open(DATA_FILE_EXPECTED_OSU_TUNNELS, 'r', encoding='UTF-8') as f: + expected_osu_tunnels = json.load(f) + osu_tunnels_diff = deepdiff.DeepDiff(expected_osu_tunnels, retrieved_osu_tunnels) + if len(osu_tunnels_diff) > 0: + LOGGER.error('POST OSU TUNNELS - Differences:\n{:s}'.format(str(osu_tunnels_diff.pretty()))) + assert len(osu_tunnels_diff) == 0 + + retrieved_etht_services = ietf_actn_client.get('/restconf/v2/data/ietf-eth-tran-service:etht-svc') + retrieved_etht_services = retrieved_etht_services.json + LOGGER.info('etht_services = {:s}'.format(str(retrieved_etht_services))) + with open(DATA_FILE_EXPECTED_ETHT_SERVICES, 'r', encoding='UTF-8') as f: + expected_etht_services = json.load(f) + etht_services_diff = deepdiff.DeepDiff(expected_etht_services, retrieved_etht_services) + if len(etht_services_diff) > 0: + LOGGER.error('POST ETHT SERVICES - Differences:\n{:s}'.format(str(etht_services_diff.pretty()))) + assert len(etht_services_diff) == 0 + + retrieved_driver_config_rules = sorted(driver.GetConfig(), key=operator.itemgetter(0)) + LOGGER.info('driver_config = {:s}'.format(str(retrieved_driver_config_rules))) + retrieved_driver_config_rules = [ + {'action': 1, 'custom': {'resource_key': resource_key, 'resource_value': resource_value}} + for resource_key, resource_value in retrieved_driver_config_rules + if resource_key != '/endpoints/endpoint[mgmt]' + ] + with open(DATA_FILE_CONFIG_RULES, 'r', encoding='UTF-8') as f: + expected_driver_config_rules = sorted(json.load(f), key=lambda cr: cr['custom']['resource_key']) + driver_config_rules_diff = deepdiff.DeepDiff(expected_driver_config_rules, retrieved_driver_config_rules) + if len(driver_config_rules_diff) > 0: + LOGGER.error('POST DRIVER CONFIG RULES - Differences:\n{:s}'.format(str(driver_config_rules_diff.pretty()))) + assert len(driver_config_rules_diff) == 0 + + +def test_device_ietf_actn_deconfigure( + device_client : DeviceClient, # pylint: disable=redefined-outer-name + device_service : DeviceService, # pylint: disable=redefined-outer-name + ietf_actn_sdn_ctrl : GenericRestServer, # pylint: disable=redefined-outer-name +) -> None: + ietf_actn_client = ietf_actn_sdn_ctrl.app.test_client() + + driver_instance_cache = device_service.device_servicer.driver_instance_cache + driver : _Driver = driver_instance_cache.get(DEVICE_UUID) + assert driver is not None + + retrieved_osu_tunnels = ietf_actn_client.get('/restconf/v2/data/ietf-te:te/tunnels') + retrieved_osu_tunnels = retrieved_osu_tunnels.json + LOGGER.info('osu_tunnels = {:s}'.format(str(retrieved_osu_tunnels))) + with open(DATA_FILE_EXPECTED_OSU_TUNNELS, 'r', encoding='UTF-8') as f: + expected_osu_tunnels = json.load(f) + osu_tunnels_diff = deepdiff.DeepDiff(expected_osu_tunnels, retrieved_osu_tunnels) + if len(osu_tunnels_diff) > 0: + LOGGER.error('PRE OSU TUNNELS - Differences:\n{:s}'.format(str(osu_tunnels_diff.pretty()))) + assert len(osu_tunnels_diff) == 0 + + retrieved_etht_services = ietf_actn_client.get('/restconf/v2/data/ietf-eth-tran-service:etht-svc') + retrieved_etht_services = retrieved_etht_services.json + LOGGER.info('etht_services = {:s}'.format(str(retrieved_etht_services))) + with open(DATA_FILE_EXPECTED_ETHT_SERVICES, 'r', encoding='UTF-8') as f: + expected_etht_services = json.load(f) + etht_services_diff = deepdiff.DeepDiff(expected_etht_services, retrieved_etht_services) + if len(etht_services_diff) > 0: + LOGGER.error('PRE ETHT SERVICES - Differences:\n{:s}'.format(str(etht_services_diff.pretty()))) + assert len(etht_services_diff) == 0 + + retrieved_driver_config_rules = sorted(driver.GetConfig(), key=operator.itemgetter(0)) + LOGGER.info('driver_config = {:s}'.format(str(retrieved_driver_config_rules))) + retrieved_driver_config_rules = [ + {'action': 1, 'custom': {'resource_key': resource_key, 'resource_value': resource_value}} + for resource_key, resource_value in retrieved_driver_config_rules + if resource_key != '/endpoints/endpoint[mgmt]' + ] + with open(DATA_FILE_CONFIG_RULES, 'r', encoding='UTF-8') as f: + expected_driver_config_rules = sorted(json.load(f), key=lambda cr: cr['custom']['resource_key']) + driver_config_rules_diff = deepdiff.DeepDiff(expected_driver_config_rules, retrieved_driver_config_rules) + if len(driver_config_rules_diff) > 0: + LOGGER.error('PRE DRIVER CONFIG RULES - Differences:\n{:s}'.format(str(driver_config_rules_diff.pretty()))) + assert len(driver_config_rules_diff) == 0 + + DEVICE_WITH_DECONFIG_RULES = copy.deepcopy(DEVICE) + with open(DATA_FILE_DECONFIG_RULES, 'r', encoding='UTF-8') as f: + deconfig_rules = format_custom_config_rules(json.load(f)) + DEVICE_WITH_DECONFIG_RULES['device_config']['config_rules'].extend(deconfig_rules) + device_client.ConfigureDevice(Device(**DEVICE_WITH_DECONFIG_RULES)) + + retrieved_osu_tunnels = ietf_actn_client.get('/restconf/v2/data/ietf-te:te/tunnels') + retrieved_osu_tunnels = retrieved_osu_tunnels.json + LOGGER.info('osu_tunnels = {:s}'.format(str(retrieved_osu_tunnels))) + expected_osu_tunnels = {'ietf-te:tunnel': []} + osu_tunnels_diff = deepdiff.DeepDiff(expected_osu_tunnels, retrieved_osu_tunnels) + if len(osu_tunnels_diff) > 0: + LOGGER.error('POST OSU TUNNELS - Differences:\n{:s}'.format(str(osu_tunnels_diff.pretty()))) + assert len(osu_tunnels_diff) == 0 + + retrieved_etht_services = ietf_actn_client.get('/restconf/v2/data/ietf-eth-tran-service:etht-svc') + retrieved_etht_services = retrieved_etht_services.json + LOGGER.info('etht_services = {:s}'.format(str(retrieved_etht_services))) + expected_etht_services = {'ietf-eth-tran-service:etht-svc': {'etht-svc-instances': []}} + etht_services_diff = deepdiff.DeepDiff(expected_etht_services, retrieved_etht_services) + if len(etht_services_diff) > 0: + LOGGER.error('POST ETHT SERVICES - Differences:\n{:s}'.format(str(etht_services_diff.pretty()))) + assert len(etht_services_diff) == 0 + + retrieved_driver_config_rules = sorted(driver.GetConfig(), key=operator.itemgetter(0)) + LOGGER.info('retrieved_driver_config_rules = {:s}'.format(str(retrieved_driver_config_rules))) + assert isinstance(retrieved_driver_config_rules, list) + retrieved_driver_config_rules = [ + (resource_key, resource_value) + for resource_key, resource_value in retrieved_driver_config_rules + if resource_key != '/endpoints/endpoint[mgmt]' + ] + if len(retrieved_driver_config_rules) > 0: + LOGGER.error('POST DRIVER CONFIG RULES - Differences:\n{:s}'.format(str(retrieved_driver_config_rules))) + assert len(retrieved_driver_config_rules) == 0 + + +def test_device_ietf_actn_delete( + device_client : DeviceClient, # pylint: disable=redefined-outer-name + device_service : DeviceService, # pylint: disable=redefined-outer-name + ietf_actn_sdn_ctrl : GenericRestServer, # pylint: disable=redefined-outer-name +) -> None: + device_client.DeleteDevice(DeviceId(**DEVICE_ID)) + driver_instance_cache = device_service.device_servicer.driver_instance_cache + driver : _Driver = driver_instance_cache.get(DEVICE_UUID, {}) + assert driver is None diff --git a/src/device/tests/test_unitary_microwave.py b/src/device/tests/test_unitary_microwave.py index 0d1ff61cf965ff20736a0a433ac0ac57eb1d541c..60341a61a7049b2204a26478ac9f49afd047d4ed 100644 --- a/src/device/tests/test_unitary_microwave.py +++ b/src/device/tests/test_unitary_microwave.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/test_unitary_openconfig.py b/src/device/tests/test_unitary_openconfig.py index e61442a4a6b41108d49b52c4ca58d4a2826c786a..c806c1cae26c1a5a9312059f9f37c3191001b60e 100644 --- a/src/device/tests/test_unitary_openconfig.py +++ b/src/device/tests/test_unitary_openconfig.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/test_unitary_openconfig_ocnos.py b/src/device/tests/test_unitary_openconfig_ocnos.py new file mode 100644 index 0000000000000000000000000000000000000000..87d951581ad98147f8dd565af616fe034a346693 --- /dev/null +++ b/src/device/tests/test_unitary_openconfig_ocnos.py @@ -0,0 +1,210 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os, pytest, time +from typing import Dict, Tuple +os.environ['DEVICE_EMULATED_ONLY'] = 'YES' + +# pylint: disable=wrong-import-position +from device.service.drivers.openconfig.OpenConfigDriver import OpenConfigDriver +#from device.service.driver_api._Driver import ( +# RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES, RESOURCE_ROUTING_POLICIES, RESOURCE_SERVICES +#) + +logging.basicConfig(level=logging.DEBUG) +#logging.getLogger('ncclient.operations.rpc').setLevel(logging.INFO) +#logging.getLogger('ncclient.transport.parser').setLevel(logging.INFO) + +LOGGER = logging.getLogger(__name__) + + +##### DRIVERS FIXTURE ################################################################################################## + +DEVICES = { + 'CSGW1': {'address': '10.1.1.86', 'port': 830, 'settings': { + 'username': 'ocnos', 'password': 'ocnos', + 'vendor': None, 'force_running': False, 'hostkey_verify': False, 'look_for_keys': False, 'allow_agent': False, + 'commit_per_rule': True, 'device_params': {'name': 'default'}, 'manager_params': {'timeout' : 120} + }}, + 'CSGW2': {'address': '10.1.1.87', 'port': 830, 'settings': { + 'username': 'ocnos', 'password': 'ocnos', + 'vendor': None, 'force_running': False, 'hostkey_verify': False, 'look_for_keys': False, 'allow_agent': False, + 'commit_per_rule': True, 'device_params': {'name': 'default'}, 'manager_params': {'timeout' : 120} + }}, +} + +@pytest.fixture(scope='session') +def drivers() -> Dict[str, OpenConfigDriver]: + _drivers : Dict[str, OpenConfigDriver] = dict() + for device_name, driver_params in DEVICES.items(): + driver = OpenConfigDriver(driver_params['address'], driver_params['port'], **(driver_params['settings'])) + driver.Connect() + _drivers[device_name] = driver + yield _drivers + time.sleep(1) + for _,driver in _drivers.items(): + driver.Disconnect() + + +def network_instance(ni_name, ni_type, ni_router_id=None, ni_route_distinguisher=None) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]'.format(ni_name) + data = {'name': ni_name, 'type': ni_type} + if ni_router_id is not None: data['router_id'] = ni_router_id + if ni_route_distinguisher is not None: data['route_distinguisher'] = ni_route_distinguisher + return path, json.dumps(data) + +def network_instance_add_protocol_bgp(ni_name, ni_type, ni_router_id, ni_bgp_as, neighbors=[]) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]/protocols[BGP]'.format(ni_name) + data = { + 'name': ni_name, 'type': ni_type, 'router_id': ni_router_id, 'identifier': 'BGP', + 'protocol_name': ni_bgp_as, 'as': ni_bgp_as + } + if len(neighbors) > 0: + data['neighbors'] = [ + {'ip_address': neighbor_ip_address, 'remote_as': neighbor_remote_as} + for neighbor_ip_address, neighbor_remote_as in neighbors + ] + return path, json.dumps(data) + +def network_instance_add_protocol_direct(ni_name, ni_type) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]/protocols[DIRECTLY_CONNECTED]'.format(ni_name) + data = { + 'name': ni_name, 'type': ni_type, 'identifier': 'DIRECTLY_CONNECTED', + 'protocol_name': 'DIRECTLY_CONNECTED' + } + return path, json.dumps(data) + +def network_instance_add_protocol_static(ni_name, ni_type) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]/protocols[STATIC]'.format(ni_name) + data = { + 'name': ni_name, 'type': ni_type, 'identifier': 'STATIC', + 'protocol_name': 'STATIC' + } + return path, json.dumps(data) + +#def network_instance_static_route(ni_name, prefix, next_hop, next_hop_index=0) -> Tuple[str, Dict]: +# path = '/network_instance[{:s}]/static_route[{:s}]'.format(ni_name, prefix) +# data = {'name': ni_name, 'prefix': prefix, 'next_hop': next_hop, 'next_hop_index': next_hop_index} +# return path, json.dumps(data) + +def network_instance_add_table_connection( + ni_name, src_protocol, dst_protocol, address_family, default_import_policy, bgp_as=None +) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]/table_connections[{:s}][{:s}][{:s}]'.format( + ni_name, src_protocol, dst_protocol, address_family + ) + data = { + 'name': ni_name, 'src_protocol': src_protocol, 'dst_protocol': dst_protocol, + 'address_family': address_family, 'default_import_policy': default_import_policy, + } + if bgp_as is not None: data['as'] = bgp_as + return path, json.dumps(data) + +def interface( + name, index, description=None, if_type=None, vlan_id=None, mtu=None, ipv4_address_prefix=None, enabled=None +) -> Tuple[str, Dict]: + path = '/interface[{:s}]/subinterface[{:d}]'.format(name, index) + data = {'name': name, 'index': index} + if description is not None: data['description'] = description + if if_type is not None: data['type' ] = if_type + if vlan_id is not None: data['vlan_id' ] = vlan_id + if mtu is not None: data['mtu' ] = mtu + if enabled is not None: data['enabled' ] = enabled + if ipv4_address_prefix is not None: + ipv4_address, ipv4_prefix = ipv4_address_prefix + data['address_ip' ] = ipv4_address + data['address_prefix'] = ipv4_prefix + return path, json.dumps(data) + +def network_instance_interface(ni_name, ni_type, if_name, if_index) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]/interface[{:s}.{:d}]'.format(ni_name, if_name, if_index) + data = {'name': ni_name, 'type': ni_type, 'id': if_name, 'interface': if_name, 'subinterface': if_index} + return path, json.dumps(data) + +def test_configure(drivers : Dict[str, OpenConfigDriver]): + #resources_to_get = [] + #resources_to_get = [RESOURCE_ENDPOINTS] + #resources_to_get = [RESOURCE_INTERFACES] + #resources_to_get = [RESOURCE_NETWORK_INSTANCES] + #resources_to_get = [RESOURCE_ROUTING_POLICIES] + #resources_to_get = [RESOURCE_SERVICES] + #LOGGER.info('resources_to_get = {:s}'.format(str(resources_to_get))) + #results_getconfig = driver.GetConfig(resources_to_get) + #LOGGER.info('results_getconfig = {:s}'.format(str(results_getconfig))) + + csgw1_resources_to_set = [ + network_instance('ecoc24', 'L3VRF', '192.168.150.1', '65001:1'), + network_instance_add_protocol_direct('ecoc24', 'L3VRF'), + network_instance_add_protocol_static('ecoc24', 'L3VRF'), + network_instance_add_protocol_bgp('ecoc24', 'L3VRF', '192.168.150.1', '65001', neighbors=[ + ('192.168.150.2', '65001') + ]), + network_instance_add_table_connection('ecoc24', 'DIRECTLY_CONNECTED', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'), + network_instance_add_table_connection('ecoc24', 'STATIC', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'), + + interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500), + network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0), + interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.10.1', 24), enabled=True), + + interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500), + network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0), + interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.150.1', 24), enabled=True), + ] + LOGGER.info('CSGW1 resources_to_set = {:s}'.format(str(csgw1_resources_to_set))) + results_setconfig = drivers['CSGW1'].SetConfig(csgw1_resources_to_set) + LOGGER.info('CSGW1 results_setconfig = {:s}'.format(str(results_setconfig))) + + csgw2_resources_to_set = [ + network_instance('ecoc24', 'L3VRF', '192.168.150.2', '65001:1'), + network_instance_add_protocol_direct('ecoc24', 'L3VRF'), + network_instance_add_protocol_static('ecoc24', 'L3VRF'), + network_instance_add_protocol_bgp('ecoc24', 'L3VRF', '192.168.150.2', '65001', neighbors=[ + ('192.168.150.1', '65001') + ]), + network_instance_add_table_connection('ecoc24', 'DIRECTLY_CONNECTED', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'), + network_instance_add_table_connection('ecoc24', 'STATIC', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'), + + interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500), + network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0), + interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.20.1', 24), enabled=True), + + interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500), + network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0), + interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.150.2', 24), enabled=True), + ] + LOGGER.info('CSGW2 resources_to_set = {:s}'.format(str(csgw2_resources_to_set))) + results_setconfig = drivers['CSGW2'].SetConfig(csgw2_resources_to_set) + LOGGER.info('CSGW2 results_setconfig = {:s}'.format(str(results_setconfig))) + + csgw1_resources_to_delete = [ + network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0), + network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0), + #interface('ce1', 0), + #interface('xe5', 0), + network_instance('ecoc24', 'L3VRF'), + ] + LOGGER.info('CSGW1 resources_to_delete = {:s}'.format(str(csgw1_resources_to_delete))) + results_deleteconfig = drivers['CSGW1'].DeleteConfig(csgw1_resources_to_delete) + LOGGER.info('CSGW1 results_deleteconfig = {:s}'.format(str(results_deleteconfig))) + + csgw2_resources_to_delete = [ + network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0), + network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0), + #interface('ce1', 0), + #interface('xe5', 0), + network_instance('ecoc24', 'L3VRF'), + ] + LOGGER.info('CSGW2 resources_to_delete = {:s}'.format(str(csgw2_resources_to_delete))) + results_deleteconfig = drivers['CSGW2'].DeleteConfig(csgw2_resources_to_delete) + LOGGER.info('CSGW2 results_deleteconfig = {:s}'.format(str(results_deleteconfig))) diff --git a/src/device/tests/test_unitary_p4.py b/src/device/tests/test_unitary_p4.py index 9370824cf39d53dbf9aec4a65e6d50ad7a253d09..7701fa48352519971028d82fe7a84cec44f77384 100644 --- a/src/device/tests/test_unitary_p4.py +++ b/src/device/tests/test_unitary_p4.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/device/tests/test_unitary_tapi.py b/src/device/tests/test_unitary_tapi.py index 46962b2d9c48d1e27256a9dbb3f5c429208ac4ea..0ff5aba7f9b58288c5d834bce477d7d85b63ae7a 100644 --- a/src/device/tests/test_unitary_tapi.py +++ b/src/device/tests/test_unitary_tapi.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/.gitlab-ci.yml b/src/dlt/.gitlab-ci.yml index df30a7b1deb3360fbf8b578796fa39f3b7e736ba..f2ee43a5794b9cb33426ebd4eba9fd8b84082e0b 100644 --- a/src/dlt/.gitlab-ci.yml +++ b/src/dlt/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,8 +22,8 @@ build dlt: - 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 build -t "${IMAGE_NAME}-gateway:$IMAGE_TAG" -f ./src/$IMAGE_NAME/gateway/Dockerfile . - - docker build -t "${IMAGE_NAME}-connector:$IMAGE_TAG" -f ./src/$IMAGE_NAME/connector/Dockerfile . + - docker buildx build -t "${IMAGE_NAME}-gateway:$IMAGE_TAG" -f ./src/$IMAGE_NAME/gateway/Dockerfile . + - docker buildx build -t "${IMAGE_NAME}-connector:$IMAGE_TAG" -f ./src/$IMAGE_NAME/connector/Dockerfile . - docker tag "${IMAGE_NAME}-gateway:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-gateway:$IMAGE_TAG" - docker tag "${IMAGE_NAME}-connector:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-connector:$IMAGE_TAG" - docker push "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-gateway:$IMAGE_TAG" diff --git a/src/dlt/__init__.py b/src/dlt/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/dlt/__init__.py +++ b/src/dlt/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/Config.py b/src/dlt/connector/Config.py index d89eda5d8dd956fe39d6a3e55fa10cf9f69a0715..25f16a6fab8d8e6e123bc265eb5435a0e857bc8b 100644 --- a/src/dlt/connector/Config.py +++ b/src/dlt/connector/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/Dockerfile b/src/dlt/connector/Dockerfile index 8e3a2f95380237cfd64508fc2f0a6c0e9be91333..f9482e57efa9ed3940dc95e84762a5503544c21c 100644 --- a/src/dlt/connector/Dockerfile +++ b/src/dlt/connector/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/__init__.py b/src/dlt/connector/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/dlt/connector/__init__.py +++ b/src/dlt/connector/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/client/DltConnectorClient.py b/src/dlt/connector/client/DltConnectorClient.py index 55322ab58cf91735dbadea237c1a9c0b1461018d..c3101d65e8609e6a5fb0ac1c4f80f48efd05f530 100644 --- a/src/dlt/connector/client/DltConnectorClient.py +++ b/src/dlt/connector/client/DltConnectorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/client/DltEventsCollector.py b/src/dlt/connector/client/DltEventsCollector.py index f35d5c7cca91c89cc8fdb0f254a1927e7d76486c..e59784a4d2902459d7bc88925e5b83a698770012 100644 --- a/src/dlt/connector/client/DltEventsCollector.py +++ b/src/dlt/connector/client/DltEventsCollector.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/client/DltGatewayClient.py b/src/dlt/connector/client/DltGatewayClient.py index 4654f470e307fa23d5e10c1db59c9ccb04f19fdc..31ad4cca22d087f1a8d3d9ce573a6605adf3c1df 100644 --- a/src/dlt/connector/client/DltGatewayClient.py +++ b/src/dlt/connector/client/DltGatewayClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/client/__init__.py b/src/dlt/connector/client/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dlt/connector/client/__init__.py +++ b/src/dlt/connector/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/requirements.in b/src/dlt/connector/requirements.in index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/dlt/connector/requirements.in +++ b/src/dlt/connector/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/service/DltConnectorService.py b/src/dlt/connector/service/DltConnectorService.py index b3e82253064e2758200fb3a6b4d34d5ccd71487f..7e99cb8f85e519ec875a1decc7dc0ad1e030a6f4 100644 --- a/src/dlt/connector/service/DltConnectorService.py +++ b/src/dlt/connector/service/DltConnectorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/service/DltConnectorServiceServicerImpl.py b/src/dlt/connector/service/DltConnectorServiceServicerImpl.py index 4e628a2ae1c2d3d12b8a8dc4bcca5ba85faa4308..42e86b102d3715d68f198d5e341a6f663f35ef4b 100644 --- a/src/dlt/connector/service/DltConnectorServiceServicerImpl.py +++ b/src/dlt/connector/service/DltConnectorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/service/__init__.py b/src/dlt/connector/service/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dlt/connector/service/__init__.py +++ b/src/dlt/connector/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/service/__main__.py b/src/dlt/connector/service/__main__.py index 9d73ca9fcbfb8d7cda2308b2f58a3f84f72f072e..5e0fb6f878dca4e244274632e8931bc25a4f1319 100644 --- a/src/dlt/connector/service/__main__.py +++ b/src/dlt/connector/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/service/event_dispatcher/DltEventDispatcher.py b/src/dlt/connector/service/event_dispatcher/DltEventDispatcher.py index 78d375efafc0329048654d34033bb46b00cb3bdf..779bae9c19f583ec47584673da51b536cc1dc8b3 100644 --- a/src/dlt/connector/service/event_dispatcher/DltEventDispatcher.py +++ b/src/dlt/connector/service/event_dispatcher/DltEventDispatcher.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/service/event_dispatcher/__init__.py b/src/dlt/connector/service/event_dispatcher/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dlt/connector/service/event_dispatcher/__init__.py +++ b/src/dlt/connector/service/event_dispatcher/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/service/tools/Checkers.py b/src/dlt/connector/service/tools/Checkers.py index 17a44c2fa2cc2a30216278bb4d84ff6469b099ff..6ad0f4b82626740c594829831b08fcefbc15096d 100644 --- a/src/dlt/connector/service/tools/Checkers.py +++ b/src/dlt/connector/service/tools/Checkers.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/service/tools/__init__.py b/src/dlt/connector/service/tools/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dlt/connector/service/tools/__init__.py +++ b/src/dlt/connector/service/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/tests/MockService_Dependencies.py b/src/dlt/connector/tests/MockService_Dependencies.py index 36e1ca5519a55fdfc864b266ed1f6f225c00af71..88bb8f48783dcb1a6817ba24f3a1a8a6cc215279 100644 --- a/src/dlt/connector/tests/MockService_Dependencies.py +++ b/src/dlt/connector/tests/MockService_Dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/tests/Objects.py b/src/dlt/connector/tests/Objects.py index 5a7f9f68235eefa93e73d66bb6a2ab3ae210ee14..b14fb972280ce602c5982c4481d1414fbd6f61bc 100644 --- a/src/dlt/connector/tests/Objects.py +++ b/src/dlt/connector/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/tests/PrepareTestScenario.py b/src/dlt/connector/tests/PrepareTestScenario.py index 755d2f1ff615e23396dd33d02c6f8a3719be6065..cc6bb641461c19bc538c9e7e53bb0efebd6f3b31 100644 --- a/src/dlt/connector/tests/PrepareTestScenario.py +++ b/src/dlt/connector/tests/PrepareTestScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/tests/__init__.py b/src/dlt/connector/tests/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dlt/connector/tests/__init__.py +++ b/src/dlt/connector/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/tests/basic.py b/src/dlt/connector/tests/basic.py index cc832cdc88475b862c841a6037d229b7675f283a..da400dcbeed261578929262a6cc0bcc29dc5390e 100644 --- a/src/dlt/connector/tests/basic.py +++ b/src/dlt/connector/tests/basic.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/connector/tests/test_unitary.py b/src/dlt/connector/tests/test_unitary.py index edd96b4ec0d87dd2ddd79d3574ec45973ac1827e..530be89d913441f03dcea2e843fc1ebb1ef9ba60 100644 --- a/src/dlt/connector/tests/test_unitary.py +++ b/src/dlt/connector/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/gateway/Dockerfile b/src/dlt/gateway/Dockerfile index 351f21c9361a5a1313a6d857b41acd4155afc0cd..5b888b410360330cdf044c88f5832d1738d546e8 100644 --- a/src/dlt/gateway/Dockerfile +++ b/src/dlt/gateway/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/mock_blockchain/Dockerfile b/src/dlt/mock_blockchain/Dockerfile index af1edb3d52f419c31274d24226f9e9b7e9a29f7b..776904c5f0adf12d4328b8d660794af93f142c77 100644 --- a/src/dlt/mock_blockchain/Dockerfile +++ b/src/dlt/mock_blockchain/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/mock_blockchain/__init__.py b/src/dlt/mock_blockchain/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dlt/mock_blockchain/__init__.py +++ b/src/dlt/mock_blockchain/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/mock_blockchain/requirements.in b/src/dlt/mock_blockchain/requirements.in index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/dlt/mock_blockchain/requirements.in +++ b/src/dlt/mock_blockchain/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/mock_blockchain/service/__init__.py b/src/dlt/mock_blockchain/service/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dlt/mock_blockchain/service/__init__.py +++ b/src/dlt/mock_blockchain/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/mock_blockchain/service/__main__.py b/src/dlt/mock_blockchain/service/__main__.py index 65a80ed51c25afcf825fff427a41c7d484e25595..8e2662571e6f8c49975687ee29b28c5eac6121c5 100644 --- a/src/dlt/mock_blockchain/service/__main__.py +++ b/src/dlt/mock_blockchain/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/performance/__init__.py b/src/dlt/performance/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/dlt/performance/__init__.py +++ b/src/dlt/performance/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/performance/__main__.py b/src/dlt/performance/__main__.py index ee3b1abf07aa8fd891a19c07c1905dba5259c5a9..1d6c419651bd561b12325dbcb0dba44461f25195 100644 --- a/src/dlt/performance/__main__.py +++ b/src/dlt/performance/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/performance/play_ground/Dlt.py b/src/dlt/performance/play_ground/Dlt.py index 968669b7ccfc142e3e82a32e9dd972e558bc6fa3..b2c88954581987f5bb52d2458e4d711820d0d3b6 100644 --- a/src/dlt/performance/play_ground/Dlt.py +++ b/src/dlt/performance/play_ground/Dlt.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/performance/play_ground/Enums.py b/src/dlt/performance/play_ground/Enums.py index 1af5bd38dd58c5ab2b260788bfb3c63dc538766d..0bbd49403920a773fc4d9edc9e70a6478a4d9867 100644 --- a/src/dlt/performance/play_ground/Enums.py +++ b/src/dlt/performance/play_ground/Enums.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/performance/play_ground/PerfData.py b/src/dlt/performance/play_ground/PerfData.py index 8846de598e56e2c987b8bc09b5adf294fac4a312..500e060b417d61b2d4356c221994142da03b5bf5 100644 --- a/src/dlt/performance/play_ground/PerfData.py +++ b/src/dlt/performance/play_ground/PerfData.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/performance/play_ground/PerfPoint.py b/src/dlt/performance/play_ground/PerfPoint.py index 1e06057fe58c95a40d6b8330e07913c2ec62a044..f557299b7cfc44fcc176b3431f3e3c20c7037aa5 100644 --- a/src/dlt/performance/play_ground/PerfPoint.py +++ b/src/dlt/performance/play_ground/PerfPoint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/performance/play_ground/Random.py b/src/dlt/performance/play_ground/Random.py index 2c4c1e739f0ced1ad1988fae73bc90b5dd2b1ec6..bea20f9ae74f3d8b1c01dda1b37cbb5cf5867ab6 100644 --- a/src/dlt/performance/play_ground/Random.py +++ b/src/dlt/performance/play_ground/Random.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/performance/play_ground/Settings.py b/src/dlt/performance/play_ground/Settings.py index c04f6139d84fc280d33d580fd03e2598788a945f..9944ebfaad01f7e0a494e462c4712c2f254953a9 100644 --- a/src/dlt/performance/play_ground/Settings.py +++ b/src/dlt/performance/play_ground/Settings.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/performance/play_ground/__init__.py b/src/dlt/performance/play_ground/__init__.py index 3e37b261ef4bf0f0f33ce36f9d660e252b362690..68ad14deebd57548815db01d38cec2605e3d2a7d 100644 --- a/src/dlt/performance/play_ground/__init__.py +++ b/src/dlt/performance/play_ground/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/dlt/performance/run_test.sh b/src/dlt/performance/run_test.sh index 58aa0b88e567a71766e5a4090c014484fe7aa180..7d23d4e65f570c5d26172c5618bef9a559422ec8 100755 --- a/src/dlt/performance/run_test.sh +++ b/src/dlt/performance/run_test.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/e2e_orchestrator/.gitlab-ci.yml b/src/e2e_orchestrator/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..ecc17f26119e40659d6191e88e26a4000c9d9ada --- /dev/null +++ b/src/e2e_orchestrator/.gitlab-ci.yml @@ -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. + +# build, tag and push the Docker image to the gitlab registry +build e2eorchestrator: + variables: + IMAGE_NAME: 'e2eorchestrator' # 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/$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 diff --git a/src/e2e_orchestrator/Config.py b/src/e2e_orchestrator/Config.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfc943b68af13a11e562abbc8680ade71db8f02 --- /dev/null +++ b/src/e2e_orchestrator/Config.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/e2e_orchestrator/Dockerfile b/src/e2e_orchestrator/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..1ead42a2fd85316b8f8a45aded98f91d861e6b8d --- /dev/null +++ b/src/e2e_orchestrator/Dockerfile @@ -0,0 +1,84 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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++ && \ + rm -rf /var/lib/apt/lists/* + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 +ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python + +# 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 + +# Creating a user for security reasons +RUN groupadd -r teraflow && useradd -u 1001 --no-log-init -r -m -g teraflow teraflow +USER teraflow + +# set working directory +RUN mkdir -p /home/teraflow/controller/common/ +WORKDIR /home/teraflow/controller + +# Get Python packages per module +ENV VIRTUAL_ENV=/home/teraflow/venv +RUN python3 -m venv ${VIRTUAL_ENV} +ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" + +# 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 +COPY --chown=teraflow:teraflow 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 /home/teraflow/controller/common +COPY --chown=teraflow:teraflow src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /home/teraflow/controller/common/proto +WORKDIR /home/teraflow/controller/common/proto +RUN touch __init__.py +COPY --chown=teraflow:teraflow 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 module sub-folders +RUN mkdir -p /home/teraflow/controller/e2e_orchestrator +WORKDIR /home/teraflow/controller + +# Get Python packages per module +COPY --chown=teraflow:teraflow ./src/e2e_orchestrator/requirements.in e2e_orchestrator/requirements.in +# consider common and specific requirements to avoid inconsistencies with dependencies +RUN pip-compile --quiet --output-file=e2e_orchestrator/requirements.txt e2e_orchestrator/requirements.in common_requirements.in +RUN python3 -m pip install -r e2e_orchestrator/requirements.txt + +# Add component files into working directory +COPY --chown=teraflow:teraflow ./src/context/. context +COPY --chown=teraflow:teraflow ./src/e2e_orchestrator/. e2e_orchestrator + +# Start the service +ENTRYPOINT ["python", "-m", "e2e_orchestrator.service"] diff --git a/src/e2e_orchestrator/__init__.py b/src/e2e_orchestrator/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfc943b68af13a11e562abbc8680ade71db8f02 --- /dev/null +++ b/src/e2e_orchestrator/__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/e2e_orchestrator/client/E2EOrchestratorClient.py b/src/e2e_orchestrator/client/E2EOrchestratorClient.py new file mode 100644 index 0000000000000000000000000000000000000000..e532bb93eb80a3d1120d6de862e5ffb8021b606c --- /dev/null +++ b/src/e2e_orchestrator/client/E2EOrchestratorClient.py @@ -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. + +import logging + +import grpc + +from common.Constants import ServiceNameEnum +from common.proto.context_pb2 import Empty +from common.proto.e2eorchestrator_pb2_grpc import E2EOrchestratorServiceStub +from common.Settings import get_service_host, get_service_port_grpc +from common.tools.client.RetryDecorator import delay_exponential, retry +from common.tools.grpc.Tools import grpc_message_to_json +from common.proto.e2eorchestrator_pb2 import E2EOrchestratorRequest, E2EOrchestratorReply + +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 E2EOrchestratorClient: + def __init__(self, host=None, port=None): + if not host: + host = get_service_host(ServiceNameEnum.E2EORCHESTRATOR) + if not port: + port = get_service_port_grpc(ServiceNameEnum.E2EORCHESTRATOR) + 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 = E2EOrchestratorServiceStub(self.channel) + + def close(self): + if self.channel is not None: + self.channel.close() + self.channel = None + self.stub = None + + @RETRY_DECORATOR + def Compute(self, request: E2EOrchestratorRequest) -> E2EOrchestratorReply: + LOGGER.info( + "Compute request: {:s}".format(str(grpc_message_to_json(request))) + ) + response = self.stub.Compute(request) + LOGGER.info( + "Compute result: {:s}".format(str(grpc_message_to_json(response))) + ) + return response diff --git a/src/e2e_orchestrator/client/__init__.py b/src/e2e_orchestrator/client/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfc943b68af13a11e562abbc8680ade71db8f02 --- /dev/null +++ b/src/e2e_orchestrator/client/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/e2e_orchestrator/requirements.in b/src/e2e_orchestrator/requirements.in new file mode 100644 index 0000000000000000000000000000000000000000..6553c5a41eb9bcf20b7841d8af1fb84be61a27fc --- /dev/null +++ b/src/e2e_orchestrator/requirements.in @@ -0,0 +1,15 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +networkx \ No newline at end of file diff --git a/src/e2e_orchestrator/service/E2EOrchestratorService.py b/src/e2e_orchestrator/service/E2EOrchestratorService.py new file mode 100644 index 0000000000000000000000000000000000000000..2e12ea980da0f90352f2cfba1cf1f39af4594901 --- /dev/null +++ b/src/e2e_orchestrator/service/E2EOrchestratorService.py @@ -0,0 +1,35 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging + +from common.Constants import ServiceNameEnum +from common.proto.e2eorchestrator_pb2_grpc import add_E2EOrchestratorServiceServicer_to_server +from common.Settings import get_service_port_grpc +from common.tools.service.GenericGrpcService import GenericGrpcService +from .E2EOrchestratorServiceServicerImpl import E2EOrchestratorServiceServicerImpl + +LOGGER = logging.getLogger(__name__) + + +class E2EOrchestratorService(GenericGrpcService): + def __init__(self, cls_name: str = __name__): + port = get_service_port_grpc(ServiceNameEnum.E2EORCHESTRATOR) + super().__init__(port, cls_name=cls_name) + self.e2eorchestrator_servicer = E2EOrchestratorServiceServicerImpl() + + def install_servicers(self): + add_E2EOrchestratorServiceServicer_to_server( + self.e2eorchestrator_servicer, self.server + ) diff --git a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py new file mode 100644 index 0000000000000000000000000000000000000000..0ba2eba3390ab13f38ce80affd4faaeba61e1b87 --- /dev/null +++ b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py @@ -0,0 +1,93 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging + +import networkx as nx +import grpc +import copy + +from common.Constants import ServiceNameEnum +from common.method_wrappers.Decorator import (MetricsPool, MetricTypeEnum, safe_and_metered_rpc_method) +from common.proto.e2eorchestrator_pb2 import E2EOrchestratorRequest, E2EOrchestratorReply +from common.proto.context_pb2 import Empty, Connection, EndPointId +from common.proto.e2eorchestrator_pb2_grpc import E2EOrchestratorServiceServicer +from context.client.ContextClient import ContextClient +from context.service.database.uuids.EndPoint import endpoint_get_uuid + + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool("E2EOrchestrator", "RPC") + +context_client: ContextClient = ContextClient() + + +class E2EOrchestratorServiceServicerImpl(E2EOrchestratorServiceServicer): + def __init__(self): + LOGGER.debug("Creating Servicer...") + LOGGER.debug("Servicer Created") + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def Compute(self, request: E2EOrchestratorRequest, context: grpc.ServicerContext) -> E2EOrchestratorReply: + endpoints_ids = [] + for endpoint_id in request.service.service_endpoint_ids: + endpoints_ids.append(endpoint_get_uuid(endpoint_id)[2]) + + graph = nx.Graph() + + devices = context_client.ListDevices(Empty()).devices + + for device in devices: + endpoints_uuids = [endpoint.endpoint_id.endpoint_uuid.uuid + for endpoint in device.device_endpoints] + for ep in endpoints_uuids: + graph.add_node(ep) + + for ep in endpoints_uuids: + for ep_i in endpoints_uuids: + if ep == ep_i: + continue + graph.add_edge(ep, ep_i) + + links = context_client.ListLinks(Empty()).links + for link in links: + eps = [] + for endpoint_id in link.link_endpoint_ids: + eps.append(endpoint_id.endpoint_uuid.uuid) + graph.add_edge(eps[0], eps[1]) + + + shortest = nx.shortest_path(graph, endpoints_ids[0], endpoints_ids[1]) + + path = E2EOrchestratorReply() + path.services.append(copy.deepcopy(request.service)) + for i in range(0, int(len(shortest)/2)): + conn = Connection() + ep_a_uuid = str(shortest[i*2]) + ep_z_uuid = str(shortest[i*2+1]) + + conn.connection_id.connection_uuid.uuid = str(ep_a_uuid) + '_->_' + str(ep_z_uuid) + + ep_a_id = EndPointId() + ep_a_id.endpoint_uuid.uuid = ep_a_uuid + conn.path_hops_endpoint_ids.append(ep_a_id) + + ep_z_id = EndPointId() + ep_z_id.endpoint_uuid.uuid = ep_z_uuid + conn.path_hops_endpoint_ids.append(ep_z_id) + + path.connections.append(conn) + + return path diff --git a/src/e2e_orchestrator/service/__init__.py b/src/e2e_orchestrator/service/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfc943b68af13a11e562abbc8680ade71db8f02 --- /dev/null +++ b/src/e2e_orchestrator/service/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/e2e_orchestrator/service/__main__.py b/src/e2e_orchestrator/service/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..5f20fd72f062127e12fc41352e7213fa320d4a94 --- /dev/null +++ b/src/e2e_orchestrator/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 +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 .E2EOrchestratorService import E2EOrchestratorService + +terminate = threading.Event() +LOGGER = None + + +def signal_handler(signal, frame): # pylint: disable=redefined-outer-name + LOGGER.warning("Terminate signal received") + terminate.set() + + +def main(): + global LOGGER # pylint: disable=global-statement + + log_level = get_log_level() + logging.basicConfig(level=log_level) + LOGGER = logging.getLogger(__name__) + + wait_for_environment_variables( + [ + get_env_var_name(ServiceNameEnum.E2EORCHESTRATOR, ENVVAR_SUFIX_SERVICE_HOST), + get_env_var_name(ServiceNameEnum.E2EORCHESTRATOR, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + ] + ) + + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + LOGGER.info("Starting...") + + # Start metrics server + metrics_port = get_metrics_port() + start_http_server(metrics_port) + + # Starting CentralizedCybersecurity service + grpc_service = E2EOrchestratorService() + grpc_service.start() + LOGGER.info("Started...") + # Wait for Ctrl+C or termination signal + + while not terminate.wait(timeout=1): + pass + + + LOGGER.info("Terminating...") + grpc_service.stop() + + LOGGER.info("Bye") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/src/e2e_orchestrator/tests/__init__.py b/src/e2e_orchestrator/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/e2e_orchestrator/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/e2e_orchestrator/tests/deploy_specs.sh b/src/e2e_orchestrator/tests/deploy_specs.sh new file mode 100755 index 0000000000000000000000000000000000000000..9ce234c326b0036986bc685e7abb6a1235e185bc --- /dev/null +++ b/src/e2e_orchestrator/tests/deploy_specs.sh @@ -0,0 +1,154 @@ +#!/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. + + +# ----- TeraFlowSDN ------------------------------------------------------------ + +# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to. +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 service slice nbi webui load_generator" +export TFS_COMPONENTS="context device pathcomp service slice nbi webui" + +# Uncomment to activate Monitoring +# export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" + +# Uncomment to activate ZTP and Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp policy" +# export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Optical CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" + +# Uncomment to activate L3 CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector" + +# Uncomment to activate TE +#export TFS_COMPONENTS="${TFS_COMPONENTS} te" + +# Uncomment to activate E2E_Orchestrator +export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator" + + + +# Set the tag you want to use for your images. +export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy TFS to. +export TFS_K8S_NAMESPACE="tfs" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Uncomment to monitor performance of components +export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" + +# Uncomment when deploying Optical CyberSecurity +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.yaml" + +# Set the new Grafana admin password +export TFS_GRAFANA_PASSWORD="admin123+" + +# Disable skip-build flag to rebuild the Docker images. +export TFS_SKIP_BUILD="" + + +# ----- CockroachDB ------------------------------------------------------------ + +# Set the namespace where CockroackDB will be deployed. +export CRDB_NAMESPACE="crdb" + +# Set the external port CockroackDB Postgre SQL interface will be exposed to. +export CRDB_EXT_PORT_SQL="26257" + +# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to. +export CRDB_EXT_PORT_HTTP="8081" + +# Set the database username to be used by Context. +export CRDB_USERNAME="tfs" + +# Set the database user's password to be used by Context. +export CRDB_PASSWORD="tfs123" + +# Set the database name to be used by Context. +export CRDB_DATABASE="tfs" + +# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/crdb.sh for additional details +export CRDB_DEPLOY_MODE="single" + +# Disable flag for dropping database, if it exists. +export CRDB_DROP_DATABASE_IF_EXISTS="YES" + +# Disable flag for re-deploying CockroachDB from scratch. +export CRDB_REDEPLOY="" + + +# ----- NATS ------------------------------------------------------------------- + +# Set the namespace where NATS will be deployed. +export NATS_NAMESPACE="nats" + +# Set the external port NATS Client interface will be exposed to. +export NATS_EXT_PORT_CLIENT="4222" + +# Set the external port NATS HTTP Mgmt GUI interface will be exposed to. +export NATS_EXT_PORT_HTTP="8222" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb" + +# Set the external port QuestDB Postgre SQL interface will be exposed to. +export QDB_EXT_PORT_SQL="8812" + +# Set the external port QuestDB Influx Line Protocol interface will be exposed to. +export QDB_EXT_PORT_ILP="9009" + +# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to. +export QDB_EXT_PORT_HTTP="9000" + +# Set the database username to be used for QuestDB. +export QDB_USERNAME="admin" + +# Set the database user's password to be used for QuestDB. +export QDB_PASSWORD="quest" + +# Set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis" + +# Set the table name to be used by Slice for plotting groups. +export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups" + +# Disable flag for dropping tables if they exist. +export QDB_DROP_TABLES_IF_EXIST="YES" + +# Disable flag for re-deploying QuestDB from scratch. +export QDB_REDEPLOY="" + + +# ----- K8s Observability ------------------------------------------------------ + +# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to. +export PROM_EXT_PORT_HTTP="9090" + +# Set the external port Grafana HTTP Dashboards will be exposed to. +export GRAF_EXT_PORT_HTTP="3000" diff --git a/src/e2e_orchestrator/tests/descriptors_emulated.json b/src/e2e_orchestrator/tests/descriptors_emulated.json new file mode 100644 index 0000000000000000000000000000000000000000..a2918ace990550cac63d5eb7cd0cf69bf5da5538 --- /dev/null +++ b/src/e2e_orchestrator/tests/descriptors_emulated.json @@ -0,0 +1,250 @@ +{ + "contexts": [ + { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_ids": [], "service_ids": [] + } + ], + "topologies": [ + { + "topology_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_uuid": {"uuid": "admin"} + }, + "device_ids": [ + {"device_uuid": {"uuid": "R1"}}, + {"device_uuid": {"uuid": "R2"}}, + {"device_uuid": {"uuid": "T1"}}, + {"device_uuid": {"uuid": "T2"}}, + {"device_uuid": {"uuid": "M1"}}, + {"device_uuid": {"uuid": "M2"}} + ], + "link_ids": [ + {"link_uuid": {"uuid": "R1==T1"}}, + {"link_uuid": {"uuid": "T1==R1"}}, + {"link_uuid": {"uuid": "R2==T2"}}, + {"link_uuid": {"uuid": "T2==R2"}}, + + {"link_uuid": {"uuid": "T1==M1"}}, + {"link_uuid": {"uuid": "M1==T1"}}, + {"link_uuid": {"uuid": "T2==M2"}}, + {"link_uuid": {"uuid": "M2==T2"}}, + + {"link_uuid": {"uuid": "M1==M2"}}, + {"link_uuid": {"uuid": "M2==M1"}} + + + ] + } + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"}, + {"sample_types": [], "type": "copper", "uuid": "2/4"}, + {"sample_types": [], "type": "copper", "uuid": "3/1"}, + {"sample_types": [], "type": "copper", "uuid": "3/2"}, + {"sample_types": [], "type": "copper", "uuid": "3/3"}, + {"sample_types": [], "type": "copper", "uuid": "3/4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"}, + {"sample_types": [], "type": "copper", "uuid": "2/4"}, + {"sample_types": [], "type": "copper", "uuid": "3/1"}, + {"sample_types": [], "type": "copper", "uuid": "3/2"}, + {"sample_types": [], "type": "copper", "uuid": "3/3"}, + {"sample_types": [], "type": "copper", "uuid": "3/4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "T1"}}, "device_type": "emu-optical-transponder", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"}, + {"sample_types": [], "type": "copper", "uuid": "2/4"}, + {"sample_types": [], "type": "copper", "uuid": "3/1"}, + {"sample_types": [], "type": "copper", "uuid": "3/2"}, + {"sample_types": [], "type": "copper", "uuid": "3/3"}, + {"sample_types": [], "type": "copper", "uuid": "3/4"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "T2"}}, "device_type": "emu-optical-transponder", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"}, + {"sample_types": [], "type": "copper", "uuid": "2/4"}, + {"sample_types": [], "type": "copper", "uuid": "3/1"}, + {"sample_types": [], "type": "copper", "uuid": "3/2"}, + {"sample_types": [], "type": "copper", "uuid": "3/3"}, + {"sample_types": [], "type": "copper", "uuid": "3/4"} + ]}}} + ]} + }, + + { + "device_id": {"device_uuid": {"uuid": "M1"}}, "device_type": "emu-optical-roadm", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"}, + {"sample_types": [], "type": "copper", "uuid": "2/4"}, + {"sample_types": [], "type": "copper", "uuid": "3/1"}, + {"sample_types": [], "type": "copper", "uuid": "3/2"}, + {"sample_types": [], "type": "copper", "uuid": "3/3"}, + {"sample_types": [], "type": "copper", "uuid": "3/4"} + ]}}} + ]} + }, + + + { + "device_id": {"device_uuid": {"uuid": "M2"}}, "device_type": "emu-optical-roadm", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [], "type": "copper", "uuid": "1/1"}, + {"sample_types": [], "type": "copper", "uuid": "1/2"}, + {"sample_types": [], "type": "copper", "uuid": "1/3"}, + {"sample_types": [], "type": "copper", "uuid": "1/4"}, + {"sample_types": [], "type": "copper", "uuid": "2/1"}, + {"sample_types": [], "type": "copper", "uuid": "2/2"}, + {"sample_types": [], "type": "copper", "uuid": "2/3"}, + {"sample_types": [], "type": "copper", "uuid": "2/4"}, + {"sample_types": [], "type": "copper", "uuid": "3/1"}, + {"sample_types": [], "type": "copper", "uuid": "3/2"}, + {"sample_types": [], "type": "copper", "uuid": "3/3"}, + {"sample_types": [], "type": "copper", "uuid": "3/4"} + ]}}} + ]} + } + + + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "R1==T1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "T1==R1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R2==T2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "T2==R2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "1/2"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "1/2"}} + ] + }, + + + { + "link_id": {"link_uuid": {"uuid": "T1==M1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "M1"}}, "endpoint_uuid": {"uuid": "2/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "M1==T1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "M1"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "2/1"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "T2==M2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "M2"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "M2==T2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "M2"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "2/2"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "M1==M2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "M1"}}, "endpoint_uuid": {"uuid": "3/1"}}, + {"device_id": {"device_uuid": {"uuid": "M2"}}, "endpoint_uuid": {"uuid": "3/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "M2==M1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "M2"}}, "endpoint_uuid": {"uuid": "3/1"}}, + {"device_id": {"device_uuid": {"uuid": "M1"}}, "endpoint_uuid": {"uuid": "3/1"}} + ] + } + + ] +} \ No newline at end of file diff --git a/src/e2e_orchestrator/tests/functional_tests/Fixtures.py b/src/e2e_orchestrator/tests/functional_tests/Fixtures.py new file mode 100644 index 0000000000000000000000000000000000000000..7fe3093d082e6400f118ce38a273496036ac6d41 --- /dev/null +++ b/src/e2e_orchestrator/tests/functional_tests/Fixtures.py @@ -0,0 +1,39 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from monitoring.client.MonitoringClient import MonitoringClient +from e2e_orchestrator.client.E2EOrchestratorClient import E2EOrchestratorClient +from service.client.ServiceClient import ServiceClient + + +@pytest.fixture(scope='session') +def context_client(): + _client = ContextClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def device_client(): + _client = DeviceClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def e2eorchestrator_client(): + _client = E2EOrchestratorClient() + yield _client + _client.close() diff --git a/src/e2e_orchestrator/tests/functional_tests/Objects.py b/src/e2e_orchestrator/tests/functional_tests/Objects.py new file mode 100644 index 0000000000000000000000000000000000000000..4cf8334962562e14193fc60654cb4d4c93b221b3 --- /dev/null +++ b/src/e2e_orchestrator/tests/functional_tests/Objects.py @@ -0,0 +1,60 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os +from typing import Dict, List, Tuple +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.tools.object_factory.Context import json_context, json_context_id +from common.tools.object_factory.Device import ( + json_device_connect_rules, json_device_emulated_connect_rules, json_device_emulated_packet_router_disabled, + json_device_connect_rules, json_device_id, json_device_p4_disabled, + json_device_emulated_tapi_disabled, json_device_id, json_device_packetrouter_disabled, json_device_tapi_disabled) +from common.tools.object_factory.Service import ( + get_service_uuid, json_service_l3nm_planned,json_service_p4_planned) +from common.tools.object_factory.ConfigRule import ( + json_config_rule_set, json_config_rule_delete) +from common.tools.object_factory.EndPoint import json_endpoint, json_endpoint_ids, json_endpoints, json_endpoint_id +from common.tools.object_factory.EndPoint import json_endpoint_descriptor + + + +DEVICE_R1_UUID = 'R1' +DEVICE_R2_UUID = 'R2' + +DEVICE_R1_ID = json_device_id(DEVICE_R1_UUID) +DEVICE_R1_ENDPOINT_DEFS = [json_endpoint_descriptor('2/2', 'port')] +DEVICE_R2_ID = json_device_id(DEVICE_R2_UUID) +DEVICE_R2_ENDPOINT_DEFS = [json_endpoint_descriptor('2/2', 'port')] + +DEVICE_R1_ENDPOINTS = json_endpoints(DEVICE_R1_ID, DEVICE_R1_ENDPOINT_DEFS) +DEVICE_R2_ENDPOINTS = json_endpoints(DEVICE_R2_ID, DEVICE_R2_ENDPOINT_DEFS) + + +DEVICE_R1_ENDPOINT_IDS = json_endpoint_ids(DEVICE_R1_ID, DEVICE_R1_ENDPOINT_DEFS) +ENDPOINT_ID_R1 = DEVICE_R1_ENDPOINTS[0]['endpoint_id'] +DEVICE_R2_ENDPOINT_IDS = json_endpoint_ids(DEVICE_R2_ID, DEVICE_R2_ENDPOINT_DEFS) +ENDPOINT_ID_R2 = DEVICE_R2_ENDPOINTS[0]['endpoint_id'] + + +# ----- Service ---------------------------------------------------------------------------------------------------------- + + +SERVICE_R1_R2_UUID = get_service_uuid(ENDPOINT_ID_R1, ENDPOINT_ID_R2) +SERVICE_R1_R2 = json_service_p4_planned(SERVICE_R1_R2_UUID) +SERVICE_R1_R2_ENDPOINT_IDS = [DEVICE_R1_ENDPOINT_IDS[0], DEVICE_R2_ENDPOINT_IDS[0]] + + +SERVICES = [ + (SERVICE_R1_R2, SERVICE_R1_R2_ENDPOINT_IDS) +] diff --git a/src/e2e_orchestrator/tests/functional_tests/__init__.py b/src/e2e_orchestrator/tests/functional_tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/e2e_orchestrator/tests/functional_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/e2e_orchestrator/tests/functional_tests/test_functional_bootstrap.py b/src/e2e_orchestrator/tests/functional_tests/test_functional_bootstrap.py new file mode 100644 index 0000000000000000000000000000000000000000..1103977dab86e4145590377f6f57fb56d1c92b84 --- /dev/null +++ b/src/e2e_orchestrator/tests/functional_tests/test_functional_bootstrap.py @@ -0,0 +1,71 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, time +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum, Empty +from common.proto.monitoring_pb2 import KpiDescriptorList +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 device.client.DeviceClient import DeviceClient +from monitoring.client.MonitoringClient import MonitoringClient +from .Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'src/e2e_orchestrator/tests/descriptors_emulated.json' +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_scenario_bootstrap( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + validate_empty_scenario(context_client) + + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + +def test_scenario_devices_enabled( + context_client : ContextClient, # pylint: disable=redefined-outer-name +) -> None: + """ + This test validates that the devices are enabled. + """ + DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + num_devices = -1 + num_devices_enabled, num_retry = 0, 0 + while (num_devices != num_devices_enabled) and (num_retry < 1): + time.sleep(1.0) + response = context_client.ListDevices(Empty()) + num_devices = len(response.devices) + num_devices_enabled = 0 + for device in response.devices: + if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue + num_devices_enabled += 1 + LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) + num_retry += 1 + assert num_devices_enabled == num_devices + + diff --git a/src/e2e_orchestrator/tests/functional_tests/test_functional_cleanup.py b/src/e2e_orchestrator/tests/functional_tests/test_functional_cleanup.py new file mode 100644 index 0000000000000000000000000000000000000000..0d4cf66723e1f3dff6168b32ca1d1d5670316f74 --- /dev/null +++ b/src/e2e_orchestrator/tests/functional_tests/test_functional_cleanup.py @@ -0,0 +1,44 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import DescriptorLoader, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from .Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'src/e2e_orchestrator/tests/descriptors_emulated.json' +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_scenario_cleanup( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/e2e_orchestrator/tests/functional_tests/test_functional_compute_path.py b/src/e2e_orchestrator/tests/functional_tests/test_functional_compute_path.py new file mode 100644 index 0000000000000000000000000000000000000000..a4bbb0c06cd6a5bd33727022722166b1fd21de79 --- /dev/null +++ b/src/e2e_orchestrator/tests/functional_tests/test_functional_compute_path.py @@ -0,0 +1,61 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, random +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, Empty, ServiceTypeEnum, Service +from common.proto.e2eorchestrator_pb2 import E2EOrchestratorRequest +from common.proto.kpi_sample_types_pb2 import KpiSampleType +from common.tools.descriptor.Loader import DescriptorLoader +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from .Fixtures import context_client, device_client, e2eorchestrator_client # pylint: disable=unused-import +from e2e_orchestrator.client.E2EOrchestratorClient import E2EOrchestratorClient +from .Objects import SERVICES +import copy + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'src/e2e_orchestrator/tests/descriptors_emulated.json' +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + + +def test_orchestration(context_client : ContextClient, e2eorchestrator_client : E2EOrchestratorClient): # pylint: disable=redefined-outer-name + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + + + # ----- Compute E2E path --------------------------------------------------------------- + for service, endpoints in SERVICES: + service_uuid = service['service_id']['service_uuid']['uuid'] + print('Creating Service {:s}'.format(service_uuid)) + service_p4 = copy.deepcopy(service) + service_p4['service_endpoint_ids'].extend(endpoints) + + request = E2EOrchestratorRequest() + request.service.MergeFrom(Service(**service_p4)) + reply = e2eorchestrator_client.Compute(request) + LOGGER.info(reply) + assert len(reply.connections) == 6 + diff --git a/src/e2e_orchestrator/tests/redeploy.sh b/src/e2e_orchestrator/tests/redeploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..830feca00a4f36d1c9264ae315fd9c4854d629c5 --- /dev/null +++ b/src/e2e_orchestrator/tests/redeploy.sh @@ -0,0 +1,18 @@ +#!/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. + +source src/e2e_orchestrator/tests/deploy_specs.sh +./deploy/all.sh +source tfs_runtime_env_vars.sh diff --git a/src/e2e_orchestrator/tests/run_test_01_bootstrap.sh b/src/e2e_orchestrator/tests/run_test_01_bootstrap.sh new file mode 100755 index 0000000000000000000000000000000000000000..657acb5c04844a3030bcafa56d5d309d3beb005a --- /dev/null +++ b/src/e2e_orchestrator/tests/run_test_01_bootstrap.sh @@ -0,0 +1,17 @@ +#!/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. + +source tfs_runtime_env_vars.sh +pytest --verbose --log-level=INFO src/e2e_orchestrator/tests/functional_tests/test_functional_bootstrap.py diff --git a/src/e2e_orchestrator/tests/run_test_02_compute_path.sh b/src/e2e_orchestrator/tests/run_test_02_compute_path.sh new file mode 100755 index 0000000000000000000000000000000000000000..c6d20bad0da14bd191f607a8abf38241d98d8879 --- /dev/null +++ b/src/e2e_orchestrator/tests/run_test_02_compute_path.sh @@ -0,0 +1,17 @@ +#!/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. + +source tfs_runtime_env_vars.sh +pytest --verbose --log-level=INFO src/e2e_orchestrator/tests/functional_tests/test_functional_compute_path.py diff --git a/src/e2e_orchestrator/tests/run_test_03_cleanup.sh b/src/e2e_orchestrator/tests/run_test_03_cleanup.sh new file mode 100755 index 0000000000000000000000000000000000000000..6ddacf5bdd82bfae66ae1e5558359ea800c7c11b --- /dev/null +++ b/src/e2e_orchestrator/tests/run_test_03_cleanup.sh @@ -0,0 +1,17 @@ +#!/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. + +source tfs_runtime_env_vars.sh +pytest --verbose --log-level=INFO src/e2e_orchestrator/tests/functional_tests/test_functional_cleanup.py diff --git a/src/e2e_orchestrator/tests/run_tests.sh b/src/e2e_orchestrator/tests/run_tests.sh new file mode 100755 index 0000000000000000000000000000000000000000..70b5668ffe9517bf653ea49198c212f257a51b3a --- /dev/null +++ b/src/e2e_orchestrator/tests/run_tests.sh @@ -0,0 +1,20 @@ +#!/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. + +# Run functional tests +source tfs_runtime_env_vars.sh +pytest --verbose --log-level=INFO src/e2e_orchestrator/tests/functional_tests/test_functional_bootstrap.py +pytest --verbose --log-level=INFO src/e2e_orchestrator/tests/functional_tests/test_functional_compute_path.py +pytest --verbose --log-level=INFO src/e2e_orchestrator/tests/functional_tests/test_functional_cleanup.py diff --git a/src/forecaster/.gitlab-ci.yml b/src/forecaster/.gitlab-ci.yml index 09b2f8f4e67db6ce152da608baff6f51279a1dc8..65ce9467b4ad6b13db0dc0a795eeafe94e6e49b9 100644 --- a/src/forecaster/.gitlab-ci.yml +++ b/src/forecaster/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build forecaster: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: diff --git a/src/forecaster/Config.py b/src/forecaster/Config.py index 0d80b8fe62ff2e8313ec6a7b1b0278fea7c16950..84c82dd1513f3a0d16912b2bdec9d149c6da3f68 100644 --- a/src/forecaster/Config.py +++ b/src/forecaster/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/Dockerfile b/src/forecaster/Dockerfile index c09ab8007396895df0a9e4a07cf5984b9d662b3e..62c905a15085537da6c8abf01d522405c544ba15 100644 --- a/src/forecaster/Dockerfile +++ b/src/forecaster/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/__init__.py b/src/forecaster/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/forecaster/__init__.py +++ b/src/forecaster/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/client/ForecasterClient.py b/src/forecaster/client/ForecasterClient.py index 17e0beb339f5dbe748a211c4286a98a376ed6084..d3ba72778807e584f175e735c3c2c9fef8ac3f54 100644 --- a/src/forecaster/client/ForecasterClient.py +++ b/src/forecaster/client/ForecasterClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/client/__init__.py b/src/forecaster/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/forecaster/client/__init__.py +++ b/src/forecaster/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/requirements.in b/src/forecaster/requirements.in index 3ed37c5998a550427f987d881e5ce4455b5e1649..6caa5d616f7b7efc525eb5d79a607b4005d0c4ac 100644 --- a/src/forecaster/requirements.in +++ b/src/forecaster/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/service/Forecaster.py b/src/forecaster/service/Forecaster.py index d2b5b4d09af35752ffa221eabaf40b1d22515d32..148bc8bf81e03ef41ec65cff8353f2edcc51c52a 100644 --- a/src/forecaster/service/Forecaster.py +++ b/src/forecaster/service/Forecaster.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/service/ForecasterService.py b/src/forecaster/service/ForecasterService.py index 944ceb01e1429df4e124d28993cf001bb683aeb5..c44e2e163bcb1b00f0953a2d9e048347521a0f4a 100644 --- a/src/forecaster/service/ForecasterService.py +++ b/src/forecaster/service/ForecasterService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/service/ForecasterServiceServicerImpl.py b/src/forecaster/service/ForecasterServiceServicerImpl.py index 41f6a59fd1e99f1ca336b65139eb9399d1aeec1a..de99054a436aecfd03b5ac3d7dcb7e9ca16d01e3 100644 --- a/src/forecaster/service/ForecasterServiceServicerImpl.py +++ b/src/forecaster/service/ForecasterServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/service/KpiManager.py b/src/forecaster/service/KpiManager.py index 15864c5936b00b792e83c78934c8cc84286662eb..b9b6618d0950e134410c648601732ed99d8697de 100644 --- a/src/forecaster/service/KpiManager.py +++ b/src/forecaster/service/KpiManager.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/service/__init__.py b/src/forecaster/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/forecaster/service/__init__.py +++ b/src/forecaster/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/service/__main__.py b/src/forecaster/service/__main__.py index 780fe5f8f3386b571c37ce64a0b95578e9641110..61f9083eaecd6ed4eb24d6e863f41e80194cac76 100644 --- a/src/forecaster/service/__main__.py +++ b/src/forecaster/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/tests/MockService_Dependencies.py b/src/forecaster/tests/MockService_Dependencies.py index 858db17a9e35e30ea93c965815b39a068c696b4b..55a28e39405ee2f99806f69cb2cc8f792fd97482 100644 --- a/src/forecaster/tests/MockService_Dependencies.py +++ b/src/forecaster/tests/MockService_Dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/tests/PrepareTestScenario.py b/src/forecaster/tests/PrepareTestScenario.py index 7d383f616cce90532228efad515ef5a12509403e..74f6ffed7861b37c4ebf3994d0dba82bff30a02c 100644 --- a/src/forecaster/tests/PrepareTestScenario.py +++ b/src/forecaster/tests/PrepareTestScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/tests/Tools.py b/src/forecaster/tests/Tools.py index 2fd05f100f1b488aea4e4e1db9502675ac6e9a9f..ff686750710fe47adbf03adfad91040fb0fb980b 100644 --- a/src/forecaster/tests/Tools.py +++ b/src/forecaster/tests/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/tests/__init__.py b/src/forecaster/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/forecaster/tests/__init__.py +++ b/src/forecaster/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/tests/data/inject_samples.py b/src/forecaster/tests/data/inject_samples.py index e77cd950828f27e5557ea575d7e9c9b55aabb315..fdc6606c22c6d6e2b9c2720a50be0713527c56e4 100644 --- a/src/forecaster/tests/data/inject_samples.py +++ b/src/forecaster/tests/data/inject_samples.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/forecaster/tests/test_unitary.py b/src/forecaster/tests/test_unitary.py index 4d53e68df369113610f414d58664bf67e2e5d0b9..02a7c3202f3293183680fa1396f1aee3f90fbf42 100644 --- a/src/forecaster/tests/test_unitary.py +++ b/src/forecaster/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/gitlab-ci.yml_generator.py b/src/gitlab-ci.yml_generator.py index 4a4ac389e1e4ec0bfa67270fc8665dfbc830b111..e3d81b7739bbe8bdf39da3dc446beea0bbb69f69 100644 --- a/src/gitlab-ci.yml_generator.py +++ b/src/gitlab-ci.yml_generator.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/.gitlab-ci.yml b/src/interdomain/.gitlab-ci.yml index 486c6d0a931ff18be59ddaaa0268fcb1adfbaa2c..775df616f781912909a13a65f8b6a74b6d8e5942 100644 --- a/src/interdomain/.gitlab-ci.yml +++ b/src/interdomain/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build interdomain: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: diff --git a/src/interdomain/Config.py b/src/interdomain/Config.py index f8e81dd2b598e403b032830d9ef7ad1e155d5ae1..918f60d79d51ee8f9fe3875b630de2c373c01a5a 100644 --- a/src/interdomain/Config.py +++ b/src/interdomain/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/Dockerfile b/src/interdomain/Dockerfile index c10fd8220adae8100fa15fd5d33d833d30d189a9..39a68987cc288f8547e3f8d944718a0b9cbf19c2 100644 --- a/src/interdomain/Dockerfile +++ b/src/interdomain/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/__init__.py b/src/interdomain/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/interdomain/__init__.py +++ b/src/interdomain/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/client/InterdomainClient.py b/src/interdomain/client/InterdomainClient.py index ade3ef20779fd4a456c74ed5420ce2855642bdb8..a829c293ebbe035ef59c8f09369b8d1c0b850e38 100644 --- a/src/interdomain/client/InterdomainClient.py +++ b/src/interdomain/client/InterdomainClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/client/__init__.py b/src/interdomain/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/interdomain/client/__init__.py +++ b/src/interdomain/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/requirements.in b/src/interdomain/requirements.in index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/interdomain/requirements.in +++ b/src/interdomain/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/InterdomainService.py b/src/interdomain/service/InterdomainService.py index 59b6cd820d88caee36de7b2176d51523769ac947..12d651e2f0e76d05e0683be74f48808d71993bdb 100644 --- a/src/interdomain/service/InterdomainService.py +++ b/src/interdomain/service/InterdomainService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/InterdomainServiceServicerImpl.py b/src/interdomain/service/InterdomainServiceServicerImpl.py index fa6bec912413234d225ee1e4662fba0b2cb82b28..54878be2ed70fa834692b85ce27337d61160948b 100644 --- a/src/interdomain/service/InterdomainServiceServicerImpl.py +++ b/src/interdomain/service/InterdomainServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/RemoteDomainClients.py b/src/interdomain/service/RemoteDomainClients.py index adc6fe52b554d119db951189abcefe9e58860985..b69b9f545869d2b9d8721ca109cb0cbe4ad1f8ea 100644 --- a/src/interdomain/service/RemoteDomainClients.py +++ b/src/interdomain/service/RemoteDomainClients.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/Tools.py b/src/interdomain/service/Tools.py index 1c8fd90f1b983e66eca04143c3cf94164cdda425..a43279236d9e5f7ac5c9985c8c93fb2e421fff69 100644 --- a/src/interdomain/service/Tools.py +++ b/src/interdomain/service/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/__init__.py b/src/interdomain/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/interdomain/service/__init__.py +++ b/src/interdomain/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/__main__.py b/src/interdomain/service/__main__.py index b986f8921fd212318dad3598d91e93418a6b51b7..c0497bd2902080f8b967ba50ce370a4c9b711689 100644 --- a/src/interdomain/service/__main__.py +++ b/src/interdomain/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/_old_code/InterdomainServiceServicerImpl.py b/src/interdomain/service/_old_code/InterdomainServiceServicerImpl.py index e80f5c712ac2c47644cac609489761c67ffb69eb..6b0fe9468497bb11818bbf4a5451e74c53b9b6d5 100644 --- a/src/interdomain/service/_old_code/InterdomainServiceServicerImpl.py +++ b/src/interdomain/service/_old_code/InterdomainServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/topology_abstractor/AbstractDevice.py b/src/interdomain/service/topology_abstractor/AbstractDevice.py index 47832acc02c78b5cfc095fb3ecceccfb6b9a774f..38523130cba2c657a2d3b0b61897269f6b7f5cb1 100644 --- a/src/interdomain/service/topology_abstractor/AbstractDevice.py +++ b/src/interdomain/service/topology_abstractor/AbstractDevice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/topology_abstractor/AbstractLink.py b/src/interdomain/service/topology_abstractor/AbstractLink.py index 76b2a0311b2213d35c1b5461e06c324f9304b934..f336d0ad90cc531c1d6b50efb33036088f63f190 100644 --- a/src/interdomain/service/topology_abstractor/AbstractLink.py +++ b/src/interdomain/service/topology_abstractor/AbstractLink.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/topology_abstractor/DltRecordSender.py b/src/interdomain/service/topology_abstractor/DltRecordSender.py index c9a61ef6956acf461124a50e146a2d104ff2e131..a504fe01b4e5755b880b76114c60d28f186f3f6f 100644 --- a/src/interdomain/service/topology_abstractor/DltRecordSender.py +++ b/src/interdomain/service/topology_abstractor/DltRecordSender.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/topology_abstractor/TopologyAbstractor.py b/src/interdomain/service/topology_abstractor/TopologyAbstractor.py index 0d9faa0408fe77dceaf5652b144590f9beb4a88d..2a6ef5e32ca5a973ab833e7e5d0429f65df9812b 100644 --- a/src/interdomain/service/topology_abstractor/TopologyAbstractor.py +++ b/src/interdomain/service/topology_abstractor/TopologyAbstractor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/topology_abstractor/Types.py b/src/interdomain/service/topology_abstractor/Types.py index fa1d135da932481cc19df9286a0af7fa62aff348..5cb3220eb2d6c0204b1271b6881676b8563904fd 100644 --- a/src/interdomain/service/topology_abstractor/Types.py +++ b/src/interdomain/service/topology_abstractor/Types.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/service/topology_abstractor/__init__.py b/src/interdomain/service/topology_abstractor/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/interdomain/service/topology_abstractor/__init__.py +++ b/src/interdomain/service/topology_abstractor/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/tests/__init__.py b/src/interdomain/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/interdomain/tests/__init__.py +++ b/src/interdomain/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/tests/old_tests.py b/src/interdomain/tests/old_tests.py index 3543c9541371d3e1dd3d81e8f51c62082cec6ec1..d5bb962629e5456320e18136976423531fa1d9da 100644 --- a/src/interdomain/tests/old_tests.py +++ b/src/interdomain/tests/old_tests.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/tests/test_compute_domains.py b/src/interdomain/tests/test_compute_domains.py index 3332731dd53ad62801c80c5172fbfee3ea943c6a..81cc2b6708c7f0f91de48e064f6fde833f55f797 100644 --- a/src/interdomain/tests/test_compute_domains.py +++ b/src/interdomain/tests/test_compute_domains.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/interdomain/tests/test_topology_abstractor.py b/src/interdomain/tests/test_topology_abstractor.py index e6243a236c6a2ab38bd5e5325ecdd1668d2b033f..43f470a38e12f7eefaad5346504eb9c0b67d1201 100644 --- a/src/interdomain/tests/test_topology_abstractor.py +++ b/src/interdomain/tests/test_topology_abstractor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_attackmitigator/.gitlab-ci.yml b/src/l3_attackmitigator/.gitlab-ci.yml index c43b553a406bdbaf4cf77f80360469b87dd1c3e4..afc3c32d629275e2bb6465f38df6ff0e41c18daf 100644 --- a/src/l3_attackmitigator/.gitlab-ci.yml +++ b/src/l3_attackmitigator/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build l3_attackmitigator: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: diff --git a/src/l3_attackmitigator/Config.py b/src/l3_attackmitigator/Config.py index 48b6dbab894e2081066bb12d883e826df34e81ca..e82dc4f0dd4cb94713ababc71d34ea7274abc3c5 100644 --- a/src/l3_attackmitigator/Config.py +++ b/src/l3_attackmitigator/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_attackmitigator/Dockerfile b/src/l3_attackmitigator/Dockerfile index 2333bfa30773dcfe49b550d65fb3aa45376d9e03..4622f6f9b9a0cfb4d55f758612026f74d9de45e7 100644 --- a/src/l3_attackmitigator/Dockerfile +++ b/src/l3_attackmitigator/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_attackmitigator/__init__.py b/src/l3_attackmitigator/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/l3_attackmitigator/__init__.py +++ b/src/l3_attackmitigator/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_attackmitigator/client/__init__.py b/src/l3_attackmitigator/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/l3_attackmitigator/client/__init__.py +++ b/src/l3_attackmitigator/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_attackmitigator/client/l3_attackmitigatorClient.py b/src/l3_attackmitigator/client/l3_attackmitigatorClient.py index bae3fd62785e02eed1cd8fd7678c1775b0193d84..a2bcdae40e0d1d5c4e5315af06a9247ce7850cc6 100644 --- a/src/l3_attackmitigator/client/l3_attackmitigatorClient.py +++ b/src/l3_attackmitigator/client/l3_attackmitigatorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_attackmitigator/requirements.in b/src/l3_attackmitigator/requirements.in index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/l3_attackmitigator/requirements.in +++ b/src/l3_attackmitigator/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_attackmitigator/service/__init__.py b/src/l3_attackmitigator/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/l3_attackmitigator/service/__init__.py +++ b/src/l3_attackmitigator/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_attackmitigator/service/__main__.py b/src/l3_attackmitigator/service/__main__.py index aadccbdab47a2bc6fce860ffe762018bec78be31..3a0263e25a65073e1d7199c8cc978efd05cc493d 100644 --- a/src/l3_attackmitigator/service/__main__.py +++ b/src/l3_attackmitigator/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_attackmitigator/service/l3_attackmitigatorService.py b/src/l3_attackmitigator/service/l3_attackmitigatorService.py index 84ab811ef944808e042712191dfef7d2646f4926..7794041bd9f25666b2c4417834b8b41fa10a624f 100644 --- a/src/l3_attackmitigator/service/l3_attackmitigatorService.py +++ b/src/l3_attackmitigator/service/l3_attackmitigatorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_attackmitigator/service/l3_attackmitigatorServiceServicerImpl.py b/src/l3_attackmitigator/service/l3_attackmitigatorServiceServicerImpl.py index 5a7abe0a7416e61ae73b24e5f528ebc1717d8f2e..6b2a65c9822d749a86db9a18b51626d12c6ba173 100644 --- a/src/l3_attackmitigator/service/l3_attackmitigatorServiceServicerImpl.py +++ b/src/l3_attackmitigator/service/l3_attackmitigatorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_attackmitigator/tests/__init__.py b/src/l3_attackmitigator/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/l3_attackmitigator/tests/__init__.py +++ b/src/l3_attackmitigator/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_attackmitigator/tests/test_unitary.py b/src/l3_attackmitigator/tests/test_unitary.py index 8f048f876e28ac1fcd8517690056c71afe685f8e..53d09a227350eb127ab684c210cea6d56bcb7ac1 100644 --- a/src/l3_attackmitigator/tests/test_unitary.py +++ b/src/l3_attackmitigator/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_centralizedattackdetector/.gitlab-ci.yml b/src/l3_centralizedattackdetector/.gitlab-ci.yml index 057545eb1b65aac26610c6460a47592b4e7604c2..1b047aef8205e5852a4b30a7234ebfdad7686358 100644 --- a/src/l3_centralizedattackdetector/.gitlab-ci.yml +++ b/src/l3_centralizedattackdetector/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build l3_centralizedattackdetector: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: diff --git a/src/l3_centralizedattackdetector/Config.py b/src/l3_centralizedattackdetector/Config.py index 809380b2cda1c8c556f973e570de36e3189edb99..afff93eb5250214389aa082b0a0c16255482adcf 100644 --- a/src/l3_centralizedattackdetector/Config.py +++ b/src/l3_centralizedattackdetector/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_centralizedattackdetector/Dockerfile b/src/l3_centralizedattackdetector/Dockerfile index 376d8904dfc58efd2e1963806d0d07179647b54f..a294014ac02d8377db5bd848a5d7e07643658de6 100644 --- a/src/l3_centralizedattackdetector/Dockerfile +++ b/src/l3_centralizedattackdetector/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_centralizedattackdetector/__init__.py b/src/l3_centralizedattackdetector/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/l3_centralizedattackdetector/__init__.py +++ b/src/l3_centralizedattackdetector/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_centralizedattackdetector/client/__init__.py b/src/l3_centralizedattackdetector/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/l3_centralizedattackdetector/client/__init__.py +++ b/src/l3_centralizedattackdetector/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_centralizedattackdetector/client/l3_centralizedattackdetectorClient.py b/src/l3_centralizedattackdetector/client/l3_centralizedattackdetectorClient.py index 8de016a5d56ea1e1fefe23ba6e29f6865ee5e5a6..02aed22b40831dee4ee5e0eeec36822e481220be 100644 --- a/src/l3_centralizedattackdetector/client/l3_centralizedattackdetectorClient.py +++ b/src/l3_centralizedattackdetector/client/l3_centralizedattackdetectorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_centralizedattackdetector/requirements.in b/src/l3_centralizedattackdetector/requirements.in index 130abd9424379f173b5393a00d14337c582f31e9..34513101381471027dbdbab4d3a615e057acd92e 100644 --- a/src/l3_centralizedattackdetector/requirements.in +++ b/src/l3_centralizedattackdetector/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_centralizedattackdetector/service/__init__.py b/src/l3_centralizedattackdetector/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/l3_centralizedattackdetector/service/__init__.py +++ b/src/l3_centralizedattackdetector/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_centralizedattackdetector/service/__main__.py b/src/l3_centralizedattackdetector/service/__main__.py index 5b8873afd6d67e586ce727eaafdf51f1c0002814..c03f77f4287de25a407dfadcaa0a1730678d1a66 100644 --- a/src/l3_centralizedattackdetector/service/__main__.py +++ b/src/l3_centralizedattackdetector/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorService.py b/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorService.py index 857f0e448725399caa82b3fdd331ff9ceff623a8..b9367a51153bcbf1d1ac13a5ab64491c3d20ab97 100644 --- a/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorService.py +++ b/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py b/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py index a5c38151c0f44534b96c550860deac495d442c4d..b03ee98f5c401445cf59f3c7b918a5af7fcd0318 100644 --- a/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py +++ b/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_centralizedattackdetector/tests/__init__.py b/src/l3_centralizedattackdetector/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/l3_centralizedattackdetector/tests/__init__.py +++ b/src/l3_centralizedattackdetector/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_centralizedattackdetector/tests/test_unitary.py b/src/l3_centralizedattackdetector/tests/test_unitary.py index 4d28755c02a1f68fb74e9b2b852aee51984f4b73..b11be4862295eb17afd7e4be7bd60964e485a8dc 100644 --- a/src/l3_centralizedattackdetector/tests/test_unitary.py +++ b/src/l3_centralizedattackdetector/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_distributedattackdetector/.gitlab-ci.yml b/src/l3_distributedattackdetector/.gitlab-ci.yml index 226cb642176a7d0854ee8dbdaf623cf7bcad1fc2..1ab68357354c13edb3722498501d6a2d2445d795 100644 --- a/src/l3_distributedattackdetector/.gitlab-ci.yml +++ b/src/l3_distributedattackdetector/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build l3_distributedattackdetector: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: diff --git a/src/l3_distributedattackdetector/Config.py b/src/l3_distributedattackdetector/Config.py index a1419ef09c9b3dcbff5aa576536fae8ffe6bc7a4..bf344455f537c5b363d8fa4c737ccff57b145e08 100644 --- a/src/l3_distributedattackdetector/Config.py +++ b/src/l3_distributedattackdetector/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_distributedattackdetector/Dockerfile b/src/l3_distributedattackdetector/Dockerfile index 37fb71fbab0ed22b8f2ff6a4281e3cea8dc32684..fd1a38483d49e6debdbe981d547268374bb5fc7b 100644 --- a/src/l3_distributedattackdetector/Dockerfile +++ b/src/l3_distributedattackdetector/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_distributedattackdetector/__init__.py b/src/l3_distributedattackdetector/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/l3_distributedattackdetector/__init__.py +++ b/src/l3_distributedattackdetector/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_distributedattackdetector/requirements.in b/src/l3_distributedattackdetector/requirements.in index 64e4aa198bd8b7902c0bb810e5fcd6f108faae6f..6deb8d906f733e25bfac07bbe82b536b4774f5bb 100644 --- a/src/l3_distributedattackdetector/requirements.in +++ b/src/l3_distributedattackdetector/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_distributedattackdetector/service/__init__.py b/src/l3_distributedattackdetector/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/l3_distributedattackdetector/service/__init__.py +++ b/src/l3_distributedattackdetector/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_distributedattackdetector/service/__main__.py b/src/l3_distributedattackdetector/service/__main__.py index a8f0ac3c4f9737091c2c1a39134b97ee7bd6de7d..a46177611453824d7fe80506539f129776041897 100644 --- a/src/l3_distributedattackdetector/service/__main__.py +++ b/src/l3_distributedattackdetector/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_distributedattackdetector/service/l3_distributedattackdetector.py b/src/l3_distributedattackdetector/service/l3_distributedattackdetector.py index 6c9d09dc57d2966538dbe804117e330e06b10bd4..c841b21b451168ec74660b5df5fd218ab1d66cba 100644 --- a/src/l3_distributedattackdetector/service/l3_distributedattackdetector.py +++ b/src/l3_distributedattackdetector/service/l3_distributedattackdetector.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_distributedattackdetector/tests/__init__.py b/src/l3_distributedattackdetector/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/l3_distributedattackdetector/tests/__init__.py +++ b/src/l3_distributedattackdetector/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_distributedattackdetector/tests/data_generator.py b/src/l3_distributedattackdetector/tests/data_generator.py index bd65566389b1dbfa3d42c6ae55e72d15f8f9c608..02efcdc321dce1adb932e91d51a65a1f87ca7ece 100644 --- a/src/l3_distributedattackdetector/tests/data_generator.py +++ b/src/l3_distributedattackdetector/tests/data_generator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/l3_distributedattackdetector/tests/test_unitary.py b/src/l3_distributedattackdetector/tests/test_unitary.py index 88e3dda986056e70f22cafc6124f0edc6770ee3e..3d54cb7d269617ae819353721f9a1b504e8e3d93 100644 --- a/src/l3_distributedattackdetector/tests/test_unitary.py +++ b/src/l3_distributedattackdetector/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/.gitlab-ci.yml b/src/load_generator/.gitlab-ci.yml index 5f2ee0d76105e57d31b0a6596d020ef53e65a631..5664c4dc53c6b62f20fba45749e5911a2505a04e 100644 --- a/src/load_generator/.gitlab-ci.yml +++ b/src/load_generator/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build load_generator: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: diff --git a/src/load_generator/Config.py b/src/load_generator/Config.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/load_generator/Config.py +++ b/src/load_generator/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/Dockerfile b/src/load_generator/Dockerfile index 6f7bb0eace4cc3e8561df9e07ce6ef25ebf43855..243b908d5c95f41f6afeb1f42b87d3257056a5ba 100644 --- a/src/load_generator/Dockerfile +++ b/src/load_generator/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/__init__.py b/src/load_generator/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/load_generator/__init__.py +++ b/src/load_generator/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/client/LoadGeneratorClient.py b/src/load_generator/client/LoadGeneratorClient.py index 2bed40dfdfe13d2920166bcb56237fe84bff8789..688184b6d48058f7b7553fb0c0ac195bf789f9b6 100644 --- a/src/load_generator/client/LoadGeneratorClient.py +++ b/src/load_generator/client/LoadGeneratorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/client/__init__.py b/src/load_generator/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/load_generator/client/__init__.py +++ b/src/load_generator/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/command/__init__.py b/src/load_generator/command/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/load_generator/command/__init__.py +++ b/src/load_generator/command/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/command/__main__.py b/src/load_generator/command/__main__.py index 4fa2094e0fdc94b9665b2cfc86811e67809bcb5f..d47a8290bddc910fd34f80860962ca59dffe95a9 100644 --- a/src/load_generator/command/__main__.py +++ b/src/load_generator/command/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/load_gen/Constants.py b/src/load_generator/load_gen/Constants.py index 09cdecab124a776d3f71f66554db0934eaf1bb1c..e4f34d50a34c7673cd949cf321736f88a70ea64c 100644 --- a/src/load_generator/load_gen/Constants.py +++ b/src/load_generator/load_gen/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/load_gen/DltTools.py b/src/load_generator/load_gen/DltTools.py index 8799f7d8a13aff6018ffe06700b4478daa2b3271..0ac7ab3f03d29480b0e57cc9993b71c4d8324d76 100644 --- a/src/load_generator/load_gen/DltTools.py +++ b/src/load_generator/load_gen/DltTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/load_gen/Parameters.py b/src/load_generator/load_gen/Parameters.py index 5bb7a9b725f955a4186a21201e439f9cfaa71324..adc551cd23e72565b3cc40989f7e533b849bc3af 100644 --- a/src/load_generator/load_gen/Parameters.py +++ b/src/load_generator/load_gen/Parameters.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/load_gen/RequestGenerator.py b/src/load_generator/load_gen/RequestGenerator.py index 149c2568bf2cc08b351d9af31ecbe512faf3e796..2a3e89fe02bc2a8267d203d3134c65983cb985f2 100644 --- a/src/load_generator/load_gen/RequestGenerator.py +++ b/src/load_generator/load_gen/RequestGenerator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/load_gen/RequestScheduler.py b/src/load_generator/load_gen/RequestScheduler.py index 340a5411bacee7b0aeb495963cdf65fbb5d14389..3bc9486dc67121f52961c5397859f1aec28b9fab 100644 --- a/src/load_generator/load_gen/RequestScheduler.py +++ b/src/load_generator/load_gen/RequestScheduler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/load_gen/__init__.py b/src/load_generator/load_gen/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/load_generator/load_gen/__init__.py +++ b/src/load_generator/load_gen/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/requirements.in b/src/load_generator/requirements.in index 44bd0ef1a321e9d08e253f01caca2d204d61fd6c..8a92ca4ea18ecde0c1f8e9ff74b932fcac3fb6a0 100644 --- a/src/load_generator/requirements.in +++ b/src/load_generator/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/run.sh b/src/load_generator/run.sh index 0ef004598ea91e54b6b054a48a0b830287ce5ed3..08572a31c18520ae46faab8c56daa59a13f22e61 100755 --- a/src/load_generator/run.sh +++ b/src/load_generator/run.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/service/Constants.py b/src/load_generator/service/Constants.py index 6c339877c70363e874df278d6b5d29cc47a3be0f..5053dc5fecf9a033a1de7dd14af3a95bd142b9c6 100644 --- a/src/load_generator/service/Constants.py +++ b/src/load_generator/service/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/service/LoadGeneratorService.py b/src/load_generator/service/LoadGeneratorService.py index bdcd33a110580450cfa335bda14e95cb8b01a3a7..2c99d7da7776a0952ad0ae00455bc5e2f5e29ed0 100644 --- a/src/load_generator/service/LoadGeneratorService.py +++ b/src/load_generator/service/LoadGeneratorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/service/LoadGeneratorServiceServicerImpl.py b/src/load_generator/service/LoadGeneratorServiceServicerImpl.py index 866f9f089662598b08c8dd03d04b01fd63108f5a..ff32f23a67e83fd3bda4a0acf166b2e1bb9abacb 100644 --- a/src/load_generator/service/LoadGeneratorServiceServicerImpl.py +++ b/src/load_generator/service/LoadGeneratorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/service/__init__.py b/src/load_generator/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/load_generator/service/__init__.py +++ b/src/load_generator/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/service/__main__.py b/src/load_generator/service/__main__.py index 5f5fa97f971223478abba2bfef1a1d6012fb6135..933fdad31e3bd430aa5cd2e61026c90c1a51a33f 100644 --- a/src/load_generator/service/__main__.py +++ b/src/load_generator/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/tests/__init__.py b/src/load_generator/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/load_generator/tests/__init__.py +++ b/src/load_generator/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/tests/deploy_specs.sh b/src/load_generator/tests/deploy_specs.sh index 05623fd626531fc9568fb484f3002b00e171e376..3a85d615bf61cd5ef88dcd3d2499592c5999e927 100755 --- a/src/load_generator/tests/deploy_specs.sh +++ b/src/load_generator/tests/deploy_specs.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/tests/test_dlt_functional.py b/src/load_generator/tests/test_dlt_functional.py index 764b0432053902b5533cc7844fcb12f42888de83..f3dea3b4a83ed59cfb137eba03d312f4c87f0d45 100644 --- a/src/load_generator/tests/test_dlt_functional.py +++ b/src/load_generator/tests/test_dlt_functional.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/tools/ListScalarRange.py b/src/load_generator/tools/ListScalarRange.py index 9a5a5f39940049adee6dfbe35befd815db9256fe..a41ca22eb3ddccf5e420f7d46cd6d13a157b84a6 100644 --- a/src/load_generator/tools/ListScalarRange.py +++ b/src/load_generator/tools/ListScalarRange.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/load_generator/tools/__init__.py b/src/load_generator/tools/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/load_generator/tools/__init__.py +++ b/src/load_generator/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/.gitlab-ci.yml b/src/monitoring/.gitlab-ci.yml index 7c3a14975d9c7bf7d5d46be917203338bea7f1f9..73365dfada1715e689f58fe94d7451cc9df9c155 100644 --- a/src/monitoring/.gitlab-ci.yml +++ b/src/monitoring/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build monitoring: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: diff --git a/src/monitoring/Dockerfile b/src/monitoring/Dockerfile index 36aa7eb0967619202dfbcb18271f646657a58125..af308d06002a0461f51ea56366222a76e100dc69 100644 --- a/src/monitoring/Dockerfile +++ b/src/monitoring/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/__init__.py b/src/monitoring/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/monitoring/__init__.py +++ b/src/monitoring/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/client/MonitoringClient.py b/src/monitoring/client/MonitoringClient.py index 751ff6e38e52a9d09d170c440ced0a04a44e10a3..994cede8e2606a53606af1c5ed8d2b6544d473fb 100644 --- a/src/monitoring/client/MonitoringClient.py +++ b/src/monitoring/client/MonitoringClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/client/__init__.py b/src/monitoring/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/monitoring/client/__init__.py +++ b/src/monitoring/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/requirements.in b/src/monitoring/requirements.in index 4e57dd0193485b3f7ed3ea346534fb1cb43c5538..8684cb22350416818c20e881993a62d4f10a2e9e 100644 --- a/src/monitoring/requirements.in +++ b/src/monitoring/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/service/AlarmManager.py b/src/monitoring/service/AlarmManager.py index 495a5f365cb0220a647866de57915c5cee8ab94d..e71464c418567fdf1773ec913166ce3c1d3fe26e 100644 --- a/src/monitoring/service/AlarmManager.py +++ b/src/monitoring/service/AlarmManager.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/service/EventTools.py b/src/monitoring/service/EventTools.py index 468e0c58cc43d1c3ecf1232ebf2a9ed46a91e93b..7820f11c86e87f543087c88704572e1a169c6e7d 100644 --- a/src/monitoring/service/EventTools.py +++ b/src/monitoring/service/EventTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/service/InfluxTools.py b/src/monitoring/service/InfluxTools.py index f2f877d9203974dbb91681e08be54f687071f463..152114faf01314324bdab4d7e1d6980d2f728002 100644 --- a/src/monitoring/service/InfluxTools.py +++ b/src/monitoring/service/InfluxTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/service/ManagementDBTools.py b/src/monitoring/service/ManagementDBTools.py index d2a63685f17b58c0f92acb4ef9606f3df929b9e0..eb249dad65fdb7298a37bb067b54d6e22533e9e3 100644 --- a/src/monitoring/service/ManagementDBTools.py +++ b/src/monitoring/service/ManagementDBTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/service/MetricsDBTools.py b/src/monitoring/service/MetricsDBTools.py index ad20b5afaa6d8510e0e39267ef6e1d71782e3e22..5f387dbb5471750439d99d4ee988f33f182e7d4f 100644 --- a/src/monitoring/service/MetricsDBTools.py +++ b/src/monitoring/service/MetricsDBTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/service/MonitoringService.py b/src/monitoring/service/MonitoringService.py index 5680a80943144db0e9a8f156c65ff0b15013482e..9e78b149ff7b4e55f63432765eb06a8ab6843ee3 100644 --- a/src/monitoring/service/MonitoringService.py +++ b/src/monitoring/service/MonitoringService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/service/MonitoringServiceServicerImpl.py b/src/monitoring/service/MonitoringServiceServicerImpl.py index 608b0bad9d5869cde35be60157fec9e0a6d34c90..e7025969172482ebc7c964bbc94d698824ee6966 100644 --- a/src/monitoring/service/MonitoringServiceServicerImpl.py +++ b/src/monitoring/service/MonitoringServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/service/NameMapping.py b/src/monitoring/service/NameMapping.py index 17a48b3cd686f27ad5ad8c6f9027588d84f4feba..f98e367b17b4a2e4c7c6f3dcdb90dfb8ee24d3ad 100644 --- a/src/monitoring/service/NameMapping.py +++ b/src/monitoring/service/NameMapping.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/service/SubscriptionManager.py b/src/monitoring/service/SubscriptionManager.py index 7c2b930cefcc620f97d1f759bda00d51ea5d6dd5..9e775315573dd1f9bb84b4d7de6b0f99755b3a96 100644 --- a/src/monitoring/service/SubscriptionManager.py +++ b/src/monitoring/service/SubscriptionManager.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/service/__init__.py b/src/monitoring/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/monitoring/service/__init__.py +++ b/src/monitoring/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/service/__main__.py b/src/monitoring/service/__main__.py index d242f0fc0add7afebed32178bfafde23552a7649..b3c4765beb4809dd66f71e60844abda5af43083f 100644 --- a/src/monitoring/service/__main__.py +++ b/src/monitoring/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/tests/Messages.py b/src/monitoring/tests/Messages.py index a56207d9a74869ef625631f6a21762608ad59c14..a6ea6f74a7a727e4d23ea54ad51fa032c736c271 100644 --- a/src/monitoring/tests/Messages.py +++ b/src/monitoring/tests/Messages.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/tests/Objects.py b/src/monitoring/tests/Objects.py index c5228981bd0c0a5c9104c286f7daa8fb38baf47b..09354bd18b910d281f907deed9f218d6b21b5000 100644 --- a/src/monitoring/tests/Objects.py +++ b/src/monitoring/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/tests/__init__.py b/src/monitoring/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/monitoring/tests/__init__.py +++ b/src/monitoring/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/monitoring/tests/test_unitary.py b/src/monitoring/tests/test_unitary.py index f2c2215970545e1f6583598bdc5ef88299ba76d2..6838d66f3102aaf43bca913c8bb3266e10b4a4e8 100644 --- a/src/monitoring/tests/test_unitary.py +++ b/src/monitoring/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -38,7 +38,6 @@ from common.tools.service.GenericGrpcService import GenericGrpcService from common.tools.timestamp.Converters import timestamp_utcnow_to_float #, timestamp_string_to_float from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient -from device.service.DeviceService import DeviceService from device.service.driver_api.DriverFactory import DriverFactory from device.service.driver_api.DriverInstanceCache import DriverInstanceCache from monitoring.client.MonitoringClient import MonitoringClient @@ -54,7 +53,8 @@ from monitoring.tests.Messages import create_kpi_request, create_kpi_request_d, from monitoring.tests.Objects import DEVICE_DEV1, DEVICE_DEV1_CONNECT_RULES, DEVICE_DEV1_UUID, ENDPOINT_END1_UUID os.environ['DEVICE_EMULATED_ONLY'] = 'TRUE' -from device.service.drivers import DRIVERS # pylint: disable=wrong-import-position,ungrouped-imports +from device.service.DeviceService import DeviceService # pylint: disable=wrong-import-position,ungrouped-imports +from device.service.drivers import DRIVERS # pylint: disable=wrong-import-position,ungrouped-imports ########################### diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 0b12f9f08b9705ce51f7ff36f0446d9c83c85bbd..5f4e45366fff439aee3afe29edae5b0b8356a053 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build nbi: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: @@ -48,15 +48,29 @@ unit_test nbi: - build nbi 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 + - > + 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 9090:9090 -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - sleep 5 - docker ps -a - docker logs $IMAGE_NAME - - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/opt/results/${IMAGE_NAME}_report.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.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: @@ -77,7 +91,7 @@ unit_test nbi: artifacts: when: always reports: - junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml + junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report_*.xml ## Deployment of the service in Kubernetes Cluster #deploy nbi: diff --git a/src/nbi/Config.py b/src/nbi/Config.py index 3fae9e3a77c5b8692a900906cc5c93f018be8b8c..d715ba5d71ee186c31b83f2c07b1dc1d2c9ce4be 100644 --- a/src/nbi/Config.py +++ b/src/nbi/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/Dockerfile b/src/nbi/Dockerfile index 12b3c86747d927a11c3688322846efc6de0607c6..1435e9757226e290e92f208ef48a7182eb106c55 100644 --- a/src/nbi/Dockerfile +++ b/src/nbi/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -53,6 +53,24 @@ 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 @@ -63,9 +81,14 @@ RUN python3 -m pip install -r requirements.txt # Add component files into working directory WORKDIR /var/teraflow COPY src/nbi/. nbi/ -COPY src/context/. context/ -COPY src/service/. service/ -COPY src/slice/. slice/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +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/ RUN mkdir -p /var/teraflow/tests/tools COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ diff --git a/src/nbi/README.md b/src/nbi/README.md new file mode 100644 index 0000000000000000000000000000000000000000..32902a0b33dba2f9ce3df4a60833608bac6e129d --- /dev/null +++ b/src/nbi/README.md @@ -0,0 +1,35 @@ +# NBI Component + +The NBI component uses libyang to validate and process messages. Follow instructions below to install it. + +## Install libyang +- Ref: https://github.com/CESNET/libyang +- Ref: https://github.com/CESNET/libyang-python/ + +__NOTE__: APT package is extremely outdated and does not work for our purposes. + +### Build Requisites +```bash +sudo apt-get install build-essential cmake libpcre2-dev +sudo apt-get install python3-dev gcc python3-cffi +``` + +### Build from source +```bash +mkdir ~/tfs-ctrl/libyang +git clone https://github.com/CESNET/libyang.git ~/tfs-ctrl/libyang +cd ~/tfs-ctrl/libyang +git fetch +git checkout v2.1.148 +mkdir ~/tfs-ctrl/libyang/build +cd ~/tfs-ctrl/libyang/build +cmake -D CMAKE_BUILD_TYPE:String="Release" .. +make +sudo make install +sudo ldconfig +``` + +### Install Python bindings +```bash +pip install libyang==2.8.0 +``` diff --git a/src/nbi/__init__.py b/src/nbi/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/nbi/__init__.py +++ b/src/nbi/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/client/NbiClient.py b/src/nbi/client/NbiClient.py index a2fba1cd540c0f8a2e3580f8c894ff9fdb1b94ce..d7eb27486e70968b1dc66e8a6296103a2b8ca440 100644 --- a/src/nbi/client/NbiClient.py +++ b/src/nbi/client/NbiClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/client/__init__.py b/src/nbi/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/nbi/client/__init__.py +++ b/src/nbi/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/requirements.in b/src/nbi/requirements.in index dc22f64eb79778f89d1e66d9718dfed2c15457a3..78d941974c62e32251373a805056068608b0bda2 100644 --- a/src/nbi/requirements.in +++ b/src/nbi/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,9 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +deepdiff==6.7.* +deepmerge==1.1.* Flask==2.1.3 Flask-HTTPAuth==4.5.0 Flask-RESTful==0.3.9 jsonschema==4.4.0 +libyang==2.8.0 +netaddr==0.9.0 +pyang==2.6.0 +git+https://github.com/robshakir/pyangbind.git requests==2.27.1 -werkzeug==2.3.7 \ No newline at end of file +werkzeug==2.3.7 diff --git a/src/nbi/service/NbiService.py b/src/nbi/service/NbiService.py index 8d8236f8e91b257de8d2ee108064562075bc03f2..d8886cf38e7bb6d6dd973fdfd5aa4f7e564c31ee 100644 --- a/src/nbi/service/NbiService.py +++ b/src/nbi/service/NbiService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/NbiServiceServicerImpl.py b/src/nbi/service/NbiServiceServicerImpl.py index d454a4df92dce719acac0cb6d2a39052c3c66e06..b1d62afb11709d9ee237bc1f840b803674923c00 100644 --- a/src/nbi/service/NbiServiceServicerImpl.py +++ b/src/nbi/service/NbiServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/__init__.py b/src/nbi/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/nbi/service/__init__.py +++ b/src/nbi/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/__main__.py b/src/nbi/service/__main__.py index 1b6fb6e87c0f47e2e5f115fdf910d963180d644b..362b0116d6f0bdbc4d1fa2025c09ac23c828617f 100644 --- a/src/nbi/service/__main__.py +++ b/src/nbi/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,10 +20,12 @@ from common.Settings import ( wait_for_environment_variables) from .NbiService import NbiService from .rest_server.RestServer import RestServer -from .rest_server.nbi_plugins.debug_api import register_debug_api from .rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api from .rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn +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.tfs_api import register_tfs_api terminate = threading.Event() LOGGER = None @@ -60,10 +62,12 @@ def main(): grpc_service.start() rest_server = RestServer() - register_debug_api(rest_server) register_etsi_bwm_api(rest_server) register_ietf_l2vpn(rest_server) # Registering L2VPN entrypoint + register_ietf_l3vpn(rest_server) # Registering L3VPN entrypoint + register_ietf_network(rest_server) register_ietf_nss(rest_server) # Registering NSS entrypoint + register_tfs_api(rest_server) rest_server.start() # Wait for Ctrl+C or termination signal diff --git a/src/nbi/service/rest_server/RestServer.py b/src/nbi/service/rest_server/RestServer.py index 33eb457179d53f95d733f6572b41da6df14b3a55..42775036237eba32f6fb1cd5a47e41ff3e885deb 100644 --- a/src/nbi/service/rest_server/RestServer.py +++ b/src/nbi/service/rest_server/RestServer.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/__init__.py b/src/nbi/service/rest_server/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/nbi/service/rest_server/__init__.py +++ b/src/nbi/service/rest_server/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/__init__.py b/src/nbi/service/rest_server/nbi_plugins/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Resources.py b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Resources.py index 38534b754d6c1ac502b21af55375c63159c57745..88754adae376347851c818c596a4d7d9764a3c3b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Resources.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,14 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy +import copy, deepmerge, json, logging +from typing import Dict from common.Constants import DEFAULT_CONTEXT_NAME -from flask_restful import Resource, request +from werkzeug.exceptions import UnsupportedMediaType from context.client.ContextClient import ContextClient +from flask_restful import Resource, request from service.client.ServiceClient import ServiceClient from .Tools import ( format_grpc_to_json, grpc_context_id, grpc_service_id, bwInfo_2_service, service_2_bwInfo) +LOGGER = logging.getLogger(__name__) class _Resource(Resource): @@ -36,16 +39,20 @@ class BwInfo(_Resource): return bw_allocations def post(self): - bwinfo = request.get_json() - service = bwInfo_2_service(self.client, bwinfo) + if not request.is_json: + raise UnsupportedMediaType('JSON payload is required') + request_data: Dict = request.get_json() + service = bwInfo_2_service(self.client, request_data) stripped_service = copy.deepcopy(service) - stripped_service.ClearField('service_endpoint_ids') stripped_service.ClearField('service_constraints') stripped_service.ClearField('service_config') - response = format_grpc_to_json(self.service_client.CreateService(stripped_service)) - response = format_grpc_to_json(self.service_client.UpdateService(service)) + try: + response = format_grpc_to_json(self.service_client.CreateService(stripped_service)) + response = format_grpc_to_json(self.service_client.UpdateService(service)) + except Exception as e: # pylint: disable=broad-except + return e return response @@ -57,19 +64,30 @@ class BwInfoId(_Resource): return service_2_bwInfo(service) def put(self, allocationId: str): - json_data = request.get_json() + json_data = json.loads(request.get_json()) service = bwInfo_2_service(self.client, json_data) - response = self.service_client.UpdateService(service) - return format_grpc_to_json(response) + self.service_client.UpdateService(service) + service = self.client.GetService(grpc_service_id(DEFAULT_CONTEXT_NAME, json_data['appInsId'])) + response_bwm = service_2_bwInfo(service) + + return response_bwm def patch(self, allocationId: str): json_data = request.get_json() if not 'appInsId' in json_data: json_data['appInsId'] = allocationId - service = bwInfo_2_service(self.client, json_data) - response = self.service_client.UpdateService(service) - return format_grpc_to_json(response) + + service = self.client.GetService(grpc_service_id(DEFAULT_CONTEXT_NAME, json_data['appInsId'])) + current_bwm = service_2_bwInfo(service) + new_bmw = deepmerge.always_merger.merge(current_bwm, json_data) + + service = bwInfo_2_service(self.client, new_bmw) + self.service_client.UpdateService(service) + + service = self.client.GetService(grpc_service_id(DEFAULT_CONTEXT_NAME, json_data['appInsId'])) + response_bwm = service_2_bwInfo(service) + + return response_bwm def delete(self, allocationId: str): self.service_client.DeleteService(grpc_service_id(DEFAULT_CONTEXT_NAME, allocationId)) - return diff --git a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Tools.py b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Tools.py index 023d1006cd807ffeeed40d2e1e7273a580431073..111f6f48482d4f2a0e494b0bd2e49eadee25ee60 100644 --- a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Tools.py +++ b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,35 +14,65 @@ import json import logging +import re import time +from decimal import ROUND_HALF_EVEN, Decimal from flask.json import jsonify -from common.proto.context_pb2 import ContextId, Empty, EndPointId, ServiceId, ServiceTypeEnum, Service, Constraint, Constraint_SLA_Capacity, ConfigRule, ConfigRule_Custom, ConfigActionEnum +from common.proto.context_pb2 import ( + ContextId, Empty, EndPointId, ServiceId, ServiceTypeEnum, Service, ServiceStatusEnum, Constraint, Constraint_SLA_Capacity, + ConfigRule, ConfigRule_Custom, ConfigActionEnum) from common.tools.grpc.Tools import grpc_message_to_json +from common.tools.grpc.ConfigRules import update_config_rule_custom from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.Service import json_service_id LOGGER = logging.getLogger(__name__) +ENDPOINT_SETTINGS_KEY = '/device[{:s}]/endpoint[{:s}]/vlan[{:d}]/settings' +DEVICE_SETTINGS_KEY = '/device[{:s}]/settings' +RE_CONFIG_RULE_IF_SUBIF = re.compile(r'^\/interface\[([^\]]+)\]\/subinterface\[([^\]]+)\]$') +MEC_CONSIDERED_FIELDS = ['requestType', 'sessionFilter', 'fixedAllocation', 'allocationDirection', 'fixedBWPriority'] +ALLOCATION_DIRECTION_DESCRIPTIONS = { + '00' : 'Downlink (towards the UE)', + '01' : 'Uplink (towards the application/session)', + '10' : 'Symmetrical'} +VLAN_TAG = 0 +PREFIX_LENGTH = 24 +BGP_AS = 65000 +POLICY_AZ = 'srv_{:d}_a'.format(VLAN_TAG) +POLICY_ZA = 'srv_{:d}_b'.format(VLAN_TAG) +BGP_NEIGHBOR_IP_A = '192.168.150.1' +BGP_NEIGHBOR_IP_Z = '192.168.150.2' +ROUTER_ID_A = '200.1.1.1' +ROUTER_ID_Z = '200.1.1.2' +ROUTE_DISTINGUISHER = '{:5d}:{:03d}'.format(BGP_AS, VLAN_TAG) def service_2_bwInfo(service: Service) -> dict: response = {} - # allocationDirection = '??' # String: 00 = Downlink (towards the UE); 01 = Uplink (towards the application/session); 10 = Symmetrical - response['appInsId'] = service.service_id.context_id.context_uuid.uuid # String: Application instance identifier + response['appInsId'] = service.service_id.service_uuid.uuid # String: Application instance identifier for constraint in service.service_constraints: if constraint.WhichOneof('constraint') == 'sla_capacity': - response['fixedAllocation'] = str(constraint.sla_capacity.capacity_gbps*1000) # String: Size of requested fixed BW allocation in [bps] + # String: Size of requested fixed BW allocation in [bps] + fixed_allocation = Decimal(constraint.sla_capacity.capacity_gbps * 1.e9) + fixed_allocation = fixed_allocation.quantize(Decimal('0.1'), rounding=ROUND_HALF_EVEN) + response['fixedAllocation'] = str(fixed_allocation) break - for config_rule in service.service_config.config_rules: + resource_value_json = json.loads(config_rule.custom.resource_value) + if config_rule.custom.resource_key != '/request': + continue for key in ['allocationDirection', 'fixedBWPriority', 'requestType', 'sourceIp', 'sourcePort', 'dstPort', 'protocol', 'sessionFilter']: - if config_rule.custom.resource_key == key: - if key != 'sessionFilter': - response[key] = config_rule.custom.resource_value - else: - response[key] = json.loads(config_rule.custom.resource_value) + if key not in resource_value_json: + continue + + if key == 'sessionFilter': + response[key] = [resource_value_json[key]] + elif key == 'requestType': + response[key] = str(resource_value_json[key]) + else: + response[key] = resource_value_json[key] - unixtime = time.time() response['timeStamp'] = { # Time stamp to indicate when the corresponding information elements are sent "seconds": int(unixtime), @@ -51,52 +81,108 @@ def service_2_bwInfo(service: Service) -> dict: return response -def bwInfo_2_service(client, bwInfo: dict) -> Service: +def bwInfo_2_service(client, bw_info: dict) -> Service: + # add description to allocationDirection code + if 'sessionFilter' in bw_info: + bw_info['sessionFilter'] = bw_info['sessionFilter'][0] # Discard other items in sessionFilter field + service = Service() + + service_config_rules = service.service_config.config_rules - for key in ['allocationDirection', 'fixedBWPriority', 'requestType', 'timeStamp', 'sessionFilter']: - if key not in bwInfo: - continue - config_rule = ConfigRule() - config_rule.action = ConfigActionEnum.CONFIGACTION_SET - config_rule_custom = ConfigRule_Custom() - config_rule_custom.resource_key = key - if key != 'sessionFilter': - config_rule_custom.resource_value = str(bwInfo[key]) - else: - config_rule_custom.resource_value = json.dumps(bwInfo[key]) - config_rule.custom.CopyFrom(config_rule_custom) - service.service_config.config_rules.append(config_rule) - - if 'sessionFilter' in bwInfo: - a_ip = bwInfo['sessionFilter'][0]['sourceIp'] - z_ip = bwInfo['sessionFilter'][0]['dstAddress'] + + request_cr_key = '/request' + request_cr_value = {k:bw_info[k] for k in MEC_CONSIDERED_FIELDS} + + config_rule = ConfigRule() + config_rule.action = ConfigActionEnum.CONFIGACTION_SET + config_rule_custom = ConfigRule_Custom() + config_rule_custom.resource_key = request_cr_key + config_rule_custom.resource_value = json.dumps(request_cr_value) + config_rule.custom.CopyFrom(config_rule_custom) + service_config_rules.append(config_rule) + + if 'sessionFilter' in bw_info: + a_ip = bw_info['sessionFilter']['sourceIp'] + z_ip = bw_info['sessionFilter']['dstAddress'] devices = client.ListDevices(Empty()).devices + ip_interface_name_dict = {} for device in devices: + device_endpoint_uuids = {ep.name:ep.endpoint_id.endpoint_uuid.uuid for ep in device.device_endpoints} + skip_device = True for cr in device.device_config.config_rules: - if cr.WhichOneof('config_rule') == 'custom' and cr.custom.resource_key == '_connect/settings': - for ep in json.loads(cr.custom.resource_value)['endpoints']: - if 'ip' in ep and (ep['ip'] == a_ip or ep['ip'] == z_ip): - ep_id = EndPointId() - ep_id.endpoint_uuid.uuid = ep['uuid'] - ep_id.device_id.device_uuid.uuid = device.device_id.device_uuid.uuid - service.service_endpoint_ids.append(ep_id) - - if len(service.service_endpoint_ids) < 2: - LOGGER.error('No endpoints matched') - return None + if cr.WhichOneof('config_rule') != 'custom': + continue + match_subif = RE_CONFIG_RULE_IF_SUBIF.match(cr.custom.resource_key) + if not match_subif: + continue + address_ip = json.loads(cr.custom.resource_value).get('address_ip') + short_port_name = match_subif.groups(0)[0] + ip_interface_name_dict[address_ip] = short_port_name + if address_ip not in [a_ip, z_ip]: + continue + port_name = 'PORT-' + short_port_name # `PORT-` added as prefix + ep_id = EndPointId() + ep_id.endpoint_uuid.uuid = device_endpoint_uuids[port_name] + ep_id.device_id.device_uuid.uuid = device.device_id.device_uuid.uuid + service.service_endpoint_ids.append(ep_id) + # add interface config rules + endpoint_settings_key = ENDPOINT_SETTINGS_KEY.format(device.name, port_name, VLAN_TAG) + if address_ip in a_ip: + router_id = ROUTER_ID_A + policy_az = POLICY_AZ + policy_za = POLICY_ZA + neighbor_bgp_interface_address_ip = BGP_NEIGHBOR_IP_Z + self_bgp_interface_address_ip = BGP_NEIGHBOR_IP_A + else: + router_id = ROUTER_ID_Z + policy_az = POLICY_ZA + policy_za = POLICY_AZ + neighbor_bgp_interface_address_ip= BGP_NEIGHBOR_IP_A + self_bgp_interface_address_ip = BGP_NEIGHBOR_IP_Z + endpoint_field_updates = { + 'address_ip': (address_ip, True), + 'address_prefix' : (PREFIX_LENGTH, True), + 'sub_interface_index': (0, True), + } + LOGGER.debug(f'BEFORE UPDATE -> device.device_config.config_rules: {service_config_rules}') + update_config_rule_custom(service_config_rules, endpoint_settings_key, endpoint_field_updates) + LOGGER.debug(f'AFTER UPDATE -> device.device_config.config_rules: {service_config_rules}') + skip_device = False + if skip_device: + continue + device_field_updates = { + 'bgp_as':(BGP_AS, True), + 'route_distinguisher': (ROUTE_DISTINGUISHER, True), + 'router_id': (router_id, True), + 'policy_AZ': (policy_az, True), + 'policy_ZA': (policy_za, True), + 'neighbor_bgp_interface_address_ip': (neighbor_bgp_interface_address_ip, True), + 'self_bgp_interface_name': (ip_interface_name_dict[self_bgp_interface_address_ip], True), + 'self_bgp_interface_address_ip': (self_bgp_interface_address_ip, True), + 'bgp_interface_address_prefix': (PREFIX_LENGTH, True) + } + device_settings_key = DEVICE_SETTINGS_KEY.format(device.name) + LOGGER.debug(f'BEFORE UPDATE -> device.device_config.config_rules: {service_config_rules}') + update_config_rule_custom(service_config_rules, device_settings_key, device_field_updates) + LOGGER.debug(f'AFTER UPDATE -> device.device_config.config_rules: {service_config_rules}') + + settings_cr_key = '/settings' + settings_cr_value = {} + update_config_rule_custom(service_config_rules, settings_cr_key, settings_cr_value) + service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED service.service_type = ServiceTypeEnum.SERVICETYPE_L3NM - if 'appInsId' in bwInfo: - service.service_id.service_uuid.uuid = bwInfo['appInsId'] + if 'appInsId' in bw_info: + service.service_id.service_uuid.uuid = bw_info['appInsId'] service.service_id.context_id.context_uuid.uuid = 'admin' - service.name = bwInfo['appInsId'] + service.name = bw_info['appInsId'] - if 'fixedAllocation' in bwInfo: + if 'fixedAllocation' in bw_info: capacity = Constraint_SLA_Capacity() - capacity.capacity_gbps = float(bwInfo['fixedAllocation']) + capacity.capacity_gbps = float(bw_info['fixedAllocation']) / 1.e9 constraint = Constraint() constraint.sla_capacity.CopyFrom(capacity) service.service_constraints.append(constraint) diff --git a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/__init__.py b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/__init__.py index 5525c58ad9f0def5001d9a6430ffe5fb2c5efe33..33ce027421028d02b8cee5fb6882e0718f3d7414 100644 --- a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ from nbi.service.rest_server.RestServer import RestServer from .Resources import BwInfo, BwInfoId -URL_PREFIX = '/bwm/v1' +URL_PREFIX = '/restconf/bwm/v1' # Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. RESOURCES = [ diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py index ed25dbab3cd6b07ef73d64c5d37ad64e85353c02..8ed148f1c29443ae8c39fb5652b531aa5f334567 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py index 9a33cd2281d4dfd7a0a8dac964b9b35d7975cf28..5a2b1cc9775f737c75fc723c8a192d15e6d14780 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py index a329bc9e4adcd57a98e6eb0ee60da82705598aae..ba855c4a993d393302e4b699b5d90166b24f894e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py index c4fdea311a1d7f73617ff9ca959bf22d08c304f1..65c2123c805b384a002c84119b1269dd753346ec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py index 11a554313b8b96feae56782187fc3100663a5dce..31217f078d2935ac228a7c8d1e75bcbcbc478d44 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/Common.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/Common.py index d708953ec952c68150a22023c5ef304683d4571a..b1d90c75e0823fd98ab7b9eea245d3c98648d2b3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/Common.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/Common.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/site_network_access.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/site_network_access.py index ec39e30ca27b93e76c7959de0f1d7d7a9ceba8c8..3d9c2f2b6c052f9aa59202cc2d51bca288d04a33 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/site_network_access.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/site_network_access.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/vpn_service.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/vpn_service.py index bccc2319bdd0692e3f487c8f879a0fd2dd521b4b..1960ae8c8dfd7cd769f8356bfd273f848ef19ff2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/vpn_service.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/vpn_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py new file mode 100644 index 0000000000000000000000000000000000000000..f7329cb35666f423e85f99510e5f89a82e89b7f8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py @@ -0,0 +1,211 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, netaddr +from typing import Dict, List, Optional, Tuple +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import Service, ServiceStatusEnum, ServiceTypeEnum +from common.tools.context_queries.Service import get_service_by_uuid +from common.tools.grpc.ConfigRules import update_config_rule_custom +from common.tools.grpc.Constraints import ( + update_constraint_endpoint_location, update_constraint_sla_availability, update_constraint_sla_capacity, + update_constraint_sla_latency +) +from common.tools.grpc.EndPointIds import update_endpoint_ids +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient + +LOGGER = logging.getLogger(__name__) + +def create_service( + service_uuid : str, context_uuid : Optional[str] = DEFAULT_CONTEXT_NAME +) -> Optional[Exception]: + # pylint: disable=no-member + service_request = Service() + service_request.service_id.context_id.context_uuid.uuid = context_uuid + service_request.service_id.service_uuid.uuid = service_uuid + service_request.service_type = ServiceTypeEnum.SERVICETYPE_L3NM + service_request.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED + + try: + service_client = ServiceClient() + service_client.CreateService(service_request) + return None + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unhandled exception creating Service') + return e + +def process_vpn_service( + vpn_service : Dict, errors : List[Dict] +) -> None: + vpn_id = vpn_service['vpn-id'] + exc = create_service(vpn_id) + if exc is not None: errors.append({'error': str(exc)}) + +def update_service_endpoint( + service_uuid : str, site_id : str, device_uuid : str, endpoint_uuid : str, + vlan_tag : int, ipv4_address : str, neighbor_ipv4_address : str, ipv4_prefix_length : int, + capacity_gbps : Optional[float] = None, e2e_latency_ms : Optional[float] = None, + availability : Optional[float] = None, mtu : Optional[int] = None, + static_routing : Optional[Dict[Tuple[str, str], str]] = None, + context_uuid : Optional[str] = DEFAULT_CONTEXT_NAME, +) -> Optional[Exception]: + context_client = ContextClient() + service = get_service_by_uuid(context_client, service_uuid, context_uuid=context_uuid, rw_copy=True) + if service is None: raise Exception('VPN({:s}) not found in database'.format(str(service_uuid))) + + endpoint_ids = service.service_endpoint_ids + endpoint_id = update_endpoint_ids(endpoint_ids, device_uuid, endpoint_uuid) + + constraints = service.service_constraints + update_constraint_endpoint_location(constraints, endpoint_id, region=site_id) + if capacity_gbps is not None: update_constraint_sla_capacity (constraints, capacity_gbps) + if e2e_latency_ms is not None: update_constraint_sla_latency (constraints, e2e_latency_ms) + if availability is not None: update_constraint_sla_availability(constraints, 1, True, availability) + + config_rules = service.service_config.config_rules + + service_settings_key = '/settings' + service_settings = {'address_families': (['IPV4'], True)} + if mtu is not None: service_settings['mtu'] = (mtu, True) + update_config_rule_custom(config_rules, service_settings_key, service_settings) + + if static_routing is not None: + service_static_routing_key = '/static_routing' + update_config_rule_custom(config_rules, service_static_routing_key, { + '{:d}-{:s}/{:d}'.format(lan_tag, ip_range, ip_prefix_len): ( + {'vlan-id': lan_tag, 'ip-network': '{:s}/{:d}'.format(ip_range, ip_prefix_len), 'next-hop': next_hop}, + True + ) + for (ip_range, ip_prefix_len, lan_tag), next_hop in static_routing.items() + }) + + #ENDPOINT_SETTINGS_KEY = '/device[{:s}]/endpoint[{:s}]/vlan[{:d}]/settings' + #endpoint_settings_key = ENDPOINT_SETTINGS_KEY.format(device_uuid, endpoint_uuid, vlan_tag) + ENDPOINT_SETTINGS_KEY = '/device[{:s}]/endpoint[{:s}]/settings' + endpoint_settings_key = ENDPOINT_SETTINGS_KEY.format(device_uuid, endpoint_uuid) + field_updates = {} + if vlan_tag is not None: field_updates['vlan_tag' ] = (vlan_tag, True) + if ipv4_address is not None: field_updates['ip_address' ] = (ipv4_address, True) + if neighbor_ipv4_address is not None: field_updates['neighbor_address'] = (neighbor_ipv4_address, True) + if ipv4_prefix_length is not None: field_updates['prefix_length' ] = (ipv4_prefix_length, True) + update_config_rule_custom(config_rules, endpoint_settings_key, field_updates) + + try: + service_client = ServiceClient() + service_client.UpdateService(service) + return None + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unhandled exception updating Service') + return e + +def process_site_network_access( + site_id : str, network_access : Dict, site_static_routing : Dict[Tuple[str, str], str], errors : List[Dict] +) -> None: + endpoint_uuid = network_access['site-network-access-id'] + + if network_access['site-network-access-type'] != 'ietf-l3vpn-svc:multipoint': + MSG = 'Site Network Access Type: {:s}' + raise NotImplementedError(MSG.format(str(network_access['site-network-access-type']))) + + device_uuid = network_access['device-reference'] + service_uuid = network_access['vpn-attachment']['vpn-id'] + + access_role : str = network_access['vpn-attachment']['site-role'] + access_role = access_role.replace('ietf-l3vpn-svc:', '').replace('-role', '') # hub/spoke + if access_role not in {'hub', 'spoke'}: + MSG = 'Site VPN Attackment Role: {:s}' + raise NotImplementedError(MSG.format(str(network_access['site-network-access-type']))) + + ipv4_allocation = network_access['ip-connection']['ipv4'] + if ipv4_allocation['address-allocation-type'] != 'ietf-l3vpn-svc:static-address': + MSG = 'Site Network Access IPv4 Allocation Type: {:s}' + raise NotImplementedError(MSG.format(str(ipv4_allocation['address-allocation-type']))) + ipv4_allocation_addresses = ipv4_allocation['addresses'] + ipv4_provider_address = ipv4_allocation_addresses['provider-address'] + ipv4_customer_address = ipv4_allocation_addresses['customer-address'] + ipv4_prefix_length = ipv4_allocation_addresses['prefix-length' ] + + vlan_tag = None + ipv4_provider_range = netaddr.IPNetwork('{:s}/{:d}'.format(ipv4_provider_address, ipv4_prefix_length)) + for (_, _, lan_tag), next_hop in site_static_routing.items(): + ip_next_hop = netaddr.IPAddress(next_hop) + if ip_next_hop not in ipv4_provider_range: continue + vlan_tag = lan_tag + break + + ## network_access_static_routing: (lan-range, lan-prefix-len, lan-tag) => next-hop + #network_access_static_routing : Dict[Tuple[str, str], str] = {} + #for rt_proto in network_access['routing-protocols']['routing-protocol']: + # if rt_proto['type'] != 'ietf-l3vpn-svc:static': + # MSG = 'Site Network Access Routing Protocol Type: {:s}' + # raise NotImplementedError(MSG.format(str(rt_proto['type']))) + # for ipv4_rt in rt_proto['static']['cascaded-lan-prefixes']['ipv4-lan-prefixes']: + # lan_range, lan_prefix = ipv4_rt['lan'].split('/') + # lan_prefix = int(lan_prefix) + # lan_tag = int(ipv4_rt['lan-tag'].replace('vlan', '')) + # next_hop = ipv4_rt['next-hop'] + # network_access_static_routing[(lan_range, lan_prefix, lan_tag)] = next_hop + + service_mtu = network_access['service']['svc-mtu'] + service_input_bandwidth = network_access['service']['svc-input-bandwidth'] + service_output_bandwidth = network_access['service']['svc-output-bandwidth'] + service_bandwidth_bps = max(service_input_bandwidth, service_output_bandwidth) + service_bandwidth_gbps = service_bandwidth_bps / 1.e9 + + max_e2e_latency_ms = None + availability = None + for qos_profile_class in network_access['service']['qos']['qos-profile']['classes']['class']: + if qos_profile_class['class-id'] != 'qos-realtime': + MSG = 'Site Network Access QoS Class Id: {:s}' + raise NotImplementedError(MSG.format(str(qos_profile_class['class-id']))) + + if qos_profile_class['direction'] != 'ietf-l3vpn-svc:both': + MSG = 'Site Network Access QoS Class Direction: {:s}' + raise NotImplementedError(MSG.format(str(qos_profile_class['direction']))) + + max_e2e_latency_ms = qos_profile_class['latency']['latency-boundary'] + availability = qos_profile_class['bandwidth']['guaranteed-bw-percent'] + + exc = update_service_endpoint( + service_uuid, site_id, device_uuid, endpoint_uuid, + vlan_tag, ipv4_customer_address, ipv4_provider_address, ipv4_prefix_length, + capacity_gbps=service_bandwidth_gbps, e2e_latency_ms=max_e2e_latency_ms, availability=availability, + mtu=service_mtu, static_routing=site_static_routing + ) + if exc is not None: errors.append({'error': str(exc)}) + +def process_site(site : Dict, errors : List[Dict]) -> None: + site_id = site['site-id'] + + if site['management']['type'] != 'ietf-l3vpn-svc:provider-managed': + MSG = 'Site Management Type: {:s}' + raise NotImplementedError(MSG.format(str(site['management']['type']))) + + # site_static_routing: (lan-range, lan-prefix-len, lan-tag) => next-hop + site_static_routing : Dict[Tuple[str, str], str] = {} + for rt_proto in site['routing-protocols']['routing-protocol']: + if rt_proto['type'] != 'ietf-l3vpn-svc:static': + MSG = 'Site Routing Protocol Type: {:s}' + raise NotImplementedError(MSG.format(str(rt_proto['type']))) + for ipv4_rt in rt_proto['static']['cascaded-lan-prefixes']['ipv4-lan-prefixes']: + lan_range, lan_prefix = ipv4_rt['lan'].split('/') + lan_prefix = int(lan_prefix) + lan_tag = int(ipv4_rt['lan-tag'].replace('vlan', '')) + next_hop = ipv4_rt['next-hop'] + site_static_routing[(lan_range, lan_prefix, lan_tag)] = next_hop + + network_accesses : List[Dict] = site['site-network-accesses']['site-network-access'] + for network_access in network_accesses: + process_site_network_access(site_id, network_access, site_static_routing, errors) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py new file mode 100644 index 0000000000000000000000000000000000000000..a313677c12203c1621b920f3fcb7f6ff0c281bfb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py @@ -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. + +import logging +from flask import request +from flask.json import jsonify +from flask_restful import Resource +from common.proto.context_pb2 import ServiceStatusEnum +from common.tools.context_queries.Service import get_service_by_uuid +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from ..tools.Authentication import HTTP_AUTH +from ..tools.HttpStatusCodes import HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK, HTTP_SERVERERROR + +LOGGER = logging.getLogger(__name__) + +class L3VPN_Service(Resource): + @HTTP_AUTH.login_required + def get(self, vpn_id : str): + LOGGER.debug('VPN_Id: {:s}'.format(str(vpn_id))) + LOGGER.debug('Request: {:s}'.format(str(request))) + + try: + context_client = ContextClient() + + target = get_service_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))) + + service_ids = {target.service_id.service_uuid.uuid, target.name} # pylint: disable=no-member + if vpn_id not in service_ids: + raise Exception('Service retrieval failed. Wrong Service Id was returned') + + service_ready_status = ServiceStatusEnum.SERVICESTATUS_ACTIVE + service_status = target.service_status.service_status # pylint: disable=no-member + response = jsonify({}) + response.status_code = HTTP_OK if service_status == service_ready_status else HTTP_GATEWAYTIMEOUT + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Something went wrong Retrieving VPN({:s})'.format(str(vpn_id))) + response = jsonify({'error': str(e)}) + response.status_code = HTTP_SERVERERROR + return response + + @HTTP_AUTH.login_required + def delete(self, vpn_id : str): + LOGGER.debug('VPN_Id: {:s}'.format(str(vpn_id))) + LOGGER.debug('Request: {:s}'.format(str(request))) + + try: + context_client = ContextClient() + + target = get_service_by_uuid(context_client, vpn_id) + if target is None: + LOGGER.warning('VPN({:s}) not found in database. Nothing done.'.format(str(vpn_id))) + else: + service_ids = {target.service_id.service_uuid.uuid, target.name} # pylint: disable=no-member + if vpn_id not in service_ids: + raise Exception('Service retrieval failed. Wrong Service Id was returned') + service_client = ServiceClient() + service_client.DeleteService(target.service_id) + response = jsonify({}) + response.status_code = HTTP_NOCONTENT + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Something went wrong Deleting VPN({:s})'.format(str(vpn_id))) + response = jsonify({'error': str(e)}) + response.status_code = HTTP_SERVERERROR + return response diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py new file mode 100644 index 0000000000000000000000000000000000000000..11f2d6dae2f42cb06543979dcdb4d44b4d21e8aa --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.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 +from typing import Dict, List +from flask import request +from flask.json import jsonify +from flask_restful import Resource +from werkzeug.exceptions import UnsupportedMediaType +from nbi.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_CREATED, HTTP_SERVERERROR +from nbi.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH +from .Handlers import process_site, process_vpn_service +from .YangValidator import YangValidator + +LOGGER = logging.getLogger(__name__) + +class L3VPN_Services(Resource): + @HTTP_AUTH.login_required + def get(self): + return {} + + @HTTP_AUTH.login_required + def post(self): + if not request.is_json: raise UnsupportedMediaType('JSON payload is required') + request_data : Dict = request.json + LOGGER.debug('Request: {:s}'.format(str(request_data))) + + errors = list() + if 'ietf-l3vpn-svc:l3vpn-services' in request_data: + # processing multiple L3VPN service requests formatted as: + #{ + # "ietf-l3vpn-svc:l3vpn-services": { + # "l3vpn-svc": [ + # { + # "service-id": "vpn1", + # "vpn-services": { + # "vpn-service": [ + for l3vpn_svc in request_data['ietf-l3vpn-svc:l3vpn-services']['l3vpn-svc']: + l3vpn_svc.pop('service-id', None) + l3vpn_svc_request_data = {'ietf-l3vpn-svc:l3vpn-svc': l3vpn_svc} + errors.extend(self._process_l3vpn(l3vpn_svc_request_data)) + elif 'ietf-l3vpn-svc:l3vpn-svc' in request_data: + # processing single (standard) L3VPN service request formatted as: + #{ + # "ietf-l3vpn-svc:l3vpn-svc": { + # "vpn-services": { + # "vpn-service": [ + errors.extend(self._process_l3vpn(request_data)) + else: + errors.append('unexpected request: {:s}'.format(str(request_data))) + + response = jsonify(errors) + response.status_code = HTTP_CREATED if len(errors) == 0 else HTTP_SERVERERROR + return response + + def _process_l3vpn(self, request_data : Dict) -> List[Dict]: + yang_validator = YangValidator('ietf-l3vpn-svc') + request_data = yang_validator.parse_to_dict(request_data) + yang_validator.destroy() + + errors = list() + + for vpn_service in request_data['l3vpn-svc']['vpn-services']['vpn-service']: + process_vpn_service(vpn_service, errors) + + for site in request_data['l3vpn-svc']['sites']['site']: + process_site(site, errors) + + return errors diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py new file mode 100644 index 0000000000000000000000000000000000000000..9f4b43848ab94bd8db670715f0fba807ce794ccd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py @@ -0,0 +1,58 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from typing import Dict +from flask import request +from flask.json import jsonify +from flask.wrappers import Response +from flask_restful import Resource +from werkzeug.exceptions import UnsupportedMediaType +from nbi.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH +from nbi.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_CREATED, HTTP_SERVERERROR +from .Handlers import process_site_network_access +from .YangValidator import YangValidator + +LOGGER = logging.getLogger(__name__) + +def process_site_network_accesses(site_id : str) -> Response: + if not request.is_json: raise UnsupportedMediaType('JSON payload is required') + request_data : Dict = request.json + LOGGER.debug('Site_Id: {:s}'.format(str(site_id))) + LOGGER.debug('Request: {:s}'.format(str(request_data))) + + yang_validator = YangValidator('ietf-l3vpn-svc') + request_data = yang_validator.parse_to_dict(request_data) + yang_validator.destroy() + + # TODO: retrieve site static routing from service + site_static_routing = dict() + + errors = [] + for network_access in request_data['site-network-accesses']['site-network-access']: + exc = process_site_network_access(site_id, network_access, site_static_routing, errors) + if exc is not None: errors.append({'error': str(exc)}) + + response = jsonify(errors) + response.status_code = HTTP_CREATED if len(errors) == 0 else HTTP_SERVERERROR + return response + +class L3VPN_SiteNetworkAccesses(Resource): + @HTTP_AUTH.login_required + def post(self, site_id : str): + return process_site_network_accesses(site_id) + + @HTTP_AUTH.login_required + def put(self, site_id : str): + return process_site_network_accesses(site_id) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/YangValidator.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/YangValidator.py new file mode 100644 index 0000000000000000000000000000000000000000..77071f7f7a72ad7d46e34f118a87dc2280a2a24c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/YangValidator.py @@ -0,0 +1,36 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import libyang, os +from typing import Dict, Optional + +YANG_DIR = os.path.join(os.path.dirname(__file__), 'yang') + +class YangValidator: + def __init__(self, module_name : str) -> None: + self._yang_context = libyang.Context(YANG_DIR) + self._yang_module = self._yang_context.load_module(module_name) + self._yang_module.feature_enable_all() + + def parse_to_dict(self, message : Dict) -> Dict: + dnode : Optional[libyang.DNode] = self._yang_module.parse_data_dict( + message, validate_present=True, validate=True, strict=True + ) + if dnode is None: raise Exception('Unable to parse Message({:s})'.format(str(message))) + message = dnode.print_dict() + dnode.free() + return message + + def destroy(self) -> None: + self._yang_context.destroy() diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..71c32acfcf1ec2b29ad437365cfd937c358672df --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/__init__.py @@ -0,0 +1,41 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# RFC 8299 - YANG Data Model for L3VPN Service Delivery +# Ref: https://datatracker.ietf.org/doc/rfc8299 + +from flask_restful import Resource +from nbi.service.rest_server.RestServer import RestServer +from .L3VPN_Services import L3VPN_Services +from .L3VPN_Service import L3VPN_Service +from .L3VPN_SiteNetworkAccesses import L3VPN_SiteNetworkAccesses + +URL_PREFIX = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc' + +def _add_resource(rest_server : RestServer, resource : Resource, *urls, **kwargs): + urls = [(URL_PREFIX + url) for url in urls] + rest_server.add_resource(resource, *urls, **kwargs) + +def register_ietf_l3vpn(rest_server : RestServer): + _add_resource(rest_server, L3VPN_Services, + '/vpn-services', + ) + _add_resource(rest_server, L3VPN_Service, + '/vpn-services/vpn-service=', + '/vpn-services/vpn-service=/', + ) + _add_resource(rest_server, L3VPN_SiteNetworkAccesses, + '/sites/site=/site-network-accesses', + '/sites/site=/site-network-accesses/', + ) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-inet-types@2013-07-15.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-inet-types@2013-07-15.yang new file mode 100644 index 0000000000000000000000000000000000000000..790bafc31dd7dc3582ef1c765fe104145b8a6016 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-inet-types@2013-07-15.yang @@ -0,0 +1,459 @@ + module ietf-inet-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types"; + prefix "inet"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: David Kessens + + + WG Chair: Juergen Schoenwaelder + + + Editor: Juergen Schoenwaelder + "; + + description + "This module contains a collection of generally useful derived + YANG data types for Internet addresses and related things. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - ip-address-no-zone + - ipv4-address-no-zone + - ipv6-address-no-zone"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of types related to protocol fields ***/ + + typedef ip-version { + type enumeration { + enum unknown { + value "0"; + description + "An unknown or unspecified version of the Internet + protocol."; + } + enum ipv4 { + value "1"; + description + "The IPv4 protocol as defined in RFC 791."; + } + enum ipv6 { + value "2"; + description + "The IPv6 protocol as defined in RFC 2460."; + } + } + description + "This value represents the version of the IP protocol. + + In the value set and its semantics, this type is equivalent + to the InetVersion textual convention of the SMIv2."; + reference + "RFC 791: Internet Protocol + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef dscp { + type uint8 { + range "0..63"; + } + description + "The dscp type represents a Differentiated Services Code Point + that may be used for marking packets in a traffic stream. + + In the value set and its semantics, this type is equivalent + to the Dscp textual convention of the SMIv2."; + reference + "RFC 3289: Management Information Base for the Differentiated + Services Architecture + RFC 2474: Definition of the Differentiated Services Field + (DS Field) in the IPv4 and IPv6 Headers + RFC 2780: IANA Allocation Guidelines For Values In + the Internet Protocol and Related Headers"; + } + + typedef ipv6-flow-label { + type uint32 { + range "0..1048575"; + } + description + "The ipv6-flow-label type represents the flow identifier or Flow + Label in an IPv6 packet header that may be used to + discriminate traffic flows. + + In the value set and its semantics, this type is equivalent + to the IPv6FlowLabel textual convention of the SMIv2."; + reference + "RFC 3595: Textual Conventions for IPv6 Flow Label + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification"; + } + + typedef port-number { + type uint16 { + range "0..65535"; + } + description + "The port-number type represents a 16-bit port number of an + Internet transport-layer protocol such as UDP, TCP, DCCP, or + SCTP. Port numbers are assigned by IANA. A current list of + all assignments is available from . + + Note that the port number value zero is reserved by IANA. In + situations where the value zero does not make sense, it can + be excluded by subtyping the port-number type. + In the value set and its semantics, this type is equivalent + to the InetPortNumber textual convention of the SMIv2."; + reference + "RFC 768: User Datagram Protocol + RFC 793: Transmission Control Protocol + RFC 4960: Stream Control Transmission Protocol + RFC 4340: Datagram Congestion Control Protocol (DCCP) + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + /*** collection of types related to autonomous systems ***/ + + typedef as-number { + type uint32; + description + "The as-number type represents autonomous system numbers + which identify an Autonomous System (AS). An AS is a set + of routers under a single technical administration, using + an interior gateway protocol and common metrics to route + packets within the AS, and using an exterior gateway + protocol to route packets to other ASes. IANA maintains + the AS number space and has delegated large parts to the + regional registries. + + Autonomous system numbers were originally limited to 16 + bits. BGP extensions have enlarged the autonomous system + number space to 32 bits. This type therefore uses an uint32 + base type without a range restriction in order to support + a larger autonomous system number space. + + In the value set and its semantics, this type is equivalent + to the InetAutonomousSystemNumber textual convention of + the SMIv2."; + reference + "RFC 1930: Guidelines for creation, selection, and registration + of an Autonomous System (AS) + RFC 4271: A Border Gateway Protocol 4 (BGP-4) + RFC 4001: Textual Conventions for Internet Network Addresses + RFC 6793: BGP Support for Four-Octet Autonomous System (AS) + Number Space"; + } + + /*** collection of types related to IP addresses and hostnames ***/ + + typedef ip-address { + type union { + type inet:ipv4-address; + type inet:ipv6-address; + } + description + "The ip-address type represents an IP address and is IP + version neutral. The format of the textual representation + implies the IP version. This type supports scoped addresses + by allowing zone identifiers in the address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '(%[\p{N}\p{L}]+)?'; + } + description + "The ipv4-address type represents an IPv4 address in + dotted-quad notation. The IPv4 address may include a zone + index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format for the zone index is the numerical + format"; + } + + typedef ipv6-address { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(%[\p{N}\p{L}]+)?'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(%.+)?'; + } + description + "The ipv6-address type represents an IPv6 address in full, + mixed, shortened, and shortened-mixed notation. The IPv6 + address may include a zone index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format of IPv6 addresses uses the textual + representation defined in Section 4 of RFC 5952. The + canonical format for the zone index is the numerical + format as described in Section 11.2 of RFC 4007."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-address-no-zone { + type union { + type inet:ipv4-address-no-zone; + type inet:ipv6-address-no-zone; + } + description + "The ip-address-no-zone type represents an IP address and is + IP version neutral. The format of the textual representation + implies the IP version. This type does not support scoped + addresses since it does not allow zone identifiers in the + address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address-no-zone { + type inet:ipv4-address { + pattern '[0-9\.]*'; + } + description + "An IPv4 address without a zone index. This type, derived from + ipv4-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + } + + typedef ipv6-address-no-zone { + type inet:ipv6-address { + pattern '[0-9a-fA-F:\.]*'; + } + description + "An IPv6 address without a zone index. This type, derived from + ipv6-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-prefix { + type union { + type inet:ipv4-prefix; + type inet:ipv6-prefix; + } + description + "The ip-prefix type represents an IP prefix and is IP + version neutral. The format of the textual representations + implies the IP version."; + } + + typedef ipv4-prefix { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '/(([0-9])|([1-2][0-9])|(3[0-2]))'; + } + description + "The ipv4-prefix type represents an IPv4 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 32. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format of an IPv4 prefix has all bits of + the IPv4 address set to zero that are not part of the + IPv4 prefix."; + } + + typedef ipv6-prefix { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(/.+)'; + } + + description + "The ipv6-prefix type represents an IPv6 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 128. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The IPv6 address should have all bits that do not belong + to the prefix set to zero. + + The canonical format of an IPv6 prefix has all bits of + the IPv6 address set to zero that are not part of the + IPv6 prefix. Furthermore, the IPv6 address is represented + as defined in Section 4 of RFC 5952."; + reference + "RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + /*** collection of domain name and URI types ***/ + + typedef domain-name { + type string { + pattern + '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + + '|\.'; + length "1..253"; + } + description + "The domain-name type represents a DNS domain name. The + name SHOULD be fully qualified whenever possible. + + Internet domain names are only loosely specified. Section + 3.5 of RFC 1034 recommends a syntax (modified in Section + 2.1 of RFC 1123). The pattern above is intended to allow + for current practice in domain name use, and some possible + future expansion. It is designed to hold various types of + domain names, including names used for A or AAAA records + (host names) and other records, such as SRV records. Note + that Internet host names have a stricter syntax (described + in RFC 952) than the DNS recommendations in RFCs 1034 and + 1123, and that systems that want to store host names in + schema nodes using the domain-name type are recommended to + adhere to this stricter standard to ensure interoperability. + + The encoding of DNS names in the DNS protocol is limited + to 255 characters. Since the encoding consists of labels + prefixed by a length bytes and there is a trailing NULL + byte, only 253 characters can appear in the textual dotted + notation. + + The description clause of schema nodes using the domain-name + type MUST describe when and how these names are resolved to + IP addresses. Note that the resolution of a domain-name value + may require to query multiple DNS records (e.g., A for IPv4 + and AAAA for IPv6). The order of the resolution process and + which DNS record takes precedence can either be defined + explicitly or may depend on the configuration of the + resolver. + + Domain-name values use the US-ASCII encoding. Their canonical + format uses lowercase US-ASCII characters. Internationalized + domain names MUST be A-labels as per RFC 5890."; + reference + "RFC 952: DoD Internet Host Table Specification + RFC 1034: Domain Names - Concepts and Facilities + RFC 1123: Requirements for Internet Hosts -- Application + and Support + RFC 2782: A DNS RR for specifying the location of services + (DNS SRV) + RFC 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework"; + } + + typedef host { + type union { + type inet:ip-address; + type inet:domain-name; + } + description + "The host type represents either an IP address or a DNS + domain name."; + } + + typedef uri { + type string; + description + "The uri type represents a Uniform Resource Identifier + (URI) as defined by STD 66. + + Objects using the uri type MUST be in US-ASCII encoding, + and MUST be normalized as described by RFC 3986 Sections + 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary + percent-encoding is removed, and all case-insensitive + characters are set to lowercase except for hexadecimal + digits, which are normalized to uppercase as described in + Section 6.2.2.1. + + The purpose of this normalization is to help provide + unique URIs. Note that this normalization is not + sufficient to provide uniqueness. Two URIs that are + textually distinct after this normalization may still be + equivalent. + + Objects using the uri type may restrict the schemes that + they permit. For example, 'data:' and 'urn:' schemes + might not be appropriate. + + A zero-length URI is not a valid URI. This can be used to + express 'URI absent' where required. + + In the value set and its semantics, this type is equivalent + to the Uri SMIv2 textual convention defined in RFC 5017."; + reference + "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax + RFC 3305: Report from the Joint W3C/IETF URI Planning Interest + Group: Uniform Resource Identifiers (URIs), URLs, + and Uniform Resource Names (URNs): Clarifications + and Recommendations + RFC 5017: MIB Textual Conventions for Uniform Resource + Identifiers (URIs)"; + } + + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-l3vpn-svc@2018-01-19.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-l3vpn-svc@2018-01-19.yang new file mode 100644 index 0000000000000000000000000000000000000000..e05e33722f01fc9af9cbeb07092dc6287e8dc6c4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-l3vpn-svc@2018-01-19.yang @@ -0,0 +1,2856 @@ + module ietf-l3vpn-svc { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-l3vpn-svc"; + prefix l3vpn-svc; + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import ietf-netconf-acm { + prefix nacm; + } + organization + "IETF L3SM Working Group"; + contact + "WG List: + Editor: + L3SM WG + Chairs: + Adrian Farrel, Qin Wu + "; + description + "This YANG module defines a generic service configuration + model for Layer 3 VPNs. This model is common across all + vendor implementations. + + + + + 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 8299; see + the RFC itself for full legal notices."; + + revision 2018-01-19 { + description + "Revision of RFC 8049 to fix implementation issues."; + reference + "RFC 8299"; + } + revision 2017-01-27 { + description + "Initial document."; + reference + "RFC 8049."; + } + /* Features */ + feature cloud-access { + description + "Allows the VPN to connect to a CSP."; + } + feature multicast { + description + "Enables multicast capabilities in a VPN."; + } + feature ipv4 { + description + "Enables IPv4 support in a VPN."; + } + feature ipv6 { + description + "Enables IPv6 support in a VPN."; + } + feature lan-tag { + description + "Enables LAN Tag support in a VPN Policy filter."; + } + feature carrierscarrier { + description + + "Enables support of CsC."; + } + feature extranet-vpn { + description + "Enables support of extranet VPNs."; + } + feature site-diversity { + description + "Enables support of site diversity constraints."; + } + feature encryption { + description + "Enables support of encryption."; + } + feature qos { + description + "Enables support of classes of services."; + } + feature qos-custom { + description + "Enables support of the custom QoS profile."; + } + feature rtg-bgp { + description + "Enables support of the BGP routing protocol."; + } + feature rtg-rip { + description + "Enables support of the RIP routing protocol."; + } + feature rtg-ospf { + description + "Enables support of the OSPF routing protocol."; + } + feature rtg-ospf-sham-link { + description + "Enables support of OSPF sham links."; + } + feature rtg-vrrp { + description + "Enables support of the VRRP routing protocol."; + } + feature fast-reroute { + description + "Enables support of Fast Reroute."; + } + feature bfd { + description + + "Enables support of BFD."; + } + feature always-on { + description + "Enables support of the 'always-on' access constraint."; + } + feature requested-type { + description + "Enables support of the 'requested-type' access constraint."; + } + feature bearer-reference { + description + "Enables support of the 'bearer-reference' access constraint."; + } + feature target-sites { + description + "Enables support of the 'target-sites' match flow parameter."; + } + /* Typedefs */ + typedef svc-id { + type string; + description + "Defines a type of service component identifier."; + } + typedef template-id { + type string; + description + "Defines a type of service template identifier."; + } + typedef address-family { + type enumeration { + enum ipv4 { + description + "IPv4 address family."; + } + enum ipv6 { + description + "IPv6 address family."; + } + } + description + "Defines a type for the address family."; + } + /* Identities */ + identity site-network-access-type { + description + "Base identity for site-network-access type."; + } + + identity point-to-point { + base site-network-access-type; + description + "Identity for point-to-point connection."; + } + identity multipoint { + base site-network-access-type; + description + "Identity for multipoint connection. + Example: Ethernet broadcast segment."; + } + identity placement-diversity { + description + "Base identity for site placement constraints."; + } + identity bearer-diverse { + base placement-diversity; + description + "Identity for bearer diversity. + The bearers should not use common elements."; + } + identity pe-diverse { + base placement-diversity; + description + "Identity for PE diversity."; + } + identity pop-diverse { + base placement-diversity; + description + "Identity for POP diversity."; + } + identity linecard-diverse { + base placement-diversity; + description + "Identity for linecard diversity."; + } + identity same-pe { + base placement-diversity; + description + "Identity for having sites connected on the same PE."; + } + identity same-bearer { + base placement-diversity; + description + "Identity for having sites connected using the same bearer."; + } + identity customer-application { + description + + "Base identity for customer application."; + } + identity web { + base customer-application; + description + "Identity for Web application (e.g., HTTP, HTTPS)."; + } + identity mail { + base customer-application; + description + "Identity for mail application."; + } + identity file-transfer { + base customer-application; + description + "Identity for file transfer application (e.g., FTP, SFTP)."; + } + identity database { + base customer-application; + description + "Identity for database application."; + } + identity social { + base customer-application; + description + "Identity for social-network application."; + } + identity games { + base customer-application; + description + "Identity for gaming application."; + } + identity p2p { + base customer-application; + description + "Identity for peer-to-peer application."; + } + identity network-management { + base customer-application; + description + "Identity for management application + (e.g., Telnet, syslog, SNMP)."; + } + identity voice { + base customer-application; + description + "Identity for voice application."; + } + + identity video { + base customer-application; + description + "Identity for video conference application."; + } + identity embb { + base customer-application; + description + "Identity for an enhanced Mobile Broadband (eMBB) + application. Note that an eMBB application demands + network performance with a wide variety of + characteristics, such as data rate, latency, + loss rate, reliability, and many other parameters."; + } + identity urllc { + base customer-application; + description + "Identity for an Ultra-Reliable and Low Latency + Communications (URLLC) application. Note that a + URLLC application demands network performance + with a wide variety of characteristics, such as latency, + reliability, and many other parameters."; + } + identity mmtc { + base customer-application; + description + "Identity for a massive Machine Type + Communications (mMTC) application. Note that an + mMTC application demands network performance + with a wide variety of characteristics, such as data + rate, latency, loss rate, reliability, and many + other parameters."; + } + identity site-vpn-flavor { + description + "Base identity for the site VPN service flavor."; + } + identity site-vpn-flavor-single { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used when the site belongs to only one VPN."; + } + identity site-vpn-flavor-multi { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used when a logical connection of a site + + belongs to multiple VPNs."; + } + identity site-vpn-flavor-sub { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used when a site has multiple logical connections. + Each connection may belong to different multiple VPNs."; + } + identity site-vpn-flavor-nni { + base site-vpn-flavor; + description + "Base identity for the site VPN service flavor. + Used to describe an NNI option A connection."; + } + identity management { + description + "Base identity for site management scheme."; + } + identity co-managed { + base management; + description + "Base identity for co-managed site."; + } + identity customer-managed { + base management; + description + "Base identity for customer-managed site."; + } + identity provider-managed { + base management; + description + "Base identity for provider-managed site."; + } + identity address-allocation-type { + description + "Base identity for address-allocation-type for PE-CE link."; + } + identity provider-dhcp { + base address-allocation-type; + description + "Provider network provides DHCP service to customer."; + } + identity provider-dhcp-relay { + base address-allocation-type; + description + "Provider network provides DHCP relay service to customer."; + } + + identity provider-dhcp-slaac { + base address-allocation-type; + description + "Provider network provides DHCP service to customer, + as well as SLAAC."; + } + identity static-address { + base address-allocation-type; + description + "Provider-to-customer addressing is static."; + } + identity slaac { + base address-allocation-type; + description + "Use IPv6 SLAAC."; + } + identity site-role { + description + "Base identity for site type."; + } + identity any-to-any-role { + base site-role; + description + "Site in an any-to-any IP VPN."; + } + identity spoke-role { + base site-role; + description + "Spoke site in a Hub-and-Spoke IP VPN."; + } + identity hub-role { + base site-role; + description + "Hub site in a Hub-and-Spoke IP VPN."; + } + identity vpn-topology { + description + "Base identity for VPN topology."; + } + identity any-to-any { + base vpn-topology; + description + "Identity for any-to-any VPN topology."; + } + identity hub-spoke { + base vpn-topology; + description + "Identity for Hub-and-Spoke VPN topology."; + + } + identity hub-spoke-disjoint { + base vpn-topology; + description + "Identity for Hub-and-Spoke VPN topology + where Hubs cannot communicate with each other."; + } + identity multicast-tree-type { + description + "Base identity for multicast tree type."; + } + identity ssm-tree-type { + base multicast-tree-type; + description + "Identity for SSM tree type."; + } + identity asm-tree-type { + base multicast-tree-type; + description + "Identity for ASM tree type."; + } + identity bidir-tree-type { + base multicast-tree-type; + description + "Identity for bidirectional tree type."; + } + identity multicast-rp-discovery-type { + description + "Base identity for RP discovery type."; + } + identity auto-rp { + base multicast-rp-discovery-type; + description + "Base identity for Auto-RP discovery type."; + } + identity static-rp { + base multicast-rp-discovery-type; + description + "Base identity for static type."; + } + identity bsr-rp { + base multicast-rp-discovery-type; + description + "Base identity for BSR discovery type."; + } + identity routing-protocol-type { + description + "Base identity for routing protocol type."; + + } + identity ospf { + base routing-protocol-type; + description + "Identity for OSPF protocol type."; + } + identity bgp { + base routing-protocol-type; + description + "Identity for BGP protocol type."; + } + identity static { + base routing-protocol-type; + description + "Identity for static routing protocol type."; + } + identity rip { + base routing-protocol-type; + description + "Identity for RIP protocol type."; + } + identity vrrp { + base routing-protocol-type; + description + "Identity for VRRP protocol type. + This is to be used when LANs are directly connected + to PE routers."; + } + identity direct { + base routing-protocol-type; + description + "Identity for direct protocol type."; + } + identity protocol-type { + description + "Base identity for protocol field type."; + } + identity tcp { + base protocol-type; + description + "TCP protocol type."; + } + identity udp { + base protocol-type; + description + "UDP protocol type."; + } + + + identity icmp { + base protocol-type; + description + "ICMP protocol type."; + } + identity icmp6 { + base protocol-type; + description + "ICMPv6 protocol type."; + } + identity gre { + base protocol-type; + description + "GRE protocol type."; + } + identity ipip { + base protocol-type; + description + "IP-in-IP protocol type."; + } + identity hop-by-hop { + base protocol-type; + description + "Hop-by-Hop IPv6 header type."; + } + identity routing { + base protocol-type; + description + "Routing IPv6 header type."; + } + identity esp { + base protocol-type; + description + "ESP header type."; + } + identity ah { + base protocol-type; + description + "AH header type."; + } + identity vpn-policy-filter-type { + description + "Base identity for VPN Policy filter type."; + } + identity ipv4 { + base vpn-policy-filter-type; + description + "Identity for IPv4 Prefix filter type."; + + } + identity ipv6 { + base vpn-policy-filter-type; + description + "Identity for IPv6 Prefix filter type."; + } + identity lan { + base vpn-policy-filter-type; + description + "Identity for LAN Tag filter type."; + } + + identity qos-profile-direction { + description + "Base identity for QoS profile direction."; + } + + identity site-to-wan { + base qos-profile-direction; + description + "Identity for Site-to-WAN direction."; + } + identity wan-to-site { + base qos-profile-direction; + description + "Identity for WAN-to-Site direction."; + } + identity both { + base qos-profile-direction; + description + "Identity for both WAN-to-Site direction + and Site-to-WAN direction."; + } + /* Groupings */ + grouping vpn-service-cloud-access { + container cloud-accesses { + if-feature cloud-access; + list cloud-access { + key cloud-identifier; + leaf cloud-identifier { + type leafref { + path "/l3vpn-svc/vpn-profiles/"+ + "valid-provider-identifiers/cloud-identifier/id"; + } + description + "Identification of cloud service. + Local administration meaning."; + } + + choice list-flavor { + case permit-any { + leaf permit-any { + type empty; + description + "Allows all sites."; + } + } + case deny-any-except { + leaf-list permit-site { + type leafref { + path "/l3vpn-svc/sites/site/site-id"; + } + description + "Site ID to be authorized."; + } + } + case permit-any-except { + leaf-list deny-site { + type leafref { + path "/l3vpn-svc/sites/site/site-id"; + } + description + "Site ID to be denied."; + } + } + description + "Choice for cloud access policy. By + default, all sites in the IP VPN MUST + be authorized to access the cloud."; + } + container address-translation { + container nat44 { + leaf enabled { + type boolean; + default false; + description + "Controls whether or not Network address + translation from IPv4 to IPv4 (NAT44) + [RFC3022] is required."; + } + leaf nat44-customer-address { + type inet:ipv4-address; + description + "Address to be used for network address + translation from IPv4 to IPv4. This is + to be used if the customer is providing + the IPv4 address. If the customer address + + is not set, the model assumes that the + provider will allocate the address."; + } + description + "IPv4-to-IPv4 translation."; + } + description + "Container for NAT."; + } + description + "Cloud access configuration."; + } + description + "Container for cloud access configurations."; + } + description + "Grouping for VPN cloud definition."; + } + grouping multicast-rp-group-cfg { + choice group-format { + mandatory true; + case singleaddress { + leaf group-address { + type inet:ip-address; + description + "A single multicast group address."; + } + } + case startend { + leaf group-start { + type inet:ip-address; + description + "The first multicast group address in + the multicast group address range."; + } + leaf group-end { + type inet:ip-address; + description + "The last multicast group address in + the multicast group address range."; + } + } + description + "Choice for multicast group format."; + } + description + "This grouping defines multicast group or + multicast groups for RP-to-group mapping."; + + } + grouping vpn-service-multicast { + container multicast { + if-feature multicast; + leaf enabled { + type boolean; + default false; + description + "Enables multicast."; + } + container customer-tree-flavors { + leaf-list tree-flavor { + type identityref { + base multicast-tree-type; + } + description + "Type of tree to be used."; + } + description + "Type of trees used by customer."; + } + container rp { + container rp-group-mappings { + list rp-group-mapping { + key id; + leaf id { + type uint16; + description + "Unique identifier for the mapping."; + } + container provider-managed { + leaf enabled { + type boolean; + default false; + description + "Set to true if the Rendezvous Point (RP) + must be a provider-managed node. Set to false + if it is a customer-managed node."; + } + leaf rp-redundancy { + type boolean; + default false; + description + "If true, a redundancy mechanism for the RP + is required."; + } + leaf optimal-traffic-delivery { + type boolean; + + default false; + description + "If true, the SP must ensure that + traffic uses an optimal path. An SP may use + Anycast RP or RP-tree-to-SPT switchover + architectures."; + } + description + "Parameters for a provider-managed RP."; + } + leaf rp-address { + when "../provider-managed/enabled = 'false'" { + description + "Relevant when the RP is not provider-managed."; + } + type inet:ip-address; + mandatory true; + description + "Defines the address of the RP. + Used if the RP is customer-managed."; + } + container groups { + list group { + key id; + leaf id { + type uint16; + description + "Identifier for the group."; + } + uses multicast-rp-group-cfg; + description + "List of multicast groups."; + } + description + "Multicast groups associated with the RP."; + } + description + "List of RP-to-group mappings."; + } + description + "RP-to-group mappings parameters."; + } + container rp-discovery { + leaf rp-discovery-type { + type identityref { + base multicast-rp-discovery-type; + } + default static-rp; + + description + "Type of RP discovery used."; + } + container bsr-candidates { + when "derived-from-or-self(../rp-discovery-type, "+ + "'l3vpn-svc:bsr-rp')" { + description + "Only applicable if discovery type + is BSR-RP."; + } + leaf-list bsr-candidate-address { + type inet:ip-address; + description + "Address of BSR candidate."; + } + description + "Container for List of Customer + BSR candidate's addresses."; + } + description + "RP discovery parameters."; + } + description + "RP parameters."; + } + description + "Multicast global parameters for the VPN service."; + } + description + "Grouping for multicast VPN definition."; + } + grouping vpn-service-mpls { + leaf carrierscarrier { + if-feature carrierscarrier; + type boolean; + default false; + description + "The VPN is using CsC, and so MPLS is required."; + } + description + "Grouping for MPLS CsC definition."; + } + grouping customer-location-info { + container locations { + list location { + key location-id; + leaf location-id { + type svc-id; + + description + "Identifier for a particular location."; + } + leaf address { + type string; + description + "Address (number and street) of the site."; + } + leaf postal-code { + type string; + description + "Postal code of the site."; + } + leaf state { + type string; + description + "State of the site. This leaf can also be + used to describe a region for a country that + does not have states."; + } + leaf city { + type string; + description + "City of the site."; + } + leaf country-code { + type string { + pattern '[A-Z]{2}'; + } + description + "Country of the site. + Expressed as ISO ALPHA-2 code."; + } + description + "Location of the site."; + } + description + "List of locations for the site."; + } + description + "This grouping defines customer location parameters."; + } + grouping site-group { + container groups { + list group { + key group-id; + leaf group-id { + type string; + + description + "Group-id the site belongs to."; + } + description + "List of group-ids."; + } + description + "Groups the site or site-network-access belongs to."; + } + description + "Grouping definition to assign + group-ids to site or site-network-access."; + } + grouping site-diversity { + container site-diversity { + if-feature site-diversity; + uses site-group; + description + "Diversity constraint type. All + site-network-accesses will inherit + the group values defined here."; + } + description + "This grouping defines site + diversity parameters."; + } + grouping access-diversity { + container access-diversity { + if-feature site-diversity; + uses site-group; + container constraints { + list constraint { + key constraint-type; + leaf constraint-type { + type identityref { + base placement-diversity; + } + description + "Diversity constraint type."; + } + container target { + choice target-flavor { + default id; + case id { + list group { + key group-id; + leaf group-id { + type string; + + description + "The constraint will be applied against + this particular group-id for this site + network access level."; + } + description + "List of group-ids associated with one specific + constraint for this site network access level."; + } + } + case all-accesses { + leaf all-other-accesses { + type empty; + description + "The constraint will be applied against + all other site network accesses of this site."; + } + } + case all-groups { + leaf all-other-groups { + type empty; + description + "The constraint will be applied against + all other groups managed by the customer."; + } + } + description + "Choice for the target flavor definition."; + } + description + "The constraint will be applied against a + Specific target, and the target can be a list + of group-ids,all other site network accesses of + this site, or all other groups managed by the + customer."; + } + description + "List of constraints."; + } + description + "Placement constraints for this site network access."; + } + description + "Diversity parameters."; + } + description + "This grouping defines access diversity parameters."; + } + + grouping operational-requirements { + leaf requested-site-start { + type yang:date-and-time; + description + "Optional leaf indicating requested date and + time when the service at a particular site is + expected to start."; + } + + leaf requested-site-stop { + type yang:date-and-time; + description + "Optional leaf indicating requested date and + time when the service at a particular site is + expected to stop."; + } + description + "This grouping defines some operational + parameters."; + } + grouping operational-requirements-ops { + leaf actual-site-start { + type yang:date-and-time; + config false; + description + "Optional leaf indicating actual date and + time when the service at a particular site + actually started."; + } + leaf actual-site-stop { + type yang:date-and-time; + config false; + description + "Optional leaf indicating actual date and + time when the service at a particular site + actually stopped."; + } + description + "This grouping defines some operational + parameters."; + } + grouping flow-definition { + container match-flow { + leaf dscp { + type inet:dscp; + description + "DSCP value."; + } + + leaf dot1p { + type uint8 { + range "0..7"; + } + description + "802.1p matching."; + } + leaf ipv4-src-prefix { + type inet:ipv4-prefix; + description + "Match on IPv4 src address."; + } + leaf ipv6-src-prefix { + type inet:ipv6-prefix; + description + "Match on IPv6 src address."; + } + leaf ipv4-dst-prefix { + type inet:ipv4-prefix; + description + "Match on IPv4 dst address."; + } + leaf ipv6-dst-prefix { + type inet:ipv6-prefix; + description + "Match on IPv6 dst address."; + } + leaf l4-src-port { + type inet:port-number; + must "current() < ../l4-src-port-range/lower-port or "+ + "current() > ../l4-src-port-range/upper-port" { + description + "If l4-src-port and l4-src-port-range/lower-port and + upper-port are set at the same time, l4-src-port + should not overlap with l4-src-port-range."; + } + description + "Match on Layer 4 src port."; + } + leaf-list target-sites { + if-feature target-sites; + type svc-id; + description + "Identify a site as traffic destination."; + } + container l4-src-port-range { + leaf lower-port { + type inet:port-number; + + description + "Lower boundary for port."; + } + leaf upper-port { + type inet:port-number; + must ". >= ../lower-port" { + description + "Upper boundary for port. If it + exists, the upper boundary must be + higher than the lower boundary."; + } + description + "Upper boundary for port."; + } + description + "Match on Layer 4 src port range. When + only the lower-port is present, it represents + a single port. When both the lower-port and + upper-port are specified, it implies + a range inclusive of both values."; + } + leaf l4-dst-port { + type inet:port-number; + must "current() < ../l4-dst-port-range/lower-port or "+ + "current() > ../l4-dst-port-range/upper-port" { + description + "If l4-dst-port and l4-dst-port-range/lower-port + and upper-port are set at the same time, + l4-dst-port should not overlap with + l4-src-port-range."; + } + description + "Match on Layer 4 dst port."; + } + container l4-dst-port-range { + leaf lower-port { + type inet:port-number; + description + "Lower boundary for port."; + } + leaf upper-port { + type inet:port-number; + must ". >= ../lower-port" { + description + "Upper boundary must be + higher than lower boundary."; + } + description + + "Upper boundary for port. If it exists, + upper boundary must be higher than lower + boundary."; + } + description + "Match on Layer 4 dst port range. When only + lower-port is present, it represents a single + port. When both lower-port and upper-port are + specified, it implies a range inclusive of both + values."; + } + leaf protocol-field { + type union { + type uint8; + type identityref { + base protocol-type; + } + } + description + "Match on IPv4 protocol or IPv6 Next Header field."; + } + description + "Describes flow-matching criteria."; + } + description + "Flow definition based on criteria."; + } + grouping site-service-basic { + leaf svc-input-bandwidth { + type uint64; + units bps; + mandatory true; + description + "From the customer site's perspective, the service + input bandwidth of the connection or download + bandwidth from the SP to the site."; + } + leaf svc-output-bandwidth { + type uint64; + units bps; + mandatory true; + description + "From the customer site's perspective, the service + output bandwidth of the connection or upload + bandwidth from the site to the SP."; + } + leaf svc-mtu { + type uint16; + + units bytes; + mandatory true; + description + "MTU at service level. If the service is IP, + it refers to the IP MTU. If CsC is enabled, + the requested 'svc-mtu' leaf will refer to the + MPLS MTU and not to the IP MTU."; + } + description + "Defines basic service parameters for a site."; + } + grouping site-protection { + container traffic-protection { + if-feature fast-reroute; + leaf enabled { + type boolean; + default false; + description + "Enables traffic protection of access link."; + } + description + "Fast Reroute service parameters for the site."; + } + description + "Defines protection service parameters for a site."; + } + grouping site-service-mpls { + container carrierscarrier { + if-feature carrierscarrier; + leaf signalling-type { + type enumeration { + enum ldp { + description + "Use LDP as the signalling protocol + between the PE and the CE. In this case, + an IGP routing protocol must also be activated."; + } + enum bgp { + description + "Use BGP (as per RFC 8277) as the signalling protocol + between the PE and the CE. + In this case, BGP must also be configured as + the routing protocol."; + } + } + default bgp; + description + "MPLS signalling type."; + + } + description + "This container is used when the customer provides + MPLS-based services. This is only used in the case + of CsC (i.e., a customer builds an MPLS service using + an IP VPN to carry its traffic)."; + } + description + "Defines MPLS service parameters for a site."; + } + grouping site-service-qos-profile { + container qos { + if-feature qos; + container qos-classification-policy { + list rule { + key id; + ordered-by user; + leaf id { + type string; + description + "A description identifying the + qos-classification-policy rule."; + } + choice match-type { + default match-flow; + case match-flow { + uses flow-definition; + } + case match-application { + leaf match-application { + type identityref { + base customer-application; + } + description + "Defines the application to match."; + } + } + description + "Choice for classification."; + } + leaf target-class-id { + type string; + description + "Identification of the class of service. + This identifier is internal to the administration."; + } + description + "List of marking rules."; + + } + description + "Configuration of the traffic classification policy."; + } + container qos-profile { + choice qos-profile { + description + "Choice for QoS profile. + Can be standard profile or customized profile."; + case standard { + description + "Standard QoS profile."; + leaf profile { + type leafref { + path "/l3vpn-svc/vpn-profiles/valid-provider-identifiers"+ + "/qos-profile-identifier/id"; + } + description + "QoS profile to be used."; + } + } + case custom { + description + "Customized QoS profile."; + container classes { + if-feature qos-custom; + list class { + key class-id; + leaf class-id { + type string; + description + "Identification of the class of service. + This identifier is internal to the + administration."; + } + leaf direction { + type identityref { + base qos-profile-direction; + } + default both; + description + "The direction to which the QoS profile + is applied."; + } + leaf rate-limit { + type decimal64 { + fraction-digits 5; + range "0..100"; + + } + units percent; + description + "To be used if the class must be rate-limited. + Expressed as percentage of the service + bandwidth."; + } + container latency { + choice flavor { + case lowest { + leaf use-lowest-latency { + type empty; + description + "The traffic class should use the path with the + lowest latency."; + } + } + case boundary { + leaf latency-boundary { + type uint16; + units msec; + default 400; + description + "The traffic class should use a path with a + defined maximum latency."; + } + } + description + "Latency constraint on the traffic class."; + } + description + "Latency constraint on the traffic class."; + } + container jitter { + choice flavor { + case lowest { + leaf use-lowest-jitter { + type empty; + description + "The traffic class should use the path with the + lowest jitter."; + } + } + case boundary { + leaf latency-boundary { + type uint32; + units usec; + default 40000; + + description + "The traffic class should use a path with a + defined maximum jitter."; + } + } + description + "Jitter constraint on the traffic class."; + } + description + "Jitter constraint on the traffic class."; + } + container bandwidth { + leaf guaranteed-bw-percent { + type decimal64 { + fraction-digits 5; + range "0..100"; + } + units percent; + mandatory true; + description + "To be used to define the guaranteed bandwidth + as a percentage of the available service bandwidth."; + } + leaf end-to-end { + type empty; + description + "Used if the bandwidth reservation + must be done on the MPLS network too."; + } + description + "Bandwidth constraint on the traffic class."; + } + description + "List of classes of services."; + } + description + "Container for list of classes of services."; + } + } + } + description + "QoS profile configuration."; + } + description + "QoS configuration."; + } + description + "This grouping defines QoS parameters for a site."; + + } + grouping site-security-authentication { + container authentication { + description + "Authentication parameters."; + } + description + "This grouping defines authentication parameters for a site."; + } + grouping site-security-encryption { + container encryption { + if-feature encryption; + leaf enabled { + type boolean; + default false; + description + "If true, traffic encryption on the connection is required."; + } + leaf layer { + when "../enabled = 'true'" { + description + "Require a value for layer when enabled is true."; + } + type enumeration { + enum layer2 { + description + "Encryption will occur at Layer 2."; + } + enum layer3 { + description + "Encryption will occur at Layer 3. + For example, IPsec may be used when + a customer requests Layer 3 encryption."; + } + } + description + "Layer on which encryption is applied."; + } + container encryption-profile { + choice profile { + case provider-profile { + leaf profile-name { + type leafref { + path "/l3vpn-svc/vpn-profiles/valid-provider-identifiers"+ + "/encryption-profile-identifier/id"; + } + description + "Name of the SP profile to be applied."; + + } + } + case customer-profile { + leaf algorithm { + type string; + description + "Encryption algorithm to be used."; + } + choice key-type { + default psk; + case psk { + leaf preshared-key { + type string; + description + "Pre-Shared Key (PSK) coming from the customer."; + } + } + description + "Type of keys to be used."; + } + } + description + "Choice of encryption profile. The encryption + profile can be the provider profile or customer profile."; + } + description + "Profile of encryption to be applied."; + } + description + "Encryption parameters."; + } + description + "This grouping defines encryption parameters for a site."; + } + grouping site-attachment-bearer { + container bearer { + container requested-type { + if-feature requested-type; + leaf requested-type { + type string; + description + "Type of requested bearer: Ethernet, DSL, + Wireless, etc. Operator specific."; + } + leaf strict { + type boolean; + default false; + description + + "Defines whether requested-type is a preference + or a strict requirement."; + } + description + "Container for requested-type."; + } + leaf always-on { + if-feature always-on; + type boolean; + default true; + description + "Request for an always-on access type. + For example, this could mean no dial access type."; + } + leaf bearer-reference { + if-feature bearer-reference; + type string; + description + "This is an internal reference for the SP."; + } + description + "Bearer-specific parameters. + To be augmented."; + } + description + "Defines physical properties of a site attachment."; + } + grouping site-routing { + container routing-protocols { + list routing-protocol { + key type; + leaf type { + type identityref { + base routing-protocol-type; + } + description + "Type of routing protocol."; + } + container ospf { + when "derived-from-or-self(../type, 'l3vpn-svc:ospf')" { + description + "Only applies when protocol is OSPF."; + } + if-feature rtg-ospf; + leaf-list address-family { + type address-family; + min-elements "1"; + description + + "If OSPF is used on this site, this node + contains a configured value. This node + contains at least one address family + to be activated."; + } + leaf area-address { + type yang:dotted-quad; + mandatory true; + description + "Area address."; + } + leaf metric { + type uint16; + default 1; + description + "Metric of the PE-CE link. It is used + in the routing state calculation and + path selection."; + } + container sham-links { + if-feature rtg-ospf-sham-link; + list sham-link { + key target-site; + leaf target-site { + type svc-id; + description + "Target site for the sham link connection. + The site is referred to by its ID."; + } + leaf metric { + type uint16; + default 1; + description + "Metric of the sham link. It is used in + the routing state calculation and path + selection. The default value is set + to 1."; + } + description + "Creates a sham link with another site."; + } + description + "List of sham links."; + } + description + "OSPF-specific configuration."; + } + container bgp { + + when "derived-from-or-self(../type, 'l3vpn-svc:bgp')" { + description + "Only applies when protocol is BGP."; + } + if-feature rtg-bgp; + leaf autonomous-system { + type uint32; + mandatory true; + description + "Customer AS number in case the customer + requests BGP routing."; + } + leaf-list address-family { + type address-family; + min-elements "1"; + description + "If BGP is used on this site, this node + contains a configured value. This node + contains at least one address family + to be activated."; + } + description + "BGP-specific configuration."; + } + container static { + when "derived-from-or-self(../type, 'l3vpn-svc:static')" { + description + "Only applies when protocol is static. + BGP activation requires the SP to know + the address of the customer peer. When + BGP is enabled, the 'static-address' + allocation type for the IP connection + MUST be used."; + } + container cascaded-lan-prefixes { + list ipv4-lan-prefixes { + if-feature ipv4; + key "lan next-hop"; + leaf lan { + type inet:ipv4-prefix; + description + "LAN prefixes."; + } + leaf lan-tag { + type string; + description + "Internal tag to be used in VPN policies."; + } + + leaf next-hop { + type inet:ipv4-address; + description + "Next-hop address to use on the customer side."; + } + description + "List of LAN prefixes for the site."; + } + list ipv6-lan-prefixes { + if-feature ipv6; + key "lan next-hop"; + leaf lan { + type inet:ipv6-prefix; + description + "LAN prefixes."; + } + leaf lan-tag { + type string; + description + "Internal tag to be used in VPN policies."; + } + leaf next-hop { + type inet:ipv6-address; + description + "Next-hop address to use on the customer side."; + } + description + "List of LAN prefixes for the site."; + } + description + "LAN prefixes from the customer."; + } + description + "Configuration specific to static routing."; + } + container rip { + when "derived-from-or-self(../type, 'l3vpn-svc:rip')" { + description + "Only applies when the protocol is RIP. For IPv4, + the model assumes that RIP version 2 is used."; + } + if-feature rtg-rip; + leaf-list address-family { + type address-family; + min-elements "1"; + description + "If RIP is used on this site, this node + contains a configured value. This node + + contains at least one address family + to be activated."; + } + description + "Configuration specific to RIP routing."; + } + container vrrp { + when "derived-from-or-self(../type, 'l3vpn-svc:vrrp')" { + description + "Only applies when protocol is VRRP."; + } + if-feature rtg-vrrp; + leaf-list address-family { + type address-family; + min-elements "1"; + description + "If VRRP is used on this site, this node + contains a configured value. This node contains + at least one address family to be activated."; + } + description + "Configuration specific to VRRP routing."; + } + description + "List of routing protocols used on + the site. This list can be augmented."; + } + description + "Defines routing protocols."; + } + description + "Grouping for routing protocols."; + } + grouping site-attachment-ip-connection { + container ip-connection { + container ipv4 { + if-feature ipv4; + leaf address-allocation-type { + type identityref { + base address-allocation-type; + } + must "not(derived-from-or-self(current(), 'l3vpn-svc:slaac') or "+ + "derived-from-or-self(current(), "+ + "'l3vpn-svc:provider-dhcp-slaac'))" { + error-message "SLAAC is only applicable to IPv6"; + } + description + "Defines how addresses are allocated. + + If there is no value for the address + allocation type, then IPv4 is not enabled."; + } + container provider-dhcp { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp')" { + description + "Only applies when addresses are allocated by DHCP."; + } + leaf provider-address { + type inet:ipv4-address; + description + "Address of provider side. If provider-address is not + specified, then prefix length should not be specified + either. It also implies provider-dhcp allocation is + not enabled. If provider-address is specified, then + the prefix length may or may not be specified."; + } + leaf prefix-length { + type uint8 { + range "0..32"; + } + must "(../provider-address)" { + error-message + "If the prefix length is specified, provider-address + must also be specified."; + description + "If the prefix length is specified, provider-address + must also be specified."; + } + description + "Subnet prefix length expressed in bits. + If not specified, or specified as zero, + this means the customer leaves the actual + prefix length value to the provider."; + } + choice address-assign { + default number; + case number { + leaf number-of-dynamic-address { + type uint16; + default 1; + description + "Describes the number of IP addresses + the customer requires."; + } + } + case explicit { + + container customer-addresses { + list address-group { + key "group-id"; + leaf group-id { + type string; + description + "Group-id for the address range from + start-address to end-address."; + } + leaf start-address { + type inet:ipv4-address; + description + "First address."; + } + leaf end-address { + type inet:ipv4-address; + description + "Last address."; + } + description + "Describes IP addresses allocated by DHCP. + When only start-address or only end-address + is present, it represents a single address. + When both start-address and end-address are + specified, it implies a range inclusive of both + addresses. If no address is specified, it implies + customer addresses group is not supported."; + } + description + "Container for customer addresses is allocated by DHCP."; + } + } + description + "Choice for the way to assign addresses."; + } + description + "DHCP allocated addresses related parameters."; + } + container dhcp-relay { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp-relay')" { + description + "Only applies when provider is required to implement + DHCP relay function."; + } + leaf provider-address { + type inet:ipv4-address; + description + + "Address of provider side. If provider-address is not + specified, then prefix length should not be specified + either. It also implies provider-dhcp allocation is + not enabled. If provider-address is specified, then + prefix length may or may not be specified."; + } + leaf prefix-length { + type uint8 { + range "0..32"; + } + must "(../provider-address)" { + error-message + "If prefix length is specified, provider-address + must also be specified."; + description + "If prefix length is specified, provider-address + must also be specified."; + } + description + "Subnet prefix length expressed in bits. If not + specified, or specified as zero, this means the + customer leaves the actual prefix length value + to the provider."; + } + container customer-dhcp-servers { + leaf-list server-ip-address { + type inet:ipv4-address; + description + "IP address of customer DHCP server."; + } + description + "Container for list of customer DHCP servers."; + } + description + "DHCP relay provided by operator."; + } + container addresses { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:static-address')" { + description + "Only applies when protocol allocation type is static."; + } + leaf provider-address { + type inet:ipv4-address; + description + "IPv4 Address List of the provider side. + When the protocol allocation type is static, + the provider address must be configured."; + + } + leaf customer-address { + type inet:ipv4-address; + description + "IPv4 Address of customer side."; + } + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "Subnet prefix length expressed in bits. + It is applied to both provider-address + and customer-address."; + } + description + "Describes IPv4 addresses used."; + } + description + "IPv4-specific parameters."; + } + container ipv6 { + if-feature ipv6; + leaf address-allocation-type { + type identityref { + base address-allocation-type; + } + description + "Defines how addresses are allocated. + If there is no value for the address + allocation type, then IPv6 is + not enabled."; + } + + container provider-dhcp { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp') "+ + "or derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp-slaac')" { + description + "Only applies when addresses are allocated by DHCP."; + } + leaf provider-address { + type inet:ipv6-address; + description + "Address of the provider side. If provider-address + is not specified, then prefix length should not be + specified either. It also implies provider-dhcp + + allocation is not enabled. If provider-address is + specified, then prefix length may or may + not be specified."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + must "(../provider-address)" { + error-message + "If prefix length is specified, provider-address + must also be specified."; + description + "If prefix length is specified, provider-address + must also be specified."; + } + description + "Subnet prefix length expressed in bits. If not + specified, or specified as zero, this means the + customer leaves the actual prefix length value + to the provider."; + } + choice address-assign { + default number; + case number { + leaf number-of-dynamic-address { + type uint16; + default 1; + description + "Describes the number of IP addresses the customer + requires."; + } + } + case explicit { + container customer-addresses { + list address-group { + key "group-id"; + leaf group-id { + type string; + description + "Group-id for the address range from + start-address to end-address."; + } + leaf start-address { + type inet:ipv6-address; + description + "First address."; + } + + leaf end-address { + type inet:ipv6-address; + description + "Last address."; + } + description + "Describes IP addresses allocated by DHCP. When only + start-address or only end-address is present, it + represents a single address. When both start-address + and end-address are specified, it implies a range + inclusive of both addresses. If no address is + specified, it implies customer addresses group is + not supported."; + } + description + "Container for customer addresses allocated by DHCP."; + } + } + description + "Choice for the way to assign addresses."; + } + description + "DHCP allocated addresses related parameters."; + } + container dhcp-relay { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:provider-dhcp-relay')" { + description + "Only applies when the provider is required + to implement DHCP relay function."; + } + leaf provider-address { + type inet:ipv6-address; + description + "Address of the provider side. If provider-address is + not specified, then prefix length should not be + specified either. It also implies provider-dhcp + allocation is not enabled. If provider address + is specified, then prefix length may or may + not be specified."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + must "(../provider-address)" { + error-message + "If prefix length is specified, provider-address + + must also be specified."; + description + "If prefix length is specified, provider-address + must also be specified."; + } + description + "Subnet prefix length expressed in bits. If not + specified, or specified as zero, this means the + customer leaves the actual prefix length value + to the provider."; + } + container customer-dhcp-servers { + leaf-list server-ip-address { + type inet:ipv6-address; + description + "This node contains the IP address of + the customer DHCP server. If the DHCP relay + function is implemented by the + provider, this node contains the + configured value."; + } + description + "Container for list of customer DHCP servers."; + } + description + "DHCP relay provided by operator."; + } + container addresses { + when "derived-from-or-self(../address-allocation-type, "+ + "'l3vpn-svc:static-address')" { + description + "Only applies when protocol allocation type is static."; + } + leaf provider-address { + type inet:ipv6-address; + description + "IPv6 Address of the provider side. When the protocol + allocation type is static, the provider address + must be configured."; + } + leaf customer-address { + type inet:ipv6-address; + description + "The IPv6 Address of the customer side."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + + } + description + "Subnet prefix length expressed in bits. + It is applied to both provider-address and + customer-address."; + } + description + "Describes IPv6 addresses used."; + } + description + "IPv6-specific parameters."; + } + container oam { + container bfd { + if-feature bfd; + leaf enabled { + type boolean; + default false; + description + "If true, BFD activation is required."; + } + choice holdtime { + default fixed; + case fixed { + leaf fixed-value { + type uint32; + units msec; + description + "Expected BFD holdtime expressed in msec. The customer + may impose some fixed values for the holdtime period + if the provider allows the customer use this function. + If the provider doesn't allow the customer to use this + function, the fixed-value will not be set."; + } + } + case profile { + leaf profile-name { + type leafref { + path "/l3vpn-svc/vpn-profiles/valid-provider-identifiers/"+ + "bfd-profile-identifier/id"; + } + description + "Well-known SP profile name. The provider can propose + some profiles to the customer, depending on the service + level the customer wants to achieve. Profile names + must be communicated to the customer."; + } + description + + "Well-known SP profile."; + } + description + "Choice for holdtime flavor."; + } + description + "Container for BFD."; + } + description + "Defines the Operations, Administration, and Maintenance (OAM) + mechanisms used on the connection. BFD is set as a fault + detection mechanism, but the 'oam' container can easily + be augmented by other mechanisms"; + } + description + "Defines connection parameters."; + } + description + "This grouping defines IP connection parameters."; + } + grouping site-service-multicast { + container multicast { + if-feature multicast; + leaf multicast-site-type { + type enumeration { + enum receiver-only { + description + "The site only has receivers."; + } + enum source-only { + description + "The site only has sources."; + } + enum source-receiver { + description + "The site has both sources and receivers."; + } + } + default source-receiver; + description + "Type of multicast site."; + } + container multicast-address-family { + leaf ipv4 { + if-feature ipv4; + type boolean; + default false; + description + + "Enables IPv4 multicast."; + } + leaf ipv6 { + if-feature ipv6; + type boolean; + default false; + description + "Enables IPv6 multicast."; + } + description + "Defines protocol to carry multicast."; + } + leaf protocol-type { + type enumeration { + enum host { + description + "Hosts are directly connected to the provider network. + Host protocols such as IGMP or MLD are required."; + } + enum router { + description + "Hosts are behind a customer router. + PIM will be implemented."; + } + enum both { + description + "Some hosts are behind a customer router, and + some others are directly connected to the + provider network. Both host and routing protocols + must be used. Typically, IGMP and PIM will be + implemented."; + } + } + default "both"; + description + "Multicast protocol type to be used with the customer site."; + } + description + "Multicast parameters for the site."; + } + description + "Multicast parameters for the site."; + } + grouping site-management { + container management { + leaf type { + type identityref { + base management; + + } + mandatory true; + description + "Management type of the connection."; + } + description + "Management configuration."; + } + description + "Management parameters for the site."; + } + grouping site-devices { + container devices { + when "derived-from-or-self(../management/type, "+ + "'l3vpn-svc:provider-managed') or "+ + "derived-from-or-self(../management/type, 'l3vpn-svc:co-managed')" { + description + "Applicable only for provider-managed or + co-managed device."; + } + list device { + key device-id; + leaf device-id { + type svc-id; + description + "Identifier for the device."; + } + leaf location { + type leafref { + path "../../../locations/"+ + "location/location-id"; + } + mandatory true; + description + "Location of the device."; + } + container management { + when "derived-from-or-self(../../../management/type,"+ + "'l3vpn-svc:co-managed')" { + description + "Applicable only for co-managed device."; + } + leaf address-family { + type address-family; + description + "Address family used for management."; + } + leaf address { + + when "(../address-family)" { + description + "If address-family is specified, then address should + also be specified. If address-family is not specified, + then address should also not be specified."; + } + type inet:ip-address; + mandatory true; + description + "Management address."; + } + description + "Management configuration. Applicable only for + co-managed device."; + } + description + "List of devices requested by customer."; + } + description + "Device configuration."; + } + description + "Grouping for device allocation."; + } + grouping site-vpn-flavor { + leaf site-vpn-flavor { + type identityref { + base site-vpn-flavor; + } + default site-vpn-flavor-single; + description + "Defines the way the VPN multiplexing is done, e.g., whether + the site belongs to a single VPN site or a multiVPN; or, in the case + of a multiVPN, whether the logical accesses of the sites belong + to the same set of VPNs or each logical access maps to + different VPNs."; + } + description + "Grouping for site VPN flavor."; + } + grouping site-vpn-policy { + container vpn-policies { + list vpn-policy { + key vpn-policy-id; + leaf vpn-policy-id { + type svc-id; + description + "Unique identifier for the VPN policy."; + + } + list entries { + key id; + leaf id { + type svc-id; + description + "Unique identifier for the policy entry."; + } + container filters { + list filter { + key type; + ordered-by user; + leaf type { + type identityref { + base vpn-policy-filter-type; + } + description + "Type of VPN Policy filter."; + } + leaf-list lan-tag { + when "derived-from-or-self(../type, 'l3vpn-svc:lan')" { + description + "Only applies when the VPN Policy filter is a + LAN Tag filter."; + } + if-feature lan-tag; + type string; + description + "List of 'lan-tag' items to be matched. LAN Tag + is an Internal tag to be used in VPN policies "; + } + leaf-list ipv4-lan-prefix { + when "derived-from-or-self(../type, 'l3vpn-svc:ipv4')" { + description + "Only applies when VPN Policy filter is IPv4 Prefix filter."; + } + if-feature ipv4; + type inet:ipv4-prefix; + description + "List of IPv4 prefixes as LAN Prefixes to be matched."; + } + leaf-list ipv6-lan-prefix { + when "derived-from-or-self(../type, 'l3vpn-svc:ipv6')" { + description + "Only applies when VPN Policy filter is IPv6 Prefix filter."; + } + if-feature ipv6; + type inet:ipv6-prefix; + + description + "List of IPv6 prefixes as LAN prefixes to be matched."; + } + description + "List of filters used on the site. This list can + be augmented."; + } + description + "If a more-granular VPN attachment is necessary, filtering can + be used. If used, it permits the splitting of site LANs among + multiple VPNs. The Site LAN can be split based on either LAN + Tag or LAN prefix. If no filter is used, all the LANs will be + part of the same VPNs with the same role."; + } + list vpn { + key vpn-id; + leaf vpn-id { + type leafref { + path "/l3vpn-svc/vpn-services/"+ + "vpn-service/vpn-id"; + } + mandatory true; + description + "Reference to an IP VPN."; + } + leaf site-role { + type identityref { + base site-role; + } + default any-to-any-role; + description + "Role of the site in the IP VPN."; + } + description + "List of VPNs the LAN is associated with."; + } + description + "List of entries for export policy."; + } + description + "List of VPN policies."; + } + description + "VPN policy."; + } + description + "VPN policy parameters for the site."; + } + + grouping site-maximum-routes { + container maximum-routes { + list address-family { + key af; + leaf af { + type address-family; + description + "Address family."; + } + leaf maximum-routes { + type uint32; + description + "Maximum prefixes the VRF can accept + for this address family."; + } + description + "List of address families."; + } + description + "Defines 'maximum-routes' for the VRF."; + } + description + "Defines 'maximum-routes' for the site."; + } + grouping site-security { + container security { + uses site-security-authentication; + uses site-security-encryption; + description + "Site-specific security parameters."; + } + description + "Grouping for security parameters."; + } + grouping site-service { + container service { + uses site-service-qos-profile; + uses site-service-mpls; + uses site-service-multicast; + description + "Service parameters on the attachment."; + } + description + "Grouping for service parameters."; + } + grouping site-network-access-service { + container service { + uses site-service-basic; + + uses site-service-qos-profile; + uses site-service-mpls; + uses site-service-multicast; + description + "Service parameters on the attachment."; + } + description + "Grouping for service parameters."; + } + grouping vpn-extranet { + container extranet-vpns { + if-feature extranet-vpn; + list extranet-vpn { + key vpn-id; + leaf vpn-id { + type svc-id; + description + "Identifies the target VPN the local VPN want to access."; + } + leaf local-sites-role { + type identityref { + base site-role; + } + default any-to-any-role; + description + "This describes the role of the + local sites in the target VPN topology. In the any-to-any VPN + service topology, the local sites must have the same role, which + will be 'any-to-any-role'. In the Hub-and-Spoke VPN service + topology or the Hub-and-Spoke disjoint VPN service topology, + the local sites must have a Hub role or a Spoke role."; + } + description + "List of extranet VPNs or target VPNs the local VPN is + attached to."; + } + description + "Container for extranet VPN configuration."; + } + description + "Grouping for extranet VPN configuration. + This provides an easy way to interconnect + all sites from two VPNs."; + } + grouping site-attachment-availability { + container availability { + leaf access-priority { + type uint32; + + default 100; + description + "Defines the priority for the access. + The higher the access-priority value, + the higher the preference of the + access will be."; + } + description + "Availability parameters (used for multihoming)."; + } + description + "Defines availability parameters for a site."; + } + grouping access-vpn-policy { + container vpn-attachment { + choice attachment-flavor { + case vpn-policy-id { + leaf vpn-policy-id { + type leafref { + path "../../../../"+ + "vpn-policies/vpn-policy/"+ + "vpn-policy-id"; + } + description + "Reference to a VPN policy. When referencing VPN + policy for attachment, the vpn-policy-id must be + configured."; + } + } + case vpn-id { + leaf vpn-id { + type leafref { + path "/l3vpn-svc/vpn-services"+ + "/vpn-service/vpn-id"; + } + description + "Reference to an IP VPN. Referencing a vpn-id provides + an easy way to attach a particular logical access to + a VPN. In this case, vpn-id must be configured."; + } + leaf site-role { + type identityref { + base site-role; + } + default any-to-any-role; + description + "Role of the site in the IP VPN. When referencing a vpn-id, + the site-role setting must be added to express the role of + + the site in the target VPN service topology."; + } + } + mandatory true; + description + "Choice for VPN attachment flavor. A choice is implemented + to allow the user to choose the flavor that provides the + best fit."; + } + description + "Defines VPN attachment of a site."; + } + description + "Defines the VPN attachment rules for + a site's logical access."; + } + grouping vpn-profile-cfg { + container valid-provider-identifiers { + list cloud-identifier { + if-feature cloud-access; + key id; + leaf id { + type string; + description + "Identification of cloud service. + Local administration meaning."; + } + description + "List for Cloud Identifiers."; + } + list encryption-profile-identifier { + key id; + leaf id { + type string; + description + "Identification of the SP encryption profile + to be used. Local administration meaning."; + } + description + "List for encryption profile identifiers."; + } + list qos-profile-identifier { + key id; + leaf id { + type string; + description + "Identification of the QoS Profile to be used. + Local administration meaning."; + + } + description + "List for QoS Profile Identifiers."; + } + list bfd-profile-identifier { + key id; + leaf id { + type string; + description + "Identification of the SP BFD Profile to be used. + Local administration meaning."; + } + description + "List for BFD Profile identifiers."; + } + nacm:default-deny-write; + description + "Container for Valid Provider Identifies."; + } + description + "Grouping for VPN Profile configuration."; + } + grouping vpn-svc-cfg { + leaf vpn-id { + type svc-id; + description + "VPN identifier. Local administration meaning."; + } + leaf customer-name { + type string; + description + "Name of the customer that actually uses the VPN service. + In the case that any intermediary (e.g., Tier-2 provider + or partner) sells the VPN service to their end user + on behalf of the original service provider (e.g., Tier-1 + provider), the original service provider may require the + customer name to provide smooth activation/commissioning + and operation for the service."; + } + leaf vpn-service-topology { + type identityref { + base vpn-topology; + } + default any-to-any; + description + "VPN service topology."; + } + uses vpn-service-cloud-access; + + uses vpn-service-multicast; + uses vpn-service-mpls; + uses vpn-extranet; + description + "Grouping for VPN service configuration."; + } + grouping site-top-level-cfg { + uses operational-requirements; + uses customer-location-info; + uses site-devices; + uses site-diversity; + uses site-management; + uses site-vpn-policy; + uses site-vpn-flavor; + uses site-maximum-routes; + uses site-security; + uses site-service; + uses site-protection; + uses site-routing; + description + "Grouping for site top-level configuration."; + } + grouping site-network-access-top-level-cfg { + leaf site-network-access-type { + type identityref { + base site-network-access-type; + } + default point-to-point; + description + "Describes the type of connection, e.g., + point-to-point or multipoint."; + } + choice location-flavor { + case location { + when "derived-from-or-self(../../management/type, "+ + "'l3vpn-svc:customer-managed')" { + description + "Applicable only for customer-managed device."; + } + leaf location-reference { + type leafref { + path "../../../locations/location/location-id"; + } + description + "Location of the site-network-access."; + } + } + case device { + + when "derived-from-or-self(../../management/type, "+ + "'l3vpn-svc:provider-managed') or "+ + "derived-from-or-self(../../management/type, "+ + "'l3vpn-svc:co-managed')" { + description + "Applicable only for provider-managed or co-managed device."; + } + leaf device-reference { + type leafref { + path "../../../devices/device/device-id"; + } + description + "Identifier of CE to use."; + } + } + mandatory true; + description + "Choice of how to describe the site's location."; + } + uses access-diversity; + uses site-attachment-bearer; + uses site-attachment-ip-connection; + uses site-security; + uses site-network-access-service; + uses site-routing; + uses site-attachment-availability; + uses access-vpn-policy; + description + "Grouping for site network access top-level configuration."; + } + /* Main blocks */ + container l3vpn-svc { + container vpn-profiles { + uses vpn-profile-cfg; + description + "Container for VPN Profiles."; + } + container vpn-services { + list vpn-service { + key vpn-id; + uses vpn-svc-cfg; + description + "List of VPN services."; + } + description + "Top-level container for the VPN services."; + } + container sites { + list site { + key site-id; + leaf site-id { + type svc-id; + description + "Identifier of the site."; + } + uses site-top-level-cfg; + uses operational-requirements-ops; + container site-network-accesses { + list site-network-access { + key site-network-access-id; + leaf site-network-access-id { + type svc-id; + description + "Identifier for the access."; + } + uses site-network-access-top-level-cfg; + description + "List of accesses for a site."; + } + description + "List of accesses for a site."; + } + description + "List of sites."; + } + description + "Container for sites."; + } + description + "Main container for L3VPN service configuration."; + } + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-netconf-acm@2018-02-14.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-netconf-acm@2018-02-14.yang new file mode 100644 index 0000000000000000000000000000000000000000..dc0deb8ffd29791ad80b9e3ad8244502126f2d44 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-netconf-acm@2018-02-14.yang @@ -0,0 +1,468 @@ +module ietf-netconf-acm { + + namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm"; + + prefix nacm; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: + WG List: + + Author: Andy Bierman + + + Author: Martin Bjorklund + "; + + description + "Network Configuration Access Control Model. + + Copyright (c) 2012 - 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 8341; see + the RFC itself for full legal notices."; + + revision "2018-02-14" { + description + "Added support for YANG 1.1 actions and notifications tied to + data nodes. Clarified how NACM extensions can be used by + other data models."; + reference + "RFC 8341: Network Configuration Access Control Model"; + } + + revision "2012-02-22" { + description + "Initial version."; + reference + "RFC 6536: Network Configuration Protocol (NETCONF) + Access Control Model"; + } + + /* + * Extension statements + */ + + extension default-deny-write { + description + "Used to indicate that the data model node + represents a sensitive security system parameter. + + If present, the NETCONF server will only allow the designated + 'recovery session' to have write access to the node. An + explicit access control rule is required for all other users. + + If the NACM module is used, then it must be enabled (i.e., + /nacm/enable-nacm object equals 'true'), or this extension + is ignored. + + The 'default-deny-write' extension MAY appear within a data + definition statement. It is ignored otherwise."; + } + + extension default-deny-all { + description + "Used to indicate that the data model node + controls a very sensitive security system parameter. + + If present, the NETCONF server will only allow the designated + 'recovery session' to have read, write, or execute access to + the node. An explicit access control rule is required for all + other users. + + If the NACM module is used, then it must be enabled (i.e., + /nacm/enable-nacm object equals 'true'), or this extension + is ignored. + + The 'default-deny-all' extension MAY appear within a data + definition statement, 'rpc' statement, or 'notification' + statement. It is ignored otherwise."; + } + + /* + * Derived types + */ + + typedef user-name-type { + type string { + length "1..max"; + } + description + "General-purpose username string."; + } + + typedef matchall-string-type { + type string { + pattern '\*'; + } + description + "The string containing a single asterisk '*' is used + to conceptually represent all possible values + for the particular leaf using this data type."; + } + + typedef access-operations-type { + type bits { + bit create { + description + "Any protocol operation that creates a + new data node."; + position 0; + } + bit read { + description + "Any protocol operation or notification that + returns the value of a data node."; + position 1; + } + bit update { + description + "Any protocol operation that alters an existing + data node."; + position 2; + } + bit delete { + description + "Any protocol operation that removes a data node."; + position 3; + } + bit exec { + description + "Execution access to the specified protocol operation."; + position 4; + } + } + description + "Access operation."; + } + + typedef group-name-type { + type string { + length "1..max"; + pattern '[^\*].*'; + } + description + "Name of administrative group to which + users can be assigned."; + } + + typedef action-type { + type enumeration { + enum permit { + description + "Requested action is permitted."; + } + enum deny { + description + "Requested action is denied."; + } + } + description + "Action taken by the server when a particular + rule matches."; + } + + typedef node-instance-identifier { + type yang:xpath1.0; + description + "Path expression used to represent a special + data node, action, or notification instance-identifier + string. + + A node-instance-identifier value is an + unrestricted YANG instance-identifier expression. + All the same rules as an instance-identifier apply, + except that predicates for keys are optional. If a key + predicate is missing, then the node-instance-identifier + represents all possible server instances for that key. + + This XML Path Language (XPath) expression is evaluated in the + following context: + + o The set of namespace declarations are those in scope on + the leaf element where this type is used. + + o The set of variable bindings contains one variable, + 'USER', which contains the name of the user of the + current session. + + o The function library is the core function library, but + note that due to the syntax restrictions of an + instance-identifier, no functions are allowed. + + o The context node is the root node in the data tree. + + The accessible tree includes actions and notifications tied + to data nodes."; + } + + /* + * Data definition statements + */ + + container nacm { + nacm:default-deny-all; + + description + "Parameters for NETCONF access control model."; + + leaf enable-nacm { + type boolean; + default "true"; + description + "Enables or disables all NETCONF access control + enforcement. If 'true', then enforcement + is enabled. If 'false', then enforcement + is disabled."; + } + + leaf read-default { + type action-type; + default "permit"; + description + "Controls whether read access is granted if + no appropriate rule is found for a + particular read request."; + } + + leaf write-default { + type action-type; + default "deny"; + description + "Controls whether create, update, or delete access + is granted if no appropriate rule is found for a + particular write request."; + } + + leaf exec-default { + type action-type; + default "permit"; + description + "Controls whether exec access is granted if no appropriate + rule is found for a particular protocol operation request."; + } + + leaf enable-external-groups { + type boolean; + default "true"; + description + "Controls whether the server uses the groups reported by the + NETCONF transport layer when it assigns the user to a set of + NACM groups. If this leaf has the value 'false', any group + names reported by the transport layer are ignored by the + server."; + } + + leaf denied-operations { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that a + protocol operation request was denied."; + } + + leaf denied-data-writes { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that a + protocol operation request to alter + a configuration datastore was denied."; + } + + leaf denied-notifications { + type yang:zero-based-counter32; + config false; + mandatory true; + description + "Number of times since the server last restarted that + a notification was dropped for a subscription because + access to the event type was denied."; + } + + container groups { + description + "NETCONF access control groups."; + + list group { + key name; + + description + "One NACM group entry. This list will only contain + configured entries, not any entries learned from + any transport protocols."; + + leaf name { + type group-name-type; + description + "Group name associated with this entry."; + } + + leaf-list user-name { + type user-name-type; + description + "Each entry identifies the username of + a member of the group associated with + this entry."; + } + } + } + + list rule-list { + key name; + ordered-by user; + description + "An ordered collection of access control rules."; + + leaf name { + type string { + length "1..max"; + } + description + "Arbitrary name assigned to the rule-list."; + } + leaf-list group { + type union { + type matchall-string-type; + type group-name-type; + } + description + "List of administrative groups that will be + assigned the associated access rights + defined by the 'rule' list. + + The string '*' indicates that all groups apply to the + entry."; + } + + list rule { + key name; + ordered-by user; + description + "One access control rule. + + Rules are processed in user-defined order until a match is + found. A rule matches if 'module-name', 'rule-type', and + 'access-operations' match the request. If a rule + matches, the 'action' leaf determines whether or not + access is granted."; + + leaf name { + type string { + length "1..max"; + } + description + "Arbitrary name assigned to the rule."; + } + + leaf module-name { + type union { + type matchall-string-type; + type string; + } + default "*"; + description + "Name of the module associated with this rule. + + This leaf matches if it has the value '*' or if the + object being accessed is defined in the module with the + specified module name."; + } + choice rule-type { + description + "This choice matches if all leafs present in the rule + match the request. If no leafs are present, the + choice matches all requests."; + case protocol-operation { + leaf rpc-name { + type union { + type matchall-string-type; + type string; + } + description + "This leaf matches if it has the value '*' or if + its value equals the requested protocol operation + name."; + } + } + case notification { + leaf notification-name { + type union { + type matchall-string-type; + type string; + } + description + "This leaf matches if it has the value '*' or if its + value equals the requested notification name."; + } + } + case data-node { + leaf path { + type node-instance-identifier; + mandatory true; + description + "Data node instance-identifier associated with the + data node, action, or notification controlled by + this rule. + + Configuration data or state data + instance-identifiers start with a top-level + data node. A complete instance-identifier is + required for this type of path value. + + The special value '/' refers to all possible + datastore contents."; + } + } + } + + leaf access-operations { + type union { + type matchall-string-type; + type access-operations-type; + } + default "*"; + description + "Access operations associated with this rule. + + This leaf matches if it has the value '*' or if the + bit corresponding to the requested operation is set."; + } + + leaf action { + type action-type; + mandatory true; + description + "The access control action associated with the + rule. If a rule has been determined to match a + particular request, then this object is used + to determine whether to permit or deny the + request."; + } + + leaf comment { + type string; + description + "A textual description of the access rule."; + } + } + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-yang-types@2013-07-15.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-yang-types@2013-07-15.yang new file mode 100644 index 0000000000000000000000000000000000000000..956562a7b342055127961732d8bde4be21c80d7d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf-yang-types@2013-07-15.yang @@ -0,0 +1,475 @@ + module ietf-yang-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types"; + prefix "yang"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: David Kessens + + + WG Chair: Juergen Schoenwaelder + + + Editor: Juergen Schoenwaelder + "; + + description + "This module contains a collection of generally useful derived + YANG data types. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - yang-identifier + - hex-string + - uuid + - dotted-quad"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of counter and gauge types ***/ + + typedef counter32 { + type uint32; + description + "The counter32 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter32 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter32 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter32. + + In the value set and its semantics, this type is equivalent + to the Counter32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter32 { + type yang:counter32; + default "0"; + description + "The zero-based-counter32 type represents a counter32 + that has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter32 textual convention of the SMIv2."; + reference + "RFC 4502: Remote Network Monitoring Management Information + Base Version 2"; + } + + typedef counter64 { + type uint64; + description + "The counter64 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter64 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter64 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter64. + + In the value set and its semantics, this type is equivalent + to the Counter64 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter64 { + type yang:counter64; + default "0"; + description + "The zero-based-counter64 type represents a counter64 that + has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter64 textual convention of the SMIv2."; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef gauge32 { + type uint32; + description + "The gauge32 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^32-1 (4294967295 decimal), and + the minimum value cannot be smaller than 0. The value of + a gauge32 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge32 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the Gauge32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef gauge64 { + type uint64; + description + "The gauge64 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^64-1 (18446744073709551615), and + the minimum value cannot be smaller than 0. The value of + a gauge64 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge64 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the CounterBasedGauge64 SMIv2 textual convention defined + in RFC 2856"; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + /*** collection of identifier-related types ***/ + + typedef object-identifier { + type string { + pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))' + + '(\.(0|([1-9]\d*)))*'; + } + description + "The object-identifier type represents administratively + assigned names in a registration-hierarchical-name tree. + + Values of this type are denoted as a sequence of numerical + non-negative sub-identifier values. Each sub-identifier + value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers + are separated by single dots and without any intermediate + whitespace. + + The ASN.1 standard restricts the value space of the first + sub-identifier to 0, 1, or 2. Furthermore, the value space + of the second sub-identifier is restricted to the range + 0 to 39 if the first sub-identifier is 0 or 1. Finally, + the ASN.1 standard requires that an object identifier + has always at least two sub-identifiers. The pattern + captures these restrictions. + + Although the number of sub-identifiers is not limited, + module designers should realize that there may be + implementations that stick with the SMIv2 limit of 128 + sub-identifiers. + + This type is a superset of the SMIv2 OBJECT IDENTIFIER type + since it is not restricted to 128 sub-identifiers. Hence, + this type SHOULD NOT be used to represent the SMIv2 OBJECT + IDENTIFIER type; the object-identifier-128 type SHOULD be + used instead."; + reference + "ISO9834-1: Information technology -- Open Systems + Interconnection -- Procedures for the operation of OSI + Registration Authorities: General procedures and top + arcs of the ASN.1 Object Identifier tree"; + } + + typedef object-identifier-128 { + type object-identifier { + pattern '\d*(\.\d*){1,127}'; + } + description + "This type represents object-identifiers restricted to 128 + sub-identifiers. + + In the value set and its semantics, this type is equivalent + to the OBJECT IDENTIFIER type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef yang-identifier { + type string { + length "1..max"; + pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*'; + pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*'; + } + description + "A YANG identifier string as defined by the 'identifier' + rule in Section 12 of RFC 6020. An identifier must + start with an alphabetic character or an underscore + followed by an arbitrary sequence of alphabetic or + numeric characters, underscores, hyphens, or dots. + + A YANG identifier MUST NOT start with any possible + combination of the lowercase or uppercase character + sequence 'xml'."; + reference + "RFC 6020: YANG - A Data Modeling Language for the Network + Configuration Protocol (NETCONF)"; + } + + /*** collection of types related to date and time***/ + + typedef date-and-time { + type string { + pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?' + + '(Z|[\+\-]\d{2}:\d{2})'; + } + description + "The date-and-time type is a profile of the ISO 8601 + standard for representation of dates and times using the + Gregorian calendar. The profile is defined by the + date-time production in Section 5.6 of RFC 3339. + + The date-and-time type is compatible with the dateTime XML + schema type with the following notable exceptions: + + (a) The date-and-time type does not allow negative years. + + (b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z + all represent the same time zone in dateTime. + + (c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using + the time-offset 'Z'. + + This type is not equivalent to the DateAndTime textual + convention of the SMIv2 since RFC 3339 uses a different + separator between full-date and full-time and provides + higher resolution of time-secfrac. + + The canonical format for date-and-time values with a known time + zone uses a numeric time zone offset that is calculated using + the device's configured known offset to UTC time. A change of + the device's offset to UTC time will cause date-and-time values + to change accordingly. Such changes might happen periodically + in case a server follows automatically daylight saving time + (DST) time zone offset changes. The canonical format for + date-and-time values with an unknown time zone (usually + referring to the notion of local time) uses the time-offset + -00:00."; + reference + "RFC 3339: Date and Time on the Internet: Timestamps + RFC 2579: Textual Conventions for SMIv2 + XSD-TYPES: XML Schema Part 2: Datatypes Second Edition"; + } + + typedef timeticks { + type uint32; + description + "The timeticks type represents a non-negative integer that + represents the time, modulo 2^32 (4294967296 decimal), in + hundredths of a second between two epochs. When a schema + node is defined that uses this type, the description of + the schema node identifies both of the reference epochs. + + In the value set and its semantics, this type is equivalent + to the TimeTicks type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef timestamp { + type yang:timeticks; + description + "The timestamp type represents the value of an associated + timeticks schema node at which a specific occurrence + happened. The specific occurrence must be defined in the + description of any schema node defined using this type. When + the specific occurrence occurred prior to the last time the + associated timeticks attribute was zero, then the timestamp + value is zero. Note that this requires all timestamp values + to be reset to zero when the value of the associated timeticks + attribute reaches 497+ days and wraps around to zero. + + The associated timeticks schema node must be specified + in the description of any schema node using this type. + + In the value set and its semantics, this type is equivalent + to the TimeStamp textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of generic address types ***/ + + typedef phys-address { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + + description + "Represents media- or physical-level addresses represented + as a sequence octets, each octet represented by two hexadecimal + numbers. Octets are separated by colons. The canonical + representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the PhysAddress textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef mac-address { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; + } + description + "The mac-address type represents an IEEE 802 MAC address. + The canonical representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the MacAddress textual convention of the SMIv2."; + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of XML-specific types ***/ + + typedef xpath1.0 { + type string; + description + "This type represents an XPATH 1.0 expression. + + When a schema node is defined that uses this type, the + description of the schema node MUST specify the XPath + context in which the XPath expression is evaluated."; + reference + "XPATH: XML Path Language (XPath) Version 1.0"; + } + + /*** collection of string types ***/ + + typedef hex-string { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + + description + "A hexadecimal string with octets represented as hex digits + separated by colons. The canonical representation uses + lowercase characters."; + } + + typedef uuid { + type string { + pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'; + } + description + "A Universally Unique IDentifier in the string representation + defined in RFC 4122. The canonical representation uses + lowercase characters. + + The following is an example of a UUID in string representation: + f81d4fae-7dec-11d0-a765-00a0c91e6bf6 + "; + reference + "RFC 4122: A Universally Unique IDentifier (UUID) URN + Namespace"; + } + + typedef dotted-quad { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; + } + description + "An unsigned 32-bit number expressed in the dotted-quad + notation, i.e., four octets written as decimal numbers + and separated with the '.' (full stop) character."; + } + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf_l3vpn_tree.txt b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf_l3vpn_tree.txt new file mode 100644 index 0000000000000000000000000000000000000000..e811c7c1b1a25214926341dc0205ee9f1b150c63 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/ietf_l3vpn_tree.txt @@ -0,0 +1,413 @@ +module: ietf-l3vpn-svc + +--rw l3vpn-svc + +--rw vpn-profiles + | +--rw valid-provider-identifiers + | +--rw cloud-identifier* [id] {cloud-access}? + | | +--rw id string + | +--rw encryption-profile-identifier* [id] + | | +--rw id string + | +--rw qos-profile-identifier* [id] + | | +--rw id string + | +--rw bfd-profile-identifier* [id] + | +--rw id string + +--rw vpn-services + | +--rw vpn-service* [vpn-id] + | +--rw vpn-id svc-id + | +--rw customer-name? string + | +--rw vpn-service-topology? identityref + | +--rw cloud-accesses {cloud-access}? + | | +--rw cloud-access* [cloud-identifier] + | | +--rw cloud-identifier -> /l3vpn-svc/vpn-profiles/valid-provider-identifiers/cloud-identifier/id + | | +--rw (list-flavor)? + | | | +--:(permit-any) + | | | | +--rw permit-any? empty + | | | +--:(deny-any-except) + | | | | +--rw permit-site* -> /l3vpn-svc/sites/site/site-id + | | | +--:(permit-any-except) + | | | +--rw deny-site* -> /l3vpn-svc/sites/site/site-id + | | +--rw address-translation + | | +--rw nat44 + | | +--rw enabled? boolean + | | +--rw nat44-customer-address? inet:ipv4-address + | +--rw multicast {multicast}? + | | +--rw enabled? boolean + | | +--rw customer-tree-flavors + | | | +--rw tree-flavor* identityref + | | +--rw rp + | | +--rw rp-group-mappings + | | | +--rw rp-group-mapping* [id] + | | | +--rw id uint16 + | | | +--rw provider-managed + | | | | +--rw enabled? boolean + | | | | +--rw rp-redundancy? boolean + | | | | +--rw optimal-traffic-delivery? boolean + | | | +--rw rp-address inet:ip-address + | | | +--rw groups + | | | +--rw group* [id] + | | | +--rw id uint16 + | | | +--rw (group-format) + | | | +--:(singleaddress) + | | | | +--rw group-address? inet:ip-address + | | | +--:(startend) + | | | +--rw group-start? inet:ip-address + | | | +--rw group-end? inet:ip-address + | | +--rw rp-discovery + | | +--rw rp-discovery-type? identityref + | | +--rw bsr-candidates + | | +--rw bsr-candidate-address* inet:ip-address + | +--rw carrierscarrier? boolean {carrierscarrier}? + | +--rw extranet-vpns {extranet-vpn}? + | +--rw extranet-vpn* [vpn-id] + | +--rw vpn-id svc-id + | +--rw local-sites-role? identityref + +--rw sites + +--rw site* [site-id] + +--rw site-id svc-id + +--rw requested-site-start? yang:date-and-time + +--rw requested-site-stop? yang:date-and-time + +--rw locations + | +--rw location* [location-id] + | +--rw location-id svc-id + | +--rw address? string + | +--rw postal-code? string + | +--rw state? string + | +--rw city? string + | +--rw country-code? string + +--rw devices + | +--rw device* [device-id] + | +--rw device-id svc-id + | +--rw location -> ../../../locations/location/location-id + | +--rw management + | +--rw address-family? address-family + | +--rw address inet:ip-address + +--rw site-diversity {site-diversity}? + | +--rw groups + | +--rw group* [group-id] + | +--rw group-id string + +--rw management + | +--rw type identityref + +--rw vpn-policies + | +--rw vpn-policy* [vpn-policy-id] + | +--rw vpn-policy-id svc-id + | +--rw entries* [id] + | +--rw id svc-id + | +--rw filters + | | +--rw filter* [type] + | | +--rw type identityref + | | +--rw lan-tag* string {lan-tag}? + | | +--rw ipv4-lan-prefix* inet:ipv4-prefix {ipv4}? + | | +--rw ipv6-lan-prefix* inet:ipv6-prefix {ipv6}? + | +--rw vpn* [vpn-id] + | +--rw vpn-id -> /l3vpn-svc/vpn-services/vpn-service/vpn-id + | +--rw site-role? identityref + +--rw site-vpn-flavor? identityref + +--rw maximum-routes + | +--rw address-family* [af] + | +--rw af address-family + | +--rw maximum-routes? uint32 + +--rw security + | +--rw authentication + | +--rw encryption {encryption}? + | +--rw enabled? boolean + | +--rw layer? enumeration + | +--rw encryption-profile + | +--rw (profile)? + | +--:(provider-profile) + | | +--rw profile-name? -> /l3vpn-svc/vpn-profiles/valid-provider-identifiers/encryption-profile-identifier/id + | +--:(customer-profile) + | +--rw algorithm? string + | +--rw (key-type)? + | +--:(psk) + | +--rw preshared-key? string + +--rw service + | +--rw qos {qos}? + | | +--rw qos-classification-policy + | | | +--rw rule* [id] + | | | +--rw id string + | | | +--rw (match-type)? + | | | | +--:(match-flow) + | | | | | +--rw match-flow + | | | | | +--rw dscp? inet:dscp + | | | | | +--rw dot1p? uint8 + | | | | | +--rw ipv4-src-prefix? inet:ipv4-prefix + | | | | | +--rw ipv6-src-prefix? inet:ipv6-prefix + | | | | | +--rw ipv4-dst-prefix? inet:ipv4-prefix + | | | | | +--rw ipv6-dst-prefix? inet:ipv6-prefix + | | | | | +--rw l4-src-port? inet:port-number + | | | | | +--rw target-sites* svc-id {target-sites}? + | | | | | +--rw l4-src-port-range + | | | | | | +--rw lower-port? inet:port-number + | | | | | | +--rw upper-port? inet:port-number + | | | | | +--rw l4-dst-port? inet:port-number + | | | | | +--rw l4-dst-port-range + | | | | | | +--rw lower-port? inet:port-number + | | | | | | +--rw upper-port? inet:port-number + | | | | | +--rw protocol-field? union + | | | | +--:(match-application) + | | | | +--rw match-application? identityref + | | | +--rw target-class-id? string + | | +--rw qos-profile + | | +--rw (qos-profile)? + | | +--:(standard) + | | | +--rw profile? -> /l3vpn-svc/vpn-profiles/valid-provider-identifiers/qos-profile-identifier/id + | | +--:(custom) + | | +--rw classes {qos-custom}? + | | +--rw class* [class-id] + | | +--rw class-id string + | | +--rw direction? identityref + | | +--rw rate-limit? decimal64 + | | +--rw latency + | | | +--rw (flavor)? + | | | +--:(lowest) + | | | | +--rw use-lowest-latency? empty + | | | +--:(boundary) + | | | +--rw latency-boundary? uint16 + | | +--rw jitter + | | | +--rw (flavor)? + | | | +--:(lowest) + | | | | +--rw use-lowest-jitter? empty + | | | +--:(boundary) + | | | +--rw latency-boundary? uint32 + | | +--rw bandwidth + | | +--rw guaranteed-bw-percent decimal64 + | | +--rw end-to-end? empty + | +--rw carrierscarrier {carrierscarrier}? + | | +--rw signalling-type? enumeration + | +--rw multicast {multicast}? + | +--rw multicast-site-type? enumeration + | +--rw multicast-address-family + | | +--rw ipv4? boolean {ipv4}? + | | +--rw ipv6? boolean {ipv6}? + | +--rw protocol-type? enumeration + +--rw traffic-protection {fast-reroute}? + | +--rw enabled? boolean + +--rw routing-protocols + | +--rw routing-protocol* [type] + | +--rw type identityref + | +--rw ospf {rtg-ospf}? + | | +--rw address-family* address-family + | | +--rw area-address yang:dotted-quad + | | +--rw metric? uint16 + | | +--rw sham-links {rtg-ospf-sham-link}? + | | +--rw sham-link* [target-site] + | | +--rw target-site svc-id + | | +--rw metric? uint16 + | +--rw bgp {rtg-bgp}? + | | +--rw autonomous-system uint32 + | | +--rw address-family* address-family + | +--rw static + | | +--rw cascaded-lan-prefixes + | | +--rw ipv4-lan-prefixes* [lan next-hop] {ipv4}? + | | | +--rw lan inet:ipv4-prefix + | | | +--rw next-hop inet:ipv4-address + | | | +--rw lan-tag? string + | | +--rw ipv6-lan-prefixes* [lan next-hop] {ipv6}? + | | +--rw lan inet:ipv6-prefix + | | +--rw next-hop inet:ipv6-address + | | +--rw lan-tag? string + | +--rw rip {rtg-rip}? + | | +--rw address-family* address-family + | +--rw vrrp {rtg-vrrp}? + | +--rw address-family* address-family + +--ro actual-site-start? yang:date-and-time + +--ro actual-site-stop? yang:date-and-time + +--rw site-network-accesses + +--rw site-network-access* [site-network-access-id] + +--rw site-network-access-id svc-id + +--rw site-network-access-type? identityref + +--rw (location-flavor) + | +--:(location) + | | +--rw location-reference? -> ../../../locations/location/location-id + | +--:(device) + | +--rw device-reference? -> ../../../devices/device/device-id + +--rw access-diversity {site-diversity}? + | +--rw groups + | | +--rw group* [group-id] + | | +--rw group-id string + | +--rw constraints + | +--rw constraint* [constraint-type] + | +--rw constraint-type identityref + | +--rw target + | +--rw (target-flavor)? + | +--:(id) + | | +--rw group* [group-id] + | | +--rw group-id string + | +--:(all-accesses) + | | +--rw all-other-accesses? empty + | +--:(all-groups) + | +--rw all-other-groups? empty + +--rw bearer + | +--rw requested-type {requested-type}? + | | +--rw requested-type? string + | | +--rw strict? boolean + | +--rw always-on? boolean {always-on}? + | +--rw bearer-reference? string {bearer-reference}? + +--rw ip-connection + | +--rw ipv4 {ipv4}? + | | +--rw address-allocation-type? identityref + | | +--rw provider-dhcp + | | | +--rw provider-address? inet:ipv4-address + | | | +--rw prefix-length? uint8 + | | | +--rw (address-assign)? + | | | +--:(number) + | | | | +--rw number-of-dynamic-address? uint16 + | | | +--:(explicit) + | | | +--rw customer-addresses + | | | +--rw address-group* [group-id] + | | | +--rw group-id string + | | | +--rw start-address? inet:ipv4-address + | | | +--rw end-address? inet:ipv4-address + | | +--rw dhcp-relay + | | | +--rw provider-address? inet:ipv4-address + | | | +--rw prefix-length? uint8 + | | | +--rw customer-dhcp-servers + | | | +--rw server-ip-address* inet:ipv4-address + | | +--rw addresses + | | +--rw provider-address? inet:ipv4-address + | | +--rw customer-address? inet:ipv4-address + | | +--rw prefix-length? uint8 + | +--rw ipv6 {ipv6}? + | | +--rw address-allocation-type? identityref + | | +--rw provider-dhcp + | | | +--rw provider-address? inet:ipv6-address + | | | +--rw prefix-length? uint8 + | | | +--rw (address-assign)? + | | | +--:(number) + | | | | +--rw number-of-dynamic-address? uint16 + | | | +--:(explicit) + | | | +--rw customer-addresses + | | | +--rw address-group* [group-id] + | | | +--rw group-id string + | | | +--rw start-address? inet:ipv6-address + | | | +--rw end-address? inet:ipv6-address + | | +--rw dhcp-relay + | | | +--rw provider-address? inet:ipv6-address + | | | +--rw prefix-length? uint8 + | | | +--rw customer-dhcp-servers + | | | +--rw server-ip-address* inet:ipv6-address + | | +--rw addresses + | | +--rw provider-address? inet:ipv6-address + | | +--rw customer-address? inet:ipv6-address + | | +--rw prefix-length? uint8 + | +--rw oam + | +--rw bfd {bfd}? + | +--rw enabled? boolean + | +--rw (holdtime)? + | +--:(fixed) + | | +--rw fixed-value? uint32 + | +--:(profile) + | +--rw profile-name? -> /l3vpn-svc/vpn-profiles/valid-provider-identifiers/bfd-profile-identifier/id + +--rw security + | +--rw authentication + | +--rw encryption {encryption}? + | +--rw enabled? boolean + | +--rw layer? enumeration + | +--rw encryption-profile + | +--rw (profile)? + | +--:(provider-profile) + | | +--rw profile-name? -> /l3vpn-svc/vpn-profiles/valid-provider-identifiers/encryption-profile-identifier/id + | +--:(customer-profile) + | +--rw algorithm? string + | +--rw (key-type)? + | +--:(psk) + | +--rw preshared-key? string + +--rw service + | +--rw svc-input-bandwidth uint64 + | +--rw svc-output-bandwidth uint64 + | +--rw svc-mtu uint16 + | +--rw qos {qos}? + | | +--rw qos-classification-policy + | | | +--rw rule* [id] + | | | +--rw id string + | | | +--rw (match-type)? + | | | | +--:(match-flow) + | | | | | +--rw match-flow + | | | | | +--rw dscp? inet:dscp + | | | | | +--rw dot1p? uint8 + | | | | | +--rw ipv4-src-prefix? inet:ipv4-prefix + | | | | | +--rw ipv6-src-prefix? inet:ipv6-prefix + | | | | | +--rw ipv4-dst-prefix? inet:ipv4-prefix + | | | | | +--rw ipv6-dst-prefix? inet:ipv6-prefix + | | | | | +--rw l4-src-port? inet:port-number + | | | | | +--rw target-sites* svc-id {target-sites}? + | | | | | +--rw l4-src-port-range + | | | | | | +--rw lower-port? inet:port-number + | | | | | | +--rw upper-port? inet:port-number + | | | | | +--rw l4-dst-port? inet:port-number + | | | | | +--rw l4-dst-port-range + | | | | | | +--rw lower-port? inet:port-number + | | | | | | +--rw upper-port? inet:port-number + | | | | | +--rw protocol-field? union + | | | | +--:(match-application) + | | | | +--rw match-application? identityref + | | | +--rw target-class-id? string + | | +--rw qos-profile + | | +--rw (qos-profile)? + | | +--:(standard) + | | | +--rw profile? -> /l3vpn-svc/vpn-profiles/valid-provider-identifiers/qos-profile-identifier/id + | | +--:(custom) + | | +--rw classes {qos-custom}? + | | +--rw class* [class-id] + | | +--rw class-id string + | | +--rw direction? identityref + | | +--rw rate-limit? decimal64 + | | +--rw latency + | | | +--rw (flavor)? + | | | +--:(lowest) + | | | | +--rw use-lowest-latency? empty + | | | +--:(boundary) + | | | +--rw latency-boundary? uint16 + | | +--rw jitter + | | | +--rw (flavor)? + | | | +--:(lowest) + | | | | +--rw use-lowest-jitter? empty + | | | +--:(boundary) + | | | +--rw latency-boundary? uint32 + | | +--rw bandwidth + | | +--rw guaranteed-bw-percent decimal64 + | | +--rw end-to-end? empty + | +--rw carrierscarrier {carrierscarrier}? + | | +--rw signalling-type? enumeration + | +--rw multicast {multicast}? + | +--rw multicast-site-type? enumeration + | +--rw multicast-address-family + | | +--rw ipv4? boolean {ipv4}? + | | +--rw ipv6? boolean {ipv6}? + | +--rw protocol-type? enumeration + +--rw routing-protocols + | +--rw routing-protocol* [type] + | +--rw type identityref + | +--rw ospf {rtg-ospf}? + | | +--rw address-family* address-family + | | +--rw area-address yang:dotted-quad + | | +--rw metric? uint16 + | | +--rw sham-links {rtg-ospf-sham-link}? + | | +--rw sham-link* [target-site] + | | +--rw target-site svc-id + | | +--rw metric? uint16 + | +--rw bgp {rtg-bgp}? + | | +--rw autonomous-system uint32 + | | +--rw address-family* address-family + | +--rw static + | | +--rw cascaded-lan-prefixes + | | +--rw ipv4-lan-prefixes* [lan next-hop] {ipv4}? + | | | +--rw lan inet:ipv4-prefix + | | | +--rw next-hop inet:ipv4-address + | | | +--rw lan-tag? string + | | +--rw ipv6-lan-prefixes* [lan next-hop] {ipv6}? + | | +--rw lan inet:ipv6-prefix + | | +--rw next-hop inet:ipv6-address + | | +--rw lan-tag? string + | +--rw rip {rtg-rip}? + | | +--rw address-family* address-family + | +--rw vrrp {rtg-vrrp}? + | +--rw address-family* address-family + +--rw availability + | +--rw access-priority? uint32 + +--rw vpn-attachment + +--rw (attachment-flavor) + +--:(vpn-policy-id) + | +--rw vpn-policy-id? -> ../../../../vpn-policies/vpn-policy/vpn-policy-id + +--:(vpn-id) + +--rw vpn-id? -> /l3vpn-svc/vpn-services/vpn-service/vpn-id + +--rw site-role? identityref diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeLink.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeLink.py new file mode 100644 index 0000000000000000000000000000000000000000..8fec8798a508ba198c27fc355545ff2eba0be5e3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeLink.py @@ -0,0 +1,53 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from common.proto.context_pb2 import Link +from .bindings.networks.network.link import link +from .NameMapping import NameMappings +from .NetworkTypeEnum import NetworkTypeEnum + +def compose_link( + ietf_link_obj : link, link_specs : Link, name_mappings : NameMappings, network_type : NetworkTypeEnum +) -> None: + src_endpoint_id = link_specs.link_endpoint_ids[0] + ietf_link_obj.source.source_node = name_mappings.get_device_name(src_endpoint_id.device_id) + ietf_link_obj.source.source_tp = name_mappings.get_endpoint_name(src_endpoint_id) + + dst_endpoint_id = link_specs.link_endpoint_ids[-1] + ietf_link_obj.destination.dest_node = name_mappings.get_device_name(dst_endpoint_id.device_id) + ietf_link_obj.destination.dest_tp = name_mappings.get_endpoint_name(dst_endpoint_id) + + ietf_link_obj.te._set_oper_status('up') + + te_link_attrs = ietf_link_obj.te.te_link_attributes + te_link_attrs.access_type = 'point-to-point' + te_link_attrs.admin_status = 'up' + te_link_attrs.name = link_specs.name + + if network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: + link_total_cap_kbps = link_specs.attributes.total_capacity_gbps * 1e6 + link_used_cap_kbps = link_specs.attributes.used_capacity_gbps * 1e6 + link_avail_cap_kbps = link_total_cap_kbps - link_used_cap_kbps + + te_link_attrs.max_link_bandwidth.te_bandwidth.eth_bandwidth = link_total_cap_kbps + unresv_bw = te_link_attrs.unreserved_bandwidth.add(7) + unresv_bw.te_bandwidth.eth_bandwidth = link_avail_cap_kbps + elif network_type == NetworkTypeEnum.TE_OTN_TOPOLOGY: + te_link_attrs.te_delay_metric = 1 + oduitem = te_link_attrs.max_link_bandwidth.te_bandwidth.otn.odulist.add('ietf-layer1-types:ODU0') + oduitem.ts_number = 80 + + unresv_bw = te_link_attrs.unreserved_bandwidth.add(7) + oduitem = unresv_bw.te_bandwidth.otn.odulist.add('ietf-layer1-types:ODU0') + oduitem.ts_number = 80 diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNetwork.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNetwork.py new file mode 100644 index 0000000000000000000000000000000000000000..9efbce8759142b594929156bbc29c1c13e095ee5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNetwork.py @@ -0,0 +1,115 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, re +from common.DeviceTypes import DeviceTypeEnum +from common.proto.context_pb2 import TopologyDetails +from .bindings.networks.network import network +from .ComposeLink import compose_link +from .ComposeNode import compose_node +from .NameMapping import NameMappings +from .NetworkTypeEnum import NetworkTypeEnum, get_network_topology_type + +LOGGER = logging.getLogger(__name__) + +IGNORE_DEVICE_TYPES = { + DeviceTypeEnum.CLIENT.value, + DeviceTypeEnum.DATACENTER.value, + DeviceTypeEnum.EMULATED_CLIENT.value, + DeviceTypeEnum.EMULATED_DATACENTER.value, + DeviceTypeEnum.EMULATED_IP_SDN_CONTROLLER, + DeviceTypeEnum.EMULATED_MICROWAVE_RADIO_SYSTEM.value, + DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM.value, + DeviceTypeEnum.EMULATED_XR_CONSTELLATION.value, + DeviceTypeEnum.IP_SDN_CONTROLLER, + DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM.value, + DeviceTypeEnum.NETWORK.value, + DeviceTypeEnum.OPEN_LINE_SYSTEM.value, + DeviceTypeEnum.XR_CONSTELLATION.value, +} + +IGNORE_DEVICE_NAMES = { + NetworkTypeEnum.TE_OTN_TOPOLOGY: { + 'nce-t', '128.32.10.1', '128.32.33.5', '128.32.20.5', '128.32.20.1', '128.32.10.5', + }, + NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: { + 'nce-t', + }, +} + +TE_TOPOLOGY_NAME = 'Huawei-Network' + +def compose_network(ietf_network_obj : network, te_topology_name : str, topology_details : TopologyDetails) -> None: + ietf_network_obj.te.name = TE_TOPOLOGY_NAME + + #te_topology_name = topology_details.name + match = re.match(r'providerId\-([^\-]*)-clientId-([^\-]*)-topologyId-([^\-]*)', te_topology_name) + if match is not None: + provider_id, client_id, topology_id = match.groups() + ietf_network_obj.te_topology_identifier.provider_id = int(provider_id) + ietf_network_obj.te_topology_identifier.client_id = int(client_id) + ietf_network_obj.te_topology_identifier.topology_id = str(topology_id) + else: + ietf_network_obj.te_topology_identifier.provider_id = 10 + ietf_network_obj.te_topology_identifier.client_id = 0 + ietf_network_obj.te_topology_identifier.topology_id = '0' + + ietf_network_obj.network_types.te_topology._set_present() + # TODO: resolve setting of otn_topology/eth_tran_topology network type; not working in bindings. + # See "../ManualFixes.py". + topology_id = ietf_network_obj.te_topology_identifier.topology_id + topology_id = { + '1': NetworkTypeEnum.TE_OTN_TOPOLOGY.value, + '2': NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY.value, + }.get(topology_id, topology_id) + network_type = get_network_topology_type(topology_id) + if network_type == NetworkTypeEnum.TE_OTN_TOPOLOGY: + #ietf_network_obj.network_types.te_topology.otn_topology._set_present() + pass + elif network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: + #ietf_network_obj.network_types.te_topology.eth_tran_topology._set_present() + pass + else: + raise Exception('Unsupported TopologyId({:s})'.format(str(topology_id))) + + name_mappings = NameMappings() + + ignore_device_uuids = set() + + for device in topology_details.devices: + device_uuid = device.device_id.device_uuid.uuid + + device_type = device.device_type + if device_type in IGNORE_DEVICE_TYPES: + ignore_device_uuids.add(device_uuid) + continue + + device_name = device.name + if device_name in IGNORE_DEVICE_NAMES.get(network_type, set()): + ignore_device_uuids.add(device_uuid) + continue + + ietf_node_obj = ietf_network_obj.node.add(device_name) + compose_node(ietf_node_obj, device, name_mappings, network_type) + + for link in topology_details.links: + link_device_uuids = { + endpoint_id.device_id.device_uuid.uuid + for endpoint_id in link.link_endpoint_ids + } + if len(ignore_device_uuids.intersection(link_device_uuids)) > 0: + continue + link_name = link.name + ietf_link_obj = ietf_network_obj.link.add(link_name) + compose_link(ietf_link_obj, link, name_mappings, network_type) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNode.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNode.py new file mode 100644 index 0000000000000000000000000000000000000000..e2c690cd322e9da8b57d78be45d64e9505e9d33d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNode.py @@ -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. + +import logging +from common.proto.context_pb2 import Device +from .bindings.networks.network.node import node +from .ComposeTermPoint import compose_term_point +from .NameMapping import NameMappings +from .NetworkTypeEnum import NetworkTypeEnum + +LOGGER = logging.getLogger(__name__) + +MAPPINGS_TE_NODE_NAME = { + '10.0.10.1' : 'OA', + '10.0.20.1' : 'P', + '10.0.30.1' : 'OE', + '10.0.40.1' : 'P', + + '128.32.10.1': 'ONT1', + '128.32.20.1': 'ONT2', + '128.32.33.5': 'OLT', +} + +IGNORE_ENDPOINT_NAMES = {'mgmt', 'eth1'} + +def compose_node( + ietf_node_obj : node, device : Device, name_mappings : NameMappings, network_type : NetworkTypeEnum +) -> None: + device_name = device.name + + name_mappings.store_device_name(device) + + ietf_node_obj.te_node_id = device_name + + ietf_node_obj.te._set_oper_status('up') + ietf_node_obj.te.te_node_attributes.admin_status = 'up' + ietf_node_obj.te.te_node_attributes.name = MAPPINGS_TE_NODE_NAME.get(device_name, device_name) + + for endpoint in device.device_endpoints: + endpoint_name = endpoint.name + if endpoint_name in IGNORE_ENDPOINT_NAMES: continue + if network_type == NetworkTypeEnum.TE_OTN_TOPOLOGY and endpoint.endpoint_type != 'optical': continue + + ietf_tp_obj = ietf_node_obj.termination_point.add(endpoint_name) + compose_term_point(ietf_tp_obj, device, endpoint, name_mappings, network_type) + + if network_type == NetworkTypeEnum.TE_OTN_TOPOLOGY: + if device_name in {'10.0.30.1', '10.0.40.1'}: + ntaw = ietf_node_obj.te.tunnel_termination_point.add('NTAw') + ntaw.admin_status = 'up' + ntaw.encoding = 'ietf-te-types:lsp-encoding-oduk' + ntaw_llc = ntaw.local_link_connectivities.local_link_connectivity.add('500') + ntaw_llc.is_allowed = True + ntaw.name = '1-1-1-1-1' + ntaw._set_oper_status('up') + ntaw.protection_type = 'ietf-te-types:lsp-protection-unprotected' + ntaw.switching_capability = 'ietf-te-types:switching-otn' + + ntax = ietf_node_obj.te.tunnel_termination_point.add('NTAx') + ntax.admin_status = 'up' + ntax.encoding = 'ietf-te-types:lsp-encoding-oduk' + ntax_llc = ntax.local_link_connectivities.local_link_connectivity.add('501') + ntax_llc.is_allowed = True + ntax.name = '1-1-1-1-1' + ntax._set_oper_status('up') + ntax.protection_type = 'ietf-te-types:lsp-protection-unprotected' + ntax.switching_capability = 'ietf-te-types:switching-otn' + elif device_name in {'10.0.10.1', '10.0.20.1'}: + ntax = ietf_node_obj.te.tunnel_termination_point.add('NTAx') + ntax.admin_status = 'up' + ntax.encoding = 'ietf-te-types:lsp-encoding-oduk' + ntax_llc = ntax.local_link_connectivities.local_link_connectivity.add('501') + ntax_llc.is_allowed = True + ntax.name = '1-1-1-1-1' + ntax._set_oper_status('up') + ntax.protection_type = 'ietf-te-types:lsp-protection-unprotected' + ntax.switching_capability = 'ietf-te-types:switching-otn' + + ntaw = ietf_node_obj.te.tunnel_termination_point.add('NTAw') + ntaw.admin_status = 'up' + ntaw.encoding = 'ietf-te-types:lsp-encoding-oduk' + ntaw_llc = ntaw.local_link_connectivities.local_link_connectivity.add('500') + ntaw_llc.is_allowed = True + ntaw.name = '1-1-1-1-1' + ntaw._set_oper_status('up') + ntaw.protection_type = 'ietf-te-types:lsp-protection-unprotected' + ntaw.switching_capability = 'ietf-te-types:switching-otn' + elif network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: + if device_name in {'128.32.33.5'}: + connectivity_matrices = ietf_node_obj.te.te_node_attributes.connectivity_matrices + lr0 = connectivity_matrices.label_restrictions.label_restriction.add(0) + lr0.label_start.te_label.vlanid = 21 + lr0.label_end.te_label.vlanid = 21 + lr1 = connectivity_matrices.label_restrictions.label_restriction.add(1) + lr1.label_start.te_label.vlanid = 31 + lr1.label_end.te_label.vlanid = 31 diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeTermPoint.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeTermPoint.py new file mode 100644 index 0000000000000000000000000000000000000000..904742441e357cd1d257904d2a21816891effbb6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeTermPoint.py @@ -0,0 +1,102 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from common.proto.context_pb2 import Device, EndPoint +from .bindings.networks.network.node.termination_point import termination_point +from .NameMapping import NameMappings +from .NetworkTypeEnum import NetworkTypeEnum + +MAPPINGS_TE_NAME = { + (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.10.1', '200'): '1-1-1-1-1', + (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.10.1', '500'): '1-1-1-1-1', + (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.10.1', '501'): '1-1-1-1-1', + + (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.20.1', '500'): '1-1-1-1-1', + (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.20.1', '501'): '1-1-1-1-1', + + (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.30.1', '200'): '1-1-1-1-1', + (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.30.1', '500'): '1-1-1-1-1', + (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.30.1', '501'): '1-1-1-1-1', + + (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.40.1', '500'): '1-1-1-1-1', + (NetworkTypeEnum.TE_OTN_TOPOLOGY, '10.0.40.1', '501'): '1-1-1-1-1', + + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.10.1', '200'): 'endpoint:111', + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.10.1', '500'): 'endpoint:111', + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.10.1', '501'): 'endpoint:111', + + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.20.1', '500'): 'endpoint:111', + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.20.1', '501'): 'endpoint:111', + + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.30.1', '200'): 'endpoint:111', + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.30.1', '500'): 'endpoint:111', + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.30.1', '501'): 'endpoint:111', + + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.40.1', '500'): 'endpoint:111', + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.40.1', '501'): 'endpoint:111', + + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '128.32.33.5', '500') : 'endpoint:111', +} + +MAPPINGS_TE_TP_ID = { + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.10.1', '200'): '128.32.33.254', + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '10.0.30.1', '200'): '172.10.33.254', + + (NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY, '128.32.33.5', '500') : '128.32.33.2', +} + +LOGGER = logging.getLogger(__name__) + +def compose_term_point( + ietf_tp_obj : termination_point, device : Device, endpoint : EndPoint, name_mappings : NameMappings, + network_type : NetworkTypeEnum +) -> None: + name_mappings.store_endpoint_name(device, endpoint) + + device_name = device.name + endpoint_name = endpoint.name + + ietf_tp_obj.te_tp_id = MAPPINGS_TE_TP_ID.get((network_type, device_name, endpoint_name), endpoint_name) + + if (network_type, device_name, endpoint_name) in MAPPINGS_TE_NAME: + ietf_tp_obj.te._set_oper_status('up') + ietf_tp_obj.te.admin_status = 'up' + ietf_tp_obj.te.name = MAPPINGS_TE_NAME.get((network_type, device_name, endpoint_name), endpoint_name) + + if network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: + if (network_type, device_name, endpoint_name) in MAPPINGS_TE_NAME: + ietf_if_sw_cap = ietf_tp_obj.te.interface_switching_capability.add( + 'ietf-te-types:switching-l2sc ietf-te-types:lsp-encoding-ethernet' + ) + ietf_max_lsp_bw = ietf_if_sw_cap.max_lsp_bandwidth.add('7') + ietf_max_lsp_bw.te_bandwidth.eth_bandwidth = 10_000_000 # Kbps + + #ietf_tp_obj.eth_svc.client_facing = True + + ietf_tp_obj.eth_svc.supported_classification.port_classification = True + outer_tag = ietf_tp_obj.eth_svc.supported_classification.vlan_classification.outer_tag + outer_tag.supported_tag_types.append('ietf-eth-tran-types:classify-c-vlan') + outer_tag.supported_tag_types.append('ietf-eth-tran-types:classify-s-vlan') + outer_tag.vlan_bundling = False + outer_tag.vlan_range = '1-4094' + + elif network_type == NetworkTypeEnum.TE_OTN_TOPOLOGY: + #ietf_tp_obj.te.client_svc.client_facing = False + + ietf_if_sw_cap = ietf_tp_obj.te.interface_switching_capability.add( + 'ietf-te-types:switching-otn ietf-te-types:lsp-encoding-oduk' + ) + ietf_max_lsp_bw = ietf_if_sw_cap.max_lsp_bandwidth.add('7') + ietf_max_lsp_bw.te_bandwidth.otn.odu_type = 'ietf-layer1-types:ODU4' diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ManualFixes.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ManualFixes.py new file mode 100644 index 0000000000000000000000000000000000000000..d0c378aad451533bf11e297f393dfa901d696d8e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ManualFixes.py @@ -0,0 +1,73 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 Dict + +from .NetworkTypeEnum import NetworkTypeEnum + +def manual_fixes(json_response : Dict) -> None: + # TODO: workaround to set network types manually. Currently does not work; refine bindings. + # Seems limitation of pyangbind using multiple augmentations and nested empty containers. + for json_network in json_response['ietf-network:networks']['network']: + net_te_topo_id = json_network.get('ietf-te-topology:te-topology-identifier', {}).get('topology-id') + if net_te_topo_id is None: continue + net_te_topo_type = json_network['network-types']['ietf-te-topology:te-topology'] + if net_te_topo_id == '1': + network_type = NetworkTypeEnum.TE_OTN_TOPOLOGY + net_te_topo_type['ietf-otn-topology:otn-topology'] = {} + elif net_te_topo_id == '2': + network_type = NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY + net_te_topo_type['ietf-eth-te-topology:eth-tran-topology'] = {} + else: + network_type = None + + for json_node in json_network.get('node', []): + for json_tp in json_node.get('ietf-network-topology:termination-point', []): + json_tp_te = json_tp.get('ietf-te-topology:te', {}) + + if network_type == NetworkTypeEnum.TE_OTN_TOPOLOGY: + json_tp_te_cs = json_tp_te.setdefault('ietf-otn-topology:client-svc', {}) + json_tp_te_cs['client-facing'] = False + elif network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: + if 'ietf-eth-te-topology:eth-svc' in json_tp: + client_facing = json_tp['tp-id'] in {'200', '201'} + json_tp['ietf-eth-te-topology:eth-svc']['client-facing'] = client_facing + + # Fix value type of bandwidth + for json_if_sw_cap in json_tp_te.get('interface-switching-capability', []): + for json_max_lsp_bandwidth in json_if_sw_cap.get('max-lsp-bandwidth', []): + json_te_bw = json_max_lsp_bandwidth.get('te-bandwidth', {}) + if network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: + if 'ietf-eth-te-topology:eth-bandwidth' in json_te_bw: + eth_bw = json_te_bw['ietf-eth-te-topology:eth-bandwidth'] + if isinstance(eth_bw, str): + json_te_bw['ietf-eth-te-topology:eth-bandwidth'] = int(eth_bw) + + for json_link in json_network.get('ietf-network-topology:link', []): + json_link_te_attributes = json_link.get('ietf-te-topology:te', {}).get('te-link-attributes', {}) + + # Fix value type of bandwidth + json_te_bw = json_link_te_attributes.get('max-link-bandwidth', {}).get('te-bandwidth', {}) + if network_type == NetworkTypeEnum.TE_ETH_TRAN_TOPOLOGY: + if 'ietf-eth-te-topology:eth-bandwidth' in json_te_bw: + eth_bw = json_te_bw['ietf-eth-te-topology:eth-bandwidth'] + if isinstance(eth_bw, str): + json_te_bw['ietf-eth-te-topology:eth-bandwidth'] = int(eth_bw) + + for json_unresv_bandwidth in json_link_te_attributes.get('unreserved-bandwidth', []): + json_te_bw = json_unresv_bandwidth.get('te-bandwidth', {}) + if 'ietf-eth-te-topology:eth-bandwidth' in json_te_bw: + eth_bw = json_te_bw['ietf-eth-te-topology:eth-bandwidth'] + if isinstance(eth_bw, str): + json_te_bw['ietf-eth-te-topology:eth-bandwidth'] = int(eth_bw) 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 new file mode 100644 index 0000000000000000000000000000000000000000..0c10559115f4e4ba9e5b2468e36cf7f917c25f51 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/NameMapping.py @@ -0,0 +1,46 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Tuple +from common.proto.context_pb2 import Device, DeviceId, EndPoint, EndPointId + +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 + self._device_uuid_to_name[device_uuid] = device_name + self._device_uuid_to_name[device_name] = device_name + + def store_endpoint_name(self, device : Device, endpoint : EndPoint) -> None: + device_uuid = device.device_id.device_uuid.uuid + device_name = device.name + endpoint_uuid = endpoint.endpoint_id.endpoint_uuid.uuid + endpoint_name = endpoint.name + self._endpoint_uuid_to_name[(device_uuid, endpoint_uuid)] = endpoint_name + self._endpoint_uuid_to_name[(device_name, endpoint_uuid)] = endpoint_name + self._endpoint_uuid_to_name[(device_uuid, endpoint_name)] = endpoint_name + self._endpoint_uuid_to_name[(device_name, endpoint_name)] = endpoint_name + + def get_device_name(self, device_id : DeviceId) -> str: + device_uuid = device_id.device_uuid.uuid + return self._device_uuid_to_name.get(device_uuid, device_uuid) + + def get_endpoint_name(self, endpoint_id : EndPointId) -> str: + device_uuid = endpoint_id.device_id.device_uuid.uuid + endpoint_uuid = endpoint_id.endpoint_uuid.uuid + return self._endpoint_uuid_to_name.get((device_uuid, endpoint_uuid), endpoint_uuid) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/NetworkTypeEnum.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/NetworkTypeEnum.py new file mode 100644 index 0000000000000000000000000000000000000000..96fe4dff1452458479b4b04f98e12be63343e022 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/NetworkTypeEnum.py @@ -0,0 +1,23 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 enum import Enum +from typing import Optional + +class NetworkTypeEnum(Enum): + TE_OTN_TOPOLOGY = 'otn' + TE_ETH_TRAN_TOPOLOGY = 'eth-tran' + +def get_network_topology_type(topology_id : str) -> Optional[NetworkTypeEnum]: + return NetworkTypeEnum._value2member_map_.get(topology_id) 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 new file mode 100644 index 0000000000000000000000000000000000000000..5d663b8b3071856bc9cd204ee911c61b368ebe97 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/Networks.py @@ -0,0 +1,72 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import 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.tools.context_queries.Topology import get_topology_details +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 + +LOGGER = logging.getLogger(__name__) + +TE_TOPOLOGY_NAMES = [ + 'providerId-10-clientId-0-topologyId-1', + 'providerId-10-clientId-0-topologyId-2' +] + +class Networks(Resource): + @HTTP_AUTH.login_required + def get(self): + LOGGER.info('Request: {:s}'.format(str(request))) + 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() + + 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) + + # 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) + + 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)}) + response.status_code = HTTP_SERVERERROR + return response diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/README.md b/src/nbi/service/rest_server/nbi_plugins/ietf_network/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8d808a45b54efa3126c408bda97b51659b511cee --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/README.md @@ -0,0 +1,14 @@ +# IETF Network + +This NBI plugin implements a basic skeleton for the IETF Network data model. + +## DISCLAIMER +__USE WITH CARE! This plugin is NOT production ready, it contains many hardcodings based on ongoing tests.__ + +## IETF RFCs/drafts: +- RFC 8795 - YANG Data Model for Traffic Engineering (TE) Topologies (https://datatracker.ietf.org/doc/html/rfc8795) +- RFC 8776 - Common YANG Data Types for Traffic Engineering (https://datatracker.ietf.org/doc/html/rfc8776) +- RFC 8345 - A YANG Data Model for Network Topologies (https://datatracker.ietf.org/doc/html/rfc8345) +- RFC 6991 - Common YANG Data Types (https://datatracker.ietf.org/doc/html/rfc6991) +- RFC draft-ietf-ccamp-eth-client-te-topo-yang-05 - A YANG Data Model for Ethernet TE Topology (https://datatracker.ietf.org/doc/draft-ietf-ccamp-eth-client-te-topo-yang/) +- RFC draft-ietf-ccamp-client-signal-yang-10 - A YANG Data Model for Transport Network Client Signals (https://datatracker.ietf.org/doc/draft-ietf-ccamp-client-signal-yang/) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3f70c97d4ddbc273e50654182c8928807deb09e3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/__init__.py @@ -0,0 +1,44 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# RFC 8795 - YANG Data Model for Traffic Engineering (TE) Topologies +# Ref: https://datatracker.ietf.org/doc/html/rfc8795 + +# RFC 8776 - Common YANG Data Types for Traffic Engineering +# Ref: https://datatracker.ietf.org/doc/html/rfc8776 + +# RFC 8345 - A YANG Data Model for Network Topologies +# Ref: https://datatracker.ietf.org/doc/html/rfc8345 + +# RFC 6991 - Common YANG Data Types +# Ref: https://datatracker.ietf.org/doc/html/rfc6991 + +# RFC draft-ietf-ccamp-eth-client-te-topo-yang-05 - A YANG Data Model for Ethernet TE Topology +# Ref: https://datatracker.ietf.org/doc/draft-ietf-ccamp-eth-client-te-topo-yang/ + +# RFC draft-ietf-ccamp-client-signal-yang-10 - A YANG Data Model for Transport Network Client Signals +# Ref: https://datatracker.ietf.org/doc/draft-ietf-ccamp-client-signal-yang/ + +from flask_restful import Resource +from nbi.service.rest_server.RestServer import RestServer +from .Networks import Networks + +URL_PREFIX = '/restconf/data/ietf-network:networks' + +def _add_resource(rest_server : RestServer, resource : Resource, *urls, **kwargs): + urls = [(URL_PREFIX + url) for url in urls] + rest_server.add_resource(resource, *urls, **kwargs) + +def register_ietf_network(rest_server : RestServer): + _add_resource(rest_server, Networks, '/') diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/_docs/test_commands.txt b/src/nbi/service/rest_server/nbi_plugins/ietf_network/_docs/test_commands.txt new file mode 100644 index 0000000000000000000000000000000000000000..78b2dd24686b6dbecae67cf09bef38f38b97d401 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/_docs/test_commands.txt @@ -0,0 +1,26 @@ +cd ~/tfs-ctrl/src/nbi/service/rest_server/nbi_plugins/ietf_network + +python + +from bindings import ietf_network +import pyangbind.lib.pybindJSON as pybindJSON + +ietf_nets_obj = ietf_network() +ietf_net_obj = ietf_nets_obj.networks.network.add('my-topo') + +ietf_node_obj = ietf_net_obj.node.add('my-node') +ietf_tp_obj = ietf_node_obj.termination_point.add('my-tp') + +ietf_link_obj = ietf_net_obj.link.add('my-link') + +ietf_link_obj.te._set_oper_status('up') +print(pybindJSON.dumps(ietf_nets_obj, mode='ietf')) + +ietf_link_obj.te.te_link_attributes.admin_status = 'down' +print(pybindJSON.dumps(ietf_nets_obj, mode='ietf')) + + +ietf_link_obj.te.te_link_attributes.max_link_bandwidth.te_bandwidth.eth_bandwidth = 10_000_000 # Kbps +unresv_bw = ietf_link_obj.te.te_link_attributes.unreserved_bandwidth.add(7) +unresv_bw.te_bandwidth.eth_bandwidth = 10_000_000 # Kbps +print(pybindJSON.dumps(ietf_link_obj, mode='ietf')) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6df50e1a6aff3868ecb25323b33f4b48bf92901f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/__init__.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ietf_network_topology(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network-topology - based on the path /ietf-network-topology. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This module defines a common base model for a network topology, +augmenting the base network data model with links to connect +nodes, as well as termination points to terminate links +on nodes. + +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 8345; +see the RFC itself for full legal notices. + """ + _pyangbind_elements = {} + + + +from . import networks +class ietf_network(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /ietf-network. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This module defines a common base data model for a collection +of nodes in a network. Node definitions are further used +in network topologies and inventories. + +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 8345; +see the RFC itself for full legal notices. + """ + __slots__ = ('_path_helper', '_extmethods', '__networks',) + + _yang_name = 'ietf-network' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__networks = YANGDynClass(base=networks.networks, is_container='container', yang_name="networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return [] + + def _get_networks(self): + """ + Getter method for networks, mapped from YANG variable /networks (container) + + YANG Description: Serves as a top-level container for a list of networks. + """ + return self.__networks + + def _set_networks(self, v, load=False): + """ + Setter method for networks, mapped from YANG variable /networks (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_networks is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_networks() directly. + + YANG Description: Serves as a top-level container for a list of networks. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=networks.networks, is_container='container', yang_name="networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """networks must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=networks.networks, is_container='container', yang_name="networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True)""", + }) + + self.__networks = t + if hasattr(self, '_set'): + self._set() + + def _unset_networks(self): + self.__networks = YANGDynClass(base=networks.networks, is_container='container', yang_name="networks", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True) + + networks = __builtin__.property(_get_networks, _set_networks) + + + _pyangbind_elements = OrderedDict([('networks', networks), ]) + + +class ietf_te_topology(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-te-topology - based on the path /ietf-te-topology. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This YANG module defines a TE topology model for representing, +retrieving, and manipulating technology-agnostic TE topologies. + +Copyright (c) 2020 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 8795; see the +RFC itself for full legal notices. + """ + _pyangbind_elements = {} + + + +class ietf_otn_topology(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-otn-topology - based on the path /ietf-otn-topology. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This module defines a protocol independent Layer 1/ODU topology +data model. The model fully conforms +to the Network Management Datastore Architecture (NMDA). + +Copyright (c) 2023 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 Revised 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 XXXX; see +the RFC itself for full legal notices. + +The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL +NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', +'MAY', and 'OPTIONAL' in this document are to be interpreted as +described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, +they appear in all capitals, as shown here. + """ + _pyangbind_elements = {} + + + +class ietf_eth_te_topology(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-eth-te-topology - based on the path /ietf-eth-te-topology. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This module defines a YANG data model for describing +layer-2 Ethernet transport topologies. The model fully +conforms to the Network Management Datastore +Architecture (NMDA). + +Copyright (c) 2023 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 Revised 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 XXXX; see +the RFC itself for full legal notices. + +The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL +NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', +'MAY', and 'OPTIONAL' in this document are to be interpreted as +described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, +they appear in all capitals, as shown here. + """ + _pyangbind_elements = {} + + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0c52044ebfd602a81ac0b8be69eed96d15fd9261 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import network +from . import te +class networks(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Serves as a top-level container for a list of networks. + """ + __slots__ = ('_path_helper', '_extmethods', '__network','__te',) + + _yang_name = 'networks' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network = YANGDynClass(base=YANGListType("network_id",network.network, yang_name="network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-id', extensions=None), is_container='list', yang_name="network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) + self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks'] + + def _get_network(self): + """ + Getter method for network, mapped from YANG variable /networks/network (list) + + YANG Description: Describes a network. +A network typically contains an inventory of nodes, +topological information (augmented through the +network-topology data model), and layering information. + """ + return self.__network + + def _set_network(self, v, load=False): + """ + Setter method for network, mapped from YANG variable /networks/network (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_network is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network() directly. + + YANG Description: Describes a network. +A network typically contains an inventory of nodes, +topological information (augmented through the +network-topology data model), and layering information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("network_id",network.network, yang_name="network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-id', extensions=None), is_container='list', yang_name="network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("network_id",network.network, yang_name="network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-id', extensions=None), is_container='list', yang_name="network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True)""", + }) + + self.__network = t + if hasattr(self, '_set'): + self._set() + + def _unset_network(self): + self.__network = YANGDynClass(base=YANGListType("network_id",network.network, yang_name="network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-id', extensions=None), is_container='list', yang_name="network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) + + + def _get_te(self): + """ + Getter method for te, mapped from YANG variable /networks/te (container) + + YANG Description: Indicates TE support. + """ + return self.__te + + def _set_te(self, v, load=False): + """ + Setter method for te, mapped from YANG variable /networks/te (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te() directly. + + YANG Description: Indicates TE support. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te = t + if hasattr(self, '_set'): + self._set() + + def _unset_te(self): + self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + network = __builtin__.property(_get_network, _set_network) + te = __builtin__.property(_get_te, _set_te) + + + _pyangbind_elements = OrderedDict([('network', network), ('te', te), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..302af85c96e588326bdbef9c9c796da1c6998c16 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/__init__.py @@ -0,0 +1,385 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import network_types +from . import supporting_network +from . import node +from . import link +from . import te_topology_identifier +from . import te +class network(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Describes a network. +A network typically contains an inventory of nodes, +topological information (augmented through the +network-topology data model), and layering information. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_id','__network_types','__supporting_network','__node','__link','__te_topology_identifier','__te',) + + _yang_name = 'network' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='network-id', is_config=True) + self.__network_types = YANGDynClass(base=network_types.network_types, is_container='container', yang_name="network-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True) + self.__supporting_network = YANGDynClass(base=YANGListType("network_ref",supporting_network.supporting_network, yang_name="supporting-network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref', extensions=None), is_container='list', yang_name="supporting-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) + self.__node = YANGDynClass(base=YANGListType("node_id",node.node, yang_name="node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-id', extensions=None), is_container='list', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) + self.__link = YANGDynClass(base=YANGListType("link_id",link.link, yang_name="link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-id', extensions=None), is_container='list', yang_name="link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) + self.__te_topology_identifier = YANGDynClass(base=te_topology_identifier.te_topology_identifier, is_container='container', yang_name="te-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network'] + + def _get_network_id(self): + """ + Getter method for network_id, mapped from YANG variable /networks/network/network_id (network-id) + + YANG Description: Identifies a network. + """ + return self.__network_id + + def _set_network_id(self, v, load=False): + """ + Setter method for network_id, mapped from YANG variable /networks/network/network_id (network-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_id() directly. + + YANG Description: Identifies a network. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='network-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_id must be of a type compatible with network-id""", + 'defined-type': "ietf-network:network-id", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='network-id', is_config=True)""", + }) + + self.__network_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_id(self): + self.__network_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='network-id', is_config=True) + + + def _get_network_types(self): + """ + Getter method for network_types, mapped from YANG variable /networks/network/network_types (container) + + YANG Description: Serves as an augmentation target. +The network type is indicated through corresponding +presence containers augmented into this container. + """ + return self.__network_types + + def _set_network_types(self, v, load=False): + """ + Setter method for network_types, mapped from YANG variable /networks/network/network_types (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_types is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_types() directly. + + YANG Description: Serves as an augmentation target. +The network type is indicated through corresponding +presence containers augmented into this container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=network_types.network_types, is_container='container', yang_name="network-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_types must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=network_types.network_types, is_container='container', yang_name="network-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True)""", + }) + + self.__network_types = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_types(self): + self.__network_types = YANGDynClass(base=network_types.network_types, is_container='container', yang_name="network-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='container', is_config=True) + + + def _get_supporting_network(self): + """ + Getter method for supporting_network, mapped from YANG variable /networks/network/supporting_network (list) + + YANG Description: An underlay network, used to represent layered network +topologies. + """ + return self.__supporting_network + + def _set_supporting_network(self, v, load=False): + """ + Setter method for supporting_network, mapped from YANG variable /networks/network/supporting_network (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_supporting_network is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supporting_network() directly. + + YANG Description: An underlay network, used to represent layered network +topologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("network_ref",supporting_network.supporting_network, yang_name="supporting-network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref', extensions=None), is_container='list', yang_name="supporting-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supporting_network must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("network_ref",supporting_network.supporting_network, yang_name="supporting-network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref', extensions=None), is_container='list', yang_name="supporting-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True)""", + }) + + self.__supporting_network = t + if hasattr(self, '_set'): + self._set() + + def _unset_supporting_network(self): + self.__supporting_network = YANGDynClass(base=YANGListType("network_ref",supporting_network.supporting_network, yang_name="supporting-network", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref', extensions=None), is_container='list', yang_name="supporting-network", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) + + + def _get_node(self): + """ + Getter method for node, mapped from YANG variable /networks/network/node (list) + + YANG Description: The inventory of nodes of this network. + """ + return self.__node + + def _set_node(self, v, load=False): + """ + Setter method for node, mapped from YANG variable /networks/network/node (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_node is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node() directly. + + YANG Description: The inventory of nodes of this network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("node_id",node.node, yang_name="node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-id', extensions=None), is_container='list', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("node_id",node.node, yang_name="node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-id', extensions=None), is_container='list', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True)""", + }) + + self.__node = t + if hasattr(self, '_set'): + self._set() + + def _unset_node(self): + self.__node = YANGDynClass(base=YANGListType("node_id",node.node, yang_name="node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-id', extensions=None), is_container='list', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) + + + def _get_link(self): + """ + Getter method for link, mapped from YANG variable /networks/network/link (list) + + YANG Description: A network link connects a local (source) node and +a remote (destination) node via a set of the respective +node's termination points. It is possible to have several +links between the same source and destination nodes. +Likewise, a link could potentially be re-homed between +termination points. Therefore, in order to ensure that we +would always know to distinguish between links, every link +is identified by a dedicated link identifier. Note that a +link models a point-to-point link, not a multipoint link. + """ + return self.__link + + def _set_link(self, v, load=False): + """ + Setter method for link, mapped from YANG variable /networks/network/link (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_link is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link() directly. + + YANG Description: A network link connects a local (source) node and +a remote (destination) node via a set of the respective +node's termination points. It is possible to have several +links between the same source and destination nodes. +Likewise, a link could potentially be re-homed between +termination points. Therefore, in order to ensure that we +would always know to distinguish between links, every link +is identified by a dedicated link identifier. Note that a +link models a point-to-point link, not a multipoint link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("link_id",link.link, yang_name="link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-id', extensions=None), is_container='list', yang_name="link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("link_id",link.link, yang_name="link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-id', extensions=None), is_container='list', yang_name="link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True)""", + }) + + self.__link = t + if hasattr(self, '_set'): + self._set() + + def _unset_link(self): + self.__link = YANGDynClass(base=YANGListType("link_id",link.link, yang_name="link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-id', extensions=None), is_container='list', yang_name="link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) + + + def _get_te_topology_identifier(self): + """ + Getter method for te_topology_identifier, mapped from YANG variable /networks/network/te_topology_identifier (container) + + YANG Description: TE topology identifier container. + """ + return self.__te_topology_identifier + + def _set_te_topology_identifier(self, v, load=False): + """ + Setter method for te_topology_identifier, mapped from YANG variable /networks/network/te_topology_identifier (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_topology_identifier is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_topology_identifier() directly. + + YANG Description: TE topology identifier container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_topology_identifier.te_topology_identifier, is_container='container', yang_name="te-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_topology_identifier must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_topology_identifier.te_topology_identifier, is_container='container', yang_name="te-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_topology_identifier = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_topology_identifier(self): + self.__te_topology_identifier = YANGDynClass(base=te_topology_identifier.te_topology_identifier, is_container='container', yang_name="te-topology-identifier", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_te(self): + """ + Getter method for te, mapped from YANG variable /networks/network/te (container) + + YANG Description: Indicates TE support. + """ + return self.__te + + def _set_te(self, v, load=False): + """ + Setter method for te, mapped from YANG variable /networks/network/te (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te() directly. + + YANG Description: Indicates TE support. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te = t + if hasattr(self, '_set'): + self._set() + + def _unset_te(self): + self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + network_id = __builtin__.property(_get_network_id, _set_network_id) + network_types = __builtin__.property(_get_network_types, _set_network_types) + supporting_network = __builtin__.property(_get_supporting_network, _set_supporting_network) + node = __builtin__.property(_get_node, _set_node) + link = __builtin__.property(_get_link, _set_link) + te_topology_identifier = __builtin__.property(_get_te_topology_identifier, _set_te_topology_identifier) + te = __builtin__.property(_get_te, _set_te) + + + _pyangbind_elements = OrderedDict([('network_id', network_id), ('network_types', network_types), ('supporting_network', supporting_network), ('node', node), ('link', link), ('te_topology_identifier', te_topology_identifier), ('te', te), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..91937b156636c7db81427131959b4bc1ca33201c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/__init__.py @@ -0,0 +1,294 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import source +from . import destination +from . import supporting_link +from . import te +class link(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A network link connects a local (source) node and +a remote (destination) node via a set of the respective +node's termination points. It is possible to have several +links between the same source and destination nodes. +Likewise, a link could potentially be re-homed between +termination points. Therefore, in order to ensure that we +would always know to distinguish between links, every link +is identified by a dedicated link identifier. Note that a +link models a point-to-point link, not a multipoint link. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_id','__source','__destination','__supporting_link','__te',) + + _yang_name = 'link' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='link-id', is_config=True) + self.__source = YANGDynClass(base=source.source, is_container='container', yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True) + self.__destination = YANGDynClass(base=destination.destination, is_container='container', yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True) + self.__supporting_link = YANGDynClass(base=YANGListType("network_ref link_ref",supporting_link.supporting_link, yang_name="supporting-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref link-ref', extensions=None), is_container='list', yang_name="supporting-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) + self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link'] + + def _get_link_id(self): + """ + Getter method for link_id, mapped from YANG variable /networks/network/link/link_id (link-id) + + YANG Description: The identifier of a link in the topology. +A link is specific to a topology to which it belongs. + """ + return self.__link_id + + def _set_link_id(self, v, load=False): + """ + Setter method for link_id, mapped from YANG variable /networks/network/link/link_id (link-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_id() directly. + + YANG Description: The identifier of a link in the topology. +A link is specific to a topology to which it belongs. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='link-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_id must be of a type compatible with link-id""", + 'defined-type': "ietf-network-topology:link-id", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='link-id', is_config=True)""", + }) + + self.__link_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_id(self): + self.__link_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='link-id', is_config=True) + + + def _get_source(self): + """ + Getter method for source, mapped from YANG variable /networks/network/link/source (container) + + YANG Description: This container holds the logical source of a particular +link. + """ + return self.__source + + def _set_source(self, v, load=False): + """ + Setter method for source, mapped from YANG variable /networks/network/link/source (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_source() directly. + + YANG Description: This container holds the logical source of a particular +link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=source.source, is_container='container', yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """source must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=source.source, is_container='container', yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True)""", + }) + + self.__source = t + if hasattr(self, '_set'): + self._set() + + def _unset_source(self): + self.__source = YANGDynClass(base=source.source, is_container='container', yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True) + + + def _get_destination(self): + """ + Getter method for destination, mapped from YANG variable /networks/network/link/destination (container) + + YANG Description: This container holds the logical destination of a +particular link. + """ + return self.__destination + + def _set_destination(self, v, load=False): + """ + Setter method for destination, mapped from YANG variable /networks/network/link/destination (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_destination is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_destination() directly. + + YANG Description: This container holds the logical destination of a +particular link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=destination.destination, is_container='container', yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """destination must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=destination.destination, is_container='container', yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True)""", + }) + + self.__destination = t + if hasattr(self, '_set'): + self._set() + + def _unset_destination(self): + self.__destination = YANGDynClass(base=destination.destination, is_container='container', yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='container', is_config=True) + + + def _get_supporting_link(self): + """ + Getter method for supporting_link, mapped from YANG variable /networks/network/link/supporting_link (list) + + YANG Description: Identifies the link or links on which this link depends. + """ + return self.__supporting_link + + def _set_supporting_link(self, v, load=False): + """ + Setter method for supporting_link, mapped from YANG variable /networks/network/link/supporting_link (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_supporting_link is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supporting_link() directly. + + YANG Description: Identifies the link or links on which this link depends. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("network_ref link_ref",supporting_link.supporting_link, yang_name="supporting-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref link-ref', extensions=None), is_container='list', yang_name="supporting-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supporting_link must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("network_ref link_ref",supporting_link.supporting_link, yang_name="supporting-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref link-ref', extensions=None), is_container='list', yang_name="supporting-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True)""", + }) + + self.__supporting_link = t + if hasattr(self, '_set'): + self._set() + + def _unset_supporting_link(self): + self.__supporting_link = YANGDynClass(base=YANGListType("network_ref link_ref",supporting_link.supporting_link, yang_name="supporting-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref link-ref', extensions=None), is_container='list', yang_name="supporting-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) + + + def _get_te(self): + """ + Getter method for te, mapped from YANG variable /networks/network/link/te (container) + + YANG Description: Indicates TE support. + """ + return self.__te + + def _set_te(self, v, load=False): + """ + Setter method for te, mapped from YANG variable /networks/network/link/te (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te() directly. + + YANG Description: Indicates TE support. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te = t + if hasattr(self, '_set'): + self._set() + + def _unset_te(self): + self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + link_id = __builtin__.property(_get_link_id, _set_link_id) + source = __builtin__.property(_get_source, _set_source) + destination = __builtin__.property(_get_destination, _set_destination) + supporting_link = __builtin__.property(_get_supporting_link, _set_supporting_link) + te = __builtin__.property(_get_te, _set_te) + + + _pyangbind_elements = OrderedDict([('link_id', link_id), ('source', source), ('destination', destination), ('supporting_link', supporting_link), ('te', te), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/destination/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/destination/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ddab21c3e6976fac05cbe57124d8e58cc506539e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/destination/__init__.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class destination(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/destination. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This container holds the logical destination of a +particular link. + """ + __slots__ = ('_path_helper', '_extmethods', '__dest_node','__dest_tp',) + + _yang_name = 'destination' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__dest_node = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dest-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + self.__dest_tp = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dest-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'destination'] + + def _get_dest_node(self): + """ + Getter method for dest_node, mapped from YANG variable /networks/network/link/destination/dest_node (leafref) + + YANG Description: Destination node identifier. Must be in the same +network. + """ + return self.__dest_node + + def _set_dest_node(self, v, load=False): + """ + Setter method for dest_node, mapped from YANG variable /networks/network/link/destination/dest_node (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_dest_node is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_dest_node() directly. + + YANG Description: Destination node identifier. Must be in the same +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="dest-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """dest_node must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dest-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", + }) + + self.__dest_node = t + if hasattr(self, '_set'): + self._set() + + def _unset_dest_node(self): + self.__dest_node = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dest-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + + def _get_dest_tp(self): + """ + Getter method for dest_tp, mapped from YANG variable /networks/network/link/destination/dest_tp (leafref) + + YANG Description: This termination point is located within the +destination node and terminates the link. + """ + return self.__dest_tp + + def _set_dest_tp(self, v, load=False): + """ + Setter method for dest_tp, mapped from YANG variable /networks/network/link/destination/dest_tp (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_dest_tp is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_dest_tp() directly. + + YANG Description: This termination point is located within the +destination node and terminates the link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="dest-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """dest_tp must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dest-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", + }) + + self.__dest_tp = t + if hasattr(self, '_set'): + self._set() + + def _unset_dest_tp(self): + self.__dest_tp = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="dest-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + dest_node = __builtin__.property(_get_dest_node, _set_dest_node) + dest_tp = __builtin__.property(_get_dest_tp, _set_dest_tp) + + + _pyangbind_elements = OrderedDict([('dest_node', dest_node), ('dest_tp', dest_tp), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/source/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/source/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7538dfd44c5128d120b01b5018d9dd59cb97609c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/source/__init__.py @@ -0,0 +1,157 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class source(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/source. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This container holds the logical source of a particular +link. + """ + __slots__ = ('_path_helper', '_extmethods', '__source_node','__source_tp',) + + _yang_name = 'source' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__source_node = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + self.__source_tp = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'source'] + + def _get_source_node(self): + """ + Getter method for source_node, mapped from YANG variable /networks/network/link/source/source_node (leafref) + + YANG Description: Source node identifier. Must be in the same topology. + """ + return self.__source_node + + def _set_source_node(self, v, load=False): + """ + Setter method for source_node, mapped from YANG variable /networks/network/link/source/source_node (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_source_node is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_source_node() directly. + + YANG Description: Source node identifier. Must be in the same topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """source_node must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", + }) + + self.__source_node = t + if hasattr(self, '_set'): + self._set() + + def _unset_source_node(self): + self.__source_node = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + + def _get_source_tp(self): + """ + Getter method for source_tp, mapped from YANG variable /networks/network/link/source/source_tp (leafref) + + YANG Description: This termination point is located within the source node +and terminates the link. + """ + return self.__source_tp + + def _set_source_tp(self, v, load=False): + """ + Setter method for source_tp, mapped from YANG variable /networks/network/link/source/source_tp (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_source_tp is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_source_tp() directly. + + YANG Description: This termination point is located within the source node +and terminates the link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="source-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """source_tp must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", + }) + + self.__source_tp = t + if hasattr(self, '_set'): + self._set() + + def _unset_source_tp(self): + self.__source_tp = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="source-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + source_node = __builtin__.property(_get_source_node, _set_source_node) + source_tp = __builtin__.property(_get_source_tp, _set_source_tp) + + + _pyangbind_elements = OrderedDict([('source_node', source_node), ('source_tp', source_tp), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/supporting_link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/supporting_link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..28a780f5f61dfda6d026768a54c11b75e3d7fdb3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/supporting_link/__init__.py @@ -0,0 +1,172 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class supporting_link(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/supporting-link. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Identifies the link or links on which this link depends. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__link_ref',) + + _yang_name = 'supporting-link' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + self.__link_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'supporting-link'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/link/supporting_link/network_ref (leafref) + + YANG Description: This leaf identifies in which underlay topology +the supporting link is present. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/link/supporting_link/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: This leaf identifies in which underlay topology +the supporting link is present. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + + def _get_link_ref(self): + """ + Getter method for link_ref, mapped from YANG variable /networks/network/link/supporting_link/link_ref (leafref) + + YANG Description: This leaf identifies a link that is a part +of this link's underlay. Reference loops in which +a link identifies itself as its underlay, either +directly or transitively, are not allowed. + """ + return self.__link_ref + + def _set_link_ref(self, v, load=False): + """ + Setter method for link_ref, mapped from YANG variable /networks/network/link/supporting_link/link_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_ref() directly. + + YANG Description: This leaf identifies a link that is a part +of this link's underlay. Reference loops in which +a link identifies itself as its underlay, either +directly or transitively, are not allowed. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", + }) + + self.__link_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_ref(self): + self.__link_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + link_ref = __builtin__.property(_get_link_ref, _set_link_ref) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('link_ref', link_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..666d9718184c72f0d99ec5ed6e28adf8eed72cf4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/__init__.py @@ -0,0 +1,603 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import bundled_links +from . import component_links +from . import te_link_attributes +from . import information_source_state +from . import information_source_entry +from . import recovery +from . import underlay +from . import statistics +class te(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Indicates TE support. + """ + __slots__ = ('_path_helper', '_extmethods', '__bundled_links','__component_links','__te_link_template','__te_link_attributes','__oper_status','__is_transitional','__information_source','__information_source_instance','__information_source_state','__information_source_entry','__recovery','__underlay','__statistics',) + + _yang_name = 'te' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__bundled_links = YANGDynClass(base=bundled_links.bundled_links, is_container='container', yang_name="bundled-links", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__component_links = YANGDynClass(base=component_links.component_links, is_container='container', yang_name="component-links", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__te_link_template = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__te_link_attributes = YANGDynClass(base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) + self.__is_transitional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-transitional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) + self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) + self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__information_source_entry = YANGDynClass(base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__recovery = YANGDynClass(base=recovery.recovery, is_container='container', yang_name="recovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te'] + + def _get_bundled_links(self): + """ + Getter method for bundled_links, mapped from YANG variable /networks/network/link/te/bundled_links (container) + + YANG Description: A set of bundled links. + """ + return self.__bundled_links + + def _set_bundled_links(self, v, load=False): + """ + Setter method for bundled_links, mapped from YANG variable /networks/network/link/te/bundled_links (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_bundled_links is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_bundled_links() directly. + + YANG Description: A set of bundled links. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=bundled_links.bundled_links, is_container='container', yang_name="bundled-links", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """bundled_links must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=bundled_links.bundled_links, is_container='container', yang_name="bundled-links", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__bundled_links = t + if hasattr(self, '_set'): + self._set() + + def _unset_bundled_links(self): + self.__bundled_links = YANGDynClass(base=bundled_links.bundled_links, is_container='container', yang_name="bundled-links", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_component_links(self): + """ + Getter method for component_links, mapped from YANG variable /networks/network/link/te/component_links (container) + + YANG Description: A set of component links. + """ + return self.__component_links + + def _set_component_links(self, v, load=False): + """ + Setter method for component_links, mapped from YANG variable /networks/network/link/te/component_links (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_component_links is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_component_links() directly. + + YANG Description: A set of component links. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=component_links.component_links, is_container='container', yang_name="component-links", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """component_links must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=component_links.component_links, is_container='container', yang_name="component-links", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__component_links = t + if hasattr(self, '_set'): + self._set() + + def _unset_component_links(self): + self.__component_links = YANGDynClass(base=component_links.component_links, is_container='container', yang_name="component-links", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_te_link_template(self): + """ + Getter method for te_link_template, mapped from YANG variable /networks/network/link/te/te_link_template (leafref) + + YANG Description: The reference to a TE link template. + """ + return self.__te_link_template + + def _set_te_link_template(self, v, load=False): + """ + Setter method for te_link_template, mapped from YANG variable /networks/network/link/te/te_link_template (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_link_template is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_link_template() directly. + + YANG Description: The reference to a TE link template. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_link_template must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__te_link_template = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_link_template(self): + self.__te_link_template = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_te_link_attributes(self): + """ + Getter method for te_link_attributes, mapped from YANG variable /networks/network/link/te/te_link_attributes (container) + + YANG Description: Link attributes in a TE topology. + """ + return self.__te_link_attributes + + def _set_te_link_attributes(self, v, load=False): + """ + Setter method for te_link_attributes, mapped from YANG variable /networks/network/link/te/te_link_attributes (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_link_attributes is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_link_attributes() directly. + + YANG Description: Link attributes in a TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_link_attributes must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_link_attributes = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_link_attributes(self): + self.__te_link_attributes = YANGDynClass(base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_oper_status(self): + """ + Getter method for oper_status, mapped from YANG variable /networks/network/link/te/oper_status (te-types:te-oper-status) + + YANG Description: The current operational state of the link. + """ + return self.__oper_status + + def _set_oper_status(self, v, load=False): + """ + Setter method for oper_status, mapped from YANG variable /networks/network/link/te/oper_status (te-types:te-oper-status) + If this variable is read-only (config: false) in the + source YANG file, then _set_oper_status is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_oper_status() directly. + + YANG Description: The current operational state of the link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """oper_status must be of a type compatible with te-types:te-oper-status""", + 'defined-type': "te-types:te-oper-status", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False)""", + }) + + self.__oper_status = t + if hasattr(self, '_set'): + self._set() + + def _unset_oper_status(self): + self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) + + + def _get_is_transitional(self): + """ + Getter method for is_transitional, mapped from YANG variable /networks/network/link/te/is_transitional (empty) + + YANG Description: Present if the link is transitional; used as an +alternative approach in lieu of 'inter-layer-lock-id' +for path computation in a TE topology covering multiple +layers or multiple regions. + """ + return self.__is_transitional + + def _set_is_transitional(self, v, load=False): + """ + Setter method for is_transitional, mapped from YANG variable /networks/network/link/te/is_transitional (empty) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_transitional is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_transitional() directly. + + YANG Description: Present if the link is transitional; used as an +alternative approach in lieu of 'inter-layer-lock-id' +for path computation in a TE topology covering multiple +layers or multiple regions. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-transitional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_transitional must be of a type compatible with empty""", + 'defined-type': "empty", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-transitional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False)""", + }) + + self.__is_transitional = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_transitional(self): + self.__is_transitional = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-transitional", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) + + + def _get_information_source(self): + """ + Getter method for information_source, mapped from YANG variable /networks/network/link/te/information_source (te-info-source) + + YANG Description: Indicates the type of information source. + """ + return self.__information_source + + def _set_information_source(self, v, load=False): + """ + Setter method for information_source, mapped from YANG variable /networks/network/link/te/information_source (te-info-source) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source() directly. + + YANG Description: Indicates the type of information source. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source must be of a type compatible with te-info-source""", + 'defined-type': "ietf-te-topology:te-info-source", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False)""", + }) + + self.__information_source = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source(self): + self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) + + + def _get_information_source_instance(self): + """ + Getter method for information_source_instance, mapped from YANG variable /networks/network/link/te/information_source_instance (string) + + YANG Description: The name indicating the instance of the information +source. + """ + return self.__information_source_instance + + def _set_information_source_instance(self, v, load=False): + """ + Setter method for information_source_instance, mapped from YANG variable /networks/network/link/te/information_source_instance (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source_instance is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source_instance() directly. + + YANG Description: The name indicating the instance of the information +source. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source_instance must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__information_source_instance = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source_instance(self): + self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_information_source_state(self): + """ + Getter method for information_source_state, mapped from YANG variable /networks/network/link/te/information_source_state (container) + + YANG Description: Contains state attributes related to the information +source. + """ + return self.__information_source_state + + def _set_information_source_state(self, v, load=False): + """ + Setter method for information_source_state, mapped from YANG variable /networks/network/link/te/information_source_state (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source_state is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source_state() directly. + + YANG Description: Contains state attributes related to the information +source. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source_state must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__information_source_state = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source_state(self): + self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_information_source_entry(self): + """ + Getter method for information_source_entry, mapped from YANG variable /networks/network/link/te/information_source_entry (list) + + YANG Description: A list of information sources learned, including the source +that is used. + """ + return self.__information_source_entry + + def _set_information_source_entry(self, v, load=False): + """ + Setter method for information_source_entry, mapped from YANG variable /networks/network/link/te/information_source_entry (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source_entry is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source_entry() directly. + + YANG Description: A list of information sources learned, including the source +that is used. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source_entry must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__information_source_entry = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source_entry(self): + self.__information_source_entry = YANGDynClass(base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_recovery(self): + """ + Getter method for recovery, mapped from YANG variable /networks/network/link/te/recovery (container) + + YANG Description: Status of the recovery process. + """ + return self.__recovery + + def _set_recovery(self, v, load=False): + """ + Setter method for recovery, mapped from YANG variable /networks/network/link/te/recovery (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_recovery is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_recovery() directly. + + YANG Description: Status of the recovery process. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=recovery.recovery, is_container='container', yang_name="recovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """recovery must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=recovery.recovery, is_container='container', yang_name="recovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__recovery = t + if hasattr(self, '_set'): + self._set() + + def _unset_recovery(self): + self.__recovery = YANGDynClass(base=recovery.recovery, is_container='container', yang_name="recovery", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_underlay(self): + """ + Getter method for underlay, mapped from YANG variable /networks/network/link/te/underlay (container) + + YANG Description: State attributes for the TE link underlay. + """ + return self.__underlay + + def _set_underlay(self, v, load=False): + """ + Setter method for underlay, mapped from YANG variable /networks/network/link/te/underlay (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_underlay is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_underlay() directly. + + YANG Description: State attributes for the TE link underlay. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """underlay must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__underlay = t + if hasattr(self, '_set'): + self._set() + + def _unset_underlay(self): + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_statistics(self): + """ + Getter method for statistics, mapped from YANG variable /networks/network/link/te/statistics (container) + + YANG Description: Statistics data. + """ + return self.__statistics + + def _set_statistics(self, v, load=False): + """ + Setter method for statistics, mapped from YANG variable /networks/network/link/te/statistics (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_statistics is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_statistics() directly. + + YANG Description: Statistics data. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """statistics must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__statistics = t + if hasattr(self, '_set'): + self._set() + + def _unset_statistics(self): + self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + bundled_links = __builtin__.property(_get_bundled_links, _set_bundled_links) + component_links = __builtin__.property(_get_component_links, _set_component_links) + te_link_template = __builtin__.property(_get_te_link_template, _set_te_link_template) + te_link_attributes = __builtin__.property(_get_te_link_attributes, _set_te_link_attributes) + oper_status = __builtin__.property(_get_oper_status) + is_transitional = __builtin__.property(_get_is_transitional) + information_source = __builtin__.property(_get_information_source) + information_source_instance = __builtin__.property(_get_information_source_instance) + information_source_state = __builtin__.property(_get_information_source_state) + information_source_entry = __builtin__.property(_get_information_source_entry) + recovery = __builtin__.property(_get_recovery) + underlay = __builtin__.property(_get_underlay) + statistics = __builtin__.property(_get_statistics) + + __choices__ = {'bundle-stack-level': {'bundle': ['bundled_links'], 'component': ['component_links']}} + _pyangbind_elements = OrderedDict([('bundled_links', bundled_links), ('component_links', component_links), ('te_link_template', te_link_template), ('te_link_attributes', te_link_attributes), ('oper_status', oper_status), ('is_transitional', is_transitional), ('information_source', information_source), ('information_source_instance', information_source_instance), ('information_source_state', information_source_state), ('information_source_entry', information_source_entry), ('recovery', recovery), ('underlay', underlay), ('statistics', statistics), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/bundled_links/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/bundled_links/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..890484652415def2558181690b85a15e6a71258a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/bundled_links/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import bundled_link +class bundled_links(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/bundled-links. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A set of bundled links. + """ + __slots__ = ('_path_helper', '_extmethods', '__bundled_link',) + + _yang_name = 'bundled-links' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__bundled_link = YANGDynClass(base=YANGListType("sequence",bundled_link.bundled_link, yang_name="bundled-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'bundle')), is_container='list', yang_name="bundled-link", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'bundled-links'] + + def _get_bundled_link(self): + """ + Getter method for bundled_link, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link (list) + + YANG Description: Specifies a bundled interface that is +further partitioned. + """ + return self.__bundled_link + + def _set_bundled_link(self, v, load=False): + """ + Setter method for bundled_link, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_bundled_link is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_bundled_link() directly. + + YANG Description: Specifies a bundled interface that is +further partitioned. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("sequence",bundled_link.bundled_link, yang_name="bundled-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'bundle')), is_container='list', yang_name="bundled-link", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """bundled_link must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("sequence",bundled_link.bundled_link, yang_name="bundled-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'bundle')), is_container='list', yang_name="bundled-link", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__bundled_link = t + if hasattr(self, '_set'): + self._set() + + def _unset_bundled_link(self): + self.__bundled_link = YANGDynClass(base=YANGListType("sequence",bundled_link.bundled_link, yang_name="bundled-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'bundle')), is_container='list', yang_name="bundled-link", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + bundled_link = __builtin__.property(_get_bundled_link, _set_bundled_link) + + __choices__ = {'bundle-stack-level': {'bundle': ['bundled_link']}} + _pyangbind_elements = OrderedDict([('bundled_link', bundled_link), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/bundled_links/bundled_link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/bundled_links/bundled_link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..99c0b71fe3c0da96681858df66cd8771b0ffb326 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/bundled_links/bundled_link/__init__.py @@ -0,0 +1,203 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class bundled_link(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/bundled-links/bundled-link. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Specifies a bundled interface that is +further partitioned. + """ + __slots__ = ('_path_helper', '_extmethods', '__sequence','__src_tp_ref','__des_tp_ref',) + + _yang_name = 'bundled-link' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__src_tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__des_tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="des-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'bundled-links', 'bundled-link'] + + def _get_sequence(self): + """ + Getter method for sequence, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link/sequence (uint32) + + YANG Description: Identifies the sequence in the bundle. + """ + return self.__sequence + + def _set_sequence(self, v, load=False): + """ + Setter method for sequence, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link/sequence (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_sequence is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sequence() directly. + + YANG Description: Identifies the sequence in the bundle. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sequence must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__sequence = t + if hasattr(self, '_set'): + self._set() + + def _unset_sequence(self): + self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_src_tp_ref(self): + """ + Getter method for src_tp_ref, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link/src_tp_ref (leafref) + + YANG Description: Reference to another TE termination point on the +same source node. + """ + return self.__src_tp_ref + + def _set_src_tp_ref(self, v, load=False): + """ + Setter method for src_tp_ref, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link/src_tp_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_src_tp_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_src_tp_ref() directly. + + YANG Description: Reference to another TE termination point on the +same source node. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="src-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """src_tp_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__src_tp_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_src_tp_ref(self): + self.__src_tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_des_tp_ref(self): + """ + Getter method for des_tp_ref, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link/des_tp_ref (leafref) + + YANG Description: Reference to another TE termination point on the +same destination node. + """ + return self.__des_tp_ref + + def _set_des_tp_ref(self, v, load=False): + """ + Setter method for des_tp_ref, mapped from YANG variable /networks/network/link/te/bundled_links/bundled_link/des_tp_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_des_tp_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_des_tp_ref() directly. + + YANG Description: Reference to another TE termination point on the +same destination node. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="des-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """des_tp_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="des-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__des_tp_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_des_tp_ref(self): + self.__des_tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="des-tp-ref", parent=self, choice=('bundle-stack-level', 'bundle'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + sequence = __builtin__.property(_get_sequence, _set_sequence) + src_tp_ref = __builtin__.property(_get_src_tp_ref, _set_src_tp_ref) + des_tp_ref = __builtin__.property(_get_des_tp_ref, _set_des_tp_ref) + + __choices__ = {'bundle-stack-level': {'bundle': ['sequence', 'src_tp_ref', 'des_tp_ref']}} + _pyangbind_elements = OrderedDict([('sequence', sequence), ('src_tp_ref', src_tp_ref), ('des_tp_ref', des_tp_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/component_links/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/component_links/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2207417bc3b9a0271d4b08634647ae9d538f9724 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/component_links/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import component_link +class component_links(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/component-links. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A set of component links. + """ + __slots__ = ('_path_helper', '_extmethods', '__component_link',) + + _yang_name = 'component-links' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__component_link = YANGDynClass(base=YANGListType("sequence",component_link.component_link, yang_name="component-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'component')), is_container='list', yang_name="component-link", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'component-links'] + + def _get_component_link(self): + """ + Getter method for component_link, mapped from YANG variable /networks/network/link/te/component_links/component_link (list) + + YANG Description: Specifies a component interface that is +sufficient to unambiguously identify the +appropriate resources. + """ + return self.__component_link + + def _set_component_link(self, v, load=False): + """ + Setter method for component_link, mapped from YANG variable /networks/network/link/te/component_links/component_link (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_component_link is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_component_link() directly. + + YANG Description: Specifies a component interface that is +sufficient to unambiguously identify the +appropriate resources. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("sequence",component_link.component_link, yang_name="component-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'component')), is_container='list', yang_name="component-link", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """component_link must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("sequence",component_link.component_link, yang_name="component-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'component')), is_container='list', yang_name="component-link", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__component_link = t + if hasattr(self, '_set'): + self._set() + + def _unset_component_link(self): + self.__component_link = YANGDynClass(base=YANGListType("sequence",component_link.component_link, yang_name="component-link", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='sequence', extensions=None, choice=('bundle-stack-level', 'component')), is_container='list', yang_name="component-link", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + component_link = __builtin__.property(_get_component_link, _set_component_link) + + __choices__ = {'bundle-stack-level': {'component': ['component_link']}} + _pyangbind_elements = OrderedDict([('component_link', component_link), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/component_links/component_link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/component_links/component_link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5995318d715c909846c2ed74a6ddb881cbb7689f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/component_links/component_link/__init__.py @@ -0,0 +1,204 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class component_link(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/component-links/component-link. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Specifies a component interface that is +sufficient to unambiguously identify the +appropriate resources. + """ + __slots__ = ('_path_helper', '_extmethods', '__sequence','__src_interface_ref','__des_interface_ref',) + + _yang_name = 'component-link' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__src_interface_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__des_interface_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="des-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'component-links', 'component-link'] + + def _get_sequence(self): + """ + Getter method for sequence, mapped from YANG variable /networks/network/link/te/component_links/component_link/sequence (uint32) + + YANG Description: Identifies the sequence in the bundle. + """ + return self.__sequence + + def _set_sequence(self, v, load=False): + """ + Setter method for sequence, mapped from YANG variable /networks/network/link/te/component_links/component_link/sequence (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_sequence is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sequence() directly. + + YANG Description: Identifies the sequence in the bundle. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sequence must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__sequence = t + if hasattr(self, '_set'): + self._set() + + def _unset_sequence(self): + self.__sequence = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="sequence", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_src_interface_ref(self): + """ + Getter method for src_interface_ref, mapped from YANG variable /networks/network/link/te/component_links/component_link/src_interface_ref (string) + + YANG Description: Reference to a component link interface on the +source node. + """ + return self.__src_interface_ref + + def _set_src_interface_ref(self, v, load=False): + """ + Setter method for src_interface_ref, mapped from YANG variable /networks/network/link/te/component_links/component_link/src_interface_ref (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_src_interface_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_src_interface_ref() directly. + + YANG Description: Reference to a component link interface on the +source node. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="src-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """src_interface_ref must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__src_interface_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_src_interface_ref(self): + self.__src_interface_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="src-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_des_interface_ref(self): + """ + Getter method for des_interface_ref, mapped from YANG variable /networks/network/link/te/component_links/component_link/des_interface_ref (string) + + YANG Description: Reference to a component link interface on the +destination node. + """ + return self.__des_interface_ref + + def _set_des_interface_ref(self, v, load=False): + """ + Setter method for des_interface_ref, mapped from YANG variable /networks/network/link/te/component_links/component_link/des_interface_ref (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_des_interface_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_des_interface_ref() directly. + + YANG Description: Reference to a component link interface on the +destination node. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="des-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """des_interface_ref must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="des-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__des_interface_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_des_interface_ref(self): + self.__des_interface_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="des-interface-ref", parent=self, choice=('bundle-stack-level', 'component'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + sequence = __builtin__.property(_get_sequence, _set_sequence) + src_interface_ref = __builtin__.property(_get_src_interface_ref, _set_src_interface_ref) + des_interface_ref = __builtin__.property(_get_des_interface_ref, _set_des_interface_ref) + + __choices__ = {'bundle-stack-level': {'component': ['sequence', 'src_interface_ref', 'des_interface_ref']}} + _pyangbind_elements = OrderedDict([('sequence', sequence), ('src_interface_ref', src_interface_ref), ('des_interface_ref', des_interface_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d331b67df85fe3f0c3173f74307de38fa5bc5d0b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/__init__.py @@ -0,0 +1,749 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import information_source_state +from . import interface_switching_capability +from . import label_restrictions +from . import max_link_bandwidth +from . import max_resv_link_bandwidth +from . import unreserved_bandwidth +from . import te_srlgs +from . import te_nsrlgs +class information_source_entry(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of information sources learned, including the source +that is used. + """ + __slots__ = ('_path_helper', '_extmethods', '__information_source','__information_source_instance','__information_source_state','__link_index','__administrative_group','__interface_switching_capability','__label_restrictions','__link_protection_type','__max_link_bandwidth','__max_resv_link_bandwidth','__unreserved_bandwidth','__te_default_metric','__te_delay_metric','__te_igp_metric','__te_srlgs','__te_nsrlgs',) + + _yang_name = 'information-source-entry' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) + self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__link_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + self.__administrative_group = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=False) + self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__link_protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__max_link_bandwidth = YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__max_resv_link_bandwidth = YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__te_default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__te_delay_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__te_igp_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__te_srlgs = YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__te_nsrlgs = YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry'] + + def _get_information_source(self): + """ + Getter method for information_source, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source (te-info-source) + + YANG Description: Indicates the type of information source. + """ + return self.__information_source + + def _set_information_source(self, v, load=False): + """ + Setter method for information_source, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source (te-info-source) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source() directly. + + YANG Description: Indicates the type of information source. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source must be of a type compatible with te-info-source""", + 'defined-type': "ietf-te-topology:te-info-source", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False)""", + }) + + self.__information_source = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source(self): + self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) + + + def _get_information_source_instance(self): + """ + Getter method for information_source_instance, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_instance (string) + + YANG Description: The name indicating the instance of the information +source. + """ + return self.__information_source_instance + + def _set_information_source_instance(self, v, load=False): + """ + Setter method for information_source_instance, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_instance (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source_instance is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source_instance() directly. + + YANG Description: The name indicating the instance of the information +source. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source_instance must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__information_source_instance = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source_instance(self): + self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_information_source_state(self): + """ + Getter method for information_source_state, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state (container) + + YANG Description: Contains state attributes related to the information +source. + """ + return self.__information_source_state + + def _set_information_source_state(self, v, load=False): + """ + Setter method for information_source_state, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source_state is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source_state() directly. + + YANG Description: Contains state attributes related to the information +source. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source_state must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__information_source_state = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source_state(self): + self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_link_index(self): + """ + Getter method for link_index, mapped from YANG variable /networks/network/link/te/information_source_entry/link_index (uint64) + + YANG Description: The link identifier. If OSPF is used, this object +represents an ospfLsdbID. If IS-IS is used, this object +represents an isisLSPID. If a locally configured link is +used, this object represents a unique value, which is +locally defined in a router. + """ + return self.__link_index + + def _set_link_index(self, v, load=False): + """ + Setter method for link_index, mapped from YANG variable /networks/network/link/te/information_source_entry/link_index (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_index() directly. + + YANG Description: The link identifier. If OSPF is used, this object +represents an ospfLsdbID. If IS-IS is used, this object +represents an isisLSPID. If a locally configured link is +used, this object represents a unique value, which is +locally defined in a router. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_index must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__link_index = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_index(self): + self.__link_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + + def _get_administrative_group(self): + """ + Getter method for administrative_group, mapped from YANG variable /networks/network/link/te/information_source_entry/administrative_group (te-types:admin-groups) + + YANG Description: Administrative group or color of the link. +This attribute covers both administrative groups (defined +in RFCs 3630 and 5305) and Extended Administrative Groups +(defined in RFC 7308). + """ + return self.__administrative_group + + def _set_administrative_group(self, v, load=False): + """ + Setter method for administrative_group, mapped from YANG variable /networks/network/link/te/information_source_entry/administrative_group (te-types:admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_administrative_group is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_administrative_group() directly. + + YANG Description: Administrative group or color of the link. +This attribute covers both administrative groups (defined +in RFCs 3630 and 5305) and Extended Administrative Groups +(defined in RFC 7308). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """administrative_group must be of a type compatible with te-types:admin-groups""", + 'defined-type': "te-types:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=False)""", + }) + + self.__administrative_group = t + if hasattr(self, '_set'): + self._set() + + def _unset_administrative_group(self): + self.__administrative_group = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=False) + + + def _get_interface_switching_capability(self): + """ + Getter method for interface_switching_capability, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability (list) + + YANG Description: List of ISCDs for this link. + """ + return self.__interface_switching_capability + + def _set_interface_switching_capability(self, v, load=False): + """ + Setter method for interface_switching_capability, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_interface_switching_capability is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_interface_switching_capability() directly. + + YANG Description: List of ISCDs for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """interface_switching_capability must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__interface_switching_capability = t + if hasattr(self, '_set'): + self._set() + + def _unset_interface_switching_capability(self): + self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_label_restrictions(self): + """ + Getter method for label_restrictions, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions (container) + + YANG Description: The label restrictions container. + """ + return self.__label_restrictions + + def _set_label_restrictions(self, v, load=False): + """ + Setter method for label_restrictions, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restrictions is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restrictions() directly. + + YANG Description: The label restrictions container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restrictions must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_restrictions = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restrictions(self): + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_link_protection_type(self): + """ + Getter method for link_protection_type, mapped from YANG variable /networks/network/link/te/information_source_entry/link_protection_type (identityref) + + YANG Description: Link Protection Type desired for this link. + """ + return self.__link_protection_type + + def _set_link_protection_type(self, v, load=False): + """ + Setter method for link_protection_type, mapped from YANG variable /networks/network/link/te/information_source_entry/link_protection_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_protection_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_protection_type() directly. + + YANG Description: Link Protection Type desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_protection_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__link_protection_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_protection_type(self): + self.__link_protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_max_link_bandwidth(self): + """ + Getter method for max_link_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth (container) + + YANG Description: Maximum bandwidth that can be seen on this link in this +direction. Units are in bytes per second. + """ + return self.__max_link_bandwidth + + def _set_max_link_bandwidth(self, v, load=False): + """ + Setter method for max_link_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_link_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_link_bandwidth() directly. + + YANG Description: Maximum bandwidth that can be seen on this link in this +direction. Units are in bytes per second. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_link_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__max_link_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_link_bandwidth(self): + self.__max_link_bandwidth = YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_max_resv_link_bandwidth(self): + """ + Getter method for max_resv_link_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth (container) + + YANG Description: Maximum amount of bandwidth that can be reserved in this +direction in this link. Units are in bytes per second. + """ + return self.__max_resv_link_bandwidth + + def _set_max_resv_link_bandwidth(self, v, load=False): + """ + Setter method for max_resv_link_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_resv_link_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_resv_link_bandwidth() directly. + + YANG Description: Maximum amount of bandwidth that can be reserved in this +direction in this link. Units are in bytes per second. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_resv_link_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__max_resv_link_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_resv_link_bandwidth(self): + self.__max_resv_link_bandwidth = YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unreserved_bandwidth(self): + """ + Getter method for unreserved_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth (list) + + YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in +bytes per second. + """ + return self.__unreserved_bandwidth + + def _set_unreserved_bandwidth(self, v, load=False): + """ + Setter method for unreserved_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_unreserved_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unreserved_bandwidth() directly. + + YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in +bytes per second. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unreserved_bandwidth must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__unreserved_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_unreserved_bandwidth(self): + self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_te_default_metric(self): + """ + Getter method for te_default_metric, mapped from YANG variable /networks/network/link/te/information_source_entry/te_default_metric (uint32) + + YANG Description: Traffic Engineering metric. + """ + return self.__te_default_metric + + def _set_te_default_metric(self, v, load=False): + """ + Setter method for te_default_metric, mapped from YANG variable /networks/network/link/te/information_source_entry/te_default_metric (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_default_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_default_metric() directly. + + YANG Description: Traffic Engineering metric. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_default_metric must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__te_default_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_default_metric(self): + self.__te_default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_te_delay_metric(self): + """ + Getter method for te_delay_metric, mapped from YANG variable /networks/network/link/te/information_source_entry/te_delay_metric (uint32) + + YANG Description: Traffic Engineering delay metric. + """ + return self.__te_delay_metric + + def _set_te_delay_metric(self, v, load=False): + """ + Setter method for te_delay_metric, mapped from YANG variable /networks/network/link/te/information_source_entry/te_delay_metric (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_delay_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_delay_metric() directly. + + YANG Description: Traffic Engineering delay metric. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_delay_metric must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__te_delay_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_delay_metric(self): + self.__te_delay_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_te_igp_metric(self): + """ + Getter method for te_igp_metric, mapped from YANG variable /networks/network/link/te/information_source_entry/te_igp_metric (uint32) + + YANG Description: IGP metric used for Traffic Engineering. + """ + return self.__te_igp_metric + + def _set_te_igp_metric(self, v, load=False): + """ + Setter method for te_igp_metric, mapped from YANG variable /networks/network/link/te/information_source_entry/te_igp_metric (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_igp_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_igp_metric() directly. + + YANG Description: IGP metric used for Traffic Engineering. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_igp_metric must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__te_igp_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_igp_metric(self): + self.__te_igp_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_te_srlgs(self): + """ + Getter method for te_srlgs, mapped from YANG variable /networks/network/link/te/information_source_entry/te_srlgs (container) + + YANG Description: Contains a list of SRLGs. + """ + return self.__te_srlgs + + def _set_te_srlgs(self, v, load=False): + """ + Setter method for te_srlgs, mapped from YANG variable /networks/network/link/te/information_source_entry/te_srlgs (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_srlgs is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_srlgs() directly. + + YANG Description: Contains a list of SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_srlgs must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_srlgs = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_srlgs(self): + self.__te_srlgs = YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_te_nsrlgs(self): + """ + Getter method for te_nsrlgs, mapped from YANG variable /networks/network/link/te/information_source_entry/te_nsrlgs (container) + + YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). +When an abstract TE link is configured, this list specifies +the request that underlay TE paths need to be mutually +disjoint with other TE links in the same groups. + """ + return self.__te_nsrlgs + + def _set_te_nsrlgs(self, v, load=False): + """ + Setter method for te_nsrlgs, mapped from YANG variable /networks/network/link/te/information_source_entry/te_nsrlgs (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_nsrlgs is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_nsrlgs() directly. + + YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). +When an abstract TE link is configured, this list specifies +the request that underlay TE paths need to be mutually +disjoint with other TE links in the same groups. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_nsrlgs must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_nsrlgs = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_nsrlgs(self): + self.__te_nsrlgs = YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + information_source = __builtin__.property(_get_information_source) + information_source_instance = __builtin__.property(_get_information_source_instance) + information_source_state = __builtin__.property(_get_information_source_state) + link_index = __builtin__.property(_get_link_index) + administrative_group = __builtin__.property(_get_administrative_group) + interface_switching_capability = __builtin__.property(_get_interface_switching_capability) + label_restrictions = __builtin__.property(_get_label_restrictions) + link_protection_type = __builtin__.property(_get_link_protection_type) + max_link_bandwidth = __builtin__.property(_get_max_link_bandwidth) + max_resv_link_bandwidth = __builtin__.property(_get_max_resv_link_bandwidth) + unreserved_bandwidth = __builtin__.property(_get_unreserved_bandwidth) + te_default_metric = __builtin__.property(_get_te_default_metric) + te_delay_metric = __builtin__.property(_get_te_delay_metric) + te_igp_metric = __builtin__.property(_get_te_igp_metric) + te_srlgs = __builtin__.property(_get_te_srlgs) + te_nsrlgs = __builtin__.property(_get_te_nsrlgs) + + + _pyangbind_elements = OrderedDict([('information_source', information_source), ('information_source_instance', information_source_instance), ('information_source_state', information_source_state), ('link_index', link_index), ('administrative_group', administrative_group), ('interface_switching_capability', interface_switching_capability), ('label_restrictions', label_restrictions), ('link_protection_type', link_protection_type), ('max_link_bandwidth', max_link_bandwidth), ('max_resv_link_bandwidth', max_resv_link_bandwidth), ('unreserved_bandwidth', unreserved_bandwidth), ('te_default_metric', te_default_metric), ('te_delay_metric', te_delay_metric), ('te_igp_metric', te_igp_metric), ('te_srlgs', te_srlgs), ('te_nsrlgs', te_nsrlgs), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..51885bb49b9eb9a0279b8ff45e62449f896c03ef --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py @@ -0,0 +1,248 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import topology +class information_source_state(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/information-source-state. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains state attributes related to the information +source. + """ + __slots__ = ('_path_helper', '_extmethods', '__credibility_preference','__logical_network_element','__network_instance','__topology',) + + _yang_name = 'information-source-state' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'information-source-state'] + + def _get_credibility_preference(self): + """ + Getter method for credibility_preference, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/credibility_preference (uint16) + + YANG Description: The preference value for calculating the Traffic +Engineering database credibility value used for +tie-break selection between different information-source +values. A higher value is preferable. + """ + return self.__credibility_preference + + def _set_credibility_preference(self, v, load=False): + """ + Setter method for credibility_preference, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/credibility_preference (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_credibility_preference is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_credibility_preference() directly. + + YANG Description: The preference value for calculating the Traffic +Engineering database credibility value used for +tie-break selection between different information-source +values. A higher value is preferable. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """credibility_preference must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False)""", + }) + + self.__credibility_preference = t + if hasattr(self, '_set'): + self._set() + + def _unset_credibility_preference(self): + self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + + + def _get_logical_network_element(self): + """ + Getter method for logical_network_element, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/logical_network_element (string) + + YANG Description: When applicable, this is the name of a logical network +element from which the information is learned. + """ + return self.__logical_network_element + + def _set_logical_network_element(self, v, load=False): + """ + Setter method for logical_network_element, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/logical_network_element (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_logical_network_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_logical_network_element() directly. + + YANG Description: When applicable, this is the name of a logical network +element from which the information is learned. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """logical_network_element must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__logical_network_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_logical_network_element(self): + self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_network_instance(self): + """ + Getter method for network_instance, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/network_instance (string) + + YANG Description: When applicable, this is the name of a network instance +from which the information is learned. + """ + return self.__network_instance + + def _set_network_instance(self, v, load=False): + """ + Setter method for network_instance, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/network_instance (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_instance is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_instance() directly. + + YANG Description: When applicable, this is the name of a network instance +from which the information is learned. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_instance must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__network_instance = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_instance(self): + self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_topology(self): + """ + Getter method for topology, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/topology (container) + + YANG Description: When the information is processed by the system, +the attributes in this container indicate which topology +is used to generate the result information. + """ + return self.__topology + + def _set_topology(self, v, load=False): + """ + Setter method for topology, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/topology (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_topology is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_topology() directly. + + YANG Description: When the information is processed by the system, +the attributes in this container indicate which topology +is used to generate the result information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """topology must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__topology = t + if hasattr(self, '_set'): + self._set() + + def _unset_topology(self): + self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + credibility_preference = __builtin__.property(_get_credibility_preference) + logical_network_element = __builtin__.property(_get_logical_network_element) + network_instance = __builtin__.property(_get_network_instance) + topology = __builtin__.property(_get_topology) + + + _pyangbind_elements = OrderedDict([('credibility_preference', credibility_preference), ('logical_network_element', logical_network_element), ('network_instance', network_instance), ('topology', topology), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0c611a8e1a8ca42bd8fd0e26b2027e038f96a3a0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class topology(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/information-source-state/topology. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: When the information is processed by the system, +the attributes in this container indicate which topology +is used to generate the result information. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_ref','__network_ref',) + + _yang_name = 'topology' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'information-source-state', 'topology'] + + def _get_link_ref(self): + """ + Getter method for link_ref, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/topology/link_ref (leafref) + + YANG Description: A type for an absolute reference to a link instance. +(This type should not be used for relative references. +In such a case, a relative path should be used instead.) + """ + return self.__link_ref + + def _set_link_ref(self, v, load=False): + """ + Setter method for link_ref, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/topology/link_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_ref() directly. + + YANG Description: A type for an absolute reference to a link instance. +(This type should not be used for relative references. +In such a case, a relative path should be used instead.) + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__link_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_ref(self): + self.__link_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/topology/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/link/te/information_source_entry/information_source_state/topology/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + link_ref = __builtin__.property(_get_link_ref) + network_ref = __builtin__.property(_get_network_ref) + + + _pyangbind_elements = OrderedDict([('link_ref', link_ref), ('network_ref', network_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..55c5599b7241e9668f3e096676957d5d85559d6e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py @@ -0,0 +1,206 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import max_lsp_bandwidth +class interface_switching_capability(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/interface-switching-capability. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of ISCDs for this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__switching_capability','__encoding','__max_lsp_bandwidth',) + + _yang_name = 'interface-switching-capability' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'interface-switching-capability'] + + def _get_switching_capability(self): + """ + Getter method for switching_capability, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/switching_capability (identityref) + + YANG Description: Switching capability for this interface. + """ + return self.__switching_capability + + def _set_switching_capability(self, v, load=False): + """ + Setter method for switching_capability, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/switching_capability (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_switching_capability is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_switching_capability() directly. + + YANG Description: Switching capability for this interface. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """switching_capability must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__switching_capability = t + if hasattr(self, '_set'): + self._set() + + def _unset_switching_capability(self): + self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_encoding(self): + """ + Getter method for encoding, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/encoding (identityref) + + YANG Description: Encoding supported by this interface. + """ + return self.__encoding + + def _set_encoding(self, v, load=False): + """ + Setter method for encoding, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/encoding (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_encoding is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_encoding() directly. + + YANG Description: Encoding supported by this interface. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """encoding must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__encoding = t + if hasattr(self, '_set'): + self._set() + + def _unset_encoding(self): + self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_max_lsp_bandwidth(self): + """ + Getter method for max_lsp_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth (list) + + YANG Description: Maximum Label Switched Path (LSP) bandwidth at +priorities 0-7. + """ + return self.__max_lsp_bandwidth + + def _set_max_lsp_bandwidth(self, v, load=False): + """ + Setter method for max_lsp_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_lsp_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_lsp_bandwidth() directly. + + YANG Description: Maximum Label Switched Path (LSP) bandwidth at +priorities 0-7. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_lsp_bandwidth must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__max_lsp_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_lsp_bandwidth(self): + self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + switching_capability = __builtin__.property(_get_switching_capability) + encoding = __builtin__.property(_get_encoding) + max_lsp_bandwidth = __builtin__.property(_get_max_lsp_bandwidth) + + + _pyangbind_elements = OrderedDict([('switching_capability', switching_capability), ('encoding', encoding), ('max_lsp_bandwidth', max_lsp_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..752eac9297da6d3ec6d48954f7a032b82abf3303 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class max_lsp_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/interface-switching-capability/max-lsp-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum Label Switched Path (LSP) bandwidth at +priorities 0-7. + """ + __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) + + _yang_name = 'max-lsp-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'interface-switching-capability', 'max-lsp-bandwidth'] + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/priority (uint8) + + YANG Description: Priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + priority = __builtin__.property(_get_priority) + te_bandwidth = __builtin__.property(_get_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4daa8700c655939dce89ef26b11e3c2d55a64fe7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/interface-switching-capability/max-lsp-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) + + YANG Description: Maximum bandwidth attributes for OTN paths. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Maximum bandwidth attributes for OTN paths. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ad8f9372d6e04795ddb3eb99f152fd3f3e3b8ff7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,156 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/interface-switching-capability/max-lsp-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum bandwidth attributes for OTN paths. + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__max_ts_number',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_max_ts_number(self): + """ + Getter method for max_ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) + + YANG Description: The maximum number of Tributary Slots (TS) that could be +used by an ODUflex LSP. + """ + return self.__max_ts_number + + def _set_max_ts_number(self, v, load=False): + """ + Setter method for max_ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_ts_number() directly. + + YANG Description: The maximum number of Tributary Slots (TS) that could be +used by an ODUflex LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", + }) + + self.__max_ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_ts_number(self): + self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + odu_type = __builtin__.property(_get_odu_type) + max_ts_number = __builtin__.property(_get_max_ts_number) + + __choices__ = {'technology': {'otn': ['odu_type', 'max_ts_number']}} + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('max_ts_number', max_ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..47f225a474f9b60c3d999754bcfa23c4c6f8ce39 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restriction +class label_restrictions(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The label restrictions container. + """ + __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) + + _yang_name = 'label-restrictions' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions'] + + def _get_label_restriction(self): + """ + Getter method for label_restriction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction (list) + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + return self.__label_restriction + + def _set_label_restriction(self, v, load=False): + """ + Setter method for label_restriction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restriction() directly. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restriction must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__label_restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restriction(self): + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + label_restriction = __builtin__.property(_get_label_restriction) + + + _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c7ec9312da9070501e2186075828475e1b5fba41 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,450 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_start +from . import label_end +from . import label_step +from . import otn_label_range +from . import ethernet_label_range +class label_restriction(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) + + _yang_name = 'label-restriction' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction'] + + def _get_restriction(self): + """ + Getter method for restriction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/restriction (enumeration) + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + return self.__restriction + + def _set_restriction(self, v, load=False): + """ + Setter method for restriction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/restriction (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restriction() directly. + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restriction must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False)""", + }) + + self.__restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_restriction(self): + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) + + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/index (uint32) + + YANG Description: The index of the label restriction list entry. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: The index of the label restriction list entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_label_start(self): + """ + Getter method for label_start, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start (container) + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + return self.__label_start + + def _set_label_start(self, v, load=False): + """ + Setter method for label_start, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_start is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_start() directly. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_start must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_start = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_start(self): + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_end(self): + """ + Getter method for label_end, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end (container) + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + return self.__label_end + + def _set_label_end(self, v, load=False): + """ + Setter method for label_end, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_end is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_end() directly. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_end must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_end = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_end(self): + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_step(self): + """ + Getter method for label_step, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step (container) + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + return self.__label_step + + def _set_label_step(self, v, load=False): + """ + Setter method for label_step, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_step() directly. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_step must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_step(self): + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_range_bitmap(self): + """ + Getter method for range_bitmap, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + return self.__range_bitmap + + def _set_range_bitmap(self, v, load=False): + """ + Setter method for range_bitmap, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_bitmap is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_bitmap() directly. + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", + 'defined-type': "yang:hex-string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False)""", + }) + + self.__range_bitmap = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_bitmap(self): + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) + + + def _get_otn_label_range(self): + """ + Getter method for otn_label_range, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range (container) + + YANG Description: Label range information for OTN. + """ + return self.__otn_label_range + + def _set_otn_label_range(self, v, load=False): + """ + Setter method for otn_label_range, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_label_range() directly. + + YANG Description: Label range information for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_label_range(self): + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_ethernet_label_range(self): + """ + Getter method for ethernet_label_range, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range (container) + + YANG Description: Ethernet-specific label range related information. + """ + return self.__ethernet_label_range + + def _set_ethernet_label_range(self, v, load=False): + """ + Setter method for ethernet_label_range, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ethernet_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ethernet_label_range() directly. + + YANG Description: Ethernet-specific label range related information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ethernet_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False)""", + }) + + self.__ethernet_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_ethernet_label_range(self): + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) + + restriction = __builtin__.property(_get_restriction) + index = __builtin__.property(_get_index) + label_start = __builtin__.property(_get_label_start) + label_end = __builtin__.property(_get_label_end) + label_step = __builtin__.property(_get_label_step) + range_bitmap = __builtin__.property(_get_range_bitmap) + otn_label_range = __builtin__.property(_get_otn_label_range) + ethernet_label_range = __builtin__.property(_get_ethernet_label_range) + + + _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..24ee2d6c9eb7e614af7c24cb021ecf3e8bbec37f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ethernet_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/ethernet-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Ethernet-specific label range related information. + """ + __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) + + _yang_name = 'ethernet-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] + + def _get_tag_type(self): + """ + Getter method for tag_type, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + + YANG Description: VLAN tag type. + """ + return self.__tag_type + + def _set_tag_type(self, v, load=False): + """ + Setter method for tag_type, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_tag_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tag_type() directly. + + YANG Description: VLAN tag type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False)""", + }) + + self.__tag_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tag_type(self): + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + + YANG Description: priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) + + tag_type = __builtin__.property(_get_tag_type) + priority = __builtin__.property(_get_priority) + + + _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..105618cf962c111e7ad33e76558bc7b66b9fcc02 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_end(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-end. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-end' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-end'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..696280486ca37ef012a8d6922a4b02bdb97cd962 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-end/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7e552cd7f5bbd878169dcea7fcad11fababa33c3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + tpn = __builtin__.property(_get_tpn) + ts = __builtin__.property(_get_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..06a33be37046c1c858cc68551313870f90938490 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_start(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-start. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-start' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-start'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d3235b9852c0ba32525cff5dedaa0c3520aca84 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-start/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4a9eb242fbf4924e016e63eea71592da5037c09c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + tpn = __builtin__.property(_get_tpn) + ts = __builtin__.property(_get_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7fa272ea37185dd4b507c1e4be37a069b4bdb30 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class label_step(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-step. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) + + _yang_name = 'label-step' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-step'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/generic (int32) + + YANG Description: Label range step. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/generic (int32) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Label range step. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with int32""", + 'defined-type': "int32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn (container) + + YANG Description: Label step for OTN + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label step for OTN + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_eth_step(self): + """ + Getter method for eth_step, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/eth_step (uint16) + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + return self.__eth_step + + def _set_eth_step(self, v, load=False): + """ + Setter method for eth_step, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/eth_step (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_step() directly. + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_step must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False)""", + }) + + self.__eth_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_step(self): + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + eth_step = __builtin__.property(_get_eth_step) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..335aed796e0f84d0f3731e9be362cae8cc4f2965 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/label-step/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label step for OTN + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + tpn = __builtin__.property(_get_tpn) + ts = __builtin__.property(_get_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0c3ff7aaa3f7c1b854e39cc8354e4266ba4edcc7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/__init__.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/label-restrictions/label-restriction/otn-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label range information for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) + + _yang_name = 'otn-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'label-restrictions', 'label-restriction', 'otn-label-range'] + + def _get_range_type(self): + """ + Getter method for range_type, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + return self.__range_type + + def _set_range_type(self, v, load=False): + """ + Setter method for range_type, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_type() directly. + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_type must be of a type compatible with otn-label-range-type""", + 'defined-type': "ietf-otn-topology:otn-label-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False)""", + }) + + self.__range_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_type(self): + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_odu_type_list(self): + """ + Getter method for odu_type_list, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + return self.__odu_type_list + + def _set_odu_type_list(self, v, load=False): + """ + Setter method for odu_type_list, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type_list() directly. + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type_list must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__odu_type_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type_list(self): + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/priority (uint8) + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/label_restrictions/label_restriction/otn_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) + + range_type = __builtin__.property(_get_range_type) + tsg = __builtin__.property(_get_tsg) + odu_type_list = __builtin__.property(_get_odu_type_list) + priority = __builtin__.property(_get_priority) + + + _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cfa184bcb7f70d3487c2ef807e7a4dc7f183a019 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class max_link_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-link-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum bandwidth that can be seen on this link in this +direction. Units are in bytes per second. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth',) + + _yang_name = 'max-link-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-link-bandwidth'] + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_bandwidth = __builtin__.property(_get_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..26e64557cb2e40f6f9e91f44530f26bca4d556fb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-link-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-link-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ff7bba04afb55d61988936b62f141b6ae3796755 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-link-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-link-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + + odulist = __builtin__.property(_get_odulist) + + + _pyangbind_elements = OrderedDict([('odulist', odulist), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..544fbbda76a2a0fb4dc5fc3fb7236780515fa20f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-link-bandwidth/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-link-bandwidth', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + odu_type = __builtin__.property(_get_odu_type) + number = __builtin__.property(_get_number) + ts_number = __builtin__.property(_get_ts_number) + + + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..08adf3f16a27f9fe208f257505f655c4f88fa2f8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class max_resv_link_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-resv-link-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum amount of bandwidth that can be reserved in this +direction in this link. Units are in bytes per second. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth',) + + _yang_name = 'max-resv-link-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-resv-link-bandwidth'] + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_bandwidth = __builtin__.property(_get_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bf441d72d2f80a12227ce3f3eecf6275d1f79e66 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-resv-link-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-resv-link-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1e7147727f540e9b913603adac8f4b86f57656f3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-resv-link-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-resv-link-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + + odulist = __builtin__.property(_get_odulist) + + + _pyangbind_elements = OrderedDict([('odulist', odulist), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aff2126e7b12c1cb338d0a6fdd65143bc69d5da4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/max-resv-link-bandwidth/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'max-resv-link-bandwidth', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + odu_type = __builtin__.property(_get_odu_type) + number = __builtin__.property(_get_number) + ts_number = __builtin__.property(_get_ts_number) + + + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a6704d845bcc2e4fefefa4eb79c27eb94472c2ad --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class te_nsrlgs(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/te-nsrlgs. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). +When an abstract TE link is configured, this list specifies +the request that underlay TE paths need to be mutually +disjoint with other TE links in the same groups. + """ + __slots__ = ('_path_helper', '_extmethods', '__id',) + + _yang_name = 'te-nsrlgs' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'te-nsrlgs'] + + def _get_id(self): + """ + Getter method for id, mapped from YANG variable /networks/network/link/te/information_source_entry/te_nsrlgs/id (uint32) + + YANG Description: NSRLG ID, uniquely configured within a topology. + """ + return self.__id + + def _set_id(self, v, load=False): + """ + Setter method for id, mapped from YANG variable /networks/network/link/te/information_source_entry/te_nsrlgs/id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_id() directly. + + YANG Description: NSRLG ID, uniquely configured within a topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__id = t + if hasattr(self, '_set'): + self._set() + + def _unset_id(self): + self.__id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + id = __builtin__.property(_get_id) + + + _pyangbind_elements = OrderedDict([('id', id), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9c51afe6b0c912238c170753f4f2979b9a08851c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class te_srlgs(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/te-srlgs. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains a list of SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__value',) + + _yang_name = 'te-srlgs' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'te-srlgs'] + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/link/te/information_source_entry/te_srlgs/value (te-types:srlg) + + YANG Description: SRLG value. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/link/te/information_source_entry/te_srlgs/value (te-types:srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: SRLG value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with te-types:srlg""", + 'defined-type': "te-types:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=False)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=False) + + value = __builtin__.property(_get_value) + + + _pyangbind_elements = OrderedDict([('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a2151706363bc91a46c2a2126406a55309598f01 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class unreserved_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/unreserved-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in +bytes per second. + """ + __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) + + _yang_name = 'unreserved-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'unreserved-bandwidth'] + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/priority (uint8) + + YANG Description: Priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + priority = __builtin__.property(_get_priority) + te_bandwidth = __builtin__.property(_get_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c786d1941f8b391e743a8422f6d23a13913c2f88 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/unreserved-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'unreserved-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8e3a01bcafc387f6a74c8904eb2f8582932998a1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/unreserved-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'unreserved-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + + odulist = __builtin__.property(_get_odulist) + + + _pyangbind_elements = OrderedDict([('odulist', odulist), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a0e9a8f1d89ec9dac1dd28f9aef4431b271883c0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-entry/unreserved-bandwidth/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-entry', 'unreserved-bandwidth', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + odu_type = __builtin__.property(_get_odu_type) + number = __builtin__.property(_get_number) + ts_number = __builtin__.property(_get_ts_number) + + + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_state/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4646d00267a1a8740cddfd61eb2f6f55e6d241bd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_state/__init__.py @@ -0,0 +1,248 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import topology +class information_source_state(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-state. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains state attributes related to the information +source. + """ + __slots__ = ('_path_helper', '_extmethods', '__credibility_preference','__logical_network_element','__network_instance','__topology',) + + _yang_name = 'information-source-state' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-state'] + + def _get_credibility_preference(self): + """ + Getter method for credibility_preference, mapped from YANG variable /networks/network/link/te/information_source_state/credibility_preference (uint16) + + YANG Description: The preference value for calculating the Traffic +Engineering database credibility value used for +tie-break selection between different information-source +values. A higher value is preferable. + """ + return self.__credibility_preference + + def _set_credibility_preference(self, v, load=False): + """ + Setter method for credibility_preference, mapped from YANG variable /networks/network/link/te/information_source_state/credibility_preference (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_credibility_preference is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_credibility_preference() directly. + + YANG Description: The preference value for calculating the Traffic +Engineering database credibility value used for +tie-break selection between different information-source +values. A higher value is preferable. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """credibility_preference must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False)""", + }) + + self.__credibility_preference = t + if hasattr(self, '_set'): + self._set() + + def _unset_credibility_preference(self): + self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + + + def _get_logical_network_element(self): + """ + Getter method for logical_network_element, mapped from YANG variable /networks/network/link/te/information_source_state/logical_network_element (string) + + YANG Description: When applicable, this is the name of a logical network +element from which the information is learned. + """ + return self.__logical_network_element + + def _set_logical_network_element(self, v, load=False): + """ + Setter method for logical_network_element, mapped from YANG variable /networks/network/link/te/information_source_state/logical_network_element (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_logical_network_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_logical_network_element() directly. + + YANG Description: When applicable, this is the name of a logical network +element from which the information is learned. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """logical_network_element must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__logical_network_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_logical_network_element(self): + self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_network_instance(self): + """ + Getter method for network_instance, mapped from YANG variable /networks/network/link/te/information_source_state/network_instance (string) + + YANG Description: When applicable, this is the name of a network instance +from which the information is learned. + """ + return self.__network_instance + + def _set_network_instance(self, v, load=False): + """ + Setter method for network_instance, mapped from YANG variable /networks/network/link/te/information_source_state/network_instance (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_instance is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_instance() directly. + + YANG Description: When applicable, this is the name of a network instance +from which the information is learned. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_instance must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__network_instance = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_instance(self): + self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_topology(self): + """ + Getter method for topology, mapped from YANG variable /networks/network/link/te/information_source_state/topology (container) + + YANG Description: When the information is processed by the system, +the attributes in this container indicate which topology +is used to generate the result information. + """ + return self.__topology + + def _set_topology(self, v, load=False): + """ + Setter method for topology, mapped from YANG variable /networks/network/link/te/information_source_state/topology (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_topology is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_topology() directly. + + YANG Description: When the information is processed by the system, +the attributes in this container indicate which topology +is used to generate the result information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """topology must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__topology = t + if hasattr(self, '_set'): + self._set() + + def _unset_topology(self): + self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + credibility_preference = __builtin__.property(_get_credibility_preference) + logical_network_element = __builtin__.property(_get_logical_network_element) + network_instance = __builtin__.property(_get_network_instance) + topology = __builtin__.property(_get_topology) + + + _pyangbind_elements = OrderedDict([('credibility_preference', credibility_preference), ('logical_network_element', logical_network_element), ('network_instance', network_instance), ('topology', topology), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_state/topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_state/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6a22bed59f6d55f3d9c34838f790317f68e64361 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/information_source_state/topology/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class topology(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/information-source-state/topology. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: When the information is processed by the system, +the attributes in this container indicate which topology +is used to generate the result information. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_ref','__network_ref',) + + _yang_name = 'topology' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'information-source-state', 'topology'] + + def _get_link_ref(self): + """ + Getter method for link_ref, mapped from YANG variable /networks/network/link/te/information_source_state/topology/link_ref (leafref) + + YANG Description: A type for an absolute reference to a link instance. +(This type should not be used for relative references. +In such a case, a relative path should be used instead.) + """ + return self.__link_ref + + def _set_link_ref(self, v, load=False): + """ + Setter method for link_ref, mapped from YANG variable /networks/network/link/te/information_source_state/topology/link_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_ref() directly. + + YANG Description: A type for an absolute reference to a link instance. +(This type should not be used for relative references. +In such a case, a relative path should be used instead.) + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__link_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_ref(self): + self.__link_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/link/te/information_source_state/topology/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/link/te/information_source_state/topology/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + link_ref = __builtin__.property(_get_link_ref) + network_ref = __builtin__.property(_get_network_ref) + + + _pyangbind_elements = OrderedDict([('link_ref', link_ref), ('network_ref', network_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/recovery/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/recovery/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..441cf6d42f12b1cb923eb18703988060e533fb5f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/recovery/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class recovery(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/recovery. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Status of the recovery process. + """ + __slots__ = ('_path_helper', '_extmethods', '__restoration_status','__protection_status',) + + _yang_name = 'recovery' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__restoration_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="restoration-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False) + self.__protection_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="protection-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'recovery'] + + def _get_restoration_status(self): + """ + Getter method for restoration_status, mapped from YANG variable /networks/network/link/te/recovery/restoration_status (te-types:te-recovery-status) + + YANG Description: Restoration status. + """ + return self.__restoration_status + + def _set_restoration_status(self, v, load=False): + """ + Setter method for restoration_status, mapped from YANG variable /networks/network/link/te/recovery/restoration_status (te-types:te-recovery-status) + If this variable is read-only (config: false) in the + source YANG file, then _set_restoration_status is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restoration_status() directly. + + YANG Description: Restoration status. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="restoration-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restoration_status must be of a type compatible with te-types:te-recovery-status""", + 'defined-type': "te-types:te-recovery-status", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="restoration-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False)""", + }) + + self.__restoration_status = t + if hasattr(self, '_set'): + self._set() + + def _unset_restoration_status(self): + self.__restoration_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="restoration-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False) + + + def _get_protection_status(self): + """ + Getter method for protection_status, mapped from YANG variable /networks/network/link/te/recovery/protection_status (te-types:te-recovery-status) + + YANG Description: Protection status. + """ + return self.__protection_status + + def _set_protection_status(self, v, load=False): + """ + Setter method for protection_status, mapped from YANG variable /networks/network/link/te/recovery/protection_status (te-types:te-recovery-status) + If this variable is read-only (config: false) in the + source YANG file, then _set_protection_status is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_protection_status() directly. + + YANG Description: Protection status. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="protection-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """protection_status must be of a type compatible with te-types:te-recovery-status""", + 'defined-type': "te-types:te-recovery-status", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="protection-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False)""", + }) + + self.__protection_status = t + if hasattr(self, '_set'): + self._set() + + def _unset_protection_status(self): + self.__protection_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'normal': {}, 'recovery-started': {}, 'recovery-succeeded': {}, 'recovery-failed': {}, 'reversion-started': {}, 'reversion-succeeded': {}, 'reversion-failed': {}, 'recovery-unavailable': {}, 'recovery-admin': {}, 'wait-to-restore': {}},), is_leaf=True, yang_name="protection-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-recovery-status', is_config=False) + + restoration_status = __builtin__.property(_get_restoration_status) + protection_status = __builtin__.property(_get_protection_status) + + + _pyangbind_elements = OrderedDict([('restoration_status', restoration_status), ('protection_status', protection_status), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/statistics/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/statistics/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbfbda90fca5f685855f866bba04ab806cb12b35 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/statistics/__init__.py @@ -0,0 +1,810 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class statistics(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/statistics. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Statistics data. + """ + __slots__ = ('_path_helper', '_extmethods', '__discontinuity_time','__disables','__enables','__maintenance_clears','__maintenance_sets','__modifies','__downs','__ups','__fault_clears','__fault_detects','__protection_switches','__protection_reverts','__restoration_failures','__restoration_starts','__restoration_successes','__restoration_reversion_failures','__restoration_reversion_starts','__restoration_reversion_successes',) + + _yang_name = 'statistics' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__discontinuity_time = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) + self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__maintenance_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__maintenance_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__downs = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__ups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__fault_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__fault_detects = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-detects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__protection_switches = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-switches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__protection_reverts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-reverts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__restoration_failures = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__restoration_starts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__restoration_successes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__restoration_reversion_failures = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__restoration_reversion_starts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__restoration_reversion_successes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'statistics'] + + def _get_discontinuity_time(self): + """ + Getter method for discontinuity_time, mapped from YANG variable /networks/network/link/te/statistics/discontinuity_time (yang:date-and-time) + + YANG Description: The time of the most recent occasion at which any one or +more of this interface's counters suffered a +discontinuity. If no such discontinuities have occurred +since the last re-initialization of the local management +subsystem, then this node contains the time the local +management subsystem re-initialized itself. + """ + return self.__discontinuity_time + + def _set_discontinuity_time(self, v, load=False): + """ + Setter method for discontinuity_time, mapped from YANG variable /networks/network/link/te/statistics/discontinuity_time (yang:date-and-time) + If this variable is read-only (config: false) in the + source YANG file, then _set_discontinuity_time is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_discontinuity_time() directly. + + YANG Description: The time of the most recent occasion at which any one or +more of this interface's counters suffered a +discontinuity. If no such discontinuities have occurred +since the last re-initialization of the local management +subsystem, then this node contains the time the local +management subsystem re-initialized itself. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """discontinuity_time must be of a type compatible with yang:date-and-time""", + 'defined-type': "yang:date-and-time", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False)""", + }) + + self.__discontinuity_time = t + if hasattr(self, '_set'): + self._set() + + def _unset_discontinuity_time(self): + self.__discontinuity_time = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) + + + def _get_disables(self): + """ + Getter method for disables, mapped from YANG variable /networks/network/link/te/statistics/disables (yang:counter32) + + YANG Description: Number of times that a link was disabled. + """ + return self.__disables + + def _set_disables(self, v, load=False): + """ + Setter method for disables, mapped from YANG variable /networks/network/link/te/statistics/disables (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_disables is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_disables() directly. + + YANG Description: Number of times that a link was disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """disables must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__disables = t + if hasattr(self, '_set'): + self._set() + + def _unset_disables(self): + self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_enables(self): + """ + Getter method for enables, mapped from YANG variable /networks/network/link/te/statistics/enables (yang:counter32) + + YANG Description: Number of times that a link was enabled. + """ + return self.__enables + + def _set_enables(self, v, load=False): + """ + Setter method for enables, mapped from YANG variable /networks/network/link/te/statistics/enables (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_enables is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enables() directly. + + YANG Description: Number of times that a link was enabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enables must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__enables = t + if hasattr(self, '_set'): + self._set() + + def _unset_enables(self): + self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_maintenance_clears(self): + """ + Getter method for maintenance_clears, mapped from YANG variable /networks/network/link/te/statistics/maintenance_clears (yang:counter32) + + YANG Description: Number of times that a link was taken out of maintenance. + """ + return self.__maintenance_clears + + def _set_maintenance_clears(self, v, load=False): + """ + Setter method for maintenance_clears, mapped from YANG variable /networks/network/link/te/statistics/maintenance_clears (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_maintenance_clears is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_maintenance_clears() directly. + + YANG Description: Number of times that a link was taken out of maintenance. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """maintenance_clears must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__maintenance_clears = t + if hasattr(self, '_set'): + self._set() + + def _unset_maintenance_clears(self): + self.__maintenance_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_maintenance_sets(self): + """ + Getter method for maintenance_sets, mapped from YANG variable /networks/network/link/te/statistics/maintenance_sets (yang:counter32) + + YANG Description: Number of times that a link was put in maintenance. + """ + return self.__maintenance_sets + + def _set_maintenance_sets(self, v, load=False): + """ + Setter method for maintenance_sets, mapped from YANG variable /networks/network/link/te/statistics/maintenance_sets (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_maintenance_sets is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_maintenance_sets() directly. + + YANG Description: Number of times that a link was put in maintenance. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """maintenance_sets must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__maintenance_sets = t + if hasattr(self, '_set'): + self._set() + + def _unset_maintenance_sets(self): + self.__maintenance_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_modifies(self): + """ + Getter method for modifies, mapped from YANG variable /networks/network/link/te/statistics/modifies (yang:counter32) + + YANG Description: Number of times that a link was modified. + """ + return self.__modifies + + def _set_modifies(self, v, load=False): + """ + Setter method for modifies, mapped from YANG variable /networks/network/link/te/statistics/modifies (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_modifies is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_modifies() directly. + + YANG Description: Number of times that a link was modified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """modifies must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__modifies = t + if hasattr(self, '_set'): + self._set() + + def _unset_modifies(self): + self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_downs(self): + """ + Getter method for downs, mapped from YANG variable /networks/network/link/te/statistics/downs (yang:counter32) + + YANG Description: Number of times that a link was set to an operational state +of 'down'. + """ + return self.__downs + + def _set_downs(self, v, load=False): + """ + Setter method for downs, mapped from YANG variable /networks/network/link/te/statistics/downs (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_downs is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_downs() directly. + + YANG Description: Number of times that a link was set to an operational state +of 'down'. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """downs must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__downs = t + if hasattr(self, '_set'): + self._set() + + def _unset_downs(self): + self.__downs = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_ups(self): + """ + Getter method for ups, mapped from YANG variable /networks/network/link/te/statistics/ups (yang:counter32) + + YANG Description: Number of times that a link was set to an operational state +of 'up'. + """ + return self.__ups + + def _set_ups(self, v, load=False): + """ + Setter method for ups, mapped from YANG variable /networks/network/link/te/statistics/ups (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_ups is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ups() directly. + + YANG Description: Number of times that a link was set to an operational state +of 'up'. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ups must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__ups = t + if hasattr(self, '_set'): + self._set() + + def _unset_ups(self): + self.__ups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_fault_clears(self): + """ + Getter method for fault_clears, mapped from YANG variable /networks/network/link/te/statistics/fault_clears (yang:counter32) + + YANG Description: Number of times that a link experienced a fault-clear +event. + """ + return self.__fault_clears + + def _set_fault_clears(self, v, load=False): + """ + Setter method for fault_clears, mapped from YANG variable /networks/network/link/te/statistics/fault_clears (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_fault_clears is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_fault_clears() directly. + + YANG Description: Number of times that a link experienced a fault-clear +event. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """fault_clears must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__fault_clears = t + if hasattr(self, '_set'): + self._set() + + def _unset_fault_clears(self): + self.__fault_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_fault_detects(self): + """ + Getter method for fault_detects, mapped from YANG variable /networks/network/link/te/statistics/fault_detects (yang:counter32) + + YANG Description: Number of times that a link experienced fault detection. + """ + return self.__fault_detects + + def _set_fault_detects(self, v, load=False): + """ + Setter method for fault_detects, mapped from YANG variable /networks/network/link/te/statistics/fault_detects (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_fault_detects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_fault_detects() directly. + + YANG Description: Number of times that a link experienced fault detection. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-detects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """fault_detects must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-detects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__fault_detects = t + if hasattr(self, '_set'): + self._set() + + def _unset_fault_detects(self): + self.__fault_detects = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="fault-detects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_protection_switches(self): + """ + Getter method for protection_switches, mapped from YANG variable /networks/network/link/te/statistics/protection_switches (yang:counter32) + + YANG Description: Number of times that a link experienced protection +switchover. + """ + return self.__protection_switches + + def _set_protection_switches(self, v, load=False): + """ + Setter method for protection_switches, mapped from YANG variable /networks/network/link/te/statistics/protection_switches (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_protection_switches is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_protection_switches() directly. + + YANG Description: Number of times that a link experienced protection +switchover. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-switches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """protection_switches must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-switches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__protection_switches = t + if hasattr(self, '_set'): + self._set() + + def _unset_protection_switches(self): + self.__protection_switches = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-switches", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_protection_reverts(self): + """ + Getter method for protection_reverts, mapped from YANG variable /networks/network/link/te/statistics/protection_reverts (yang:counter32) + + YANG Description: Number of times that a link experienced protection +reversion. + """ + return self.__protection_reverts + + def _set_protection_reverts(self, v, load=False): + """ + Setter method for protection_reverts, mapped from YANG variable /networks/network/link/te/statistics/protection_reverts (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_protection_reverts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_protection_reverts() directly. + + YANG Description: Number of times that a link experienced protection +reversion. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-reverts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """protection_reverts must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-reverts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__protection_reverts = t + if hasattr(self, '_set'): + self._set() + + def _unset_protection_reverts(self): + self.__protection_reverts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="protection-reverts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_restoration_failures(self): + """ + Getter method for restoration_failures, mapped from YANG variable /networks/network/link/te/statistics/restoration_failures (yang:counter32) + + YANG Description: Number of times that a link experienced restoration +failure. + """ + return self.__restoration_failures + + def _set_restoration_failures(self, v, load=False): + """ + Setter method for restoration_failures, mapped from YANG variable /networks/network/link/te/statistics/restoration_failures (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_restoration_failures is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restoration_failures() directly. + + YANG Description: Number of times that a link experienced restoration +failure. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restoration_failures must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__restoration_failures = t + if hasattr(self, '_set'): + self._set() + + def _unset_restoration_failures(self): + self.__restoration_failures = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_restoration_starts(self): + """ + Getter method for restoration_starts, mapped from YANG variable /networks/network/link/te/statistics/restoration_starts (yang:counter32) + + YANG Description: Number of times that a link experienced restoration +start. + """ + return self.__restoration_starts + + def _set_restoration_starts(self, v, load=False): + """ + Setter method for restoration_starts, mapped from YANG variable /networks/network/link/te/statistics/restoration_starts (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_restoration_starts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restoration_starts() directly. + + YANG Description: Number of times that a link experienced restoration +start. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restoration_starts must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__restoration_starts = t + if hasattr(self, '_set'): + self._set() + + def _unset_restoration_starts(self): + self.__restoration_starts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_restoration_successes(self): + """ + Getter method for restoration_successes, mapped from YANG variable /networks/network/link/te/statistics/restoration_successes (yang:counter32) + + YANG Description: Number of times that a link experienced restoration +success. + """ + return self.__restoration_successes + + def _set_restoration_successes(self, v, load=False): + """ + Setter method for restoration_successes, mapped from YANG variable /networks/network/link/te/statistics/restoration_successes (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_restoration_successes is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restoration_successes() directly. + + YANG Description: Number of times that a link experienced restoration +success. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restoration_successes must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__restoration_successes = t + if hasattr(self, '_set'): + self._set() + + def _unset_restoration_successes(self): + self.__restoration_successes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_restoration_reversion_failures(self): + """ + Getter method for restoration_reversion_failures, mapped from YANG variable /networks/network/link/te/statistics/restoration_reversion_failures (yang:counter32) + + YANG Description: Number of times that a link experienced restoration +reversion failure. + """ + return self.__restoration_reversion_failures + + def _set_restoration_reversion_failures(self, v, load=False): + """ + Setter method for restoration_reversion_failures, mapped from YANG variable /networks/network/link/te/statistics/restoration_reversion_failures (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_restoration_reversion_failures is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restoration_reversion_failures() directly. + + YANG Description: Number of times that a link experienced restoration +reversion failure. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restoration_reversion_failures must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__restoration_reversion_failures = t + if hasattr(self, '_set'): + self._set() + + def _unset_restoration_reversion_failures(self): + self.__restoration_reversion_failures = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-failures", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_restoration_reversion_starts(self): + """ + Getter method for restoration_reversion_starts, mapped from YANG variable /networks/network/link/te/statistics/restoration_reversion_starts (yang:counter32) + + YANG Description: Number of times that a link experienced restoration +reversion start. + """ + return self.__restoration_reversion_starts + + def _set_restoration_reversion_starts(self, v, load=False): + """ + Setter method for restoration_reversion_starts, mapped from YANG variable /networks/network/link/te/statistics/restoration_reversion_starts (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_restoration_reversion_starts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restoration_reversion_starts() directly. + + YANG Description: Number of times that a link experienced restoration +reversion start. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restoration_reversion_starts must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__restoration_reversion_starts = t + if hasattr(self, '_set'): + self._set() + + def _unset_restoration_reversion_starts(self): + self.__restoration_reversion_starts = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-starts", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_restoration_reversion_successes(self): + """ + Getter method for restoration_reversion_successes, mapped from YANG variable /networks/network/link/te/statistics/restoration_reversion_successes (yang:counter32) + + YANG Description: Number of times that a link experienced restoration +reversion success. + """ + return self.__restoration_reversion_successes + + def _set_restoration_reversion_successes(self, v, load=False): + """ + Setter method for restoration_reversion_successes, mapped from YANG variable /networks/network/link/te/statistics/restoration_reversion_successes (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_restoration_reversion_successes is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restoration_reversion_successes() directly. + + YANG Description: Number of times that a link experienced restoration +reversion success. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restoration_reversion_successes must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__restoration_reversion_successes = t + if hasattr(self, '_set'): + self._set() + + def _unset_restoration_reversion_successes(self): + self.__restoration_reversion_successes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="restoration-reversion-successes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + discontinuity_time = __builtin__.property(_get_discontinuity_time) + disables = __builtin__.property(_get_disables) + enables = __builtin__.property(_get_enables) + maintenance_clears = __builtin__.property(_get_maintenance_clears) + maintenance_sets = __builtin__.property(_get_maintenance_sets) + modifies = __builtin__.property(_get_modifies) + downs = __builtin__.property(_get_downs) + ups = __builtin__.property(_get_ups) + fault_clears = __builtin__.property(_get_fault_clears) + fault_detects = __builtin__.property(_get_fault_detects) + protection_switches = __builtin__.property(_get_protection_switches) + protection_reverts = __builtin__.property(_get_protection_reverts) + restoration_failures = __builtin__.property(_get_restoration_failures) + restoration_starts = __builtin__.property(_get_restoration_starts) + restoration_successes = __builtin__.property(_get_restoration_successes) + restoration_reversion_failures = __builtin__.property(_get_restoration_reversion_failures) + restoration_reversion_starts = __builtin__.property(_get_restoration_reversion_starts) + restoration_reversion_successes = __builtin__.property(_get_restoration_reversion_successes) + + + _pyangbind_elements = OrderedDict([('discontinuity_time', discontinuity_time), ('disables', disables), ('enables', enables), ('maintenance_clears', maintenance_clears), ('maintenance_sets', maintenance_sets), ('modifies', modifies), ('downs', downs), ('ups', ups), ('fault_clears', fault_clears), ('fault_detects', fault_detects), ('protection_switches', protection_switches), ('protection_reverts', protection_reverts), ('restoration_failures', restoration_failures), ('restoration_starts', restoration_starts), ('restoration_successes', restoration_successes), ('restoration_reversion_failures', restoration_reversion_failures), ('restoration_reversion_starts', restoration_reversion_starts), ('restoration_reversion_successes', restoration_reversion_successes), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f83e385c43cf4ee2c24fa6bde7b528d15df5ae2c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/__init__.py @@ -0,0 +1,938 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import external_domain +from . import underlay +from . import interface_switching_capability +from . import label_restrictions +from . import max_link_bandwidth +from . import max_resv_link_bandwidth +from . import unreserved_bandwidth +from . import te_srlgs +from . import te_nsrlgs +from . import otn_link +from . import client_svc +class te_link_attributes(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Link attributes in a TE topology. + """ + __slots__ = ('_path_helper', '_extmethods', '__access_type','__external_domain','__is_abstract','__name','__underlay','__admin_status','__link_index','__administrative_group','__interface_switching_capability','__label_restrictions','__link_protection_type','__max_link_bandwidth','__max_resv_link_bandwidth','__unreserved_bandwidth','__te_default_metric','__te_delay_metric','__te_igp_metric','__te_srlgs','__te_nsrlgs','__otn_link','__client_svc',) + + _yang_name = 'te-link-attributes' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__access_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True) + self.__external_domain = YANGDynClass(base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + self.__link_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + self.__administrative_group = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True) + self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__link_protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__max_link_bandwidth = YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__max_resv_link_bandwidth = YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__te_default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__te_delay_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__te_igp_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__te_srlgs = YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__te_nsrlgs = YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__otn_link = YANGDynClass(base=otn_link.otn_link, is_container='container', yang_name="otn-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__client_svc = YANGDynClass(base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes'] + + def _get_access_type(self): + """ + Getter method for access_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/access_type (te-types:te-link-access-type) + + YANG Description: Link access type, which can be point-to-point or +multi-access. + """ + return self.__access_type + + def _set_access_type(self, v, load=False): + """ + Setter method for access_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/access_type (te-types:te-link-access-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_access_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_access_type() directly. + + YANG Description: Link access type, which can be point-to-point or +multi-access. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """access_type must be of a type compatible with te-types:te-link-access-type""", + 'defined-type': "te-types:te-link-access-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True)""", + }) + + self.__access_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_access_type(self): + self.__access_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True) + + + def _get_external_domain(self): + """ + Getter method for external_domain, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain (container) + + YANG Description: For an inter-domain link, specifies the attributes of +the remote end of the link, to facilitate the signaling at +the local end. + """ + return self.__external_domain + + def _set_external_domain(self, v, load=False): + """ + Setter method for external_domain, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_external_domain is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_external_domain() directly. + + YANG Description: For an inter-domain link, specifies the attributes of +the remote end of the link, to facilitate the signaling at +the local end. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """external_domain must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__external_domain = t + if hasattr(self, '_set'): + self._set() + + def _unset_external_domain(self): + self.__external_domain = YANGDynClass(base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_is_abstract(self): + """ + Getter method for is_abstract, mapped from YANG variable /networks/network/link/te/te_link_attributes/is_abstract (empty) + + YANG Description: Present if the link is abstract. + """ + return self.__is_abstract + + def _set_is_abstract(self, v, load=False): + """ + Setter method for is_abstract, mapped from YANG variable /networks/network/link/te/te_link_attributes/is_abstract (empty) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_abstract is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_abstract() directly. + + YANG Description: Present if the link is abstract. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_abstract must be of a type compatible with empty""", + 'defined-type': "empty", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True)""", + }) + + self.__is_abstract = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_abstract(self): + self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) + + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/link/te/te_link_attributes/name (string) + + YANG Description: Link name. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/link/te/te_link_attributes/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Link name. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_underlay(self): + """ + Getter method for underlay, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay (container) + + YANG Description: Attributes of the TE link underlay. + """ + return self.__underlay + + def _set_underlay(self, v, load=False): + """ + Setter method for underlay, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_underlay is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_underlay() directly. + + YANG Description: Attributes of the TE link underlay. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """underlay must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__underlay = t + if hasattr(self, '_set'): + self._set() + + def _unset_underlay(self): + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_admin_status(self): + """ + Getter method for admin_status, mapped from YANG variable /networks/network/link/te/te_link_attributes/admin_status (te-types:te-admin-status) + + YANG Description: The administrative state of the link. + """ + return self.__admin_status + + def _set_admin_status(self, v, load=False): + """ + Setter method for admin_status, mapped from YANG variable /networks/network/link/te/te_link_attributes/admin_status (te-types:te-admin-status) + If this variable is read-only (config: false) in the + source YANG file, then _set_admin_status is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_admin_status() directly. + + YANG Description: The administrative state of the link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """admin_status must be of a type compatible with te-types:te-admin-status""", + 'defined-type': "te-types:te-admin-status", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True)""", + }) + + self.__admin_status = t + if hasattr(self, '_set'): + self._set() + + def _unset_admin_status(self): + self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + + + def _get_link_index(self): + """ + Getter method for link_index, mapped from YANG variable /networks/network/link/te/te_link_attributes/link_index (uint64) + + YANG Description: The link identifier. If OSPF is used, this object +represents an ospfLsdbID. If IS-IS is used, this object +represents an isisLSPID. If a locally configured link is +used, this object represents a unique value, which is +locally defined in a router. + """ + return self.__link_index + + def _set_link_index(self, v, load=False): + """ + Setter method for link_index, mapped from YANG variable /networks/network/link/te/te_link_attributes/link_index (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_index() directly. + + YANG Description: The link identifier. If OSPF is used, this object +represents an ospfLsdbID. If IS-IS is used, this object +represents an isisLSPID. If a locally configured link is +used, this object represents a unique value, which is +locally defined in a router. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_index must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__link_index = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_index(self): + self.__link_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + + + def _get_administrative_group(self): + """ + Getter method for administrative_group, mapped from YANG variable /networks/network/link/te/te_link_attributes/administrative_group (te-types:admin-groups) + + YANG Description: Administrative group or color of the link. +This attribute covers both administrative groups (defined +in RFCs 3630 and 5305) and Extended Administrative Groups +(defined in RFC 7308). + """ + return self.__administrative_group + + def _set_administrative_group(self, v, load=False): + """ + Setter method for administrative_group, mapped from YANG variable /networks/network/link/te/te_link_attributes/administrative_group (te-types:admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_administrative_group is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_administrative_group() directly. + + YANG Description: Administrative group or color of the link. +This attribute covers both administrative groups (defined +in RFCs 3630 and 5305) and Extended Administrative Groups +(defined in RFC 7308). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """administrative_group must be of a type compatible with te-types:admin-groups""", + 'defined-type': "te-types:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True)""", + }) + + self.__administrative_group = t + if hasattr(self, '_set'): + self._set() + + def _unset_administrative_group(self): + self.__administrative_group = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True) + + + def _get_interface_switching_capability(self): + """ + Getter method for interface_switching_capability, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability (list) + + YANG Description: List of ISCDs for this link. + """ + return self.__interface_switching_capability + + def _set_interface_switching_capability(self, v, load=False): + """ + Setter method for interface_switching_capability, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_interface_switching_capability is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_interface_switching_capability() directly. + + YANG Description: List of ISCDs for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """interface_switching_capability must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__interface_switching_capability = t + if hasattr(self, '_set'): + self._set() + + def _unset_interface_switching_capability(self): + self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_label_restrictions(self): + """ + Getter method for label_restrictions, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions (container) + + YANG Description: The label restrictions container. + """ + return self.__label_restrictions + + def _set_label_restrictions(self, v, load=False): + """ + Setter method for label_restrictions, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restrictions is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restrictions() directly. + + YANG Description: The label restrictions container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restrictions must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_restrictions = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restrictions(self): + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_link_protection_type(self): + """ + Getter method for link_protection_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/link_protection_type (identityref) + + YANG Description: Link Protection Type desired for this link. + """ + return self.__link_protection_type + + def _set_link_protection_type(self, v, load=False): + """ + Setter method for link_protection_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/link_protection_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_protection_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_protection_type() directly. + + YANG Description: Link Protection Type desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_protection_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__link_protection_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_protection_type(self): + self.__link_protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_max_link_bandwidth(self): + """ + Getter method for max_link_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth (container) + + YANG Description: Maximum bandwidth that can be seen on this link in this +direction. Units are in bytes per second. + """ + return self.__max_link_bandwidth + + def _set_max_link_bandwidth(self, v, load=False): + """ + Setter method for max_link_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_link_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_link_bandwidth() directly. + + YANG Description: Maximum bandwidth that can be seen on this link in this +direction. Units are in bytes per second. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_link_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__max_link_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_link_bandwidth(self): + self.__max_link_bandwidth = YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_max_resv_link_bandwidth(self): + """ + Getter method for max_resv_link_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth (container) + + YANG Description: Maximum amount of bandwidth that can be reserved in this +direction in this link. Units are in bytes per second. + """ + return self.__max_resv_link_bandwidth + + def _set_max_resv_link_bandwidth(self, v, load=False): + """ + Setter method for max_resv_link_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_resv_link_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_resv_link_bandwidth() directly. + + YANG Description: Maximum amount of bandwidth that can be reserved in this +direction in this link. Units are in bytes per second. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_resv_link_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__max_resv_link_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_resv_link_bandwidth(self): + self.__max_resv_link_bandwidth = YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unreserved_bandwidth(self): + """ + Getter method for unreserved_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth (list) + + YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in +bytes per second. + """ + return self.__unreserved_bandwidth + + def _set_unreserved_bandwidth(self, v, load=False): + """ + Setter method for unreserved_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_unreserved_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unreserved_bandwidth() directly. + + YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in +bytes per second. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unreserved_bandwidth must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__unreserved_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_unreserved_bandwidth(self): + self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_te_default_metric(self): + """ + Getter method for te_default_metric, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_default_metric (uint32) + + YANG Description: Traffic Engineering metric. + """ + return self.__te_default_metric + + def _set_te_default_metric(self, v, load=False): + """ + Setter method for te_default_metric, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_default_metric (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_default_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_default_metric() directly. + + YANG Description: Traffic Engineering metric. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_default_metric must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__te_default_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_default_metric(self): + self.__te_default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_te_delay_metric(self): + """ + Getter method for te_delay_metric, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_delay_metric (uint32) + + YANG Description: Traffic Engineering delay metric. + """ + return self.__te_delay_metric + + def _set_te_delay_metric(self, v, load=False): + """ + Setter method for te_delay_metric, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_delay_metric (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_delay_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_delay_metric() directly. + + YANG Description: Traffic Engineering delay metric. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_delay_metric must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__te_delay_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_delay_metric(self): + self.__te_delay_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_te_igp_metric(self): + """ + Getter method for te_igp_metric, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_igp_metric (uint32) + + YANG Description: IGP metric used for Traffic Engineering. + """ + return self.__te_igp_metric + + def _set_te_igp_metric(self, v, load=False): + """ + Setter method for te_igp_metric, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_igp_metric (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_igp_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_igp_metric() directly. + + YANG Description: IGP metric used for Traffic Engineering. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_igp_metric must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__te_igp_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_igp_metric(self): + self.__te_igp_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_te_srlgs(self): + """ + Getter method for te_srlgs, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_srlgs (container) + + YANG Description: Contains a list of SRLGs. + """ + return self.__te_srlgs + + def _set_te_srlgs(self, v, load=False): + """ + Setter method for te_srlgs, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_srlgs (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_srlgs is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_srlgs() directly. + + YANG Description: Contains a list of SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_srlgs must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_srlgs = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_srlgs(self): + self.__te_srlgs = YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_te_nsrlgs(self): + """ + Getter method for te_nsrlgs, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_nsrlgs (container) + + YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). +When an abstract TE link is configured, this list specifies +the request that underlay TE paths need to be mutually +disjoint with other TE links in the same groups. + """ + return self.__te_nsrlgs + + def _set_te_nsrlgs(self, v, load=False): + """ + Setter method for te_nsrlgs, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_nsrlgs (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_nsrlgs is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_nsrlgs() directly. + + YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). +When an abstract TE link is configured, this list specifies +the request that underlay TE paths need to be mutually +disjoint with other TE links in the same groups. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_nsrlgs must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_nsrlgs = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_nsrlgs(self): + self.__te_nsrlgs = YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_otn_link(self): + """ + Getter method for otn_link, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link (container) + + YANG Description: Attributes of the OTN Link. + """ + return self.__otn_link + + def _set_otn_link(self, v, load=False): + """ + Setter method for otn_link, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_link is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_link() directly. + + YANG Description: Attributes of the OTN Link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_link.otn_link, is_container='container', yang_name="otn-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_link must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_link.otn_link, is_container='container', yang_name="otn-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn_link = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_link(self): + self.__otn_link = YANGDynClass(base=otn_link.otn_link, is_container='container', yang_name="otn-link", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_client_svc(self): + """ + Getter method for client_svc, mapped from YANG variable /networks/network/link/te/te_link_attributes/client_svc (container) + + YANG Description: Attributes of the Link supporting CBR client signals. + """ + return self.__client_svc + + def _set_client_svc(self, v, load=False): + """ + Setter method for client_svc, mapped from YANG variable /networks/network/link/te/te_link_attributes/client_svc (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_client_svc is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_client_svc() directly. + + YANG Description: Attributes of the Link supporting CBR client signals. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """client_svc must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__client_svc = t + if hasattr(self, '_set'): + self._set() + + def _unset_client_svc(self): + self.__client_svc = YANGDynClass(base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + access_type = __builtin__.property(_get_access_type, _set_access_type) + external_domain = __builtin__.property(_get_external_domain, _set_external_domain) + is_abstract = __builtin__.property(_get_is_abstract, _set_is_abstract) + name = __builtin__.property(_get_name, _set_name) + underlay = __builtin__.property(_get_underlay, _set_underlay) + admin_status = __builtin__.property(_get_admin_status, _set_admin_status) + link_index = __builtin__.property(_get_link_index, _set_link_index) + administrative_group = __builtin__.property(_get_administrative_group, _set_administrative_group) + interface_switching_capability = __builtin__.property(_get_interface_switching_capability, _set_interface_switching_capability) + label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) + link_protection_type = __builtin__.property(_get_link_protection_type, _set_link_protection_type) + max_link_bandwidth = __builtin__.property(_get_max_link_bandwidth, _set_max_link_bandwidth) + max_resv_link_bandwidth = __builtin__.property(_get_max_resv_link_bandwidth, _set_max_resv_link_bandwidth) + unreserved_bandwidth = __builtin__.property(_get_unreserved_bandwidth, _set_unreserved_bandwidth) + te_default_metric = __builtin__.property(_get_te_default_metric, _set_te_default_metric) + te_delay_metric = __builtin__.property(_get_te_delay_metric, _set_te_delay_metric) + te_igp_metric = __builtin__.property(_get_te_igp_metric, _set_te_igp_metric) + te_srlgs = __builtin__.property(_get_te_srlgs, _set_te_srlgs) + te_nsrlgs = __builtin__.property(_get_te_nsrlgs, _set_te_nsrlgs) + otn_link = __builtin__.property(_get_otn_link, _set_otn_link) + client_svc = __builtin__.property(_get_client_svc, _set_client_svc) + + + _pyangbind_elements = OrderedDict([('access_type', access_type), ('external_domain', external_domain), ('is_abstract', is_abstract), ('name', name), ('underlay', underlay), ('admin_status', admin_status), ('link_index', link_index), ('administrative_group', administrative_group), ('interface_switching_capability', interface_switching_capability), ('label_restrictions', label_restrictions), ('link_protection_type', link_protection_type), ('max_link_bandwidth', max_link_bandwidth), ('max_resv_link_bandwidth', max_resv_link_bandwidth), ('unreserved_bandwidth', unreserved_bandwidth), ('te_default_metric', te_default_metric), ('te_delay_metric', te_delay_metric), ('te_igp_metric', te_igp_metric), ('te_srlgs', te_srlgs), ('te_nsrlgs', te_nsrlgs), ('otn_link', otn_link), ('client_svc', client_svc), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/client_svc/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/client_svc/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..69ba52bbc1f3cd59eea7b26cf14885731e978925 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/client_svc/__init__.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class client_svc(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/client-svc. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Attributes of the Link supporting CBR client signals. + """ + __slots__ = ('_path_helper', '_extmethods', '__supported_client_signal',) + + _yang_name = 'client-svc' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__supported_client_signal = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'client-svc'] + + def _get_supported_client_signal(self): + """ + Getter method for supported_client_signal, mapped from YANG variable /networks/network/link/te/te_link_attributes/client_svc/supported_client_signal (identityref) + + YANG Description: List of client signal types supported by the Link. + """ + return self.__supported_client_signal + + def _set_supported_client_signal(self, v, load=False): + """ + Setter method for supported_client_signal, mapped from YANG variable /networks/network/link/te/te_link_attributes/client_svc/supported_client_signal (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_supported_client_signal is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supported_client_signal() directly. + + YANG Description: List of client signal types supported by the Link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supported_client_signal must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__supported_client_signal = t + if hasattr(self, '_set'): + self._set() + + def _unset_supported_client_signal(self): + self.__supported_client_signal = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + supported_client_signal = __builtin__.property(_get_supported_client_signal, _set_supported_client_signal) + + + _pyangbind_elements = OrderedDict([('supported_client_signal', supported_client_signal), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..adc0d23fb6e1d7573a6686a7b049a3bccf0a2dd3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py @@ -0,0 +1,205 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class external_domain(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/external-domain. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: For an inter-domain link, specifies the attributes of +the remote end of the link, to facilitate the signaling at +the local end. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__remote_te_node_id','__remote_te_link_tp_id',) + + _yang_name = 'external-domain' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__remote_te_node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) + self.__remote_te_link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'external-domain'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_remote_te_node_id(self): + """ + Getter method for remote_te_node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain/remote_te_node_id (te-types:te-node-id) + + YANG Description: Remote TE node identifier, used together with +'remote-te-link-tp-id' to identify the remote Link +Termination Point (LTP) in a different domain. + """ + return self.__remote_te_node_id + + def _set_remote_te_node_id(self, v, load=False): + """ + Setter method for remote_te_node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain/remote_te_node_id (te-types:te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_remote_te_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_remote_te_node_id() directly. + + YANG Description: Remote TE node identifier, used together with +'remote-te-link-tp-id' to identify the remote Link +Termination Point (LTP) in a different domain. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """remote_te_node_id must be of a type compatible with te-types:te-node-id""", + 'defined-type': "te-types:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True)""", + }) + + self.__remote_te_node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_remote_te_node_id(self): + self.__remote_te_node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) + + + def _get_remote_te_link_tp_id(self): + """ + Getter method for remote_te_link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain/remote_te_link_tp_id (te-types:te-tp-id) + + YANG Description: Remote TE LTP identifier, used together with +'remote-te-node-id' to identify the remote LTP in a +different domain. + """ + return self.__remote_te_link_tp_id + + def _set_remote_te_link_tp_id(self, v, load=False): + """ + Setter method for remote_te_link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/external_domain/remote_te_link_tp_id (te-types:te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_remote_te_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_remote_te_link_tp_id() directly. + + YANG Description: Remote TE LTP identifier, used together with +'remote-te-node-id' to identify the remote LTP in a +different domain. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """remote_te_link_tp_id must be of a type compatible with te-types:te-tp-id""", + 'defined-type': "te-types:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True)""", + }) + + self.__remote_te_link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_remote_te_link_tp_id(self): + self.__remote_te_link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + remote_te_node_id = __builtin__.property(_get_remote_te_node_id, _set_remote_te_node_id) + remote_te_link_tp_id = __builtin__.property(_get_remote_te_link_tp_id, _set_remote_te_link_tp_id) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('remote_te_node_id', remote_te_node_id), ('remote_te_link_tp_id', remote_te_link_tp_id), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e999df8fd7004d8a4ff893b3c470c52dbd6076b6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py @@ -0,0 +1,206 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import max_lsp_bandwidth +class interface_switching_capability(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/interface-switching-capability. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of ISCDs for this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__switching_capability','__encoding','__max_lsp_bandwidth',) + + _yang_name = 'interface-switching-capability' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'interface-switching-capability'] + + def _get_switching_capability(self): + """ + Getter method for switching_capability, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/switching_capability (identityref) + + YANG Description: Switching capability for this interface. + """ + return self.__switching_capability + + def _set_switching_capability(self, v, load=False): + """ + Setter method for switching_capability, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/switching_capability (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_switching_capability is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_switching_capability() directly. + + YANG Description: Switching capability for this interface. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """switching_capability must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__switching_capability = t + if hasattr(self, '_set'): + self._set() + + def _unset_switching_capability(self): + self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_encoding(self): + """ + Getter method for encoding, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/encoding (identityref) + + YANG Description: Encoding supported by this interface. + """ + return self.__encoding + + def _set_encoding(self, v, load=False): + """ + Setter method for encoding, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/encoding (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_encoding is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_encoding() directly. + + YANG Description: Encoding supported by this interface. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """encoding must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__encoding = t + if hasattr(self, '_set'): + self._set() + + def _unset_encoding(self): + self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_max_lsp_bandwidth(self): + """ + Getter method for max_lsp_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth (list) + + YANG Description: Maximum Label Switched Path (LSP) bandwidth at +priorities 0-7. + """ + return self.__max_lsp_bandwidth + + def _set_max_lsp_bandwidth(self, v, load=False): + """ + Setter method for max_lsp_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_lsp_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_lsp_bandwidth() directly. + + YANG Description: Maximum Label Switched Path (LSP) bandwidth at +priorities 0-7. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_lsp_bandwidth must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__max_lsp_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_lsp_bandwidth(self): + self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + switching_capability = __builtin__.property(_get_switching_capability, _set_switching_capability) + encoding = __builtin__.property(_get_encoding, _set_encoding) + max_lsp_bandwidth = __builtin__.property(_get_max_lsp_bandwidth, _set_max_lsp_bandwidth) + + + _pyangbind_elements = OrderedDict([('switching_capability', switching_capability), ('encoding', encoding), ('max_lsp_bandwidth', max_lsp_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fd066564c019446b9f1d290725548dd988592cfa --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class max_lsp_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/interface-switching-capability/max-lsp-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum Label Switched Path (LSP) bandwidth at +priorities 0-7. + """ + __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) + + _yang_name = 'max-lsp-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'interface-switching-capability', 'max-lsp-bandwidth'] + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/priority (uint8) + + YANG Description: Priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + priority = __builtin__.property(_get_priority, _set_priority) + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ae1f4655b617b424563ff1a67918aca3aa745d15 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/interface-switching-capability/max-lsp-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) + + YANG Description: Maximum bandwidth attributes for OTN paths. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Maximum bandwidth attributes for OTN paths. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..714d3fac7bdc67f8355b240a8d6b2975aeeaf415 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,156 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/interface-switching-capability/max-lsp-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum bandwidth attributes for OTN paths. + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__max_ts_number',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_max_ts_number(self): + """ + Getter method for max_ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) + + YANG Description: The maximum number of Tributary Slots (TS) that could be +used by an ODUflex LSP. + """ + return self.__max_ts_number + + def _set_max_ts_number(self, v, load=False): + """ + Setter method for max_ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_ts_number() directly. + + YANG Description: The maximum number of Tributary Slots (TS) that could be +used by an ODUflex LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__max_ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_ts_number(self): + self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + max_ts_number = __builtin__.property(_get_max_ts_number, _set_max_ts_number) + + __choices__ = {'technology': {'otn': ['odu_type', 'max_ts_number']}} + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('max_ts_number', max_ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f4e44b0e9dd6557014d1255c5cf76f22fdca0ded --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restriction +class label_restrictions(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The label restrictions container. + """ + __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) + + _yang_name = 'label-restrictions' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions'] + + def _get_label_restriction(self): + """ + Getter method for label_restriction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction (list) + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + return self.__label_restriction + + def _set_label_restriction(self, v, load=False): + """ + Setter method for label_restriction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restriction() directly. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restriction must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__label_restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restriction(self): + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) + + + _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..44f0812775abb236b1da05700735e632fe9ef6c7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,450 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_start +from . import label_end +from . import label_step +from . import otn_label_range +from . import ethernet_label_range +class label_restriction(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) + + _yang_name = 'label-restriction' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction'] + + def _get_restriction(self): + """ + Getter method for restriction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/restriction (enumeration) + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + return self.__restriction + + def _set_restriction(self, v, load=False): + """ + Setter method for restriction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/restriction (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restriction() directly. + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restriction must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", + }) + + self.__restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_restriction(self): + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/index (uint32) + + YANG Description: The index of the label restriction list entry. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: The index of the label restriction list entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_label_start(self): + """ + Getter method for label_start, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start (container) + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + return self.__label_start + + def _set_label_start(self, v, load=False): + """ + Setter method for label_start, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_start is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_start() directly. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_start must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_start = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_start(self): + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_end(self): + """ + Getter method for label_end, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end (container) + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + return self.__label_end + + def _set_label_end(self, v, load=False): + """ + Setter method for label_end, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_end is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_end() directly. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_end must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_end = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_end(self): + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_step(self): + """ + Getter method for label_step, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step (container) + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + return self.__label_step + + def _set_label_step(self, v, load=False): + """ + Setter method for label_step, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_step() directly. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_step must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_step(self): + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_range_bitmap(self): + """ + Getter method for range_bitmap, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + return self.__range_bitmap + + def _set_range_bitmap(self, v, load=False): + """ + Setter method for range_bitmap, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_bitmap is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_bitmap() directly. + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", + 'defined-type': "yang:hex-string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", + }) + + self.__range_bitmap = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_bitmap(self): + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + + + def _get_otn_label_range(self): + """ + Getter method for otn_label_range, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range (container) + + YANG Description: Label range information for OTN. + """ + return self.__otn_label_range + + def _set_otn_label_range(self, v, load=False): + """ + Setter method for otn_label_range, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_label_range() directly. + + YANG Description: Label range information for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_label_range(self): + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_ethernet_label_range(self): + """ + Getter method for ethernet_label_range, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range (container) + + YANG Description: Ethernet-specific label range related information. + """ + return self.__ethernet_label_range + + def _set_ethernet_label_range(self, v, load=False): + """ + Setter method for ethernet_label_range, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ethernet_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ethernet_label_range() directly. + + YANG Description: Ethernet-specific label range related information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ethernet_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__ethernet_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_ethernet_label_range(self): + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + restriction = __builtin__.property(_get_restriction, _set_restriction) + index = __builtin__.property(_get_index, _set_index) + label_start = __builtin__.property(_get_label_start, _set_label_start) + label_end = __builtin__.property(_get_label_end, _set_label_end) + label_step = __builtin__.property(_get_label_step, _set_label_step) + range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) + otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) + ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) + + + _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..52e6a65c17f8e1dc93617d8d83c97d1264f7c66d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ethernet_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/ethernet-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Ethernet-specific label range related information. + """ + __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) + + _yang_name = 'ethernet-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] + + def _get_tag_type(self): + """ + Getter method for tag_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + + YANG Description: VLAN tag type. + """ + return self.__tag_type + + def _set_tag_type(self, v, load=False): + """ + Setter method for tag_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_tag_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tag_type() directly. + + YANG Description: VLAN tag type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", + }) + + self.__tag_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tag_type(self): + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + + YANG Description: priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + tag_type = __builtin__.property(_get_tag_type, _set_tag_type) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ac25e0634b6d08a4574177f2ff1630f4a2b2496f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_end(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-end. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-end' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-end'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..67dde90521ef28bc7f60fd4de11958b9383db32b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-end/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..24875829b97bd7c53e734cb3a60b1730eac4694a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..65fb7f8e1624aee0aa322c455c72558add6d54d3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_start(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-start. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-start' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-start'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4a68961e3223f9bcfa8f06bac656a0d58279c7fe --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-start/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..082f89723c1a7ce0382b9266cd665359ac29e533 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..51201035a600a310728cb184967cfd0295c1bb04 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class label_step(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-step. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) + + _yang_name = 'label-step' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-step'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/generic (int32) + + YANG Description: Label range step. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/generic (int32) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Label range step. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with int32""", + 'defined-type': "int32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn (container) + + YANG Description: Label step for OTN + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label step for OTN + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_step(self): + """ + Getter method for eth_step, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/eth_step (uint16) + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + return self.__eth_step + + def _set_eth_step(self, v, load=False): + """ + Setter method for eth_step, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/eth_step (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_step() directly. + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_step must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", + }) + + self.__eth_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_step(self): + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_step = __builtin__.property(_get_eth_step, _set_eth_step) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1325a1afdeebef2b7141462c193da301279412ea --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/label-step/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label step for OTN + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b59c995b2870f460b03de3af569ff6b7fd1d9bea --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/label-restrictions/label-restriction/otn-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label range information for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) + + _yang_name = 'otn-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'otn-label-range'] + + def _get_range_type(self): + """ + Getter method for range_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + return self.__range_type + + def _set_range_type(self, v, load=False): + """ + Setter method for range_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_type() directly. + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_type must be of a type compatible with otn-label-range-type""", + 'defined-type': "ietf-otn-topology:otn-label-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", + }) + + self.__range_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_type(self): + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_odu_type_list(self): + """ + Getter method for odu_type_list, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + return self.__odu_type_list + + def _set_odu_type_list(self, v, load=False): + """ + Setter method for odu_type_list, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type_list() directly. + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type_list must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type_list(self): + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/priority (uint8) + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/otn_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + range_type = __builtin__.property(_get_range_type, _set_range_type) + tsg = __builtin__.property(_get_tsg, _set_tsg) + odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..566cf779960e7da8cd888ced53ed38b2e79f8fcf --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class max_link_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-link-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum bandwidth that can be seen on this link in this +direction. Units are in bytes per second. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth',) + + _yang_name = 'max-link-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-link-bandwidth'] + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c0e0c9a78aab5fa13c8b166c9eb1e3374e31bc2d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-link-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-link-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..94132f930254b1e06ff745c118b01a4511b75f1b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-link-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-link-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + odulist = __builtin__.property(_get_odulist, _set_odulist) + + + _pyangbind_elements = OrderedDict([('odulist', odulist), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53a6ab8739a937f1c33d42b7ac93cabddf249521 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-link-bandwidth/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-link-bandwidth', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + number = __builtin__.property(_get_number, _set_number) + ts_number = __builtin__.property(_get_ts_number, _set_ts_number) + + + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..33d25351b1f49adbc787e667e557f3cf3de3f387 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class max_resv_link_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-resv-link-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum amount of bandwidth that can be reserved in this +direction in this link. Units are in bytes per second. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth',) + + _yang_name = 'max-resv-link-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-resv-link-bandwidth'] + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34072dafa69abb467c6e46d7f7ee550119244547 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-resv-link-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-resv-link-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..971708460d371d869013e6eb51c35bbca416cc87 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-resv-link-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-resv-link-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + odulist = __builtin__.property(_get_odulist, _set_odulist) + + + _pyangbind_elements = OrderedDict([('odulist', odulist), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ee145707c3270bee11e71ad357fb1c6df8fe5d0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/max-resv-link-bandwidth/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'max-resv-link-bandwidth', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + number = __builtin__.property(_get_number, _set_number) + ts_number = __builtin__.property(_get_ts_number, _set_ts_number) + + + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/otn_link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/otn_link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..62dec2b8900c4567216707abd01d79e8e567f631 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/otn_link/__init__.py @@ -0,0 +1,199 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_link(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/otn-link. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Attributes of the OTN Link. + """ + __slots__ = ('_path_helper', '_extmethods', '__odtu_flex_type','__tsg','__distance',) + + _yang_name = 'otn-link' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__distance = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint32', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'otn-link'] + + def _get_odtu_flex_type(self): + """ + Getter method for odtu_flex_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link/odtu_flex_type (l1-types:odtu-flex-type) + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs set up +on this OTN Link. + """ + return self.__odtu_flex_type + + def _set_odtu_flex_type(self, v, load=False): + """ + Setter method for odtu_flex_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link/odtu_flex_type (l1-types:odtu-flex-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_odtu_flex_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odtu_flex_type() directly. + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs set up +on this OTN Link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", + 'defined-type': "l1-types:odtu-flex-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", + }) + + self.__odtu_flex_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odtu_flex_type(self): + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link/tsg (identityref) + + YANG Description: Tributary slot granularity. + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary slot granularity. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_distance(self): + """ + Getter method for distance, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link/distance (uint32) + + YANG Description: distance in the unit of kilometers + """ + return self.__distance + + def _set_distance(self, v, load=False): + """ + Setter method for distance, mapped from YANG variable /networks/network/link/te/te_link_attributes/otn_link/distance (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_distance is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_distance() directly. + + YANG Description: distance in the unit of kilometers + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """distance must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint32', is_config=True)""", + }) + + self.__distance = t + if hasattr(self, '_set'): + self._set() + + def _unset_distance(self): + self.__distance = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint32', is_config=True) + + odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) + tsg = __builtin__.property(_get_tsg, _set_tsg) + distance = __builtin__.property(_get_distance, _set_distance) + + + _pyangbind_elements = OrderedDict([('odtu_flex_type', odtu_flex_type), ('tsg', tsg), ('distance', distance), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..51926d3135bc483730723c3ee73ed2b4201ea38c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class te_nsrlgs(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/te-nsrlgs. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). +When an abstract TE link is configured, this list specifies +the request that underlay TE paths need to be mutually +disjoint with other TE links in the same groups. + """ + __slots__ = ('_path_helper', '_extmethods', '__id',) + + _yang_name = 'te-nsrlgs' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'te-nsrlgs'] + + def _get_id(self): + """ + Getter method for id, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_nsrlgs/id (uint32) + + YANG Description: NSRLG ID, uniquely configured within a topology. + """ + return self.__id + + def _set_id(self, v, load=False): + """ + Setter method for id, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_nsrlgs/id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_id() directly. + + YANG Description: NSRLG ID, uniquely configured within a topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__id = t + if hasattr(self, '_set'): + self._set() + + def _unset_id(self): + self.__id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + id = __builtin__.property(_get_id, _set_id) + + + _pyangbind_elements = OrderedDict([('id', id), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92ac61644757fb7d4aad97d30d818e3f496f526e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class te_srlgs(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/te-srlgs. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains a list of SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__value',) + + _yang_name = 'te-srlgs' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'te-srlgs'] + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_srlgs/value (te-types:srlg) + + YANG Description: SRLG value. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/link/te/te_link_attributes/te_srlgs/value (te-types:srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: SRLG value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with te-types:srlg""", + 'defined-type': "te-types:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True) + + value = __builtin__.property(_get_value, _set_value) + + + _pyangbind_elements = OrderedDict([('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..129490e773c092f4dfeb730380f9bfd6f63158c8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py @@ -0,0 +1,326 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import primary_path +from . import backup_path +from . import tunnel_termination_points +from . import tunnels +class underlay(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Attributes of the TE link underlay. + """ + __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) + + _yang_name = 'underlay' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay'] + + def _get_enabled(self): + """ + Getter method for enabled, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/enabled (boolean) + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + return self.__enabled + + def _set_enabled(self, v, load=False): + """ + Setter method for enabled, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/enabled (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_enabled is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enabled() directly. + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enabled must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__enabled = t + if hasattr(self, '_set'): + self._set() + + def _unset_enabled(self): + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_primary_path(self): + """ + Getter method for primary_path, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path (container) + + YANG Description: The service path on the underlay topology that +supports this link. + """ + return self.__primary_path + + def _set_primary_path(self, v, load=False): + """ + Setter method for primary_path, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_primary_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_primary_path() directly. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """primary_path must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__primary_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_primary_path(self): + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_backup_path(self): + """ + Getter method for backup_path, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path (list) + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + return self.__backup_path + + def _set_backup_path(self, v, load=False): + """ + Setter method for backup_path, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_backup_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_backup_path() directly. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """backup_path must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__backup_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_backup_path(self): + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_protection_type(self): + """ + Getter method for protection_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/protection_type (identityref) + + YANG Description: Underlay protection type desired for this link. + """ + return self.__protection_type + + def _set_protection_type(self, v, load=False): + """ + Setter method for protection_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/protection_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_protection_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_protection_type() directly. + + YANG Description: Underlay protection type desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """protection_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__protection_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_protection_type(self): + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_tunnel_termination_points(self): + """ + Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points (container) + + YANG Description: Underlay TTPs desired for this link. + """ + return self.__tunnel_termination_points + + def _set_tunnel_termination_points(self, v, load=False): + """ + Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_termination_points is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_termination_points() directly. + + YANG Description: Underlay TTPs desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_termination_points must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tunnel_termination_points = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_termination_points(self): + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_tunnels(self): + """ + Getter method for tunnels, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels (container) + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + return self.__tunnels + + def _set_tunnels(self, v, load=False): + """ + Setter method for tunnels, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnels is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnels() directly. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnels must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tunnels = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnels(self): + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + enabled = __builtin__.property(_get_enabled, _set_enabled) + primary_path = __builtin__.property(_get_primary_path, _set_primary_path) + backup_path = __builtin__.property(_get_backup_path, _set_backup_path) + protection_type = __builtin__.property(_get_protection_type, _set_protection_type) + tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points, _set_tunnel_termination_points) + tunnels = __builtin__.property(_get_tunnels, _set_tunnels) + + + _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6e430aedb3678a19f425b9df6afd510c0a5a40eb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py @@ -0,0 +1,207 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class backup_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) + + _yang_name = 'backup-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/index (uint32) + + YANG Description: A sequence number to identify a backup path. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: A sequence number to identify a backup path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element (list) + + YANG Description: A list of path elements describing the backup service +path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the backup service +path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + path_element = __builtin__.property(_get_path_element, _set_path_element) + + + _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aca211807fc5946c59ac378a1fe43764cf342f48 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,321 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the backup service +path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3613095739ab1dda42e1ee56bfd2410e73111288 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b9ec35dbe9b20e8c7925632ccb72415340368201 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4e91ab131548adfa142ddf87e34ce02d3a89638c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fb2e02afeb4d26363c3e3b4ca5b38d9ea1bb831e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..06923495db9b049ac32d9f799c0b0793b7583a39 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..24687817713ab1d51b59ca694c621be191e53ea5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7b040726e4af3bfebb68e9584bd6d60eb9fb5082 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2cbefb38a259de886eefbd7db230a93ba58a62a7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class primary_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) + + _yang_name = 'primary-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element (list) + + YANG Description: A list of path elements describing the service path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the service path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + path_element = __builtin__.property(_get_path_element, _set_path_element) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d1f9ba7c64066aca0fc7de0aa7e80f76b731e675 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,320 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the service path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..be898e3aae7fc97049bd45468088608d37ceac84 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..46d140192c590c9c1df54170cec68de0382e2c2f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3aee6e73b3049dd3deaff121618e076d718c68fc --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..30e2c479a2ba0bd1dcf916efa4f39705b62ed1b1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..88d8af789152ed19bc3fd9635abaaf57a89e422f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fe386ce02952a8bb2e7192b274a4705c27c4c40d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..130901543218adc5066d8a5d062670d62db66a46 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b516827dcd8b813b46797cba3ac2091dc776515 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel_termination_points(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/tunnel-termination-points. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TTPs desired for this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) + + _yang_name = 'tunnel-termination-points' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'tunnel-termination-points'] + + def _get_source(self): + """ + Getter method for source, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/source (binary) + + YANG Description: Source TTP identifier. + """ + return self.__source + + def _set_source(self, v, load=False): + """ + Setter method for source, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/source (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_source() directly. + + YANG Description: Source TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """source must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__source = t + if hasattr(self, '_set'): + self._set() + + def _unset_source(self): + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + + def _get_destination(self): + """ + Getter method for destination, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/destination (binary) + + YANG Description: Destination TTP identifier. + """ + return self.__destination + + def _set_destination(self, v, load=False): + """ + Setter method for destination, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/destination (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_destination is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_destination() directly. + + YANG Description: Destination TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """destination must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__destination = t + if hasattr(self, '_set'): + self._set() + + def _unset_destination(self): + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + source = __builtin__.property(_get_source, _set_source) + destination = __builtin__.property(_get_destination, _set_destination) + + + _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4402db40ec66aff67c7a0cfc860e603e9990c7b2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py @@ -0,0 +1,167 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tunnel +class tunnels(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/tunnels. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) + + _yang_name = 'tunnels' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'tunnels'] + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_tunnel(self): + """ + Getter method for tunnel, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel (list) + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + return self.__tunnel + + def _set_tunnel(self, v, load=False): + """ + Setter method for tunnel, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel() directly. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__tunnel = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel(self): + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + sharing = __builtin__.property(_get_sharing, _set_sharing) + tunnel = __builtin__.property(_get_tunnel, _set_tunnel) + + + _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bfd6fae3f3acb313d064cd6ae1f77fd068e3b838 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,170 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/underlay/tunnels/tunnel. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) + + _yang_name = 'tunnel' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'underlay', 'tunnels', 'tunnel'] + + def _get_tunnel_name(self): + """ + Getter method for tunnel_name, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/tunnel_name (string) + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + return self.__tunnel_name + + def _set_tunnel_name(self, v, load=False): + """ + Setter method for tunnel_name, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/tunnel_name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_name() directly. + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__tunnel_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_name(self): + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + tunnel_name = __builtin__.property(_get_tunnel_name, _set_tunnel_name) + sharing = __builtin__.property(_get_sharing, _set_sharing) + + + _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64b36f07a78fe03bee92be19c211885a3b77c25f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class unreserved_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/unreserved-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in +bytes per second. + """ + __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) + + _yang_name = 'unreserved-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'unreserved-bandwidth'] + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/priority (uint8) + + YANG Description: Priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + priority = __builtin__.property(_get_priority, _set_priority) + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..597c65903b26bc8cefae123a64988c0aa4c5cd2e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/unreserved-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'unreserved-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..602ca2e1a1aa0bd56135627dc9e3000869e09a9a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/unreserved-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'unreserved-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + odulist = __builtin__.property(_get_odulist, _set_odulist) + + + _pyangbind_elements = OrderedDict([('odulist', odulist), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..94ca139a6b10008b227c4026e74a8f3cff14f421 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/te-link-attributes/unreserved-bandwidth/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'te-link-attributes', 'unreserved-bandwidth', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + number = __builtin__.property(_get_number, _set_number) + ts_number = __builtin__.property(_get_ts_number, _set_ts_number) + + + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f8ac511c0723811b8f63497653bf430e23d9e083 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/link/te/underlay/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class underlay(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/link/te/underlay. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: State attributes for the TE link underlay. + """ + __slots__ = ('_path_helper', '_extmethods', '__dynamic','__committed',) + + _yang_name = 'underlay' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__dynamic = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="dynamic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + self.__committed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="committed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'link', 'te', 'underlay'] + + def _get_dynamic(self): + """ + Getter method for dynamic, mapped from YANG variable /networks/network/link/te/underlay/dynamic (boolean) + + YANG Description: 'true' if the underlay is dynamically created. + """ + return self.__dynamic + + def _set_dynamic(self, v, load=False): + """ + Setter method for dynamic, mapped from YANG variable /networks/network/link/te/underlay/dynamic (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_dynamic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_dynamic() directly. + + YANG Description: 'true' if the underlay is dynamically created. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="dynamic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """dynamic must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="dynamic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", + }) + + self.__dynamic = t + if hasattr(self, '_set'): + self._set() + + def _unset_dynamic(self): + self.__dynamic = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="dynamic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + + def _get_committed(self): + """ + Getter method for committed, mapped from YANG variable /networks/network/link/te/underlay/committed (boolean) + + YANG Description: 'true' if the underlay is committed. + """ + return self.__committed + + def _set_committed(self, v, load=False): + """ + Setter method for committed, mapped from YANG variable /networks/network/link/te/underlay/committed (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_committed is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_committed() directly. + + YANG Description: 'true' if the underlay is committed. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="committed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """committed must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="committed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", + }) + + self.__committed = t + if hasattr(self, '_set'): + self._set() + + def _unset_committed(self): + self.__committed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="committed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + dynamic = __builtin__.property(_get_dynamic) + committed = __builtin__.property(_get_committed) + + + _pyangbind_elements = OrderedDict([('dynamic', dynamic), ('committed', committed), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/network_types/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/network_types/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d12adce980c2efeaecc63888bfefa0d8a212f4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/network_types/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_topology +class network_types(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/network-types. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Serves as an augmentation target. +The network type is indicated through corresponding +presence containers augmented into this container. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_topology',) + + _yang_name = 'network-types' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_topology = YANGDynClass(base=te_topology.te_topology, is_container='container', yang_name="te-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'network-types'] + + def _get_te_topology(self): + """ + Getter method for te_topology, mapped from YANG variable /networks/network/network_types/te_topology (container) + + YANG Description: Its presence identifies the TE topology type. + """ + return self.__te_topology + + def _set_te_topology(self, v, load=False): + """ + Setter method for te_topology, mapped from YANG variable /networks/network/network_types/te_topology (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_topology is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_topology() directly. + + YANG Description: Its presence identifies the TE topology type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_topology.te_topology, is_container='container', yang_name="te-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_topology must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_topology.te_topology, is_container='container', yang_name="te-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_topology = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_topology(self): + self.__te_topology = YANGDynClass(base=te_topology.te_topology, is_container='container', yang_name="te-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_topology = __builtin__.property(_get_te_topology, _set_te_topology) + + + _pyangbind_elements = OrderedDict([('te_topology', te_topology), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/network_types/te_topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/network_types/te_topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0e986049c1a93b6aa60e414fb7a0127a46e2b2b9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/network_types/te_topology/__init__.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class te_topology(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/network-types/te-topology. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Its presence identifies the TE topology type. + """ + _pyangbind_elements = {} + + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..11a24953959b6adc3fd494341b1e325c665e534c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/__init__.py @@ -0,0 +1,291 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import supporting_node +from . import termination_point +from . import te +class node(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The inventory of nodes of this network. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__supporting_node','__termination_point','__te_node_id','__te',) + + _yang_name = 'node' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='node-id', is_config=True) + self.__supporting_node = YANGDynClass(base=YANGListType("network_ref node_ref",supporting_node.supporting_node, yang_name="supporting-node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref', extensions=None), is_container='list', yang_name="supporting-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) + self.__termination_point = YANGDynClass(base=YANGListType("tp_id",termination_point.termination_point, yang_name="termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tp-id', extensions=None), is_container='list', yang_name="termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) + self.__te_node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) + self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/node_id (node-id) + + YANG Description: Uniquely identifies a node within the containing +network. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/node_id (node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: Uniquely identifies a node within the containing +network. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with node-id""", + 'defined-type': "ietf-network:node-id", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='node-id', is_config=True) + + + def _get_supporting_node(self): + """ + Getter method for supporting_node, mapped from YANG variable /networks/network/node/supporting_node (list) + + YANG Description: Represents another node that is in an underlay network +and that supports this node. Used to represent layering +structure. + """ + return self.__supporting_node + + def _set_supporting_node(self, v, load=False): + """ + Setter method for supporting_node, mapped from YANG variable /networks/network/node/supporting_node (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_supporting_node is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supporting_node() directly. + + YANG Description: Represents another node that is in an underlay network +and that supports this node. Used to represent layering +structure. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("network_ref node_ref",supporting_node.supporting_node, yang_name="supporting-node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref', extensions=None), is_container='list', yang_name="supporting-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supporting_node must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("network_ref node_ref",supporting_node.supporting_node, yang_name="supporting-node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref', extensions=None), is_container='list', yang_name="supporting-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True)""", + }) + + self.__supporting_node = t + if hasattr(self, '_set'): + self._set() + + def _unset_supporting_node(self): + self.__supporting_node = YANGDynClass(base=YANGListType("network_ref node_ref",supporting_node.supporting_node, yang_name="supporting-node", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref', extensions=None), is_container='list', yang_name="supporting-node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='list', is_config=True) + + + def _get_termination_point(self): + """ + Getter method for termination_point, mapped from YANG variable /networks/network/node/termination_point (list) + + YANG Description: A termination point can terminate a link. +Depending on the type of topology, a termination point +could, for example, refer to a port or an interface. + """ + return self.__termination_point + + def _set_termination_point(self, v, load=False): + """ + Setter method for termination_point, mapped from YANG variable /networks/network/node/termination_point (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_termination_point is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_termination_point() directly. + + YANG Description: A termination point can terminate a link. +Depending on the type of topology, a termination point +could, for example, refer to a port or an interface. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tp_id",termination_point.termination_point, yang_name="termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tp-id', extensions=None), is_container='list', yang_name="termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """termination_point must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tp_id",termination_point.termination_point, yang_name="termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tp-id', extensions=None), is_container='list', yang_name="termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True)""", + }) + + self.__termination_point = t + if hasattr(self, '_set'): + self._set() + + def _unset_termination_point(self): + self.__termination_point = YANGDynClass(base=YANGListType("tp_id",termination_point.termination_point, yang_name="termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tp-id', extensions=None), is_container='list', yang_name="termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) + + + def _get_te_node_id(self): + """ + Getter method for te_node_id, mapped from YANG variable /networks/network/node/te_node_id (te-types:te-node-id) + + YANG Description: The identifier of a node in the TE topology. +A node is specific to a topology to which it belongs. + """ + return self.__te_node_id + + def _set_te_node_id(self, v, load=False): + """ + Setter method for te_node_id, mapped from YANG variable /networks/network/node/te_node_id (te-types:te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. +A node is specific to a topology to which it belongs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_node_id must be of a type compatible with te-types:te-node-id""", + 'defined-type': "te-types:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True)""", + }) + + self.__te_node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_node_id(self): + self.__te_node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) + + + def _get_te(self): + """ + Getter method for te, mapped from YANG variable /networks/network/node/te (container) + + YANG Description: Indicates TE support. + """ + return self.__te + + def _set_te(self, v, load=False): + """ + Setter method for te, mapped from YANG variable /networks/network/node/te (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te() directly. + + YANG Description: Indicates TE support. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te = t + if hasattr(self, '_set'): + self._set() + + def _unset_te(self): + self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + supporting_node = __builtin__.property(_get_supporting_node, _set_supporting_node) + termination_point = __builtin__.property(_get_termination_point, _set_termination_point) + te_node_id = __builtin__.property(_get_te_node_id, _set_te_node_id) + te = __builtin__.property(_get_te, _set_te) + + + _pyangbind_elements = OrderedDict([('node_id', node_id), ('supporting_node', supporting_node), ('termination_point', termination_point), ('te_node_id', te_node_id), ('te', te), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/supporting_node/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/supporting_node/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c4cd2fc8eb7a10aa682f77595b9ee0ba29765045 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/supporting_node/__init__.py @@ -0,0 +1,168 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class supporting_node(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/supporting-node. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Represents another node that is in an underlay network +and that supports this node. Used to represent layering +structure. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__node_ref',) + + _yang_name = 'supporting-node' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) + self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'supporting-node'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/supporting_node/network_ref (leafref) + + YANG Description: References the underlay network of which the +underlay node is a part. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/supporting_node/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: References the underlay network of which the +underlay node is a part. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) + + + def _get_node_ref(self): + """ + Getter method for node_ref, mapped from YANG variable /networks/network/node/supporting_node/node_ref (leafref) + + YANG Description: References the underlay node itself. + """ + return self.__node_ref + + def _set_node_ref(self, v, load=False): + """ + Setter method for node_ref, mapped from YANG variable /networks/network/node/supporting_node/node_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_ref() directly. + + YANG Description: References the underlay node itself. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True)""", + }) + + self.__node_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_ref(self): + self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + node_ref = __builtin__.property(_get_node_ref, _set_node_ref) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('node_ref', node_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..90adef961b80a55ee2c4a53e302ebef0d76218a7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/__init__.py @@ -0,0 +1,519 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_node_attributes +from . import geolocation +from . import information_source_state +from . import information_source_entry +from . import statistics +from . import tunnel_termination_point +class te(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Indicates TE support. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_node_template','__te_node_attributes','__oper_status','__geolocation','__is_multi_access_dr','__information_source','__information_source_instance','__information_source_state','__information_source_entry','__statistics','__tunnel_termination_point',) + + _yang_name = 'te' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_node_template = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__te_node_attributes = YANGDynClass(base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) + self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__is_multi_access_dr = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-multi-access-dr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) + self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) + self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__information_source_entry = YANGDynClass(base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__tunnel_termination_point = YANGDynClass(base=YANGListType("tunnel_tp_id",tunnel_termination_point.tunnel_termination_point, yang_name="tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-tp-id', extensions=None), is_container='list', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te'] + + def _get_te_node_template(self): + """ + Getter method for te_node_template, mapped from YANG variable /networks/network/node/te/te_node_template (leafref) + + YANG Description: The reference to a TE node template. + """ + return self.__te_node_template + + def _set_te_node_template(self, v, load=False): + """ + Setter method for te_node_template, mapped from YANG variable /networks/network/node/te/te_node_template (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_node_template is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_node_template() directly. + + YANG Description: The reference to a TE node template. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_node_template must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__te_node_template = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_node_template(self): + self.__te_node_template = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="te-node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_te_node_attributes(self): + """ + Getter method for te_node_attributes, mapped from YANG variable /networks/network/node/te/te_node_attributes (container) + + YANG Description: Contains node attributes in a TE topology. + """ + return self.__te_node_attributes + + def _set_te_node_attributes(self, v, load=False): + """ + Setter method for te_node_attributes, mapped from YANG variable /networks/network/node/te/te_node_attributes (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_node_attributes is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_node_attributes() directly. + + YANG Description: Contains node attributes in a TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_node_attributes must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_node_attributes = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_node_attributes(self): + self.__te_node_attributes = YANGDynClass(base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_oper_status(self): + """ + Getter method for oper_status, mapped from YANG variable /networks/network/node/te/oper_status (te-types:te-oper-status) + + YANG Description: The current operational state of the node. + """ + return self.__oper_status + + def _set_oper_status(self, v, load=False): + """ + Setter method for oper_status, mapped from YANG variable /networks/network/node/te/oper_status (te-types:te-oper-status) + If this variable is read-only (config: false) in the + source YANG file, then _set_oper_status is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_oper_status() directly. + + YANG Description: The current operational state of the node. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """oper_status must be of a type compatible with te-types:te-oper-status""", + 'defined-type': "te-types:te-oper-status", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False)""", + }) + + self.__oper_status = t + if hasattr(self, '_set'): + self._set() + + def _unset_oper_status(self): + self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) + + + def _get_geolocation(self): + """ + Getter method for geolocation, mapped from YANG variable /networks/network/node/te/geolocation (container) + + YANG Description: Contains a GPS location. + """ + return self.__geolocation + + def _set_geolocation(self, v, load=False): + """ + Setter method for geolocation, mapped from YANG variable /networks/network/node/te/geolocation (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_geolocation is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_geolocation() directly. + + YANG Description: Contains a GPS location. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """geolocation must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__geolocation = t + if hasattr(self, '_set'): + self._set() + + def _unset_geolocation(self): + self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_is_multi_access_dr(self): + """ + Getter method for is_multi_access_dr, mapped from YANG variable /networks/network/node/te/is_multi_access_dr (empty) + + YANG Description: The presence of this attribute indicates that this TE node +is a pseudonode elected as a designated router. + """ + return self.__is_multi_access_dr + + def _set_is_multi_access_dr(self, v, load=False): + """ + Setter method for is_multi_access_dr, mapped from YANG variable /networks/network/node/te/is_multi_access_dr (empty) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_multi_access_dr is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_multi_access_dr() directly. + + YANG Description: The presence of this attribute indicates that this TE node +is a pseudonode elected as a designated router. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-multi-access-dr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_multi_access_dr must be of a type compatible with empty""", + 'defined-type': "empty", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-multi-access-dr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False)""", + }) + + self.__is_multi_access_dr = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_multi_access_dr(self): + self.__is_multi_access_dr = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-multi-access-dr", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) + + + def _get_information_source(self): + """ + Getter method for information_source, mapped from YANG variable /networks/network/node/te/information_source (te-info-source) + + YANG Description: Indicates the type of information source. + """ + return self.__information_source + + def _set_information_source(self, v, load=False): + """ + Setter method for information_source, mapped from YANG variable /networks/network/node/te/information_source (te-info-source) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source() directly. + + YANG Description: Indicates the type of information source. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source must be of a type compatible with te-info-source""", + 'defined-type': "ietf-te-topology:te-info-source", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False)""", + }) + + self.__information_source = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source(self): + self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) + + + def _get_information_source_instance(self): + """ + Getter method for information_source_instance, mapped from YANG variable /networks/network/node/te/information_source_instance (string) + + YANG Description: The name indicating the instance of the information +source. + """ + return self.__information_source_instance + + def _set_information_source_instance(self, v, load=False): + """ + Setter method for information_source_instance, mapped from YANG variable /networks/network/node/te/information_source_instance (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source_instance is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source_instance() directly. + + YANG Description: The name indicating the instance of the information +source. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source_instance must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__information_source_instance = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source_instance(self): + self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_information_source_state(self): + """ + Getter method for information_source_state, mapped from YANG variable /networks/network/node/te/information_source_state (container) + + YANG Description: Contains state attributes related to the information +source. + """ + return self.__information_source_state + + def _set_information_source_state(self, v, load=False): + """ + Setter method for information_source_state, mapped from YANG variable /networks/network/node/te/information_source_state (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source_state is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source_state() directly. + + YANG Description: Contains state attributes related to the information +source. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source_state must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__information_source_state = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source_state(self): + self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_information_source_entry(self): + """ + Getter method for information_source_entry, mapped from YANG variable /networks/network/node/te/information_source_entry (list) + + YANG Description: A list of information sources learned, including the source +that is used. + """ + return self.__information_source_entry + + def _set_information_source_entry(self, v, load=False): + """ + Setter method for information_source_entry, mapped from YANG variable /networks/network/node/te/information_source_entry (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source_entry is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source_entry() directly. + + YANG Description: A list of information sources learned, including the source +that is used. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source_entry must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__information_source_entry = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source_entry(self): + self.__information_source_entry = YANGDynClass(base=YANGListType("information_source information_source_instance",information_source_entry.information_source_entry, yang_name="information-source-entry", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='information-source information-source-instance', extensions=None), is_container='list', yang_name="information-source-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_statistics(self): + """ + Getter method for statistics, mapped from YANG variable /networks/network/node/te/statistics (container) + + YANG Description: Statistics data. + """ + return self.__statistics + + def _set_statistics(self, v, load=False): + """ + Setter method for statistics, mapped from YANG variable /networks/network/node/te/statistics (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_statistics is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_statistics() directly. + + YANG Description: Statistics data. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """statistics must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__statistics = t + if hasattr(self, '_set'): + self._set() + + def _unset_statistics(self): + self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_tunnel_termination_point(self): + """ + Getter method for tunnel_termination_point, mapped from YANG variable /networks/network/node/te/tunnel_termination_point (list) + + YANG Description: A termination point can terminate a tunnel. + """ + return self.__tunnel_termination_point + + def _set_tunnel_termination_point(self, v, load=False): + """ + Setter method for tunnel_termination_point, mapped from YANG variable /networks/network/node/te/tunnel_termination_point (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_termination_point is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_termination_point() directly. + + YANG Description: A termination point can terminate a tunnel. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tunnel_tp_id",tunnel_termination_point.tunnel_termination_point, yang_name="tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-tp-id', extensions=None), is_container='list', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_termination_point must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tunnel_tp_id",tunnel_termination_point.tunnel_termination_point, yang_name="tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-tp-id', extensions=None), is_container='list', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__tunnel_termination_point = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_termination_point(self): + self.__tunnel_termination_point = YANGDynClass(base=YANGListType("tunnel_tp_id",tunnel_termination_point.tunnel_termination_point, yang_name="tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-tp-id', extensions=None), is_container='list', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + te_node_template = __builtin__.property(_get_te_node_template, _set_te_node_template) + te_node_attributes = __builtin__.property(_get_te_node_attributes, _set_te_node_attributes) + oper_status = __builtin__.property(_get_oper_status) + geolocation = __builtin__.property(_get_geolocation) + is_multi_access_dr = __builtin__.property(_get_is_multi_access_dr) + information_source = __builtin__.property(_get_information_source) + information_source_instance = __builtin__.property(_get_information_source_instance) + information_source_state = __builtin__.property(_get_information_source_state) + information_source_entry = __builtin__.property(_get_information_source_entry) + statistics = __builtin__.property(_get_statistics) + tunnel_termination_point = __builtin__.property(_get_tunnel_termination_point, _set_tunnel_termination_point) + + + _pyangbind_elements = OrderedDict([('te_node_template', te_node_template), ('te_node_attributes', te_node_attributes), ('oper_status', oper_status), ('geolocation', geolocation), ('is_multi_access_dr', is_multi_access_dr), ('information_source', information_source), ('information_source_instance', information_source_instance), ('information_source_state', information_source_state), ('information_source_entry', information_source_entry), ('statistics', statistics), ('tunnel_termination_point', tunnel_termination_point), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/geolocation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/geolocation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f9e405188bb0b9a5ca59a72e70cf39a1a47338f8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/geolocation/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class geolocation(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/geolocation. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains a GPS location. + """ + __slots__ = ('_path_helper', '_extmethods', '__altitude','__latitude','__longitude',) + + _yang_name = 'geolocation' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) + self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'geolocation'] + + def _get_altitude(self): + """ + Getter method for altitude, mapped from YANG variable /networks/network/node/te/geolocation/altitude (int64) + + YANG Description: Distance above sea level. + """ + return self.__altitude + + def _set_altitude(self, v, load=False): + """ + Setter method for altitude, mapped from YANG variable /networks/network/node/te/geolocation/altitude (int64) + If this variable is read-only (config: false) in the + source YANG file, then _set_altitude is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_altitude() directly. + + YANG Description: Distance above sea level. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """altitude must be of a type compatible with int64""", + 'defined-type': "int64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False)""", + }) + + self.__altitude = t + if hasattr(self, '_set'): + self._set() + + def _unset_altitude(self): + self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) + + + def _get_latitude(self): + """ + Getter method for latitude, mapped from YANG variable /networks/network/node/te/geolocation/latitude (geographic-coordinate-degree) + + YANG Description: Relative position north or south on the Earth's surface. + """ + return self.__latitude + + def _set_latitude(self, v, load=False): + """ + Setter method for latitude, mapped from YANG variable /networks/network/node/te/geolocation/latitude (geographic-coordinate-degree) + If this variable is read-only (config: false) in the + source YANG file, then _set_latitude is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_latitude() directly. + + YANG Description: Relative position north or south on the Earth's surface. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """latitude must be of a type compatible with geographic-coordinate-degree""", + 'defined-type': "ietf-te-topology:geographic-coordinate-degree", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", + }) + + self.__latitude = t + if hasattr(self, '_set'): + self._set() + + def _unset_latitude(self): + self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + + + def _get_longitude(self): + """ + Getter method for longitude, mapped from YANG variable /networks/network/node/te/geolocation/longitude (geographic-coordinate-degree) + + YANG Description: Angular distance east or west on the Earth's surface. + """ + return self.__longitude + + def _set_longitude(self, v, load=False): + """ + Setter method for longitude, mapped from YANG variable /networks/network/node/te/geolocation/longitude (geographic-coordinate-degree) + If this variable is read-only (config: false) in the + source YANG file, then _set_longitude is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_longitude() directly. + + YANG Description: Angular distance east or west on the Earth's surface. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """longitude must be of a type compatible with geographic-coordinate-degree""", + 'defined-type': "ietf-te-topology:geographic-coordinate-degree", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", + }) + + self.__longitude = t + if hasattr(self, '_set'): + self._set() + + def _unset_longitude(self): + self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + + altitude = __builtin__.property(_get_altitude) + latitude = __builtin__.property(_get_latitude) + longitude = __builtin__.property(_get_longitude) + + + _pyangbind_elements = OrderedDict([('altitude', altitude), ('latitude', latitude), ('longitude', longitude), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e51769ff90cb32cf778bdfc427c8646cf214dc7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/__init__.py @@ -0,0 +1,451 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import information_source_state +from . import connectivity_matrices +from . import underlay_topology +class information_source_entry(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of information sources learned, including the source +that is used. + """ + __slots__ = ('_path_helper', '_extmethods', '__information_source','__information_source_instance','__information_source_state','__connectivity_matrices','__domain_id','__is_abstract','__name','__signaling_address','__underlay_topology',) + + _yang_name = 'information-source-entry' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) + self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__connectivity_matrices = YANGDynClass(base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__domain_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__signaling_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=False) + self.__underlay_topology = YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry'] + + def _get_information_source(self): + """ + Getter method for information_source, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source (te-info-source) + + YANG Description: Indicates the type of information source. + """ + return self.__information_source + + def _set_information_source(self, v, load=False): + """ + Setter method for information_source, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source (te-info-source) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source() directly. + + YANG Description: Indicates the type of information source. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source must be of a type compatible with te-info-source""", + 'defined-type': "ietf-te-topology:te-info-source", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False)""", + }) + + self.__information_source = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source(self): + self.__information_source = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'unknown': {}, 'locally-configured': {}, 'ospfv2': {}, 'ospfv3': {}, 'isis': {}, 'bgp-ls': {}, 'system-processed': {}, 'other': {}},), is_leaf=True, yang_name="information-source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-info-source', is_config=False) + + + def _get_information_source_instance(self): + """ + Getter method for information_source_instance, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_instance (string) + + YANG Description: The name indicating the instance of the information +source. + """ + return self.__information_source_instance + + def _set_information_source_instance(self, v, load=False): + """ + Setter method for information_source_instance, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_instance (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source_instance is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source_instance() directly. + + YANG Description: The name indicating the instance of the information +source. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source_instance must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__information_source_instance = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source_instance(self): + self.__information_source_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="information-source-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_information_source_state(self): + """ + Getter method for information_source_state, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state (container) + + YANG Description: Contains state attributes related to the information +source. + """ + return self.__information_source_state + + def _set_information_source_state(self, v, load=False): + """ + Setter method for information_source_state, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_information_source_state is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_information_source_state() directly. + + YANG Description: Contains state attributes related to the information +source. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """information_source_state must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__information_source_state = t + if hasattr(self, '_set'): + self._set() + + def _unset_information_source_state(self): + self.__information_source_state = YANGDynClass(base=information_source_state.information_source_state, is_container='container', yang_name="information-source-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_connectivity_matrices(self): + """ + Getter method for connectivity_matrices, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices (container) + + YANG Description: Contains a connectivity matrix on a TE node. + """ + return self.__connectivity_matrices + + def _set_connectivity_matrices(self, v, load=False): + """ + Setter method for connectivity_matrices, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_connectivity_matrices is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_connectivity_matrices() directly. + + YANG Description: Contains a connectivity matrix on a TE node. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """connectivity_matrices must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__connectivity_matrices = t + if hasattr(self, '_set'): + self._set() + + def _unset_connectivity_matrices(self): + self.__connectivity_matrices = YANGDynClass(base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_domain_id(self): + """ + Getter method for domain_id, mapped from YANG variable /networks/network/node/te/information_source_entry/domain_id (uint32) + + YANG Description: Identifies the domain to which this node belongs. +This attribute is used to support inter-domain links. + """ + return self.__domain_id + + def _set_domain_id(self, v, load=False): + """ + Setter method for domain_id, mapped from YANG variable /networks/network/node/te/information_source_entry/domain_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_domain_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_domain_id() directly. + + YANG Description: Identifies the domain to which this node belongs. +This attribute is used to support inter-domain links. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """domain_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__domain_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_domain_id(self): + self.__domain_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_is_abstract(self): + """ + Getter method for is_abstract, mapped from YANG variable /networks/network/node/te/information_source_entry/is_abstract (empty) + + YANG Description: Present if the node is abstract; not present if the node +is actual. + """ + return self.__is_abstract + + def _set_is_abstract(self, v, load=False): + """ + Setter method for is_abstract, mapped from YANG variable /networks/network/node/te/information_source_entry/is_abstract (empty) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_abstract is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_abstract() directly. + + YANG Description: Present if the node is abstract; not present if the node +is actual. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_abstract must be of a type compatible with empty""", + 'defined-type': "empty", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False)""", + }) + + self.__is_abstract = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_abstract(self): + self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=False) + + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/name (string) + + YANG Description: Node name. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Node name. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_signaling_address(self): + """ + Getter method for signaling_address, mapped from YANG variable /networks/network/node/te/information_source_entry/signaling_address (inet:ip-address) + + YANG Description: The node's signaling address. + """ + return self.__signaling_address + + def _set_signaling_address(self, v, load=False): + """ + Setter method for signaling_address, mapped from YANG variable /networks/network/node/te/information_source_entry/signaling_address (inet:ip-address) + If this variable is read-only (config: false) in the + source YANG file, then _set_signaling_address is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_signaling_address() directly. + + YANG Description: The node's signaling address. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """signaling_address must be of a type compatible with inet:ip-address""", + 'defined-type': "inet:ip-address", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=False)""", + }) + + self.__signaling_address = t + if hasattr(self, '_set'): + self._set() + + def _unset_signaling_address(self): + self.__signaling_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=False) + + + def _get_underlay_topology(self): + """ + Getter method for underlay_topology, mapped from YANG variable /networks/network/node/te/information_source_entry/underlay_topology (container) + + YANG Description: When an abstract node encapsulates a topology, the +attributes in this container point to said topology. + """ + return self.__underlay_topology + + def _set_underlay_topology(self, v, load=False): + """ + Setter method for underlay_topology, mapped from YANG variable /networks/network/node/te/information_source_entry/underlay_topology (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_underlay_topology is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_underlay_topology() directly. + + YANG Description: When an abstract node encapsulates a topology, the +attributes in this container point to said topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """underlay_topology must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__underlay_topology = t + if hasattr(self, '_set'): + self._set() + + def _unset_underlay_topology(self): + self.__underlay_topology = YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + information_source = __builtin__.property(_get_information_source) + information_source_instance = __builtin__.property(_get_information_source_instance) + information_source_state = __builtin__.property(_get_information_source_state) + connectivity_matrices = __builtin__.property(_get_connectivity_matrices) + domain_id = __builtin__.property(_get_domain_id) + is_abstract = __builtin__.property(_get_is_abstract) + name = __builtin__.property(_get_name) + signaling_address = __builtin__.property(_get_signaling_address) + underlay_topology = __builtin__.property(_get_underlay_topology) + + + _pyangbind_elements = OrderedDict([('information_source', information_source), ('information_source_instance', information_source_instance), ('information_source_state', information_source_state), ('connectivity_matrices', connectivity_matrices), ('domain_id', domain_id), ('is_abstract', is_abstract), ('name', name), ('signaling_address', signaling_address), ('underlay_topology', underlay_topology), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a773758ba44ded62fa976a1b512ca27ca0ac49bb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py @@ -0,0 +1,412 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restrictions +from . import underlay +from . import path_constraints +from . import optimizations +from . import path_properties +from . import connectivity_matrix +class connectivity_matrices(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains a connectivity matrix on a TE node. + """ + __slots__ = ('_path_helper', '_extmethods', '__number_of_entries','__label_restrictions','__is_allowed','__underlay','__path_constraints','__optimizations','__path_properties','__connectivity_matrix',) + + _yang_name = 'connectivity-matrices' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__number_of_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__connectivity_matrix = YANGDynClass(base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices'] + + def _get_number_of_entries(self): + """ + Getter method for number_of_entries, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/number_of_entries (uint16) + + YANG Description: The number of connectivity matrix entries. +If this number is specified in the configuration request, +the number is the requested number of entries, which may +not all be listed in the list; +if this number is reported in the state data, +the number is the current number of operational entries. + """ + return self.__number_of_entries + + def _set_number_of_entries(self, v, load=False): + """ + Setter method for number_of_entries, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/number_of_entries (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number_of_entries is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number_of_entries() directly. + + YANG Description: The number of connectivity matrix entries. +If this number is specified in the configuration request, +the number is the requested number of entries, which may +not all be listed in the list; +if this number is reported in the state data, +the number is the current number of operational entries. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number_of_entries must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False)""", + }) + + self.__number_of_entries = t + if hasattr(self, '_set'): + self._set() + + def _unset_number_of_entries(self): + self.__number_of_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + + + def _get_label_restrictions(self): + """ + Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions (container) + + YANG Description: The label restrictions container. + """ + return self.__label_restrictions + + def _set_label_restrictions(self, v, load=False): + """ + Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restrictions is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restrictions() directly. + + YANG Description: The label restrictions container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restrictions must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_restrictions = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restrictions(self): + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_is_allowed(self): + """ + Getter method for is_allowed, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/is_allowed (boolean) + + YANG Description: 'true' - switching is allowed; +'false' - switching is disallowed. + """ + return self.__is_allowed + + def _set_is_allowed(self, v, load=False): + """ + Setter method for is_allowed, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/is_allowed (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_allowed is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_allowed() directly. + + YANG Description: 'true' - switching is allowed; +'false' - switching is disallowed. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_allowed must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", + }) + + self.__is_allowed = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_allowed(self): + self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + + def _get_underlay(self): + """ + Getter method for underlay, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay (container) + + YANG Description: Attributes of the TE link underlay. + """ + return self.__underlay + + def _set_underlay(self, v, load=False): + """ + Setter method for underlay, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_underlay is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_underlay() directly. + + YANG Description: Attributes of the TE link underlay. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """underlay must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__underlay = t + if hasattr(self, '_set'): + self._set() + + def _unset_underlay(self): + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_constraints(self): + """ + Getter method for path_constraints, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints (container) + + YANG Description: TE named path constraints container. + """ + return self.__path_constraints + + def _set_path_constraints(self, v, load=False): + """ + Setter method for path_constraints, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_constraints is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_constraints() directly. + + YANG Description: TE named path constraints container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_constraints must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_constraints = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_constraints(self): + self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_optimizations(self): + """ + Getter method for optimizations, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations (container) + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + return self.__optimizations + + def _set_optimizations(self, v, load=False): + """ + Setter method for optimizations, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimizations is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimizations() directly. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimizations must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__optimizations = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimizations(self): + self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_properties(self): + """ + Getter method for path_properties, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties (container) + + YANG Description: The TE path properties. + """ + return self.__path_properties + + def _set_path_properties(self, v, load=False): + """ + Setter method for path_properties, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_properties is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_properties() directly. + + YANG Description: The TE path properties. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_properties must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_properties = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_properties(self): + self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_connectivity_matrix(self): + """ + Getter method for connectivity_matrix, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix (list) + + YANG Description: Represents a node's switching limitations, i.e., +limitations in the interconnecting network TE links +across the node. + """ + return self.__connectivity_matrix + + def _set_connectivity_matrix(self, v, load=False): + """ + Setter method for connectivity_matrix, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_connectivity_matrix is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_connectivity_matrix() directly. + + YANG Description: Represents a node's switching limitations, i.e., +limitations in the interconnecting network TE links +across the node. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """connectivity_matrix must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__connectivity_matrix = t + if hasattr(self, '_set'): + self._set() + + def _unset_connectivity_matrix(self): + self.__connectivity_matrix = YANGDynClass(base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + number_of_entries = __builtin__.property(_get_number_of_entries) + label_restrictions = __builtin__.property(_get_label_restrictions) + is_allowed = __builtin__.property(_get_is_allowed) + underlay = __builtin__.property(_get_underlay) + path_constraints = __builtin__.property(_get_path_constraints) + optimizations = __builtin__.property(_get_optimizations) + path_properties = __builtin__.property(_get_path_properties) + connectivity_matrix = __builtin__.property(_get_connectivity_matrix) + + + _pyangbind_elements = OrderedDict([('number_of_entries', number_of_entries), ('label_restrictions', label_restrictions), ('is_allowed', is_allowed), ('underlay', underlay), ('path_constraints', path_constraints), ('optimizations', optimizations), ('path_properties', path_properties), ('connectivity_matrix', connectivity_matrix), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..edc6885b375fde570c5fc0ea5a921e49f04146da --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py @@ -0,0 +1,405 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import from_ +from . import to +from . import underlay +from . import path_constraints +from . import optimizations +from . import path_properties +class connectivity_matrix(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Represents a node's switching limitations, i.e., +limitations in the interconnecting network TE links +across the node. + """ + __slots__ = ('_path_helper', '_extmethods', '__id','__from_','__to','__is_allowed','__underlay','__path_constraints','__optimizations','__path_properties',) + + _yang_name = 'connectivity-matrix' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__from_ = YANGDynClass(base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__to = YANGDynClass(base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix'] + + def _get_id(self): + """ + Getter method for id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/id (uint32) + + YANG Description: Identifies the connectivity matrix entry. + """ + return self.__id + + def _set_id(self, v, load=False): + """ + Setter method for id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_id() directly. + + YANG Description: Identifies the connectivity matrix entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__id = t + if hasattr(self, '_set'): + self._set() + + def _unset_id(self): + self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_from_(self): + """ + Getter method for from_, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from (container) + + YANG Description: Reference to a source LTP. + """ + return self.__from_ + + def _set_from_(self, v, load=False): + """ + Setter method for from_, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_from_ is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_from_() directly. + + YANG Description: Reference to a source LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """from_ must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__from_ = t + if hasattr(self, '_set'): + self._set() + + def _unset_from_(self): + self.__from_ = YANGDynClass(base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_to(self): + """ + Getter method for to, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to (container) + + YANG Description: Reference to a destination LTP. + """ + return self.__to + + def _set_to(self, v, load=False): + """ + Setter method for to, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_to is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_to() directly. + + YANG Description: Reference to a destination LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """to must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__to = t + if hasattr(self, '_set'): + self._set() + + def _unset_to(self): + self.__to = YANGDynClass(base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_is_allowed(self): + """ + Getter method for is_allowed, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/is_allowed (boolean) + + YANG Description: 'true' - switching is allowed; +'false' - switching is disallowed. + """ + return self.__is_allowed + + def _set_is_allowed(self, v, load=False): + """ + Setter method for is_allowed, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/is_allowed (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_allowed is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_allowed() directly. + + YANG Description: 'true' - switching is allowed; +'false' - switching is disallowed. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_allowed must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", + }) + + self.__is_allowed = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_allowed(self): + self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + + def _get_underlay(self): + """ + Getter method for underlay, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay (container) + + YANG Description: Attributes of the TE link underlay. + """ + return self.__underlay + + def _set_underlay(self, v, load=False): + """ + Setter method for underlay, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_underlay is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_underlay() directly. + + YANG Description: Attributes of the TE link underlay. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """underlay must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__underlay = t + if hasattr(self, '_set'): + self._set() + + def _unset_underlay(self): + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_constraints(self): + """ + Getter method for path_constraints, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints (container) + + YANG Description: TE named path constraints container. + """ + return self.__path_constraints + + def _set_path_constraints(self, v, load=False): + """ + Setter method for path_constraints, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_constraints is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_constraints() directly. + + YANG Description: TE named path constraints container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_constraints must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_constraints = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_constraints(self): + self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_optimizations(self): + """ + Getter method for optimizations, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations (container) + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + return self.__optimizations + + def _set_optimizations(self, v, load=False): + """ + Setter method for optimizations, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimizations is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimizations() directly. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimizations must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__optimizations = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimizations(self): + self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_properties(self): + """ + Getter method for path_properties, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties (container) + + YANG Description: The TE path properties. + """ + return self.__path_properties + + def _set_path_properties(self, v, load=False): + """ + Setter method for path_properties, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_properties is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_properties() directly. + + YANG Description: The TE path properties. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_properties must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_properties = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_properties(self): + self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + id = __builtin__.property(_get_id) + from_ = __builtin__.property(_get_from_) + to = __builtin__.property(_get_to) + is_allowed = __builtin__.property(_get_is_allowed) + underlay = __builtin__.property(_get_underlay) + path_constraints = __builtin__.property(_get_path_constraints) + optimizations = __builtin__.property(_get_optimizations) + path_properties = __builtin__.property(_get_path_properties) + + + _pyangbind_elements = OrderedDict([('id', id), ('from_', from_), ('to', to), ('is_allowed', is_allowed), ('underlay', underlay), ('path_constraints', path_constraints), ('optimizations', optimizations), ('path_properties', path_properties), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8769c9ff833e1692ef73c35baa17a41698f52311 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/__init__.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restrictions +class from_(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Reference to a source LTP. + """ + __slots__ = ('_path_helper', '_extmethods', '__tp_ref','__label_restrictions',) + + _yang_name = 'from' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from'] + + def _get_tp_ref(self): + """ + Getter method for tp_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/tp_ref (leafref) + + YANG Description: Relative reference to a termination point. + """ + return self.__tp_ref + + def _set_tp_ref(self, v, load=False): + """ + Setter method for tp_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/tp_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tp_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tp_ref() directly. + + YANG Description: Relative reference to a termination point. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tp_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__tp_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_tp_ref(self): + self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + + def _get_label_restrictions(self): + """ + Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions (container) + + YANG Description: The label restrictions container. + """ + return self.__label_restrictions + + def _set_label_restrictions(self, v, load=False): + """ + Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restrictions is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restrictions() directly. + + YANG Description: The label restrictions container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restrictions must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_restrictions = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restrictions(self): + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + tp_ref = __builtin__.property(_get_tp_ref) + label_restrictions = __builtin__.property(_get_label_restrictions) + + + _pyangbind_elements = OrderedDict([('tp_ref', tp_ref), ('label_restrictions', label_restrictions), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..90df40ae35535e21096173e6b5ef0176bbc231e4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restriction +class label_restrictions(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The label restrictions container. + """ + __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) + + _yang_name = 'label-restrictions' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions'] + + def _get_label_restriction(self): + """ + Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction (list) + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + return self.__label_restriction + + def _set_label_restriction(self, v, load=False): + """ + Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restriction() directly. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restriction must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__label_restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restriction(self): + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + label_restriction = __builtin__.property(_get_label_restriction) + + + _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..325db171092d6188d67e021e75e86b189b8ecc19 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,450 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_start +from . import label_end +from . import label_step +from . import otn_label_range +from . import ethernet_label_range +class label_restriction(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) + + _yang_name = 'label-restriction' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction'] + + def _get_restriction(self): + """ + Getter method for restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/restriction (enumeration) + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + return self.__restriction + + def _set_restriction(self, v, load=False): + """ + Setter method for restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/restriction (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restriction() directly. + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restriction must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False)""", + }) + + self.__restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_restriction(self): + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) + + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/index (uint32) + + YANG Description: The index of the label restriction list entry. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: The index of the label restriction list entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_label_start(self): + """ + Getter method for label_start, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start (container) + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + return self.__label_start + + def _set_label_start(self, v, load=False): + """ + Setter method for label_start, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_start is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_start() directly. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_start must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_start = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_start(self): + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_end(self): + """ + Getter method for label_end, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end (container) + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + return self.__label_end + + def _set_label_end(self, v, load=False): + """ + Setter method for label_end, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_end is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_end() directly. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_end must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_end = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_end(self): + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_step(self): + """ + Getter method for label_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step (container) + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + return self.__label_step + + def _set_label_step(self, v, load=False): + """ + Setter method for label_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_step() directly. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_step must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_step(self): + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_range_bitmap(self): + """ + Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + return self.__range_bitmap + + def _set_range_bitmap(self, v, load=False): + """ + Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_bitmap is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_bitmap() directly. + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", + 'defined-type': "yang:hex-string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False)""", + }) + + self.__range_bitmap = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_bitmap(self): + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) + + + def _get_otn_label_range(self): + """ + Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range (container) + + YANG Description: Label range information for OTN. + """ + return self.__otn_label_range + + def _set_otn_label_range(self, v, load=False): + """ + Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_label_range() directly. + + YANG Description: Label range information for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_label_range(self): + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_ethernet_label_range(self): + """ + Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range (container) + + YANG Description: Ethernet-specific label range related information. + """ + return self.__ethernet_label_range + + def _set_ethernet_label_range(self, v, load=False): + """ + Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ethernet_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ethernet_label_range() directly. + + YANG Description: Ethernet-specific label range related information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ethernet_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False)""", + }) + + self.__ethernet_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_ethernet_label_range(self): + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) + + restriction = __builtin__.property(_get_restriction) + index = __builtin__.property(_get_index) + label_start = __builtin__.property(_get_label_start) + label_end = __builtin__.property(_get_label_end) + label_step = __builtin__.property(_get_label_step) + range_bitmap = __builtin__.property(_get_range_bitmap) + otn_label_range = __builtin__.property(_get_otn_label_range) + ethernet_label_range = __builtin__.property(_get_ethernet_label_range) + + + _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ccc0a8bf938137b56874dff8b76cac52f6fe9f11 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ethernet_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/ethernet-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Ethernet-specific label range related information. + """ + __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) + + _yang_name = 'ethernet-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] + + def _get_tag_type(self): + """ + Getter method for tag_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + + YANG Description: VLAN tag type. + """ + return self.__tag_type + + def _set_tag_type(self, v, load=False): + """ + Setter method for tag_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_tag_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tag_type() directly. + + YANG Description: VLAN tag type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False)""", + }) + + self.__tag_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tag_type(self): + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + + YANG Description: priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) + + tag_type = __builtin__.property(_get_tag_type) + priority = __builtin__.property(_get_priority) + + + _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8116db8f36b36091805b53088883c23dacf04b29 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_end(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-end. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-end' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-end'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d689d60add0e4a98bdf1660273236a8e8fa0a4a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-end/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3dbff3b161cde1c2502bdbfdf693d91523aab36c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + tpn = __builtin__.property(_get_tpn) + ts = __builtin__.property(_get_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c682b45e55c56f0da6fa132bd251230c253280af --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_start(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-start. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-start' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-start'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d28ae831e848224cc5e3c307bbaf3c4a3ad1357 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-start/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..458413ca8117db279493430de3d46d8e84404c84 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + tpn = __builtin__.property(_get_tpn) + ts = __builtin__.property(_get_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..817c68ae2952a3b519fb3d39519d1665660afaf9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class label_step(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-step. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) + + _yang_name = 'label-step' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-step'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/generic (int32) + + YANG Description: Label range step. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/generic (int32) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Label range step. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with int32""", + 'defined-type': "int32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn (container) + + YANG Description: Label step for OTN + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label step for OTN + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_eth_step(self): + """ + Getter method for eth_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/eth_step (uint16) + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + return self.__eth_step + + def _set_eth_step(self, v, load=False): + """ + Setter method for eth_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/eth_step (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_step() directly. + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_step must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False)""", + }) + + self.__eth_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_step(self): + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + eth_step = __builtin__.property(_get_eth_step) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..715687de97618e53b00342fe79a49f3812011355 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-step/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label step for OTN + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + tpn = __builtin__.property(_get_tpn) + ts = __builtin__.property(_get_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..82fc8d6a107cf829ac674f2b2f6897c4fe4e9236 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/otn-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label range information for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) + + _yang_name = 'otn-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'otn-label-range'] + + def _get_range_type(self): + """ + Getter method for range_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + return self.__range_type + + def _set_range_type(self, v, load=False): + """ + Setter method for range_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_type() directly. + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_type must be of a type compatible with otn-label-range-type""", + 'defined-type': "ietf-otn-topology:otn-label-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False)""", + }) + + self.__range_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_type(self): + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_odu_type_list(self): + """ + Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + return self.__odu_type_list + + def _set_odu_type_list(self, v, load=False): + """ + Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type_list() directly. + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type_list must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__odu_type_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type_list(self): + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/priority (uint8) + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) + + range_type = __builtin__.property(_get_range_type) + tsg = __builtin__.property(_get_tsg) + odu_type_list = __builtin__.property(_get_odu_type_list) + priority = __builtin__.property(_get_priority) + + + _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ff0a5fab9e00c2dad085dd6e6878cd72be331294 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py @@ -0,0 +1,199 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import optimization_metric +from . import tiebreakers +from . import objective_function +class optimizations(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + __slots__ = ('_path_helper', '_extmethods', '__optimization_metric','__tiebreakers','__objective_function',) + + _yang_name = 'optimizations' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations'] + + def _get_optimization_metric(self): + """ + Getter method for optimization_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric (list) + + YANG Description: TE path metric type. + """ + return self.__optimization_metric + + def _set_optimization_metric(self, v, load=False): + """ + Setter method for optimization_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimization_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimization_metric() directly. + + YANG Description: TE path metric type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimization_metric must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__optimization_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimization_metric(self): + self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_tiebreakers(self): + """ + Getter method for tiebreakers, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers (container) + + YANG Description: Container for the list of tiebreakers. + """ + return self.__tiebreakers + + def _set_tiebreakers(self, v, load=False): + """ + Setter method for tiebreakers, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreakers is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreakers() directly. + + YANG Description: Container for the list of tiebreakers. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreakers must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__tiebreakers = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreakers(self): + self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_objective_function(self): + """ + Getter method for objective_function, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function (container) + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + return self.__objective_function + + def _set_objective_function(self, v, load=False): + """ + Setter method for objective_function, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_objective_function is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_objective_function() directly. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """objective_function must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__objective_function = t + if hasattr(self, '_set'): + self._set() + + def _unset_objective_function(self): + self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + optimization_metric = __builtin__.property(_get_optimization_metric) + tiebreakers = __builtin__.property(_get_tiebreakers) + objective_function = __builtin__.property(_get_objective_function) + + __choices__ = {'algorithm': {'metric': ['optimization_metric', 'tiebreakers'], 'objective-function': ['objective_function']}} + _pyangbind_elements = OrderedDict([('optimization_metric', optimization_metric), ('tiebreakers', tiebreakers), ('objective_function', objective_function), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9fdbbbf68758cf2a463614b37e87d03b4915884 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class objective_function(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/objective-function. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + __slots__ = ('_path_helper', '_extmethods', '__objective_function_type',) + + _yang_name = 'objective-function' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'objective-function'] + + def _get_objective_function_type(self): + """ + Getter method for objective_function_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/objective_function_type (identityref) + + YANG Description: Objective function entry. + """ + return self.__objective_function_type + + def _set_objective_function_type(self, v, load=False): + """ + Setter method for objective_function_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/objective_function/objective_function_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_objective_function_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_objective_function_type() directly. + + YANG Description: Objective function entry. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """objective_function_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__objective_function_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_objective_function_type(self): + self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + objective_function_type = __builtin__.property(_get_objective_function_type) + + __choices__ = {'algorithm': {'objective-function': ['objective_function_type']}} + _pyangbind_elements = OrderedDict([('objective_function_type', objective_function_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74c142e286f35832cce0def7cfde3f1f063ad8dd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py @@ -0,0 +1,241 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import explicit_route_exclude_objects +from . import explicit_route_include_objects +class optimization_metric(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric type. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__weight','__explicit_route_exclude_objects','__explicit_route_include_objects',) + + _yang_name = 'optimization-metric' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/metric_type (identityref) + + YANG Description: Identifies the 'metric-type' that the path computation +process uses for optimization. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: Identifies the 'metric-type' that the path computation +process uses for optimization. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_weight(self): + """ + Getter method for weight, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/weight (uint8) + + YANG Description: TE path metric normalization weight. + """ + return self.__weight + + def _set_weight(self, v, load=False): + """ + Setter method for weight, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/weight (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_weight is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_weight() directly. + + YANG Description: TE path metric normalization weight. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """weight must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", + }) + + self.__weight = t + if hasattr(self, '_set'): + self._set() + + def _unset_weight(self): + self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + + + def _get_explicit_route_exclude_objects(self): + """ + Getter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects (container) + + YANG Description: Container for the 'exclude route' object list. + """ + return self.__explicit_route_exclude_objects + + def _set_explicit_route_exclude_objects(self, v, load=False): + """ + Setter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_explicit_route_exclude_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_explicit_route_exclude_objects() directly. + + YANG Description: Container for the 'exclude route' object list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """explicit_route_exclude_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__explicit_route_exclude_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_explicit_route_exclude_objects(self): + self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_explicit_route_include_objects(self): + """ + Getter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects (container) + + YANG Description: Container for the 'include route' object list. + """ + return self.__explicit_route_include_objects + + def _set_explicit_route_include_objects(self, v, load=False): + """ + Setter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_explicit_route_include_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_explicit_route_include_objects() directly. + + YANG Description: Container for the 'include route' object list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """explicit_route_include_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__explicit_route_include_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_explicit_route_include_objects(self): + self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + metric_type = __builtin__.property(_get_metric_type) + weight = __builtin__.property(_get_weight) + explicit_route_exclude_objects = __builtin__.property(_get_explicit_route_exclude_objects) + explicit_route_include_objects = __builtin__.property(_get_explicit_route_include_objects) + + __choices__ = {'algorithm': {'metric': ['metric_type', 'weight', 'explicit_route_exclude_objects', 'explicit_route_include_objects']}} + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('weight', weight), ('explicit_route_exclude_objects', explicit_route_exclude_objects), ('explicit_route_include_objects', explicit_route_include_objects), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ed88eea0523e3f83d8f162ce0bbec135e0dc81fa --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import route_object_exclude_object +class explicit_route_exclude_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the 'exclude route' object list. + """ + __slots__ = ('_path_helper', '_extmethods', '__route_object_exclude_object',) + + _yang_name = 'explicit-route-exclude-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects'] + + def _get_route_object_exclude_object(self): + """ + Getter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + return self.__route_object_exclude_object + + def _set_route_object_exclude_object(self, v, load=False): + """ + Setter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_route_object_exclude_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_route_object_exclude_object() directly. + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """route_object_exclude_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__route_object_exclude_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_route_object_exclude_object(self): + self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + route_object_exclude_object = __builtin__.property(_get_route_object_exclude_object) + + __choices__ = {'algorithm': {'metric': ['route_object_exclude_object']}} + _pyangbind_elements = OrderedDict([('route_object_exclude_object', route_object_exclude_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ad5bff3e1db5d7ba061f150470e3c611553f7ed6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,365 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +from . import srlg +class route_object_exclude_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop','__srlg',) + + _yang_name = 'route-object-exclude-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_srlg(self): + """ + Getter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) + + YANG Description: SRLG container. + """ + return self.__srlg + + def _set_srlg(self, v, load=False): + """ + Setter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_srlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_srlg() directly. + + YANG Description: SRLG container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """srlg must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__srlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_srlg(self): + self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + index = __builtin__.property(_get_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + srlg = __builtin__.property(_get_srlg) + + __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop'], 'srlg': ['srlg']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ('srlg', srlg), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..40a38d18d628ed146248bdc5225294c9735e8f71 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d86889be2e17816277f7cc9d2f844cf3bbfeeb2e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b404a2341dd3c0b52f3ddcf6d370a8649aa6252b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fbabbb174ea802870622969f3ebfdc96041ec866 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4a9ce25d09b5b8f875683b6ddfb480498d02c772 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81ae5ee3b77f37707e2da604edf964ff04ec629a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ba86eb284b0d67d02217472f28df7cd6bcaec674 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class srlg(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/srlg. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: SRLG container. + """ + __slots__ = ('_path_helper', '_extmethods', '__srlg',) + + _yang_name = 'srlg' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'srlg'] + + def _get_srlg(self): + """ + Getter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) + + YANG Description: SRLG value. + """ + return self.__srlg + + def _set_srlg(self, v, load=False): + """ + Setter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_srlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_srlg() directly. + + YANG Description: SRLG value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """srlg must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__srlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_srlg(self): + self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + srlg = __builtin__.property(_get_srlg) + + __choices__ = {'type': {'srlg': ['srlg']}} + _pyangbind_elements = OrderedDict([('srlg', srlg), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..edb8b9e25e13ebe6ee7960ab0f7c5e2d8dee9012 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21986a9121fe59debbe172846f8a3555461a08dd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import route_object_include_object +class explicit_route_include_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the 'include route' object list. + """ + __slots__ = ('_path_helper', '_extmethods', '__route_object_include_object',) + + _yang_name = 'explicit-route-include-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects'] + + def _get_route_object_include_object(self): + """ + Getter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + return self.__route_object_include_object + + def _set_route_object_include_object(self, v, load=False): + """ + Setter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_route_object_include_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_route_object_include_object() directly. + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """route_object_include_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__route_object_include_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_route_object_include_object(self): + self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + route_object_include_object = __builtin__.property(_get_route_object_include_object) + + __choices__ = {'algorithm': {'metric': ['route_object_include_object']}} + _pyangbind_elements = OrderedDict([('route_object_include_object', route_object_include_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5140272eec2eedae3de75b2f870493f81ce95e8a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,325 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class route_object_include_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'route-object-include-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + index = __builtin__.property(_get_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + + __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0f65b4645ffa752af6fd7b7d7fb5b666c4e06fa4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..882e1f01ad2e280789f31daa41c1cfd7db8c0b0b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2dde61c314cd20e407b23b60262896426b0bad5a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..784b431b63e8e1512737a4aa72e186a0fdc7425d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..14455045c23fefc0083d02c80eb537bb6fd7a1d8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..70eea9f9a90b0c4be8d37bf71a715c92654a731b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..eb61c881e99e645a8ba8de8a09eeb50add524777 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8c6d935272024dc3c1b00e6c99bda99b30961f06 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tiebreaker +class tiebreakers(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/tiebreakers. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of tiebreakers. + """ + __slots__ = ('_path_helper', '_extmethods', '__tiebreaker',) + + _yang_name = 'tiebreakers' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'tiebreakers'] + + def _get_tiebreaker(self): + """ + Getter method for tiebreaker, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker (list) + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + return self.__tiebreaker + + def _set_tiebreaker(self, v, load=False): + """ + Setter method for tiebreaker, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreaker is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreaker() directly. + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreaker must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__tiebreaker = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreaker(self): + self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + tiebreaker = __builtin__.property(_get_tiebreaker) + + __choices__ = {'algorithm': {'metric': ['tiebreaker']}} + _pyangbind_elements = OrderedDict([('tiebreaker', tiebreaker), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..52b5c81b73875d53580d39558efa2b25529d3ea6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tiebreaker(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/optimizations/tiebreakers/tiebreaker. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + __slots__ = ('_path_helper', '_extmethods', '__tiebreaker_type',) + + _yang_name = 'tiebreaker' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'tiebreakers', 'tiebreaker'] + + def _get_tiebreaker_type(self): + """ + Getter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) + + YANG Description: Identifies an entry in the list of tiebreakers. + """ + return self.__tiebreaker_type + + def _set_tiebreaker_type(self, v, load=False): + """ + Setter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreaker_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreaker_type() directly. + + YANG Description: Identifies an entry in the list of tiebreakers. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreaker_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tiebreaker_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreaker_type(self): + self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + tiebreaker_type = __builtin__.property(_get_tiebreaker_type) + + __choices__ = {'algorithm': {'metric': ['tiebreaker_type']}} + _pyangbind_elements = OrderedDict([('tiebreaker_type', tiebreaker_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..36a802786ce00a6338c3c1e09e7054ca2b79cf39 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py @@ -0,0 +1,523 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +from . import path_metric_bounds +from . import path_affinities_values +from . import path_affinity_names +from . import path_srlgs_lists +from . import path_srlgs_names +class path_constraints(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE named path constraints container. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth','__link_protection','__setup_priority','__hold_priority','__signaling_type','__path_metric_bounds','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__disjointness',) + + _yang_name = 'path-constraints' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints'] + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_link_protection(self): + """ + Getter method for link_protection, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/link_protection (identityref) + + YANG Description: Link protection type required for the links included +in the computed path. + """ + return self.__link_protection + + def _set_link_protection(self, v, load=False): + """ + Setter method for link_protection, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/link_protection (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_protection is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_protection() directly. + + YANG Description: Link protection type required for the links included +in the computed path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_protection must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__link_protection = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_protection(self): + self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_setup_priority(self): + """ + Getter method for setup_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/setup_priority (uint8) + + YANG Description: TE LSP requested setup priority. + """ + return self.__setup_priority + + def _set_setup_priority(self, v, load=False): + """ + Setter method for setup_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/setup_priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_setup_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_setup_priority() directly. + + YANG Description: TE LSP requested setup priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """setup_priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", + }) + + self.__setup_priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_setup_priority(self): + self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + + + def _get_hold_priority(self): + """ + Getter method for hold_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/hold_priority (uint8) + + YANG Description: TE LSP requested hold priority. + """ + return self.__hold_priority + + def _set_hold_priority(self, v, load=False): + """ + Setter method for hold_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/hold_priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_hold_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hold_priority() directly. + + YANG Description: TE LSP requested hold priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hold_priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", + }) + + self.__hold_priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_hold_priority(self): + self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + + + def _get_signaling_type(self): + """ + Getter method for signaling_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/signaling_type (identityref) + + YANG Description: TE tunnel path signaling type. + """ + return self.__signaling_type + + def _set_signaling_type(self, v, load=False): + """ + Setter method for signaling_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/signaling_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_signaling_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_signaling_type() directly. + + YANG Description: TE tunnel path signaling type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """signaling_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__signaling_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_signaling_type(self): + self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_path_metric_bounds(self): + """ + Getter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds (container) + + YANG Description: TE path metric bounds container. + """ + return self.__path_metric_bounds + + def _set_path_metric_bounds(self, v, load=False): + """ + Setter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric_bounds is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric_bounds() directly. + + YANG Description: TE path metric bounds container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric_bounds must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_metric_bounds = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric_bounds(self): + self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_affinities_values(self): + """ + Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values (container) + + YANG Description: Path affinities represented as values. + """ + return self.__path_affinities_values + + def _set_path_affinities_values(self, v, load=False): + """ + Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_values() directly. + + YANG Description: Path affinities represented as values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_values must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinities_values = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_values(self): + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_affinity_names(self): + """ + Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names (container) + + YANG Description: Path affinities represented as names. + """ + return self.__path_affinity_names + + def _set_path_affinity_names(self, v, load=False): + """ + Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_names() directly. + + YANG Description: Path affinities represented as names. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinity_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_names(self): + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_lists(self): + """ + Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists (container) + + YANG Description: Path SRLG properties container. + """ + return self.__path_srlgs_lists + + def _set_path_srlgs_lists(self, v, load=False): + """ + Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_lists is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_lists() directly. + + YANG Description: Path SRLG properties container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_lists must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_lists = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_lists(self): + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_names(self): + """ + Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names (container) + + YANG Description: Container for the list of named SRLGs. + """ + return self.__path_srlgs_names + + def _set_path_srlgs_names(self, v, load=False): + """ + Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_names() directly. + + YANG Description: Container for the list of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_names(self): + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_disjointness(self): + """ + Getter method for disjointness, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/disjointness (te-path-disjointness) + + YANG Description: The type of resource disjointness. +When configured for a primary path, the disjointness level +applies to all secondary LSPs. When configured for a +secondary path, the disjointness level overrides the level +configured for the primary path. + """ + return self.__disjointness + + def _set_disjointness(self, v, load=False): + """ + Setter method for disjointness, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/disjointness (te-path-disjointness) + If this variable is read-only (config: false) in the + source YANG file, then _set_disjointness is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_disjointness() directly. + + YANG Description: The type of resource disjointness. +When configured for a primary path, the disjointness level +applies to all secondary LSPs. When configured for a +secondary path, the disjointness level overrides the level +configured for the primary path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """disjointness must be of a type compatible with te-path-disjointness""", + 'defined-type': "ietf-te-topology:te-path-disjointness", + 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False)""", + }) + + self.__disjointness = t + if hasattr(self, '_set'): + self._set() + + def _unset_disjointness(self): + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False) + + te_bandwidth = __builtin__.property(_get_te_bandwidth) + link_protection = __builtin__.property(_get_link_protection) + setup_priority = __builtin__.property(_get_setup_priority) + hold_priority = __builtin__.property(_get_hold_priority) + signaling_type = __builtin__.property(_get_signaling_type) + path_metric_bounds = __builtin__.property(_get_path_metric_bounds) + path_affinities_values = __builtin__.property(_get_path_affinities_values) + path_affinity_names = __builtin__.property(_get_path_affinity_names) + path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) + path_srlgs_names = __builtin__.property(_get_path_srlgs_names) + disjointness = __builtin__.property(_get_disjointness) + + + _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ('link_protection', link_protection), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('signaling_type', signaling_type), ('path_metric_bounds', path_metric_bounds), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('disjointness', disjointness), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aec7be61a4d5a62743420173d73c07dc98f4c0b7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinities_value +class path_affinities_values(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-affinities-values. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as values. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) + + _yang_name = 'path-affinities-values' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinities-values'] + + def _get_path_affinities_value(self): + """ + Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinities_value + + def _set_path_affinities_value(self, v, load=False): + """ + Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_value() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_value must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinities_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_value(self): + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinities_value = __builtin__.property(_get_path_affinities_value) + + + _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7a8d69da62bff28db4a5c294238a07d4fd36df9e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_affinities_value(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-affinities-values/path-affinities-value. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) + + _yang_name = 'path-affinities-value' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinities-values', 'path-affinities-value'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) + + YANG Description: The affinity value. The default is empty. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: The affinity value. The default is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with admin-groups""", + 'defined-type': "ietf-te-topology:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + usage = __builtin__.property(_get_usage) + value = __builtin__.property(_get_value) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ac5c598a48c14e1beed8d680b6da8c350b0eeacc --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinity_name +class path_affinity_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-affinity-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as names. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) + + _yang_name = 'path-affinity-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinity-names'] + + def _get_path_affinity_name(self): + """ + Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinity_name + + def _set_path_affinity_name(self, v, load=False): + """ + Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_name() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_name(self): + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinity_name = __builtin__.property(_get_path_affinity_name) + + + _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..df70c3c795414c8923b496cc519a630c3fbac04b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import affinity_name +class path_affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-affinity-names/path-affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) + + _yang_name = 'path-affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinity-names', 'path-affinity-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_affinity_name(self): + """ + Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) + + YANG Description: List of named affinities. + """ + return self.__affinity_name + + def _set_affinity_name(self, v, load=False): + """ + Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_affinity_name() directly. + + YANG Description: List of named affinities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_affinity_name(self): + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + usage = __builtin__.property(_get_usage) + affinity_name = __builtin__.property(_get_affinity_name) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5b69454e75f6d6e0971bc82173c8f01e5572eb27 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-affinity-names/path-affinity-name/affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinities. + """ + __slots__ = ('_path_helper', '_extmethods', '__name',) + + _yang_name = 'affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) + + YANG Description: Identifies a named affinity entry. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Identifies a named affinity entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + name = __builtin__.property(_get_name) + + + _pyangbind_elements = OrderedDict([('name', name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d5df4f4698edf0430c3d4e4a063ff3af693f8039 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_metric_bound +class path_metric_bounds(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-metric-bounds. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric bounds container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound',) + + _yang_name = 'path-metric-bounds' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-metric-bounds'] + + def _get_path_metric_bound(self): + """ + Getter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound (list) + + YANG Description: List of TE path metric bounds. + """ + return self.__path_metric_bound + + def _set_path_metric_bound(self, v, load=False): + """ + Setter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric_bound is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric_bound() directly. + + YANG Description: List of TE path metric bounds. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric_bound must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_metric_bound = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric_bound(self): + self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_metric_bound = __builtin__.property(_get_path_metric_bound) + + + _pyangbind_elements = OrderedDict([('path_metric_bound', path_metric_bound), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fd7e445c0d416fe1cd5778f0a07f32503cb30a26 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,165 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_metric_bound(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-metric-bounds/path-metric-bound. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of TE path metric bounds. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__upper_bound',) + + _yang_name = 'path-metric-bound' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-metric-bounds', 'path-metric-bound'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) + + YANG Description: Identifies an entry in the list of 'metric-type' items +bound for the TE path. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: Identifies an entry in the list of 'metric-type' items +bound for the TE path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_upper_bound(self): + """ + Getter method for upper_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) + + YANG Description: Upper bound on the end-to-end TE path metric. A zero +indicates an unbounded upper limit for the specific +'metric-type'. + """ + return self.__upper_bound + + def _set_upper_bound(self, v, load=False): + """ + Setter method for upper_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_upper_bound is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_upper_bound() directly. + + YANG Description: Upper bound on the end-to-end TE path metric. A zero +indicates an unbounded upper limit for the specific +'metric-type'. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """upper_bound must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__upper_bound = t + if hasattr(self, '_set'): + self._set() + + def _unset_upper_bound(self): + self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + metric_type = __builtin__.property(_get_metric_type) + upper_bound = __builtin__.property(_get_upper_bound) + + + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('upper_bound', upper_bound), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f089523be84c77715f2ef69f20fee14ddd096c4a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_list +class path_srlgs_lists(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-lists. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path SRLG properties container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) + + _yang_name = 'path-srlgs-lists' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-lists'] + + def _get_path_srlgs_list(self): + """ + Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list (list) + + YANG Description: List of SRLG values to be included or excluded. + """ + return self.__path_srlgs_list + + def _set_path_srlgs_list(self, v, load=False): + """ + Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_list() directly. + + YANG Description: List of SRLG values to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_list must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_list(self): + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_list = __builtin__.property(_get_path_srlgs_list) + + + _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b48cb25ffa81f50cf1d51a2efc2e7ef82f6eb6db --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_list(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-lists/path-srlgs-list. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of SRLG values to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) + + _yang_name = 'path-srlgs-list' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-lists', 'path-srlgs-list'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_values(self): + """ + Getter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) + + YANG Description: List of SRLG values. + """ + return self.__values + + def _set_values(self, v, load=False): + """ + Setter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_values() directly. + + YANG Description: List of SRLG values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """values must be of a type compatible with srlg""", + 'defined-type': "ietf-te-topology:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", + }) + + self.__values = t + if hasattr(self, '_set'): + self._set() + + def _unset_values(self): + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + usage = __builtin__.property(_get_usage) + values = __builtin__.property(_get_values) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d18d1658d5bb0cd62f7a9adec7140b198f27df3a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_name +class path_srlgs_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of named SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) + + _yang_name = 'path-srlgs-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-names'] + + def _get_path_srlgs_name(self): + """ + Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name (list) + + YANG Description: List of named SRLGs to be included or excluded. + """ + return self.__path_srlgs_name + + def _set_path_srlgs_name(self, v, load=False): + """ + Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_name() directly. + + YANG Description: List of named SRLGs to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_name(self): + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_name = __builtin__.property(_get_path_srlgs_name) + + + _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cee736f2442ff529b658cda7cb8631a1580d9776 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-names/path-srlgs-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named SRLGs to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) + + _yang_name = 'path-srlgs-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-names', 'path-srlgs-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_names(self): + """ + Getter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/names (string) + + YANG Description: List of named SRLGs. + """ + return self.__names + + def _set_names(self, v, load=False): + """ + Setter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/names (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_names() directly. + + YANG Description: List of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """names must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__names = t + if hasattr(self, '_set'): + self._set() + + def _unset_names(self): + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + usage = __builtin__.property(_get_usage) + names = __builtin__.property(_get_names) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a079dcabfae8a4a267d46459bd88664e9c3f8723 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b5dd7c31d174362032052dfb9c602cbe4c29c0c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + + + def _get_odtu_flex_type(self): + """ + Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +set up along the underlay path of this OTN +connectivity matrix entry. + """ + return self.__odtu_flex_type + + def _set_odtu_flex_type(self, v, load=False): + """ + Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_odtu_flex_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odtu_flex_type() directly. + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +set up along the underlay path of this OTN +connectivity matrix entry. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", + 'defined-type': "l1-types:odtu-flex-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False)""", + }) + + self.__odtu_flex_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odtu_flex_type(self): + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False) + + odulist = __builtin__.property(_get_odulist) + odtu_flex_type = __builtin__.property(_get_odtu_flex_type) + + __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} + _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..afa750977534afaf21fff915a0144bc78bdde0d0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-constraints/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + odu_type = __builtin__.property(_get_odu_type) + number = __builtin__.property(_get_number) + ts_number = __builtin__.property(_get_ts_number) + + __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f87c34494c5e902ec0b191b491c9f87048a71fc0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py @@ -0,0 +1,318 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_metric +from . import path_affinities_values +from . import path_affinity_names +from . import path_srlgs_lists +from . import path_srlgs_names +from . import path_route_objects +class path_properties(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The TE path properties. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_metric','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__path_route_objects',) + + _yang_name = 'path-properties' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties'] + + def _get_path_metric(self): + """ + Getter method for path_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric (list) + + YANG Description: TE path metric type. + """ + return self.__path_metric + + def _set_path_metric(self, v, load=False): + """ + Setter method for path_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric() directly. + + YANG Description: TE path metric type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric(self): + self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_path_affinities_values(self): + """ + Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values (container) + + YANG Description: Path affinities represented as values. + """ + return self.__path_affinities_values + + def _set_path_affinities_values(self, v, load=False): + """ + Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_values() directly. + + YANG Description: Path affinities represented as values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_values must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinities_values = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_values(self): + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_affinity_names(self): + """ + Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names (container) + + YANG Description: Path affinities represented as names. + """ + return self.__path_affinity_names + + def _set_path_affinity_names(self, v, load=False): + """ + Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_names() directly. + + YANG Description: Path affinities represented as names. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinity_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_names(self): + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_lists(self): + """ + Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists (container) + + YANG Description: Path SRLG properties container. + """ + return self.__path_srlgs_lists + + def _set_path_srlgs_lists(self, v, load=False): + """ + Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_lists is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_lists() directly. + + YANG Description: Path SRLG properties container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_lists must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_lists = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_lists(self): + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_names(self): + """ + Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names (container) + + YANG Description: Container for the list of named SRLGs. + """ + return self.__path_srlgs_names + + def _set_path_srlgs_names(self, v, load=False): + """ + Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_names() directly. + + YANG Description: Container for the list of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_names(self): + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_route_objects(self): + """ + Getter method for path_route_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects (container) + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + return self.__path_route_objects + + def _set_path_route_objects(self, v, load=False): + """ + Setter method for path_route_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_route_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_route_objects() directly. + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_route_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_route_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_route_objects(self): + self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + path_metric = __builtin__.property(_get_path_metric) + path_affinities_values = __builtin__.property(_get_path_affinities_values) + path_affinity_names = __builtin__.property(_get_path_affinity_names) + path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) + path_srlgs_names = __builtin__.property(_get_path_srlgs_names) + path_route_objects = __builtin__.property(_get_path_route_objects) + + + _pyangbind_elements = OrderedDict([('path_metric', path_metric), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('path_route_objects', path_route_objects), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e54de27228aad73fbca118fde3e1fa2376541cf --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinities_value +class path_affinities_values(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-affinities-values. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as values. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) + + _yang_name = 'path-affinities-values' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinities-values'] + + def _get_path_affinities_value(self): + """ + Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinities_value + + def _set_path_affinities_value(self, v, load=False): + """ + Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_value() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_value must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinities_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_value(self): + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinities_value = __builtin__.property(_get_path_affinities_value) + + + _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..df6fd94eb524085ace9f530e78b2c21b279c795f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_affinities_value(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-affinities-values/path-affinities-value. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) + + _yang_name = 'path-affinities-value' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinities-values', 'path-affinities-value'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/usage (identityref) + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) + + YANG Description: The affinity value. The default is empty. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: The affinity value. The default is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with admin-groups""", + 'defined-type': "ietf-te-topology:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + usage = __builtin__.property(_get_usage) + value = __builtin__.property(_get_value) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..97969b43740067ba7b3f079983f8f43c624d1466 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinity_name +class path_affinity_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-affinity-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as names. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) + + _yang_name = 'path-affinity-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinity-names'] + + def _get_path_affinity_name(self): + """ + Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinity_name + + def _set_path_affinity_name(self, v, load=False): + """ + Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_name() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_name(self): + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinity_name = __builtin__.property(_get_path_affinity_name) + + + _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..47b1cb4768bb609d795a99ea877462d5143a3976 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import affinity_name +class path_affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-affinity-names/path-affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) + + _yang_name = 'path-affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinity-names', 'path-affinity-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/usage (identityref) + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_affinity_name(self): + """ + Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) + + YANG Description: List of named affinities. + """ + return self.__affinity_name + + def _set_affinity_name(self, v, load=False): + """ + Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_affinity_name() directly. + + YANG Description: List of named affinities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_affinity_name(self): + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + usage = __builtin__.property(_get_usage) + affinity_name = __builtin__.property(_get_affinity_name) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..043b7900eaed4d12e772026171a965693e6fb371 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-affinity-names/path-affinity-name/affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinities. + """ + __slots__ = ('_path_helper', '_extmethods', '__name',) + + _yang_name = 'affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) + + YANG Description: Identifies a named affinity entry. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Identifies a named affinity entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + name = __builtin__.property(_get_name) + + + _pyangbind_elements = OrderedDict([('name', name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..46350a791d4cda3328317288a91d8f1b6dc41515 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_metric(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-metric. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric type. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__accumulative_value',) + + _yang_name = 'path-metric' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-metric'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/metric_type (identityref) + + YANG Description: TE path metric type. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: TE path metric type. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_accumulative_value(self): + """ + Getter method for accumulative_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/accumulative_value (uint64) + + YANG Description: TE path metric accumulative value. + """ + return self.__accumulative_value + + def _set_accumulative_value(self, v, load=False): + """ + Setter method for accumulative_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/accumulative_value (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_accumulative_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_accumulative_value() directly. + + YANG Description: TE path metric accumulative value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """accumulative_value must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__accumulative_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_accumulative_value(self): + self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + metric_type = __builtin__.property(_get_metric_type) + accumulative_value = __builtin__.property(_get_accumulative_value) + + + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('accumulative_value', accumulative_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cd515c92f9c87e5fead687d05f45a09c2a94a494 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_route_object +class path_route_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_route_object',) + + _yang_name = 'path-route-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects'] + + def _get_path_route_object(self): + """ + Getter method for path_route_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object (list) + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + return self.__path_route_object + + def _set_path_route_object(self, v, load=False): + """ + Setter method for path_route_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_route_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_route_object() directly. + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_route_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_route_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_route_object(self): + self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_route_object = __builtin__.property(_get_path_route_object) + + + _pyangbind_elements = OrderedDict([('path_route_object', path_route_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1161f751e512844bdf95a624bf007614f735a69e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,327 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_route_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-route-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key +values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key +values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + index = __builtin__.property(_get_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b257ffed78be11f619693f26c8ac4ed962d9dbf6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1740e147ea928bcfad9d102a2911d91d2e4e19d7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f69cf8311d9b085775451b9553f4b2189c23dc10 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e8b6d2f8d0f71572c858c6119f28b9d849b147d1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af1242f7df8795d13bc589e60a08bc0064c961a6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6d06026657464feb50eef363ce1661c1aca5b0e9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ce5442e682e33f23002793fdd0316cb570c8e77e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9eeb9f3bc0897e087dbb923f08aa12eca8acd9e8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_list +class path_srlgs_lists(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-lists. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path SRLG properties container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) + + _yang_name = 'path-srlgs-lists' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-lists'] + + def _get_path_srlgs_list(self): + """ + Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list (list) + + YANG Description: List of SRLG values to be included or excluded. + """ + return self.__path_srlgs_list + + def _set_path_srlgs_list(self, v, load=False): + """ + Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_list() directly. + + YANG Description: List of SRLG values to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_list must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_list(self): + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_list = __builtin__.property(_get_path_srlgs_list) + + + _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1055b900a70cb06d2e5f85b4483a8fe86a9edd9d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_list(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-lists/path-srlgs-list. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of SRLG values to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) + + _yang_name = 'path-srlgs-list' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-lists', 'path-srlgs-list'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_values(self): + """ + Getter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) + + YANG Description: List of SRLG values. + """ + return self.__values + + def _set_values(self, v, load=False): + """ + Setter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_values() directly. + + YANG Description: List of SRLG values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """values must be of a type compatible with srlg""", + 'defined-type': "ietf-te-topology:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", + }) + + self.__values = t + if hasattr(self, '_set'): + self._set() + + def _unset_values(self): + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + usage = __builtin__.property(_get_usage) + values = __builtin__.property(_get_values) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..796ccb5f22347bf51b003e64b52d420885ca2303 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_name +class path_srlgs_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of named SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) + + _yang_name = 'path-srlgs-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-names'] + + def _get_path_srlgs_name(self): + """ + Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name (list) + + YANG Description: List of named SRLGs to be included or excluded. + """ + return self.__path_srlgs_name + + def _set_path_srlgs_name(self, v, load=False): + """ + Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_name() directly. + + YANG Description: List of named SRLGs to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_name(self): + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_name = __builtin__.property(_get_path_srlgs_name) + + + _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bdfa7bcab051555880838320ed60dcb06c1e9439 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-names/path-srlgs-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named SRLGs to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) + + _yang_name = 'path-srlgs-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-names', 'path-srlgs-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_names(self): + """ + Getter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/names (string) + + YANG Description: List of named SRLGs. + """ + return self.__names + + def _set_names(self, v, load=False): + """ + Setter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/names (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_names() directly. + + YANG Description: List of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """names must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__names = t + if hasattr(self, '_set'): + self._set() + + def _unset_names(self): + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + usage = __builtin__.property(_get_usage) + names = __builtin__.property(_get_names) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..71191caa02af70c0c425dc03e155ef14be19c1bb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restrictions +class to(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Reference to a destination LTP. + """ + __slots__ = ('_path_helper', '_extmethods', '__tp_ref','__label_restrictions',) + + _yang_name = 'to' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to'] + + def _get_tp_ref(self): + """ + Getter method for tp_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/tp_ref (leafref) + + YANG Description: Relative reference to a termination point. + """ + return self.__tp_ref + + def _set_tp_ref(self, v, load=False): + """ + Setter method for tp_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/tp_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tp_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tp_ref() directly. + + YANG Description: Relative reference to a termination point. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tp_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__tp_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_tp_ref(self): + self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + + def _get_label_restrictions(self): + """ + Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions (container) + + YANG Description: The label restrictions container. + """ + return self.__label_restrictions + + def _set_label_restrictions(self, v, load=False): + """ + Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restrictions is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restrictions() directly. + + YANG Description: The label restrictions container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restrictions must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_restrictions = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restrictions(self): + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + tp_ref = __builtin__.property(_get_tp_ref) + label_restrictions = __builtin__.property(_get_label_restrictions) + + + _pyangbind_elements = OrderedDict([('tp_ref', tp_ref), ('label_restrictions', label_restrictions), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3873a02ce4893dd956ce47d381bb005e268c944a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restriction +class label_restrictions(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The label restrictions container. + """ + __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) + + _yang_name = 'label-restrictions' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions'] + + def _get_label_restriction(self): + """ + Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction (list) + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + return self.__label_restriction + + def _set_label_restriction(self, v, load=False): + """ + Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restriction() directly. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restriction must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__label_restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restriction(self): + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + label_restriction = __builtin__.property(_get_label_restriction) + + + _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dbf240ba846fa6468376de6985a59828653c0b8a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,450 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_start +from . import label_end +from . import label_step +from . import otn_label_range +from . import ethernet_label_range +class label_restriction(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) + + _yang_name = 'label-restriction' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction'] + + def _get_restriction(self): + """ + Getter method for restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/restriction (enumeration) + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + return self.__restriction + + def _set_restriction(self, v, load=False): + """ + Setter method for restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/restriction (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restriction() directly. + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restriction must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False)""", + }) + + self.__restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_restriction(self): + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) + + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/index (uint32) + + YANG Description: The index of the label restriction list entry. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: The index of the label restriction list entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_label_start(self): + """ + Getter method for label_start, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start (container) + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + return self.__label_start + + def _set_label_start(self, v, load=False): + """ + Setter method for label_start, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_start is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_start() directly. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_start must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_start = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_start(self): + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_end(self): + """ + Getter method for label_end, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end (container) + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + return self.__label_end + + def _set_label_end(self, v, load=False): + """ + Setter method for label_end, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_end is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_end() directly. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_end must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_end = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_end(self): + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_step(self): + """ + Getter method for label_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step (container) + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + return self.__label_step + + def _set_label_step(self, v, load=False): + """ + Setter method for label_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_step() directly. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_step must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_step(self): + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_range_bitmap(self): + """ + Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + return self.__range_bitmap + + def _set_range_bitmap(self, v, load=False): + """ + Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_bitmap is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_bitmap() directly. + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", + 'defined-type': "yang:hex-string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False)""", + }) + + self.__range_bitmap = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_bitmap(self): + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) + + + def _get_otn_label_range(self): + """ + Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range (container) + + YANG Description: Label range information for OTN. + """ + return self.__otn_label_range + + def _set_otn_label_range(self, v, load=False): + """ + Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_label_range() directly. + + YANG Description: Label range information for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_label_range(self): + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_ethernet_label_range(self): + """ + Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range (container) + + YANG Description: Ethernet-specific label range related information. + """ + return self.__ethernet_label_range + + def _set_ethernet_label_range(self, v, load=False): + """ + Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ethernet_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ethernet_label_range() directly. + + YANG Description: Ethernet-specific label range related information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ethernet_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False)""", + }) + + self.__ethernet_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_ethernet_label_range(self): + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) + + restriction = __builtin__.property(_get_restriction) + index = __builtin__.property(_get_index) + label_start = __builtin__.property(_get_label_start) + label_end = __builtin__.property(_get_label_end) + label_step = __builtin__.property(_get_label_step) + range_bitmap = __builtin__.property(_get_range_bitmap) + otn_label_range = __builtin__.property(_get_otn_label_range) + ethernet_label_range = __builtin__.property(_get_ethernet_label_range) + + + _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3f672822b48accb14de87483e9dd12867456df08 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ethernet_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/ethernet-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Ethernet-specific label range related information. + """ + __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) + + _yang_name = 'ethernet-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] + + def _get_tag_type(self): + """ + Getter method for tag_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + + YANG Description: VLAN tag type. + """ + return self.__tag_type + + def _set_tag_type(self, v, load=False): + """ + Setter method for tag_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_tag_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tag_type() directly. + + YANG Description: VLAN tag type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False)""", + }) + + self.__tag_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tag_type(self): + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + + YANG Description: priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) + + tag_type = __builtin__.property(_get_tag_type) + priority = __builtin__.property(_get_priority) + + + _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..332a6026574b5c48fcc2d103f24fbbc3da2b2ab3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_end(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-end. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-end' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-end'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..37028d9bfc5a0c01683aa7e53f7a6b574d6a3f42 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-end/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..162b896241b326516b2a2d5261f872ecfe29ffbf --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + tpn = __builtin__.property(_get_tpn) + ts = __builtin__.property(_get_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..334475e0d1a9680a9b58e7c939a59ce7431c6db9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_start(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-start. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-start' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-start'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c384d8f7a786c4d542d4c36dc4f340d1ec0d3c9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-start/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..612e7141b0b4a8e877b2769cc353c653486113db --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + tpn = __builtin__.property(_get_tpn) + ts = __builtin__.property(_get_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..12f872b1f11d4f08571e87a68731c62b60ef8811 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class label_step(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-step. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) + + _yang_name = 'label-step' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-step'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/generic (int32) + + YANG Description: Label range step. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/generic (int32) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Label range step. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with int32""", + 'defined-type': "int32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn (container) + + YANG Description: Label step for OTN + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label step for OTN + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_eth_step(self): + """ + Getter method for eth_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/eth_step (uint16) + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + return self.__eth_step + + def _set_eth_step(self, v, load=False): + """ + Setter method for eth_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/eth_step (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_step() directly. + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_step must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False)""", + }) + + self.__eth_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_step(self): + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + eth_step = __builtin__.property(_get_eth_step) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4f53bda83992147e406598acc77da79e6a9cd51a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-step/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label step for OTN + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + tpn = __builtin__.property(_get_tpn) + ts = __builtin__.property(_get_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..84ed14bf97bc2f6ca26fee89b43061f9fd0e2334 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/otn-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label range information for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) + + _yang_name = 'otn-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'otn-label-range'] + + def _get_range_type(self): + """ + Getter method for range_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + return self.__range_type + + def _set_range_type(self, v, load=False): + """ + Setter method for range_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_type() directly. + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_type must be of a type compatible with otn-label-range-type""", + 'defined-type': "ietf-otn-topology:otn-label-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False)""", + }) + + self.__range_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_type(self): + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_odu_type_list(self): + """ + Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + return self.__odu_type_list + + def _set_odu_type_list(self, v, load=False): + """ + Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type_list() directly. + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type_list must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__odu_type_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type_list(self): + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/priority (uint8) + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) + + range_type = __builtin__.property(_get_range_type) + tsg = __builtin__.property(_get_tsg) + odu_type_list = __builtin__.property(_get_odu_type_list) + priority = __builtin__.property(_get_priority) + + + _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0660881e28b783a340f6606fea9afba596749800 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py @@ -0,0 +1,326 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import primary_path +from . import backup_path +from . import tunnel_termination_points +from . import tunnels +class underlay(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Attributes of the TE link underlay. + """ + __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) + + _yang_name = 'underlay' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay'] + + def _get_enabled(self): + """ + Getter method for enabled, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/enabled (boolean) + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + return self.__enabled + + def _set_enabled(self, v, load=False): + """ + Setter method for enabled, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/enabled (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_enabled is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enabled() directly. + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enabled must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", + }) + + self.__enabled = t + if hasattr(self, '_set'): + self._set() + + def _unset_enabled(self): + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + + def _get_primary_path(self): + """ + Getter method for primary_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path (container) + + YANG Description: The service path on the underlay topology that +supports this link. + """ + return self.__primary_path + + def _set_primary_path(self, v, load=False): + """ + Setter method for primary_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_primary_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_primary_path() directly. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """primary_path must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__primary_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_primary_path(self): + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_backup_path(self): + """ + Getter method for backup_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path (list) + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + return self.__backup_path + + def _set_backup_path(self, v, load=False): + """ + Setter method for backup_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_backup_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_backup_path() directly. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """backup_path must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__backup_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_backup_path(self): + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_protection_type(self): + """ + Getter method for protection_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/protection_type (identityref) + + YANG Description: Underlay protection type desired for this link. + """ + return self.__protection_type + + def _set_protection_type(self, v, load=False): + """ + Setter method for protection_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/protection_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_protection_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_protection_type() directly. + + YANG Description: Underlay protection type desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """protection_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__protection_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_protection_type(self): + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_tunnel_termination_points(self): + """ + Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points (container) + + YANG Description: Underlay TTPs desired for this link. + """ + return self.__tunnel_termination_points + + def _set_tunnel_termination_points(self, v, load=False): + """ + Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_termination_points is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_termination_points() directly. + + YANG Description: Underlay TTPs desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_termination_points must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__tunnel_termination_points = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_termination_points(self): + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_tunnels(self): + """ + Getter method for tunnels, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels (container) + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + return self.__tunnels + + def _set_tunnels(self, v, load=False): + """ + Setter method for tunnels, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnels is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnels() directly. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnels must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__tunnels = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnels(self): + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + enabled = __builtin__.property(_get_enabled) + primary_path = __builtin__.property(_get_primary_path) + backup_path = __builtin__.property(_get_backup_path) + protection_type = __builtin__.property(_get_protection_type) + tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points) + tunnels = __builtin__.property(_get_tunnels) + + + _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e6da0327b6950bdd578cd2cc890a0ec097c053a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py @@ -0,0 +1,207 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class backup_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) + + _yang_name = 'backup-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/index (uint32) + + YANG Description: A sequence number to identify a backup path. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: A sequence number to identify a backup path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element (list) + + YANG Description: A list of path elements describing the backup service +path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the backup service +path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + index = __builtin__.property(_get_index) + network_ref = __builtin__.property(_get_network_ref) + path_element = __builtin__.property(_get_path_element) + + + _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0e6bea8896fa5f3727db9b64111d928a2379b296 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,321 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the backup service +path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + path_element_id = __builtin__.property(_get_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2245d0d0e8d8c9c9bf932710b86966781ee377e7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9fc0b539a612836fa7eb19f48cf7ec6e6d2eebd6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6ed428029fc87f2785219c0de6190431190da50b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..242d6f3f26a1fca1fd0985db7a4b0ecd3cd3fa9d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f6c47d4644ff1e8e6dbc3b5422b039b024780012 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ba3dfc1f6132e0eae9787117f7147932e0cdb340 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b5d313c9bba771f10a758ef1e31743617b93da4f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9efabfdc9833d3db3530bf4bc67801e8de97d09a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class primary_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) + + _yang_name = 'primary-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element (list) + + YANG Description: A list of path elements describing the service path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the service path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + network_ref = __builtin__.property(_get_network_ref) + path_element = __builtin__.property(_get_path_element) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c680af6e0cbb613d71b8eb8896295cdbeef0fabc --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,320 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the service path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + path_element_id = __builtin__.property(_get_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..33f85e5281febfd6058e42db3c836b9fc230f533 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6cb0c9c11a2e435e7fcf1c672056a63d8e81606a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..04bb5f8c62618ae918ebff9c8eb0e03069bc41b7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e0b0c85c53b809acc7e6c4300a557335aef6dca8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bc4a1ad284407efff0c694b6f25dc14134a1127f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1f6120bd56e1d699d796b29a921ac4cea947bb7d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7f75c01074c5ce8e457f5e725599b90212576766 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fe1f4b85508ac28b5a0f20bb1ea55bd1332d446a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel_termination_points(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/tunnel-termination-points. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TTPs desired for this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) + + _yang_name = 'tunnel-termination-points' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'tunnel-termination-points'] + + def _get_source(self): + """ + Getter method for source, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/source (binary) + + YANG Description: Source TTP identifier. + """ + return self.__source + + def _set_source(self, v, load=False): + """ + Setter method for source, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/source (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_source() directly. + + YANG Description: Source TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """source must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False)""", + }) + + self.__source = t + if hasattr(self, '_set'): + self._set() + + def _unset_source(self): + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) + + + def _get_destination(self): + """ + Getter method for destination, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/destination (binary) + + YANG Description: Destination TTP identifier. + """ + return self.__destination + + def _set_destination(self, v, load=False): + """ + Setter method for destination, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/destination (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_destination is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_destination() directly. + + YANG Description: Destination TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """destination must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False)""", + }) + + self.__destination = t + if hasattr(self, '_set'): + self._set() + + def _unset_destination(self): + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) + + source = __builtin__.property(_get_source) + destination = __builtin__.property(_get_destination) + + + _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0493843c740539cbe3763507f281d8120730bdb6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py @@ -0,0 +1,167 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tunnel +class tunnels(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/tunnels. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) + + _yang_name = 'tunnels' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'tunnels'] + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + + def _get_tunnel(self): + """ + Getter method for tunnel, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel (list) + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + return self.__tunnel + + def _set_tunnel(self, v, load=False): + """ + Setter method for tunnel, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel() directly. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__tunnel = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel(self): + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + sharing = __builtin__.property(_get_sharing) + tunnel = __builtin__.property(_get_tunnel) + + + _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0bade453763a51c761470543982308e483db615b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,170 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/connectivity-matrix/underlay/tunnels/tunnel. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) + + _yang_name = 'tunnel' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'tunnels', 'tunnel'] + + def _get_tunnel_name(self): + """ + Getter method for tunnel_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/tunnel_name (string) + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + return self.__tunnel_name + + def _set_tunnel_name(self, v, load=False): + """ + Setter method for tunnel_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/tunnel_name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_name() directly. + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__tunnel_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_name(self): + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + tunnel_name = __builtin__.property(_get_tunnel_name) + sharing = __builtin__.property(_get_sharing) + + + _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6d7414731add908d5a234b2d980bc2c34f2c199e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restriction +class label_restrictions(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The label restrictions container. + """ + __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) + + _yang_name = 'label-restrictions' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions'] + + def _get_label_restriction(self): + """ + Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction (list) + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + return self.__label_restriction + + def _set_label_restriction(self, v, load=False): + """ + Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restriction() directly. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restriction must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__label_restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restriction(self): + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + label_restriction = __builtin__.property(_get_label_restriction) + + + _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..39cb5bdabbe35e56a81c00f4ec938e75f1d83fcd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,450 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_start +from . import label_end +from . import label_step +from . import otn_label_range +from . import ethernet_label_range +class label_restriction(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) + + _yang_name = 'label-restriction' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction'] + + def _get_restriction(self): + """ + Getter method for restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/restriction (enumeration) + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + return self.__restriction + + def _set_restriction(self, v, load=False): + """ + Setter method for restriction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/restriction (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restriction() directly. + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restriction must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False)""", + }) + + self.__restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_restriction(self): + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=False) + + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/index (uint32) + + YANG Description: The index of the label restriction list entry. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: The index of the label restriction list entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_label_start(self): + """ + Getter method for label_start, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start (container) + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + return self.__label_start + + def _set_label_start(self, v, load=False): + """ + Setter method for label_start, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_start is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_start() directly. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_start must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_start = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_start(self): + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_end(self): + """ + Getter method for label_end, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end (container) + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + return self.__label_end + + def _set_label_end(self, v, load=False): + """ + Setter method for label_end, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_end is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_end() directly. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_end must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_end = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_end(self): + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_step(self): + """ + Getter method for label_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step (container) + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + return self.__label_step + + def _set_label_step(self, v, load=False): + """ + Setter method for label_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_step() directly. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_step must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_step(self): + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_range_bitmap(self): + """ + Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + return self.__range_bitmap + + def _set_range_bitmap(self, v, load=False): + """ + Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_bitmap is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_bitmap() directly. + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", + 'defined-type': "yang:hex-string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False)""", + }) + + self.__range_bitmap = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_bitmap(self): + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=False) + + + def _get_otn_label_range(self): + """ + Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range (container) + + YANG Description: Label range information for OTN. + """ + return self.__otn_label_range + + def _set_otn_label_range(self, v, load=False): + """ + Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_label_range() directly. + + YANG Description: Label range information for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_label_range(self): + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_ethernet_label_range(self): + """ + Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range (container) + + YANG Description: Ethernet-specific label range related information. + """ + return self.__ethernet_label_range + + def _set_ethernet_label_range(self, v, load=False): + """ + Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ethernet_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ethernet_label_range() directly. + + YANG Description: Ethernet-specific label range related information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ethernet_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False)""", + }) + + self.__ethernet_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_ethernet_label_range(self): + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=False) + + restriction = __builtin__.property(_get_restriction) + index = __builtin__.property(_get_index) + label_start = __builtin__.property(_get_label_start) + label_end = __builtin__.property(_get_label_end) + label_step = __builtin__.property(_get_label_step) + range_bitmap = __builtin__.property(_get_range_bitmap) + otn_label_range = __builtin__.property(_get_otn_label_range) + ethernet_label_range = __builtin__.property(_get_ethernet_label_range) + + + _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5cfb573c3d6407b1d27f175d7a3fb6e0909fe780 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ethernet_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/ethernet-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Ethernet-specific label range related information. + """ + __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) + + _yang_name = 'ethernet-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] + + def _get_tag_type(self): + """ + Getter method for tag_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + + YANG Description: VLAN tag type. + """ + return self.__tag_type + + def _set_tag_type(self, v, load=False): + """ + Setter method for tag_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_tag_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tag_type() directly. + + YANG Description: VLAN tag type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False)""", + }) + + self.__tag_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tag_type(self): + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=False) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + + YANG Description: priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=False) + + tag_type = __builtin__.property(_get_tag_type) + priority = __builtin__.property(_get_priority) + + + _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8c503e2b257aeee411091790f42ec349eee349c0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_end(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-end. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-end' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-end'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..de17adeb4459dd104de1cde30c405cf5a023583b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-end/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..459dceb1d30e33d8699064985129d362e7a114b3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + tpn = __builtin__.property(_get_tpn) + ts = __builtin__.property(_get_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1a8e4c4dccf50bade3f069f5f589d4bc274aa444 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_start(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-start. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-start' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-start'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1f66e6dae904e15a1f49b0c58b5b64a535a5e33f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-start/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ad22f6a1525b4023d92360870cbe758a06dc3566 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + tpn = __builtin__.property(_get_tpn) + ts = __builtin__.property(_get_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42085f541bcef1d3b09ca52af3574985b0df17a7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class label_step(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-step. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) + + _yang_name = 'label-step' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-step'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/generic (int32) + + YANG Description: Label range step. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/generic (int32) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Label range step. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with int32""", + 'defined-type': "int32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn (container) + + YANG Description: Label step for OTN + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label step for OTN + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_eth_step(self): + """ + Getter method for eth_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/eth_step (uint16) + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + return self.__eth_step + + def _set_eth_step(self, v, load=False): + """ + Setter method for eth_step, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/eth_step (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_step() directly. + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_step must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False)""", + }) + + self.__eth_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_step(self): + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + eth_step = __builtin__.property(_get_eth_step) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..138aacf1b355262ce5289a44e237e6a3b9d21278 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/label-step/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label step for OTN + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=False) + + tpn = __builtin__.property(_get_tpn) + ts = __builtin__.property(_get_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b951f71cba2de3f0fe8ee95b5f197ca2dcd856a7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/label-restrictions/label-restriction/otn-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label range information for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) + + _yang_name = 'otn-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'otn-label-range'] + + def _get_range_type(self): + """ + Getter method for range_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + return self.__range_type + + def _set_range_type(self, v, load=False): + """ + Setter method for range_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_type() directly. + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_type must be of a type compatible with otn-label-range-type""", + 'defined-type': "ietf-otn-topology:otn-label-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False)""", + }) + + self.__range_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_type(self): + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_odu_type_list(self): + """ + Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + return self.__odu_type_list + + def _set_odu_type_list(self, v, load=False): + """ + Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type_list() directly. + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type_list must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__odu_type_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type_list(self): + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/priority (uint8) + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=False) + + range_type = __builtin__.property(_get_range_type) + tsg = __builtin__.property(_get_tsg) + odu_type_list = __builtin__.property(_get_odu_type_list) + priority = __builtin__.property(_get_priority) + + + _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a561f8138342940ab3183618f6add0ee154b46d8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py @@ -0,0 +1,199 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import optimization_metric +from . import tiebreakers +from . import objective_function +class optimizations(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + __slots__ = ('_path_helper', '_extmethods', '__optimization_metric','__tiebreakers','__objective_function',) + + _yang_name = 'optimizations' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations'] + + def _get_optimization_metric(self): + """ + Getter method for optimization_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric (list) + + YANG Description: TE path metric type. + """ + return self.__optimization_metric + + def _set_optimization_metric(self, v, load=False): + """ + Setter method for optimization_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimization_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimization_metric() directly. + + YANG Description: TE path metric type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimization_metric must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__optimization_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimization_metric(self): + self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_tiebreakers(self): + """ + Getter method for tiebreakers, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers (container) + + YANG Description: Container for the list of tiebreakers. + """ + return self.__tiebreakers + + def _set_tiebreakers(self, v, load=False): + """ + Setter method for tiebreakers, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreakers is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreakers() directly. + + YANG Description: Container for the list of tiebreakers. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreakers must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__tiebreakers = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreakers(self): + self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_objective_function(self): + """ + Getter method for objective_function, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function (container) + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + return self.__objective_function + + def _set_objective_function(self, v, load=False): + """ + Setter method for objective_function, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_objective_function is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_objective_function() directly. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """objective_function must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__objective_function = t + if hasattr(self, '_set'): + self._set() + + def _unset_objective_function(self): + self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + optimization_metric = __builtin__.property(_get_optimization_metric) + tiebreakers = __builtin__.property(_get_tiebreakers) + objective_function = __builtin__.property(_get_objective_function) + + __choices__ = {'algorithm': {'metric': ['optimization_metric', 'tiebreakers'], 'objective-function': ['objective_function']}} + _pyangbind_elements = OrderedDict([('optimization_metric', optimization_metric), ('tiebreakers', tiebreakers), ('objective_function', objective_function), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a5742ea3002afa82d4263d295667918e31d3ffec --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class objective_function(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/objective-function. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + __slots__ = ('_path_helper', '_extmethods', '__objective_function_type',) + + _yang_name = 'objective-function' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'objective-function'] + + def _get_objective_function_type(self): + """ + Getter method for objective_function_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/objective_function_type (identityref) + + YANG Description: Objective function entry. + """ + return self.__objective_function_type + + def _set_objective_function_type(self, v, load=False): + """ + Setter method for objective_function_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/objective_function/objective_function_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_objective_function_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_objective_function_type() directly. + + YANG Description: Objective function entry. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """objective_function_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__objective_function_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_objective_function_type(self): + self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + objective_function_type = __builtin__.property(_get_objective_function_type) + + __choices__ = {'algorithm': {'objective-function': ['objective_function_type']}} + _pyangbind_elements = OrderedDict([('objective_function_type', objective_function_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..de3425526bf502146628f83fc80526b1867f3ff0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/__init__.py @@ -0,0 +1,241 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import explicit_route_exclude_objects +from . import explicit_route_include_objects +class optimization_metric(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric type. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__weight','__explicit_route_exclude_objects','__explicit_route_include_objects',) + + _yang_name = 'optimization-metric' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/metric_type (identityref) + + YANG Description: Identifies the 'metric-type' that the path computation +process uses for optimization. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: Identifies the 'metric-type' that the path computation +process uses for optimization. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_weight(self): + """ + Getter method for weight, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/weight (uint8) + + YANG Description: TE path metric normalization weight. + """ + return self.__weight + + def _set_weight(self, v, load=False): + """ + Setter method for weight, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/weight (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_weight is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_weight() directly. + + YANG Description: TE path metric normalization weight. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """weight must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", + }) + + self.__weight = t + if hasattr(self, '_set'): + self._set() + + def _unset_weight(self): + self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + + + def _get_explicit_route_exclude_objects(self): + """ + Getter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects (container) + + YANG Description: Container for the 'exclude route' object list. + """ + return self.__explicit_route_exclude_objects + + def _set_explicit_route_exclude_objects(self, v, load=False): + """ + Setter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_explicit_route_exclude_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_explicit_route_exclude_objects() directly. + + YANG Description: Container for the 'exclude route' object list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """explicit_route_exclude_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__explicit_route_exclude_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_explicit_route_exclude_objects(self): + self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_explicit_route_include_objects(self): + """ + Getter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects (container) + + YANG Description: Container for the 'include route' object list. + """ + return self.__explicit_route_include_objects + + def _set_explicit_route_include_objects(self, v, load=False): + """ + Setter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_explicit_route_include_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_explicit_route_include_objects() directly. + + YANG Description: Container for the 'include route' object list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """explicit_route_include_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__explicit_route_include_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_explicit_route_include_objects(self): + self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + metric_type = __builtin__.property(_get_metric_type) + weight = __builtin__.property(_get_weight) + explicit_route_exclude_objects = __builtin__.property(_get_explicit_route_exclude_objects) + explicit_route_include_objects = __builtin__.property(_get_explicit_route_include_objects) + + __choices__ = {'algorithm': {'metric': ['metric_type', 'weight', 'explicit_route_exclude_objects', 'explicit_route_include_objects']}} + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('weight', weight), ('explicit_route_exclude_objects', explicit_route_exclude_objects), ('explicit_route_include_objects', explicit_route_include_objects), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6df6741a983f17df9525a546bcc24f6392f9a5f8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import route_object_exclude_object +class explicit_route_exclude_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the 'exclude route' object list. + """ + __slots__ = ('_path_helper', '_extmethods', '__route_object_exclude_object',) + + _yang_name = 'explicit-route-exclude-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects'] + + def _get_route_object_exclude_object(self): + """ + Getter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + return self.__route_object_exclude_object + + def _set_route_object_exclude_object(self, v, load=False): + """ + Setter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_route_object_exclude_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_route_object_exclude_object() directly. + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """route_object_exclude_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__route_object_exclude_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_route_object_exclude_object(self): + self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + route_object_exclude_object = __builtin__.property(_get_route_object_exclude_object) + + __choices__ = {'algorithm': {'metric': ['route_object_exclude_object']}} + _pyangbind_elements = OrderedDict([('route_object_exclude_object', route_object_exclude_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..66415fe3b314536e9002f7a0276f0ef532da821c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,365 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +from . import srlg +class route_object_exclude_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop','__srlg',) + + _yang_name = 'route-object-exclude-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_srlg(self): + """ + Getter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) + + YANG Description: SRLG container. + """ + return self.__srlg + + def _set_srlg(self, v, load=False): + """ + Setter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_srlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_srlg() directly. + + YANG Description: SRLG container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """srlg must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__srlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_srlg(self): + self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + index = __builtin__.property(_get_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + srlg = __builtin__.property(_get_srlg) + + __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop'], 'srlg': ['srlg']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ('srlg', srlg), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..267567f74521ce6b6ae6ba71a95183bebc1823b8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dfb42f946181c167785c0e3b563f8144ebd893c5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..22dc3125e462c1a4216a16adbafed71103cdc1dd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..68706941449f6359d729a9ca9a6062eebc717c72 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5981ace6489abb54c1b6951a02ab855ba6d8c09e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e42736cbe14ffb31bd0d0d2cc3a3e4c321b4804d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fcd5a3c7e35e6bcad9f087d0c9b69c0ba3ed3ce7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class srlg(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/srlg. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: SRLG container. + """ + __slots__ = ('_path_helper', '_extmethods', '__srlg',) + + _yang_name = 'srlg' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'srlg'] + + def _get_srlg(self): + """ + Getter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) + + YANG Description: SRLG value. + """ + return self.__srlg + + def _set_srlg(self, v, load=False): + """ + Setter method for srlg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_srlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_srlg() directly. + + YANG Description: SRLG value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """srlg must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__srlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_srlg(self): + self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + srlg = __builtin__.property(_get_srlg) + + __choices__ = {'type': {'srlg': ['srlg']}} + _pyangbind_elements = OrderedDict([('srlg', srlg), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..487e25e737837b9b9475ef95d6ceec25c1d81744 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..06b2702da984d8ed2355683f3603f538efc430c0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import route_object_include_object +class explicit_route_include_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the 'include route' object list. + """ + __slots__ = ('_path_helper', '_extmethods', '__route_object_include_object',) + + _yang_name = 'explicit-route-include-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects'] + + def _get_route_object_include_object(self): + """ + Getter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + return self.__route_object_include_object + + def _set_route_object_include_object(self, v, load=False): + """ + Setter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_route_object_include_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_route_object_include_object() directly. + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """route_object_include_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__route_object_include_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_route_object_include_object(self): + self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + route_object_include_object = __builtin__.property(_get_route_object_include_object) + + __choices__ = {'algorithm': {'metric': ['route_object_include_object']}} + _pyangbind_elements = OrderedDict([('route_object_include_object', route_object_include_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0b7b9e7e8bae1e6642dbab091b56fafaafaa9382 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,325 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class route_object_include_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'route-object-include-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + index = __builtin__.property(_get_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + + __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a30ba2c884047e7c1188f2db95c140614bad05d0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5adb8788e175b1dee82e2e76374fb88c16a4f7d6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9494b4fda980a14f82d2595fb76717aba610b2c4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..030f51b1f4b7cfd10ef486db089420efe0635d75 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..50a4caad878397da24119fbe69d64d45bced9a14 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6952ba89be848862056de6f9baed16e7ef90df0e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a4ec3b3a951b016b6fb8df74c6e6e4ba551fbcb9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3357913dd0b1bbfc42da56f04599ff3c4a2372da --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tiebreaker +class tiebreakers(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/tiebreakers. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of tiebreakers. + """ + __slots__ = ('_path_helper', '_extmethods', '__tiebreaker',) + + _yang_name = 'tiebreakers' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'tiebreakers'] + + def _get_tiebreaker(self): + """ + Getter method for tiebreaker, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker (list) + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + return self.__tiebreaker + + def _set_tiebreaker(self, v, load=False): + """ + Setter method for tiebreaker, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreaker is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreaker() directly. + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreaker must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__tiebreaker = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreaker(self): + self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + tiebreaker = __builtin__.property(_get_tiebreaker) + + __choices__ = {'algorithm': {'metric': ['tiebreaker']}} + _pyangbind_elements = OrderedDict([('tiebreaker', tiebreaker), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4478acced1f4548ce3090a00bef95a37125c4386 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tiebreaker(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/optimizations/tiebreakers/tiebreaker. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + __slots__ = ('_path_helper', '_extmethods', '__tiebreaker_type',) + + _yang_name = 'tiebreaker' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'optimizations', 'tiebreakers', 'tiebreaker'] + + def _get_tiebreaker_type(self): + """ + Getter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) + + YANG Description: Identifies an entry in the list of tiebreakers. + """ + return self.__tiebreaker_type + + def _set_tiebreaker_type(self, v, load=False): + """ + Setter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreaker_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreaker_type() directly. + + YANG Description: Identifies an entry in the list of tiebreakers. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreaker_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tiebreaker_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreaker_type(self): + self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + tiebreaker_type = __builtin__.property(_get_tiebreaker_type) + + __choices__ = {'algorithm': {'metric': ['tiebreaker_type']}} + _pyangbind_elements = OrderedDict([('tiebreaker_type', tiebreaker_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74807897d04dcf0f8eb598293612b0e0447a003d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py @@ -0,0 +1,523 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +from . import path_metric_bounds +from . import path_affinities_values +from . import path_affinity_names +from . import path_srlgs_lists +from . import path_srlgs_names +class path_constraints(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE named path constraints container. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth','__link_protection','__setup_priority','__hold_priority','__signaling_type','__path_metric_bounds','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__disjointness',) + + _yang_name = 'path-constraints' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints'] + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_link_protection(self): + """ + Getter method for link_protection, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/link_protection (identityref) + + YANG Description: Link protection type required for the links included +in the computed path. + """ + return self.__link_protection + + def _set_link_protection(self, v, load=False): + """ + Setter method for link_protection, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/link_protection (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_protection is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_protection() directly. + + YANG Description: Link protection type required for the links included +in the computed path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_protection must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__link_protection = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_protection(self): + self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_setup_priority(self): + """ + Getter method for setup_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/setup_priority (uint8) + + YANG Description: TE LSP requested setup priority. + """ + return self.__setup_priority + + def _set_setup_priority(self, v, load=False): + """ + Setter method for setup_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/setup_priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_setup_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_setup_priority() directly. + + YANG Description: TE LSP requested setup priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """setup_priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", + }) + + self.__setup_priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_setup_priority(self): + self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + + + def _get_hold_priority(self): + """ + Getter method for hold_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/hold_priority (uint8) + + YANG Description: TE LSP requested hold priority. + """ + return self.__hold_priority + + def _set_hold_priority(self, v, load=False): + """ + Setter method for hold_priority, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/hold_priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_hold_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hold_priority() directly. + + YANG Description: TE LSP requested hold priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hold_priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False)""", + }) + + self.__hold_priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_hold_priority(self): + self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=False) + + + def _get_signaling_type(self): + """ + Getter method for signaling_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/signaling_type (identityref) + + YANG Description: TE tunnel path signaling type. + """ + return self.__signaling_type + + def _set_signaling_type(self, v, load=False): + """ + Setter method for signaling_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/signaling_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_signaling_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_signaling_type() directly. + + YANG Description: TE tunnel path signaling type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """signaling_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__signaling_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_signaling_type(self): + self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_path_metric_bounds(self): + """ + Getter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds (container) + + YANG Description: TE path metric bounds container. + """ + return self.__path_metric_bounds + + def _set_path_metric_bounds(self, v, load=False): + """ + Setter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric_bounds is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric_bounds() directly. + + YANG Description: TE path metric bounds container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric_bounds must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_metric_bounds = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric_bounds(self): + self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_affinities_values(self): + """ + Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values (container) + + YANG Description: Path affinities represented as values. + """ + return self.__path_affinities_values + + def _set_path_affinities_values(self, v, load=False): + """ + Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_values() directly. + + YANG Description: Path affinities represented as values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_values must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinities_values = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_values(self): + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_affinity_names(self): + """ + Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names (container) + + YANG Description: Path affinities represented as names. + """ + return self.__path_affinity_names + + def _set_path_affinity_names(self, v, load=False): + """ + Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_names() directly. + + YANG Description: Path affinities represented as names. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinity_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_names(self): + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_lists(self): + """ + Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists (container) + + YANG Description: Path SRLG properties container. + """ + return self.__path_srlgs_lists + + def _set_path_srlgs_lists(self, v, load=False): + """ + Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_lists is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_lists() directly. + + YANG Description: Path SRLG properties container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_lists must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_lists = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_lists(self): + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_names(self): + """ + Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names (container) + + YANG Description: Container for the list of named SRLGs. + """ + return self.__path_srlgs_names + + def _set_path_srlgs_names(self, v, load=False): + """ + Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_names() directly. + + YANG Description: Container for the list of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_names(self): + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_disjointness(self): + """ + Getter method for disjointness, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/disjointness (te-path-disjointness) + + YANG Description: The type of resource disjointness. +When configured for a primary path, the disjointness level +applies to all secondary LSPs. When configured for a +secondary path, the disjointness level overrides the level +configured for the primary path. + """ + return self.__disjointness + + def _set_disjointness(self, v, load=False): + """ + Setter method for disjointness, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/disjointness (te-path-disjointness) + If this variable is read-only (config: false) in the + source YANG file, then _set_disjointness is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_disjointness() directly. + + YANG Description: The type of resource disjointness. +When configured for a primary path, the disjointness level +applies to all secondary LSPs. When configured for a +secondary path, the disjointness level overrides the level +configured for the primary path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """disjointness must be of a type compatible with te-path-disjointness""", + 'defined-type': "ietf-te-topology:te-path-disjointness", + 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False)""", + }) + + self.__disjointness = t + if hasattr(self, '_set'): + self._set() + + def _unset_disjointness(self): + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=False) + + te_bandwidth = __builtin__.property(_get_te_bandwidth) + link_protection = __builtin__.property(_get_link_protection) + setup_priority = __builtin__.property(_get_setup_priority) + hold_priority = __builtin__.property(_get_hold_priority) + signaling_type = __builtin__.property(_get_signaling_type) + path_metric_bounds = __builtin__.property(_get_path_metric_bounds) + path_affinities_values = __builtin__.property(_get_path_affinities_values) + path_affinity_names = __builtin__.property(_get_path_affinity_names) + path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) + path_srlgs_names = __builtin__.property(_get_path_srlgs_names) + disjointness = __builtin__.property(_get_disjointness) + + + _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ('link_protection', link_protection), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('signaling_type', signaling_type), ('path_metric_bounds', path_metric_bounds), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('disjointness', disjointness), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4f42a2ac965c4fa925ad1564a0c10ecfb740670a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinities_value +class path_affinities_values(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-affinities-values. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as values. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) + + _yang_name = 'path-affinities-values' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-affinities-values'] + + def _get_path_affinities_value(self): + """ + Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinities_value + + def _set_path_affinities_value(self, v, load=False): + """ + Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_value() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_value must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinities_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_value(self): + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinities_value = __builtin__.property(_get_path_affinities_value) + + + _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cd1a2c6ed9f2b3f51b99eece2887f868581e32dc --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_affinities_value(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-affinities-values/path-affinities-value. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) + + _yang_name = 'path-affinities-value' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-affinities-values', 'path-affinities-value'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) + + YANG Description: The affinity value. The default is empty. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: The affinity value. The default is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with admin-groups""", + 'defined-type': "ietf-te-topology:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + usage = __builtin__.property(_get_usage) + value = __builtin__.property(_get_value) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a7f5be85bb568b148da298ab2f818f682b5ddc88 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinity_name +class path_affinity_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-affinity-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as names. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) + + _yang_name = 'path-affinity-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-affinity-names'] + + def _get_path_affinity_name(self): + """ + Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinity_name + + def _set_path_affinity_name(self, v, load=False): + """ + Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_name() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_name(self): + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinity_name = __builtin__.property(_get_path_affinity_name) + + + _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..67a1ea760eb104298fb4c25115dc5f8fe023984e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import affinity_name +class path_affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-affinity-names/path-affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) + + _yang_name = 'path-affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-affinity-names', 'path-affinity-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_affinity_name(self): + """ + Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) + + YANG Description: List of named affinities. + """ + return self.__affinity_name + + def _set_affinity_name(self, v, load=False): + """ + Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_affinity_name() directly. + + YANG Description: List of named affinities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_affinity_name(self): + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + usage = __builtin__.property(_get_usage) + affinity_name = __builtin__.property(_get_affinity_name) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e97d6d57e18426e05dd89e861117a2a2a45beb45 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-affinity-names/path-affinity-name/affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinities. + """ + __slots__ = ('_path_helper', '_extmethods', '__name',) + + _yang_name = 'affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) + + YANG Description: Identifies a named affinity entry. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Identifies a named affinity entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + name = __builtin__.property(_get_name) + + + _pyangbind_elements = OrderedDict([('name', name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92e0cb519c0177c3546d84266e0e3e52d26e02e1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_metric_bound +class path_metric_bounds(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-metric-bounds. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric bounds container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound',) + + _yang_name = 'path-metric-bounds' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-metric-bounds'] + + def _get_path_metric_bound(self): + """ + Getter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound (list) + + YANG Description: List of TE path metric bounds. + """ + return self.__path_metric_bound + + def _set_path_metric_bound(self, v, load=False): + """ + Setter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric_bound is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric_bound() directly. + + YANG Description: List of TE path metric bounds. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric_bound must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_metric_bound = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric_bound(self): + self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_metric_bound = __builtin__.property(_get_path_metric_bound) + + + _pyangbind_elements = OrderedDict([('path_metric_bound', path_metric_bound), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b7fca4e30b04b4713e4661b04e8fc25f1ceb0f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,165 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_metric_bound(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-metric-bounds/path-metric-bound. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of TE path metric bounds. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__upper_bound',) + + _yang_name = 'path-metric-bound' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-metric-bounds', 'path-metric-bound'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) + + YANG Description: Identifies an entry in the list of 'metric-type' items +bound for the TE path. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: Identifies an entry in the list of 'metric-type' items +bound for the TE path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_upper_bound(self): + """ + Getter method for upper_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) + + YANG Description: Upper bound on the end-to-end TE path metric. A zero +indicates an unbounded upper limit for the specific +'metric-type'. + """ + return self.__upper_bound + + def _set_upper_bound(self, v, load=False): + """ + Setter method for upper_bound, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_upper_bound is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_upper_bound() directly. + + YANG Description: Upper bound on the end-to-end TE path metric. A zero +indicates an unbounded upper limit for the specific +'metric-type'. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """upper_bound must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__upper_bound = t + if hasattr(self, '_set'): + self._set() + + def _unset_upper_bound(self): + self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + metric_type = __builtin__.property(_get_metric_type) + upper_bound = __builtin__.property(_get_upper_bound) + + + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('upper_bound', upper_bound), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8c1eb4e15c50fb4b2b179a918715e3d1bff3da85 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_list +class path_srlgs_lists(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-srlgs-lists. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path SRLG properties container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) + + _yang_name = 'path-srlgs-lists' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-srlgs-lists'] + + def _get_path_srlgs_list(self): + """ + Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list (list) + + YANG Description: List of SRLG values to be included or excluded. + """ + return self.__path_srlgs_list + + def _set_path_srlgs_list(self, v, load=False): + """ + Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_list() directly. + + YANG Description: List of SRLG values to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_list must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_list(self): + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_list = __builtin__.property(_get_path_srlgs_list) + + + _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7ee7c8defc5c952669b20e50d97763f85e0c04bd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_list(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-srlgs-lists/path-srlgs-list. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of SRLG values to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) + + _yang_name = 'path-srlgs-list' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-srlgs-lists', 'path-srlgs-list'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_values(self): + """ + Getter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) + + YANG Description: List of SRLG values. + """ + return self.__values + + def _set_values(self, v, load=False): + """ + Setter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_values() directly. + + YANG Description: List of SRLG values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """values must be of a type compatible with srlg""", + 'defined-type': "ietf-te-topology:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", + }) + + self.__values = t + if hasattr(self, '_set'): + self._set() + + def _unset_values(self): + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + usage = __builtin__.property(_get_usage) + values = __builtin__.property(_get_values) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..20ff89122cfb45e1661dc65ccc76397966048a27 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_name +class path_srlgs_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-srlgs-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of named SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) + + _yang_name = 'path-srlgs-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-srlgs-names'] + + def _get_path_srlgs_name(self): + """ + Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name (list) + + YANG Description: List of named SRLGs to be included or excluded. + """ + return self.__path_srlgs_name + + def _set_path_srlgs_name(self, v, load=False): + """ + Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_name() directly. + + YANG Description: List of named SRLGs to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_name(self): + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_name = __builtin__.property(_get_path_srlgs_name) + + + _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e04c9a2781da176ef3d1222c83f85681406e79a9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/path-srlgs-names/path-srlgs-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named SRLGs to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) + + _yang_name = 'path-srlgs-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'path-srlgs-names', 'path-srlgs-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_names(self): + """ + Getter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/names (string) + + YANG Description: List of named SRLGs. + """ + return self.__names + + def _set_names(self, v, load=False): + """ + Setter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/names (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_names() directly. + + YANG Description: List of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """names must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__names = t + if hasattr(self, '_set'): + self._set() + + def _unset_names(self): + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + usage = __builtin__.property(_get_usage) + names = __builtin__.property(_get_names) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..04440580661e25de34ef575a3dfbbae674d36f17 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cf1f3bd4cf63ab45b04b7246e08f9355ffa9beec --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=False) + + + def _get_odtu_flex_type(self): + """ + Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +set up along the underlay paths of these OTN +connectivity matrices. + """ + return self.__odtu_flex_type + + def _set_odtu_flex_type(self, v, load=False): + """ + Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_odtu_flex_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odtu_flex_type() directly. + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +set up along the underlay paths of these OTN +connectivity matrices. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", + 'defined-type': "l1-types:odtu-flex-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False)""", + }) + + self.__odtu_flex_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odtu_flex_type(self): + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=False) + + odulist = __builtin__.property(_get_odulist) + odtu_flex_type = __builtin__.property(_get_odtu_flex_type) + + __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} + _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4e9960a676e9d864f505ae65a0d66de711d9b9cd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-constraints/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-constraints', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=False) + + odu_type = __builtin__.property(_get_odu_type) + number = __builtin__.property(_get_number) + ts_number = __builtin__.property(_get_ts_number) + + __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dfb5797aa3d093195bd4cb1933b18ef5a5a577ff --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py @@ -0,0 +1,318 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_metric +from . import path_affinities_values +from . import path_affinity_names +from . import path_srlgs_lists +from . import path_srlgs_names +from . import path_route_objects +class path_properties(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The TE path properties. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_metric','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__path_route_objects',) + + _yang_name = 'path-properties' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties'] + + def _get_path_metric(self): + """ + Getter method for path_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric (list) + + YANG Description: TE path metric type. + """ + return self.__path_metric + + def _set_path_metric(self, v, load=False): + """ + Setter method for path_metric, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric() directly. + + YANG Description: TE path metric type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric(self): + self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_path_affinities_values(self): + """ + Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values (container) + + YANG Description: Path affinities represented as values. + """ + return self.__path_affinities_values + + def _set_path_affinities_values(self, v, load=False): + """ + Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_values() directly. + + YANG Description: Path affinities represented as values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_values must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinities_values = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_values(self): + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_affinity_names(self): + """ + Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names (container) + + YANG Description: Path affinities represented as names. + """ + return self.__path_affinity_names + + def _set_path_affinity_names(self, v, load=False): + """ + Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_names() directly. + + YANG Description: Path affinities represented as names. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinity_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_names(self): + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_lists(self): + """ + Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists (container) + + YANG Description: Path SRLG properties container. + """ + return self.__path_srlgs_lists + + def _set_path_srlgs_lists(self, v, load=False): + """ + Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_lists is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_lists() directly. + + YANG Description: Path SRLG properties container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_lists must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_lists = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_lists(self): + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_names(self): + """ + Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names (container) + + YANG Description: Container for the list of named SRLGs. + """ + return self.__path_srlgs_names + + def _set_path_srlgs_names(self, v, load=False): + """ + Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_names() directly. + + YANG Description: Container for the list of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_names(self): + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_route_objects(self): + """ + Getter method for path_route_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects (container) + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + return self.__path_route_objects + + def _set_path_route_objects(self, v, load=False): + """ + Setter method for path_route_objects, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_route_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_route_objects() directly. + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_route_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_route_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_route_objects(self): + self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + path_metric = __builtin__.property(_get_path_metric) + path_affinities_values = __builtin__.property(_get_path_affinities_values) + path_affinity_names = __builtin__.property(_get_path_affinity_names) + path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) + path_srlgs_names = __builtin__.property(_get_path_srlgs_names) + path_route_objects = __builtin__.property(_get_path_route_objects) + + + _pyangbind_elements = OrderedDict([('path_metric', path_metric), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('path_route_objects', path_route_objects), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..88aefb9b671fbdd1c8720152972b52e5271fbf68 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinities_value +class path_affinities_values(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-affinities-values. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as values. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) + + _yang_name = 'path-affinities-values' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-affinities-values'] + + def _get_path_affinities_value(self): + """ + Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinities_value + + def _set_path_affinities_value(self, v, load=False): + """ + Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_value() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_value must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinities_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_value(self): + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinities_value = __builtin__.property(_get_path_affinities_value) + + + _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92f7c32355251a17b249c68bc1e6ccf202951ddb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_affinities_value(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-affinities-values/path-affinities-value. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) + + _yang_name = 'path-affinities-value' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-affinities-values', 'path-affinities-value'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/usage (identityref) + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) + + YANG Description: The affinity value. The default is empty. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: The affinity value. The default is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with admin-groups""", + 'defined-type': "ietf-te-topology:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + usage = __builtin__.property(_get_usage) + value = __builtin__.property(_get_value) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9b9de5d168552bfa7fbc459f2c5205ebeba73ca7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinity_name +class path_affinity_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-affinity-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as names. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) + + _yang_name = 'path-affinity-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-affinity-names'] + + def _get_path_affinity_name(self): + """ + Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinity_name + + def _set_path_affinity_name(self, v, load=False): + """ + Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_name() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_name(self): + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinity_name = __builtin__.property(_get_path_affinity_name) + + + _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ae1ed41e1af5db040ceabf8a54508fed604daebe --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import affinity_name +class path_affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-affinity-names/path-affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) + + _yang_name = 'path-affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-affinity-names', 'path-affinity-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/usage (identityref) + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_affinity_name(self): + """ + Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) + + YANG Description: List of named affinities. + """ + return self.__affinity_name + + def _set_affinity_name(self, v, load=False): + """ + Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_affinity_name() directly. + + YANG Description: List of named affinities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_affinity_name(self): + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + usage = __builtin__.property(_get_usage) + affinity_name = __builtin__.property(_get_affinity_name) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..73aa7bee9ec3a83fb61ab5e3219952f8af45524b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-affinity-names/path-affinity-name/affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinities. + """ + __slots__ = ('_path_helper', '_extmethods', '__name',) + + _yang_name = 'affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) + + YANG Description: Identifies a named affinity entry. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Identifies a named affinity entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + name = __builtin__.property(_get_name) + + + _pyangbind_elements = OrderedDict([('name', name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..71b3184bdcc6e82a69a7839b674e70a57f1e92a9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_metric(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-metric. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric type. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__accumulative_value',) + + _yang_name = 'path-metric' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-metric'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/metric_type (identityref) + + YANG Description: TE path metric type. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: TE path metric type. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_accumulative_value(self): + """ + Getter method for accumulative_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/accumulative_value (uint64) + + YANG Description: TE path metric accumulative value. + """ + return self.__accumulative_value + + def _set_accumulative_value(self, v, load=False): + """ + Setter method for accumulative_value, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/accumulative_value (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_accumulative_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_accumulative_value() directly. + + YANG Description: TE path metric accumulative value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """accumulative_value must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__accumulative_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_accumulative_value(self): + self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + metric_type = __builtin__.property(_get_metric_type) + accumulative_value = __builtin__.property(_get_accumulative_value) + + + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('accumulative_value', accumulative_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b21cd85db7343db1d0f947229cd1d08910d6fb9f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_route_object +class path_route_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_route_object',) + + _yang_name = 'path-route-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects'] + + def _get_path_route_object(self): + """ + Getter method for path_route_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object (list) + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + return self.__path_route_object + + def _set_path_route_object(self, v, load=False): + """ + Setter method for path_route_object, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_route_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_route_object() directly. + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_route_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_route_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_route_object(self): + self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_route_object = __builtin__.property(_get_path_route_object) + + + _pyangbind_elements = OrderedDict([('path_route_object', path_route_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c2331faf9d4ed964e117e9a2bbc7d1d954f54248 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,327 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_route_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-route-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key +values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key +values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + index = __builtin__.property(_get_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..86c07902e489a6b644175e85dfa9403080123188 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07d9666aeff4da55b1a95cf98bcdfa5c36c5ae28 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1204a2ff489ba4a972aab5ea983aa0a736a420b8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..874d8ed5f8beeaea05b47fa8354ab2b0fb293122 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e41be3b4cf2553fa1abc7ba1b37299f045418107 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..eb07641c0e179c250c88dff9fe363c1959ee12dd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e8eab3fc14c4aa1803298ceedfdd3f6c9047501c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-route-objects/path-route-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a1b457c6c30bb26bde6c4faa632f66d6b65fa9c2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_list +class path_srlgs_lists(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-srlgs-lists. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path SRLG properties container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) + + _yang_name = 'path-srlgs-lists' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-srlgs-lists'] + + def _get_path_srlgs_list(self): + """ + Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list (list) + + YANG Description: List of SRLG values to be included or excluded. + """ + return self.__path_srlgs_list + + def _set_path_srlgs_list(self, v, load=False): + """ + Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_list() directly. + + YANG Description: List of SRLG values to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_list must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_list(self): + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_list = __builtin__.property(_get_path_srlgs_list) + + + _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..977077b1f8045674eca865b10934c0bb5431a5e1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_list(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-srlgs-lists/path-srlgs-list. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of SRLG values to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) + + _yang_name = 'path-srlgs-list' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-srlgs-lists', 'path-srlgs-list'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_values(self): + """ + Getter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) + + YANG Description: List of SRLG values. + """ + return self.__values + + def _set_values(self, v, load=False): + """ + Setter method for values, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_values() directly. + + YANG Description: List of SRLG values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """values must be of a type compatible with srlg""", + 'defined-type': "ietf-te-topology:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", + }) + + self.__values = t + if hasattr(self, '_set'): + self._set() + + def _unset_values(self): + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + usage = __builtin__.property(_get_usage) + values = __builtin__.property(_get_values) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..219ef7d2740f50432e47cdd50e0c5a53aaada3fe --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_name +class path_srlgs_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-srlgs-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of named SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) + + _yang_name = 'path-srlgs-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-srlgs-names'] + + def _get_path_srlgs_name(self): + """ + Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name (list) + + YANG Description: List of named SRLGs to be included or excluded. + """ + return self.__path_srlgs_name + + def _set_path_srlgs_name(self, v, load=False): + """ + Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_name() directly. + + YANG Description: List of named SRLGs to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_name(self): + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_name = __builtin__.property(_get_path_srlgs_name) + + + _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3f83850b901e1bb7f6ada7ff0652fb47cf930794 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/path-properties/path-srlgs-names/path-srlgs-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named SRLGs to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) + + _yang_name = 'path-srlgs-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'path-properties', 'path-srlgs-names', 'path-srlgs-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_names(self): + """ + Getter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/names (string) + + YANG Description: List of named SRLGs. + """ + return self.__names + + def _set_names(self, v, load=False): + """ + Setter method for names, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/names (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_names() directly. + + YANG Description: List of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """names must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__names = t + if hasattr(self, '_set'): + self._set() + + def _unset_names(self): + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + usage = __builtin__.property(_get_usage) + names = __builtin__.property(_get_names) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1c61ee40638fd59c1c8254666641420e56be09a8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py @@ -0,0 +1,326 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import primary_path +from . import backup_path +from . import tunnel_termination_points +from . import tunnels +class underlay(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Attributes of the TE link underlay. + """ + __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) + + _yang_name = 'underlay' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay'] + + def _get_enabled(self): + """ + Getter method for enabled, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/enabled (boolean) + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + return self.__enabled + + def _set_enabled(self, v, load=False): + """ + Setter method for enabled, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/enabled (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_enabled is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enabled() directly. + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enabled must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", + }) + + self.__enabled = t + if hasattr(self, '_set'): + self._set() + + def _unset_enabled(self): + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + + def _get_primary_path(self): + """ + Getter method for primary_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path (container) + + YANG Description: The service path on the underlay topology that +supports this link. + """ + return self.__primary_path + + def _set_primary_path(self, v, load=False): + """ + Setter method for primary_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_primary_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_primary_path() directly. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """primary_path must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__primary_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_primary_path(self): + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_backup_path(self): + """ + Getter method for backup_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path (list) + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + return self.__backup_path + + def _set_backup_path(self, v, load=False): + """ + Setter method for backup_path, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_backup_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_backup_path() directly. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """backup_path must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__backup_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_backup_path(self): + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_protection_type(self): + """ + Getter method for protection_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/protection_type (identityref) + + YANG Description: Underlay protection type desired for this link. + """ + return self.__protection_type + + def _set_protection_type(self, v, load=False): + """ + Setter method for protection_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/protection_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_protection_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_protection_type() directly. + + YANG Description: Underlay protection type desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """protection_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__protection_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_protection_type(self): + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_tunnel_termination_points(self): + """ + Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points (container) + + YANG Description: Underlay TTPs desired for this link. + """ + return self.__tunnel_termination_points + + def _set_tunnel_termination_points(self, v, load=False): + """ + Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_termination_points is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_termination_points() directly. + + YANG Description: Underlay TTPs desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_termination_points must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__tunnel_termination_points = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_termination_points(self): + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_tunnels(self): + """ + Getter method for tunnels, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels (container) + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + return self.__tunnels + + def _set_tunnels(self, v, load=False): + """ + Setter method for tunnels, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnels is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnels() directly. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnels must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__tunnels = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnels(self): + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + enabled = __builtin__.property(_get_enabled) + primary_path = __builtin__.property(_get_primary_path) + backup_path = __builtin__.property(_get_backup_path) + protection_type = __builtin__.property(_get_protection_type) + tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points) + tunnels = __builtin__.property(_get_tunnels) + + + _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92cc327172f3b1fff0e55b235e17bb9467e8d365 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py @@ -0,0 +1,207 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class backup_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) + + _yang_name = 'backup-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/index (uint32) + + YANG Description: A sequence number to identify a backup path. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: A sequence number to identify a backup path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element (list) + + YANG Description: A list of path elements describing the backup service +path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the backup service +path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + index = __builtin__.property(_get_index) + network_ref = __builtin__.property(_get_network_ref) + path_element = __builtin__.property(_get_path_element) + + + _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..782347073fd2268022355fceb1a528d9b27cd338 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,321 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the backup service +path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + path_element_id = __builtin__.property(_get_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75444961d2181499b1641c904b83653ee41e3f66 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..77ca590bd1d952e1bb07d94ea8fc90b05820a919 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ecefaca5fee07186c0d0e4bd6d8db385434194eb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f9e7d7a3d8ddfa7c1667c07438782a3485d87368 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b1433a162123e59c7f146f26b69731aa9b12ffe9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..919cb958e08e703c306b0b3c5f63bf665efb40b6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4268b048907964b9dac84106f985afad78ad95fc --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6f8297c2428b23508a5b81f759e727afb707535a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class primary_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) + + _yang_name = 'primary-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element (list) + + YANG Description: A list of path elements describing the service path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the service path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + network_ref = __builtin__.property(_get_network_ref) + path_element = __builtin__.property(_get_path_element) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0c5b869f6aab42d30032b0d62c28653cfd1ceab7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,320 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the service path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + path_element_id = __builtin__.property(_get_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f66d7136eb30f450c4e858c6105cda2616a650b8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5913384044adca0adc530c78228b13ef40ee3520 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5702d315008463d772546a497f5499a610f291e8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d8a5775c84e518b9848dcf49bd6f5767e34134f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ef124eada429f941ecb01207e1f66cb3cca0bdb1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..15377f86d5771b06091695253a7beae8cc48f982 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b950c235885e4c2afd13af722f71f644f565c472 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f6a6987ff720aa02066efd5ad34ce63d2f50c600 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel_termination_points(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/tunnel-termination-points. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TTPs desired for this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) + + _yang_name = 'tunnel-termination-points' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'tunnel-termination-points'] + + def _get_source(self): + """ + Getter method for source, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/source (binary) + + YANG Description: Source TTP identifier. + """ + return self.__source + + def _set_source(self, v, load=False): + """ + Setter method for source, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/source (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_source() directly. + + YANG Description: Source TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """source must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False)""", + }) + + self.__source = t + if hasattr(self, '_set'): + self._set() + + def _unset_source(self): + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) + + + def _get_destination(self): + """ + Getter method for destination, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/destination (binary) + + YANG Description: Destination TTP identifier. + """ + return self.__destination + + def _set_destination(self, v, load=False): + """ + Setter method for destination, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/destination (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_destination is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_destination() directly. + + YANG Description: Destination TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """destination must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False)""", + }) + + self.__destination = t + if hasattr(self, '_set'): + self._set() + + def _unset_destination(self): + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=False) + + source = __builtin__.property(_get_source) + destination = __builtin__.property(_get_destination) + + + _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b1d6cf9df47fb52c6b856d53f9de35da976c8754 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py @@ -0,0 +1,167 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tunnel +class tunnels(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/tunnels. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) + + _yang_name = 'tunnels' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'tunnels'] + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + + def _get_tunnel(self): + """ + Getter method for tunnel, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel (list) + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + return self.__tunnel + + def _set_tunnel(self, v, load=False): + """ + Setter method for tunnel, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel() directly. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__tunnel = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel(self): + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + sharing = __builtin__.property(_get_sharing) + tunnel = __builtin__.property(_get_tunnel) + + + _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8f8593123c741f78bb9c17df2ff37cbdc7671475 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,170 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/connectivity-matrices/underlay/tunnels/tunnel. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) + + _yang_name = 'tunnel' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'connectivity-matrices', 'underlay', 'tunnels', 'tunnel'] + + def _get_tunnel_name(self): + """ + Getter method for tunnel_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/tunnel_name (string) + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + return self.__tunnel_name + + def _set_tunnel_name(self, v, load=False): + """ + Setter method for tunnel_name, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/tunnel_name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_name() directly. + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__tunnel_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_name(self): + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=False) + + tunnel_name = __builtin__.property(_get_tunnel_name) + sharing = __builtin__.property(_get_sharing) + + + _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1ee93c90fde18dc4423f1d361606db1723c677c6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py @@ -0,0 +1,248 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import topology +class information_source_state(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/information-source-state. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains state attributes related to the information +source. + """ + __slots__ = ('_path_helper', '_extmethods', '__credibility_preference','__logical_network_element','__network_instance','__topology',) + + _yang_name = 'information-source-state' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'information-source-state'] + + def _get_credibility_preference(self): + """ + Getter method for credibility_preference, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/credibility_preference (uint16) + + YANG Description: The preference value for calculating the Traffic +Engineering database credibility value used for +tie-break selection between different information-source +values. A higher value is preferable. + """ + return self.__credibility_preference + + def _set_credibility_preference(self, v, load=False): + """ + Setter method for credibility_preference, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/credibility_preference (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_credibility_preference is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_credibility_preference() directly. + + YANG Description: The preference value for calculating the Traffic +Engineering database credibility value used for +tie-break selection between different information-source +values. A higher value is preferable. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """credibility_preference must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False)""", + }) + + self.__credibility_preference = t + if hasattr(self, '_set'): + self._set() + + def _unset_credibility_preference(self): + self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + + + def _get_logical_network_element(self): + """ + Getter method for logical_network_element, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/logical_network_element (string) + + YANG Description: When applicable, this is the name of a logical network +element from which the information is learned. + """ + return self.__logical_network_element + + def _set_logical_network_element(self, v, load=False): + """ + Setter method for logical_network_element, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/logical_network_element (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_logical_network_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_logical_network_element() directly. + + YANG Description: When applicable, this is the name of a logical network +element from which the information is learned. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """logical_network_element must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__logical_network_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_logical_network_element(self): + self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_network_instance(self): + """ + Getter method for network_instance, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/network_instance (string) + + YANG Description: When applicable, this is the name of a network instance +from which the information is learned. + """ + return self.__network_instance + + def _set_network_instance(self, v, load=False): + """ + Setter method for network_instance, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/network_instance (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_instance is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_instance() directly. + + YANG Description: When applicable, this is the name of a network instance +from which the information is learned. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_instance must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__network_instance = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_instance(self): + self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_topology(self): + """ + Getter method for topology, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/topology (container) + + YANG Description: When the information is processed by the system, +the attributes in this container indicate which topology +is used to generate the result information. + """ + return self.__topology + + def _set_topology(self, v, load=False): + """ + Setter method for topology, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/topology (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_topology is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_topology() directly. + + YANG Description: When the information is processed by the system, +the attributes in this container indicate which topology +is used to generate the result information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """topology must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__topology = t + if hasattr(self, '_set'): + self._set() + + def _unset_topology(self): + self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + credibility_preference = __builtin__.property(_get_credibility_preference) + logical_network_element = __builtin__.property(_get_logical_network_element) + network_instance = __builtin__.property(_get_network_instance) + topology = __builtin__.property(_get_topology) + + + _pyangbind_elements = OrderedDict([('credibility_preference', credibility_preference), ('logical_network_element', logical_network_element), ('network_instance', network_instance), ('topology', topology), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5fc5e047ba0e0fb15046e73a564e3b8ddafe61b7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class topology(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/information-source-state/topology. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: When the information is processed by the system, +the attributes in this container indicate which topology +is used to generate the result information. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_ref','__network_ref',) + + _yang_name = 'topology' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'information-source-state', 'topology'] + + def _get_node_ref(self): + """ + Getter method for node_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/topology/node_ref (leafref) + + YANG Description: Used to reference a node. +Nodes are identified relative to the network that +contains them. + """ + return self.__node_ref + + def _set_node_ref(self, v, load=False): + """ + Setter method for node_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/topology/node_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_ref() directly. + + YANG Description: Used to reference a node. +Nodes are identified relative to the network that +contains them. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__node_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_ref(self): + self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/topology/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/information_source_state/topology/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + node_ref = __builtin__.property(_get_node_ref) + network_ref = __builtin__.property(_get_network_ref) + + + _pyangbind_elements = OrderedDict([('node_ref', node_ref), ('network_ref', network_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c0d77ce6f2e10688d323486da70dcf638c78a689 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class underlay_topology(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-entry/underlay-topology. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: When an abstract node encapsulates a topology, the +attributes in this container point to said topology. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref',) + + _yang_name = 'underlay-topology' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-entry', 'underlay-topology'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/underlay_topology/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_entry/underlay_topology/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + network_ref = __builtin__.property(_get_network_ref) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_state/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7767ff2b6caded6441d09a3195e7ded1c7ef40fa --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_state/__init__.py @@ -0,0 +1,248 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import topology +class information_source_state(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-state. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains state attributes related to the information +source. + """ + __slots__ = ('_path_helper', '_extmethods', '__credibility_preference','__logical_network_element','__network_instance','__topology',) + + _yang_name = 'information-source-state' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-state'] + + def _get_credibility_preference(self): + """ + Getter method for credibility_preference, mapped from YANG variable /networks/network/node/te/information_source_state/credibility_preference (uint16) + + YANG Description: The preference value for calculating the Traffic +Engineering database credibility value used for +tie-break selection between different information-source +values. A higher value is preferable. + """ + return self.__credibility_preference + + def _set_credibility_preference(self, v, load=False): + """ + Setter method for credibility_preference, mapped from YANG variable /networks/network/node/te/information_source_state/credibility_preference (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_credibility_preference is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_credibility_preference() directly. + + YANG Description: The preference value for calculating the Traffic +Engineering database credibility value used for +tie-break selection between different information-source +values. A higher value is preferable. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """credibility_preference must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False)""", + }) + + self.__credibility_preference = t + if hasattr(self, '_set'): + self._set() + + def _unset_credibility_preference(self): + self.__credibility_preference = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="credibility-preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=False) + + + def _get_logical_network_element(self): + """ + Getter method for logical_network_element, mapped from YANG variable /networks/network/node/te/information_source_state/logical_network_element (string) + + YANG Description: When applicable, this is the name of a logical network +element from which the information is learned. + """ + return self.__logical_network_element + + def _set_logical_network_element(self, v, load=False): + """ + Setter method for logical_network_element, mapped from YANG variable /networks/network/node/te/information_source_state/logical_network_element (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_logical_network_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_logical_network_element() directly. + + YANG Description: When applicable, this is the name of a logical network +element from which the information is learned. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """logical_network_element must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__logical_network_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_logical_network_element(self): + self.__logical_network_element = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="logical-network-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_network_instance(self): + """ + Getter method for network_instance, mapped from YANG variable /networks/network/node/te/information_source_state/network_instance (string) + + YANG Description: When applicable, this is the name of a network instance +from which the information is learned. + """ + return self.__network_instance + + def _set_network_instance(self, v, load=False): + """ + Setter method for network_instance, mapped from YANG variable /networks/network/node/te/information_source_state/network_instance (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_instance is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_instance() directly. + + YANG Description: When applicable, this is the name of a network instance +from which the information is learned. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_instance must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__network_instance = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_instance(self): + self.__network_instance = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-instance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + + def _get_topology(self): + """ + Getter method for topology, mapped from YANG variable /networks/network/node/te/information_source_state/topology (container) + + YANG Description: When the information is processed by the system, +the attributes in this container indicate which topology +is used to generate the result information. + """ + return self.__topology + + def _set_topology(self, v, load=False): + """ + Setter method for topology, mapped from YANG variable /networks/network/node/te/information_source_state/topology (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_topology is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_topology() directly. + + YANG Description: When the information is processed by the system, +the attributes in this container indicate which topology +is used to generate the result information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """topology must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__topology = t + if hasattr(self, '_set'): + self._set() + + def _unset_topology(self): + self.__topology = YANGDynClass(base=topology.topology, is_container='container', yang_name="topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + credibility_preference = __builtin__.property(_get_credibility_preference) + logical_network_element = __builtin__.property(_get_logical_network_element) + network_instance = __builtin__.property(_get_network_instance) + topology = __builtin__.property(_get_topology) + + + _pyangbind_elements = OrderedDict([('credibility_preference', credibility_preference), ('logical_network_element', logical_network_element), ('network_instance', network_instance), ('topology', topology), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_state/topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_state/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6562d900333f751e9b819293eaf11322757eeaf0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/information_source_state/topology/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class topology(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/information-source-state/topology. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: When the information is processed by the system, +the attributes in this container indicate which topology +is used to generate the result information. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_ref','__network_ref',) + + _yang_name = 'topology' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'information-source-state', 'topology'] + + def _get_node_ref(self): + """ + Getter method for node_ref, mapped from YANG variable /networks/network/node/te/information_source_state/topology/node_ref (leafref) + + YANG Description: Used to reference a node. +Nodes are identified relative to the network that +contains them. + """ + return self.__node_ref + + def _set_node_ref(self, v, load=False): + """ + Setter method for node_ref, mapped from YANG variable /networks/network/node/te/information_source_state/topology/node_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_ref() directly. + + YANG Description: Used to reference a node. +Nodes are identified relative to the network that +contains them. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__node_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_ref(self): + self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_state/topology/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/information_source_state/topology/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=False) + + node_ref = __builtin__.property(_get_node_ref) + network_ref = __builtin__.property(_get_network_ref) + + + _pyangbind_elements = OrderedDict([('node_ref', node_ref), ('network_ref', network_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6741fb0fd254c5a6f683304025aed5da58832b0f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/__init__.py @@ -0,0 +1,207 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import node +from . import connectivity_matrix_entry +class statistics(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/statistics. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Statistics data. + """ + __slots__ = ('_path_helper', '_extmethods', '__discontinuity_time','__node','__connectivity_matrix_entry',) + + _yang_name = 'statistics' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__discontinuity_time = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) + self.__node = YANGDynClass(base=node.node, is_container='container', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__connectivity_matrix_entry = YANGDynClass(base=connectivity_matrix_entry.connectivity_matrix_entry, is_container='container', yang_name="connectivity-matrix-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'statistics'] + + def _get_discontinuity_time(self): + """ + Getter method for discontinuity_time, mapped from YANG variable /networks/network/node/te/statistics/discontinuity_time (yang:date-and-time) + + YANG Description: The time of the most recent occasion at which any one or +more of this interface's counters suffered a +discontinuity. If no such discontinuities have occurred +since the last re-initialization of the local management +subsystem, then this node contains the time the local +management subsystem re-initialized itself. + """ + return self.__discontinuity_time + + def _set_discontinuity_time(self, v, load=False): + """ + Setter method for discontinuity_time, mapped from YANG variable /networks/network/node/te/statistics/discontinuity_time (yang:date-and-time) + If this variable is read-only (config: false) in the + source YANG file, then _set_discontinuity_time is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_discontinuity_time() directly. + + YANG Description: The time of the most recent occasion at which any one or +more of this interface's counters suffered a +discontinuity. If no such discontinuities have occurred +since the last re-initialization of the local management +subsystem, then this node contains the time the local +management subsystem re-initialized itself. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """discontinuity_time must be of a type compatible with yang:date-and-time""", + 'defined-type': "yang:date-and-time", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False)""", + }) + + self.__discontinuity_time = t + if hasattr(self, '_set'): + self._set() + + def _unset_discontinuity_time(self): + self.__discontinuity_time = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) + + + def _get_node(self): + """ + Getter method for node, mapped from YANG variable /networks/network/node/te/statistics/node (container) + + YANG Description: Contains statistics attributes at the TE node level. + """ + return self.__node + + def _set_node(self, v, load=False): + """ + Setter method for node, mapped from YANG variable /networks/network/node/te/statistics/node (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_node is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node() directly. + + YANG Description: Contains statistics attributes at the TE node level. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=node.node, is_container='container', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=node.node, is_container='container', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__node = t + if hasattr(self, '_set'): + self._set() + + def _unset_node(self): + self.__node = YANGDynClass(base=node.node, is_container='container', yang_name="node", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_connectivity_matrix_entry(self): + """ + Getter method for connectivity_matrix_entry, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry (container) + + YANG Description: Contains statistics attributes at the level of a +connectivity matrix entry. + """ + return self.__connectivity_matrix_entry + + def _set_connectivity_matrix_entry(self, v, load=False): + """ + Setter method for connectivity_matrix_entry, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_connectivity_matrix_entry is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_connectivity_matrix_entry() directly. + + YANG Description: Contains statistics attributes at the level of a +connectivity matrix entry. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=connectivity_matrix_entry.connectivity_matrix_entry, is_container='container', yang_name="connectivity-matrix-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """connectivity_matrix_entry must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=connectivity_matrix_entry.connectivity_matrix_entry, is_container='container', yang_name="connectivity-matrix-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__connectivity_matrix_entry = t + if hasattr(self, '_set'): + self._set() + + def _unset_connectivity_matrix_entry(self): + self.__connectivity_matrix_entry = YANGDynClass(base=connectivity_matrix_entry.connectivity_matrix_entry, is_container='container', yang_name="connectivity-matrix-entry", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + discontinuity_time = __builtin__.property(_get_discontinuity_time) + node = __builtin__.property(_get_node) + connectivity_matrix_entry = __builtin__.property(_get_connectivity_matrix_entry) + + + _pyangbind_elements = OrderedDict([('discontinuity_time', discontinuity_time), ('node', node), ('connectivity_matrix_entry', connectivity_matrix_entry), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c96f28c4c8867f027fead21227e752e58f4a950 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py @@ -0,0 +1,282 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class connectivity_matrix_entry(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/statistics/connectivity-matrix-entry. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains statistics attributes at the level of a +connectivity matrix entry. + """ + __slots__ = ('_path_helper', '_extmethods', '__creates','__deletes','__disables','__enables','__modifies',) + + _yang_name = 'connectivity-matrix-entry' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__creates = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__deletes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'statistics', 'connectivity-matrix-entry'] + + def _get_creates(self): + """ + Getter method for creates, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/creates (yang:counter32) + + YANG Description: Number of times that a connectivity matrix entry was +created. + """ + return self.__creates + + def _set_creates(self, v, load=False): + """ + Setter method for creates, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/creates (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_creates is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_creates() directly. + + YANG Description: Number of times that a connectivity matrix entry was +created. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """creates must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__creates = t + if hasattr(self, '_set'): + self._set() + + def _unset_creates(self): + self.__creates = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_deletes(self): + """ + Getter method for deletes, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/deletes (yang:counter32) + + YANG Description: Number of times that a connectivity matrix entry was +deleted. + """ + return self.__deletes + + def _set_deletes(self, v, load=False): + """ + Setter method for deletes, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/deletes (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_deletes is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_deletes() directly. + + YANG Description: Number of times that a connectivity matrix entry was +deleted. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """deletes must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__deletes = t + if hasattr(self, '_set'): + self._set() + + def _unset_deletes(self): + self.__deletes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_disables(self): + """ + Getter method for disables, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/disables (yang:counter32) + + YANG Description: Number of times that a connectivity matrix entry was +disabled. + """ + return self.__disables + + def _set_disables(self, v, load=False): + """ + Setter method for disables, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/disables (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_disables is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_disables() directly. + + YANG Description: Number of times that a connectivity matrix entry was +disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """disables must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__disables = t + if hasattr(self, '_set'): + self._set() + + def _unset_disables(self): + self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_enables(self): + """ + Getter method for enables, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/enables (yang:counter32) + + YANG Description: Number of times that a connectivity matrix entry was +enabled. + """ + return self.__enables + + def _set_enables(self, v, load=False): + """ + Setter method for enables, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/enables (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_enables is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enables() directly. + + YANG Description: Number of times that a connectivity matrix entry was +enabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enables must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__enables = t + if hasattr(self, '_set'): + self._set() + + def _unset_enables(self): + self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_modifies(self): + """ + Getter method for modifies, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/modifies (yang:counter32) + + YANG Description: Number of times that a connectivity matrix entry was +modified. + """ + return self.__modifies + + def _set_modifies(self, v, load=False): + """ + Setter method for modifies, mapped from YANG variable /networks/network/node/te/statistics/connectivity_matrix_entry/modifies (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_modifies is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_modifies() directly. + + YANG Description: Number of times that a connectivity matrix entry was +modified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """modifies must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__modifies = t + if hasattr(self, '_set'): + self._set() + + def _unset_modifies(self): + self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + creates = __builtin__.property(_get_creates) + deletes = __builtin__.property(_get_deletes) + disables = __builtin__.property(_get_disables) + enables = __builtin__.property(_get_enables) + modifies = __builtin__.property(_get_modifies) + + + _pyangbind_elements = OrderedDict([('creates', creates), ('deletes', deletes), ('disables', disables), ('enables', enables), ('modifies', modifies), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/node/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/node/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4d1e11b5e10ceff699b7ddaf2a947af002a18db6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/statistics/node/__init__.py @@ -0,0 +1,273 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class node(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/statistics/node. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains statistics attributes at the TE node level. + """ + __slots__ = ('_path_helper', '_extmethods', '__disables','__enables','__maintenance_sets','__maintenance_clears','__modifies',) + + _yang_name = 'node' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__maintenance_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__maintenance_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'statistics', 'node'] + + def _get_disables(self): + """ + Getter method for disables, mapped from YANG variable /networks/network/node/te/statistics/node/disables (yang:counter32) + + YANG Description: Number of times that a node was disabled. + """ + return self.__disables + + def _set_disables(self, v, load=False): + """ + Setter method for disables, mapped from YANG variable /networks/network/node/te/statistics/node/disables (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_disables is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_disables() directly. + + YANG Description: Number of times that a node was disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """disables must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__disables = t + if hasattr(self, '_set'): + self._set() + + def _unset_disables(self): + self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_enables(self): + """ + Getter method for enables, mapped from YANG variable /networks/network/node/te/statistics/node/enables (yang:counter32) + + YANG Description: Number of times that a node was enabled. + """ + return self.__enables + + def _set_enables(self, v, load=False): + """ + Setter method for enables, mapped from YANG variable /networks/network/node/te/statistics/node/enables (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_enables is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enables() directly. + + YANG Description: Number of times that a node was enabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enables must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__enables = t + if hasattr(self, '_set'): + self._set() + + def _unset_enables(self): + self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_maintenance_sets(self): + """ + Getter method for maintenance_sets, mapped from YANG variable /networks/network/node/te/statistics/node/maintenance_sets (yang:counter32) + + YANG Description: Number of times that a node was put in maintenance. + """ + return self.__maintenance_sets + + def _set_maintenance_sets(self, v, load=False): + """ + Setter method for maintenance_sets, mapped from YANG variable /networks/network/node/te/statistics/node/maintenance_sets (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_maintenance_sets is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_maintenance_sets() directly. + + YANG Description: Number of times that a node was put in maintenance. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """maintenance_sets must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__maintenance_sets = t + if hasattr(self, '_set'): + self._set() + + def _unset_maintenance_sets(self): + self.__maintenance_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_maintenance_clears(self): + """ + Getter method for maintenance_clears, mapped from YANG variable /networks/network/node/te/statistics/node/maintenance_clears (yang:counter32) + + YANG Description: Number of times that a node was taken out of +maintenance. + """ + return self.__maintenance_clears + + def _set_maintenance_clears(self, v, load=False): + """ + Setter method for maintenance_clears, mapped from YANG variable /networks/network/node/te/statistics/node/maintenance_clears (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_maintenance_clears is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_maintenance_clears() directly. + + YANG Description: Number of times that a node was taken out of +maintenance. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """maintenance_clears must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__maintenance_clears = t + if hasattr(self, '_set'): + self._set() + + def _unset_maintenance_clears(self): + self.__maintenance_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_modifies(self): + """ + Getter method for modifies, mapped from YANG variable /networks/network/node/te/statistics/node/modifies (yang:counter32) + + YANG Description: Number of times that a node was modified. + """ + return self.__modifies + + def _set_modifies(self, v, load=False): + """ + Setter method for modifies, mapped from YANG variable /networks/network/node/te/statistics/node/modifies (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_modifies is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_modifies() directly. + + YANG Description: Number of times that a node was modified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """modifies must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__modifies = t + if hasattr(self, '_set'): + self._set() + + def _unset_modifies(self): + self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + disables = __builtin__.property(_get_disables) + enables = __builtin__.property(_get_enables) + maintenance_sets = __builtin__.property(_get_maintenance_sets) + maintenance_clears = __builtin__.property(_get_maintenance_clears) + modifies = __builtin__.property(_get_modifies) + + + _pyangbind_elements = OrderedDict([('disables', disables), ('enables', enables), ('maintenance_sets', maintenance_sets), ('maintenance_clears', maintenance_clears), ('modifies', modifies), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..08e7f93bea49d7c90b4edd56733e6f13dfdbc845 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/__init__.py @@ -0,0 +1,357 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import connectivity_matrices +from . import underlay_topology +class te_node_attributes(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains node attributes in a TE topology. + """ + __slots__ = ('_path_helper', '_extmethods', '__admin_status','__connectivity_matrices','__domain_id','__is_abstract','__name','__signaling_address','__underlay_topology',) + + _yang_name = 'te-node-attributes' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + self.__connectivity_matrices = YANGDynClass(base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__domain_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__signaling_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True) + self.__underlay_topology = YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes'] + + def _get_admin_status(self): + """ + Getter method for admin_status, mapped from YANG variable /networks/network/node/te/te_node_attributes/admin_status (te-types:te-admin-status) + + YANG Description: The administrative state of the link. + """ + return self.__admin_status + + def _set_admin_status(self, v, load=False): + """ + Setter method for admin_status, mapped from YANG variable /networks/network/node/te/te_node_attributes/admin_status (te-types:te-admin-status) + If this variable is read-only (config: false) in the + source YANG file, then _set_admin_status is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_admin_status() directly. + + YANG Description: The administrative state of the link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """admin_status must be of a type compatible with te-types:te-admin-status""", + 'defined-type': "te-types:te-admin-status", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True)""", + }) + + self.__admin_status = t + if hasattr(self, '_set'): + self._set() + + def _unset_admin_status(self): + self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + + + def _get_connectivity_matrices(self): + """ + Getter method for connectivity_matrices, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices (container) + + YANG Description: Contains a connectivity matrix on a TE node. + """ + return self.__connectivity_matrices + + def _set_connectivity_matrices(self, v, load=False): + """ + Setter method for connectivity_matrices, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_connectivity_matrices is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_connectivity_matrices() directly. + + YANG Description: Contains a connectivity matrix on a TE node. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """connectivity_matrices must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__connectivity_matrices = t + if hasattr(self, '_set'): + self._set() + + def _unset_connectivity_matrices(self): + self.__connectivity_matrices = YANGDynClass(base=connectivity_matrices.connectivity_matrices, is_container='container', yang_name="connectivity-matrices", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_domain_id(self): + """ + Getter method for domain_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/domain_id (uint32) + + YANG Description: Identifies the domain to which this node belongs. +This attribute is used to support inter-domain links. + """ + return self.__domain_id + + def _set_domain_id(self, v, load=False): + """ + Setter method for domain_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/domain_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_domain_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_domain_id() directly. + + YANG Description: Identifies the domain to which this node belongs. +This attribute is used to support inter-domain links. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """domain_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__domain_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_domain_id(self): + self.__domain_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_is_abstract(self): + """ + Getter method for is_abstract, mapped from YANG variable /networks/network/node/te/te_node_attributes/is_abstract (empty) + + YANG Description: Present if the node is abstract; not present if the node +is actual. + """ + return self.__is_abstract + + def _set_is_abstract(self, v, load=False): + """ + Setter method for is_abstract, mapped from YANG variable /networks/network/node/te/te_node_attributes/is_abstract (empty) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_abstract is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_abstract() directly. + + YANG Description: Present if the node is abstract; not present if the node +is actual. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_abstract must be of a type compatible with empty""", + 'defined-type': "empty", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True)""", + }) + + self.__is_abstract = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_abstract(self): + self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) + + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/name (string) + + YANG Description: Node name. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Node name. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_signaling_address(self): + """ + Getter method for signaling_address, mapped from YANG variable /networks/network/node/te/te_node_attributes/signaling_address (inet:ip-address) + + YANG Description: The node's signaling address. + """ + return self.__signaling_address + + def _set_signaling_address(self, v, load=False): + """ + Setter method for signaling_address, mapped from YANG variable /networks/network/node/te/te_node_attributes/signaling_address (inet:ip-address) + If this variable is read-only (config: false) in the + source YANG file, then _set_signaling_address is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_signaling_address() directly. + + YANG Description: The node's signaling address. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """signaling_address must be of a type compatible with inet:ip-address""", + 'defined-type': "inet:ip-address", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True)""", + }) + + self.__signaling_address = t + if hasattr(self, '_set'): + self._set() + + def _unset_signaling_address(self): + self.__signaling_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True) + + + def _get_underlay_topology(self): + """ + Getter method for underlay_topology, mapped from YANG variable /networks/network/node/te/te_node_attributes/underlay_topology (container) + + YANG Description: When an abstract node encapsulates a topology, the +attributes in this container point to said topology. + """ + return self.__underlay_topology + + def _set_underlay_topology(self, v, load=False): + """ + Setter method for underlay_topology, mapped from YANG variable /networks/network/node/te/te_node_attributes/underlay_topology (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_underlay_topology is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_underlay_topology() directly. + + YANG Description: When an abstract node encapsulates a topology, the +attributes in this container point to said topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """underlay_topology must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__underlay_topology = t + if hasattr(self, '_set'): + self._set() + + def _unset_underlay_topology(self): + self.__underlay_topology = YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + admin_status = __builtin__.property(_get_admin_status, _set_admin_status) + connectivity_matrices = __builtin__.property(_get_connectivity_matrices, _set_connectivity_matrices) + domain_id = __builtin__.property(_get_domain_id, _set_domain_id) + is_abstract = __builtin__.property(_get_is_abstract, _set_is_abstract) + name = __builtin__.property(_get_name, _set_name) + signaling_address = __builtin__.property(_get_signaling_address, _set_signaling_address) + underlay_topology = __builtin__.property(_get_underlay_topology, _set_underlay_topology) + + + _pyangbind_elements = OrderedDict([('admin_status', admin_status), ('connectivity_matrices', connectivity_matrices), ('domain_id', domain_id), ('is_abstract', is_abstract), ('name', name), ('signaling_address', signaling_address), ('underlay_topology', underlay_topology), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e1a23ffc8361fba2a308618e731f8f2dd3e20f1b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py @@ -0,0 +1,412 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restrictions +from . import underlay +from . import path_constraints +from . import optimizations +from . import path_properties +from . import connectivity_matrix +class connectivity_matrices(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains a connectivity matrix on a TE node. + """ + __slots__ = ('_path_helper', '_extmethods', '__number_of_entries','__label_restrictions','__is_allowed','__underlay','__path_constraints','__optimizations','__path_properties','__connectivity_matrix',) + + _yang_name = 'connectivity-matrices' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__number_of_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__connectivity_matrix = YANGDynClass(base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices'] + + def _get_number_of_entries(self): + """ + Getter method for number_of_entries, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/number_of_entries (uint16) + + YANG Description: The number of connectivity matrix entries. +If this number is specified in the configuration request, +the number is the requested number of entries, which may +not all be listed in the list; +if this number is reported in the state data, +the number is the current number of operational entries. + """ + return self.__number_of_entries + + def _set_number_of_entries(self, v, load=False): + """ + Setter method for number_of_entries, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/number_of_entries (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number_of_entries is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number_of_entries() directly. + + YANG Description: The number of connectivity matrix entries. +If this number is specified in the configuration request, +the number is the requested number of entries, which may +not all be listed in the list; +if this number is reported in the state data, +the number is the current number of operational entries. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number_of_entries must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number_of_entries = t + if hasattr(self, '_set'): + self._set() + + def _unset_number_of_entries(self): + self.__number_of_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) + + + def _get_label_restrictions(self): + """ + Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions (container) + + YANG Description: The label restrictions container. + """ + return self.__label_restrictions + + def _set_label_restrictions(self, v, load=False): + """ + Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restrictions is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restrictions() directly. + + YANG Description: The label restrictions container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restrictions must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_restrictions = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restrictions(self): + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_is_allowed(self): + """ + Getter method for is_allowed, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/is_allowed (boolean) + + YANG Description: 'true' - switching is allowed; +'false' - switching is disallowed. + """ + return self.__is_allowed + + def _set_is_allowed(self, v, load=False): + """ + Setter method for is_allowed, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/is_allowed (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_allowed is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_allowed() directly. + + YANG Description: 'true' - switching is allowed; +'false' - switching is disallowed. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_allowed must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__is_allowed = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_allowed(self): + self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_underlay(self): + """ + Getter method for underlay, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay (container) + + YANG Description: Attributes of the TE link underlay. + """ + return self.__underlay + + def _set_underlay(self, v, load=False): + """ + Setter method for underlay, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_underlay is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_underlay() directly. + + YANG Description: Attributes of the TE link underlay. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """underlay must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__underlay = t + if hasattr(self, '_set'): + self._set() + + def _unset_underlay(self): + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_constraints(self): + """ + Getter method for path_constraints, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints (container) + + YANG Description: TE named path constraints container. + """ + return self.__path_constraints + + def _set_path_constraints(self, v, load=False): + """ + Setter method for path_constraints, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_constraints is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_constraints() directly. + + YANG Description: TE named path constraints container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_constraints must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_constraints = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_constraints(self): + self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_optimizations(self): + """ + Getter method for optimizations, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations (container) + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + return self.__optimizations + + def _set_optimizations(self, v, load=False): + """ + Setter method for optimizations, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimizations is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimizations() directly. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimizations must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__optimizations = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimizations(self): + self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_properties(self): + """ + Getter method for path_properties, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties (container) + + YANG Description: The TE path properties. + """ + return self.__path_properties + + def _set_path_properties(self, v, load=False): + """ + Setter method for path_properties, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_properties is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_properties() directly. + + YANG Description: The TE path properties. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_properties must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_properties = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_properties(self): + self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_connectivity_matrix(self): + """ + Getter method for connectivity_matrix, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix (list) + + YANG Description: Represents a node's switching limitations, i.e., +limitations in the interconnecting network TE links +across the node. + """ + return self.__connectivity_matrix + + def _set_connectivity_matrix(self, v, load=False): + """ + Setter method for connectivity_matrix, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_connectivity_matrix is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_connectivity_matrix() directly. + + YANG Description: Represents a node's switching limitations, i.e., +limitations in the interconnecting network TE links +across the node. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """connectivity_matrix must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__connectivity_matrix = t + if hasattr(self, '_set'): + self._set() + + def _unset_connectivity_matrix(self): + self.__connectivity_matrix = YANGDynClass(base=YANGListType("id",connectivity_matrix.connectivity_matrix, yang_name="connectivity-matrix", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="connectivity-matrix", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + number_of_entries = __builtin__.property(_get_number_of_entries, _set_number_of_entries) + label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) + is_allowed = __builtin__.property(_get_is_allowed, _set_is_allowed) + underlay = __builtin__.property(_get_underlay, _set_underlay) + path_constraints = __builtin__.property(_get_path_constraints, _set_path_constraints) + optimizations = __builtin__.property(_get_optimizations, _set_optimizations) + path_properties = __builtin__.property(_get_path_properties) + connectivity_matrix = __builtin__.property(_get_connectivity_matrix, _set_connectivity_matrix) + + + _pyangbind_elements = OrderedDict([('number_of_entries', number_of_entries), ('label_restrictions', label_restrictions), ('is_allowed', is_allowed), ('underlay', underlay), ('path_constraints', path_constraints), ('optimizations', optimizations), ('path_properties', path_properties), ('connectivity_matrix', connectivity_matrix), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..704040fa4ee6069477ddbfb7ad51bdbd33ca4ba5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py @@ -0,0 +1,405 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import from_ +from . import to +from . import underlay +from . import path_constraints +from . import optimizations +from . import path_properties +class connectivity_matrix(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Represents a node's switching limitations, i.e., +limitations in the interconnecting network TE links +across the node. + """ + __slots__ = ('_path_helper', '_extmethods', '__id','__from_','__to','__is_allowed','__underlay','__path_constraints','__optimizations','__path_properties',) + + _yang_name = 'connectivity-matrix' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__from_ = YANGDynClass(base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__to = YANGDynClass(base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix'] + + def _get_id(self): + """ + Getter method for id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/id (uint32) + + YANG Description: Identifies the connectivity matrix entry. + """ + return self.__id + + def _set_id(self, v, load=False): + """ + Setter method for id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_id() directly. + + YANG Description: Identifies the connectivity matrix entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__id = t + if hasattr(self, '_set'): + self._set() + + def _unset_id(self): + self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_from_(self): + """ + Getter method for from_, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from (container) + + YANG Description: Reference to a source LTP. + """ + return self.__from_ + + def _set_from_(self, v, load=False): + """ + Setter method for from_, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_from_ is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_from_() directly. + + YANG Description: Reference to a source LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """from_ must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__from_ = t + if hasattr(self, '_set'): + self._set() + + def _unset_from_(self): + self.__from_ = YANGDynClass(base=from_.from_, is_container='container', yang_name="from", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_to(self): + """ + Getter method for to, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to (container) + + YANG Description: Reference to a destination LTP. + """ + return self.__to + + def _set_to(self, v, load=False): + """ + Setter method for to, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_to is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_to() directly. + + YANG Description: Reference to a destination LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """to must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__to = t + if hasattr(self, '_set'): + self._set() + + def _unset_to(self): + self.__to = YANGDynClass(base=to.to, is_container='container', yang_name="to", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_is_allowed(self): + """ + Getter method for is_allowed, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/is_allowed (boolean) + + YANG Description: 'true' - switching is allowed; +'false' - switching is disallowed. + """ + return self.__is_allowed + + def _set_is_allowed(self, v, load=False): + """ + Setter method for is_allowed, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/is_allowed (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_allowed is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_allowed() directly. + + YANG Description: 'true' - switching is allowed; +'false' - switching is disallowed. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_allowed must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__is_allowed = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_allowed(self): + self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_underlay(self): + """ + Getter method for underlay, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay (container) + + YANG Description: Attributes of the TE link underlay. + """ + return self.__underlay + + def _set_underlay(self, v, load=False): + """ + Setter method for underlay, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_underlay is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_underlay() directly. + + YANG Description: Attributes of the TE link underlay. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """underlay must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__underlay = t + if hasattr(self, '_set'): + self._set() + + def _unset_underlay(self): + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_constraints(self): + """ + Getter method for path_constraints, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints (container) + + YANG Description: TE named path constraints container. + """ + return self.__path_constraints + + def _set_path_constraints(self, v, load=False): + """ + Setter method for path_constraints, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_constraints is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_constraints() directly. + + YANG Description: TE named path constraints container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_constraints must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_constraints = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_constraints(self): + self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_optimizations(self): + """ + Getter method for optimizations, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations (container) + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + return self.__optimizations + + def _set_optimizations(self, v, load=False): + """ + Setter method for optimizations, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimizations is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimizations() directly. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimizations must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__optimizations = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimizations(self): + self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_properties(self): + """ + Getter method for path_properties, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties (container) + + YANG Description: The TE path properties. + """ + return self.__path_properties + + def _set_path_properties(self, v, load=False): + """ + Setter method for path_properties, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_properties is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_properties() directly. + + YANG Description: The TE path properties. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_properties must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_properties = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_properties(self): + self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + id = __builtin__.property(_get_id, _set_id) + from_ = __builtin__.property(_get_from_, _set_from_) + to = __builtin__.property(_get_to, _set_to) + is_allowed = __builtin__.property(_get_is_allowed, _set_is_allowed) + underlay = __builtin__.property(_get_underlay, _set_underlay) + path_constraints = __builtin__.property(_get_path_constraints, _set_path_constraints) + optimizations = __builtin__.property(_get_optimizations, _set_optimizations) + path_properties = __builtin__.property(_get_path_properties) + + + _pyangbind_elements = OrderedDict([('id', id), ('from_', from_), ('to', to), ('is_allowed', is_allowed), ('underlay', underlay), ('path_constraints', path_constraints), ('optimizations', optimizations), ('path_properties', path_properties), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..40157c9047e4ea2039558fa9dfbb4eb1349046b3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/__init__.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restrictions +class from_(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Reference to a source LTP. + """ + __slots__ = ('_path_helper', '_extmethods', '__tp_ref','__label_restrictions',) + + _yang_name = 'from' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from'] + + def _get_tp_ref(self): + """ + Getter method for tp_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/tp_ref (leafref) + + YANG Description: Relative reference to a termination point. + """ + return self.__tp_ref + + def _set_tp_ref(self, v, load=False): + """ + Setter method for tp_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/tp_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tp_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tp_ref() directly. + + YANG Description: Relative reference to a termination point. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tp_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__tp_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_tp_ref(self): + self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_label_restrictions(self): + """ + Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions (container) + + YANG Description: The label restrictions container. + """ + return self.__label_restrictions + + def _set_label_restrictions(self, v, load=False): + """ + Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restrictions is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restrictions() directly. + + YANG Description: The label restrictions container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restrictions must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_restrictions = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restrictions(self): + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + tp_ref = __builtin__.property(_get_tp_ref, _set_tp_ref) + label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) + + + _pyangbind_elements = OrderedDict([('tp_ref', tp_ref), ('label_restrictions', label_restrictions), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5a441f8e0c6c181850335c85898e65d7ab956970 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restriction +class label_restrictions(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The label restrictions container. + """ + __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) + + _yang_name = 'label-restrictions' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions'] + + def _get_label_restriction(self): + """ + Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction (list) + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + return self.__label_restriction + + def _set_label_restriction(self, v, load=False): + """ + Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restriction() directly. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restriction must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__label_restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restriction(self): + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) + + + _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..be63791cbe8b06eb5b5c2f33c44b63bc06497851 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,450 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_start +from . import label_end +from . import label_step +from . import otn_label_range +from . import ethernet_label_range +class label_restriction(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) + + _yang_name = 'label-restriction' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction'] + + def _get_restriction(self): + """ + Getter method for restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/restriction (enumeration) + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + return self.__restriction + + def _set_restriction(self, v, load=False): + """ + Setter method for restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/restriction (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restriction() directly. + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restriction must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", + }) + + self.__restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_restriction(self): + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/index (uint32) + + YANG Description: The index of the label restriction list entry. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: The index of the label restriction list entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_label_start(self): + """ + Getter method for label_start, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start (container) + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + return self.__label_start + + def _set_label_start(self, v, load=False): + """ + Setter method for label_start, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_start is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_start() directly. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_start must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_start = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_start(self): + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_end(self): + """ + Getter method for label_end, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end (container) + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + return self.__label_end + + def _set_label_end(self, v, load=False): + """ + Setter method for label_end, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_end is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_end() directly. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_end must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_end = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_end(self): + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_step(self): + """ + Getter method for label_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step (container) + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + return self.__label_step + + def _set_label_step(self, v, load=False): + """ + Setter method for label_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_step() directly. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_step must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_step(self): + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_range_bitmap(self): + """ + Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + return self.__range_bitmap + + def _set_range_bitmap(self, v, load=False): + """ + Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_bitmap is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_bitmap() directly. + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", + 'defined-type': "yang:hex-string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", + }) + + self.__range_bitmap = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_bitmap(self): + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + + + def _get_otn_label_range(self): + """ + Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range (container) + + YANG Description: Label range information for OTN. + """ + return self.__otn_label_range + + def _set_otn_label_range(self, v, load=False): + """ + Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_label_range() directly. + + YANG Description: Label range information for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_label_range(self): + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_ethernet_label_range(self): + """ + Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range (container) + + YANG Description: Ethernet-specific label range related information. + """ + return self.__ethernet_label_range + + def _set_ethernet_label_range(self, v, load=False): + """ + Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ethernet_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ethernet_label_range() directly. + + YANG Description: Ethernet-specific label range related information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ethernet_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__ethernet_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_ethernet_label_range(self): + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + restriction = __builtin__.property(_get_restriction, _set_restriction) + index = __builtin__.property(_get_index, _set_index) + label_start = __builtin__.property(_get_label_start, _set_label_start) + label_end = __builtin__.property(_get_label_end, _set_label_end) + label_step = __builtin__.property(_get_label_step, _set_label_step) + range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) + otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) + ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) + + + _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..85fe797a51b6fa7885f89cd65cf364ff57198576 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/ethernet_label_range/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ethernet_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/ethernet-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Ethernet-specific label range related information. + """ + __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) + + _yang_name = 'ethernet-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] + + def _get_tag_type(self): + """ + Getter method for tag_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + + YANG Description: VLAN tag type. + """ + return self.__tag_type + + def _set_tag_type(self, v, load=False): + """ + Setter method for tag_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_tag_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tag_type() directly. + + YANG Description: VLAN tag type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", + }) + + self.__tag_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tag_type(self): + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + + YANG Description: priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + tag_type = __builtin__.property(_get_tag_type, _set_tag_type) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d944dc6d944eab6e6dac30513295005989a6f10 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_end(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-end. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-end' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-end'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c0f426a02bd5be6f416217e24fbadf1b3f034ec2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-end/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..252392100dcf49782a2bf23a6abccca7c1af85c2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7233908c119432a428f57f6e909caff23ae57867 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_start(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-start. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-start' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-start'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c15cb8c1bb129f85fe29101fc8b1da2a3574ddc6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-start/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29741fa5ec6c5d3bdaec7180d7371e8cd25a2aad --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..076a06d963d8ae945ad667fc4e57b3c7367688a6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class label_step(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-step. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) + + _yang_name = 'label-step' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-step'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/generic (int32) + + YANG Description: Label range step. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/generic (int32) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Label range step. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with int32""", + 'defined-type': "int32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn (container) + + YANG Description: Label step for OTN + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label step for OTN + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_step(self): + """ + Getter method for eth_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/eth_step (uint16) + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + return self.__eth_step + + def _set_eth_step(self, v, load=False): + """ + Setter method for eth_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/eth_step (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_step() directly. + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_step must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", + }) + + self.__eth_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_step(self): + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_step = __builtin__.property(_get_eth_step, _set_eth_step) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..023f3d7553a6098ca6ace33091cb75002b4d0b52 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/label_step/otn/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/label-step/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label step for OTN + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e9f6bb66d506fa8ba26e0593d32ba8d4e697bfd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from_/label_restrictions/label_restriction/otn_label_range/__init__.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/from/label-restrictions/label-restriction/otn-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label range information for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) + + _yang_name = 'otn-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'from', 'label-restrictions', 'label-restriction', 'otn-label-range'] + + def _get_range_type(self): + """ + Getter method for range_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + return self.__range_type + + def _set_range_type(self, v, load=False): + """ + Setter method for range_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_type() directly. + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_type must be of a type compatible with otn-label-range-type""", + 'defined-type': "ietf-otn-topology:otn-label-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", + }) + + self.__range_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_type(self): + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_odu_type_list(self): + """ + Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + return self.__odu_type_list + + def _set_odu_type_list(self, v, load=False): + """ + Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type_list() directly. + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type_list must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type_list(self): + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/priority (uint8) + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/otn_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + range_type = __builtin__.property(_get_range_type, _set_range_type) + tsg = __builtin__.property(_get_tsg, _set_tsg) + odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dccc4ecbe42042d4634c694abf84c3a7b85602eb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py @@ -0,0 +1,199 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import optimization_metric +from . import tiebreakers +from . import objective_function +class optimizations(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + __slots__ = ('_path_helper', '_extmethods', '__optimization_metric','__tiebreakers','__objective_function',) + + _yang_name = 'optimizations' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations'] + + def _get_optimization_metric(self): + """ + Getter method for optimization_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric (list) + + YANG Description: TE path metric type. + """ + return self.__optimization_metric + + def _set_optimization_metric(self, v, load=False): + """ + Setter method for optimization_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimization_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimization_metric() directly. + + YANG Description: TE path metric type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimization_metric must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__optimization_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimization_metric(self): + self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_tiebreakers(self): + """ + Getter method for tiebreakers, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers (container) + + YANG Description: Container for the list of tiebreakers. + """ + return self.__tiebreakers + + def _set_tiebreakers(self, v, load=False): + """ + Setter method for tiebreakers, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreakers is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreakers() directly. + + YANG Description: Container for the list of tiebreakers. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreakers must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tiebreakers = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreakers(self): + self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_objective_function(self): + """ + Getter method for objective_function, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function (container) + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + return self.__objective_function + + def _set_objective_function(self, v, load=False): + """ + Setter method for objective_function, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_objective_function is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_objective_function() directly. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """objective_function must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__objective_function = t + if hasattr(self, '_set'): + self._set() + + def _unset_objective_function(self): + self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + optimization_metric = __builtin__.property(_get_optimization_metric, _set_optimization_metric) + tiebreakers = __builtin__.property(_get_tiebreakers, _set_tiebreakers) + objective_function = __builtin__.property(_get_objective_function, _set_objective_function) + + __choices__ = {'algorithm': {'metric': ['optimization_metric', 'tiebreakers'], 'objective-function': ['objective_function']}} + _pyangbind_elements = OrderedDict([('optimization_metric', optimization_metric), ('tiebreakers', tiebreakers), ('objective_function', objective_function), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dd970e56fedbc68b634dc3dca1acb89ed8eb72e0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class objective_function(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/objective-function. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + __slots__ = ('_path_helper', '_extmethods', '__objective_function_type',) + + _yang_name = 'objective-function' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'objective-function'] + + def _get_objective_function_type(self): + """ + Getter method for objective_function_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/objective_function_type (identityref) + + YANG Description: Objective function entry. + """ + return self.__objective_function_type + + def _set_objective_function_type(self, v, load=False): + """ + Setter method for objective_function_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/objective_function/objective_function_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_objective_function_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_objective_function_type() directly. + + YANG Description: Objective function entry. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """objective_function_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__objective_function_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_objective_function_type(self): + self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + objective_function_type = __builtin__.property(_get_objective_function_type, _set_objective_function_type) + + __choices__ = {'algorithm': {'objective-function': ['objective_function_type']}} + _pyangbind_elements = OrderedDict([('objective_function_type', objective_function_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..63bedfaf58dd445b7d0fd52595841cada6de1b81 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/__init__.py @@ -0,0 +1,241 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import explicit_route_exclude_objects +from . import explicit_route_include_objects +class optimization_metric(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric type. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__weight','__explicit_route_exclude_objects','__explicit_route_include_objects',) + + _yang_name = 'optimization-metric' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/metric_type (identityref) + + YANG Description: Identifies the 'metric-type' that the path computation +process uses for optimization. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: Identifies the 'metric-type' that the path computation +process uses for optimization. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_weight(self): + """ + Getter method for weight, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/weight (uint8) + + YANG Description: TE path metric normalization weight. + """ + return self.__weight + + def _set_weight(self, v, load=False): + """ + Setter method for weight, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/weight (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_weight is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_weight() directly. + + YANG Description: TE path metric normalization weight. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """weight must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__weight = t + if hasattr(self, '_set'): + self._set() + + def _unset_weight(self): + self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_explicit_route_exclude_objects(self): + """ + Getter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects (container) + + YANG Description: Container for the 'exclude route' object list. + """ + return self.__explicit_route_exclude_objects + + def _set_explicit_route_exclude_objects(self, v, load=False): + """ + Setter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_explicit_route_exclude_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_explicit_route_exclude_objects() directly. + + YANG Description: Container for the 'exclude route' object list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """explicit_route_exclude_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__explicit_route_exclude_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_explicit_route_exclude_objects(self): + self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_explicit_route_include_objects(self): + """ + Getter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects (container) + + YANG Description: Container for the 'include route' object list. + """ + return self.__explicit_route_include_objects + + def _set_explicit_route_include_objects(self, v, load=False): + """ + Setter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_explicit_route_include_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_explicit_route_include_objects() directly. + + YANG Description: Container for the 'include route' object list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """explicit_route_include_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__explicit_route_include_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_explicit_route_include_objects(self): + self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + metric_type = __builtin__.property(_get_metric_type, _set_metric_type) + weight = __builtin__.property(_get_weight, _set_weight) + explicit_route_exclude_objects = __builtin__.property(_get_explicit_route_exclude_objects, _set_explicit_route_exclude_objects) + explicit_route_include_objects = __builtin__.property(_get_explicit_route_include_objects, _set_explicit_route_include_objects) + + __choices__ = {'algorithm': {'metric': ['metric_type', 'weight', 'explicit_route_exclude_objects', 'explicit_route_include_objects']}} + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('weight', weight), ('explicit_route_exclude_objects', explicit_route_exclude_objects), ('explicit_route_include_objects', explicit_route_include_objects), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07c1656b94e5163d64b0f1036db0f8140e211e9c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import route_object_exclude_object +class explicit_route_exclude_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the 'exclude route' object list. + """ + __slots__ = ('_path_helper', '_extmethods', '__route_object_exclude_object',) + + _yang_name = 'explicit-route-exclude-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects'] + + def _get_route_object_exclude_object(self): + """ + Getter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + return self.__route_object_exclude_object + + def _set_route_object_exclude_object(self, v, load=False): + """ + Setter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_route_object_exclude_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_route_object_exclude_object() directly. + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """route_object_exclude_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__route_object_exclude_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_route_object_exclude_object(self): + self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + route_object_exclude_object = __builtin__.property(_get_route_object_exclude_object, _set_route_object_exclude_object) + + __choices__ = {'algorithm': {'metric': ['route_object_exclude_object']}} + _pyangbind_elements = OrderedDict([('route_object_exclude_object', route_object_exclude_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4a4f8fd0f12da75083b300b981aecd2de0064135 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,365 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +from . import srlg +class route_object_exclude_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop','__srlg',) + + _yang_name = 'route-object-exclude-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_srlg(self): + """ + Getter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) + + YANG Description: SRLG container. + """ + return self.__srlg + + def _set_srlg(self, v, load=False): + """ + Setter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_srlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_srlg() directly. + + YANG Description: SRLG container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """srlg must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__srlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_srlg(self): + self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + srlg = __builtin__.property(_get_srlg, _set_srlg) + + __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop'], 'srlg': ['srlg']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ('srlg', srlg), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..783159e5730b33eac6bc37c7fb7b130788e48fa7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..484b23ab16d64fc2e85f2a08d5088a4b720612e7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b55fb4219df570ca7341320f33241bc39119aa6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f11e3324ce91e692a6c2fd4cc46910282ee81a24 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..80a217af8cb58e9e70d92e7a00bce21021124e1c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..694b6a3c1719ef194c93b7968abed77ee1a6bf4d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9a858772ed1f5c20466f998285c289d49b639c1c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class srlg(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/srlg. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: SRLG container. + """ + __slots__ = ('_path_helper', '_extmethods', '__srlg',) + + _yang_name = 'srlg' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'srlg'] + + def _get_srlg(self): + """ + Getter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) + + YANG Description: SRLG value. + """ + return self.__srlg + + def _set_srlg(self, v, load=False): + """ + Setter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_srlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_srlg() directly. + + YANG Description: SRLG value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """srlg must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__srlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_srlg(self): + self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + srlg = __builtin__.property(_get_srlg, _set_srlg) + + __choices__ = {'type': {'srlg': ['srlg']}} + _pyangbind_elements = OrderedDict([('srlg', srlg), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4a0e2b21eb3ac9bffbea75fc9506ea0515a143ef --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cea85916d33dd2fabc77825f73e881e870076464 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import route_object_include_object +class explicit_route_include_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the 'include route' object list. + """ + __slots__ = ('_path_helper', '_extmethods', '__route_object_include_object',) + + _yang_name = 'explicit-route-include-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects'] + + def _get_route_object_include_object(self): + """ + Getter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + return self.__route_object_include_object + + def _set_route_object_include_object(self, v, load=False): + """ + Setter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_route_object_include_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_route_object_include_object() directly. + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """route_object_include_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__route_object_include_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_route_object_include_object(self): + self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + route_object_include_object = __builtin__.property(_get_route_object_include_object, _set_route_object_include_object) + + __choices__ = {'algorithm': {'metric': ['route_object_include_object']}} + _pyangbind_elements = OrderedDict([('route_object_include_object', route_object_include_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1330f425e854ef75382319b9f405d41eb70e5c33 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,325 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class route_object_include_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'route-object-include-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..edcea596e308c1626e8607c772d43cb059fb63a3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..20d876129a9cfc163b39aadd15711ed2d468f771 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2f3c37938006ce87bdfc57fed9bb4db41aac38ef --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9361ab75303485dba5e4181cbdb263ebec3d64f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e53b4266dbda6de34f5fae4186da419d8b942544 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f49e95c2a23dbd8805bee95422c2749ed04b9e48 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f69f0f6b7fba906111181eaa9b1944a184f064d1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e0333aee2a52bc97afcc680872104618a2e09197 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tiebreaker +class tiebreakers(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/tiebreakers. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of tiebreakers. + """ + __slots__ = ('_path_helper', '_extmethods', '__tiebreaker',) + + _yang_name = 'tiebreakers' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'tiebreakers'] + + def _get_tiebreaker(self): + """ + Getter method for tiebreaker, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker (list) + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + return self.__tiebreaker + + def _set_tiebreaker(self, v, load=False): + """ + Setter method for tiebreaker, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreaker is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreaker() directly. + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreaker must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__tiebreaker = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreaker(self): + self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + tiebreaker = __builtin__.property(_get_tiebreaker, _set_tiebreaker) + + __choices__ = {'algorithm': {'metric': ['tiebreaker']}} + _pyangbind_elements = OrderedDict([('tiebreaker', tiebreaker), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..26464cef2cce0bf13cf6b910a5363e5d24215b20 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tiebreaker(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/optimizations/tiebreakers/tiebreaker. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + __slots__ = ('_path_helper', '_extmethods', '__tiebreaker_type',) + + _yang_name = 'tiebreaker' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'optimizations', 'tiebreakers', 'tiebreaker'] + + def _get_tiebreaker_type(self): + """ + Getter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) + + YANG Description: Identifies an entry in the list of tiebreakers. + """ + return self.__tiebreaker_type + + def _set_tiebreaker_type(self, v, load=False): + """ + Setter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreaker_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreaker_type() directly. + + YANG Description: Identifies an entry in the list of tiebreakers. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreaker_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tiebreaker_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreaker_type(self): + self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + tiebreaker_type = __builtin__.property(_get_tiebreaker_type, _set_tiebreaker_type) + + __choices__ = {'algorithm': {'metric': ['tiebreaker_type']}} + _pyangbind_elements = OrderedDict([('tiebreaker_type', tiebreaker_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2b9f4b692f85c4789a24e5834c7eacdb19bb540f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py @@ -0,0 +1,523 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +from . import path_metric_bounds +from . import path_affinities_values +from . import path_affinity_names +from . import path_srlgs_lists +from . import path_srlgs_names +class path_constraints(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE named path constraints container. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth','__link_protection','__setup_priority','__hold_priority','__signaling_type','__path_metric_bounds','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__disjointness',) + + _yang_name = 'path-constraints' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints'] + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_link_protection(self): + """ + Getter method for link_protection, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/link_protection (identityref) + + YANG Description: Link protection type required for the links included +in the computed path. + """ + return self.__link_protection + + def _set_link_protection(self, v, load=False): + """ + Setter method for link_protection, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/link_protection (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_protection is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_protection() directly. + + YANG Description: Link protection type required for the links included +in the computed path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_protection must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__link_protection = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_protection(self): + self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_setup_priority(self): + """ + Getter method for setup_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/setup_priority (uint8) + + YANG Description: TE LSP requested setup priority. + """ + return self.__setup_priority + + def _set_setup_priority(self, v, load=False): + """ + Setter method for setup_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/setup_priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_setup_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_setup_priority() directly. + + YANG Description: TE LSP requested setup priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """setup_priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__setup_priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_setup_priority(self): + self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_hold_priority(self): + """ + Getter method for hold_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/hold_priority (uint8) + + YANG Description: TE LSP requested hold priority. + """ + return self.__hold_priority + + def _set_hold_priority(self, v, load=False): + """ + Setter method for hold_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/hold_priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_hold_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hold_priority() directly. + + YANG Description: TE LSP requested hold priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hold_priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__hold_priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_hold_priority(self): + self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_signaling_type(self): + """ + Getter method for signaling_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/signaling_type (identityref) + + YANG Description: TE tunnel path signaling type. + """ + return self.__signaling_type + + def _set_signaling_type(self, v, load=False): + """ + Setter method for signaling_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/signaling_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_signaling_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_signaling_type() directly. + + YANG Description: TE tunnel path signaling type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """signaling_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__signaling_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_signaling_type(self): + self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_path_metric_bounds(self): + """ + Getter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds (container) + + YANG Description: TE path metric bounds container. + """ + return self.__path_metric_bounds + + def _set_path_metric_bounds(self, v, load=False): + """ + Setter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric_bounds is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric_bounds() directly. + + YANG Description: TE path metric bounds container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric_bounds must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_metric_bounds = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric_bounds(self): + self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_affinities_values(self): + """ + Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values (container) + + YANG Description: Path affinities represented as values. + """ + return self.__path_affinities_values + + def _set_path_affinities_values(self, v, load=False): + """ + Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_values() directly. + + YANG Description: Path affinities represented as values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_values must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_affinities_values = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_values(self): + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_affinity_names(self): + """ + Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names (container) + + YANG Description: Path affinities represented as names. + """ + return self.__path_affinity_names + + def _set_path_affinity_names(self, v, load=False): + """ + Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_names() directly. + + YANG Description: Path affinities represented as names. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_affinity_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_names(self): + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_srlgs_lists(self): + """ + Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists (container) + + YANG Description: Path SRLG properties container. + """ + return self.__path_srlgs_lists + + def _set_path_srlgs_lists(self, v, load=False): + """ + Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_lists is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_lists() directly. + + YANG Description: Path SRLG properties container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_lists must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_srlgs_lists = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_lists(self): + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_srlgs_names(self): + """ + Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names (container) + + YANG Description: Container for the list of named SRLGs. + """ + return self.__path_srlgs_names + + def _set_path_srlgs_names(self, v, load=False): + """ + Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_names() directly. + + YANG Description: Container for the list of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_srlgs_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_names(self): + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_disjointness(self): + """ + Getter method for disjointness, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/disjointness (te-path-disjointness) + + YANG Description: The type of resource disjointness. +When configured for a primary path, the disjointness level +applies to all secondary LSPs. When configured for a +secondary path, the disjointness level overrides the level +configured for the primary path. + """ + return self.__disjointness + + def _set_disjointness(self, v, load=False): + """ + Setter method for disjointness, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/disjointness (te-path-disjointness) + If this variable is read-only (config: false) in the + source YANG file, then _set_disjointness is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_disjointness() directly. + + YANG Description: The type of resource disjointness. +When configured for a primary path, the disjointness level +applies to all secondary LSPs. When configured for a +secondary path, the disjointness level overrides the level +configured for the primary path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """disjointness must be of a type compatible with te-path-disjointness""", + 'defined-type': "ietf-te-topology:te-path-disjointness", + 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True)""", + }) + + self.__disjointness = t + if hasattr(self, '_set'): + self._set() + + def _unset_disjointness(self): + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) + + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + link_protection = __builtin__.property(_get_link_protection, _set_link_protection) + setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority) + hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority) + signaling_type = __builtin__.property(_get_signaling_type, _set_signaling_type) + path_metric_bounds = __builtin__.property(_get_path_metric_bounds, _set_path_metric_bounds) + path_affinities_values = __builtin__.property(_get_path_affinities_values, _set_path_affinities_values) + path_affinity_names = __builtin__.property(_get_path_affinity_names, _set_path_affinity_names) + path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists, _set_path_srlgs_lists) + path_srlgs_names = __builtin__.property(_get_path_srlgs_names, _set_path_srlgs_names) + disjointness = __builtin__.property(_get_disjointness, _set_disjointness) + + + _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ('link_protection', link_protection), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('signaling_type', signaling_type), ('path_metric_bounds', path_metric_bounds), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('disjointness', disjointness), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fbd5be1891af26f4906a30d7b8a19d836e7b69b7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinities_value +class path_affinities_values(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-affinities-values. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as values. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) + + _yang_name = 'path-affinities-values' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinities-values'] + + def _get_path_affinities_value(self): + """ + Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinities_value + + def _set_path_affinities_value(self, v, load=False): + """ + Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_value() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_value must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_affinities_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_value(self): + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_affinities_value = __builtin__.property(_get_path_affinities_value, _set_path_affinities_value) + + + _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8c29e7d9cc37960b0ce075b3133f6ecd8370a441 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_affinities_value(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-affinities-values/path-affinities-value. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) + + _yang_name = 'path-affinities-value' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinities-values', 'path-affinities-value'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) + + YANG Description: The affinity value. The default is empty. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: The affinity value. The default is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with admin-groups""", + 'defined-type': "ietf-te-topology:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + value = __builtin__.property(_get_value, _set_value) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8540d0a45dd2c5634ac4da048e47270f0b26782 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinity_name +class path_affinity_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-affinity-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as names. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) + + _yang_name = 'path-affinity-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinity-names'] + + def _get_path_affinity_name(self): + """ + Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinity_name + + def _set_path_affinity_name(self, v, load=False): + """ + Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_name() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_name(self): + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_affinity_name = __builtin__.property(_get_path_affinity_name, _set_path_affinity_name) + + + _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53d581fd6defd3f4698abb8ca0c2ee751c725608 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import affinity_name +class path_affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-affinity-names/path-affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) + + _yang_name = 'path-affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinity-names', 'path-affinity-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_affinity_name(self): + """ + Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) + + YANG Description: List of named affinities. + """ + return self.__affinity_name + + def _set_affinity_name(self, v, load=False): + """ + Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_affinity_name() directly. + + YANG Description: List of named affinities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_affinity_name(self): + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + affinity_name = __builtin__.property(_get_affinity_name, _set_affinity_name) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9049a13907bb3f9c4ba5aab6782e77a5a6a26bc1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-affinity-names/path-affinity-name/affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinities. + """ + __slots__ = ('_path_helper', '_extmethods', '__name',) + + _yang_name = 'affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) + + YANG Description: Identifies a named affinity entry. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Identifies a named affinity entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + name = __builtin__.property(_get_name, _set_name) + + + _pyangbind_elements = OrderedDict([('name', name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7f6acfbb0d20361ab8b7c406ceb4fef2d4a868e9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_metric_bound +class path_metric_bounds(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-metric-bounds. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric bounds container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound',) + + _yang_name = 'path-metric-bounds' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-metric-bounds'] + + def _get_path_metric_bound(self): + """ + Getter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound (list) + + YANG Description: List of TE path metric bounds. + """ + return self.__path_metric_bound + + def _set_path_metric_bound(self, v, load=False): + """ + Setter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric_bound is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric_bound() directly. + + YANG Description: List of TE path metric bounds. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric_bound must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_metric_bound = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric_bound(self): + self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_metric_bound = __builtin__.property(_get_path_metric_bound, _set_path_metric_bound) + + + _pyangbind_elements = OrderedDict([('path_metric_bound', path_metric_bound), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..177598e6cc98b222f75deb7968076fc9fdc39c66 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,165 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_metric_bound(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-metric-bounds/path-metric-bound. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of TE path metric bounds. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__upper_bound',) + + _yang_name = 'path-metric-bound' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-metric-bounds', 'path-metric-bound'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) + + YANG Description: Identifies an entry in the list of 'metric-type' items +bound for the TE path. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: Identifies an entry in the list of 'metric-type' items +bound for the TE path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_upper_bound(self): + """ + Getter method for upper_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) + + YANG Description: Upper bound on the end-to-end TE path metric. A zero +indicates an unbounded upper limit for the specific +'metric-type'. + """ + return self.__upper_bound + + def _set_upper_bound(self, v, load=False): + """ + Setter method for upper_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_upper_bound is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_upper_bound() directly. + + YANG Description: Upper bound on the end-to-end TE path metric. A zero +indicates an unbounded upper limit for the specific +'metric-type'. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """upper_bound must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__upper_bound = t + if hasattr(self, '_set'): + self._set() + + def _unset_upper_bound(self): + self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + + metric_type = __builtin__.property(_get_metric_type, _set_metric_type) + upper_bound = __builtin__.property(_get_upper_bound, _set_upper_bound) + + + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('upper_bound', upper_bound), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9a345c8aea6c5d92701fd78223bdfa27f3a4d1df --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_list +class path_srlgs_lists(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-lists. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path SRLG properties container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) + + _yang_name = 'path-srlgs-lists' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-lists'] + + def _get_path_srlgs_list(self): + """ + Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list (list) + + YANG Description: List of SRLG values to be included or excluded. + """ + return self.__path_srlgs_list + + def _set_path_srlgs_list(self, v, load=False): + """ + Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_list() directly. + + YANG Description: List of SRLG values to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_list must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_srlgs_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_list(self): + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_srlgs_list = __builtin__.property(_get_path_srlgs_list, _set_path_srlgs_list) + + + _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42bd453b07b8d361fdf87021cebdd01f32a44a50 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_list(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-lists/path-srlgs-list. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of SRLG values to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) + + _yang_name = 'path-srlgs-list' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-lists', 'path-srlgs-list'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_values(self): + """ + Getter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) + + YANG Description: List of SRLG values. + """ + return self.__values + + def _set_values(self, v, load=False): + """ + Setter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_values() directly. + + YANG Description: List of SRLG values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """values must be of a type compatible with srlg""", + 'defined-type': "ietf-te-topology:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True)""", + }) + + self.__values = t + if hasattr(self, '_set'): + self._set() + + def _unset_values(self): + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + values = __builtin__.property(_get_values, _set_values) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..83edd896faaa58e47f59aa341f7656bc96a59e42 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_name +class path_srlgs_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of named SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) + + _yang_name = 'path-srlgs-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-names'] + + def _get_path_srlgs_name(self): + """ + Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name (list) + + YANG Description: List of named SRLGs to be included or excluded. + """ + return self.__path_srlgs_name + + def _set_path_srlgs_name(self, v, load=False): + """ + Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_name() directly. + + YANG Description: List of named SRLGs to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_srlgs_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_name(self): + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_srlgs_name = __builtin__.property(_get_path_srlgs_name, _set_path_srlgs_name) + + + _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7dba34db6f2d139b3396c6fd9a93ce926bab1a69 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/path-srlgs-names/path-srlgs-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named SRLGs to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) + + _yang_name = 'path-srlgs-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'path-srlgs-names', 'path-srlgs-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_names(self): + """ + Getter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/names (string) + + YANG Description: List of named SRLGs. + """ + return self.__names + + def _set_names(self, v, load=False): + """ + Setter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/names (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_names() directly. + + YANG Description: List of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """names must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__names = t + if hasattr(self, '_set'): + self._set() + + def _unset_names(self): + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + names = __builtin__.property(_get_names, _set_names) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f4e10c8b6b05ce85c5ec52494d78dd67f10eed2e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a2a8fce28fa658133b7b416804f64dbe6aa29642 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + + def _get_odtu_flex_type(self): + """ + Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +set up along the underlay path of this OTN +connectivity matrix entry. + """ + return self.__odtu_flex_type + + def _set_odtu_flex_type(self, v, load=False): + """ + Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_odtu_flex_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odtu_flex_type() directly. + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +set up along the underlay path of this OTN +connectivity matrix entry. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", + 'defined-type': "l1-types:odtu-flex-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", + }) + + self.__odtu_flex_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odtu_flex_type(self): + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + odulist = __builtin__.property(_get_odulist, _set_odulist) + odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) + + __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} + _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9923938e39446c8970698126ec0670cd424a8b35 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-constraints/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-constraints', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + number = __builtin__.property(_get_number, _set_number) + ts_number = __builtin__.property(_get_ts_number, _set_ts_number) + + __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..32bb9a55344f0995388f9d85a42c05850802c125 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py @@ -0,0 +1,318 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_metric +from . import path_affinities_values +from . import path_affinity_names +from . import path_srlgs_lists +from . import path_srlgs_names +from . import path_route_objects +class path_properties(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The TE path properties. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_metric','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__path_route_objects',) + + _yang_name = 'path-properties' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties'] + + def _get_path_metric(self): + """ + Getter method for path_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric (list) + + YANG Description: TE path metric type. + """ + return self.__path_metric + + def _set_path_metric(self, v, load=False): + """ + Setter method for path_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric() directly. + + YANG Description: TE path metric type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric(self): + self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_path_affinities_values(self): + """ + Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values (container) + + YANG Description: Path affinities represented as values. + """ + return self.__path_affinities_values + + def _set_path_affinities_values(self, v, load=False): + """ + Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_values() directly. + + YANG Description: Path affinities represented as values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_values must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinities_values = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_values(self): + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_affinity_names(self): + """ + Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names (container) + + YANG Description: Path affinities represented as names. + """ + return self.__path_affinity_names + + def _set_path_affinity_names(self, v, load=False): + """ + Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_names() directly. + + YANG Description: Path affinities represented as names. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinity_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_names(self): + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_lists(self): + """ + Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists (container) + + YANG Description: Path SRLG properties container. + """ + return self.__path_srlgs_lists + + def _set_path_srlgs_lists(self, v, load=False): + """ + Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_lists is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_lists() directly. + + YANG Description: Path SRLG properties container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_lists must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_lists = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_lists(self): + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_names(self): + """ + Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names (container) + + YANG Description: Container for the list of named SRLGs. + """ + return self.__path_srlgs_names + + def _set_path_srlgs_names(self, v, load=False): + """ + Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_names() directly. + + YANG Description: Container for the list of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_names(self): + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_route_objects(self): + """ + Getter method for path_route_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects (container) + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + return self.__path_route_objects + + def _set_path_route_objects(self, v, load=False): + """ + Setter method for path_route_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_route_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_route_objects() directly. + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_route_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_route_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_route_objects(self): + self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + path_metric = __builtin__.property(_get_path_metric) + path_affinities_values = __builtin__.property(_get_path_affinities_values) + path_affinity_names = __builtin__.property(_get_path_affinity_names) + path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) + path_srlgs_names = __builtin__.property(_get_path_srlgs_names) + path_route_objects = __builtin__.property(_get_path_route_objects) + + + _pyangbind_elements = OrderedDict([('path_metric', path_metric), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('path_route_objects', path_route_objects), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a7001481d1fe05d745191fdb31eca30831060363 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinities_value +class path_affinities_values(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-affinities-values. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as values. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) + + _yang_name = 'path-affinities-values' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinities-values'] + + def _get_path_affinities_value(self): + """ + Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinities_value + + def _set_path_affinities_value(self, v, load=False): + """ + Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_value() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_value must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinities_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_value(self): + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinities_value = __builtin__.property(_get_path_affinities_value) + + + _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d762b99905ba2f4da909cbd5a9598f288201a26a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_affinities_value(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-affinities-values/path-affinities-value. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) + + _yang_name = 'path-affinities-value' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinities-values', 'path-affinities-value'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/usage (identityref) + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) + + YANG Description: The affinity value. The default is empty. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: The affinity value. The default is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with admin-groups""", + 'defined-type': "ietf-te-topology:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + usage = __builtin__.property(_get_usage) + value = __builtin__.property(_get_value) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..76beb2d043e11712fd3250aba4b173cb346ef2a2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinity_name +class path_affinity_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-affinity-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as names. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) + + _yang_name = 'path-affinity-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinity-names'] + + def _get_path_affinity_name(self): + """ + Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinity_name + + def _set_path_affinity_name(self, v, load=False): + """ + Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_name() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_name(self): + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinity_name = __builtin__.property(_get_path_affinity_name) + + + _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..04f8c534e27f69735f535d5f843ca92a6b49cb57 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import affinity_name +class path_affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-affinity-names/path-affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) + + _yang_name = 'path-affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinity-names', 'path-affinity-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/usage (identityref) + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_affinity_name(self): + """ + Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) + + YANG Description: List of named affinities. + """ + return self.__affinity_name + + def _set_affinity_name(self, v, load=False): + """ + Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_affinity_name() directly. + + YANG Description: List of named affinities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_affinity_name(self): + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + usage = __builtin__.property(_get_usage) + affinity_name = __builtin__.property(_get_affinity_name) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8ffc56297616e8c0ef51adc8c6259cdff46a40c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-affinity-names/path-affinity-name/affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinities. + """ + __slots__ = ('_path_helper', '_extmethods', '__name',) + + _yang_name = 'affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) + + YANG Description: Identifies a named affinity entry. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Identifies a named affinity entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + name = __builtin__.property(_get_name) + + + _pyangbind_elements = OrderedDict([('name', name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6bea27715a4189f606ae688a2d7c9669622fd8eb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_metric(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-metric. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric type. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__accumulative_value',) + + _yang_name = 'path-metric' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-metric'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/metric_type (identityref) + + YANG Description: TE path metric type. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: TE path metric type. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_accumulative_value(self): + """ + Getter method for accumulative_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/accumulative_value (uint64) + + YANG Description: TE path metric accumulative value. + """ + return self.__accumulative_value + + def _set_accumulative_value(self, v, load=False): + """ + Setter method for accumulative_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/accumulative_value (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_accumulative_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_accumulative_value() directly. + + YANG Description: TE path metric accumulative value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """accumulative_value must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__accumulative_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_accumulative_value(self): + self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + metric_type = __builtin__.property(_get_metric_type) + accumulative_value = __builtin__.property(_get_accumulative_value) + + + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('accumulative_value', accumulative_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fb3b4a46db89df48d7ecd89e13f170acb5408422 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_route_object +class path_route_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_route_object',) + + _yang_name = 'path-route-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects'] + + def _get_path_route_object(self): + """ + Getter method for path_route_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object (list) + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + return self.__path_route_object + + def _set_path_route_object(self, v, load=False): + """ + Setter method for path_route_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_route_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_route_object() directly. + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_route_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_route_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_route_object(self): + self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_route_object = __builtin__.property(_get_path_route_object) + + + _pyangbind_elements = OrderedDict([('path_route_object', path_route_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4fe9aa220c102f6cab8ad5d063130942e104a057 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,327 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_route_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-route-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key +values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key +values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + index = __builtin__.property(_get_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..11ddae41732894db4171b3106af40634574da943 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7440b873293ac0528b33accb58edf95a7c6a562b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6fc49cf759876cd11163a8421fb14c132f5d2909 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d758b29226ac9b1c81c34b3c87bb7073301fcb4a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a1a29aebbc711d38d528577295264d3d5c3dba83 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4ca5c4eec4cb58ba2efcd873b465fe51825cc7a2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ec157d352f1bbfa6708487d795d11781a395aa0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-route-objects/path-route-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-route-objects', 'path-route-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e509790c476b91a55c605ae6848e7eb92fa72aaa --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_list +class path_srlgs_lists(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-lists. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path SRLG properties container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) + + _yang_name = 'path-srlgs-lists' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-lists'] + + def _get_path_srlgs_list(self): + """ + Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list (list) + + YANG Description: List of SRLG values to be included or excluded. + """ + return self.__path_srlgs_list + + def _set_path_srlgs_list(self, v, load=False): + """ + Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_list() directly. + + YANG Description: List of SRLG values to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_list must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_list(self): + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_list = __builtin__.property(_get_path_srlgs_list) + + + _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..37a85c235cb877b698286f524cb2bd949e72954c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_list(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-lists/path-srlgs-list. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of SRLG values to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) + + _yang_name = 'path-srlgs-list' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-lists', 'path-srlgs-list'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_values(self): + """ + Getter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) + + YANG Description: List of SRLG values. + """ + return self.__values + + def _set_values(self, v, load=False): + """ + Setter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_values() directly. + + YANG Description: List of SRLG values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """values must be of a type compatible with srlg""", + 'defined-type': "ietf-te-topology:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", + }) + + self.__values = t + if hasattr(self, '_set'): + self._set() + + def _unset_values(self): + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + usage = __builtin__.property(_get_usage) + values = __builtin__.property(_get_values) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4e96bae2f4b7f9606d0cfe24d4b04fc9e59dd9f5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_name +class path_srlgs_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of named SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) + + _yang_name = 'path-srlgs-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-names'] + + def _get_path_srlgs_name(self): + """ + Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name (list) + + YANG Description: List of named SRLGs to be included or excluded. + """ + return self.__path_srlgs_name + + def _set_path_srlgs_name(self, v, load=False): + """ + Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_name() directly. + + YANG Description: List of named SRLGs to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_name(self): + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_name = __builtin__.property(_get_path_srlgs_name) + + + _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ec8734fe06d3243c84ca236814d5f8b92e86c609 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/path-properties/path-srlgs-names/path-srlgs-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named SRLGs to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) + + _yang_name = 'path-srlgs-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'path-properties', 'path-srlgs-names', 'path-srlgs-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_names(self): + """ + Getter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/names (string) + + YANG Description: List of named SRLGs. + """ + return self.__names + + def _set_names(self, v, load=False): + """ + Setter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/names (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_names() directly. + + YANG Description: List of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """names must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__names = t + if hasattr(self, '_set'): + self._set() + + def _unset_names(self): + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + usage = __builtin__.property(_get_usage) + names = __builtin__.property(_get_names) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9fb67245815d19b30ad2a40dcfbd566f0bf3cdba --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restrictions +class to(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Reference to a destination LTP. + """ + __slots__ = ('_path_helper', '_extmethods', '__tp_ref','__label_restrictions',) + + _yang_name = 'to' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to'] + + def _get_tp_ref(self): + """ + Getter method for tp_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/tp_ref (leafref) + + YANG Description: Relative reference to a termination point. + """ + return self.__tp_ref + + def _set_tp_ref(self, v, load=False): + """ + Setter method for tp_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/tp_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tp_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tp_ref() directly. + + YANG Description: Relative reference to a termination point. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tp_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__tp_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_tp_ref(self): + self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_label_restrictions(self): + """ + Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions (container) + + YANG Description: The label restrictions container. + """ + return self.__label_restrictions + + def _set_label_restrictions(self, v, load=False): + """ + Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restrictions is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restrictions() directly. + + YANG Description: The label restrictions container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restrictions must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_restrictions = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restrictions(self): + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + tp_ref = __builtin__.property(_get_tp_ref, _set_tp_ref) + label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) + + + _pyangbind_elements = OrderedDict([('tp_ref', tp_ref), ('label_restrictions', label_restrictions), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8dfdb0a632d537ad52e29f5519c6f72b4dce979d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restriction +class label_restrictions(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The label restrictions container. + """ + __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) + + _yang_name = 'label-restrictions' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions'] + + def _get_label_restriction(self): + """ + Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction (list) + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + return self.__label_restriction + + def _set_label_restriction(self, v, load=False): + """ + Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restriction() directly. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restriction must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__label_restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restriction(self): + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) + + + _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3b116c4b7203064fe2844ac60d195517e8aed8a0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,450 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_start +from . import label_end +from . import label_step +from . import otn_label_range +from . import ethernet_label_range +class label_restriction(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) + + _yang_name = 'label-restriction' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction'] + + def _get_restriction(self): + """ + Getter method for restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/restriction (enumeration) + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + return self.__restriction + + def _set_restriction(self, v, load=False): + """ + Setter method for restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/restriction (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restriction() directly. + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restriction must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", + }) + + self.__restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_restriction(self): + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/index (uint32) + + YANG Description: The index of the label restriction list entry. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: The index of the label restriction list entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_label_start(self): + """ + Getter method for label_start, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start (container) + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + return self.__label_start + + def _set_label_start(self, v, load=False): + """ + Setter method for label_start, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_start is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_start() directly. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_start must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_start = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_start(self): + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_end(self): + """ + Getter method for label_end, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end (container) + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + return self.__label_end + + def _set_label_end(self, v, load=False): + """ + Setter method for label_end, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_end is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_end() directly. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_end must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_end = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_end(self): + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_step(self): + """ + Getter method for label_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step (container) + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + return self.__label_step + + def _set_label_step(self, v, load=False): + """ + Setter method for label_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_step() directly. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_step must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_step(self): + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_range_bitmap(self): + """ + Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + return self.__range_bitmap + + def _set_range_bitmap(self, v, load=False): + """ + Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_bitmap is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_bitmap() directly. + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", + 'defined-type': "yang:hex-string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", + }) + + self.__range_bitmap = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_bitmap(self): + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + + + def _get_otn_label_range(self): + """ + Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range (container) + + YANG Description: Label range information for OTN. + """ + return self.__otn_label_range + + def _set_otn_label_range(self, v, load=False): + """ + Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_label_range() directly. + + YANG Description: Label range information for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_label_range(self): + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_ethernet_label_range(self): + """ + Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range (container) + + YANG Description: Ethernet-specific label range related information. + """ + return self.__ethernet_label_range + + def _set_ethernet_label_range(self, v, load=False): + """ + Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ethernet_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ethernet_label_range() directly. + + YANG Description: Ethernet-specific label range related information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ethernet_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__ethernet_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_ethernet_label_range(self): + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + restriction = __builtin__.property(_get_restriction, _set_restriction) + index = __builtin__.property(_get_index, _set_index) + label_start = __builtin__.property(_get_label_start, _set_label_start) + label_end = __builtin__.property(_get_label_end, _set_label_end) + label_step = __builtin__.property(_get_label_step, _set_label_step) + range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) + otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) + ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) + + + _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f4959da8dd27c33cc032ea7aeca7187983defb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ethernet_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/ethernet-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Ethernet-specific label range related information. + """ + __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) + + _yang_name = 'ethernet-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] + + def _get_tag_type(self): + """ + Getter method for tag_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + + YANG Description: VLAN tag type. + """ + return self.__tag_type + + def _set_tag_type(self, v, load=False): + """ + Setter method for tag_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_tag_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tag_type() directly. + + YANG Description: VLAN tag type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", + }) + + self.__tag_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tag_type(self): + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + + YANG Description: priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + tag_type = __builtin__.property(_get_tag_type, _set_tag_type) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c5f363333d09d75e388c31ad02dc35dd6738a649 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_end(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-end. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-end' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-end'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..09a0f03ed1a0b6b77fb1d353db37895d11f535cc --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-end/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74637ab69ead2142e633f02a0086d84b0c7399c5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..55e8ab30e76fcc82c40609ad33db4cdf7a3ae37a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_start(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-start. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-start' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-start'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c2477e8170b56ab2a83195bd4ad0c64a4bd8e5f0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-start/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbb3ec6163a997eae9f05b52925b3499d13241f4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..570cd69b5233c732d475c31c8e317363f842c6a9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class label_step(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-step. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) + + _yang_name = 'label-step' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-step'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/generic (int32) + + YANG Description: Label range step. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/generic (int32) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Label range step. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with int32""", + 'defined-type': "int32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn (container) + + YANG Description: Label step for OTN + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label step for OTN + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_step(self): + """ + Getter method for eth_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/eth_step (uint16) + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + return self.__eth_step + + def _set_eth_step(self, v, load=False): + """ + Setter method for eth_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/eth_step (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_step() directly. + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_step must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", + }) + + self.__eth_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_step(self): + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_step = __builtin__.property(_get_eth_step, _set_eth_step) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..541e342528410f5d656bd32efa173b3db4013a54 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/label-step/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label step for OTN + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2cae8d9a9e2770de2123e7db9d9bbe96a2864df4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/__init__.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/to/label-restrictions/label-restriction/otn-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label range information for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) + + _yang_name = 'otn-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'to', 'label-restrictions', 'label-restriction', 'otn-label-range'] + + def _get_range_type(self): + """ + Getter method for range_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + return self.__range_type + + def _set_range_type(self, v, load=False): + """ + Setter method for range_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_type() directly. + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_type must be of a type compatible with otn-label-range-type""", + 'defined-type': "ietf-otn-topology:otn-label-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", + }) + + self.__range_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_type(self): + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_odu_type_list(self): + """ + Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + return self.__odu_type_list + + def _set_odu_type_list(self, v, load=False): + """ + Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type_list() directly. + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type_list must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type_list(self): + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/priority (uint8) + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/otn_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + range_type = __builtin__.property(_get_range_type, _set_range_type) + tsg = __builtin__.property(_get_tsg, _set_tsg) + odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29a2ea0fd8a120ff5357eadcd7a19e02b090f71c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py @@ -0,0 +1,326 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import primary_path +from . import backup_path +from . import tunnel_termination_points +from . import tunnels +class underlay(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Attributes of the TE link underlay. + """ + __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) + + _yang_name = 'underlay' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay'] + + def _get_enabled(self): + """ + Getter method for enabled, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/enabled (boolean) + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + return self.__enabled + + def _set_enabled(self, v, load=False): + """ + Setter method for enabled, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/enabled (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_enabled is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enabled() directly. + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enabled must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__enabled = t + if hasattr(self, '_set'): + self._set() + + def _unset_enabled(self): + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_primary_path(self): + """ + Getter method for primary_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path (container) + + YANG Description: The service path on the underlay topology that +supports this link. + """ + return self.__primary_path + + def _set_primary_path(self, v, load=False): + """ + Setter method for primary_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_primary_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_primary_path() directly. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """primary_path must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__primary_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_primary_path(self): + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_backup_path(self): + """ + Getter method for backup_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path (list) + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + return self.__backup_path + + def _set_backup_path(self, v, load=False): + """ + Setter method for backup_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_backup_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_backup_path() directly. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """backup_path must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__backup_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_backup_path(self): + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_protection_type(self): + """ + Getter method for protection_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/protection_type (identityref) + + YANG Description: Underlay protection type desired for this link. + """ + return self.__protection_type + + def _set_protection_type(self, v, load=False): + """ + Setter method for protection_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/protection_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_protection_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_protection_type() directly. + + YANG Description: Underlay protection type desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """protection_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__protection_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_protection_type(self): + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_tunnel_termination_points(self): + """ + Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points (container) + + YANG Description: Underlay TTPs desired for this link. + """ + return self.__tunnel_termination_points + + def _set_tunnel_termination_points(self, v, load=False): + """ + Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_termination_points is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_termination_points() directly. + + YANG Description: Underlay TTPs desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_termination_points must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tunnel_termination_points = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_termination_points(self): + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_tunnels(self): + """ + Getter method for tunnels, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels (container) + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + return self.__tunnels + + def _set_tunnels(self, v, load=False): + """ + Setter method for tunnels, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnels is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnels() directly. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnels must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tunnels = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnels(self): + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + enabled = __builtin__.property(_get_enabled, _set_enabled) + primary_path = __builtin__.property(_get_primary_path, _set_primary_path) + backup_path = __builtin__.property(_get_backup_path, _set_backup_path) + protection_type = __builtin__.property(_get_protection_type, _set_protection_type) + tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points, _set_tunnel_termination_points) + tunnels = __builtin__.property(_get_tunnels, _set_tunnels) + + + _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..408b97bc6385509bb3f83e109e4e0844f41279c8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py @@ -0,0 +1,207 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class backup_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) + + _yang_name = 'backup-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/index (uint32) + + YANG Description: A sequence number to identify a backup path. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: A sequence number to identify a backup path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element (list) + + YANG Description: A list of path elements describing the backup service +path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the backup service +path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + path_element = __builtin__.property(_get_path_element, _set_path_element) + + + _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53ca0bce54916db7b6469583d2b92a3536e62920 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,321 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the backup service +path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b0ecb1150e0d73ba14866319d4cd5f2cd9e58074 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd8c31c17338968331ab95064ad2e7cbad80466 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3b13105528e3d923437202a96c9dbff4bab19baa --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92e4b3b2009cee10fae7ccac4d4d8ddfed3559a1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee5484d4dc425abb7f30cb8d93b754e6b2c583f2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2167210db07f6173864a9243c607caf84af8da5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2d48ba9d72ca9ea519dcaf0af21dd99f7f5a8780 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2bbc86b5c77f178913fdd770dc8971277d5c31c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class primary_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) + + _yang_name = 'primary-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element (list) + + YANG Description: A list of path elements describing the service path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the service path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + path_element = __builtin__.property(_get_path_element, _set_path_element) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fa22d7bbd2819b292006ab4f290008b98fba9a86 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,320 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the service path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5bf46184c7e5d536c281b66407774448ecff1a55 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6377790bb6bae1df14603a8b0ac6aeac4067e877 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c200f5daec410e22c5714ac6244580fb2af5d8ca --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7f897420e3ffe30a72d157d79095f9d5e5287436 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e1c306281f6a074eb7204e1ab31f818f01529c60 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9c043b2727a232d8eb3ccbefecc4ff22b49135b6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4f8f2de6e21f868f30d26149c233125f23b9415f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6fbb783c1fd354a14fab78d0f5e41ca5efd857a1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel_termination_points(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/tunnel-termination-points. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TTPs desired for this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) + + _yang_name = 'tunnel-termination-points' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'tunnel-termination-points'] + + def _get_source(self): + """ + Getter method for source, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/source (binary) + + YANG Description: Source TTP identifier. + """ + return self.__source + + def _set_source(self, v, load=False): + """ + Setter method for source, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/source (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_source() directly. + + YANG Description: Source TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """source must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__source = t + if hasattr(self, '_set'): + self._set() + + def _unset_source(self): + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + + def _get_destination(self): + """ + Getter method for destination, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/destination (binary) + + YANG Description: Destination TTP identifier. + """ + return self.__destination + + def _set_destination(self, v, load=False): + """ + Setter method for destination, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/destination (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_destination is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_destination() directly. + + YANG Description: Destination TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """destination must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__destination = t + if hasattr(self, '_set'): + self._set() + + def _unset_destination(self): + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + source = __builtin__.property(_get_source, _set_source) + destination = __builtin__.property(_get_destination, _set_destination) + + + _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f5455155f401d092644389695e8ddd28e47cbef6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py @@ -0,0 +1,167 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tunnel +class tunnels(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/tunnels. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) + + _yang_name = 'tunnels' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'tunnels'] + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_tunnel(self): + """ + Getter method for tunnel, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel (list) + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + return self.__tunnel + + def _set_tunnel(self, v, load=False): + """ + Setter method for tunnel, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel() directly. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__tunnel = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel(self): + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + sharing = __builtin__.property(_get_sharing, _set_sharing) + tunnel = __builtin__.property(_get_tunnel, _set_tunnel) + + + _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..58c254b1efbb56273d6c8f522441dd540741f72a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,170 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/connectivity-matrix/underlay/tunnels/tunnel. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) + + _yang_name = 'tunnel' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'connectivity-matrix', 'underlay', 'tunnels', 'tunnel'] + + def _get_tunnel_name(self): + """ + Getter method for tunnel_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/tunnel_name (string) + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + return self.__tunnel_name + + def _set_tunnel_name(self, v, load=False): + """ + Setter method for tunnel_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/tunnel_name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_name() directly. + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__tunnel_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_name(self): + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + tunnel_name = __builtin__.property(_get_tunnel_name, _set_tunnel_name) + sharing = __builtin__.property(_get_sharing, _set_sharing) + + + _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c5a9838d5e9285068a7290d0398b8b73f3368bf7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restriction +class label_restrictions(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The label restrictions container. + """ + __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) + + _yang_name = 'label-restrictions' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions'] + + def _get_label_restriction(self): + """ + Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction (list) + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + return self.__label_restriction + + def _set_label_restriction(self, v, load=False): + """ + Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restriction() directly. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restriction must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__label_restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restriction(self): + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) + + + _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5b189635af1cbfce81d2c8c81d0f6f3cd60e4e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,450 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_start +from . import label_end +from . import label_step +from . import otn_label_range +from . import ethernet_label_range +class label_restriction(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) + + _yang_name = 'label-restriction' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction'] + + def _get_restriction(self): + """ + Getter method for restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/restriction (enumeration) + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + return self.__restriction + + def _set_restriction(self, v, load=False): + """ + Setter method for restriction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/restriction (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restriction() directly. + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restriction must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", + }) + + self.__restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_restriction(self): + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/index (uint32) + + YANG Description: The index of the label restriction list entry. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: The index of the label restriction list entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_label_start(self): + """ + Getter method for label_start, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start (container) + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + return self.__label_start + + def _set_label_start(self, v, load=False): + """ + Setter method for label_start, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_start is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_start() directly. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_start must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_start = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_start(self): + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_end(self): + """ + Getter method for label_end, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end (container) + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + return self.__label_end + + def _set_label_end(self, v, load=False): + """ + Setter method for label_end, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_end is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_end() directly. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_end must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_end = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_end(self): + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_step(self): + """ + Getter method for label_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step (container) + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + return self.__label_step + + def _set_label_step(self, v, load=False): + """ + Setter method for label_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_step() directly. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_step must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_step(self): + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_range_bitmap(self): + """ + Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + return self.__range_bitmap + + def _set_range_bitmap(self, v, load=False): + """ + Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_bitmap is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_bitmap() directly. + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", + 'defined-type': "yang:hex-string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", + }) + + self.__range_bitmap = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_bitmap(self): + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + + + def _get_otn_label_range(self): + """ + Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range (container) + + YANG Description: Label range information for OTN. + """ + return self.__otn_label_range + + def _set_otn_label_range(self, v, load=False): + """ + Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_label_range() directly. + + YANG Description: Label range information for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_label_range(self): + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_ethernet_label_range(self): + """ + Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range (container) + + YANG Description: Ethernet-specific label range related information. + """ + return self.__ethernet_label_range + + def _set_ethernet_label_range(self, v, load=False): + """ + Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ethernet_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ethernet_label_range() directly. + + YANG Description: Ethernet-specific label range related information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ethernet_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__ethernet_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_ethernet_label_range(self): + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + restriction = __builtin__.property(_get_restriction, _set_restriction) + index = __builtin__.property(_get_index, _set_index) + label_start = __builtin__.property(_get_label_start, _set_label_start) + label_end = __builtin__.property(_get_label_end, _set_label_end) + label_step = __builtin__.property(_get_label_step, _set_label_step) + range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) + otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) + ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) + + + _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1204389480fd9b8ed0595d7613aa8b414dbcb477 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ethernet_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/ethernet-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Ethernet-specific label range related information. + """ + __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) + + _yang_name = 'ethernet-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] + + def _get_tag_type(self): + """ + Getter method for tag_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + + YANG Description: VLAN tag type. + """ + return self.__tag_type + + def _set_tag_type(self, v, load=False): + """ + Setter method for tag_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_tag_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tag_type() directly. + + YANG Description: VLAN tag type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", + }) + + self.__tag_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tag_type(self): + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + + YANG Description: priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + tag_type = __builtin__.property(_get_tag_type, _set_tag_type) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9986d6a93f699df312ed09304fe1339944875650 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_end(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-end. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-end' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-end'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29e0c9a994b38322298dd936fd94a24595fdf972 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-end/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1970e3999e8b9955bd6cf74faa612d1173617289 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5d88a176314ea898840f78842a2a4b508c80c989 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_start(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-start. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-start' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-start'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3a96742a0b76dff915d9b25a307f30e2893a0756 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-start/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8dede38f39d25e5d7fb826718555365c2d8dc1ed --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6fefc31471c8537d744756122a1b6b4a58a58f7a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class label_step(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-step. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) + + _yang_name = 'label-step' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-step'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/generic (int32) + + YANG Description: Label range step. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/generic (int32) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Label range step. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with int32""", + 'defined-type': "int32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn (container) + + YANG Description: Label step for OTN + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label step for OTN + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_step(self): + """ + Getter method for eth_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/eth_step (uint16) + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + return self.__eth_step + + def _set_eth_step(self, v, load=False): + """ + Setter method for eth_step, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/eth_step (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_step() directly. + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_step must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", + }) + + self.__eth_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_step(self): + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_step = __builtin__.property(_get_eth_step, _set_eth_step) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a14b27f40324497c22ee722f9a4c17d2ecc72636 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/label-step/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label step for OTN + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..734a4997ea378db0299b1a752f0ae69a5a5b7629 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/__init__.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/label-restrictions/label-restriction/otn-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label range information for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) + + _yang_name = 'otn-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'label-restrictions', 'label-restriction', 'otn-label-range'] + + def _get_range_type(self): + """ + Getter method for range_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + return self.__range_type + + def _set_range_type(self, v, load=False): + """ + Setter method for range_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_type() directly. + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_type must be of a type compatible with otn-label-range-type""", + 'defined-type': "ietf-otn-topology:otn-label-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", + }) + + self.__range_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_type(self): + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_odu_type_list(self): + """ + Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + return self.__odu_type_list + + def _set_odu_type_list(self, v, load=False): + """ + Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type_list() directly. + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type_list must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type_list(self): + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/priority (uint8) + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/otn_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + range_type = __builtin__.property(_get_range_type, _set_range_type) + tsg = __builtin__.property(_get_tsg, _set_tsg) + odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a38eef90a72f1cdd092ccb8fe5901fee29defdbb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py @@ -0,0 +1,199 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import optimization_metric +from . import tiebreakers +from . import objective_function +class optimizations(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + __slots__ = ('_path_helper', '_extmethods', '__optimization_metric','__tiebreakers','__objective_function',) + + _yang_name = 'optimizations' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations'] + + def _get_optimization_metric(self): + """ + Getter method for optimization_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric (list) + + YANG Description: TE path metric type. + """ + return self.__optimization_metric + + def _set_optimization_metric(self, v, load=False): + """ + Setter method for optimization_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimization_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimization_metric() directly. + + YANG Description: TE path metric type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimization_metric must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__optimization_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimization_metric(self): + self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_tiebreakers(self): + """ + Getter method for tiebreakers, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers (container) + + YANG Description: Container for the list of tiebreakers. + """ + return self.__tiebreakers + + def _set_tiebreakers(self, v, load=False): + """ + Setter method for tiebreakers, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreakers is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreakers() directly. + + YANG Description: Container for the list of tiebreakers. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreakers must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tiebreakers = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreakers(self): + self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_objective_function(self): + """ + Getter method for objective_function, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function (container) + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + return self.__objective_function + + def _set_objective_function(self, v, load=False): + """ + Setter method for objective_function, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_objective_function is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_objective_function() directly. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """objective_function must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__objective_function = t + if hasattr(self, '_set'): + self._set() + + def _unset_objective_function(self): + self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + optimization_metric = __builtin__.property(_get_optimization_metric, _set_optimization_metric) + tiebreakers = __builtin__.property(_get_tiebreakers, _set_tiebreakers) + objective_function = __builtin__.property(_get_objective_function, _set_objective_function) + + __choices__ = {'algorithm': {'metric': ['optimization_metric', 'tiebreakers'], 'objective-function': ['objective_function']}} + _pyangbind_elements = OrderedDict([('optimization_metric', optimization_metric), ('tiebreakers', tiebreakers), ('objective_function', objective_function), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3938cadf90bfcb85ebc6fd1c1651aed0364cd241 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class objective_function(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/objective-function. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + __slots__ = ('_path_helper', '_extmethods', '__objective_function_type',) + + _yang_name = 'objective-function' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'objective-function'] + + def _get_objective_function_type(self): + """ + Getter method for objective_function_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/objective_function_type (identityref) + + YANG Description: Objective function entry. + """ + return self.__objective_function_type + + def _set_objective_function_type(self, v, load=False): + """ + Setter method for objective_function_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/objective_function/objective_function_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_objective_function_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_objective_function_type() directly. + + YANG Description: Objective function entry. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """objective_function_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__objective_function_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_objective_function_type(self): + self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + objective_function_type = __builtin__.property(_get_objective_function_type, _set_objective_function_type) + + __choices__ = {'algorithm': {'objective-function': ['objective_function_type']}} + _pyangbind_elements = OrderedDict([('objective_function_type', objective_function_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8594a8e95b12f520dd13bb4dfc882f89e926768e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/__init__.py @@ -0,0 +1,241 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import explicit_route_exclude_objects +from . import explicit_route_include_objects +class optimization_metric(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric type. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__weight','__explicit_route_exclude_objects','__explicit_route_include_objects',) + + _yang_name = 'optimization-metric' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/metric_type (identityref) + + YANG Description: Identifies the 'metric-type' that the path computation +process uses for optimization. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: Identifies the 'metric-type' that the path computation +process uses for optimization. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_weight(self): + """ + Getter method for weight, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/weight (uint8) + + YANG Description: TE path metric normalization weight. + """ + return self.__weight + + def _set_weight(self, v, load=False): + """ + Setter method for weight, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/weight (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_weight is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_weight() directly. + + YANG Description: TE path metric normalization weight. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """weight must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__weight = t + if hasattr(self, '_set'): + self._set() + + def _unset_weight(self): + self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_explicit_route_exclude_objects(self): + """ + Getter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects (container) + + YANG Description: Container for the 'exclude route' object list. + """ + return self.__explicit_route_exclude_objects + + def _set_explicit_route_exclude_objects(self, v, load=False): + """ + Setter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_explicit_route_exclude_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_explicit_route_exclude_objects() directly. + + YANG Description: Container for the 'exclude route' object list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """explicit_route_exclude_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__explicit_route_exclude_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_explicit_route_exclude_objects(self): + self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_explicit_route_include_objects(self): + """ + Getter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects (container) + + YANG Description: Container for the 'include route' object list. + """ + return self.__explicit_route_include_objects + + def _set_explicit_route_include_objects(self, v, load=False): + """ + Setter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_explicit_route_include_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_explicit_route_include_objects() directly. + + YANG Description: Container for the 'include route' object list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """explicit_route_include_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__explicit_route_include_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_explicit_route_include_objects(self): + self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + metric_type = __builtin__.property(_get_metric_type, _set_metric_type) + weight = __builtin__.property(_get_weight, _set_weight) + explicit_route_exclude_objects = __builtin__.property(_get_explicit_route_exclude_objects, _set_explicit_route_exclude_objects) + explicit_route_include_objects = __builtin__.property(_get_explicit_route_include_objects, _set_explicit_route_include_objects) + + __choices__ = {'algorithm': {'metric': ['metric_type', 'weight', 'explicit_route_exclude_objects', 'explicit_route_include_objects']}} + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('weight', weight), ('explicit_route_exclude_objects', explicit_route_exclude_objects), ('explicit_route_include_objects', explicit_route_include_objects), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d96148db39dd2d186fd6dc788b34c110a4e4c524 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import route_object_exclude_object +class explicit_route_exclude_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the 'exclude route' object list. + """ + __slots__ = ('_path_helper', '_extmethods', '__route_object_exclude_object',) + + _yang_name = 'explicit-route-exclude-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects'] + + def _get_route_object_exclude_object(self): + """ + Getter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + return self.__route_object_exclude_object + + def _set_route_object_exclude_object(self, v, load=False): + """ + Setter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_route_object_exclude_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_route_object_exclude_object() directly. + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """route_object_exclude_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__route_object_exclude_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_route_object_exclude_object(self): + self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + route_object_exclude_object = __builtin__.property(_get_route_object_exclude_object, _set_route_object_exclude_object) + + __choices__ = {'algorithm': {'metric': ['route_object_exclude_object']}} + _pyangbind_elements = OrderedDict([('route_object_exclude_object', route_object_exclude_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..be837bdc1d2e747ad69d14824dfb5c1abf483f4e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,365 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +from . import srlg +class route_object_exclude_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop','__srlg',) + + _yang_name = 'route-object-exclude-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_srlg(self): + """ + Getter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) + + YANG Description: SRLG container. + """ + return self.__srlg + + def _set_srlg(self, v, load=False): + """ + Setter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_srlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_srlg() directly. + + YANG Description: SRLG container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """srlg must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__srlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_srlg(self): + self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + srlg = __builtin__.property(_get_srlg, _set_srlg) + + __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop'], 'srlg': ['srlg']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ('srlg', srlg), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1e6791351c451cf6b616a6679f1b75616327f0ae --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..50003dc6a7a4578fb95ad05dc949bd0098717f06 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b80329a9fed7d51e39a75e8efb2c70b4714c1a4b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56737e8651ab92ae342efbf5c1b5bd19ebe87edb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c91d34b8b218b01e3c1dbf79f89352fa397954f8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e9805bcdfcb99c69548e620d2afb8f12c9bfed42 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c5c2961e6aba86a24fa1b7dab66f33b7193d69fc --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class srlg(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/srlg. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: SRLG container. + """ + __slots__ = ('_path_helper', '_extmethods', '__srlg',) + + _yang_name = 'srlg' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'srlg'] + + def _get_srlg(self): + """ + Getter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) + + YANG Description: SRLG value. + """ + return self.__srlg + + def _set_srlg(self, v, load=False): + """ + Setter method for srlg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_srlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_srlg() directly. + + YANG Description: SRLG value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """srlg must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__srlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_srlg(self): + self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + srlg = __builtin__.property(_get_srlg, _set_srlg) + + __choices__ = {'type': {'srlg': ['srlg']}} + _pyangbind_elements = OrderedDict([('srlg', srlg), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4a5b91f1ccf54c41b173d5eab05969a1d9e2be2f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..52d91329d11ca70cbaf141c5ee112fc3cc8437e1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import route_object_include_object +class explicit_route_include_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the 'include route' object list. + """ + __slots__ = ('_path_helper', '_extmethods', '__route_object_include_object',) + + _yang_name = 'explicit-route-include-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects'] + + def _get_route_object_include_object(self): + """ + Getter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + return self.__route_object_include_object + + def _set_route_object_include_object(self, v, load=False): + """ + Setter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_route_object_include_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_route_object_include_object() directly. + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """route_object_include_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__route_object_include_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_route_object_include_object(self): + self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + route_object_include_object = __builtin__.property(_get_route_object_include_object, _set_route_object_include_object) + + __choices__ = {'algorithm': {'metric': ['route_object_include_object']}} + _pyangbind_elements = OrderedDict([('route_object_include_object', route_object_include_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4b596318d6e06716db97ec964b066120ea2dda0d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,325 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class route_object_include_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'route-object-include-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..005900b6dedd25bd5cd711a0945e0c9a9755fa66 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cec600652c93867f4ddc94bda61ee53ede563677 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5212e8f5d6939f4929845a9486e70c673c1ffa2b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..de434357d1096ad61bc755d75a724f06cc38005d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a4d2fdce18c44d1eb2b425de0a8e33f5b60bffd7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d5f6b873cc2a9134a97adf32b75375df3dc8a1d4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b3cc0d8dec78461878afe20fb2f0c17d96747a9b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1132534b5ff8e33c85f6856b303b5eb96f851eab --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tiebreaker +class tiebreakers(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/tiebreakers. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of tiebreakers. + """ + __slots__ = ('_path_helper', '_extmethods', '__tiebreaker',) + + _yang_name = 'tiebreakers' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'tiebreakers'] + + def _get_tiebreaker(self): + """ + Getter method for tiebreaker, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker (list) + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + return self.__tiebreaker + + def _set_tiebreaker(self, v, load=False): + """ + Setter method for tiebreaker, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreaker is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreaker() directly. + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreaker must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__tiebreaker = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreaker(self): + self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + tiebreaker = __builtin__.property(_get_tiebreaker, _set_tiebreaker) + + __choices__ = {'algorithm': {'metric': ['tiebreaker']}} + _pyangbind_elements = OrderedDict([('tiebreaker', tiebreaker), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..41f4df7a218348839dec615158e0d032b92abb30 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tiebreaker(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/optimizations/tiebreakers/tiebreaker. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + __slots__ = ('_path_helper', '_extmethods', '__tiebreaker_type',) + + _yang_name = 'tiebreaker' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'optimizations', 'tiebreakers', 'tiebreaker'] + + def _get_tiebreaker_type(self): + """ + Getter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) + + YANG Description: Identifies an entry in the list of tiebreakers. + """ + return self.__tiebreaker_type + + def _set_tiebreaker_type(self, v, load=False): + """ + Setter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreaker_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreaker_type() directly. + + YANG Description: Identifies an entry in the list of tiebreakers. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreaker_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tiebreaker_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreaker_type(self): + self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + tiebreaker_type = __builtin__.property(_get_tiebreaker_type, _set_tiebreaker_type) + + __choices__ = {'algorithm': {'metric': ['tiebreaker_type']}} + _pyangbind_elements = OrderedDict([('tiebreaker_type', tiebreaker_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f8f93bf028e2a37fe3e5edb85b170f104117a751 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py @@ -0,0 +1,523 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +from . import path_metric_bounds +from . import path_affinities_values +from . import path_affinity_names +from . import path_srlgs_lists +from . import path_srlgs_names +class path_constraints(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE named path constraints container. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth','__link_protection','__setup_priority','__hold_priority','__signaling_type','__path_metric_bounds','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__disjointness',) + + _yang_name = 'path-constraints' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints'] + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_link_protection(self): + """ + Getter method for link_protection, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/link_protection (identityref) + + YANG Description: Link protection type required for the links included +in the computed path. + """ + return self.__link_protection + + def _set_link_protection(self, v, load=False): + """ + Setter method for link_protection, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/link_protection (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_protection is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_protection() directly. + + YANG Description: Link protection type required for the links included +in the computed path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_protection must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__link_protection = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_protection(self): + self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_setup_priority(self): + """ + Getter method for setup_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/setup_priority (uint8) + + YANG Description: TE LSP requested setup priority. + """ + return self.__setup_priority + + def _set_setup_priority(self, v, load=False): + """ + Setter method for setup_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/setup_priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_setup_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_setup_priority() directly. + + YANG Description: TE LSP requested setup priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """setup_priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__setup_priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_setup_priority(self): + self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_hold_priority(self): + """ + Getter method for hold_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/hold_priority (uint8) + + YANG Description: TE LSP requested hold priority. + """ + return self.__hold_priority + + def _set_hold_priority(self, v, load=False): + """ + Setter method for hold_priority, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/hold_priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_hold_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hold_priority() directly. + + YANG Description: TE LSP requested hold priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hold_priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__hold_priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_hold_priority(self): + self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_signaling_type(self): + """ + Getter method for signaling_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/signaling_type (identityref) + + YANG Description: TE tunnel path signaling type. + """ + return self.__signaling_type + + def _set_signaling_type(self, v, load=False): + """ + Setter method for signaling_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/signaling_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_signaling_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_signaling_type() directly. + + YANG Description: TE tunnel path signaling type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """signaling_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__signaling_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_signaling_type(self): + self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_path_metric_bounds(self): + """ + Getter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds (container) + + YANG Description: TE path metric bounds container. + """ + return self.__path_metric_bounds + + def _set_path_metric_bounds(self, v, load=False): + """ + Setter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric_bounds is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric_bounds() directly. + + YANG Description: TE path metric bounds container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric_bounds must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_metric_bounds = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric_bounds(self): + self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_affinities_values(self): + """ + Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values (container) + + YANG Description: Path affinities represented as values. + """ + return self.__path_affinities_values + + def _set_path_affinities_values(self, v, load=False): + """ + Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_values() directly. + + YANG Description: Path affinities represented as values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_values must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_affinities_values = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_values(self): + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_affinity_names(self): + """ + Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names (container) + + YANG Description: Path affinities represented as names. + """ + return self.__path_affinity_names + + def _set_path_affinity_names(self, v, load=False): + """ + Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_names() directly. + + YANG Description: Path affinities represented as names. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_affinity_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_names(self): + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_srlgs_lists(self): + """ + Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists (container) + + YANG Description: Path SRLG properties container. + """ + return self.__path_srlgs_lists + + def _set_path_srlgs_lists(self, v, load=False): + """ + Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_lists is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_lists() directly. + + YANG Description: Path SRLG properties container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_lists must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_srlgs_lists = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_lists(self): + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_srlgs_names(self): + """ + Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names (container) + + YANG Description: Container for the list of named SRLGs. + """ + return self.__path_srlgs_names + + def _set_path_srlgs_names(self, v, load=False): + """ + Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_names() directly. + + YANG Description: Container for the list of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_srlgs_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_names(self): + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_disjointness(self): + """ + Getter method for disjointness, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/disjointness (te-path-disjointness) + + YANG Description: The type of resource disjointness. +When configured for a primary path, the disjointness level +applies to all secondary LSPs. When configured for a +secondary path, the disjointness level overrides the level +configured for the primary path. + """ + return self.__disjointness + + def _set_disjointness(self, v, load=False): + """ + Setter method for disjointness, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/disjointness (te-path-disjointness) + If this variable is read-only (config: false) in the + source YANG file, then _set_disjointness is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_disjointness() directly. + + YANG Description: The type of resource disjointness. +When configured for a primary path, the disjointness level +applies to all secondary LSPs. When configured for a +secondary path, the disjointness level overrides the level +configured for the primary path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """disjointness must be of a type compatible with te-path-disjointness""", + 'defined-type': "ietf-te-topology:te-path-disjointness", + 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True)""", + }) + + self.__disjointness = t + if hasattr(self, '_set'): + self._set() + + def _unset_disjointness(self): + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) + + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + link_protection = __builtin__.property(_get_link_protection, _set_link_protection) + setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority) + hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority) + signaling_type = __builtin__.property(_get_signaling_type, _set_signaling_type) + path_metric_bounds = __builtin__.property(_get_path_metric_bounds, _set_path_metric_bounds) + path_affinities_values = __builtin__.property(_get_path_affinities_values, _set_path_affinities_values) + path_affinity_names = __builtin__.property(_get_path_affinity_names, _set_path_affinity_names) + path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists, _set_path_srlgs_lists) + path_srlgs_names = __builtin__.property(_get_path_srlgs_names, _set_path_srlgs_names) + disjointness = __builtin__.property(_get_disjointness, _set_disjointness) + + + _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ('link_protection', link_protection), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('signaling_type', signaling_type), ('path_metric_bounds', path_metric_bounds), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('disjointness', disjointness), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b04586e5a02caa02cdba4ade49800cd965d3ef7e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinities_value +class path_affinities_values(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-affinities-values. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as values. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) + + _yang_name = 'path-affinities-values' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-affinities-values'] + + def _get_path_affinities_value(self): + """ + Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinities_value + + def _set_path_affinities_value(self, v, load=False): + """ + Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_value() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_value must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_affinities_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_value(self): + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_affinities_value = __builtin__.property(_get_path_affinities_value, _set_path_affinities_value) + + + _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d4347e12ea53c9cefb7bccada9082f10a464b6b0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_affinities_value(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-affinities-values/path-affinities-value. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) + + _yang_name = 'path-affinities-value' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-affinities-values', 'path-affinities-value'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) + + YANG Description: The affinity value. The default is empty. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: The affinity value. The default is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with admin-groups""", + 'defined-type': "ietf-te-topology:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + value = __builtin__.property(_get_value, _set_value) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9511703bf8e9694635ac3c13504148fb1ad95b6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinity_name +class path_affinity_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-affinity-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as names. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) + + _yang_name = 'path-affinity-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-affinity-names'] + + def _get_path_affinity_name(self): + """ + Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinity_name + + def _set_path_affinity_name(self, v, load=False): + """ + Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_name() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_name(self): + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_affinity_name = __builtin__.property(_get_path_affinity_name, _set_path_affinity_name) + + + _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5bea16d3c52a67c620abb434d7df593984786f32 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import affinity_name +class path_affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-affinity-names/path-affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) + + _yang_name = 'path-affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-affinity-names', 'path-affinity-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_affinity_name(self): + """ + Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) + + YANG Description: List of named affinities. + """ + return self.__affinity_name + + def _set_affinity_name(self, v, load=False): + """ + Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_affinity_name() directly. + + YANG Description: List of named affinities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_affinity_name(self): + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + affinity_name = __builtin__.property(_get_affinity_name, _set_affinity_name) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..27b87f524fe2cdfe1696f7320ede4b3f1e92cb83 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-affinity-names/path-affinity-name/affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinities. + """ + __slots__ = ('_path_helper', '_extmethods', '__name',) + + _yang_name = 'affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) + + YANG Description: Identifies a named affinity entry. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Identifies a named affinity entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + name = __builtin__.property(_get_name, _set_name) + + + _pyangbind_elements = OrderedDict([('name', name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..89e9dcde547360b821a9c8c5ee4660edbc4b6c5d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_metric_bound +class path_metric_bounds(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-metric-bounds. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric bounds container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound',) + + _yang_name = 'path-metric-bounds' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-metric-bounds'] + + def _get_path_metric_bound(self): + """ + Getter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound (list) + + YANG Description: List of TE path metric bounds. + """ + return self.__path_metric_bound + + def _set_path_metric_bound(self, v, load=False): + """ + Setter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric_bound is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric_bound() directly. + + YANG Description: List of TE path metric bounds. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric_bound must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_metric_bound = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric_bound(self): + self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_metric_bound = __builtin__.property(_get_path_metric_bound, _set_path_metric_bound) + + + _pyangbind_elements = OrderedDict([('path_metric_bound', path_metric_bound), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e967408a9a763bc5ade1f35fb1b05d53a24dcdd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,165 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_metric_bound(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-metric-bounds/path-metric-bound. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of TE path metric bounds. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__upper_bound',) + + _yang_name = 'path-metric-bound' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-metric-bounds', 'path-metric-bound'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) + + YANG Description: Identifies an entry in the list of 'metric-type' items +bound for the TE path. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: Identifies an entry in the list of 'metric-type' items +bound for the TE path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_upper_bound(self): + """ + Getter method for upper_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) + + YANG Description: Upper bound on the end-to-end TE path metric. A zero +indicates an unbounded upper limit for the specific +'metric-type'. + """ + return self.__upper_bound + + def _set_upper_bound(self, v, load=False): + """ + Setter method for upper_bound, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_upper_bound is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_upper_bound() directly. + + YANG Description: Upper bound on the end-to-end TE path metric. A zero +indicates an unbounded upper limit for the specific +'metric-type'. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """upper_bound must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__upper_bound = t + if hasattr(self, '_set'): + self._set() + + def _unset_upper_bound(self): + self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + + metric_type = __builtin__.property(_get_metric_type, _set_metric_type) + upper_bound = __builtin__.property(_get_upper_bound, _set_upper_bound) + + + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('upper_bound', upper_bound), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4a3633c2824838a95ae720bd56f086266676db6c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_list +class path_srlgs_lists(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-srlgs-lists. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path SRLG properties container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) + + _yang_name = 'path-srlgs-lists' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-srlgs-lists'] + + def _get_path_srlgs_list(self): + """ + Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list (list) + + YANG Description: List of SRLG values to be included or excluded. + """ + return self.__path_srlgs_list + + def _set_path_srlgs_list(self, v, load=False): + """ + Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_list() directly. + + YANG Description: List of SRLG values to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_list must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_srlgs_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_list(self): + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_srlgs_list = __builtin__.property(_get_path_srlgs_list, _set_path_srlgs_list) + + + _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..25eecfaa4a3db913d594884ad74d7f7eecb8a36e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_list(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-srlgs-lists/path-srlgs-list. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of SRLG values to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) + + _yang_name = 'path-srlgs-list' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-srlgs-lists', 'path-srlgs-list'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_values(self): + """ + Getter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) + + YANG Description: List of SRLG values. + """ + return self.__values + + def _set_values(self, v, load=False): + """ + Setter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_values() directly. + + YANG Description: List of SRLG values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """values must be of a type compatible with srlg""", + 'defined-type': "ietf-te-topology:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True)""", + }) + + self.__values = t + if hasattr(self, '_set'): + self._set() + + def _unset_values(self): + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + values = __builtin__.property(_get_values, _set_values) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d26858176b971d3c4f3239a8d8bc6292ee672870 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_name +class path_srlgs_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-srlgs-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of named SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) + + _yang_name = 'path-srlgs-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-srlgs-names'] + + def _get_path_srlgs_name(self): + """ + Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name (list) + + YANG Description: List of named SRLGs to be included or excluded. + """ + return self.__path_srlgs_name + + def _set_path_srlgs_name(self, v, load=False): + """ + Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_name() directly. + + YANG Description: List of named SRLGs to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_srlgs_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_name(self): + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_srlgs_name = __builtin__.property(_get_path_srlgs_name, _set_path_srlgs_name) + + + _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..305a401ae4c6bb90679de7e8a1624af89343e824 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/path-srlgs-names/path-srlgs-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named SRLGs to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) + + _yang_name = 'path-srlgs-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'path-srlgs-names', 'path-srlgs-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_names(self): + """ + Getter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/names (string) + + YANG Description: List of named SRLGs. + """ + return self.__names + + def _set_names(self, v, load=False): + """ + Setter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/names (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_names() directly. + + YANG Description: List of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """names must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__names = t + if hasattr(self, '_set'): + self._set() + + def _unset_names(self): + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + names = __builtin__.property(_get_names, _set_names) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..040c69e2f13a047ab67829c3afbc07d100255f40 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a1d6ad9171b4add999a0140df250cb751b300b15 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + + def _get_odtu_flex_type(self): + """ + Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +set up along the underlay paths of these OTN +connectivity matrices. + """ + return self.__odtu_flex_type + + def _set_odtu_flex_type(self, v, load=False): + """ + Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_odtu_flex_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odtu_flex_type() directly. + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +set up along the underlay paths of these OTN +connectivity matrices. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", + 'defined-type': "l1-types:odtu-flex-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", + }) + + self.__odtu_flex_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odtu_flex_type(self): + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + odulist = __builtin__.property(_get_odulist, _set_odulist) + odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) + + __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} + _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c6577089cc08d9214b7aca30ef8bcf76ce08397f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-constraints/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-constraints', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + number = __builtin__.property(_get_number, _set_number) + ts_number = __builtin__.property(_get_ts_number, _set_ts_number) + + __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5633ecb2d25084b568dd17769a8890bb2ca9039c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py @@ -0,0 +1,318 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_metric +from . import path_affinities_values +from . import path_affinity_names +from . import path_srlgs_lists +from . import path_srlgs_names +from . import path_route_objects +class path_properties(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The TE path properties. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_metric','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__path_route_objects',) + + _yang_name = 'path-properties' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties'] + + def _get_path_metric(self): + """ + Getter method for path_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric (list) + + YANG Description: TE path metric type. + """ + return self.__path_metric + + def _set_path_metric(self, v, load=False): + """ + Setter method for path_metric, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric() directly. + + YANG Description: TE path metric type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric(self): + self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_path_affinities_values(self): + """ + Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values (container) + + YANG Description: Path affinities represented as values. + """ + return self.__path_affinities_values + + def _set_path_affinities_values(self, v, load=False): + """ + Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_values() directly. + + YANG Description: Path affinities represented as values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_values must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinities_values = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_values(self): + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_affinity_names(self): + """ + Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names (container) + + YANG Description: Path affinities represented as names. + """ + return self.__path_affinity_names + + def _set_path_affinity_names(self, v, load=False): + """ + Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_names() directly. + + YANG Description: Path affinities represented as names. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinity_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_names(self): + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_lists(self): + """ + Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists (container) + + YANG Description: Path SRLG properties container. + """ + return self.__path_srlgs_lists + + def _set_path_srlgs_lists(self, v, load=False): + """ + Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_lists is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_lists() directly. + + YANG Description: Path SRLG properties container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_lists must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_lists = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_lists(self): + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_names(self): + """ + Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names (container) + + YANG Description: Container for the list of named SRLGs. + """ + return self.__path_srlgs_names + + def _set_path_srlgs_names(self, v, load=False): + """ + Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_names() directly. + + YANG Description: Container for the list of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_names(self): + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_route_objects(self): + """ + Getter method for path_route_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects (container) + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + return self.__path_route_objects + + def _set_path_route_objects(self, v, load=False): + """ + Setter method for path_route_objects, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_route_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_route_objects() directly. + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_route_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_route_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_route_objects(self): + self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + path_metric = __builtin__.property(_get_path_metric) + path_affinities_values = __builtin__.property(_get_path_affinities_values) + path_affinity_names = __builtin__.property(_get_path_affinity_names) + path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) + path_srlgs_names = __builtin__.property(_get_path_srlgs_names) + path_route_objects = __builtin__.property(_get_path_route_objects) + + + _pyangbind_elements = OrderedDict([('path_metric', path_metric), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('path_route_objects', path_route_objects), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..49d1090f243669947bbd030100ad5b132480bce7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinities_value +class path_affinities_values(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-affinities-values. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as values. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) + + _yang_name = 'path-affinities-values' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-affinities-values'] + + def _get_path_affinities_value(self): + """ + Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinities_value + + def _set_path_affinities_value(self, v, load=False): + """ + Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_value() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_value must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinities_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_value(self): + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinities_value = __builtin__.property(_get_path_affinities_value) + + + _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e387bf9bfbd3c4799f23211105a7a1a91c98c413 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_affinities_value(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-affinities-values/path-affinities-value. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) + + _yang_name = 'path-affinities-value' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-affinities-values', 'path-affinities-value'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/usage (identityref) + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) + + YANG Description: The affinity value. The default is empty. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: The affinity value. The default is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with admin-groups""", + 'defined-type': "ietf-te-topology:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + usage = __builtin__.property(_get_usage) + value = __builtin__.property(_get_value) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..904de87a16de9e7c7870cf3ab2839ab7d7afdf53 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinity_name +class path_affinity_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-affinity-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as names. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) + + _yang_name = 'path-affinity-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-affinity-names'] + + def _get_path_affinity_name(self): + """ + Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinity_name + + def _set_path_affinity_name(self, v, load=False): + """ + Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_name() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_name(self): + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinity_name = __builtin__.property(_get_path_affinity_name) + + + _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c7b9e5faf5d46d9e7ea2f444562672d7b75f9a8c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import affinity_name +class path_affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-affinity-names/path-affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) + + _yang_name = 'path-affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-affinity-names', 'path-affinity-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/usage (identityref) + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_affinity_name(self): + """ + Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) + + YANG Description: List of named affinities. + """ + return self.__affinity_name + + def _set_affinity_name(self, v, load=False): + """ + Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_affinity_name() directly. + + YANG Description: List of named affinities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_affinity_name(self): + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + usage = __builtin__.property(_get_usage) + affinity_name = __builtin__.property(_get_affinity_name) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8e41672e8151473007d724a85f7b4dde8e5f20c2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-affinity-names/path-affinity-name/affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinities. + """ + __slots__ = ('_path_helper', '_extmethods', '__name',) + + _yang_name = 'affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) + + YANG Description: Identifies a named affinity entry. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Identifies a named affinity entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + name = __builtin__.property(_get_name) + + + _pyangbind_elements = OrderedDict([('name', name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0a8fae1c4a91b30a5b08483906f57eb84c4f2772 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_metric(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-metric. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric type. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__accumulative_value',) + + _yang_name = 'path-metric' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-metric'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/metric_type (identityref) + + YANG Description: TE path metric type. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: TE path metric type. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_accumulative_value(self): + """ + Getter method for accumulative_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/accumulative_value (uint64) + + YANG Description: TE path metric accumulative value. + """ + return self.__accumulative_value + + def _set_accumulative_value(self, v, load=False): + """ + Setter method for accumulative_value, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/accumulative_value (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_accumulative_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_accumulative_value() directly. + + YANG Description: TE path metric accumulative value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """accumulative_value must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__accumulative_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_accumulative_value(self): + self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + metric_type = __builtin__.property(_get_metric_type) + accumulative_value = __builtin__.property(_get_accumulative_value) + + + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('accumulative_value', accumulative_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9f30f10e68c50711bfaee7aea0510143e4094481 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_route_object +class path_route_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_route_object',) + + _yang_name = 'path-route-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects'] + + def _get_path_route_object(self): + """ + Getter method for path_route_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object (list) + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + return self.__path_route_object + + def _set_path_route_object(self, v, load=False): + """ + Setter method for path_route_object, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_route_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_route_object() directly. + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_route_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_route_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_route_object(self): + self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_route_object = __builtin__.property(_get_path_route_object) + + + _pyangbind_elements = OrderedDict([('path_route_object', path_route_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e85f737c57910db3b874a5d07f8cb45e3158977 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,327 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_route_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-route-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key +values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key +values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + index = __builtin__.property(_get_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..14f8c67c4ef9c74d8fbd42a4e7a3e9a8c81b505e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d816d11be71d3d6e12e7427275b7aba68ea7db7e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2b21aa6b8cd180833494e5203ff9cca2f713a49b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f24877ab2ea24a1fb2b4e4f84e35c98c2639ee1b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..266d0f1c07b92f372a1f032563aa9420a72467f4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1e2ef7ce2cf0584b95c92c54f010df7c6ef0b79d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..70b149a486ea4182317a5cc63704beb895960b01 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-route-objects/path-route-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-route-objects', 'path-route-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b6b374b8c1e0392f46c09b2b228c69ae59d5cb5f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_list +class path_srlgs_lists(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-srlgs-lists. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path SRLG properties container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) + + _yang_name = 'path-srlgs-lists' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-srlgs-lists'] + + def _get_path_srlgs_list(self): + """ + Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list (list) + + YANG Description: List of SRLG values to be included or excluded. + """ + return self.__path_srlgs_list + + def _set_path_srlgs_list(self, v, load=False): + """ + Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_list() directly. + + YANG Description: List of SRLG values to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_list must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_list(self): + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_list = __builtin__.property(_get_path_srlgs_list) + + + _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..59e2a8be232fd3e7b825e5c8f77d34eecbd25490 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_list(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-srlgs-lists/path-srlgs-list. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of SRLG values to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) + + _yang_name = 'path-srlgs-list' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-srlgs-lists', 'path-srlgs-list'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_values(self): + """ + Getter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) + + YANG Description: List of SRLG values. + """ + return self.__values + + def _set_values(self, v, load=False): + """ + Setter method for values, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_values() directly. + + YANG Description: List of SRLG values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """values must be of a type compatible with srlg""", + 'defined-type': "ietf-te-topology:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", + }) + + self.__values = t + if hasattr(self, '_set'): + self._set() + + def _unset_values(self): + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + usage = __builtin__.property(_get_usage) + values = __builtin__.property(_get_values) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..10673844150c886a74e09133e59d07cd663f56eb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_name +class path_srlgs_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-srlgs-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of named SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) + + _yang_name = 'path-srlgs-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-srlgs-names'] + + def _get_path_srlgs_name(self): + """ + Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name (list) + + YANG Description: List of named SRLGs to be included or excluded. + """ + return self.__path_srlgs_name + + def _set_path_srlgs_name(self, v, load=False): + """ + Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_name() directly. + + YANG Description: List of named SRLGs to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_name(self): + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_name = __builtin__.property(_get_path_srlgs_name) + + + _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..20a2aee2aaf4e0712a6c94a1ac22d09a164c253f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/path-properties/path-srlgs-names/path-srlgs-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named SRLGs to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) + + _yang_name = 'path-srlgs-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'path-properties', 'path-srlgs-names', 'path-srlgs-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_names(self): + """ + Getter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/names (string) + + YANG Description: List of named SRLGs. + """ + return self.__names + + def _set_names(self, v, load=False): + """ + Setter method for names, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/names (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_names() directly. + + YANG Description: List of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """names must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__names = t + if hasattr(self, '_set'): + self._set() + + def _unset_names(self): + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + usage = __builtin__.property(_get_usage) + names = __builtin__.property(_get_names) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4d1acaeb59c441fc4e85bd31e4b5c959646b4410 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py @@ -0,0 +1,326 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import primary_path +from . import backup_path +from . import tunnel_termination_points +from . import tunnels +class underlay(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Attributes of the TE link underlay. + """ + __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) + + _yang_name = 'underlay' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay'] + + def _get_enabled(self): + """ + Getter method for enabled, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/enabled (boolean) + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + return self.__enabled + + def _set_enabled(self, v, load=False): + """ + Setter method for enabled, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/enabled (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_enabled is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enabled() directly. + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enabled must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__enabled = t + if hasattr(self, '_set'): + self._set() + + def _unset_enabled(self): + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_primary_path(self): + """ + Getter method for primary_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path (container) + + YANG Description: The service path on the underlay topology that +supports this link. + """ + return self.__primary_path + + def _set_primary_path(self, v, load=False): + """ + Setter method for primary_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_primary_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_primary_path() directly. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """primary_path must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__primary_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_primary_path(self): + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_backup_path(self): + """ + Getter method for backup_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path (list) + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + return self.__backup_path + + def _set_backup_path(self, v, load=False): + """ + Setter method for backup_path, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_backup_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_backup_path() directly. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """backup_path must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__backup_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_backup_path(self): + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_protection_type(self): + """ + Getter method for protection_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/protection_type (identityref) + + YANG Description: Underlay protection type desired for this link. + """ + return self.__protection_type + + def _set_protection_type(self, v, load=False): + """ + Setter method for protection_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/protection_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_protection_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_protection_type() directly. + + YANG Description: Underlay protection type desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """protection_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__protection_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_protection_type(self): + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_tunnel_termination_points(self): + """ + Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points (container) + + YANG Description: Underlay TTPs desired for this link. + """ + return self.__tunnel_termination_points + + def _set_tunnel_termination_points(self, v, load=False): + """ + Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_termination_points is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_termination_points() directly. + + YANG Description: Underlay TTPs desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_termination_points must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tunnel_termination_points = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_termination_points(self): + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_tunnels(self): + """ + Getter method for tunnels, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels (container) + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + return self.__tunnels + + def _set_tunnels(self, v, load=False): + """ + Setter method for tunnels, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnels is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnels() directly. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnels must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tunnels = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnels(self): + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + enabled = __builtin__.property(_get_enabled, _set_enabled) + primary_path = __builtin__.property(_get_primary_path, _set_primary_path) + backup_path = __builtin__.property(_get_backup_path, _set_backup_path) + protection_type = __builtin__.property(_get_protection_type, _set_protection_type) + tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points, _set_tunnel_termination_points) + tunnels = __builtin__.property(_get_tunnels, _set_tunnels) + + + _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d6dae020814684bdfb0b995cd3112c73fbf7a82e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py @@ -0,0 +1,207 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class backup_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) + + _yang_name = 'backup-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/index (uint32) + + YANG Description: A sequence number to identify a backup path. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: A sequence number to identify a backup path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element (list) + + YANG Description: A list of path elements describing the backup service +path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the backup service +path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + path_element = __builtin__.property(_get_path_element, _set_path_element) + + + _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..32f0ddafba5db1546c8ad50177a73780a0b1b5fa --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,321 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the backup service +path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3522a13e96033c1b2936edb56798e8b8c6ecca67 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ce150a6055725d0d19578db2459899d1890731d3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ef37b6389233bdb4c07a827476bbe779dc4a3dd1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64da0e1fd7327284ece6dd1baf8cb7e64314a0d4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7b441de5c590d046d6c55cff535467fe302fc150 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9a2ff93d585b79da9c7a5a8a5633e1bca804d347 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8f686b596028c476f635af54e3db27df9fd88d30 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c75b0b21600a332b60b58712fdde9934b9547e11 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class primary_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) + + _yang_name = 'primary-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element (list) + + YANG Description: A list of path elements describing the service path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the service path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + path_element = __builtin__.property(_get_path_element, _set_path_element) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e9c1a617001c158d8c9a6f74f7a0414356e9e111 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,320 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the service path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2c3bb0005ff1dc2926197c1af5e242f04e9aee10 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fc6a1621914ea32479aea31f5db5d3aebc0e8e98 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d1db2ca234326d8bd3577ea24c539864ec672152 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0b291e326c2abd344565772273324e7ffb082704 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ccb0ca471771b6c5cc6cb3e85796e099f0062e34 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5c0fdf8daf0e9db2468488e52b54a4a7d1871da7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c70dd4cc0245ca118568b9d3905fddf50f8ee453 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..01b0c397670aad0d2c9ac7a892ab83fa1a979da7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel_termination_points(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/tunnel-termination-points. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TTPs desired for this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) + + _yang_name = 'tunnel-termination-points' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'tunnel-termination-points'] + + def _get_source(self): + """ + Getter method for source, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/source (binary) + + YANG Description: Source TTP identifier. + """ + return self.__source + + def _set_source(self, v, load=False): + """ + Setter method for source, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/source (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_source() directly. + + YANG Description: Source TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """source must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__source = t + if hasattr(self, '_set'): + self._set() + + def _unset_source(self): + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + + def _get_destination(self): + """ + Getter method for destination, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/destination (binary) + + YANG Description: Destination TTP identifier. + """ + return self.__destination + + def _set_destination(self, v, load=False): + """ + Setter method for destination, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/destination (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_destination is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_destination() directly. + + YANG Description: Destination TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """destination must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__destination = t + if hasattr(self, '_set'): + self._set() + + def _unset_destination(self): + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + source = __builtin__.property(_get_source, _set_source) + destination = __builtin__.property(_get_destination, _set_destination) + + + _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8b792d49d202131fb439164a8c15614e350976d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py @@ -0,0 +1,167 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tunnel +class tunnels(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/tunnels. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) + + _yang_name = 'tunnels' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'tunnels'] + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_tunnel(self): + """ + Getter method for tunnel, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel (list) + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + return self.__tunnel + + def _set_tunnel(self, v, load=False): + """ + Setter method for tunnel, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel() directly. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__tunnel = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel(self): + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + sharing = __builtin__.property(_get_sharing, _set_sharing) + tunnel = __builtin__.property(_get_tunnel, _set_tunnel) + + + _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..03756dbc3bd57a08deb5cf7521dead63b6ca3296 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,170 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/connectivity-matrices/underlay/tunnels/tunnel. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) + + _yang_name = 'tunnel' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'connectivity-matrices', 'underlay', 'tunnels', 'tunnel'] + + def _get_tunnel_name(self): + """ + Getter method for tunnel_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/tunnel_name (string) + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + return self.__tunnel_name + + def _set_tunnel_name(self, v, load=False): + """ + Setter method for tunnel_name, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/tunnel_name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_name() directly. + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__tunnel_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_name(self): + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + tunnel_name = __builtin__.property(_get_tunnel_name, _set_tunnel_name) + sharing = __builtin__.property(_get_sharing, _set_sharing) + + + _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2e4a62679917d02b57e56d464b0f9c59fd8b1ea9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class underlay_topology(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/te-node-attributes/underlay-topology. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: When an abstract node encapsulates a topology, the +attributes in this container point to said topology. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref',) + + _yang_name = 'underlay-topology' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'te-node-attributes', 'underlay-topology'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/underlay_topology/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/te_node_attributes/underlay_topology/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92fbb57f7371ee17f476c0f2f5a3baa02a5ecab8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/__init__.py @@ -0,0 +1,597 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import client_layer_adaptation +from . import local_link_connectivities +from . import geolocation +from . import statistics +from . import supporting_tunnel_termination_point +class tunnel_termination_point(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A termination point can terminate a tunnel. + """ + __slots__ = ('_path_helper', '_extmethods', '__tunnel_tp_id','__admin_status','__name','__switching_capability','__encoding','__inter_layer_lock_id','__protection_type','__client_layer_adaptation','__local_link_connectivities','__oper_status','__geolocation','__statistics','__supporting_tunnel_termination_point',) + + _yang_name = 'tunnel-termination-point' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tunnel_tp_id = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__inter_layer_lock_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__client_layer_adaptation = YANGDynClass(base=client_layer_adaptation.client_layer_adaptation, is_container='container', yang_name="client-layer-adaptation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__local_link_connectivities = YANGDynClass(base=local_link_connectivities.local_link_connectivities, is_container='container', yang_name="local-link-connectivities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) + self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__supporting_tunnel_termination_point = YANGDynClass(base=YANGListType("node_ref tunnel_tp_ref",supporting_tunnel_termination_point.supporting_tunnel_termination_point, yang_name="supporting-tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-ref tunnel-tp-ref', extensions=None), is_container='list', yang_name="supporting-tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point'] + + def _get_tunnel_tp_id(self): + """ + Getter method for tunnel_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/tunnel_tp_id (binary) + + YANG Description: TTP identifier. + """ + return self.__tunnel_tp_id + + def _set_tunnel_tp_id(self, v, load=False): + """ + Setter method for tunnel_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/tunnel_tp_id (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_tp_id() directly. + + YANG Description: TTP identifier. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_tp_id must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__tunnel_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_tp_id(self): + self.__tunnel_tp_id = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + + def _get_admin_status(self): + """ + Getter method for admin_status, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/admin_status (te-types:te-admin-status) + + YANG Description: The administrative state of the TTP. + """ + return self.__admin_status + + def _set_admin_status(self, v, load=False): + """ + Setter method for admin_status, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/admin_status (te-types:te-admin-status) + If this variable is read-only (config: false) in the + source YANG file, then _set_admin_status is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_admin_status() directly. + + YANG Description: The administrative state of the TTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """admin_status must be of a type compatible with te-types:te-admin-status""", + 'defined-type': "te-types:te-admin-status", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True)""", + }) + + self.__admin_status = t + if hasattr(self, '_set'): + self._set() + + def _unset_admin_status(self): + self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/name (string) + + YANG Description: A descriptive name for the TTP. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: A descriptive name for the TTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_switching_capability(self): + """ + Getter method for switching_capability, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/switching_capability (identityref) + + YANG Description: Switching capability for this interface. + """ + return self.__switching_capability + + def _set_switching_capability(self, v, load=False): + """ + Setter method for switching_capability, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/switching_capability (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_switching_capability is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_switching_capability() directly. + + YANG Description: Switching capability for this interface. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """switching_capability must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__switching_capability = t + if hasattr(self, '_set'): + self._set() + + def _unset_switching_capability(self): + self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_encoding(self): + """ + Getter method for encoding, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/encoding (identityref) + + YANG Description: Encoding supported by this interface. + """ + return self.__encoding + + def _set_encoding(self, v, load=False): + """ + Setter method for encoding, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/encoding (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_encoding is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_encoding() directly. + + YANG Description: Encoding supported by this interface. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """encoding must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__encoding = t + if hasattr(self, '_set'): + self._set() + + def _unset_encoding(self): + self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_inter_layer_lock_id(self): + """ + Getter method for inter_layer_lock_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/inter_layer_lock_id (uint32) + + YANG Description: Inter-layer lock ID, used for path computation in a TE +topology covering multiple layers or multiple regions. + """ + return self.__inter_layer_lock_id + + def _set_inter_layer_lock_id(self, v, load=False): + """ + Setter method for inter_layer_lock_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/inter_layer_lock_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_inter_layer_lock_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_inter_layer_lock_id() directly. + + YANG Description: Inter-layer lock ID, used for path computation in a TE +topology covering multiple layers or multiple regions. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """inter_layer_lock_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__inter_layer_lock_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_inter_layer_lock_id(self): + self.__inter_layer_lock_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_protection_type(self): + """ + Getter method for protection_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/protection_type (identityref) + + YANG Description: The protection type that this TTP is capable of. + """ + return self.__protection_type + + def _set_protection_type(self, v, load=False): + """ + Setter method for protection_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/protection_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_protection_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_protection_type() directly. + + YANG Description: The protection type that this TTP is capable of. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """protection_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__protection_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_protection_type(self): + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_client_layer_adaptation(self): + """ + Getter method for client_layer_adaptation, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation (container) + + YANG Description: Contains capability information to support a client-layer +adaptation in a multi-layer topology. + """ + return self.__client_layer_adaptation + + def _set_client_layer_adaptation(self, v, load=False): + """ + Setter method for client_layer_adaptation, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_client_layer_adaptation is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_client_layer_adaptation() directly. + + YANG Description: Contains capability information to support a client-layer +adaptation in a multi-layer topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=client_layer_adaptation.client_layer_adaptation, is_container='container', yang_name="client-layer-adaptation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """client_layer_adaptation must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=client_layer_adaptation.client_layer_adaptation, is_container='container', yang_name="client-layer-adaptation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__client_layer_adaptation = t + if hasattr(self, '_set'): + self._set() + + def _unset_client_layer_adaptation(self): + self.__client_layer_adaptation = YANGDynClass(base=client_layer_adaptation.client_layer_adaptation, is_container='container', yang_name="client-layer-adaptation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_local_link_connectivities(self): + """ + Getter method for local_link_connectivities, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities (container) + + YANG Description: Contains an LLCL for a TTP on a TE node. + """ + return self.__local_link_connectivities + + def _set_local_link_connectivities(self, v, load=False): + """ + Setter method for local_link_connectivities, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_local_link_connectivities is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_local_link_connectivities() directly. + + YANG Description: Contains an LLCL for a TTP on a TE node. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=local_link_connectivities.local_link_connectivities, is_container='container', yang_name="local-link-connectivities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """local_link_connectivities must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=local_link_connectivities.local_link_connectivities, is_container='container', yang_name="local-link-connectivities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__local_link_connectivities = t + if hasattr(self, '_set'): + self._set() + + def _unset_local_link_connectivities(self): + self.__local_link_connectivities = YANGDynClass(base=local_link_connectivities.local_link_connectivities, is_container='container', yang_name="local-link-connectivities", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_oper_status(self): + """ + Getter method for oper_status, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/oper_status (te-types:te-oper-status) + + YANG Description: The current operational state of the TTP. + """ + return self.__oper_status + + def _set_oper_status(self, v, load=False): + """ + Setter method for oper_status, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/oper_status (te-types:te-oper-status) + If this variable is read-only (config: false) in the + source YANG file, then _set_oper_status is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_oper_status() directly. + + YANG Description: The current operational state of the TTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """oper_status must be of a type compatible with te-types:te-oper-status""", + 'defined-type': "te-types:te-oper-status", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False)""", + }) + + self.__oper_status = t + if hasattr(self, '_set'): + self._set() + + def _unset_oper_status(self): + self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) + + + def _get_geolocation(self): + """ + Getter method for geolocation, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation (container) + + YANG Description: Contains a GPS location. + """ + return self.__geolocation + + def _set_geolocation(self, v, load=False): + """ + Setter method for geolocation, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_geolocation is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_geolocation() directly. + + YANG Description: Contains a GPS location. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """geolocation must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__geolocation = t + if hasattr(self, '_set'): + self._set() + + def _unset_geolocation(self): + self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_statistics(self): + """ + Getter method for statistics, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics (container) + + YANG Description: Statistics data. + """ + return self.__statistics + + def _set_statistics(self, v, load=False): + """ + Setter method for statistics, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_statistics is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_statistics() directly. + + YANG Description: Statistics data. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """statistics must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__statistics = t + if hasattr(self, '_set'): + self._set() + + def _unset_statistics(self): + self.__statistics = YANGDynClass(base=statistics.statistics, is_container='container', yang_name="statistics", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_supporting_tunnel_termination_point(self): + """ + Getter method for supporting_tunnel_termination_point, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point (list) + + YANG Description: Identifies the TTPs on which this TTP depends. + """ + return self.__supporting_tunnel_termination_point + + def _set_supporting_tunnel_termination_point(self, v, load=False): + """ + Setter method for supporting_tunnel_termination_point, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_supporting_tunnel_termination_point is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supporting_tunnel_termination_point() directly. + + YANG Description: Identifies the TTPs on which this TTP depends. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("node_ref tunnel_tp_ref",supporting_tunnel_termination_point.supporting_tunnel_termination_point, yang_name="supporting-tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-ref tunnel-tp-ref', extensions=None), is_container='list', yang_name="supporting-tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supporting_tunnel_termination_point must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("node_ref tunnel_tp_ref",supporting_tunnel_termination_point.supporting_tunnel_termination_point, yang_name="supporting-tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-ref tunnel-tp-ref', extensions=None), is_container='list', yang_name="supporting-tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__supporting_tunnel_termination_point = t + if hasattr(self, '_set'): + self._set() + + def _unset_supporting_tunnel_termination_point(self): + self.__supporting_tunnel_termination_point = YANGDynClass(base=YANGListType("node_ref tunnel_tp_ref",supporting_tunnel_termination_point.supporting_tunnel_termination_point, yang_name="supporting-tunnel-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='node-ref tunnel-tp-ref', extensions=None), is_container='list', yang_name="supporting-tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + tunnel_tp_id = __builtin__.property(_get_tunnel_tp_id, _set_tunnel_tp_id) + admin_status = __builtin__.property(_get_admin_status, _set_admin_status) + name = __builtin__.property(_get_name, _set_name) + switching_capability = __builtin__.property(_get_switching_capability, _set_switching_capability) + encoding = __builtin__.property(_get_encoding, _set_encoding) + inter_layer_lock_id = __builtin__.property(_get_inter_layer_lock_id, _set_inter_layer_lock_id) + protection_type = __builtin__.property(_get_protection_type, _set_protection_type) + client_layer_adaptation = __builtin__.property(_get_client_layer_adaptation, _set_client_layer_adaptation) + local_link_connectivities = __builtin__.property(_get_local_link_connectivities, _set_local_link_connectivities) + oper_status = __builtin__.property(_get_oper_status) + geolocation = __builtin__.property(_get_geolocation) + statistics = __builtin__.property(_get_statistics) + supporting_tunnel_termination_point = __builtin__.property(_get_supporting_tunnel_termination_point, _set_supporting_tunnel_termination_point) + + + _pyangbind_elements = OrderedDict([('tunnel_tp_id', tunnel_tp_id), ('admin_status', admin_status), ('name', name), ('switching_capability', switching_capability), ('encoding', encoding), ('inter_layer_lock_id', inter_layer_lock_id), ('protection_type', protection_type), ('client_layer_adaptation', client_layer_adaptation), ('local_link_connectivities', local_link_connectivities), ('oper_status', oper_status), ('geolocation', geolocation), ('statistics', statistics), ('supporting_tunnel_termination_point', supporting_tunnel_termination_point), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..35927a2b6d4cfdb6772293b24523657e9bde3e3d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import switching_capability +class client_layer_adaptation(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/client-layer-adaptation. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains capability information to support a client-layer +adaptation in a multi-layer topology. + """ + __slots__ = ('_path_helper', '_extmethods', '__switching_capability',) + + _yang_name = 'client-layer-adaptation' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",switching_capability.switching_capability, yang_name="switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'client-layer-adaptation'] + + def _get_switching_capability(self): + """ + Getter method for switching_capability, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability (list) + + YANG Description: List of supported switching capabilities. + """ + return self.__switching_capability + + def _set_switching_capability(self, v, load=False): + """ + Setter method for switching_capability, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_switching_capability is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_switching_capability() directly. + + YANG Description: List of supported switching capabilities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("switching_capability encoding",switching_capability.switching_capability, yang_name="switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """switching_capability must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("switching_capability encoding",switching_capability.switching_capability, yang_name="switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__switching_capability = t + if hasattr(self, '_set'): + self._set() + + def _unset_switching_capability(self): + self.__switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",switching_capability.switching_capability, yang_name="switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + switching_capability = __builtin__.property(_get_switching_capability, _set_switching_capability) + + + _pyangbind_elements = OrderedDict([('switching_capability', switching_capability), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4f565ac105c144b0cede7abcf7171faea22f4fff --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py @@ -0,0 +1,206 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class switching_capability(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/client-layer-adaptation/switching-capability. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of supported switching capabilities. + """ + __slots__ = ('_path_helper', '_extmethods', '__switching_capability','__encoding','__te_bandwidth',) + + _yang_name = 'switching-capability' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'client-layer-adaptation', 'switching-capability'] + + def _get_switching_capability(self): + """ + Getter method for switching_capability, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/switching_capability (identityref) + + YANG Description: Switching capability for the client-layer adaptation. + """ + return self.__switching_capability + + def _set_switching_capability(self, v, load=False): + """ + Setter method for switching_capability, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/switching_capability (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_switching_capability is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_switching_capability() directly. + + YANG Description: Switching capability for the client-layer adaptation. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """switching_capability must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__switching_capability = t + if hasattr(self, '_set'): + self._set() + + def _unset_switching_capability(self): + self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_encoding(self): + """ + Getter method for encoding, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/encoding (identityref) + + YANG Description: Encoding supported by the client-layer adaptation. + """ + return self.__encoding + + def _set_encoding(self, v, load=False): + """ + Setter method for encoding, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/encoding (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_encoding is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_encoding() directly. + + YANG Description: Encoding supported by the client-layer adaptation. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """encoding must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__encoding = t + if hasattr(self, '_set'): + self._set() + + def _unset_encoding(self): + self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + switching_capability = __builtin__.property(_get_switching_capability, _set_switching_capability) + encoding = __builtin__.property(_get_encoding, _set_encoding) + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('switching_capability', switching_capability), ('encoding', encoding), ('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..52516d7596ef2a4a35fe0c9f5613b7d11325dc8f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/client-layer-adaptation/switching-capability/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'client-layer-adaptation', 'switching-capability', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3f44ede78bd97cc08792454e82392145da7fff76 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/client-layer-adaptation/switching-capability/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'client-layer-adaptation', 'switching-capability', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + + def _get_odtu_flex_type(self): + """ + Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +terminated on this OTN Tunnel Termination Point +(TTP). + """ + return self.__odtu_flex_type + + def _set_odtu_flex_type(self, v, load=False): + """ + Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_odtu_flex_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odtu_flex_type() directly. + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +terminated on this OTN Tunnel Termination Point +(TTP). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", + 'defined-type': "l1-types:odtu-flex-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", + }) + + self.__odtu_flex_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odtu_flex_type(self): + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + odulist = __builtin__.property(_get_odulist, _set_odulist) + odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) + + __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} + _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d4cb37ddf48866ddc9846bde21cab02a01eb9255 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/client-layer-adaptation/switching-capability/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'client-layer-adaptation', 'switching-capability', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + number = __builtin__.property(_get_number, _set_number) + ts_number = __builtin__.property(_get_ts_number, _set_ts_number) + + __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..60eedb630beaabab4d10b6ad562533d0a3c450c4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class geolocation(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/geolocation. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains a GPS location. + """ + __slots__ = ('_path_helper', '_extmethods', '__altitude','__latitude','__longitude',) + + _yang_name = 'geolocation' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) + self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'geolocation'] + + def _get_altitude(self): + """ + Getter method for altitude, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation/altitude (int64) + + YANG Description: Distance above sea level. + """ + return self.__altitude + + def _set_altitude(self, v, load=False): + """ + Setter method for altitude, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation/altitude (int64) + If this variable is read-only (config: false) in the + source YANG file, then _set_altitude is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_altitude() directly. + + YANG Description: Distance above sea level. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """altitude must be of a type compatible with int64""", + 'defined-type': "int64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False)""", + }) + + self.__altitude = t + if hasattr(self, '_set'): + self._set() + + def _unset_altitude(self): + self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) + + + def _get_latitude(self): + """ + Getter method for latitude, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation/latitude (geographic-coordinate-degree) + + YANG Description: Relative position north or south on the Earth's surface. + """ + return self.__latitude + + def _set_latitude(self, v, load=False): + """ + Setter method for latitude, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation/latitude (geographic-coordinate-degree) + If this variable is read-only (config: false) in the + source YANG file, then _set_latitude is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_latitude() directly. + + YANG Description: Relative position north or south on the Earth's surface. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """latitude must be of a type compatible with geographic-coordinate-degree""", + 'defined-type': "ietf-te-topology:geographic-coordinate-degree", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", + }) + + self.__latitude = t + if hasattr(self, '_set'): + self._set() + + def _unset_latitude(self): + self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + + + def _get_longitude(self): + """ + Getter method for longitude, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation/longitude (geographic-coordinate-degree) + + YANG Description: Angular distance east or west on the Earth's surface. + """ + return self.__longitude + + def _set_longitude(self, v, load=False): + """ + Setter method for longitude, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/geolocation/longitude (geographic-coordinate-degree) + If this variable is read-only (config: false) in the + source YANG file, then _set_longitude is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_longitude() directly. + + YANG Description: Angular distance east or west on the Earth's surface. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """longitude must be of a type compatible with geographic-coordinate-degree""", + 'defined-type': "ietf-te-topology:geographic-coordinate-degree", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", + }) + + self.__longitude = t + if hasattr(self, '_set'): + self._set() + + def _unset_longitude(self): + self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + + altitude = __builtin__.property(_get_altitude) + latitude = __builtin__.property(_get_latitude) + longitude = __builtin__.property(_get_longitude) + + + _pyangbind_elements = OrderedDict([('altitude', altitude), ('latitude', latitude), ('longitude', longitude), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..309e87f52d489f0d2f62db7f7eee13eeadf527e1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py @@ -0,0 +1,418 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restrictions +from . import underlay +from . import path_constraints +from . import optimizations +from . import path_properties +from . import local_link_connectivity +class local_link_connectivities(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains an LLCL for a TTP on a TE node. + """ + __slots__ = ('_path_helper', '_extmethods', '__number_of_entries','__label_restrictions','__is_allowed','__underlay','__path_constraints','__optimizations','__path_properties','__local_link_connectivity',) + + _yang_name = 'local-link-connectivities' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__number_of_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__local_link_connectivity = YANGDynClass(base=YANGListType("link_tp_ref",local_link_connectivity.local_link_connectivity, yang_name="local-link-connectivity", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-tp-ref', extensions=None), is_container='list', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities'] + + def _get_number_of_entries(self): + """ + Getter method for number_of_entries, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/number_of_entries (uint16) + + YANG Description: The number of LLCL entries. +If this number is specified in the configuration request, +the number is the requested number of entries, which may +not all be listed in the list; +if this number is reported in the state data, +the number is the current number of operational entries. + """ + return self.__number_of_entries + + def _set_number_of_entries(self, v, load=False): + """ + Setter method for number_of_entries, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/number_of_entries (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number_of_entries is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number_of_entries() directly. + + YANG Description: The number of LLCL entries. +If this number is specified in the configuration request, +the number is the requested number of entries, which may +not all be listed in the list; +if this number is reported in the state data, +the number is the current number of operational entries. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number_of_entries must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number_of_entries = t + if hasattr(self, '_set'): + self._set() + + def _unset_number_of_entries(self): + self.__number_of_entries = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number-of-entries", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) + + + def _get_label_restrictions(self): + """ + Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions (container) + + YANG Description: The label restrictions container. + """ + return self.__label_restrictions + + def _set_label_restrictions(self, v, load=False): + """ + Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restrictions is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restrictions() directly. + + YANG Description: The label restrictions container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restrictions must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_restrictions = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restrictions(self): + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_is_allowed(self): + """ + Getter method for is_allowed, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/is_allowed (boolean) + + YANG Description: 'true' - switching is allowed; +'false' - switching is disallowed. + """ + return self.__is_allowed + + def _set_is_allowed(self, v, load=False): + """ + Setter method for is_allowed, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/is_allowed (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_allowed is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_allowed() directly. + + YANG Description: 'true' - switching is allowed; +'false' - switching is disallowed. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_allowed must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__is_allowed = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_allowed(self): + self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_underlay(self): + """ + Getter method for underlay, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay (container) + + YANG Description: Attributes of the TE link underlay. + """ + return self.__underlay + + def _set_underlay(self, v, load=False): + """ + Setter method for underlay, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_underlay is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_underlay() directly. + + YANG Description: Attributes of the TE link underlay. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """underlay must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__underlay = t + if hasattr(self, '_set'): + self._set() + + def _unset_underlay(self): + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_constraints(self): + """ + Getter method for path_constraints, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints (container) + + YANG Description: TE named path constraints container. + """ + return self.__path_constraints + + def _set_path_constraints(self, v, load=False): + """ + Setter method for path_constraints, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_constraints is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_constraints() directly. + + YANG Description: TE named path constraints container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_constraints must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_constraints = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_constraints(self): + self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_optimizations(self): + """ + Getter method for optimizations, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations (container) + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + return self.__optimizations + + def _set_optimizations(self, v, load=False): + """ + Setter method for optimizations, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimizations is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimizations() directly. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimizations must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__optimizations = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimizations(self): + self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_properties(self): + """ + Getter method for path_properties, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties (container) + + YANG Description: The TE path properties. + """ + return self.__path_properties + + def _set_path_properties(self, v, load=False): + """ + Setter method for path_properties, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_properties is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_properties() directly. + + YANG Description: The TE path properties. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_properties must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_properties = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_properties(self): + self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_local_link_connectivity(self): + """ + Getter method for local_link_connectivity, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity (list) + + YANG Description: The termination capabilities between the TTP and the LTP. +This capability information can be used to compute +the tunnel path. +The Interface Adjustment Capability Descriptors (IACDs) +(defined in RFC 6001) on each LTP can be derived from +this list. + """ + return self.__local_link_connectivity + + def _set_local_link_connectivity(self, v, load=False): + """ + Setter method for local_link_connectivity, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_local_link_connectivity is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_local_link_connectivity() directly. + + YANG Description: The termination capabilities between the TTP and the LTP. +This capability information can be used to compute +the tunnel path. +The Interface Adjustment Capability Descriptors (IACDs) +(defined in RFC 6001) on each LTP can be derived from +this list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("link_tp_ref",local_link_connectivity.local_link_connectivity, yang_name="local-link-connectivity", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-tp-ref', extensions=None), is_container='list', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """local_link_connectivity must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("link_tp_ref",local_link_connectivity.local_link_connectivity, yang_name="local-link-connectivity", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-tp-ref', extensions=None), is_container='list', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__local_link_connectivity = t + if hasattr(self, '_set'): + self._set() + + def _unset_local_link_connectivity(self): + self.__local_link_connectivity = YANGDynClass(base=YANGListType("link_tp_ref",local_link_connectivity.local_link_connectivity, yang_name="local-link-connectivity", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='link-tp-ref', extensions=None), is_container='list', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + number_of_entries = __builtin__.property(_get_number_of_entries, _set_number_of_entries) + label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) + is_allowed = __builtin__.property(_get_is_allowed, _set_is_allowed) + underlay = __builtin__.property(_get_underlay, _set_underlay) + path_constraints = __builtin__.property(_get_path_constraints, _set_path_constraints) + optimizations = __builtin__.property(_get_optimizations, _set_optimizations) + path_properties = __builtin__.property(_get_path_properties) + local_link_connectivity = __builtin__.property(_get_local_link_connectivity, _set_local_link_connectivity) + + + _pyangbind_elements = OrderedDict([('number_of_entries', number_of_entries), ('label_restrictions', label_restrictions), ('is_allowed', is_allowed), ('underlay', underlay), ('path_constraints', path_constraints), ('optimizations', optimizations), ('path_properties', path_properties), ('local_link_connectivity', local_link_connectivity), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7170e479811b3ec5d8576646bcf18677541eae62 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restriction +class label_restrictions(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The label restrictions container. + """ + __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) + + _yang_name = 'label-restrictions' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions'] + + def _get_label_restriction(self): + """ + Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction (list) + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + return self.__label_restriction + + def _set_label_restriction(self, v, load=False): + """ + Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restriction() directly. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restriction must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__label_restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restriction(self): + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) + + + _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6bb6db97a047b6d5c290b75b80088bfe46913b02 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,450 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_start +from . import label_end +from . import label_step +from . import otn_label_range +from . import ethernet_label_range +class label_restriction(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) + + _yang_name = 'label-restriction' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction'] + + def _get_restriction(self): + """ + Getter method for restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/restriction (enumeration) + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + return self.__restriction + + def _set_restriction(self, v, load=False): + """ + Setter method for restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/restriction (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restriction() directly. + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restriction must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", + }) + + self.__restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_restriction(self): + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/index (uint32) + + YANG Description: The index of the label restriction list entry. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: The index of the label restriction list entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_label_start(self): + """ + Getter method for label_start, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start (container) + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + return self.__label_start + + def _set_label_start(self, v, load=False): + """ + Setter method for label_start, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_start is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_start() directly. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_start must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_start = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_start(self): + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_end(self): + """ + Getter method for label_end, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end (container) + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + return self.__label_end + + def _set_label_end(self, v, load=False): + """ + Setter method for label_end, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_end is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_end() directly. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_end must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_end = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_end(self): + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_step(self): + """ + Getter method for label_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step (container) + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + return self.__label_step + + def _set_label_step(self, v, load=False): + """ + Setter method for label_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_step() directly. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_step must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_step(self): + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_range_bitmap(self): + """ + Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + return self.__range_bitmap + + def _set_range_bitmap(self, v, load=False): + """ + Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_bitmap is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_bitmap() directly. + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", + 'defined-type': "yang:hex-string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", + }) + + self.__range_bitmap = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_bitmap(self): + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + + + def _get_otn_label_range(self): + """ + Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range (container) + + YANG Description: Label range information for OTN. + """ + return self.__otn_label_range + + def _set_otn_label_range(self, v, load=False): + """ + Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_label_range() directly. + + YANG Description: Label range information for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_label_range(self): + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_ethernet_label_range(self): + """ + Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range (container) + + YANG Description: Ethernet-specific label range related information. + """ + return self.__ethernet_label_range + + def _set_ethernet_label_range(self, v, load=False): + """ + Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ethernet_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ethernet_label_range() directly. + + YANG Description: Ethernet-specific label range related information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ethernet_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__ethernet_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_ethernet_label_range(self): + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + restriction = __builtin__.property(_get_restriction, _set_restriction) + index = __builtin__.property(_get_index, _set_index) + label_start = __builtin__.property(_get_label_start, _set_label_start) + label_end = __builtin__.property(_get_label_end, _set_label_end) + label_step = __builtin__.property(_get_label_step, _set_label_step) + range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) + otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) + ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) + + + _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee376c6a7df9fdbee967d382797a74126c05f56 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ethernet_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/ethernet-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Ethernet-specific label range related information. + """ + __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) + + _yang_name = 'ethernet-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] + + def _get_tag_type(self): + """ + Getter method for tag_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + + YANG Description: VLAN tag type. + """ + return self.__tag_type + + def _set_tag_type(self, v, load=False): + """ + Setter method for tag_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_tag_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tag_type() directly. + + YANG Description: VLAN tag type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", + }) + + self.__tag_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tag_type(self): + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + + YANG Description: priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + tag_type = __builtin__.property(_get_tag_type, _set_tag_type) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e6bcde2cf63e6308e080f14000153b02c2c907fe --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_end(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-end. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-end' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-end'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d964dca5c1af89e12a0f8f24f4fc1633e1054e5a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-end/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..360a1223487e55f8e2ba8a86690025ee7973a9a0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..438d60e5b369b0b6ef5d3d7e90ce1d73b8373a05 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_start(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-start. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-start' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-start'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8e14efa20446bf26b79d2976780eab84d73465d2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-start/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56b84bbbdd84e3d8688b21d2ac1aeaa683471a86 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c349c4d913142f494bea3dd6af4b17c1fe153d49 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class label_step(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-step. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) + + _yang_name = 'label-step' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-step'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/generic (int32) + + YANG Description: Label range step. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/generic (int32) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Label range step. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with int32""", + 'defined-type': "int32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn (container) + + YANG Description: Label step for OTN + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label step for OTN + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_step(self): + """ + Getter method for eth_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/eth_step (uint16) + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + return self.__eth_step + + def _set_eth_step(self, v, load=False): + """ + Setter method for eth_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/eth_step (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_step() directly. + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_step must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", + }) + + self.__eth_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_step(self): + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_step = __builtin__.property(_get_eth_step, _set_eth_step) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0a0f6d7aebfdc5b3facdf88d2daae95138107502 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/label-step/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label step for OTN + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bfc2cd1e0e44c93eedd87a9fd2d41467feaef47d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/__init__.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/label-restrictions/label-restriction/otn-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label range information for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) + + _yang_name = 'otn-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'label-restrictions', 'label-restriction', 'otn-label-range'] + + def _get_range_type(self): + """ + Getter method for range_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + return self.__range_type + + def _set_range_type(self, v, load=False): + """ + Setter method for range_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_type() directly. + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_type must be of a type compatible with otn-label-range-type""", + 'defined-type': "ietf-otn-topology:otn-label-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", + }) + + self.__range_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_type(self): + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_odu_type_list(self): + """ + Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + return self.__odu_type_list + + def _set_odu_type_list(self, v, load=False): + """ + Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type_list() directly. + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type_list must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type_list(self): + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/priority (uint8) + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/otn_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + range_type = __builtin__.property(_get_range_type, _set_range_type) + tsg = __builtin__.property(_get_tsg, _set_tsg) + odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7a646ea671ab3fe76eb70143aea289f4c130628 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py @@ -0,0 +1,368 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restrictions +from . import underlay +from . import path_constraints +from . import optimizations +from . import path_properties +class local_link_connectivity(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The termination capabilities between the TTP and the LTP. +This capability information can be used to compute +the tunnel path. +The Interface Adjustment Capability Descriptors (IACDs) +(defined in RFC 6001) on each LTP can be derived from +this list. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_ref','__label_restrictions','__is_allowed','__underlay','__path_constraints','__optimizations','__path_properties',) + + _yang_name = 'local-link-connectivity' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity'] + + def _get_link_tp_ref(self): + """ + Getter method for link_tp_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/link_tp_ref (leafref) + + YANG Description: LTP. + """ + return self.__link_tp_ref + + def _set_link_tp_ref(self, v, load=False): + """ + Setter method for link_tp_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/link_tp_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_ref() directly. + + YANG Description: LTP. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="link-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__link_tp_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_ref(self): + self.__link_tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="link-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_label_restrictions(self): + """ + Getter method for label_restrictions, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions (container) + + YANG Description: The label restrictions container. + """ + return self.__label_restrictions + + def _set_label_restrictions(self, v, load=False): + """ + Setter method for label_restrictions, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restrictions is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restrictions() directly. + + YANG Description: The label restrictions container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restrictions must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_restrictions = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restrictions(self): + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_is_allowed(self): + """ + Getter method for is_allowed, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/is_allowed (boolean) + + YANG Description: 'true' - switching is allowed; +'false' - switching is disallowed. + """ + return self.__is_allowed + + def _set_is_allowed(self, v, load=False): + """ + Setter method for is_allowed, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/is_allowed (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_allowed is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_allowed() directly. + + YANG Description: 'true' - switching is allowed; +'false' - switching is disallowed. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_allowed must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__is_allowed = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_allowed(self): + self.__is_allowed = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-allowed", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_underlay(self): + """ + Getter method for underlay, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay (container) + + YANG Description: Attributes of the TE link underlay. + """ + return self.__underlay + + def _set_underlay(self, v, load=False): + """ + Setter method for underlay, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_underlay is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_underlay() directly. + + YANG Description: Attributes of the TE link underlay. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """underlay must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__underlay = t + if hasattr(self, '_set'): + self._set() + + def _unset_underlay(self): + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_constraints(self): + """ + Getter method for path_constraints, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints (container) + + YANG Description: TE named path constraints container. + """ + return self.__path_constraints + + def _set_path_constraints(self, v, load=False): + """ + Setter method for path_constraints, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_constraints is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_constraints() directly. + + YANG Description: TE named path constraints container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_constraints must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_constraints = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_constraints(self): + self.__path_constraints = YANGDynClass(base=path_constraints.path_constraints, is_container='container', yang_name="path-constraints", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_optimizations(self): + """ + Getter method for optimizations, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations (container) + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + return self.__optimizations + + def _set_optimizations(self, v, load=False): + """ + Setter method for optimizations, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimizations is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimizations() directly. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimizations must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__optimizations = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimizations(self): + self.__optimizations = YANGDynClass(base=optimizations.optimizations, is_container='container', yang_name="optimizations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_properties(self): + """ + Getter method for path_properties, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties (container) + + YANG Description: The TE path properties. + """ + return self.__path_properties + + def _set_path_properties(self, v, load=False): + """ + Setter method for path_properties, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_properties is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_properties() directly. + + YANG Description: The TE path properties. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_properties must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_properties = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_properties(self): + self.__path_properties = YANGDynClass(base=path_properties.path_properties, is_container='container', yang_name="path-properties", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + link_tp_ref = __builtin__.property(_get_link_tp_ref, _set_link_tp_ref) + label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) + is_allowed = __builtin__.property(_get_is_allowed, _set_is_allowed) + underlay = __builtin__.property(_get_underlay, _set_underlay) + path_constraints = __builtin__.property(_get_path_constraints, _set_path_constraints) + optimizations = __builtin__.property(_get_optimizations, _set_optimizations) + path_properties = __builtin__.property(_get_path_properties) + + + _pyangbind_elements = OrderedDict([('link_tp_ref', link_tp_ref), ('label_restrictions', label_restrictions), ('is_allowed', is_allowed), ('underlay', underlay), ('path_constraints', path_constraints), ('optimizations', optimizations), ('path_properties', path_properties), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..37d7f23f2187c3896264636b88d1dbe26eaafe2d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restriction +class label_restrictions(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The label restrictions container. + """ + __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) + + _yang_name = 'label-restrictions' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions'] + + def _get_label_restriction(self): + """ + Getter method for label_restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction (list) + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + return self.__label_restriction + + def _set_label_restriction(self, v, load=False): + """ + Setter method for label_restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restriction() directly. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restriction must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__label_restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restriction(self): + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) + + + _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5d5f6509bd6063c7a3dce0d27b36f2db0aded0f1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,450 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_start +from . import label_end +from . import label_step +from . import otn_label_range +from . import ethernet_label_range +class label_restriction(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) + + _yang_name = 'label-restriction' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction'] + + def _get_restriction(self): + """ + Getter method for restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/restriction (enumeration) + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + return self.__restriction + + def _set_restriction(self, v, load=False): + """ + Setter method for restriction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/restriction (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restriction() directly. + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restriction must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", + }) + + self.__restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_restriction(self): + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/index (uint32) + + YANG Description: The index of the label restriction list entry. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: The index of the label restriction list entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_label_start(self): + """ + Getter method for label_start, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start (container) + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + return self.__label_start + + def _set_label_start(self, v, load=False): + """ + Setter method for label_start, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_start is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_start() directly. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_start must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_start = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_start(self): + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_end(self): + """ + Getter method for label_end, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end (container) + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + return self.__label_end + + def _set_label_end(self, v, load=False): + """ + Setter method for label_end, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_end is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_end() directly. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_end must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_end = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_end(self): + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_step(self): + """ + Getter method for label_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step (container) + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + return self.__label_step + + def _set_label_step(self, v, load=False): + """ + Setter method for label_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_step() directly. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_step must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_step(self): + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_range_bitmap(self): + """ + Getter method for range_bitmap, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + return self.__range_bitmap + + def _set_range_bitmap(self, v, load=False): + """ + Setter method for range_bitmap, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_bitmap is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_bitmap() directly. + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", + 'defined-type': "yang:hex-string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", + }) + + self.__range_bitmap = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_bitmap(self): + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + + + def _get_otn_label_range(self): + """ + Getter method for otn_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range (container) + + YANG Description: Label range information for OTN. + """ + return self.__otn_label_range + + def _set_otn_label_range(self, v, load=False): + """ + Setter method for otn_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_label_range() directly. + + YANG Description: Label range information for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_label_range(self): + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_ethernet_label_range(self): + """ + Getter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range (container) + + YANG Description: Ethernet-specific label range related information. + """ + return self.__ethernet_label_range + + def _set_ethernet_label_range(self, v, load=False): + """ + Setter method for ethernet_label_range, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ethernet_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ethernet_label_range() directly. + + YANG Description: Ethernet-specific label range related information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ethernet_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__ethernet_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_ethernet_label_range(self): + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + restriction = __builtin__.property(_get_restriction, _set_restriction) + index = __builtin__.property(_get_index, _set_index) + label_start = __builtin__.property(_get_label_start, _set_label_start) + label_end = __builtin__.property(_get_label_end, _set_label_end) + label_step = __builtin__.property(_get_label_step, _set_label_step) + range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) + otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) + ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) + + + _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..17b2f661d64f6db169a22b1cd10bc49f538893b2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ethernet_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/ethernet-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Ethernet-specific label range related information. + """ + __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) + + _yang_name = 'ethernet-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] + + def _get_tag_type(self): + """ + Getter method for tag_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + + YANG Description: VLAN tag type. + """ + return self.__tag_type + + def _set_tag_type(self, v, load=False): + """ + Setter method for tag_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_tag_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tag_type() directly. + + YANG Description: VLAN tag type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", + }) + + self.__tag_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tag_type(self): + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + + YANG Description: priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + tag_type = __builtin__.property(_get_tag_type, _set_tag_type) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c31cb61453887c3cea67f9e70935fa34140e469e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_end(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-end. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-end' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-end'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..deb12db62a93bb2fed55d87fd9864e12bee11dde --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-end/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..efd7f3ed2d56606b1afb9693993a0842e57f3cb3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..824467f81b28cb978a87996d0631864753ed91e6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_start(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-start. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-start' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-start'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fddd85cf7bc6dabc2fb9973b516f959b1796665 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-start/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..44028d6f94f01dc8d99fa990bb36c9cbd85d3dda --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..58c0b9c3e467c8592bb12617d41499c0d03529df --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class label_step(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-step. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) + + _yang_name = 'label-step' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-step'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/generic (int32) + + YANG Description: Label range step. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/generic (int32) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Label range step. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with int32""", + 'defined-type': "int32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn (container) + + YANG Description: Label step for OTN + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label step for OTN + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_step(self): + """ + Getter method for eth_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/eth_step (uint16) + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + return self.__eth_step + + def _set_eth_step(self, v, load=False): + """ + Setter method for eth_step, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/eth_step (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_step() directly. + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_step must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", + }) + + self.__eth_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_step(self): + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_step = __builtin__.property(_get_eth_step, _set_eth_step) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7125ae3a2c00b9dcd82c30958ca9c0911dec1b9d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/label-step/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label step for OTN + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54adb557bb093d883e1eb78881222f1d6c9ee898 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/__init__.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/label-restrictions/label-restriction/otn-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label range information for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) + + _yang_name = 'otn-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'label-restrictions', 'label-restriction', 'otn-label-range'] + + def _get_range_type(self): + """ + Getter method for range_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + return self.__range_type + + def _set_range_type(self, v, load=False): + """ + Setter method for range_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_type() directly. + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_type must be of a type compatible with otn-label-range-type""", + 'defined-type': "ietf-otn-topology:otn-label-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", + }) + + self.__range_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_type(self): + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_odu_type_list(self): + """ + Getter method for odu_type_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + return self.__odu_type_list + + def _set_odu_type_list(self, v, load=False): + """ + Setter method for odu_type_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type_list() directly. + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type_list must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type_list(self): + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/priority (uint8) + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/otn_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + range_type = __builtin__.property(_get_range_type, _set_range_type) + tsg = __builtin__.property(_get_tsg, _set_tsg) + odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3bc26167a6e71530ea7d92582812e55483c86fd3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py @@ -0,0 +1,199 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import optimization_metric +from . import tiebreakers +from . import objective_function +class optimizations(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + __slots__ = ('_path_helper', '_extmethods', '__optimization_metric','__tiebreakers','__objective_function',) + + _yang_name = 'optimizations' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations'] + + def _get_optimization_metric(self): + """ + Getter method for optimization_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric (list) + + YANG Description: TE path metric type. + """ + return self.__optimization_metric + + def _set_optimization_metric(self, v, load=False): + """ + Setter method for optimization_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimization_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimization_metric() directly. + + YANG Description: TE path metric type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimization_metric must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__optimization_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimization_metric(self): + self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_tiebreakers(self): + """ + Getter method for tiebreakers, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers (container) + + YANG Description: Container for the list of tiebreakers. + """ + return self.__tiebreakers + + def _set_tiebreakers(self, v, load=False): + """ + Setter method for tiebreakers, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreakers is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreakers() directly. + + YANG Description: Container for the list of tiebreakers. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreakers must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tiebreakers = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreakers(self): + self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_objective_function(self): + """ + Getter method for objective_function, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function (container) + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + return self.__objective_function + + def _set_objective_function(self, v, load=False): + """ + Setter method for objective_function, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_objective_function is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_objective_function() directly. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """objective_function must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__objective_function = t + if hasattr(self, '_set'): + self._set() + + def _unset_objective_function(self): + self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + optimization_metric = __builtin__.property(_get_optimization_metric, _set_optimization_metric) + tiebreakers = __builtin__.property(_get_tiebreakers, _set_tiebreakers) + objective_function = __builtin__.property(_get_objective_function, _set_objective_function) + + __choices__ = {'algorithm': {'metric': ['optimization_metric', 'tiebreakers'], 'objective-function': ['objective_function']}} + _pyangbind_elements = OrderedDict([('optimization_metric', optimization_metric), ('tiebreakers', tiebreakers), ('objective_function', objective_function), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..302ed483026db4ae6afa8e38646ca609132c8eda --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class objective_function(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/objective-function. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + __slots__ = ('_path_helper', '_extmethods', '__objective_function_type',) + + _yang_name = 'objective-function' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'objective-function'] + + def _get_objective_function_type(self): + """ + Getter method for objective_function_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/objective_function_type (identityref) + + YANG Description: Objective function entry. + """ + return self.__objective_function_type + + def _set_objective_function_type(self, v, load=False): + """ + Setter method for objective_function_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/objective_function/objective_function_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_objective_function_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_objective_function_type() directly. + + YANG Description: Objective function entry. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """objective_function_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__objective_function_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_objective_function_type(self): + self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + objective_function_type = __builtin__.property(_get_objective_function_type, _set_objective_function_type) + + __choices__ = {'algorithm': {'objective-function': ['objective_function_type']}} + _pyangbind_elements = OrderedDict([('objective_function_type', objective_function_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ef6ac03d431417d485a346e8192e3b37629e4937 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/__init__.py @@ -0,0 +1,241 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import explicit_route_exclude_objects +from . import explicit_route_include_objects +class optimization_metric(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric type. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__weight','__explicit_route_exclude_objects','__explicit_route_include_objects',) + + _yang_name = 'optimization-metric' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/metric_type (identityref) + + YANG Description: Identifies the 'metric-type' that the path computation +process uses for optimization. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: Identifies the 'metric-type' that the path computation +process uses for optimization. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_weight(self): + """ + Getter method for weight, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/weight (uint8) + + YANG Description: TE path metric normalization weight. + """ + return self.__weight + + def _set_weight(self, v, load=False): + """ + Setter method for weight, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/weight (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_weight is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_weight() directly. + + YANG Description: TE path metric normalization weight. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """weight must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__weight = t + if hasattr(self, '_set'): + self._set() + + def _unset_weight(self): + self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_explicit_route_exclude_objects(self): + """ + Getter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects (container) + + YANG Description: Container for the 'exclude route' object list. + """ + return self.__explicit_route_exclude_objects + + def _set_explicit_route_exclude_objects(self, v, load=False): + """ + Setter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_explicit_route_exclude_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_explicit_route_exclude_objects() directly. + + YANG Description: Container for the 'exclude route' object list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """explicit_route_exclude_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__explicit_route_exclude_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_explicit_route_exclude_objects(self): + self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_explicit_route_include_objects(self): + """ + Getter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects (container) + + YANG Description: Container for the 'include route' object list. + """ + return self.__explicit_route_include_objects + + def _set_explicit_route_include_objects(self, v, load=False): + """ + Setter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_explicit_route_include_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_explicit_route_include_objects() directly. + + YANG Description: Container for the 'include route' object list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """explicit_route_include_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__explicit_route_include_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_explicit_route_include_objects(self): + self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + metric_type = __builtin__.property(_get_metric_type, _set_metric_type) + weight = __builtin__.property(_get_weight, _set_weight) + explicit_route_exclude_objects = __builtin__.property(_get_explicit_route_exclude_objects, _set_explicit_route_exclude_objects) + explicit_route_include_objects = __builtin__.property(_get_explicit_route_include_objects, _set_explicit_route_include_objects) + + __choices__ = {'algorithm': {'metric': ['metric_type', 'weight', 'explicit_route_exclude_objects', 'explicit_route_include_objects']}} + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('weight', weight), ('explicit_route_exclude_objects', explicit_route_exclude_objects), ('explicit_route_include_objects', explicit_route_include_objects), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f81d927f3a7fc066f47ad055904cf65e0bb729a3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import route_object_exclude_object +class explicit_route_exclude_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the 'exclude route' object list. + """ + __slots__ = ('_path_helper', '_extmethods', '__route_object_exclude_object',) + + _yang_name = 'explicit-route-exclude-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects'] + + def _get_route_object_exclude_object(self): + """ + Getter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + return self.__route_object_exclude_object + + def _set_route_object_exclude_object(self, v, load=False): + """ + Setter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_route_object_exclude_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_route_object_exclude_object() directly. + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """route_object_exclude_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__route_object_exclude_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_route_object_exclude_object(self): + self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + route_object_exclude_object = __builtin__.property(_get_route_object_exclude_object, _set_route_object_exclude_object) + + __choices__ = {'algorithm': {'metric': ['route_object_exclude_object']}} + _pyangbind_elements = OrderedDict([('route_object_exclude_object', route_object_exclude_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0ce09fde14ab1f2f1e56ed189aa62110a1ba07a2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,365 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +from . import srlg +class route_object_exclude_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop','__srlg',) + + _yang_name = 'route-object-exclude-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_srlg(self): + """ + Getter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) + + YANG Description: SRLG container. + """ + return self.__srlg + + def _set_srlg(self, v, load=False): + """ + Setter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_srlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_srlg() directly. + + YANG Description: SRLG container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """srlg must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__srlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_srlg(self): + self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + srlg = __builtin__.property(_get_srlg, _set_srlg) + + __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop'], 'srlg': ['srlg']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ('srlg', srlg), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0cbff483c1e7a2c9999c02c3155508169a8071ce --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5acd3647742511b6b1deca0051576521cdd967aa --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aadad5c2c2c8d745e7f41c6d7d6ba38fe2537810 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6c0b396ee7d0ae6a237131987bf3e8514244893f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bda9afb8438c86eca19dde2b7f4a8c90b8b67064 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5c7cd97f18083e5cb1bee25bbefcf3d465f68e7a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9fdf3924968411d9f77d42b907982b67ceda3a26 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class srlg(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/srlg. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: SRLG container. + """ + __slots__ = ('_path_helper', '_extmethods', '__srlg',) + + _yang_name = 'srlg' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'srlg'] + + def _get_srlg(self): + """ + Getter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) + + YANG Description: SRLG value. + """ + return self.__srlg + + def _set_srlg(self, v, load=False): + """ + Setter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_srlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_srlg() directly. + + YANG Description: SRLG value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """srlg must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__srlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_srlg(self): + self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + srlg = __builtin__.property(_get_srlg, _set_srlg) + + __choices__ = {'type': {'srlg': ['srlg']}} + _pyangbind_elements = OrderedDict([('srlg', srlg), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b5794e333a5155532f3a0af6b0647939d5d4f964 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f5e9a3732126f9480005cfee1746e3ce154243af --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import route_object_include_object +class explicit_route_include_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the 'include route' object list. + """ + __slots__ = ('_path_helper', '_extmethods', '__route_object_include_object',) + + _yang_name = 'explicit-route-include-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects'] + + def _get_route_object_include_object(self): + """ + Getter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + return self.__route_object_include_object + + def _set_route_object_include_object(self, v, load=False): + """ + Setter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_route_object_include_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_route_object_include_object() directly. + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """route_object_include_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__route_object_include_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_route_object_include_object(self): + self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + route_object_include_object = __builtin__.property(_get_route_object_include_object, _set_route_object_include_object) + + __choices__ = {'algorithm': {'metric': ['route_object_include_object']}} + _pyangbind_elements = OrderedDict([('route_object_include_object', route_object_include_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..374536eb4a03613662b8edb0cb12bc447d9e0340 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,325 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class route_object_include_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'route-object-include-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0b9ce19d6fb5071f1285e74ed70a8cf256980397 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b21890c48b0310bf39896972ca3f76bf2f0d91c1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..df8c1361951da40f39c4baef79c1402c08cf7882 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fef4856ef2c1720a443a226ac6bdbd347097b72 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..97b264f0df4730b294424e89f9d7b7aec427c1e5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..218283dca241717d1ea5bbd904562ee30751dc59 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ce387660e79d92b814eb12f9cabf9777d6cc8bc7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5dbea3946289108d2b2c3ddebe78bbfaa158aa05 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tiebreaker +class tiebreakers(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/tiebreakers. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of tiebreakers. + """ + __slots__ = ('_path_helper', '_extmethods', '__tiebreaker',) + + _yang_name = 'tiebreakers' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'tiebreakers'] + + def _get_tiebreaker(self): + """ + Getter method for tiebreaker, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker (list) + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + return self.__tiebreaker + + def _set_tiebreaker(self, v, load=False): + """ + Setter method for tiebreaker, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreaker is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreaker() directly. + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreaker must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__tiebreaker = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreaker(self): + self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + tiebreaker = __builtin__.property(_get_tiebreaker, _set_tiebreaker) + + __choices__ = {'algorithm': {'metric': ['tiebreaker']}} + _pyangbind_elements = OrderedDict([('tiebreaker', tiebreaker), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6c879cb008a89e64a10388b6d404580a09162a6b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tiebreaker(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/optimizations/tiebreakers/tiebreaker. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + __slots__ = ('_path_helper', '_extmethods', '__tiebreaker_type',) + + _yang_name = 'tiebreaker' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'optimizations', 'tiebreakers', 'tiebreaker'] + + def _get_tiebreaker_type(self): + """ + Getter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) + + YANG Description: Identifies an entry in the list of tiebreakers. + """ + return self.__tiebreaker_type + + def _set_tiebreaker_type(self, v, load=False): + """ + Setter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreaker_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreaker_type() directly. + + YANG Description: Identifies an entry in the list of tiebreakers. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreaker_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tiebreaker_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreaker_type(self): + self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + tiebreaker_type = __builtin__.property(_get_tiebreaker_type, _set_tiebreaker_type) + + __choices__ = {'algorithm': {'metric': ['tiebreaker_type']}} + _pyangbind_elements = OrderedDict([('tiebreaker_type', tiebreaker_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f737852bfcfe03d7e1b344472f9e92029947eccb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py @@ -0,0 +1,523 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +from . import path_metric_bounds +from . import path_affinities_values +from . import path_affinity_names +from . import path_srlgs_lists +from . import path_srlgs_names +class path_constraints(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE named path constraints container. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth','__link_protection','__setup_priority','__hold_priority','__signaling_type','__path_metric_bounds','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__disjointness',) + + _yang_name = 'path-constraints' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints'] + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_link_protection(self): + """ + Getter method for link_protection, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/link_protection (identityref) + + YANG Description: Link protection type required for the links included +in the computed path. + """ + return self.__link_protection + + def _set_link_protection(self, v, load=False): + """ + Setter method for link_protection, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/link_protection (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_protection is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_protection() directly. + + YANG Description: Link protection type required for the links included +in the computed path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_protection must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__link_protection = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_protection(self): + self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_setup_priority(self): + """ + Getter method for setup_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/setup_priority (uint8) + + YANG Description: TE LSP requested setup priority. + """ + return self.__setup_priority + + def _set_setup_priority(self, v, load=False): + """ + Setter method for setup_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/setup_priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_setup_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_setup_priority() directly. + + YANG Description: TE LSP requested setup priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """setup_priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__setup_priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_setup_priority(self): + self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_hold_priority(self): + """ + Getter method for hold_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/hold_priority (uint8) + + YANG Description: TE LSP requested hold priority. + """ + return self.__hold_priority + + def _set_hold_priority(self, v, load=False): + """ + Setter method for hold_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/hold_priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_hold_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hold_priority() directly. + + YANG Description: TE LSP requested hold priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hold_priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__hold_priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_hold_priority(self): + self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_signaling_type(self): + """ + Getter method for signaling_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/signaling_type (identityref) + + YANG Description: TE tunnel path signaling type. + """ + return self.__signaling_type + + def _set_signaling_type(self, v, load=False): + """ + Setter method for signaling_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/signaling_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_signaling_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_signaling_type() directly. + + YANG Description: TE tunnel path signaling type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """signaling_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__signaling_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_signaling_type(self): + self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_path_metric_bounds(self): + """ + Getter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds (container) + + YANG Description: TE path metric bounds container. + """ + return self.__path_metric_bounds + + def _set_path_metric_bounds(self, v, load=False): + """ + Setter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric_bounds is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric_bounds() directly. + + YANG Description: TE path metric bounds container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric_bounds must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_metric_bounds = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric_bounds(self): + self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_affinities_values(self): + """ + Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values (container) + + YANG Description: Path affinities represented as values. + """ + return self.__path_affinities_values + + def _set_path_affinities_values(self, v, load=False): + """ + Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_values() directly. + + YANG Description: Path affinities represented as values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_values must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_affinities_values = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_values(self): + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_affinity_names(self): + """ + Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names (container) + + YANG Description: Path affinities represented as names. + """ + return self.__path_affinity_names + + def _set_path_affinity_names(self, v, load=False): + """ + Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_names() directly. + + YANG Description: Path affinities represented as names. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_affinity_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_names(self): + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_srlgs_lists(self): + """ + Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists (container) + + YANG Description: Path SRLG properties container. + """ + return self.__path_srlgs_lists + + def _set_path_srlgs_lists(self, v, load=False): + """ + Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_lists is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_lists() directly. + + YANG Description: Path SRLG properties container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_lists must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_srlgs_lists = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_lists(self): + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_srlgs_names(self): + """ + Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names (container) + + YANG Description: Container for the list of named SRLGs. + """ + return self.__path_srlgs_names + + def _set_path_srlgs_names(self, v, load=False): + """ + Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_names() directly. + + YANG Description: Container for the list of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_srlgs_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_names(self): + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_disjointness(self): + """ + Getter method for disjointness, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/disjointness (te-path-disjointness) + + YANG Description: The type of resource disjointness. +When configured for a primary path, the disjointness level +applies to all secondary LSPs. When configured for a +secondary path, the disjointness level overrides the level +configured for the primary path. + """ + return self.__disjointness + + def _set_disjointness(self, v, load=False): + """ + Setter method for disjointness, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/disjointness (te-path-disjointness) + If this variable is read-only (config: false) in the + source YANG file, then _set_disjointness is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_disjointness() directly. + + YANG Description: The type of resource disjointness. +When configured for a primary path, the disjointness level +applies to all secondary LSPs. When configured for a +secondary path, the disjointness level overrides the level +configured for the primary path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """disjointness must be of a type compatible with te-path-disjointness""", + 'defined-type': "ietf-te-topology:te-path-disjointness", + 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True)""", + }) + + self.__disjointness = t + if hasattr(self, '_set'): + self._set() + + def _unset_disjointness(self): + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) + + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + link_protection = __builtin__.property(_get_link_protection, _set_link_protection) + setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority) + hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority) + signaling_type = __builtin__.property(_get_signaling_type, _set_signaling_type) + path_metric_bounds = __builtin__.property(_get_path_metric_bounds, _set_path_metric_bounds) + path_affinities_values = __builtin__.property(_get_path_affinities_values, _set_path_affinities_values) + path_affinity_names = __builtin__.property(_get_path_affinity_names, _set_path_affinity_names) + path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists, _set_path_srlgs_lists) + path_srlgs_names = __builtin__.property(_get_path_srlgs_names, _set_path_srlgs_names) + disjointness = __builtin__.property(_get_disjointness, _set_disjointness) + + + _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ('link_protection', link_protection), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('signaling_type', signaling_type), ('path_metric_bounds', path_metric_bounds), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('disjointness', disjointness), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e3265c0729d76820783333b4db0fa0b49c60f46 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinities_value +class path_affinities_values(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-affinities-values. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as values. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) + + _yang_name = 'path-affinities-values' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-affinities-values'] + + def _get_path_affinities_value(self): + """ + Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinities_value + + def _set_path_affinities_value(self, v, load=False): + """ + Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_value() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_value must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_affinities_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_value(self): + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_affinities_value = __builtin__.property(_get_path_affinities_value, _set_path_affinities_value) + + + _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8d6c0465d7071071b70e7292196d934bea81fe4f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_affinities_value(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-affinities-values/path-affinities-value. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) + + _yang_name = 'path-affinities-value' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-affinities-values', 'path-affinities-value'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) + + YANG Description: The affinity value. The default is empty. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: The affinity value. The default is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with admin-groups""", + 'defined-type': "ietf-te-topology:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + value = __builtin__.property(_get_value, _set_value) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..93c042152835d0343828db33f1ccbdcc9fd0e712 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinity_name +class path_affinity_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-affinity-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as names. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) + + _yang_name = 'path-affinity-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-affinity-names'] + + def _get_path_affinity_name(self): + """ + Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinity_name + + def _set_path_affinity_name(self, v, load=False): + """ + Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_name() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_name(self): + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_affinity_name = __builtin__.property(_get_path_affinity_name, _set_path_affinity_name) + + + _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8f1e020959c1d9b22eeeaa6ca728765d5e967e0d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import affinity_name +class path_affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-affinity-names/path-affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) + + _yang_name = 'path-affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-affinity-names', 'path-affinity-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_affinity_name(self): + """ + Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) + + YANG Description: List of named affinities. + """ + return self.__affinity_name + + def _set_affinity_name(self, v, load=False): + """ + Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_affinity_name() directly. + + YANG Description: List of named affinities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_affinity_name(self): + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + affinity_name = __builtin__.property(_get_affinity_name, _set_affinity_name) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..84a532259c1bf948a93bf5e76256cc75a7159567 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-affinity-names/path-affinity-name/affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinities. + """ + __slots__ = ('_path_helper', '_extmethods', '__name',) + + _yang_name = 'affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) + + YANG Description: Identifies a named affinity entry. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Identifies a named affinity entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + name = __builtin__.property(_get_name, _set_name) + + + _pyangbind_elements = OrderedDict([('name', name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..62154c4c0deac0a7b49e13cae45e760e872d0716 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_metric_bound +class path_metric_bounds(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-metric-bounds. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric bounds container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound',) + + _yang_name = 'path-metric-bounds' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-metric-bounds'] + + def _get_path_metric_bound(self): + """ + Getter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound (list) + + YANG Description: List of TE path metric bounds. + """ + return self.__path_metric_bound + + def _set_path_metric_bound(self, v, load=False): + """ + Setter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric_bound is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric_bound() directly. + + YANG Description: List of TE path metric bounds. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric_bound must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_metric_bound = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric_bound(self): + self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_metric_bound = __builtin__.property(_get_path_metric_bound, _set_path_metric_bound) + + + _pyangbind_elements = OrderedDict([('path_metric_bound', path_metric_bound), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..61dd53dffe3102ad34f4a1a9db4ef7df9b306171 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,165 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_metric_bound(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-metric-bounds/path-metric-bound. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of TE path metric bounds. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__upper_bound',) + + _yang_name = 'path-metric-bound' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-metric-bounds', 'path-metric-bound'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) + + YANG Description: Identifies an entry in the list of 'metric-type' items +bound for the TE path. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: Identifies an entry in the list of 'metric-type' items +bound for the TE path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_upper_bound(self): + """ + Getter method for upper_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) + + YANG Description: Upper bound on the end-to-end TE path metric. A zero +indicates an unbounded upper limit for the specific +'metric-type'. + """ + return self.__upper_bound + + def _set_upper_bound(self, v, load=False): + """ + Setter method for upper_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_upper_bound is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_upper_bound() directly. + + YANG Description: Upper bound on the end-to-end TE path metric. A zero +indicates an unbounded upper limit for the specific +'metric-type'. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """upper_bound must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__upper_bound = t + if hasattr(self, '_set'): + self._set() + + def _unset_upper_bound(self): + self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + + metric_type = __builtin__.property(_get_metric_type, _set_metric_type) + upper_bound = __builtin__.property(_get_upper_bound, _set_upper_bound) + + + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('upper_bound', upper_bound), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..28e1d8c74eba76ce3fbe5f1e38cffd564a78282d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_list +class path_srlgs_lists(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-srlgs-lists. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path SRLG properties container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) + + _yang_name = 'path-srlgs-lists' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-srlgs-lists'] + + def _get_path_srlgs_list(self): + """ + Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list (list) + + YANG Description: List of SRLG values to be included or excluded. + """ + return self.__path_srlgs_list + + def _set_path_srlgs_list(self, v, load=False): + """ + Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_list() directly. + + YANG Description: List of SRLG values to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_list must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_srlgs_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_list(self): + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_srlgs_list = __builtin__.property(_get_path_srlgs_list, _set_path_srlgs_list) + + + _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a41c502dbcedab66dbdb30dcb749e9895d3f88b1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_list(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-srlgs-lists/path-srlgs-list. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of SRLG values to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) + + _yang_name = 'path-srlgs-list' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-srlgs-lists', 'path-srlgs-list'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_values(self): + """ + Getter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) + + YANG Description: List of SRLG values. + """ + return self.__values + + def _set_values(self, v, load=False): + """ + Setter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_values() directly. + + YANG Description: List of SRLG values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """values must be of a type compatible with srlg""", + 'defined-type': "ietf-te-topology:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True)""", + }) + + self.__values = t + if hasattr(self, '_set'): + self._set() + + def _unset_values(self): + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + values = __builtin__.property(_get_values, _set_values) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..964651c73accfe8a8e3076374aae9fe673844c9f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_name +class path_srlgs_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-srlgs-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of named SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) + + _yang_name = 'path-srlgs-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-srlgs-names'] + + def _get_path_srlgs_name(self): + """ + Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name (list) + + YANG Description: List of named SRLGs to be included or excluded. + """ + return self.__path_srlgs_name + + def _set_path_srlgs_name(self, v, load=False): + """ + Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_name() directly. + + YANG Description: List of named SRLGs to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_srlgs_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_name(self): + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_srlgs_name = __builtin__.property(_get_path_srlgs_name, _set_path_srlgs_name) + + + _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2ae4647f9aecd4be075fa67d98d42765922081f9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/path-srlgs-names/path-srlgs-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named SRLGs to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) + + _yang_name = 'path-srlgs-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'path-srlgs-names', 'path-srlgs-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_names(self): + """ + Getter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/names (string) + + YANG Description: List of named SRLGs. + """ + return self.__names + + def _set_names(self, v, load=False): + """ + Setter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/names (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_names() directly. + + YANG Description: List of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """names must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__names = t + if hasattr(self, '_set'): + self._set() + + def _unset_names(self): + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + names = __builtin__.property(_get_names, _set_names) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9d086807ab378b0c94eabdecbca9da35137aa8f6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8edd4ebde41cc7fdd55ac3ea16fc07871fd719dd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + + def _get_odtu_flex_type(self): + """ + Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +set up along the underlay path of this OTN Local +Link Connectivyt entry. + """ + return self.__odtu_flex_type + + def _set_odtu_flex_type(self, v, load=False): + """ + Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_odtu_flex_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odtu_flex_type() directly. + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +set up along the underlay path of this OTN Local +Link Connectivyt entry. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", + 'defined-type': "l1-types:odtu-flex-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", + }) + + self.__odtu_flex_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odtu_flex_type(self): + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + odulist = __builtin__.property(_get_odulist, _set_odulist) + odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) + + __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} + _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..22a8a8f859f7c787bcf6899bdb2887fbadce9d62 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-constraints/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-constraints', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + number = __builtin__.property(_get_number, _set_number) + ts_number = __builtin__.property(_get_ts_number, _set_ts_number) + + __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8d881474f2984fc4af3230caa846eb05d5a6342a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py @@ -0,0 +1,318 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_metric +from . import path_affinities_values +from . import path_affinity_names +from . import path_srlgs_lists +from . import path_srlgs_names +from . import path_route_objects +class path_properties(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The TE path properties. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_metric','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__path_route_objects',) + + _yang_name = 'path-properties' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties'] + + def _get_path_metric(self): + """ + Getter method for path_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric (list) + + YANG Description: TE path metric type. + """ + return self.__path_metric + + def _set_path_metric(self, v, load=False): + """ + Setter method for path_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric() directly. + + YANG Description: TE path metric type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric(self): + self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_path_affinities_values(self): + """ + Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values (container) + + YANG Description: Path affinities represented as values. + """ + return self.__path_affinities_values + + def _set_path_affinities_values(self, v, load=False): + """ + Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_values() directly. + + YANG Description: Path affinities represented as values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_values must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinities_values = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_values(self): + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_affinity_names(self): + """ + Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names (container) + + YANG Description: Path affinities represented as names. + """ + return self.__path_affinity_names + + def _set_path_affinity_names(self, v, load=False): + """ + Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_names() directly. + + YANG Description: Path affinities represented as names. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinity_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_names(self): + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_lists(self): + """ + Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists (container) + + YANG Description: Path SRLG properties container. + """ + return self.__path_srlgs_lists + + def _set_path_srlgs_lists(self, v, load=False): + """ + Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_lists is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_lists() directly. + + YANG Description: Path SRLG properties container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_lists must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_lists = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_lists(self): + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_names(self): + """ + Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names (container) + + YANG Description: Container for the list of named SRLGs. + """ + return self.__path_srlgs_names + + def _set_path_srlgs_names(self, v, load=False): + """ + Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_names() directly. + + YANG Description: Container for the list of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_names(self): + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_route_objects(self): + """ + Getter method for path_route_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects (container) + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + return self.__path_route_objects + + def _set_path_route_objects(self, v, load=False): + """ + Setter method for path_route_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_route_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_route_objects() directly. + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_route_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_route_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_route_objects(self): + self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + path_metric = __builtin__.property(_get_path_metric) + path_affinities_values = __builtin__.property(_get_path_affinities_values) + path_affinity_names = __builtin__.property(_get_path_affinity_names) + path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) + path_srlgs_names = __builtin__.property(_get_path_srlgs_names) + path_route_objects = __builtin__.property(_get_path_route_objects) + + + _pyangbind_elements = OrderedDict([('path_metric', path_metric), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('path_route_objects', path_route_objects), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3384b6a42e7ed530221f3ea1505e999fdefb73db --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinities_value +class path_affinities_values(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-affinities-values. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as values. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) + + _yang_name = 'path-affinities-values' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-affinities-values'] + + def _get_path_affinities_value(self): + """ + Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinities_value + + def _set_path_affinities_value(self, v, load=False): + """ + Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_value() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_value must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinities_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_value(self): + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinities_value = __builtin__.property(_get_path_affinities_value) + + + _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..626f7d24037391d083bb55c1b9135783954c867d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_affinities_value(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-affinities-values/path-affinities-value. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) + + _yang_name = 'path-affinities-value' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-affinities-values', 'path-affinities-value'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/usage (identityref) + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) + + YANG Description: The affinity value. The default is empty. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: The affinity value. The default is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with admin-groups""", + 'defined-type': "ietf-te-topology:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + usage = __builtin__.property(_get_usage) + value = __builtin__.property(_get_value) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3fc26577e1b13b6bee6537f99d5be9369fd3f3c6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinity_name +class path_affinity_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-affinity-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as names. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) + + _yang_name = 'path-affinity-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-affinity-names'] + + def _get_path_affinity_name(self): + """ + Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinity_name + + def _set_path_affinity_name(self, v, load=False): + """ + Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_name() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_name(self): + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinity_name = __builtin__.property(_get_path_affinity_name) + + + _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..63035d44dd3fdd4b30b37bd16b316b8f90e31b0b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import affinity_name +class path_affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-affinity-names/path-affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) + + _yang_name = 'path-affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-affinity-names', 'path-affinity-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/usage (identityref) + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_affinity_name(self): + """ + Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) + + YANG Description: List of named affinities. + """ + return self.__affinity_name + + def _set_affinity_name(self, v, load=False): + """ + Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_affinity_name() directly. + + YANG Description: List of named affinities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_affinity_name(self): + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + usage = __builtin__.property(_get_usage) + affinity_name = __builtin__.property(_get_affinity_name) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42383ee4d247fdfb6b351fad04628e72db2022e3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-affinity-names/path-affinity-name/affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinities. + """ + __slots__ = ('_path_helper', '_extmethods', '__name',) + + _yang_name = 'affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) + + YANG Description: Identifies a named affinity entry. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Identifies a named affinity entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + name = __builtin__.property(_get_name) + + + _pyangbind_elements = OrderedDict([('name', name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5a283282dbd0921574717dd049ba6ec7cdc435f2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_metric(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-metric. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric type. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__accumulative_value',) + + _yang_name = 'path-metric' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-metric'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/metric_type (identityref) + + YANG Description: TE path metric type. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: TE path metric type. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_accumulative_value(self): + """ + Getter method for accumulative_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/accumulative_value (uint64) + + YANG Description: TE path metric accumulative value. + """ + return self.__accumulative_value + + def _set_accumulative_value(self, v, load=False): + """ + Setter method for accumulative_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/accumulative_value (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_accumulative_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_accumulative_value() directly. + + YANG Description: TE path metric accumulative value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """accumulative_value must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__accumulative_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_accumulative_value(self): + self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + metric_type = __builtin__.property(_get_metric_type) + accumulative_value = __builtin__.property(_get_accumulative_value) + + + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('accumulative_value', accumulative_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..425ac19d0ba2ad2089694efa68733b4a4df87be9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_route_object +class path_route_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_route_object',) + + _yang_name = 'path-route-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects'] + + def _get_path_route_object(self): + """ + Getter method for path_route_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object (list) + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + return self.__path_route_object + + def _set_path_route_object(self, v, load=False): + """ + Setter method for path_route_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_route_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_route_object() directly. + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_route_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_route_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_route_object(self): + self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_route_object = __builtin__.property(_get_path_route_object) + + + _pyangbind_elements = OrderedDict([('path_route_object', path_route_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..abb7aee29bfcff96c141252b8b576eee2bc77580 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,327 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_route_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-route-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key +values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key +values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + index = __builtin__.property(_get_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b3d293b8351e545985c03b1d6932795428635e61 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..10f4a55b7ebcaf51bc5be227c28139119e9638e6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8764e4794ccf6b384a53d66c77dc2fd17bd202ea --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..25a5ec822fcb142ca575a1d09946fd504aac40aa --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7f9882c112f2d67c83372e89ba435e131f90edaa --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c406a2f54e28223ea024680f6781b5cf5bd44eb1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c965f3ce1f85c93f8af1465d77cd6ae33b014c1b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-route-objects/path-route-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-route-objects', 'path-route-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..db6b557eb1491d21d65f67be69d642a0fb956024 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_list +class path_srlgs_lists(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-srlgs-lists. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path SRLG properties container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) + + _yang_name = 'path-srlgs-lists' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-srlgs-lists'] + + def _get_path_srlgs_list(self): + """ + Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list (list) + + YANG Description: List of SRLG values to be included or excluded. + """ + return self.__path_srlgs_list + + def _set_path_srlgs_list(self, v, load=False): + """ + Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_list() directly. + + YANG Description: List of SRLG values to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_list must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_list(self): + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_list = __builtin__.property(_get_path_srlgs_list) + + + _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..909764a6d1e8e0bfe61d9044d8e85d8cc4cb9c8c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_list(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-srlgs-lists/path-srlgs-list. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of SRLG values to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) + + _yang_name = 'path-srlgs-list' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-srlgs-lists', 'path-srlgs-list'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_values(self): + """ + Getter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) + + YANG Description: List of SRLG values. + """ + return self.__values + + def _set_values(self, v, load=False): + """ + Setter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_values() directly. + + YANG Description: List of SRLG values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """values must be of a type compatible with srlg""", + 'defined-type': "ietf-te-topology:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", + }) + + self.__values = t + if hasattr(self, '_set'): + self._set() + + def _unset_values(self): + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + usage = __builtin__.property(_get_usage) + values = __builtin__.property(_get_values) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7466c4918dd186ed92cf52f6c3d00637e7136d51 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_name +class path_srlgs_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-srlgs-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of named SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) + + _yang_name = 'path-srlgs-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-srlgs-names'] + + def _get_path_srlgs_name(self): + """ + Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name (list) + + YANG Description: List of named SRLGs to be included or excluded. + """ + return self.__path_srlgs_name + + def _set_path_srlgs_name(self, v, load=False): + """ + Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_name() directly. + + YANG Description: List of named SRLGs to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_name(self): + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_name = __builtin__.property(_get_path_srlgs_name) + + + _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75f5ea586d436c798808c15cdc57103ac2b73953 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/path-properties/path-srlgs-names/path-srlgs-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named SRLGs to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) + + _yang_name = 'path-srlgs-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'path-properties', 'path-srlgs-names', 'path-srlgs-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_names(self): + """ + Getter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/names (string) + + YANG Description: List of named SRLGs. + """ + return self.__names + + def _set_names(self, v, load=False): + """ + Setter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/names (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_names() directly. + + YANG Description: List of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """names must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__names = t + if hasattr(self, '_set'): + self._set() + + def _unset_names(self): + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + usage = __builtin__.property(_get_usage) + names = __builtin__.property(_get_names) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e4c8bb6d3b582017cb7ac23a67e8b788a412e646 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py @@ -0,0 +1,326 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import primary_path +from . import backup_path +from . import tunnel_termination_points +from . import tunnels +class underlay(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Attributes of the TE link underlay. + """ + __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) + + _yang_name = 'underlay' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay'] + + def _get_enabled(self): + """ + Getter method for enabled, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/enabled (boolean) + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + return self.__enabled + + def _set_enabled(self, v, load=False): + """ + Setter method for enabled, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/enabled (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_enabled is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enabled() directly. + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enabled must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__enabled = t + if hasattr(self, '_set'): + self._set() + + def _unset_enabled(self): + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_primary_path(self): + """ + Getter method for primary_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path (container) + + YANG Description: The service path on the underlay topology that +supports this link. + """ + return self.__primary_path + + def _set_primary_path(self, v, load=False): + """ + Setter method for primary_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_primary_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_primary_path() directly. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """primary_path must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__primary_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_primary_path(self): + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_backup_path(self): + """ + Getter method for backup_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path (list) + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + return self.__backup_path + + def _set_backup_path(self, v, load=False): + """ + Setter method for backup_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_backup_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_backup_path() directly. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """backup_path must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__backup_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_backup_path(self): + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_protection_type(self): + """ + Getter method for protection_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/protection_type (identityref) + + YANG Description: Underlay protection type desired for this link. + """ + return self.__protection_type + + def _set_protection_type(self, v, load=False): + """ + Setter method for protection_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/protection_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_protection_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_protection_type() directly. + + YANG Description: Underlay protection type desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """protection_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__protection_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_protection_type(self): + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_tunnel_termination_points(self): + """ + Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points (container) + + YANG Description: Underlay TTPs desired for this link. + """ + return self.__tunnel_termination_points + + def _set_tunnel_termination_points(self, v, load=False): + """ + Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_termination_points is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_termination_points() directly. + + YANG Description: Underlay TTPs desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_termination_points must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tunnel_termination_points = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_termination_points(self): + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_tunnels(self): + """ + Getter method for tunnels, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels (container) + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + return self.__tunnels + + def _set_tunnels(self, v, load=False): + """ + Setter method for tunnels, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnels is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnels() directly. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnels must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tunnels = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnels(self): + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + enabled = __builtin__.property(_get_enabled, _set_enabled) + primary_path = __builtin__.property(_get_primary_path, _set_primary_path) + backup_path = __builtin__.property(_get_backup_path, _set_backup_path) + protection_type = __builtin__.property(_get_protection_type, _set_protection_type) + tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points, _set_tunnel_termination_points) + tunnels = __builtin__.property(_get_tunnels, _set_tunnels) + + + _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f9690f9383c3ec5d4f013e28890f2ad02df14d7c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py @@ -0,0 +1,207 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class backup_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) + + _yang_name = 'backup-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/index (uint32) + + YANG Description: A sequence number to identify a backup path. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: A sequence number to identify a backup path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element (list) + + YANG Description: A list of path elements describing the backup service +path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the backup service +path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + path_element = __builtin__.property(_get_path_element, _set_path_element) + + + _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..beb298aa14f672bc2a0bf46ff0ebcb7b47005f77 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,321 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the backup service +path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..60abe510bdcf78892f0a9a2f9f0e2a682f790fbb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5ee2330a9e0c326a26439c365c98bbf212319529 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..94d9603a099b262137aa19b7b22e885364b94a38 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3dfbe742aaf061e6d11ab2e8959e42f0275caadf --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b3a906d14e0b0fec0cec35d7266587e142330a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e4e4080396d83fca58c1a2f30fc6d33a9e3c27ed --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..274e9473a569e845f1e2cabb879a4b9ad169e065 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56854b5857837e5cab85b13189ed10916c1438e6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class primary_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) + + _yang_name = 'primary-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element (list) + + YANG Description: A list of path elements describing the service path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the service path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + path_element = __builtin__.property(_get_path_element, _set_path_element) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f54312b46f7a07411770ee27ee1f360b82c2b9d9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,320 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the service path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..013370a26795f61d508e086d2eb10ec61207d3ae --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1f048ca63252d00b5550a102c254ac3970806d7a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..345fd6279609dfb0ceb951b29996de73856cc0cb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..453fa07179533dcb2a64017fd255b526f929442f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1e222d4341ea9807e87a41d694ce1fddf93874ee --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fdc5c17286825e797e93cb16dabec136e84ba130 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1f41ade4f487d23a00cee5856b9509b64fc00fe5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ae851c18fa662017979f10868a8a46fb0f2432 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel_termination_points(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/tunnel-termination-points. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TTPs desired for this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) + + _yang_name = 'tunnel-termination-points' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'tunnel-termination-points'] + + def _get_source(self): + """ + Getter method for source, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/source (binary) + + YANG Description: Source TTP identifier. + """ + return self.__source + + def _set_source(self, v, load=False): + """ + Setter method for source, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/source (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_source() directly. + + YANG Description: Source TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """source must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__source = t + if hasattr(self, '_set'): + self._set() + + def _unset_source(self): + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + + def _get_destination(self): + """ + Getter method for destination, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/destination (binary) + + YANG Description: Destination TTP identifier. + """ + return self.__destination + + def _set_destination(self, v, load=False): + """ + Setter method for destination, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/destination (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_destination is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_destination() directly. + + YANG Description: Destination TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """destination must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__destination = t + if hasattr(self, '_set'): + self._set() + + def _unset_destination(self): + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + source = __builtin__.property(_get_source, _set_source) + destination = __builtin__.property(_get_destination, _set_destination) + + + _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b49e97083a810c0ea140cb33745f326de12b0151 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py @@ -0,0 +1,167 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tunnel +class tunnels(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/tunnels. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) + + _yang_name = 'tunnels' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'tunnels'] + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_tunnel(self): + """ + Getter method for tunnel, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel (list) + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + return self.__tunnel + + def _set_tunnel(self, v, load=False): + """ + Setter method for tunnel, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel() directly. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__tunnel = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel(self): + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + sharing = __builtin__.property(_get_sharing, _set_sharing) + tunnel = __builtin__.property(_get_tunnel, _set_tunnel) + + + _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bc8bc8ecbd670ac03bab9bba8daf41436e1924ab --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,170 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/local-link-connectivity/underlay/tunnels/tunnel. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) + + _yang_name = 'tunnel' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'local-link-connectivity', 'underlay', 'tunnels', 'tunnel'] + + def _get_tunnel_name(self): + """ + Getter method for tunnel_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/tunnel_name (string) + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + return self.__tunnel_name + + def _set_tunnel_name(self, v, load=False): + """ + Setter method for tunnel_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/tunnel_name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_name() directly. + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__tunnel_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_name(self): + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + tunnel_name = __builtin__.property(_get_tunnel_name, _set_tunnel_name) + sharing = __builtin__.property(_get_sharing, _set_sharing) + + + _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5ed824918759d90f3e7cfbaa93f66622c3698763 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py @@ -0,0 +1,199 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import optimization_metric +from . import tiebreakers +from . import objective_function +class optimizations(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + __slots__ = ('_path_helper', '_extmethods', '__optimization_metric','__tiebreakers','__objective_function',) + + _yang_name = 'optimizations' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations'] + + def _get_optimization_metric(self): + """ + Getter method for optimization_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric (list) + + YANG Description: TE path metric type. + """ + return self.__optimization_metric + + def _set_optimization_metric(self, v, load=False): + """ + Setter method for optimization_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimization_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimization_metric() directly. + + YANG Description: TE path metric type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimization_metric must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__optimization_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimization_metric(self): + self.__optimization_metric = YANGDynClass(base=YANGListType("metric_type",optimization_metric.optimization_metric, yang_name="optimization-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None, choice=False), is_container='list', yang_name="optimization-metric", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_tiebreakers(self): + """ + Getter method for tiebreakers, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers (container) + + YANG Description: Container for the list of tiebreakers. + """ + return self.__tiebreakers + + def _set_tiebreakers(self, v, load=False): + """ + Setter method for tiebreakers, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreakers is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreakers() directly. + + YANG Description: Container for the list of tiebreakers. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreakers must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tiebreakers = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreakers(self): + self.__tiebreakers = YANGDynClass(base=tiebreakers.tiebreakers, is_container='container', yang_name="tiebreakers", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_objective_function(self): + """ + Getter method for objective_function, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function (container) + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + return self.__objective_function + + def _set_objective_function(self, v, load=False): + """ + Setter method for objective_function, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_objective_function is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_objective_function() directly. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """objective_function must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__objective_function = t + if hasattr(self, '_set'): + self._set() + + def _unset_objective_function(self): + self.__objective_function = YANGDynClass(base=objective_function.objective_function, is_container='container', yang_name="objective-function", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + optimization_metric = __builtin__.property(_get_optimization_metric, _set_optimization_metric) + tiebreakers = __builtin__.property(_get_tiebreakers, _set_tiebreakers) + objective_function = __builtin__.property(_get_objective_function, _set_objective_function) + + __choices__ = {'algorithm': {'metric': ['optimization_metric', 'tiebreakers'], 'objective-function': ['objective_function']}} + _pyangbind_elements = OrderedDict([('optimization_metric', optimization_metric), ('tiebreakers', tiebreakers), ('objective_function', objective_function), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3c10569db3b8424d75a3241100ff3348ed909997 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class objective_function(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/objective-function. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The objective function container that includes +attributes to impose when computing a TE path. + """ + __slots__ = ('_path_helper', '_extmethods', '__objective_function_type',) + + _yang_name = 'objective-function' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'objective-function'] + + def _get_objective_function_type(self): + """ + Getter method for objective_function_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/objective_function_type (identityref) + + YANG Description: Objective function entry. + """ + return self.__objective_function_type + + def _set_objective_function_type(self, v, load=False): + """ + Setter method for objective_function_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/objective_function/objective_function_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_objective_function_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_objective_function_type() directly. + + YANG Description: Objective function entry. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """objective_function_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__objective_function_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_objective_function_type(self): + self.__objective_function_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:of-minimize-cost-path"), is_leaf=True, yang_name="objective-function-type", parent=self, choice=('algorithm', 'objective-function'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + objective_function_type = __builtin__.property(_get_objective_function_type, _set_objective_function_type) + + __choices__ = {'algorithm': {'objective-function': ['objective_function_type']}} + _pyangbind_elements = OrderedDict([('objective_function_type', objective_function_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..abb419890db7c10441efe74dc76a073b4087d58c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/__init__.py @@ -0,0 +1,241 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import explicit_route_exclude_objects +from . import explicit_route_include_objects +class optimization_metric(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric type. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__weight','__explicit_route_exclude_objects','__explicit_route_include_objects',) + + _yang_name = 'optimization-metric' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/metric_type (identityref) + + YANG Description: Identifies the 'metric-type' that the path computation +process uses for optimization. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: Identifies the 'metric-type' that the path computation +process uses for optimization. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_weight(self): + """ + Getter method for weight, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/weight (uint8) + + YANG Description: TE path metric normalization weight. + """ + return self.__weight + + def _set_weight(self, v, load=False): + """ + Setter method for weight, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/weight (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_weight is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_weight() directly. + + YANG Description: TE path metric normalization weight. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """weight must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__weight = t + if hasattr(self, '_set'): + self._set() + + def _unset_weight(self): + self.__weight = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(1), is_leaf=True, yang_name="weight", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_explicit_route_exclude_objects(self): + """ + Getter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects (container) + + YANG Description: Container for the 'exclude route' object list. + """ + return self.__explicit_route_exclude_objects + + def _set_explicit_route_exclude_objects(self, v, load=False): + """ + Setter method for explicit_route_exclude_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_explicit_route_exclude_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_explicit_route_exclude_objects() directly. + + YANG Description: Container for the 'exclude route' object list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """explicit_route_exclude_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__explicit_route_exclude_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_explicit_route_exclude_objects(self): + self.__explicit_route_exclude_objects = YANGDynClass(base=explicit_route_exclude_objects.explicit_route_exclude_objects, is_container='container', yang_name="explicit-route-exclude-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_explicit_route_include_objects(self): + """ + Getter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects (container) + + YANG Description: Container for the 'include route' object list. + """ + return self.__explicit_route_include_objects + + def _set_explicit_route_include_objects(self, v, load=False): + """ + Setter method for explicit_route_include_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_explicit_route_include_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_explicit_route_include_objects() directly. + + YANG Description: Container for the 'include route' object list. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """explicit_route_include_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__explicit_route_include_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_explicit_route_include_objects(self): + self.__explicit_route_include_objects = YANGDynClass(base=explicit_route_include_objects.explicit_route_include_objects, is_container='container', yang_name="explicit-route-include-objects", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + metric_type = __builtin__.property(_get_metric_type, _set_metric_type) + weight = __builtin__.property(_get_weight, _set_weight) + explicit_route_exclude_objects = __builtin__.property(_get_explicit_route_exclude_objects, _set_explicit_route_exclude_objects) + explicit_route_include_objects = __builtin__.property(_get_explicit_route_include_objects, _set_explicit_route_include_objects) + + __choices__ = {'algorithm': {'metric': ['metric_type', 'weight', 'explicit_route_exclude_objects', 'explicit_route_include_objects']}} + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('weight', weight), ('explicit_route_exclude_objects', explicit_route_exclude_objects), ('explicit_route_include_objects', explicit_route_include_objects), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3831dbff9b1144fa1415a445b89031271bd42649 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import route_object_exclude_object +class explicit_route_exclude_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the 'exclude route' object list. + """ + __slots__ = ('_path_helper', '_extmethods', '__route_object_exclude_object',) + + _yang_name = 'explicit-route-exclude-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects'] + + def _get_route_object_exclude_object(self): + """ + Getter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + return self.__route_object_exclude_object + + def _set_route_object_exclude_object(self, v, load=False): + """ + Setter method for route_object_exclude_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_route_object_exclude_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_route_object_exclude_object() directly. + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """route_object_exclude_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__route_object_exclude_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_route_object_exclude_object(self): + self.__route_object_exclude_object = YANGDynClass(base=YANGListType("index",route_object_exclude_object.route_object_exclude_object, yang_name="route-object-exclude-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-exclude-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + route_object_exclude_object = __builtin__.property(_get_route_object_exclude_object, _set_route_object_exclude_object) + + __choices__ = {'algorithm': {'metric': ['route_object_exclude_object']}} + _pyangbind_elements = OrderedDict([('route_object_exclude_object', route_object_exclude_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dea360b243ea8087c4f2a0945c9a230d073d9ecd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,365 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +from . import srlg +class route_object_exclude_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of Explicit Route Objects to be excluded in the +path computation. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop','__srlg',) + + _yang_name = 'route-object-exclude-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_srlg(self): + """ + Getter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) + + YANG Description: SRLG container. + """ + return self.__srlg + + def _set_srlg(self, v, load=False): + """ + Setter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_srlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_srlg() directly. + + YANG Description: SRLG container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """srlg must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__srlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_srlg(self): + self.__srlg = YANGDynClass(base=srlg.srlg, is_container='container', yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + srlg = __builtin__.property(_get_srlg, _set_srlg) + + __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop'], 'srlg': ['srlg']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ('srlg', srlg), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c2450591ff591b28c8a20d81e919adb39fff1e79 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..05755c89d8c3b35e5d79a27360663653f365d31d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aaf8055717a002732b93666eb0ca309f3aba8f35 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f8e446cfb477bdb47f7bcc9668ae1fd9282ce086 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fe5117d928b39ec1fe5ea702638d9af153099e3b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..421eefdb3c6873a6876d81c59c9d9b774edfaf54 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e2dd6a91a18271038d0f0438e88f620b138dec0d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/__init__.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class srlg(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/srlg. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: SRLG container. + """ + __slots__ = ('_path_helper', '_extmethods', '__srlg',) + + _yang_name = 'srlg' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'srlg'] + + def _get_srlg(self): + """ + Getter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) + + YANG Description: SRLG value. + """ + return self.__srlg + + def _set_srlg(self, v, load=False): + """ + Setter method for srlg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/srlg/srlg (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_srlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_srlg() directly. + + YANG Description: SRLG value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """srlg must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__srlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_srlg(self): + self.__srlg = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="srlg", parent=self, choice=('type', 'srlg'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + srlg = __builtin__.property(_get_srlg, _set_srlg) + + __choices__ = {'type': {'srlg': ['srlg']}} + _pyangbind_elements = OrderedDict([('srlg', srlg), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cd0b15cae91a4541ffd79125eaac5b2f55b517d3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-exclude-objects/route-object-exclude-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-exclude-objects', 'route-object-exclude-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af5c34bd287e8e7c748f300ab2feaf8349a2472 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import route_object_include_object +class explicit_route_include_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the 'include route' object list. + """ + __slots__ = ('_path_helper', '_extmethods', '__route_object_include_object',) + + _yang_name = 'explicit-route-include-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects'] + + def _get_route_object_include_object(self): + """ + Getter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + return self.__route_object_include_object + + def _set_route_object_include_object(self, v, load=False): + """ + Setter method for route_object_include_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_route_object_include_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_route_object_include_object() directly. + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """route_object_include_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__route_object_include_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_route_object_include_object(self): + self.__route_object_include_object = YANGDynClass(base=YANGListType("index",route_object_include_object.route_object_include_object, yang_name="route-object-include-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="route-object-include-object", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + route_object_include_object = __builtin__.property(_get_route_object_include_object, _set_route_object_include_object) + + __choices__ = {'algorithm': {'metric': ['route_object_include_object']}} + _pyangbind_elements = OrderedDict([('route_object_include_object', route_object_include_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..43968474bf22d558ba037ace70ad27b486fd8faa --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,325 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class route_object_include_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of Explicit Route Objects to be included in the +path computation. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'route-object-include-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'algorithm': {'metric': ['index']}, 'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ad6d9db46c085a14427a5e94c9a54f4abb133cf2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d1ce0f206df0bf10b7b8f78ae15f6fbfd315b03c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..66d61a6af0012e236d4097d062c9217698f6db20 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..24d91aba654ef76431291309a56dd2779acf25a6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bec617c3fa4e11573d500def11067009e0b95c83 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6281dee5fde2d3645a433846903a110ab8d9813e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9150e2a6ed50b034d1669d1e49f080aa3bd40fc3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/optimization-metric/explicit-route-include-objects/route-object-include-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'optimization-metric', 'explicit-route-include-objects', 'route-object-include-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/optimization_metric/explicit_route_include_objects/route_object_include_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f5a272d7ff3a71cf63d6e16d7825b9b3298df004 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tiebreaker +class tiebreakers(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/tiebreakers. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of tiebreakers. + """ + __slots__ = ('_path_helper', '_extmethods', '__tiebreaker',) + + _yang_name = 'tiebreakers' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'tiebreakers'] + + def _get_tiebreaker(self): + """ + Getter method for tiebreaker, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker (list) + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + return self.__tiebreaker + + def _set_tiebreaker(self, v, load=False): + """ + Setter method for tiebreaker, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreaker is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreaker() directly. + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreaker must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__tiebreaker = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreaker(self): + self.__tiebreaker = YANGDynClass(base=YANGListType("tiebreaker_type",tiebreaker.tiebreaker, yang_name="tiebreaker", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tiebreaker-type', extensions=None, choice=('algorithm', 'metric')), is_container='list', yang_name="tiebreaker", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + tiebreaker = __builtin__.property(_get_tiebreaker, _set_tiebreaker) + + __choices__ = {'algorithm': {'metric': ['tiebreaker']}} + _pyangbind_elements = OrderedDict([('tiebreaker', tiebreaker), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2a5ad102ada2c667c7e9fd37d6419baff6b3ad36 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tiebreaker(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/optimizations/tiebreakers/tiebreaker. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The list of tiebreaker criteria to apply on an +equally favored set of paths, in order to pick +the best. + """ + __slots__ = ('_path_helper', '_extmethods', '__tiebreaker_type',) + + _yang_name = 'tiebreaker' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'optimizations', 'tiebreakers', 'tiebreaker'] + + def _get_tiebreaker_type(self): + """ + Getter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) + + YANG Description: Identifies an entry in the list of tiebreakers. + """ + return self.__tiebreaker_type + + def _set_tiebreaker_type(self, v, load=False): + """ + Setter method for tiebreaker_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/tiebreakers/tiebreaker/tiebreaker_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tiebreaker_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tiebreaker_type() directly. + + YANG Description: Identifies an entry in the list of tiebreakers. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tiebreaker_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tiebreaker_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tiebreaker_type(self): + self.__tiebreaker_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="tiebreaker-type", parent=self, choice=('algorithm', 'metric'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + tiebreaker_type = __builtin__.property(_get_tiebreaker_type, _set_tiebreaker_type) + + __choices__ = {'algorithm': {'metric': ['tiebreaker_type']}} + _pyangbind_elements = OrderedDict([('tiebreaker_type', tiebreaker_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..995e60b8b8d8c0afe207ea8c44a73c34ae1af587 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py @@ -0,0 +1,523 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +from . import path_metric_bounds +from . import path_affinities_values +from . import path_affinity_names +from . import path_srlgs_lists +from . import path_srlgs_names +class path_constraints(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE named path constraints container. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth','__link_protection','__setup_priority','__hold_priority','__signaling_type','__path_metric_bounds','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__disjointness',) + + _yang_name = 'path-constraints' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints'] + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_link_protection(self): + """ + Getter method for link_protection, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/link_protection (identityref) + + YANG Description: Link protection type required for the links included +in the computed path. + """ + return self.__link_protection + + def _set_link_protection(self, v, load=False): + """ + Setter method for link_protection, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/link_protection (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_protection is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_protection() directly. + + YANG Description: Link protection type required for the links included +in the computed path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_protection must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__link_protection = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_protection(self): + self.__link_protection = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:link-protection-unprotected"), is_leaf=True, yang_name="link-protection", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_setup_priority(self): + """ + Getter method for setup_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/setup_priority (uint8) + + YANG Description: TE LSP requested setup priority. + """ + return self.__setup_priority + + def _set_setup_priority(self, v, load=False): + """ + Setter method for setup_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/setup_priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_setup_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_setup_priority() directly. + + YANG Description: TE LSP requested setup priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """setup_priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__setup_priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_setup_priority(self): + self.__setup_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_hold_priority(self): + """ + Getter method for hold_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/hold_priority (uint8) + + YANG Description: TE LSP requested hold priority. + """ + return self.__hold_priority + + def _set_hold_priority(self, v, load=False): + """ + Setter method for hold_priority, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/hold_priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_hold_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hold_priority() directly. + + YANG Description: TE LSP requested hold priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hold_priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__hold_priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_hold_priority(self): + self.__hold_priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_signaling_type(self): + """ + Getter method for signaling_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/signaling_type (identityref) + + YANG Description: TE tunnel path signaling type. + """ + return self.__signaling_type + + def _set_signaling_type(self, v, load=False): + """ + Setter method for signaling_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/signaling_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_signaling_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_signaling_type() directly. + + YANG Description: TE tunnel path signaling type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """signaling_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__signaling_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_signaling_type(self): + self.__signaling_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-static': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-rsvp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-setup-sr': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), default=six.text_type("te-types:path-setup-rsvp"), is_leaf=True, yang_name="signaling-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_path_metric_bounds(self): + """ + Getter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds (container) + + YANG Description: TE path metric bounds container. + """ + return self.__path_metric_bounds + + def _set_path_metric_bounds(self, v, load=False): + """ + Setter method for path_metric_bounds, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric_bounds is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric_bounds() directly. + + YANG Description: TE path metric bounds container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric_bounds must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_metric_bounds = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric_bounds(self): + self.__path_metric_bounds = YANGDynClass(base=path_metric_bounds.path_metric_bounds, is_container='container', yang_name="path-metric-bounds", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_affinities_values(self): + """ + Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values (container) + + YANG Description: Path affinities represented as values. + """ + return self.__path_affinities_values + + def _set_path_affinities_values(self, v, load=False): + """ + Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_values() directly. + + YANG Description: Path affinities represented as values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_values must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_affinities_values = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_values(self): + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_affinity_names(self): + """ + Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names (container) + + YANG Description: Path affinities represented as names. + """ + return self.__path_affinity_names + + def _set_path_affinity_names(self, v, load=False): + """ + Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_names() directly. + + YANG Description: Path affinities represented as names. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_affinity_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_names(self): + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_srlgs_lists(self): + """ + Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists (container) + + YANG Description: Path SRLG properties container. + """ + return self.__path_srlgs_lists + + def _set_path_srlgs_lists(self, v, load=False): + """ + Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_lists is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_lists() directly. + + YANG Description: Path SRLG properties container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_lists must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_srlgs_lists = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_lists(self): + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_path_srlgs_names(self): + """ + Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names (container) + + YANG Description: Container for the list of named SRLGs. + """ + return self.__path_srlgs_names + + def _set_path_srlgs_names(self, v, load=False): + """ + Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_names() directly. + + YANG Description: Container for the list of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__path_srlgs_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_names(self): + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_disjointness(self): + """ + Getter method for disjointness, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/disjointness (te-path-disjointness) + + YANG Description: The type of resource disjointness. +When configured for a primary path, the disjointness level +applies to all secondary LSPs. When configured for a +secondary path, the disjointness level overrides the level +configured for the primary path. + """ + return self.__disjointness + + def _set_disjointness(self, v, load=False): + """ + Setter method for disjointness, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/disjointness (te-path-disjointness) + If this variable is read-only (config: false) in the + source YANG file, then _set_disjointness is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_disjointness() directly. + + YANG Description: The type of resource disjointness. +When configured for a primary path, the disjointness level +applies to all secondary LSPs. When configured for a +secondary path, the disjointness level overrides the level +configured for the primary path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """disjointness must be of a type compatible with te-path-disjointness""", + 'defined-type': "ietf-te-topology:te-path-disjointness", + 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True)""", + }) + + self.__disjointness = t + if hasattr(self, '_set'): + self._set() + + def _unset_disjointness(self): + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-path-disjointness', is_config=True) + + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + link_protection = __builtin__.property(_get_link_protection, _set_link_protection) + setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority) + hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority) + signaling_type = __builtin__.property(_get_signaling_type, _set_signaling_type) + path_metric_bounds = __builtin__.property(_get_path_metric_bounds, _set_path_metric_bounds) + path_affinities_values = __builtin__.property(_get_path_affinities_values, _set_path_affinities_values) + path_affinity_names = __builtin__.property(_get_path_affinity_names, _set_path_affinity_names) + path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists, _set_path_srlgs_lists) + path_srlgs_names = __builtin__.property(_get_path_srlgs_names, _set_path_srlgs_names) + disjointness = __builtin__.property(_get_disjointness, _set_disjointness) + + + _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ('link_protection', link_protection), ('setup_priority', setup_priority), ('hold_priority', hold_priority), ('signaling_type', signaling_type), ('path_metric_bounds', path_metric_bounds), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('disjointness', disjointness), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d3b86bd00f9cdd444c47d0b4c6d9872f7443bc52 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinities_value +class path_affinities_values(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-affinities-values. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as values. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) + + _yang_name = 'path-affinities-values' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-affinities-values'] + + def _get_path_affinities_value(self): + """ + Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinities_value + + def _set_path_affinities_value(self, v, load=False): + """ + Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_value() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_value must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_affinities_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_value(self): + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_affinities_value = __builtin__.property(_get_path_affinities_value, _set_path_affinities_value) + + + _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0d53fa7eb6527d38c2ec20b59918ce25923b3563 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_affinities_value(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-affinities-values/path-affinities-value. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) + + _yang_name = 'path-affinities-value' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-affinities-values', 'path-affinities-value'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) + + YANG Description: The affinity value. The default is empty. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/value (admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: The affinity value. The default is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with admin-groups""", + 'defined-type': "ietf-te-topology:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + value = __builtin__.property(_get_value, _set_value) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..915eb1efba9948d537f6ef35b2666651ba8398bd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinity_name +class path_affinity_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-affinity-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as names. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) + + _yang_name = 'path-affinity-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-affinity-names'] + + def _get_path_affinity_name(self): + """ + Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinity_name + + def _set_path_affinity_name(self, v, load=False): + """ + Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_name() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_name(self): + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_affinity_name = __builtin__.property(_get_path_affinity_name, _set_path_affinity_name) + + + _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f4886c5ce32b94fd9c091c9f1e34e74a28db92bb --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import affinity_name +class path_affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-affinity-names/path-affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) + + _yang_name = 'path-affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-affinity-names', 'path-affinity-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_affinity_name(self): + """ + Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) + + YANG Description: List of named affinities. + """ + return self.__affinity_name + + def _set_affinity_name(self, v, load=False): + """ + Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_affinity_name() directly. + + YANG Description: List of named affinities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_affinity_name(self): + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + affinity_name = __builtin__.property(_get_affinity_name, _set_affinity_name) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2a14ea23b6bac527f70952d99f9bfc44907e81b3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-affinity-names/path-affinity-name/affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinities. + """ + __slots__ = ('_path_helper', '_extmethods', '__name',) + + _yang_name = 'affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) + + YANG Description: Identifies a named affinity entry. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Identifies a named affinity entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + name = __builtin__.property(_get_name, _set_name) + + + _pyangbind_elements = OrderedDict([('name', name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9a35d6f919f7bfef3d8d83d10175fa4b04a17cb8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_metric_bound +class path_metric_bounds(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-metric-bounds. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric bounds container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_metric_bound',) + + _yang_name = 'path-metric-bounds' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-metric-bounds'] + + def _get_path_metric_bound(self): + """ + Getter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound (list) + + YANG Description: List of TE path metric bounds. + """ + return self.__path_metric_bound + + def _set_path_metric_bound(self, v, load=False): + """ + Setter method for path_metric_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric_bound is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric_bound() directly. + + YANG Description: List of TE path metric bounds. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric_bound must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_metric_bound = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric_bound(self): + self.__path_metric_bound = YANGDynClass(base=YANGListType("metric_type",path_metric_bound.path_metric_bound, yang_name="path-metric-bound", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_metric_bound = __builtin__.property(_get_path_metric_bound, _set_path_metric_bound) + + + _pyangbind_elements = OrderedDict([('path_metric_bound', path_metric_bound), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c015281ab564d3baceb353d35a63a80496e2b538 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,165 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_metric_bound(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-metric-bounds/path-metric-bound. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of TE path metric bounds. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__upper_bound',) + + _yang_name = 'path-metric-bound' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-metric-bounds', 'path-metric-bound'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) + + YANG Description: Identifies an entry in the list of 'metric-type' items +bound for the TE path. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: Identifies an entry in the list of 'metric-type' items +bound for the TE path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_upper_bound(self): + """ + Getter method for upper_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) + + YANG Description: Upper bound on the end-to-end TE path metric. A zero +indicates an unbounded upper limit for the specific +'metric-type'. + """ + return self.__upper_bound + + def _set_upper_bound(self, v, load=False): + """ + Setter method for upper_bound, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/upper_bound (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_upper_bound is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_upper_bound() directly. + + YANG Description: Upper bound on the end-to-end TE path metric. A zero +indicates an unbounded upper limit for the specific +'metric-type'. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """upper_bound must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__upper_bound = t + if hasattr(self, '_set'): + self._set() + + def _unset_upper_bound(self): + self.__upper_bound = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64)(0), is_leaf=True, yang_name="upper-bound", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + + metric_type = __builtin__.property(_get_metric_type, _set_metric_type) + upper_bound = __builtin__.property(_get_upper_bound, _set_upper_bound) + + + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('upper_bound', upper_bound), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1be416c5fede3814b541f7582f1c7dc74c4c9bf6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_list +class path_srlgs_lists(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-srlgs-lists. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path SRLG properties container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) + + _yang_name = 'path-srlgs-lists' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-srlgs-lists'] + + def _get_path_srlgs_list(self): + """ + Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list (list) + + YANG Description: List of SRLG values to be included or excluded. + """ + return self.__path_srlgs_list + + def _set_path_srlgs_list(self, v, load=False): + """ + Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_list() directly. + + YANG Description: List of SRLG values to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_list must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_srlgs_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_list(self): + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_srlgs_list = __builtin__.property(_get_path_srlgs_list, _set_path_srlgs_list) + + + _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..656884a887a37097554e5c0d65351daa1c4a1d99 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_list(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-srlgs-lists/path-srlgs-list. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of SRLG values to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) + + _yang_name = 'path-srlgs-list' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-srlgs-lists', 'path-srlgs-list'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_values(self): + """ + Getter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) + + YANG Description: List of SRLG values. + """ + return self.__values + + def _set_values(self, v, load=False): + """ + Setter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/values (srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_values() directly. + + YANG Description: List of SRLG values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """values must be of a type compatible with srlg""", + 'defined-type': "ietf-te-topology:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True)""", + }) + + self.__values = t + if hasattr(self, '_set'): + self._set() + + def _unset_values(self): + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + values = __builtin__.property(_get_values, _set_values) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0e50a196f1902610a99d0a2b957695bc47c02184 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_name +class path_srlgs_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-srlgs-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of named SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) + + _yang_name = 'path-srlgs-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-srlgs-names'] + + def _get_path_srlgs_name(self): + """ + Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name (list) + + YANG Description: List of named SRLGs to be included or excluded. + """ + return self.__path_srlgs_name + + def _set_path_srlgs_name(self, v, load=False): + """ + Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_name() directly. + + YANG Description: List of named SRLGs to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_srlgs_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_name(self): + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + path_srlgs_name = __builtin__.property(_get_path_srlgs_name, _set_path_srlgs_name) + + + _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4010d6485d50ed9228f88eda54e0cee8d7212dd7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/path-srlgs-names/path-srlgs-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named SRLGs to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) + + _yang_name = 'path-srlgs-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'path-srlgs-names', 'path-srlgs-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_names(self): + """ + Getter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/names (string) + + YANG Description: List of named SRLGs. + """ + return self.__names + + def _set_names(self, v, load=False): + """ + Setter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/names (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_names() directly. + + YANG Description: List of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """names must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__names = t + if hasattr(self, '_set'): + self._set() + + def _unset_names(self): + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + usage = __builtin__.property(_get_usage, _set_usage) + names = __builtin__.property(_get_names, _set_names) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..82e5ccc6549f03c2834c6706a3b48a9e6e3749ab --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..43c1a9a43a3295e83e04dc80bb7757d4dfb2926c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist','__odtu_flex_type',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None, choice=('technology', 'otn')), is_container='list', yang_name="odulist", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + + def _get_odtu_flex_type(self): + """ + Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +set up along the underlay paths of these OTN Local +Link Connectivities. + """ + return self.__odtu_flex_type + + def _set_odtu_flex_type(self, v, load=False): + """ + Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odtu_flex_type (l1-types:odtu-flex-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_odtu_flex_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odtu_flex_type() directly. + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs +set up along the underlay paths of these OTN Local +Link Connectivities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", + 'defined-type': "l1-types:odtu-flex-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", + }) + + self.__odtu_flex_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odtu_flex_type(self): + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + odulist = __builtin__.property(_get_odulist, _set_odulist) + odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) + + __choices__ = {'technology': {'otn': ['odulist', 'odtu_flex_type']}} + _pyangbind_elements = OrderedDict([('odulist', odulist), ('odtu_flex_type', odtu_flex_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..637f3a83b79cadd411537fc51e1ab6fd56a3762b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-constraints/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-constraints', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + number = __builtin__.property(_get_number, _set_number) + ts_number = __builtin__.property(_get_ts_number, _set_ts_number) + + __choices__ = {'technology': {'otn': ['odu_type', 'number', 'ts_number']}} + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..121cb20268cd50916e97d72932b9e21796022462 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py @@ -0,0 +1,318 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_metric +from . import path_affinities_values +from . import path_affinity_names +from . import path_srlgs_lists +from . import path_srlgs_names +from . import path_route_objects +class path_properties(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The TE path properties. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_metric','__path_affinities_values','__path_affinity_names','__path_srlgs_lists','__path_srlgs_names','__path_route_objects',) + + _yang_name = 'path-properties' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties'] + + def _get_path_metric(self): + """ + Getter method for path_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric (list) + + YANG Description: TE path metric type. + """ + return self.__path_metric + + def _set_path_metric(self, v, load=False): + """ + Setter method for path_metric, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_metric() directly. + + YANG Description: TE path metric type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_metric must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_metric(self): + self.__path_metric = YANGDynClass(base=YANGListType("metric_type",path_metric.path_metric, yang_name="path-metric", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='metric-type', extensions=None), is_container='list', yang_name="path-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + + def _get_path_affinities_values(self): + """ + Getter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values (container) + + YANG Description: Path affinities represented as values. + """ + return self.__path_affinities_values + + def _set_path_affinities_values(self, v, load=False): + """ + Setter method for path_affinities_values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_values() directly. + + YANG Description: Path affinities represented as values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_values must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinities_values = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_values(self): + self.__path_affinities_values = YANGDynClass(base=path_affinities_values.path_affinities_values, is_container='container', yang_name="path-affinities-values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_affinity_names(self): + """ + Getter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names (container) + + YANG Description: Path affinities represented as names. + """ + return self.__path_affinity_names + + def _set_path_affinity_names(self, v, load=False): + """ + Setter method for path_affinity_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_names() directly. + + YANG Description: Path affinities represented as names. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_affinity_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_names(self): + self.__path_affinity_names = YANGDynClass(base=path_affinity_names.path_affinity_names, is_container='container', yang_name="path-affinity-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_lists(self): + """ + Getter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists (container) + + YANG Description: Path SRLG properties container. + """ + return self.__path_srlgs_lists + + def _set_path_srlgs_lists(self, v, load=False): + """ + Setter method for path_srlgs_lists, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_lists is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_lists() directly. + + YANG Description: Path SRLG properties container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_lists must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_lists = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_lists(self): + self.__path_srlgs_lists = YANGDynClass(base=path_srlgs_lists.path_srlgs_lists, is_container='container', yang_name="path-srlgs-lists", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_srlgs_names(self): + """ + Getter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names (container) + + YANG Description: Container for the list of named SRLGs. + """ + return self.__path_srlgs_names + + def _set_path_srlgs_names(self, v, load=False): + """ + Setter method for path_srlgs_names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_names() directly. + + YANG Description: Container for the list of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_names must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_srlgs_names = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_names(self): + self.__path_srlgs_names = YANGDynClass(base=path_srlgs_names.path_srlgs_names, is_container='container', yang_name="path-srlgs-names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_path_route_objects(self): + """ + Getter method for path_route_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects (container) + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + return self.__path_route_objects + + def _set_path_route_objects(self, v, load=False): + """ + Setter method for path_route_objects, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_route_objects is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_route_objects() directly. + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_route_objects must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__path_route_objects = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_route_objects(self): + self.__path_route_objects = YANGDynClass(base=path_route_objects.path_route_objects, is_container='container', yang_name="path-route-objects", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + path_metric = __builtin__.property(_get_path_metric) + path_affinities_values = __builtin__.property(_get_path_affinities_values) + path_affinity_names = __builtin__.property(_get_path_affinity_names) + path_srlgs_lists = __builtin__.property(_get_path_srlgs_lists) + path_srlgs_names = __builtin__.property(_get_path_srlgs_names) + path_route_objects = __builtin__.property(_get_path_route_objects) + + + _pyangbind_elements = OrderedDict([('path_metric', path_metric), ('path_affinities_values', path_affinities_values), ('path_affinity_names', path_affinity_names), ('path_srlgs_lists', path_srlgs_lists), ('path_srlgs_names', path_srlgs_names), ('path_route_objects', path_route_objects), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5f23f944f0d276d34cf8582a39d1dbd440a56369 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinities_value +class path_affinities_values(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-affinities-values. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as values. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinities_value',) + + _yang_name = 'path-affinities-values' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-affinities-values'] + + def _get_path_affinities_value(self): + """ + Getter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinities_value + + def _set_path_affinities_value(self, v, load=False): + """ + Setter method for path_affinities_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinities_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinities_value() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinities_value must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinities_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinities_value(self): + self.__path_affinities_value = YANGDynClass(base=YANGListType("usage",path_affinities_value.path_affinities_value, yang_name="path-affinities-value", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinities-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinities_value = __builtin__.property(_get_path_affinities_value) + + + _pyangbind_elements = OrderedDict([('path_affinities_value', path_affinities_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6e7ba3ec4ade2664fd5d5fcc6d23d7ebc7e92536 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_affinities_value(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-affinities-values/path-affinities-value. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__value',) + + _yang_name = 'path-affinities-value' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-affinities-values', 'path-affinities-value'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/usage (identityref) + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of value affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) + + YANG Description: The affinity value. The default is empty. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/value (admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: The affinity value. The default is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with admin-groups""", + 'defined-type': "ietf-te-topology:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], default=six.text_type(""), is_leaf=True, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='admin-groups', is_config=False) + + usage = __builtin__.property(_get_usage) + value = __builtin__.property(_get_value) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75ec7e310803d6f2a3da41b9bdae5df569404985 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_affinity_name +class path_affinity_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-affinity-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path affinities represented as names. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_affinity_name',) + + _yang_name = 'path-affinity-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-affinity-names'] + + def _get_path_affinity_name(self): + """ + Getter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name (list) + + YANG Description: List of named affinity constraints. + """ + return self.__path_affinity_name + + def _set_path_affinity_name(self, v, load=False): + """ + Setter method for path_affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_affinity_name() directly. + + YANG Description: List of named affinity constraints. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_affinity_name(self): + self.__path_affinity_name = YANGDynClass(base=YANGListType("usage",path_affinity_name.path_affinity_name, yang_name="path-affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_affinity_name = __builtin__.property(_get_path_affinity_name) + + + _pyangbind_elements = OrderedDict([('path_affinity_name', path_affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6d2740363b6e25d8f84ff3c0cce856f06bb7d74a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import affinity_name +class path_affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-affinity-names/path-affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinity constraints. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__affinity_name',) + + _yang_name = 'path-affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-affinity-names', 'path-affinity-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/usage (identityref) + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in the list of named affinity +constraints. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-all': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-include-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:resource-aff-exclude-any': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_affinity_name(self): + """ + Getter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) + + YANG Description: List of named affinities. + """ + return self.__affinity_name + + def _set_affinity_name(self, v, load=False): + """ + Setter method for affinity_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_affinity_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_affinity_name() directly. + + YANG Description: List of named affinities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """affinity_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__affinity_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_affinity_name(self): + self.__affinity_name = YANGDynClass(base=YANGListType("name",affinity_name.affinity_name, yang_name="affinity-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="affinity-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + usage = __builtin__.property(_get_usage) + affinity_name = __builtin__.property(_get_affinity_name) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('affinity_name', affinity_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d00d8136a5d1ca3bbac8062f58938771b9ace146 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class affinity_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-affinity-names/path-affinity-name/affinity-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named affinities. + """ + __slots__ = ('_path_helper', '_extmethods', '__name',) + + _yang_name = 'affinity-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-affinity-names', 'path-affinity-name', 'affinity-name'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) + + YANG Description: Identifies a named affinity entry. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Identifies a named affinity entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + name = __builtin__.property(_get_name) + + + _pyangbind_elements = OrderedDict([('name', name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34ad252cf05256f871e52b7f4bcf419b3311f4e5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_metric(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-metric. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE path metric type. + """ + __slots__ = ('_path_helper', '_extmethods', '__metric_type','__accumulative_value',) + + _yang_name = 'path-metric' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-metric'] + + def _get_metric_type(self): + """ + Getter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/metric_type (identityref) + + YANG Description: TE path metric type. + """ + return self.__metric_type + + def _set_metric_type(self, v, load=False): + """ + Setter method for metric_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/metric_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_metric_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_metric_type() directly. + + YANG Description: TE path metric type. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """metric_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__metric_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_metric_type(self): + self.__metric_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-te': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-igp': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-hop': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-average': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-delay-minimum': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-includes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:path-metric-optimize-excludes': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="metric-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_accumulative_value(self): + """ + Getter method for accumulative_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/accumulative_value (uint64) + + YANG Description: TE path metric accumulative value. + """ + return self.__accumulative_value + + def _set_accumulative_value(self, v, load=False): + """ + Setter method for accumulative_value, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/accumulative_value (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_accumulative_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_accumulative_value() directly. + + YANG Description: TE path metric accumulative value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """accumulative_value must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False)""", + }) + + self.__accumulative_value = t + if hasattr(self, '_set'): + self._set() + + def _unset_accumulative_value(self): + self.__accumulative_value = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="accumulative-value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=False) + + metric_type = __builtin__.property(_get_metric_type) + accumulative_value = __builtin__.property(_get_accumulative_value) + + + _pyangbind_elements = OrderedDict([('metric_type', metric_type), ('accumulative_value', accumulative_value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..826eb49d2814dbfb5b886de185937b1e94b3208b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_route_object +class path_route_objects(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of route objects either returned by +the computation engine or actually used by an LSP. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_route_object',) + + _yang_name = 'path-route-objects' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects'] + + def _get_path_route_object(self): + """ + Getter method for path_route_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object (list) + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + return self.__path_route_object + + def _set_path_route_object(self, v, load=False): + """ + Setter method for path_route_object, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_route_object is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_route_object() directly. + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_route_object must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_route_object = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_route_object(self): + self.__path_route_object = YANGDynClass(base=YANGListType("index",path_route_object.path_route_object, yang_name="path-route-object", parent=self, is_container='list', user_ordered=True, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="path-route-object", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_route_object = __builtin__.property(_get_path_route_object) + + + _pyangbind_elements = OrderedDict([('path_route_object', path_route_object), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3f433dc1f276583e0c66dc28cded4a78296701b0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,327 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_route_object(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of route objects either returned by the computation +engine or actually used by an LSP. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-route-object' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/index (uint32) + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key +values. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: Route object entry index. The index is used to +identify an entry in the list. The order of entries +is defined by the user without relying on key +values. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=False) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + index = __builtin__.property(_get_index) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop) + label_hop = __builtin__.property(_get_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('index', index), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f8ad1dc661d24f2f70b40425f7c5c46d32046207 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + as_number = __builtin__.property(_get_as_number) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c577696eaf347a7202b981648897bac553b9d1ed --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + te_label = __builtin__.property(_get_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e8bc5dd22eed737dc1b818e8c4c5e64f71f3c17e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=False) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=False) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=False) + + generic = __builtin__.property(_get_generic) + otn = __builtin__.property(_get_otn) + vlanid = __builtin__.property(_get_vlanid) + direction = __builtin__.property(_get_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..15655b7d140771626a170095088be326dbf3df3e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=False) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=False) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=False) + + tpn = __builtin__.property(_get_tpn) + tsg = __builtin__.property(_get_tsg) + ts_list = __builtin__.property(_get_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..417bcf3cf2edba4eec7d40840829581e81125903 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bef8709eb663207146dacf4e13648829484c5c5d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..255ef933696bc9a136660d07cb8e00a9a8e8e8f0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-route-objects/path-route-object/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-route-objects', 'path-route-object', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=False) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=False) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=False) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=False) + + link_tp_id = __builtin__.property(_get_link_tp_id) + node_id = __builtin__.property(_get_node_id) + hop_type = __builtin__.property(_get_hop_type) + direction = __builtin__.property(_get_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ecfdfafc0419c3b6da7d37e634b4443d50f0dae3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_list +class path_srlgs_lists(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-srlgs-lists. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Path SRLG properties container. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_list',) + + _yang_name = 'path-srlgs-lists' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-srlgs-lists'] + + def _get_path_srlgs_list(self): + """ + Getter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list (list) + + YANG Description: List of SRLG values to be included or excluded. + """ + return self.__path_srlgs_list + + def _set_path_srlgs_list(self, v, load=False): + """ + Setter method for path_srlgs_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_list() directly. + + YANG Description: List of SRLG values to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_list must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_list(self): + self.__path_srlgs_list = YANGDynClass(base=YANGListType("usage",path_srlgs_list.path_srlgs_list, yang_name="path-srlgs-list", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_list = __builtin__.property(_get_path_srlgs_list) + + + _pyangbind_elements = OrderedDict([('path_srlgs_list', path_srlgs_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..14fb3f2b020f894aa91bd213a469dae8b2548933 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_list(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-srlgs-lists/path-srlgs-list. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of SRLG values to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__values',) + + _yang_name = 'path-srlgs-list' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-srlgs-lists', 'path-srlgs-list'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_values(self): + """ + Getter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) + + YANG Description: List of SRLG values. + """ + return self.__values + + def _set_values(self, v, load=False): + """ + Setter method for values, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/values (srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_values is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_values() directly. + + YANG Description: List of SRLG values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """values must be of a type compatible with srlg""", + 'defined-type': "ietf-te-topology:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False)""", + }) + + self.__values = t + if hasattr(self, '_set'): + self._set() + + def _unset_values(self): + self.__values = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="values", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='srlg', is_config=False) + + usage = __builtin__.property(_get_usage) + values = __builtin__.property(_get_values) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('values', values), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..48d9f8f048cae1220e75c4b9e5cbf138c608734c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_srlgs_name +class path_srlgs_names(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-srlgs-names. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container for the list of named SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_srlgs_name',) + + _yang_name = 'path-srlgs-names' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-srlgs-names'] + + def _get_path_srlgs_name(self): + """ + Getter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name (list) + + YANG Description: List of named SRLGs to be included or excluded. + """ + return self.__path_srlgs_name + + def _set_path_srlgs_name(self, v, load=False): + """ + Setter method for path_srlgs_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_srlgs_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_srlgs_name() directly. + + YANG Description: List of named SRLGs to be included or excluded. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_srlgs_name must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False)""", + }) + + self.__path_srlgs_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_srlgs_name(self): + self.__path_srlgs_name = YANGDynClass(base=YANGListType("usage",path_srlgs_name.path_srlgs_name, yang_name="path-srlgs-name", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='usage', extensions=None), is_container='list', yang_name="path-srlgs-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=False) + + path_srlgs_name = __builtin__.property(_get_path_srlgs_name) + + + _pyangbind_elements = OrderedDict([('path_srlgs_name', path_srlgs_name), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..874fef3496aabc1c1f220b4662531abe4ca7d362 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class path_srlgs_name(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/path-properties/path-srlgs-names/path-srlgs-name. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of named SRLGs to be included or excluded. + """ + __slots__ = ('_path_helper', '_extmethods', '__usage','__names',) + + _yang_name = 'path-srlgs-name' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'path-properties', 'path-srlgs-names', 'path-srlgs-name'] + + def _get_usage(self): + """ + Getter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + return self.__usage + + def _set_usage(self, v, load=False): + """ + Setter method for usage, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/usage (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_usage is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_usage() directly. + + YANG Description: Identifies an entry in a list of named SRLGs to either +include or exclude. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """usage must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False)""", + }) + + self.__usage = t + if hasattr(self, '_set'): + self._set() + + def _unset_usage(self): + self.__usage = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-include-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-object': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:route-exclude-srlg': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="usage", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=False) + + + def _get_names(self): + """ + Getter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/names (string) + + YANG Description: List of named SRLGs. + """ + return self.__names + + def _set_names(self, v, load=False): + """ + Setter method for names, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/names (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_names is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_names() directly. + + YANG Description: List of named SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """names must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False)""", + }) + + self.__names = t + if hasattr(self, '_set'): + self._set() + + def _unset_names(self): + self.__names = YANGDynClass(unique=True, base=TypedListType(allowed_type=six.text_type), is_leaf=False, yang_name="names", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=False) + + usage = __builtin__.property(_get_usage) + names = __builtin__.property(_get_names) + + + _pyangbind_elements = OrderedDict([('usage', usage), ('names', names), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e1d683aebf4103bd2e3acb9007c9eaa8b2fdff5d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py @@ -0,0 +1,326 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import primary_path +from . import backup_path +from . import tunnel_termination_points +from . import tunnels +class underlay(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Attributes of the TE link underlay. + """ + __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) + + _yang_name = 'underlay' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay'] + + def _get_enabled(self): + """ + Getter method for enabled, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/enabled (boolean) + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + return self.__enabled + + def _set_enabled(self, v, load=False): + """ + Setter method for enabled, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/enabled (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_enabled is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enabled() directly. + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enabled must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__enabled = t + if hasattr(self, '_set'): + self._set() + + def _unset_enabled(self): + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_primary_path(self): + """ + Getter method for primary_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path (container) + + YANG Description: The service path on the underlay topology that +supports this link. + """ + return self.__primary_path + + def _set_primary_path(self, v, load=False): + """ + Setter method for primary_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_primary_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_primary_path() directly. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """primary_path must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__primary_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_primary_path(self): + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_backup_path(self): + """ + Getter method for backup_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path (list) + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + return self.__backup_path + + def _set_backup_path(self, v, load=False): + """ + Setter method for backup_path, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_backup_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_backup_path() directly. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """backup_path must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__backup_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_backup_path(self): + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_protection_type(self): + """ + Getter method for protection_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/protection_type (identityref) + + YANG Description: Underlay protection type desired for this link. + """ + return self.__protection_type + + def _set_protection_type(self, v, load=False): + """ + Setter method for protection_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/protection_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_protection_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_protection_type() directly. + + YANG Description: Underlay protection type desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """protection_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__protection_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_protection_type(self): + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_tunnel_termination_points(self): + """ + Getter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points (container) + + YANG Description: Underlay TTPs desired for this link. + """ + return self.__tunnel_termination_points + + def _set_tunnel_termination_points(self, v, load=False): + """ + Setter method for tunnel_termination_points, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_termination_points is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_termination_points() directly. + + YANG Description: Underlay TTPs desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_termination_points must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tunnel_termination_points = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_termination_points(self): + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_tunnels(self): + """ + Getter method for tunnels, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels (container) + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + return self.__tunnels + + def _set_tunnels(self, v, load=False): + """ + Setter method for tunnels, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnels is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnels() directly. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnels must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tunnels = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnels(self): + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + enabled = __builtin__.property(_get_enabled, _set_enabled) + primary_path = __builtin__.property(_get_primary_path, _set_primary_path) + backup_path = __builtin__.property(_get_backup_path, _set_backup_path) + protection_type = __builtin__.property(_get_protection_type, _set_protection_type) + tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points, _set_tunnel_termination_points) + tunnels = __builtin__.property(_get_tunnels, _set_tunnels) + + + _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4347a263e217bbde4621b876d25f60f188c30add --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py @@ -0,0 +1,207 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class backup_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) + + _yang_name = 'backup-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/index (uint32) + + YANG Description: A sequence number to identify a backup path. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: A sequence number to identify a backup path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element (list) + + YANG Description: A list of path elements describing the backup service +path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the backup service +path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + path_element = __builtin__.property(_get_path_element, _set_path_element) + + + _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2742320363aaedefb624b8ae99b1998d56df03d3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,321 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the backup service +path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d2bba5863bde5c1b810032c6a8a31f325086c5be --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c46d30191327a3683fd95aab0eba1ea852e45552 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7a629f62c65cc6625cb147bfef16754ec8db88c9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f372a5fb39962575ceac829b6e76d5218d1eb489 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4f7ede0ea83a89f13e1e7db70b5d986bec9cd2a9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..88dac655372e17dc2a27bc122a5bbe48edde4433 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b5a3dfc51955821b9661f6ea5eeaeb61c5dfc74a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bca7e6259f173043e5b27e88f8d5353d33bf7348 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class primary_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) + + _yang_name = 'primary-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element (list) + + YANG Description: A list of path elements describing the service path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the service path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + path_element = __builtin__.property(_get_path_element, _set_path_element) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2ae1b7cb82f08a9a4d6e145f900ac953612d7e5f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,320 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the service path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..68297031d392727cbaf66a8814206a5b5e85544a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..80afc929d8ea67af26cbf442755b5e25dcee7dc4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..51e80cb347cb6ac9c199b61cf5e8a4461873fb56 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bc1e9a494adca79867ee909bdf874c91853240d8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..94bf3ca84ea9053b367ebe78a7ecb327ff44bf8f --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3e3ac258c8cb85d97b00edf41e2d11e870bec8a6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0a2138b5fcdb45fccf594bbc776f16ae469ce1c2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..018032a5fc256dd0e005bf6193d6074c85f3d9ca --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel_termination_points(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/tunnel-termination-points. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TTPs desired for this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) + + _yang_name = 'tunnel-termination-points' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'tunnel-termination-points'] + + def _get_source(self): + """ + Getter method for source, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/source (binary) + + YANG Description: Source TTP identifier. + """ + return self.__source + + def _set_source(self, v, load=False): + """ + Setter method for source, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/source (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_source() directly. + + YANG Description: Source TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """source must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__source = t + if hasattr(self, '_set'): + self._set() + + def _unset_source(self): + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + + def _get_destination(self): + """ + Getter method for destination, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/destination (binary) + + YANG Description: Destination TTP identifier. + """ + return self.__destination + + def _set_destination(self, v, load=False): + """ + Setter method for destination, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/destination (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_destination is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_destination() directly. + + YANG Description: Destination TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """destination must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__destination = t + if hasattr(self, '_set'): + self._set() + + def _unset_destination(self): + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + source = __builtin__.property(_get_source, _set_source) + destination = __builtin__.property(_get_destination, _set_destination) + + + _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2ba01ce03d54896d69499b9cf8debd9256134af5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py @@ -0,0 +1,167 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tunnel +class tunnels(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/tunnels. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) + + _yang_name = 'tunnels' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'tunnels'] + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_tunnel(self): + """ + Getter method for tunnel, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel (list) + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + return self.__tunnel + + def _set_tunnel(self, v, load=False): + """ + Setter method for tunnel, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel() directly. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__tunnel = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel(self): + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + sharing = __builtin__.property(_get_sharing, _set_sharing) + tunnel = __builtin__.property(_get_tunnel, _set_tunnel) + + + _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee3791127157d2ae6885deda709193aa5612eafc --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,170 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/local-link-connectivities/underlay/tunnels/tunnel. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) + + _yang_name = 'tunnel' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'local-link-connectivities', 'underlay', 'tunnels', 'tunnel'] + + def _get_tunnel_name(self): + """ + Getter method for tunnel_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/tunnel_name (string) + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + return self.__tunnel_name + + def _set_tunnel_name(self, v, load=False): + """ + Setter method for tunnel_name, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/tunnel_name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_name() directly. + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__tunnel_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_name(self): + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + tunnel_name = __builtin__.property(_get_tunnel_name, _set_tunnel_name) + sharing = __builtin__.property(_get_sharing, _set_sharing) + + + _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f8037917441e8994d0eda617a6b5b961d6af2837 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py @@ -0,0 +1,207 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tunnel_termination_point +from . import local_link_connectivity +class statistics(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/statistics. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Statistics data. + """ + __slots__ = ('_path_helper', '_extmethods', '__discontinuity_time','__tunnel_termination_point','__local_link_connectivity',) + + _yang_name = 'statistics' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__discontinuity_time = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) + self.__tunnel_termination_point = YANGDynClass(base=tunnel_termination_point.tunnel_termination_point, is_container='container', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__local_link_connectivity = YANGDynClass(base=local_link_connectivity.local_link_connectivity, is_container='container', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'statistics'] + + def _get_discontinuity_time(self): + """ + Getter method for discontinuity_time, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/discontinuity_time (yang:date-and-time) + + YANG Description: The time of the most recent occasion at which any one or +more of this interface's counters suffered a +discontinuity. If no such discontinuities have occurred +since the last re-initialization of the local management +subsystem, then this node contains the time the local +management subsystem re-initialized itself. + """ + return self.__discontinuity_time + + def _set_discontinuity_time(self, v, load=False): + """ + Setter method for discontinuity_time, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/discontinuity_time (yang:date-and-time) + If this variable is read-only (config: false) in the + source YANG file, then _set_discontinuity_time is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_discontinuity_time() directly. + + YANG Description: The time of the most recent occasion at which any one or +more of this interface's counters suffered a +discontinuity. If no such discontinuities have occurred +since the last re-initialization of the local management +subsystem, then this node contains the time the local +management subsystem re-initialized itself. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """discontinuity_time must be of a type compatible with yang:date-and-time""", + 'defined-type': "yang:date-and-time", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False)""", + }) + + self.__discontinuity_time = t + if hasattr(self, '_set'): + self._set() + + def _unset_discontinuity_time(self): + self.__discontinuity_time = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="discontinuity-time", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:date-and-time', is_config=False) + + + def _get_tunnel_termination_point(self): + """ + Getter method for tunnel_termination_point, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point (container) + + YANG Description: Contains statistics attributes at the TE TTP level. + """ + return self.__tunnel_termination_point + + def _set_tunnel_termination_point(self, v, load=False): + """ + Setter method for tunnel_termination_point, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_termination_point is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_termination_point() directly. + + YANG Description: Contains statistics attributes at the TE TTP level. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnel_termination_point.tunnel_termination_point, is_container='container', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_termination_point must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnel_termination_point.tunnel_termination_point, is_container='container', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__tunnel_termination_point = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_termination_point(self): + self.__tunnel_termination_point = YANGDynClass(base=tunnel_termination_point.tunnel_termination_point, is_container='container', yang_name="tunnel-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_local_link_connectivity(self): + """ + Getter method for local_link_connectivity, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity (container) + + YANG Description: Contains statistics attributes at the TE LLCL (Local Link +Connectivity List) level. + """ + return self.__local_link_connectivity + + def _set_local_link_connectivity(self, v, load=False): + """ + Setter method for local_link_connectivity, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_local_link_connectivity is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_local_link_connectivity() directly. + + YANG Description: Contains statistics attributes at the TE LLCL (Local Link +Connectivity List) level. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=local_link_connectivity.local_link_connectivity, is_container='container', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """local_link_connectivity must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=local_link_connectivity.local_link_connectivity, is_container='container', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__local_link_connectivity = t + if hasattr(self, '_set'): + self._set() + + def _unset_local_link_connectivity(self): + self.__local_link_connectivity = YANGDynClass(base=local_link_connectivity.local_link_connectivity, is_container='container', yang_name="local-link-connectivity", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + discontinuity_time = __builtin__.property(_get_discontinuity_time) + tunnel_termination_point = __builtin__.property(_get_tunnel_termination_point) + local_link_connectivity = __builtin__.property(_get_local_link_connectivity) + + + _pyangbind_elements = OrderedDict([('discontinuity_time', discontinuity_time), ('tunnel_termination_point', tunnel_termination_point), ('local_link_connectivity', local_link_connectivity), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e533bc72da87f17335dee6fb8a680fd5994fbe4b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py @@ -0,0 +1,272 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class local_link_connectivity(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/statistics/local-link-connectivity. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains statistics attributes at the TE LLCL (Local Link +Connectivity List) level. + """ + __slots__ = ('_path_helper', '_extmethods', '__creates','__deletes','__disables','__enables','__modifies',) + + _yang_name = 'local-link-connectivity' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__creates = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__deletes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'statistics', 'local-link-connectivity'] + + def _get_creates(self): + """ + Getter method for creates, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/creates (yang:counter32) + + YANG Description: Number of times that an LLCL entry was created. + """ + return self.__creates + + def _set_creates(self, v, load=False): + """ + Setter method for creates, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/creates (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_creates is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_creates() directly. + + YANG Description: Number of times that an LLCL entry was created. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """creates must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__creates = t + if hasattr(self, '_set'): + self._set() + + def _unset_creates(self): + self.__creates = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="creates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_deletes(self): + """ + Getter method for deletes, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/deletes (yang:counter32) + + YANG Description: Number of times that an LLCL entry was deleted. + """ + return self.__deletes + + def _set_deletes(self, v, load=False): + """ + Setter method for deletes, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/deletes (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_deletes is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_deletes() directly. + + YANG Description: Number of times that an LLCL entry was deleted. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """deletes must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__deletes = t + if hasattr(self, '_set'): + self._set() + + def _unset_deletes(self): + self.__deletes = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="deletes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_disables(self): + """ + Getter method for disables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/disables (yang:counter32) + + YANG Description: Number of times that an LLCL entry was disabled. + """ + return self.__disables + + def _set_disables(self, v, load=False): + """ + Setter method for disables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/disables (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_disables is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_disables() directly. + + YANG Description: Number of times that an LLCL entry was disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """disables must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__disables = t + if hasattr(self, '_set'): + self._set() + + def _unset_disables(self): + self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_enables(self): + """ + Getter method for enables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/enables (yang:counter32) + + YANG Description: Number of times that an LLCL entry was enabled. + """ + return self.__enables + + def _set_enables(self, v, load=False): + """ + Setter method for enables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/enables (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_enables is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enables() directly. + + YANG Description: Number of times that an LLCL entry was enabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enables must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__enables = t + if hasattr(self, '_set'): + self._set() + + def _unset_enables(self): + self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_modifies(self): + """ + Getter method for modifies, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/modifies (yang:counter32) + + YANG Description: Number of times that an LLCL entry was modified. + """ + return self.__modifies + + def _set_modifies(self, v, load=False): + """ + Setter method for modifies, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/modifies (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_modifies is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_modifies() directly. + + YANG Description: Number of times that an LLCL entry was modified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """modifies must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__modifies = t + if hasattr(self, '_set'): + self._set() + + def _unset_modifies(self): + self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + creates = __builtin__.property(_get_creates) + deletes = __builtin__.property(_get_deletes) + disables = __builtin__.property(_get_disables) + enables = __builtin__.property(_get_enables) + modifies = __builtin__.property(_get_modifies) + + + _pyangbind_elements = OrderedDict([('creates', creates), ('deletes', deletes), ('disables', disables), ('enables', enables), ('modifies', modifies), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7759e40ddb4422ba2bbbd58a2c0fd9b8babdc412 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py @@ -0,0 +1,435 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel_termination_point(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/statistics/tunnel-termination-point. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains statistics attributes at the TE TTP level. + """ + __slots__ = ('_path_helper', '_extmethods', '__disables','__enables','__maintenance_clears','__maintenance_sets','__modifies','__downs','__ups','__in_service_clears','__in_service_sets',) + + _yang_name = 'tunnel-termination-point' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__maintenance_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__maintenance_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__downs = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__ups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__in_service_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + self.__in_service_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'statistics', 'tunnel-termination-point'] + + def _get_disables(self): + """ + Getter method for disables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/disables (yang:counter32) + + YANG Description: Number of times that a TTP was disabled. + """ + return self.__disables + + def _set_disables(self, v, load=False): + """ + Setter method for disables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/disables (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_disables is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_disables() directly. + + YANG Description: Number of times that a TTP was disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """disables must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__disables = t + if hasattr(self, '_set'): + self._set() + + def _unset_disables(self): + self.__disables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="disables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_enables(self): + """ + Getter method for enables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/enables (yang:counter32) + + YANG Description: Number of times that a TTP was enabled. + """ + return self.__enables + + def _set_enables(self, v, load=False): + """ + Setter method for enables, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/enables (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_enables is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enables() directly. + + YANG Description: Number of times that a TTP was enabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enables must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__enables = t + if hasattr(self, '_set'): + self._set() + + def _unset_enables(self): + self.__enables = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="enables", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_maintenance_clears(self): + """ + Getter method for maintenance_clears, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/maintenance_clears (yang:counter32) + + YANG Description: Number of times that a TTP was taken out of maintenance. + """ + return self.__maintenance_clears + + def _set_maintenance_clears(self, v, load=False): + """ + Setter method for maintenance_clears, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/maintenance_clears (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_maintenance_clears is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_maintenance_clears() directly. + + YANG Description: Number of times that a TTP was taken out of maintenance. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """maintenance_clears must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__maintenance_clears = t + if hasattr(self, '_set'): + self._set() + + def _unset_maintenance_clears(self): + self.__maintenance_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_maintenance_sets(self): + """ + Getter method for maintenance_sets, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/maintenance_sets (yang:counter32) + + YANG Description: Number of times that a TTP was put in maintenance. + """ + return self.__maintenance_sets + + def _set_maintenance_sets(self, v, load=False): + """ + Setter method for maintenance_sets, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/maintenance_sets (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_maintenance_sets is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_maintenance_sets() directly. + + YANG Description: Number of times that a TTP was put in maintenance. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """maintenance_sets must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__maintenance_sets = t + if hasattr(self, '_set'): + self._set() + + def _unset_maintenance_sets(self): + self.__maintenance_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="maintenance-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_modifies(self): + """ + Getter method for modifies, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/modifies (yang:counter32) + + YANG Description: Number of times that a TTP was modified. + """ + return self.__modifies + + def _set_modifies(self, v, load=False): + """ + Setter method for modifies, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/modifies (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_modifies is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_modifies() directly. + + YANG Description: Number of times that a TTP was modified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """modifies must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__modifies = t + if hasattr(self, '_set'): + self._set() + + def _unset_modifies(self): + self.__modifies = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="modifies", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_downs(self): + """ + Getter method for downs, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/downs (yang:counter32) + + YANG Description: Number of times that a TTP was set to an operational state +of 'down'. + """ + return self.__downs + + def _set_downs(self, v, load=False): + """ + Setter method for downs, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/downs (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_downs is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_downs() directly. + + YANG Description: Number of times that a TTP was set to an operational state +of 'down'. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """downs must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__downs = t + if hasattr(self, '_set'): + self._set() + + def _unset_downs(self): + self.__downs = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="downs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_ups(self): + """ + Getter method for ups, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/ups (yang:counter32) + + YANG Description: Number of times that a TTP was set to an operational state +of 'up'. + """ + return self.__ups + + def _set_ups(self, v, load=False): + """ + Setter method for ups, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/ups (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_ups is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ups() directly. + + YANG Description: Number of times that a TTP was set to an operational state +of 'up'. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ups must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__ups = t + if hasattr(self, '_set'): + self._set() + + def _unset_ups(self): + self.__ups = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="ups", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_in_service_clears(self): + """ + Getter method for in_service_clears, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/in_service_clears (yang:counter32) + + YANG Description: Number of times that a TTP was taken out of service +(TE tunnel was released). + """ + return self.__in_service_clears + + def _set_in_service_clears(self, v, load=False): + """ + Setter method for in_service_clears, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/in_service_clears (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_in_service_clears is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_in_service_clears() directly. + + YANG Description: Number of times that a TTP was taken out of service +(TE tunnel was released). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """in_service_clears must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__in_service_clears = t + if hasattr(self, '_set'): + self._set() + + def _unset_in_service_clears(self): + self.__in_service_clears = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-clears", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + + def _get_in_service_sets(self): + """ + Getter method for in_service_sets, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/in_service_sets (yang:counter32) + + YANG Description: Number of times that a TTP was put in service by a TE +tunnel (TE tunnel was set up). + """ + return self.__in_service_sets + + def _set_in_service_sets(self, v, load=False): + """ + Setter method for in_service_sets, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/in_service_sets (yang:counter32) + If this variable is read-only (config: false) in the + source YANG file, then _set_in_service_sets is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_in_service_sets() directly. + + YANG Description: Number of times that a TTP was put in service by a TE +tunnel (TE tunnel was set up). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """in_service_sets must be of a type compatible with yang:counter32""", + 'defined-type': "yang:counter32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False)""", + }) + + self.__in_service_sets = t + if hasattr(self, '_set'): + self._set() + + def _unset_in_service_sets(self): + self.__in_service_sets = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="in-service-sets", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:counter32', is_config=False) + + disables = __builtin__.property(_get_disables) + enables = __builtin__.property(_get_enables) + maintenance_clears = __builtin__.property(_get_maintenance_clears) + maintenance_sets = __builtin__.property(_get_maintenance_sets) + modifies = __builtin__.property(_get_modifies) + downs = __builtin__.property(_get_downs) + ups = __builtin__.property(_get_ups) + in_service_clears = __builtin__.property(_get_in_service_clears) + in_service_sets = __builtin__.property(_get_in_service_sets) + + + _pyangbind_elements = OrderedDict([('disables', disables), ('enables', enables), ('maintenance_clears', maintenance_clears), ('maintenance_sets', maintenance_sets), ('modifies', modifies), ('downs', downs), ('ups', ups), ('in_service_clears', in_service_clears), ('in_service_sets', in_service_sets), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2d4ca8bff453261b3dd00e5cb1de701663ac8e48 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py @@ -0,0 +1,172 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class supporting_tunnel_termination_point(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/te/tunnel-termination-point/supporting-tunnel-termination-point. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Identifies the TTPs on which this TTP depends. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_ref','__tunnel_tp_ref',) + + _yang_name = 'supporting-tunnel-termination-point' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:uri', is_config=True) + self.__tunnel_tp_ref = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'te', 'tunnel-termination-point', 'supporting-tunnel-termination-point'] + + def _get_node_ref(self): + """ + Getter method for node_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/node_ref (inet:uri) + + YANG Description: This leaf identifies the node in which the supporting +TTP is present. +This node is either the supporting node or a node in +an underlay topology. + """ + return self.__node_ref + + def _set_node_ref(self, v, load=False): + """ + Setter method for node_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/node_ref (inet:uri) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_ref() directly. + + YANG Description: This leaf identifies the node in which the supporting +TTP is present. +This node is either the supporting node or a node in +an underlay topology. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:uri', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_ref must be of a type compatible with inet:uri""", + 'defined-type': "inet:uri", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:uri', is_config=True)""", + }) + + self.__node_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_ref(self): + self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:uri', is_config=True) + + + def _get_tunnel_tp_ref(self): + """ + Getter method for tunnel_tp_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/tunnel_tp_ref (binary) + + YANG Description: Reference to a TTP that is in either the supporting node +or a node in an underlay topology. + """ + return self.__tunnel_tp_ref + + def _set_tunnel_tp_ref(self, v, load=False): + """ + Setter method for tunnel_tp_ref, mapped from YANG variable /networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/tunnel_tp_ref (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_tp_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_tp_ref() directly. + + YANG Description: Reference to a TTP that is in either the supporting node +or a node in an underlay topology. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_tp_ref must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__tunnel_tp_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_tp_ref(self): + self.__tunnel_tp_ref = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="tunnel-tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + node_ref = __builtin__.property(_get_node_ref, _set_node_ref) + tunnel_tp_ref = __builtin__.property(_get_tunnel_tp_ref, _set_tunnel_tp_ref) + + + _pyangbind_elements = OrderedDict([('node_ref', node_ref), ('tunnel_tp_ref', tunnel_tp_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1665caff1547e59b85854466ac6f31d68743c33e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/__init__.py @@ -0,0 +1,339 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import supporting_termination_point +from . import te +from . import eth_svc +from . import eth_link_tp +class termination_point(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A termination point can terminate a link. +Depending on the type of topology, a termination point +could, for example, refer to a port or an interface. + """ + __slots__ = ('_path_helper', '_extmethods', '__tp_id','__supporting_termination_point','__te_tp_id','__te','__eth_svc','__eth_link_tp',) + + _yang_name = 'termination-point' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tp_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='tp-id', is_config=True) + self.__supporting_termination_point = YANGDynClass(base=YANGListType("network_ref node_ref tp_ref",supporting_termination_point.supporting_termination_point, yang_name="supporting-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref tp-ref', extensions=None), is_container='list', yang_name="supporting-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) + self.__te_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="te-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) + self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__eth_svc = YANGDynClass(base=eth_svc.eth_svc, is_container='container', yang_name="eth-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + self.__eth_link_tp = YANGDynClass(base=eth_link_tp.eth_link_tp, is_container='container', yang_name="eth-link-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point'] + + def _get_tp_id(self): + """ + Getter method for tp_id, mapped from YANG variable /networks/network/node/termination_point/tp_id (tp-id) + + YANG Description: Termination point identifier. + """ + return self.__tp_id + + def _set_tp_id(self, v, load=False): + """ + Setter method for tp_id, mapped from YANG variable /networks/network/node/termination_point/tp_id (tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tp_id() directly. + + YANG Description: Termination point identifier. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tp_id must be of a type compatible with tp-id""", + 'defined-type': "ietf-network-topology:tp-id", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='tp-id', is_config=True)""", + }) + + self.__tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_tp_id(self): + self.__tp_id = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='tp-id', is_config=True) + + + def _get_supporting_termination_point(self): + """ + Getter method for supporting_termination_point, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point (list) + + YANG Description: This list identifies any termination points on which a +given termination point depends or onto which it maps. +Those termination points will themselves be contained +in a supporting node. This dependency information can be +inferred from the dependencies between links. Therefore, +this item is not separately configurable. Hence, no +corresponding constraint needs to be articulated. +The corresponding information is simply provided by the +implementing system. + """ + return self.__supporting_termination_point + + def _set_supporting_termination_point(self, v, load=False): + """ + Setter method for supporting_termination_point, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_supporting_termination_point is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supporting_termination_point() directly. + + YANG Description: This list identifies any termination points on which a +given termination point depends or onto which it maps. +Those termination points will themselves be contained +in a supporting node. This dependency information can be +inferred from the dependencies between links. Therefore, +this item is not separately configurable. Hence, no +corresponding constraint needs to be articulated. +The corresponding information is simply provided by the +implementing system. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("network_ref node_ref tp_ref",supporting_termination_point.supporting_termination_point, yang_name="supporting-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref tp-ref', extensions=None), is_container='list', yang_name="supporting-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supporting_termination_point must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("network_ref node_ref tp_ref",supporting_termination_point.supporting_termination_point, yang_name="supporting-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref tp-ref', extensions=None), is_container='list', yang_name="supporting-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True)""", + }) + + self.__supporting_termination_point = t + if hasattr(self, '_set'): + self._set() + + def _unset_supporting_termination_point(self): + self.__supporting_termination_point = YANGDynClass(base=YANGListType("network_ref node_ref tp_ref",supporting_termination_point.supporting_termination_point, yang_name="supporting-termination-point", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='network-ref node-ref tp-ref', extensions=None), is_container='list', yang_name="supporting-termination-point", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='list', is_config=True) + + + def _get_te_tp_id(self): + """ + Getter method for te_tp_id, mapped from YANG variable /networks/network/node/termination_point/te_tp_id (te-types:te-tp-id) + + YANG Description: An identifier that uniquely identifies a TE termination +point. + """ + return self.__te_tp_id + + def _set_te_tp_id(self, v, load=False): + """ + Setter method for te_tp_id, mapped from YANG variable /networks/network/node/termination_point/te_tp_id (te-types:te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_tp_id() directly. + + YANG Description: An identifier that uniquely identifies a TE termination +point. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="te-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_tp_id must be of a type compatible with te-types:te-tp-id""", + 'defined-type': "te-types:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="te-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True)""", + }) + + self.__te_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_tp_id(self): + self.__te_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="te-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) + + + def _get_te(self): + """ + Getter method for te, mapped from YANG variable /networks/network/node/termination_point/te (container) + + YANG Description: Indicates TE support. + """ + return self.__te + + def _set_te(self, v, load=False): + """ + Setter method for te, mapped from YANG variable /networks/network/node/termination_point/te (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te() directly. + + YANG Description: Indicates TE support. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te = t + if hasattr(self, '_set'): + self._set() + + def _unset_te(self): + self.__te = YANGDynClass(base=te.te, is_container='container', yang_name="te", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_eth_svc(self): + """ + Getter method for eth_svc, mapped from YANG variable /networks/network/node/termination_point/eth_svc (container) + + YANG Description: ETH LTP Service attributes. + """ + return self.__eth_svc + + def _set_eth_svc(self, v, load=False): + """ + Setter method for eth_svc, mapped from YANG variable /networks/network/node/termination_point/eth_svc (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_svc is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_svc() directly. + + YANG Description: ETH LTP Service attributes. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=eth_svc.eth_svc, is_container='container', yang_name="eth-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_svc must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=eth_svc.eth_svc, is_container='container', yang_name="eth-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__eth_svc = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_svc(self): + self.__eth_svc = YANGDynClass(base=eth_svc.eth_svc, is_container='container', yang_name="eth-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + + def _get_eth_link_tp(self): + """ + Getter method for eth_link_tp, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp (container) + + YANG Description: Attributes of the Ethernet Link Termination Point (LTP). + """ + return self.__eth_link_tp + + def _set_eth_link_tp(self, v, load=False): + """ + Setter method for eth_link_tp, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_link_tp is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_link_tp() directly. + + YANG Description: Attributes of the Ethernet Link Termination Point (LTP). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=eth_link_tp.eth_link_tp, is_container='container', yang_name="eth-link-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_link_tp must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=eth_link_tp.eth_link_tp, is_container='container', yang_name="eth-link-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__eth_link_tp = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_link_tp(self): + self.__eth_link_tp = YANGDynClass(base=eth_link_tp.eth_link_tp, is_container='container', yang_name="eth-link-tp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + tp_id = __builtin__.property(_get_tp_id, _set_tp_id) + supporting_termination_point = __builtin__.property(_get_supporting_termination_point, _set_supporting_termination_point) + te_tp_id = __builtin__.property(_get_te_tp_id, _set_te_tp_id) + te = __builtin__.property(_get_te, _set_te) + eth_svc = __builtin__.property(_get_eth_svc, _set_eth_svc) + eth_link_tp = __builtin__.property(_get_eth_link_tp, _set_eth_link_tp) + + + _pyangbind_elements = OrderedDict([('tp_id', tp_id), ('supporting_termination_point', supporting_termination_point), ('te_tp_id', te_tp_id), ('te', te), ('eth_svc', eth_svc), ('eth_link_tp', eth_link_tp), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d3de63b0fdd336fb163e7300fcca8cdb33e61fdc --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/__init__.py @@ -0,0 +1,315 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import ingress_egress_bandwidth_profile +from . import ingress_bandwidth_profile +from . import egress_bandwidth_profile +class eth_link_tp(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-link-tp. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Attributes of the Ethernet Link Termination Point (LTP). + """ + __slots__ = ('_path_helper', '_extmethods', '__ltp_mac_address','__port_vlan_id','__maximum_frame_size','__ingress_egress_bandwidth_profile','__ingress_bandwidth_profile','__egress_bandwidth_profile',) + + _yang_name = 'eth-link-tp' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__ltp_mac_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="ltp-mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='yang:mac-address', is_config=True) + self.__port_vlan_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="port-vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__maximum_frame_size = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['64 .. 65535']}), is_leaf=True, yang_name="maximum-frame-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + self.__ingress_egress_bandwidth_profile = YANGDynClass(base=ingress_egress_bandwidth_profile.ingress_egress_bandwidth_profile, is_container='container', yang_name="ingress-egress-bandwidth-profile", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + self.__ingress_bandwidth_profile = YANGDynClass(base=ingress_bandwidth_profile.ingress_bandwidth_profile, is_container='container', yang_name="ingress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + self.__egress_bandwidth_profile = YANGDynClass(base=egress_bandwidth_profile.egress_bandwidth_profile, is_container='container', yang_name="egress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-link-tp'] + + def _get_ltp_mac_address(self): + """ + Getter method for ltp_mac_address, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ltp_mac_address (yang:mac-address) + + YANG Description: The MAC address of the Ethernet LTP. + """ + return self.__ltp_mac_address + + def _set_ltp_mac_address(self, v, load=False): + """ + Setter method for ltp_mac_address, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ltp_mac_address (yang:mac-address) + If this variable is read-only (config: false) in the + source YANG file, then _set_ltp_mac_address is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ltp_mac_address() directly. + + YANG Description: The MAC address of the Ethernet LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="ltp-mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='yang:mac-address', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ltp_mac_address must be of a type compatible with yang:mac-address""", + 'defined-type': "yang:mac-address", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="ltp-mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='yang:mac-address', is_config=True)""", + }) + + self.__ltp_mac_address = t + if hasattr(self, '_set'): + self._set() + + def _unset_ltp_mac_address(self): + self.__ltp_mac_address = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'}), is_leaf=True, yang_name="ltp-mac-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='yang:mac-address', is_config=True) + + + def _get_port_vlan_id(self): + """ + Getter method for port_vlan_id, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/port_vlan_id (etht-types:vlanid) + + YANG Description: The Port VLAN ID of the Ethernet LTP. + """ + return self.__port_vlan_id + + def _set_port_vlan_id(self, v, load=False): + """ + Setter method for port_vlan_id, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/port_vlan_id (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_port_vlan_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_port_vlan_id() directly. + + YANG Description: The Port VLAN ID of the Ethernet LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="port-vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """port_vlan_id must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="port-vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__port_vlan_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_port_vlan_id(self): + self.__port_vlan_id = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="port-vlan-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_maximum_frame_size(self): + """ + Getter method for maximum_frame_size, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/maximum_frame_size (uint16) + + YANG Description: Maximum frame size + """ + return self.__maximum_frame_size + + def _set_maximum_frame_size(self, v, load=False): + """ + Setter method for maximum_frame_size, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/maximum_frame_size (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_maximum_frame_size is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_maximum_frame_size() directly. + + YANG Description: Maximum frame size + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['64 .. 65535']}), is_leaf=True, yang_name="maximum-frame-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """maximum_frame_size must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['64 .. 65535']}), is_leaf=True, yang_name="maximum-frame-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", + }) + + self.__maximum_frame_size = t + if hasattr(self, '_set'): + self._set() + + def _unset_maximum_frame_size(self): + self.__maximum_frame_size = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['64 .. 65535']}), is_leaf=True, yang_name="maximum-frame-size", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + + def _get_ingress_egress_bandwidth_profile(self): + """ + Getter method for ingress_egress_bandwidth_profile, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile (container) + + YANG Description: The bandwith profile used in the ingress and egress +direction. + """ + return self.__ingress_egress_bandwidth_profile + + def _set_ingress_egress_bandwidth_profile(self, v, load=False): + """ + Setter method for ingress_egress_bandwidth_profile, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ingress_egress_bandwidth_profile is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ingress_egress_bandwidth_profile() directly. + + YANG Description: The bandwith profile used in the ingress and egress +direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ingress_egress_bandwidth_profile.ingress_egress_bandwidth_profile, is_container='container', yang_name="ingress-egress-bandwidth-profile", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ingress_egress_bandwidth_profile must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ingress_egress_bandwidth_profile.ingress_egress_bandwidth_profile, is_container='container', yang_name="ingress-egress-bandwidth-profile", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__ingress_egress_bandwidth_profile = t + if hasattr(self, '_set'): + self._set() + + def _unset_ingress_egress_bandwidth_profile(self): + self.__ingress_egress_bandwidth_profile = YANGDynClass(base=ingress_egress_bandwidth_profile.ingress_egress_bandwidth_profile, is_container='container', yang_name="ingress-egress-bandwidth-profile", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + + def _get_ingress_bandwidth_profile(self): + """ + Getter method for ingress_bandwidth_profile, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile (container) + + YANG Description: The bandwidth profile used in the ingress direction. + """ + return self.__ingress_bandwidth_profile + + def _set_ingress_bandwidth_profile(self, v, load=False): + """ + Setter method for ingress_bandwidth_profile, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ingress_bandwidth_profile is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ingress_bandwidth_profile() directly. + + YANG Description: The bandwidth profile used in the ingress direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ingress_bandwidth_profile.ingress_bandwidth_profile, is_container='container', yang_name="ingress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ingress_bandwidth_profile must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ingress_bandwidth_profile.ingress_bandwidth_profile, is_container='container', yang_name="ingress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__ingress_bandwidth_profile = t + if hasattr(self, '_set'): + self._set() + + def _unset_ingress_bandwidth_profile(self): + self.__ingress_bandwidth_profile = YANGDynClass(base=ingress_bandwidth_profile.ingress_bandwidth_profile, is_container='container', yang_name="ingress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + + def _get_egress_bandwidth_profile(self): + """ + Getter method for egress_bandwidth_profile, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile (container) + + YANG Description: The bandwidth profile used in the egress direction. + """ + return self.__egress_bandwidth_profile + + def _set_egress_bandwidth_profile(self, v, load=False): + """ + Setter method for egress_bandwidth_profile, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_egress_bandwidth_profile is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_egress_bandwidth_profile() directly. + + YANG Description: The bandwidth profile used in the egress direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=egress_bandwidth_profile.egress_bandwidth_profile, is_container='container', yang_name="egress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """egress_bandwidth_profile must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=egress_bandwidth_profile.egress_bandwidth_profile, is_container='container', yang_name="egress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__egress_bandwidth_profile = t + if hasattr(self, '_set'): + self._set() + + def _unset_egress_bandwidth_profile(self): + self.__egress_bandwidth_profile = YANGDynClass(base=egress_bandwidth_profile.egress_bandwidth_profile, is_container='container', yang_name="egress-bandwidth-profile", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + ltp_mac_address = __builtin__.property(_get_ltp_mac_address, _set_ltp_mac_address) + port_vlan_id = __builtin__.property(_get_port_vlan_id, _set_port_vlan_id) + maximum_frame_size = __builtin__.property(_get_maximum_frame_size, _set_maximum_frame_size) + ingress_egress_bandwidth_profile = __builtin__.property(_get_ingress_egress_bandwidth_profile, _set_ingress_egress_bandwidth_profile) + ingress_bandwidth_profile = __builtin__.property(_get_ingress_bandwidth_profile, _set_ingress_bandwidth_profile) + egress_bandwidth_profile = __builtin__.property(_get_egress_bandwidth_profile, _set_egress_bandwidth_profile) + + __choices__ = {'direction': {'symmetrical': ['ingress_egress_bandwidth_profile'], 'asymmetrical': ['ingress_bandwidth_profile', 'egress_bandwidth_profile']}} + _pyangbind_elements = OrderedDict([('ltp_mac_address', ltp_mac_address), ('port_vlan_id', port_vlan_id), ('maximum_frame_size', maximum_frame_size), ('ingress_egress_bandwidth_profile', ingress_egress_bandwidth_profile), ('ingress_bandwidth_profile', ingress_bandwidth_profile), ('egress_bandwidth_profile', egress_bandwidth_profile), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f617b95776db84f7bbe980eabe8fcce0c66cd0d1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/__init__.py @@ -0,0 +1,355 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class egress_bandwidth_profile(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-link-tp/egress-bandwidth-profile. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The bandwidth profile used in the egress direction. + """ + __slots__ = ('_path_helper', '_extmethods', '__bandwidth_profile_type','__CIR','__CBS','__EIR','__EBS','__color_aware','__coupling_flag',) + + _yang_name = 'egress-bandwidth-profile' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__bandwidth_profile_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) + self.__CIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + self.__CBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + self.__EIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + self.__EBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + self.__color_aware = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__coupling_flag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-link-tp', 'egress-bandwidth-profile'] + + def _get_bandwidth_profile_type(self): + """ + Getter method for bandwidth_profile_type, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/bandwidth_profile_type (etht-types:bandwidth-profile-type) + + YANG Description: The type of bandwidth profile. + """ + return self.__bandwidth_profile_type + + def _set_bandwidth_profile_type(self, v, load=False): + """ + Setter method for bandwidth_profile_type, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/bandwidth_profile_type (etht-types:bandwidth-profile-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_bandwidth_profile_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_bandwidth_profile_type() directly. + + YANG Description: The type of bandwidth profile. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """bandwidth_profile_type must be of a type compatible with etht-types:bandwidth-profile-type""", + 'defined-type': "etht-types:bandwidth-profile-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True)""", + }) + + self.__bandwidth_profile_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_bandwidth_profile_type(self): + self.__bandwidth_profile_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) + + + def _get_CIR(self): + """ + Getter method for CIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/CIR (uint64) + + YANG Description: Committed Information Rate in Kbps + """ + return self.__CIR + + def _set_CIR(self, v, load=False): + """ + Setter method for CIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/CIR (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_CIR is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_CIR() directly. + + YANG Description: Committed Information Rate in Kbps + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """CIR must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__CIR = t + if hasattr(self, '_set'): + self._set() + + def _unset_CIR(self): + self.__CIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + + def _get_CBS(self): + """ + Getter method for CBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/CBS (uint64) + + YANG Description: Committed Burst Size in in KBytes + """ + return self.__CBS + + def _set_CBS(self, v, load=False): + """ + Setter method for CBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/CBS (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_CBS is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_CBS() directly. + + YANG Description: Committed Burst Size in in KBytes + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """CBS must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__CBS = t + if hasattr(self, '_set'): + self._set() + + def _unset_CBS(self): + self.__CBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + + def _get_EIR(self): + """ + Getter method for EIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/EIR (uint64) + + YANG Description: Excess Information Rate in Kbps +In case of RFC 2698, PIR = CIR + EIR + """ + return self.__EIR + + def _set_EIR(self, v, load=False): + """ + Setter method for EIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/EIR (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_EIR is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_EIR() directly. + + YANG Description: Excess Information Rate in Kbps +In case of RFC 2698, PIR = CIR + EIR + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """EIR must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__EIR = t + if hasattr(self, '_set'): + self._set() + + def _unset_EIR(self): + self.__EIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + + def _get_EBS(self): + """ + Getter method for EBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/EBS (uint64) + + YANG Description: Excess Burst Size in KBytes. + In case of RFC 2698, PBS = CBS + EBS + """ + return self.__EBS + + def _set_EBS(self, v, load=False): + """ + Setter method for EBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/EBS (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_EBS is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_EBS() directly. + + YANG Description: Excess Burst Size in KBytes. + In case of RFC 2698, PBS = CBS + EBS + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """EBS must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__EBS = t + if hasattr(self, '_set'): + self._set() + + def _unset_EBS(self): + self.__EBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + + def _get_color_aware(self): + """ + Getter method for color_aware, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/color_aware (boolean) + + YANG Description: Indicates weather the color-mode is +color-aware or color-blind. + """ + return self.__color_aware + + def _set_color_aware(self, v, load=False): + """ + Setter method for color_aware, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/color_aware (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_color_aware is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_color_aware() directly. + + YANG Description: Indicates weather the color-mode is +color-aware or color-blind. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """color_aware must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__color_aware = t + if hasattr(self, '_set'): + self._set() + + def _unset_color_aware(self): + self.__color_aware = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_coupling_flag(self): + """ + Getter method for coupling_flag, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/coupling_flag (boolean) + + YANG Description: Coupling Flag. + """ + return self.__coupling_flag + + def _set_coupling_flag(self, v, load=False): + """ + Setter method for coupling_flag, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/egress_bandwidth_profile/coupling_flag (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_coupling_flag is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_coupling_flag() directly. + + YANG Description: Coupling Flag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """coupling_flag must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__coupling_flag = t + if hasattr(self, '_set'): + self._set() + + def _unset_coupling_flag(self): + self.__coupling_flag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + bandwidth_profile_type = __builtin__.property(_get_bandwidth_profile_type, _set_bandwidth_profile_type) + CIR = __builtin__.property(_get_CIR, _set_CIR) + CBS = __builtin__.property(_get_CBS, _set_CBS) + EIR = __builtin__.property(_get_EIR, _set_EIR) + EBS = __builtin__.property(_get_EBS, _set_EBS) + color_aware = __builtin__.property(_get_color_aware, _set_color_aware) + coupling_flag = __builtin__.property(_get_coupling_flag, _set_coupling_flag) + + __choices__ = {'direction': {'asymmetrical': ['bandwidth_profile_type', 'CIR', 'CBS', 'EIR', 'EBS', 'color_aware', 'coupling_flag']}} + _pyangbind_elements = OrderedDict([('bandwidth_profile_type', bandwidth_profile_type), ('CIR', CIR), ('CBS', CBS), ('EIR', EIR), ('EBS', EBS), ('color_aware', color_aware), ('coupling_flag', coupling_flag), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a3ec0871626ba67d06010ec0000c5c120b4fc71d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/__init__.py @@ -0,0 +1,355 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ingress_bandwidth_profile(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-link-tp/ingress-bandwidth-profile. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The bandwidth profile used in the ingress direction. + """ + __slots__ = ('_path_helper', '_extmethods', '__bandwidth_profile_type','__CIR','__CBS','__EIR','__EBS','__color_aware','__coupling_flag',) + + _yang_name = 'ingress-bandwidth-profile' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__bandwidth_profile_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) + self.__CIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + self.__CBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + self.__EIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + self.__EBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + self.__color_aware = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__coupling_flag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-link-tp', 'ingress-bandwidth-profile'] + + def _get_bandwidth_profile_type(self): + """ + Getter method for bandwidth_profile_type, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/bandwidth_profile_type (etht-types:bandwidth-profile-type) + + YANG Description: The type of bandwidth profile. + """ + return self.__bandwidth_profile_type + + def _set_bandwidth_profile_type(self, v, load=False): + """ + Setter method for bandwidth_profile_type, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/bandwidth_profile_type (etht-types:bandwidth-profile-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_bandwidth_profile_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_bandwidth_profile_type() directly. + + YANG Description: The type of bandwidth profile. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """bandwidth_profile_type must be of a type compatible with etht-types:bandwidth-profile-type""", + 'defined-type': "etht-types:bandwidth-profile-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True)""", + }) + + self.__bandwidth_profile_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_bandwidth_profile_type(self): + self.__bandwidth_profile_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) + + + def _get_CIR(self): + """ + Getter method for CIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/CIR (uint64) + + YANG Description: Committed Information Rate in Kbps + """ + return self.__CIR + + def _set_CIR(self, v, load=False): + """ + Setter method for CIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/CIR (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_CIR is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_CIR() directly. + + YANG Description: Committed Information Rate in Kbps + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """CIR must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__CIR = t + if hasattr(self, '_set'): + self._set() + + def _unset_CIR(self): + self.__CIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + + def _get_CBS(self): + """ + Getter method for CBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/CBS (uint64) + + YANG Description: Committed Burst Size in in KBytes + """ + return self.__CBS + + def _set_CBS(self, v, load=False): + """ + Setter method for CBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/CBS (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_CBS is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_CBS() directly. + + YANG Description: Committed Burst Size in in KBytes + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """CBS must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__CBS = t + if hasattr(self, '_set'): + self._set() + + def _unset_CBS(self): + self.__CBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + + def _get_EIR(self): + """ + Getter method for EIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/EIR (uint64) + + YANG Description: Excess Information Rate in Kbps +In case of RFC 2698, PIR = CIR + EIR + """ + return self.__EIR + + def _set_EIR(self, v, load=False): + """ + Setter method for EIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/EIR (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_EIR is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_EIR() directly. + + YANG Description: Excess Information Rate in Kbps +In case of RFC 2698, PIR = CIR + EIR + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """EIR must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__EIR = t + if hasattr(self, '_set'): + self._set() + + def _unset_EIR(self): + self.__EIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + + def _get_EBS(self): + """ + Getter method for EBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/EBS (uint64) + + YANG Description: Excess Burst Size in KBytes. + In case of RFC 2698, PBS = CBS + EBS + """ + return self.__EBS + + def _set_EBS(self, v, load=False): + """ + Setter method for EBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/EBS (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_EBS is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_EBS() directly. + + YANG Description: Excess Burst Size in KBytes. + In case of RFC 2698, PBS = CBS + EBS + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """EBS must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__EBS = t + if hasattr(self, '_set'): + self._set() + + def _unset_EBS(self): + self.__EBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + + def _get_color_aware(self): + """ + Getter method for color_aware, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/color_aware (boolean) + + YANG Description: Indicates weather the color-mode is +color-aware or color-blind. + """ + return self.__color_aware + + def _set_color_aware(self, v, load=False): + """ + Setter method for color_aware, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/color_aware (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_color_aware is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_color_aware() directly. + + YANG Description: Indicates weather the color-mode is +color-aware or color-blind. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """color_aware must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__color_aware = t + if hasattr(self, '_set'): + self._set() + + def _unset_color_aware(self): + self.__color_aware = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_coupling_flag(self): + """ + Getter method for coupling_flag, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/coupling_flag (boolean) + + YANG Description: Coupling Flag. + """ + return self.__coupling_flag + + def _set_coupling_flag(self, v, load=False): + """ + Setter method for coupling_flag, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_bandwidth_profile/coupling_flag (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_coupling_flag is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_coupling_flag() directly. + + YANG Description: Coupling Flag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """coupling_flag must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__coupling_flag = t + if hasattr(self, '_set'): + self._set() + + def _unset_coupling_flag(self): + self.__coupling_flag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'asymmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + bandwidth_profile_type = __builtin__.property(_get_bandwidth_profile_type, _set_bandwidth_profile_type) + CIR = __builtin__.property(_get_CIR, _set_CIR) + CBS = __builtin__.property(_get_CBS, _set_CBS) + EIR = __builtin__.property(_get_EIR, _set_EIR) + EBS = __builtin__.property(_get_EBS, _set_EBS) + color_aware = __builtin__.property(_get_color_aware, _set_color_aware) + coupling_flag = __builtin__.property(_get_coupling_flag, _set_coupling_flag) + + __choices__ = {'direction': {'asymmetrical': ['bandwidth_profile_type', 'CIR', 'CBS', 'EIR', 'EBS', 'color_aware', 'coupling_flag']}} + _pyangbind_elements = OrderedDict([('bandwidth_profile_type', bandwidth_profile_type), ('CIR', CIR), ('CBS', CBS), ('EIR', EIR), ('EBS', EBS), ('color_aware', color_aware), ('coupling_flag', coupling_flag), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..87d611cce246d950b52cf903fb9991bfe3f89eb7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/__init__.py @@ -0,0 +1,356 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ingress_egress_bandwidth_profile(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-link-tp/ingress-egress-bandwidth-profile. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The bandwith profile used in the ingress and egress +direction. + """ + __slots__ = ('_path_helper', '_extmethods', '__bandwidth_profile_type','__CIR','__CBS','__EIR','__EBS','__color_aware','__coupling_flag',) + + _yang_name = 'ingress-egress-bandwidth-profile' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__bandwidth_profile_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) + self.__CIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + self.__CBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + self.__EIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + self.__EBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + self.__color_aware = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__coupling_flag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-link-tp', 'ingress-egress-bandwidth-profile'] + + def _get_bandwidth_profile_type(self): + """ + Getter method for bandwidth_profile_type, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/bandwidth_profile_type (etht-types:bandwidth-profile-type) + + YANG Description: The type of bandwidth profile. + """ + return self.__bandwidth_profile_type + + def _set_bandwidth_profile_type(self, v, load=False): + """ + Setter method for bandwidth_profile_type, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/bandwidth_profile_type (etht-types:bandwidth-profile-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_bandwidth_profile_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_bandwidth_profile_type() directly. + + YANG Description: The type of bandwidth profile. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """bandwidth_profile_type must be of a type compatible with etht-types:bandwidth-profile-type""", + 'defined-type': "etht-types:bandwidth-profile-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True)""", + }) + + self.__bandwidth_profile_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_bandwidth_profile_type(self): + self.__bandwidth_profile_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:mef-10-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2697-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-2698-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:rfc-4115-bwp': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="bandwidth-profile-type", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:bandwidth-profile-type', is_config=True) + + + def _get_CIR(self): + """ + Getter method for CIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/CIR (uint64) + + YANG Description: Committed Information Rate in Kbps + """ + return self.__CIR + + def _set_CIR(self, v, load=False): + """ + Setter method for CIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/CIR (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_CIR is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_CIR() directly. + + YANG Description: Committed Information Rate in Kbps + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """CIR must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__CIR = t + if hasattr(self, '_set'): + self._set() + + def _unset_CIR(self): + self.__CIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + + def _get_CBS(self): + """ + Getter method for CBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/CBS (uint64) + + YANG Description: Committed Burst Size in in KBytes + """ + return self.__CBS + + def _set_CBS(self, v, load=False): + """ + Setter method for CBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/CBS (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_CBS is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_CBS() directly. + + YANG Description: Committed Burst Size in in KBytes + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """CBS must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__CBS = t + if hasattr(self, '_set'): + self._set() + + def _unset_CBS(self): + self.__CBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="CBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + + def _get_EIR(self): + """ + Getter method for EIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/EIR (uint64) + + YANG Description: Excess Information Rate in Kbps +In case of RFC 2698, PIR = CIR + EIR + """ + return self.__EIR + + def _set_EIR(self, v, load=False): + """ + Setter method for EIR, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/EIR (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_EIR is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_EIR() directly. + + YANG Description: Excess Information Rate in Kbps +In case of RFC 2698, PIR = CIR + EIR + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """EIR must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__EIR = t + if hasattr(self, '_set'): + self._set() + + def _unset_EIR(self): + self.__EIR = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EIR", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + + def _get_EBS(self): + """ + Getter method for EBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/EBS (uint64) + + YANG Description: Excess Burst Size in KBytes. + In case of RFC 2698, PBS = CBS + EBS + """ + return self.__EBS + + def _set_EBS(self, v, load=False): + """ + Setter method for EBS, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/EBS (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_EBS is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_EBS() directly. + + YANG Description: Excess Burst Size in KBytes. + In case of RFC 2698, PBS = CBS + EBS + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """EBS must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__EBS = t + if hasattr(self, '_set'): + self._set() + + def _unset_EBS(self): + self.__EBS = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="EBS", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + + def _get_color_aware(self): + """ + Getter method for color_aware, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/color_aware (boolean) + + YANG Description: Indicates weather the color-mode is +color-aware or color-blind. + """ + return self.__color_aware + + def _set_color_aware(self, v, load=False): + """ + Setter method for color_aware, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/color_aware (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_color_aware is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_color_aware() directly. + + YANG Description: Indicates weather the color-mode is +color-aware or color-blind. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """color_aware must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__color_aware = t + if hasattr(self, '_set'): + self._set() + + def _unset_color_aware(self): + self.__color_aware = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="color-aware", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_coupling_flag(self): + """ + Getter method for coupling_flag, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/coupling_flag (boolean) + + YANG Description: Coupling Flag. + """ + return self.__coupling_flag + + def _set_coupling_flag(self, v, load=False): + """ + Setter method for coupling_flag, mapped from YANG variable /networks/network/node/termination_point/eth_link_tp/ingress_egress_bandwidth_profile/coupling_flag (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_coupling_flag is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_coupling_flag() directly. + + YANG Description: Coupling Flag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """coupling_flag must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__coupling_flag = t + if hasattr(self, '_set'): + self._set() + + def _unset_coupling_flag(self): + self.__coupling_flag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="coupling-flag", parent=self, choice=('direction', 'symmetrical'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + bandwidth_profile_type = __builtin__.property(_get_bandwidth_profile_type, _set_bandwidth_profile_type) + CIR = __builtin__.property(_get_CIR, _set_CIR) + CBS = __builtin__.property(_get_CBS, _set_CBS) + EIR = __builtin__.property(_get_EIR, _set_EIR) + EBS = __builtin__.property(_get_EBS, _set_EBS) + color_aware = __builtin__.property(_get_color_aware, _set_color_aware) + coupling_flag = __builtin__.property(_get_coupling_flag, _set_coupling_flag) + + __choices__ = {'direction': {'symmetrical': ['bandwidth_profile_type', 'CIR', 'CBS', 'EIR', 'EBS', 'color_aware', 'coupling_flag']}} + _pyangbind_elements = OrderedDict([('bandwidth_profile_type', bandwidth_profile_type), ('CIR', CIR), ('CBS', CBS), ('EIR', EIR), ('EBS', EBS), ('color_aware', color_aware), ('coupling_flag', coupling_flag), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..940aa4ef9675dada114c2f07edf2d05dae6248a7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import supported_classification +from . import supported_vlan_operations +class eth_svc(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: ETH LTP Service attributes. + """ + __slots__ = ('_path_helper', '_extmethods', '__supported_classification','__supported_vlan_operations',) + + _yang_name = 'eth-svc' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__supported_classification = YANGDynClass(base=supported_classification.supported_classification, is_container='container', yang_name="supported-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + self.__supported_vlan_operations = YANGDynClass(base=supported_vlan_operations.supported_vlan_operations, is_container='container', yang_name="supported-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-svc'] + + def _get_supported_classification(self): + """ + Getter method for supported_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification (container) + + YANG Description: Service classification capability supported by the +Ethernet Link Termination Point (LTP). + """ + return self.__supported_classification + + def _set_supported_classification(self, v, load=False): + """ + Setter method for supported_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_supported_classification is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supported_classification() directly. + + YANG Description: Service classification capability supported by the +Ethernet Link Termination Point (LTP). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=supported_classification.supported_classification, is_container='container', yang_name="supported-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supported_classification must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=supported_classification.supported_classification, is_container='container', yang_name="supported-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__supported_classification = t + if hasattr(self, '_set'): + self._set() + + def _unset_supported_classification(self): + self.__supported_classification = YANGDynClass(base=supported_classification.supported_classification, is_container='container', yang_name="supported-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + + def _get_supported_vlan_operations(self): + """ + Getter method for supported_vlan_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations (container) + + YANG Description: Reports the VLAN operations supported by the ETH LTP. + """ + return self.__supported_vlan_operations + + def _set_supported_vlan_operations(self, v, load=False): + """ + Setter method for supported_vlan_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_supported_vlan_operations is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supported_vlan_operations() directly. + + YANG Description: Reports the VLAN operations supported by the ETH LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=supported_vlan_operations.supported_vlan_operations, is_container='container', yang_name="supported-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supported_vlan_operations must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=supported_vlan_operations.supported_vlan_operations, is_container='container', yang_name="supported-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__supported_vlan_operations = t + if hasattr(self, '_set'): + self._set() + + def _unset_supported_vlan_operations(self): + self.__supported_vlan_operations = YANGDynClass(base=supported_vlan_operations.supported_vlan_operations, is_container='container', yang_name="supported-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + supported_classification = __builtin__.property(_get_supported_classification, _set_supported_classification) + supported_vlan_operations = __builtin__.property(_get_supported_vlan_operations, _set_supported_vlan_operations) + + + _pyangbind_elements = OrderedDict([('supported_classification', supported_classification), ('supported_vlan_operations', supported_vlan_operations), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5a244125d7f6954bc9f25d2c7c3a38d5ae19d443 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/__init__.py @@ -0,0 +1,160 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import vlan_classification +class supported_classification(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-classification. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Service classification capability supported by the +Ethernet Link Termination Point (LTP). + """ + __slots__ = ('_path_helper', '_extmethods', '__port_classification','__vlan_classification',) + + _yang_name = 'supported-classification' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__port_classification = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="port-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__vlan_classification = YANGDynClass(base=vlan_classification.vlan_classification, is_container='container', yang_name="vlan-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-classification'] + + def _get_port_classification(self): + """ + Getter method for port_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/port_classification (boolean) + + YANG Description: Indicates that the ETH LTP support port-based service +classification. + """ + return self.__port_classification + + def _set_port_classification(self, v, load=False): + """ + Setter method for port_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/port_classification (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_port_classification is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_port_classification() directly. + + YANG Description: Indicates that the ETH LTP support port-based service +classification. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="port-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """port_classification must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="port-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__port_classification = t + if hasattr(self, '_set'): + self._set() + + def _unset_port_classification(self): + self.__port_classification = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="port-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_vlan_classification(self): + """ + Getter method for vlan_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification (container) + + YANG Description: Service classification capabilities based on the VLAN +tag(s) supported by the ETH LTP. + """ + return self.__vlan_classification + + def _set_vlan_classification(self, v, load=False): + """ + Setter method for vlan_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlan_classification is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlan_classification() directly. + + YANG Description: Service classification capabilities based on the VLAN +tag(s) supported by the ETH LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=vlan_classification.vlan_classification, is_container='container', yang_name="vlan-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlan_classification must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=vlan_classification.vlan_classification, is_container='container', yang_name="vlan-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__vlan_classification = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlan_classification(self): + self.__vlan_classification = YANGDynClass(base=vlan_classification.vlan_classification, is_container='container', yang_name="vlan-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + port_classification = __builtin__.property(_get_port_classification, _set_port_classification) + vlan_classification = __builtin__.property(_get_vlan_classification, _set_vlan_classification) + + + _pyangbind_elements = OrderedDict([('port_classification', port_classification), ('vlan_classification', vlan_classification), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fa8bc5167d0fbc7e572ff4b3b30c94d83f39f033 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/__init__.py @@ -0,0 +1,202 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import outer_tag +from . import second_tag +class vlan_classification(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-classification/vlan-classification. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Service classification capabilities based on the VLAN +tag(s) supported by the ETH LTP. + """ + __slots__ = ('_path_helper', '_extmethods', '__vlan_tag_classification','__outer_tag','__second_tag',) + + _yang_name = 'vlan-classification' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__vlan_tag_classification = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__outer_tag = YANGDynClass(base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + self.__second_tag = YANGDynClass(base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-classification', 'vlan-classification'] + + def _get_vlan_tag_classification(self): + """ + Getter method for vlan_tag_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/vlan_tag_classification (boolean) + + YANG Description: Indicates that the ETH LTP supports VLAN service +classification. + """ + return self.__vlan_tag_classification + + def _set_vlan_tag_classification(self, v, load=False): + """ + Setter method for vlan_tag_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/vlan_tag_classification (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlan_tag_classification is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlan_tag_classification() directly. + + YANG Description: Indicates that the ETH LTP supports VLAN service +classification. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="vlan-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlan_tag_classification must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__vlan_tag_classification = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlan_tag_classification(self): + self.__vlan_tag_classification = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_outer_tag(self): + """ + Getter method for outer_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag (container) + + YANG Description: Service classification capabilities based on the outer +VLAN tag, supported by the ETH LTP. + """ + return self.__outer_tag + + def _set_outer_tag(self, v, load=False): + """ + Setter method for outer_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_outer_tag is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_outer_tag() directly. + + YANG Description: Service classification capabilities based on the outer +VLAN tag, supported by the ETH LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """outer_tag must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__outer_tag = t + if hasattr(self, '_set'): + self._set() + + def _unset_outer_tag(self): + self.__outer_tag = YANGDynClass(base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + + def _get_second_tag(self): + """ + Getter method for second_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag (container) + + YANG Description: Service classification capabilities based on the second +VLAN tag, supported by the ETH LTP. + """ + return self.__second_tag + + def _set_second_tag(self, v, load=False): + """ + Setter method for second_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_second_tag is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_second_tag() directly. + + YANG Description: Service classification capabilities based on the second +VLAN tag, supported by the ETH LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """second_tag must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__second_tag = t + if hasattr(self, '_set'): + self._set() + + def _unset_second_tag(self): + self.__second_tag = YANGDynClass(base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + vlan_tag_classification = __builtin__.property(_get_vlan_tag_classification, _set_vlan_tag_classification) + outer_tag = __builtin__.property(_get_outer_tag, _set_outer_tag) + second_tag = __builtin__.property(_get_second_tag, _set_second_tag) + + + _pyangbind_elements = OrderedDict([('vlan_tag_classification', vlan_tag_classification), ('outer_tag', outer_tag), ('second_tag', second_tag), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..83e6e19a283bf7dba975d3a2c460eff16791b659 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/__init__.py @@ -0,0 +1,202 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class outer_tag(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-classification/vlan-classification/outer-tag. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Service classification capabilities based on the outer +VLAN tag, supported by the ETH LTP. + """ + __slots__ = ('_path_helper', '_extmethods', '__supported_tag_types','__vlan_bundling','__vlan_range',) + + _yang_name = 'outer-tag' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True) + self.__vlan_bundling = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-classification', 'vlan-classification', 'outer-tag'] + + def _get_supported_tag_types(self): + """ + Getter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/supported_tag_types (etht-types:eth-tag-classify) + + YANG Description: List of VLAN tag types that can be used for the VLAN +classification. In case VLAN classification is not +supported, the list is empty. + """ + return self.__supported_tag_types + + def _set_supported_tag_types(self, v, load=False): + """ + Setter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/supported_tag_types (etht-types:eth-tag-classify) + If this variable is read-only (config: false) in the + source YANG file, then _set_supported_tag_types is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supported_tag_types() directly. + + YANG Description: List of VLAN tag types that can be used for the VLAN +classification. In case VLAN classification is not +supported, the list is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supported_tag_types must be of a type compatible with etht-types:eth-tag-classify""", + 'defined-type': "etht-types:eth-tag-classify", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True)""", + }) + + self.__supported_tag_types = t + if hasattr(self, '_set'): + self._set() + + def _unset_supported_tag_types(self): + self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True) + + + def _get_vlan_bundling(self): + """ + Getter method for vlan_bundling, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/vlan_bundling (boolean) + + YANG Description: In case VLAN classification is supported, indicates whether +VLAN bundling classification is also supported. + """ + return self.__vlan_bundling + + def _set_vlan_bundling(self, v, load=False): + """ + Setter method for vlan_bundling, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/vlan_bundling (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlan_bundling is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlan_bundling() directly. + + YANG Description: In case VLAN classification is supported, indicates whether +VLAN bundling classification is also supported. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlan_bundling must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__vlan_bundling = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlan_bundling(self): + self.__vlan_bundling = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_vlan_range(self): + """ + Getter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/vlan_range (etht-types:vid-range-type) + + YANG Description: In case VLAN classification is supported, indicates the +of available VLAN ID values. + """ + return self.__vlan_range + + def _set_vlan_range(self, v, load=False): + """ + Setter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/outer_tag/vlan_range (etht-types:vid-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlan_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlan_range() directly. + + YANG Description: In case VLAN classification is supported, indicates the +of available VLAN ID values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlan_range must be of a type compatible with etht-types:vid-range-type""", + 'defined-type': "etht-types:vid-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True)""", + }) + + self.__vlan_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlan_range(self): + self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) + + supported_tag_types = __builtin__.property(_get_supported_tag_types, _set_supported_tag_types) + vlan_bundling = __builtin__.property(_get_vlan_bundling, _set_vlan_bundling) + vlan_range = __builtin__.property(_get_vlan_range, _set_vlan_range) + + + _pyangbind_elements = OrderedDict([('supported_tag_types', supported_tag_types), ('vlan_bundling', vlan_bundling), ('vlan_range', vlan_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..98c6f24622bbb21c4721caa5f47b926b56bb48b2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/__init__.py @@ -0,0 +1,243 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class second_tag(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-classification/vlan-classification/second-tag. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Service classification capabilities based on the second +VLAN tag, supported by the ETH LTP. + """ + __slots__ = ('_path_helper', '_extmethods', '__second_tag_classification','__supported_tag_types','__vlan_bundling','__vlan_range',) + + _yang_name = 'second-tag' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__second_tag_classification = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="second-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True) + self.__vlan_bundling = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-classification', 'vlan-classification', 'second-tag'] + + def _get_second_tag_classification(self): + """ + Getter method for second_tag_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/second_tag_classification (boolean) + + YANG Description: Indicates that the ETH LTP support VLAN service +classification based on the second VLAN tag. + """ + return self.__second_tag_classification + + def _set_second_tag_classification(self, v, load=False): + """ + Setter method for second_tag_classification, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/second_tag_classification (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_second_tag_classification is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_second_tag_classification() directly. + + YANG Description: Indicates that the ETH LTP support VLAN service +classification based on the second VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="second-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """second_tag_classification must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="second-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__second_tag_classification = t + if hasattr(self, '_set'): + self._set() + + def _unset_second_tag_classification(self): + self.__second_tag_classification = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="second-tag-classification", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_supported_tag_types(self): + """ + Getter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/supported_tag_types (etht-types:eth-tag-classify) + + YANG Description: List of VLAN tag types that can be used for the VLAN +classification. In case VLAN classification is not +supported, the list is empty. + """ + return self.__supported_tag_types + + def _set_supported_tag_types(self, v, load=False): + """ + Setter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/supported_tag_types (etht-types:eth-tag-classify) + If this variable is read-only (config: false) in the + source YANG file, then _set_supported_tag_types is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supported_tag_types() directly. + + YANG Description: List of VLAN tag types that can be used for the VLAN +classification. In case VLAN classification is not +supported, the list is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supported_tag_types must be of a type compatible with etht-types:eth-tag-classify""", + 'defined-type': "etht-types:eth-tag-classify", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True)""", + }) + + self.__supported_tag_types = t + if hasattr(self, '_set'): + self._set() + + def _unset_supported_tag_types(self): + self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:classify-s-or-c-vlan': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-classify', is_config=True) + + + def _get_vlan_bundling(self): + """ + Getter method for vlan_bundling, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/vlan_bundling (boolean) + + YANG Description: In case VLAN classification is supported, indicates whether +VLAN bundling classification is also supported. + """ + return self.__vlan_bundling + + def _set_vlan_bundling(self, v, load=False): + """ + Setter method for vlan_bundling, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/vlan_bundling (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlan_bundling is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlan_bundling() directly. + + YANG Description: In case VLAN classification is supported, indicates whether +VLAN bundling classification is also supported. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlan_bundling must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__vlan_bundling = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlan_bundling(self): + self.__vlan_bundling = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-bundling", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_vlan_range(self): + """ + Getter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/vlan_range (etht-types:vid-range-type) + + YANG Description: In case VLAN classification is supported, indicates the +of available VLAN ID values. + """ + return self.__vlan_range + + def _set_vlan_range(self, v, load=False): + """ + Setter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_classification/vlan_classification/second_tag/vlan_range (etht-types:vid-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlan_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlan_range() directly. + + YANG Description: In case VLAN classification is supported, indicates the +of available VLAN ID values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlan_range must be of a type compatible with etht-types:vid-range-type""", + 'defined-type': "etht-types:vid-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True)""", + }) + + self.__vlan_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlan_range(self): + self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) + + second_tag_classification = __builtin__.property(_get_second_tag_classification, _set_second_tag_classification) + supported_tag_types = __builtin__.property(_get_supported_tag_types, _set_supported_tag_types) + vlan_bundling = __builtin__.property(_get_vlan_bundling, _set_vlan_bundling) + vlan_range = __builtin__.property(_get_vlan_range, _set_vlan_range) + + + _pyangbind_elements = OrderedDict([('second_tag_classification', second_tag_classification), ('supported_tag_types', supported_tag_types), ('vlan_bundling', vlan_bundling), ('vlan_range', vlan_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9b5cfc5b2abbecc54199df5db879f059fbd6fdfc --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/__init__.py @@ -0,0 +1,240 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import vlan_pop +from . import vlan_push +class supported_vlan_operations(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-vlan-operations. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Reports the VLAN operations supported by the ETH LTP. + """ + __slots__ = ('_path_helper', '_extmethods', '__asymmetrical_operations','__transparent_vlan_operations','__vlan_pop','__vlan_push',) + + _yang_name = 'supported-vlan-operations' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__asymmetrical_operations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="asymmetrical-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__transparent_vlan_operations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transparent-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__vlan_pop = YANGDynClass(base=vlan_pop.vlan_pop, is_container='container', yang_name="vlan-pop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + self.__vlan_push = YANGDynClass(base=vlan_push.vlan_push, is_container='container', yang_name="vlan-push", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-vlan-operations'] + + def _get_asymmetrical_operations(self): + """ + Getter method for asymmetrical_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/asymmetrical_operations (boolean) + + YANG Description: Indicates whether the ETH LTP supports also asymmetrical +VLAN operations.It is assumed that symmetrical VLAN +operations are alwyas supported. + """ + return self.__asymmetrical_operations + + def _set_asymmetrical_operations(self, v, load=False): + """ + Setter method for asymmetrical_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/asymmetrical_operations (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_asymmetrical_operations is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_asymmetrical_operations() directly. + + YANG Description: Indicates whether the ETH LTP supports also asymmetrical +VLAN operations.It is assumed that symmetrical VLAN +operations are alwyas supported. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="asymmetrical-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """asymmetrical_operations must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="asymmetrical-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__asymmetrical_operations = t + if hasattr(self, '_set'): + self._set() + + def _unset_asymmetrical_operations(self): + self.__asymmetrical_operations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="asymmetrical-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_transparent_vlan_operations(self): + """ + Getter method for transparent_vlan_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/transparent_vlan_operations (boolean) + + YANG Description: Indicates that the ETH LTP supports transparent +operations. + """ + return self.__transparent_vlan_operations + + def _set_transparent_vlan_operations(self, v, load=False): + """ + Setter method for transparent_vlan_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/transparent_vlan_operations (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_transparent_vlan_operations is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_transparent_vlan_operations() directly. + + YANG Description: Indicates that the ETH LTP supports transparent +operations. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="transparent-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """transparent_vlan_operations must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transparent-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__transparent_vlan_operations = t + if hasattr(self, '_set'): + self._set() + + def _unset_transparent_vlan_operations(self): + self.__transparent_vlan_operations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="transparent-vlan-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_vlan_pop(self): + """ + Getter method for vlan_pop, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop (container) + + YANG Description: Indicates VLAN pop or swap operations capabilities. + """ + return self.__vlan_pop + + def _set_vlan_pop(self, v, load=False): + """ + Setter method for vlan_pop, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlan_pop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlan_pop() directly. + + YANG Description: Indicates VLAN pop or swap operations capabilities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=vlan_pop.vlan_pop, is_container='container', yang_name="vlan-pop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlan_pop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=vlan_pop.vlan_pop, is_container='container', yang_name="vlan-pop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__vlan_pop = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlan_pop(self): + self.__vlan_pop = YANGDynClass(base=vlan_pop.vlan_pop, is_container='container', yang_name="vlan-pop", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + + def _get_vlan_push(self): + """ + Getter method for vlan_push, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push (container) + + YANG Description: Indicates VLAN push or swap operations capabilities. + """ + return self.__vlan_push + + def _set_vlan_push(self, v, load=False): + """ + Setter method for vlan_push, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlan_push is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlan_push() directly. + + YANG Description: Indicates VLAN push or swap operations capabilities. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=vlan_push.vlan_push, is_container='container', yang_name="vlan-push", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlan_push must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=vlan_push.vlan_push, is_container='container', yang_name="vlan-push", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__vlan_push = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlan_push(self): + self.__vlan_push = YANGDynClass(base=vlan_push.vlan_push, is_container='container', yang_name="vlan-push", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + asymmetrical_operations = __builtin__.property(_get_asymmetrical_operations, _set_asymmetrical_operations) + transparent_vlan_operations = __builtin__.property(_get_transparent_vlan_operations, _set_transparent_vlan_operations) + vlan_pop = __builtin__.property(_get_vlan_pop, _set_vlan_pop) + vlan_push = __builtin__.property(_get_vlan_push, _set_vlan_push) + + + _pyangbind_elements = OrderedDict([('asymmetrical_operations', asymmetrical_operations), ('transparent_vlan_operations', transparent_vlan_operations), ('vlan_pop', vlan_pop), ('vlan_push', vlan_push), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bfeb46635eb64c076046b58e2b9b5a6c61ae314a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class vlan_pop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-vlan-operations/vlan-pop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Indicates VLAN pop or swap operations capabilities. + """ + __slots__ = ('_path_helper', '_extmethods', '__vlan_pop_operations','__max_pop_tags',) + + _yang_name = 'vlan-pop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__vlan_pop_operations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-pop-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__max_pop_tags = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="max-pop-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-vlan-operations', 'vlan-pop'] + + def _get_vlan_pop_operations(self): + """ + Getter method for vlan_pop_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/vlan_pop_operations (boolean) + + YANG Description: Indicates that the ETH LTP supports VLAN pop or +swap operations. + """ + return self.__vlan_pop_operations + + def _set_vlan_pop_operations(self, v, load=False): + """ + Setter method for vlan_pop_operations, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/vlan_pop_operations (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlan_pop_operations is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlan_pop_operations() directly. + + YANG Description: Indicates that the ETH LTP supports VLAN pop or +swap operations. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="vlan-pop-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlan_pop_operations must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-pop-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__vlan_pop_operations = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlan_pop_operations(self): + self.__vlan_pop_operations = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-pop-operations", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_max_pop_tags(self): + """ + Getter method for max_pop_tags, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/max_pop_tags (uint8) + + YANG Description: Indicates the maximum number of tags that can be +popped/swapped. + """ + return self.__max_pop_tags + + def _set_max_pop_tags(self, v, load=False): + """ + Setter method for max_pop_tags, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_pop/max_pop_tags (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_pop_tags is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_pop_tags() directly. + + YANG Description: Indicates the maximum number of tags that can be +popped/swapped. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="max-pop-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_pop_tags must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="max-pop-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__max_pop_tags = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_pop_tags(self): + self.__max_pop_tags = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..2']}), is_leaf=True, yang_name="max-pop-tags", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + vlan_pop_operations = __builtin__.property(_get_vlan_pop_operations, _set_vlan_pop_operations) + max_pop_tags = __builtin__.property(_get_max_pop_tags, _set_max_pop_tags) + + + _pyangbind_elements = OrderedDict([('vlan_pop_operations', vlan_pop_operations), ('max_pop_tags', max_pop_tags), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..256af6aa1ae152bd499817fa829dc8f9554e2e36 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/__init__.py @@ -0,0 +1,201 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import outer_tag +from . import second_tag +class vlan_push(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-vlan-operations/vlan-push. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Indicates VLAN push or swap operations capabilities. + """ + __slots__ = ('_path_helper', '_extmethods', '__vlan_push_operation','__outer_tag','__second_tag',) + + _yang_name = 'vlan-push' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__vlan_push_operation = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-push-operation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__outer_tag = YANGDynClass(base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + self.__second_tag = YANGDynClass(base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-vlan-operations', 'vlan-push'] + + def _get_vlan_push_operation(self): + """ + Getter method for vlan_push_operation, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/vlan_push_operation (boolean) + + YANG Description: Indicates that the ETH LTP supports VLAN push or +swap operations. + """ + return self.__vlan_push_operation + + def _set_vlan_push_operation(self, v, load=False): + """ + Setter method for vlan_push_operation, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/vlan_push_operation (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlan_push_operation is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlan_push_operation() directly. + + YANG Description: Indicates that the ETH LTP supports VLAN push or +swap operations. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="vlan-push-operation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlan_push_operation must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-push-operation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__vlan_push_operation = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlan_push_operation(self): + self.__vlan_push_operation = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="vlan-push-operation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_outer_tag(self): + """ + Getter method for outer_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag (container) + + YANG Description: Indicates the supported VLAN operation capabilities +on the outer VLAN tag. + """ + return self.__outer_tag + + def _set_outer_tag(self, v, load=False): + """ + Setter method for outer_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_outer_tag is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_outer_tag() directly. + + YANG Description: Indicates the supported VLAN operation capabilities +on the outer VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """outer_tag must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__outer_tag = t + if hasattr(self, '_set'): + self._set() + + def _unset_outer_tag(self): + self.__outer_tag = YANGDynClass(base=outer_tag.outer_tag, is_container='container', yang_name="outer-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + + def _get_second_tag(self): + """ + Getter method for second_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag (container) + + YANG Description: Indicates the supported VLAN operation capabilities +on the second VLAN tag. + """ + return self.__second_tag + + def _set_second_tag(self, v, load=False): + """ + Setter method for second_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_second_tag is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_second_tag() directly. + + YANG Description: Indicates the supported VLAN operation capabilities +on the second VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """second_tag must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__second_tag = t + if hasattr(self, '_set'): + self._set() + + def _unset_second_tag(self): + self.__second_tag = YANGDynClass(base=second_tag.second_tag, is_container='container', yang_name="second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + vlan_push_operation = __builtin__.property(_get_vlan_push_operation, _set_vlan_push_operation) + outer_tag = __builtin__.property(_get_outer_tag, _set_outer_tag) + second_tag = __builtin__.property(_get_second_tag, _set_second_tag) + + + _pyangbind_elements = OrderedDict([('vlan_push_operation', vlan_push_operation), ('outer_tag', outer_tag), ('second_tag', second_tag), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c468dbf17f31906148b09a9ee4841a4d241bdc91 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class outer_tag(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-vlan-operations/vlan-push/outer-tag. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Indicates the supported VLAN operation capabilities +on the outer VLAN tag. + """ + __slots__ = ('_path_helper', '_extmethods', '__supported_tag_types','__vlan_range',) + + _yang_name = 'outer-tag' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-vlan-operations', 'vlan-push', 'outer-tag'] + + def _get_supported_tag_types(self): + """ + Getter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/supported_tag_types (etht-types:eth-tag-type) + + YANG Description: List of VLAN tag types that can be used to push or swap a +VLAN tag. In case VLAN push/swap is not supported, the list +is empty. + """ + return self.__supported_tag_types + + def _set_supported_tag_types(self, v, load=False): + """ + Setter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/supported_tag_types (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_supported_tag_types is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supported_tag_types() directly. + + YANG Description: List of VLAN tag types that can be used to push or swap a +VLAN tag. In case VLAN push/swap is not supported, the list +is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supported_tag_types must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", + }) + + self.__supported_tag_types = t + if hasattr(self, '_set'): + self._set() + + def _unset_supported_tag_types(self): + self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + + + def _get_vlan_range(self): + """ + Getter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/vlan_range (etht-types:vid-range-type) + + YANG Description: In case VLAN push/swap operation is supported, the range +of available VLAN ID values. + """ + return self.__vlan_range + + def _set_vlan_range(self, v, load=False): + """ + Setter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/outer_tag/vlan_range (etht-types:vid-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlan_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlan_range() directly. + + YANG Description: In case VLAN push/swap operation is supported, the range +of available VLAN ID values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlan_range must be of a type compatible with etht-types:vid-range-type""", + 'defined-type': "etht-types:vid-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True)""", + }) + + self.__vlan_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlan_range(self): + self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) + + supported_tag_types = __builtin__.property(_get_supported_tag_types, _set_supported_tag_types) + vlan_range = __builtin__.property(_get_vlan_range, _set_vlan_range) + + + _pyangbind_elements = OrderedDict([('supported_tag_types', supported_tag_types), ('vlan_range', vlan_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..33831d33113ddb21f1e4625e8b02aebb973d1fc8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/__init__.py @@ -0,0 +1,202 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class second_tag(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/eth-svc/supported-vlan-operations/vlan-push/second-tag. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Indicates the supported VLAN operation capabilities +on the second VLAN tag. + """ + __slots__ = ('_path_helper', '_extmethods', '__push_second_tag','__supported_tag_types','__vlan_range',) + + _yang_name = 'second-tag' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__push_second_tag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="push-second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'eth-svc', 'supported-vlan-operations', 'vlan-push', 'second-tag'] + + def _get_push_second_tag(self): + """ + Getter method for push_second_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/push_second_tag (boolean) + + YANG Description: Indicates that the ETH LTP supports VLAN push or swap +operations for the second VLAN tag. + """ + return self.__push_second_tag + + def _set_push_second_tag(self, v, load=False): + """ + Setter method for push_second_tag, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/push_second_tag (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_push_second_tag is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_push_second_tag() directly. + + YANG Description: Indicates that the ETH LTP supports VLAN push or swap +operations for the second VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="push-second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """push_second_tag must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="push-second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__push_second_tag = t + if hasattr(self, '_set'): + self._set() + + def _unset_push_second_tag(self): + self.__push_second_tag = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="push-second-tag", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='boolean', is_config=True) + + + def _get_supported_tag_types(self): + """ + Getter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/supported_tag_types (etht-types:eth-tag-type) + + YANG Description: List of VLAN tag types that can be used to push or swap a +VLAN tag. In case VLAN push/swap is not supported, the list +is empty. + """ + return self.__supported_tag_types + + def _set_supported_tag_types(self, v, load=False): + """ + Setter method for supported_tag_types, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/supported_tag_types (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_supported_tag_types is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supported_tag_types() directly. + + YANG Description: List of VLAN tag types that can be used to push or swap a +VLAN tag. In case VLAN push/swap is not supported, the list +is empty. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supported_tag_types must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", + }) + + self.__supported_tag_types = t + if hasattr(self, '_set'): + self._set() + + def _unset_supported_tag_types(self): + self.__supported_tag_types = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},)), is_leaf=False, yang_name="supported-tag-types", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + + + def _get_vlan_range(self): + """ + Getter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/vlan_range (etht-types:vid-range-type) + + YANG Description: In case VLAN push/swap operation is supported, the range +of available VLAN ID values. + """ + return self.__vlan_range + + def _set_vlan_range(self, v, load=False): + """ + Setter method for vlan_range, mapped from YANG variable /networks/network/node/termination_point/eth_svc/supported_vlan_operations/vlan_push/second_tag/vlan_range (etht-types:vid-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlan_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlan_range() directly. + + YANG Description: In case VLAN push/swap operation is supported, the range +of available VLAN ID values. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlan_range must be of a type compatible with etht-types:vid-range-type""", + 'defined-type': "etht-types:vid-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True)""", + }) + + self.__vlan_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlan_range(self): + self.__vlan_range = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="vlan-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vid-range-type', is_config=True) + + push_second_tag = __builtin__.property(_get_push_second_tag, _set_push_second_tag) + supported_tag_types = __builtin__.property(_get_supported_tag_types, _set_supported_tag_types) + vlan_range = __builtin__.property(_get_vlan_range, _set_vlan_range) + + + _pyangbind_elements = OrderedDict([('push_second_tag', push_second_tag), ('supported_tag_types', supported_tag_types), ('vlan_range', vlan_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cb2a897c8b0ccb1e091bf4907d42c7e6c3a32f11 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py @@ -0,0 +1,222 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class supporting_termination_point(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/supporting-termination-point. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This list identifies any termination points on which a +given termination point depends or onto which it maps. +Those termination points will themselves be contained +in a supporting node. This dependency information can be +inferred from the dependencies between links. Therefore, +this item is not separately configurable. Hence, no +corresponding constraint needs to be articulated. +The corresponding information is simply provided by the +implementing system. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__node_ref','__tp_ref',) + + _yang_name = 'supporting-termination-point' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'supporting-termination-point'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point/network_ref (leafref) + + YANG Description: This leaf identifies in which topology the +supporting termination point is present. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: This leaf identifies in which topology the +supporting termination point is present. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + + def _get_node_ref(self): + """ + Getter method for node_ref, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point/node_ref (leafref) + + YANG Description: This leaf identifies in which node the supporting +termination point is present. + """ + return self.__node_ref + + def _set_node_ref(self, v, load=False): + """ + Setter method for node_ref, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point/node_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_ref() directly. + + YANG Description: This leaf identifies in which node the supporting +termination point is present. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", + }) + + self.__node_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_ref(self): + self.__node_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="node-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + + def _get_tp_ref(self): + """ + Getter method for tp_ref, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point/tp_ref (leafref) + + YANG Description: Reference to the underlay node (the underlay node must +be in a different topology). + """ + return self.__tp_ref + + def _set_tp_ref(self, v, load=False): + """ + Setter method for tp_ref, mapped from YANG variable /networks/network/node/termination_point/supporting_termination_point/tp_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tp_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tp_ref() directly. + + YANG Description: Reference to the underlay node (the underlay node must +be in a different topology). + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tp_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True)""", + }) + + self.__tp_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_tp_ref(self): + self.__tp_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tp-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network-topology', defining_module='ietf-network-topology', yang_type='leafref', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + node_ref = __builtin__.property(_get_node_ref, _set_node_ref) + tp_ref = __builtin__.property(_get_tp_ref, _set_tp_ref) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('node_ref', node_ref), ('tp_ref', tp_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4c7ab6264207b95a60a64c48b47c0bcc373b6e22 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/__init__.py @@ -0,0 +1,445 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import interface_switching_capability +from . import geolocation +from . import otn_ltp +from . import client_svc +class te(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/te. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Indicates TE support. + """ + __slots__ = ('_path_helper', '_extmethods', '__admin_status','__name','__interface_switching_capability','__inter_domain_plug_id','__inter_layer_lock_id','__oper_status','__geolocation','__otn_ltp','__client_svc',) + + _yang_name = 'te' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__inter_domain_plug_id = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="inter-domain-plug-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + self.__inter_layer_lock_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) + self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + self.__otn_ltp = YANGDynClass(base=otn_ltp.otn_ltp, is_container='container', yang_name="otn-ltp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__client_svc = YANGDynClass(base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'te'] + + def _get_admin_status(self): + """ + Getter method for admin_status, mapped from YANG variable /networks/network/node/termination_point/te/admin_status (te-types:te-admin-status) + + YANG Description: The administrative state of the LTP. + """ + return self.__admin_status + + def _set_admin_status(self, v, load=False): + """ + Setter method for admin_status, mapped from YANG variable /networks/network/node/termination_point/te/admin_status (te-types:te-admin-status) + If this variable is read-only (config: false) in the + source YANG file, then _set_admin_status is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_admin_status() directly. + + YANG Description: The administrative state of the LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """admin_status must be of a type compatible with te-types:te-admin-status""", + 'defined-type': "te-types:te-admin-status", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True)""", + }) + + self.__admin_status = t + if hasattr(self, '_set'): + self._set() + + def _unset_admin_status(self): + self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/node/termination_point/te/name (string) + + YANG Description: A descriptive name for the LTP. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/node/termination_point/te/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: A descriptive name for the LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_interface_switching_capability(self): + """ + Getter method for interface_switching_capability, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability (list) + + YANG Description: List of ISCDs for this link. + """ + return self.__interface_switching_capability + + def _set_interface_switching_capability(self, v, load=False): + """ + Setter method for interface_switching_capability, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_interface_switching_capability is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_interface_switching_capability() directly. + + YANG Description: List of ISCDs for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """interface_switching_capability must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__interface_switching_capability = t + if hasattr(self, '_set'): + self._set() + + def _unset_interface_switching_capability(self): + self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_inter_domain_plug_id(self): + """ + Getter method for inter_domain_plug_id, mapped from YANG variable /networks/network/node/termination_point/te/inter_domain_plug_id (binary) + + YANG Description: A network-wide unique number that identifies on the +network a connection that supports a given inter-domain +TE link. This is a more flexible alternative to specifying +'remote-te-node-id' and 'remote-te-link-tp-id' on a TE link +when the provider either does not know 'remote-te-node-id' +and 'remote-te-link-tp-id' or needs to give the client the +flexibility to mix and match multiple topologies. + """ + return self.__inter_domain_plug_id + + def _set_inter_domain_plug_id(self, v, load=False): + """ + Setter method for inter_domain_plug_id, mapped from YANG variable /networks/network/node/termination_point/te/inter_domain_plug_id (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_inter_domain_plug_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_inter_domain_plug_id() directly. + + YANG Description: A network-wide unique number that identifies on the +network a connection that supports a given inter-domain +TE link. This is a more flexible alternative to specifying +'remote-te-node-id' and 'remote-te-link-tp-id' on a TE link +when the provider either does not know 'remote-te-node-id' +and 'remote-te-link-tp-id' or needs to give the client the +flexibility to mix and match multiple topologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="inter-domain-plug-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """inter_domain_plug_id must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="inter-domain-plug-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__inter_domain_plug_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_inter_domain_plug_id(self): + self.__inter_domain_plug_id = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="inter-domain-plug-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + + def _get_inter_layer_lock_id(self): + """ + Getter method for inter_layer_lock_id, mapped from YANG variable /networks/network/node/termination_point/te/inter_layer_lock_id (uint32) + + YANG Description: Inter-layer lock ID, used for path computation in a TE +topology covering multiple layers or multiple regions. + """ + return self.__inter_layer_lock_id + + def _set_inter_layer_lock_id(self, v, load=False): + """ + Setter method for inter_layer_lock_id, mapped from YANG variable /networks/network/node/termination_point/te/inter_layer_lock_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_inter_layer_lock_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_inter_layer_lock_id() directly. + + YANG Description: Inter-layer lock ID, used for path computation in a TE +topology covering multiple layers or multiple regions. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """inter_layer_lock_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__inter_layer_lock_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_inter_layer_lock_id(self): + self.__inter_layer_lock_id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="inter-layer-lock-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_oper_status(self): + """ + Getter method for oper_status, mapped from YANG variable /networks/network/node/termination_point/te/oper_status (te-types:te-oper-status) + + YANG Description: The current operational state of the LTP. + """ + return self.__oper_status + + def _set_oper_status(self, v, load=False): + """ + Setter method for oper_status, mapped from YANG variable /networks/network/node/termination_point/te/oper_status (te-types:te-oper-status) + If this variable is read-only (config: false) in the + source YANG file, then _set_oper_status is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_oper_status() directly. + + YANG Description: The current operational state of the LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """oper_status must be of a type compatible with te-types:te-oper-status""", + 'defined-type': "te-types:te-oper-status", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False)""", + }) + + self.__oper_status = t + if hasattr(self, '_set'): + self._set() + + def _unset_oper_status(self): + self.__oper_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="oper-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-oper-status', is_config=False) + + + def _get_geolocation(self): + """ + Getter method for geolocation, mapped from YANG variable /networks/network/node/termination_point/te/geolocation (container) + + YANG Description: Contains a GPS location. + """ + return self.__geolocation + + def _set_geolocation(self, v, load=False): + """ + Setter method for geolocation, mapped from YANG variable /networks/network/node/termination_point/te/geolocation (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_geolocation is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_geolocation() directly. + + YANG Description: Contains a GPS location. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """geolocation must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__geolocation = t + if hasattr(self, '_set'): + self._set() + + def _unset_geolocation(self): + self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + + def _get_otn_ltp(self): + """ + Getter method for otn_ltp, mapped from YANG variable /networks/network/node/termination_point/te/otn_ltp (container) + + YANG Description: Attributes of the OTN Link Termination Point (LTP). + """ + return self.__otn_ltp + + def _set_otn_ltp(self, v, load=False): + """ + Setter method for otn_ltp, mapped from YANG variable /networks/network/node/termination_point/te/otn_ltp (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_ltp is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_ltp() directly. + + YANG Description: Attributes of the OTN Link Termination Point (LTP). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_ltp.otn_ltp, is_container='container', yang_name="otn-ltp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_ltp must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_ltp.otn_ltp, is_container='container', yang_name="otn-ltp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn_ltp = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_ltp(self): + self.__otn_ltp = YANGDynClass(base=otn_ltp.otn_ltp, is_container='container', yang_name="otn-ltp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_client_svc(self): + """ + Getter method for client_svc, mapped from YANG variable /networks/network/node/termination_point/te/client_svc (container) + + YANG Description: OTN LTP Service attributes. + """ + return self.__client_svc + + def _set_client_svc(self, v, load=False): + """ + Setter method for client_svc, mapped from YANG variable /networks/network/node/termination_point/te/client_svc (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_client_svc is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_client_svc() directly. + + YANG Description: OTN LTP Service attributes. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """client_svc must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__client_svc = t + if hasattr(self, '_set'): + self._set() + + def _unset_client_svc(self): + self.__client_svc = YANGDynClass(base=client_svc.client_svc, is_container='container', yang_name="client-svc", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + admin_status = __builtin__.property(_get_admin_status, _set_admin_status) + name = __builtin__.property(_get_name, _set_name) + interface_switching_capability = __builtin__.property(_get_interface_switching_capability, _set_interface_switching_capability) + inter_domain_plug_id = __builtin__.property(_get_inter_domain_plug_id, _set_inter_domain_plug_id) + inter_layer_lock_id = __builtin__.property(_get_inter_layer_lock_id, _set_inter_layer_lock_id) + oper_status = __builtin__.property(_get_oper_status) + geolocation = __builtin__.property(_get_geolocation) + otn_ltp = __builtin__.property(_get_otn_ltp, _set_otn_ltp) + client_svc = __builtin__.property(_get_client_svc, _set_client_svc) + + + _pyangbind_elements = OrderedDict([('admin_status', admin_status), ('name', name), ('interface_switching_capability', interface_switching_capability), ('inter_domain_plug_id', inter_domain_plug_id), ('inter_layer_lock_id', inter_layer_lock_id), ('oper_status', oper_status), ('geolocation', geolocation), ('otn_ltp', otn_ltp), ('client_svc', client_svc), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/client_svc/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/client_svc/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6dd0b2c132eb9356cec14f32df2042636d14d032 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/client_svc/__init__.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class client_svc(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/client-svc. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN LTP Service attributes. + """ + __slots__ = ('_path_helper', '_extmethods', '__supported_client_signal',) + + _yang_name = 'client-svc' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__supported_client_signal = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'te', 'client-svc'] + + def _get_supported_client_signal(self): + """ + Getter method for supported_client_signal, mapped from YANG variable /networks/network/node/termination_point/te/client_svc/supported_client_signal (identityref) + + YANG Description: List of client signal types supported by the LTP. + """ + return self.__supported_client_signal + + def _set_supported_client_signal(self, v, load=False): + """ + Setter method for supported_client_signal, mapped from YANG variable /networks/network/node/termination_point/te/client_svc/supported_client_signal (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_supported_client_signal is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_supported_client_signal() directly. + + YANG Description: List of client signal types supported by the LTP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """supported_client_signal must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__supported_client_signal = t + if hasattr(self, '_set'): + self._set() + + def _unset_supported_client_signal(self): + self.__supported_client_signal = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-1Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-LAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-10Gb-WAN': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-40Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ETH-100Gb': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-16': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-64': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:STM-256': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-12': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-48': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-192': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:OC-768': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-100': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-400': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-800': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-1600': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FC-3200': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-4G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:FICON-8G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="supported-client-signal", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + supported_client_signal = __builtin__.property(_get_supported_client_signal, _set_supported_client_signal) + + + _pyangbind_elements = OrderedDict([('supported_client_signal', supported_client_signal), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/geolocation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/geolocation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a02b6d62f533c3c9ae8d2e8acb5a9f889e35d107 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/geolocation/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class geolocation(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/geolocation. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains a GPS location. + """ + __slots__ = ('_path_helper', '_extmethods', '__altitude','__latitude','__longitude',) + + _yang_name = 'geolocation' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) + self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'te', 'geolocation'] + + def _get_altitude(self): + """ + Getter method for altitude, mapped from YANG variable /networks/network/node/termination_point/te/geolocation/altitude (int64) + + YANG Description: Distance above sea level. + """ + return self.__altitude + + def _set_altitude(self, v, load=False): + """ + Setter method for altitude, mapped from YANG variable /networks/network/node/termination_point/te/geolocation/altitude (int64) + If this variable is read-only (config: false) in the + source YANG file, then _set_altitude is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_altitude() directly. + + YANG Description: Distance above sea level. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """altitude must be of a type compatible with int64""", + 'defined-type': "int64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False)""", + }) + + self.__altitude = t + if hasattr(self, '_set'): + self._set() + + def _unset_altitude(self): + self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) + + + def _get_latitude(self): + """ + Getter method for latitude, mapped from YANG variable /networks/network/node/termination_point/te/geolocation/latitude (geographic-coordinate-degree) + + YANG Description: Relative position north or south on the Earth's surface. + """ + return self.__latitude + + def _set_latitude(self, v, load=False): + """ + Setter method for latitude, mapped from YANG variable /networks/network/node/termination_point/te/geolocation/latitude (geographic-coordinate-degree) + If this variable is read-only (config: false) in the + source YANG file, then _set_latitude is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_latitude() directly. + + YANG Description: Relative position north or south on the Earth's surface. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """latitude must be of a type compatible with geographic-coordinate-degree""", + 'defined-type': "ietf-te-topology:geographic-coordinate-degree", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", + }) + + self.__latitude = t + if hasattr(self, '_set'): + self._set() + + def _unset_latitude(self): + self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + + + def _get_longitude(self): + """ + Getter method for longitude, mapped from YANG variable /networks/network/node/termination_point/te/geolocation/longitude (geographic-coordinate-degree) + + YANG Description: Angular distance east or west on the Earth's surface. + """ + return self.__longitude + + def _set_longitude(self, v, load=False): + """ + Setter method for longitude, mapped from YANG variable /networks/network/node/termination_point/te/geolocation/longitude (geographic-coordinate-degree) + If this variable is read-only (config: false) in the + source YANG file, then _set_longitude is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_longitude() directly. + + YANG Description: Angular distance east or west on the Earth's surface. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """longitude must be of a type compatible with geographic-coordinate-degree""", + 'defined-type': "ietf-te-topology:geographic-coordinate-degree", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", + }) + + self.__longitude = t + if hasattr(self, '_set'): + self._set() + + def _unset_longitude(self): + self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + + altitude = __builtin__.property(_get_altitude) + latitude = __builtin__.property(_get_latitude) + longitude = __builtin__.property(_get_longitude) + + + _pyangbind_elements = OrderedDict([('altitude', altitude), ('latitude', latitude), ('longitude', longitude), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e158b30c3d4afc9e375d2057280337481b40634d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py @@ -0,0 +1,206 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import max_lsp_bandwidth +class interface_switching_capability(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/interface-switching-capability. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of ISCDs for this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__switching_capability','__encoding','__max_lsp_bandwidth',) + + _yang_name = 'interface-switching-capability' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'te', 'interface-switching-capability'] + + def _get_switching_capability(self): + """ + Getter method for switching_capability, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/switching_capability (identityref) + + YANG Description: Switching capability for this interface. + """ + return self.__switching_capability + + def _set_switching_capability(self, v, load=False): + """ + Setter method for switching_capability, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/switching_capability (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_switching_capability is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_switching_capability() directly. + + YANG Description: Switching capability for this interface. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """switching_capability must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__switching_capability = t + if hasattr(self, '_set'): + self._set() + + def _unset_switching_capability(self): + self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_encoding(self): + """ + Getter method for encoding, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/encoding (identityref) + + YANG Description: Encoding supported by this interface. + """ + return self.__encoding + + def _set_encoding(self, v, load=False): + """ + Setter method for encoding, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/encoding (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_encoding is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_encoding() directly. + + YANG Description: Encoding supported by this interface. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """encoding must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__encoding = t + if hasattr(self, '_set'): + self._set() + + def _unset_encoding(self): + self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_max_lsp_bandwidth(self): + """ + Getter method for max_lsp_bandwidth, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth (list) + + YANG Description: Maximum Label Switched Path (LSP) bandwidth at +priorities 0-7. + """ + return self.__max_lsp_bandwidth + + def _set_max_lsp_bandwidth(self, v, load=False): + """ + Setter method for max_lsp_bandwidth, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_lsp_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_lsp_bandwidth() directly. + + YANG Description: Maximum Label Switched Path (LSP) bandwidth at +priorities 0-7. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_lsp_bandwidth must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__max_lsp_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_lsp_bandwidth(self): + self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + switching_capability = __builtin__.property(_get_switching_capability, _set_switching_capability) + encoding = __builtin__.property(_get_encoding, _set_encoding) + max_lsp_bandwidth = __builtin__.property(_get_max_lsp_bandwidth, _set_max_lsp_bandwidth) + + + _pyangbind_elements = OrderedDict([('switching_capability', switching_capability), ('encoding', encoding), ('max_lsp_bandwidth', max_lsp_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..429b0f18b34d3f4e3e7889f94f21ff4b8191f59e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class max_lsp_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/interface-switching-capability/max-lsp-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum Label Switched Path (LSP) bandwidth at +priorities 0-7. + """ + __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) + + _yang_name = 'max-lsp-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'te', 'interface-switching-capability', 'max-lsp-bandwidth'] + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/priority (uint8) + + YANG Description: Priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + priority = __builtin__.property(_get_priority, _set_priority) + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d0326e850714e3aa15d050e62a22139d5403a2c5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/interface-switching-capability/max-lsp-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'te', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) + + YANG Description: Maximum bandwidth attributes for OTN paths. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Maximum bandwidth attributes for OTN paths. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fcfb11adfec58d72cfc94e2aa1f099c63909e491 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,156 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/interface-switching-capability/max-lsp-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum bandwidth attributes for OTN paths. + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__max_ts_number',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'te', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_max_ts_number(self): + """ + Getter method for max_ts_number, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) + + YANG Description: The maximum number of Tributary Slots (TS) that could be +used by an ODUflex LSP. + """ + return self.__max_ts_number + + def _set_max_ts_number(self, v, load=False): + """ + Setter method for max_ts_number, mapped from YANG variable /networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_ts_number() directly. + + YANG Description: The maximum number of Tributary Slots (TS) that could be +used by an ODUflex LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__max_ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_ts_number(self): + self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + max_ts_number = __builtin__.property(_get_max_ts_number, _set_max_ts_number) + + __choices__ = {'technology': {'otn': ['odu_type', 'max_ts_number']}} + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('max_ts_number', max_ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/otn_ltp/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/otn_ltp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..55ef3745b5e210ddd9b045fb2e6e3fbc2f615a0b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/node/termination_point/te/otn_ltp/__init__.py @@ -0,0 +1,121 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_ltp(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/node/termination-point/te/otn-ltp. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Attributes of the OTN Link Termination Point (LTP). + """ + __slots__ = ('_path_helper', '_extmethods', '__odtu_flex_type',) + + _yang_name = 'otn-ltp' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'node', 'termination-point', 'te', 'otn-ltp'] + + def _get_odtu_flex_type(self): + """ + Getter method for odtu_flex_type, mapped from YANG variable /networks/network/node/termination_point/te/otn_ltp/odtu_flex_type (l1-types:odtu-flex-type) + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs set up +on this OTN Link Termination Point (LTP). + """ + return self.__odtu_flex_type + + def _set_odtu_flex_type(self, v, load=False): + """ + Setter method for odtu_flex_type, mapped from YANG variable /networks/network/node/termination_point/te/otn_ltp/odtu_flex_type (l1-types:odtu-flex-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_odtu_flex_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odtu_flex_type() directly. + + YANG Description: The type of Optical Data Tributary Unit (ODTU) +whose nominal bitrate is used to compute the number of +Tributary Slots (TS) required by the ODUflex LSPs set up +on this OTN Link Termination Point (LTP). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odtu_flex_type must be of a type compatible with l1-types:odtu-flex-type""", + 'defined-type': "l1-types:odtu-flex-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True)""", + }) + + self.__odtu_flex_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odtu_flex_type(self): + self.__odtu_flex_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'2': {}, '3': {}, '4': {}, 'Cn': {}},), is_leaf=True, yang_name="odtu-flex-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='l1-types:odtu-flex-type', is_config=True) + + odtu_flex_type = __builtin__.property(_get_odtu_flex_type, _set_odtu_flex_type) + + + _pyangbind_elements = OrderedDict([('odtu_flex_type', odtu_flex_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/supporting_network/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/supporting_network/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..183db82648fefbeabe860b6e497697abe039dca5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/supporting_network/__init__.py @@ -0,0 +1,121 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class supporting_network(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/supporting-network. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: An underlay network, used to represent layered network +topologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref',) + + _yang_name = 'supporting-network' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'supporting-network'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/network/supporting_network/network_ref (leafref) + + YANG Description: References the underlay network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/network/supporting_network/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: References the underlay network. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-network', defining_module='ietf-network', yang_type='leafref', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ac4025b544207cde7e99d97cb6b94c02bd7c0ca6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/__init__.py @@ -0,0 +1,283 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import nsrlg +from . import geolocation +class te(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/te. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Indicates TE support. + """ + __slots__ = ('_path_helper', '_extmethods', '__name','__preference','__optimization_criterion','__nsrlg','__geolocation',) + + _yang_name = 'te' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__optimization_criterion = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="optimization-criterion", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__nsrlg = YANGDynClass(base=YANGListType("id",nsrlg.nsrlg, yang_name="nsrlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="nsrlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'te'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/network/te/name (string) + + YANG Description: Name of the TE topology. This attribute is optional and can +be specified by the operator to describe the TE topology, +which can be useful when 'network-id' (RFC 8345) is not +descriptive and not modifiable because of being generated +by the system. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/network/te/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Name of the TE topology. This attribute is optional and can +be specified by the operator to describe the TE topology, +which can be useful when 'network-id' (RFC 8345) is not +descriptive and not modifiable because of being generated +by the system. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_preference(self): + """ + Getter method for preference, mapped from YANG variable /networks/network/te/preference (uint8) + + YANG Description: Specifies a preference for this topology. A lower number +indicates a higher preference. + """ + return self.__preference + + def _set_preference(self, v, load=False): + """ + Setter method for preference, mapped from YANG variable /networks/network/te/preference (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_preference is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_preference() directly. + + YANG Description: Specifies a preference for this topology. A lower number +indicates a higher preference. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """preference must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__preference = t + if hasattr(self, '_set'): + self._set() + + def _unset_preference(self): + self.__preference = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_optimization_criterion(self): + """ + Getter method for optimization_criterion, mapped from YANG variable /networks/network/te/optimization_criterion (identityref) + + YANG Description: Optimization criterion applied to this topology. + """ + return self.__optimization_criterion + + def _set_optimization_criterion(self, v, load=False): + """ + Setter method for optimization_criterion, mapped from YANG variable /networks/network/te/optimization_criterion (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_optimization_criterion is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_optimization_criterion() directly. + + YANG Description: Optimization criterion applied to this topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="optimization-criterion", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """optimization_criterion must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="optimization-criterion", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__optimization_criterion = t + if hasattr(self, '_set'): + self._set() + + def _unset_optimization_criterion(self): + self.__optimization_criterion = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-path': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-maximize-residual-bandwidth': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-agg-bandwidth-consumption': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-load-most-loaded-link': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:of-minimize-cost-path-set': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="optimization-criterion", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_nsrlg(self): + """ + Getter method for nsrlg, mapped from YANG variable /networks/network/te/nsrlg (list) + + YANG Description: List of NSRLGs (Non-Shared Risk Link Groups). + """ + return self.__nsrlg + + def _set_nsrlg(self, v, load=False): + """ + Setter method for nsrlg, mapped from YANG variable /networks/network/te/nsrlg (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_nsrlg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_nsrlg() directly. + + YANG Description: List of NSRLGs (Non-Shared Risk Link Groups). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("id",nsrlg.nsrlg, yang_name="nsrlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="nsrlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """nsrlg must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("id",nsrlg.nsrlg, yang_name="nsrlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="nsrlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__nsrlg = t + if hasattr(self, '_set'): + self._set() + + def _unset_nsrlg(self): + self.__nsrlg = YANGDynClass(base=YANGListType("id",nsrlg.nsrlg, yang_name="nsrlg", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='id', extensions=None), is_container='list', yang_name="nsrlg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_geolocation(self): + """ + Getter method for geolocation, mapped from YANG variable /networks/network/te/geolocation (container) + + YANG Description: Contains a GPS location. + """ + return self.__geolocation + + def _set_geolocation(self, v, load=False): + """ + Setter method for geolocation, mapped from YANG variable /networks/network/te/geolocation (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_geolocation is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_geolocation() directly. + + YANG Description: Contains a GPS location. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """geolocation must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False)""", + }) + + self.__geolocation = t + if hasattr(self, '_set'): + self._set() + + def _unset_geolocation(self): + self.__geolocation = YANGDynClass(base=geolocation.geolocation, is_container='container', yang_name="geolocation", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=False) + + name = __builtin__.property(_get_name, _set_name) + preference = __builtin__.property(_get_preference, _set_preference) + optimization_criterion = __builtin__.property(_get_optimization_criterion, _set_optimization_criterion) + nsrlg = __builtin__.property(_get_nsrlg, _set_nsrlg) + geolocation = __builtin__.property(_get_geolocation) + + + _pyangbind_elements = OrderedDict([('name', name), ('preference', preference), ('optimization_criterion', optimization_criterion), ('nsrlg', nsrlg), ('geolocation', geolocation), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/geolocation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/geolocation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b415c4e437a0693b84f7d82acc94981186f0f8b2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/geolocation/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class geolocation(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/te/geolocation. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains a GPS location. + """ + __slots__ = ('_path_helper', '_extmethods', '__altitude','__latitude','__longitude',) + + _yang_name = 'geolocation' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) + self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'te', 'geolocation'] + + def _get_altitude(self): + """ + Getter method for altitude, mapped from YANG variable /networks/network/te/geolocation/altitude (int64) + + YANG Description: Distance above sea level. + """ + return self.__altitude + + def _set_altitude(self, v, load=False): + """ + Setter method for altitude, mapped from YANG variable /networks/network/te/geolocation/altitude (int64) + If this variable is read-only (config: false) in the + source YANG file, then _set_altitude is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_altitude() directly. + + YANG Description: Distance above sea level. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """altitude must be of a type compatible with int64""", + 'defined-type': "int64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False)""", + }) + + self.__altitude = t + if hasattr(self, '_set'): + self._set() + + def _unset_altitude(self): + self.__altitude = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-9223372036854775808..9223372036854775807']}, int_size=64), is_leaf=True, yang_name="altitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int64', is_config=False) + + + def _get_latitude(self): + """ + Getter method for latitude, mapped from YANG variable /networks/network/te/geolocation/latitude (geographic-coordinate-degree) + + YANG Description: Relative position north or south on the Earth's surface. + """ + return self.__latitude + + def _set_latitude(self, v, load=False): + """ + Setter method for latitude, mapped from YANG variable /networks/network/te/geolocation/latitude (geographic-coordinate-degree) + If this variable is read-only (config: false) in the + source YANG file, then _set_latitude is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_latitude() directly. + + YANG Description: Relative position north or south on the Earth's surface. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """latitude must be of a type compatible with geographic-coordinate-degree""", + 'defined-type': "ietf-te-topology:geographic-coordinate-degree", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", + }) + + self.__latitude = t + if hasattr(self, '_set'): + self._set() + + def _unset_latitude(self): + self.__latitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-90..90']}), is_leaf=True, yang_name="latitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + + + def _get_longitude(self): + """ + Getter method for longitude, mapped from YANG variable /networks/network/te/geolocation/longitude (geographic-coordinate-degree) + + YANG Description: Angular distance east or west on the Earth's surface. + """ + return self.__longitude + + def _set_longitude(self, v, load=False): + """ + Setter method for longitude, mapped from YANG variable /networks/network/te/geolocation/longitude (geographic-coordinate-degree) + If this variable is read-only (config: false) in the + source YANG file, then _set_longitude is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_longitude() directly. + + YANG Description: Angular distance east or west on the Earth's surface. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """longitude must be of a type compatible with geographic-coordinate-degree""", + 'defined-type': "ietf-te-topology:geographic-coordinate-degree", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False)""", + }) + + self.__longitude = t + if hasattr(self, '_set'): + self._set() + + def _unset_longitude(self): + self.__longitude = YANGDynClass(base=RestrictedClassType(base_type=RestrictedPrecisionDecimalType(precision=8), restriction_dict={'range': ['-180..180']}), is_leaf=True, yang_name="longitude", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='geographic-coordinate-degree', is_config=False) + + altitude = __builtin__.property(_get_altitude) + latitude = __builtin__.property(_get_latitude) + longitude = __builtin__.property(_get_longitude) + + + _pyangbind_elements = OrderedDict([('altitude', altitude), ('latitude', latitude), ('longitude', longitude), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/nsrlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/nsrlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d905efa92274df84bd826567b5bfc0580daa9c2c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te/nsrlg/__init__.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class nsrlg(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/te/nsrlg. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of NSRLGs (Non-Shared Risk Link Groups). + """ + __slots__ = ('_path_helper', '_extmethods', '__id','__disjointness',) + + _yang_name = 'nsrlg' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-path-disjointness', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'te', 'nsrlg'] + + def _get_id(self): + """ + Getter method for id, mapped from YANG variable /networks/network/te/nsrlg/id (uint32) + + YANG Description: Identifies the NSRLG entry. + """ + return self.__id + + def _set_id(self, v, load=False): + """ + Setter method for id, mapped from YANG variable /networks/network/te/nsrlg/id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_id() directly. + + YANG Description: Identifies the NSRLG entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__id = t + if hasattr(self, '_set'): + self._set() + + def _unset_id(self): + self.__id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_disjointness(self): + """ + Getter method for disjointness, mapped from YANG variable /networks/network/te/nsrlg/disjointness (te-types:te-path-disjointness) + + YANG Description: The type of resource disjointness. + """ + return self.__disjointness + + def _set_disjointness(self, v, load=False): + """ + Setter method for disjointness, mapped from YANG variable /networks/network/te/nsrlg/disjointness (te-types:te-path-disjointness) + If this variable is read-only (config: false) in the + source YANG file, then _set_disjointness is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_disjointness() directly. + + YANG Description: The type of resource disjointness. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-path-disjointness', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """disjointness must be of a type compatible with te-types:te-path-disjointness""", + 'defined-type': "te-types:te-path-disjointness", + 'generated-type': """YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-path-disjointness', is_config=True)""", + }) + + self.__disjointness = t + if hasattr(self, '_set'): + self._set() + + def _unset_disjointness(self): + self.__disjointness = YANGDynClass(base=YANGBitsType(allowed_bits={'node': '0', 'link': '1', 'srlg': '2'}), is_leaf=True, yang_name="disjointness", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-path-disjointness', is_config=True) + + id = __builtin__.property(_get_id, _set_id) + disjointness = __builtin__.property(_get_disjointness, _set_disjointness) + + + _pyangbind_elements = OrderedDict([('id', id), ('disjointness', disjointness), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te_topology_identifier/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te_topology_identifier/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0e29c5c0ce0ce7088e547f05b5ccd9ba78064714 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/network/te_topology_identifier/__init__.py @@ -0,0 +1,205 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class te_topology_identifier(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/network/te-topology-identifier. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: TE topology identifier container. + """ + __slots__ = ('_path_helper', '_extmethods', '__provider_id','__client_id','__topology_id',) + + _yang_name = 'te-topology-identifier' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__provider_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="provider-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True) + self.__client_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="client-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True) + self.__topology_id = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'length': ['0']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([a-zA-Z0-9\\-_.]+:)*/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}),], default=six.text_type(""), is_leaf=True, yang_name="topology-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-topology-id', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'network', 'te-topology-identifier'] + + def _get_provider_id(self): + """ + Getter method for provider_id, mapped from YANG variable /networks/network/te_topology_identifier/provider_id (te-global-id) + + YANG Description: An identifier to uniquely identify a provider. +If omitted, it assumes that the topology provider ID +value = 0 (the default). + """ + return self.__provider_id + + def _set_provider_id(self, v, load=False): + """ + Setter method for provider_id, mapped from YANG variable /networks/network/te_topology_identifier/provider_id (te-global-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_provider_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_provider_id() directly. + + YANG Description: An identifier to uniquely identify a provider. +If omitted, it assumes that the topology provider ID +value = 0 (the default). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="provider-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """provider_id must be of a type compatible with te-global-id""", + 'defined-type': "ietf-te-topology:te-global-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="provider-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True)""", + }) + + self.__provider_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_provider_id(self): + self.__provider_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="provider-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True) + + + def _get_client_id(self): + """ + Getter method for client_id, mapped from YANG variable /networks/network/te_topology_identifier/client_id (te-global-id) + + YANG Description: An identifier to uniquely identify a client. +If omitted, it assumes that the topology client ID +value = 0 (the default). + """ + return self.__client_id + + def _set_client_id(self, v, load=False): + """ + Setter method for client_id, mapped from YANG variable /networks/network/te_topology_identifier/client_id (te-global-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_client_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_client_id() directly. + + YANG Description: An identifier to uniquely identify a client. +If omitted, it assumes that the topology client ID +value = 0 (the default). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="client-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """client_id must be of a type compatible with te-global-id""", + 'defined-type': "ietf-te-topology:te-global-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="client-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True)""", + }) + + self.__client_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_client_id(self): + self.__client_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)(0), is_leaf=True, yang_name="client-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-global-id', is_config=True) + + + def _get_topology_id(self): + """ + Getter method for topology_id, mapped from YANG variable /networks/network/te_topology_identifier/topology_id (te-topology-id) + + YANG Description: When the datastore contains several topologies, +'topology-id' distinguishes between them. If omitted, +the default (empty) string for this leaf is assumed. + """ + return self.__topology_id + + def _set_topology_id(self, v, load=False): + """ + Setter method for topology_id, mapped from YANG variable /networks/network/te_topology_identifier/topology_id (te-topology-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_topology_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_topology_id() directly. + + YANG Description: When the datastore contains several topologies, +'topology-id' distinguishes between them. If omitted, +the default (empty) string for this leaf is assumed. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'length': ['0']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([a-zA-Z0-9\\-_.]+:)*/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}),], default=six.text_type(""), is_leaf=True, yang_name="topology-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-topology-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """topology_id must be of a type compatible with te-topology-id""", + 'defined-type': "ietf-te-topology:te-topology-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'length': ['0']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([a-zA-Z0-9\\-_.]+:)*/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}),], default=six.text_type(""), is_leaf=True, yang_name="topology-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-topology-id', is_config=True)""", + }) + + self.__topology_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_topology_id(self): + self.__topology_id = YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'length': ['0']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([a-zA-Z0-9\\-_.]+:)*/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}),], default=six.text_type(""), is_leaf=True, yang_name="topology-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-topology-id', is_config=True) + + provider_id = __builtin__.property(_get_provider_id, _set_provider_id) + client_id = __builtin__.property(_get_client_id, _set_client_id) + topology_id = __builtin__.property(_get_topology_id, _set_topology_id) + + + _pyangbind_elements = OrderedDict([('provider_id', provider_id), ('client_id', client_id), ('topology_id', topology_id), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f38ba7bb87b27b1b38d6ddfc53b91a3da54725b3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import templates +class te(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Indicates TE support. + """ + __slots__ = ('_path_helper', '_extmethods', '__templates',) + + _yang_name = 'te' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__templates = YANGDynClass(base=templates.templates, is_container='container', yang_name="templates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te'] + + def _get_templates(self): + """ + Getter method for templates, mapped from YANG variable /networks/te/templates (container) + + YANG Description: Configuration parameters for templates used for a TE +topology. + """ + return self.__templates + + def _set_templates(self, v, load=False): + """ + Setter method for templates, mapped from YANG variable /networks/te/templates (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_templates is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_templates() directly. + + YANG Description: Configuration parameters for templates used for a TE +topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=templates.templates, is_container='container', yang_name="templates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """templates must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=templates.templates, is_container='container', yang_name="templates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__templates = t + if hasattr(self, '_set'): + self._set() + + def _unset_templates(self): + self.__templates = YANGDynClass(base=templates.templates, is_container='container', yang_name="templates", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + templates = __builtin__.property(_get_templates, _set_templates) + + + _pyangbind_elements = OrderedDict([('templates', templates), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..645419914f817871e91adda32f9897db9a534f13 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/__init__.py @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import node_template +from . import link_template +class templates(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Configuration parameters for templates used for a TE +topology. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_template','__link_template',) + + _yang_name = 'templates' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_template = YANGDynClass(base=YANGListType("name",node_template.node_template, yang_name="node-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__link_template = YANGDynClass(base=YANGListType("name",link_template.link_template, yang_name="link-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates'] + + def _get_node_template(self): + """ + Getter method for node_template, mapped from YANG variable /networks/te/templates/node_template (list) + + YANG Description: The list of TE node templates used to define sharable +and reusable TE node attributes. + """ + return self.__node_template + + def _set_node_template(self, v, load=False): + """ + Setter method for node_template, mapped from YANG variable /networks/te/templates/node_template (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_template is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_template() directly. + + YANG Description: The list of TE node templates used to define sharable +and reusable TE node attributes. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",node_template.node_template, yang_name="node-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_template must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",node_template.node_template, yang_name="node-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__node_template = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_template(self): + self.__node_template = YANGDynClass(base=YANGListType("name",node_template.node_template, yang_name="node-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="node-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_link_template(self): + """ + Getter method for link_template, mapped from YANG variable /networks/te/templates/link_template (list) + + YANG Description: The list of TE link templates used to define sharable +and reusable TE link attributes. + """ + return self.__link_template + + def _set_link_template(self, v, load=False): + """ + Setter method for link_template, mapped from YANG variable /networks/te/templates/link_template (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_template is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_template() directly. + + YANG Description: The list of TE link templates used to define sharable +and reusable TE link attributes. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("name",link_template.link_template, yang_name="link-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_template must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("name",link_template.link_template, yang_name="link-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__link_template = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_template(self): + self.__link_template = YANGDynClass(base=YANGListType("name",link_template.link_template, yang_name="link-template", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='name', extensions=None), is_container='list', yang_name="link-template", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + node_template = __builtin__.property(_get_node_template, _set_node_template) + link_template = __builtin__.property(_get_link_template, _set_link_template) + + + _pyangbind_elements = OrderedDict([('node_template', node_template), ('link_template', link_template), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..132c4dbd381d0ed0ea94e36b83b95653c4f73b71 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/__init__.py @@ -0,0 +1,251 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_link_attributes +class link_template(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The list of TE link templates used to define sharable +and reusable TE link attributes. + """ + __slots__ = ('_path_helper', '_extmethods', '__name','__priority','__reference_change_policy','__te_link_attributes',) + + _yang_name = 'link-template' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) + self.__reference_change_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + self.__te_link_attributes = YANGDynClass(base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/te/templates/link_template/name (te-types:te-template-name) + + YANG Description: The name to identify a TE link template. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/te/templates/link_template/name (te-types:te-template-name) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: The name to identify a TE link template. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with te-types:te-template-name""", + 'defined-type': "te-types:te-template-name", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/te/templates/link_template/priority (uint16) + + YANG Description: The preference value for resolving conflicts between +different templates. When two or more templates specify +values for one configuration attribute, the value from the +template with the highest priority is used. +A lower number indicates a higher priority. The highest +priority is 0. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/te/templates/link_template/priority (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: The preference value for resolving conflicts between +different templates. When two or more templates specify +values for one configuration attribute, the value from the +template with the highest priority is used. +A lower number indicates a higher priority. The highest +priority is 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) + + + def _get_reference_change_policy(self): + """ + Getter method for reference_change_policy, mapped from YANG variable /networks/te/templates/link_template/reference_change_policy (enumeration) + + YANG Description: This attribute specifies the action taken for a +configuration node that has a reference to this template. + """ + return self.__reference_change_policy + + def _set_reference_change_policy(self, v, load=False): + """ + Setter method for reference_change_policy, mapped from YANG variable /networks/te/templates/link_template/reference_change_policy (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_reference_change_policy is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_reference_change_policy() directly. + + YANG Description: This attribute specifies the action taken for a +configuration node that has a reference to this template. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """reference_change_policy must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", + }) + + self.__reference_change_policy = t + if hasattr(self, '_set'): + self._set() + + def _unset_reference_change_policy(self): + self.__reference_change_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + + + def _get_te_link_attributes(self): + """ + Getter method for te_link_attributes, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes (container) + + YANG Description: Link attributes in a TE topology. + """ + return self.__te_link_attributes + + def _set_te_link_attributes(self, v, load=False): + """ + Setter method for te_link_attributes, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_link_attributes is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_link_attributes() directly. + + YANG Description: Link attributes in a TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_link_attributes must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_link_attributes = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_link_attributes(self): + self.__te_link_attributes = YANGDynClass(base=te_link_attributes.te_link_attributes, is_container='container', yang_name="te-link-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + name = __builtin__.property(_get_name, _set_name) + priority = __builtin__.property(_get_priority, _set_priority) + reference_change_policy = __builtin__.property(_get_reference_change_policy, _set_reference_change_policy) + te_link_attributes = __builtin__.property(_get_te_link_attributes, _set_te_link_attributes) + + + _pyangbind_elements = OrderedDict([('name', name), ('priority', priority), ('reference_change_policy', reference_change_policy), ('te_link_attributes', te_link_attributes), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b694dcce0e503c6b8324322681c3e8721ed5e6b1 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py @@ -0,0 +1,858 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import external_domain +from . import underlay +from . import interface_switching_capability +from . import label_restrictions +from . import max_link_bandwidth +from . import max_resv_link_bandwidth +from . import unreserved_bandwidth +from . import te_srlgs +from . import te_nsrlgs +class te_link_attributes(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Link attributes in a TE topology. + """ + __slots__ = ('_path_helper', '_extmethods', '__access_type','__external_domain','__is_abstract','__name','__underlay','__admin_status','__link_index','__administrative_group','__interface_switching_capability','__label_restrictions','__link_protection_type','__max_link_bandwidth','__max_resv_link_bandwidth','__unreserved_bandwidth','__te_default_metric','__te_delay_metric','__te_igp_metric','__te_srlgs','__te_nsrlgs',) + + _yang_name = 'te-link-attributes' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__access_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True) + self.__external_domain = YANGDynClass(base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + self.__link_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + self.__administrative_group = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True) + self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__link_protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__max_link_bandwidth = YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__max_resv_link_bandwidth = YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__te_default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__te_delay_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__te_igp_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__te_srlgs = YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__te_nsrlgs = YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes'] + + def _get_access_type(self): + """ + Getter method for access_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/access_type (te-types:te-link-access-type) + + YANG Description: Link access type, which can be point-to-point or +multi-access. + """ + return self.__access_type + + def _set_access_type(self, v, load=False): + """ + Setter method for access_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/access_type (te-types:te-link-access-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_access_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_access_type() directly. + + YANG Description: Link access type, which can be point-to-point or +multi-access. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """access_type must be of a type compatible with te-types:te-link-access-type""", + 'defined-type': "te-types:te-link-access-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True)""", + }) + + self.__access_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_access_type(self): + self.__access_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'point-to-point': {}, 'multi-access': {}},), is_leaf=True, yang_name="access-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-link-access-type', is_config=True) + + + def _get_external_domain(self): + """ + Getter method for external_domain, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain (container) + + YANG Description: For an inter-domain link, specifies the attributes of +the remote end of the link, to facilitate the signaling at +the local end. + """ + return self.__external_domain + + def _set_external_domain(self, v, load=False): + """ + Setter method for external_domain, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_external_domain is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_external_domain() directly. + + YANG Description: For an inter-domain link, specifies the attributes of +the remote end of the link, to facilitate the signaling at +the local end. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """external_domain must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__external_domain = t + if hasattr(self, '_set'): + self._set() + + def _unset_external_domain(self): + self.__external_domain = YANGDynClass(base=external_domain.external_domain, is_container='container', yang_name="external-domain", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_is_abstract(self): + """ + Getter method for is_abstract, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/is_abstract (empty) + + YANG Description: Present if the link is abstract. + """ + return self.__is_abstract + + def _set_is_abstract(self, v, load=False): + """ + Setter method for is_abstract, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/is_abstract (empty) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_abstract is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_abstract() directly. + + YANG Description: Present if the link is abstract. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_abstract must be of a type compatible with empty""", + 'defined-type': "empty", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True)""", + }) + + self.__is_abstract = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_abstract(self): + self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) + + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/name (string) + + YANG Description: Link name. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Link name. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_underlay(self): + """ + Getter method for underlay, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay (container) + + YANG Description: Attributes of the TE link underlay. + """ + return self.__underlay + + def _set_underlay(self, v, load=False): + """ + Setter method for underlay, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_underlay is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_underlay() directly. + + YANG Description: Attributes of the TE link underlay. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """underlay must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__underlay = t + if hasattr(self, '_set'): + self._set() + + def _unset_underlay(self): + self.__underlay = YANGDynClass(base=underlay.underlay, is_container='container', yang_name="underlay", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_admin_status(self): + """ + Getter method for admin_status, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/admin_status (te-types:te-admin-status) + + YANG Description: The administrative state of the link. + """ + return self.__admin_status + + def _set_admin_status(self, v, load=False): + """ + Setter method for admin_status, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/admin_status (te-types:te-admin-status) + If this variable is read-only (config: false) in the + source YANG file, then _set_admin_status is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_admin_status() directly. + + YANG Description: The administrative state of the link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """admin_status must be of a type compatible with te-types:te-admin-status""", + 'defined-type': "te-types:te-admin-status", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True)""", + }) + + self.__admin_status = t + if hasattr(self, '_set'): + self._set() + + def _unset_admin_status(self): + self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + + + def _get_link_index(self): + """ + Getter method for link_index, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/link_index (uint64) + + YANG Description: The link identifier. If OSPF is used, this object +represents an ospfLsdbID. If IS-IS is used, this object +represents an isisLSPID. If a locally configured link is +used, this object represents a unique value, which is +locally defined in a router. + """ + return self.__link_index + + def _set_link_index(self, v, load=False): + """ + Setter method for link_index, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/link_index (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_index() directly. + + YANG Description: The link identifier. If OSPF is used, this object +represents an ospfLsdbID. If IS-IS is used, this object +represents an isisLSPID. If a locally configured link is +used, this object represents a unique value, which is +locally defined in a router. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_index must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__link_index = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_index(self): + self.__link_index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), is_leaf=True, yang_name="link-index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint64', is_config=True) + + + def _get_administrative_group(self): + """ + Getter method for administrative_group, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/administrative_group (te-types:admin-groups) + + YANG Description: Administrative group or color of the link. +This attribute covers both administrative groups (defined +in RFCs 3630 and 5305) and Extended Administrative Groups +(defined in RFC 7308). + """ + return self.__administrative_group + + def _set_administrative_group(self, v, load=False): + """ + Setter method for administrative_group, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/administrative_group (te-types:admin-groups) + If this variable is read-only (config: false) in the + source YANG file, then _set_administrative_group is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_administrative_group() directly. + + YANG Description: Administrative group or color of the link. +This attribute covers both administrative groups (defined +in RFCs 3630 and 5305) and Extended Administrative Groups +(defined in RFC 7308). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """administrative_group must be of a type compatible with te-types:admin-groups""", + 'defined-type': "te-types:admin-groups", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True)""", + }) + + self.__administrative_group = t + if hasattr(self, '_set'): + self._set() + + def _unset_administrative_group(self): + self.__administrative_group = YANGDynClass(base=[RestrictedClassType(base_type=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), restriction_dict={'length': ['1..11']}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}),], is_leaf=True, yang_name="administrative-group", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:admin-groups', is_config=True) + + + def _get_interface_switching_capability(self): + """ + Getter method for interface_switching_capability, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability (list) + + YANG Description: List of ISCDs for this link. + """ + return self.__interface_switching_capability + + def _set_interface_switching_capability(self, v, load=False): + """ + Setter method for interface_switching_capability, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_interface_switching_capability is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_interface_switching_capability() directly. + + YANG Description: List of ISCDs for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """interface_switching_capability must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__interface_switching_capability = t + if hasattr(self, '_set'): + self._set() + + def _unset_interface_switching_capability(self): + self.__interface_switching_capability = YANGDynClass(base=YANGListType("switching_capability encoding",interface_switching_capability.interface_switching_capability, yang_name="interface-switching-capability", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='switching-capability encoding', extensions=None), is_container='list', yang_name="interface-switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_label_restrictions(self): + """ + Getter method for label_restrictions, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions (container) + + YANG Description: The label restrictions container. + """ + return self.__label_restrictions + + def _set_label_restrictions(self, v, load=False): + """ + Setter method for label_restrictions, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restrictions is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restrictions() directly. + + YANG Description: The label restrictions container. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restrictions must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_restrictions = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restrictions(self): + self.__label_restrictions = YANGDynClass(base=label_restrictions.label_restrictions, is_container='container', yang_name="label-restrictions", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_link_protection_type(self): + """ + Getter method for link_protection_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/link_protection_type (identityref) + + YANG Description: Link Protection Type desired for this link. + """ + return self.__link_protection_type + + def _set_link_protection_type(self, v, load=False): + """ + Setter method for link_protection_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/link_protection_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_protection_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_protection_type() directly. + + YANG Description: Link Protection Type desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_protection_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__link_protection_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_protection_type(self): + self.__link_protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-shared': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:link-protection-enhanced': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="link-protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_max_link_bandwidth(self): + """ + Getter method for max_link_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth (container) + + YANG Description: Maximum bandwidth that can be seen on this link in this +direction. Units are in bytes per second. + """ + return self.__max_link_bandwidth + + def _set_max_link_bandwidth(self, v, load=False): + """ + Setter method for max_link_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_link_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_link_bandwidth() directly. + + YANG Description: Maximum bandwidth that can be seen on this link in this +direction. Units are in bytes per second. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_link_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__max_link_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_link_bandwidth(self): + self.__max_link_bandwidth = YANGDynClass(base=max_link_bandwidth.max_link_bandwidth, is_container='container', yang_name="max-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_max_resv_link_bandwidth(self): + """ + Getter method for max_resv_link_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth (container) + + YANG Description: Maximum amount of bandwidth that can be reserved in this +direction in this link. Units are in bytes per second. + """ + return self.__max_resv_link_bandwidth + + def _set_max_resv_link_bandwidth(self, v, load=False): + """ + Setter method for max_resv_link_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_resv_link_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_resv_link_bandwidth() directly. + + YANG Description: Maximum amount of bandwidth that can be reserved in this +direction in this link. Units are in bytes per second. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_resv_link_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__max_resv_link_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_resv_link_bandwidth(self): + self.__max_resv_link_bandwidth = YANGDynClass(base=max_resv_link_bandwidth.max_resv_link_bandwidth, is_container='container', yang_name="max-resv-link-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unreserved_bandwidth(self): + """ + Getter method for unreserved_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth (list) + + YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in +bytes per second. + """ + return self.__unreserved_bandwidth + + def _set_unreserved_bandwidth(self, v, load=False): + """ + Setter method for unreserved_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_unreserved_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unreserved_bandwidth() directly. + + YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in +bytes per second. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unreserved_bandwidth must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__unreserved_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_unreserved_bandwidth(self): + self.__unreserved_bandwidth = YANGDynClass(base=YANGListType("priority",unreserved_bandwidth.unreserved_bandwidth, yang_name="unreserved-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="unreserved-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_te_default_metric(self): + """ + Getter method for te_default_metric, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_default_metric (uint32) + + YANG Description: Traffic Engineering metric. + """ + return self.__te_default_metric + + def _set_te_default_metric(self, v, load=False): + """ + Setter method for te_default_metric, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_default_metric (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_default_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_default_metric() directly. + + YANG Description: Traffic Engineering metric. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_default_metric must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__te_default_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_default_metric(self): + self.__te_default_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-default-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_te_delay_metric(self): + """ + Getter method for te_delay_metric, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_delay_metric (uint32) + + YANG Description: Traffic Engineering delay metric. + """ + return self.__te_delay_metric + + def _set_te_delay_metric(self, v, load=False): + """ + Setter method for te_delay_metric, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_delay_metric (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_delay_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_delay_metric() directly. + + YANG Description: Traffic Engineering delay metric. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_delay_metric must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__te_delay_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_delay_metric(self): + self.__te_delay_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-delay-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_te_igp_metric(self): + """ + Getter method for te_igp_metric, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_igp_metric (uint32) + + YANG Description: IGP metric used for Traffic Engineering. + """ + return self.__te_igp_metric + + def _set_te_igp_metric(self, v, load=False): + """ + Setter method for te_igp_metric, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_igp_metric (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_igp_metric is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_igp_metric() directly. + + YANG Description: IGP metric used for Traffic Engineering. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_igp_metric must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__te_igp_metric = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_igp_metric(self): + self.__te_igp_metric = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="te-igp-metric", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_te_srlgs(self): + """ + Getter method for te_srlgs, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_srlgs (container) + + YANG Description: Contains a list of SRLGs. + """ + return self.__te_srlgs + + def _set_te_srlgs(self, v, load=False): + """ + Setter method for te_srlgs, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_srlgs (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_srlgs is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_srlgs() directly. + + YANG Description: Contains a list of SRLGs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_srlgs must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_srlgs = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_srlgs(self): + self.__te_srlgs = YANGDynClass(base=te_srlgs.te_srlgs, is_container='container', yang_name="te-srlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_te_nsrlgs(self): + """ + Getter method for te_nsrlgs, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_nsrlgs (container) + + YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). +When an abstract TE link is configured, this list specifies +the request that underlay TE paths need to be mutually +disjoint with other TE links in the same groups. + """ + return self.__te_nsrlgs + + def _set_te_nsrlgs(self, v, load=False): + """ + Setter method for te_nsrlgs, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_nsrlgs (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_nsrlgs is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_nsrlgs() directly. + + YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). +When an abstract TE link is configured, this list specifies +the request that underlay TE paths need to be mutually +disjoint with other TE links in the same groups. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_nsrlgs must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_nsrlgs = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_nsrlgs(self): + self.__te_nsrlgs = YANGDynClass(base=te_nsrlgs.te_nsrlgs, is_container='container', yang_name="te-nsrlgs", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + access_type = __builtin__.property(_get_access_type, _set_access_type) + external_domain = __builtin__.property(_get_external_domain, _set_external_domain) + is_abstract = __builtin__.property(_get_is_abstract, _set_is_abstract) + name = __builtin__.property(_get_name, _set_name) + underlay = __builtin__.property(_get_underlay, _set_underlay) + admin_status = __builtin__.property(_get_admin_status, _set_admin_status) + link_index = __builtin__.property(_get_link_index, _set_link_index) + administrative_group = __builtin__.property(_get_administrative_group, _set_administrative_group) + interface_switching_capability = __builtin__.property(_get_interface_switching_capability, _set_interface_switching_capability) + label_restrictions = __builtin__.property(_get_label_restrictions, _set_label_restrictions) + link_protection_type = __builtin__.property(_get_link_protection_type, _set_link_protection_type) + max_link_bandwidth = __builtin__.property(_get_max_link_bandwidth, _set_max_link_bandwidth) + max_resv_link_bandwidth = __builtin__.property(_get_max_resv_link_bandwidth, _set_max_resv_link_bandwidth) + unreserved_bandwidth = __builtin__.property(_get_unreserved_bandwidth, _set_unreserved_bandwidth) + te_default_metric = __builtin__.property(_get_te_default_metric, _set_te_default_metric) + te_delay_metric = __builtin__.property(_get_te_delay_metric, _set_te_delay_metric) + te_igp_metric = __builtin__.property(_get_te_igp_metric, _set_te_igp_metric) + te_srlgs = __builtin__.property(_get_te_srlgs, _set_te_srlgs) + te_nsrlgs = __builtin__.property(_get_te_nsrlgs, _set_te_nsrlgs) + + + _pyangbind_elements = OrderedDict([('access_type', access_type), ('external_domain', external_domain), ('is_abstract', is_abstract), ('name', name), ('underlay', underlay), ('admin_status', admin_status), ('link_index', link_index), ('administrative_group', administrative_group), ('interface_switching_capability', interface_switching_capability), ('label_restrictions', label_restrictions), ('link_protection_type', link_protection_type), ('max_link_bandwidth', max_link_bandwidth), ('max_resv_link_bandwidth', max_resv_link_bandwidth), ('unreserved_bandwidth', unreserved_bandwidth), ('te_default_metric', te_default_metric), ('te_delay_metric', te_delay_metric), ('te_igp_metric', te_igp_metric), ('te_srlgs', te_srlgs), ('te_nsrlgs', te_nsrlgs), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9d40db38071f2c0e5472e5a698f7627a335af544 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py @@ -0,0 +1,205 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class external_domain(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/external-domain. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: For an inter-domain link, specifies the attributes of +the remote end of the link, to facilitate the signaling at +the local end. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__remote_te_node_id','__remote_te_link_tp_id',) + + _yang_name = 'external-domain' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__remote_te_node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) + self.__remote_te_link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'external-domain'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_remote_te_node_id(self): + """ + Getter method for remote_te_node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain/remote_te_node_id (te-types:te-node-id) + + YANG Description: Remote TE node identifier, used together with +'remote-te-link-tp-id' to identify the remote Link +Termination Point (LTP) in a different domain. + """ + return self.__remote_te_node_id + + def _set_remote_te_node_id(self, v, load=False): + """ + Setter method for remote_te_node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain/remote_te_node_id (te-types:te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_remote_te_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_remote_te_node_id() directly. + + YANG Description: Remote TE node identifier, used together with +'remote-te-link-tp-id' to identify the remote Link +Termination Point (LTP) in a different domain. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """remote_te_node_id must be of a type compatible with te-types:te-node-id""", + 'defined-type': "te-types:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True)""", + }) + + self.__remote_te_node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_remote_te_node_id(self): + self.__remote_te_node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="remote-te-node-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-node-id', is_config=True) + + + def _get_remote_te_link_tp_id(self): + """ + Getter method for remote_te_link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain/remote_te_link_tp_id (te-types:te-tp-id) + + YANG Description: Remote TE LTP identifier, used together with +'remote-te-node-id' to identify the remote LTP in a +different domain. + """ + return self.__remote_te_link_tp_id + + def _set_remote_te_link_tp_id(self, v, load=False): + """ + Setter method for remote_te_link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/external_domain/remote_te_link_tp_id (te-types:te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_remote_te_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_remote_te_link_tp_id() directly. + + YANG Description: Remote TE LTP identifier, used together with +'remote-te-node-id' to identify the remote LTP in a +different domain. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """remote_te_link_tp_id must be of a type compatible with te-types:te-tp-id""", + 'defined-type': "te-types:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True)""", + }) + + self.__remote_te_link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_remote_te_link_tp_id(self): + self.__remote_te_link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="remote-te-link-tp-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-tp-id', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + remote_te_node_id = __builtin__.property(_get_remote_te_node_id, _set_remote_te_node_id) + remote_te_link_tp_id = __builtin__.property(_get_remote_te_link_tp_id, _set_remote_te_link_tp_id) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('remote_te_node_id', remote_te_node_id), ('remote_te_link_tp_id', remote_te_link_tp_id), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ce33e949d3254a05332244d538c14451be0692c9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py @@ -0,0 +1,206 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import max_lsp_bandwidth +class interface_switching_capability(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/interface-switching-capability. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: List of ISCDs for this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__switching_capability','__encoding','__max_lsp_bandwidth',) + + _yang_name = 'interface-switching-capability' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'interface-switching-capability'] + + def _get_switching_capability(self): + """ + Getter method for switching_capability, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/switching_capability (identityref) + + YANG Description: Switching capability for this interface. + """ + return self.__switching_capability + + def _set_switching_capability(self, v, load=False): + """ + Setter method for switching_capability, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/switching_capability (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_switching_capability is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_switching_capability() directly. + + YANG Description: Switching capability for this interface. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """switching_capability must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__switching_capability = t + if hasattr(self, '_set'): + self._set() + + def _unset_switching_capability(self): + self.__switching_capability = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-psc1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-evpl': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-l2sc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-tdm': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-otn': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-dcsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-lsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:switching-fsc': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="switching-capability", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_encoding(self): + """ + Getter method for encoding, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/encoding (identityref) + + YANG Description: Encoding supported by this interface. + """ + return self.__encoding + + def _set_encoding(self, v, load=False): + """ + Setter method for encoding, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/encoding (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_encoding is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_encoding() directly. + + YANG Description: Encoding supported by this interface. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """encoding must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__encoding = t + if hasattr(self, '_set'): + self._set() + + def _unset_encoding(self): + self.__encoding = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-packet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-ethernet': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-pdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-sdh': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-digital-wrapper': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-lambda': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-fiber-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-oduk': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-optical-channel': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-encoding-line': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_max_lsp_bandwidth(self): + """ + Getter method for max_lsp_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth (list) + + YANG Description: Maximum Label Switched Path (LSP) bandwidth at +priorities 0-7. + """ + return self.__max_lsp_bandwidth + + def _set_max_lsp_bandwidth(self, v, load=False): + """ + Setter method for max_lsp_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_lsp_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_lsp_bandwidth() directly. + + YANG Description: Maximum Label Switched Path (LSP) bandwidth at +priorities 0-7. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_lsp_bandwidth must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__max_lsp_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_lsp_bandwidth(self): + self.__max_lsp_bandwidth = YANGDynClass(base=YANGListType("priority",max_lsp_bandwidth.max_lsp_bandwidth, yang_name="max-lsp-bandwidth", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='priority', extensions=None), is_container='list', yang_name="max-lsp-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + switching_capability = __builtin__.property(_get_switching_capability, _set_switching_capability) + encoding = __builtin__.property(_get_encoding, _set_encoding) + max_lsp_bandwidth = __builtin__.property(_get_max_lsp_bandwidth, _set_max_lsp_bandwidth) + + + _pyangbind_elements = OrderedDict([('switching_capability', switching_capability), ('encoding', encoding), ('max_lsp_bandwidth', max_lsp_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..976aba2418eaf78a4d4570a95dda27bb90af6034 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class max_lsp_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/interface-switching-capability/max-lsp-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum Label Switched Path (LSP) bandwidth at +priorities 0-7. + """ + __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) + + _yang_name = 'max-lsp-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'interface-switching-capability', 'max-lsp-bandwidth'] + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/priority (uint8) + + YANG Description: Priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + priority = __builtin__.property(_get_priority, _set_priority) + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f4549d5dfb7a767c1bb84378643b464cb0788e9e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/interface-switching-capability/max-lsp-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) + + YANG Description: Maximum bandwidth attributes for OTN paths. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Maximum bandwidth attributes for OTN paths. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_bandwidth']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d630e831749e4a8bc2bd99ea36f7890f8bd6cbd2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,156 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/interface-switching-capability/max-lsp-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum bandwidth attributes for OTN paths. + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__max_ts_number',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'interface-switching-capability', 'max-lsp-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_max_ts_number(self): + """ + Getter method for max_ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) + + YANG Description: The maximum number of Tributary Slots (TS) that could be +used by an ODUflex LSP. + """ + return self.__max_ts_number + + def _set_max_ts_number(self, v, load=False): + """ + Setter method for max_ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/otn/max_ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_max_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_max_ts_number() directly. + + YANG Description: The maximum number of Tributary Slots (TS) that could be +used by an ODUflex LSP. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """max_ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__max_ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_max_ts_number(self): + self.__max_ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="max-ts-number", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + max_ts_number = __builtin__.property(_get_max_ts_number, _set_max_ts_number) + + __choices__ = {'technology': {'otn': ['odu_type', 'max_ts_number']}} + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('max_ts_number', max_ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c3f81b42ba49fecd0e18e4e8e531d59d87bbffad --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_restriction +class label_restrictions(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The label restrictions container. + """ + __slots__ = ('_path_helper', '_extmethods', '__label_restriction',) + + _yang_name = 'label-restrictions' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions'] + + def _get_label_restriction(self): + """ + Getter method for label_restriction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction (list) + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + return self.__label_restriction + + def _set_label_restriction(self, v, load=False): + """ + Setter method for label_restriction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_restriction() directly. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_restriction must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__label_restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_restriction(self): + self.__label_restriction = YANGDynClass(base=YANGListType("index",label_restriction.label_restriction, yang_name="label-restriction", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="label-restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + label_restriction = __builtin__.property(_get_label_restriction, _set_label_restriction) + + + _pyangbind_elements = OrderedDict([('label_restriction', label_restriction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aff15591b93e1cde0955cf81f4e68d3af0bbbdb3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,450 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import label_start +from . import label_end +from . import label_step +from . import otn_label_range +from . import ethernet_label_range +class label_restriction(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The absence of the label restrictions container implies +that all labels are acceptable; otherwise, only restricted +labels are available. + """ + __slots__ = ('_path_helper', '_extmethods', '__restriction','__index','__label_start','__label_end','__label_step','__range_bitmap','__otn_label_range','__ethernet_label_range',) + + _yang_name = 'label-restriction' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction'] + + def _get_restriction(self): + """ + Getter method for restriction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/restriction (enumeration) + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + return self.__restriction + + def _set_restriction(self, v, load=False): + """ + Setter method for restriction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/restriction (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_restriction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_restriction() directly. + + YANG Description: Indicates whether the list item is inclusive or exclusive. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """restriction must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", + }) + + self.__restriction = t + if hasattr(self, '_set'): + self._set() + + def _unset_restriction(self): + self.__restriction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'inclusive': {}, 'exclusive': {}},), default=six.text_type("inclusive"), is_leaf=True, yang_name="restriction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/index (uint32) + + YANG Description: The index of the label restriction list entry. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: The index of the label restriction list entry. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_label_start(self): + """ + Getter method for label_start, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start (container) + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + return self.__label_start + + def _set_label_start(self, v, load=False): + """ + Setter method for label_start, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_start is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_start() directly. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_start must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_start = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_start(self): + self.__label_start = YANGDynClass(base=label_start.label_start, is_container='container', yang_name="label-start", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_end(self): + """ + Getter method for label_end, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end (container) + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + return self.__label_end + + def _set_label_end(self, v, load=False): + """ + Setter method for label_end, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_end is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_end() directly. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_end must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_end = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_end(self): + self.__label_end = YANGDynClass(base=label_end.label_end, is_container='container', yang_name="label-end", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_step(self): + """ + Getter method for label_step, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step (container) + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + return self.__label_step + + def _set_label_step(self, v, load=False): + """ + Setter method for label_step, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_step() directly. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_step must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_step(self): + self.__label_step = YANGDynClass(base=label_step.label_step, is_container='container', yang_name="label-step", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_range_bitmap(self): + """ + Getter method for range_bitmap, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + return self.__range_bitmap + + def _set_range_bitmap(self, v, load=False): + """ + Setter method for range_bitmap, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/range_bitmap (yang:hex-string) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_bitmap is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_bitmap() directly. + + YANG Description: When there are gaps between 'label-start' and 'label-end', +this attribute is used to specify the positions +of the used labels. This is represented in big endian as +'hex-string'. +The most significant byte in the hex-string is the farthest +to the left in the byte sequence. Leading zero bytes in the +configured value may be omitted for brevity. +Each bit position in the 'range-bitmap' 'hex-string' maps +to a label in the range derived from 'label-start'. + +For example, assuming that 'label-start' = 16000 and +'range-bitmap' = 0x01000001, then: + +- bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. +- bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_bitmap must be of a type compatible with yang:hex-string""", + 'defined-type': "yang:hex-string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True)""", + }) + + self.__range_bitmap = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_bitmap(self): + self.__range_bitmap = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'}), is_leaf=True, yang_name="range-bitmap", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='yang:hex-string', is_config=True) + + + def _get_otn_label_range(self): + """ + Getter method for otn_label_range, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range (container) + + YANG Description: Label range information for OTN. + """ + return self.__otn_label_range + + def _set_otn_label_range(self, v, load=False): + """ + Setter method for otn_label_range, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn_label_range() directly. + + YANG Description: Label range information for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn_label_range(self): + self.__otn_label_range = YANGDynClass(base=otn_label_range.otn_label_range, is_container='container', yang_name="otn-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_ethernet_label_range(self): + """ + Getter method for ethernet_label_range, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range (container) + + YANG Description: Ethernet-specific label range related information. + """ + return self.__ethernet_label_range + + def _set_ethernet_label_range(self, v, load=False): + """ + Setter method for ethernet_label_range, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_ethernet_label_range is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ethernet_label_range() directly. + + YANG Description: Ethernet-specific label range related information. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ethernet_label_range must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True)""", + }) + + self.__ethernet_label_range = t + if hasattr(self, '_set'): + self._set() + + def _unset_ethernet_label_range(self): + self.__ethernet_label_range = YANGDynClass(base=ethernet_label_range.ethernet_label_range, is_container='container', yang_name="ethernet-label-range", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='container', is_config=True) + + restriction = __builtin__.property(_get_restriction, _set_restriction) + index = __builtin__.property(_get_index, _set_index) + label_start = __builtin__.property(_get_label_start, _set_label_start) + label_end = __builtin__.property(_get_label_end, _set_label_end) + label_step = __builtin__.property(_get_label_step, _set_label_step) + range_bitmap = __builtin__.property(_get_range_bitmap, _set_range_bitmap) + otn_label_range = __builtin__.property(_get_otn_label_range, _set_otn_label_range) + ethernet_label_range = __builtin__.property(_get_ethernet_label_range, _set_ethernet_label_range) + + + _pyangbind_elements = OrderedDict([('restriction', restriction), ('index', index), ('label_start', label_start), ('label_end', label_end), ('label_step', label_step), ('range_bitmap', range_bitmap), ('otn_label_range', otn_label_range), ('ethernet_label_range', ethernet_label_range), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..eae880f42853b13c519ca86c5ebe6851f7553575 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class ethernet_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/ethernet-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Ethernet-specific label range related information. + """ + __slots__ = ('_path_helper', '_extmethods', '__tag_type','__priority',) + + _yang_name = 'ethernet-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'ethernet-label-range'] + + def _get_tag_type(self): + """ + Getter method for tag_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + + YANG Description: VLAN tag type. + """ + return self.__tag_type + + def _set_tag_type(self, v, load=False): + """ + Setter method for tag_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/tag_type (etht-types:eth-tag-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_tag_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tag_type() directly. + + YANG Description: VLAN tag type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tag_type must be of a type compatible with etht-types:eth-tag-type""", + 'defined-type': "etht-types:eth-tag-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True)""", + }) + + self.__tag_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_tag_type(self): + self.__tag_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:c-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 's-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'ietf-eth-tran-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}, 'etht-types:s-vlan-tag-type': {'@module': 'ietf-eth-tran-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-eth-tran-types'}},), is_leaf=True, yang_name="tag-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:eth-tag-type', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + + YANG Description: priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/ethernet_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: priority. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint8', is_config=True) + + tag_type = __builtin__.property(_get_tag_type, _set_tag_type) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('tag_type', tag_type), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e9e68e82813498c6f37d21826d7ce86a9a0ae979 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_end(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-end. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the ending label if a label range is specified. +This attribute is not set if a single label is specified. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-end' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-end'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1fdead5d277f6d95d4940f56956903e08eb0dee6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-end/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-end', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c0cf47b54de55389fa826072cfca14ed282cdef3 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-end/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-end', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9b398df7aaa03b2d953e5db080c54f940869194 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,120 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_start(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-start. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: This is the starting label if a label range is specified. +This is the label value if a single label is specified, +in which case the 'label-end' attribute is not set. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-start' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-start'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbd976bc987b02e370bcc7f9cea8e155e4b97a5d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-start/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-start', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn (container) + + YANG Description: Label start or label end for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label start or label end for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..900ca9468dc43801e52b5939966added4e6516f9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-start/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label start or label end for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-start', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + + YANG Description: Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b580328d5b57041494b1b0beb8a6ebbaf8f60b2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class label_step(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-step. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The step increment between labels in the label range. +The label start/end values will have to be consistent +with the sign of label step. For example, +'label-start' < 'label-end' enforces 'label-step' > 0 +'label-start' > 'label-end' enforces 'label-step' < 0. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_step',) + + _yang_name = 'label-step' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-step'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/generic (int32) + + YANG Description: Label range step. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/generic (int32) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Label range step. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with int32""", + 'defined-type': "int32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32), default=RestrictedClassType(base_type=long, restriction_dict={'range': ['-2147483648..2147483647']}, int_size=32)(1), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='int32', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn (container) + + YANG Description: Label step for OTN + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label step for OTN + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_step(self): + """ + Getter method for eth_step, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/eth_step (uint16) + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + return self.__eth_step + + def _set_eth_step(self, v, load=False): + """ + Setter method for eth_step, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/eth_step (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_step is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_step() directly. + + YANG Description: Label step which represent possible increments for +an Ethernet VLAN tag. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_step must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True)""", + }) + + self.__eth_step = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_step(self): + self.__eth_step = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16)(1), is_leaf=True, yang_name="eth-step", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint16', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_step = __builtin__.property(_get_eth_step, _set_eth_step) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['eth_step']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_step', eth_step), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d47950a6b20dc33b6fc4c56ec038ba6bdf6ed032 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/label-step/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label step for OTN + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__ts',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'label-step', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Label step which represents possible increments for +Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('range-type', 'trib-port'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_ts(self): + """ + Getter method for ts, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + return self.__ts + + def _set_ts(self, v, load=False): + """ + Setter method for ts, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/otn/ts (otn-ts) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts() directly. + + YANG Description: Label step which represents possible increments for +Tributary Slot (TS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts must be of a type compatible with otn-ts""", + 'defined-type': "ietf-otn-topology:otn-ts", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True)""", + }) + + self.__ts = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts(self): + self.__ts = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts", parent=self, choice=('range-type', 'trib-slot'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-ts', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + ts = __builtin__.property(_get_ts, _set_ts) + + __choices__ = {'range-type': {'trib-port': ['tpn'], 'trib-slot': ['ts']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('ts', ts), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2a0404874f34a50caea7e5927ab64ad601e9357b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/__init__.py @@ -0,0 +1,256 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn_label_range(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/label-restrictions/label-restriction/otn-label-range. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label range information for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__range_type','__tsg','__odu_type_list','__priority',) + + _yang_name = 'otn-label-range' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'label-restrictions', 'label-restriction', 'otn-label-range'] + + def _get_range_type(self): + """ + Getter method for range_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + return self.__range_type + + def _set_range_type(self, v, load=False): + """ + Setter method for range_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/range_type (otn-label-range-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_range_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_range_type() directly. + + YANG Description: The type of range (e.g., TPN or TS) +to which the label range applies + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """range_type must be of a type compatible with otn-label-range-type""", + 'defined-type': "ietf-otn-topology:otn-label-range-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True)""", + }) + + self.__range_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_range_type(self): + self.__range_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'trib-slot': {}, 'trib-port': {}},), is_leaf=True, yang_name="range-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-label-range-type', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary slot granularity (TSG) to which the label range +applies. + +This leaf MUST be present when the range-type is TS. + +This leaf MAY be omitted when mapping an ODUk over an OTUk +Link. In this case the range-type is tpn, with only one +entry (ODUk), and the tpn range has only one value (1). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_odu_type_list(self): + """ + Getter method for odu_type_list, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + return self.__odu_type_list + + def _set_odu_type_list(self, v, load=False): + """ + Setter method for odu_type_list, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/odu_type_list (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type_list() directly. + + YANG Description: List of ODU types to which the label range applies. + +An Empty odu-type-list means that the label range +applies to all the supported ODU types. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type_list must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type_list(self): + self.__odu_type_list = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},)), is_leaf=False, yang_name="odu-type-list", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/priority (uint8) + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/otn_label_range/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority in Interface Switching Capability +Descriptor (ISCD). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint8', is_config=True) + + range_type = __builtin__.property(_get_range_type, _set_range_type) + tsg = __builtin__.property(_get_tsg, _set_tsg) + odu_type_list = __builtin__.property(_get_odu_type_list, _set_odu_type_list) + priority = __builtin__.property(_get_priority, _set_priority) + + + _pyangbind_elements = OrderedDict([('range_type', range_type), ('tsg', tsg), ('odu_type_list', odu_type_list), ('priority', priority), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d5fb70e3ab9ccd69c82c1cf46382de6397cf5b61 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class max_link_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-link-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum bandwidth that can be seen on this link in this +direction. Units are in bytes per second. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth',) + + _yang_name = 'max-link-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-link-bandwidth'] + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d86069ed591451e2f3e16f76df5e7a8a3b64717 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-link-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-link-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4528f641f19c93a78b10dc1c9eb80a09c5e76330 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-link-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-link-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + odulist = __builtin__.property(_get_odulist, _set_odulist) + + + _pyangbind_elements = OrderedDict([('odulist', odulist), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f17480835eb314d55951ac73ac41f347eff40547 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-link-bandwidth/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-link-bandwidth', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + number = __builtin__.property(_get_number, _set_number) + ts_number = __builtin__.property(_get_ts_number, _set_ts_number) + + + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7f16f359f8f89ae2ed3046dd2490c1899fc563e0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class max_resv_link_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-resv-link-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Maximum amount of bandwidth that can be reserved in this +direction in this link. Units are in bytes per second. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_bandwidth',) + + _yang_name = 'max-resv-link-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-resv-link-bandwidth'] + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f781d9af530b8a9c1f7da8a0751288dc7d863ea8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-resv-link-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-resv-link-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..eee723135eb0db06133e8ca55942f87df26ceb18 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-resv-link-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-resv-link-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + odulist = __builtin__.property(_get_odulist, _set_odulist) + + + _pyangbind_elements = OrderedDict([('odulist', odulist), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..98d18da300ccb4b910b13932a23d6978b3f4e8a7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/max-resv-link-bandwidth/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'max-resv-link-bandwidth', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + number = __builtin__.property(_get_number, _set_number) + ts_number = __builtin__.property(_get_ts_number, _set_ts_number) + + + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a3ab4519d2d470e434a4b44c39901af19ab97150 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class te_nsrlgs(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/te-nsrlgs. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains a list of NSRLGs (Non-Shared Risk Link Groups). +When an abstract TE link is configured, this list specifies +the request that underlay TE paths need to be mutually +disjoint with other TE links in the same groups. + """ + __slots__ = ('_path_helper', '_extmethods', '__id',) + + _yang_name = 'te-nsrlgs' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'te-nsrlgs'] + + def _get_id(self): + """ + Getter method for id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_nsrlgs/id (uint32) + + YANG Description: NSRLG ID, uniquely configured within a topology. + """ + return self.__id + + def _set_id(self, v, load=False): + """ + Setter method for id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_nsrlgs/id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_id() directly. + + YANG Description: NSRLG ID, uniquely configured within a topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__id = t + if hasattr(self, '_set'): + self._set() + + def _unset_id(self): + self.__id = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + id = __builtin__.property(_get_id, _set_id) + + + _pyangbind_elements = OrderedDict([('id', id), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..65f81a17e81c5170aa76cd7bf6588bce9fa1d2c8 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class te_srlgs(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/te-srlgs. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains a list of SRLGs. + """ + __slots__ = ('_path_helper', '_extmethods', '__value',) + + _yang_name = 'te-srlgs' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'te-srlgs'] + + def _get_value(self): + """ + Getter method for value, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_srlgs/value (te-types:srlg) + + YANG Description: SRLG value. + """ + return self.__value + + def _set_value(self, v, load=False): + """ + Setter method for value, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/te_srlgs/value (te-types:srlg) + If this variable is read-only (config: false) in the + source YANG file, then _set_value is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_value() directly. + + YANG Description: SRLG value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """value must be of a type compatible with te-types:srlg""", + 'defined-type': "te-types:srlg", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True)""", + }) + + self.__value = t + if hasattr(self, '_set'): + self._set() + + def _unset_value(self): + self.__value = YANGDynClass(unique=True, base=TypedListType(allowed_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32)), is_leaf=False, yang_name="value", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:srlg', is_config=True) + + value = __builtin__.property(_get_value, _set_value) + + + _pyangbind_elements = OrderedDict([('value', value), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a1b69d2e20a1ae79da37311f698137534492b2ce --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py @@ -0,0 +1,326 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import primary_path +from . import backup_path +from . import tunnel_termination_points +from . import tunnels +class underlay(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Attributes of the TE link underlay. + """ + __slots__ = ('_path_helper', '_extmethods', '__enabled','__primary_path','__backup_path','__protection_type','__tunnel_termination_points','__tunnels',) + + _yang_name = 'underlay' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay'] + + def _get_enabled(self): + """ + Getter method for enabled, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/enabled (boolean) + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + return self.__enabled + + def _set_enabled(self, v, load=False): + """ + Setter method for enabled, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/enabled (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_enabled is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_enabled() directly. + + YANG Description: 'true' if the underlay is enabled. +'false' if the underlay is disabled. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """enabled must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__enabled = t + if hasattr(self, '_set'): + self._set() + + def _unset_enabled(self): + self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_primary_path(self): + """ + Getter method for primary_path, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path (container) + + YANG Description: The service path on the underlay topology that +supports this link. + """ + return self.__primary_path + + def _set_primary_path(self, v, load=False): + """ + Setter method for primary_path, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_primary_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_primary_path() directly. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """primary_path must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__primary_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_primary_path(self): + self.__primary_path = YANGDynClass(base=primary_path.primary_path, is_container='container', yang_name="primary-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_backup_path(self): + """ + Getter method for backup_path, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path (list) + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + return self.__backup_path + + def _set_backup_path(self, v, load=False): + """ + Setter method for backup_path, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_backup_path is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_backup_path() directly. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """backup_path must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__backup_path = t + if hasattr(self, '_set'): + self._set() + + def _unset_backup_path(self): + self.__backup_path = YANGDynClass(base=YANGListType("index",backup_path.backup_path, yang_name="backup-path", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='index', extensions=None), is_container='list', yang_name="backup-path", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + + def _get_protection_type(self): + """ + Getter method for protection_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/protection_type (identityref) + + YANG Description: Underlay protection type desired for this link. + """ + return self.__protection_type + + def _set_protection_type(self, v, load=False): + """ + Setter method for protection_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/protection_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_protection_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_protection_type() directly. + + YANG Description: Underlay protection type desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """protection_type must be of a type compatible with identityref""", + 'defined-type': "ietf-te-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True)""", + }) + + self.__protection_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_protection_type(self): + self.__protection_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unprotected': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute-extra': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-reroute': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-n': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-1-for-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-unidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-bidir-1-plus-1': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'ietf-te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}, 'te-types:lsp-protection-extra-traffic': {'@module': 'ietf-te-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-te-types'}},), is_leaf=True, yang_name="protection-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='identityref', is_config=True) + + + def _get_tunnel_termination_points(self): + """ + Getter method for tunnel_termination_points, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points (container) + + YANG Description: Underlay TTPs desired for this link. + """ + return self.__tunnel_termination_points + + def _set_tunnel_termination_points(self, v, load=False): + """ + Setter method for tunnel_termination_points, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_termination_points is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_termination_points() directly. + + YANG Description: Underlay TTPs desired for this link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_termination_points must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tunnel_termination_points = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_termination_points(self): + self.__tunnel_termination_points = YANGDynClass(base=tunnel_termination_points.tunnel_termination_points, is_container='container', yang_name="tunnel-termination-points", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_tunnels(self): + """ + Getter method for tunnels, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels (container) + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + return self.__tunnels + + def _set_tunnels(self, v, load=False): + """ + Setter method for tunnels, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnels is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnels() directly. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnels must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__tunnels = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnels(self): + self.__tunnels = YANGDynClass(base=tunnels.tunnels, is_container='container', yang_name="tunnels", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + enabled = __builtin__.property(_get_enabled, _set_enabled) + primary_path = __builtin__.property(_get_primary_path, _set_primary_path) + backup_path = __builtin__.property(_get_backup_path, _set_backup_path) + protection_type = __builtin__.property(_get_protection_type, _set_protection_type) + tunnel_termination_points = __builtin__.property(_get_tunnel_termination_points, _set_tunnel_termination_points) + tunnels = __builtin__.property(_get_tunnels, _set_tunnels) + + + _pyangbind_elements = OrderedDict([('enabled', enabled), ('primary_path', primary_path), ('backup_path', backup_path), ('protection_type', protection_type), ('tunnel_termination_points', tunnel_termination_points), ('tunnels', tunnels), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fe3e9714fa8fedb7896385b782e128c751ce5075 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py @@ -0,0 +1,207 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class backup_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of backup service paths on the underlay topology that +protect the underlay primary path. If the primary path is +not protected, the list contains zero elements. If the +primary path is protected, the list contains one or more +elements. + """ + __slots__ = ('_path_helper', '_extmethods', '__index','__network_ref','__path_element',) + + _yang_name = 'backup-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path'] + + def _get_index(self): + """ + Getter method for index, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/index (uint32) + + YANG Description: A sequence number to identify a backup path. + """ + return self.__index + + def _set_index(self, v, load=False): + """ + Setter method for index, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/index (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_index is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_index() directly. + + YANG Description: A sequence number to identify a backup path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """index must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__index = t + if hasattr(self, '_set'): + self._set() + + def _unset_index(self): + self.__index = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="index", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element (list) + + YANG Description: A list of path elements describing the backup service +path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the backup service +path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + index = __builtin__.property(_get_index, _set_index) + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + path_element = __builtin__.property(_get_path_element, _set_path_element) + + + _pyangbind_elements = OrderedDict([('index', index), ('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..62e01431a8b8667754b9feb85a0fe97891a4f021 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,321 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the backup service +path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..25cce73149e731c24b64df4ea40309919eb43fa0 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..602bbac44c1d43dbe2f772cfdc19c2db2e1fcc5d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cfac3e4fdd6fd7bea33cb632d29de441573493a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7510f12e33f23f0b40fe4445df6ec5b66163bf5c --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ebe98f0b08aec3aa09534cbaff924f6a1ed62468 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..204c0ffd8ad8b1c7e89d46c844ea1cc1cebce0d4 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..49f6d816662decf8ca1f139939ba5d953981810b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/backup-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'backup-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..111fdc4e380a501eb41dc18ba865f2be42349691 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import path_element +class primary_path(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The service path on the underlay topology that +supports this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref','__path_element',) + + _yang_name = 'primary-path' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + + def _get_path_element(self): + """ + Getter method for path_element, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element (list) + + YANG Description: A list of path elements describing the service path. + """ + return self.__path_element + + def _set_path_element(self, v, load=False): + """ + Setter method for path_element, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element() directly. + + YANG Description: A list of path elements describing the service path. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__path_element = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element(self): + self.__path_element = YANGDynClass(base=YANGListType("path_element_id",path_element.path_element, yang_name="path-element", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='path-element-id', extensions=None), is_container='list', yang_name="path-element", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + path_element = __builtin__.property(_get_path_element, _set_path_element) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ('path_element', path_element), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..71c1bd0cc81cbe80bda97bef7e92a130a1e1b45a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,320 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import numbered_node_hop +from . import numbered_link_hop +from . import unnumbered_link_hop +from . import as_number_hop +from . import label_hop +class path_element(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: A list of path elements describing the service path. + """ + __slots__ = ('_path_helper', '_extmethods', '__path_element_id','__numbered_node_hop','__numbered_link_hop','__unnumbered_link_hop','__as_number_hop','__label_hop',) + + _yang_name = 'path-element' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element'] + + def _get_path_element_id(self): + """ + Getter method for path_element_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/path_element_id (uint32) + + YANG Description: To identify the element in a path. + """ + return self.__path_element_id + + def _set_path_element_id(self, v, load=False): + """ + Setter method for path_element_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/path_element_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_path_element_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_path_element_id() directly. + + YANG Description: To identify the element in a path. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """path_element_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__path_element_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_path_element_id(self): + self.__path_element_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="path-element-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_numbered_node_hop(self): + """ + Getter method for numbered_node_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop (container) + + YANG Description: Numbered node route hop. + """ + return self.__numbered_node_hop + + def _set_numbered_node_hop(self, v, load=False): + """ + Setter method for numbered_node_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_node_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_node_hop() directly. + + YANG Description: Numbered node route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_node_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_node_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_node_hop(self): + self.__numbered_node_hop = YANGDynClass(base=numbered_node_hop.numbered_node_hop, is_container='container', yang_name="numbered-node-hop", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_numbered_link_hop(self): + """ + Getter method for numbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop (container) + + YANG Description: Numbered link explicit route hop. + """ + return self.__numbered_link_hop + + def _set_numbered_link_hop(self, v, load=False): + """ + Setter method for numbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_numbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_numbered_link_hop() directly. + + YANG Description: Numbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """numbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__numbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_numbered_link_hop(self): + self.__numbered_link_hop = YANGDynClass(base=numbered_link_hop.numbered_link_hop, is_container='container', yang_name="numbered-link-hop", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_unnumbered_link_hop(self): + """ + Getter method for unnumbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop (container) + + YANG Description: Unnumbered link explicit route hop. + """ + return self.__unnumbered_link_hop + + def _set_unnumbered_link_hop(self, v, load=False): + """ + Setter method for unnumbered_link_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_unnumbered_link_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_unnumbered_link_hop() directly. + + YANG Description: Unnumbered link explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """unnumbered_link_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__unnumbered_link_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_unnumbered_link_hop(self): + self.__unnumbered_link_hop = YANGDynClass(base=unnumbered_link_hop.unnumbered_link_hop, is_container='container', yang_name="unnumbered-link-hop", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_as_number_hop(self): + """ + Getter method for as_number_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop (container) + + YANG Description: AS explicit route hop. + """ + return self.__as_number_hop + + def _set_as_number_hop(self, v, load=False): + """ + Setter method for as_number_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number_hop() directly. + + YANG Description: AS explicit route hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__as_number_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number_hop(self): + self.__as_number_hop = YANGDynClass(base=as_number_hop.as_number_hop, is_container='container', yang_name="as-number-hop", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + + def _get_label_hop(self): + """ + Getter method for label_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop (container) + + YANG Description: Label hop type. + """ + return self.__label_hop + + def _set_label_hop(self, v, load=False): + """ + Setter method for label_hop, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_label_hop is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_label_hop() directly. + + YANG Description: Label hop type. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """label_hop must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__label_hop = t + if hasattr(self, '_set'): + self._set() + + def _unset_label_hop(self): + self.__label_hop = YANGDynClass(base=label_hop.label_hop, is_container='container', yang_name="label-hop", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + path_element_id = __builtin__.property(_get_path_element_id, _set_path_element_id) + numbered_node_hop = __builtin__.property(_get_numbered_node_hop, _set_numbered_node_hop) + numbered_link_hop = __builtin__.property(_get_numbered_link_hop, _set_numbered_link_hop) + unnumbered_link_hop = __builtin__.property(_get_unnumbered_link_hop, _set_unnumbered_link_hop) + as_number_hop = __builtin__.property(_get_as_number_hop, _set_as_number_hop) + label_hop = __builtin__.property(_get_label_hop, _set_label_hop) + + __choices__ = {'type': {'numbered-node-hop': ['numbered_node_hop'], 'numbered-link-hop': ['numbered_link_hop'], 'unnumbered-link-hop': ['unnumbered_link_hop'], 'as-number': ['as_number_hop'], 'label': ['label_hop']}} + _pyangbind_elements = OrderedDict([('path_element_id', path_element_id), ('numbered_node_hop', numbered_node_hop), ('numbered_link_hop', numbered_link_hop), ('unnumbered_link_hop', unnumbered_link_hop), ('as_number_hop', as_number_hop), ('label_hop', label_hop), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..37b1d287a11f717964e71e43e2721cc84a4b55ff --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class as_number_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/as-number-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: AS explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__as_number','__hop_type',) + + _yang_name = 'as-number-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'as-number-hop'] + + def _get_as_number(self): + """ + Getter method for as_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + + YANG Description: The Autonomous System (AS) number. + """ + return self.__as_number + + def _set_as_number(self, v, load=False): + """ + Setter method for as_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/as_number (inet:as-number) + If this variable is read-only (config: false) in the + source YANG file, then _set_as_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_as_number() directly. + + YANG Description: The Autonomous System (AS) number. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """as_number must be of a type compatible with inet:as-number""", + 'defined-type': "inet:as-number", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True)""", + }) + + self.__as_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_as_number(self): + self.__as_number = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="as-number", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:as-number', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/as_number_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'as-number'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + as_number = __builtin__.property(_get_as_number, _set_as_number) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'as-number': ['as_number', 'hop_type']}} + _pyangbind_elements = OrderedDict([('as_number', as_number), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d2a98a8c6dbd034bc2ac51d8e418def432acd0fd --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_label +class label_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/label-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop type. + """ + __slots__ = ('_path_helper', '_extmethods', '__te_label',) + + _yang_name = 'label-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'label-hop'] + + def _get_te_label(self): + """ + Getter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label (container) + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + return self.__te_label + + def _set_te_label(self, v, load=False): + """ + Setter method for te_label, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_label is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_label() directly. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_label must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_label = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_label(self): + self.__te_label = YANGDynClass(base=te_label.te_label, is_container='container', yang_name="te-label", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + te_label = __builtin__.property(_get_te_label, _set_te_label) + + __choices__ = {'type': {'label': ['te_label']}} + _pyangbind_elements = OrderedDict([('te_label', te_label), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b61128caea73a0a628b73a92ff26c1a826f5eb51 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/__init__.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_label(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/label-hop/te-label. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies the TE label. The choices can +be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__vlanid','__direction',) + + _yang_name = 'te-label' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + + YANG Description: TE label specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/generic (rt-types:generalized-label) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: TE label specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with rt-types:generalized-label""", + 'defined-type': "rt-types:generalized-label", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='rt-types:generalized-label', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn (container) + + YANG Description: Label hop for OTN. + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Label hop for OTN. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_vlanid(self): + """ + Getter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + + YANG Description: VLAN tag id. + """ + return self.__vlanid + + def _set_vlanid(self, v, load=False): + """ + Setter method for vlanid, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/vlanid (etht-types:vlanid) + If this variable is read-only (config: false) in the + source YANG file, then _set_vlanid is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_vlanid() directly. + + YANG Description: VLAN tag id. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """vlanid must be of a type compatible with etht-types:vlanid""", + 'defined-type': "etht-types:vlanid", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True)""", + }) + + self.__vlanid = t + if hasattr(self, '_set'): + self._set() + + def _unset_vlanid(self): + self.__vlanid = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4094']}), is_leaf=True, yang_name="vlanid", parent=self, choice=('technology', 'eth'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='etht-types:vlanid', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + + YANG Description: Label direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/direction (te-label-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Label direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-label-direction""", + 'defined-type': "ietf-te-topology:te-label-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'forward': {}, 'reverse': {}},), default=six.text_type("forward"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'label'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-label-direction', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + vlanid = __builtin__.property(_get_vlanid, _set_vlanid) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'technology': {'generic': ['generic'], 'otn': ['otn'], 'eth': ['vlanid']}, 'type': {'label': ['direction']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('vlanid', vlanid), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c629a4834ee93a4e1b4d3119f00668b93b541bb2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/__init__.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/label-hop/te-label/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Label hop for OTN. + """ + __slots__ = ('_path_helper', '_extmethods', '__tpn','__tsg','__ts_list',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'label-hop', 'te-label', 'otn'] + + def _get_tpn(self): + """ + Getter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + + YANG Description: Tributary Port Number (TPN). + """ + return self.__tpn + + def _set_tpn(self, v, load=False): + """ + Setter method for tpn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tpn (otn-tpn) + If this variable is read-only (config: false) in the + source YANG file, then _set_tpn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tpn() directly. + + YANG Description: Tributary Port Number (TPN). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tpn must be of a type compatible with otn-tpn""", + 'defined-type': "ietf-otn-topology:otn-tpn", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True)""", + }) + + self.__tpn = t + if hasattr(self, '_set'): + self._set() + + def _unset_tpn(self): + self.__tpn = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="tpn", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='otn-tpn', is_config=True) + + + def _get_tsg(self): + """ + Getter method for tsg, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + + YANG Description: Tributary Slot Granularity (TSG). + """ + return self.__tsg + + def _set_tsg(self, v, load=False): + """ + Setter method for tsg, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/tsg (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_tsg is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tsg() directly. + + YANG Description: Tributary Slot Granularity (TSG). + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tsg must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__tsg = t + if hasattr(self, '_set'): + self._set() + + def _unset_tsg(self): + self.__tsg = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-1.25G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-2.5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:tsg-5G': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="tsg", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_ts_list(self): + """ + Getter method for ts_list, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + return self.__ts_list + + def _set_ts_list(self, v, load=False): + """ + Setter method for ts_list, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/label_hop/te_label/otn/ts_list (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_list is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_list() directly. + + YANG Description: A list of available Tributary Slots (TS) ranging + + + + +between 1 and 4095. If multiple values or +ranges are given, they all MUST be disjoint +and MUST be in ascending order. +For example 1-20,25,50-1000. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_list must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True)""", + }) + + self.__ts_list = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_list(self): + self.__ts_list = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)'}), is_leaf=True, yang_name="ts-list", parent=self, choice=('technology', 'otn'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='string', is_config=True) + + tpn = __builtin__.property(_get_tpn, _set_tpn) + tsg = __builtin__.property(_get_tsg, _set_tsg) + ts_list = __builtin__.property(_get_ts_list, _set_ts_list) + + __choices__ = {'technology': {'otn': ['tpn', 'tsg', 'ts_list']}} + _pyangbind_elements = OrderedDict([('tpn', tpn), ('tsg', tsg), ('ts_list', ts_list), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b3b44095b856017f9bc9f0a8a48d9ccfb1104ef5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/__init__.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/numbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__hop_type','__direction',) + + _yang_name = 'numbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'numbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE Link Termination Point (LTP) identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'numbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'numbered-link-hop': ['link_tp_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4e0f06397674b361981c7f12ed512c5ac95e4797 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class numbered_node_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/numbered-node-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Numbered node route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__node_id','__hop_type',) + + _yang_name = 'numbered-node-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'numbered-node-hop'] + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/numbered_node_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'numbered-node-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + + __choices__ = {'type': {'numbered-node-hop': ['node_id', 'hop_type']}} + _pyangbind_elements = OrderedDict([('node_id', node_id), ('hop_type', hop_type), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6f04ec7fc1e3908e2db02cb47ca3160c58402fc2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/__init__.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class unnumbered_link_hop(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/primary-path/path-element/unnumbered-link-hop. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unnumbered link explicit route hop. + """ + __slots__ = ('_path_helper', '_extmethods', '__link_tp_id','__node_id','__hop_type','__direction',) + + _yang_name = 'unnumbered-link-hop' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'primary-path', 'path-element', 'unnumbered-link-hop'] + + def _get_link_tp_id(self): + """ + Getter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + return self.__link_tp_id + + def _set_link_tp_id(self, v, load=False): + """ + Setter method for link_tp_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/link_tp_id (te-tp-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_link_tp_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_link_tp_id() directly. + + YANG Description: TE LTP identifier. The combination of the TE link ID +and the TE node ID is used to identify an unnumbered +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """link_tp_id must be of a type compatible with te-tp-id""", + 'defined-type': "ietf-te-topology:te-tp-id", + 'generated-type': """YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True)""", + }) + + self.__link_tp_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_link_tp_id(self): + self.__link_tp_id = YANGDynClass(base=[RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="link-tp-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-tp-id', is_config=True) + + + def _get_node_id(self): + """ + Getter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + + YANG Description: The identifier of a node in the TE topology. + """ + return self.__node_id + + def _set_node_id(self, v, load=False): + """ + Setter method for node_id, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/node_id (te-node-id) + If this variable is read-only (config: false) in the + source YANG file, then _set_node_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_node_id() directly. + + YANG Description: The identifier of a node in the TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """node_id must be of a type compatible with te-node-id""", + 'defined-type': "ietf-te-topology:te-node-id", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True)""", + }) + + self.__node_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_node_id(self): + self.__node_id = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="node-id", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-node-id', is_config=True) + + + def _get_hop_type(self): + """ + Getter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + + YANG Description: Strict or loose hop. + """ + return self.__hop_type + + def _set_hop_type(self, v, load=False): + """ + Setter method for hop_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/hop_type (te-hop-type) + If this variable is read-only (config: false) in the + source YANG file, then _set_hop_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_hop_type() directly. + + YANG Description: Strict or loose hop. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """hop_type must be of a type compatible with te-hop-type""", + 'defined-type': "ietf-te-topology:te-hop-type", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True)""", + }) + + self.__hop_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_hop_type(self): + self.__hop_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'loose': {}, 'strict': {}},), default=six.text_type("strict"), is_leaf=True, yang_name="hop-type", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-hop-type', is_config=True) + + + def _get_direction(self): + """ + Getter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + + YANG Description: Link route object direction. + """ + return self.__direction + + def _set_direction(self, v, load=False): + """ + Setter method for direction, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/unnumbered_link_hop/direction (te-link-direction) + If this variable is read-only (config: false) in the + source YANG file, then _set_direction is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_direction() directly. + + YANG Description: Link route object direction. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """direction must be of a type compatible with te-link-direction""", + 'defined-type': "ietf-te-topology:te-link-direction", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True)""", + }) + + self.__direction = t + if hasattr(self, '_set'): + self._set() + + def _unset_direction(self): + self.__direction = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'incoming': {}, 'outgoing': {}},), default=six.text_type("outgoing"), is_leaf=True, yang_name="direction", parent=self, choice=('type', 'unnumbered-link-hop'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-link-direction', is_config=True) + + link_tp_id = __builtin__.property(_get_link_tp_id, _set_link_tp_id) + node_id = __builtin__.property(_get_node_id, _set_node_id) + hop_type = __builtin__.property(_get_hop_type, _set_hop_type) + direction = __builtin__.property(_get_direction, _set_direction) + + __choices__ = {'type': {'unnumbered-link-hop': ['link_tp_id', 'node_id', 'hop_type', 'direction']}} + _pyangbind_elements = OrderedDict([('link_tp_id', link_tp_id), ('node_id', node_id), ('hop_type', hop_type), ('direction', direction), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..801aa8c429415ab363b69a8abcada745f901a81a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel_termination_points(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/tunnel-termination-points. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TTPs desired for this link. + """ + __slots__ = ('_path_helper', '_extmethods', '__source','__destination',) + + _yang_name = 'tunnel-termination-points' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'tunnel-termination-points'] + + def _get_source(self): + """ + Getter method for source, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/source (binary) + + YANG Description: Source TTP identifier. + """ + return self.__source + + def _set_source(self, v, load=False): + """ + Setter method for source, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/source (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_source is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_source() directly. + + YANG Description: Source TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """source must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__source = t + if hasattr(self, '_set'): + self._set() + + def _unset_source(self): + self.__source = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="source", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + + def _get_destination(self): + """ + Getter method for destination, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/destination (binary) + + YANG Description: Destination TTP identifier. + """ + return self.__destination + + def _set_destination(self, v, load=False): + """ + Setter method for destination, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/destination (binary) + If this variable is read-only (config: false) in the + source YANG file, then _set_destination is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_destination() directly. + + YANG Description: Destination TTP identifier. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """destination must be of a type compatible with binary""", + 'defined-type': "binary", + 'generated-type': """YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True)""", + }) + + self.__destination = t + if hasattr(self, '_set'): + self._set() + + def _unset_destination(self): + self.__destination = YANGDynClass(base=YANGBinary, is_leaf=True, yang_name="destination", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='binary', is_config=True) + + source = __builtin__.property(_get_source, _set_source) + destination = __builtin__.property(_get_destination, _set_destination) + + + _pyangbind_elements = OrderedDict([('source', source), ('destination', destination), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e2a5a218a8a938a331e0d9435a8369a3a4b6861b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py @@ -0,0 +1,167 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import tunnel +class tunnels(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/tunnels. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Underlay TE tunnels supporting this TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__sharing','__tunnel',) + + _yang_name = 'tunnels' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'tunnels'] + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. +This leaf is the default option for all TE tunnels +and may be overridden by the per-TE-tunnel value. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + + def _get_tunnel(self): + """ + Getter method for tunnel, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel (list) + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + return self.__tunnel + + def _set_tunnel(self, v, load=False): + """ + Setter method for tunnel, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel() directly. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True)""", + }) + + self.__tunnel = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel(self): + self.__tunnel = YANGDynClass(base=YANGListType("tunnel_name",tunnel.tunnel, yang_name="tunnel", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='tunnel-name', extensions=None), is_container='list', yang_name="tunnel", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='list', is_config=True) + + sharing = __builtin__.property(_get_sharing, _set_sharing) + tunnel = __builtin__.property(_get_tunnel, _set_tunnel) + + + _pyangbind_elements = OrderedDict([('sharing', sharing), ('tunnel', tunnel), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..24bfd8831ebc0ea3189d0346790c3048acdba6c2 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,170 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class tunnel(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/underlay/tunnels/tunnel. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Zero, one, or more underlay TE tunnels that support this +TE link. + """ + __slots__ = ('_path_helper', '_extmethods', '__tunnel_name','__sharing',) + + _yang_name = 'tunnel' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'underlay', 'tunnels', 'tunnel'] + + def _get_tunnel_name(self): + """ + Getter method for tunnel_name, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/tunnel_name (string) + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + return self.__tunnel_name + + def _set_tunnel_name(self, v, load=False): + """ + Setter method for tunnel_name, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/tunnel_name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_tunnel_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_tunnel_name() directly. + + YANG Description: A tunnel name uniquely identifies an underlay TE tunnel, +used together with the 'source-node' value for this +link. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """tunnel_name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__tunnel_name = t + if hasattr(self, '_set'): + self._set() + + def _unset_tunnel_name(self): + self.__tunnel_name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="tunnel-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_sharing(self): + """ + Getter method for sharing, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/sharing (boolean) + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + return self.__sharing + + def _set_sharing(self, v, load=False): + """ + Setter method for sharing, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/sharing (boolean) + If this variable is read-only (config: false) in the + source YANG file, then _set_sharing is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_sharing() directly. + + YANG Description: 'true' if the underlay tunnel can be shared with other +TE links; +'false' if the underlay tunnel is dedicated to this +TE link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """sharing must be of a type compatible with boolean""", + 'defined-type': "boolean", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True)""", + }) + + self.__sharing = t + if hasattr(self, '_set'): + self._set() + + def _unset_sharing(self): + self.__sharing = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="sharing", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='boolean', is_config=True) + + tunnel_name = __builtin__.property(_get_tunnel_name, _set_tunnel_name) + sharing = __builtin__.property(_get_sharing, _set_sharing) + + + _pyangbind_elements = OrderedDict([('tunnel_name', tunnel_name), ('sharing', sharing), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..47c06f99ed81c233e11a6a4ab3cfbdd169adfa3d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_bandwidth +class unreserved_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/unreserved-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Unreserved bandwidth for priority levels 0-7. Units are in +bytes per second. + """ + __slots__ = ('_path_helper', '_extmethods', '__priority','__te_bandwidth',) + + _yang_name = 'unreserved-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'unreserved-bandwidth'] + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/priority (uint8) + + YANG Description: Priority. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/priority (uint8) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: Priority. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint8""", + 'defined-type': "uint8", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint8', is_config=True) + + + def _get_te_bandwidth(self): + """ + Getter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth (container) + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + return self.__te_bandwidth + + def _set_te_bandwidth(self, v, load=False): + """ + Setter method for te_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_bandwidth() directly. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_bandwidth must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_bandwidth(self): + self.__te_bandwidth = YANGDynClass(base=te_bandwidth.te_bandwidth, is_container='container', yang_name="te-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + priority = __builtin__.property(_get_priority, _set_priority) + te_bandwidth = __builtin__.property(_get_te_bandwidth, _set_te_bandwidth) + + + _pyangbind_elements = OrderedDict([('priority', priority), ('te_bandwidth', te_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..35527bd359c6dd41044a11d2bf1a195eee833692 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import otn +class te_bandwidth(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/unreserved-bandwidth/te-bandwidth. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Container that specifies TE bandwidth. The choices +can be augmented for specific data-plane technologies. + """ + __slots__ = ('_path_helper', '_extmethods', '__generic','__otn','__eth_bandwidth',) + + _yang_name = 'te-bandwidth' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'unreserved-bandwidth', 'te-bandwidth'] + + def _get_generic(self): + """ + Getter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/generic (te-bandwidth) + + YANG Description: Bandwidth specified in a generic format. + """ + return self.__generic + + def _set_generic(self, v, load=False): + """ + Setter method for generic, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/generic (te-bandwidth) + If this variable is read-only (config: false) in the + source YANG file, then _set_generic is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_generic() directly. + + YANG Description: Bandwidth specified in a generic format. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """generic must be of a type compatible with te-bandwidth""", + 'defined-type': "ietf-te-topology:te-bandwidth", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True)""", + }) + + self.__generic = t + if hasattr(self, '_set'): + self._set() + + def _unset_generic(self): + self.__generic = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+(,(0[xX](0((\\.0?)?[pP](\\+)?0?|(\\.0?))|1(\\.([\\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\\+)?(12[0-7]|1[01]\\d|0?\\d?\\d)?)|0[xX][\\da-fA-F]{1,8}|\\d+))*'}), is_leaf=True, yang_name="generic", parent=self, choice=('technology', 'generic'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-bandwidth', is_config=True) + + + def _get_otn(self): + """ + Getter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn (container) + + YANG Description: Bandwidth attributes for OTN links + """ + return self.__otn + + def _set_otn(self, v, load=False): + """ + Setter method for otn, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_otn is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_otn() directly. + + YANG Description: Bandwidth attributes for OTN links + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """otn must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True)""", + }) + + self.__otn = t + if hasattr(self, '_set'): + self._set() + + def _unset_otn(self): + self.__otn = YANGDynClass(base=otn.otn, is_container='container', yang_name="otn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='container', is_config=True) + + + def _get_eth_bandwidth(self): + """ + Getter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/eth_bandwidth (uint64) + + YANG Description: Available bandwith value expressed in kilobits per second + """ + return self.__eth_bandwidth + + def _set_eth_bandwidth(self, v, load=False): + """ + Setter method for eth_bandwidth, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/eth_bandwidth (uint64) + If this variable is read-only (config: false) in the + source YANG file, then _set_eth_bandwidth is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_eth_bandwidth() directly. + + YANG Description: Available bandwith value expressed in kilobits per second + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """eth_bandwidth must be of a type compatible with uint64""", + 'defined-type': "uint64", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True)""", + }) + + self.__eth_bandwidth = t + if hasattr(self, '_set'): + self._set() + + def _unset_eth_bandwidth(self): + self.__eth_bandwidth = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..18446744073709551615']}, int_size=64), restriction_dict={'range': ['0..10000000000']}), is_leaf=True, yang_name="eth-bandwidth", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-eth-te-topology', defining_module='ietf-eth-te-topology', yang_type='uint64', is_config=True) + + generic = __builtin__.property(_get_generic, _set_generic) + otn = __builtin__.property(_get_otn, _set_otn) + eth_bandwidth = __builtin__.property(_get_eth_bandwidth, _set_eth_bandwidth) + + __choices__ = {'technology': {'generic': ['generic']}} + _pyangbind_elements = OrderedDict([('generic', generic), ('otn', otn), ('eth_bandwidth', eth_bandwidth), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9f57b381bec178b2717de2c4649de47d4da213fa --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import odulist +class otn(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/unreserved-bandwidth/te-bandwidth/otn. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Bandwidth attributes for OTN links + """ + __slots__ = ('_path_helper', '_extmethods', '__odulist',) + + _yang_name = 'otn' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'unreserved-bandwidth', 'te-bandwidth', 'otn'] + + def _get_odulist(self): + """ + Getter method for odulist, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist (list) + + YANG Description: OTN bandwidth definition + """ + return self.__odulist + + def _set_odulist(self, v, load=False): + """ + Setter method for odulist, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist (list) + If this variable is read-only (config: false) in the + source YANG file, then _set_odulist is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odulist() directly. + + YANG Description: OTN bandwidth definition + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odulist must be of a type compatible with list""", + 'defined-type': "list", + 'generated-type': """YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True)""", + }) + + self.__odulist = t + if hasattr(self, '_set'): + self._set() + + def _unset_odulist(self): + self.__odulist = YANGDynClass(base=YANGListType("odu_type",odulist.odulist, yang_name="odulist", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_keys='odu-type', extensions=None), is_container='list', yang_name="odulist", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='list', is_config=True) + + odulist = __builtin__.property(_get_odulist, _set_odulist) + + + _pyangbind_elements = OrderedDict([('odulist', odulist), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..67eca2bd3a766d00b7814ac69f20e3d102340322 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class odulist(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/link-template/te-link-attributes/unreserved-bandwidth/te-bandwidth/otn/odulist. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: OTN bandwidth definition + """ + __slots__ = ('_path_helper', '_extmethods', '__odu_type','__number','__ts_number',) + + _yang_name = 'odulist' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'link-template', 'te-link-attributes', 'unreserved-bandwidth', 'te-bandwidth', 'otn', 'odulist'] + + def _get_odu_type(self): + """ + Getter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + + YANG Description: ODU type + """ + return self.__odu_type + + def _set_odu_type(self, v, load=False): + """ + Setter method for odu_type, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/odu_type (identityref) + If this variable is read-only (config: false) in the + source YANG file, then _set_odu_type is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_odu_type() directly. + + YANG Description: ODU type + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """odu_type must be of a type compatible with identityref""", + 'defined-type': "ietf-otn-topology:identityref", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True)""", + }) + + self.__odu_type = t + if hasattr(self, '_set'): + self._set() + + def _unset_odu_type(self): + self.__odu_type = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU0': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU1': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU2e': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU3': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODU4': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'ietf-layer1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}, 'l1-types:ODUflex-resizable': {'@module': 'ietf-layer1-types', '@namespace': 'urn:ietf:params:xml:ns:yang:ietf-layer1-types'}},), is_leaf=True, yang_name="odu-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='identityref', is_config=True) + + + def _get_number(self): + """ + Getter method for number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/number (uint16) + + YANG Description: Number of ODUs + """ + return self.__number + + def _set_number(self, v, load=False): + """ + Setter method for number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_number() directly. + + YANG Description: Number of ODUs + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__number = t + if hasattr(self, '_set'): + self._set() + + def _unset_number(self): + self.__number = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + + def _get_ts_number(self): + """ + Getter method for ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + return self.__ts_number + + def _set_ts_number(self, v, load=False): + """ + Setter method for ts_number, mapped from YANG variable /networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/otn/odulist/ts_number (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_ts_number is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_ts_number() directly. + + YANG Description: The number of Tributary Slots (TS) that +could be used by all the ODUflex LSPs. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """ts_number must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True)""", + }) + + self.__ts_number = t + if hasattr(self, '_set'): + self._set() + + def _unset_ts_number(self): + self.__ts_number = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..4095']}), is_leaf=True, yang_name="ts-number", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-otn-topology', defining_module='ietf-otn-topology', yang_type='uint16', is_config=True) + + odu_type = __builtin__.property(_get_odu_type, _set_odu_type) + number = __builtin__.property(_get_number, _set_number) + ts_number = __builtin__.property(_get_ts_number, _set_ts_number) + + + _pyangbind_elements = OrderedDict([('odu_type', odu_type), ('number', number), ('ts_number', ts_number), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f7a053a348c85efac3411e2dd277608a439868ef --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/__init__.py @@ -0,0 +1,251 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import te_node_attributes +class node_template(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/node-template. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: The list of TE node templates used to define sharable +and reusable TE node attributes. + """ + __slots__ = ('_path_helper', '_extmethods', '__name','__priority','__reference_change_policy','__te_node_attributes',) + + _yang_name = 'node-template' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True) + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) + self.__reference_change_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + self.__te_node_attributes = YANGDynClass(base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'node-template'] + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/te/templates/node_template/name (te-types:te-template-name) + + YANG Description: The name to identify a TE node template. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/te/templates/node_template/name (te-types:te-template-name) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: The name to identify a TE node template. + """ + parent = getattr(self, "_parent", None) + if parent is not None and load is False: + raise AttributeError("Cannot set keys directly when" + + " within an instantiated list") + + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with te-types:te-template-name""", + 'defined-type': "te-types:te-template-name", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '/?([a-zA-Z0-9\\-_.]+)(/[a-zA-Z0-9\\-_.]+)*'}), is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-template-name', is_config=True) + + + def _get_priority(self): + """ + Getter method for priority, mapped from YANG variable /networks/te/templates/node_template/priority (uint16) + + YANG Description: The preference value for resolving conflicts between +different templates. When two or more templates specify +values for one configuration attribute, the value from the +template with the highest priority is used. +A lower number indicates a higher priority. The highest +priority is 0. + """ + return self.__priority + + def _set_priority(self, v, load=False): + """ + Setter method for priority, mapped from YANG variable /networks/te/templates/node_template/priority (uint16) + If this variable is read-only (config: false) in the + source YANG file, then _set_priority is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_priority() directly. + + YANG Description: The preference value for resolving conflicts between +different templates. When two or more templates specify +values for one configuration attribute, the value from the +template with the highest priority is used. +A lower number indicates a higher priority. The highest +priority is 0. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """priority must be of a type compatible with uint16""", + 'defined-type': "uint16", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True)""", + }) + + self.__priority = t + if hasattr(self, '_set'): + self._set() + + def _unset_priority(self): + self.__priority = YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint16', is_config=True) + + + def _get_reference_change_policy(self): + """ + Getter method for reference_change_policy, mapped from YANG variable /networks/te/templates/node_template/reference_change_policy (enumeration) + + YANG Description: This attribute specifies the action taken for a +configuration node that has a reference to this template. + """ + return self.__reference_change_policy + + def _set_reference_change_policy(self, v, load=False): + """ + Setter method for reference_change_policy, mapped from YANG variable /networks/te/templates/node_template/reference_change_policy (enumeration) + If this variable is read-only (config: false) in the + source YANG file, then _set_reference_change_policy is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_reference_change_policy() directly. + + YANG Description: This attribute specifies the action taken for a +configuration node that has a reference to this template. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """reference_change_policy must be of a type compatible with enumeration""", + 'defined-type': "ietf-te-topology:enumeration", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True)""", + }) + + self.__reference_change_policy = t + if hasattr(self, '_set'): + self._set() + + def _unset_reference_change_policy(self): + self.__reference_change_policy = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'no-action': {}, 'not-allowed': {}, 'cascade': {}},), is_leaf=True, yang_name="reference-change-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='enumeration', is_config=True) + + + def _get_te_node_attributes(self): + """ + Getter method for te_node_attributes, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes (container) + + YANG Description: Contains node attributes in a TE topology. + """ + return self.__te_node_attributes + + def _set_te_node_attributes(self, v, load=False): + """ + Setter method for te_node_attributes, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_te_node_attributes is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_te_node_attributes() directly. + + YANG Description: Contains node attributes in a TE topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """te_node_attributes must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__te_node_attributes = t + if hasattr(self, '_set'): + self._set() + + def _unset_te_node_attributes(self): + self.__te_node_attributes = YANGDynClass(base=te_node_attributes.te_node_attributes, is_container='container', yang_name="te-node-attributes", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + name = __builtin__.property(_get_name, _set_name) + priority = __builtin__.property(_get_priority, _set_priority) + reference_change_policy = __builtin__.property(_get_reference_change_policy, _set_reference_change_policy) + te_node_attributes = __builtin__.property(_get_te_node_attributes, _set_te_node_attributes) + + + _pyangbind_elements = OrderedDict([('name', name), ('priority', priority), ('reference_change_policy', reference_change_policy), ('te_node_attributes', te_node_attributes), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..32a98a2da6054d90d8f7eaff7bb3571af18d93a9 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py @@ -0,0 +1,317 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +from . import underlay_topology +class te_node_attributes(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/node-template/te-node-attributes. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: Contains node attributes in a TE topology. + """ + __slots__ = ('_path_helper', '_extmethods', '__admin_status','__domain_id','__is_abstract','__name','__signaling_address','__underlay_topology',) + + _yang_name = 'te-node-attributes' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + self.__domain_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + self.__signaling_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True) + self.__underlay_topology = YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'node-template', 'te-node-attributes'] + + def _get_admin_status(self): + """ + Getter method for admin_status, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/admin_status (te-types:te-admin-status) + + YANG Description: The administrative state of the link. + """ + return self.__admin_status + + def _set_admin_status(self, v, load=False): + """ + Setter method for admin_status, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/admin_status (te-types:te-admin-status) + If this variable is read-only (config: false) in the + source YANG file, then _set_admin_status is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_admin_status() directly. + + YANG Description: The administrative state of the link. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """admin_status must be of a type compatible with te-types:te-admin-status""", + 'defined-type': "te-types:te-admin-status", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True)""", + }) + + self.__admin_status = t + if hasattr(self, '_set'): + self._set() + + def _unset_admin_status(self): + self.__admin_status = YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'up': {}, 'down': {}, 'testing': {}, 'preparing-maintenance': {}, 'maintenance': {}, 'unknown': {}},), is_leaf=True, yang_name="admin-status", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='te-types:te-admin-status', is_config=True) + + + def _get_domain_id(self): + """ + Getter method for domain_id, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/domain_id (uint32) + + YANG Description: Identifies the domain to which this node belongs. +This attribute is used to support inter-domain links. + """ + return self.__domain_id + + def _set_domain_id(self, v, load=False): + """ + Setter method for domain_id, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/domain_id (uint32) + If this variable is read-only (config: false) in the + source YANG file, then _set_domain_id is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_domain_id() directly. + + YANG Description: Identifies the domain to which this node belongs. +This attribute is used to support inter-domain links. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """domain_id must be of a type compatible with uint32""", + 'defined-type': "uint32", + 'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True)""", + }) + + self.__domain_id = t + if hasattr(self, '_set'): + self._set() + + def _unset_domain_id(self): + self.__domain_id = YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="domain-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='uint32', is_config=True) + + + def _get_is_abstract(self): + """ + Getter method for is_abstract, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/is_abstract (empty) + + YANG Description: Present if the node is abstract; not present if the node +is actual. + """ + return self.__is_abstract + + def _set_is_abstract(self, v, load=False): + """ + Setter method for is_abstract, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/is_abstract (empty) + If this variable is read-only (config: false) in the + source YANG file, then _set_is_abstract is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_is_abstract() directly. + + YANG Description: Present if the node is abstract; not present if the node +is actual. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """is_abstract must be of a type compatible with empty""", + 'defined-type': "empty", + 'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True)""", + }) + + self.__is_abstract = t + if hasattr(self, '_set'): + self._set() + + def _unset_is_abstract(self): + self.__is_abstract = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="is-abstract", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='empty', is_config=True) + + + def _get_name(self): + """ + Getter method for name, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/name (string) + + YANG Description: Node name. + """ + return self.__name + + def _set_name(self, v, load=False): + """ + Setter method for name, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/name (string) + If this variable is read-only (config: false) in the + source YANG file, then _set_name is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_name() directly. + + YANG Description: Node name. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """name must be of a type compatible with string""", + 'defined-type': "string", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True)""", + }) + + self.__name = t + if hasattr(self, '_set'): + self._set() + + def _unset_name(self): + self.__name = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='string', is_config=True) + + + def _get_signaling_address(self): + """ + Getter method for signaling_address, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/signaling_address (inet:ip-address) + + YANG Description: The node's signaling address. + """ + return self.__signaling_address + + def _set_signaling_address(self, v, load=False): + """ + Setter method for signaling_address, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/signaling_address (inet:ip-address) + If this variable is read-only (config: false) in the + source YANG file, then _set_signaling_address is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_signaling_address() directly. + + YANG Description: The node's signaling address. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """signaling_address must be of a type compatible with inet:ip-address""", + 'defined-type': "inet:ip-address", + 'generated-type': """YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True)""", + }) + + self.__signaling_address = t + if hasattr(self, '_set'): + self._set() + + def _unset_signaling_address(self): + self.__signaling_address = YANGDynClass(unique=True, base=TypedListType(allowed_type=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),]), is_leaf=False, yang_name="signaling-address", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='inet:ip-address', is_config=True) + + + def _get_underlay_topology(self): + """ + Getter method for underlay_topology, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/underlay_topology (container) + + YANG Description: When an abstract node encapsulates a topology, the +attributes in this container point to said topology. + """ + return self.__underlay_topology + + def _set_underlay_topology(self, v, load=False): + """ + Setter method for underlay_topology, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/underlay_topology (container) + If this variable is read-only (config: false) in the + source YANG file, then _set_underlay_topology is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_underlay_topology() directly. + + YANG Description: When an abstract node encapsulates a topology, the +attributes in this container point to said topology. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """underlay_topology must be of a type compatible with container""", + 'defined-type': "container", + 'generated-type': """YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True)""", + }) + + self.__underlay_topology = t + if hasattr(self, '_set'): + self._set() + + def _unset_underlay_topology(self): + self.__underlay_topology = YANGDynClass(base=underlay_topology.underlay_topology, is_container='container', yang_name="underlay-topology", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='container', is_config=True) + + admin_status = __builtin__.property(_get_admin_status, _set_admin_status) + domain_id = __builtin__.property(_get_domain_id, _set_domain_id) + is_abstract = __builtin__.property(_get_is_abstract, _set_is_abstract) + name = __builtin__.property(_get_name, _set_name) + signaling_address = __builtin__.property(_get_signaling_address, _set_signaling_address) + underlay_topology = __builtin__.property(_get_underlay_topology, _set_underlay_topology) + + + _pyangbind_elements = OrderedDict([('admin_status', admin_status), ('domain_id', domain_id), ('is_abstract', is_abstract), ('name', name), ('signaling_address', signaling_address), ('underlay_topology', underlay_topology), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9480263d4de5279198cbd72bc71789529f67ef92 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +from operator import attrgetter +from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType +from pyangbind.lib.yangtypes import RestrictedClassType +from pyangbind.lib.yangtypes import TypedListType +from pyangbind.lib.yangtypes import YANGBool +from pyangbind.lib.yangtypes import YANGListType +from pyangbind.lib.yangtypes import YANGDynClass +from pyangbind.lib.yangtypes import ReferenceType +from pyangbind.lib.yangtypes import YANGBinary +from pyangbind.lib.yangtypes import YANGBitsType +from pyangbind.lib.base import PybindBase +from collections import OrderedDict +from decimal import Decimal +import six + +# PY3 support of some PY2 keywords (needs improved) +if six.PY3: + import builtins as __builtin__ + long = int +elif six.PY2: + import __builtin__ + +class underlay_topology(PybindBase): + """ + This class was auto-generated by the PythonClass plugin for PYANG + from YANG module ietf-network - based on the path /networks/te/templates/node-template/te-node-attributes/underlay-topology. Each member element of + the container is represented as a class variable - with a specific + YANG type. + + YANG Description: When an abstract node encapsulates a topology, the +attributes in this container point to said topology. + """ + __slots__ = ('_path_helper', '_extmethods', '__network_ref',) + + _yang_name = 'underlay-topology' + _yang_namespace = 'urn:ietf:params:xml:ns:yang:ietf-network' + + _pybind_generated_by = 'container' + + def __init__(self, *args, **kwargs): + + self._path_helper = False + + self._extmethods = False + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + load = kwargs.pop("load", None) + if args: + if len(args) > 1: + raise TypeError("cannot create a YANG container with >1 argument") + all_attr = True + for e in self._pyangbind_elements: + if not hasattr(args[0], e): + all_attr = False + break + if not all_attr: + raise ValueError("Supplied object did not have the correct attributes") + for e in self._pyangbind_elements: + nobj = getattr(args[0], e) + if nobj._changed() is False: + continue + setmethod = getattr(self, "_set_%s" % e) + if load is None: + setmethod(getattr(args[0], e)) + else: + setmethod(getattr(args[0], e), load=load) + + def _path(self): + if hasattr(self, "_parent"): + return self._parent._path()+[self._yang_name] + else: + return ['networks', 'te', 'templates', 'node-template', 'te-node-attributes', 'underlay-topology'] + + def _get_network_ref(self): + """ + Getter method for network_ref, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/underlay_topology/network_ref (leafref) + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + return self.__network_ref + + def _set_network_ref(self, v, load=False): + """ + Setter method for network_ref, mapped from YANG variable /networks/te/templates/node_template/te_node_attributes/underlay_topology/network_ref (leafref) + If this variable is read-only (config: false) in the + source YANG file, then _set_network_ref is considered as a private + method. Backends looking to populate this variable should + do so via calling thisObj._set_network_ref() directly. + + YANG Description: Used to reference a network -- for example, an underlay +network. + """ + if hasattr(v, "_utype"): + v = v._utype(v) + try: + t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + except (TypeError, ValueError): + raise ValueError({ + 'error-string': """network_ref must be of a type compatible with leafref""", + 'defined-type': "leafref", + 'generated-type': """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True)""", + }) + + self.__network_ref = t + if hasattr(self, '_set'): + self._set() + + def _unset_network_ref(self): + self.__network_ref = YANGDynClass(base=six.text_type, is_leaf=True, yang_name="network-ref", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:ietf:params:xml:ns:yang:ietf-te-topology', defining_module='ietf-te-topology', yang_type='leafref', is_config=True) + + network_ref = __builtin__.property(_get_network_ref, _set_network_ref) + + + _pyangbind_elements = OrderedDict([('network_ref', network_ref), ]) + + diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/build-yang-bindings.sh b/src/nbi/service/rest_server/nbi_plugins/ietf_network/build-yang-bindings.sh new file mode 100755 index 0000000000000000000000000000000000000000..8e5b182e73e4fe933a869a45918a1277b2cc3143 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/build-yang-bindings.sh @@ -0,0 +1,40 @@ +#!/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. + +BASE_PATH=~/tfs-ctrl/src/nbi/service/rest_server/nbi_plugins/ietf_network +IETF_MODELS_PATH=${BASE_PATH}/yang + +cd ${BASE_PATH} +export PYBINDPLUGIN=`/usr/bin/env python -c 'import pyangbind; import os; print ("{}/plugin".format(os.path.dirname(pyangbind.__file__)))'` + +rm -rf bindings + +# -p ${OC_HERCULES_MODELS_PATH}/ +# --split-class-dir openconfig_hercules +# --presence +pyang --plugindir $PYBINDPLUGIN -p ${IETF_MODELS_PATH}/ -f pybind --split-class-dir bindings \ + ${IETF_MODELS_PATH}/ietf-network-topology@2018-02-26.yang \ + ${IETF_MODELS_PATH}/ietf-network@2018-02-26.yang \ + ${IETF_MODELS_PATH}/ietf-te-topology@2020-08-06.yang \ + ${IETF_MODELS_PATH}/ietf-otn-topology@2023-07-06.yang \ + ${IETF_MODELS_PATH}/ietf-eth-te-topology@2023-09-28.yang + +# ${IETF_MODELS_PATH}/iana-routing-types@2017-12-04.yang \ +# ${IETF_MODELS_PATH}/ietf-inet-types@2013-07-15.yang \ +# ${IETF_MODELS_PATH}/ietf-layer1-types@2022-10-14.yang \ +# ${IETF_MODELS_PATH}/ietf-routing-types@2017-12-04.yang \ +# ${IETF_MODELS_PATH}/ietf-te-packet-types@2020-06-10.yang \ +# ${IETF_MODELS_PATH}/ietf-te-types@2020-06-10.yang \ +# ${IETF_MODELS_PATH}/ietf-yang-types@2013-07-15.yang \ diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/iana-routing-types@2017-12-04.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/iana-routing-types@2017-12-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..250cba4b695e269116e181b46226bae7dab7604d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/iana-routing-types@2017-12-04.yang @@ -0,0 +1,473 @@ + module iana-routing-types { + namespace "urn:ietf:params:xml:ns:yang:iana-routing-types"; + prefix iana-rt-types; + + organization + "IANA"; + contact + "Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States of America + Tel: +1 310 301 5800 + "; + + description + "This module contains a collection of YANG data types + considered defined by IANA and used for routing + protocols. + + Copyright (c) 2017 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 8294; see + the RFC itself for full legal notices."; + + revision 2017-12-04 { + description "Initial revision."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area. + Section 4."; + } + + /*** Collection of IANA types related to routing ***/ + /*** IANA Address Family enumeration ***/ + + typedef address-family { + type enumeration { + enum ipv4 { + value 1; + description + "IPv4 Address Family."; + } + + enum ipv6 { + value 2; + description + "IPv6 Address Family."; + } + + enum nsap { + value 3; + description + "OSI Network Service Access Point (NSAP) Address Family."; + } + + enum hdlc { + value 4; + description + "High-Level Data Link Control (HDLC) Address Family."; + } + + enum bbn1822 { + value 5; + description + "Bolt, Beranek, and Newman Report 1822 (BBN 1822) + Address Family."; + } + + enum ieee802 { + value 6; + description + "IEEE 802 Committee Address Family + (aka Media Access Control (MAC) address)."; + } + + enum e163 { + value 7; + description + "ITU-T E.163 Address Family."; + } + + enum e164 { + value 8; + description + "ITU-T E.164 (Switched Multimegabit Data Service (SMDS), + Frame Relay, ATM) Address Family."; + } + + enum f69 { + value 9; + description + "ITU-T F.69 (Telex) Address Family."; + } + + enum x121 { + value 10; + description + "ITU-T X.121 (X.25, Frame Relay) Address Family."; + } + + enum ipx { + value 11; + description + "Novell Internetwork Packet Exchange (IPX) + Address Family."; + } + + enum appletalk { + value 12; + description + "Apple AppleTalk Address Family."; + } + + enum decnet-iv { + value 13; + description + "Digital Equipment DECnet Phase IV Address Family."; + } + + enum vines { + value 14; + description + "Banyan Vines Address Family."; + } + + enum e164-nsap { + value 15; + description + "ITU-T E.164 with NSAP sub-address Address Family."; + } + + enum dns { + value 16; + description + "Domain Name System (DNS) Address Family."; + } + + enum distinguished-name { + value 17; + description + "Distinguished Name Address Family."; + } + + enum as-num { + value 18; + description + "Autonomous System (AS) Number Address Family."; + } + + enum xtp-v4 { + value 19; + description + "Xpress Transport Protocol (XTP) over IPv4 + Address Family."; + } + + enum xtp-v6 { + value 20; + description + "XTP over IPv6 Address Family."; + } + + enum xtp-native { + value 21; + description + "XTP native mode Address Family."; + } + + enum fc-port { + value 22; + description + "Fibre Channel (FC) World-Wide Port Name Address Family."; + } + + enum fc-node { + value 23; + description + "FC World-Wide Node Name Address Family."; + } + + enum gwid { + value 24; + description + "ATM Gateway Identifier (GWID) Number Address Family."; + } + + enum l2vpn { + value 25; + description + "Layer 2 VPN (L2VPN) Address Family."; + } + + enum mpls-tp-section-eid { + value 26; + description + "MPLS Transport Profile (MPLS-TP) Section Endpoint + Identifier Address Family."; + } + + enum mpls-tp-lsp-eid { + value 27; + description + "MPLS-TP Label Switched Path (LSP) Endpoint Identifier + Address Family."; + } + + enum mpls-tp-pwe-eid { + value 28; + description + "MPLS-TP Pseudowire Endpoint Identifier Address Family."; + } + + enum mt-v4 { + value 29; + description + "Multi-Topology IPv4 Address Family."; + } + + enum mt-v6 { + value 30; + description + "Multi-Topology IPv6 Address Family."; + } + + enum eigrp-common-sf { + value 16384; + description + "Enhanced Interior Gateway Routing Protocol (EIGRP) + Common Service Family Address Family."; + } + + enum eigrp-v4-sf { + value 16385; + description + "EIGRP IPv4 Service Family Address Family."; + } + + enum eigrp-v6-sf { + value 16386; + description + "EIGRP IPv6 Service Family Address Family."; + } + + enum lcaf { + value 16387; + description + "Locator/ID Separation Protocol (LISP) + Canonical Address Format (LCAF) Address Family."; + } + + enum bgp-ls { + value 16388; + description + "Border Gateway Protocol - Link State (BGP-LS) + Address Family."; + } + + enum mac-48 { + value 16389; + description + "IEEE 48-bit MAC Address Family."; + } + + enum mac-64 { + value 16390; + description + "IEEE 64-bit MAC Address Family."; + } + + enum trill-oui { + value 16391; + description + "Transparent Interconnection of Lots of Links (TRILL) + IEEE Organizationally Unique Identifier (OUI) + Address Family."; + } + + enum trill-mac-24 { + value 16392; + description + "TRILL final 3 octets of 48-bit MAC Address Family."; + } + + enum trill-mac-40 { + value 16393; + description + "TRILL final 5 octets of 64-bit MAC Address Family."; + } + + enum ipv6-64 { + value 16394; + description + "First 8 octets (64 bits) of IPv6 address + Address Family."; + } + + enum trill-rbridge-port-id { + value 16395; + description + "TRILL Routing Bridge (RBridge) Port ID Address Family."; + } + + enum trill-nickname { + value 16396; + description + "TRILL Nickname Address Family."; + } + } + + description + "Enumeration containing all the IANA-defined + Address Families."; + + } + + /*** Subsequent Address Family Identifiers (SAFIs) ***/ + /*** for multiprotocol BGP enumeration ***/ + + typedef bgp-safi { + type enumeration { + enum unicast-safi { + value 1; + description + "Unicast SAFI."; + } + + enum multicast-safi { + value 2; + description + "Multicast SAFI."; + } + + enum labeled-unicast-safi { + value 4; + description + "Labeled Unicast SAFI."; + } + + enum multicast-vpn-safi { + value 5; + description + "Multicast VPN SAFI."; + } + + enum pseudowire-safi { + value 6; + description + "Multi-segment Pseudowire VPN SAFI."; + } + + enum tunnel-encap-safi { + value 7; + description + "Tunnel Encap SAFI."; + } + + enum mcast-vpls-safi { + value 8; + description + "Multicast Virtual Private LAN Service (VPLS) SAFI."; + } + + enum tunnel-safi { + value 64; + description + "Tunnel SAFI."; + } + + enum vpls-safi { + value 65; + description + "VPLS SAFI."; + } + + enum mdt-safi { + value 66; + description + "Multicast Distribution Tree (MDT) SAFI."; + } + + enum v4-over-v6-safi { + value 67; + description + "IPv4 over IPv6 SAFI."; + } + + enum v6-over-v4-safi { + value 68; + description + "IPv6 over IPv4 SAFI."; + } + + enum l1-vpn-auto-discovery-safi { + value 69; + description + "Layer 1 VPN Auto-Discovery SAFI."; + } + + enum evpn-safi { + value 70; + description + "Ethernet VPN (EVPN) SAFI."; + } + + enum bgp-ls-safi { + value 71; + description + "BGP-LS SAFI."; + } + + enum bgp-ls-vpn-safi { + value 72; + description + "BGP-LS VPN SAFI."; + } + + enum sr-te-safi { + value 73; + description + "Segment Routing - Traffic Engineering (SR-TE) SAFI."; + } + + enum labeled-vpn-safi { + value 128; + description + "MPLS Labeled VPN SAFI."; + } + + enum multicast-mpls-vpn-safi { + value 129; + description + "Multicast for BGP/MPLS IP VPN SAFI."; + } + + enum route-target-safi { + value 132; + description + "Route Target SAFI."; + } + + enum ipv4-flow-spec-safi { + value 133; + description + "IPv4 Flow Specification SAFI."; + } + + enum vpnv4-flow-spec-safi { + value 134; + description + "IPv4 VPN Flow Specification SAFI."; + } + + enum vpn-auto-discovery-safi { + value 140; + description + "VPN Auto-Discovery SAFI."; + } + } + description + "Enumeration for BGP SAFI."; + reference + "RFC 4760: Multiprotocol Extensions for BGP-4."; + } + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-te-topology@2023-09-28.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-te-topology@2023-09-28.yang new file mode 100644 index 0000000000000000000000000000000000000000..b182f7f5a323d1a50c1ab53715b96e02758ea327 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-te-topology@2023-09-28.yang @@ -0,0 +1,2275 @@ + module ietf-eth-te-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-eth-te-topology"; + prefix "etht"; + + import ietf-network { + prefix "nw"; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + import ietf-network-topology { + prefix "nt"; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + import ietf-te-topology { + prefix "tet"; + reference + "RFC 8795: YANG Data Model for Traffic Engineering + (TE) Topologies"; + } + + import ietf-yang-types { + prefix "yang"; + reference + "RFC 6991: Common YANG Data Types"; + } + + import ietf-eth-tran-types { + prefix "etht-types"; + reference + "RFC YYYY: A YANG Data Model for Transport Network Client + Signals"; + } + // RFC Ed.: replace YYYY with actual RFC number, update date + // information and remove this note + + organization + "IETF CCAMP Working Group"; + contact + "WG Web: + WG List: + + Editor: Haomian Zheng + + + Editor: Italo Busi + + + Editor: Aihua Guo + + + Editor: Yunbin Xu + + + Editor: Yang Zhao + + + Editor: Xufeng Liu + "; + + description + "This module defines a YANG data model for describing + layer-2 Ethernet transport topologies. The model fully + conforms to the Network Management Datastore + Architecture (NMDA). + + Copyright (c) 2023 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 Revised 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 XXXX; see + the RFC itself for full legal notices. + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + 'MAY', and 'OPTIONAL' in this document are to be interpreted as + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, + they appear in all capitals, as shown here."; + + revision 2023-09-28 { + description + "Initial Revision"; + reference + "RFC XXXX: A YANG Data Model for Ethernet TE Topology"; + // RFC Ed.: replace XXXX with actual RFC number, update date + // information and remove this note + } + + /* + * Groupings + */ + + grouping label-range-info { + description + "Ethernet technology-specific label range related + information with a presence container indicating that the + label range is an Ethernet technology-specific label range. + + This grouping SHOULD be used together with the + eth-label and eth-label-step groupings to provide Ethernet + technology-specific label information to the models which + use the label-restriction-info grouping defined in the module + ietf-te-types."; + + container ethernet-label-range { + presence + "Indicates the label range is an Ethernet label range. + + This container must not be present if there are other + presence containers or attributes indicating another type + of label range."; + description + "Ethernet-specific label range related information."; + + uses etht-types:eth-label-restriction; + } + } + + grouping eth-tran-topology-type { + description + "Identifies the Ethernet Transport topology type"; + + container eth-tran-topology { + presence "indicates a topology type of + Ethernet Transport Network."; + description "Eth transport topology type"; + } + } + + grouping ltp-bandwidth-profiles { + description + "A grouping which represents the bandwidth profile(s) + for the ETH LTP."; + + choice direction { + description + "Whether the bandwidth profiles are symmetrical or + asymmetrical"; + case symmetrical { + description + "The same bandwidth profile is used to describe the ingress + and the egress bandwidth profile."; + + container ingress-egress-bandwidth-profile { + description + "The bandwith profile used in the ingress and egress + direction."; + uses etht-types:etht-bandwidth-profiles; + } + } + case asymmetrical { + description + "Different ingress and egress bandwidth profiles + can be specified."; + container ingress-bandwidth-profile { + description + "The bandwidth profile used in the ingress direction."; + uses etht-types:etht-bandwidth-profiles; + } + container egress-bandwidth-profile { + description + "The bandwidth profile used in the egress direction."; + uses etht-types:etht-bandwidth-profiles; + } + } + } + } + grouping eth-ltp-attributes { + description + "Ethernet transport Link Termination Point (LTP) attributes"; + + leaf ltp-mac-address { + type yang:mac-address; + description + "The MAC address of the Ethernet LTP."; + } + leaf port-vlan-id { + type etht-types:vlanid; + description + "The Port VLAN ID of the Ethernet LTP."; + reference + "IEEE 802.1Q: Virtual Bridged Local Area Networks"; + } + leaf maximum-frame-size { + type uint16 { + range "64 .. 65535"; + } + description + "Maximum frame size"; + reference + "IEEE 802.1Q: Virtual Bridged Local Area Networks"; + } + uses ltp-bandwidth-profiles; + } + + grouping svc-vlan-classification { + description + "Grouping defining the capabilities for VLAN classification."; + + leaf-list supported-tag-types { + type etht-types:eth-tag-classify; + description + "List of VLAN tag types that can be used for the VLAN + classification. In case VLAN classification is not + supported, the list is empty."; + } + leaf vlan-bundling { + type boolean; + description + "In case VLAN classification is supported, indicates whether + VLAN bundling classification is also supported."; + reference + "MEF 10.3: Ethernet Services Attributes Phase 3"; + } + leaf vlan-range { + type etht-types:vid-range-type; + description + "In case VLAN classification is supported, indicates the + of available VLAN ID values."; + } + } + + grouping svc-vlan-push { + description + "Grouping defining the capabilities for VLAN push or swap + operations."; + + leaf-list supported-tag-types { + type etht-types:eth-tag-type; + description + "List of VLAN tag types that can be used to push or swap a + VLAN tag. In case VLAN push/swap is not supported, the list + is empty."; + reference + "IEEE 802.1Q: Virtual Bridged Local Area Networks"; + } + leaf vlan-range { + type etht-types:vid-range-type; + description + "In case VLAN push/swap operation is supported, the range + of available VLAN ID values."; + } + } + + grouping eth-svc-attributes { + description + "Ethernet Link Termination Point (LTP) service attributes."; + + container supported-classification { + description + "Service classification capability supported by the + Ethernet Link Termination Point (LTP)."; + + leaf port-classification { + type boolean; + description + "Indicates that the ETH LTP support port-based service + classification."; + } + container vlan-classification { + description + "Service classification capabilities based on the VLAN + tag(s) supported by the ETH LTP."; + leaf vlan-tag-classification { + type boolean; + description + "Indicates that the ETH LTP supports VLAN service + classification."; + } + container outer-tag { + description + "Service classification capabilities based on the outer + VLAN tag, supported by the ETH LTP."; + uses svc-vlan-classification; + } + container second-tag { + description + "Service classification capabilities based on the second + VLAN tag, supported by the ETH LTP."; + leaf second-tag-classification { + type boolean; + must ". = 'false' or " + + "../../vlan-tag-classification = 'true'" { + description + "VLAN service classification based on the second + VLAN tag can be supported only when VLAN service + classification"; + } + description + "Indicates that the ETH LTP support VLAN service + classification based on the second VLAN tag."; + } + uses svc-vlan-classification; + } + } + } + + container supported-vlan-operations { + description + "Reports the VLAN operations supported by the ETH LTP."; + + leaf asymmetrical-operations { + type boolean; + description + "Indicates whether the ETH LTP supports also asymmetrical + VLAN operations.It is assumed that symmetrical VLAN + operations are alwyas supported."; + } + leaf transparent-vlan-operations { + type boolean; + description + "Indicates that the ETH LTP supports transparent + operations."; + } + container vlan-pop { + description + "Indicates VLAN pop or swap operations capabilities."; + + leaf vlan-pop-operations { + type boolean; + description + "Indicates that the ETH LTP supports VLAN pop or + swap operations."; + } + leaf max-pop-tags { + type uint8 { + range "1..2"; + } + description + "Indicates the maximum number of tags that can be + popped/swapped."; + } + } + container vlan-push { + description + "Indicates VLAN push or swap operations capabilities."; + + leaf vlan-push-operation { + type boolean; + description + "Indicates that the ETH LTP supports VLAN push or + swap operations."; + } + container outer-tag { + description + "Indicates the supported VLAN operation capabilities + on the outer VLAN tag."; + uses svc-vlan-push; + } + container second-tag { + description + "Indicates the supported VLAN operation capabilities + on the second VLAN tag."; + leaf push-second-tag { + type boolean; + description + "Indicates that the ETH LTP supports VLAN push or swap + operations for the second VLAN tag."; + } + uses svc-vlan-push; + } + } + } + } + + /* + * Data nodes + */ + + augment "/nw:networks/nw:network/nw:network-types/" + + "tet:te-topology" { + description + "Augment network types to include ETH transport newtork"; + + uses eth-tran-topology-type; + } + + augment "/nw:networks/nw:network/nw:node/tet:te" + + "/tet:te-node-attributes" { + when "../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description "Augment only for Ethernet transport network."; + } + description "Augment TE node attributes."; + container eth-node { + presence "The TE node is an Ethernet node."; + description + "Presence container used only to indicate that the TE node + is an Ethernet node."; + } + } + + augment "/nw:networks/nw:network/nt:link" { + when "../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description "Augment only for Ethernet transport network."; + } + description "Augment link configuration"; + + container eth-svc { + presence + "When present, indicates that the Link supports Ethernet + client signals."; + description + "Presence container used only to indicate that the link + supports Ethernet client signals."; + } + } + + augment "/nw:networks/nw:network/nw:node/nt:termination-point" { + when "../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description "Augment only for Ethernet transport network."; + } + description + "Augment ETH LTP attributes"; + + container eth-svc { + presence + "When present, indicates that the Link Termination Point + (LTP) supports Ethernet client signals."; + description + "ETH LTP Service attributes."; + + uses eth-svc-attributes; + } + container eth-link-tp { + description + "Attributes of the Ethernet Link Termination Point (LTP)."; + uses eth-ltp-attributes; + } + } + + /* + * Augment TE bandwidth + */ + + augment "/nw:networks/nw:network/nw:node/nt:termination-point/" + + "tet:te/" + + "tet:interface-switching-capability/tet:max-lsp-bandwidth/" + + "tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment maximum LSP TE bandwidth for the link termination + point (LTP)."; + case eth { + uses etht-types:eth-bandwidth; + } + } + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:path-constraints/tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE bandwidth path constraints of the TE node + connectivity matrices."; + case eth { + uses etht-types:eth-bandwidth; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:path-constraints/tet:te-bandwidth/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE bandwidth path constraints of the + connectivity matrix entry."; + case eth { + uses etht-types:eth-bandwidth; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:path-constraints/tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE bandwidth path constraints of the TE node + connectivity matrices information source."; + case eth { + uses etht-types:eth-bandwidth; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:path-constraints/tet:te-bandwidth/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE bandwidth path constraints of the + connectivity matrix entry information source"; + case eth { + uses etht-types:eth-bandwidth; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:client-layer-adaptation/tet:switching-capability/" + + "tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment client TE bandwidth of the tunnel termination point + (TTP)"; + case eth { + uses etht-types:eth-bandwidth; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/tet:path-constraints/" + + "tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE bandwidth path constraints for the TTP + Local Link Connectivities."; + case eth { + uses etht-types:eth-bandwidth; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/tet:path-constraints/" + + "tet:te-bandwidth/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE bandwidth path constraints for the TTP + Local Link Connectivity entry."; + case eth { + uses etht-types:eth-bandwidth; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:interface-switching-capability/tet:max-lsp-bandwidth/" + + "tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment maximum LSP TE bandwidth for the TE link."; + case eth { + uses etht-types:eth-bandwidth; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:max-link-bandwidth/" + + "tet:te-bandwidth" { + when "../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment maximum TE bandwidth for the TE link"; + uses etht-types:eth-bandwidth; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:max-resv-link-bandwidth/" + + "tet:te-bandwidth" { + when "../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment maximum reservable TE bandwidth for the TE link"; + uses etht-types:eth-bandwidth; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:unreserved-bandwidth/" + + "tet:te-bandwidth" { + when "../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment unreserved TE bandwidth for the TE Link"; + uses etht-types:eth-bandwidth; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:interface-switching-capability/" + + "tet:max-lsp-bandwidth/" + + "tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment maximum LSP TE bandwidth for the TE link + information source"; + case eth { + uses etht-types:eth-bandwidth; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:max-link-bandwidth/" + + "tet:te-bandwidth" { + when "../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment maximum TE bandwidth for the TE link + information source"; + uses etht-types:eth-bandwidth; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:max-resv-link-bandwidth/" + + "tet:te-bandwidth" { + when "../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment maximum reservable TE bandwidth for the TE link + information-source"; + uses etht-types:eth-bandwidth; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:unreserved-bandwidth/" + + "tet:te-bandwidth" { + when "../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment unreserved TE bandwidth of the TE link + information source"; + uses etht-types:eth-bandwidth; + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:interface-switching-capability/" + + "tet:max-lsp-bandwidth/" + + "tet:te-bandwidth/tet:technology" { + description + "Augment maximum LSP TE bandwidth of the TE link + template"; + case eth { + uses etht-types:eth-bandwidth; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:max-link-bandwidth/" + + "tet:te-bandwidth" { + description + "Augment maximum TE bandwidth the TE link template"; + uses etht-types:eth-bandwidth; + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:max-resv-link-bandwidth/" + + "tet:te-bandwidth" { + description + "Augment maximum reservable TE bandwidth for the TE link + template."; + uses etht-types:eth-bandwidth; + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:unreserved-bandwidth/" + + "tet:te-bandwidth" { + description + "Augment unreserved TE bandwidth the TE link template"; + uses etht-types:eth-bandwidth; + } + + /* + * Augment TE label range information + */ + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range information for the TE node + connectivity matrices."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range information for the source LTP + of the connectivity matrix entry."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range information for the destination LTP + of the connectivity matrix entry."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range information for the TE node + connectivity matrices information source."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/tet:label-restriction" { + when "../../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range information for the source LTP + of the connectivity matrix entry information source."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction" { + when "../../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range information for the destination LTP + of the connectivity matrix entry information source."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range information for the TTP + Local Link Connectivities."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range information for the TTP + Local Link Connectivity entry."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range information for the TE link."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range information for the TE link + information source."; + uses label-range-info; + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction" { + description + "Augment TE label range information for the TE link template."; + uses label-range-info; + } + + /* + * Augment TE label. + */ + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range start for the TE node + connectivity matrices"; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/" + + "tet:label-restriction/tet:label-end/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range end for the TE node + connectivity matrices"; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/" + + "tet:label-restriction/tet:label-step/" + + "tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range step for the TE node + connectivity matrices"; + case eth { + uses etht-types:eth-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:underlay/tet:primary-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay primary path of the + TE node connectivity matrices"; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:underlay/tet:backup-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay backup path of the + TE node connectivity matrices"; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TE node connectivity + matrices"; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TE node connectivity + matrices"; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TE node connectivity matrices"; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range start for the source LTP + of the connectivity matrix entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range end for the source LTP + of the connectivity matrix entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/" + + "tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range step for the source LTP + of the connectivity matrix entry."; + case eth { + uses etht-types:eth-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range start for the destination LTP + of the connectivity matrix entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range end for the destination LTP + of the connectivity matrix entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/" + + "tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range step for the destination LTP + of the connectivity matrix entry."; + case eth { + uses etht-types:eth-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:primary-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the connectivity matrix entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:backup-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the connectivity matrix entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:optimizations/" + + "tet:algorithm/tet:metric/tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the connectivity matrix entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:optimizations/" + + "tet:algorithm/tet:metric/tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the connectivity matrix entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the connectivity matrix entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range start for the TE node connectivity + matrices information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range end for the TE node connectivity + matrices information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-step/tet:technology" { + when "../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range step for the TE node connectivity + matrices information source."; + case eth { + uses etht-types:eth-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TE node connectivity matrices of the information + source entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TE node connectivity matrices of the information + source entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TE node connectivity matrices + information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TE node connectivity matrices + information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TE node connectivity matrices information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range start for the source LTP + of the connectivity matrix entry information source."; + case eth { + uses etht-types:eth-label; + } + } + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range end for the source LTP + of the connectivity matrix entry information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-step/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range step for the source LTP + of the connectivity matrix entry information source."; + case eth { + uses etht-types:eth-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range start for the destination LTP + of the connectivity matrix entry information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range end for the destination LTP + of the connectivity matrix entry information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range step for the destination LTP + of the connectivity matrix entry information source."; + case eth { + uses etht-types:eth-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the connectivity matrix entry information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the connectivity matrix entry information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the connectivity matrix entry + information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the connectivity matrix entry + information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the connectivity matrix entry information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range start for the TTP + Local Link Connectivities."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/" + + "tet:te-label/tet:technology"{ + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range end for the TTP + Local Link Connectivities."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/" + + "tet:technology"{ + when "../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range step for the TTP + Local Link Connectivities."; + case eth { + uses etht-types:eth-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TTP Local Link Connectivities."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TTP Local Link Connectivities."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TTP Local Link + Connectivities."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TTP Local Link + Connectivities."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TTP Local Link Connectivities."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range start for the TTP + Local Link Connectivity entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range end for the TTP + Local Link Connectivity entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range step for the TTP + Local Link Connectivity entry."; + case eth { + uses etht-types:eth-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TTP Local Link Connectivity entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TTP Local Link Connectivity entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TTP Local Link + Connectivity entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TTP Local Link + Connectivity entry."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TTP Local Link Connectivity entry."; + case eth { + uses etht-types:eth-label; + } + } + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TE link."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TE link."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range start for the TE link."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range end for the TE link."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range step for the TE link."; + case eth { + uses etht-types:eth-label-step; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range start for the TE link + information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range end for the TE link + information source."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "etht:eth-tran-topology" { + description + "Augmentation parameters apply only for networks with + Ethernet topology type."; + } + description + "Augment TE label range step for the TE link + information source."; + case eth { + uses etht-types:eth-label-step; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + description + "Augment TE label hop for the underlay primary path + of the TE link template."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + description + "Augment TE label hop for the underlay backup path + of the TE link template."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + description + "Augment TE label range start for the TE link template."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + description + "Augment TE label range end for the TE link template."; + case eth { + uses etht-types:eth-label; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + description + "Augment TE label range step for the TE link template."; + case eth { + uses etht-types:eth-label-step; + } + } + + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-tran-service@2023-10-23.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-tran-service@2023-10-23.yang new file mode 100644 index 0000000000000000000000000000000000000000..222066adf0e1ece5f964fbabb170edf92d57b21e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-tran-service@2023-10-23.yang @@ -0,0 +1,1004 @@ + module ietf-eth-tran-service { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-eth-tran-service"; + + prefix "ethtsvc"; + import ietf-yang-types { + prefix "yang"; + reference "RFC 6991 - Common YANG Data Types"; + } + + import ietf-network { + prefix "nw"; + reference "RFC8345 - A YANG Data Model for Network Topologies"; + } + + import ietf-network-topology { + prefix "nt"; + reference "RFC8345 - A YANG Data Model for Network Topologies"; + } + + import ietf-te-types { + prefix "te-types"; + reference "RFC 8776 - Traffic Engineering Common YANG Types"; + } + + import ietf-eth-tran-types { + prefix "etht-types"; + reference "RFC XXXX - A YANG Data Model for Transport + Network Client Signals"; + } + + import ietf-routing-types { + prefix "rt-types"; + reference "RFC 8294 - Common YANG Data Types for the + Routing Area"; + + } + + import ietf-te { + prefix "te"; + reference "RFC YYYY - A YANG Data Model for Traffic + Engineering Tunnels and Interfaces"; + } + + organization + "Internet Engineering Task Force (IETF) CCAMP WG"; + contact + " + WG List: + + ID-draft editor: + Haomian Zheng (zhenghaomian@huawei.com); + Italo Busi (italo.busi@huawei.com); + Aihua Guo (aihuaguo.ietf@gmail.com); + Anton Snitser (antons@sedonasys.com);0 + Francesco Lazzeri (francesco.lazzeri@ericsson.com); + Yunbin Xu (xuyunbin@caict.ac.cn); + Yang Zhao (zhaoyangyjy@chinamobile.com); + Xufeng Liu (xufeng.liu.ietf@gmail.com); + Giuseppe Fioccola (giuseppe.fioccola@huawei.com); + Chaode Yu (yuchaode@huawei.com) + "; + + description + "This module defines a YANG data model for describing + the Ethernet services. The model fully conforms to the + Network Management Datastore Architecture (NMDA). + + Copyright (c) 2021 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 XXXX; see + the RFC itself for full legal notices."; + + revision 2023-10-23 { + description + "version -04 as an WG document"; + reference + "draft-ietf-ccamp-client-signal-yang"; + } + + /* + * Groupings + */ + + grouping vlan-classification { + description + "A grouping which represents classification + on an 802.1Q VLAN tag."; + + leaf tag-type { + type etht-types:eth-tag-classify; + description + "The tag type used for VLAN classification."; + } + choice individual-bundling-vlan { + description + "VLAN based classification can be individual + or bundling."; + + case individual-vlan { + leaf vlan-value { + type etht-types:vlanid; + description + "VLAN ID value."; + } + } + + case vlan-bundling { + leaf vlan-range { + type etht-types:vid-range-type; + description + "List of VLAN ID values."; + } + } + } + } + + grouping vlan-write { + description + "A grouping which represents push/pop operations + of an 802.1Q VLAN tag."; + + leaf tag-type { + type etht-types:eth-tag-type; + description + "The VLAN tag type to push/swap."; + } + leaf vlan-value { + type etht-types:vlanid; + description + "The VLAN ID value to push/swap."; + } + /* + * To be added: this attribute is used when: + * a) the ETH service has only one CoS (as in current version) + * b) as a default when a mapping between a given CoS value + * and the PCP value is not defined (in future versions) + */ + leaf default-pcp { + type uint8 { + range "0..7"; + } + description + "The default Priority Code Point (PCP) value to push/swap"; + } + } + + grouping vlan-operations { + description + "A grouping which represents VLAN operations."; + + leaf pop-tags { + type uint8 { + range "1..2"; + } + description + "The number of VLAN tags to pop (or swap if used in + conjunction with push-tags)"; + } + container push-tags { + description + "The VLAN tags to push (or swap if used in + conjunction with pop-tags)"; + + container outer-tag { + presence + "Indicates existence of the outermost VLAN tag to + push/swap"; + + description + "The outermost VLAN tag to push/swap."; + + uses vlan-write; + } + container second-tag { + must + '../outer-tag/tag-type = "etht-types:s-vlan-tag-type" and ' + + 'tag-type = "etht-types:c-vlan-tag-type"' + { + + error-message + " + When pushing/swapping two tags, the outermost tag must + be specified and of S-VLAN type and the second + outermost tag must be of C-VLAN tag type. + "; + description + " + For IEEE 802.1Q interoperability, when pushing/swapping + two tags, it is required that the outermost tag exists + and is an S-VLAN, and the second outermost tag is a + C-VLAN. + "; + } + + presence + "Indicates existence of a second outermost VLAN tag to + push/swap"; + + description + "The second outermost VLAN tag to push/swap."; + uses vlan-write; + } + } + } + + grouping named-or-value-bandwidth-profile { + description + "A grouping to configure a bandwdith profile either by + referencing a named bandwidth profile or by + configuring the values of the bandwidth profile attributes."; + choice style { + description + "Whether the bandwidth profile is named or defined by value"; + + case named { + description + "Named bandwidth profile."; + leaf bandwidth-profile-name { + type leafref { + path "/ethtsvc:etht-svc/ethtsvc:globals/" + + "ethtsvc:named-bandwidth-profiles/" + + "ethtsvc:bandwidth-profile-name"; + } + description + "Name of the bandwidth profile."; + } + } + case value { + description + "Bandwidth profile configured by value."; + uses etht-types:etht-bandwidth-profiles; + } + } + } + + grouping bandwidth-profiles { + description + "A grouping which represent bandwidth profile configuration."; + + choice direction { + description + "Whether the bandwidth profiles are symmetrical or + asymmetrical"; + case symmetrical { + description + "The same bandwidth profile is used to describe both + the ingress and the egress bandwidth profile."; + container ingress-egress-bandwidth-profile { + description + "The bandwdith profile used in both directions."; + uses named-or-value-bandwidth-profile; + } + } + case asymmetrical { + description + "Ingress and egress bandwidth profiles can be specified."; + container ingress-bandwidth-profile { + description + "The bandwdith profile used in the ingress direction."; + uses named-or-value-bandwidth-profile; + } + container egress-bandwidth-profile { + description + "The bandwdith profile used in the egress direction."; + uses named-or-value-bandwidth-profile; + } + } + } + } + + grouping etht-svc-access-parameters { + description + "ETH services access parameters"; + + leaf access-node-id { + type te-types:te-node-id; + description + "The identifier of the access node in + the ETH TE topology."; + } + + leaf access-node-uri { + type nw:node-id; + description + "The identifier of the access node in the network."; + } + + leaf access-ltp-id { + type te-types:te-tp-id; + description + "The TE link termination point identifier, used + together with access-node-id to identify the + access LTP."; + } + + leaf access-ltp-uri { + type nt:tp-id; + description + "The link termination point identifier in network topology, + used together with access-node-uri to identify the + access LTP."; + } + + leaf access-role { + type identityref { + base etht-types:access-role; + } + description + "Indicate the role of access, e.g., working or protection. "; + } + + container pm-config { + uses pm-config-grouping; + description + "This grouping is used to set the threshold value for + performance monitoring. "; + } + + container state { + config false; + description + "The state is used to monitor the status of service. "; + leaf operational-state { + type identityref { + base te-types:tunnel-state-type; + } + description + "Indicating the operational state of client signal. "; + } + leaf provisioning-state { + type identityref { + base te-types:lsp-state-type; + } + description + "Indicating the provisional state of client signal, + especially when there is a change, i.e., revise, create. "; + } + } + + leaf performance { + type identityref { + base etht-types:performance; + } + config false; + description + "Performance Monitoring for the service. "; + } + + } + + grouping etht-svc-tunnel-parameters { + description + "ETH services tunnel parameters."; + choice technology { + description + "Service multiplexing is optional and flexible."; + + case native-ethernet { + /* + placeholder to support proprietary multiplexing + (for further discussion) + */ + list eth-tunnels { + key name; + description + "ETH Tunnel list in native Ethernet scenario."; + uses tunnels-grouping; + } + } + + case frame-base { + list otn-tunnels { + key name; + description + "OTN Tunnel list in Frame-based scenario."; + uses tunnels-grouping; + } + } + + case mpls-tp { + container pw { + description + "Pseudowire information for Ethernet over MPLS-TP."; + uses pw-segment-grouping; + } + } + } + + /* + * Open issue: can we constraints it to be used only with mp services? + */ + leaf src-split-horizon-group { + type string; + description + "Identify a split horizon group at the Tunnel source TTP"; + } + leaf dst-split-horizon-group { + type string; + description + "Identify a split horizon group at the Tunnel destination TTP"; + } + } + + grouping etht-svc-pm-threshold-config { + description + "Configuraiton parameters for Ethernet service PM thresholds."; + + leaf sending-rate-high { + type uint64; + description + "High threshold of packet sending rate in kbps."; + } + leaf sending-rate-low { + type uint64; + description + "Low threshold of packet sending rate in kbps."; + } + leaf receiving-rate-high { + type uint64; + description + "High threshold of packet receiving rate in kbps."; + } + leaf receiving-rate-low { + type uint64; + description + "Low threshold of packet receiving rate in kbps."; + } + } + + grouping etht-svc-pm-stats { + description + "Ethernet service PM statistics."; + + leaf sending-rate-too-high { + type uint32; + description + "Counter that indicates the number of times the + sending rate is above the high threshold"; + } + leaf sending-rate-too-low { + type uint32; + description + "Counter that indicates the number of times the + sending rate is below the low threshold"; + } + leaf receiving-rate-too-high { + type uint32; + description + "Counter that indicates the number of times the + receiving rate is above the high threshold"; + } + leaf receiving-rate-too-low { + type uint32; + description + "Counter that indicates the number of times the + receiving rate is below the low threshold"; + } + } + + grouping etht-svc-instance-config { + description + "Configuraiton parameters for Ethernet services."; + + leaf etht-svc-name { + type string; + description + "Name of the ETH service."; + } + + leaf etht-svc-title { + type string; + description + "The Identifier of the ETH service."; + } + + leaf user-label { + type string; + description + "Alias of the ETH service."; + } + + leaf etht-svc-descr { + type string; + description + "Description of the ETH service."; + } + + leaf etht-svc-customer { + type string; + description + "Customer of the ETH service."; + } + + leaf etht-svc-type { + type etht-types:service-type; + description + "Type of ETH service (p2p, mp2mp or rmp)."; + /* Add default as p2p */ + } + + leaf etht-svc-lifecycle { + type etht-types:lifecycle-status; + description + "Lifecycle state of ETH service."; + /* Add default as installed */ + } + uses te-types:te-topology-identifier; + + uses resilience-grouping; + list etht-svc-end-points { + key etht-svc-end-point-name; + description + "The logical end point for the ETH service. "; + uses etht-svc-end-point-grouping; + } + + container alarm-shreshold { + description "threshold configuration for the E2E client signal"; + uses alarm-shreshold-grouping; + } + + container underlay { + description + "The unterlay tunnel information that carrying the + ETH service. "; + uses etht-svc-tunnel-parameters; + } + + leaf admin-status { + type identityref { + base te-types:tunnel-admin-state-type; + } + default te-types:tunnel-admin-state-up; + description "ETH service administrative state."; + } + } + + grouping etht-svc-instance-state { + description + "State parameters for Ethernet services."; + + leaf operational-state { + type identityref { + base te-types:tunnel-state-type; + } + default te-types:tunnel-state-up; + description "ETH service operational state."; + } + leaf provisioning-state { + type identityref { + base te-types:lsp-state-type; + } + description "ETH service provisioning state."; + } + leaf creation-time { + type yang:date-and-time; + description + "Time of ETH service creation."; + } + leaf last-updated-time { + type yang:date-and-time; + description + "Time of ETH service last update."; + } + + leaf created-by { + type string; + description + "The client signal is created by whom, + can be a system or staff ID."; + } + leaf last-updated-by { + type string; + description + "The client signal is last updated by whom, + can be a system or staff ID."; + } + leaf owned-by { + type string; + description + "The client signal is last updated by whom, + can be a system ID."; + } + container pm-state { + description + "PM data of E2E Ethernet service"; + uses pm-state-grouping; + } + container error-info { + description "error messages of configuration"; + uses error-info-grouping; + } + } + + grouping pm-state-grouping { + leaf latency { + description + "latency value of the E2E Ethernet service"; + type uint32; + units microsecond; + } + } + + grouping error-info-grouping { + leaf error-code { + description "error code"; + type uint16; + } + + leaf error-description { + description "detail message of error"; + type string; + } + + leaf error-timestamp { + description "the date and time error is happened"; + type yang:date-and-time; + } + } + + grouping alarm-shreshold-grouping { + leaf latency-threshold { + description "a threshold for the E2E client signal service's + latency. Once the latency value exceed this threshold, an alarm + should be triggered."; + type uint32; + units microsecond; + } + } + + /* + * Data nodes + */ + + container etht-svc { + description + "ETH services."; + + container globals { + description + "Globals Ethernet configuration data container"; + list named-bandwidth-profiles { + key bandwidth-profile-name; + description + "List of named bandwidth profiles used by + Ethernet services."; + + leaf bandwidth-profile-name { + type string; + description + "Name of the bandwidth profile."; + } + uses etht-types:etht-bandwidth-profiles; + } + } + list etht-svc-instances { + key etht-svc-name; + description + "The list of p2p ETH service instances"; + + uses etht-svc-instance-config; + + container state { + config false; + description + "Ethernet Service states."; + + uses etht-svc-instance-state; + } + } + } + + grouping resilience-grouping { + description + "Grouping for resilience configuration. "; + container resilience { + description + "To configure the data plane protection parameters, + currently a placeholder only, future candidate attributes + include, Revert, WTR, Hold-off Timer, ..."; + uses te:protection-restoration-properties; + } + } + + grouping etht-svc-end-point-grouping { + description + "Grouping for the end point configuration."; + leaf etht-svc-end-point-name { + type string; + description + "The name of the logical end point of ETH service. "; + } + + leaf etht-svc-end-point-id { + type string; + description + "The identifier of the logical end point of ETH service."; + } + + leaf etht-svc-end-point-descr { + type string; + description + "The description of the logical end point of ETH service. "; + } + + leaf topology-role { + type identityref { + base etht-types:topology-role; + } + description + "Indicating the underlay topology role, + e.g., hub,spoke, any-to-any "; + } + + container resilience { + description + "Placeholder for resilience configuration, for future study. "; + } + + list etht-svc-access-points { + key access-point-id; + min-elements "1"; + /* + Open Issue: + Is it possible to limit the max-elements only for p2p services? + max-elements "2"; + */ + description + "List of the ETH trasport services access point instances."; + + leaf access-point-id { + type string; + description + "ID of the service access point instance"; + } + uses etht-svc-access-parameters; + } + + leaf service-classification-type { + type identityref { + base etht-types:service-classification-type; + } + description + "Service classification type."; + } + + choice service-classification { + description + "Access classification can be port-based or + VLAN based."; + case port-classification { + /* no additional information */ + } + + case vlan-classification { + container outer-tag { + presence "The outermost VLAN tag exists"; + description + "Classifies traffic using the outermost VLAN tag."; + + uses vlan-classification; + } + container second-tag { + must + '../outer-tag/tag-type = "etht-types:classify-s-vlan" and ' + + 'tag-type = "etht-types:classify-c-vlan"' + { + error-message + " + When matching two tags, the outermost tag must be + specified and of S-VLAN type and the second + outermost tag must be of C-VLAN tag type. + "; + description + " + For IEEE 802.1Q interoperability, when matching two + tags, it is required that the outermost tag exists + and is an S-VLAN, and the second outermost tag is a + C-VLAN. + "; + } + presence "The second outermost VLAN tag exists"; + + description + "Classifies traffic using the second outermost VLAN tag."; + + uses vlan-classification; + } + } + } + + /* + * Open issue: can we constraints it to be used only with mp services? + */ + leaf split-horizon-group { + type string; + description "Identify a split horizon group"; + } + uses bandwidth-profiles; + + container vlan-operations { + description + "Configuration of VLAN operations."; + choice direction { + description + "Whether the VLAN operations are symmetrical or + asymmetrical"; + case symmetrical { + container symmetrical-operation { + uses vlan-operations; + description + "Symmetrical operations. + Expressed in the ingress direction, but + the reverse operation is applied to egress traffic"; + } + } + case asymmetrical { + container asymmetrical-operation { + description "Asymmetrical operations"; + container ingress { + uses vlan-operations; + description "Ingress operations"; + } + container egress { + uses vlan-operations; + description "Egress operations"; + } + } + } + } + } + } + + grouping pm-config-grouping { + description + "Grouping used for Performance Monitoring Configuration. "; + leaf pm-enable { + type boolean; + description + "Whether to enable the performance monitoring."; + } + + leaf sending-rate-high { + type uint64; + description + "The upperbound of sending rate."; + } + + leaf sending-rate-low { + type uint64; + description + "The lowerbound of sending rate."; + } + + leaf receiving-rate-high { + type uint64; + description + "The upperbound of receiving rate."; + } + + leaf receiving-rate-low { + type uint64; + description + "The lowerbound of receiving rate."; + } + } + + grouping pw-segment-grouping { + description + "Grouping used for PW configuration. "; + leaf pw-id { + type string; + description + "The Identifier information of pseudowire. "; + } + + leaf pw-name { + type string; + description + "The name information of pseudowire."; + } + + leaf transmit-label { + type rt-types:mpls-label; + description + "Transmit label information in PW. "; + } + + leaf receive-label { + type rt-types:mpls-label; + description + "Receive label information in PW. "; + } + leaf encapsulation-type { + type identityref { + base etht-types:encapsulation-type; + } + description + "The encapsulation type, raw or tag. "; + } + + leaf oper-status { + type identityref { + base te-types:tunnel-state-type; + } + config false; + description + "The operational state of the PW segment. "; + } + + container ingress-bandwidth-profile { + description + "Bandwidth Profile for ingress. "; + uses pw-segment-named-or-value-bandwidth-profile; + } + + list pw-paths { + key path-id; + description + "A list of pw paths. "; + + leaf path-id { + type uint8; + description + "The identifier of pw paths. "; + + } + + list tp-tunnels { + key name; + description + "Names of TP Tunnel underlay"; + leaf name { + type string; + description + "Names of TP Tunnel underlay"; + } + } + } + + } + grouping pw-segment-named-or-value-bandwidth-profile { + description + "A grouping to configure a bandwdith profile either by + referencing a named bandwidth profile or by + configuring the values of the bandwidth profile attributes."; + choice style { + description + "Whether the bandwidth profile is named or defined by value"; + case named { + description + "Named bandwidth profile."; + leaf bandwidth-profile-name { + type leafref { + path "/ethtsvc:etht-svc/ethtsvc:globals/" + + "ethtsvc:named-bandwidth-profiles/" + + "ethtsvc:bandwidth-profile-name"; + } + description + "Name of the bandwidth profile."; + } + } + case value { + description + "Bandwidth profile configured by value."; + uses etht-types:pw-segement-bandwidth-profile-grouping; + } + } + } + + grouping tunnels-grouping { + description + "A group of tunnels. "; + leaf name { + type leafref { + path "/te:te/te:tunnels/te:tunnel/te:name"; + require-instance false; + } + description "Dependency tunnel name"; + } + leaf encoding { + type identityref { + base te-types:lsp-encoding-types; + } + description "LSP encoding type"; + reference "RFC3945"; + } + leaf switching-type { + type identityref { + base te-types:switching-capabilities; + } + description "LSP switching type"; + reference "RFC3945"; + } + } + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-tran-types@2023-10-23.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-tran-types@2023-10-23.yang new file mode 100644 index 0000000000000000000000000000000000000000..f46908b34f3cc30a0b19359c032a7cd8856b1b08 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-eth-tran-types@2023-10-23.yang @@ -0,0 +1,457 @@ + module ietf-eth-tran-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-eth-tran-types"; + + prefix "etht-types"; + + organization + "Internet Engineering Task Force (IETF) CCAMP WG"; + contact + " + WG List: + + ID-draft editor: + Haomian Zheng (zhenghaomian@huawei.com); + Italo Busi (italo.busi@huawei.com); + Aihua Guo (aihuaguo.ietf@gmail.com); + Anton Snitser (antons@sedonasys.com); + Francesco Lazzeri (francesco.lazzeri@ericsson.com); + Yunbin Xu (xuyunbin@caict.ac.cn); + Yang Zhao (zhaoyangyjy@chinamobile.com); + Xufeng Liu (xufeng.liu.ietf@gmail.com); + Giuseppe Fioccola (giuseppe.fioccola@huawei.com); + Chaode Yu (yuchaode@huawei.com) + "; + + description + "This module defines the ETH types. + The model fully conforms to the Network Management + Datastore Architecture (NMDA). + + Copyright (c) 2019 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 XXXX; see + the RFC itself for full legal notices."; + + revision 2023-10-23 { + description + "version -05 as a WG draft"; + reference + "draft-ietf-ccamp-client-signal-yang"; + } + + /* + * Identities + */ + + identity eth-vlan-tag-type { + description + "ETH VLAN tag type."; + } + + identity c-vlan-tag-type { + base eth-vlan-tag-type; + description + "802.1Q Customer VLAN"; + } + + identity s-vlan-tag-type { + base eth-vlan-tag-type; + description + "802.1Q Service VLAN (QinQ)"; + } + + identity service-classification-type { + description + "Service classification."; + } + + identity port-classification { + base service-classification-type; + description + "Port classification."; + } + identity vlan-classification { + base service-classification-type; + description + "VLAN classification."; + } + + identity eth-vlan-tag-classify { + description + "VLAN tag classification."; + } + + identity classify-c-vlan { + base eth-vlan-tag-classify; + description + "Classify 802.1Q Customer VLAN tag. + Only C-tag type is accepted"; + } + + identity classify-s-vlan { + base eth-vlan-tag-classify; + description + "Classify 802.1Q Service VLAN (QinQ) tag. + Only S-tag type is accepted"; + } + + identity classify-s-or-c-vlan { + base eth-vlan-tag-classify; + description + "Classify S-VLAN or C-VLAN tag-classify. + Either tag is accepted"; + } + + identity bandwidth-profile-type-ir { + description + "Bandwidth Profile Types"; + } + + identity mef-10-bwp { + base bandwidth-profile-type-ir; + description + "MEF 10 Bandwidth Profile"; + } + + identity rfc-2697-bwp { + base bandwidth-profile-type-ir; + description + "RFC 2697 Bandwidth Profile"; + } + identity rfc-2698-bwp { + base bandwidth-profile-type-ir; + description + "RFC 2698 Bandwidth Profile"; + } + + identity rfc-4115-bwp { + base bandwidth-profile-type-ir; + description + "RFC 4115 Bandwidth Profile"; + } + + identity service-type-ir { + description + "Type of Ethernet service."; + } + + identity p2p-svc { + base service-type-ir; + description + "Ethernet point-to-point service (EPL, EVPL)."; + } + + identity rmp-svc { + base service-type-ir; + description + "Ethernet rooted-multitpoint service (E-TREE, EP-TREE)."; + } + + identity mp2mp-svc { + base service-type-ir; + description + "Ethernet multipoint-to-multitpoint service (E-LAN, EP-LAN)."; + } + + identity lifecycle-status-ir { + description + "Lifecycle Status."; + } + + identity installed { + base lifecycle-status-ir; + description + "Installed."; + } + + identity planned { + base lifecycle-status-ir; + description + "Planned."; + } + + identity pending-removal { + base lifecycle-status-ir; + description + "Pending Removal."; + } + + /* + * Type Definitions + */ + + typedef eth-tag-type { + type identityref { + base eth-vlan-tag-type; + } + description + "Identifies a specific ETH VLAN tag type."; + } + + typedef eth-tag-classify { + type identityref { + base eth-vlan-tag-classify; + } + description + "Identifies a specific VLAN tag classification."; + } + + typedef vlanid { + type uint16 { + range "1..4094"; + } + description + "The 12-bit VLAN-ID used in the VLAN Tag header."; + } + + typedef vid-range-type { + type string { + pattern "([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?" + + "(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)"; + } + description + "A list of VLAN Ids, or non overlapping VLAN ranges, in + ascending order, between 1 and 4094. + This type is used to match an ordered list of VLAN Ids, or + contiguous ranges of VLAN Ids. Valid VLAN Ids must be in the + range 1 to 4094, and included in the list in non overlapping + ascending order. + + For example: 1,10-100,50,500-1000"; + } + + typedef bandwidth-profile-type { + type identityref { + base bandwidth-profile-type-ir; + } + description + "Identifies a specific Bandwidth Profile type."; + } + + typedef service-type { + type identityref { + base service-type-ir; + } + description + "Identifies the type of Ethernet service."; + } + + typedef lifecycle-status { + type identityref { + base lifecycle-status-ir; + } + description + "Identifies the lLifecycle Status ."; + } + + /* + * Grouping Definitions + */ + + grouping etht-bandwidth-profiles { + description + "Bandwidth profile configuration paramters."; + + leaf bandwidth-profile-type { + type etht-types:bandwidth-profile-type; + description + "The type of bandwidth profile."; + } + leaf CIR { + type uint64; + description + "Committed Information Rate in Kbps"; + } + leaf CBS { + type uint64; + description + "Committed Burst Size in in KBytes"; + } + leaf EIR { + type uint64; + /* Need to indicate that EIR is not supported by RFC 2697 + + must + '../bw-profile-type = "mef-10-bwp" or ' + + '../bw-profile-type = "rfc-2698-bwp" or ' + + '../bw-profile-type = "rfc-4115-bwp"' + + must + '../bw-profile-type != "rfc-2697-bwp"' + */ + description + "Excess Information Rate in Kbps + In case of RFC 2698, PIR = CIR + EIR"; + } + leaf EBS { + type uint64; + description + "Excess Burst Size in KBytes. + In case of RFC 2698, PBS = CBS + EBS"; + } + leaf color-aware { + type boolean; + description + "Indicates weather the color-mode is + color-aware or color-blind."; + } + leaf coupling-flag { + type boolean; + /* Need to indicate that Coupling Flag is defined only for MEF 10 + + must + '../bw-profile-type = "mef-10-bwp"' + */ + description + "Coupling Flag."; + } + } + + identity topology-role { + description + "The role of underlay topology: e.g., hub, spoke, + any-to-any."; + } + + identity resilience { + description + "Placeholder for resilience information in data plane, + for future study. "; + } + + identity access-role { + description + "Indicating whether the access is a working or protection access."; + } + + identity root-primary { + base access-role; + description + "Designates the primary root UNI of an E-Tree service, and may also + designates the UNI access role of E-LINE and E-LAN service."; + } + + identity root-backup { + base access-role; + description + "Designates the backup root UNI of an E-Tree service."; + } + + identity leaf-access { + base access-role; + description + "Designates the leaf UNI of an E-Tree service."; + } + + identity leaf-edge { + base access-role; + description ""; + } + + identity performance { + description + "Placeholder for performance information, for future study."; + } + + identity encapsulation-type { + description + "Indicating how the service is encapsulated (to PW), e.g, raw or tag. "; + } + grouping pw-segement-bandwidth-profile-grouping { + description + "bandwidth profile grouping for PW segment. "; + leaf bandwidth-profile-type { + type etht-types:bandwidth-profile-type; + description + "The type of bandwidth profile."; + } + leaf CIR { + type uint64; + description + "Committed Information Rate in Kbps"; + } + leaf CBS { + type uint64; + description + "Committed Burst Size in in KBytes"; + } + leaf EIR { + type uint64; + /* Need to indicate that EIR is not supported by RFC 2697 + + must + '../bw-profile-type = "mef-10-bwp" or ' + + '../bw-profile-type = "rfc-2698-bwp" or ' + + '../bw-profile-type = "rfc-4115-bwp"' + + must + '../bw-profile-type != "rfc-2697-bwp"' + */ + description + "Excess Information Rate in Kbps + In case of RFC 2698, PIR = CIR + EIR"; + } + leaf EBS { + type uint64; + description + "Excess Burst Size in KBytes. + In case of RFC 2698, PBS = CBS + EBS"; + } + } + grouping eth-bandwidth { + description + "Available bandwith for ethernet."; + leaf eth-bandwidth { + type uint64{ + range "0..10000000000"; + } + units "Kbps"; + description + "Available bandwith value expressed in kilobits per second"; + } + } + + grouping eth-label-restriction { + description + "Label Restriction for ethernet."; + leaf tag-type { + type etht-types:eth-tag-type; + description "VLAN tag type."; + } + leaf priority { + type uint8; + description "priority."; + } + } + grouping eth-label { + description + "Label for ethernet."; + leaf vlanid { + type etht-types:vlanid; + description + "VLAN tag id."; + } + } + + grouping eth-label-step { + description "Label step for Ethernet VLAN"; + leaf eth-step { + type uint16 { + range "1..4095"; + } + default 1; + description + "Label step which represent possible increments for + an Ethernet VLAN tag."; + reference + "IEEE 802.1ad: Provider Bridges."; + } + } + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-inet-types@2013-07-15.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-inet-types@2013-07-15.yang new file mode 100644 index 0000000000000000000000000000000000000000..790bafc31dd7dc3582ef1c765fe104145b8a6016 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-inet-types@2013-07-15.yang @@ -0,0 +1,459 @@ + module ietf-inet-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types"; + prefix "inet"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: David Kessens + + + WG Chair: Juergen Schoenwaelder + + + Editor: Juergen Schoenwaelder + "; + + description + "This module contains a collection of generally useful derived + YANG data types for Internet addresses and related things. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - ip-address-no-zone + - ipv4-address-no-zone + - ipv6-address-no-zone"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of types related to protocol fields ***/ + + typedef ip-version { + type enumeration { + enum unknown { + value "0"; + description + "An unknown or unspecified version of the Internet + protocol."; + } + enum ipv4 { + value "1"; + description + "The IPv4 protocol as defined in RFC 791."; + } + enum ipv6 { + value "2"; + description + "The IPv6 protocol as defined in RFC 2460."; + } + } + description + "This value represents the version of the IP protocol. + + In the value set and its semantics, this type is equivalent + to the InetVersion textual convention of the SMIv2."; + reference + "RFC 791: Internet Protocol + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef dscp { + type uint8 { + range "0..63"; + } + description + "The dscp type represents a Differentiated Services Code Point + that may be used for marking packets in a traffic stream. + + In the value set and its semantics, this type is equivalent + to the Dscp textual convention of the SMIv2."; + reference + "RFC 3289: Management Information Base for the Differentiated + Services Architecture + RFC 2474: Definition of the Differentiated Services Field + (DS Field) in the IPv4 and IPv6 Headers + RFC 2780: IANA Allocation Guidelines For Values In + the Internet Protocol and Related Headers"; + } + + typedef ipv6-flow-label { + type uint32 { + range "0..1048575"; + } + description + "The ipv6-flow-label type represents the flow identifier or Flow + Label in an IPv6 packet header that may be used to + discriminate traffic flows. + + In the value set and its semantics, this type is equivalent + to the IPv6FlowLabel textual convention of the SMIv2."; + reference + "RFC 3595: Textual Conventions for IPv6 Flow Label + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification"; + } + + typedef port-number { + type uint16 { + range "0..65535"; + } + description + "The port-number type represents a 16-bit port number of an + Internet transport-layer protocol such as UDP, TCP, DCCP, or + SCTP. Port numbers are assigned by IANA. A current list of + all assignments is available from . + + Note that the port number value zero is reserved by IANA. In + situations where the value zero does not make sense, it can + be excluded by subtyping the port-number type. + In the value set and its semantics, this type is equivalent + to the InetPortNumber textual convention of the SMIv2."; + reference + "RFC 768: User Datagram Protocol + RFC 793: Transmission Control Protocol + RFC 4960: Stream Control Transmission Protocol + RFC 4340: Datagram Congestion Control Protocol (DCCP) + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + /*** collection of types related to autonomous systems ***/ + + typedef as-number { + type uint32; + description + "The as-number type represents autonomous system numbers + which identify an Autonomous System (AS). An AS is a set + of routers under a single technical administration, using + an interior gateway protocol and common metrics to route + packets within the AS, and using an exterior gateway + protocol to route packets to other ASes. IANA maintains + the AS number space and has delegated large parts to the + regional registries. + + Autonomous system numbers were originally limited to 16 + bits. BGP extensions have enlarged the autonomous system + number space to 32 bits. This type therefore uses an uint32 + base type without a range restriction in order to support + a larger autonomous system number space. + + In the value set and its semantics, this type is equivalent + to the InetAutonomousSystemNumber textual convention of + the SMIv2."; + reference + "RFC 1930: Guidelines for creation, selection, and registration + of an Autonomous System (AS) + RFC 4271: A Border Gateway Protocol 4 (BGP-4) + RFC 4001: Textual Conventions for Internet Network Addresses + RFC 6793: BGP Support for Four-Octet Autonomous System (AS) + Number Space"; + } + + /*** collection of types related to IP addresses and hostnames ***/ + + typedef ip-address { + type union { + type inet:ipv4-address; + type inet:ipv6-address; + } + description + "The ip-address type represents an IP address and is IP + version neutral. The format of the textual representation + implies the IP version. This type supports scoped addresses + by allowing zone identifiers in the address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '(%[\p{N}\p{L}]+)?'; + } + description + "The ipv4-address type represents an IPv4 address in + dotted-quad notation. The IPv4 address may include a zone + index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format for the zone index is the numerical + format"; + } + + typedef ipv6-address { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(%[\p{N}\p{L}]+)?'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(%.+)?'; + } + description + "The ipv6-address type represents an IPv6 address in full, + mixed, shortened, and shortened-mixed notation. The IPv6 + address may include a zone index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format of IPv6 addresses uses the textual + representation defined in Section 4 of RFC 5952. The + canonical format for the zone index is the numerical + format as described in Section 11.2 of RFC 4007."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-address-no-zone { + type union { + type inet:ipv4-address-no-zone; + type inet:ipv6-address-no-zone; + } + description + "The ip-address-no-zone type represents an IP address and is + IP version neutral. The format of the textual representation + implies the IP version. This type does not support scoped + addresses since it does not allow zone identifiers in the + address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address-no-zone { + type inet:ipv4-address { + pattern '[0-9\.]*'; + } + description + "An IPv4 address without a zone index. This type, derived from + ipv4-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + } + + typedef ipv6-address-no-zone { + type inet:ipv6-address { + pattern '[0-9a-fA-F:\.]*'; + } + description + "An IPv6 address without a zone index. This type, derived from + ipv6-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-prefix { + type union { + type inet:ipv4-prefix; + type inet:ipv6-prefix; + } + description + "The ip-prefix type represents an IP prefix and is IP + version neutral. The format of the textual representations + implies the IP version."; + } + + typedef ipv4-prefix { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '/(([0-9])|([1-2][0-9])|(3[0-2]))'; + } + description + "The ipv4-prefix type represents an IPv4 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 32. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format of an IPv4 prefix has all bits of + the IPv4 address set to zero that are not part of the + IPv4 prefix."; + } + + typedef ipv6-prefix { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(/.+)'; + } + + description + "The ipv6-prefix type represents an IPv6 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 128. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The IPv6 address should have all bits that do not belong + to the prefix set to zero. + + The canonical format of an IPv6 prefix has all bits of + the IPv6 address set to zero that are not part of the + IPv6 prefix. Furthermore, the IPv6 address is represented + as defined in Section 4 of RFC 5952."; + reference + "RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + /*** collection of domain name and URI types ***/ + + typedef domain-name { + type string { + pattern + '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + + '|\.'; + length "1..253"; + } + description + "The domain-name type represents a DNS domain name. The + name SHOULD be fully qualified whenever possible. + + Internet domain names are only loosely specified. Section + 3.5 of RFC 1034 recommends a syntax (modified in Section + 2.1 of RFC 1123). The pattern above is intended to allow + for current practice in domain name use, and some possible + future expansion. It is designed to hold various types of + domain names, including names used for A or AAAA records + (host names) and other records, such as SRV records. Note + that Internet host names have a stricter syntax (described + in RFC 952) than the DNS recommendations in RFCs 1034 and + 1123, and that systems that want to store host names in + schema nodes using the domain-name type are recommended to + adhere to this stricter standard to ensure interoperability. + + The encoding of DNS names in the DNS protocol is limited + to 255 characters. Since the encoding consists of labels + prefixed by a length bytes and there is a trailing NULL + byte, only 253 characters can appear in the textual dotted + notation. + + The description clause of schema nodes using the domain-name + type MUST describe when and how these names are resolved to + IP addresses. Note that the resolution of a domain-name value + may require to query multiple DNS records (e.g., A for IPv4 + and AAAA for IPv6). The order of the resolution process and + which DNS record takes precedence can either be defined + explicitly or may depend on the configuration of the + resolver. + + Domain-name values use the US-ASCII encoding. Their canonical + format uses lowercase US-ASCII characters. Internationalized + domain names MUST be A-labels as per RFC 5890."; + reference + "RFC 952: DoD Internet Host Table Specification + RFC 1034: Domain Names - Concepts and Facilities + RFC 1123: Requirements for Internet Hosts -- Application + and Support + RFC 2782: A DNS RR for specifying the location of services + (DNS SRV) + RFC 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework"; + } + + typedef host { + type union { + type inet:ip-address; + type inet:domain-name; + } + description + "The host type represents either an IP address or a DNS + domain name."; + } + + typedef uri { + type string; + description + "The uri type represents a Uniform Resource Identifier + (URI) as defined by STD 66. + + Objects using the uri type MUST be in US-ASCII encoding, + and MUST be normalized as described by RFC 3986 Sections + 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary + percent-encoding is removed, and all case-insensitive + characters are set to lowercase except for hexadecimal + digits, which are normalized to uppercase as described in + Section 6.2.2.1. + + The purpose of this normalization is to help provide + unique URIs. Note that this normalization is not + sufficient to provide uniqueness. Two URIs that are + textually distinct after this normalization may still be + equivalent. + + Objects using the uri type may restrict the schemes that + they permit. For example, 'data:' and 'urn:' schemes + might not be appropriate. + + A zero-length URI is not a valid URI. This can be used to + express 'URI absent' where required. + + In the value set and its semantics, this type is equivalent + to the Uri SMIv2 textual convention defined in RFC 5017."; + reference + "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax + RFC 3305: Report from the Joint W3C/IETF URI Planning Interest + Group: Uniform Resource Identifiers (URIs), URLs, + and Uniform Resource Names (URNs): Clarifications + and Recommendations + RFC 5017: MIB Textual Conventions for Uniform Resource + Identifiers (URIs)"; + } + + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-layer1-types@2022-10-14.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-layer1-types@2022-10-14.yang new file mode 100644 index 0000000000000000000000000000000000000000..188336931c36000b287bad5258550e7d3fa7016b --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-layer1-types@2022-10-14.yang @@ -0,0 +1,1414 @@ + module ietf-layer1-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-layer1-types"; + prefix "l1-types"; + + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + + organization + "IETF CCAMP Working Group"; + contact + "WG Web: + WG List: + + Editor: Haomian Zheng + + + Editor: Italo Busi + "; + + description + "This module defines Layer 1 types. The model fully conforms + to the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2022 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 Revised 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 XXXX; see + the RFC itself for full legal notices. + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + 'MAY', and 'OPTIONAL' in this document are to be interpreted as + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, + + + + + they appear in all capitals, as shown here."; + + revision "2022-10-14" { + description + "Initial Version"; + reference + "RFC XXXX: A YANG Data Model for Layer 1 Types"; + // RFC Editor: replace XXXX with actual RFC number, update date + // information and remove this note + } + + /* + * Identities + */ + + identity tributary-slot-granularity { + description + "Tributary Slot Granularity (TSG)"; + reference + "ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity tsg-1.25G { + base tributary-slot-granularity; + description + "1.25G tributary slot granularity"; + } + + identity tsg-2.5G { + base tributary-slot-granularity; + description + "2.5G tributary slot granularity"; + } + + identity tsg-5G { + base tributary-slot-granularity; + description + "5G tributary slot granularity"; + } + + identity odu-type { + description + "Base identity from which specific Optical Data Unit (ODU) + type is derived."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + + + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity ODU0 { + base odu-type; + description + "ODU0 type (1.24Gb/s)."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity ODU1 { + base odu-type; + description + "ODU1 type (2.49Gb/s)."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity ODU2 { + base odu-type; + description + "ODU2 type (10.03Gb/s)."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity ODU2e { + base odu-type; + description + "ODU2e type (10.39Gb/s)."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + + + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity ODU3 { + base odu-type; + description + "ODU3 type (40.31Gb/s)."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity ODU4 { + base odu-type; + description + "ODU4 type (104.79Gb/s)."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity ODUflex { + base odu-type; + description + "ODUflex type (flexible bit rate, not resizable). + + It could be used for any type of ODUflex, including + ODUflex(CBR), ODUflex(GFP), ODUflex(GFP,n,k), ODUflex(IMP,s), + ODUflex(IMP) and ODUflex(FlexE-aware)."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity ODUflex-resizable { + base odu-type; + description + "ODUflex protocol (flexible bit rate, resizable). + + + + + It could be used only for ODUflex(GFP,n,k)."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity protocol { + description + "Base identity from which specific protocol is derived."; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity Ethernet { + base protocol; + description + "Ethernet protocol."; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity Fibre-Channel { + base protocol; + description + "Fibre-Channel (FC) protocol."; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity SDH { + base protocol; + description + "SDH protocol."; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity SONET { + base protocol; + description + "SONET protocol."; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + + + + identity client-signal { + description + "Base identity from which specific Constant Bit Rate (CBR) + client signal is derived"; + } + + identity coding-func { + description + "Base identity from which specific coding function + is derived."; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity ETH-1Gb { + base client-signal; + description + "Client signal type of 1GbE"; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity ETH-10Gb-LAN { + base client-signal; + description + "Client signal type of ETH-10Gb-LAN (10.3 Gb/s)"; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + IEEE 802.3-2018, Clause 49: IEEE Standard for Ethernet"; + } + + identity ETH-10Gb-WAN { + base client-signal; + description + "Client signal type of ETH-10Gb-WAN (9.95 Gb/s)"; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + + + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + IEEE 802.3-2018, Clause 50: IEEE Standard for Ethernet"; + } + + identity ETH-40Gb { + base client-signal; + description + "Client signal type of 40GbE"; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity ETH-100Gb { + base client-signal; + description + "Client signal type of 100GbE"; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity STM-1 { + base client-signal; + base coding-func; + description + "Client signal type of STM-1; + STM-1 G.707 (N=1) coding function."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity STM-4 { + base client-signal; + + + + + base coding-func; + description + "Client signal type of STM-4; + STM-4 G.707 (N=4) coding function."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity STM-16 { + base client-signal; + base coding-func; + description + "Client signal type of STM-16; + STM-16 G.707 (N=16) coding function."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity STM-64 { + base client-signal; + base coding-func; + description + "Client signal type of STM-64; + STM-64 G.707 (N=64) coding function."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity STM-256 { + base client-signal; + + + + + base coding-func; + description + "Client signal type of STM-256; + STM-256 G.707 (N=256) coding function."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity OC-3 { + base client-signal; + base coding-func; + description + "Client signal type of OC3; + OC-3 GR-253-CORE (N=3) coding function."; + reference + "ANSI T1.105-1995: Synchronous Optical Network (SONET) + Basic Description including Multiplex Structure, Rates, + and Formats + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity OC-12 { + base client-signal; + base coding-func; + description + "Client signal type of OC12; + OC-12 GR-253-CORE (N=12) coding function."; + reference + "ANSI T1.105-1995: Synchronous Optical Network (SONET) + Basic Description including Multiplex Structure, Rates, + and Formats + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity OC-48 { + base client-signal; + base coding-func; + description + "Client signal type of OC48; + OC-48 GR-253-CORE (N=48) coding function."; + + + + + reference + "ANSI T1.105-1995: Synchronous Optical Network (SONET) + Basic Description including Multiplex Structure, Rates, + and Formats + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity OC-192 { + base client-signal; + base coding-func; + description + "Client signal type of OC192; + OC-192 GR-253-CORE (N=192) coding function."; + reference + "ANSI T1.105-1995: Synchronous Optical Network (SONET) + Basic Description including Multiplex Structure, Rates, + and Formats + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity OC-768 { + base client-signal; + base coding-func; + description + "Client signal type of OC768; + OC-768 GR-253-CORE (N=768) coding function."; + reference + "ANSI T1.105-1995: Synchronous Optical Network (SONET) + Basic Description including Multiplex Structure, Rates, + and Formats + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity FC-100 { + base client-signal; + base coding-func; + description + "Client signal type of Fibre Channel FC-100; + FC-100 FC-FS-2 (1.0625 Gb/s) coding function."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + + + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity FC-200 { + base client-signal; + base coding-func; + description + "Client signal type of Fibre Channel FC-200; + FC-200 FC-FS-2 (2.125 Gb/s) coding function."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity FC-400 { + base client-signal; + base coding-func; + description + "Client signal type of Fibre Channel FC-400; + FC-400 FC-FS-2 (4.250 Gb/s) coding function."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity FC-800 { + base client-signal; + base coding-func; + description + "Client signal type of Fibre Channel FC-800; + FC-800 FC-FS-2 (8.500 Gb/s) coding function."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + + + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity FC-1200 { + base client-signal; + base coding-func; + description + "Client signal type of Fibre Channel FC-1200; + FC-1200 FC-10GFC (10.51875 Gb/s) coding function."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity FC-1600 { + base client-signal; + base coding-func; + description + "Client signal type of Fibre Channel FC-1600; + FC-1600 FC-FS-3 (14.025 Gb/s) coding function."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity FC-3200 { + base client-signal; + base coding-func; + description + "Client signal type of Fibre Channel FC-3200; + FC-3200 FC-FS-4 (28.05 Gb/s) coding function."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN) + + + + + MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity FICON-4G { + base client-signal; + description + "Client signal type of Fibre Connection 4G"; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity FICON-8G { + base client-signal; + description + "Client signal type of Fibre Connection 8G"; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks + + ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + + identity ETH-1000X { + base coding-func; + description + "1000BASE-X PCS clause 36 coding function."; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity ETH-10GW { + base coding-func; + description + "10GBASE-W (WAN PHY) PCS clause 49 and WIS clause 50 + coding function."; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity ETH-10GR { + base coding-func; + description + "10GBASE-R (LAN PHY) PCS clause 49 coding function."; + + + + + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity ETH-40GR { + base coding-func; + description + "40GBASE-R PCS clause 82 coding function."; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity ETH-100GR { + base coding-func; + description + "100GBASE-R PCS clause 82 coding function."; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity optical-interface-func { + description + "Base identity from which optical-interface-function + is derived."; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity SX-PMD-1000 { + base optical-interface-func; + description + "SX-PMD-clause-38 Optical Interface function for + 1000BASE-X PCS-36"; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity LX-PMD-1000 { + base optical-interface-func; + description + "LX-PMD-clause-38 Optical Interface function for + 1000BASE-X PCS-36"; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity LX10-PMD-1000 { + base optical-interface-func; + + + + + description + "LX10-PMD-clause-59 Optical Interface function for + 1000BASE-X PCS-36"; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity BX10-PMD-1000 { + base optical-interface-func; + description + "BX10-PMD-clause-59 Optical Interface function for + 1000BASE-X PCS-36"; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity LW-PMD-10G { + base optical-interface-func; + description + "LW-PMD-clause-52 Optical Interface function for + 10GBASE-W PCS-49-WIS-50"; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity EW-PMD-10G { + base optical-interface-func; + description + "EW-PMD-clause-52 Optical Interface function for + 10GBASE-W PCS-49-WIS-50"; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity LR-PMD-10G { + base optical-interface-func; + description + "LR-PMD-clause-52 Optical Interface function for + 10GBASE-R PCS-49"; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity ER-PMD-10G { + base optical-interface-func; + description + "ER-PMD-clause-52 Optical Interface function for + 10GBASE-R PCS-49"; + + + + + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity LR4-PMD-40G { + base optical-interface-func; + description + "LR4-PMD-clause-87 Optical Interface function for + 40GBASE-R PCS-82"; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity ER4-PMD-40G { + base optical-interface-func; + description + "ER4-PMD-clause-87 Optical Interface function for + 40GBASE-R PCS-82"; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity FR-PMD-40G { + base optical-interface-func; + description + "FR-PMD-clause-89 Optical Interface function for + 40GBASE-R PCS-82"; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity LR4-PMD-100G { + base optical-interface-func; + description + "LR4-PMD-clause-88 Optical Interface function for + 100GBASE-R PCS-82"; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + identity ER4-PMD-100G { + base optical-interface-func; + description + "ER4-PMD-clause-88 Optical Interface function for + 100GBASE-R PCS-82"; + reference + "MEF63: Subscriber Layer 1 Service Attributes"; + } + + + + + /* + * Typedefs + */ + + typedef otn-tpn { + type uint16 { + range "1..4095"; + } + description + "Tributary Port Number (TPN) for OTN. "; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks."; + } + + typedef otn-ts { + type uint16 { + range "1..4095"; + } + description + "Tributary Slot (TS) for OTN."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of Evolving + G.709 Optical Transport Networks."; + } + + typedef otn-label-range-type { + type enumeration { + enum trib-slot { + description + "Defines a range of OTN tributary slots (TS)."; + } + enum trib-port { + description + "Defines a range of OTN tributary ports (TPN)."; + } + } + description + "Defines the type of OTN label range: TS or TPN. "; + } + + typedef gfp-k { + type enumeration { + enum 2 { + description + "The ODU2.ts rate (1,249,177.230 kbit/s) is used + to compute the rate of an ODUflex(GFP,n,2). "; + } + + + + + enum 3 { + description + "The ODU3.ts rate (1,254,470.354 kbit/s) is used + to compute the rate of an ODUflex(GFP,n,3). "; + } + enum 4 { + description + "The ODU4.ts rate (1,301,467.133 kbit/s) is used + to compute the rate of an ODUflex(GFP,n,4). "; + } + } + description + "The ODUk.ts used to compute the rate of an ODUflex(GFP,n,k)"; + reference + "ITU-T G.709 v6.0 (06/2020), Table 7-8 and L.7: Interfaces for + the Optical Transport Network (OTN)"; + } + + typedef flexe-client-rate { + type union { + type uint16; + type enumeration { + enum "10G" { + description + "Represents a 10G FlexE Client signal (s=2)"; + } + enum "40G" { + description + "Represents a 40G FlexE Client signal (s=8)"; + } + } + } + description + "The FlexE Client signal rate (s x 5,156,250.000 kbit/s) + used to compute the rate of an ODUflex(IMP, s). + Valid values for s are s=2 (10G), s=4 (40G) and + s=5 x n (n x 25G). + In the first two cases an enumeration value + (either 10G or 40G) is used, while in the latter case + the value of n is used"; + reference + "ITU-T G.709 v6.0 (06/2020), Table 7-2: Interfaces for the + Optical Transport Network (OTN)"; + } + + typedef odtu-flex-type { + type enumeration { + enum "2" { + + + + + description + "The ODTU2.ts ODTU type."; + } + enum "3" { + description + "The ODTU3.ts ODTU type."; + } + enum "4" { + description + "The ODTU4.ts ODTU type."; + } + enum "Cn" { + description + "The ODTUCn.ts ODTU type."; + } + } + description + "The type of Optical Data Tributary Unit (ODTU), + whose nominal bitrate is used to compute the number of + Tributary Slots (TS) required by an ODUflex LSP, according to + the (19-1a) and (20-1a) formulas defined in G.709."; + reference + "ITU-T G.709 v6.0 (06/2020), Table 7-7, clause 19.6 and + clause 20.5: Interfaces for the Optical Transport + Network (OTN)"; + } + + typedef bandwidth-scientific-notation { + type string { + pattern + '0(\.0?)?([eE](\+)?0?)?|' + + '[1-9](\.[0-9]{0,6})?[eE](\+)?(9[0-6]|[1-8][0-9]|0?[0-9])?'; + } + units "bps"; + description + "Bandwidth values, expressed using the scientific notation + in bits per second. + + The encoding format is the external decimal-significant + character sequences specified in IEEE 754 and ISO/IEC C99 + for 32-bit decimal floating-point numbers: + (-1)**(S) * 10**(Exponent) * (Significant), + where Significant uses 7 digits. + + An implementation for this representation MAY use decimal32 + or binary32. The range of the Exponent is from -95 to +96 + for decimal32, and from -38 to +38 for binary32. + As a bandwidth value, the format is restricted to be + + + + + normalized, non-negative, and non-fraction: + n.dddddde{+}dd, N.DDDDDDE{+}DD, 0e0 or 0E0, + where 'd' and 'D' are decimal digits; 'n' and 'N' are + non-zero decimal digits; 'e' and 'E' indicate a power of ten. + Some examples are 0e0, 1e10, and 9.953e9."; + reference + "IEEE Std 754-2008: IEEE Standard for Floating-Point + Arithmetic. + ISO/IEC C99: Information technology - Programming + Languages - C."; + } + + /* + * Groupings + */ + + grouping otn-link-bandwidth { + description + "Bandwidth attributes for OTN links"; + container otn { + description + "Bandwidth attributes for OTN links"; + list odulist { + key "odu-type"; + description + "OTN bandwidth definition"; + leaf odu-type { + type identityref { + base odu-type; + } + description "ODU type"; + } + leaf number { + type uint16; + description "Number of ODUs"; + } + leaf ts-number { + when 'derived-from-or-self(../odu-type,"ODUflex") or + derived-from-or-self(../odu-type, + "ODUflex-resizable")' { + description + "Applicable when odu-type is ODUflex or + ODUflex-resizable"; + } + type uint16 { + range "1..4095"; + } + description + + + + + "The number of Tributary Slots (TS) that + could be used by all the ODUflex LSPs."; + } + } + } + } + + grouping otn-path-bandwidth { + description + "Bandwidth attributes for OTN paths."; + container otn { + description + "Bandwidth attributes for OTN paths."; + leaf odu-type { + type identityref { + base odu-type; + } + description "ODU type"; + } + choice oduflex-type { + when 'derived-from-or-self(./odu-type,"ODUflex") or + derived-from-or-self(./odu-type, + "ODUflex-resizable")' { + description + "Applicable when odu-type is ODUflex or + ODUflex-resizable"; + } + description + "Types of ODUflex used to compute the ODUflex + nominal bit rate."; + reference + "ITU-T G.709 v6.0 (06/2020), Table 7-2: Interfaces for the + Optical Transport Network (OTN)"; + case generic { + leaf nominal-bit-rate { + type union { + type l1-types:bandwidth-scientific-notation; + type rt-types:bandwidth-ieee-float32; + } + mandatory true; + description + "Nominal ODUflex bit rate."; + } + } + case cbr { + leaf client-type { + type identityref { + base client-signal; + + + + + } + mandatory true; + description + "The type of Constant Bit Rate (CBR) client signal + of an ODUflex(CBR)."; + } + } + case gfp-n-k { + leaf gfp-n { + type uint8 { + range "1..80"; + } + mandatory true; + description + "The value of n for an ODUflex(GFP,n,k)."; + reference + "ITU-T G.709 v6.0 (06/2020), Tables 7-8 and L.7: + Interfaces for the Optical Transport Network (OTN)"; + } + leaf gfp-k { + type gfp-k; + description + "The value of k for an ODUflex(GFP,n,k). + + If omitted, it is calculated from the value of gfp-n + as described in Table 7-8 of G.709"; + reference + "ITU-T G.709 v6.0 (06/2020), Tables 7-8 and L.7: + Interfaces for the Optical Transport Network (OTN)"; + } + } + case flexe-client { + leaf flexe-client { + type flexe-client-rate; + mandatory true; + description + "The rate of the FlexE-client for an ODUflex(IMP,s)."; + } + } + case flexe-aware { + leaf flexe-aware-n { + type uint16; + mandatory true; + description + "The rate of FlexE-aware client signal + for ODUflex(FlexE-aware)"; + } + } + + + + + case packet { + leaf opuflex-payload-rate { + type union { + type l1-types:bandwidth-scientific-notation; + type rt-types:bandwidth-ieee-float32; + } + mandatory true; + description + "Either the GFP-F encapsulated packet client nominal + bit rate for an ODUflex(GFP) or the 64b/66b encoded + packet client nominal bit rate for an ODUflex(IMP)."; + } + } + } + } + } + + grouping otn-max-path-bandwidth { + description + "Maximum bandwidth attributes for OTN paths."; + container otn { + description + "Maximum bandwidth attributes for OTN paths."; + leaf odu-type { + type identityref { + base odu-type; + } + description "ODU type"; + } + leaf max-ts-number { + when 'derived-from-or-self(../odu-type,"ODUflex") or + derived-from-or-self(../odu-type, + "ODUflex-resizable")' { + description + "Applicable when odu-type is ODUflex or + ODUflex-resizable"; + } + type uint16 { + range "1..4095"; + } + description + "The maximum number of Tributary Slots (TS) that could be + used by an ODUflex LSP."; + } + } + } + + grouping otn-label-range-info { + + + + + description + "Label range information for OTN. + + This grouping SHOULD be used together with the + otn-label-start-end and otn-label-step groupings to provide + OTN technology-specific label information to the models which + use the label-restriction-info grouping defined in the module + ietf-te-types."; + container otn-label-range { + description + "Label range information for OTN."; + leaf range-type { + type otn-label-range-type; + description "The type of range (e.g., TPN or TS) + to which the label range applies"; + } + leaf tsg { + type identityref { + base tributary-slot-granularity; + } + description + "Tributary slot granularity (TSG) to which the label range + applies. + + This leaf MUST be present when the range-type is TS. + + This leaf MAY be omitted when mapping an ODUk over an OTUk + Link. In this case the range-type is tpn, with only one + entry (ODUk), and the tpn range has only one value (1)."; + reference + "ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + leaf-list odu-type-list { + type identityref { + base odu-type; + } + description + "List of ODU types to which the label range applies. + + An Empty odu-type-list means that the label range + applies to all the supported ODU types."; + } + leaf priority { + type uint8 { + range 0..7; + } + description + + + + + "Priority in Interface Switching Capability + Descriptor (ISCD)."; + reference + "RFC4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS)"; + } + } + } + + grouping otn-label-start-end { + description + "The OTN label-start or label-end used to specify an OTN label + range. + + This grouping is dependent on the range-type defined in the + otn-label-range-info grouping. + + This grouping SHOULD be used together with the + otn-label-range-info and otn-label-step groupings to provide + OTN technology-specific label information to the models which + use the label-restriction-info grouping defined in the module + ietf-te-types."; + container otn { + description + "Label start or label end for OTN."; + choice range-type { + description + "OTN label range type, either TPN range or TS range"; + case trib-port { + leaf tpn { + when "../../../../otn-label-range/range-type = + 'trib-port'" { + description + "Valid only when range-type represented by + trib-port"; + } + type otn-tpn; + description + "Tributary Port Number (TPN)."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of + Evolving G.709 Optical Transport Networks."; + } + } + case trib-slot { + leaf ts { + when "../../../../otn-label-range/range-type = + 'trib-slot'" { + + + + + description + "Valid only when range-type represented by + trib-slot"; + } + type otn-ts; + description + "Tributary Slot (TS) number."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of + Evolving G.709 Optical Transport Networks"; + } + } + } + } + } + + grouping otn-label-hop { + description "OTN Label"; + reference + "RFC7139, section 6: GMPLS Signaling Extensions for Control of + Evolving G.709 Optical Transport Networks"; + container otn { + description + "Label hop for OTN."; + leaf tpn { + type otn-tpn; + description + "Tributary Port Number (TPN)."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of + Evolving G.709 Optical Transport Networks."; + } + leaf tsg { + type identityref { + base tributary-slot-granularity; + } + description "Tributary Slot Granularity (TSG)."; + reference + "ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + leaf ts-list { + type string { + pattern "([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?" + + "(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)"; + } + description + "A list of available Tributary Slots (TS) ranging + + + + + between 1 and 4095. If multiple values or + ranges are given, they all MUST be disjoint + and MUST be in ascending order. + For example 1-20,25,50-1000."; + reference + "RFC 7139: GMPLS Signaling Extensions for Control + of Evolving G.709 Optical Transport Networks"; + } + } + } + + grouping otn-label-step { + description + "Label step for OTN. + + This grouping is dependent on the range-type defined in the + otn-label-range-info grouping. + + This grouping SHOULD be used together with the + otn-label-range-info and otn-label-start-end groupings to + provide OTN technology-specific label information to the + models which use the label-restriction-info grouping defined + in the module ietf-te-types."; + container otn { + description + "Label step for OTN"; + choice range-type { + description + "OTN label range type, either TPN range or TS range"; + case trib-port { + leaf tpn { + when "../../../otn-label-range/range-type = + 'trib-port'" { + description + "Valid only when range-type represented by + trib-port"; + } + type otn-tpn; + description + "Label step which represents possible increments for + Tributary Port Number (TPN)."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of + Evolving G.709 Optical Transport Networks."; + } + } + case trib-slot { + leaf ts { + + + + + when "../../../otn-label-range/range-type = + 'trib-slot'" { + description + "Valid only when range-type represented by + trib-slot"; + } + type otn-ts; + description + "Label step which represents possible increments for + Tributary Slot (TS) number."; + reference + "RFC7139: GMPLS Signaling Extensions for Control of + Evolving G.709 Optical Transport Networks."; + } + } + } + } + } + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-network-topology@2018-02-26.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-network-topology@2018-02-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..0538ac01b629e80db37bd66a3128ac5e04dfbcef --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-network-topology@2018-02-26.yang @@ -0,0 +1,294 @@ + module ietf-network-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology"; + prefix nt; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Alexander Clemm + + + Editor: Jan Medved + + + Editor: Robert Varga + + + Editor: Nitin Bahadur + + + Editor: Hariharan Ananthakrishnan + + + Editor: Xufeng Liu + "; + + description + "This module defines a common base model for a network topology, + augmenting the base network data model with links to connect + nodes, as well as termination points to terminate links + on nodes. + + 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 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef link-id { + type inet:uri; + description + "An identifier for a link in a topology. The precise + structure of the link-id will be up to the implementation. + The identifier SHOULD be chosen such that the same link in a + real network topology will always be identified through the + same identifier, even if the data model is instantiated in + separate datastores. An implementation MAY choose to capture + semantics in the identifier -- for example, to indicate the + type of link and/or the type of topology of which the link is + a part."; + } + + typedef tp-id { + type inet:uri; + description + "An identifier for termination points on a node. The precise + structure of the tp-id will be up to the implementation. + The identifier SHOULD be chosen such that the same termination + point in a real network topology will always be identified + through the same identifier, even if the data model is + instantiated in separate datastores. An implementation MAY + choose to capture semantics in the identifier -- for example, + to indicate the type of termination point and/or the type of + node that contains the termination point."; + } + + grouping link-ref { + description + "This grouping can be used to reference a link in a specific + network. Although it is not used in this module, it is + defined here for the convenience of augmenting modules."; + leaf link-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nt:link/nt:link-id"; + require-instance false; + } + description + "A type for an absolute reference to a link instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw:network-ref; + } + + grouping tp-ref { + description + "This grouping can be used to reference a termination point + in a specific node. Although it is not used in this module, + it is defined here for the convenience of augmenting + modules."; + leaf tp-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nw:node[nw:node-id=current()/../"+ + "node-ref]/nt:termination-point/nt:tp-id"; + require-instance false; + } + description + "A type for an absolute reference to a termination point. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw:node-ref; + } + + augment "/nw:networks/nw:network" { + description + "Add links to the network data model."; + list link { + key "link-id"; + description + "A network link connects a local (source) node and + a remote (destination) node via a set of the respective + node's termination points. It is possible to have several + links between the same source and destination nodes. + Likewise, a link could potentially be re-homed between + termination points. Therefore, in order to ensure that we + would always know to distinguish between links, every link + is identified by a dedicated link identifier. Note that a + link models a point-to-point link, not a multipoint link."; + leaf link-id { + type link-id; + description + "The identifier of a link in the topology. + A link is specific to a topology to which it belongs."; + } + container source { + description + "This container holds the logical source of a particular + link."; + leaf source-node { + type leafref { + path "../../../nw:node/nw:node-id"; + require-instance false; + } + description + "Source node identifier. Must be in the same topology."; + } + leaf source-tp { + type leafref { + path "../../../nw:node[nw:node-id=current()/../"+ + "source-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the source node + and terminates the link."; + } + } + + container destination { + description + "This container holds the logical destination of a + particular link."; + leaf dest-node { + type leafref { + path "../../../nw:node/nw:node-id"; + require-instance false; + } + description + "Destination node identifier. Must be in the same + network."; + } + leaf dest-tp { + type leafref { + path "../../../nw:node[nw:node-id=current()/../"+ + "dest-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the + destination node and terminates the link."; + } + } + list supporting-link { + key "network-ref link-ref"; + description + "Identifies the link or links on which this link depends."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-network/nw:network-ref"; + require-instance false; + } + description + "This leaf identifies in which underlay topology + the supporting link is present."; + } + + leaf link-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/"+ + "../network-ref]/link/link-id"; + require-instance false; + } + description + "This leaf identifies a link that is a part + of this link's underlay. Reference loops in which + a link identifies itself as its underlay, either + directly or transitively, are not allowed."; + } + } + } + } + augment "/nw:networks/nw:network/nw:node" { + description + "Augments termination points that terminate links. + Termination points can ultimately be mapped to interfaces."; + list termination-point { + key "tp-id"; + description + "A termination point can terminate a link. + Depending on the type of topology, a termination point + could, for example, refer to a port or an interface."; + leaf tp-id { + type tp-id; + description + "Termination point identifier."; + } + list supporting-termination-point { + key "network-ref node-ref tp-ref"; + description + "This list identifies any termination points on which a + given termination point depends or onto which it maps. + Those termination points will themselves be contained + in a supporting node. This dependency information can be + inferred from the dependencies between links. Therefore, + this item is not separately configurable. Hence, no + corresponding constraint needs to be articulated. + The corresponding information is simply provided by the + implementing system."; + + leaf network-ref { + type leafref { + path "../../../nw:supporting-node/nw:network-ref"; + require-instance false; + } + description + "This leaf identifies in which topology the + supporting termination point is present."; + } + leaf node-ref { + type leafref { + path "../../../nw:supporting-node/nw:node-ref"; + require-instance false; + } + description + "This leaf identifies in which node the supporting + termination point is present."; + } + leaf tp-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/"+ + "../network-ref]/nw:node[nw:node-id=current()/../"+ + "node-ref]/termination-point/tp-id"; + require-instance false; + } + description + "Reference to the underlay node (the underlay node must + be in a different topology)."; + } + } + } + } + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-network@2018-02-26.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-network@2018-02-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..d9da81eeebefad9054a43af552de3d51f20bcd56 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-network@2018-02-26.yang @@ -0,0 +1,193 @@ + module ietf-network { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network"; + prefix nw; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Alexander Clemm + + + Editor: Jan Medved + + + Editor: Robert Varga + + + Editor: Nitin Bahadur + + + Editor: Hariharan Ananthakrishnan + + + Editor: Xufeng Liu + "; + + description + "This module defines a common base data model for a collection + of nodes in a network. Node definitions are further used + in network topologies and inventories. + + 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 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef node-id { + type inet:uri; + description + "Identifier for a node. The precise structure of the node-id + will be up to the implementation. For example, some + implementations MAY pick a URI that includes the network-id + as part of the path. The identifier SHOULD be chosen + such that the same node in a real network topology will + always be identified through the same identifier, even if + the data model is instantiated in separate datastores. An + implementation MAY choose to capture semantics in the + identifier -- for example, to indicate the type of node."; + } + + typedef network-id { + type inet:uri; + description + "Identifier for a network. The precise structure of the + network-id will be up to the implementation. The identifier + SHOULD be chosen such that the same network will always be + identified through the same identifier, even if the data model + is instantiated in separate datastores. An implementation MAY + choose to capture semantics in the identifier -- for example, + to indicate the type of network."; + } + + grouping network-ref { + description + "Contains the information necessary to reference a network -- + for example, an underlay network."; + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + require-instance false; + } + description + "Used to reference a network -- for example, an underlay + network."; + } + } + + grouping node-ref { + description + "Contains the information necessary to reference a node."; + leaf node-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nw:node/nw:node-id"; + require-instance false; + } + description + "Used to reference a node. + Nodes are identified relative to the network that + contains them."; + } + uses network-ref; + } + + container networks { + description + "Serves as a top-level container for a list of networks."; + list network { + key "network-id"; + description + "Describes a network. + A network typically contains an inventory of nodes, + topological information (augmented through the + network-topology data model), and layering information."; + leaf network-id { + type network-id; + description + "Identifies a network."; + } + container network-types { + description + "Serves as an augmentation target. + The network type is indicated through corresponding + presence containers augmented into this container."; + } + list supporting-network { + key "network-ref"; + description + "An underlay network, used to represent layered network + topologies."; + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + require-instance false; + } + description + "References the underlay network."; + } + } + + list node { + key "node-id"; + description + "The inventory of nodes of this network."; + leaf node-id { + type node-id; + description + "Uniquely identifies a node within the containing + network."; + } + list supporting-node { + key "network-ref node-ref"; + description + "Represents another node that is in an underlay network + and that supports this node. Used to represent layering + structure."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-network/nw:network-ref"; + require-instance false; + } + description + "References the underlay network of which the + underlay node is a part."; + } + leaf node-ref { + type leafref { + path "/nw:networks/nw:network/nw:node/nw:node-id"; + require-instance false; + } + description + "References the underlay node itself."; + } + } + } + } + } + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-otn-topology@2023-07-06.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-otn-topology@2023-07-06.yang new file mode 100644 index 0000000000000000000000000000000000000000..587612e8e7acb1f2eedb329b2f13a1a0626f3181 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-otn-topology@2023-07-06.yang @@ -0,0 +1,2405 @@ + module ietf-otn-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-otn-topology"; + prefix "otnt"; + + import ietf-network { + prefix "nw"; + reference "RFC 8345: A YANG Data Model for Network Topologies"; + } + + import ietf-network-topology { + prefix "nt"; + reference "RFC 8345: A YANG Data Model for Network Topologies"; + } + + import ietf-te-topology { + prefix "tet"; + reference + "RFC 8795: YANG Data Model for Traffic Engineering + (TE) Topologies"; + } + + import ietf-layer1-types { + prefix "l1-types"; + reference + "I-D.ietf-ccamp-layer1-types: A YANG Data Model + for Layer 1 Types"; + } + + organization + "IETF CCAMP Working Group"; + contact + "WG Web: + WG List: + + Editor: Haomian Zheng + + + Editor: Italo Busi + + + Editor: Xufeng Liu + + + Editor: Sergio Belotti + + + + + + Editor: Oscar Gonzalez de Dios + "; + + description + "This module defines a protocol independent Layer 1/ODU topology + data model. The model fully conforms + to the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2023 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 Revised 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 XXXX; see + the RFC itself for full legal notices. + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + 'MAY', and 'OPTIONAL' in this document are to be interpreted as + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, + they appear in all capitals, as shown here."; + + revision 2023-07-06 { + description + "Initial Revision"; + reference + "RFC XXXX: A YANG Data Model for Optical Transport Network + Topology"; + // RFC Ed.: replace XXXX with actual RFC number, update date + // information and remove this note + } + + /* + * Groupings + */ + + grouping label-range-info { + description + "OTN technology-specific label range related information with + a presence container indicating that the label range is an + OTN technology-specific label range. + + This grouping SHOULD be used together with the + + + + + otn-label-start-end and otn-label-step groupings to provide + OTN technology-specific label information to the models which + use the label-restriction-info grouping defined in the module + ietf-te-types."; + uses l1-types:otn-label-range-info { + refine otn-label-range { + presence + "Indicates the label range is an OTN label range. + + This container MUST NOT be present if there are other + presence containers or attributes indicating another type + of label range."; + } + } + } + + /* + * Data nodes + */ + + augment "/nw:networks/nw:network/nw:network-types/" + + "tet:te-topology" { + container otn-topology { + presence "indicates a topology type of Optical Transport + Network (OTN)-electrical layer."; + description "OTN topology type"; + } + description "augment network types to include OTN newtork"; + } + + augment "/nw:networks/nw:network/nw:node/tet:te" + + "/tet:te-node-attributes" { + when "../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description "Augment only for OTN network."; + } + description "Augment TE node attributes."; + container otn-node { + presence "The TE node is an OTN node."; + description + "Introduce new TE node type for OTN node."; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes" { + when "../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + + + + + description "Augment only for OTN network."; + } + description "Augment link configuration"; + + container otn-link { + description + "Attributes of the OTN Link."; + leaf odtu-flex-type { + type l1-types:odtu-flex-type; + description + "The type of Optical Data Tributary Unit (ODTU) + whose nominal bitrate is used to compute the number of + Tributary Slots (TS) required by the ODUflex LSPs set up + on this OTN Link."; + } + leaf tsg { + type identityref { + base l1-types:tributary-slot-granularity; + } + description "Tributary slot granularity."; + reference + "ITU-T G.709 v6.0 (06/2020): Interfaces for the Optical + Transport Network (OTN)"; + } + leaf distance { + type uint32; + description "distance in the unit of kilometers"; + } + } + container client-svc { + presence + "When present, indicates that the Link supports Costant + Bit Rate (CBR) client signals."; + description + "Attributes of the Link supporting CBR client signals."; + leaf-list supported-client-signal { + type identityref { + base l1-types:client-signal; + } + min-elements 1; + description + "List of client signal types supported by the Link."; + } + } + } + + augment "/nw:networks/nw:network/nw:node/nt:termination-point/" + + "tet:te" { + + + + + when "../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description "Augment only for OTN network"; + } + description "OTN TP attributes config in ODU topology."; + + container otn-ltp { + description + "Attributes of the OTN Link Termination Point (LTP)."; + leaf odtu-flex-type { + type l1-types:odtu-flex-type; + description + "The type of Optical Data Tributary Unit (ODTU) + whose nominal bitrate is used to compute the number of + Tributary Slots (TS) required by the ODUflex LSPs set up + on this OTN Link Termination Point (LTP)."; + } + } + container client-svc { + presence + "When present, indicates that the Link Termination Point + (LTP) supports Costant Bit Rate (CBR) client signals."; + description + "OTN LTP Service attributes."; + leaf-list supported-client-signal { + type identityref { + base l1-types:client-signal; + } + description + "List of client signal types supported by the LTP."; + } + } + } + + /* + * Augment TE bandwidth + */ + + augment "/nw:networks/nw:network/nw:node/nt:termination-point/" + + "tet:te/" + + "tet:interface-switching-capability/tet:max-lsp-bandwidth/" + + "tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + + + + + description + "Augment maximum LSP TE bandwidth for the link termination + point (LTP)."; + case otn { + uses l1-types:otn-max-path-bandwidth { + description + "The odtu-flex-type attribute of the OTN Link Termination + Point (LTP) is used to compute the number of Tributary + Slots (TS) required by the ODUflex LSPs set up on this + OTN LTP."; + } + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:path-constraints/tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE bandwidth path constraints of the TE node + connectivity matrices."; + case otn { + uses l1-types:otn-link-bandwidth { + augment otn { + description + "Augment OTN link bandwidth information."; + leaf odtu-flex-type { + type l1-types:odtu-flex-type; + description + "The type of Optical Data Tributary Unit (ODTU) + whose nominal bitrate is used to compute the number of + Tributary Slots (TS) required by the ODUflex LSPs + set up along the underlay paths of these OTN + connectivity matrices."; + } + } + } + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + + + + + "tet:path-constraints/tet:te-bandwidth/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE bandwidth path constraints of the + connectivity matrix entry."; + case otn { + uses l1-types:otn-link-bandwidth { + augment otn { + description + "Augment OTN link bandwidth information."; + leaf odtu-flex-type { + type l1-types:odtu-flex-type; + description + "The type of Optical Data Tributary Unit (ODTU) + whose nominal bitrate is used to compute the number of + Tributary Slots (TS) required by the ODUflex LSPs + set up along the underlay path of this OTN + connectivity matrix entry."; + } + } + } + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:path-constraints/tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE bandwidth path constraints of the TE node + connectivity matrices information source."; + case otn { + uses l1-types:otn-link-bandwidth { + augment otn { + description + "Augment OTN link bandwidth information."; + leaf odtu-flex-type { + type l1-types:odtu-flex-type; + + + + + description + "The type of Optical Data Tributary Unit (ODTU) + whose nominal bitrate is used to compute the number of + Tributary Slots (TS) required by the ODUflex LSPs + set up along the underlay paths of these OTN + connectivity matrices."; + } + } + } + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:path-constraints/tet:te-bandwidth/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE bandwidth path constraints of the + connectivity matrix entry information source"; + case otn { + uses l1-types:otn-link-bandwidth { + augment otn { + description + "Augment OTN link bandwidth information."; + leaf odtu-flex-type { + type l1-types:odtu-flex-type; + description + "The type of Optical Data Tributary Unit (ODTU) + whose nominal bitrate is used to compute the number of + Tributary Slots (TS) required by the ODUflex LSPs + set up along the underlay path of this OTN + connectivity matrix entry."; + } + } + } + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:client-layer-adaptation/tet:switching-capability/" + + "tet:te-bandwidth/tet:technology" { + + + + + when "../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment client TE bandwidth of the tunnel termination point + (TTP)"; + case otn { + uses l1-types:otn-link-bandwidth { + augment otn { + description + "Augment OTN link bandwidth information."; + leaf odtu-flex-type { + type l1-types:odtu-flex-type; + description + "The type of Optical Data Tributary Unit (ODTU) + whose nominal bitrate is used to compute the number of + Tributary Slots (TS) required by the ODUflex LSPs + terminated on this OTN Tunnel Termination Point + (TTP)."; + } + } + } + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/tet:path-constraints/" + + "tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE bandwidth path constraints for the TTP + Local Link Connectivities."; + case otn { + uses l1-types:otn-link-bandwidth { + augment otn { + description + "Augment OTN link bandwidth information."; + leaf odtu-flex-type { + type l1-types:odtu-flex-type; + + + + + description + "The type of Optical Data Tributary Unit (ODTU) + whose nominal bitrate is used to compute the number of + Tributary Slots (TS) required by the ODUflex LSPs + set up along the underlay paths of these OTN Local + Link Connectivities."; + } + } + } + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/tet:path-constraints/" + + "tet:te-bandwidth/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE bandwidth path constraints for the TTP + Local Link Connectivity entry."; + case otn { + uses l1-types:otn-link-bandwidth { + augment otn { + description + "Augment OTN link bandwidth information."; + leaf odtu-flex-type { + type l1-types:odtu-flex-type; + description + "The type of Optical Data Tributary Unit (ODTU) + whose nominal bitrate is used to compute the number of + Tributary Slots (TS) required by the ODUflex LSPs + set up along the underlay path of this OTN Local + Link Connectivyt entry."; + } + } + } + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:interface-switching-capability/tet:max-lsp-bandwidth/" + + + + + + "tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment maximum LSP TE bandwidth for the TE link."; + case otn { + uses l1-types:otn-max-path-bandwidth { + description + "The odtu-flex-type attribute of the OTN Link is used + to compute the number of Tributary Slots (TS) required + by the ODUflex LSPs set up on this OTN Link."; + } + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:max-link-bandwidth/" + + "tet:te-bandwidth" { + when "../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment maximum TE bandwidth for the TE link"; + uses l1-types:otn-link-bandwidth { + description + "The odtu-flex-type attribute of the OTN Link is used + to compute the number of Tributary Slots (TS) required + by the ODUflex LSPs set up on this OTN Link."; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:max-resv-link-bandwidth/" + + "tet:te-bandwidth" { + when "../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + + + + + } + description + "Augment maximum reservable TE bandwidth for the TE link"; + uses l1-types:otn-link-bandwidth { + description + "The odtu-flex-type attribute of the OTN Link is used + to compute the number of Tributary Slots (TS) required + by the ODUflex LSPs set up on this OTN Link."; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:unreserved-bandwidth/" + + "tet:te-bandwidth" { + when "../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment unreserved TE bandwidth for the TE Link"; + uses l1-types:otn-link-bandwidth { + description + "The odtu-flex-type attribute of the OTN Link is used + to compute the number of Tributary Slots (TS) required + by the ODUflex LSPs set up on this OTN Link."; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:interface-switching-capability/" + + "tet:max-lsp-bandwidth/" + + "tet:te-bandwidth/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment maximum LSP TE bandwidth for the TE link + information source"; + case otn { + uses l1-types:otn-max-path-bandwidth { + description + + + + + "The odtu-flex-type attribute of the OTN Link is used + to compute the number of Tributary Slots (TS) required + by the ODUflex LSPs set up on this OTN Link."; + } + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:max-link-bandwidth/" + + "tet:te-bandwidth" { + when "../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment maximum TE bandwidth for the TE link + information source"; + uses l1-types:otn-link-bandwidth { + description + "The odtu-flex-type attribute of the OTN Link is used + to compute the number of Tributary Slots (TS) required + by the ODUflex LSPs set up on this OTN Link."; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:max-resv-link-bandwidth/" + + "tet:te-bandwidth" { + when "../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment maximum reservable TE bandwidth for the TE link + information-source"; + uses l1-types:otn-link-bandwidth { + description + "The odtu-flex-type attribute of the OTN Link is used + to compute the number of Tributary Slots (TS) required + by the ODUflex LSPs set up on this OTN Link."; + } + } + + + + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:unreserved-bandwidth/" + + "tet:te-bandwidth" { + when "../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment unreserved TE bandwidth of the TE link + information source"; + uses l1-types:otn-link-bandwidth { + description + "The odtu-flex-type attribute of the OTN Link is used + to compute the number of Tributary Slots (TS) required + by the ODUflex LSPs set up on this OTN Link."; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:interface-switching-capability/" + + "tet:max-lsp-bandwidth/" + + "tet:te-bandwidth/tet:technology" { + description + "Augment maximum LSP TE bandwidth of the TE link + template"; + case otn { + uses l1-types:otn-max-path-bandwidth { + description + "The odtu-flex-type attribute of the OTN Link is used + to compute the number of Tributary Slots (TS) required + by the ODUflex LSPs set up on the OTN Link that uses this + Link Template."; + } + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:max-link-bandwidth/" + + "tet:te-bandwidth" { + description + "Augment maximum TE bandwidth the TE link template"; + uses l1-types:otn-link-bandwidth { + description + + + + + "The odtu-flex-type attribute of the OTN Link is used + to compute the number of Tributary Slots (TS) required + by the ODUflex LSPs set up on the OTN Link that uses this + Link Template."; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:max-resv-link-bandwidth/" + + "tet:te-bandwidth" { + description + "Augment maximum reservable TE bandwidth for the TE link + template."; + uses l1-types:otn-link-bandwidth { + description + "The odtu-flex-type attribute of the OTN Link is used + to compute the number of Tributary Slots (TS) required + by the ODUflex LSPs set up on the OTN Link that uses this + Link Template."; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:unreserved-bandwidth/" + + "tet:te-bandwidth" { + description + "Augment unreserved TE bandwidth the TE link template"; + uses l1-types:otn-link-bandwidth { + description + "The odtu-flex-type attribute of the OTN Link is used + to compute the number of Tributary Slots (TS) required + by the ODUflex LSPs set up on the OTN Link that uses this + Link Template."; + } + } + + /* + * Augment TE label range information + */ + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + + + + + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range information for the TE node + connectivity matrices."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range information for the source LTP + of the connectivity matrix entry."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range information for the destination LTP + of the connectivity matrix entry."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + + + + + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range information for the TE node + connectivity matrices information source."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/tet:label-restriction" { + when "../../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range information for the source LTP + of the connectivity matrix entry information source."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction" { + when "../../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range information for the destination LTP + of the connectivity matrix entry information source."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + + + + + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range information for the TTP + Local Link Connectivities."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range information for the TTP + Local Link Connectivity entry."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range information for the TE link."; + uses label-range-info; + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction" { + when "../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + + + + + } + description + "Augment TE label range information for the TE link + information source."; + uses label-range-info; + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction" { + description + "Augment TE label range information for the TE link template."; + uses label-range-info; + } + + /* + * Augment TE label + */ + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range start for the TE node + connectivity matrices"; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/" + + "tet:label-restriction/tet:label-end/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + + + + + } + description + "Augment TE label range end for the TE node + connectivity matrices"; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:label-restrictions/" + + "tet:label-restriction/tet:label-step/" + + "tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range step for the TE node + connectivity matrices"; + case otn { + uses l1-types:otn-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:underlay/tet:primary-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay primary path of the + TE node connectivity matrices"; + case otn { + uses l1-types:otn-label-hop; + } + } + + + + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:underlay/tet:backup-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay backup path of the + TE node connectivity matrices"; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TE node connectivity + matrices"; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + + + + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TE node connectivity + matrices"; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TE node connectivity matrices"; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + + + + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range start for the source LTP + of the connectivity matrix entry."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range end for the source LTP + of the connectivity matrix entry."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:from/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/" + + "tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + + + + + "Augment TE label range step for the source LTP + of the connectivity matrix entry."; + case otn { + uses l1-types:otn-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range start for the destination LTP + of the connectivity matrix entry."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range end for the destination LTP + of the connectivity matrix entry."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + + + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:to/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/" + + "tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range step for the destination LTP + of the connectivity matrix entry."; + case otn { + uses l1-types:otn-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:primary-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the connectivity matrix entry."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:backup-path/tet:path-element/" + + "tet:type/tet:label/tet:label-hop/" + + "tet:te-label/tet:technology" { + + + + + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the connectivity matrix entry."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:optimizations/" + + "tet:algorithm/tet:metric/tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the connectivity matrix entry."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/tet:optimizations/" + + "tet:algorithm/tet:metric/tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + + + + + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the connectivity matrix entry."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:te-node-attributes/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the connectivity matrix entry."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range start for the TE node connectivity + matrices information source."; + case otn { + + + + + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range end for the TE node connectivity + matrices information source."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/" + + "tet:connectivity-matrices/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-step/tet:technology" { + when "../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range step for the TE node connectivity + matrices information source."; + case otn { + uses l1-types:otn-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + + + + + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TE node connectivity matrices of the information + source entry."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TE node connectivity matrices of the information + source entry."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + + + + + OTN topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TE node connectivity matrices + information source."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TE node connectivity matrices + information source."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the computed path route objects + + + + + of the TE node connectivity matrices information source."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range start for the source LTP + of the connectivity matrix entry information source."; + case otn { + uses l1-types:otn-label-start-end; + } + } + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range end for the source LTP + of the connectivity matrix entry information source."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + + + + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:from/tet:label-restrictions/" + + "tet:label-restriction/" + + "tet:label-step/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range step for the source LTP + of the connectivity matrix entry information source."; + case otn { + uses l1-types:otn-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range start for the destination LTP + of the connectivity matrix entry information source."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + + + + + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range end for the destination LTP + of the connectivity matrix entry information source."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:to/tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range step for the destination LTP + of the connectivity matrix entry information source."; + case otn { + uses l1-types:otn-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the connectivity matrix entry information source."; + case otn { + + + + + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the connectivity matrix entry information source."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the connectivity matrix entry + information source."; + case otn { + uses l1-types:otn-label-hop; + } + } + + + + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the connectivity matrix entry + information source."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:information-source-entry/tet:connectivity-matrices/" + + "tet:connectivity-matrix/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the connectivity matrix entry information source."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + + + + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/" + + "tet:te-label/tet:technology" { + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range start for the TTP + Local Link Connectivities."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/" + + "tet:te-label/tet:technology"{ + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range end for the TTP + Local Link Connectivities."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/" + + "tet:technology"{ + when "../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + + + + + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range step for the TTP + Local Link Connectivities."; + case otn { + uses l1-types:otn-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TTP Local Link Connectivities."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TTP Local Link Connectivities."; + case otn { + + + + + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TTP Local Link + Connectivities."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TTP Local Link + Connectivities."; + case otn { + + + + + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TTP Local Link Connectivities."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range start for the TTP + Local Link Connectivity entry."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + + + + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when "../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range end for the TTP + Local Link Connectivity entry."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range step for the TTP + Local Link Connectivity entry."; + case otn { + uses l1-types:otn-label-step; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + + + + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TTP Local Link Connectivity entry."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TTP Local Link Connectivity entry."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-exclude-objects/" + + "tet:route-object-exclude-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + + + + + OTN topology type."; + } + description + "Augment TE label hop for the explicit route objects excluded + by the path computation of the TTP Local Link + Connectivity entry."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:optimizations/tet:algorithm/tet:metric/" + + "tet:optimization-metric/" + + "tet:explicit-route-include-objects/" + + "tet:route-object-include-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the explicit route objects included + by the path computation of the TTP Local Link + Connectivity entry."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nw:node/tet:te/" + + "tet:tunnel-termination-point/" + + "tet:local-link-connectivities/" + + "tet:local-link-connectivity/" + + "tet:path-properties/tet:path-route-objects/" + + "tet:path-route-object/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + + + + + OTN topology type."; + } + description + "Augment TE label hop for the computed path route objects + of the TTP Local Link Connectivity entry."; + case otn { + uses l1-types:otn-label-hop; + } + } + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay primary path + of the TE link."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + when "../../../../../../../../" + + "nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label hop for the underlay backup path + of the TE link."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + + + + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range start for the TE link."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range end for the TE link."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range step for the TE link."; + case otn { + uses l1-types:otn-label-step; + } + + + + + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range start for the TE link + information source."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + when "../../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + description + "Augment TE label range end for the TE link + information source."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/nw:network/nt:link/tet:te/" + + "tet:information-source-entry/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + when "../../../../../../nw:network-types/tet:te-topology/" + + "otnt:otn-topology" { + description + "Augmentation parameters apply only for networks with + OTN topology type."; + } + + + + + description + "Augment TE label range step for the TE link + information source."; + case otn { + uses l1-types:otn-label-step; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:underlay/tet:primary-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + description + "Augment TE label hop for the underlay primary path + of the TE link template."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:underlay/tet:backup-path/tet:path-element/tet:type/" + + "tet:label/tet:label-hop/tet:te-label/tet:technology" { + description + "Augment TE label hop for the underlay backup path + of the TE link template."; + case otn { + uses l1-types:otn-label-hop; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-start/tet:te-label/tet:technology" { + description + "Augment TE label range start for the TE link template."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-end/tet:te-label/tet:technology" { + description + + + + + "Augment TE label range end for the TE link template."; + case otn { + uses l1-types:otn-label-start-end; + } + } + + augment "/nw:networks/tet:te/tet:templates/" + + "tet:link-template/tet:te-link-attributes/" + + "tet:label-restrictions/tet:label-restriction/" + + "tet:label-step/tet:technology" { + description + "Augment TE label range step for the TE link template."; + case otn { + uses l1-types:otn-label-step; + } + } + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-routing-types@2017-12-04.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-routing-types@2017-12-04.yang new file mode 100644 index 0000000000000000000000000000000000000000..695d9eaeb9e771b945397c8b1c817ce91b0414af --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-routing-types@2017-12-04.yang @@ -0,0 +1,774 @@ + module ietf-routing-types { + namespace "urn:ietf:params:xml:ns:yang:ietf-routing-types"; + prefix rt-types; + + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF RTGWG - Routing Area Working Group"; + contact + "WG Web: + WG List: + + Editors: Xufeng Liu + + Yingzhen Qu + + Acee Lindem + + Christian Hopps + + Lou Berger + "; + + description + "This module contains a collection of YANG data types + considered generally useful for routing protocols. + + Copyright (c) 2017 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 8294; see + the RFC itself for full legal notices."; + + revision 2017-12-04 { + description "Initial revision."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area. + Section 3."; + } + + /*** Identities related to MPLS/GMPLS ***/ + + identity mpls-label-special-purpose-value { + description + "Base identity for deriving identities describing + special-purpose Multiprotocol Label Switching (MPLS) label + values."; + reference + "RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + identity ipv4-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv4 Explicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity router-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Router Alert Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity ipv6-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv6 Explicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity implicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Implicit NULL Label."; + reference + "RFC 3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity entropy-label-indicator { + base mpls-label-special-purpose-value; + description + "This identity represents the Entropy Label Indicator."; + reference + "RFC 6790: The Use of Entropy Labels in MPLS Forwarding. + Sections 3 and 10.1."; + } + + identity gal-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Generic Associated Channel + (G-ACh) Label (GAL)."; + reference + "RFC 5586: MPLS Generic Associated Channel. + Sections 4 and 10."; + } + + identity oam-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the OAM Alert Label."; + reference + "RFC 3429: Assignment of the 'OAM Alert Label' for + Multiprotocol Label Switching Architecture (MPLS) + Operation and Maintenance (OAM) Functions. + Sections 3 and 6."; + } + + identity extension-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Extension Label."; + reference + "RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels. Sections 3.1 and 5."; + } + + /*** Collection of types related to routing ***/ + + typedef router-id { + type yang:dotted-quad; + description + "A 32-bit number in the dotted-quad format assigned to each + router. This number uniquely identifies the router within + an Autonomous System."; + } + + /*** Collection of types related to VPNs ***/ + + typedef route-target { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + + description + "A Route Target is an 8-octet BGP extended community + initially identifying a set of sites in a BGP VPN + (RFC 4364). However, it has since taken on a more general + role in BGP route filtering. A Route Target consists of two + or three fields: a 2-octet Type field, an administrator + field, and, optionally, an assigned number field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + Route Target types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef ipv6-route-target { + type string { + pattern + '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 Route Target is a 20-octet BGP IPv6 Address + Specific Extended Community serving the same function + as a standard 8-octet Route Target, except that it only + allows an IPv6 address as the global administrator. + The format is . + + Two valid examples are 2001:db8::1:6544 and + 2001:db8::5eb1:791:6b37:17958."; + reference + "RFC 5701: IPv6 Address Specific BGP Extended Community + Attribute."; + } + + typedef route-target-type { + type enumeration { + enum import { + value 0; + description + "The Route Target applies to route import."; + } + enum export { + value 1; + description + "The Route Target applies to route export."; + } + + enum both { + value 2; + description + "The Route Target applies to both route import and + route export."; + } + } + description + "Indicates the role a Route Target takes in route filtering."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)."; + } + + typedef route-distinguisher { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + + description + "A Route Distinguisher is an 8-octet value used to + distinguish routes from different BGP VPNs (RFC 4364). + A Route Distinguisher will have the same format as a + Route Target as per RFC 4360 and will consist of + two or three fields: a 2-octet Type field, an administrator + field, and, optionally, an assigned number field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + route discriminator types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef route-origin { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + description + "A Route Origin is an 8-octet BGP extended community + identifying the set of sites where the BGP route + originated (RFC 4364). A Route Origin will have the same + format as a Route Target as per RFC 4360 and will consist + of two or three fields: a 2-octet Type field, an + administrator field, and, optionally, an assigned number + field. + + According to the data formats for types 0, 1, 2, and 6 as + defined in RFC 4360, RFC 5668, and RFC 7432, the encoding + pattern is defined as: + + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number + 6:6-octet-mac-address + + Additionally, a generic pattern is defined for future + Route Origin types: + + 2-octet-other-hex-number:6-octet-hex-number + + Some valid examples are 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203, and 6:26:00:08:92:78:00."; + reference + "RFC 4360: BGP Extended Communities Attribute. + RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 5668: 4-Octet AS Specific BGP Extended Community. + RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + typedef ipv6-route-origin { + type string { + pattern + '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 Route Origin is a 20-octet BGP IPv6 Address + Specific Extended Community serving the same function + as a standard 8-octet route, except that it only allows + an IPv6 address as the global administrator. The format + is . + + Two valid examples are 2001:db8::1:6544 and + 2001:db8::5eb1:791:6b37:17958."; + reference + "RFC 5701: IPv6 Address Specific BGP Extended Community + Attribute."; + } + + /*** Collection of types common to multicast ***/ + + typedef ipv4-multicast-group-address { + type inet:ipv4-address { + pattern '(2((2[4-9])|(3[0-9]))\.).*'; + } + description + "This type represents an IPv4 multicast group address, + which is in the range of 224.0.0.0 to 239.255.255.255."; + reference + "RFC 1112: Host Extensions for IP Multicasting."; + } + + typedef ipv6-multicast-group-address { + type inet:ipv6-address { + pattern '(([fF]{2}[0-9a-fA-F]{2}):).*'; + } + description + "This type represents an IPv6 multicast group address, + which is in the range of ff00::/8."; + reference + "RFC 4291: IP Version 6 Addressing Architecture. Section 2.7. + RFC 7346: IPv6 Multicast Address Scopes."; + } + + typedef ip-multicast-group-address { + type union { + type ipv4-multicast-group-address; + type ipv6-multicast-group-address; + } + description + "This type represents a version-neutral IP multicast group + address. The format of the textual representation implies + the IP version."; + } + + typedef ipv4-multicast-source-address { + type union { + type enumeration { + enum * { + description + "Any source address."; + } + } + type inet:ipv4-address; + } + description + "Multicast source IPv4 address type."; + } + + typedef ipv6-multicast-source-address { + type union { + type enumeration { + enum * { + description + "Any source address."; + } + } + type inet:ipv6-address; + } + description + "Multicast source IPv6 address type."; + } + + /*** Collection of types common to protocols ***/ + + typedef bandwidth-ieee-float32 { + type string { + pattern + '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([0-9a-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|' + + '1[01][0-9]|0?[0-9]?[0-9])?)'; + } + description + "Bandwidth in IEEE 754 floating-point 32-bit binary format: + (-1)**(S) * 2**(Exponent-127) * (1 + Fraction), + where Exponent uses 8 bits and Fraction uses 23 bits. + The units are octets per second. + The encoding format is the external hexadecimal-significant + character sequences specified in IEEE 754 and ISO/IEC C99. + The format is restricted to be normalized, non-negative, and + non-fraction: 0x1.hhhhhhp{+}d, 0X1.HHHHHHP{+}D, or 0x0p0, + where 'h' and 'H' are hexadecimal digits and 'd' and 'D' are + integers in the range of [0..127]. + + When six hexadecimal digits are used for 'hhhhhh' or + 'HHHHHH', the least significant digit must be an even + number. 'x' and 'X' indicate hexadecimal; 'p' and 'P' + indicate a power of two. Some examples are 0x0p0, 0x1p10, + and 0x1.abcde2p+20."; + reference + "IEEE Std 754-2008: IEEE Standard for Floating-Point + Arithmetic. + ISO/IEC C99: Information technology - Programming + Languages - C."; + } + + typedef link-access-type { + type enumeration { + enum broadcast { + description + "Specify broadcast multi-access network."; + } + enum non-broadcast-multiaccess { + description + "Specify Non-Broadcast Multi-Access (NBMA) network."; + } + enum point-to-multipoint { + description + "Specify point-to-multipoint network."; + } + enum point-to-point { + description + "Specify point-to-point network."; + } + } + description + "Link access type."; + } + + typedef timer-multiplier { + type uint8; + description + "The number of timer value intervals that should be + interpreted as a failure."; + } + + typedef timer-value-seconds16 { + type union { + type uint16 { + range "1..65535"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (16-bit range)."; + } + + typedef timer-value-seconds32 { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (32-bit range)."; + } + + typedef timer-value-milliseconds { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum infinity { + description + "The timer is set to infinity."; + } + enum not-set { + description + "The timer is not set."; + } + } + } + units "milliseconds"; + description + "Timer value type, in milliseconds."; + } + + typedef percentage { + type uint8 { + range "0..100"; + } + description + "Integer indicating a percentage value."; + } + + typedef timeticks64 { + type uint64; + description + "This type is based on the timeticks type defined in + RFC 6991, but with 64-bit width. It represents the time, + modulo 2^64, in hundredths of a second between two epochs."; + reference + "RFC 6991: Common YANG Data Types."; + } + + typedef uint24 { + type uint32 { + range "0..16777215"; + } + description + "24-bit unsigned integer."; + } + + /*** Collection of types related to MPLS/GMPLS ***/ + + typedef generalized-label { + type binary; + description + "Generalized Label. Nodes sending and receiving the + Generalized Label are aware of the link-specific + label context and type."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description. Section 3.2."; + } + + typedef mpls-label-special-purpose { + type identityref { + base mpls-label-special-purpose-value; + } + description + "This type represents the special-purpose MPLS label values."; + reference + "RFC 3032: MPLS Label Stack Encoding. + RFC 7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + typedef mpls-label-general-use { + type uint32 { + range "16..1048575"; + } + description + "The 20-bit label value in an MPLS label stack as specified + in RFC 3032. This label value does not include the + encodings of Traffic Class and TTL (Time to Live). + The label range specified by this type is for general use, + with special-purpose MPLS label values excluded."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + + typedef mpls-label { + type union { + type mpls-label-special-purpose; + type mpls-label-general-use; + } + description + "The 20-bit label value in an MPLS label stack as specified + in RFC 3032. This label value does not include the + encodings of Traffic Class and TTL."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + + /*** Groupings **/ + + grouping mpls-label-stack { + description + "This grouping specifies an MPLS label stack. The label + stack is encoded as a list of label stack entries. The + list key is an identifier that indicates the relative + ordering of each entry, with the lowest-value identifier + corresponding to the top of the label stack."; + container mpls-label-stack { + description + "Container for a list of MPLS label stack entries."; + list entry { + key "id"; + description + "List of MPLS label stack entries."; + leaf id { + type uint8; + description + "Identifies the entry in a sequence of MPLS label + stack entries. An entry with a smaller identifier + value precedes an entry with a larger identifier + value in the label stack. The value of this ID has + no semantic meaning other than relative ordering + and referencing the entry."; + } + leaf label { + type rt-types:mpls-label; + description + "Label value."; + } + + leaf ttl { + type uint8; + description + "Time to Live (TTL)."; + reference + "RFC 3032: MPLS Label Stack Encoding."; + } + leaf traffic-class { + type uint8 { + range "0..7"; + } + description + "Traffic Class (TC)."; + reference + "RFC 5462: Multiprotocol Label Switching (MPLS) Label + Stack Entry: 'EXP' Field Renamed to 'Traffic Class' + Field."; + } + } + } + } + + grouping vpn-route-targets { + description + "A grouping that specifies Route Target import-export rules + used in BGP-enabled VPNs."; + reference + "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC 4664: Framework for Layer 2 Virtual Private Networks + (L2VPNs)."; + list vpn-target { + key "route-target"; + description + "List of Route Targets."; + leaf route-target { + type rt-types:route-target; + description + "Route Target value."; + } + leaf route-target-type { + type rt-types:route-target-type; + mandatory true; + description + "Import/export type of the Route Target."; + } + } + } + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-packet-types@2020-06-10.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-packet-types@2020-06-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..8e7d4aafadcc34ec21dbf553d72852dc64624c4a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-packet-types@2020-06-10.yang @@ -0,0 +1,475 @@ +module ietf-te-packet-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-packet-types"; + prefix te-packet-types; + + /* Import TE generic types */ + + import ietf-te-types { + prefix te-types; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: + WG List: + + Editor: Tarek Saad + + + Editor: Rakesh Gandhi + + + Editor: Vishnu Pavan Beeram + + + Editor: Xufeng Liu + + + Editor: Igor Bryskin + "; + description + "This YANG module contains a collection of generally useful YANG + data type definitions specific to MPLS TE. The model fully + conforms to the Network Management Datastore Architecture + (NMDA). + + Copyright (c) 2020 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 8776; see the + RFC itself for full legal notices."; + + revision 2020-06-10 { + description + "Latest revision of TE MPLS types."; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + + /** + * Typedefs + */ + + typedef te-bandwidth-requested-type { + type enumeration { + enum specified { + description + "Bandwidth is explicitly specified."; + } + enum auto { + description + "Bandwidth is automatically computed."; + } + } + description + "Enumerated type for specifying whether bandwidth is + explicitly specified or automatically computed."; + } + + typedef te-class-type { + type uint8; + description + "Diffserv-TE Class-Type. Defines a set of Traffic Trunks + crossing a link that is governed by a specific set of + bandwidth constraints. Class-Type is used for the purposes + of link bandwidth allocation, constraint-based routing, and + admission control."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering"; + } + + typedef bc-type { + type uint8 { + range "0..7"; + } + description + "Diffserv-TE bandwidth constraints as defined in RFC 4124."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering"; + } + + typedef bandwidth-kbps { + type uint64; + units "Kbps"; + description + "Bandwidth values, expressed in kilobits per second."; + } + + typedef bandwidth-mbps { + type uint64; + units "Mbps"; + description + "Bandwidth values, expressed in megabits per second."; + } + + typedef bandwidth-gbps { + type uint64; + units "Gbps"; + description + "Bandwidth values, expressed in gigabits per second."; + } + + identity backup-protection-type { + description + "Base identity for the backup protection type."; + } + + identity backup-protection-link { + base backup-protection-type; + description + "Backup provides link protection only."; + } + + identity backup-protection-node-link { + base backup-protection-type; + description + "Backup offers node (preferred) or link protection."; + } + + identity bc-model-type { + description + "Base identity for the Diffserv-TE Bandwidth Constraints + Model type."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering"; + } + + identity bc-model-rdm { + base bc-model-type; + description + "Russian Dolls Bandwidth Constraints Model type."; + reference + "RFC 4127: Russian Dolls Bandwidth Constraints Model for + Diffserv-aware MPLS Traffic Engineering"; + } + + identity bc-model-mam { + base bc-model-type; + description + "Maximum Allocation Bandwidth Constraints Model type."; + reference + "RFC 4125: Maximum Allocation Bandwidth Constraints Model for + Diffserv-aware MPLS Traffic Engineering"; + } + + identity bc-model-mar { + base bc-model-type; + description + "Maximum Allocation with Reservation Bandwidth Constraints + Model type."; + reference + "RFC 4126: Max Allocation with Reservation Bandwidth + Constraints Model for Diffserv-aware MPLS Traffic Engineering + & Performance Comparisons"; + } + + grouping performance-metrics-attributes-packet { + description + "Contains PM attributes."; + uses te-types:performance-metrics-attributes { + augment "performance-metrics-one-way" { + leaf one-way-min-delay { + type uint32 { + range "0..16777215"; + } + description + "One-way minimum delay or latency in microseconds."; + } + leaf one-way-min-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "One-way minimum delay or latency normality."; + } + leaf one-way-max-delay { + type uint32 { + range "0..16777215"; + } + description + "One-way maximum delay or latency in microseconds."; + } + leaf one-way-max-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "One-way maximum delay or latency normality."; + } + leaf one-way-delay-variation { + type uint32 { + range "0..16777215"; + } + description + "One-way delay variation in microseconds."; + reference + "RFC 5481: Packet Delay Variation Applicability + Statement, Section 4.2"; + } + leaf one-way-delay-variation-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "One-way delay variation normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + leaf one-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + description + "One-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision + is 0.000003%, where the maximum is 50.331642%."; + reference + "RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions, Section 4.4"; + } + leaf one-way-packet-loss-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Packet loss normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + description + "PM one-way packet-specific augmentation for a generic PM + grouping."; + } + augment "performance-metrics-two-way" { + leaf two-way-min-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way minimum delay or latency in microseconds."; + } + leaf two-way-min-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way minimum delay or latency normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + leaf two-way-max-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way maximum delay or latency in microseconds."; + } + leaf two-way-max-delay-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way maximum delay or latency normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + leaf two-way-delay-variation { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way delay variation in microseconds."; + reference + "RFC 5481: Packet Delay Variation Applicability + Statement, Section 4.2"; + } + leaf two-way-delay-variation-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way delay variation normality."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric + Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + leaf two-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + default "0"; + description + "Two-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision + is 0.000003%."; + } + leaf two-way-packet-loss-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Two-way packet loss normality."; + } + description + "PM two-way packet-specific augmentation for a generic PM + grouping."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for + Explicitly Routed Label Switched Paths (LSPs) Using + TE Metric Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions"; + } + } + } + + grouping one-way-performance-metrics-packet { + description + "One-way packet PM throttle grouping."; + leaf one-way-min-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way minimum delay or latency in microseconds."; + } + leaf one-way-max-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way maximum delay or latency in microseconds."; + } + leaf one-way-delay-variation { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way delay variation in microseconds."; + } + leaf one-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + default "0"; + description + "One-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision is + 0.000003%."; + } + } + + grouping two-way-performance-metrics-packet { + description + "Two-way packet PM throttle grouping."; + leaf two-way-min-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way minimum delay or latency in microseconds."; + } + leaf two-way-max-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way maximum delay or latency in microseconds."; + } + leaf two-way-delay-variation { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way delay variation in microseconds."; + } + leaf two-way-packet-loss { + type decimal64 { + fraction-digits 6; + range "0..50.331642"; + } + default "0"; + description + "Two-way packet loss as a percentage of the total traffic + sent over a configurable interval. The finest precision is + 0.000003%."; + } + } + + grouping performance-metrics-throttle-container-packet { + description + "Packet PM threshold grouping."; + uses te-types:performance-metrics-throttle-container { + augment "throttle/threshold-out" { + uses one-way-performance-metrics-packet; + uses two-way-performance-metrics-packet; + description + "PM threshold-out packet augmentation for a + generic grouping."; + } + augment "throttle/threshold-in" { + uses one-way-performance-metrics-packet; + uses two-way-performance-metrics-packet; + description + "PM threshold-in packet augmentation for a + generic grouping."; + } + augment "throttle/threshold-accelerated-advertisement" { + uses one-way-performance-metrics-packet; + uses two-way-performance-metrics-packet; + description + "PM accelerated advertisement packet augmentation for a + generic grouping."; + } + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-topology@2020-08-06.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-topology@2020-08-06.yang new file mode 100644 index 0000000000000000000000000000000000000000..6d76a77b21ba5609094a670290e5bd81562c3022 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-topology@2020-08-06.yang @@ -0,0 +1,1952 @@ +module ietf-te-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-topology"; + prefix tet; + + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-te-types { + prefix te-types; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + import ietf-network-topology { + prefix nt; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: + WG List: + + Editor: Xufeng Liu + + + Editor: Igor Bryskin + + + Editor: Vishnu Pavan Beeram + + + Editor: Tarek Saad + + + Editor: Himanshu Shah + + + Editor: Oscar Gonzalez de Dios + "; + description + "This YANG module defines a TE topology model for representing, + retrieving, and manipulating technology-agnostic TE topologies. + + Copyright (c) 2020 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 8795; see the + RFC itself for full legal notices."; + + revision 2020-08-06 { + description + "Initial revision."; + reference + "RFC 8795: YANG Data Model for Traffic Engineering (TE) + Topologies"; + } + + /* + * Features + */ + + feature nsrlg { + description + "This feature indicates that the system supports NSRLGs + (Non-Shared Risk Link Groups)."; + } + + feature te-topology-hierarchy { + description + "This feature indicates that the system allows an underlay + and/or overlay TE topology hierarchy."; + } + + feature template { + description + "This feature indicates that the system supports + template configuration."; + } + + /* + * Typedefs + */ + + typedef geographic-coordinate-degree { + type decimal64 { + fraction-digits 8; + } + description + "Decimal degree (DD) used to express latitude and longitude + geographic coordinates."; + } + // geographic-coordinate-degree + + typedef te-info-source { + type enumeration { + enum unknown { + description + "The source is unknown."; + } + enum locally-configured { + description + "Configured entity."; + } + enum ospfv2 { + description + "OSPFv2."; + } + enum ospfv3 { + description + "OSPFv3."; + } + enum isis { + description + "IS-IS."; + } + enum bgp-ls { + description + "BGP-LS."; + reference + "RFC 7752: North-Bound Distribution of Link-State and + Traffic Engineering (TE) Information Using BGP"; + } + enum system-processed { + description + "System-processed entity."; + } + enum other { + description + "Other source."; + } + } + description + "Describes the type of source that has provided the + related information, and the source's credibility."; + } + // te-info-source + + /* + * Groupings + */ + + grouping connectivity-matrix-entry-path-attributes { + description + "Attributes of a connectivity matrix entry."; + leaf is-allowed { + type boolean; + description + "'true' - switching is allowed; + 'false' - switching is disallowed."; + } + container underlay { + if-feature "te-topology-hierarchy"; + description + "Attributes of the TE link underlay."; + reference + "RFC 4206: Label Switched Paths (LSP) Hierarchy with + Generalized Multi-Protocol Label Switching (GMPLS) + Traffic Engineering (TE)"; + uses te-link-underlay-attributes; + } + uses te-types:generic-path-constraints; + uses te-types:generic-path-optimization; + uses te-types:generic-path-properties; + } + // connectivity-matrix-entry-path-attributes + + grouping geolocation-container { + description + "Contains a GPS location."; + container geolocation { + config false; + description + "Contains a GPS location."; + leaf altitude { + type int64; + units "millimeters"; + description + "Distance above sea level."; + } + leaf latitude { + type geographic-coordinate-degree { + range "-90..90"; + } + description + "Relative position north or south on the Earth's surface."; + } + leaf longitude { + type geographic-coordinate-degree { + range "-180..180"; + } + description + "Angular distance east or west on the Earth's surface."; + } + } + // geolocation + } + // geolocation-container + + grouping information-source-state-attributes { + description + "The attributes identifying the source that has provided the + related information, and the source's credibility."; + leaf credibility-preference { + type uint16; + description + "The preference value for calculating the Traffic + Engineering database credibility value used for + tie-break selection between different information-source + values. A higher value is preferable."; + } + leaf logical-network-element { + type string; + description + "When applicable, this is the name of a logical network + element from which the information is learned."; + } + leaf network-instance { + type string; + description + "When applicable, this is the name of a network instance + from which the information is learned."; + } + } + // information-source-state-attributes + + grouping information-source-per-link-attributes { + description + "Per-node container of the attributes identifying the source + that has provided the related information, and the source's + credibility."; + leaf information-source { + type te-info-source; + config false; + description + "Indicates the type of information source."; + } + leaf information-source-instance { + type string; + config false; + description + "The name indicating the instance of the information + source."; + } + container information-source-state { + config false; + description + "Contains state attributes related to the information + source."; + uses information-source-state-attributes; + container topology { + description + "When the information is processed by the system, + the attributes in this container indicate which topology + is used to generate the result information."; + uses nt:link-ref; + } + } + } + // information-source-per-link-attributes + + grouping information-source-per-node-attributes { + description + "Per-node container of the attributes identifying the source + that has provided the related information, and the source's + credibility."; + leaf information-source { + type te-info-source; + config false; + description + "Indicates the type of information source."; + } + leaf information-source-instance { + type string; + config false; + description + "The name indicating the instance of the information + source."; + } + container information-source-state { + config false; + description + "Contains state attributes related to the information + source."; + uses information-source-state-attributes; + container topology { + description + "When the information is processed by the system, + the attributes in this container indicate which topology + is used to generate the result information."; + uses nw:node-ref; + } + } + } + // information-source-per-node-attributes + + grouping interface-switching-capability-list { + description + "List of Interface Switching Capability Descriptors (ISCDs)."; + list interface-switching-capability { + key "switching-capability encoding"; + description + "List of ISCDs for this link."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description + RFC 4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS)"; + leaf switching-capability { + type identityref { + base te-types:switching-capabilities; + } + description + "Switching capability for this interface."; + } + leaf encoding { + type identityref { + base te-types:lsp-encoding-types; + } + description + "Encoding supported by this interface."; + } + uses te-link-iscd-attributes; + } + // interface-switching-capability + } + // interface-switching-capability-list + + grouping statistics-per-link { + description + "Statistics attributes per TE link."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time of the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + /* Administrative attributes */ + leaf disables { + type yang:counter32; + description + "Number of times that a link was disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that a link was enabled."; + } + leaf maintenance-clears { + type yang:counter32; + description + "Number of times that a link was taken out of maintenance."; + } + leaf maintenance-sets { + type yang:counter32; + description + "Number of times that a link was put in maintenance."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that a link was modified."; + } + /* Operational attributes */ + leaf downs { + type yang:counter32; + description + "Number of times that a link was set to an operational state + of 'down'."; + } + leaf ups { + type yang:counter32; + description + "Number of times that a link was set to an operational state + of 'up'."; + } + /* Recovery attributes */ + leaf fault-clears { + type yang:counter32; + description + "Number of times that a link experienced a fault-clear + event."; + } + leaf fault-detects { + type yang:counter32; + description + "Number of times that a link experienced fault detection."; + } + leaf protection-switches { + type yang:counter32; + description + "Number of times that a link experienced protection + switchover."; + } + leaf protection-reverts { + type yang:counter32; + description + "Number of times that a link experienced protection + reversion."; + } + leaf restoration-failures { + type yang:counter32; + description + "Number of times that a link experienced restoration + failure."; + } + leaf restoration-starts { + type yang:counter32; + description + "Number of times that a link experienced restoration + start."; + } + leaf restoration-successes { + type yang:counter32; + description + "Number of times that a link experienced restoration + success."; + } + leaf restoration-reversion-failures { + type yang:counter32; + description + "Number of times that a link experienced restoration + reversion failure."; + } + leaf restoration-reversion-starts { + type yang:counter32; + description + "Number of times that a link experienced restoration + reversion start."; + } + leaf restoration-reversion-successes { + type yang:counter32; + description + "Number of times that a link experienced restoration + reversion success."; + } + } + // statistics-per-link + + grouping statistics-per-node { + description + "Statistics attributes per TE node."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time of the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + container node { + description + "Contains statistics attributes at the TE node level."; + leaf disables { + type yang:counter32; + description + "Number of times that a node was disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that a node was enabled."; + } + leaf maintenance-sets { + type yang:counter32; + description + "Number of times that a node was put in maintenance."; + } + leaf maintenance-clears { + type yang:counter32; + description + "Number of times that a node was taken out of + maintenance."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that a node was modified."; + } + } + // node + container connectivity-matrix-entry { + description + "Contains statistics attributes at the level of a + connectivity matrix entry."; + leaf creates { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + created."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 7.2, 'create' operation"; + } + leaf deletes { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + deleted."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 7.2, 'delete' operation"; + } + leaf disables { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + enabled."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that a connectivity matrix entry was + modified."; + } + } + // connectivity-matrix-entry + } + // statistics-per-node + + grouping statistics-per-ttp { + description + "Statistics attributes per TE TTP (Tunnel Termination Point)."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time of the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + container tunnel-termination-point { + description + "Contains statistics attributes at the TE TTP level."; + /* Administrative attributes */ + leaf disables { + type yang:counter32; + description + "Number of times that a TTP was disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that a TTP was enabled."; + } + leaf maintenance-clears { + type yang:counter32; + description + "Number of times that a TTP was taken out of maintenance."; + } + leaf maintenance-sets { + type yang:counter32; + description + "Number of times that a TTP was put in maintenance."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that a TTP was modified."; + } + /* Operational attributes */ + leaf downs { + type yang:counter32; + description + "Number of times that a TTP was set to an operational state + of 'down'."; + } + leaf ups { + type yang:counter32; + description + "Number of times that a TTP was set to an operational state + of 'up'."; + } + leaf in-service-clears { + type yang:counter32; + description + "Number of times that a TTP was taken out of service + (TE tunnel was released)."; + } + leaf in-service-sets { + type yang:counter32; + description + "Number of times that a TTP was put in service by a TE + tunnel (TE tunnel was set up)."; + } + } + // tunnel-termination-point + container local-link-connectivity { + description + "Contains statistics attributes at the TE LLCL (Local Link + Connectivity List) level."; + leaf creates { + type yang:counter32; + description + "Number of times that an LLCL entry was created."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 7.2, 'create' operation"; + } + leaf deletes { + type yang:counter32; + description + "Number of times that an LLCL entry was deleted."; + reference + "RFC 6241: Network Configuration Protocol (NETCONF), + Section 7.2, 'delete' operation"; + } + leaf disables { + type yang:counter32; + description + "Number of times that an LLCL entry was disabled."; + } + leaf enables { + type yang:counter32; + description + "Number of times that an LLCL entry was enabled."; + } + leaf modifies { + type yang:counter32; + description + "Number of times that an LLCL entry was modified."; + } + } + // local-link-connectivity + } + // statistics-per-ttp + + grouping te-link-augment { + description + "Augmentation for a TE link."; + uses te-link-config; + uses te-link-state-derived; + container statistics { + config false; + description + "Statistics data."; + uses statistics-per-link; + } + } + // te-link-augment + + grouping te-link-config { + description + "TE link configuration grouping."; + choice bundle-stack-level { + description + "The TE link can be partitioned into bundled links or + component links."; + case bundle { + container bundled-links { + description + "A set of bundled links."; + reference + "RFC 4201: Link Bundling in MPLS Traffic + Engineering (TE)"; + list bundled-link { + key "sequence"; + description + "Specifies a bundled interface that is + further partitioned."; + leaf sequence { + type uint32; + description + "Identifies the sequence in the bundle."; + } + } + } + } + case component { + container component-links { + description + "A set of component links."; + list component-link { + key "sequence"; + description + "Specifies a component interface that is + sufficient to unambiguously identify the + appropriate resources."; + leaf sequence { + type uint32; + description + "Identifies the sequence in the bundle."; + } + leaf src-interface-ref { + type string; + description + "Reference to a component link interface on the + source node."; + } + leaf des-interface-ref { + type string; + description + "Reference to a component link interface on the + destination node."; + } + } + } + } + } + // bundle-stack-level + leaf-list te-link-template { + if-feature "template"; + type leafref { + path "../../../../te/templates/link-template/name"; + } + description + "The reference to a TE link template."; + } + uses te-link-config-attributes; + } + // te-link-config + + grouping te-link-config-attributes { + description + "Link configuration attributes in a TE topology."; + container te-link-attributes { + description + "Link attributes in a TE topology."; + leaf access-type { + type te-types:te-link-access-type; + description + "Link access type, which can be point-to-point or + multi-access."; + } + container external-domain { + description + "For an inter-domain link, specifies the attributes of + the remote end of the link, to facilitate the signaling at + the local end."; + uses nw:network-ref; + leaf remote-te-node-id { + type te-types:te-node-id; + description + "Remote TE node identifier, used together with + 'remote-te-link-tp-id' to identify the remote Link + Termination Point (LTP) in a different domain."; + } + leaf remote-te-link-tp-id { + type te-types:te-tp-id; + description + "Remote TE LTP identifier, used together with + 'remote-te-node-id' to identify the remote LTP in a + different domain."; + } + } + leaf is-abstract { + type empty; + description + "Present if the link is abstract."; + } + leaf name { + type string; + description + "Link name."; + } + container underlay { + if-feature "te-topology-hierarchy"; + description + "Attributes of the TE link underlay."; + reference + "RFC 4206: Label Switched Paths (LSP) Hierarchy with + Generalized Multi-Protocol Label Switching (GMPLS) + Traffic Engineering (TE)"; + uses te-link-underlay-attributes; + } + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the link."; + } + uses te-link-info-attributes; + } + // te-link-attributes + } + // te-link-config-attributes + + grouping te-link-info-attributes { + description + "Advertised TE information attributes."; + leaf link-index { + type uint64; + description + "The link identifier. If OSPF is used, this object + represents an ospfLsdbID. If IS-IS is used, this object + represents an isisLSPID. If a locally configured link is + used, this object represents a unique value, which is + locally defined in a router."; + } + leaf administrative-group { + type te-types:admin-groups; + description + "Administrative group or color of the link. + This attribute covers both administrative groups (defined + in RFCs 3630 and 5305) and Extended Administrative Groups + (defined in RFC 7308)."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering + RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + uses interface-switching-capability-list; + uses te-types:label-set-info; + leaf link-protection-type { + type identityref { + base te-types:link-protection-type; + } + description + "Link Protection Type desired for this link."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS)"; + } + container max-link-bandwidth { + uses te-types:te-bandwidth; + description + "Maximum bandwidth that can be seen on this link in this + direction. Units are in bytes per second."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + container max-resv-link-bandwidth { + uses te-types:te-bandwidth; + description + "Maximum amount of bandwidth that can be reserved in this + direction in this link. Units are in bytes per second."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + list unreserved-bandwidth { + key "priority"; + max-elements 8; + description + "Unreserved bandwidth for priority levels 0-7. Units are in + bytes per second."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + leaf priority { + type uint8 { + range "0..7"; + } + description + "Priority."; + } + uses te-types:te-bandwidth; + } + leaf te-default-metric { + type uint32; + description + "Traffic Engineering metric."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + leaf te-delay-metric { + type uint32; + description + "Traffic Engineering delay metric."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions"; + } + leaf te-igp-metric { + type uint32; + description + "IGP metric used for Traffic Engineering."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + container te-srlgs { + description + "Contains a list of SRLGs."; + leaf-list value { + type te-types:srlg; + description + "SRLG value."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS)"; + } + } + container te-nsrlgs { + if-feature "nsrlg"; + description + "Contains a list of NSRLGs (Non-Shared Risk Link Groups). + When an abstract TE link is configured, this list specifies + the request that underlay TE paths need to be mutually + disjoint with other TE links in the same groups."; + leaf-list id { + type uint32; + description + "NSRLG ID, uniquely configured within a topology."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } + } + } + // te-link-info-attributes + + grouping te-link-iscd-attributes { + description + "TE link ISCD attributes."; + reference + "RFC 4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS), Section 1.4"; + list max-lsp-bandwidth { + key "priority"; + max-elements 8; + description + "Maximum Label Switched Path (LSP) bandwidth at + priorities 0-7."; + leaf priority { + type uint8 { + range "0..7"; + } + description + "Priority."; + } + uses te-types:te-bandwidth; + } + } + // te-link-iscd-attributes + + grouping te-link-state-derived { + description + "Link state attributes in a TE topology."; + leaf oper-status { + type te-types:te-oper-status; + config false; + description + "The current operational state of the link."; + } + leaf is-transitional { + type empty; + config false; + description + "Present if the link is transitional; used as an + alternative approach in lieu of 'inter-layer-lock-id' + for path computation in a TE topology covering multiple + layers or multiple regions."; + reference + "RFC 5212: Requirements for GMPLS-Based Multi-Region and + Multi-Layer Networks (MRN/MLN) + RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + } + uses information-source-per-link-attributes; + list information-source-entry { + key "information-source information-source-instance"; + config false; + description + "A list of information sources learned, including the source + that is used."; + uses information-source-per-link-attributes; + uses te-link-info-attributes; + } + container recovery { + config false; + description + "Status of the recovery process."; + leaf restoration-status { + type te-types:te-recovery-status; + description + "Restoration status."; + } + leaf protection-status { + type te-types:te-recovery-status; + description + "Protection status."; + } + } + container underlay { + if-feature "te-topology-hierarchy"; + config false; + description + "State attributes for the TE link underlay."; + leaf dynamic { + type boolean; + description + "'true' if the underlay is dynamically created."; + } + leaf committed { + type boolean; + description + "'true' if the underlay is committed."; + } + } + } + // te-link-state-derived + + grouping te-link-underlay-attributes { + description + "Attributes for the TE link underlay."; + reference + "RFC 4206: Label Switched Paths (LSP) Hierarchy with + Generalized Multi-Protocol Label Switching (GMPLS) + Traffic Engineering (TE)"; + leaf enabled { + type boolean; + description + "'true' if the underlay is enabled. + 'false' if the underlay is disabled."; + } + container primary-path { + description + "The service path on the underlay topology that + supports this link."; + uses nw:network-ref; + list path-element { + key "path-element-id"; + description + "A list of path elements describing the service path."; + leaf path-element-id { + type uint32; + description + "To identify the element in a path."; + } + uses te-path-element; + } + } + // primary-path + list backup-path { + key "index"; + description + "A list of backup service paths on the underlay topology that + protect the underlay primary path. If the primary path is + not protected, the list contains zero elements. If the + primary path is protected, the list contains one or more + elements."; + leaf index { + type uint32; + description + "A sequence number to identify a backup path."; + } + uses nw:network-ref; + list path-element { + key "path-element-id"; + description + "A list of path elements describing the backup service + path."; + leaf path-element-id { + type uint32; + description + "To identify the element in a path."; + } + uses te-path-element; + } + } + // backup-path + leaf protection-type { + type identityref { + base te-types:lsp-protection-type; + } + description + "Underlay protection type desired for this link."; + } + container tunnel-termination-points { + description + "Underlay TTPs desired for this link."; + leaf source { + type binary; + description + "Source TTP identifier."; + } + leaf destination { + type binary; + description + "Destination TTP identifier."; + } + } + container tunnels { + description + "Underlay TE tunnels supporting this TE link."; + leaf sharing { + type boolean; + default "true"; + description + "'true' if the underlay tunnel can be shared with other + TE links; + 'false' if the underlay tunnel is dedicated to this + TE link. + This leaf is the default option for all TE tunnels + and may be overridden by the per-TE-tunnel value."; + } + list tunnel { + key "tunnel-name"; + description + "Zero, one, or more underlay TE tunnels that support this + TE link."; + leaf tunnel-name { + type string; + description + "A tunnel name uniquely identifies an underlay TE tunnel, + used together with the 'source-node' value for this + link."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + leaf sharing { + type boolean; + description + "'true' if the underlay tunnel can be shared with other + TE links; + 'false' if the underlay tunnel is dedicated to this + TE link."; + } + } + // tunnel + } + // tunnels + } + // te-link-underlay-attributes + + grouping te-node-augment { + description + "Augmentation for a TE node."; + uses te-node-config; + uses te-node-state-derived; + container statistics { + config false; + description + "Statistics data."; + uses statistics-per-node; + } + list tunnel-termination-point { + key "tunnel-tp-id"; + description + "A termination point can terminate a tunnel."; + leaf tunnel-tp-id { + type binary; + description + "TTP identifier."; + } + uses te-node-tunnel-termination-point-config; + leaf oper-status { + type te-types:te-oper-status; + config false; + description + "The current operational state of the TTP."; + } + uses geolocation-container; + container statistics { + config false; + description + "Statistics data."; + uses statistics-per-ttp; + } + // Relationship to other TTPs + list supporting-tunnel-termination-point { + key "node-ref tunnel-tp-ref"; + description + "Identifies the TTPs on which this TTP depends."; + leaf node-ref { + type inet:uri; + description + "This leaf identifies the node in which the supporting + TTP is present. + This node is either the supporting node or a node in + an underlay topology."; + } + leaf tunnel-tp-ref { + type binary; + description + "Reference to a TTP that is in either the supporting node + or a node in an underlay topology."; + } + } + // supporting-tunnel-termination-point + } + // tunnel-termination-point + } + // te-node-augment + + grouping te-node-config { + description + "TE node configuration grouping."; + leaf-list te-node-template { + if-feature "template"; + type leafref { + path "../../../../te/templates/node-template/name"; + } + description + "The reference to a TE node template."; + } + uses te-node-config-attributes; + } + // te-node-config + + grouping te-node-config-attributes { + description + "Configuration node attributes in a TE topology."; + container te-node-attributes { + description + "Contains node attributes in a TE topology."; + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the link."; + } + uses te-node-connectivity-matrices; + uses te-node-info-attributes; + } + } + // te-node-config-attributes + + grouping te-node-config-attributes-template { + description + "Configuration node attributes for a template in a TE + topology."; + container te-node-attributes { + description + "Contains node attributes in a TE topology."; + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the link."; + } + uses te-node-info-attributes; + } + } + // te-node-config-attributes-template + + grouping te-node-connectivity-matrices { + description + "Connectivity matrix on a TE node."; + container connectivity-matrices { + description + "Contains a connectivity matrix on a TE node."; + leaf number-of-entries { + type uint16; + description + "The number of connectivity matrix entries. + If this number is specified in the configuration request, + the number is the requested number of entries, which may + not all be listed in the list; + if this number is reported in the state data, + the number is the current number of operational entries."; + } + uses te-types:label-set-info; + uses connectivity-matrix-entry-path-attributes; + list connectivity-matrix { + key "id"; + description + "Represents a node's switching limitations, i.e., + limitations in the interconnecting network TE links + across the node."; + reference + "RFC 7579: General Network Element Constraint Encoding + for GMPLS-Controlled Networks"; + leaf id { + type uint32; + description + "Identifies the connectivity matrix entry."; + } + } + // connectivity-matrix + } + // connectivity-matrices + } + // te-node-connectivity-matrices + + grouping te-node-connectivity-matrix-attributes { + description + "Termination point references of a connectivity matrix entry."; + container from { + description + "Reference to a source LTP."; + leaf tp-ref { + type leafref { + path "../../../../../../nt:termination-point/nt:tp-id"; + } + description + "Relative reference to a termination point."; + } + uses te-types:label-set-info; + } + container to { + description + "Reference to a destination LTP."; + leaf tp-ref { + type leafref { + path "../../../../../../nt:termination-point/nt:tp-id"; + } + description + "Relative reference to a termination point."; + } + uses te-types:label-set-info; + } + uses connectivity-matrix-entry-path-attributes; + } + // te-node-connectivity-matrix-attributes + + grouping te-node-info-attributes { + description + "Advertised TE information attributes."; + leaf domain-id { + type uint32; + description + "Identifies the domain to which this node belongs. + This attribute is used to support inter-domain links."; + reference + "RFC 5152: A Per-Domain Path Computation Method for + Establishing Inter-Domain Traffic Engineering (TE) + Label Switched Paths (LSPs) + RFC 5316: ISIS Extensions in Support of Inter-Autonomous + System (AS) MPLS and GMPLS Traffic Engineering + RFC 5392: OSPF Extensions in Support of Inter-Autonomous + System (AS) MPLS and GMPLS Traffic Engineering"; + } + leaf is-abstract { + type empty; + description + "Present if the node is abstract; not present if the node + is actual."; + } + leaf name { + type string; + description + "Node name."; + } + leaf-list signaling-address { + type inet:ip-address; + description + "The node's signaling address."; + } + container underlay-topology { + if-feature "te-topology-hierarchy"; + description + "When an abstract node encapsulates a topology, the + attributes in this container point to said topology."; + uses nw:network-ref; + } + } + // te-node-info-attributes + + grouping te-node-state-derived { + description + "Node state attributes in a TE topology."; + leaf oper-status { + type te-types:te-oper-status; + config false; + description + "The current operational state of the node."; + } + uses geolocation-container; + leaf is-multi-access-dr { + type empty; + config false; + description + "The presence of this attribute indicates that this TE node + is a pseudonode elected as a designated router."; + reference + "RFC 1195: Use of OSI IS-IS for Routing in TCP/IP and Dual + Environments + RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + uses information-source-per-node-attributes; + list information-source-entry { + key "information-source information-source-instance"; + config false; + description + "A list of information sources learned, including the source + that is used."; + uses information-source-per-node-attributes; + uses te-node-connectivity-matrices; + uses te-node-info-attributes; + } + } + // te-node-state-derived + + grouping te-node-tunnel-termination-point-config { + description + "Termination capability of a TTP on a TE node."; + uses te-node-tunnel-termination-point-config-attributes; + container local-link-connectivities { + description + "Contains an LLCL for a TTP on a TE node."; + leaf number-of-entries { + type uint16; + description + "The number of LLCL entries. + If this number is specified in the configuration request, + the number is the requested number of entries, which may + not all be listed in the list; + if this number is reported in the state data, + the number is the current number of operational entries."; + } + uses te-types:label-set-info; + uses connectivity-matrix-entry-path-attributes; + } + } + // te-node-tunnel-termination-point-config + + grouping te-node-tunnel-termination-point-config-attributes { + description + "Configuration attributes of a TTP on a TE node."; + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the TTP."; + } + leaf name { + type string; + description + "A descriptive name for the TTP."; + } + leaf switching-capability { + type identityref { + base te-types:switching-capabilities; + } + description + "Switching capability for this interface."; + } + leaf encoding { + type identityref { + base te-types:lsp-encoding-types; + } + description + "Encoding supported by this interface."; + } + leaf-list inter-layer-lock-id { + type uint32; + description + "Inter-layer lock ID, used for path computation in a TE + topology covering multiple layers or multiple regions."; + reference + "RFC 5212: Requirements for GMPLS-Based Multi-Region and + Multi-Layer Networks (MRN/MLN) + RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + } + leaf protection-type { + type identityref { + base te-types:lsp-protection-type; + } + description + "The protection type that this TTP is capable of."; + } + container client-layer-adaptation { + description + "Contains capability information to support a client-layer + adaptation in a multi-layer topology."; + list switching-capability { + key "switching-capability encoding"; + description + "List of supported switching capabilities."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS) + RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + leaf switching-capability { + type identityref { + base te-types:switching-capabilities; + } + description + "Switching capability for the client-layer adaptation."; + } + leaf encoding { + type identityref { + base te-types:lsp-encoding-types; + } + description + "Encoding supported by the client-layer adaptation."; + } + uses te-types:te-bandwidth; + } + } + } + // te-node-tunnel-termination-point-config-attributes + + grouping te-node-tunnel-termination-point-llc-list { + description + "LLCL of a TTP on a TE node."; + list local-link-connectivity { + key "link-tp-ref"; + description + "The termination capabilities between the TTP and the LTP. + This capability information can be used to compute + the tunnel path. + The Interface Adjustment Capability Descriptors (IACDs) + (defined in RFC 6001) on each LTP can be derived from + this list."; + reference + "RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + leaf link-tp-ref { + type leafref { + path "../../../../../nt:termination-point/nt:tp-id"; + } + description + "LTP."; + } + uses te-types:label-set-info; + uses connectivity-matrix-entry-path-attributes; + } + } + // te-node-tunnel-termination-point-llc-list + + grouping te-path-element { + description + "A group of attributes defining an element in a TE path, + such as a TE node, TE link, TE atomic resource, or label."; + uses te-types:explicit-route-hop; + } + // te-path-element + + grouping te-termination-point-augment { + description + "Augmentation for a TE termination point."; + leaf te-tp-id { + type te-types:te-tp-id; + description + "An identifier that uniquely identifies a TE termination + point."; + } + container te { + must '../te-tp-id'; + presence "TE support"; + description + "Indicates TE support."; + uses te-termination-point-config; + leaf oper-status { + type te-types:te-oper-status; + config false; + description + "The current operational state of the LTP."; + } + uses geolocation-container; + } + } + // te-termination-point-augment + + grouping te-termination-point-config { + description + "TE termination point configuration grouping."; + leaf admin-status { + type te-types:te-admin-status; + description + "The administrative state of the LTP."; + } + leaf name { + type string; + description + "A descriptive name for the LTP."; + } + uses interface-switching-capability-list; + leaf inter-domain-plug-id { + type binary; + description + "A network-wide unique number that identifies on the + network a connection that supports a given inter-domain + TE link. This is a more flexible alternative to specifying + 'remote-te-node-id' and 'remote-te-link-tp-id' on a TE link + when the provider either does not know 'remote-te-node-id' + and 'remote-te-link-tp-id' or needs to give the client the + flexibility to mix and match multiple topologies."; + } + leaf-list inter-layer-lock-id { + type uint32; + description + "Inter-layer lock ID, used for path computation in a TE + topology covering multiple layers or multiple regions."; + reference + "RFC 5212: Requirements for GMPLS-Based Multi-Region and + Multi-Layer Networks (MRN/MLN) + RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions + for Multi-Layer and Multi-Region Networks (MLN/MRN)"; + } + } + // te-termination-point-config + + grouping te-topologies-augment { + description + "Augmentation for TE topologies."; + container te { + presence "TE support"; + description + "Indicates TE support."; + container templates { + description + "Configuration parameters for templates used for a TE + topology."; + list node-template { + if-feature "template"; + key "name"; + leaf name { + type te-types:te-template-name; + description + "The name to identify a TE node template."; + } + description + "The list of TE node templates used to define sharable + and reusable TE node attributes."; + uses template-attributes; + uses te-node-config-attributes-template; + } + // node-template + list link-template { + if-feature "template"; + key "name"; + leaf name { + type te-types:te-template-name; + description + "The name to identify a TE link template."; + } + description + "The list of TE link templates used to define sharable + and reusable TE link attributes."; + uses template-attributes; + uses te-link-config-attributes; + } + // link-template + } + // templates + } + // te + } + // te-topologies-augment + + grouping te-topology-augment { + description + "Augmentation for a TE topology."; + uses te-types:te-topology-identifier; + container te { + must '../te-topology-identifier/provider-id' + + ' and ../te-topology-identifier/client-id' + + ' and ../te-topology-identifier/topology-id'; + presence "TE support"; + description + "Indicates TE support."; + uses te-topology-config; + uses geolocation-container; + } + } + // te-topology-augment + + grouping te-topology-config { + description + "TE topology configuration grouping."; + leaf name { + type string; + description + "Name of the TE topology. This attribute is optional and can + be specified by the operator to describe the TE topology, + which can be useful when 'network-id' (RFC 8345) is not + descriptive and not modifiable because of being generated + by the system."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + leaf preference { + type uint8 { + range "1..255"; + } + description + "Specifies a preference for this topology. A lower number + indicates a higher preference."; + } + leaf optimization-criterion { + type identityref { + base te-types:objective-function-type; + } + description + "Optimization criterion applied to this topology."; + reference + "RFC 3272: Overview and Principles of Internet Traffic + Engineering"; + } + list nsrlg { + if-feature "nsrlg"; + key "id"; + description + "List of NSRLGs (Non-Shared Risk Link Groups)."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + leaf id { + type uint32; + description + "Identifies the NSRLG entry."; + } + leaf disjointness { + type te-types:te-path-disjointness; + description + "The type of resource disjointness."; + } + } + // nsrlg + } + // te-topology-config + + grouping template-attributes { + description + "Common attributes for all templates."; + leaf priority { + type uint16; + description + "The preference value for resolving conflicts between + different templates. When two or more templates specify + values for one configuration attribute, the value from the + template with the highest priority is used. + A lower number indicates a higher priority. The highest + priority is 0."; + } + leaf reference-change-policy { + type enumeration { + enum no-action { + description + "When an attribute changes in this template, the + configuration node referring to this template does + not take any action."; + } + enum not-allowed { + description + "When any configuration object has a reference to this + template, changing this template is not allowed."; + } + enum cascade { + description + "When an attribute changes in this template, the + configuration object referring to this template applies + the new attribute value to the corresponding + configuration."; + } + } + description + "This attribute specifies the action taken for a + configuration node that has a reference to this template."; + } + } + // template-attributes + + /* + * Data nodes + */ + + augment "/nw:networks/nw:network/nw:network-types" { + description + "Introduces a new network type for a TE topology."; + container te-topology { + presence "Indicates a TE topology"; + description + "Its presence identifies the TE topology type."; + } + } + + augment "/nw:networks" { + description + "Augmentation parameters for TE topologies."; + uses te-topologies-augment; + } + + augment "/nw:networks/nw:network" { + when 'nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for a TE topology."; + uses te-topology-augment; + } + + augment "/nw:networks/nw:network/nw:node" { + when '../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the node level."; + leaf te-node-id { + type te-types:te-node-id; + description + "The identifier of a node in the TE topology. + A node is specific to a topology to which it belongs."; + } + container te { + must '../te-node-id' { + description + "'te-node-id' is mandatory."; + } + must 'count(../nw:supporting-node)<=1' { + description + "For a node in a TE topology, there cannot be more + than one supporting node. If multiple nodes are + abstracted, the 'underlay-topology' field is used."; + } + presence "TE support"; + description + "Indicates TE support."; + uses te-node-augment; + } + } + + augment "/nw:networks/nw:network/nt:link" { + when '../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the link level."; + container te { + must 'count(../nt:supporting-link)<=1' { + description + "For a link in a TE topology, there cannot be more + than one supporting link. If one or more link paths are + abstracted, the underlay is used."; + } + presence "TE support"; + description + "Indicates TE support."; + uses te-link-augment; + } + } + + augment "/nw:networks/nw:network/nw:node/" + + "nt:termination-point" { + when '../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Configuration parameters for TE at the termination point + level."; + uses te-termination-point-augment; + } + + augment "/nw:networks/nw:network/nt:link/te/bundle-stack-level/" + + "bundle/bundled-links/bundled-link" { + when '../../../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for a TE bundled link."; + leaf src-tp-ref { + type leafref { + path "../../../../../nw:node[nw:node-id = " + + "current()/../../../../nt:source/" + + "nt:source-node]/" + + "nt:termination-point/nt:tp-id"; + require-instance true; + } + description + "Reference to another TE termination point on the + same source node."; + } + leaf des-tp-ref { + type leafref { + path "../../../../../nw:node[nw:node-id = " + + "current()/../../../../nt:destination/" + + "nt:dest-node]/" + + "nt:termination-point/nt:tp-id"; + require-instance true; + } + description + "Reference to another TE termination point on the + same destination node."; + } + } + + augment "/nw:networks/nw:network/nw:node/te/" + + "information-source-entry/connectivity-matrices/" + + "connectivity-matrix" { + when '../../../../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for the TE node connectivity matrix."; + uses te-node-connectivity-matrix-attributes; + } + + augment "/nw:networks/nw:network/nw:node/te/te-node-attributes/" + + "connectivity-matrices/connectivity-matrix" { + when '../../../../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for the TE node connectivity matrix."; + uses te-node-connectivity-matrix-attributes; + } + + augment "/nw:networks/nw:network/nw:node/te/" + + "tunnel-termination-point/local-link-connectivities" { + when '../../../../nw:network-types/tet:te-topology' { + description + "Augmentation parameters apply only for networks with a + TE topology type."; + } + description + "Augmentation for TE node TTP LLCs (Local Link + Connectivities)."; + uses te-node-tunnel-termination-point-llc-list; + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-types@2020-06-10.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-types@2020-06-10.yang new file mode 100644 index 0000000000000000000000000000000000000000..6fc0544dede2128f3e91f8cf5a39caa8cc49ab6e --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-te-types@2020-06-10.yang @@ -0,0 +1,3379 @@ +module ietf-te-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-te-types"; + prefix te-types; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-yang-types { + prefix yang; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + contact + "WG Web: + WG List: + + Editor: Tarek Saad + + + Editor: Rakesh Gandhi + + + Editor: Vishnu Pavan Beeram + + + Editor: Xufeng Liu + + + Editor: Igor Bryskin + "; + description + "This YANG module contains a collection of generally useful + YANG data type definitions specific to TE. The model fully + conforms to the Network Management Datastore Architecture + (NMDA). + + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', + 'MAY', and 'OPTIONAL' in this document are to be interpreted as + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, + they appear in all capitals, as shown here. + + Copyright (c) 2020 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 8776; see the + RFC itself for full legal notices."; + + revision 2020-06-10 { + description + "Latest revision of TE types."; + reference + "RFC 8776: Common YANG Data Types for Traffic Engineering"; + } + + /** + * Typedefs + */ + + typedef admin-group { + type yang:hex-string { + /* 01:02:03:04 */ + length "1..11"; + } + description + "Administrative group / resource class / color representation + in 'hex-string' type. + The most significant byte in the hex-string is the farthest + to the left in the byte sequence. Leading zero bytes in the + configured value may be omitted for brevity."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering + RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + + typedef admin-groups { + type union { + type admin-group; + type extended-admin-group; + } + description + "Derived types for TE administrative groups."; + } + + typedef extended-admin-group { + type yang:hex-string; + description + "Extended administrative group / resource class / color + representation in 'hex-string' type. + The most significant byte in the hex-string is the farthest + to the left in the byte sequence. Leading zero bytes in the + configured value may be omitted for brevity."; + reference + "RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + + typedef path-attribute-flags { + type union { + type identityref { + base session-attributes-flags; + } + type identityref { + base lsp-attributes-flags; + } + } + description + "Path attributes flags type."; + } + + typedef performance-metrics-normality { + type enumeration { + enum unknown { + value 0; + description + "Unknown."; + } + enum normal { + value 1; + description + "Normal. Indicates that the anomalous bit is not set."; + } + enum abnormal { + value 2; + description + "Abnormal. Indicates that the anomalous bit is set."; + } + } + description + "Indicates whether a performance metric is normal (anomalous + bit not set), abnormal (anomalous bit set), or unknown."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + } + + typedef srlg { + type uint32; + description + "SRLG type."; + reference + "RFC 4203: OSPF Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS) + RFC 5307: IS-IS Extensions in Support of Generalized + Multi-Protocol Label Switching (GMPLS)"; + } + + typedef te-common-status { + type enumeration { + enum up { + description + "Enabled."; + } + enum down { + description + "Disabled."; + } + enum testing { + description + "In some test mode."; + } + enum preparing-maintenance { + description + "The resource is disabled in the control plane to prepare + for a graceful shutdown for maintenance purposes."; + reference + "RFC 5817: Graceful Shutdown in MPLS and Generalized MPLS + Traffic Engineering Networks"; + } + enum maintenance { + description + "The resource is disabled in the data plane for maintenance + purposes."; + } + enum unknown { + description + "Status is unknown."; + } + } + description + "Defines a type representing the common states of a TE + resource."; + } + + typedef te-bandwidth { + type string { + pattern '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?' + + '[pP](\+)?(12[0-7]|' + + '1[01]\d|0?\d?\d)?)|0[xX][\da-fA-F]{1,8}|\d+' + + '(,(0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?' + + '[pP](\+)?(12[0-7]|' + + '1[01]\d|0?\d?\d)?)|0[xX][\da-fA-F]{1,8}|\d+))*'; + } + description + "This is the generic bandwidth type. It is a string containing + a list of numbers separated by commas, where each of these + numbers can be non-negative decimal, hex integer, or + hex float: + + (dec | hex | float)[*(','(dec | hex | float))] + + For the packet-switching type, the string encoding follows + the type 'bandwidth-ieee-float32' as defined in RFC 8294 + (e.g., 0x1p10), where the units are in bytes per second. + + For the Optical Transport Network (OTN) switching type, + a list of integers can be used, such as '0,2,3,1', indicating + two ODU0s and one ODU3. ('ODU' stands for 'Optical Data + Unit'.) For Dense Wavelength Division Multiplexing (DWDM), + a list of pairs of slot numbers and widths can be used, + such as '0,2,3,3', indicating a frequency slot 0 with + slot width 2 and a frequency slot 3 with slot width 3. + Canonically, the string is represented as all lowercase and in + hex, where the prefix '0x' precedes the hex number."; + reference + "RFC 8294: Common YANG Data Types for the Routing Area + ITU-T Recommendation G.709: Interfaces for the + optical transport network"; + } + + typedef te-ds-class { + type uint8 { + range "0..7"; + } + description + "The Differentiated Services Class-Type of traffic."; + reference + "RFC 4124: Protocol Extensions for Support of Diffserv-aware + MPLS Traffic Engineering, Section 4.3.1"; + } + + typedef te-global-id { + type uint32; + description + "An identifier to uniquely identify an operator, which can be + either a provider or a client. + The definition of this type is taken from RFCs 6370 and 5003. + This attribute type is used solely to provide a globally + unique context for TE topologies."; + reference + "RFC 5003: Attachment Individual Identifier (AII) Types for + Aggregation + RFC 6370: MPLS Transport Profile (MPLS-TP) Identifiers"; + } + + typedef te-hop-type { + type enumeration { + enum loose { + description + "A loose hop in an explicit path."; + } + enum strict { + description + "A strict hop in an explicit path."; + } + } + description + "Enumerated type for specifying loose or strict paths."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3.3"; + } + + typedef te-link-access-type { + type enumeration { + enum point-to-point { + description + "The link is point-to-point."; + } + enum multi-access { + description + "The link is multi-access, including broadcast and NBMA."; + } + } + description + "Defines a type representing the access type of a TE link."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + + typedef te-label-direction { + type enumeration { + enum forward { + description + "Label allocated for the forward LSP direction."; + } + enum reverse { + description + "Label allocated for the reverse LSP direction."; + } + } + description + "Enumerated type for specifying the forward or reverse + label."; + } + + typedef te-link-direction { + type enumeration { + enum incoming { + description + "The explicit route represents an incoming link on + a node."; + } + enum outgoing { + description + "The explicit route represents an outgoing link on + a node."; + } + } + description + "Enumerated type for specifying the direction of a link on + a node."; + } + + typedef te-metric { + type uint32; + description + "TE metric."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + + typedef te-node-id { + type yang:dotted-quad; + description + "A type representing the identifier for a node in a TE + topology. + The identifier is represented as 4 octets in dotted-quad + notation. + This attribute MAY be mapped to the Router Address TLV + described in Section 2.4.1 of RFC 3630, the TE Router ID + described in Section 3 of RFC 6827, the Traffic Engineering + Router ID TLV described in Section 4.3 of RFC 5305, or the + TE Router ID TLV described in Section 3.2.1 of RFC 6119. + The reachability of such a TE node MAY be achieved by a + mechanism such as that described in Section 6.2 of RFC 6827."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2, Section 2.4.1 + RFC 5305: IS-IS Extensions for Traffic Engineering, + Section 4.3 + RFC 6119: IPv6 Traffic Engineering in IS-IS, Section 3.2.1 + RFC 6827: Automatically Switched Optical Network (ASON) + Routing for OSPFv2 Protocols, Section 3"; + } + + typedef te-oper-status { + type te-common-status; + description + "Defines a type representing the operational status of + a TE resource."; + } + + typedef te-admin-status { + type te-common-status; + description + "Defines a type representing the administrative status of + a TE resource."; + } + + typedef te-path-disjointness { + type bits { + bit node { + position 0; + description + "Node disjoint."; + } + bit link { + position 1; + description + "Link disjoint."; + } + bit srlg { + position 2; + description + "SRLG (Shared Risk Link Group) disjoint."; + } + } + description + "Type of the resource disjointness for a TE tunnel path."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + typedef te-recovery-status { + type enumeration { + enum normal { + description + "Both the recovery span and the working span are fully + allocated and active, data traffic is being + transported over (or selected from) the working + span, and no trigger events are reported."; + } + enum recovery-started { + description + "The recovery action has been started but not completed."; + } + enum recovery-succeeded { + description + "The recovery action has succeeded. The working span has + reported a failure/degrade condition, and the user traffic + is being transported (or selected) on the recovery span."; + } + enum recovery-failed { + description + "The recovery action has failed."; + } + enum reversion-started { + description + "The reversion has started."; + } + enum reversion-succeeded { + description + "The reversion action has succeeded."; + } + enum reversion-failed { + description + "The reversion has failed."; + } + enum recovery-unavailable { + description + "The recovery is unavailable, as a result of either an + operator's lockout command or a failure condition + detected on the recovery span."; + } + enum recovery-admin { + description + "The operator has issued a command to switch the user + traffic to the recovery span."; + } + enum wait-to-restore { + description + "The recovery domain is recovering from a failure/degrade + condition on the working span that is being controlled by + the Wait-to-Restore (WTR) timer."; + } + } + description + "Defines the status of a recovery action."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS) + RFC 6378: MPLS Transport Profile (MPLS-TP) Linear Protection"; + } + + typedef te-template-name { + type string { + pattern '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*'; + } + description + "A type for the name of a TE node template or TE link + template."; + } + + typedef te-topology-event-type { + type enumeration { + enum add { + value 0; + description + "A TE node or TE link has been added."; + } + enum remove { + value 1; + description + "A TE node or TE link has been removed."; + } + enum update { + value 2; + description + "A TE node or TE link has been updated."; + } + } + description + "TE event type for notifications."; + } + + typedef te-topology-id { + type union { + type string { + length "0"; + // empty string + } + type string { + pattern '([a-zA-Z0-9\-_.]+:)*' + + '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*'; + } + } + description + "An identifier for a topology. + It is optional to have one or more prefixes at the beginning, + separated by colons. The prefixes can be 'network-types' as + defined in the 'ietf-network' module in RFC 8345, to help the + user better understand the topology before further inquiry + is made."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef te-tp-id { + type union { + type uint32; + // Unnumbered + type inet:ip-address; + // IPv4 or IPv6 address + } + description + "An identifier for a TE link endpoint on a node. + This attribute is mapped to a local or remote link identifier + as defined in RFCs 3630 and 5305."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 5305: IS-IS Extensions for Traffic Engineering"; + } + + /* TE features */ + + feature p2mp-te { + description + "Indicates support for Point-to-Multipoint TE (P2MP-TE)."; + reference + "RFC 4875: Extensions to Resource Reservation Protocol - + Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE + Label Switched Paths (LSPs)"; + } + + feature frr-te { + description + "Indicates support for TE Fast Reroute (FRR)."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels"; + } + + feature extended-admin-groups { + description + "Indicates support for TE link extended administrative + groups."; + reference + "RFC 7308: Extended Administrative Groups in MPLS Traffic + Engineering (MPLS-TE)"; + } + + feature named-path-affinities { + description + "Indicates support for named path affinities."; + } + + feature named-extended-admin-groups { + description + "Indicates support for named extended administrative groups."; + } + + feature named-srlg-groups { + description + "Indicates support for named SRLG groups."; + } + + feature named-path-constraints { + description + "Indicates support for named path constraints."; + } + + feature path-optimization-metric { + description + "Indicates support for path optimization metrics."; + } + + feature path-optimization-objective-function { + description + "Indicates support for path optimization objective functions."; + } + + /* + * Identities + */ + + identity session-attributes-flags { + description + "Base identity for the RSVP-TE session attributes flags."; + } + + identity local-protection-desired { + base session-attributes-flags; + description + "Local protection is desired."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.7.1"; + } + + identity se-style-desired { + base session-attributes-flags; + description + "Shared explicit style, to allow the LSP to be established + and share resources with the old LSP."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity local-recording-desired { + base session-attributes-flags; + description + "Label recording is desired."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.7.1"; + } + + identity bandwidth-protection-desired { + base session-attributes-flags; + description + "Requests FRR bandwidth protection on LSRs, if present."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels"; + } + + identity node-protection-desired { + base session-attributes-flags; + description + "Requests FRR node protection on LSRs, if present."; + reference + "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels"; + } + + identity path-reevaluation-request { + base session-attributes-flags; + description + "This flag indicates that a path re-evaluation (of the + current path in use) is requested. Note that this does + not trigger any LSP reroutes but instead just signals a + request to evaluate whether a preferable path exists."; + reference + "RFC 4736: Reoptimization of Multiprotocol Label Switching + (MPLS) Traffic Engineering (TE) Loosely Routed Label Switched + Path (LSP)"; + } + + identity soft-preemption-desired { + base session-attributes-flags; + description + "Soft preemption of LSP resources is desired."; + reference + "RFC 5712: MPLS Traffic Engineering Soft Preemption"; + } + + identity lsp-attributes-flags { + description + "Base identity for LSP attributes flags."; + } + + identity end-to-end-rerouting-desired { + base lsp-attributes-flags; + description + "Indicates end-to-end rerouting behavior for an LSP + undergoing establishment. This MAY also be used to + specify the behavior of end-to-end LSP recovery for + established LSPs."; + reference + "RFC 4920: Crankback Signaling Extensions for MPLS and GMPLS + RSVP-TE + RFC 5420: Encoding of Attributes for MPLS LSP Establishment + Using Resource Reservation Protocol Traffic Engineering + (RSVP-TE) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity boundary-rerouting-desired { + base lsp-attributes-flags; + description + "Indicates boundary rerouting behavior for an LSP undergoing + establishment. This MAY also be used to specify + segment-based LSP recovery through nested crankback for + established LSPs. The boundary Area Border Router (ABR) / + Autonomous System Border Router (ASBR) can decide to forward + the PathErr message upstream to either an upstream boundary + ABR/ASBR or the ingress LSR. Alternatively, it can try to + select another egress boundary LSR."; + reference + "RFC 4920: Crankback Signaling Extensions for MPLS and GMPLS + RSVP-TE + RFC 5420: Encoding of Attributes for MPLS LSP Establishment + Using Resource Reservation Protocol Traffic Engineering + (RSVP-TE) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity segment-based-rerouting-desired { + base lsp-attributes-flags; + description + "Indicates segment-based rerouting behavior for an LSP + undergoing establishment. This MAY also be used to specify + segment-based LSP recovery for established LSPs."; + reference + "RFC 4920: Crankback Signaling Extensions for MPLS and GMPLS + RSVP-TE + RFC 5420: Encoding of Attributes for MPLS LSP Establishment + Using Resource Reservation Protocol Traffic Engineering + (RSVP-TE) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity lsp-integrity-required { + base lsp-attributes-flags; + description + "Indicates that LSP integrity is required."; + reference + "RFC 4875: Extensions to Resource Reservation Protocol - + Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE + Label Switched Paths (LSPs) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity contiguous-lsp-desired { + base lsp-attributes-flags; + description + "Indicates that a contiguous LSP is desired."; + reference + "RFC 5151: Inter-Domain MPLS and GMPLS Traffic Engineering -- + Resource Reservation Protocol-Traffic Engineering (RSVP-TE) + Extensions + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity lsp-stitching-desired { + base lsp-attributes-flags; + description + "Indicates that LSP stitching is desired."; + reference + "RFC 5150: Label Switched Path Stitching with Generalized + Multiprotocol Label Switching Traffic Engineering (GMPLS TE) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity pre-planned-lsp-flag { + base lsp-attributes-flags; + description + "Indicates that the LSP MUST be provisioned in the + control plane only."; + reference + "RFC 6001: Generalized MPLS (GMPLS) Protocol Extensions for + Multi-Layer and Multi-Region Networks (MLN/MRN) + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity non-php-behavior-flag { + base lsp-attributes-flags; + description + "Indicates that non-PHP (non-Penultimate Hop Popping) behavior + for the LSP is desired."; + reference + "RFC 6511: Non-Penultimate Hop Popping Behavior and Out-of-Band + Mapping for RSVP-TE Label Switched Paths + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity oob-mapping-flag { + base lsp-attributes-flags; + description + "Indicates that signaling of the egress binding information is + out of band (e.g., via the Border Gateway Protocol (BGP))."; + reference + "RFC 6511: Non-Penultimate Hop Popping Behavior and Out-of-Band + Mapping for RSVP-TE Label Switched Paths + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity entropy-label-capability { + base lsp-attributes-flags; + description + "Indicates entropy label capability."; + reference + "RFC 6790: The Use of Entropy Labels in MPLS Forwarding + RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO)"; + } + + identity oam-mep-entity-desired { + base lsp-attributes-flags; + description + "OAM Maintenance Entity Group End Point (MEP) entities + desired."; + reference + "RFC 7260: GMPLS RSVP-TE Extensions for Operations, + Administration, and Maintenance (OAM) Configuration"; + } + + identity oam-mip-entity-desired { + base lsp-attributes-flags; + description + "OAM Maintenance Entity Group Intermediate Points (MIP) + entities desired."; + reference + "RFC 7260: GMPLS RSVP-TE Extensions for Operations, + Administration, and Maintenance (OAM) Configuration"; + } + + identity srlg-collection-desired { + base lsp-attributes-flags; + description + "SRLG collection desired."; + reference + "RFC 7570: Label Switched Path (LSP) Attribute in the Explicit + Route Object (ERO) + RFC 8001: RSVP-TE Extensions for Collecting Shared Risk + Link Group (SRLG) Information"; + } + + identity loopback-desired { + base lsp-attributes-flags; + description + "This flag indicates that a particular node on the LSP is + required to enter loopback mode. This can also be + used to specify the loopback state of the node."; + reference + "RFC 7571: GMPLS RSVP-TE Extensions for Lock Instruct and + Loopback"; + } + + identity p2mp-te-tree-eval-request { + base lsp-attributes-flags; + description + "P2MP-TE tree re-evaluation request."; + reference + "RFC 8149: RSVP Extensions for Reoptimization of Loosely Routed + Point-to-Multipoint Traffic Engineering Label Switched Paths + (LSPs)"; + } + + identity rtm-set-desired { + base lsp-attributes-flags; + description + "Residence Time Measurement (RTM) attribute flag requested."; + reference + "RFC 8169: Residence Time Measurement in MPLS Networks"; + } + + identity link-protection-type { + description + "Base identity for the link protection type."; + } + + identity link-protection-unprotected { + base link-protection-type; + description + "Unprotected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity link-protection-extra-traffic { + base link-protection-type; + description + "Extra-Traffic protected link type."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity link-protection-shared { + base link-protection-type; + description + "Shared protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity link-protection-1-for-1 { + base link-protection-type; + description + "One-for-one (1:1) protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity link-protection-1-plus-1 { + base link-protection-type; + description + "One-plus-one (1+1) protected link type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity link-protection-enhanced { + base link-protection-type; + description + "A compound link protection type derived from the underlay + TE tunnel protection configuration supporting the TE link."; + } + + identity association-type { + description + "Base identity for the tunnel association."; + } + + identity association-type-recovery { + base association-type; + description + "Association type for recovery, used to associate LSPs of the + same tunnel for recovery."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery + RFC 6780: RSVP ASSOCIATION Object Extensions"; + } + + identity association-type-resource-sharing { + base association-type; + description + "Association type for resource sharing, used to enable + resource sharing during make-before-break."; + reference + "RFC 4873: GMPLS Segment Recovery + RFC 6780: RSVP ASSOCIATION Object Extensions"; + } + + identity association-type-double-sided-bidir { + base association-type; + description + "Association type for double-sided bidirectional LSPs, + used to associate two LSPs of two tunnels that are + independently configured on either endpoint."; + reference + "RFC 7551: RSVP-TE Extensions for Associated Bidirectional + Label Switched Paths (LSPs)"; + } + + identity association-type-single-sided-bidir { + base association-type; + description + "Association type for single-sided bidirectional LSPs, + used to associate two LSPs of two tunnels, where one + tunnel is configured on one side/endpoint and the other + tunnel is dynamically created on the other endpoint."; + reference + "RFC 6780: RSVP ASSOCIATION Object Extensions + RFC 7551: RSVP-TE Extensions for Associated Bidirectional + Label Switched Paths (LSPs)"; + } + + identity objective-function-type { + description + "Base objective function type."; + } + + identity of-minimize-cost-path { + base objective-function-type; + description + "Objective function for minimizing path cost."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-minimize-load-path { + base objective-function-type; + description + "Objective function for minimizing the load on one or more + paths."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-maximize-residual-bandwidth { + base objective-function-type; + description + "Objective function for maximizing residual bandwidth."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-minimize-agg-bandwidth-consumption { + base objective-function-type; + description + "Objective function for minimizing aggregate bandwidth + consumption."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-minimize-load-most-loaded-link { + base objective-function-type; + description + "Objective function for minimizing the load on the link that + is carrying the highest load."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity of-minimize-cost-path-set { + base objective-function-type; + description + "Objective function for minimizing the cost on a path set."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity path-computation-method { + description + "Base identity for supported path computation mechanisms."; + } + + identity path-locally-computed { + base path-computation-method; + description + "Indicates a constrained-path LSP in which the + path is computed by the local LER."; + reference + "RFC 3272: Overview and Principles of Internet Traffic + Engineering, Section 5.4"; + } + + identity path-externally-queried { + base path-computation-method; + description + "Constrained-path LSP in which the path is obtained by + querying an external source, such as a PCE server. + In the case that an LSP is defined to be externally queried, + it may also have associated explicit definitions (provided + to the external source to aid computation). The path that is + returned by the external source may require further local + computation on the device."; + reference + "RFC 3272: Overview and Principles of Internet Traffic + Engineering + RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity path-explicitly-defined { + base path-computation-method; + description + "Constrained-path LSP in which the path is + explicitly specified as a collection of strict and/or loose + hops."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 3272: Overview and Principles of Internet Traffic + Engineering"; + } + + identity lsp-metric-type { + description + "Base identity for the LSP metric specification types."; + } + + identity lsp-metric-relative { + base lsp-metric-type; + description + "The metric specified for the LSPs to which this identity + refers is specified as a value relative to the IGP metric + cost to the LSP's tail end."; + reference + "RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity lsp-metric-absolute { + base lsp-metric-type; + description + "The metric specified for the LSPs to which this identity + refers is specified as an absolute value."; + reference + "RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity lsp-metric-inherited { + base lsp-metric-type; + description + "The metric for the LSPs to which this identity refers is + not specified explicitly; rather, it is directly inherited + from the IGP cost."; + reference + "RFC 4657: Path Computation Element (PCE) Communication + Protocol Generic Requirements"; + } + + identity te-tunnel-type { + description + "Base identity from which specific tunnel types are derived."; + } + + identity te-tunnel-p2p { + base te-tunnel-type; + description + "TE Point-to-Point (P2P) tunnel type."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity te-tunnel-p2mp { + base te-tunnel-type; + description + "TE P2MP tunnel type."; + reference + "RFC 4875: Extensions to Resource Reservation Protocol - + Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE + Label Switched Paths (LSPs)"; + } + + identity tunnel-action-type { + description + "Base identity from which specific tunnel action types + are derived."; + } + + identity tunnel-action-resetup { + base tunnel-action-type; + description + "TE tunnel action that tears down the tunnel's current LSP + (if any) and attempts to re-establish a new LSP."; + } + + identity tunnel-action-reoptimize { + base tunnel-action-type; + description + "TE tunnel action that reoptimizes the placement of the + tunnel LSP(s)."; + } + + identity tunnel-action-switchpath { + base tunnel-action-type; + description + "TE tunnel action that switches the tunnel's LSP to use the + specified path."; + } + + identity te-action-result { + description + "Base identity from which specific TE action results + are derived."; + } + + identity te-action-success { + base te-action-result; + description + "TE action was successful."; + } + + identity te-action-fail { + base te-action-result; + description + "TE action failed."; + } + + identity tunnel-action-inprogress { + base te-action-result; + description + "TE action is in progress."; + } + + identity tunnel-admin-state-type { + description + "Base identity for TE tunnel administrative states."; + } + + identity tunnel-admin-state-up { + base tunnel-admin-state-type; + description + "Tunnel's administrative state is up."; + } + + identity tunnel-admin-state-down { + base tunnel-admin-state-type; + description + "Tunnel's administrative state is down."; + } + + identity tunnel-state-type { + description + "Base identity for TE tunnel states."; + } + + identity tunnel-state-up { + base tunnel-state-type; + description + "Tunnel's state is up."; + } + + identity tunnel-state-down { + base tunnel-state-type; + description + "Tunnel's state is down."; + } + + identity lsp-state-type { + description + "Base identity for TE LSP states."; + } + + identity lsp-path-computing { + base lsp-state-type; + description + "State path computation is in progress."; + } + + identity lsp-path-computation-ok { + base lsp-state-type; + description + "State path computation was successful."; + } + + identity lsp-path-computation-failed { + base lsp-state-type; + description + "State path computation failed."; + } + + identity lsp-state-setting-up { + base lsp-state-type; + description + "State is being set up."; + } + + identity lsp-state-setup-ok { + base lsp-state-type; + description + "State setup was successful."; + } + + identity lsp-state-setup-failed { + base lsp-state-type; + description + "State setup failed."; + } + + identity lsp-state-up { + base lsp-state-type; + description + "State is up."; + } + + identity lsp-state-tearing-down { + base lsp-state-type; + description + "State is being torn down."; + } + + identity lsp-state-down { + base lsp-state-type; + description + "State is down."; + } + + identity path-invalidation-action-type { + description + "Base identity for TE path invalidation action types."; + } + + identity path-invalidation-action-drop { + base path-invalidation-action-type; + description + "Upon invalidation of the TE tunnel path, the tunnel remains + valid, but any packet mapped over the tunnel is dropped."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 2.5"; + } + + identity path-invalidation-action-teardown { + base path-invalidation-action-type; + description + "TE path invalidation action teardown."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 2.5"; + } + + identity lsp-restoration-type { + description + "Base identity from which LSP restoration types are derived."; + } + + identity lsp-restoration-restore-any { + base lsp-restoration-type; + description + "Any LSP affected by a failure is restored."; + } + + identity lsp-restoration-restore-all { + base lsp-restoration-type; + description + "Affected LSPs are restored after all LSPs of the tunnel are + broken."; + } + + identity restoration-scheme-type { + description + "Base identity for LSP restoration schemes."; + } + + identity restoration-scheme-preconfigured { + base restoration-scheme-type; + description + "Restoration LSP is preconfigured prior to the failure."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity restoration-scheme-precomputed { + base restoration-scheme-type; + description + "Restoration LSP is precomputed prior to the failure."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity restoration-scheme-presignaled { + base restoration-scheme-type; + description + "Restoration LSP is presignaled prior to the failure."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity lsp-protection-type { + description + "Base identity from which LSP protection types are derived."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-unprotected { + base lsp-protection-type; + description + "'Unprotected' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-reroute-extra { + base lsp-protection-type; + description + "'(Full) Rerouting' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-reroute { + base lsp-protection-type; + description + "'Rerouting without Extra-Traffic' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-1-for-n { + base lsp-protection-type; + description + "'1:N Protection with Extra-Traffic' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-1-for-1 { + base lsp-protection-type; + description + "LSP protection '1:1 Protection Type'."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-unidir-1-plus-1 { + base lsp-protection-type; + description + "'1+1 Unidirectional Protection' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-bidir-1-plus-1 { + base lsp-protection-type; + description + "'1+1 Bidirectional Protection' LSP protection type."; + reference + "RFC 4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) Recovery"; + } + + identity lsp-protection-extra-traffic { + base lsp-protection-type; + description + "Extra-Traffic LSP protection type."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity lsp-protection-state { + description + "Base identity of protection states for reporting purposes."; + } + + identity normal { + base lsp-protection-state; + description + "Normal state."; + } + + identity signal-fail-of-protection { + base lsp-protection-state; + description + "The protection transport entity has a signal fail condition + that is of higher priority than the forced switchover + command."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity lockout-of-protection { + base lsp-protection-state; + description + "A Loss of Protection (LoP) command is active."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity forced-switch { + base lsp-protection-state; + description + "A forced switchover command is active."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity signal-fail { + base lsp-protection-state; + description + "There is a signal fail condition on either the working path + or the protection path."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity signal-degrade { + base lsp-protection-state; + description + "There is a signal degrade condition on either the working + path or the protection path."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity manual-switch { + base lsp-protection-state; + description + "A manual switchover command is active."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity wait-to-restore { + base lsp-protection-state; + description + "A WTR timer is running."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity do-not-revert { + base lsp-protection-state; + description + "A Do Not Revert (DNR) condition is active because of + non-revertive behavior."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity failure-of-protocol { + base lsp-protection-state; + description + "LSP protection is not working because of a protocol failure + condition."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity protection-external-commands { + description + "Base identity from which protection-related external commands + used for troubleshooting purposes are derived."; + } + + identity action-freeze { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command that prevents any switchover action from being taken + and, as such, freezes the current state."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity clear-freeze { + base protection-external-commands; + description + "An action that clears the active freeze state."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-lockout-of-normal { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command to ensure that the normal traffic is not allowed + to use the protection transport entity."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity clear-lockout-of-normal { + base protection-external-commands; + description + "An action that clears the active lockout of the + normal state."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-lockout-of-protection { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command to ensure that the protection transport entity is + temporarily not available to transport a traffic signal + (either normal or Extra-Traffic)."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-forced-switch { + base protection-external-commands; + description + "A switchover action initiated by an operator command to switch + the Extra-Traffic signal, the normal traffic signal, or the + null signal to the protection transport entity, unless a + switchover command of equal or higher priority is in effect."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-manual-switch { + base protection-external-commands; + description + "A switchover action initiated by an operator command to switch + the Extra-Traffic signal, the normal traffic signal, or + the null signal to the protection transport entity, unless + a fault condition exists on other transport entities or a + switchover command of equal or higher priority is in effect."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity action-exercise { + base protection-external-commands; + description + "An action that starts testing whether or not APS communication + is operating correctly. It is of lower priority than any + other state or command."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity clear { + base protection-external-commands; + description + "An action that clears the active near-end lockout of a + protection, forced switchover, manual switchover, WTR state, + or exercise command."; + reference + "RFC 4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS)"; + } + + identity switching-capabilities { + description + "Base identity for interface switching capabilities."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-psc1 { + base switching-capabilities; + description + "Packet-Switch Capable-1 (PSC-1)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-evpl { + base switching-capabilities; + description + "Ethernet Virtual Private Line (EVPL)."; + reference + "RFC 6004: Generalized MPLS (GMPLS) Support for Metro Ethernet + Forum and G.8011 Ethernet Service Switching"; + } + + identity switching-l2sc { + base switching-capabilities; + description + "Layer-2 Switch Capable (L2SC)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-tdm { + base switching-capabilities; + description + "Time-Division-Multiplex Capable (TDM)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-otn { + base switching-capabilities; + description + "OTN-TDM capable."; + reference + "RFC 7138: Traffic Engineering Extensions to OSPF for GMPLS + Control of Evolving G.709 Optical Transport Networks"; + } + + identity switching-dcsc { + base switching-capabilities; + description + "Data Channel Switching Capable (DCSC)."; + reference + "RFC 6002: Generalized MPLS (GMPLS) Data Channel + Switching Capable (DCSC) and Channel Set Label Extensions"; + } + + identity switching-lsc { + base switching-capabilities; + description + "Lambda-Switch Capable (LSC)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity switching-fsc { + base switching-capabilities; + description + "Fiber-Switch Capable (FSC)."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-types { + description + "Base identity for encoding types."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-packet { + base lsp-encoding-types; + description + "Packet LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-ethernet { + base lsp-encoding-types; + description + "Ethernet LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-pdh { + base lsp-encoding-types; + description + "ANSI/ETSI PDH LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-sdh { + base lsp-encoding-types; + description + "SDH ITU-T G.707 / SONET ANSI T1.105 LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-digital-wrapper { + base lsp-encoding-types; + description + "Digital Wrapper LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-lambda { + base lsp-encoding-types; + description + "Lambda (photonic) LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-fiber { + base lsp-encoding-types; + description + "Fiber LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-fiber-channel { + base lsp-encoding-types; + description + "FiberChannel LSP encoding."; + reference + "RFC 3471: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Functional Description"; + } + + identity lsp-encoding-oduk { + base lsp-encoding-types; + description + "G.709 ODUk (Digital Path) LSP encoding."; + reference + "RFC 4328: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Extensions for G.709 Optical Transport Networks + Control"; + } + + identity lsp-encoding-optical-channel { + base lsp-encoding-types; + description + "G.709 Optical Channel LSP encoding."; + reference + "RFC 4328: Generalized Multi-Protocol Label Switching (GMPLS) + Signaling Extensions for G.709 Optical Transport Networks + Control"; + } + + identity lsp-encoding-line { + base lsp-encoding-types; + description + "Line (e.g., 8B/10B) LSP encoding."; + reference + "RFC 6004: Generalized MPLS (GMPLS) Support for Metro + Ethernet Forum and G.8011 Ethernet Service Switching"; + } + + identity path-signaling-type { + description + "Base identity from which specific LSP path setup types + are derived."; + } + + identity path-setup-static { + base path-signaling-type; + description + "Static LSP provisioning path setup."; + } + + identity path-setup-rsvp { + base path-signaling-type; + description + "RSVP-TE signaling path setup."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity path-setup-sr { + base path-signaling-type; + description + "Segment-routing path setup."; + } + + identity path-scope-type { + description + "Base identity from which specific path scope types are + derived."; + } + + identity path-scope-segment { + base path-scope-type; + description + "Path scope segment."; + reference + "RFC 4873: GMPLS Segment Recovery"; + } + + identity path-scope-end-to-end { + base path-scope-type; + description + "Path scope end to end."; + reference + "RFC 4873: GMPLS Segment Recovery"; + } + + identity route-usage-type { + description + "Base identity for route usage."; + } + + identity route-include-object { + base route-usage-type; + description + "'Include route' object."; + } + + identity route-exclude-object { + base route-usage-type; + description + "'Exclude route' object."; + reference + "RFC 4874: Exclude Routes - Extension to Resource ReserVation + Protocol-Traffic Engineering (RSVP-TE)"; + } + + identity route-exclude-srlg { + base route-usage-type; + description + "Excludes SRLGs."; + reference + "RFC 4874: Exclude Routes - Extension to Resource ReserVation + Protocol-Traffic Engineering (RSVP-TE)"; + } + + identity path-metric-type { + description + "Base identity for the path metric type."; + } + + identity path-metric-te { + base path-metric-type; + description + "TE path metric."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + + identity path-metric-igp { + base path-metric-type; + description + "IGP path metric."; + reference + "RFC 3785: Use of Interior Gateway Protocol (IGP) Metric as a + second MPLS Traffic Engineering (TE) Metric"; + } + + identity path-metric-hop { + base path-metric-type; + description + "Hop path metric."; + } + + identity path-metric-delay-average { + base path-metric-type; + description + "Average unidirectional link delay."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions"; + } + + identity path-metric-delay-minimum { + base path-metric-type; + description + "Minimum unidirectional link delay."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions"; + } + + identity path-metric-residual-bandwidth { + base path-metric-type; + description + "Unidirectional Residual Bandwidth, which is defined to be + Maximum Bandwidth (RFC 3630) minus the bandwidth currently + allocated to LSPs."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2 + RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions"; + } + + identity path-metric-optimize-includes { + base path-metric-type; + description + "A metric that optimizes the number of included resources + specified in a set."; + } + + identity path-metric-optimize-excludes { + base path-metric-type; + description + "A metric that optimizes to a maximum the number of excluded + resources specified in a set."; + } + + identity path-tiebreaker-type { + description + "Base identity for the path tiebreaker type."; + } + + identity path-tiebreaker-minfill { + base path-tiebreaker-type; + description + "Min-Fill LSP path placement."; + } + + identity path-tiebreaker-maxfill { + base path-tiebreaker-type; + description + "Max-Fill LSP path placement."; + } + + identity path-tiebreaker-random { + base path-tiebreaker-type; + description + "Random LSP path placement."; + } + + identity resource-affinities-type { + description + "Base identity for resource class affinities."; + reference + "RFC 2702: Requirements for Traffic Engineering Over MPLS"; + } + + identity resource-aff-include-all { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel, all of which must be present for a link + to be acceptable."; + reference + "RFC 2702: Requirements for Traffic Engineering Over MPLS + RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity resource-aff-include-any { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel, any of which must be present for a link + to be acceptable."; + reference + "RFC 2702: Requirements for Traffic Engineering Over MPLS + RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity resource-aff-exclude-any { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel, any of which renders a link unacceptable."; + reference + "RFC 2702: Requirements for Traffic Engineering Over MPLS + RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + + identity te-optimization-criterion { + description + "Base identity for the TE optimization criteria."; + reference + "RFC 3272: Overview and Principles of Internet Traffic + Engineering"; + } + + identity not-optimized { + base te-optimization-criterion; + description + "Optimization is not applied."; + } + + identity cost { + base te-optimization-criterion; + description + "Optimized on cost."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity delay { + base te-optimization-criterion; + description + "Optimized on delay."; + reference + "RFC 5541: Encoding of Objective Functions in the Path + Computation Element Communication Protocol (PCEP)"; + } + + identity path-computation-srlg-type { + description + "Base identity for SRLG path computation."; + } + + identity srlg-ignore { + base path-computation-srlg-type; + description + "Ignores SRLGs in the path computation."; + } + + identity srlg-strict { + base path-computation-srlg-type; + description + "Includes a strict SRLG check in the path computation."; + } + + identity srlg-preferred { + base path-computation-srlg-type; + description + "Includes a preferred SRLG check in the path computation."; + } + + identity srlg-weighted { + base path-computation-srlg-type; + description + "Includes a weighted SRLG check in the path computation."; + } + + /** + * TE bandwidth groupings + **/ + + grouping te-bandwidth { + description + "This grouping defines the generic TE bandwidth. + For some known data-plane technologies, specific modeling + structures are specified. The string-encoded 'te-bandwidth' + type is used for unspecified technologies. + The modeling structure can be augmented later for other + technologies."; + container te-bandwidth { + description + "Container that specifies TE bandwidth. The choices + can be augmented for specific data-plane technologies."; + choice technology { + default "generic"; + description + "Data-plane technology type."; + case generic { + leaf generic { + type te-bandwidth; + description + "Bandwidth specified in a generic format."; + } + } + } + } + } + + /** + * TE label groupings + **/ + + grouping te-label { + description + "This grouping defines the generic TE label. + The modeling structure can be augmented for each technology. + For unspecified technologies, 'rt-types:generalized-label' + is used."; + container te-label { + description + "Container that specifies the TE label. The choices can + be augmented for specific data-plane technologies."; + choice technology { + default "generic"; + description + "Data-plane technology type."; + case generic { + leaf generic { + type rt-types:generalized-label; + description + "TE label specified in a generic format."; + } + } + } + leaf direction { + type te-label-direction; + default "forward"; + description + "Label direction."; + } + } + } + + grouping te-topology-identifier { + description + "Augmentation for a TE topology."; + container te-topology-identifier { + description + "TE topology identifier container."; + leaf provider-id { + type te-global-id; + default "0"; + description + "An identifier to uniquely identify a provider. + If omitted, it assumes that the topology provider ID + value = 0 (the default)."; + } + leaf client-id { + type te-global-id; + default "0"; + description + "An identifier to uniquely identify a client. + If omitted, it assumes that the topology client ID + value = 0 (the default)."; + } + leaf topology-id { + type te-topology-id; + default ""; + description + "When the datastore contains several topologies, + 'topology-id' distinguishes between them. If omitted, + the default (empty) string for this leaf is assumed."; + } + } + } + + /** + * TE performance metrics groupings + **/ + + grouping performance-metrics-one-way-delay-loss { + description + "Performance Metrics (PM) information in real time that can + be applicable to links or connections. PM defined in this + grouping are applicable to generic TE PM as well as packet TE + PM."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + leaf one-way-delay { + type uint32 { + range "0..16777215"; + } + description + "One-way delay or latency in microseconds."; + } + leaf one-way-delay-normality { + type te-types:performance-metrics-normality; + description + "One-way delay normality."; + } + } + + grouping performance-metrics-two-way-delay-loss { + description + "PM information in real time that can be applicable to links or + connections. PM defined in this grouping are applicable to + generic TE PM as well as packet TE PM."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + leaf two-way-delay { + type uint32 { + range "0..16777215"; + } + description + "Two-way delay or latency in microseconds."; + } + leaf two-way-delay-normality { + type te-types:performance-metrics-normality; + description + "Two-way delay normality."; + } + } + + grouping performance-metrics-one-way-bandwidth { + description + "PM information in real time that can be applicable to links. + PM defined in this grouping are applicable to generic TE PM + as well as packet TE PM."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + leaf one-way-residual-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Residual bandwidth that subtracts tunnel reservations from + Maximum Bandwidth (or link capacity) (RFC 3630) and + provides an aggregated remainder across QoS classes."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + leaf one-way-residual-bandwidth-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Residual bandwidth normality."; + } + leaf one-way-available-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Available bandwidth that is defined to be residual + bandwidth minus the measured bandwidth used for the + actual forwarding of non-RSVP-TE LSP packets. For a + bundled link, available bandwidth is defined to be the + sum of the component link available bandwidths."; + } + leaf one-way-available-bandwidth-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Available bandwidth normality."; + } + leaf one-way-utilized-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Bandwidth utilization that represents the actual + utilization of the link (i.e., as measured in the router). + For a bundled link, bandwidth utilization is defined to + be the sum of the component link bandwidth utilizations."; + } + leaf one-way-utilized-bandwidth-normality { + type te-types:performance-metrics-normality; + default "normal"; + description + "Bandwidth utilization normality."; + } + } + + grouping one-way-performance-metrics { + description + "One-way PM throttle grouping."; + leaf one-way-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "One-way delay or latency in microseconds."; + } + leaf one-way-residual-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Residual bandwidth that subtracts tunnel reservations from + Maximum Bandwidth (or link capacity) (RFC 3630) and + provides an aggregated remainder across QoS classes."; + reference + "RFC 3630: Traffic Engineering (TE) Extensions to OSPF + Version 2"; + } + leaf one-way-available-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Available bandwidth that is defined to be residual + bandwidth minus the measured bandwidth used for the + actual forwarding of non-RSVP-TE LSP packets. For a + bundled link, available bandwidth is defined to be the + sum of the component link available bandwidths."; + } + leaf one-way-utilized-bandwidth { + type rt-types:bandwidth-ieee-float32; + units "bytes per second"; + default "0x0p0"; + description + "Bandwidth utilization that represents the actual + utilization of the link (i.e., as measured in the router). + For a bundled link, bandwidth utilization is defined to + be the sum of the component link bandwidth utilizations."; + } + } + + grouping two-way-performance-metrics { + description + "Two-way PM throttle grouping."; + leaf two-way-delay { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Two-way delay or latency in microseconds."; + } + } + + grouping performance-metrics-thresholds { + description + "Grouping for configurable thresholds for measured + attributes."; + uses one-way-performance-metrics; + uses two-way-performance-metrics; + } + + grouping performance-metrics-attributes { + description + "Contains PM attributes."; + container performance-metrics-one-way { + description + "One-way link performance information in real time."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + uses performance-metrics-one-way-delay-loss; + uses performance-metrics-one-way-bandwidth; + } + container performance-metrics-two-way { + description + "Two-way link performance information in real time."; + reference + "RFC 6374: Packet Loss and Delay Measurement for MPLS + Networks"; + uses performance-metrics-two-way-delay-loss; + } + } + + grouping performance-metrics-throttle-container { + description + "Controls PM throttling."; + container throttle { + must 'suppression-interval >= measure-interval' { + error-message "'suppression-interval' cannot be less than " + + "'measure-interval'."; + description + "Constraint on 'suppression-interval' and + 'measure-interval'."; + } + description + "Link performance information in real time."; + reference + "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions + RFC 7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions + RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions"; + leaf one-way-delay-offset { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "Offset value to be added to the measured delay value."; + } + leaf measure-interval { + type uint32; + default "30"; + description + "Interval, in seconds, to measure the extended metric + values."; + } + leaf advertisement-interval { + type uint32; + default "0"; + description + "Interval, in seconds, to advertise the extended metric + values."; + } + leaf suppression-interval { + type uint32 { + range "1..max"; + } + default "120"; + description + "Interval, in seconds, to suppress advertisement of the + extended metric values."; + reference + "RFC 8570: IS-IS Traffic Engineering (TE) Metric + Extensions, Section 6"; + } + container threshold-out { + uses performance-metrics-thresholds; + description + "If the measured parameter falls outside an upper bound + for all but the minimum-delay metric (or a lower bound + for the minimum-delay metric only) and the advertised + value is not already outside that bound, an 'anomalous' + announcement (anomalous bit set) will be triggered."; + } + container threshold-in { + uses performance-metrics-thresholds; + description + "If the measured parameter falls inside an upper bound + for all but the minimum-delay metric (or a lower bound + for the minimum-delay metric only) and the advertised + value is not already inside that bound, a 'normal' + announcement (anomalous bit cleared) will be triggered."; + } + container threshold-accelerated-advertisement { + description + "When the difference between the last advertised value and + the current measured value exceeds this threshold, an + 'anomalous' announcement (anomalous bit set) will be + triggered."; + uses performance-metrics-thresholds; + } + } + } + + /** + * TE tunnel generic groupings + **/ + + grouping explicit-route-hop { + description + "The explicit route entry grouping."; + choice type { + description + "The explicit route entry type."; + case numbered-node-hop { + container numbered-node-hop { + leaf node-id { + type te-node-id; + mandatory true; + description + "The identifier of a node in the TE topology."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + description + "Numbered node route hop."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3, EXPLICIT_ROUTE in RSVP-TE + RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering (RSVP-TE)"; + } + } + case numbered-link-hop { + container numbered-link-hop { + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "TE Link Termination Point (LTP) identifier."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + leaf direction { + type te-link-direction; + default "outgoing"; + description + "Link route object direction."; + } + description + "Numbered link explicit route hop."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3, EXPLICIT_ROUTE in RSVP-TE + RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering (RSVP-TE)"; + } + } + case unnumbered-link-hop { + container unnumbered-link-hop { + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "TE LTP identifier. The combination of the TE link ID + and the TE node ID is used to identify an unnumbered + TE link."; + } + leaf node-id { + type te-node-id; + mandatory true; + description + "The identifier of a node in the TE topology."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + leaf direction { + type te-link-direction; + default "outgoing"; + description + "Link route object direction."; + } + description + "Unnumbered link explicit route hop."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels, + Section 4.3, EXPLICIT_ROUTE in RSVP-TE + RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering (RSVP-TE)"; + } + } + case as-number { + container as-number-hop { + leaf as-number { + type inet:as-number; + mandatory true; + description + "The Autonomous System (AS) number."; + } + leaf hop-type { + type te-hop-type; + default "strict"; + description + "Strict or loose hop."; + } + description + "AS explicit route hop."; + } + } + case label { + container label-hop { + description + "Label hop type."; + uses te-label; + } + description + "The label explicit route hop type."; + } + } + } + + grouping record-route-state { + description + "The Record Route grouping."; + leaf index { + type uint32; + description + "Record Route hop index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + choice type { + description + "The Record Route entry type."; + case numbered-node-hop { + container numbered-node-hop { + description + "Numbered node route hop container."; + leaf node-id { + type te-node-id; + mandatory true; + description + "The identifier of a node in the TE topology."; + } + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + } + description + "Numbered node route hop."; + } + case numbered-link-hop { + container numbered-link-hop { + description + "Numbered link route hop container."; + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "Numbered TE LTP identifier."; + } + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + } + description + "Numbered link route hop."; + } + case unnumbered-link-hop { + container unnumbered-link-hop { + leaf link-tp-id { + type te-tp-id; + mandatory true; + description + "TE LTP identifier. The combination of the TE link ID + and the TE node ID is used to identify an unnumbered + TE link."; + } + leaf node-id { + type te-node-id; + description + "The identifier of a node in the TE topology."; + } + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + description + "Unnumbered link Record Route hop."; + reference + "RFC 3477: Signalling Unnumbered Links in Resource + ReSerVation Protocol - Traffic Engineering (RSVP-TE)"; + } + description + "Unnumbered link route hop."; + } + case label { + container label-hop { + description + "Label route hop type."; + uses te-label; + leaf-list flags { + type path-attribute-flags; + description + "Path attributes flags."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels + RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP + Tunnels + RFC 4561: Definition of a Record Route Object (RRO) + Node-Id Sub-Object"; + } + } + description + "The label Record Route entry types."; + } + } + } + + grouping label-restriction-info { + description + "Label set item information."; + leaf restriction { + type enumeration { + enum inclusive { + description + "The label or label range is inclusive."; + } + enum exclusive { + description + "The label or label range is exclusive."; + } + } + default "inclusive"; + description + "Indicates whether the list item is inclusive or exclusive."; + } + leaf index { + type uint32; + description + "The index of the label restriction list entry."; + } + container label-start { + must "(not(../label-end/te-label/direction) and" + + " not(te-label/direction))" + + " or " + + "(../label-end/te-label/direction = te-label/direction)" + + " or " + + "(not(te-label/direction) and" + + " (../label-end/te-label/direction = 'forward'))" + + " or " + + "(not(../label-end/te-label/direction) and" + + " (te-label/direction = 'forward'))" { + error-message "'label-start' and 'label-end' must have the " + + "same direction."; + } + description + "This is the starting label if a label range is specified. + This is the label value if a single label is specified, + in which case the 'label-end' attribute is not set."; + uses te-label; + } + container label-end { + must "(not(../label-start/te-label/direction) and" + + " not(te-label/direction))" + + " or " + + "(../label-start/te-label/direction = te-label/direction)" + + " or " + + "(not(te-label/direction) and" + + " (../label-start/te-label/direction = 'forward'))" + + " or " + + "(not(../label-start/te-label/direction) and" + + " (te-label/direction = 'forward'))" { + error-message "'label-start' and 'label-end' must have the " + + "same direction."; + } + description + "This is the ending label if a label range is specified. + This attribute is not set if a single label is specified."; + uses te-label; + } + container label-step { + description + "The step increment between labels in the label range. + The label start/end values will have to be consistent + with the sign of label step. For example, + 'label-start' < 'label-end' enforces 'label-step' > 0 + 'label-start' > 'label-end' enforces 'label-step' < 0."; + choice technology { + default "generic"; + description + "Data-plane technology type."; + case generic { + leaf generic { + type int32; + default "1"; + description + "Label range step."; + } + } + } + } + leaf range-bitmap { + type yang:hex-string; + description + "When there are gaps between 'label-start' and 'label-end', + this attribute is used to specify the positions + of the used labels. This is represented in big endian as + 'hex-string'. + The most significant byte in the hex-string is the farthest + to the left in the byte sequence. Leading zero bytes in the + configured value may be omitted for brevity. + Each bit position in the 'range-bitmap' 'hex-string' maps + to a label in the range derived from 'label-start'. + + For example, assuming that 'label-start' = 16000 and + 'range-bitmap' = 0x01000001, then: + + - bit position (0) is set, and the corresponding mapped + label from the range is 16000 + (0 * 'label-step') or + 16000 for default 'label-step' = 1. + - bit position (24) is set, and the corresponding mapped + label from the range is 16000 + (24 * 'label-step') or + 16024 for default 'label-step' = 1."; + } + } + + grouping label-set-info { + description + "Grouping for the list of label restrictions specifying what + labels may or may not be used."; + container label-restrictions { + description + "The label restrictions container."; + list label-restriction { + key "index"; + description + "The absence of the label restrictions container implies + that all labels are acceptable; otherwise, only restricted + labels are available."; + reference + "RFC 7579: General Network Element Constraint Encoding + for GMPLS-Controlled Networks"; + uses label-restriction-info; + } + } + } + + grouping optimization-metric-entry { + description + "Optimization metrics configuration grouping."; + leaf metric-type { + type identityref { + base path-metric-type; + } + description + "Identifies the 'metric-type' that the path computation + process uses for optimization."; + } + leaf weight { + type uint8; + default "1"; + description + "TE path metric normalization weight."; + } + container explicit-route-exclude-objects { + when "../metric-type = " + + "'te-types:path-metric-optimize-excludes'"; + description + "Container for the 'exclude route' object list."; + uses path-route-exclude-objects; + } + container explicit-route-include-objects { + when "../metric-type = " + + "'te-types:path-metric-optimize-includes'"; + description + "Container for the 'include route' object list."; + uses path-route-include-objects; + } + } + + grouping common-constraints { + description + "Common constraints grouping that can be set on + a constraint set or directly on the tunnel."; + uses te-bandwidth { + description + "A requested bandwidth to use for path computation."; + } + leaf link-protection { + type identityref { + base link-protection-type; + } + default "te-types:link-protection-unprotected"; + description + "Link protection type required for the links included + in the computed path."; + reference + "RFC 4202: Routing Extensions in Support of + Generalized Multi-Protocol Label Switching (GMPLS)"; + } + leaf setup-priority { + type uint8 { + range "0..7"; + } + default "7"; + description + "TE LSP requested setup priority."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + leaf hold-priority { + type uint8 { + range "0..7"; + } + default "7"; + description + "TE LSP requested hold priority."; + reference + "RFC 3209: RSVP-TE: Extensions to RSVP for LSP Tunnels"; + } + leaf signaling-type { + type identityref { + base path-signaling-type; + } + default "te-types:path-setup-rsvp"; + description + "TE tunnel path signaling type."; + } + } + + grouping tunnel-constraints { + description + "Tunnel constraints grouping that can be set on + a constraint set or directly on the tunnel."; + uses te-topology-identifier; + uses common-constraints; + } + + grouping path-constraints-route-objects { + description + "List of route entries to be included or excluded when + performing the path computation."; + container explicit-route-objects-always { + description + "Container for the 'exclude route' object list."; + list route-object-exclude-always { + key "index"; + ordered-by user; + description + "List of route objects to always exclude from the path + computation."; + leaf index { + type uint32; + description + "Explicit Route Object index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop; + } + list route-object-include-exclude { + key "index"; + ordered-by user; + description + "List of route objects to include or exclude in the path + computation."; + leaf explicit-route-usage { + type identityref { + base route-usage-type; + } + default "te-types:route-include-object"; + description + "Indicates whether to include or exclude the + route object. The default is to include it."; + } + leaf index { + type uint32; + description + "Route object include-exclude index. The index is used + to identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop { + augment "type" { + case srlg { + container srlg { + description + "SRLG container."; + leaf srlg { + type uint32; + description + "SRLG value."; + } + } + description + "An SRLG value to be included or excluded."; + } + description + "Augmentation for a generic explicit route for SRLG + exclusion."; + } + } + } + } + } + + grouping path-route-include-objects { + description + "List of route objects to be included when performing + the path computation."; + list route-object-include-object { + key "index"; + ordered-by user; + description + "List of Explicit Route Objects to be included in the + path computation."; + leaf index { + type uint32; + description + "Route object entry index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop; + } + } + + grouping path-route-exclude-objects { + description + "List of route objects to be excluded when performing + the path computation."; + list route-object-exclude-object { + key "index"; + ordered-by user; + description + "List of Explicit Route Objects to be excluded in the + path computation."; + leaf index { + type uint32; + description + "Route object entry index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key values."; + } + uses explicit-route-hop { + augment "type" { + case srlg { + container srlg { + description + "SRLG container."; + leaf srlg { + type uint32; + description + "SRLG value."; + } + } + description + "An SRLG value to be included or excluded."; + } + description + "Augmentation for a generic explicit route for SRLG + exclusion."; + } + } + } + } + + grouping generic-path-metric-bounds { + description + "TE path metric bounds grouping."; + container path-metric-bounds { + description + "TE path metric bounds container."; + list path-metric-bound { + key "metric-type"; + description + "List of TE path metric bounds."; + leaf metric-type { + type identityref { + base path-metric-type; + } + description + "Identifies an entry in the list of 'metric-type' items + bound for the TE path."; + } + leaf upper-bound { + type uint64; + default "0"; + description + "Upper bound on the end-to-end TE path metric. A zero + indicates an unbounded upper limit for the specific + 'metric-type'."; + } + } + } + } + + grouping generic-path-optimization { + description + "TE generic path optimization grouping."; + container optimizations { + description + "The objective function container that includes + attributes to impose when computing a TE path."; + choice algorithm { + description + "Optimizations algorithm."; + case metric { + if-feature "path-optimization-metric"; + /* Optimize by metric */ + list optimization-metric { + key "metric-type"; + description + "TE path metric type."; + uses optimization-metric-entry; + } + /* Tiebreakers */ + container tiebreakers { + description + "Container for the list of tiebreakers."; + list tiebreaker { + key "tiebreaker-type"; + description + "The list of tiebreaker criteria to apply on an + equally favored set of paths, in order to pick + the best."; + leaf tiebreaker-type { + type identityref { + base path-metric-type; + } + description + "Identifies an entry in the list of tiebreakers."; + } + } + } + } + case objective-function { + if-feature "path-optimization-objective-function"; + /* Objective functions */ + container objective-function { + description + "The objective function container that includes + attributes to impose when computing a TE path."; + leaf objective-function-type { + type identityref { + base objective-function-type; + } + default "te-types:of-minimize-cost-path"; + description + "Objective function entry."; + } + } + } + } + } + } + + grouping generic-path-affinities { + description + "Path affinities grouping."; + container path-affinities-values { + description + "Path affinities represented as values."; + list path-affinities-value { + key "usage"; + description + "List of named affinity constraints."; + leaf usage { + type identityref { + base resource-affinities-type; + } + description + "Identifies an entry in the list of value affinity + constraints."; + } + leaf value { + type admin-groups; + default ""; + description + "The affinity value. The default is empty."; + } + } + } + container path-affinity-names { + description + "Path affinities represented as names."; + list path-affinity-name { + key "usage"; + description + "List of named affinity constraints."; + leaf usage { + type identityref { + base resource-affinities-type; + } + description + "Identifies an entry in the list of named affinity + constraints."; + } + list affinity-name { + key "name"; + leaf name { + type string; + description + "Identifies a named affinity entry."; + } + description + "List of named affinities."; + } + } + } + } + + grouping generic-path-srlgs { + description + "Path SRLG grouping."; + container path-srlgs-lists { + description + "Path SRLG properties container."; + list path-srlgs-list { + key "usage"; + description + "List of SRLG values to be included or excluded."; + leaf usage { + type identityref { + base route-usage-type; + } + description + "Identifies an entry in a list of SRLGs to either + include or exclude."; + } + leaf-list values { + type srlg; + description + "List of SRLG values."; + } + } + } + container path-srlgs-names { + description + "Container for the list of named SRLGs."; + list path-srlgs-name { + key "usage"; + description + "List of named SRLGs to be included or excluded."; + leaf usage { + type identityref { + base route-usage-type; + } + description + "Identifies an entry in a list of named SRLGs to either + include or exclude."; + } + leaf-list names { + type string; + description + "List of named SRLGs."; + } + } + } + } + + grouping generic-path-disjointness { + description + "Path disjointness grouping."; + leaf disjointness { + type te-path-disjointness; + description + "The type of resource disjointness. + When configured for a primary path, the disjointness level + applies to all secondary LSPs. When configured for a + secondary path, the disjointness level overrides the level + configured for the primary path."; + } + } + + grouping common-path-constraints-attributes { + description + "Common path constraints configuration grouping."; + uses common-constraints; + uses generic-path-metric-bounds; + uses generic-path-affinities; + uses generic-path-srlgs; + } + + grouping generic-path-constraints { + description + "Global named path constraints configuration grouping."; + container path-constraints { + description + "TE named path constraints container."; + uses common-path-constraints-attributes; + uses generic-path-disjointness; + } + } + + grouping generic-path-properties { + description + "TE generic path properties grouping."; + container path-properties { + config false; + description + "The TE path properties."; + list path-metric { + key "metric-type"; + description + "TE path metric type."; + leaf metric-type { + type identityref { + base path-metric-type; + } + description + "TE path metric type."; + } + leaf accumulative-value { + type uint64; + description + "TE path metric accumulative value."; + } + } + uses generic-path-affinities; + uses generic-path-srlgs; + container path-route-objects { + description + "Container for the list of route objects either returned by + the computation engine or actually used by an LSP."; + list path-route-object { + key "index"; + ordered-by user; + description + "List of route objects either returned by the computation + engine or actually used by an LSP."; + leaf index { + type uint32; + description + "Route object entry index. The index is used to + identify an entry in the list. The order of entries + is defined by the user without relying on key + values."; + } + uses explicit-route-hop; + } + } + } + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-trans-client-service@2023-10-23.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-trans-client-service@2023-10-23.yang new file mode 100644 index 0000000000000000000000000000000000000000..f0157bcc82e70d1da523074974e8db061d06c32a --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-trans-client-service@2023-10-23.yang @@ -0,0 +1,325 @@ + module ietf-trans-client-service { + /* TODO: FIXME */ + yang-version 1.1; + + namespace "urn:ietf:params:xml:ns:yang:ietf-trans-client-service"; + prefix "clntsvc"; + + import ietf-network { + prefix "nw"; + reference "RFC8345 - A YANG Data Model for Network Topologies"; + } + + import ietf-network-topology { + prefix "nt"; + reference "RFC8345 - A YANG Data Model for Network Topologies"; + } + + import ietf-te-types { + prefix "te-types"; + reference "RFC 8776 - Traffic Engineering Common YANG Types"; + } + + import ietf-layer1-types { + prefix "layer1-types"; + reference "RFC ZZZZ - A YANG Data Model for Layer 1 Types"; + } + + import ietf-yang-types { + prefix "yang"; + reference "RFC 6991 - Common YANG Data Types"; + } + + import ietf-trans-client-svc-types { + prefix "clntsvc-types"; + reference "RFC XXXX - A YANG Data Model for + Transport Network Client Signals"; + } + + organization + "Internet Engineering Task Force (IETF) CCAMP WG"; + contact + " + ID-draft editor: + Haomian Zheng (zhenghaomian@huawei.com); + Aihua Guo (aihuaguo.ietf@gmail.com); + Italo Busi (italo.busi@huawei.com); + Anton Snitser (antons@sedonasys.com); + Francesco Lazzeri (francesco.lazzeri@ericsson.com); + Yunbin Xu (xuyunbin@caict.ac.cn); + Yang Zhao (zhaoyangyjy@chinamobile.com); + Xufeng Liu (Xufeng_Liu@jabil.com); + Giuseppe Fioccola (giuseppe.fioccola@huawei.com); + Chaode Yu (yuchaode@huawei.com); + "; + + description + "This module defines a YANG data model for describing + transport network client services. The model fully conforms + to the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2021 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 XXXX; see + the RFC itself for full legal notices."; + revision 2023-10-23 { + description + "version -04 as a WG document"; + reference + "draft-ietf-ccamp-client-signal-yang"; + } + + /* + * Groupings + */ + grouping client-svc-access-parameters { + description + "Transport network client signals access parameters"; + + leaf access-node-id { + type te-types:te-node-id; + description + "The identifier of the access node in the TE topology."; + } + + leaf access-node-uri { + type nw:node-id; + description + "The identifier of the access node in the network."; + } + + leaf access-ltp-id { + type te-types:te-tp-id; + description + "The TE link termination point identifier in TE topology, used + together with access-node-id to identify the access LTP."; + } + + leaf access-ltp-uri { + type nt:tp-id; + description + "The link termination point identifier in network topology, + used together with access-node-uri to identify the access LTP"; + } + + leaf client-signal { + type identityref { + base layer1-types:client-signal; + } + description + "Identify the client signal type associated with this port"; + } + + } + + grouping pm-state-grouping { + leaf latency { + description "latency value of the E2E client signal service"; + type uint32; + units microsecond; + } + } + + grouping error-info-grouping { + leaf error-code { + description "error code"; + type uint16; + } + + leaf error-description { + description "detail message of error"; + type string; + } + + leaf error-timestamp { + description "the date and time error is happened"; + type yang:date-and-time; + } + } + + grouping alarm-shreshold-grouping { + leaf latency-threshold { + description "a threshold for the E2E client signal service's + latency. Once the latency value exceed this threshold, an alarm + should be triggered."; + type uint32; + units microsecond; + } + } + + grouping client-svc-tunnel-parameters { + description + "Transport network client signals tunnel parameters"; + + leaf tunnel-name { + type string; + description + "TE tunnel instance name."; + } + } + + grouping client-svc-instance-config { + description + "Configuration parameters for client services."; + leaf client-svc-name { + type string; + description + "Identifier of the p2p transport network client signals."; + } + + leaf client-svc-title { + type string; + description + "Name of the p2p transport network client signals."; + } + + leaf user-label { + type string; + description + "Alias of the p2p transport network client signals."; + } + + leaf client-svc-descr { + type string; + description + "Description of the transport network client signals."; + } + + leaf client-svc-customer { + type string; + description + "Customer of the transport network client signals."; + } + + container resilience { + description "Place holder for resilience functionalities"; + } + + uses te-types:te-topology-identifier; + + leaf admin-status { + type identityref { + base te-types:tunnel-admin-state-type; + } + default te-types:tunnel-admin-state-up; + description "Client signals administrative state."; + } + + container src-access-ports { + description + "Source access port of a client signal."; + uses client-svc-access-parameters; + } + container dst-access-ports { + description + "Destination access port of a client signal."; + uses client-svc-access-parameters; + } + + container pm-state { + config false; + description "PM data of E2E client signal"; + uses pm-state-grouping; + } + + container error-info { + config false; + description "error messages of configuration"; + uses error-info-grouping; + } + + container alarm-shreshold { + description "threshold configuration for the E2E client signal"; + uses alarm-shreshold-grouping; + } + + leaf direction { + type identityref { + base clntsvc-types:direction; + } + description "Uni-dir or Bi-dir for the client signal."; + } + + list svc-tunnels { + key tunnel-name; + description + "List of the TE Tunnels supporting the client signal."; + uses client-svc-tunnel-parameters; + } + } + + grouping client-svc-instance-state { + description + "State parameters for client services."; + leaf operational-state { + type identityref { + base te-types:tunnel-state-type; + } + config false; + description "Client signal operational state."; + } + leaf provisioning-state { + type identityref { + base te-types:lsp-state-type; + } + config false; + description "Client signal provisioning state."; + } + leaf creation-time { + type yang:date-and-time; + config false; + description "The time of the client signal be created."; + } + leaf last-updated-time { + type yang:date-and-time; + config false; + description "The time of the client signal's latest update."; + } + leaf created-by { + type string; + config false; + description + "The client signal is created by whom, + can be a system or staff ID."; + } + leaf last-updated-by { + type string; + config false; + description + "The client signal is last updated by whom, + can be a system or staff ID."; + } + leaf owned-by { + type string; + config false; + description + "The client signal is owned by whom, + can be a system ID."; + } + } + + /* + * Data nodes + */ + + container client-svc { + description + "Transport client services."; + + list client-svc-instances { + key client-svc-name; + description + "The list of p2p transport client service instances"; + + uses client-svc-instance-config; + uses client-svc-instance-state; + } + } + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-trans-client-svc-types@2023-10-23.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-trans-client-svc-types@2023-10-23.yang new file mode 100644 index 0000000000000000000000000000000000000000..60db5633af691c53678870dc5f087b911726f2c6 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-trans-client-svc-types@2023-10-23.yang @@ -0,0 +1,63 @@ + module ietf-trans-client-svc-types { + namespace "urn:ietf:params:xml:ns:yang:ietf-trans-client-svc-types"; + prefix "clntsvc-types"; + + organization + "Internet Engineering Task Force (IETF) CCAMP WG"; + contact + " + ID-draft editor: + Haomian Zheng (zhenghaomian@huawei.com); + Aihua Guo (aihuaguo.ietf@gmail.com); + Italo Busi (italo.busi@huawei.com); + Anton Snitser (antons@sedonasys.com); + Francesco Lazzeri (francesco.lazzeri@ericsson.com); + Yunbin Xu (xuyunbin@caict.ac.cn); + Yang Zhao (zhaoyangyjy@chinamobile.com); + Xufeng Liu (Xufeng_Liu@jabil.com); + Giuseppe Fioccola (giuseppe.fioccola@huawei.com); + Chaode Yu (yuchaode@huawei.com); + "; + + description + "This module defines a YANG data model for describing + transport network client types. The model fully conforms + to the Network Management Datastore Architecture (NMDA). + + Copyright (c) 2019 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 XXXX; see + the RFC itself for full legal notices."; + + revision 2023-10-23 { + description + "version -01 as a WG document"; + reference + "draft-ietf-ccamp-client-signal-yang"; + } + + identity direction { + description + "Direction information of Client Signal."; + } + + identity bidirectional { + base direction; + description + "Client Signal is bi-directional."; + } + + identity unidirectional { + base direction; + description + "Client Signal is uni-directional."; + } + + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-yang-types@2013-07-15.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-yang-types@2013-07-15.yang new file mode 100644 index 0000000000000000000000000000000000000000..956562a7b342055127961732d8bde4be21c80d7d --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-yang-types@2013-07-15.yang @@ -0,0 +1,475 @@ + module ietf-yang-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types"; + prefix "yang"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: David Kessens + + + WG Chair: Juergen Schoenwaelder + + + Editor: Juergen Schoenwaelder + "; + + description + "This module contains a collection of generally useful derived + YANG data types. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - yang-identifier + - hex-string + - uuid + - dotted-quad"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of counter and gauge types ***/ + + typedef counter32 { + type uint32; + description + "The counter32 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter32 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter32 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter32. + + In the value set and its semantics, this type is equivalent + to the Counter32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter32 { + type yang:counter32; + default "0"; + description + "The zero-based-counter32 type represents a counter32 + that has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter32 textual convention of the SMIv2."; + reference + "RFC 4502: Remote Network Monitoring Management Information + Base Version 2"; + } + + typedef counter64 { + type uint64; + description + "The counter64 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter64 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter64 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter64. + + In the value set and its semantics, this type is equivalent + to the Counter64 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter64 { + type yang:counter64; + default "0"; + description + "The zero-based-counter64 type represents a counter64 that + has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter64 textual convention of the SMIv2."; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef gauge32 { + type uint32; + description + "The gauge32 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^32-1 (4294967295 decimal), and + the minimum value cannot be smaller than 0. The value of + a gauge32 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge32 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the Gauge32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef gauge64 { + type uint64; + description + "The gauge64 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^64-1 (18446744073709551615), and + the minimum value cannot be smaller than 0. The value of + a gauge64 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge64 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the CounterBasedGauge64 SMIv2 textual convention defined + in RFC 2856"; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + /*** collection of identifier-related types ***/ + + typedef object-identifier { + type string { + pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))' + + '(\.(0|([1-9]\d*)))*'; + } + description + "The object-identifier type represents administratively + assigned names in a registration-hierarchical-name tree. + + Values of this type are denoted as a sequence of numerical + non-negative sub-identifier values. Each sub-identifier + value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers + are separated by single dots and without any intermediate + whitespace. + + The ASN.1 standard restricts the value space of the first + sub-identifier to 0, 1, or 2. Furthermore, the value space + of the second sub-identifier is restricted to the range + 0 to 39 if the first sub-identifier is 0 or 1. Finally, + the ASN.1 standard requires that an object identifier + has always at least two sub-identifiers. The pattern + captures these restrictions. + + Although the number of sub-identifiers is not limited, + module designers should realize that there may be + implementations that stick with the SMIv2 limit of 128 + sub-identifiers. + + This type is a superset of the SMIv2 OBJECT IDENTIFIER type + since it is not restricted to 128 sub-identifiers. Hence, + this type SHOULD NOT be used to represent the SMIv2 OBJECT + IDENTIFIER type; the object-identifier-128 type SHOULD be + used instead."; + reference + "ISO9834-1: Information technology -- Open Systems + Interconnection -- Procedures for the operation of OSI + Registration Authorities: General procedures and top + arcs of the ASN.1 Object Identifier tree"; + } + + typedef object-identifier-128 { + type object-identifier { + pattern '\d*(\.\d*){1,127}'; + } + description + "This type represents object-identifiers restricted to 128 + sub-identifiers. + + In the value set and its semantics, this type is equivalent + to the OBJECT IDENTIFIER type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef yang-identifier { + type string { + length "1..max"; + pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*'; + pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*'; + } + description + "A YANG identifier string as defined by the 'identifier' + rule in Section 12 of RFC 6020. An identifier must + start with an alphabetic character or an underscore + followed by an arbitrary sequence of alphabetic or + numeric characters, underscores, hyphens, or dots. + + A YANG identifier MUST NOT start with any possible + combination of the lowercase or uppercase character + sequence 'xml'."; + reference + "RFC 6020: YANG - A Data Modeling Language for the Network + Configuration Protocol (NETCONF)"; + } + + /*** collection of types related to date and time***/ + + typedef date-and-time { + type string { + pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?' + + '(Z|[\+\-]\d{2}:\d{2})'; + } + description + "The date-and-time type is a profile of the ISO 8601 + standard for representation of dates and times using the + Gregorian calendar. The profile is defined by the + date-time production in Section 5.6 of RFC 3339. + + The date-and-time type is compatible with the dateTime XML + schema type with the following notable exceptions: + + (a) The date-and-time type does not allow negative years. + + (b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z + all represent the same time zone in dateTime. + + (c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using + the time-offset 'Z'. + + This type is not equivalent to the DateAndTime textual + convention of the SMIv2 since RFC 3339 uses a different + separator between full-date and full-time and provides + higher resolution of time-secfrac. + + The canonical format for date-and-time values with a known time + zone uses a numeric time zone offset that is calculated using + the device's configured known offset to UTC time. A change of + the device's offset to UTC time will cause date-and-time values + to change accordingly. Such changes might happen periodically + in case a server follows automatically daylight saving time + (DST) time zone offset changes. The canonical format for + date-and-time values with an unknown time zone (usually + referring to the notion of local time) uses the time-offset + -00:00."; + reference + "RFC 3339: Date and Time on the Internet: Timestamps + RFC 2579: Textual Conventions for SMIv2 + XSD-TYPES: XML Schema Part 2: Datatypes Second Edition"; + } + + typedef timeticks { + type uint32; + description + "The timeticks type represents a non-negative integer that + represents the time, modulo 2^32 (4294967296 decimal), in + hundredths of a second between two epochs. When a schema + node is defined that uses this type, the description of + the schema node identifies both of the reference epochs. + + In the value set and its semantics, this type is equivalent + to the TimeTicks type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef timestamp { + type yang:timeticks; + description + "The timestamp type represents the value of an associated + timeticks schema node at which a specific occurrence + happened. The specific occurrence must be defined in the + description of any schema node defined using this type. When + the specific occurrence occurred prior to the last time the + associated timeticks attribute was zero, then the timestamp + value is zero. Note that this requires all timestamp values + to be reset to zero when the value of the associated timeticks + attribute reaches 497+ days and wraps around to zero. + + The associated timeticks schema node must be specified + in the description of any schema node using this type. + + In the value set and its semantics, this type is equivalent + to the TimeStamp textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of generic address types ***/ + + typedef phys-address { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + + description + "Represents media- or physical-level addresses represented + as a sequence octets, each octet represented by two hexadecimal + numbers. Octets are separated by colons. The canonical + representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the PhysAddress textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef mac-address { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; + } + description + "The mac-address type represents an IEEE 802 MAC address. + The canonical representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the MacAddress textual convention of the SMIv2."; + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of XML-specific types ***/ + + typedef xpath1.0 { + type string; + description + "This type represents an XPATH 1.0 expression. + + When a schema node is defined that uses this type, the + description of the schema node MUST specify the XPath + context in which the XPath expression is evaluated."; + reference + "XPATH: XML Path Language (XPath) Version 1.0"; + } + + /*** collection of string types ***/ + + typedef hex-string { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + + description + "A hexadecimal string with octets represented as hex digits + separated by colons. The canonical representation uses + lowercase characters."; + } + + typedef uuid { + type string { + pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'; + } + description + "A Universally Unique IDentifier in the string representation + defined in RFC 4122. The canonical representation uses + lowercase characters. + + The following is an example of a UUID in string representation: + f81d4fae-7dec-11d0-a765-00a0c91e6bf6 + "; + reference + "RFC 4122: A Universally Unique IDentifier (UUID) URN + Namespace"; + } + + typedef dotted-quad { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; + } + description + "An unsigned 32-bit number expressed in the dotted-quad + notation, i.e., four octets written as decimal numbers + and separated with the '.' (full stop) character."; + } + } diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py index 32ee81e801e1d93a23a8a752aa6c63cfffe43a82..7d2aa714a27a854291c55275b2f89bd01678fe1d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py index 72b09f2b7d1422da2554a3dfe873a6bcff87413d..ad2a2e0321d837bcad6b672e841aed0544c66d82 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py index fdd2ac64ac22830515c19d8ebfb7d1868cee19fc..5fcbe27e1c736531c53b0c9d3049fab023629b70 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/__init__.py index 7a0c786e1defad55a4dcc20461b221472d3be687..1ce8327f5ad525b2bf49b9c84a229aa2d958bb57 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/__init__.py index c5a00cae7ce23108a5db10e6192b315330e3a86b..eeddff20c41d9819c03c79232a7ec6e763b32239 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/__init__.py index e95275ad804d53820f3fc4a0210d60c645a70d14..43035855bbd9742ee0e38556a4fc9cbd411ba8ef 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/group/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/group/__init__.py index c294bb266b4b8f6416b1ffe0ea59276c5a109b0f..25c76f6808935ff2ea0f188c10d02ccab648e9c4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/group/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/group/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/__init__.py index dd0f9808e43dd3930efcec86b5b484b4107b77f6..a4886cb86a625210cdc5b1bcba9413f525c1b81b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py index 4ec5ba06dbf93901881ab6045d1896b85583a642..955ce25383328c5f02d3c644fed415cc9a384b85 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py index d470943c38427e03302d60c52cf22cdb16597d37..2e904a74e9430d7b96a4b864721294797bc6c8e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py index 4f7ddf138eefd0c4a086a06a2b846e74bf45b1f6..6dee458b28d386c8f0165ee3ae5ca8b8106bb5b1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py index ed29784183bf0d387a6c4facd935e0870251e560..651b60be76807ce54114aab53f8edda043529f36 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py index 1371c9edb91fac8da7f5bcdb3854d5dbc8cc2d1d..57c048d408159e02b9702486d7a2574e65d5b4e9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/__init__.py index 296b880921a48cd2087ba3a9f82c18324e03d7b0..8441bdeb0694db003fee46ec8887a69331bed355 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py index 0e8520f1b36270cbc09d1acddda316eb7198c535..e353bf60b5ee6aa3cf5d15722bb943ce2ed624ad 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py index a67fcd383e6ecaabe98b4aa1c1d892f68d21840f..296b0c9c8f53142821807ee1c3b86cb36b202e8b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py index 38302dd8447f8af0dc7f4e9f133b2337ef8ef3c4..adb053989315379cc890bc0891981bf8a0a9255b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py index 395aabd46097a05d51746b4298b5fa845a369068..4c3c0bba33f0ac654a4ad4f5f0150350de2fd3b1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py index 124ac4ddc30dc414c79160077a4fc4042924472e..e172ea22fccd98d865fb99a441e8849d67694cfa 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_monitoring/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_monitoring/__init__.py index bfca50ba90e73161807ba1173e7d5113348a7581..0de7b4ae596aaaf99209c82418dafb32fefefe1e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_monitoring/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_monitoring/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/__init__.py index 6e1424075780ca5a04525d4124fb2af47404ec23..8c8e02942244f4961d0aafb9c4b128ee48d8148d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/__init__.py index 1e9d402c2c675f5f6b65fc17952ad0909b8059d2..4224da0be010ed8f7e13f085c38ea1f3f3ace9d9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/__init__.py index fa176413be0dab678f83a0d9a41737c4bdd90859..447517ee1da2d271189eb6ac03faf7c66934d434 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/__init__.py index b239a65e175236f7873bd8165ac2a2c423e1f448..9b3e158596cf4aa62fd219f91742afa046d286a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/__init__.py index 2d0c87599d2b498607615d75ec2bbaab7318af15..b2b1f998e42cffeeebd9a89c8f64503831d3b65c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/__init__.py index afe092733209a8030bf14f62f3baf77eaabdd6bb..e542083d84663afe77efc98b57401bca2ebdff89 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py index 85730b2d943861ca804a89d0a32ab69bcc27f5c0..36ed9c582b84713ae7d2ff3b5b5c961eefce64cd 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py index 07832b8f39b43c7edd743e03c369c60d5c63624d..b8c97e698a3241058ea813f1aa37f9f0613aff9d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py index c308b850384ee650e0ea222b7776b52b378718fd..b27058bcda070017c573c2ac62e22c98e9501be7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py index d34f1d097105a51fd50e9f351f61e915352319bd..bdf32c475add75b454b03f6e9b45e35f6b556593 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py index 2593c301f7b0b52ce5c155c0a8672714de5dae84..297fdc436d5a324e011d4db71d10103b17fa86a5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/standard/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/standard/__init__.py index 46e20b7346f1d22e7a61b81a4afb170d9ed36a5b..639f8336ced845d0f4c8c459676f27144a2ef2e7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/standard/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/standard/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2mp/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2mp/__init__.py index 26189213c12a3803a76ecbcf06ff15c598e6dbce..fb95db32893dd51d33560d08fa461a1b8a81dbab 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2mp/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2mp/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2p/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2p/__init__.py index 5abb50263afbcf98d9fa2036fa274ba69695984f..23c354154783908636ae387f5e644275f76a7da8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2p/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2p/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/__init__.py index b239a65e175236f7873bd8165ac2a2c423e1f448..9b3e158596cf4aa62fd219f91742afa046d286a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/__init__.py index 2d0c87599d2b498607615d75ec2bbaab7318af15..b2b1f998e42cffeeebd9a89c8f64503831d3b65c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/__init__.py index afe092733209a8030bf14f62f3baf77eaabdd6bb..e542083d84663afe77efc98b57401bca2ebdff89 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py index 85730b2d943861ca804a89d0a32ab69bcc27f5c0..36ed9c582b84713ae7d2ff3b5b5c961eefce64cd 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py index 32ab7d60c22d534b878f967b4bf57e0509583bbb..fd09001989f239be28683e3662212a67a9928e5a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py index e2c022caf902743b8abe798b61b8f1439d276862..9ac75543b9cef16b0c4229c57bc16ac020404b92 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py index d34f1d097105a51fd50e9f351f61e915352319bd..bdf32c475add75b454b03f6e9b45e35f6b556593 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py index 2593c301f7b0b52ce5c155c0a8672714de5dae84..297fdc436d5a324e011d4db71d10103b17fa86a5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/standard/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/standard/__init__.py index 46e20b7346f1d22e7a61b81a4afb170d9ed36a5b..639f8336ced845d0f4c8c459676f27144a2ef2e7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/standard/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/standard/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py index b239a65e175236f7873bd8165ac2a2c423e1f448..9b3e158596cf4aa62fd219f91742afa046d286a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py index 2d0c87599d2b498607615d75ec2bbaab7318af15..b2b1f998e42cffeeebd9a89c8f64503831d3b65c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/__init__.py index ea6d366eb1ff15535bea20dc431827e5f859bc4f..f30bd594b6f890d6c41a71c26951c04b818397bc 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py index 85730b2d943861ca804a89d0a32ab69bcc27f5c0..36ed9c582b84713ae7d2ff3b5b5c961eefce64cd 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py index 23374967999723000d8649da5d3ec8d5489a5794..e1385f4d0f397416f48a6293f343e83062c6cf0f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py index e2c022caf902743b8abe798b61b8f1439d276862..9ac75543b9cef16b0c4229c57bc16ac020404b92 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py index d34f1d097105a51fd50e9f351f61e915352319bd..bdf32c475add75b454b03f6e9b45e35f6b556593 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py index 2593c301f7b0b52ce5c155c0a8672714de5dae84..297fdc436d5a324e011d4db71d10103b17fa86a5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py index 46e20b7346f1d22e7a61b81a4afb170d9ed36a5b..639f8336ced845d0f4c8c459676f27144a2ef2e7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py index f3239d57811ab3ddff018c0347524513d77934aa..73ce59f0c595c23f1843bcfd8caf1762d50b1076 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py index 5fc0ff62c3ed5a5ea1a7d64e77edeb84d3edf286..3727a0a9b4f9300693fa6e89c523c7b493bea7c5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py index 624b09988064151b30cfd5286a6a0ef6681e3dd0..9f31168ac33bbb7a741f5527e8807e30d89e7745 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py index 93194779e9c37ccae0bca5adcb51ccfb0ff7c349..a5bb242343b9510c3babe658d5687fd050e8437c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py index a18ad45c114040f6b3d58ff592ea6cfd9461a8ef..1ad33efea7f6765432dc979c4e02bd2ad2fa1127 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tag_opaque/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tag_opaque/__init__.py index d56e829739daeecc91ead77fb6e40c954532a15e..da51291e64f46be7bcfa387dd4c22644873208cc 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tag_opaque/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tag_opaque/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tags/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tags/__init__.py index 8ef753261d2bf1b99a0fd2a2cf198785baffff1e..a4bf2a4babfdfd9a6878b464321dd019694cc919 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tags/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tags/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/__init__.py index abad77461c9f94149dc016054d669526c83570af..1803594454aa66ca639ae483b23d5c75623bbfbb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/rate_limits/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/rate_limits/__init__.py index 492759055bf57b40705a54dfd087f89fa61a87dc..644b85a6cb5851dcd73f41cbe4928706d9438006 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/rate_limits/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/rate_limits/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/__init__.py index 893cb264eba6e98af718d8244d262d0888793ca0..438ecad18cf453c82f246c0b2e01b6c7867d1502 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/rate_limits/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/rate_limits/__init__.py index 445a7a5df5d7db2b92ecb59f0f54a4c316328d78..7b4c7ea22540c575f2bca546c2c8f841f5a40fbc 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/rate_limits/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/rate_limits/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py index c7b5e10b24076aa3928995dc846b4e138516379b..bff2bb9c153ab12693b750b73213ace0797faf4e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/opaque/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/opaque/__init__.py index b367227c3d43cd31c1b3df857ed944d62d371806..c397ebdd74959a116c4f420d7f1de67805052eba 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/opaque/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/opaque/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/__init__.py index 850f7d924c02b4a89030c1a7757b1e728ad35326..428e2dbee6177178cc516f50c7516de4a89ec7cc 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/attribute/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/attribute/__init__.py index 76180637c83f2a158838bacaae99add6e9fe5b61..ff3ba97325ed43f4a256a471b61d78dcd6317569 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/attribute/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/attribute/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py index abad77461c9f94149dc016054d669526c83570af..1803594454aa66ca639ae483b23d5c75623bbfbb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py index 49a7b3deeb46fce3abf89af50e4e3b922a00bcc5..929407f497a9bcc46b4d63fe71284abb0aad353b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py index a88123d6c81ab2c15db96d13ffa2af9458fa904e..11f0d0d786a6787fe2296e1567b681d5ac864ba1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py index 893cb264eba6e98af718d8244d262d0888793ca0..438ecad18cf453c82f246c0b2e01b6c7867d1502 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py index fdf96f15c5ceeb7ae878052b998c9658202e04d0..620fcb65ba0b007d7a998b8b6a66d633ffb335d8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py index a65f09fc30c0324738fdabb36a717bcfddf3496e..b3ceabd8562fb89fba74c1567767161132b7cb5b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py index d745437bd534e2fa460f16fb2ca3bb982d4ce3fc..cec33be52f6eea99ab416124615ffd284f3b785d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py index b367227c3d43cd31c1b3df857ed944d62d371806..c397ebdd74959a116c4f420d7f1de67805052eba 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py index 850f7d924c02b4a89030c1a7757b1e728ad35326..428e2dbee6177178cc516f50c7516de4a89ec7cc 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py index 76180637c83f2a158838bacaae99add6e9fe5b61..ff3ba97325ed43f4a256a471b61d78dcd6317569 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py index f39dc9971795fd83eb61a09ca7a4fea42352ac18..5d6e28b31589b748832c45afd4f1db3b75c1ec2c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py index 99d87b7934889ec3665b1e4af12f836ec76016e0..0eb9e966eab889db7f6983acec5bdb6503a856e5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py index f802183296df337e7ebacca0d3290f433341130d..637502c60b97e0dc7ba074411ffd051e75e0d59c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py index f5581ef12dac29ce3050652c8c969a76f0ac88fb..8be09818ece8ad1e4863a37e3695bb8766e221db 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py index ab3508c5b8babc01483e2d3a2e2996481a28ef43..1e2ef07ed29711474f94764f2e2b30f7ee53a853 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py index fceafd62985c5230276d129779bf35378d84e87d..361525f8b1b9fc28b95f3b6d6f53454737e75524 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py index d40d27cb705b0fbf4970fa215054e46b4743d885..62c13c73d3921150c4c6dec83eca2b0fb187e33d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py index b4fff2c3b44b9e1649b5eabb6b12cb36d376b6e1..cc114d6147813bcffa28bed6c42359f7687b6ec2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py index b239a65e175236f7873bd8165ac2a2c423e1f448..9b3e158596cf4aa62fd219f91742afa046d286a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py index 2d0c87599d2b498607615d75ec2bbaab7318af15..b2b1f998e42cffeeebd9a89c8f64503831d3b65c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py index f20900d5bafe087db15381e30cca8d6c7555875c..39b030bcbe5ec1e26ae544823a11392e8f502c49 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py index 85730b2d943861ca804a89d0a32ab69bcc27f5c0..36ed9c582b84713ae7d2ff3b5b5c961eefce64cd 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py index 0cd58260dfa621982847da9dc6fd2bfd5c74331b..a1898734d977fde94a8f3bacbf382af2f3a39ffd 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py index c308b850384ee650e0ea222b7776b52b378718fd..b27058bcda070017c573c2ac62e22c98e9501be7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py index d34f1d097105a51fd50e9f351f61e915352319bd..bdf32c475add75b454b03f6e9b45e35f6b556593 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py index 2593c301f7b0b52ce5c155c0a8672714de5dae84..297fdc436d5a324e011d4db71d10103b17fa86a5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py index 46e20b7346f1d22e7a61b81a4afb170d9ed36a5b..639f8336ced845d0f4c8c459676f27144a2ef2e7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py index b4239eb7df15eb9629be735267d4fb31ae46af03..c1e5d9a4edc937e3bec9bef13912b46c5c25595c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py index f5581ef12dac29ce3050652c8c969a76f0ac88fb..8be09818ece8ad1e4863a37e3695bb8766e221db 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py index e69e53ef62d967bc5dbd072cf4f405d60c28be30..c8c38236ce056f5a400e99b4d948f908f1a54f59 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py index b76cce7a32018d0f77c2a9ac3c7fbbc94665680f..500ec92619ae5a6dcc32b14d34ccea0f40737191 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py index 27cda68070b24236354d46b094d0ad3787ab4485..f4558fd1bbb1dd822b32f445e66339143b2478e9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py index e97edc736f2f5435711ad71a78313fa2f98b446b..94bd457d698c576c1f5b959ee1cf610d29c6d607 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py index 6992f5bf7f3fc87ff009bcf075de2cf2cd698f12..4bbee9dd66033a713b6da00dcf56ee91e9be9eee 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/__init__.py index 85730b2d943861ca804a89d0a32ab69bcc27f5c0..36ed9c582b84713ae7d2ff3b5b5c961eefce64cd 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py index 2664a9278a5332d04479df4c5026f38ec2f379d9..5fc6a303a36a47ff9d3457f69556b935e1dee0db 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/__init__.py index e2c022caf902743b8abe798b61b8f1439d276862..9ac75543b9cef16b0c4229c57bc16ac020404b92 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py index d34f1d097105a51fd50e9f351f61e915352319bd..bdf32c475add75b454b03f6e9b45e35f6b556593 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/service_function/__init__.py index 2593c301f7b0b52ce5c155c0a8672714de5dae84..297fdc436d5a324e011d4db71d10103b17fa86a5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/service_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/__init__.py index 55faa977ba04330042964cb79ab2a3bdd8a6571c..829a50433257eb9a5584655e13f99d80dd214320 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/__init__.py index 44952bf764009ce37b74d8ab45cf20dc0e0e450e..9d4ece4ea74f4c31d35b98a115e33517eafe1398 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/__init__.py index 3efc3e1518f16330422d43ba925ea7713a2cef25..44ba6bd98295d3c48e92dacb5a6cfb176238e37d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/destination/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/destination/__init__.py index 387af3071c585daebb4f11cb2bc7890a37967e56..09e7e7583fc57d75bcad193dfb593abfc02346d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/destination/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/destination/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/source/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/source/__init__.py index f1ea95f113d40f596ea39edaa5d1b07273f22148..5f37f2c29a0d1030c1f2634b065b62dbe6733dc3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/source/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/source/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py index dc99caa282f1b3c61577107a169430654949fe3f..8cf3fcc8e94948a7f4fa93c5a7430049c3a5d3a6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/__init__.py index 2fac1a941b3f2b45da7b78f3f4eef6cace58f3b5..6c80a7e3152191c8b6b38c9618e7b49072b42b7a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py index 225c39aa448d3165a61a66735cb5755c9eaa4908..651d9ad0743836b195f95a19d193acc233663f09 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py index 2ac76501adeb07f82ad08b8084a64534cca4a163..99efa3fb5f08dedddca2df887243ef74cf8198b4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py index fc2b9edfb5c0d0a12233c23e4b0982fc72020ae0..20087ee95e5ecd1948d3cdf49a4a5751bb6dbbe7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py index 8b10b2d452b813e8821571384ff36553830cea9b..f5fb3a8768a7a0035ca00db0bb6e7e17de23d73a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py index b8cd4a23746aa284e47784cb4fccdf7278ebce34..4758899a4fea940be6709d45f85641230259b579 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py index 2dea8fc98c2766683324fb1271d8adb121b4dea8..4eb9596f6babe6de0e1f0b9108266fed242a5bc6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py index 6195320b1b05440e98cb09c672a9286f7ac08017..89077be905cdd8c4c862acc2d29662bc6072954b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py index aacb98f85b2ac241f3599daa93b27fc0f520c8ff..11983d935bb7a66b021733eb99e48ccf33da4c15 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py index 26d315f6a43287274e5b410c83c64a950c07014d..7cfdd77bffc1ccb5983b51c0b80ce4ee7228ee82 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py index 63598ce3305f3b8b540d2d10d31cf66604ea175c..04d31ad2e080990497efe7c49c7114d12b24a401 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py index 42361e143910d3dc4963a100c961f548c4740f4a..5354fe13e6dde61a2eefd3866e17d29bd14755cf 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py index ddad298bbc0cc7c626bd869965fe6da4630b6fb5..c01e6ec6a9bb1e56c0081e4166af677aa037260b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py index 29f30ca794c567238bb34de6d5de219f72b68cca..a7af90c987a8211e777258468be7eafd2edb16c3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py index 1f85292e3a5a398b30f523c488c31588fc79925c..e009a37246936ab2045ab0ddd25f67f855d54a2a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py index f2ad525773e032b7b224f5b661e728ffe8950e98..93b8edd584c855acdb31e357a7745f38dc606e30 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py index c8985523ba0c69fac8fbd1852bd47f2891d92bc6..1ad793f388a08a6a26a42470299e9bd653d403a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py index 7d3aeed125a790da60e394f9e834fb871ab9c3b9..57901c59123251588a65d3ee10009ded935bb1f8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py index 8dbcffdcef6a5a8e5db53b62fce3a3f123ea450f..c92c7b9e1e3e7db8f65b4ee54b817da0c779bf08 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py index 92e8cf6bf3d3ec018101b740c97d4721224527f7..968d401f366d3005a5d8cda261606b480e272da3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py index e5e97fc164047e8b36086ca3700f75d61848220c..43b0c777f396ce9bb2c63e09b91942ce5f72c57a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py index 561b31be827190ecd2cf49c88adb2118e8018b00..f9c1d141a1127dbb1f1e43d86c1ed2b347e6c86a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py index fd4e9d8a913ee8fb4ba711c3d10310583ea16711..7aecfd9bad7b90745226b34cdc6bcd3354537c1b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py index 91fd095ce45cdfe4669215874ed2aeabfc57b835..253f6b7f324045d3cbe94315c623a1650c9d44ec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py index 63598ce3305f3b8b540d2d10d31cf66604ea175c..04d31ad2e080990497efe7c49c7114d12b24a401 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py index ecaf0b0c27bf56b948e42a76356e755c71ebf360..ce56898d373d62bea60122c428ec5202a16b3bdb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py index 08e82ba9e2412515916a0d1c4aeb8cb819cf7ba8..aaedda522742f2164959f090bf267285af0b5ab8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py index 706a755fae50b2e463f93632ba44e2dafcf21661..60cc483bfca459c15ceaf59f1695b504c786b2de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py index 58a1d9d4dcf0f87fa40fddfc379b3245219a8ef0..9f0e311f823234f26e0d474e682bae647868bbcf 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py index 42361e143910d3dc4963a100c961f548c4740f4a..5354fe13e6dde61a2eefd3866e17d29bd14755cf 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py index ddad298bbc0cc7c626bd869965fe6da4630b6fb5..c01e6ec6a9bb1e56c0081e4166af677aa037260b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py index 29f30ca794c567238bb34de6d5de219f72b68cca..a7af90c987a8211e777258468be7eafd2edb16c3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py index 4a396a20af1746df44dc4e4f479436fde2d35e17..24d80112a5857618b108fc413e2f5532cf0f5131 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py index f2ad525773e032b7b224f5b661e728ffe8950e98..93b8edd584c855acdb31e357a7745f38dc606e30 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py index c8985523ba0c69fac8fbd1852bd47f2891d92bc6..1ad793f388a08a6a26a42470299e9bd653d403a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py index 7d3aeed125a790da60e394f9e834fb871ab9c3b9..57901c59123251588a65d3ee10009ded935bb1f8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py index 8dbcffdcef6a5a8e5db53b62fce3a3f123ea450f..c92c7b9e1e3e7db8f65b4ee54b817da0c779bf08 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py index 92e8cf6bf3d3ec018101b740c97d4721224527f7..968d401f366d3005a5d8cda261606b480e272da3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py index e5e97fc164047e8b36086ca3700f75d61848220c..43b0c777f396ce9bb2c63e09b91942ce5f72c57a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py index 561b31be827190ecd2cf49c88adb2118e8018b00..f9c1d141a1127dbb1f1e43d86c1ed2b347e6c86a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py index 9ef388cd63aa7c8947fc3391bad703bb01f3d827..78ef423bba5d1b3fa3b53e1b352e472d8f63ad73 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py index eee438314ebe12c55dba835cf5f6839760a31c61..ed635c2bbcd9aa08db82c44fb82a07b71715a70f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py index 95deb32ec877a103436ef7b54fd1a23501216fab..ef4c66a9a11288b9f73beb51bb55aacce369aab5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index 1cb78075b80ccd8887818376324a016daf17b67c..b36a11e14f1390ca2f84a276886752dd19fa7bb4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 652da89e61bd32067e97591a11a2970e965bed4a..635a53cb52cc3c1fddff4a4aa7531456661d03a8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py index 34a2a729ce6d45e11174065699c428a7ac677a8b..10f04b0ab7b9835e2d61e24fbcb233e3412fb6b6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py index e6792cd8e4b1e1a843abf183eea400e13dbb78be..f63a6bff07a0ad221f5111610cc95c0a27588efb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index 1abedb4d3f8145943387f3e66e3e17fed741dcdc..5e0c0aebdbe40cf83887665d56f35ceed1f45ceb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 2aa767b55c350d6b4b7ec04998c04f5fa568d051..34a7b45cc1ea419d4ebdc88b4aea977a4810b942 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py index c5cccf39482c3497e05c1c7ab8f4fdd3e2d7490b..3f481cdb5adcd93e124ab370f5cea07a7368a08a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py index 303858f3e0c28faecf9696d2fbf403d5510cced8..f362c1c8490c912a65a726bebf3172edc3a99107 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py index f854dfd329ce016317b7b9743ace874769f03094..94c595725b80725776d1dea823dce5076560cf72 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py index fd4e9d8a913ee8fb4ba711c3d10310583ea16711..7aecfd9bad7b90745226b34cdc6bcd3354537c1b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py index ea01121d057b002c61d31fe6f49e50049c04b952..ad317168f140e131179e6774022963459c556364 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/__init__.py index 0fb174b74c14bff912498e9c690c949d93d2b76b..4a4fce484c23330a6e9f80465501b15ed317c9c3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py index 7d41731af61cc5a91e1178ed27ff7a5634149f15..951167fa07b78ba9cbdc02efa6ce728a3efd66fe 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/__init__.py index c6a31d9a0e3b49286b2df219900fc10df3c39c56..758a7e0a331379d960b5878e49c12a1bc5a620de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py index abeb4a984b9b0c939ae51217ac7144f568841550..c946dabadb72e6f2debf412559955ed8aa435da5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/__init__.py index 2ad66ed994421c34ac0e36ef0189e6f5a21b646f..be22df4039439e3275b7ff55649428fa77ff42e6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py index 5a631c3553d9ab5ce7b22b799dbf338a0f87fa43..aac7b3acf8634789427ab387046e673a61c3666c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py index 21bfe84df044875786766febf0915d7c70737106..9fb753a1d0e019353d129a83f3484de1c43e30a8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py index 08c000d9b26dfa8e9c926a9ef5705a9e9fa0fa31..87ed01e106a7560233cdcb41f274a5171264d1eb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py index bc57f620463762241042a9afbb5d5fa46368dc55..ec322aff112906fa42559de9ea92be249570c14e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py index 14cbae7304f9e1b80e18a1547974269f00b66621..6486624f9daaaad05b919842131e28bbd81a407b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py index 29f30ca794c567238bb34de6d5de219f72b68cca..a7af90c987a8211e777258468be7eafd2edb16c3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py index 86c3a10ff67557b730c7883f68f60a5220014139..be56b984df305b9174426cf043a51c72a36dd6a2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py index f2ad525773e032b7b224f5b661e728ffe8950e98..93b8edd584c855acdb31e357a7745f38dc606e30 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py index c8985523ba0c69fac8fbd1852bd47f2891d92bc6..1ad793f388a08a6a26a42470299e9bd653d403a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py index 7d3aeed125a790da60e394f9e834fb871ab9c3b9..57901c59123251588a65d3ee10009ded935bb1f8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py index 21c8d4f4c8def0e90dabe399cc305dc3b8d3d500..1257f182084440ec2861c7ce483bf21d652a94d1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py index 9e0ca52a42ed25af1b7e0612d3e9a6b3d43b6ef9..0e76372276e9aab4a2c308403c1696c5d67c8512 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py index e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed..cb5f56c53dae00c6a87c0a59e371d697081ecefe 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py index e0b3f85a0993ca8184c4cec6a891f373b0666767..502239d3ea98eac2557f64bc432fd10577eb2aa7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py index aea7bdd4cd5ed1743a1764899878a1ac8035348e..4391fe136a0f34d077ecf814491e3b8ad82d3205 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py index 405906d3e6d9dd1eda79aae3a6302c37e0e24988..8e61150797e91559da2a053b43f6de36521f05f0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py index e00223044020f31fddaff4d0a41e5b5c2c7181bc..4f2b509861ae4676ad459bf3d0f8c45f327be06a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe..573491548f562faa99328926d4bc12112cb988cf 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py index 420f996a13a20bf122ec87f0fbb109b34246eb61..a9fc6d28634249cd36568b467c3507802cc7cd0a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py index 95a1628e4caf545e0d31823f89ea93178ffb76c7..b1b7d3820b941df345336a5748c3883a8962df86 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 2aa767b55c350d6b4b7ec04998c04f5fa568d051..34a7b45cc1ea419d4ebdc88b4aea977a4810b942 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py index 3209b99bad73493077e9e91a8053f320b05c11c0..51f74a1f81e2d11d4c4e05b5e729953274f028da 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py index c9f24330ff35e20e47be0db730f6ec682dd71d2d..0e354783d167536f9e27bf84396e4710303e5999 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py index 99085dad5868ea8d4f63c188ccd69653b0d7a1d4..930b912099950a1f57b444cfb98cadae531cc8d8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py index f2c993df52db1f2e1aa1085a57856c8585fcba58..feef9127c74765b06c4b607b005973df604edfc9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 2aa767b55c350d6b4b7ec04998c04f5fa568d051..34a7b45cc1ea419d4ebdc88b4aea977a4810b942 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py index d345b57b342afaa50a04c5782794f34b810b795c..8857cb729926b1533c5e0b64d5bb7cbe73aa6bcb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py index 500d880ad6ad48b8079aa3bea0b1e644f7008f49..737f59a0c9331975625796491cc12a33ad0b0084 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py index cbd32a2bb98c6e47f795103fbc122cbf7957e1e6..2a43b9e9d6e1746ad99e0fc96b5f9c2621175574 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py index af72bcf2702ccee1d360bad39000241d1abfdc19..af56528baedd2b98c7f0c2513bab087ad9cc40cb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py index b473367cc49ea6b9b116af98e3d25cf058f70ffc..f240be1ce2f34a9cd43818ae8b7ac760d4a16991 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py index 7c038ff21414923b939355bb6bdda825d64ece5a..834d54004adcb031a0aa22c0ab0876645ef5adc5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py index d0e4a21b11accc2103aa85169cb46c386658d5cc..4c70f00d2b4b449e762d99b86b1a5e6f0ed1df74 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py index a8439d312f2b42a7a09bb2b04e3c9207920fe69c..e4c2f928e3fce6b000c351d4657e70e4ec9b868c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py index f56a1940217a7ca828879399878fa57c2402196c..b4c89473a6e74b2b177960f04d1c00bac61bf132 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py index 75d22895c1b8c77e3c13ad584eaac74d23d0e359..abbcd1fe709062e8e480966ade273c0804c4844f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py index 356f7761b99b2e313b0638407dbaaa3996e6c418..3c37b21ef6ff73f0639da5503747fc6251df864d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py index 2a97d5e3e1d7066756b051d139f997d9a46b3c6b..56eb60da5846332a1583d255378a1b4c27238b43 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py index 5e807a0b29d665deaaed7620fee6b2b7c697fbb6..43d3f73de0797a8c98cb86e80f50dde70243eb4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py index 631911d141fd6e870942bd77f7ad80c33e221091..e9d2655479fb23505f5b3bbcfb6b5c7c70472a04 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py index 54d85c0e52070f3cffb5a27ea963d0923bdcc379..373798e80fd66cbd707eaff7c2376c42fcbbf2f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py index d9b66f1860f862ec66429b96c9f73d88815ecfd6..7b65a97db822417ce80967fa5ad29f217d0818e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py index 76541b227cefa1dca289ff8b4cc6350032acc02f..45551ddebf14106b2983092be05580c8a7e07256 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py index 7c038ff21414923b939355bb6bdda825d64ece5a..834d54004adcb031a0aa22c0ab0876645ef5adc5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py index d0e4a21b11accc2103aa85169cb46c386658d5cc..4c70f00d2b4b449e762d99b86b1a5e6f0ed1df74 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py index a8439d312f2b42a7a09bb2b04e3c9207920fe69c..e4c2f928e3fce6b000c351d4657e70e4ec9b868c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py index f56a1940217a7ca828879399878fa57c2402196c..b4c89473a6e74b2b177960f04d1c00bac61bf132 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py index 75d22895c1b8c77e3c13ad584eaac74d23d0e359..abbcd1fe709062e8e480966ade273c0804c4844f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py index d6ae074074e7913854992f9bd32a8f51f6b9d7b7..6c791afde38fd0bdb53b3518addff3834fc0f95d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py index 2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f..4368687ae2b141d4df60f3c4a5cf1eefbfca716c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py index 74b9e21c769902d7a2bb1f362d2e95cbf5d862cd..d7b77da59516bfd8a9b9a731138bd8805b3bee6e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py index 8bc2d82e13718733c4ed76acde67b8508071d571..c25dc023092d4a407989f068d8ddc96e883dd0ad 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 8d9d3d58559fab79fa12a634fb4aecbef61780f1..61c36913f51193ec26b4136a06a1ddf0a40b5841 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 3a6876e61b9d99b8ed5b00bc13f60857e8fb3d76..2ec5da1f9f269488520fbc8b546dc67ac2894821 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py index 5e807a0b29d665deaaed7620fee6b2b7c697fbb6..43d3f73de0797a8c98cb86e80f50dde70243eb4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py index 631911d141fd6e870942bd77f7ad80c33e221091..e9d2655479fb23505f5b3bbcfb6b5c7c70472a04 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py index 54d85c0e52070f3cffb5a27ea963d0923bdcc379..373798e80fd66cbd707eaff7c2376c42fcbbf2f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py index d9b66f1860f862ec66429b96c9f73d88815ecfd6..7b65a97db822417ce80967fa5ad29f217d0818e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py index d03118f5c94e3726341c4332447847c61623d616..ae89b6b3c1c152159860a966088badc509baa86e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py index 29f30ca794c567238bb34de6d5de219f72b68cca..a7af90c987a8211e777258468be7eafd2edb16c3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py index 61cb67d4bdc9682e1228c9cb9ddfb86817c96f62..1ecbaea57fb9c3c8c5460b10537c0c0c548dc492 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py index f2ad525773e032b7b224f5b661e728ffe8950e98..93b8edd584c855acdb31e357a7745f38dc606e30 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py index c8985523ba0c69fac8fbd1852bd47f2891d92bc6..1ad793f388a08a6a26a42470299e9bd653d403a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py index 7d3aeed125a790da60e394f9e834fb871ab9c3b9..57901c59123251588a65d3ee10009ded935bb1f8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py index 2feb9b8f1d3512055ea66c91d1dfc9059e8cf901..d9631fe4e489e99da52b0303f57c541195530d51 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py index eee438314ebe12c55dba835cf5f6839760a31c61..ed635c2bbcd9aa08db82c44fb82a07b71715a70f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py index 077e86df002f4bbdf6f8b1a9767746e1493b8fc4..81e9184235996cdc735673a26cd6836164cc3ab0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index 64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe..573491548f562faa99328926d4bc12112cb988cf 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 00c674167360cd2724dd7263e34c54dbb27dbccb..e08c97bda84c433f29489fbd04c982f55625eff9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py index 34a2a729ce6d45e11174065699c428a7ac677a8b..10f04b0ab7b9835e2d61e24fbcb233e3412fb6b6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py index a2076e54c3ca2f4e75844db6a7ca736e6a1cc6ce..0ea042535a7a9cecf2c747380f1bd46a827b6ea4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index f2c993df52db1f2e1aa1085a57856c8585fcba58..feef9127c74765b06c4b607b005973df604edfc9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index e568286bdabfa9cd970ff66b3e9b6a807b0f31f3..da3404be850f79069df9a65c0508cedc3c6e32c0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py index c5cccf39482c3497e05c1c7ab8f4fdd3e2d7490b..3f481cdb5adcd93e124ab370f5cea07a7368a08a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py index 303858f3e0c28faecf9696d2fbf403d5510cced8..f362c1c8490c912a65a726bebf3172edc3a99107 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py index f854dfd329ce016317b7b9743ace874769f03094..94c595725b80725776d1dea823dce5076560cf72 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py index 29f30ca794c567238bb34de6d5de219f72b68cca..a7af90c987a8211e777258468be7eafd2edb16c3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py index 32c30d13361c09cf5f2a51b8e1e645103a430a6a..546817dac1b92ecc98cc8d0fda9d2dbc0d36e228 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py index f2ad525773e032b7b224f5b661e728ffe8950e98..93b8edd584c855acdb31e357a7745f38dc606e30 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py index c8985523ba0c69fac8fbd1852bd47f2891d92bc6..1ad793f388a08a6a26a42470299e9bd653d403a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py index 7d3aeed125a790da60e394f9e834fb871ab9c3b9..57901c59123251588a65d3ee10009ded935bb1f8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py index 21c8d4f4c8def0e90dabe399cc305dc3b8d3d500..1257f182084440ec2861c7ce483bf21d652a94d1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py index d82c7bf9c5ec990484589d660738ffe3d2d9f6bf..a91e05652fcdca54a271558e3283666ac15c484c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py index e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed..cb5f56c53dae00c6a87c0a59e371d697081ecefe 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py index bad2331fc0f109b98bda93287a822244302b5d1e..b746643f51e5a9d16ec00bb9d24067fa9b55c521 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py index aea7bdd4cd5ed1743a1764899878a1ac8035348e..4391fe136a0f34d077ecf814491e3b8ad82d3205 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py index 405906d3e6d9dd1eda79aae3a6302c37e0e24988..8e61150797e91559da2a053b43f6de36521f05f0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py index 8411b9056a87031a8a5453bd7ef0d46324215a2f..f3f808715167961bfa3c5bdb1f1e36d0db26a98d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 8837ea16f120b8d9f40ee5099f46294b6ab79579..63951853192e194fa96b0b7aa5709c77a4606858 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py index 420f996a13a20bf122ec87f0fbb109b34246eb61..a9fc6d28634249cd36568b467c3507802cc7cd0a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py index 95a1628e4caf545e0d31823f89ea93178ffb76c7..b1b7d3820b941df345336a5748c3883a8962df86 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 07c0b7b779289a6ac9a9123fd540526dc6d190fb..7603810c7318aadf6698f81ec71b375049998f83 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py index 3209b99bad73493077e9e91a8053f320b05c11c0..51f74a1f81e2d11d4c4e05b5e729953274f028da 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py index c9f24330ff35e20e47be0db730f6ec682dd71d2d..0e354783d167536f9e27bf84396e4710303e5999 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py index 70317d31c9d8ee9d772e58c135569168cf8843f7..0989e8e060bcd176179c9c981fb2a81d5a69c1cd 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 1abedb4d3f8145943387f3e66e3e17fed741dcdc..5e0c0aebdbe40cf83887665d56f35ceed1f45ceb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index aa5135a1afed60270d2606ad4c7ad19b66f70d7c..16d6614d27d4a9be4d3bedf263e0340a2697ff09 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py index d345b57b342afaa50a04c5782794f34b810b795c..8857cb729926b1533c5e0b64d5bb7cbe73aa6bcb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py index 500d880ad6ad48b8079aa3bea0b1e644f7008f49..737f59a0c9331975625796491cc12a33ad0b0084 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py index cbd32a2bb98c6e47f795103fbc122cbf7957e1e6..2a43b9e9d6e1746ad99e0fc96b5f9c2621175574 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py index af72bcf2702ccee1d360bad39000241d1abfdc19..af56528baedd2b98c7f0c2513bab087ad9cc40cb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py index b600b1aeaf464f293a697c09c163096f730379f2..0e6674d0ba32376abdd142cc6a71b95ac7c244a6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py index 7c038ff21414923b939355bb6bdda825d64ece5a..834d54004adcb031a0aa22c0ab0876645ef5adc5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py index 7560d7f51b4174c036b96d1a6599a2a3ada8d674..e7c0f7d0ad00f60c264db926fb11a9c7d62b362a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py index a8439d312f2b42a7a09bb2b04e3c9207920fe69c..e4c2f928e3fce6b000c351d4657e70e4ec9b868c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py index f56a1940217a7ca828879399878fa57c2402196c..b4c89473a6e74b2b177960f04d1c00bac61bf132 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py index 75d22895c1b8c77e3c13ad584eaac74d23d0e359..abbcd1fe709062e8e480966ade273c0804c4844f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py index 356f7761b99b2e313b0638407dbaaa3996e6c418..3c37b21ef6ff73f0639da5503747fc6251df864d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py index e6e72a44fd364b7d9238cef98eba888090a23f76..feb233a12838560886937f082666d91c3263bbd7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py index 5e807a0b29d665deaaed7620fee6b2b7c697fbb6..43d3f73de0797a8c98cb86e80f50dde70243eb4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py index 631911d141fd6e870942bd77f7ad80c33e221091..e9d2655479fb23505f5b3bbcfb6b5c7c70472a04 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py index 54d85c0e52070f3cffb5a27ea963d0923bdcc379..373798e80fd66cbd707eaff7c2376c42fcbbf2f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py index d9b66f1860f862ec66429b96c9f73d88815ecfd6..7b65a97db822417ce80967fa5ad29f217d0818e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py index 149786798cff216d2d5c3159b457969263950a72..b38535a5cf0a6d23a93249bde0f87d1abee629e0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py index 7c038ff21414923b939355bb6bdda825d64ece5a..834d54004adcb031a0aa22c0ab0876645ef5adc5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py index 7560d7f51b4174c036b96d1a6599a2a3ada8d674..e7c0f7d0ad00f60c264db926fb11a9c7d62b362a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py index a8439d312f2b42a7a09bb2b04e3c9207920fe69c..e4c2f928e3fce6b000c351d4657e70e4ec9b868c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py index f56a1940217a7ca828879399878fa57c2402196c..b4c89473a6e74b2b177960f04d1c00bac61bf132 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py index 75d22895c1b8c77e3c13ad584eaac74d23d0e359..abbcd1fe709062e8e480966ade273c0804c4844f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py index 7645abedd4d25aeb9c77aa579c2972a450d00a6e..1080dfb7faf4b66e35f5230510cdb978b326a259 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py index 2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f..4368687ae2b141d4df60f3c4a5cf1eefbfca716c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py index 74b9e21c769902d7a2bb1f362d2e95cbf5d862cd..d7b77da59516bfd8a9b9a731138bd8805b3bee6e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py index 535505eea9d601de2d3ee70ab7061cbcf2e35bc8..ffb5b8cbf56e542f898e5e5aa3859273a00014cd 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 1abedb4d3f8145943387f3e66e3e17fed741dcdc..5e0c0aebdbe40cf83887665d56f35ceed1f45ceb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 0f8e113b567402f37aecdf644dae003b86cc8bb4..73bd3f8b8f86e1e187346218246c61378e972613 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py index 5e807a0b29d665deaaed7620fee6b2b7c697fbb6..43d3f73de0797a8c98cb86e80f50dde70243eb4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py index 631911d141fd6e870942bd77f7ad80c33e221091..e9d2655479fb23505f5b3bbcfb6b5c7c70472a04 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py index 54d85c0e52070f3cffb5a27ea963d0923bdcc379..373798e80fd66cbd707eaff7c2376c42fcbbf2f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py index d9b66f1860f862ec66429b96c9f73d88815ecfd6..7b65a97db822417ce80967fa5ad29f217d0818e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py index ac722c47add5d381fef94d2c3a2f5750b49a2688..9e579ec9ab6f8612255ede56aa0a057e9dc45b61 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py index eee438314ebe12c55dba835cf5f6839760a31c61..ed635c2bbcd9aa08db82c44fb82a07b71715a70f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py index 3762dccee93d6c5fc548fea761a80e03cd0398d6..c19acc9cf020fe194a2b8e2ad0ee9c221b897cc4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index f2c993df52db1f2e1aa1085a57856c8585fcba58..feef9127c74765b06c4b607b005973df604edfc9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 00c674167360cd2724dd7263e34c54dbb27dbccb..e08c97bda84c433f29489fbd04c982f55625eff9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py index 34a2a729ce6d45e11174065699c428a7ac677a8b..10f04b0ab7b9835e2d61e24fbcb233e3412fb6b6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py index d1ab68ff674ea58adde5a644c74609928fe6f874..5d24ec2ab137da5973010363ae7718d01e8829c2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index 8d9d3d58559fab79fa12a634fb4aecbef61780f1..61c36913f51193ec26b4136a06a1ddf0a40b5841 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index c909481cb8745c1895e9d6bcb7fb53fa10296f40..5b53df5b3449137d91f7367eea60b81294e00d92 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py index 8ae8cc268f3c4fc331cd1e1018be41d113da9183..3b5e2b21abf48ad098dffdf0ced49481e149907e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py index 303858f3e0c28faecf9696d2fbf403d5510cced8..f362c1c8490c912a65a726bebf3172edc3a99107 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py index d36aa35acd17db473e177b143afdec573f0b4927..42aaaf5da928847f7ffff584ef6f95dab602ca58 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py index 26d315f6a43287274e5b410c83c64a950c07014d..7cfdd77bffc1ccb5983b51c0b80ce4ee7228ee82 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py index 9e09ccdff8c5f951521b350308c3922079bad836..f7f920217b7c42cba381b7cd07dca1cca1eee208 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py index 42dee7a72fe4a5d79128cf6ad278af68094e6692..98a97272439700148abb9c1dd10f7ae5ba74813e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py index 6d2edeb71cbf031bc1516862b7175c9ed004e9a0..acc5295a1ec45a760ddc723bc911db82e09f9970 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py index 9e09ccdff8c5f951521b350308c3922079bad836..f7f920217b7c42cba381b7cd07dca1cca1eee208 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py index 5c42b5a651c746140109908a98c5d411f7b354b4..87f6a80d862a20f9df12eeccf247e99735a092a1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py index 7ae31f705e9a8fa0e6bb6614787e440ad5d86410..c74c02877a206d5b21ef5eccd803730cba149e3b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py index c56ab2444397767e1a021bf9158d0f3ccad1a088..f330888e380e44e64897b288d0dc69085e8f3414 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py index d34072811b1c72f6894141790ae68180723d5b09..2662639b07176d4161d952d06a5df8f49505a174 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py index b6cae8709d65455d297c24861f6fd52badff4745..50d59c20a61b5b1803404aea119d0955cefcf6d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py index caf8d26a9e2be21ed0d3b862f36049fb6a191df9..ad8de3fae24ee14097fc3b4c8e325694bceeca48 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py index 14cbae7304f9e1b80e18a1547974269f00b66621..6486624f9daaaad05b919842131e28bbd81a407b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py index 29f30ca794c567238bb34de6d5de219f72b68cca..a7af90c987a8211e777258468be7eafd2edb16c3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py index 90d6fbfa8ef329a23ca16908801c5dfc1c509b01..a72e4bffab12b545ac4d9eacb0eaf21864ce9eac 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py index f2ad525773e032b7b224f5b661e728ffe8950e98..93b8edd584c855acdb31e357a7745f38dc606e30 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py index c8985523ba0c69fac8fbd1852bd47f2891d92bc6..1ad793f388a08a6a26a42470299e9bd653d403a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py index 7d3aeed125a790da60e394f9e834fb871ab9c3b9..57901c59123251588a65d3ee10009ded935bb1f8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py index 21c8d4f4c8def0e90dabe399cc305dc3b8d3d500..1257f182084440ec2861c7ce483bf21d652a94d1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py index d82c7bf9c5ec990484589d660738ffe3d2d9f6bf..a91e05652fcdca54a271558e3283666ac15c484c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py index e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed..cb5f56c53dae00c6a87c0a59e371d697081ecefe 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py index bad2331fc0f109b98bda93287a822244302b5d1e..b746643f51e5a9d16ec00bb9d24067fa9b55c521 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py index aea7bdd4cd5ed1743a1764899878a1ac8035348e..4391fe136a0f34d077ecf814491e3b8ad82d3205 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py index 405906d3e6d9dd1eda79aae3a6302c37e0e24988..8e61150797e91559da2a053b43f6de36521f05f0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py index 8100bae93730074ddc472dfb8328dc9ec9b34a21..552a94614f13a7607e01b4405ac00ced2c4b776a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 8d9d3d58559fab79fa12a634fb4aecbef61780f1..61c36913f51193ec26b4136a06a1ddf0a40b5841 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py index 420f996a13a20bf122ec87f0fbb109b34246eb61..a9fc6d28634249cd36568b467c3507802cc7cd0a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py index 95a1628e4caf545e0d31823f89ea93178ffb76c7..b1b7d3820b941df345336a5748c3883a8962df86 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 7de25b7bbfed705b63d9c681cad27d7bd9b9584d..666a4944c218e136894366e463bfdead4e815250 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py index 3209b99bad73493077e9e91a8053f320b05c11c0..51f74a1f81e2d11d4c4e05b5e729953274f028da 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py index c9f24330ff35e20e47be0db730f6ec682dd71d2d..0e354783d167536f9e27bf84396e4710303e5999 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py index 5f251c42ed301ea688e4e921968867ed262acfa2..28bf34bb30c62c2657f0e12a4258feccebfa3220 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe..573491548f562faa99328926d4bc12112cb988cf 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 7de25b7bbfed705b63d9c681cad27d7bd9b9584d..666a4944c218e136894366e463bfdead4e815250 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py index d345b57b342afaa50a04c5782794f34b810b795c..8857cb729926b1533c5e0b64d5bb7cbe73aa6bcb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py index 500d880ad6ad48b8079aa3bea0b1e644f7008f49..737f59a0c9331975625796491cc12a33ad0b0084 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py index cbd32a2bb98c6e47f795103fbc122cbf7957e1e6..2a43b9e9d6e1746ad99e0fc96b5f9c2621175574 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py index af72bcf2702ccee1d360bad39000241d1abfdc19..af56528baedd2b98c7f0c2513bab087ad9cc40cb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py index 6f5aceab23841faec8396e85e86e21692641125f..e24bb820367bc6410b2a20dd53ad6d51920abd0a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py index 7c038ff21414923b939355bb6bdda825d64ece5a..834d54004adcb031a0aa22c0ab0876645ef5adc5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py index 7560d7f51b4174c036b96d1a6599a2a3ada8d674..e7c0f7d0ad00f60c264db926fb11a9c7d62b362a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py index a8439d312f2b42a7a09bb2b04e3c9207920fe69c..e4c2f928e3fce6b000c351d4657e70e4ec9b868c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py index f56a1940217a7ca828879399878fa57c2402196c..b4c89473a6e74b2b177960f04d1c00bac61bf132 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py index 75d22895c1b8c77e3c13ad584eaac74d23d0e359..abbcd1fe709062e8e480966ade273c0804c4844f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py index 356f7761b99b2e313b0638407dbaaa3996e6c418..3c37b21ef6ff73f0639da5503747fc6251df864d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py index 2a97d5e3e1d7066756b051d139f997d9a46b3c6b..56eb60da5846332a1583d255378a1b4c27238b43 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py index 5e807a0b29d665deaaed7620fee6b2b7c697fbb6..43d3f73de0797a8c98cb86e80f50dde70243eb4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py index 631911d141fd6e870942bd77f7ad80c33e221091..e9d2655479fb23505f5b3bbcfb6b5c7c70472a04 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py index 54d85c0e52070f3cffb5a27ea963d0923bdcc379..373798e80fd66cbd707eaff7c2376c42fcbbf2f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py index d9b66f1860f862ec66429b96c9f73d88815ecfd6..7b65a97db822417ce80967fa5ad29f217d0818e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py index df295258db86b4261becc2471833afaabe8421be..c2e4f9b346e038e1a47e8f69a21443c76abfc32c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py index 7c038ff21414923b939355bb6bdda825d64ece5a..834d54004adcb031a0aa22c0ab0876645ef5adc5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py index d0e4a21b11accc2103aa85169cb46c386658d5cc..4c70f00d2b4b449e762d99b86b1a5e6f0ed1df74 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py index a8439d312f2b42a7a09bb2b04e3c9207920fe69c..e4c2f928e3fce6b000c351d4657e70e4ec9b868c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py index f56a1940217a7ca828879399878fa57c2402196c..b4c89473a6e74b2b177960f04d1c00bac61bf132 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py index 75d22895c1b8c77e3c13ad584eaac74d23d0e359..abbcd1fe709062e8e480966ade273c0804c4844f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py index d6ae074074e7913854992f9bd32a8f51f6b9d7b7..6c791afde38fd0bdb53b3518addff3834fc0f95d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py index 2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f..4368687ae2b141d4df60f3c4a5cf1eefbfca716c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py index 74b9e21c769902d7a2bb1f362d2e95cbf5d862cd..d7b77da59516bfd8a9b9a731138bd8805b3bee6e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py index 28ea603a0e4ee2c731661a01ab1dbbee36529de5..b2619d382c9e65548e02e684a63b6a08b535d47b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 1cb78075b80ccd8887818376324a016daf17b67c..b36a11e14f1390ca2f84a276886752dd19fa7bb4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 652da89e61bd32067e97591a11a2970e965bed4a..635a53cb52cc3c1fddff4a4aa7531456661d03a8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py index 5e807a0b29d665deaaed7620fee6b2b7c697fbb6..43d3f73de0797a8c98cb86e80f50dde70243eb4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py index 631911d141fd6e870942bd77f7ad80c33e221091..e9d2655479fb23505f5b3bbcfb6b5c7c70472a04 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py index 54d85c0e52070f3cffb5a27ea963d0923bdcc379..373798e80fd66cbd707eaff7c2376c42fcbbf2f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py index d9b66f1860f862ec66429b96c9f73d88815ecfd6..7b65a97db822417ce80967fa5ad29f217d0818e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py index d03118f5c94e3726341c4332447847c61623d616..ae89b6b3c1c152159860a966088badc509baa86e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py index 29f30ca794c567238bb34de6d5de219f72b68cca..a7af90c987a8211e777258468be7eafd2edb16c3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py index d6963852ba0c84a4b78122f6ad1185f29748eb5f..fc3958eb38e4f9366f6ebf1590c8e4f2ca576017 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py index f2ad525773e032b7b224f5b661e728ffe8950e98..93b8edd584c855acdb31e357a7745f38dc606e30 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py index c8985523ba0c69fac8fbd1852bd47f2891d92bc6..1ad793f388a08a6a26a42470299e9bd653d403a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py index 7d3aeed125a790da60e394f9e834fb871ab9c3b9..57901c59123251588a65d3ee10009ded935bb1f8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py index ac722c47add5d381fef94d2c3a2f5750b49a2688..9e579ec9ab6f8612255ede56aa0a057e9dc45b61 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py index 6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef..6cbc3678b58078b0b8a268d515e2f498c5c94065 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py index 39f656215584aa2bcf14b3ba1a003b8347ff4977..77baef445b63af7e459bf0924547faca0cd3abd9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index 1cb78075b80ccd8887818376324a016daf17b67c..b36a11e14f1390ca2f84a276886752dd19fa7bb4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 17a8ab32f6e4e90649c07d42b9433c6639fb2934..0a737e2ab428952c2bd58d3a532d25e42d36b38a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py index 34a2a729ce6d45e11174065699c428a7ac677a8b..10f04b0ab7b9835e2d61e24fbcb233e3412fb6b6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py index e01f01986b3d51fd6143967c4f05b169aff11129..47100076a4231ff37ecde6b30496244edeba3b24 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index f2c993df52db1f2e1aa1085a57856c8585fcba58..feef9127c74765b06c4b607b005973df604edfc9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 652da89e61bd32067e97591a11a2970e965bed4a..635a53cb52cc3c1fddff4a4aa7531456661d03a8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py index 8ae8cc268f3c4fc331cd1e1018be41d113da9183..3b5e2b21abf48ad098dffdf0ced49481e149907e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py index 303858f3e0c28faecf9696d2fbf403d5510cced8..f362c1c8490c912a65a726bebf3172edc3a99107 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py index f854dfd329ce016317b7b9743ace874769f03094..94c595725b80725776d1dea823dce5076560cf72 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py index 29f30ca794c567238bb34de6d5de219f72b68cca..a7af90c987a8211e777258468be7eafd2edb16c3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py index 832dd2f7ef2d442bd2e0efe6ad680c3d4fd15402..53b92404caf9b8033bffd3a7e3863927857841ba 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py index f2ad525773e032b7b224f5b661e728ffe8950e98..93b8edd584c855acdb31e357a7745f38dc606e30 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py index c8985523ba0c69fac8fbd1852bd47f2891d92bc6..1ad793f388a08a6a26a42470299e9bd653d403a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py index 7d3aeed125a790da60e394f9e834fb871ab9c3b9..57901c59123251588a65d3ee10009ded935bb1f8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py index 21c8d4f4c8def0e90dabe399cc305dc3b8d3d500..1257f182084440ec2861c7ce483bf21d652a94d1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py index d82c7bf9c5ec990484589d660738ffe3d2d9f6bf..a91e05652fcdca54a271558e3283666ac15c484c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py index e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed..cb5f56c53dae00c6a87c0a59e371d697081ecefe 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py index e5e69ea24d5d4bc36b6bf78a13fb98a25a1e5916..0f37ddf83b4f66dbc8f5f250ff1fff2491dc520e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py index aea7bdd4cd5ed1743a1764899878a1ac8035348e..4391fe136a0f34d077ecf814491e3b8ad82d3205 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py index 405906d3e6d9dd1eda79aae3a6302c37e0e24988..8e61150797e91559da2a053b43f6de36521f05f0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py index 519535f45f22cf80d11d26ecfff5511b21632ae4..7435f6184d52a64580318932272c5bcd6164ddf5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py index f2c993df52db1f2e1aa1085a57856c8585fcba58..feef9127c74765b06c4b607b005973df604edfc9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py index 420f996a13a20bf122ec87f0fbb109b34246eb61..a9fc6d28634249cd36568b467c3507802cc7cd0a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py index 95a1628e4caf545e0d31823f89ea93178ffb76c7..b1b7d3820b941df345336a5748c3883a8962df86 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index cdc24c09f1b3ccadebb91f2dbb9442bbfbd3595d..4927f1f4b68adcaf6c7219ac66c993b22aaf9120 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py index 3209b99bad73493077e9e91a8053f320b05c11c0..51f74a1f81e2d11d4c4e05b5e729953274f028da 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py index c9f24330ff35e20e47be0db730f6ec682dd71d2d..0e354783d167536f9e27bf84396e4710303e5999 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py index 0fc658253392d53b5678ebb702dd6ecb3cee4165..7042fd9f17c38668f7c2be37de07bb78d84a268e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py index f2c993df52db1f2e1aa1085a57856c8585fcba58..feef9127c74765b06c4b607b005973df604edfc9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 5baa996de0fff24876e40ec73f87a7a90da1f2ea..04310d99136c797b48c15ba47ea556c46d928127 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py index d345b57b342afaa50a04c5782794f34b810b795c..8857cb729926b1533c5e0b64d5bb7cbe73aa6bcb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py index 500d880ad6ad48b8079aa3bea0b1e644f7008f49..737f59a0c9331975625796491cc12a33ad0b0084 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py index cbd32a2bb98c6e47f795103fbc122cbf7957e1e6..2a43b9e9d6e1746ad99e0fc96b5f9c2621175574 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py index af72bcf2702ccee1d360bad39000241d1abfdc19..af56528baedd2b98c7f0c2513bab087ad9cc40cb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py index 28191362a8a0f4d9e8af895e993672214dc2b00f..db7709e55216c3747b7cf50403e7f37d54e37c9c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py index 7c038ff21414923b939355bb6bdda825d64ece5a..834d54004adcb031a0aa22c0ab0876645ef5adc5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py index 7560d7f51b4174c036b96d1a6599a2a3ada8d674..e7c0f7d0ad00f60c264db926fb11a9c7d62b362a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py index a8439d312f2b42a7a09bb2b04e3c9207920fe69c..e4c2f928e3fce6b000c351d4657e70e4ec9b868c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py index f56a1940217a7ca828879399878fa57c2402196c..b4c89473a6e74b2b177960f04d1c00bac61bf132 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py index 75d22895c1b8c77e3c13ad584eaac74d23d0e359..abbcd1fe709062e8e480966ade273c0804c4844f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py index 356f7761b99b2e313b0638407dbaaa3996e6c418..3c37b21ef6ff73f0639da5503747fc6251df864d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py index 2a97d5e3e1d7066756b051d139f997d9a46b3c6b..56eb60da5846332a1583d255378a1b4c27238b43 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py index 5e807a0b29d665deaaed7620fee6b2b7c697fbb6..43d3f73de0797a8c98cb86e80f50dde70243eb4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py index 631911d141fd6e870942bd77f7ad80c33e221091..e9d2655479fb23505f5b3bbcfb6b5c7c70472a04 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py index 54d85c0e52070f3cffb5a27ea963d0923bdcc379..373798e80fd66cbd707eaff7c2376c42fcbbf2f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py index d9b66f1860f862ec66429b96c9f73d88815ecfd6..7b65a97db822417ce80967fa5ad29f217d0818e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py index 149786798cff216d2d5c3159b457969263950a72..b38535a5cf0a6d23a93249bde0f87d1abee629e0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py index 7c038ff21414923b939355bb6bdda825d64ece5a..834d54004adcb031a0aa22c0ab0876645ef5adc5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py index d0e4a21b11accc2103aa85169cb46c386658d5cc..4c70f00d2b4b449e762d99b86b1a5e6f0ed1df74 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py index a8439d312f2b42a7a09bb2b04e3c9207920fe69c..e4c2f928e3fce6b000c351d4657e70e4ec9b868c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py index f56a1940217a7ca828879399878fa57c2402196c..b4c89473a6e74b2b177960f04d1c00bac61bf132 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py index 75d22895c1b8c77e3c13ad584eaac74d23d0e359..abbcd1fe709062e8e480966ade273c0804c4844f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py index 7645abedd4d25aeb9c77aa579c2972a450d00a6e..1080dfb7faf4b66e35f5230510cdb978b326a259 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py index 2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f..4368687ae2b141d4df60f3c4a5cf1eefbfca716c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py index 74b9e21c769902d7a2bb1f362d2e95cbf5d862cd..d7b77da59516bfd8a9b9a731138bd8805b3bee6e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py index 5f251c42ed301ea688e4e921968867ed262acfa2..28bf34bb30c62c2657f0e12a4258feccebfa3220 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 1abedb4d3f8145943387f3e66e3e17fed741dcdc..5e0c0aebdbe40cf83887665d56f35ceed1f45ceb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 07c0b7b779289a6ac9a9123fd540526dc6d190fb..7603810c7318aadf6698f81ec71b375049998f83 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py index 5e807a0b29d665deaaed7620fee6b2b7c697fbb6..43d3f73de0797a8c98cb86e80f50dde70243eb4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py index 631911d141fd6e870942bd77f7ad80c33e221091..e9d2655479fb23505f5b3bbcfb6b5c7c70472a04 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py index 54d85c0e52070f3cffb5a27ea963d0923bdcc379..373798e80fd66cbd707eaff7c2376c42fcbbf2f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py index d9b66f1860f862ec66429b96c9f73d88815ecfd6..7b65a97db822417ce80967fa5ad29f217d0818e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py index 9ef388cd63aa7c8947fc3391bad703bb01f3d827..78ef423bba5d1b3fa3b53e1b352e472d8f63ad73 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py index 6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef..6cbc3678b58078b0b8a268d515e2f498c5c94065 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py index e16cb666ce1a7bc800b744b15e11b1d4b7279e6d..a6d2377c188304201e1e29a23987d2f750435889 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index 1abedb4d3f8145943387f3e66e3e17fed741dcdc..5e0c0aebdbe40cf83887665d56f35ceed1f45ceb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 6c1142926ba50c34d71606b198e801811b621385..9231728edfff063dff2e8ed8488b6430ccec2483 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py index 34a2a729ce6d45e11174065699c428a7ac677a8b..10f04b0ab7b9835e2d61e24fbcb233e3412fb6b6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py index c00e57c237e53df3a2bba30cffe83a15d1149756..51db93b318b42c58ad7652fb57144394e6203a0b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index 1cb78075b80ccd8887818376324a016daf17b67c..b36a11e14f1390ca2f84a276886752dd19fa7bb4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index c8ee74a2b7c7f647d2a88dfb22f44ed0ec1e80e4..9b4644d74ea685590d8a9fafeabf60c7e0760208 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py index 8ae8cc268f3c4fc331cd1e1018be41d113da9183..3b5e2b21abf48ad098dffdf0ced49481e149907e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py index 303858f3e0c28faecf9696d2fbf403d5510cced8..f362c1c8490c912a65a726bebf3172edc3a99107 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py index d36aa35acd17db473e177b143afdec573f0b4927..42aaaf5da928847f7ffff584ef6f95dab602ca58 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py index 42dee7a72fe4a5d79128cf6ad278af68094e6692..98a97272439700148abb9c1dd10f7ae5ba74813e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py index 3a2840f2560d9dcbb55f2d1dcd7515046766223b..d84e212a1b74ce8626802ad0f6ee33a242e05bfa 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py index 38f9ec314a9426a5fe03975be29a2e28b422a31e..29e367ba1172a6f868f8f48af3c7cea58ca41fe1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py index 74c496e9c8505568c18ca8db338e3c313884945d..a31c5e52972e7669a0b4e953ec2da1a404e97cdd 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py index e58eb1516669a36eac9abd5451d7335da8de62a4..9f07c18a1ad9b6d1dd96849f72b24555cc998a51 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py index d107aca7146b13039b609d38c023443bfe120a37..a9b4bf47b828a382a8aedd6c49e65ed3540247f2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py index 29f30ca794c567238bb34de6d5de219f72b68cca..a7af90c987a8211e777258468be7eafd2edb16c3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py index 814ea59a555c0c31d59f79bd58db695d0fb105e8..3c81a52cc41a8debfff6abacde3e7c7a1e166ab9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py index f2ad525773e032b7b224f5b661e728ffe8950e98..93b8edd584c855acdb31e357a7745f38dc606e30 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py index c8985523ba0c69fac8fbd1852bd47f2891d92bc6..1ad793f388a08a6a26a42470299e9bd653d403a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py index 7d3aeed125a790da60e394f9e834fb871ab9c3b9..57901c59123251588a65d3ee10009ded935bb1f8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py index 89dc7a8809c12f5dc8f942f7719322884fea3b49..cb26fb3ce4b145884c4cc25a4bb1c7328b64d15c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py index 29f30ca794c567238bb34de6d5de219f72b68cca..a7af90c987a8211e777258468be7eafd2edb16c3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py index 1075ea1483389fe2d8a6245c8b19b16007859ffb..d119f79ae73c9e5663821b4370b8b869362e73da 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py index f2ad525773e032b7b224f5b661e728ffe8950e98..93b8edd584c855acdb31e357a7745f38dc606e30 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py index c8985523ba0c69fac8fbd1852bd47f2891d92bc6..1ad793f388a08a6a26a42470299e9bd653d403a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py index 7d3aeed125a790da60e394f9e834fb871ab9c3b9..57901c59123251588a65d3ee10009ded935bb1f8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py index 21c8d4f4c8def0e90dabe399cc305dc3b8d3d500..1257f182084440ec2861c7ce483bf21d652a94d1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/__init__.py index 9e0ca52a42ed25af1b7e0612d3e9a6b3d43b6ef9..0e76372276e9aab4a2c308403c1696c5d67c8512 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/__init__.py index e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed..cb5f56c53dae00c6a87c0a59e371d697081ecefe 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/__init__.py index e5e69ea24d5d4bc36b6bf78a13fb98a25a1e5916..0f37ddf83b4f66dbc8f5f250ff1fff2491dc520e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py index aea7bdd4cd5ed1743a1764899878a1ac8035348e..4391fe136a0f34d077ecf814491e3b8ad82d3205 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py index 405906d3e6d9dd1eda79aae3a6302c37e0e24988..8e61150797e91559da2a053b43f6de36521f05f0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py index d71309cbb007ad744071cd2a2bbacb7964114efc..9e869ca3263903b212f1a3afa65185cef65e6394 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py index f2c993df52db1f2e1aa1085a57856c8585fcba58..feef9127c74765b06c4b607b005973df604edfc9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py index 420f996a13a20bf122ec87f0fbb109b34246eb61..a9fc6d28634249cd36568b467c3507802cc7cd0a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py index 95a1628e4caf545e0d31823f89ea93178ffb76c7..b1b7d3820b941df345336a5748c3883a8962df86 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 07c0b7b779289a6ac9a9123fd540526dc6d190fb..7603810c7318aadf6698f81ec71b375049998f83 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py index 3209b99bad73493077e9e91a8053f320b05c11c0..51f74a1f81e2d11d4c4e05b5e729953274f028da 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py index c9f24330ff35e20e47be0db730f6ec682dd71d2d..0e354783d167536f9e27bf84396e4710303e5999 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py index 97c7b52d53563f340bcf3adef447aa2d718ee50b..1577c82ea3fbd8b049673ef886ccd78b9cd7e01e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 8d9d3d58559fab79fa12a634fb4aecbef61780f1..61c36913f51193ec26b4136a06a1ddf0a40b5841 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 07c0b7b779289a6ac9a9123fd540526dc6d190fb..7603810c7318aadf6698f81ec71b375049998f83 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/__init__.py index d345b57b342afaa50a04c5782794f34b810b795c..8857cb729926b1533c5e0b64d5bb7cbe73aa6bcb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py index 500d880ad6ad48b8079aa3bea0b1e644f7008f49..737f59a0c9331975625796491cc12a33ad0b0084 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/__init__.py index cbd32a2bb98c6e47f795103fbc122cbf7957e1e6..2a43b9e9d6e1746ad99e0fc96b5f9c2621175574 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/objective_function/__init__.py index af72bcf2702ccee1d360bad39000241d1abfdc19..af56528baedd2b98c7f0c2513bab087ad9cc40cb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/objective_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py index 4ffa7b66e87daa14eb143c6501aa376cc779aed5..4701163f7f023c806d9dde440ccc17d8862587c9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py index 7c038ff21414923b939355bb6bdda825d64ece5a..834d54004adcb031a0aa22c0ab0876645ef5adc5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py index 7560d7f51b4174c036b96d1a6599a2a3ada8d674..e7c0f7d0ad00f60c264db926fb11a9c7d62b362a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py index a8439d312f2b42a7a09bb2b04e3c9207920fe69c..e4c2f928e3fce6b000c351d4657e70e4ec9b868c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py index f56a1940217a7ca828879399878fa57c2402196c..b4c89473a6e74b2b177960f04d1c00bac61bf132 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py index 75d22895c1b8c77e3c13ad584eaac74d23d0e359..abbcd1fe709062e8e480966ade273c0804c4844f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py index 356f7761b99b2e313b0638407dbaaa3996e6c418..3c37b21ef6ff73f0639da5503747fc6251df864d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py index e6e72a44fd364b7d9238cef98eba888090a23f76..feb233a12838560886937f082666d91c3263bbd7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py index 5e807a0b29d665deaaed7620fee6b2b7c697fbb6..43d3f73de0797a8c98cb86e80f50dde70243eb4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py index 631911d141fd6e870942bd77f7ad80c33e221091..e9d2655479fb23505f5b3bbcfb6b5c7c70472a04 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py index 54d85c0e52070f3cffb5a27ea963d0923bdcc379..373798e80fd66cbd707eaff7c2376c42fcbbf2f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py index d9b66f1860f862ec66429b96c9f73d88815ecfd6..7b65a97db822417ce80967fa5ad29f217d0818e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py index bde8f98e58827b2019a01b80cad4ec0198201e72..30d5aada10464228ddd4010bc1b2a3afd23d9cae 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py index 7c038ff21414923b939355bb6bdda825d64ece5a..834d54004adcb031a0aa22c0ab0876645ef5adc5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py index 7560d7f51b4174c036b96d1a6599a2a3ada8d674..e7c0f7d0ad00f60c264db926fb11a9c7d62b362a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py index a8439d312f2b42a7a09bb2b04e3c9207920fe69c..e4c2f928e3fce6b000c351d4657e70e4ec9b868c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py index f56a1940217a7ca828879399878fa57c2402196c..b4c89473a6e74b2b177960f04d1c00bac61bf132 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py index 75d22895c1b8c77e3c13ad584eaac74d23d0e359..abbcd1fe709062e8e480966ade273c0804c4844f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py index 7645abedd4d25aeb9c77aa579c2972a450d00a6e..1080dfb7faf4b66e35f5230510cdb978b326a259 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py index 2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f..4368687ae2b141d4df60f3c4a5cf1eefbfca716c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py index 74b9e21c769902d7a2bb1f362d2e95cbf5d862cd..d7b77da59516bfd8a9b9a731138bd8805b3bee6e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/__init__.py index ce99e420e4339dbff19a79559a99828a5632ed52..f44836634ee58281027ecc53c136ee0d38433fe3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 1abedb4d3f8145943387f3e66e3e17fed741dcdc..5e0c0aebdbe40cf83887665d56f35ceed1f45ceb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 7de25b7bbfed705b63d9c681cad27d7bd9b9584d..666a4944c218e136894366e463bfdead4e815250 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py index 5e807a0b29d665deaaed7620fee6b2b7c697fbb6..43d3f73de0797a8c98cb86e80f50dde70243eb4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py index 631911d141fd6e870942bd77f7ad80c33e221091..e9d2655479fb23505f5b3bbcfb6b5c7c70472a04 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py index 54d85c0e52070f3cffb5a27ea963d0923bdcc379..373798e80fd66cbd707eaff7c2376c42fcbbf2f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py index d9b66f1860f862ec66429b96c9f73d88815ecfd6..7b65a97db822417ce80967fa5ad29f217d0818e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py index 718667143f90b280fcd63585a43ec31bd9555933..775d362110498321a919d71fbad8509cc1de7bc4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py index 6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef..6cbc3678b58078b0b8a268d515e2f498c5c94065 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/__init__.py index d1ab68ff674ea58adde5a644c74609928fe6f874..5d24ec2ab137da5973010363ae7718d01e8829c2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index 64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe..573491548f562faa99328926d4bc12112cb988cf 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 1182654a4bf2eb5a4496796aa2c9752309208f46..42a68ea3530f1991f2396b711e1f54f7929f21c0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py index 34a2a729ce6d45e11174065699c428a7ac677a8b..10f04b0ab7b9835e2d61e24fbcb233e3412fb6b6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/__init__.py index 2961e2bf8c581c42005442bebf3b91dd7424a524..df23385f8f41a7cddb61e6d09c86abc77ee74a13 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index 1abedb4d3f8145943387f3e66e3e17fed741dcdc..5e0c0aebdbe40cf83887665d56f35ceed1f45ceb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 088a2a9a5842516b7391cf36f8c90e94028a03d5..3d011eb224962cde6d2abcfed75201f4b2b2dd8c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py index 8ae8cc268f3c4fc331cd1e1018be41d113da9183..3b5e2b21abf48ad098dffdf0ced49481e149907e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py index 303858f3e0c28faecf9696d2fbf403d5510cced8..f362c1c8490c912a65a726bebf3172edc3a99107 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py index d36aa35acd17db473e177b143afdec573f0b4927..42aaaf5da928847f7ffff584ef6f95dab602ca58 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py index 21c8d4f4c8def0e90dabe399cc305dc3b8d3d500..1257f182084440ec2861c7ce483bf21d652a94d1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py index 9e0ca52a42ed25af1b7e0612d3e9a6b3d43b6ef9..0e76372276e9aab4a2c308403c1696c5d67c8512 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py index e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed..cb5f56c53dae00c6a87c0a59e371d697081ecefe 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/__init__.py index e0b3f85a0993ca8184c4cec6a891f373b0666767..502239d3ea98eac2557f64bc432fd10577eb2aa7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py index aea7bdd4cd5ed1743a1764899878a1ac8035348e..4391fe136a0f34d077ecf814491e3b8ad82d3205 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py index 405906d3e6d9dd1eda79aae3a6302c37e0e24988..8e61150797e91559da2a053b43f6de36521f05f0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py index ef448f1cfb4766cf527a00e8da8e1a261466c995..f8aa811f38e9580c00607aade4dd80f0e81ed2ae 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 1cb78075b80ccd8887818376324a016daf17b67c..b36a11e14f1390ca2f84a276886752dd19fa7bb4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py index 420f996a13a20bf122ec87f0fbb109b34246eb61..a9fc6d28634249cd36568b467c3507802cc7cd0a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py index 95a1628e4caf545e0d31823f89ea93178ffb76c7..b1b7d3820b941df345336a5748c3883a8962df86 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index c8ee74a2b7c7f647d2a88dfb22f44ed0ec1e80e4..9b4644d74ea685590d8a9fafeabf60c7e0760208 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py index 3209b99bad73493077e9e91a8053f320b05c11c0..51f74a1f81e2d11d4c4e05b5e729953274f028da 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py index c9f24330ff35e20e47be0db730f6ec682dd71d2d..0e354783d167536f9e27bf84396e4710303e5999 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py index 943ba0bd2ef587976729a620de43a51d18612462..c977b70e200806f1e56bf19a396784d683bc8832 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 1cb78075b80ccd8887818376324a016daf17b67c..b36a11e14f1390ca2f84a276886752dd19fa7bb4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index ad1ed06e7edbba03876800aa1f46233860ec8b0d..3739c508c82eb0d4727839aec748b1377669bf98 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/__init__.py index d345b57b342afaa50a04c5782794f34b810b795c..8857cb729926b1533c5e0b64d5bb7cbe73aa6bcb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py index 500d880ad6ad48b8079aa3bea0b1e644f7008f49..737f59a0c9331975625796491cc12a33ad0b0084 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/__init__.py index cbd32a2bb98c6e47f795103fbc122cbf7957e1e6..2a43b9e9d6e1746ad99e0fc96b5f9c2621175574 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/objective_function/__init__.py index af72bcf2702ccee1d360bad39000241d1abfdc19..af56528baedd2b98c7f0c2513bab087ad9cc40cb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/objective_function/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py index c83cf0a2d0df81953e96e2a55fde9fd16c751d0a..dd5de9ea12a9c1f298c87f922e1d337768e30390 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py index 7c038ff21414923b939355bb6bdda825d64ece5a..834d54004adcb031a0aa22c0ab0876645ef5adc5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py index d0e4a21b11accc2103aa85169cb46c386658d5cc..4c70f00d2b4b449e762d99b86b1a5e6f0ed1df74 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py index a8439d312f2b42a7a09bb2b04e3c9207920fe69c..e4c2f928e3fce6b000c351d4657e70e4ec9b868c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py index f56a1940217a7ca828879399878fa57c2402196c..b4c89473a6e74b2b177960f04d1c00bac61bf132 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py index 75d22895c1b8c77e3c13ad584eaac74d23d0e359..abbcd1fe709062e8e480966ade273c0804c4844f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py index 356f7761b99b2e313b0638407dbaaa3996e6c418..3c37b21ef6ff73f0639da5503747fc6251df864d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py index 2a97d5e3e1d7066756b051d139f997d9a46b3c6b..56eb60da5846332a1583d255378a1b4c27238b43 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py index 5e807a0b29d665deaaed7620fee6b2b7c697fbb6..43d3f73de0797a8c98cb86e80f50dde70243eb4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py index 631911d141fd6e870942bd77f7ad80c33e221091..e9d2655479fb23505f5b3bbcfb6b5c7c70472a04 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py index 54d85c0e52070f3cffb5a27ea963d0923bdcc379..373798e80fd66cbd707eaff7c2376c42fcbbf2f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py index d9b66f1860f862ec66429b96c9f73d88815ecfd6..7b65a97db822417ce80967fa5ad29f217d0818e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py index 41c96a46e00a42f281a1cdc712517006ccd5fa0b..1f2491ba0fae8f7d281bb4433b6f009890bd3b2f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py index 7c038ff21414923b939355bb6bdda825d64ece5a..834d54004adcb031a0aa22c0ab0876645ef5adc5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py index 7560d7f51b4174c036b96d1a6599a2a3ada8d674..e7c0f7d0ad00f60c264db926fb11a9c7d62b362a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py index a8439d312f2b42a7a09bb2b04e3c9207920fe69c..e4c2f928e3fce6b000c351d4657e70e4ec9b868c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py index f56a1940217a7ca828879399878fa57c2402196c..b4c89473a6e74b2b177960f04d1c00bac61bf132 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py index 75d22895c1b8c77e3c13ad584eaac74d23d0e359..abbcd1fe709062e8e480966ade273c0804c4844f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py index d6ae074074e7913854992f9bd32a8f51f6b9d7b7..6c791afde38fd0bdb53b3518addff3834fc0f95d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py index 2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f..4368687ae2b141d4df60f3c4a5cf1eefbfca716c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py index 74b9e21c769902d7a2bb1f362d2e95cbf5d862cd..d7b77da59516bfd8a9b9a731138bd8805b3bee6e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/__init__.py index ba147c0c9510241b8cc6f8aa2235042dd634f850..45d5e33dadf589d825f78a9e14818a4871d9542a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py index 1cb78075b80ccd8887818376324a016daf17b67c..b36a11e14f1390ca2f84a276886752dd19fa7bb4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index e568286bdabfa9cd970ff66b3e9b6a807b0f31f3..da3404be850f79069df9a65c0508cedc3c6e32c0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py index 5e807a0b29d665deaaed7620fee6b2b7c697fbb6..43d3f73de0797a8c98cb86e80f50dde70243eb4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py index 631911d141fd6e870942bd77f7ad80c33e221091..e9d2655479fb23505f5b3bbcfb6b5c7c70472a04 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py index 54d85c0e52070f3cffb5a27ea963d0923bdcc379..373798e80fd66cbd707eaff7c2376c42fcbbf2f6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py index d9b66f1860f862ec66429b96c9f73d88815ecfd6..7b65a97db822417ce80967fa5ad29f217d0818e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py index 9ef388cd63aa7c8947fc3391bad703bb01f3d827..78ef423bba5d1b3fa3b53e1b352e472d8f63ad73 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py index 6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef..6cbc3678b58078b0b8a268d515e2f498c5c94065 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/__init__.py index 756916fe5305db0152f03d2c6c3aabec84ab6e89..c1f2efeb0931f3cf5eb391791c17e4c5db620998 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index 1abedb4d3f8145943387f3e66e3e17fed741dcdc..5e0c0aebdbe40cf83887665d56f35ceed1f45ceb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index 8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9..575b87c2ca55f147595e9e46b3630008c9b3e82c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 3a6876e61b9d99b8ed5b00bc13f60857e8fb3d76..2ec5da1f9f269488520fbc8b546dc67ac2894821 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py index 34a2a729ce6d45e11174065699c428a7ac677a8b..10f04b0ab7b9835e2d61e24fbcb233e3412fb6b6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/__init__.py index dcd3c6917ac3e0b72b371917edbce5bc14d39c40..8caf79ea324c509eb0ca88c8dca47b8561d3b35c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index 64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe..573491548f562faa99328926d4bc12112cb988cf 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 5baa996de0fff24876e40ec73f87a7a90da1f2ea..04310d99136c797b48c15ba47ea556c46d928127 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py index 8ae8cc268f3c4fc331cd1e1018be41d113da9183..3b5e2b21abf48ad098dffdf0ced49481e149907e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py index 303858f3e0c28faecf9696d2fbf403d5510cced8..f362c1c8490c912a65a726bebf3172edc3a99107 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py index f854dfd329ce016317b7b9743ace874769f03094..94c595725b80725776d1dea823dce5076560cf72 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py index 9ed869cac9cbe0a847a4fd06e39f4e8cb0944cfb..0843b19e7eee06b4f34e593e213933e14b221c26 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py index 968aa5f224d812d13c53912ca6346f0e872afa9d..99bbc4a004bc41fb2380778864c8994fc5f500e1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py index f0226e0183e765f0c6bfc59a10e95220a32c88eb..704b1675e40fec76bb7522a59034982403ddeade 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py index 6c49df48431602d92607be89318349d2e837536e..e69cca10ba8baf8171618b3c9c8c4b8d6d12cf80 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py index c57b1997c1a86a82962fe2fa49041f529d8c1e0b..5fb792f1e19b1048e4e5559df5f71e96b64d67b5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py index 677a83f1ad4e37460d2b705a8aae82f716d19ced..ab6b1ab350099c196a5d48c90c9648ae0c2b8845 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py index 01c6bcdf0dcc0a0e9c3adb4b0c4580182a030510..cd1201a2fdbb10f3c5c82c52219a00e3a8157dd4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py index e58eb1516669a36eac9abd5451d7335da8de62a4..9f07c18a1ad9b6d1dd96849f72b24555cc998a51 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py index aed5f69dcca9f3ba106cbda0db555f0efa7fecd1..44868147145744526f4f19a30327953562d1ddfc 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py index ddad298bbc0cc7c626bd869965fe6da4630b6fb5..c01e6ec6a9bb1e56c0081e4166af677aa037260b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py index 1edaacf9b3aac3691d69f548e6e01772d428b4c6..c63b557fba163692647309ff8fa3a40e16c9cbe7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/__init__.py index 748195d4bd7b81c2ed3d20720cab2c5bff4750aa..3ac92f6456460fe80e517e6625fa94e520bc6a35 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py index 5a631c3553d9ab5ce7b22b799dbf338a0f87fa43..aac7b3acf8634789427ab387046e673a61c3666c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py index ed5c7ab09b9180c21eb845684ade6a69b7ca0705..b1a2ffc2750d3fbc25c579c3f62e7c80751b7682 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py index 7960995015a5d11e0610babc72827436a32087c1..64d1116166a665234678e54a27e22c14b586fbd0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/__init__.py index e44025b207547eea5e7bd79b657543db9c3a4deb..d3dfb208ef11e13e0b19f22f5c0a43bb7476596e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/__init__.py index 7445085d6958e61bbe27aa9366276cfb2d0f2fa4..ace0c17429c496e9cc392f65a9865fc38463c434 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py index 6436895020aa9f268a9cf4b4959e7b3782ab8fdd..ee927abada0c668abff9587a17dd9aa1ba48b71a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py index 8165170f1f32e48c8d9e9a8bf33effd915d56ea8..e25c257725a76c39746a4f1ca589885a6aeddef3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py index 30e28c4c7b69dff7823e0a7aa87672840b5f317b..14954b5130f690dae465cc4df68709f50544df84 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py index aed5f69dcca9f3ba106cbda0db555f0efa7fecd1..44868147145744526f4f19a30327953562d1ddfc 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py index ddad298bbc0cc7c626bd869965fe6da4630b6fb5..c01e6ec6a9bb1e56c0081e4166af677aa037260b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py index 29f30ca794c567238bb34de6d5de219f72b68cca..a7af90c987a8211e777258468be7eafd2edb16c3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py index 59861169cdfff61daccfdded5e79caf46694f7f1..0fb55cd606c7e4d2ca4a1061dcf4c4cd8d3d8891 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py index f2ad525773e032b7b224f5b661e728ffe8950e98..93b8edd584c855acdb31e357a7745f38dc606e30 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py index c8985523ba0c69fac8fbd1852bd47f2891d92bc6..1ad793f388a08a6a26a42470299e9bd653d403a3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py index 7d3aeed125a790da60e394f9e834fb871ab9c3b9..57901c59123251588a65d3ee10009ded935bb1f8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py index 8dbcffdcef6a5a8e5db53b62fce3a3f123ea450f..c92c7b9e1e3e7db8f65b4ee54b817da0c779bf08 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py index 92e8cf6bf3d3ec018101b740c97d4721224527f7..968d401f366d3005a5d8cda261606b480e272da3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py index e5e97fc164047e8b36086ca3700f75d61848220c..43b0c777f396ce9bb2c63e09b91942ce5f72c57a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py index 561b31be827190ecd2cf49c88adb2118e8018b00..f9c1d141a1127dbb1f1e43d86c1ed2b347e6c86a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py index 9ef388cd63aa7c8947fc3391bad703bb01f3d827..78ef423bba5d1b3fa3b53e1b352e472d8f63ad73 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py index 6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef..6cbc3678b58078b0b8a268d515e2f498c5c94065 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/__init__.py index e16cb666ce1a7bc800b744b15e11b1d4b7279e6d..a6d2377c188304201e1e29a23987d2f750435889 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py index 7fbc8696d952dbd4da8674d436ba19f95c93755d..e4493e09abb5de09b0e339755232b59a7443a1d5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index f2c993df52db1f2e1aa1085a57856c8585fcba58..feef9127c74765b06c4b607b005973df604edfc9 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index 088a2a9a5842516b7391cf36f8c90e94028a03d5..3d011eb224962cde6d2abcfed75201f4b2b2dd8c 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py index 34a2a729ce6d45e11174065699c428a7ac677a8b..10f04b0ab7b9835e2d61e24fbcb233e3412fb6b6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py index 1d5e7a0625d0a7e1ed45c21fef726919e7abb0df..74d9c60e33c6546724dff8784a18e8d339021ae7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/__init__.py index 82e2d504aaeb513b94637bc327bfe2492f2f2447..82bfbf3490f09d9e42a7a53b5d43d4d0fb68c55d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py index a9e6397e1378c9d49d0720f95118a7bc09d8d589..0798edc8485bf20defd44df5fcc2d46496bce1a7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py index 3d4d7cc089c766991270dfdd2f888bff8b38bb49..ef725f1a920a3c2097d601ccbcd68d49e5f28aec 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py index f3d584796ce0d9f70bed72da335de382683781da..08961924d9b651ff50f979d9b9b255432248bc3a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py index 2203b992611860dfd058f330ff7fd5f4d751e43c..ee838763987d96e9d2fb29b4b92b43b327ad997e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py index cbf308375db86584b3adcea9d5c6d782f2307e12..39bd9752bdf0f6b88a29554fb360a80a477ead7f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py index 75b0008fe318c4c34997b7532696828e42b85abf..ac0b29b9c2c29227a8d992da1eefd507ff8f1f9f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py index 1abedb4d3f8145943387f3e66e3e17fed741dcdc..5e0c0aebdbe40cf83887665d56f35ceed1f45ceb 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py index f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca..1bf9ddb7e54f8adac59366f7264efb13e0b86ca3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py index b8413f9714b640282ccc3b07327104536c117b38..398a2f86f81d59ff4bafdce5f81735cc0f2a564d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py index 18213797fc567b08150fc431ac7611ef32d54622..6629bc5376df2acabae1307b203117c0090bcdd2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py index c8ee74a2b7c7f647d2a88dfb22f44ed0ec1e80e4..9b4644d74ea685590d8a9fafeabf60c7e0760208 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py index c5cccf39482c3497e05c1c7ab8f4fdd3e2d7490b..3f481cdb5adcd93e124ab370f5cea07a7368a08a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py index 303858f3e0c28faecf9696d2fbf403d5510cced8..f362c1c8490c912a65a726bebf3172edc3a99107 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py index f854dfd329ce016317b7b9743ace874769f03094..94c595725b80725776d1dea823dce5076560cf72 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py index fd4e9d8a913ee8fb4ba711c3d10310583ea16711..7aecfd9bad7b90745226b34cdc6bcd3354537c1b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py index 21c93df9e732a17da394efda2c59b6166de1374a..a99bde6c2635120459c33e9f546690e43a5ac9de 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py index b7c35cb35140e0059a8596a975e71e1cfa92c717..a59dd255fbc95fb177f810b325c78d55c3e563c7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py index 81dce6de335c51cb366c8fa8c6fe4d53dbad586e..dbeeea278475848caafdf8c1af0f77643faf266f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py index b2973312bf2c09a332f8dc3751bd797b11115c98..269a754015ede7bd2097dd815fadc3312e94d36b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py index d33037182fea0bb3aaf9c33036500240c54c6058..e7a437de67312a23030dcadc4090e75bbed6f7fe 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py index 42dee7a72fe4a5d79128cf6ad278af68094e6692..98a97272439700148abb9c1dd10f7ae5ba74813e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py index c38d75d063374b896ce6767c035175df8774c8ff..576033e9d30800bcc051a154ac193e519a94f369 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/debug_api/Resources.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py similarity index 65% rename from src/nbi/service/rest_server/nbi_plugins/debug_api/Resources.py rename to src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py index 5573b7b026b18715f31a91a052c1a5b15c97a5f0..ce60bdea3a7ab08b8dc24dd2e7c2efe4ecf81ae0 100644 --- a/src/nbi/service/rest_server/nbi_plugins/debug_api/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json +from flask.json import jsonify from flask_restful import Resource, request from common.proto.context_pb2 import Empty +from common.tools.grpc.Tools import grpc_message_to_json from context.client.ContextClient import ContextClient from service.client.ServiceClient import ServiceClient from .Tools import ( @@ -34,6 +37,66 @@ class Contexts(_Resource): def get(self): return format_grpc_to_json(self.client.ListContexts(Empty())) +class DummyContexts(_Resource): + def get(self): + contexts = grpc_message_to_json(self.client.ListContexts(Empty()), use_integers_for_enums=True)['contexts'] + devices = grpc_message_to_json(self.client.ListDevices(Empty()), use_integers_for_enums=True)['devices'] + links = grpc_message_to_json(self.client.ListLinks(Empty()), use_integers_for_enums=True)['links'] + + topologies = list() + slices = list() + services = list() + connections = list() + + for context in contexts: + context_uuid = context['context_id']['context_uuid']['uuid'] + context_id = grpc_context_id(context_uuid) + + topologies.extend(grpc_message_to_json( + self.client.ListTopologies(context_id), + use_integers_for_enums=True + )['topologies']) + + slices.extend(grpc_message_to_json( + self.client.ListSlices(context_id), + use_integers_for_enums=True + )['slices']) + + context_services = grpc_message_to_json( + self.client.ListServices(context_id), + use_integers_for_enums=True + )['services'] + services.extend(context_services) + + for service in context_services: + service_uuid = service['service_id']['service_uuid']['uuid'] + service_id = grpc_service_id(context_uuid, service_uuid) + connections.extend(grpc_message_to_json( + self.client.ListConnections(service_id), + use_integers_for_enums=True + )['connections']) + + for device in devices: + for config_rule in device['device_config']['config_rules']: + if 'custom' not in config_rule: continue + resource_value = config_rule['custom']['resource_value'] + if not isinstance(resource_value, str): continue + try: + resource_value = json.loads(resource_value) + except: # pylint: disable=bare-except + pass + config_rule['custom']['resource_value'] = resource_value + + dummy_context = {'dummy_mode': True} + if len(contexts ) > 0: dummy_context['contexts' ] = contexts + if len(topologies ) > 0: dummy_context['topologies' ] = topologies + if len(devices ) > 0: dummy_context['devices' ] = devices + if len(links ) > 0: dummy_context['links' ] = links + if len(slices ) > 0: dummy_context['slices' ] = slices + if len(services ) > 0: dummy_context['services' ] = services + if len(connections) > 0: dummy_context['connections'] = connections + return jsonify(dummy_context) + class Context(_Resource): def get(self, context_uuid : str): return format_grpc_to_json(self.client.GetContext(grpc_context_id(context_uuid))) @@ -62,7 +125,7 @@ class Service(_Resource): def get(self, context_uuid : str, service_uuid : str): return format_grpc_to_json(self.client.GetService(grpc_service_id(context_uuid, service_uuid))) - def post(self, context_uuid : str, service_uuid : str): + def post(self, context_uuid : str, service_uuid : str): # pylint: disable=unused-argument service = request.get_json()['services'][0] return format_grpc_to_json(self.service_client.CreateService(grpc_service( service_uuid = service['service_id']['service_uuid']['uuid'], @@ -70,7 +133,7 @@ class Service(_Resource): context_uuid = service['service_id']['context_id']['context_uuid']['uuid'], ))) - def put(self, context_uuid : str, service_uuid : str): + def put(self, context_uuid : str, service_uuid : str): # pylint: disable=unused-argument service = request.get_json()['services'][0] return format_grpc_to_json(self.service_client.UpdateService(grpc_service( service_uuid = service['service_id']['service_uuid']['uuid'], diff --git a/src/nbi/service/rest_server/nbi_plugins/debug_api/Tools.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Tools.py similarity index 97% rename from src/nbi/service/rest_server/nbi_plugins/debug_api/Tools.py rename to src/nbi/service/rest_server/nbi_plugins/tfs_api/Tools.py index fd5eb2316d44f4f13e6d8bedef7411beee80c46a..1f69ffffb8c97a83591ec626920b57f40d032783 100644 --- a/src/nbi/service/rest_server/nbi_plugins/debug_api/Tools.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/debug_api/__init__.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py similarity index 84% rename from src/nbi/service/rest_server/nbi_plugins/debug_api/__init__.py rename to src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py index 46dc6fccfe0c3d27c66317295d77e18df2f8ecc4..41e8ff1ea634869e69258c20f81f7c3db9767eb5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/debug_api/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,17 +14,25 @@ from nbi.service.rest_server.RestServer import RestServer from .Resources import ( - Connection, ConnectionIds, Connections, Context, ContextIds, Contexts, Device, DeviceIds, Devices, Link, LinkIds, - Links, PolicyRule, PolicyRuleIds, PolicyRules, Service, ServiceIds, Services, Slice, SliceIds, Slices, Topologies, - Topology, TopologyIds) + Connection, ConnectionIds, Connections, + Context, ContextIds, Contexts, + Device, DeviceIds, Devices, + DummyContexts, + Link, LinkIds, Links, + PolicyRule, PolicyRuleIds, PolicyRules, + Service, ServiceIds, Services, + Slice, SliceIds, Slices, + Topologies, Topology, TopologyIds +) -URL_PREFIX = '/debug-api' +URL_PREFIX = '/tfs-api' # 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.context_ids', ContextIds, '/context_ids'), ('api.contexts', Contexts, '/contexts'), + ('api.dummy_contexts', DummyContexts, '/dummy_contexts'), ('api.context', Context, '/context/'), ('api.topology_ids', TopologyIds, '/context//topology_ids'), @@ -56,6 +64,6 @@ RESOURCES = [ ('api.policyrule', PolicyRule, '/policyrule/'), ] -def register_debug_api(rest_server : RestServer): +def register_tfs_api(rest_server : RestServer): for endpoint_name, resource_class, resource_url in RESOURCES: rest_server.add_resource(resource_class, URL_PREFIX + resource_url, endpoint=endpoint_name) diff --git a/src/nbi/service/rest_server/nbi_plugins/tools/Authentication.py b/src/nbi/service/rest_server/nbi_plugins/tools/Authentication.py index 0afc4f3475e3b3812dd7a666a1d09cafb2b6d6a9..d3b7a56383f731972d3a7f07b2d0fee08e9c2eb7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tools/Authentication.py +++ b/src/nbi/service/rest_server/nbi_plugins/tools/Authentication.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py b/src/nbi/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py index fe22d9ee80970d2bfd3d305f40511f433242df0a..f228065724a2123e85edcc5383dce4194c29851d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py +++ b/src/nbi/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/tools/Validator.py b/src/nbi/service/rest_server/nbi_plugins/tools/Validator.py index 942609ed227b24b2e482654c54d2bb3647700e1c..f955a5a06376defed8696a64d2eb9524250ce087 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tools/Validator.py +++ b/src/nbi/service/rest_server/nbi_plugins/tools/Validator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/service/rest_server/nbi_plugins/tools/__init__.py b/src/nbi/service/rest_server/nbi_plugins/tools/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tools/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/tests/Constants.py b/src/nbi/tests/Constants.py index d177a219a7478fded505e0fe4a43580e5aa55dc6..b24c0b7ef69942a48a4307d4ced0afaf30197e09 100644 --- a/src/nbi/tests/Constants.py +++ b/src/nbi/tests/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -WIM_USERNAME = 'admin' -WIM_PASSWORD = 'admin' +USERNAME = 'admin' +PASSWORD = 'admin' # Ref: https://osm.etsi.org/wikipub/index.php/WIM WIM_MAPPING = [ diff --git a/src/nbi/tests/MockService_Dependencies.py b/src/nbi/tests/MockService_Dependencies.py index 24006386e06f8ebbac3f6a174400a3e99c1db4c3..3c9ad5c5f80afbb62a7cb05aff87cede920bac7b 100644 --- a/src/nbi/tests/MockService_Dependencies.py +++ b/src/nbi/tests/MockService_Dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/tests/PrepareTestScenario.py b/src/nbi/tests/PrepareTestScenario.py index 8a868851f45f559d7766e5a8c38b55bfdb1b5a37..e82c0166acff476924fbc2b873dbc30765fcce6a 100644 --- a/src/nbi/tests/PrepareTestScenario.py +++ b/src/nbi/tests/PrepareTestScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,16 +12,25 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os, pytest, time +import enum, logging, os, pytest, requests, time +from typing import Any, Dict, List, Optional, Set, Union from common.Constants import ServiceNameEnum from common.Settings import ( - ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_HTTP, get_env_var_name, get_service_port_http) + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_HTTP, + get_env_var_name, get_service_baseurl_http, get_service_port_http +) +from context.client.ContextClient import ContextClient from nbi.service.rest_server.RestServer import RestServer -from nbi.service.rest_server.nbi_plugins.debug_api import register_debug_api +from nbi.service.rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api from nbi.service.rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn +from nbi.service.rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn +from nbi.service.rest_server.nbi_plugins.ietf_network import register_ietf_network +from nbi.service.rest_server.nbi_plugins.tfs_api import register_tfs_api from nbi.tests.MockService_Dependencies import MockService_Dependencies +from service.client.ServiceClient import ServiceClient +from slice.client.SliceClient import SliceClient from tests.tools.mock_osm.MockOSM import MockOSM -from .Constants import WIM_MAPPING, WIM_USERNAME, WIM_PASSWORD +from .Constants import USERNAME, PASSWORD, WIM_MAPPING LOCAL_HOST = '127.0.0.1' MOCKSERVICE_PORT = 10000 @@ -38,10 +47,13 @@ def mock_service(): _service.stop() @pytest.fixture(scope='session') -def nbi_service_rest(mock_service): # pylint: disable=redefined-outer-name +def nbi_service_rest(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument _rest_server = RestServer() - register_debug_api(_rest_server) + register_etsi_bwm_api(_rest_server) register_ietf_l2vpn(_rest_server) + register_ietf_l3vpn(_rest_server) + register_ietf_network(_rest_server) + register_tfs_api(_rest_server) _rest_server.start() time.sleep(1) # bring time for the server to start yield _rest_server @@ -49,6 +61,109 @@ def nbi_service_rest(mock_service): # pylint: disable=redefined-outer-name _rest_server.join() @pytest.fixture(scope='session') -def osm_wim(nbi_service_rest): # pylint: disable=redefined-outer-name +def osm_wim(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument wim_url = 'http://{:s}:{:d}'.format(LOCAL_HOST, NBI_SERVICE_PORT) - return MockOSM(wim_url, WIM_MAPPING, WIM_USERNAME, WIM_PASSWORD) + return MockOSM(wim_url, WIM_MAPPING, USERNAME, PASSWORD) + +@pytest.fixture(scope='session') +def context_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument + _client = ContextClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def service_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument + _client = ServiceClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def slice_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument + _client = SliceClient() + yield _client + _client.close() + +class RestRequestMethod(enum.Enum): + GET = 'get' + POST = 'post' + PUT = 'put' + PATCH = 'patch' + DELETE = 'delete' + +EXPECTED_STATUS_CODES : Set[int] = { + requests.codes['OK' ], + requests.codes['CREATED' ], + requests.codes['ACCEPTED' ], + requests.codes['NO_CONTENT'], +} + +def do_rest_request( + method : RestRequestMethod, url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + base_url = get_service_baseurl_http(ServiceNameEnum.NBI) or '' + request_url = 'http://{:s}:{:s}@{:s}:{:d}{:s}{:s}'.format( + USERNAME, PASSWORD, LOCAL_HOST, NBI_SERVICE_PORT, str(base_url), url + ) + if logger is not None: + msg = 'Request: {:s} {:s}'.format(str(method.value).upper(), str(request_url)) + if body is not None: msg += ' body={:s}'.format(str(body)) + logger.warning(msg) + reply = requests.request(method.value, request_url, timeout=timeout, json=body, allow_redirects=allow_redirects) + if logger is not None: + logger.warning('Reply: {:s}'.format(str(reply.text))) + assert reply.status_code in expected_status_codes, 'Reply failed with status code {:d}'.format(reply.status_code) + + if reply.content and len(reply.content) > 0: return reply.json() + return None + +def do_rest_get_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.GET, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_post_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.POST, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_put_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.PUT, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_patch_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.PATCH, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_delete_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.DELETE, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) diff --git a/src/nbi/tests/__init__.py b/src/nbi/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/nbi/tests/__init__.py +++ b/src/nbi/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/tests/data/ietf_l3vpn_req_svc1.json b/src/nbi/tests/data/ietf_l3vpn_req_svc1.json new file mode 100644 index 0000000000000000000000000000000000000000..bfeb93fb74c9513ef4d175d5962110127303a2a7 --- /dev/null +++ b/src/nbi/tests/data/ietf_l3vpn_req_svc1.json @@ -0,0 +1,231 @@ +{ + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": { + "vpn-service": [ + { + "vpn-id": "vpn1" + } + ] + }, + "sites": { + "site": [ + { + "site-id": "site_OLT", + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "locations": { + "location": [ + { + "location-id": "OLT" + } + ] + }, + "devices": { + "device": [ + { + "device-id": "128.32.33.5", + "location": "OLT" + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.1/24", + "lan-tag": "vlan21", + "next-hop": "128.32.33.2" + }, + { + "lan": "128.32.20.1/24", + "lan-tag": "vlan21", + "next-hop": "128.32.33.2" + } + ] + } + } + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "500", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "128.32.33.5", + "vpn-attachment": { + "vpn-id": "vpn1", + "site-role": "ietf-l3vpn-svc:spoke-role" + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "128.32.33.254", + "customer-address": "128.32.33.2", + "prefix-length": 24 + } + } + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.101.1/24", + "lan-tag": "vlan21", + "next-hop": "128.32.33.254" + } + ] + } + } + } + ] + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + } + } + ] + } + } + } + } + } + ] + } + }, + { + "site-id": "site_POP", + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "locations": { + "location": [ + { + "location-id": "POP" + } + ] + }, + "devices": { + "device": [ + { + "device-id": "172.10.33.5", + "location": "POP" + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.101.1/24", + "lan-tag": "vlan101", + "next-hop": "172.10.33.2" + } + ] + } + } + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "500", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "172.10.33.5", + "vpn-attachment": { + "vpn-id": "vpn1", + "site-role": "ietf-l3vpn-svc:hub-role" + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "172.10.33.254", + "customer-address": "172.10.33.2", + "prefix-length": 24 + } + } + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.1/24", + "lan-tag": "vlan101", + "next-hop": "172.10.33.254" + }, + { + "lan": "128.32.20.1/24", + "lan-tag": "vlan101", + "next-hop": "172.10.33.254" + } + ] + } + } + } + ] + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + } + } + ] + } + } + } + } + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/src/nbi/tests/data/ietf_l3vpn_req_svc2.json b/src/nbi/tests/data/ietf_l3vpn_req_svc2.json new file mode 100644 index 0000000000000000000000000000000000000000..2cc512e595c820a8df42ec06af973fefa4601095 --- /dev/null +++ b/src/nbi/tests/data/ietf_l3vpn_req_svc2.json @@ -0,0 +1,231 @@ +{ + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": { + "vpn-service": [ + { + "vpn-id": "vpn2" + } + ] + }, + "sites": { + "site": [ + { + "site-id": "site_OLT", + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "locations": { + "location": [ + { + "location-id": "OLT" + } + ] + }, + "devices": { + "device": [ + { + "device-id": "128.32.33.5", + "location": "OLT" + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.1/24", + "lan-tag": "vlan31", + "next-hop": "128.32.33.2" + }, + { + "lan": "128.32.20.1/24", + "lan-tag": "vlan31", + "next-hop": "128.32.33.2" + } + ] + } + } + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "500", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "128.32.33.5", + "vpn-attachment": { + "vpn-id": "vpn2", + "site-role": "ietf-l3vpn-svc:spoke-role" + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "128.32.33.254", + "customer-address": "128.32.33.2", + "prefix-length": 24 + } + } + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.201.1/24", + "lan-tag": "vlan31", + "next-hop": "128.32.33.254" + } + ] + } + } + } + ] + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + } + } + ] + } + } + } + } + } + ] + } + }, + { + "site-id": "site_POP", + "management": { + "type": "ietf-l3vpn-svc:provider-managed" + }, + "locations": { + "location": [ + { + "location-id": "POP" + } + ] + }, + "devices": { + "device": [ + { + "device-id": "172.10.33.5", + "location": "POP" + } + ] + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "172.1.201.1/24", + "lan-tag": "vlan201", + "next-hop": "172.10.33.2" + } + ] + } + } + } + ] + }, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "500", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "172.10.33.5", + "vpn-attachment": { + "vpn-id": "vpn2", + "site-role": "ietf-l3vpn-svc:hub-role" + }, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "172.10.33.254", + "customer-address": "172.10.33.2", + "prefix-length": 24 + } + } + }, + "routing-protocols": { + "routing-protocol": [ + { + "type": "ietf-l3vpn-svc:static", + "static": { + "cascaded-lan-prefixes": { + "ipv4-lan-prefixes": [ + { + "lan": "128.32.10.1/24", + "lan-tag": "vlan201", + "next-hop": "172.10.33.254" + }, + { + "lan": "128.32.20.1/24", + "lan-tag": "vlan201", + "next-hop": "172.10.33.254" + } + ] + } + } + } + ] + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": { + "qos-profile": { + "classes": { + "class": [ + { + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": { + "latency-boundary": 10 + }, + "bandwidth": { + "guaranteed-bw-percent": 100 + } + } + ] + } + } + } + } + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/src/nbi/tests/data/test-ietf-network.json b/src/nbi/tests/data/test-ietf-network.json new file mode 100644 index 0000000000000000000000000000000000000000..7643ef53a18e0aca583189bdefe097a10c2e502d --- /dev/null +++ b/src/nbi/tests/data/test-ietf-network.json @@ -0,0 +1,1962 @@ +{ + "ietf-network:networks": { + "network": [ + { + "network-id": "providerId-10-clientId-0-topologyId-1", + "ietf-te-topology:te": { + "name": "Huawei-Network" + }, + "ietf-te-topology:te-topology-identifier": { + "provider-id": 10, + "client-id": 0, + "topology-id": "1" + }, + "network-types": { + "ietf-te-topology:te-topology": { + "ietf-otn-topology:otn-topology": {} + } + }, + "node": [ + { + "node-id": "10.0.10.1", + "ietf-te-topology:te-node-id": "10.0.10.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OA" + }, + "tunnel-termination-point": [ + { + "tunnel-tp-id": "NTAx", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "501" + } + ] + } + }, + { + "tunnel-tp-id": "NTAw", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "500" + } + ] + } + } + ] + } + }, + { + "node-id": "10.0.20.1", + "ietf-te-topology:te-node-id": "10.0.20.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "P" + }, + "tunnel-termination-point": [ + { + "tunnel-tp-id": "NTAx", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "501" + } + ] + } + }, + { + "tunnel-tp-id": "NTAw", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "500" + } + ] + } + } + ] + } + }, + { + "node-id": "10.0.40.1", + "ietf-te-topology:te-node-id": "10.0.40.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + }, + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "P" + }, + "tunnel-termination-point": [ + { + "tunnel-tp-id": "NTAw", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "500" + } + ] + } + }, + { + "tunnel-tp-id": "NTAx", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "501" + } + ] + } + } + ] + } + }, + { + "node-id": "10.0.30.1", + "ietf-te-topology:te-node-id": "10.0.30.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + }, + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-te-topology:te": { + "name": "1-1-1-1-1", + "admin-status": "up", + "oper-status": "up", + "ietf-otn-topology:client-svc": { + "client-facing": false + }, + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-oduk", + "switching-capability": "ietf-te-types:switching-otn", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odu-type": "ietf-layer1-types:ODU4" + } + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OE" + }, + "tunnel-termination-point": [ + { + "tunnel-tp-id": "NTAw", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "500" + } + ] + } + }, + { + "tunnel-tp-id": "NTAx", + "admin-status": "up", + "oper-status": "up", + "encoding": "ietf-te-types:lsp-encoding-oduk", + "name": "1-1-1-1-1", + "protection-type": "ietf-te-types:lsp-protection-unprotected", + "switching-capability": "ietf-te-types:switching-otn", + "local-link-connectivities": { + "local-link-connectivity": [ + { + "is-allowed": true, + "link-tp-ref": "501" + } + ] + } + } + ] + } + } + ], + "ietf-network-topology:link": [ + { + "link-id": "10.0.10.1-501", + "source": { + "source-node": "10.0.10.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.20.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-501", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.10.1-500", + "source": { + "source-node": "10.0.10.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.40.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-500", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.20.1-501", + "source": { + "source-node": "10.0.20.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.20.1-501", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.20.1-500", + "source": { + "source-node": "10.0.20.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.30.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.20.1-500", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.40.1-500", + "source": { + "source-node": "10.0.40.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.40.1-500", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.40.1-501", + "source": { + "source-node": "10.0.40.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.30.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.40.1-501", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.30.1-500", + "source": { + "source-node": "10.0.30.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.20.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.30.1-500", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + }, + { + "link-id": "10.0.30.1-501", + "source": { + "source-node": "10.0.30.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.40.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.30.1-501", + "te-delay-metric": 1, + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "odu-type": "ietf-layer1-types:ODU0", + "ts-number": 80 + } + ] + } + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-otn-topology:otn": { + "odulist": [ + { + "ts-number": 80, + "odu-type": "ietf-layer1-types:ODU0" + } + ] + } + } + } + ] + } + } + } + ] + }, + { + "network-id": "providerId-10-clientId-0-topologyId-2", + "ietf-te-topology:te": { + "name": "Huawei-Network" + }, + "ietf-te-topology:te-topology-identifier": { + "provider-id": 10, + "client-id": 0, + "topology-id": "2" + }, + "network-types": { + "ietf-te-topology:te-topology": { + "ietf-eth-te-topology:eth-tran-topology": {} + } + }, + "node": [ + { + "node-id": "10.0.10.1", + "ietf-te-topology:te-node-id": "10.0.10.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": "128.32.33.254", + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OA" + } + } + }, + { + "node-id": "10.0.20.1", + "ietf-te-topology:te-node-id": "10.0.20.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "P" + } + } + }, + { + "node-id": "10.0.40.1", + "ietf-te-topology:te-node-id": "10.0.40.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "P" + } + } + }, + { + "node-id": "10.0.30.1", + "ietf-te-topology:te-node-id": "10.0.30.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": "172.10.33.254", + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "501", + "ietf-te-topology:te-tp-id": 501, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OE" + } + } + }, + { + "node-id": "128.32.33.5", + "ietf-te-topology:te-node-id": "128.32.33.5", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": "128.32.33.2", + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + }, + "ietf-te-topology:te": { + "name": "endpoint:111", + "admin-status": "up", + "oper-status": "up", + "interface-switching-capability": [ + { + "encoding": "ietf-te-types:lsp-encoding-ethernet", + "switching-capability": "ietf-te-types:switching-l2sc", + "max-lsp-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + ] + } + }, + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": 200, + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + }, + { + "tp-id": "201", + "ietf-te-topology:te-tp-id": 201, + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "OLT", + "connectivity-matrices": { + "label-restrictions": { + "label-restriction": [ + { + "index": 0, + "label-start": { + "te-label": { + "ietf-eth-te-topology:vlanid": 21 + } + }, + "label-end": { + "te-label": { + "ietf-eth-te-topology:vlanid": 21 + } + } + }, + { + "index": 1, + "label-start": { + "te-label": { + "ietf-eth-te-topology:vlanid": 31 + } + }, + "label-end": { + "te-label": { + "ietf-eth-te-topology:vlanid": 31 + } + } + } + ] + } + } + } + } + }, + { + "node-id": "128.32.10.1", + "ietf-te-topology:te-node-id": "128.32.10.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + }, + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": 200, + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "ONT1" + } + } + }, + { + "node-id": "128.32.20.1", + "ietf-te-topology:te-node-id": "128.32.20.1", + "ietf-network-topology:termination-point": [ + { + "tp-id": "500", + "ietf-te-topology:te-tp-id": 500, + "ietf-eth-te-topology:eth-svc": { + "client-facing": false, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + }, + { + "tp-id": "200", + "ietf-te-topology:te-tp-id": 200, + "ietf-eth-te-topology:eth-svc": { + "client-facing": true, + "supported-classification": { + "port-classification": true, + "vlan-classification": { + "outer-tag": { + "supported-tag-types": [ + "ietf-eth-tran-types:classify-c-vlan", + "ietf-eth-tran-types:classify-s-vlan" + ], + "vlan-bundling": false, + "vlan-range": "1-4094" + } + } + } + } + } + ], + "ietf-te-topology:te": { + "oper-status": "up", + "te-node-attributes": { + "admin-status": "up", + "name": "ONT2" + } + } + } + ], + "ietf-network-topology:link": [ + { + "link-id": "10.0.10.1-200", + "source": { + "source-node": "10.0.10.1", + "source-tp": "200" + }, + "destination": { + "dest-node": "128.32.33.5", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-200", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.33.5-500", + "source": { + "source-node": "128.32.33.5", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "200" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.33.5-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.10.1-501", + "source": { + "source-node": "10.0.10.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.20.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-501", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.10.1-500", + "source": { + "source-node": "10.0.10.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.40.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.10.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.20.1-501", + "source": { + "source-node": "10.0.20.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.20.1-501", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.20.1-500", + "source": { + "source-node": "10.0.20.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.30.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.20.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.40.1-501", + "source": { + "source-node": "10.0.40.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.30.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.40.1-501", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.40.1-500", + "source": { + "source-node": "10.0.40.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.10.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.40.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.30.1-501", + "source": { + "source-node": "10.0.30.1", + "source-tp": "501" + }, + "destination": { + "dest-node": "10.0.40.1", + "dest-tp": "501" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.30.1-501", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "10.0.30.1-500", + "source": { + "source-node": "10.0.30.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "10.0.20.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "10.0.30.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.33.5-200", + "source": { + "source-node": "128.32.33.5", + "source-tp": "200" + }, + "destination": { + "dest-node": "128.32.10.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.33.5-200", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.10.1-500", + "source": { + "source-node": "128.32.10.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "128.32.33.5", + "dest-tp": "200" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.10.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.33.5-201", + "source": { + "source-node": "128.32.33.5", + "source-tp": "201" + }, + "destination": { + "dest-node": "128.32.20.1", + "dest-tp": "500" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.33.5-201", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + }, + { + "link-id": "128.32.20.1-500", + "source": { + "source-node": "128.32.20.1", + "source-tp": "500" + }, + "destination": { + "dest-node": "128.32.33.5", + "dest-tp": "201" + }, + "ietf-te-topology:te": { + "oper-status": "up", + "te-link-attributes": { + "access-type": "point-to-point", + "admin-status": "up", + "name": "128.32.20.1-500", + "max-link-bandwidth": { + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + }, + "unreserved-bandwidth": [ + { + "priority": 7, + "te-bandwidth": { + "ietf-eth-te-topology:eth-bandwidth": 10000000 + } + } + ] + } + } + } + ] + } + ] + } +} \ No newline at end of file diff --git a/src/nbi/tests/data/tfs_api_dummy.json b/src/nbi/tests/data/tfs_api_dummy.json new file mode 100644 index 0000000000000000000000000000000000000000..d8f5137578629408556e3758c512f137fc633d6c --- /dev/null +++ b/src/nbi/tests/data/tfs_api_dummy.json @@ -0,0 +1,442 @@ +{ + "dummy_mode": true, + "contexts": [ + { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "name": "admin", + "topology_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + ], + "service_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}} + ], + "slice_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "slice_uuid": {"uuid": "SLC:R1-R2-R3"}} + ] + } + ], + "topologies": [ + { + "device_ids": [ + {"device_uuid": {"uuid": "R1"}}, + {"device_uuid": {"uuid": "R2"}}, + {"device_uuid": {"uuid": "R3"}} + ], + "link_ids": [ + {"link_uuid": {"uuid": "R1/502==R2/501"}}, + {"link_uuid": {"uuid": "R1/503==R3/501"}}, + {"link_uuid": {"uuid": "R2/501==R1/502"}}, + {"link_uuid": {"uuid": "R2/503==R3/502"}}, + {"link_uuid": {"uuid": "R3/501==R1/503"}}, + {"link_uuid": {"uuid": "R3/502==R2/503"}} + ], + "name": "admin", + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "name": "R1", "device_type": "emu-packet-router", + "device_drivers": [0], "device_operational_status": 2, + "device_endpoints": [ + {"name": "200", "endpoint_type": "copper", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "502", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "503", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": 0}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "502", "name": "502", "type": "optical"}, + {"uuid": "503", "name": "503", "type": "optical"} + ]}}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { + "uuid": "200", "name": "200", "type": "copper" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[502]", "resource_value": { + "uuid": "502", "name": "502", "type": "optical" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { + "uuid": "503", "name": "503", "type": "optical" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "name": "R2", "device_type": "emu-packet-router", + "device_drivers": [0], "device_operational_status": 2, + "device_endpoints": [ + {"name": "200", "endpoint_type": "copper", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "501", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "503", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": 0}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "501", "name": "501", "type": "optical"}, + {"uuid": "503", "name": "503", "type": "optical"} + ]}}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { + "uuid": "200", "name": "200", "type": "copper" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[501]", "resource_value": { + "uuid": "501", "name": "501", "type": "optical" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { + "uuid": "503", "name": "503", "type": "optical" + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "name": "R3", "device_type": "emu-packet-router", + "device_drivers": [0], "device_operational_status": 2, + "device_endpoints": [ + {"name": "200", "endpoint_type": "copper", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "502", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"name": "503", "endpoint_type": "optical", "endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": 0}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "502", "name": "502", "type": "optical"}, + {"uuid": "503", "name": "503", "type": "optical"} + ]}}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[200]", "resource_value": { + "uuid": "200", "name": "200", "type": "copper" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[502]", "resource_value": { + "uuid": "502", "name": "502", "type": "optical" + }}}, + {"action": 1, "custom": {"resource_key": "/endpoints/endpoint[503]", "resource_value": { + "uuid": "503", "name": "503", "type": "optical" + }}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "R1/502==R2/501"}}, "name": "R1/502==R2/501", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R1/503==R3/501"}}, "name": "R1/503==R3/501", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R2/501==R1/502"}}, "name": "R2/501==R1/502", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R2/503==R3/502"}}, "name": "R2/503==R3/502", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R3/501==R1/503"}}, "name": "R3/501==R1/503", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + }, + { + "link_id": {"link_uuid": {"uuid": "R3/502==R2/503"}}, "name": "R3/502==R2/503", + "attributes": {"total_capacity_gbps": 10.0, "used_capacity_gbps": 0.0}, + "link_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ] + } + ], + "services": [ + { + "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, + "name": "SVC:R1/200==R2/200", "service_type": 1, "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "service_constraints": [ + {"action": 1, "sla_capacity": {"capacity_gbps": 40.0}}, + {"action": 1, "sla_latency": {"e2e_latency_ms": 10.0}}, + {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.99}} + ], + "service_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 + }}} + ]} + }, + { + "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, + "name": "SVC:R1/200==R3/200", "service_type": 1, "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "service_constraints": [ + {"action": 1, "sla_capacity": {"capacity_gbps": 50.0}}, + {"action": 1, "sla_latency": {"e2e_latency_ms": 8.0}}, + {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.9}} + ], + "service_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 + }}} + ]} + }, + { + "service_id" : {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}}, + "name": "SVC:R2/200==R3/200", "service_type": 1, "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "service_constraints": [ + {"action": 1, "sla_capacity": {"capacity_gbps": 10.0}}, + {"action": 1, "sla_latency": {"e2e_latency_ms": 3.0}}, + {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.9999}} + ], + "service_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 + }}} + ]} + } + ], + "slices": [ + { + "slice_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "slice_uuid": {"uuid": "SLC:R1-R2-R3"}}, + "name": "SLC:R1-R2-R3", + "slice_endpoint_ids": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "slice_constraints": [ + {"action": 1, "sla_capacity": {"capacity_gbps": 40.0}}, + {"action": 1, "sla_latency": {"e2e_latency_ms": 10.0}}, + {"action": 1, "sla_availability": {"num_disjoint_paths": 1, "all_active": true, "availability": 99.99}} + ], + "slice_service_ids": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, + {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}} + ], + "slice_subslice_ids": [], + "slice_status": {"slice_status" : 1}, + "slice_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.1.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R2]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.2.1", "ipv4_prefix": 24 + }}}, + {"action": 1, "custom": {"resource_key": "/device[R3]/endpoint[200]/settings", "resource_value": { + "ipv4_address": "10.0.3.1", "ipv4_prefix": 24 + }}} + ]}, + "slice_owner": {"owner_uuid": {"uuid": "TFS"}, "owner_string": "TFS:SLC:R1-R2-R3"} + } + ], + "connections": [ + { + "connection_id": {"connection_uuid": {"uuid": "CON:R1/200==R2/200:1"}}, + "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R2/200"}}, + "path_hops_endpoint_ids" : [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "sub_service_ids": [], + "settings": { + "l3": {"src_ip_address": "10.0.1.10", "dst_ip_address": "10.0.2.10", "ttl": 20} + } + }, + { + "connection_id": {"connection_uuid": {"uuid": "CON:R1/200==R3/200:1"}}, + "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R1/200==R3/200"}}, + "path_hops_endpoint_ids" : [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "501"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "sub_service_ids": [], + "settings": { + "l3": {"src_ip_address": "10.0.1.10", "dst_ip_address": "10.0.3.10", "ttl": 20} + } + }, + { + "connection_id": {"connection_uuid": {"uuid": "CON:R2/200==R3/200:1"}}, + "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "SVC:R2/200==R3/200"}}, + "path_hops_endpoint_ids" : [ + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "503"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "502"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "200"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + } + ], + "sub_service_ids": [], + "settings": { + "l3": {"src_ip_address": "10.0.2.10", "dst_ip_address": "10.0.3.10", "ttl": 20} + } + } + ] +} diff --git a/src/nbi/tests/data/topology-7router-emu-dummy.json b/src/nbi/tests/data/topology-7router-emu-dummy.json new file mode 100644 index 0000000000000000000000000000000000000000..3bb62262652d0eaab411ac71824af3d167b031dd --- /dev/null +++ b/src/nbi/tests/data/topology-7router-emu-dummy.json @@ -0,0 +1,157 @@ +{ + "dummy_mode": true, + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, + {"uuid": "1/3", "type": "copper"}, {"uuid": "2/1", "type": "copper"}, + {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"}, + {"uuid": "2/4", "type": "copper"}, {"uuid": "2/5", "type": "copper"}, + {"uuid": "2/6", "type": "copper"} + ]}}} + ]}} + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "R1==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]} + ] +} diff --git a/src/nbi/tests/data/topology-7router-emu.json b/src/nbi/tests/data/topology-7router-emu.json new file mode 100644 index 0000000000000000000000000000000000000000..4174f4fb460c6ff31ff56a45122d9a589f265f80 --- /dev/null +++ b/src/nbi/tests/data/topology-7router-emu.json @@ -0,0 +1,156 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, {"uuid": "1/3", "type": "copper"}, + {"uuid": "1/4", "type": "copper"}, {"uuid": "1/5", "type": "copper"}, {"uuid": "1/6", "type": "copper"}, + {"uuid": "2/1", "type": "copper"}, {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "1/1", "type": "copper"}, {"uuid": "1/2", "type": "copper"}, + {"uuid": "1/3", "type": "copper"}, {"uuid": "2/1", "type": "copper"}, + {"uuid": "2/2", "type": "copper"}, {"uuid": "2/3", "type": "copper"}, + {"uuid": "2/4", "type": "copper"}, {"uuid": "2/5", "type": "copper"}, + {"uuid": "2/6", "type": "copper"} + ]}}} + ]}} + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "R1==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]} + ] +} diff --git a/src/nbi/tests/data/topology-dummy.json b/src/nbi/tests/data/topology-dummy.json new file mode 100644 index 0000000000000000000000000000000000000000..f066051eedf4e2c09b6987ec781c9c17ea4afd82 --- /dev/null +++ b/src/nbi/tests/data/topology-dummy.json @@ -0,0 +1,3134 @@ +{ + "contexts": [ + { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "name": "admin", + "service_ids": [], + "slice_ids": [], + "topology_ids": [ + { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + ] + } + ], + "devices": [ + { + "components": [], + "controller_id": {}, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": 0 + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + }, + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "500", + "type": "optical", + "uuid": "500" + }, + { + "name": "501", + "type": "optical", + "uuid": "501" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "optical", + "uuid": "500" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[501]", + "resource_value": { + "name": "501", + "type": "optical", + "uuid": "501" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "501" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "b72983bd-57d8-5cf8-8ec7-da9084382d7a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + } + ], + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "10.0.30.1" + }, + { + "components": [], + "controller_id": {}, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": 0 + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "500", + "type": "copper", + "uuid": "500" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "copper", + "uuid": "500" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "500" + } + ], + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "128.32.10.1" + }, + { + "components": [], + "controller_id": {}, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": 0 + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "201", + "type": "copper", + "uuid": "201" + }, + { + "name": "500", + "type": "copper", + "uuid": "500" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[201]", + "resource_value": { + "name": "201", + "type": "copper", + "uuid": "201" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "copper", + "uuid": "500" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "227b6bb2-dacf-5b3d-84e9-c1d0c107bcd8" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "201" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "d8528b70-9215-59ed-851d-b9590ab0c94b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + } + ], + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "device_operational_status": 2, + "device_type": "emu-datacenter", + "name": "172.10.33.5" + }, + { + "components": [], + "controller_id": {}, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": 0 + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + }, + { + "name": "500", + "type": "optical", + "uuid": "500" + }, + { + "name": "501", + "type": "optical", + "uuid": "501" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "optical", + "uuid": "500" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[501]", + "resource_value": { + "name": "501", + "type": "optical", + "uuid": "501" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "501" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "ede34dea-6b51-5787-88d2-553fe548f540" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + } + ], + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "10.0.40.1" + }, + { + "components": [], + "controller_id": {}, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": 0 + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "201", + "type": "copper", + "uuid": "201" + }, + { + "name": "500", + "type": "copper", + "uuid": "500" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[201]", + "resource_value": { + "name": "201", + "type": "copper", + "uuid": "201" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "copper", + "uuid": "500" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "201" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "c6435612-3aca-590f-89ba-e606f54df474" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + } + ], + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "device_operational_status": 2, + "device_type": "emu-optical-transponder", + "name": "128.32.33.5" + }, + { + "components": [], + "controller_id": {}, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": 0 + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + }, + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "500", + "type": "optical", + "uuid": "500" + }, + { + "name": "501", + "type": "optical", + "uuid": "501" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "optical", + "uuid": "500" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[501]", + "resource_value": { + "name": "501", + "type": "optical", + "uuid": "501" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "59e1e30f-ea65-5e04-8a91-760a648a02c6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "70cbb732-8149-59ee-939b-011828e4292b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "501" + } + ], + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "10.0.10.1" + }, + { + "components": [], + "controller_id": {}, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": 0 + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + }, + { + "name": "500", + "type": "optical", + "uuid": "500" + }, + { + "name": "501", + "type": "optical", + "uuid": "501" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "optical", + "uuid": "500" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[501]", + "resource_value": { + "name": "501", + "type": "optical", + "uuid": "501" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "501" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "356378dd-952b-5032-912d-37fc21284b4c" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "optical", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "da826790-a4b0-5317-b30b-e1370918a644" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + } + ], + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "10.0.20.1" + }, + { + "components": [], + "controller_id": {}, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": 0 + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "name": "eth1", + "type": "copper", + "uuid": "eth1" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[eth1]", + "resource_value": { + "name": "eth1", + "type": "copper", + "uuid": "eth1" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + "endpoint_uuid": { + "uuid": "0701f406-633f-53e7-a44d-c93384745df8" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "eth1" + } + ], + "device_id": { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + "device_operational_status": 2, + "device_type": "emu-client", + "name": "128.32.20.5" + }, + { + "components": [], + "controller_id": {}, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": 0 + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "name": "200", + "type": "copper", + "uuid": "200" + }, + { + "name": "500", + "type": "copper", + "uuid": "500" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[200]", + "resource_value": { + "name": "200", + "type": "copper", + "uuid": "200" + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[500]", + "resource_value": { + "name": "500", + "type": "copper", + "uuid": "500" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "500" + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "200" + } + ], + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "device_operational_status": 2, + "device_type": "emu-packet-router", + "name": "128.32.20.1" + }, + { + "components": [], + "controller_id": {}, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": 0 + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "name": "eth1", + "type": "copper", + "uuid": "eth1" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[eth1]", + "resource_value": { + "name": "eth1", + "type": "copper", + "uuid": "eth1" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + "endpoint_uuid": { + "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "copper", + "kpi_sample_types": [], + "name": "eth1" + } + ], + "device_id": { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + "device_operational_status": 2, + "device_type": "emu-client", + "name": "128.32.10.5" + }, + { + "components": [], + "controller_id": {}, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": 0 + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + ] + } + } + }, + { + "action": 1, + "custom": { + "resource_key": "/endpoints/endpoint[mgmt]", + "resource_value": { + "name": "mgmt", + "type": "mgmt", + "uuid": "mgmt" + } + } + } + ] + }, + "device_drivers": [ + 0 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + "endpoint_location": {}, + "endpoint_type": "mgmt", + "kpi_sample_types": [], + "name": "mgmt" + } + ], + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "device_operational_status": 2, + "device_type": "emu-open-line-system", + "name": "nce-t" + } + ], + "dummy_mode": true, + "links": [ + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "70cbb732-8149-59ee-939b-011828e4292b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "0b3d5943-c2bf-595f-a805-dc29c2be2f52" + } + }, + "name": "10.0.10.1-200" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "1490e70f-472c-5e4c-8280-21c48ed03477" + } + }, + "name": "10.0.40.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "c6435612-3aca-590f-89ba-e606f54df474" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "18ba8eb2-342b-5a73-aeae-7288ea9bb28b" + } + }, + "name": "128.32.10.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + "endpoint_uuid": { + "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "1901b0dc-1b5e-5fdf-b9ac-9168787464c1" + } + }, + "name": "128.32.10.1-200" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "9095f6af-6381-54fa-9a0e-b1ef5720d163" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "70cbb732-8149-59ee-939b-011828e4292b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "1afdae8b-a281-53aa-99c2-205afb8f4ee7" + } + }, + "name": "128.32.33.5-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "356378dd-952b-5032-912d-37fc21284b4c" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "30ca0f8f-b150-57f2-ae5e-8a6844944783" + } + }, + "name": "10.0.20.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "34c9c6c3-0dcf-54e5-ba67-da33eb2d3c1a" + } + }, + "name": "10.0.20.1-501" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "161ad889-3839-5dfb-a4a9-95a1de8c3ad5" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "356378dd-952b-5032-912d-37fc21284b4c" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "35801e61-45f3-564e-ad5c-09baf4aae906" + } + }, + "name": "10.0.30.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "36643dba-e8fa-5fb7-952d-dff313db957b" + } + }, + "name": "172.10.33.5-500" + }, + { + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "ede34dea-6b51-5787-88d2-553fe548f540" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "36856920-3387-5384-b1b1-dbc9e54da226" + } + }, + "name": "nce-t/mgmt==10.0.40.1/mgmt" + }, + { + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "b72983bd-57d8-5cf8-8ec7-da9084382d7a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "46ba12f9-dd17-5f2a-9558-e4611515a6b9" + } + }, + "name": "nce-t/mgmt==10.0.30.1/mgmt" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "4dfe28dd-ac28-53d5-b330-1707e350d772" + } + }, + "name": "10.0.30.1-501" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "644ab377-572c-53a4-8ab5-f5cf45591d88" + } + }, + "name": "128.32.20.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "c6435612-3aca-590f-89ba-e606f54df474" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "6fad7bc2-4ce5-5794-8bf0-ddd06cde20a6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "661ac531-4309-58cc-b70e-2a79492c2488" + } + }, + "name": "128.32.33.5-200" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + "endpoint_uuid": { + "uuid": "387f7f12-3168-5c75-801e-f06c8afdbf88" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "852a3fd3-3f55-5e31-865d-c52984efb186" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "6a236e01-853c-51d0-8915-2d09b45923b0" + } + }, + "name": "128.32.33.5-201" + }, + { + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "da826790-a4b0-5317-b30b-e1370918a644" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "6c802ae7-59d1-55e7-9498-146c465bcab5" + } + }, + "name": "nce-t/mgmt==10.0.20.1/mgmt" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + "endpoint_uuid": { + "uuid": "0701f406-633f-53e7-a44d-c93384745df8" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "6fa77ad9-e4d7-5830-bf84-ab206eff613a" + } + }, + "name": "128.32.20.1-200" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "1e35cf03-d55d-5648-9cb6-fca37bfbf23a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + "endpoint_uuid": { + "uuid": "3d0c36bb-80dc-5bab-8a7d-c47cce8d474f" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "808b54e8-3d5a-5e03-a42e-d6c2a57cf6f3" + } + }, + "name": "10.0.30.1-200" + }, + { + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + }, + "endpoint_uuid": { + "uuid": "086906ec-fd3b-55e1-b9bb-5a9e5bb5daff" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "59e1e30f-ea65-5e04-8a91-760a648a02c6" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "85a18715-3ce0-57f9-8025-5634fe622a06" + } + }, + "name": "nce-t/mgmt==10.0.10.1/mgmt" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "75e62edc-a0f9-53f9-821b-023045db1551" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + "endpoint_uuid": { + "uuid": "859813e0-24c1-518e-ba77-44a4f392e321" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "8e8d1a2b-beae-5624-8826-9235bd73a3a8" + } + }, + "name": "10.0.40.1-501" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "a2579e11-2e86-5e53-a235-3dd6ba92bb9a" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + "endpoint_uuid": { + "uuid": "b5efeee2-5062-5d8f-ae06-f901fed7a7d7" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "e9c5b57e-de50-509c-9f5a-0107ff233703" + } + }, + "name": "10.0.10.1-500" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + "endpoint_uuid": { + "uuid": "0701f406-633f-53e7-a44d-c93384745df8" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + "endpoint_uuid": { + "uuid": "bbbec9f8-618a-591a-bc3e-c188ee31008e" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "effca6e0-acf3-5c02-ba9a-d82c17a3f006" + } + }, + "name": "128.32.20.5-eth1" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + "endpoint_uuid": { + "uuid": "ad2e136d-a981-5c9a-8427-07352ac03351" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + "endpoint_uuid": { + "uuid": "23c04144-5ad3-5419-8b96-cf4eb329ca96" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "f45b4432-4ae2-5719-b4e8-a5e8baa1ccd2" + } + }, + "name": "10.0.10.1-501" + }, + { + "attributes": { + "total_capacity_gbps": 10.0, + "used_capacity_gbps": 0.0 + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + "endpoint_uuid": { + "uuid": "16d56d61-63cd-5704-9d2a-5515e633b64b" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + "endpoint_uuid": { + "uuid": "207ef8a3-18fd-5a63-ac24-4a1cc6af3e92" + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "link_id": { + "link_uuid": { + "uuid": "fd005f34-39f5-550e-b2c0-c6e6f8c16325" + } + }, + "name": "128.32.10.5-eth1" + } + ], + "topologies": [ + { + "device_ids": [ + { + "device_uuid": { + "uuid": "0392c251-b5d3-526b-8f3b-a3d4137829fa" + } + }, + { + "device_uuid": { + "uuid": "118295c8-318a-52ec-a394-529fc4b70f2f" + } + }, + { + "device_uuid": { + "uuid": "4c367472-545c-544d-935d-829f0a0e1c72" + } + }, + { + "device_uuid": { + "uuid": "4f2234d0-a9b8-5a86-b1dd-9139d86e3925" + } + }, + { + "device_uuid": { + "uuid": "97d846b3-d0ba-5b4d-b12e-a9365eda205c" + } + }, + { + "device_uuid": { + "uuid": "bf749ed2-fcc4-5bfc-9116-4ea18b722069" + } + }, + { + "device_uuid": { + "uuid": "cf9c4a78-f019-5023-aa0f-4fdba909473b" + } + }, + { + "device_uuid": { + "uuid": "df4be2f2-a4a2-587d-b3ed-61a53cae3aa6" + } + }, + { + "device_uuid": { + "uuid": "e15007fb-aae4-50d6-b686-b6dc4ae504e2" + } + }, + { + "device_uuid": { + "uuid": "f3840f4a-6ea2-551a-8afd-0f3faa8ac1e6" + } + }, + { + "device_uuid": { + "uuid": "fe0dc2e8-b9ce-555f-8f28-a1a4468fabde" + } + } + ], + "link_ids": [ + { + "link_uuid": { + "uuid": "0b3d5943-c2bf-595f-a805-dc29c2be2f52" + } + }, + { + "link_uuid": { + "uuid": "1490e70f-472c-5e4c-8280-21c48ed03477" + } + }, + { + "link_uuid": { + "uuid": "18ba8eb2-342b-5a73-aeae-7288ea9bb28b" + } + }, + { + "link_uuid": { + "uuid": "1901b0dc-1b5e-5fdf-b9ac-9168787464c1" + } + }, + { + "link_uuid": { + "uuid": "1afdae8b-a281-53aa-99c2-205afb8f4ee7" + } + }, + { + "link_uuid": { + "uuid": "30ca0f8f-b150-57f2-ae5e-8a6844944783" + } + }, + { + "link_uuid": { + "uuid": "34c9c6c3-0dcf-54e5-ba67-da33eb2d3c1a" + } + }, + { + "link_uuid": { + "uuid": "35801e61-45f3-564e-ad5c-09baf4aae906" + } + }, + { + "link_uuid": { + "uuid": "36643dba-e8fa-5fb7-952d-dff313db957b" + } + }, + { + "link_uuid": { + "uuid": "36856920-3387-5384-b1b1-dbc9e54da226" + } + }, + { + "link_uuid": { + "uuid": "46ba12f9-dd17-5f2a-9558-e4611515a6b9" + } + }, + { + "link_uuid": { + "uuid": "4dfe28dd-ac28-53d5-b330-1707e350d772" + } + }, + { + "link_uuid": { + "uuid": "644ab377-572c-53a4-8ab5-f5cf45591d88" + } + }, + { + "link_uuid": { + "uuid": "661ac531-4309-58cc-b70e-2a79492c2488" + } + }, + { + "link_uuid": { + "uuid": "6a236e01-853c-51d0-8915-2d09b45923b0" + } + }, + { + "link_uuid": { + "uuid": "6c802ae7-59d1-55e7-9498-146c465bcab5" + } + }, + { + "link_uuid": { + "uuid": "6fa77ad9-e4d7-5830-bf84-ab206eff613a" + } + }, + { + "link_uuid": { + "uuid": "808b54e8-3d5a-5e03-a42e-d6c2a57cf6f3" + } + }, + { + "link_uuid": { + "uuid": "85a18715-3ce0-57f9-8025-5634fe622a06" + } + }, + { + "link_uuid": { + "uuid": "8e8d1a2b-beae-5624-8826-9235bd73a3a8" + } + }, + { + "link_uuid": { + "uuid": "e9c5b57e-de50-509c-9f5a-0107ff233703" + } + }, + { + "link_uuid": { + "uuid": "effca6e0-acf3-5c02-ba9a-d82c17a3f006" + } + }, + { + "link_uuid": { + "uuid": "f45b4432-4ae2-5719-b4e8-a5e8baa1ccd2" + } + }, + { + "link_uuid": { + "uuid": "fd005f34-39f5-550e-b2c0-c6e6f8c16325" + } + } + ], + "name": "admin", + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ] +} \ No newline at end of file diff --git a/src/nbi/tests/data/topology-real.json b/src/nbi/tests/data/topology-real.json new file mode 100644 index 0000000000000000000000000000000000000000..bb158d920ecbd0bf3e9998f4bd856a349c9e91c7 --- /dev/null +++ b/src/nbi/tests/data/topology-real.json @@ -0,0 +1,259 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + + "devices": [ + {"device_id": {"device_uuid": {"uuid": "nce-t"}}, "name": "nce-t", "device_type": "emu-open-line-system", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "name": "10.0.10.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "200", "name": "200", "type": "copper" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "name": "10.0.20.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "name": "10.0.30.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "200", "name": "200", "type": "copper" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "name": "10.0.40.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "name": "128.32.10.5", "device_type": "emu-client", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "name": "eth1", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "name": "128.32.10.1", "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "name": "128.32.20.5", "device_type": "emu-client", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "name": "eth1", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "name": "128.32.20.1", "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "name": "128.32.33.5", "device_type": "emu-optical-transponder", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "201", "name": "201", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "name": "172.10.33.5", "device_type": "emu-datacenter", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "201", "name": "201", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}} + ], + + "links": [ + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.10.1/mgmt"}}, "name": "nce-t/mgmt==10.0.10.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.20.1/mgmt"}}, "name": "nce-t/mgmt==10.0.20.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.30.1/mgmt"}}, "name": "nce-t/mgmt==10.0.30.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.40.1/mgmt"}}, "name": "nce-t/mgmt==10.0.40.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.10.1-501"}}, "name": "10.0.10.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.20.1-501"}}, "name": "10.0.20.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.10.1-500"}}, "name": "10.0.10.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.40.1-500"}}, "name": "10.0.40.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.20.1-500"}}, "name": "10.0.20.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.30.1-500"}}, "name": "10.0.30.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.40.1-501"}}, "name": "10.0.40.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.30.1-501"}}, "name": "10.0.30.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.10.5-eth1"}}, "name": "128.32.10.5-eth1", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "200" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.10.1-200"}}, "name": "128.32.10.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "200" }}, + {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "endpoint_uuid": {"uuid": "eth1"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.10.1-500"}}, "name": "128.32.10.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "200"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.33.5-200"}}, "name": "128.32.33.5-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "200"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.20.5-eth1"}}, "name": "128.32.20.5-eth1", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "200" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.20.1-200"}}, "name": "128.32.20.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "200" }}, + {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "endpoint_uuid": {"uuid": "eth1"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.20.1-500"}}, "name": "128.32.20.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "201"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.33.5-201"}}, "name": "128.32.33.5-201", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "201"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.33.5-500"}}, "name": "128.32.33.5-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "200"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.10.1-200"}}, "name": "10.0.10.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "200"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "172.10.33.5-500"}}, "name": "172.10.33.5-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "200"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.30.1-200"}}, "name": "10.0.30.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "200"}}, + {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "endpoint_uuid": {"uuid": "500"}} + ]} + ] +} diff --git a/src/nbi/tests/test_debug_api.py b/src/nbi/tests/test_debug_api.py deleted file mode 100644 index 06ad8cedc5d70fb58051cbf5b81150b812856054..0000000000000000000000000000000000000000 --- a/src/nbi/tests/test_debug_api.py +++ /dev/null @@ -1,228 +0,0 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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, os, pytest, requests, time, urllib -from typing import Tuple -from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME, ServiceNameEnum -from common.proto.context_pb2 import Connection, Context, Device, Link, Service, Slice, Topology -from common.proto.policy_pb2 import PolicyRuleIdList, PolicyRuleId, PolicyRuleList, PolicyRule -from common.Settings import ( - ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, ENVVAR_SUFIX_SERVICE_PORT_HTTP, get_env_var_name, - get_service_baseurl_http, get_service_port_grpc, get_service_port_http) -from common.type_checkers.Assertions import ( - validate_connection, validate_connection_ids, validate_connections, validate_context, validate_context_ids, - validate_contexts, validate_device, validate_device_ids, validate_devices, validate_link, validate_link_ids, - validate_links, validate_service, validate_service_ids, validate_services, validate_topologies, validate_topology, - validate_topology_ids) -from context.client.ContextClient import ContextClient -from .MockService_Dependencies import MockService_Dependencies -from .Objects import ( - CONNECTION_R1_R3, CONNECTION_R1_R3_ID, CONNECTION_R1_R3_UUID, CONTEXT, CONTEXT_ID, DEVICE_R1, DEVICE_R1_ID, - DEVICE_R1_UUID, DEVICE_R2, DEVICE_R2_ID, DEVICE_R2_UUID, DEVICE_R3, DEVICE_R3_ID, DEVICE_R3_UUID, LINK_R1_R2, - LINK_R1_R2_ID, LINK_R1_R2_UUID, SERVICE_R1_R2, SERVICE_R1_R2_ID, SERVICE_R1_R2_UUID, SERVICE_R1_R3, - SERVICE_R1_R3_ID, SERVICE_R1_R3_UUID, SERVICE_R2_R3, SERVICE_R2_R3_ID, SERVICE_R2_R3_UUID, SLICE_R1_R3, TOPOLOGY, - TOPOLOGY_ID, POLICY_RULE, POLICY_RULE_ID, POLICY_RULE_UUID) - - -@pytest.fixture(scope='session') -def mock_service(): - _service = MockService_Dependencies(MOCKSERVICE_PORT) - _service.configure_env_vars() - _service.start() - yield _service - _service.stop() - - - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -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 - -MOCKSERVICE_PORT = 10000 -DEVICE_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_grpc(ServiceNameEnum.DEVICE) # 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_service_grpc(): - _service = ContextService(context_s_mb[0], context_s_mb[1]) - _service.start() - yield _service - _service.stop() - -@pytest.fixture(scope='session') -def context_service_rest(): - database = context_db_mb[0] - _rest_server = RestServer() - for endpoint_name, resource_class, resource_url in RESOURCES: - _rest_server.add_resource(resource_class, resource_url, endpoint=endpoint_name, resource_class_args=(database,)) - _rest_server.start() - time.sleep(1) # bring time for the server to start - yield _rest_server - _rest_server.shutdown() - _rest_server.join() - -@pytest.fixture(scope='session') -def context_client_grpc(context_service_grpc : ContextService): # pylint: disable=redefined-outer-name - _client = ContextClient() - yield _client - _client.close() - -def test_populate_database(): - client = ContextClient(host=LOCAL_HOST, port=GRPC_PORT) - client.SetContext(Context(**CONTEXT)) - client.SetTopology(Topology(**TOPOLOGY)) - client.SetDevice(Device(**DEVICE_R1)) - client.SetDevice(Device(**DEVICE_R2)) - client.SetDevice(Device(**DEVICE_R3)) - client.SetLink(Link(**LINK_R1_R2)) - client.SetLink(Link(**LINK_R1_R3)) - client.SetLink(Link(**LINK_R2_R3)) - client.SetService(Service(**SERVICE_R1_R2)) - client.SetService(Service(**SERVICE_R1_R3)) - client.SetService(Service(**SERVICE_R2_R3)) - client.SetSlice(Slice(**SLICE_R1_R3)) - client.SetConnection(Connection(**CONNECTION_R1_R3)) - -def do_rest_request(url : str): - base_url = get_service_baseurl_http(ServiceNameEnum.CONTEXT) - request_url = 'http://{:s}:{:s}{:s}{:s}'.format(str(LOCAL_HOST), str(HTTP_PORT), str(base_url), url) - LOGGER.warning('Request: GET {:s}'.format(str(request_url))) - reply = requests.get(request_url) - LOGGER.warning('Reply: {:s}'.format(str(reply.text))) - assert reply.status_code == 200, 'Reply failed with code {}'.format(reply.status_code) - return reply.json() - - -def test_rest_get_context_ids(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - reply = do_rest_request('/context_ids') - validate_context_ids(reply) - -def test_rest_get_contexts(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - reply = do_rest_request('/contexts') - validate_contexts(reply) - -def test_rest_get_context(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_request('/context/{:s}'.format(context_uuid)) - validate_context(reply) - -def test_rest_get_topology_ids(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_request('/context/{:s}/topology_ids'.format(context_uuid)) - validate_topology_ids(reply) - -def test_rest_get_topologies(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_request('/context/{:s}/topologies'.format(context_uuid)) - validate_topologies(reply) - -def test_rest_get_topology(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - topology_uuid = urllib.parse.quote(DEFAULT_TOPOLOGY_NAME) - reply = do_rest_request('/context/{:s}/topology/{:s}'.format(context_uuid, topology_uuid)) - validate_topology(reply, num_devices=3, num_links=3) - -def test_rest_get_service_ids(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_request('/context/{:s}/service_ids'.format(context_uuid)) - validate_service_ids(reply) - -def test_rest_get_services(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_request('/context/{:s}/services'.format(context_uuid)) - validate_services(reply) - -def test_rest_get_service(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - service_uuid = urllib.parse.quote(SERVICE_R1_R2_UUID, safe='') - reply = do_rest_request('/context/{:s}/service/{:s}'.format(context_uuid, service_uuid)) - validate_service(reply) - -def test_rest_get_slice_ids(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_request('/context/{:s}/slice_ids'.format(context_uuid)) - #validate_slice_ids(reply) - -def test_rest_get_slices(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - reply = do_rest_request('/context/{:s}/slices'.format(context_uuid)) - #validate_slices(reply) - -def test_rest_get_slice(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - slice_uuid = urllib.parse.quote(SLICE_R1_R3_UUID, safe='') - reply = do_rest_request('/context/{:s}/slice/{:s}'.format(context_uuid, slice_uuid)) - #validate_slice(reply) - -def test_rest_get_device_ids(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - reply = do_rest_request('/device_ids') - validate_device_ids(reply) - -def test_rest_get_devices(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - reply = do_rest_request('/devices') - validate_devices(reply) - -def test_rest_get_device(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - device_uuid = urllib.parse.quote(DEVICE_R1_UUID, safe='') - reply = do_rest_request('/device/{:s}'.format(device_uuid)) - validate_device(reply) - -def test_rest_get_link_ids(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - reply = do_rest_request('/link_ids') - validate_link_ids(reply) - -def test_rest_get_links(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - reply = do_rest_request('/links') - validate_links(reply) - -def test_rest_get_link(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - link_uuid = urllib.parse.quote(LINK_R1_R2_UUID, safe='') - reply = do_rest_request('/link/{:s}'.format(link_uuid)) - validate_link(reply) - -def test_rest_get_connection_ids(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - service_uuid = urllib.parse.quote(SERVICE_R1_R3_UUID, safe='') - reply = do_rest_request('/context/{:s}/service/{:s}/connection_ids'.format(context_uuid, service_uuid)) - validate_connection_ids(reply) - -def test_rest_get_connections(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) - service_uuid = urllib.parse.quote(SERVICE_R1_R3_UUID, safe='') - reply = do_rest_request('/context/{:s}/service/{:s}/connections'.format(context_uuid, service_uuid)) - validate_connections(reply) - -def test_rest_get_connection(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - connection_uuid = urllib.parse.quote(CONNECTION_R1_R3_UUID, safe='') - reply = do_rest_request('/connection/{:s}'.format(connection_uuid)) - validate_connection(reply) - -def test_rest_get_policyrule_ids(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - reply = do_rest_request('/policyrule_ids') - #validate_policyrule_ids(reply) - -def test_rest_get_policyrules(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - reply = do_rest_request('/policyrules') - #validate_policyrules(reply) - -def test_rest_get_policyrule(context_service_rest : RestServer): # pylint: disable=redefined-outer-name - policyrule_uuid = urllib.parse.quote(POLICYRULE_UUID, safe='') - reply = do_rest_request('/policyrule/{:s}'.format(policyrule_uuid)) - #validate_policyrule(reply) diff --git a/src/nbi/tests/test_etsi_bwm.py b/src/nbi/tests/test_etsi_bwm.py new file mode 100644 index 0000000000000000000000000000000000000000..e621e40726e92c21979eba5ba2c956aebd59e029 --- /dev/null +++ b/src/nbi/tests/test_etsi_bwm.py @@ -0,0 +1,240 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 deepdiff, json, logging, pytest +from typing import Dict +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.proto.context_pb2 import ContextId, TopologyId +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 common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from nbi.service.rest_server import RestServer +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + do_rest_delete_request, do_rest_get_request, do_rest_patch_request, do_rest_post_request, do_rest_put_request, + mock_service, nbi_service_rest, context_client +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) +ADMIN_TOPOLOGY_ID = TopologyId(**json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id=JSON_ADMIN_CONTEXT_ID)) +BASE_URL = '/restconf/bwm/v1' + +@pytest.fixture(scope='session') +def storage() -> Dict: + yield dict() + +#def compare_dicts(dict1, dict2): +# # Function to recursively sort dictionaries +# def recursively_sort(d): +# if isinstance(d, dict): +# return {k: recursively_sort(v) for k, v in sorted(d.items())} +# if isinstance(d, list): +# return [recursively_sort(item) for item in d] +# return d +# +# # Sort dictionaries to ignore the order of fields +# sorted_dict1 = recursively_sort(dict1) +# sorted_dict2 = recursively_sort(dict2) +# +# if sorted_dict1 != sorted_dict2: +# LOGGER.error(sorted_dict1) +# LOGGER.error(sorted_dict2) +# +# return sorted_dict1 != sorted_dict2 + +def check_timestamps(bwm_service): + assert 'timeStamp' in bwm_service + assert 'seconds' in bwm_service['timeStamp'] + assert 'nanoseconds' in bwm_service['timeStamp'] + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + +def test_get_allocations_empty(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + URL = BASE_URL + '/bw_allocations' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + assert len(retrieved_data) == 0 + +def test_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + URL = BASE_URL + '/bw_allocations' + data = { + "appInsId" : "service_uuid_01", + "allocationDirection" : "00", + "fixedAllocation" : "123000.0", + "fixedBWPriority" : "SEE_DESCRIPTION", + "requestType" : 0, + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }] + } + retrieved_data = do_rest_post_request(URL, body=data, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + storage['service_uuid_01'] = 'service_uuid_01' + + +def test_get_allocations(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + assert len(retrieved_data) == 1 + good_result = [ + { + "appInsId" : "service_uuid_01", + "fixedAllocation" : "123000.0", + "allocationDirection" : "00", + "fixedBWPriority" : "SEE_DESCRIPTION", + "requestType" : "0", + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }], + } + ] + check_timestamps(retrieved_data[0]) + del retrieved_data[0]['timeStamp'] + diff_data = deepdiff.DeepDiff(good_result, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + + +def test_get_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations/service_uuid_01' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + good_result = { + "appInsId" : "service_uuid_01", + "fixedAllocation" : "123000.0", + "allocationDirection": "00", + "fixedBWPriority" : "SEE_DESCRIPTION", + "requestType" : "0", + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }] + } + check_timestamps(retrieved_data) + del retrieved_data['timeStamp'] + diff_data = deepdiff.DeepDiff(good_result, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + + +def test_put_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations/service_uuid_01' + changed_allocation = { + "appInsId" : "service_uuid_01", + "fixedAllocation" : "200.0", + "allocationDirection": "00", + "fixedBWPriority" : "NOPRIORITY", + "requestType" : "0", + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }] + } + retrieved_data = do_rest_put_request(URL, body=json.dumps(changed_allocation), logger=LOGGER, expected_status_codes={200}) + check_timestamps(retrieved_data) + del retrieved_data['timeStamp'] + diff_data = deepdiff.DeepDiff(changed_allocation, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + + +def test_patch_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations/service_uuid_01' + difference = { + "fixedBWPriority":"FULLPRIORITY", + } + changed_allocation = { + "appInsId" : "service_uuid_01", + "fixedAllocation" : "200.0", + "allocationDirection": "00", + "fixedBWPriority" : "FULLPRIORITY", + "requestType" : "0", + "sessionFilter" : [{ + "sourceIp" : "192.168.1.2", + "sourcePort" : ["a"], + "protocol" : "string", + "dstAddress" : "192.168.3.2", + "dstPort" : ["b"], + }] + } + retrieved_data = do_rest_patch_request(URL, body=difference, logger=LOGGER, expected_status_codes={200}) + check_timestamps(retrieved_data) + del retrieved_data['timeStamp'] + diff_data = deepdiff.DeepDiff(changed_allocation, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + + +def test_delete_allocation(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + assert 'service_uuid_01' in storage + URL = BASE_URL + '/bw_allocations/service_uuid_01' + do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={200}) + + +def test_get_allocations_empty_final(nbi_service_rest : RestServer, storage : Dict): # pylint: disable=redefined-outer-name, unused-argument + URL = BASE_URL + '/bw_allocations' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + assert len(retrieved_data) == 0 + + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/nbi/tests/test_ietf_l2vpn.py b/src/nbi/tests/test_ietf_l2vpn.py new file mode 100644 index 0000000000000000000000000000000000000000..007d8d45e07da303ad846dc4ef256b9b16a9b499 --- /dev/null +++ b/src/nbi/tests/test_ietf_l2vpn.py @@ -0,0 +1,75 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from common.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.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from tests.tools.mock_osm.MockOSM import MockOSM +from .Constants import SERVICE_CONNECTION_POINTS_1, SERVICE_CONNECTION_POINTS_2, SERVICE_TYPE +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + mock_service, nbi_service_rest, osm_wim, context_client +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/topology-7router-emu-dummy.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + +def test_create_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name + osm_wim.create_connectivity_service(SERVICE_TYPE, SERVICE_CONNECTION_POINTS_1) + +def test_get_service_status(osm_wim : MockOSM): # pylint: disable=redefined-outer-name + service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service + osm_wim.get_connectivity_service_status(service_uuid) + +def test_edit_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name + service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service + osm_wim.edit_connectivity_service(service_uuid, SERVICE_CONNECTION_POINTS_2) + +def test_delete_service(osm_wim : MockOSM): # pylint: disable=redefined-outer-name + service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service + osm_wim.delete_connectivity_service(service_uuid) + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/nbi/tests/test_ietf_l3vpn.py b/src/nbi/tests/test_ietf_l3vpn.py new file mode 100644 index 0000000000000000000000000000000000000000..5c77744a6024803157f210212ee071eba3a3fbf1 --- /dev/null +++ b/src/nbi/tests/test_ietf_l3vpn.py @@ -0,0 +1,113 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging, pytest +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.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from nbi.service.rest_server.RestServer import RestServer +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + do_rest_delete_request, do_rest_get_request, do_rest_post_request, + mock_service, nbi_service_rest, osm_wim, context_client +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' +SVC1_DATA_FILE = 'nbi/tests/data/ietf_l3vpn_req_svc1.json' +SVC2_DATA_FILE = 'nbi/tests/data/ietf_l3vpn_req_svc2.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + +@pytest.fixture(scope='session') +def storage() -> Dict: + yield dict() + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + +# pylint: disable=redefined-outer-name, unused-argument +def test_create_svc1(nbi_service_rest : RestServer, storage : Dict): + with open(SVC1_DATA_FILE, 'r', encoding='UTF-8') as f: + svc1_data = json.load(f) + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' + do_rest_post_request(URL, body=svc1_data, logger=LOGGER, expected_status_codes={201}) + storage['svc1-uuid'] = svc1_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] + +# pylint: disable=redefined-outer-name, unused-argument +def test_create_svc2(nbi_service_rest : RestServer, storage : Dict): + with open(SVC2_DATA_FILE, 'r', encoding='UTF-8') as f: + svc2_data = json.load(f) + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' + do_rest_post_request(URL, body=svc2_data, logger=LOGGER, expected_status_codes={201}) + storage['svc2-uuid'] = svc2_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] + +# pylint: disable=redefined-outer-name, unused-argument +def test_get_state_svc1(nbi_service_rest : RestServer, storage : Dict): + assert 'svc1-uuid' in storage + service_uuid = storage['svc1-uuid'] + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + +# pylint: disable=redefined-outer-name, unused-argument +def test_get_state_svc2(nbi_service_rest : RestServer, storage : Dict): + assert 'svc2-uuid' in storage + service_uuid = storage['svc2-uuid'] + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + +# pylint: disable=redefined-outer-name, unused-argument +def test_delete_svc1(nbi_service_rest : RestServer, storage : Dict): + assert 'svc1-uuid' in storage + service_uuid = storage['svc1-uuid'] + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={204}) + +# pylint: disable=redefined-outer-name, unused-argument +def test_delete_svc2(nbi_service_rest : RestServer, storage : Dict): + assert 'svc2-uuid' in storage + service_uuid = storage['svc2-uuid'] + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={204}) + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/nbi/tests/test_ietf_network.py b/src/nbi/tests/test_ietf_network.py new file mode 100644 index 0000000000000000000000000000000000000000..9a25e1b3b5e0ee202a0af945e88794f8aa9b0ec4 --- /dev/null +++ b/src/nbi/tests/test_ietf_network.py @@ -0,0 +1,99 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 deepdiff, json, logging, operator +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.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from nbi.service.rest_server import RestServer +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 +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/topology-dummy.json' +TARGET_DATA_FILE = 'nbi/tests/data/test-ietf-network.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + +def sort_data(data : Dict) -> None: + if 'ietf-network:networks' not in data: return + if 'network' not in data['ietf-network:networks']: return + data['ietf-network:networks']['network'] = sorted( + data['ietf-network:networks']['network'], + key=operator.itemgetter('network-id') + ) + for network in data['ietf-network:networks']['network']: + if 'node' in network: + network['node'] = sorted( + network['node'], + key=operator.itemgetter('node-id') + ) + + for node in network['node']: + if 'ietf-network-topology:termination-point' in node: + node['ietf-network-topology:termination-point'] = sorted( + node['ietf-network-topology:termination-point'], + key=operator.itemgetter('tp-id') + ) + + if 'ietf-network-topology:link' in network: + network['ietf-network-topology:link'] = sorted( + network['ietf-network-topology:link'], + key=operator.itemgetter('link-id') + ) + +def test_rest_get_networks(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + with open(TARGET_DATA_FILE, 'r', encoding='UTF-8') as f: + target_data = json.load(f) + URL = '/restconf/data/ietf-network:networks' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + sort_data(retrieved_data) + sort_data(target_data) + diff_data = deepdiff.DeepDiff(target_data, retrieved_data) + LOGGER.error('Differences:\n{:s}'.format(str(diff_data.pretty()))) + assert len(diff_data) == 0 + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 0 + assert len(response.slice_ids ) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/nbi/tests/test_slice.py b/src/nbi/tests/test_slice.py index 129d8087fd4c56d4bb758830e47e9ac3216c252b..d382542fdbc5e51658531a1456bebf5d79d5f770 100644 --- a/src/nbi/tests/test_slice.py +++ b/src/nbi/tests/test_slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/nbi/tests/test_tfs_api.py b/src/nbi/tests/test_tfs_api.py new file mode 100644 index 0000000000000000000000000000000000000000..f7d81aa56ef3274fbf17d20f5a067b3a7fa355a7 --- /dev/null +++ b/src/nbi/tests/test_tfs_api.py @@ -0,0 +1,217 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, urllib +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import ( + DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +) +from common.tools.object_factory.Context import json_context_id +from common.type_checkers.Assertions import ( + validate_connection, validate_connection_ids, validate_connections, + validate_context, validate_context_ids, validate_contexts, + validate_device, validate_device_ids, validate_devices, + validate_link, validate_link_ids, validate_links, + validate_service, validate_service_ids, validate_services, + validate_slice, validate_slice_ids, validate_slices, + validate_topologies, validate_topology, validate_topology_ids +) +from context.client.ContextClient import ContextClient +from nbi.service.rest_server.RestServer import RestServer +from .PrepareTestScenario import ( # pylint: disable=unused-import + # be careful, order of symbols is important here! + mock_service, nbi_service_rest, context_client, + do_rest_get_request +) + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = 'nbi/tests/data/tfs_api_dummy.json' + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + + +# ----- Prepare Environment -------------------------------------------------------------------------------------------- + +def test_prepare_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + validate_empty_scenario(context_client) + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 3 + assert len(response.slice_ids ) == 1 + + +# ----- Context -------------------------------------------------------------------------------------------------------- + +def test_rest_get_context_ids(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/context_ids') + validate_context_ids(reply) + +def test_rest_get_contexts(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/contexts') + validate_contexts(reply) + +def test_rest_get_context(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}'.format(context_uuid)) + validate_context(reply) + + +# ----- Topology ------------------------------------------------------------------------------------------------------- + +def test_rest_get_topology_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/topology_ids'.format(context_uuid)) + validate_topology_ids(reply) + +def test_rest_get_topologies(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/topologies'.format(context_uuid)) + validate_topologies(reply) + +def test_rest_get_topology(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + topology_uuid = urllib.parse.quote(DEFAULT_TOPOLOGY_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/topology/{:s}'.format(context_uuid, topology_uuid)) + validate_topology(reply, num_devices=3, num_links=6) + + +# ----- Device --------------------------------------------------------------------------------------------------------- + +def test_rest_get_device_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/device_ids') + validate_device_ids(reply) + +def test_rest_get_devices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/devices') + validate_devices(reply) + +def test_rest_get_device(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + device_uuid = urllib.parse.quote('R1', safe='') + reply = do_rest_get_request('/tfs-api/device/{:s}'.format(device_uuid)) + validate_device(reply) + + +# ----- Link ----------------------------------------------------------------------------------------------------------- + +def test_rest_get_link_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/link_ids') + validate_link_ids(reply) + +def test_rest_get_links(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/links') + validate_links(reply) + +def test_rest_get_link(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + link_uuid = urllib.parse.quote('R1/502==R2/501', safe='') + reply = do_rest_get_request('/tfs-api/link/{:s}'.format(link_uuid)) + validate_link(reply) + + +# ----- Service -------------------------------------------------------------------------------------------------------- + +def test_rest_get_service_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/service_ids'.format(context_uuid)) + validate_service_ids(reply) + +def test_rest_get_services(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/services'.format(context_uuid)) + validate_services(reply) + +def test_rest_get_service(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') + reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}'.format(context_uuid, service_uuid)) + validate_service(reply) + + +# ----- Slice ---------------------------------------------------------------------------------------------------------- + +def test_rest_get_slice_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/slice_ids'.format(context_uuid)) + validate_slice_ids(reply) + +def test_rest_get_slices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request('/tfs-api/context/{:s}/slices'.format(context_uuid)) + validate_slices(reply) + +def test_rest_get_slice(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + slice_uuid = urllib.parse.quote('SLC:R1-R2-R3', safe='') + reply = do_rest_get_request('/tfs-api/context/{:s}/slice/{:s}'.format(context_uuid, slice_uuid)) + validate_slice(reply) + + +# ----- Connection ----------------------------------------------------------------------------------------------------- + +def test_rest_get_connection_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') + reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connection_ids'.format(context_uuid, service_uuid)) + validate_connection_ids(reply) + +def test_rest_get_connections(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='') + reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connections'.format(context_uuid, service_uuid)) + validate_connections(reply) + +def test_rest_get_connection(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument + connection_uuid = urllib.parse.quote('CON:R1/200==R2/200:1', safe='') + reply = do_rest_get_request('/tfs-api/connection/{:s}'.format(connection_uuid)) + validate_connection(reply) + +# ----- Policy --------------------------------------------------------------------------------------------------------- + +#def test_rest_get_policyrule_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +# reply = do_rest_get_request('/tfs-api/policyrule_ids') +# validate_policyrule_ids(reply) + +#def test_rest_get_policyrules(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +# reply = do_rest_get_request('/tfs-api/policyrules') +# validate_policyrules(reply) + +#def test_rest_get_policyrule(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument +# policyrule_uuid_quoted = urllib.parse.quote(policyrule_uuid, safe='') +# reply = do_rest_get_request('/tfs-api/policyrule/{:s}'.format(policyrule_uuid_quoted)) +# validate_policyrule(reply) + + +# ----- Cleanup Environment -------------------------------------------------------------------------------------------- + +def test_cleanup_environment(context_client : ContextClient) -> None: # pylint: disable=redefined-outer-name + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.topology_ids) == 1 + assert len(response.service_ids ) == 3 + assert len(response.slice_ids ) == 1 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/nbi/tests/test_unitary.py b/src/nbi/tests/test_unitary.py deleted file mode 100644 index 9aec95c68ac88bf0c3970a89abe6146ed002dcb3..0000000000000000000000000000000000000000 --- a/src/nbi/tests/test_unitary.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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 tests.tools.mock_osm.MockOSM import MockOSM -from .Constants import SERVICE_CONNECTION_POINTS_1, SERVICE_CONNECTION_POINTS_2, SERVICE_TYPE -from .PrepareTestScenario import ( # pylint: disable=unused-import - # be careful, order of symbols is important here! - mock_service, nbi_service_rest, osm_wim) - -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - - -def test_nbi_create_connectivity_service_rest_api(osm_wim : MockOSM): # pylint: disable=redefined-outer-name - osm_wim.create_connectivity_service(SERVICE_TYPE, SERVICE_CONNECTION_POINTS_1) - -def test_nbi_get_connectivity_service_status_rest_api(osm_wim : MockOSM): # pylint: disable=redefined-outer-name - service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service - osm_wim.get_connectivity_service_status(service_uuid) - -def test_nbi_edit_connectivity_service_rest_api(osm_wim : MockOSM): # pylint: disable=redefined-outer-name - service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service - osm_wim.edit_connectivity_service(service_uuid, SERVICE_CONNECTION_POINTS_2) - -def test_nbi_delete_connectivity_service_rest_api(osm_wim : MockOSM): # pylint: disable=redefined-outer-name - service_uuid = list(osm_wim.conn_info.keys())[0] # this test adds a single service - osm_wim.delete_connectivity_service(service_uuid) diff --git a/src/opticalattackdetector/.gitlab-ci.yml b/src/opticalattackdetector/.gitlab-ci.yml index 2a89b5c54f49434d9703f833e2c72486c2394f9f..fb5715f755a2b11f10263b3093b3b59fbc62b72e 100644 --- a/src/opticalattackdetector/.gitlab-ci.yml +++ b/src/opticalattackdetector/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build opticalattackdetector: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: @@ -37,62 +37,68 @@ build opticalattackdetector: - manifests/${IMAGE_NAME}service.yaml - .gitlab-ci.yml -# apply unit test to the opticalattackdetector component -unit_test opticalattackdetector: - variables: - IMAGE_NAME: 'opticalattackdetector' # name of the microservice - IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) - stage: unit_test - needs: - - build opticalattackdetector - 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 - - if docker container ls | grep redis; then docker rm -f redis; else echo "redis image is not in the system"; fi - - if docker container ls | grep dbscanserving; then docker rm -f dbscanserving; else echo "dbscanserving image is not in the system"; fi - script: - - export REDIS_PASSWORD=$(uuidgen) - - docker pull "redis:7.0-alpine" - - docker run --name redis -d --network=teraflowbridge -p 16379:6379 -e REDIS_PASSWORD=${REDIS_PASSWORD} --rm redis:7.0-alpine redis-server --requirepass ${REDIS_PASSWORD} - - docker logs redis - - REDIS_ADDRESS=$(docker inspect redis --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}") - - docker pull "$CI_REGISTRY_IMAGE/dbscanserving:$IMAGE_TAG" - - docker run --name dbscanserving -d -p 10008:10008 --network=teraflowbridge --rm $CI_REGISTRY_IMAGE/dbscanserving:$IMAGE_TAG "python -m dbscanserving.service" - - docker logs dbscanserving - - DBSCANSERVING_ADDRESS=$(docker inspect dbscanserving --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}") - - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" - - > - docker run --name $IMAGE_NAME -d -p 10006:10006 - -v "$PWD/src/$IMAGE_NAME/tests:/home/${IMAGE_NAME}/results" - -e REDIS_PASSWORD=${REDIS_PASSWORD} - -e DBSCANSERVINGSERVICE_SERVICE_HOST=${DBSCANSERVING_ADDRESS} - -e CACHINGSERVICE_SERVICE_HOST=${REDIS_ADDRESS} - --network=teraflowbridge --rm $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - - sleep 5 - - docker ps -a - - docker logs $IMAGE_NAME - - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/home/${IMAGE_NAME}/results/${IMAGE_NAME}_report.xml; coverage xml -o /home/${IMAGE_NAME}/results/${IMAGE_NAME}_coverage.xml; coverage report --include='${IMAGE_NAME}/*' --show-missing" - coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' - after_script: - - docker rm -f $IMAGE_NAME - - docker rm -f redis - - docker rm -f dbscanserving - - 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/$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 +## apply unit test to the opticalattackdetector component +#unit_test opticalattackdetector: +# variables: +# IMAGE_NAME: 'opticalattackdetector' # name of the microservice +# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) +# stage: unit_test +# needs: +# - build opticalattackdetector +# 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 +# - if docker container ls | grep redis; then docker rm -f redis; else echo "redis image is not in the system"; fi +# - if docker container ls | grep dbscanserving; then docker rm -f dbscanserving; else echo "dbscanserving image is not in the system"; fi +# script: +# - export REDIS_PASSWORD=$(uuidgen) +# - docker pull "redis:7.0-alpine" +# - docker run --name redis -d --network=teraflowbridge -p 16379:6379 -e REDIS_PASSWORD=${REDIS_PASSWORD} --rm redis:7.0-alpine redis-server --requirepass ${REDIS_PASSWORD} +# - while ! docker logs redis 2>&1 | grep -q 'Ready to accept connections'; do sleep 1; done +# - docker logs redis +# - REDIS_ADDRESS=$(docker inspect redis --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}") +# - docker pull "$CI_REGISTRY_IMAGE/dbscanserving:$IMAGE_TAG" +# - docker run --name dbscanserving -d -p 10008:10008 --network=teraflowbridge --rm $CI_REGISTRY_IMAGE/dbscanserving:$IMAGE_TAG "python -m dbscanserving.service" +# - docker logs dbscanserving +# - DBSCANSERVING_ADDRESS=$(docker inspect dbscanserving --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}") +# - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" +# - > +# docker run --name $IMAGE_NAME -d -p 10006:10006 +# -v "$PWD/src/$IMAGE_NAME/tests:/home/${IMAGE_NAME}/results" +# -e REDIS_PASSWORD=${REDIS_PASSWORD} +# -e DBSCANSERVINGSERVICE_SERVICE_HOST=${DBSCANSERVING_ADDRESS} +# -e CACHINGSERVICE_SERVICE_HOST=${REDIS_ADDRESS} +# --network=teraflowbridge --rm $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG +# - sleep 5 +# - docker ps -a +# - docker logs $IMAGE_NAME +# - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/home/${IMAGE_NAME}/results/${IMAGE_NAME}_report.xml" +# - docker logs redis +# - docker logs dbscanserving +# - docker logs $IMAGE_NAME +# - docker exec -i $IMAGE_NAME bash -c "coverage xml -o /home/${IMAGE_NAME}/results/${IMAGE_NAME}_coverage.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 rm -f redis +# - docker rm -f dbscanserving +# - 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/$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 opticalattackdetector service in Kubernetes Cluster diff --git a/src/opticalattackdetector/Config.py b/src/opticalattackdetector/Config.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackdetector/Config.py +++ b/src/opticalattackdetector/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackdetector/Dockerfile b/src/opticalattackdetector/Dockerfile index 2b55ae7b00607729bba4c8f0e1f76b10c7170b11..37d79582e754b4bbd2f0b82ad1fd63731c777ef8 100644 --- a/src/opticalattackdetector/Dockerfile +++ b/src/opticalattackdetector/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackdetector/__init__.py b/src/opticalattackdetector/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackdetector/__init__.py +++ b/src/opticalattackdetector/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackdetector/client/OpticalAttackDetectorClient.py b/src/opticalattackdetector/client/OpticalAttackDetectorClient.py index 3b95227ade65cdfb4a47830dee461c57bfc7dbfb..42a2b6c668a4e358daf6c6e24638084329fd5262 100644 --- a/src/opticalattackdetector/client/OpticalAttackDetectorClient.py +++ b/src/opticalattackdetector/client/OpticalAttackDetectorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackdetector/client/__init__.py b/src/opticalattackdetector/client/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackdetector/client/__init__.py +++ b/src/opticalattackdetector/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackdetector/requirements.in b/src/opticalattackdetector/requirements.in index b69d4dd786500686fef4e04fd5b6096d5648cfc6..39982773b7bbd14a680aa3b26173e8fbcecd88fd 100644 --- a/src/opticalattackdetector/requirements.in +++ b/src/opticalattackdetector/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackdetector/service/OpticalAttackDetectorService.py b/src/opticalattackdetector/service/OpticalAttackDetectorService.py index 2128d79b4dcdaf4fa0f12cd1fd96ba56669d48f9..8b8263d738066b412236ade0dfc5cd4ea806e0f5 100644 --- a/src/opticalattackdetector/service/OpticalAttackDetectorService.py +++ b/src/opticalattackdetector/service/OpticalAttackDetectorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackdetector/service/OpticalAttackDetectorServiceServicerImpl.py b/src/opticalattackdetector/service/OpticalAttackDetectorServiceServicerImpl.py index 11016037ee36f3b63726f7cc9fe398609c4f451b..d479f48e5b10c689b92aef64d13b2b3cb094826d 100644 --- a/src/opticalattackdetector/service/OpticalAttackDetectorServiceServicerImpl.py +++ b/src/opticalattackdetector/service/OpticalAttackDetectorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -221,7 +221,7 @@ class OpticalAttackDetectorServiceServicerImpl(OpticalAttackDetectorServiceServi monitoring_client.IncludeKpi(kpi) # if -1 in response.cluster_indices: # attack detected - if kpi.kpi_value.int32Val == -1: + if kpi.kpi_value.int32Val == 1: attack = AttackDescription() attack.cs_id.uuid = request.service_id.service_uuid.uuid with HISTOGRAM_DURATION.labels(step="mitigation", **METRIC_LABELS).time(): diff --git a/src/opticalattackdetector/service/__init__.py b/src/opticalattackdetector/service/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackdetector/service/__init__.py +++ b/src/opticalattackdetector/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackdetector/service/__main__.py b/src/opticalattackdetector/service/__main__.py index 27706fce44d9635fcdaf1cc64a2dfb6292fc7833..b9c7202cf1949b31c91cab37d0dea04c455ba037 100644 --- a/src/opticalattackdetector/service/__main__.py +++ b/src/opticalattackdetector/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackdetector/tests/__init__.py b/src/opticalattackdetector/tests/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackdetector/tests/__init__.py +++ b/src/opticalattackdetector/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackdetector/tests/example_objects.py b/src/opticalattackdetector/tests/example_objects.py index aa9b7b82c5e4d9d4d4158bd0a01e6843cfe88872..436b0ebaba4a5c3b7a172f87c2d0741c170932ed 100644 --- a/src/opticalattackdetector/tests/example_objects.py +++ b/src/opticalattackdetector/tests/example_objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackdetector/tests/test_unitary.py b/src/opticalattackdetector/tests/test_unitary.py index 6c7579238a157a0f00e9eb0c9df53a04c1774ff6..a5ae8d59dbd271042575164276d746a705971a05 100644 --- a/src/opticalattackdetector/tests/test_unitary.py +++ b/src/opticalattackdetector/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,13 +15,13 @@ import logging import uuid import queue +import time from unittest.mock import patch import pytest from common.proto import dbscanserving_pb2 as dbscan from common.proto.optical_attack_detector_pb2 import DetectionRequest -from common.tests.MockServicerImpl_Monitoring import MockServicerImpl_Monitoring from opticalattackdetector.client.OpticalAttackDetectorClient import \ OpticalAttackDetectorClient @@ -37,6 +37,7 @@ LOGGER = logging.getLogger(__name__) def optical_attack_detector_service(): _service = OpticalAttackDetectorService() _service.start() + time.sleep(2) yield _service _service.stop() @@ -44,7 +45,7 @@ def optical_attack_detector_service(): @pytest.fixture(scope="session") def optical_attack_detector_client(optical_attack_detector_service: OpticalAttackDetectorService): _client = OpticalAttackDetectorClient( - host=optical_attack_detector_service.bind_address, + host="127.0.0.1", port=optical_attack_detector_service.bind_port, ) yield _client @@ -56,26 +57,20 @@ def test_detect_attack( optical_attack_detector_client: OpticalAttackDetectorClient, ): message = dbscan.DetectionResponse() - message.cluster_indices.extend([0, 1, -1, -1, -1]) + message.cluster_indices.extend([0, 1] * 5 + [-1] * 10) - monitoring_mock = MockServicerImpl_Monitoring(queue_samples = queue.Queue()) with patch( "opticalattackdetector.service.OpticalAttackDetectorServiceServicerImpl.attack_mitigator_client" ) as mitigator, patch( - "opticalattackdetector.service.OpticalAttackDetectorServiceServicerImpl.monitoring_client", - monitoring_mock, + "opticalattackdetector.service.OpticalAttackDetectorServiceServicerImpl.monitoring_client.IncludeKpi", ) as monitoring, patch( "opticalattackdetector.service.OpticalAttackDetectorServiceServicerImpl.dbscanserving_client.Detect", - # TODO: return dumb object with "cluster_indices" attribute - # idea: create new response object return_value=message, ) as dbscanserving: - for _ in range(10): - request: DetectionRequest = DetectionRequest() - request.service_id.context_id.context_uuid.uuid = str(uuid.uuid4()) - request.service_id.service_uuid.uuid = str(uuid.uuid4()) - request.kpi_id.kpi_id.uuid = "1" - optical_attack_detector_client.DetectAttack(request) - dbscanserving.assert_called_once() - monitoring.IncludeKpi.assert_called_once() - mitigator.NotifyAttack.assert_called() + request: DetectionRequest = DetectionRequest() + request.service_id.context_id.context_uuid.uuid = str(uuid.uuid4()) + request.service_id.service_uuid.uuid = str(uuid.uuid4()) + request.kpi_id.kpi_id.uuid = "1" + optical_attack_detector_client.DetectAttack(request) + dbscanserving.assert_called() + monitoring.assert_called() diff --git a/src/opticalattackmanager/.gitlab-ci.yml b/src/opticalattackmanager/.gitlab-ci.yml index 1fe77d3159ba5d5f2d0bd99f23c4692e1f509d20..fc10007775769d9c14bb984b7b0b62bd2edbe9a9 100644 --- a/src/opticalattackmanager/.gitlab-ci.yml +++ b/src/opticalattackmanager/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build opticalattackmanager: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: @@ -38,45 +38,45 @@ build opticalattackmanager: - manifests/${IMAGE_NAME}service.yaml - .gitlab-ci.yml -# Apply unit test to the component -unit_test opticalattackmanager: - variables: - IMAGE_NAME: 'opticalattackmanager' # name of the microservice - IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) - stage: unit_test - needs: - - build opticalattackmanager - 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 10005:10005 -e LOG_LEVEL=DEBUG -v "$PWD/src/$IMAGE_NAME/tests:/home/teraflow/controller/$IMAGE_NAME/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - - docker ps -a - - docker logs $IMAGE_NAME - - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/home/teraflow/controller/$IMAGE_NAME/results/${IMAGE_NAME}_report.xml; coverage report --include='${IMAGE_NAME}/*' --show-missing" - - ls -la src/$IMAGE_NAME/tests - 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 +## Apply unit test to the component +#unit_test opticalattackmanager: +# variables: +# IMAGE_NAME: 'opticalattackmanager' # name of the microservice +# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) +# stage: unit_test +# needs: +# - build opticalattackmanager +# 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 10005:10005 -e LOG_LEVEL=DEBUG -v "$PWD/src/$IMAGE_NAME/tests:/home/teraflow/controller/$IMAGE_NAME/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG +# - docker ps -a +# - docker logs $IMAGE_NAME +# - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/home/teraflow/controller/$IMAGE_NAME/results/${IMAGE_NAME}_report.xml; coverage report --include='${IMAGE_NAME}/*' --show-missing" +# - ls -la src/$IMAGE_NAME/tests +# 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 opticalattackmanager: diff --git a/src/opticalattackmanager/Config.py b/src/opticalattackmanager/Config.py index 7cbb8423de9118b5e79e96b535e3831aa469b7b2..9fd60386c3913bb7ee9b23c9688852b9743c881c 100644 --- a/src/opticalattackmanager/Config.py +++ b/src/opticalattackmanager/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmanager/Dockerfile b/src/opticalattackmanager/Dockerfile index 38637861ae5fa72e4baf0abaa58929136890db63..f9f5537a4c3249798d8022ddefd6d15e54fe9af4 100644 --- a/src/opticalattackmanager/Dockerfile +++ b/src/opticalattackmanager/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmanager/__init__.py b/src/opticalattackmanager/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackmanager/__init__.py +++ b/src/opticalattackmanager/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmanager/requirements.in b/src/opticalattackmanager/requirements.in index 6f2b2b7d36ddab234f6d1f874ad3eb86173ce654..61bd9bd8b8d77bfa6f08c58ed64427c9058e2733 100644 --- a/src/opticalattackmanager/requirements.in +++ b/src/opticalattackmanager/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmanager/service/__init__.py b/src/opticalattackmanager/service/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackmanager/service/__init__.py +++ b/src/opticalattackmanager/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmanager/service/__main__.py b/src/opticalattackmanager/service/__main__.py index 6ea636f42eb4b992bb7d722188ccbc945a6a153d..461756855b5fa5f1e55a8840019f92c7679c000c 100644 --- a/src/opticalattackmanager/service/__main__.py +++ b/src/opticalattackmanager/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmanager/tests/__init__.py b/src/opticalattackmanager/tests/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackmanager/tests/__init__.py +++ b/src/opticalattackmanager/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmanager/tests/test_unitary.py b/src/opticalattackmanager/tests/test_unitary.py index 0f50b333326a687f1c18e03ae6854561bb5501aa..9530b288a664cbef4d7955f45bf86a54332cdf03 100644 --- a/src/opticalattackmanager/tests/test_unitary.py +++ b/src/opticalattackmanager/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmanager/utils/__init__.py b/src/opticalattackmanager/utils/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackmanager/utils/__init__.py +++ b/src/opticalattackmanager/utils/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmanager/utils/monitor.py b/src/opticalattackmanager/utils/monitor.py index 9889c0caf61129c30bc3f1681dceda1e1a4adfad..39208245f08ad27bbae203c5c59c114d6d260eb8 100644 --- a/src/opticalattackmanager/utils/monitor.py +++ b/src/opticalattackmanager/utils/monitor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmitigator/.gitlab-ci.yml b/src/opticalattackmitigator/.gitlab-ci.yml index 30eb94b1b5a765eb3dbfac3e544b9bd94a6e415b..4c3525f4aebb83caf22931ed2609d82246332e0f 100644 --- a/src/opticalattackmitigator/.gitlab-ci.yml +++ b/src/opticalattackmitigator/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build opticalattackmitigator: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: @@ -36,41 +36,41 @@ build opticalattackmitigator: - manifests/${IMAGE_NAME}service.yaml - .gitlab-ci.yml -# apply unit test to the opticalattackmitigator component -unit_test opticalattackmitigator: - variables: - IMAGE_NAME: 'opticalattackmitigator' # name of the microservice - IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) - stage: unit_test - needs: - - build opticalattackmitigator - 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 container is not in the system"; fi - script: - - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" - - docker run --name $IMAGE_NAME -d -p 10007:10007 -v "$PWD/src/$IMAGE_NAME/tests:/home/${IMAGE_NAME}/results" --network=teraflowbridge --rm $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - - sleep 5 - - docker ps -a - - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/home/${IMAGE_NAME}/results/${IMAGE_NAME}_report.xml; coverage xml -o /home/${IMAGE_NAME}/results/${IMAGE_NAME}_coverage.xml; 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/$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 +## apply unit test to the opticalattackmitigator component +#unit_test opticalattackmitigator: +# variables: +# IMAGE_NAME: 'opticalattackmitigator' # name of the microservice +# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) +# stage: unit_test +# needs: +# - build opticalattackmitigator +# 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 container is not in the system"; fi +# script: +# - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" +# - docker run --name $IMAGE_NAME -d -p 10007:10007 -v "$PWD/src/$IMAGE_NAME/tests:/home/${IMAGE_NAME}/results" --network=teraflowbridge --rm $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG +# - sleep 5 +# - docker ps -a +# - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=DEBUG --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/home/${IMAGE_NAME}/results/${IMAGE_NAME}_report.xml; coverage xml -o /home/${IMAGE_NAME}/results/${IMAGE_NAME}_coverage.xml; 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/$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 # Deployment of the opticalattackmitigator service in Kubernetes Cluster diff --git a/src/opticalattackmitigator/Config.py b/src/opticalattackmitigator/Config.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackmitigator/Config.py +++ b/src/opticalattackmitigator/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmitigator/Dockerfile b/src/opticalattackmitigator/Dockerfile index 278990306a7ac410eb5d7442537919e410fa957d..18c22861915317113b7eec4178385c7075d99365 100644 --- a/src/opticalattackmitigator/Dockerfile +++ b/src/opticalattackmitigator/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmitigator/__init__.py b/src/opticalattackmitigator/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackmitigator/__init__.py +++ b/src/opticalattackmitigator/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmitigator/client/OpticalAttackMitigatorClient.py b/src/opticalattackmitigator/client/OpticalAttackMitigatorClient.py index 4d283202b95a840a6cbe84daf373a806f5a1f463..3498eae04eda8dedd3bd3766747c3ebf0d2980e1 100644 --- a/src/opticalattackmitigator/client/OpticalAttackMitigatorClient.py +++ b/src/opticalattackmitigator/client/OpticalAttackMitigatorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmitigator/client/__init__.py b/src/opticalattackmitigator/client/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackmitigator/client/__init__.py +++ b/src/opticalattackmitigator/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmitigator/requirements.in b/src/opticalattackmitigator/requirements.in index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackmitigator/requirements.in +++ b/src/opticalattackmitigator/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmitigator/service/OpticalAttackMitigatorService.py b/src/opticalattackmitigator/service/OpticalAttackMitigatorService.py index c5a3ff4cdda1f800a5571b4b975a6427690834c9..94b87485d524d971f3ab05cd4b78677de558c4d8 100644 --- a/src/opticalattackmitigator/service/OpticalAttackMitigatorService.py +++ b/src/opticalattackmitigator/service/OpticalAttackMitigatorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmitigator/service/OpticalAttackMitigatorServiceServicerImpl.py b/src/opticalattackmitigator/service/OpticalAttackMitigatorServiceServicerImpl.py index d6018b733f9dc2078027420cc2d55f627a12c1a7..96769f352ef3861719609d8adfba76721f4c318e 100644 --- a/src/opticalattackmitigator/service/OpticalAttackMitigatorServiceServicerImpl.py +++ b/src/opticalattackmitigator/service/OpticalAttackMitigatorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmitigator/service/__init__.py b/src/opticalattackmitigator/service/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackmitigator/service/__init__.py +++ b/src/opticalattackmitigator/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmitigator/service/__main__.py b/src/opticalattackmitigator/service/__main__.py index dc725a94f77c1f53e2f02a83c3d1b82350fb3b7d..1e13e2ef0c0ac69ff2a0753247b1c7522fedda2a 100644 --- a/src/opticalattackmitigator/service/__main__.py +++ b/src/opticalattackmitigator/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmitigator/tests/__init__.py b/src/opticalattackmitigator/tests/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/opticalattackmitigator/tests/__init__.py +++ b/src/opticalattackmitigator/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalattackmitigator/tests/test_unitary.py b/src/opticalattackmitigator/tests/test_unitary.py index 76b31c3a853e64f87b30d9e2d27b9c98d44642b6..ba58c60709a4ead7653314bb885fe4e6a370b883 100644 --- a/src/opticalattackmitigator/tests/test_unitary.py +++ b/src/opticalattackmitigator/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/opticalcontroller/.gitlab-ci.yml b/src/opticalcontroller/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..831a61186d0e56b0b359d47c551c555da8ade3ee --- /dev/null +++ b/src/opticalcontroller/.gitlab-ci.yml @@ -0,0 +1,105 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 opticalcontroller: + variables: + IMAGE_NAME: 'opticalcontroller' # 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 opticalcontroller: +# variables: +# IMAGE_NAME: 'opticalcontroller' # name of the microservice +# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) +# stage: unit_test +# needs: +# - build opticalcontroller +# 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 $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 20030:20030 -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG +# - sleep 5 +# - docker ps -a +# - docker logs $IMAGE_NAME +# - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/opt/results/${IMAGE_NAME}_report.xml" +# - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" +# coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' +# after_script: +# - docker rm -f $IMAGE_NAME +# - docker network rm teraflowbridge +# rules: +# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' +# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' +# - changes: +# - src/common/**/*.py +# - proto/*.proto +# - src/$IMAGE_NAME/**/*.{py,in,yml} +# - src/$IMAGE_NAME/Dockerfile +# - src/$IMAGE_NAME/tests/*.py +# - 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 opticalcontroller: +# variables: +# IMAGE_NAME: 'opticalcontroller' # name of the microservice +# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) +# stage: deploy +# needs: +# - unit test opticalcontroller +# # - 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/opticalcontroller/Dockerfile b/src/opticalcontroller/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..faea3b2e056768ef9947db108df61928c8a177cb --- /dev/null +++ b/src/opticalcontroller/Dockerfile @@ -0,0 +1,71 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/opticalcontroller +WORKDIR /var/teraflow/opticalcontroller +COPY src/opticalcontroller/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/opticalcontroller/. opticalcontroller/ + +# Start the service +WORKDIR /var/teraflow/opticalcontroller +ENTRYPOINT ["python", "OpticalController.py"] diff --git a/src/opticalcontroller/OpticalController.py b/src/opticalcontroller/OpticalController.py new file mode 100644 index 0000000000000000000000000000000000000000..0febb7b1f470bf86dc30754c1db2af262779a25d --- /dev/null +++ b/src/opticalcontroller/OpticalController.py @@ -0,0 +1,246 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 flask import Flask +from flask import render_template +from flask_restplus import Resource, Api + +from tools import * +from variables import * +from RSA import RSA +import time +import logging + + +rsa = None +LOGGER = logging.getLogger(__name__) + +app = Flask(__name__) +api = Api(app, version='1.0', title='Optical controller API', + description='Rest API to configure OC Optical devices in TFS') +# app.config.from_object('config') +# appbuilder = AppBuilder(app, indexview=MyIndexView) +optical = api.namespace('OpticalTFS', description='TFS Optical APIs') + + +@app.route('/index') +def index(): + return render_template('index.html') + + +#@optical.route('/AddLightpath////') +@optical.route('/AddLightpath///') +@optical.response(200, 'Success') +@optical.response(404, 'Error, not found') +class AddLightpath(Resource): + @staticmethod + def put(src, dst, bitrate, bidir=1): + + LOGGER.info("INFO: New Lightpath request from {} to {} with rate {} ".format(src, dst, bitrate)) + t0 = time.time()*1000.0 + if debug: + rsa.g.printGraph() + + if rsa is not None: + flow_id = rsa.rsa_computation(src, dst, bitrate, bidir) + if rsa.db_flows[flow_id]["op-mode"] == 0: + return 'No path found', 404 + t1 = time.time()*1000.0 + elapsed = t1 - t0 + LOGGER.info("INFO: time elapsed = {} ms".format(elapsed)) + return rsa.db_flows[flow_id], 200 + else: + return "Error", 404 + + +#@optical.route('/AddFlexLightpath///') +@optical.route('/AddFlexLightpath///', + defaults={"bidir": 1, "band": None}) +@optical.route('/AddFlexLightpath////', + defaults={"band": None}) +@optical.route('/AddFlexLightpath/////',) +@optical.response(200, 'Success') +@optical.response(404, 'Error, not found') +class AddFlexLightpath(Resource): + @staticmethod + def put(src, dst, bitrate,bidir=1, band=None): + + print("INFO: New FlexLightpath request from {} to {} with rate {} ".format(src, dst, bitrate)) + LOGGER.info("INFO: New FlexLightpath request from {} to {} with rate {} ".format(src, dst, bitrate)) + t0 = time.time()*1000.0 + if debug: + rsa.g.printGraph() + + if rsa is not None: + flow_id, optical_band_id = rsa.rsa_fs_computation(src, dst, bitrate, bidir, band) + print (f"flow_id {flow_id} and optical_band_id {optical_band_id} ") + LOGGER.debug('flow_id={:s} rsa.db_flows={:s}'.format(str(flow_id), str(rsa.db_flows))) + if flow_id is not None: + if rsa.db_flows[flow_id]["op-mode"] == 0: + return 'No path found', 404 + t1 = time.time() * 1000.0 + elapsed = t1 - t0 + print("INFO: time elapsed = {} ms".format(elapsed)) + + return rsa.db_flows[flow_id], 200 + else: + if len(rsa.optical_bands[optical_band_id]["flows"]) == 0: + return 'No path found', 404 + else: + t1 = time.time() * 1000.0 + elapsed = t1 - t0 + LOGGER.info("INFO: time elapsed = {} ms".format(elapsed)) + + return rsa.optical_bands[optical_band_id], 200 + else: + return "Error", 404 + +@optical.route('/DelFlexLightpath/////') +@optical.response(200, 'Success') +@optical.response(404, 'Error, not found') +class DelLightpath(Resource): + @staticmethod + def delete(flow_id, src, dst, bitrate, o_band_id): + if flow_id in rsa.db_flows.keys(): + flow = rsa.db_flows[flow_id] + bidir = flow["bidir"] + match1 = flow["src"] == src and flow["dst"] == dst and flow["bitrate"] == bitrate + if bidir: + match2 = flow["src"] == dst and flow["dst"] == src and flow["bitrate"] == bitrate + if match1 or match2: + ob_id = flow["parent_opt_band"] + rsa.del_flow(flow, ob_id) + rsa.db_flows[flow_id]["is_active"] = False + rsa.optical_bands[ob_id]["served_lightpaths"].remove(flow_id) + if rsa.optical_bands[ob_id]["reverse_optical_band_id"] != 0: + rev_ob_id = rsa.optical_bands[ob_id]["reverse_optical_band_id"] + rsa.optical_bands[rev_ob_id]["served_lightpaths"].remove(flow_id) + + if debug: + LOGGER.info(links_dict) + return "flow {} deleted".format(flow_id), 200 + else: + return "flow {} not matching".format(flow_id), 404 + else: + if match1: + ob_id = flow["parent_opt_band"] + rsa.del_flow(flow, ob_id) + rsa.db_flows[flow_id]["is_active"] = False + rsa.optical_bands[ob_id]["served_lightpaths"].remove(flow_id) + if debug: + LOGGER.info(links_dict) + return "flow {} deleted".format(flow_id), 200 + else: + return "flow {} not matching".format(flow_id), 404 + else: + return "flow id {} does not exist".format(flow_id), 404 + + + +@optical.route('/DelLightpath////') +@optical.response(200, 'Success') +@optical.response(404, 'Error, not found') +class DelLightpath(Resource): + @staticmethod + def delete(flow_id, src, dst, bitrate): + if flow_id in rsa.db_flows.keys(): + flow = rsa.db_flows[flow_id] + match1 = flow["src"] == src and flow["dst"] == dst and flow["bitrate"] == bitrate + match2 = flow["src"] == dst and flow["dst"] == src and flow["bitrate"] == bitrate + if match1 or match2: + rsa.del_flow(flow) + rsa.db_flows[flow_id]["is_active"] = False + if debug: + LOGGER.info(links_dict) + return "flow {} deleted".format(flow_id), 200 + else: + return "flow {} not matching".format(flow_id), 404 + else: + return "flow id {} does not exist".format(flow_id), 404 + + +@optical.route('/GetLightpaths') +@optical.response(200, 'Success') +@optical.response(404, 'Error, not found') +class GetFlows(Resource): + @staticmethod + def get(): + try: + if debug: + LOGGER.info(rsa.db_flows) + return rsa.db_flows, 200 + except: + return "Error", 404 + +@optical.route('/GetOpticalBands') +@optical.response(200, 'Success') +@optical.response(404, 'Error, not found') +class GetBands(Resource): + @staticmethod + def get(): + print("Getting ") + LOGGER.info("Getting") + try: + if debug: + LOGGER.info(rsa.optical_bands) + return rsa.optical_bands, 200 + except: + return "Error", 404 + + +@optical.route('/GetOpticalBand/') +@optical.response(200, 'Success') +@optical.response(404, 'Error, not found') +class GetBand(Resource): + @staticmethod + def get(ob_id): + for ob_idx in rsa.optical_bands.keys(): + if str(ob_idx) == str(ob_id): + if debug: + LOGGER.info(rsa.optical_bands[ob_id]) + return rsa.optical_bands[ob_idx], 200 + return {}, 404 + + +@optical.route('/GetLinks') +@optical.response(200, 'Success') +@optical.response(404, 'Error, not found') +class GetFlows(Resource): + @staticmethod + def get(): + global links_dict + try: + if debug: + LOGGER.info(links_dict) + return links_dict, 200 + except: + return "Error", 404 + + +if __name__ == '__main__': + + + # Start metrics server + + LOGGER.info('Starting...') + + + + nodes_dict, links_dict = readTopologyData(nodes_json, topology_json) + + #topologies, links = getTopology() + #print("topologies{} and devices {}".format(topologies,links)) + rsa = RSA(nodes_dict, links_dict) + + app.run(host='0.0.0.0', port=10060, debug=True) diff --git a/src/opticalcontroller/README.md b/src/opticalcontroller/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5fd94c59e51cbd78dd76a7db0f24aaaec4ebd9db --- /dev/null +++ b/src/opticalcontroller/README.md @@ -0,0 +1,17 @@ +# optical-controller +This a framework to implement the optical controller for the RMSA algorithm. +#create a venv +python -m venv venv + +in linux +source venv/Scripts/activate + +in windows +venv\Scripts\activate + +pip install -r requirements_opt.txt + +python OpticalController.py +![Reference Architecture](images/topo.png) + + diff --git a/src/opticalcontroller/RSA.py b/src/opticalcontroller/RSA.py new file mode 100644 index 0000000000000000000000000000000000000000..b15357c98242ad6b18d4068b6f0aa1cb08852d7a --- /dev/null +++ b/src/opticalcontroller/RSA.py @@ -0,0 +1,931 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 dijsktra +from tools import * +from variables import * + + +class RSA(): + def __init__(self, nodes, links): + self.nodes_dict = nodes + self.links_dict = links + self.g = None + + self.flow_id = 0 + self.opt_band_id = 0 + self.db_flows = {} + self.initGraph() + self.c_slot_number = 0 + self.l_slot_number = 0 + self.s_slot_number = 0 + self.optical_bands = {} + + def init_link_slots(self, testing): + if not testing: + for l in self.links_dict["links"]: + for fib in l["optical_link"]["details"]["fibers"]: + #fib = self.links_dict[l]["fibers"][f] + if len(fib["c_slots"]) > 0: + fib["c_slots"] = list(range(0, Nc)) + if len(fib["l_slots"]) > 0: + fib["l_slots"] = list(range(0, Nl)) + if len(fib["s_slots"]) > 0: + fib["s_slots"] = list(range(0, Ns)) + if debug: + print(fib) + for l1 in self.links_dict["links"]: + + for fib1 in l1["optical_link"]["details"]["fibers"]: + #fib1 = self.links_dict[l1]["details"]["fibers"][f1] + + self.c_slot_number = len(fib1["c_slots"]) + self.l_slot_number = len(fib1["l_slots"]) + self.s_slot_number = len(fib1["s_slots"]) + + break + break + return "{},{},{}".format(self.c_slot_number, self.l_slot_number, self.s_slot_number) + + def initGraph(self): + self.g = dijsktra.Graph() + for n in self.nodes_dict: + self.g.add_vertex(n) + for l in self.links_dict["links"]: + if debug: + print(l) + [s, d] = l["optical_link"]["name"].split('-') + ps = l["optical_link"]["details"]["source"] + pd = l["optical_link"]["details"]["target"] + self.g.add_edge(s, d, ps, pd, 1) + + print("INFO: Graph initiated.") + if debug: + self.g.printGraph() + + def compute_path(self, src, dst): + path = dijsktra.shortest_path(self.g, self.g.get_vertex(src), self.g.get_vertex(dst)) + print("INFO: Path from {} to {} with distance: {}".format(src, dst, self.g.get_vertex(dst).get_distance())) + if debug: + print(path) + links = [] + for i in range(0, len(path) - 1): + s = path[i] + if debug: + print(s) + if i < len(path) - 1: + d = path[i + 1] + link_id = "{}-{}".format(s, d) + if debug: + #print(link_id, self.links_dict[link_id]) + print(link_id, self.get_link_by_name(link_id)) + + links.append(link_id) + self.g.reset_graph() + return links, path + + def get_slots(self, links, slots, optical_band_id = None): + + if isinstance(slots, int): + val_c = slots + val_s = slots + val_l = slots + else: + val_c = self.c_slot_number + val_l = self.l_slot_number + val_s = self.s_slot_number + + c_sts = [] + l_sts = [] + s_sts = [] + c_slots = {} + l_slots = {} + s_slots = {} + add = "" + drop = "" + src_1, dst_1 = links[0].split('-') + src_2, dst_2 = links[-1].split('-') + if self.nodes_dict[src_1]["type"] == "OC-TP": + add = links[0] + if self.nodes_dict[dst_2]["type"] == "OC-TP": + drop = links[-1] + + for l in links: + c_slots[l] = [] + l_slots[l] = [] + s_slots[l] = [] + found = 0 + for link in self.links_dict["links"]: + if link["optical_link"]["name"] == l: + #for f in self.links_dict[l]['fibers'].keys(): + for fib in link["optical_link"]["details"]["fibers"]: + if l == add: + if 'used' in fib: + if fib["used"]: + #if debug: + print("WARNING!!!: link {}, fiber {} is already in use".format(l, fib["ID"])) + continue + if l == drop: + if 'used' in fib: + if fib["used"]: + #if debug: + print("WARNING!!!: link {}, fiber {} is already in use".format(l, fib["ID"])) + continue + if len(fib["c_slots"]) > 0: + c_slots[l] = combine(c_slots[l], consecutives(fib["c_slots"], val_c)) + if len(fib["l_slots"]) > 0: + l_slots[l] = combine(l_slots[l], consecutives(fib["l_slots"], val_l)) + if len(fib["s_slots"]) > 0: + s_slots[l] = combine(s_slots[l], consecutives(fib["s_slots"], val_s)) + if debug: + print(l, c_slots[l]) + found = 1 + if found == 0: + return [], [], [] + + keys = list(c_slots.keys()) + if debug: + print(len(keys)) + if debug: + print(keys[0]) + # intersection among the slots over all links + if len(keys) == 1: + c_sts = c_slots[keys[0]] + l_sts = l_slots[keys[0]] + s_sts = s_slots[keys[0]] + else: + for i in range(1, len(keys)): + if debug: + print(keys[i]) + # set a for the intersection + if i == 1: + a_c = c_slots[keys[i - 1]] + a_l = l_slots[keys[i - 1]] + a_s = s_slots[keys[i - 1]] + else: + a_c = c_sts + a_l = l_sts + a_s = s_sts + # set b for the intersection + b_c = c_slots[keys[i]] + b_l = l_slots[keys[i]] + b_s = s_slots[keys[i]] + + c_sts = common_slots(a_c, b_c) + l_sts = common_slots(a_l, b_l) + s_sts = common_slots(a_s, b_s) + if optical_band_id is not None: + if "c_slots" in self.optical_bands[optical_band_id].keys(): + if len(self.optical_bands[optical_band_id]["c_slots"]) > 0: + a_c = c_sts + b_c = self.optical_bands[optical_band_id]["c_slots"] + c_sts = common_slots(a_c, b_c) + else: + c_sts = [] + else: + c_sts = [] + if "l_slots" in self.optical_bands[optical_band_id].keys(): + if len(self.optical_bands[optical_band_id]["l_slots"]) > 0: + a_l = l_sts + b_l = self.optical_bands[optical_band_id]["l_slots"] + l_sts = common_slots(a_l, b_l) + else: + l_sts = [] + else: + l_sts = [] + if "s_slots" in self.optical_bands[optical_band_id].keys(): + if len(self.optical_bands[optical_band_id]["s_slots"]) > 0: + a_s = s_sts + b_s = self.optical_bands[optical_band_id]["s_slots"] + s_sts = common_slots(a_s, b_s) + else: + s_sts = [] + else: + s_sts = [] + + return c_sts, l_sts, s_sts + + def update_link(self, fib, slots, band): + for i in slots: + fib[band].remove(i) + if 'used' in fib: + fib['used'] = True + + def update_optical_band(self, optical_band_id, slots, band): + for i in slots: + self.optical_bands[optical_band_id][band].remove(i) + + def restore_link(self, fib, slots, band): + for i in slots: + fib[band].append(int(i)) + if 'used' in fib: + fib['used'] = False + fib[band].sort() + + def restore_optical_band(self, optical_band_id, slots, band): + for i in slots: + self.optical_bands[optical_band_id][band].append(int(i)) + self.optical_bands[optical_band_id][band].sort() + + def del_flow(self, flow, o_b_id = None): + flows = flow["flows"] + band = flow["band_type"] + slots = flow["slots"] + fiber_f = flow["fiber_forward"] + fiber_b = flow["fiber_backward"] + op = flow["op-mode"] + n_slots = flow["n_slots"] + path = flow["path"] + links = flow["links"] + bidir = flow["bidir"] + + for l in fiber_f.keys(): + if debug: + print(l) + print(fiber_f[l]) + #link = self.links_dict[l] + #f = fiber_f[l] + #fib = link['fibers'][f] + fib = self.get_fiber_details(l, fiber_f[l]) + if not list_in_list(slots, fib[band]): + self.restore_link(fib, slots, band) + if debug: + print(fib[band]) + if o_b_id is not None: + self.restore_optical_band(o_b_id, slots, band) + if bidir: + for rl in fiber_b.keys(): + if debug: + print(rl) + print(fiber_b[rl]) + #rlink = self.links_dict[rl] + #rf = fiber_b[rl] + #rfib = rlink['fibers'][rf] + rfib = self.get_fiber_details(rl, fiber_b[rl]) + if not list_in_list(slots, rfib[band]): + self.restore_link(rfib, slots, band) + if debug: + print(rfib[band]) + #changed according to TFS development + #if o_b_id is not None: + # rev_o_band_id = self.optical_bands[o_b_id]["reverse_optical_band_id"] + # self.restore_optical_band(rev_o_band_id, slots, band) + return True + + def get_fibers_forward(self, links, slots, band): + fiber_list = {} + add = links[0] + drop = links[-1] + print(links) + ''' + for link in self.links_dict["links"]: + if link["optical_link"]["name"] == l: + # for f in self.links_dict[l]['fibers'].keys(): + for fib in link["optical_link"]["details"]["fibers"]: + + ''' + for l in links: + for link in self.links_dict["links"]: + if link["optical_link"]["name"] == l: + for fib in link["optical_link"]["details"]["fibers"]: + #for f in self.links_dict[l]['fibers'].keys(): + #for fib in l["optical_link"]["details"]["fibers"]: + #fib = self.links_dict[l]['fibers'][f] + if l == add: + if 'used' in fib: + if fib["used"]: + if debug: + print("link {}, fiber {} is already in use".format(l, fib["ID"])) + continue + if l == drop: + if 'used' in fib: + if fib["used"]: + if debug: + print("link {}, fiber {} is already in use".format(l, fib["ID"])) + continue + if list_in_list(slots, fib[band]): + fiber_list[l] = fib["ID"] + self.update_link(fib, slots, band) + break + print("INFO: Path forward computation completed") + return fiber_list + + def get_link_by_name (self, key): + result = None + for link in self.links_dict["links"]: + if link["optical_link"]["name"] == key: + if debug: + print(link) + result = link + break + return result + + def get_fiber_details(self, link_key, fiber_id): + for link in self.links_dict["links"]: + if link["optical_link"]["name"] == link_key: + if debug: + print(link) + for fib in link["optical_link"]["details"]["fibers"]: + if fib["ID"] == fiber_id: + return fib + return None + + + def get_fibers_backward(self, links, fibers, slots, band): + fiber_list = {} + #r_drop = reverse_link(links[0]) + #r_add = reverse_link(links[-1]) + for l in fibers.keys(): + fib = self.get_fiber_details(l, fibers[l]) + ''' + link = self.get_link_by_name(l) + #port = self.links_dict[l]["fibers"][fibers[l]]["src_port"] + for fib in link["optical_link"]["details"]["fibers"]: + if fib["ID"] == fibers[l]: + ''' + port = fib["src_port"] + r_l = reverse_link(l) + r_link = self.get_link_by_name(r_l) + #for f in r_link["fibers"].keys(): + for r_fib in r_link["optical_link"]["details"]["fibers"]: + if r_fib["remote_peer_port"] == port: + if list_in_list(slots, r_fib[band]): + fiber_list[r_l] = r_fib["ID"] + self.update_link(r_fib, slots, band) + print("INFO: Path backward computation completed") + return fiber_list + + def select_slots_and_ports(self, links, n_slots, c, l, s, bidir): + if debug: + print(self.links_dict) + band, slots = slot_selection(c, l, s, n_slots, self.c_slot_number, self.l_slot_number, self.s_slot_number) + if band is None: + print("No slots available in the three bands") + return None, None, None + if debug: + print(band, slots) + fibers_f = self.get_fibers_forward(links, slots, band) + + fibers_b = [] + if bidir: + fibers_b = self.get_fibers_backward(links, fibers_f, slots, band) + if debug: + print("forward") + print(fibers_f) + print("backward") + print(fibers_b) + add = links[0] + drop = links[-1] + inport = "0" + outport = "0" + r_inport = "0" + r_outport = "0" + t_flows = {} + #if len(links) == 1: + + for lx in fibers_f: + if lx == add: + inport = "0" + r_outport = "0" + if lx == drop: + outport = "0" + r_inport = "0" + f = fibers_f[lx] + src, dst = lx.split("-") + fibx = self.get_fiber_details(lx, f) + #outport = self.links_dict[lx]['fibers'][f]["src_port"] + outport = fibx["src_port"] + + t_flows[src] = {} + t_flows[src]["f"] = {} + t_flows[src]["b"] = {} + t_flows[src]["f"] = {"in": inport, "out": outport} + + if bidir: + #r_inport = self.links_dict[lx]['fibers'][f]["local_peer_port"] + r_inport = fibx["local_peer_port"] + t_flows[src]["b"] = {"in": r_inport, "out": r_outport} + + #inport = self.links_dict[lx]['fibers'][f]["dst_port"] + inport = fibx["dst_port"] + if bidir: + #r_outport = self.links_dict[lx]['fibers'][f]["remote_peer_port"] + r_outport = fibx["remote_peer_port"] + t_flows[dst] = {} + t_flows[dst]["f"] = {} + t_flows[dst]["b"] = {} + t_flows[dst]["f"] = {"in": inport, "out": "0"} + if bidir: + t_flows[dst]["b"] = {"in": "0", "out": r_outport} + + if debug: + print(self.links_dict) + + if debug: + print(t_flows) + print("INFO: Flow matrix computed") + + return t_flows, band, slots, fibers_f, fibers_b + + def select_slots_and_ports_fs(self, links, n_slots, c, l, s, bidir, o_band_id): + if debug: + print(self.links_dict) + band, slots = slot_selection(c, l, s, n_slots, self.c_slot_number, self.l_slot_number, self.s_slot_number) + if band is None: + print("No slots available in the three bands") + return None, None, None, None, None + if debug: + print(band, slots) + fibers_f = self.get_fibers_forward(links, slots, band) + self.update_optical_band(o_band_id, slots, band) + fibers_b = [] + if bidir: + fibers_b = self.get_fibers_backward(links, fibers_f, slots, band) + ''' + + rev_o_band_id = self.optical_bands[o_band_id]["reverse_optical_band_id"] + self.update_optical_band(rev_o_band_id, slots, band) + ''' + if debug: + print("forward") + print(fibers_f) + if bidir: + print("backward") + print(fibers_b) + add = links[0] + drop = links[-1] + port_0 = "0" + + t_flows = {} + + #flows_add_side + f = fibers_f[add] + src, dst = add.split("-") + fibx = self.get_fiber_details(add, f) + #outport = self.links_dict[add]['fibers'][f]["src_port"] + outport = fibx["src_port"] + #T1 rules + t_flows[src] = {} + t_flows[src]["f"] = {} + t_flows[src]["b"] = {} + t_flows[src]["f"] = {"in": port_0, "out": outport} + if bidir: + #r_inport = self.links_dict[add]['fibers'][f]["local_peer_port"] + r_inport = fibx["local_peer_port"] + t_flows[src]["b"] = {"in": r_inport, "out": port_0} + + #R1 rules + t_flows[dst] = {} + t_flows[dst]["f"] = {} + t_flows[dst]["b"] = {} + #inport = self.links_dict[add]['fibers'][f]["dst_port"] + inport = fibx["dst_port"] + opt_band_src_port = self.optical_bands[o_band_id]["src_port"] + t_flows[dst]["f"] = {"in": inport, "out": opt_band_src_port} + #to modify to peer ports + if bidir: + #r_inport = self.links_dict[add]['fibers'][f]["local_peer_port"] + r_inport = fibx["local_peer_port"] + t_flows[src]["b"] = {"in": r_inport, "out": port_0} + if bidir: + rev_opt_band_dst_port = self.optical_bands[o_band_id]["rev_dst_port"] + #r_outport = self.links_dict[add]['fibers'][f]["remote_peer_port"] + r_outport = fibx["remote_peer_port"] + t_flows[dst]["b"] = {"in": rev_opt_band_dst_port, "out": r_outport} + + #flows_drop_side + # R2 rules + f = fibers_f[drop] + src, dst = drop.split("-") + fiby = self.get_fiber_details(drop, f) + #outport = self.links_dict[drop]['fibers'][f]["src_port"] + outport = fiby["src_port"] + + t_flows[src] = {} + t_flows[src]["f"] = {} + t_flows[src]["b"] = {} + opt_band_dst_port = self.optical_bands[o_band_id]["dst_port"] + t_flows[src]["f"] = {"in": opt_band_dst_port, "out": outport} + if bidir: + rev_opt_band_src_port = self.optical_bands[o_band_id]["rev_src_port"] + #r_inport = self.links_dict[drop]['fibers'][f]["local_peer_port"] + r_inport = fiby["local_peer_port"] + t_flows[src]["b"] = {"in": r_inport, "out": rev_opt_band_src_port} + t_flows[dst] = {} + t_flows[dst]["f"] = {} + t_flows[dst]["b"] = {} + #inport = self.links_dict[drop]['fibers'][f]["dst_port"] + inport = fiby["dst_port"] + t_flows[dst]["f"] = {"in": inport, "out": port_0} + if bidir: + #r_inport = self.links_dict[drop]['fibers'][f]["remote_peer_port"] + r_inport = fiby["remote_peer_port"] + t_flows[dst]["b"] = {"in": port_0, "out": r_inport} + + if debug: + print(self.links_dict) + + if debug: + print(t_flows) + print("INFO: Flow matrix computed for Flex Lightpath") + + return t_flows, band, slots, fibers_f, fibers_b + + def rsa_computation(self, src, dst, rate, bidir): + self.flow_id += 1 + self.db_flows[self.flow_id] = {} + self.db_flows[self.flow_id]["flow_id"] = self.flow_id + self.db_flows[self.flow_id]["src"] = src + self.db_flows[self.flow_id]["dst"] = dst + self.db_flows[self.flow_id]["bitrate"] = rate + self.db_flows[self.flow_id]["bidir"] = bidir + + links, path = self.compute_path(src, dst) + + if len(path) < 1: + self.null_values(self.flow_id) + return self.flow_id + op, num_slots = map_rate_to_slot(rate) + c_slots, l_slots, s_slots = self.get_slots(links, num_slots) + if debug: + print(c_slots) + print(l_slots) + print(s_slots) + if len(c_slots) > 0 or len(l_slots) > 0 or len(s_slots) > 0: + flow_list, band_range, slots, fiber_f, fiber_b = self.select_slots_and_ports(links, num_slots, c_slots, + l_slots, s_slots, bidir) + f0, band = freqency_converter(band_range, slots) + if debug: + print(f0, band) + print("INFO: RSA completed for normal wavelenght connection") + if flow_list is None: + self.null_values(self.flow_id) + return self.flow_id + slots_i = [] + for i in slots: + slots_i.append(int(i)) + # return links, path, flow_list, band_range, slots, fiber_f, fiber_b, op, num_slots, f0, band + # links, path, flows, bx, slots, fiber_f, fiber_b, op, n_slots, f0, band + self.db_flows[self.flow_id]["flows"] = flow_list + self.db_flows[self.flow_id]["band_type"] = band_range + self.db_flows[self.flow_id]["slots"] = slots_i + self.db_flows[self.flow_id]["fiber_forward"] = fiber_f + self.db_flows[self.flow_id]["fiber_backward"] = fiber_b + self.db_flows[self.flow_id]["op-mode"] = op + self.db_flows[self.flow_id]["n_slots"] = num_slots + self.db_flows[self.flow_id]["links"] = links + self.db_flows[self.flow_id]["path"] = path + self.db_flows[self.flow_id]["band"] = band + self.db_flows[self.flow_id]["freq"] = f0 + self.db_flows[self.flow_id]["is_active"] = True + return self.flow_id + + def null_values(self, flow_id): + self.db_flows[flow_id]["flows"] = {} + self.db_flows[flow_id]["band_type"] = "" + self.db_flows[flow_id]["slots"] = [] + self.db_flows[flow_id]["fiber_forward"] = [] + self.db_flows[flow_id]["fiber_backward"] = [] + self.db_flows[flow_id]["op-mode"] = 0 + self.db_flows[flow_id]["n_slots"] = 0 + self.db_flows[flow_id]["links"] = {} + self.db_flows[flow_id]["path"] = [] + self.db_flows[flow_id]["band"] = 0 + self.db_flows[flow_id]["freq"] = 0 + self.db_flows[flow_id]["is_active"] = False + + def null_values_ob(self, ob_id): + self.optical_bands[ob_id]["flows"] = {} + self.optical_bands[ob_id]["band_type"] = "" + #self.optical_bands[ob_id]["slots"] = [] + self.optical_bands[ob_id]["fiber_forward"] = [] + self.optical_bands[ob_id]["n_slots"] = 0 + self.optical_bands[ob_id]["links"] = {} + self.optical_bands[ob_id]["path"] = [] + self.optical_bands[ob_id]["band"] = 0 + self.optical_bands[ob_id]["freq"] = 0 + self.optical_bands[ob_id]["is_active"] = False + self.optical_bands[ob_id]["c_slots"] = [] + self.optical_bands[ob_id]["l_slots"] = [] + self.optical_bands[ob_id]["s_slots"] = [] + self.optical_bands[ob_id]["served_lightpaths"] = [] + self.optical_bands[ob_id]["reverse_optical_band_id"] = 0 + self.db_flows[self.flow_id]["parent_opt_band"] = 0 + self.db_flows[self.flow_id]["new_optical_band"] = 0 + + def create_optical_band(self, links, path, bidir, num_slots): + print("INFO: Creating optical-band of {} slots".format(num_slots)) + self.opt_band_id += 1 + forw_opt_band_id = self.opt_band_id + self.optical_bands[forw_opt_band_id] = {} + self.optical_bands[forw_opt_band_id]["optical_band_id"] = forw_opt_band_id + self.optical_bands[forw_opt_band_id]["bidir"] = bidir + ''' + back_opt_band_id = 0 + if bidir: + self.opt_band_id += 1 + back_opt_band_id = self.opt_band_id + self.optical_bands[back_opt_band_id] = {} + self.optical_bands[back_opt_band_id]["optical_band_id"] = back_opt_band_id + self.optical_bands[back_opt_band_id]["bidir"] = bidir + self.optical_bands[back_opt_band_id]["reverse_optical_band_id"] = forw_opt_band_id + self.optical_bands[forw_opt_band_id]["reverse_optical_band_id"] = back_opt_band_id + else: + self.optical_bands[forw_opt_band_id]["reverse_optical_band_id"] = 0 + ''' + op = 0 + temp_links = [] + #num_slots = "all" + if self.nodes_dict[path[0]]["type"] == "OC-TP": + add_link = links[0] + temp_links.append(add_link) + links.remove(add_link) + path.remove(path[0]) + self.optical_bands[forw_opt_band_id]["src"] = path[0] + ''' + if bidir: + self.optical_bands[back_opt_band_id]["dst"] = path[0] + ''' + if self.nodes_dict[path[-1]]["type"] == "OC-TP": + drop_link = links[-1] + temp_links.append(drop_link) + links.remove(drop_link) + path.remove(path[-1]) + self.optical_bands[forw_opt_band_id]["dst"] = path[-1] + ''' + if bidir: + self.optical_bands[back_opt_band_id]["src"] = path[-1] + ''' + + c_slots, l_slots, s_slots = self.get_slots(links, num_slots) + if debug: + print(c_slots) + print(l_slots) + print(s_slots) + if len(c_slots) > 0 or len(l_slots) > 0 or len(s_slots) > 0: + flow_list, band_range, slots, fiber_f, fiber_b = self.select_slots_and_ports(links, num_slots, c_slots, l_slots, s_slots, bidir) + f0, band = freqency_converter(band_range, slots) + print(flow_list, band_range, slots, fiber_f, fiber_b) + ''' + + flow_list_b = {} + rev_path = path.copy() + rev_path.reverse() + rev_links = reverse_links(links) + if bidir: + for dev_x in flow_list.keys(): + flow_list_b[dev_x] = {} + flow_list_b[dev_x]["f"] = flow_list[dev_x]["b"] + del flow_list[dev_x]["b"] + rev_path = path.copy() + ''' + if debug: + print(f0, band) + print("INFO: RSA completed for optical band") + if flow_list is None: + self.null_values(self.flow_id) + return self.flow_id, [] + slots_i = [] + for i in slots: + slots_i.append(int(i)) + + # return links, path, flow_list, band_range, slots, fiber_f, fiber_b, op, num_slots, f0, band + # links, path, flows, bx, slots, fiber_f, fiber_b, op, n_slots, f0, band + if len(flow_list) > 0: + src_port = flow_list[path[0]]['f']['out'] + dst_port = flow_list[path[-1]]['f']['in'] + print(flow_list) + if len(fiber_f.keys()) == 1: + link_x = list(fiber_f.keys())[0] + #fib_x = fiber_f[link_x] + #rev_dst_port = self.links_dict[link_x]['fibers'][fib_x]["local_peer_port"] + #rev_src_port = self.links_dict[link_x]['fibers'][fib_x]["remote_peer_port"] + fibx = self.get_fiber_details(link_x, fiber_f[link_x]) + rev_dst_port = fibx["local_peer_port"] + rev_src_port = fibx["remote_peer_port"] + else: + link_in = list(fiber_f.keys())[0] + link_out = list(fiber_f.keys())[-1] + fib_inx = self.get_fiber_details(link_in, fiber_f[link_in]) + fib_outx = self.get_fiber_details(link_out, fiber_f[link_out]) + rev_dst_port = fib_inx["local_peer_port"] + rev_src_port = fib_outx["remote_peer_port"] + + #fib_in = fiber_f[link_in] + #fib_out = fiber_f[link_out] + #rev_dst_port = self.links_dict[link_in]['fibers'][fib_in]["local_peer_port"] + #rev_src_port = self.links_dict[link_out]['fibers'][fib_out]["remote_peer_port"] + + self.optical_bands[forw_opt_band_id]["flows"] = flow_list + self.optical_bands[forw_opt_band_id]["band_type"] = band_range + self.optical_bands[forw_opt_band_id]["fiber_forward"] = fiber_f + self.optical_bands[forw_opt_band_id]["fiber_backward"] = fiber_b + self.optical_bands[forw_opt_band_id]["op-mode"] = op + self.optical_bands[forw_opt_band_id]["n_slots"] = num_slots + self.optical_bands[forw_opt_band_id]["links"] = links + self.optical_bands[forw_opt_band_id]["path"] = path + self.optical_bands[forw_opt_band_id]["band"] = band + self.optical_bands[forw_opt_band_id]["freq"] = f0 + self.optical_bands[forw_opt_band_id]["is_active"] = True + self.optical_bands[forw_opt_band_id]["src_port"] = src_port + self.optical_bands[forw_opt_band_id]["dst_port"] = dst_port + self.optical_bands[forw_opt_band_id]["rev_dst_port"] = rev_dst_port + self.optical_bands[forw_opt_band_id]["rev_src_port"] = rev_src_port + self.optical_bands[forw_opt_band_id][band_range] = slots_i + self.optical_bands[forw_opt_band_id]["served_lightpaths"] = [] + ''' + if bidir: + self.optical_bands[back_opt_band_id]["flows"] = flow_list_b + self.optical_bands[back_opt_band_id]["band_type"] = band_range + self.optical_bands[back_opt_band_id]["fiber_forward"] = fiber_b + # self.optical_bands[back_opt_band_id]["fiber_backward"] = fiber_b + self.optical_bands[back_opt_band_id]["op-mode"] = op + self.optical_bands[back_opt_band_id]["n_slots"] = num_slots + self.optical_bands[back_opt_band_id]["links"] = rev_links + self.optical_bands[back_opt_band_id]["path"] = rev_path + self.optical_bands[back_opt_band_id]["band"] = band + self.optical_bands[back_opt_band_id]["freq"] = f0 + self.optical_bands[back_opt_band_id]["is_active"] = True + self.optical_bands[back_opt_band_id]["src_port"] = rev_src_port + self.optical_bands[back_opt_band_id]["dst_port"] = rev_dst_port + self.optical_bands[back_opt_band_id][band_range] = slots_i.copy() + self.optical_bands[back_opt_band_id]["served_lightpaths"] = [] + ''' + + return forw_opt_band_id, temp_links + + def get_optical_bands(self, r_src, r_dst): + result = [] + for ob_id in self.optical_bands: + ob = self.optical_bands[ob_id] + if debug: + print(r_src, ob["src"]) + print(r_dst, ob["dst"]) + print(ob) + if ob["src"] == r_src and ob["dst"] == r_dst: + result.append(ob_id) + return result + + def rsa_fs_computation(self, src, dst, rate, bidir, band): + num_slots_ob = "full_band" + if band is not None: + num_slots_ob = map_band_to_slot(band) + print(band, num_slots_ob) + if self.nodes_dict[src]["type"] == "OC-ROADM" and self.nodes_dict[dst]["type"] == "OC-ROADM": + print("INFO: ROADM to ROADM connection") + links, path = self.compute_path(src, dst) + if len(path) < 1: + self.null_values_ob(self.opt_band_id) + return self.flow_id, [] + optical_band_id, temp_links = self.create_optical_band(links, path, bidir, num_slots_ob) + return None, optical_band_id + self.flow_id += 1 + self.db_flows[self.flow_id] = {} + self.db_flows[self.flow_id]["flow_id"] = self.flow_id + self.db_flows[self.flow_id]["src"] = src + self.db_flows[self.flow_id]["dst"] = dst + self.db_flows[self.flow_id]["bitrate"] = rate + self.db_flows[self.flow_id]["bidir"] = bidir + print("INFO: TP to TP connection") + if band is None: + temp_links2 = [] + temp_path = [] + src_links = get_links_from_node(self.links_dict, src) + dst_links = get_links_to_node(self.links_dict, dst) + if len(src_links.keys()) >= 1: + temp_links2.append(list(src_links.keys())[0]) + if len(dst_links.keys()) >= 1: + temp_links2.append(list(dst_links.keys())[0]) + + if len(temp_links2) == 2: + [t_src, roadm_src] = temp_links2[0].split('-') + [roadm_dst, t_dst] = temp_links2[1].split('-') + temp_path.append(t_src) + temp_path.append(roadm_src) + temp_path.append(roadm_dst) + temp_path.append(t_dst) + existing_ob = self.get_optical_bands(roadm_src, roadm_dst) + + + if len(existing_ob) > 0: + print("INFO: Evaluating existing OB {}".format(existing_ob)) + #first checking in existing OB + ob_found = 0 + for ob_id in existing_ob: + op, num_slots = map_rate_to_slot(rate) + if debug: + print(temp_links2) + c_slots, l_slots, s_slots = self.get_slots(temp_links2, num_slots, ob_id) + if debug: + print(c_slots) + print(l_slots) + print(s_slots) + if len(c_slots) >= num_slots or len(l_slots) >= num_slots or len(s_slots) >= num_slots: + flow_list, band_range, slots, fiber_f, fiber_b = self.select_slots_and_ports_fs(temp_links2, num_slots, + c_slots, + l_slots, s_slots, bidir, + ob_id) + f0, band = freqency_converter(band_range, slots) + if debug: + print(f0, band) + print("INFO: RSA completed for Flex Lightpath with OB already in place") + if flow_list is None: + self.null_values(self.flow_id) + continue + slots_i = [] + for i in slots: + slots_i.append(int(i)) + # return links, path, flow_list, band_range, slots, fiber_f, fiber_b, op, num_slots, f0, band + # links, path, flows, bx, slots, fiber_f, fiber_b, op, n_slots, f0, band + self.db_flows[self.flow_id]["flows"] = flow_list + self.db_flows[self.flow_id]["band_type"] = band_range + self.db_flows[self.flow_id]["slots"] = slots_i + self.db_flows[self.flow_id]["fiber_forward"] = fiber_f + self.db_flows[self.flow_id]["fiber_backward"] = fiber_b + self.db_flows[self.flow_id]["op-mode"] = op + self.db_flows[self.flow_id]["n_slots"] = num_slots + self.db_flows[self.flow_id]["links"] = temp_links2 + self.db_flows[self.flow_id]["path"] = temp_path + self.db_flows[self.flow_id]["band"] = band + self.db_flows[self.flow_id]["freq"] = f0 + self.db_flows[self.flow_id]["is_active"] = True + self.db_flows[self.flow_id]["parent_opt_band"] = ob_id + self.db_flows[self.flow_id]["new_optical_band"] = 0 + self.optical_bands[ob_id]["served_lightpaths"].append(self.flow_id) + ''' + if bidir: + rev_ob_id = self.optical_bands[ob_id]["reverse_optical_band_id"] + self.optical_bands[rev_ob_id]["served_lightpaths"].append(self.flow_id) + ''' + return self.flow_id, ob_id + else: + print("not enough slots") + if band is None: + print("INFO: Not existing optical-band meeting the requirements") + else: + print("INFO: optical-band width specified") + #if no OB I create a new one + links, path = self.compute_path(src, dst) + optical_band_id, temp_links = self.create_optical_band(links, path, bidir, num_slots_ob) + op, num_slots = map_rate_to_slot(rate) + # self.flow_id += 1 + # self.db_flows[self.flow_id] = {} + # self.db_flows[self.flow_id]["flow_id"] = self.flow_id + # self.db_flows[self.flow_id]["src"] = src + # self.db_flows[self.flow_id]["dst"] = dst + # self.db_flows[self.flow_id]["bitrate"] = rate + # self.db_flows[self.flow_id]["bidir"] = bidir + + if debug: + print(temp_links) + c_slots, l_slots, s_slots = self.get_slots(temp_links, num_slots, optical_band_id) + if debug: + print(c_slots) + print(l_slots) + print(s_slots) + if len(c_slots) > 0 or len(l_slots) > 0 or len(s_slots) > 0: + flow_list, band_range, slots, fiber_f, fiber_b = self.select_slots_and_ports_fs(temp_links, num_slots, c_slots, + l_slots, s_slots, bidir, optical_band_id) + f0, band = freqency_converter(band_range, slots) + if debug: + print(f0, band) + print("INFO: RSA completed for FLex Lightpath with new OB") + if flow_list is None: + self.null_values(self.flow_id) + return self.flow_id, optical_band_id + slots_i = [] + for i in slots: + slots_i.append(int(i)) + + self.db_flows[self.flow_id]["flows"] = flow_list + self.db_flows[self.flow_id]["band_type"] = band_range + self.db_flows[self.flow_id]["slots"] = slots_i + self.db_flows[self.flow_id]["fiber_forward"] = fiber_f + self.db_flows[self.flow_id]["fiber_backward"] = fiber_b + self.db_flows[self.flow_id]["op-mode"] = op + self.db_flows[self.flow_id]["n_slots"] = num_slots + self.db_flows[self.flow_id]["links"] = temp_links + self.db_flows[self.flow_id]["path"] = path + self.db_flows[self.flow_id]["band"] = band + self.db_flows[self.flow_id]["freq"] = f0 + self.db_flows[self.flow_id]["is_active"] = True + self.db_flows[self.flow_id]["parent_opt_band"] = optical_band_id + self.db_flows[self.flow_id]["new_optical_band"] = 1 + self.optical_bands[optical_band_id]["served_lightpaths"].append(self.flow_id) + ''' + if bidir: + rev_ob_id = self.optical_bands[optical_band_id]["reverse_optical_band_id"] + self.optical_bands[rev_ob_id]["served_lightpaths"].append(self.flow_id) + ''' + return self.flow_id, optical_band_id diff --git a/src/opticalcontroller/__init__.py b/src/opticalcontroller/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfc943b68af13a11e562abbc8680ade71db8f02 --- /dev/null +++ b/src/opticalcontroller/__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/opticalcontroller/dijsktra.py b/src/opticalcontroller/dijsktra.py new file mode 100644 index 0000000000000000000000000000000000000000..058d59e75cbc09c1b18ab4b406f08186e106609d --- /dev/null +++ b/src/opticalcontroller/dijsktra.py @@ -0,0 +1,240 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# TODO: migrate to NetworkX: +# https://networkx.org/documentation/stable/index.html +# https://networkx.org/documentation/stable/reference/algorithms/shortest_paths.html + +import sys + +class Vertex: + def __init__(self, node): + self.id = node + self.adjacent = {} + # Set distance to infinity for all nodes + self.distance = float("inf") + # Mark all nodes unvisited + self.visited = False + # Predecessor + self.previous = None + + # heapq compara gli item nella coda usando <= per vedere ci sono duplciati: + # se ho una coda di tuple, + # compara il primo elemento della prima tupla nella coda con il primo elemento della seconda tupla nella coda + # se sono diversi si ferma, se sono uguali continua + # la tupla nel caso in esame è: (v.get_distance(),v) + # se due nodi hanno stessa distanza, heapq procede a comparare v: Vertex(). + # Va quindi definita una politica per confrontare i Vertex + def __lt__(self, other): + if self.id < other.id: + return True + else: + return False + + def __le__(self, other): + if self.id <= other.id: + return True + else: + return False + + def add_neighbor(self, neighbor, port): + self.adjacent[neighbor] = port + + def del_neighbor(self, neighbor): + self.adjacent.pop(neighbor) + + def get_connections(self): + return self.adjacent.keys() + + def get_id(self): + return self.id + + def get_port(self, neighbor): + return self.adjacent[neighbor][0] + + def get_weight(self, neighbor): + return self.adjacent[neighbor][1] + + def set_distance(self, dist): + self.distance = dist + + def get_distance(self): + return self.distance + + def set_previous(self, prev): + self.previous = prev + + def set_visited(self): + self.visited = True + + def reset_vertex(self): + self.visited = False + self.previous = None + self.distance = float("inf") + + def __str__(self): + return str(self.id) + ' adjacent: ' + str([x.id for x in self.adjacent]) + +class Graph: + def __init__(self): + self.vert_dict = {} + self.num_vertices = 0 + + def __iter__(self): + return iter(self.vert_dict.values()) + + def reset_graph(self): + for n in self.vert_dict: + self.get_vertex(n).reset_vertex() + + def printGraph(self): + for v in self: + for w in v.get_connections(): + vid = v.get_id() + wid = w.get_id() + print ('( %s , %s, %s, %s, %s, %s)' % ( vid, wid, v.get_port(w), w.get_port(v), v.get_weight(w), w.get_weight(v))) + + def add_vertex(self, node): + self.num_vertices = self.num_vertices + 1 + new_vertex = Vertex(node) + self.vert_dict[node] = new_vertex + return new_vertex + + def del_Vertex(self, node): + self.vert_dict.pop(node) + + def get_vertex(self, n): + if n in self.vert_dict: + return self.vert_dict[n] + else: + return None + + def add_edge(self, frm, to, port_frm, port_to,w): + if frm not in self.vert_dict: + self.add_vertex(frm) + if to not in self.vert_dict: + self.add_vertex(to) + + self.vert_dict[frm].add_neighbor(self.vert_dict[to], [port_frm, w]) + self.vert_dict[to].add_neighbor(self.vert_dict[frm], [port_to, w]) + + def del_edge(self, frm, to, cost = 0): + self.vert_dict[frm].del_neighbor(self.vert_dict[to]) + self.vert_dict[to].del_neighbor(self.vert_dict[frm]) + + def get_vertices(self): + return self.vert_dict.keys() + + def set_previous(self, current): + self.previous = current + + def get_previous(self, current): + return self.previous + +def shortest(v, path): + if v.previous: + path.append(v.previous.get_id()) + shortest(v.previous, path) + return + +import heapq + +def dijkstra(aGraph, start): + """print ('''Dijkstra's shortest path''')""" + # Set the distance for the start node to zero + start.set_distance(0) + + # Put tuple pair into the priority queue + unvisited_queue = [(v.get_distance(),v) for v in aGraph] + #priority queue->costruisce un albero in cui ogni nodo parent ha ha un valore <= di ogni child + #heappop prende il valore più piccolo, nel caso di dikstra, il nodo più vicino + heapq.heapify(unvisited_queue) + + while len(unvisited_queue): + # Pops a vertex with the smallest distance + uv = heapq.heappop(unvisited_queue) + current = uv[1] + current.set_visited() + + #for next in v.adjacent: + for next in current.adjacent: + # if visited, skip + if next.visited: + continue + new_dist = current.get_distance() + current.get_weight(next) + + if new_dist < next.get_distance(): + next.set_distance(new_dist) + next.set_previous(current) + """print ('updated : current = %s next = %s new_dist = %s' \ + %(current.get_id(), next.get_id(), next.get_distance()))""" + else: + """print ('not updated : current = %s next = %s new_dist = %s' \ + %(current.get_id(), next.get_id(), next.get_distance()))""" + + # Rebuild heap + # 1. Pop every item + while len(unvisited_queue): + heapq.heappop(unvisited_queue) + # 2. Put all vertices not visited into the queue + unvisited_queue = [(v.get_distance(),v) for v in aGraph if not v.visited] + heapq.heapify(unvisited_queue) + +def shortest_path(graph, src, dst): + dijkstra(graph, src) + target = dst + path = [target.get_id()] + shortest(target, path) + return path[::-1] + +if __name__ == '__main__': + + print("Testing Algo") + g = Graph() + + g.add_vertex('a') + g.add_vertex('b') + g.add_vertex('c') + g.add_vertex('d') + g.add_vertex('e') + g.add_vertex('f') + + g.add_edge('a', 'b', 7) + g.add_edge('a', 'c', 9) + g.add_edge('a', 'f', 14) + g.add_edge('b', 'c', 10) + g.add_edge('b', 'd', 15) + g.add_edge('c', 'd', 11) + g.add_edge('c', 'f', 2) + g.add_edge('d', 'e', 6) + g.add_edge('e', 'f', 9) + + + """print ('Graph data:') + for v in g: + for w in v.get_connections(): + vid = v.get_id() + wid = w.get_id() + print ('( %s , %s, %3d)' % ( vid, wid, v.get_weight(w))) + + + dijkstra(g, g.get_vertex('a')) + + target = g.get_vertex('e') + path = [target.get_id()] + shortest(target, path) + print ('The shortest path : %s' %(path[::-1]))""" + + p = shortest_path(g, g.get_vertex('a'), g.get_vertex('e')) + print(p) diff --git a/src/opticalcontroller/images/topo.png b/src/opticalcontroller/images/topo.png new file mode 100644 index 0000000000000000000000000000000000000000..216e1360b3caecd68285ca8b69fd498049dcbf79 Binary files /dev/null and b/src/opticalcontroller/images/topo.png differ diff --git a/src/opticalcontroller/json_files/nodes.json b/src/opticalcontroller/json_files/nodes.json new file mode 100644 index 0000000000000000000000000000000000000000..60f017c19d7c7a578c0ddfc2225cab742deb0026 --- /dev/null +++ b/src/opticalcontroller/json_files/nodes.json @@ -0,0 +1,39 @@ +{ + "R1":{ + "id":0, + "ip":"10.30.2.207", + "port":"50001", + "type":"OC-ROADM", + "driver": "OpticalOC" + }, + + "R2":{ + "id":1, + "ip":"10.30.2.208", + "port":"50001", + "type":"OC-ROADM", + "driver": "OpticalOC" + }, + + "R3":{ + "id":2, + "ip":"10.30.2.209", + "port":"50001", + "type":"OC-ROADM", + "driver": "OpticalOC" + }, + "T1":{ + "id":3, + "ip":"10.30.2.210", + "port":"50001", + "type":"OC-TP", + "driver": "OpticalOC" + }, + "T2":{ + "id":4, + "ip":"10.30.2.211", + "port":"50001", + "type":"OC-TP", + "driver": "OpticalOC" + } +} diff --git a/src/opticalcontroller/json_files/optical_TFSworking.json b/src/opticalcontroller/json_files/optical_TFSworking.json new file mode 100644 index 0000000000000000000000000000000000000000..ff1841eeea9df1e73bcfb25d07f19d64554f11e1 --- /dev/null +++ b/src/opticalcontroller/json_files/optical_TFSworking.json @@ -0,0 +1,486 @@ +{ + "R1-R2": { + "length": 80, + "source": "d1", + "target": "d1", + "fibers": { + "d1-1": { + "length": 80, + "src_port": "3", + "dst_port": "14", + "local_peer_port": "13", + "remote_peer_port": "4", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R2-R1": { + "length": 80, + "source": "d1", + "target": "d1", + "fibers": { + "d1-1": { + "length": 80, + "src_port": "4", + "dst_port": "13", + "local_peer_port": "14", + "remote_peer_port": "3", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "T1-R1": { + "length": 0, + "source": "muxT", + "target": "srgR", + "fibers": { + "M1": { + "length": 0, + "src_port": "1", + "dst_port": "12", + "local_peer_port": "1", + "remote_peer_port": "2", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R1-T1": { + "length": 0, + "source": "srgT", + "target": "muxR", + "fibers": { + "S1": { + "length": 0, + "src_port": "2", + "dst_port": "1", + "local_peer_port": "12", + "remote_peer_port": "1", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "T2-R2": { + "length": 0, + "source": "muxT", + "target": "srgR", + "fibers": { + "M1": { + "length": 0, + "src_port": "6", + "dst_port": "15", + "local_peer_port": "6", + "remote_peer_port": "5", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R2-T2": { + "length": 0, + "source": "srgT", + "target": "muxR", + "fibers": { + "S1": { + "length": 0, + "src_port": "5", + "dst_port": "6", + "local_peer_port": "15", + "remote_peer_port": "6", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + } +} diff --git a/src/opticalcontroller/json_files/optical_topoTFS.json b/src/opticalcontroller/json_files/optical_topoTFS.json new file mode 100644 index 0000000000000000000000000000000000000000..7dea474cd676b7c699cffc1c180e14598b987473 --- /dev/null +++ b/src/opticalcontroller/json_files/optical_topoTFS.json @@ -0,0 +1,1836 @@ +{ + "R1-R2": { + "length": 80, + "source": "d1", + "target": "d1", + "fibers": { + "d1-1": { + "length": 80, + "src_port": "101", + "dst_port": "201", + "local_peer_port": "201", + "remote_peer_port": "101", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "d1-2": { + "length": 80, + "src_port": "102", + "dst_port": "202", + "local_peer_port": "202", + "remote_peer_port": "102", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R2-R1": { + "length": 80, + "source": "d1", + "target": "d1", + "fibers": { + "d1-1": { + "length": 80, + "src_port": "101", + "dst_port": "201", + "local_peer_port": "201", + "remote_peer_port": "101", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "d1-2": { + "length": 80, + "src_port": "102", + "dst_port": "202", + "local_peer_port": "202", + "remote_peer_port": "102", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R1-R3": { + "length": 80, + "source": "d2", + "target": "d1", + "fibers": { + "d2-1": { + "length": 80, + "src_port": "103", + "dst_port": "201", + "local_peer_port": "203", + "remote_peer_port": "101", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "d2-2": { + "length": 80, + "src_port": "104", + "dst_port": "202", + "local_peer_port": "204", + "remote_peer_port": "102", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R3-R1": { + "length": 80, + "source": "d1", + "target": "d2", + "fibers": { + "d1-1": { + "length": 80, + "src_port": "101", + "dst_port": "203", + "local_peer_port": "201", + "remote_peer_port": "103", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "d1-2": { + "length": 80, + "src_port": "102", + "dst_port": "204", + "local_peer_port": "202", + "remote_peer_port": "104", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R2-R3": { + "length": 80, + "source": "d2", + "target": "d2", + "fibers": { + "d2-1": { + "length": 80, + "src_port": "103", + "dst_port": "203", + "local_peer_port": "203", + "remote_peer_port": "103", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "d2-2": { + "length": 80, + "src_port": "104", + "dst_port": "204", + "local_peer_port": "204", + "remote_peer_port": "104", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R3-R2": { + "length": 80, + "source": "d2", + "target": "d2", + "fibers": { + "d2-1": { + "length": 80, + "src_port": "103", + "dst_port": "203", + "local_peer_port": "203", + "remote_peer_port": "103", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "d2-2": { + "length": 80, + "src_port": "104", + "dst_port": "204", + "local_peer_port": "204", + "remote_peer_port": "104", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "T1-R1": { + "length": 0, + "source": "muxT", + "target": "srgR", + "fibers": { + "M1": { + "length": 0, + "src_port": "1", + "dst_port": "2001", + "local_peer_port": "1", + "remote_peer_port": "1001", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "M2": { + "length": 0, + "src_port": "2", + "dst_port": "2002", + "local_peer_port": "2", + "remote_peer_port": "1002", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "M3": { + "length": 0, + "src_port": "3", + "dst_port": "2003", + "local_peer_port": "3", + "remote_peer_port": "1003", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R1-T1": { + "length": 0, + "source": "srgT", + "target": "muxR", + "fibers": { + "S1": { + "length": 0, + "src_port": "1001", + "dst_port": "1", + "local_peer_port": "2001", + "remote_peer_port": "1", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "S2": { + "length": 0, + "src_port": "1002", + "dst_port": "2", + "local_peer_port": "2002", + "remote_peer_port": "2", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "S3": { + "length": 0, + "src_port": "1003", + "dst_port": "3", + "local_peer_port": "2003", + "remote_peer_port": "3", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "T2-R2": { + "length": 0, + "source": "muxT", + "target": "srgR", + "fibers": { + "M1": { + "length": 0, + "src_port": "1", + "dst_port": "2001", + "local_peer_port": "1", + "remote_peer_port": "1001", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "M2": { + "length": 0, + "src_port": "2", + "dst_port": "2002", + "local_peer_port": "2", + "remote_peer_port": "1002", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "M3": { + "length": 0, + "src_port": "3", + "dst_port": "2003", + "local_peer_port": "3", + "remote_peer_port": "1003", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R2-T2": { + "length": 0, + "source": "srgT", + "target": "muxR", + "fibers": { + "S1": { + "length": 0, + "src_port": "1001", + "dst_port": "1", + "local_peer_port": "2001", + "remote_peer_port": "1", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "S2": { + "length": 0, + "src_port": "1002", + "dst_port": "2", + "local_peer_port": "2002", + "remote_peer_port": "2", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "S3": { + "length": 0, + "src_port": "1003", + "dst_port": "3", + "local_peer_port": "2003", + "remote_peer_port": "3", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + } +} diff --git a/src/opticalcontroller/json_files/tfs.json b/src/opticalcontroller/json_files/tfs.json new file mode 100644 index 0000000000000000000000000000000000000000..31803b893b5639e957be33465599573baa475ca2 --- /dev/null +++ b/src/opticalcontroller/json_files/tfs.json @@ -0,0 +1,686 @@ +{ + "links": [ + { + "link_id": { + "link_uuid": { + "uuid": "T1->R1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "T1" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "endpoint_uuid": { + "uuid": "12" + } + } + ], + "optical_link": { + "name": "T1-R1", + "details": { + "length": 0, + "source": "muxT", + "target": "srgR", + "fibers": [ + { + "ID": "M1", + "length": 0, + "src_port": "1", + "dst_port": "12", + "local_peer_port": "1", + "remote_peer_port": "2", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + ] + } + } + }, + { + "link_id": { + "link_uuid": { + "uuid": "R1->T1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "endpoint_uuid": { + "uuid": "2" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "T1" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + } + ], + "optical_link": { + "name": "R1-T1", + "details": { + "length": 0, + "source": "srgT", + "target": "muxT", + "fibers": [ + { + "ID": "M1", + "length": 0, + "src_port": "2", + "dst_port": "1", + "local_peer_port": "12", + "remote_peer_port": "1", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + ] + } + } + }, + { + "link_id": { + "link_uuid": { + "uuid": "R1->R2" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "endpoint_uuid": { + "uuid": "3" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "endpoint_uuid": { + "uuid": "14" + } + } + ], + "optical_link": { + "name": "R1-R2", + "details": { + "length": 0, + "source": "D1", + "target": "D1", + "fibers": [ + { + "ID": "D11", + "length": 0, + "src_port": "3", + "dst_port": "14", + "local_peer_port": "13", + "remote_peer_port": "4", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + ] + } + } + }, + { + "link_id": { + "link_uuid": { + "uuid": "R2->R1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "endpoint_uuid": { + "uuid": "4" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "endpoint_uuid": { + "uuid": "13" + } + } + ], + "optical_link": { + "name": "R2-R1", + "details": { + "length": 0, + "source": "D1", + "target": "D1", + "fibers": [ + { + "ID": "D11", + "length": 0, + "src_port": "4", + "dst_port": "13", + "local_peer_port": "14", + "remote_peer_port": "3", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + ] + } + } + }, + { + "link_id": { + "link_uuid": { + "uuid": "T2->R2" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "T2" + } + }, + "endpoint_uuid": { + "uuid": "6" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "endpoint_uuid": { + "uuid": "15" + } + } + ], + "optical_link": { + "name": "T2-R2", + "details": { + "length": 0, + "source": "srgT", + "target": "muxT", + "fibers": [ + { + "ID": "M1", + "length": 0, + "src_port": "6", + "dst_port": "15", + "local_peer_port": "6", + "remote_peer_port": "5", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + ] + } + } + }, + { + "link_id": { + "link_uuid": { + "uuid": "R2->T2" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "endpoint_uuid": { + "uuid": "5" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "T2" + } + }, + "endpoint_uuid": { + "uuid": "6" + } + } + ], + "optical_link": { + "name": "R2-T2", + "details": { + "length": 0, + "source": "srgT", + "target": "muxT", + "fibers": [ + { + "ID": "M1", + "length": 0, + "src_port": "5", + "dst_port": "6", + "local_peer_port": "15", + "remote_peer_port": "6", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/src/opticalcontroller/json_files/topo_2_links.json b/src/opticalcontroller/json_files/topo_2_links.json new file mode 100644 index 0000000000000000000000000000000000000000..02165938ce675071a4ff4c3424e3b53244d40810 --- /dev/null +++ b/src/opticalcontroller/json_files/topo_2_links.json @@ -0,0 +1,1530 @@ +{ + "R1-R3": { + "length": 80, + "source": "d2", + "target": "d1", + "fibers": { + "d2-1": { + "length": 80, + "src_port": "103", + "dst_port": "201", + "local_peer_port": "203", + "remote_peer_port": "101", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "d2-2": { + "length": 80, + "src_port": "104", + "dst_port": "202", + "local_peer_port": "204", + "remote_peer_port": "102", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R3-R1": { + "length": 80, + "source": "d1", + "target": "d2", + "fibers": { + "d1-1": { + "length": 80, + "src_port": "101", + "dst_port": "203", + "local_peer_port": "201", + "remote_peer_port": "103", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "d1-2": { + "length": 80, + "src_port": "102", + "dst_port": "204", + "local_peer_port": "202", + "remote_peer_port": "104", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R2-R3": { + "length": 80, + "source": "d2", + "target": "d2", + "fibers": { + "d2-1": { + "length": 80, + "src_port": "103", + "dst_port": "203", + "local_peer_port": "203", + "remote_peer_port": "103", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "d2-2": { + "length": 80, + "src_port": "104", + "dst_port": "204", + "local_peer_port": "204", + "remote_peer_port": "104", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R3-R2": { + "length": 80, + "source": "d2", + "target": "d2", + "fibers": { + "d2-1": { + "length": 80, + "src_port": "103", + "dst_port": "203", + "local_peer_port": "203", + "remote_peer_port": "103", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "d2-2": { + "length": 80, + "src_port": "104", + "dst_port": "204", + "local_peer_port": "204", + "remote_peer_port": "104", + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "T1-R1": { + "length": 0, + "source": "muxT", + "target": "srgR", + "fibers": { + "M1": { + "length": 0, + "src_port": "1", + "dst_port": "2001", + "local_peer_port": "1", + "remote_peer_port": "1001", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "M2": { + "length": 0, + "src_port": "2", + "dst_port": "2002", + "local_peer_port": "2", + "remote_peer_port": "1002", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "M3": { + "length": 0, + "src_port": "3", + "dst_port": "2003", + "local_peer_port": "3", + "remote_peer_port": "1003", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R1-T1": { + "length": 0, + "source": "srgT", + "target": "muxR", + "fibers": { + "S1": { + "length": 0, + "src_port": "1001", + "dst_port": "1", + "local_peer_port": "2001", + "remote_peer_port": "1", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "S2": { + "length": 0, + "src_port": "1002", + "dst_port": "2", + "local_peer_port": "2002", + "remote_peer_port": "2", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "S3": { + "length": 0, + "src_port": "1003", + "dst_port": "3", + "local_peer_port": "2003", + "remote_peer_port": "3", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "T2-R2": { + "length": 0, + "source": "muxT", + "target": "srgR", + "fibers": { + "M1": { + "length": 0, + "src_port": "1", + "dst_port": "2001", + "local_peer_port": "1", + "remote_peer_port": "1001", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "M2": { + "length": 0, + "src_port": "2", + "dst_port": "2002", + "local_peer_port": "2", + "remote_peer_port": "1002", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "M3": { + "length": 0, + "src_port": "3", + "dst_port": "2003", + "local_peer_port": "3", + "remote_peer_port": "1003", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + }, + "R2-T2": { + "length": 0, + "source": "srgT", + "target": "muxR", + "fibers": { + "S1": { + "length": 0, + "src_port": "1001", + "dst_port": "1", + "local_peer_port": "2001", + "remote_peer_port": "1", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "S2": { + "length": 0, + "src_port": "1002", + "dst_port": "2", + "local_peer_port": "2002", + "remote_peer_port": "2", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + }, + "S3": { + "length": 0, + "src_port": "1003", + "dst_port": "3", + "local_peer_port": "2003", + "remote_peer_port": "3", + "used": false, + "c_slots": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "l_slots": [ + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120 + ], + "s_slots": [ + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520 + ] + } + } + } +} diff --git a/src/opticalcontroller/json_files/topology-optical.json b/src/opticalcontroller/json_files/topology-optical.json new file mode 100644 index 0000000000000000000000000000000000000000..e2453b654d53fc3200570ce9c2b17effc964bd25 --- /dev/null +++ b/src/opticalcontroller/json_files/topology-optical.json @@ -0,0 +1,252 @@ +{ + "r1-r2": { + "length": 80, + "source" : "d1", + "target" : "d1", + "fibers" : { + "d1-1": { + "src_port": "1T", + "dst_port": "1R", + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "d1-2":{ + "src_port": "2T", + "dst_port": "2R", + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + } + } + }, + "r2-r1": { + "length": 80, + "source" : "d1", + "target" : "d1", + "fibers" : { + "d1-1" : { + "src_port": "1T", + "dst_port": "1R", + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "d1-2" : { + "src_port": "2T", + "dst_port": "2R", + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + } + } + }, + "r1-r3": { + "length": 80, + "source" : "d2", + "target" : "d1", + "fibers" : { + "d2-1":{ + "src_port": "3T", + "dst_port": "1R", + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "d2-2":{ + "src_port": "4T", + "dst_port": "2R", + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + } + } + }, + "r3-r1": { + "length": 80, + "source" : "d1", + "target" : "d2", + "fibers" : { + "d1-1": { + "src_port": "1T", + "dst_port": "3R", + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "d1-2": { + "src_port": "2T", + "dst_port": "4R", + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + } + } + }, + "r2-r3": { + "length": 80, + "source" : "d2", + "target" : "d2", + "fibers" : { + "d2-1": { + "src_port": "3T", + "dst_port": "3R", + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "d2-2": { + "src_port": "4T", + "dst_port": "4R", + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + } + } + }, + "r3-r2": { + "length": 80, + "source" : "d2", + "target" : "d2", + "fibers" : { + "d2-1": { + "src_port": "3T", + "dst_port": "3R", + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "d2-2":{ + "src_port": "4T", + "dst_port": "4R", + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + } + } + }, + "t1-r1": { + "length": 0, + "source" : "muxT", + "target" : "srgR", + "fibers" : { + "M1": { + "src_port": "1", + "dst_port": "101R", + "used": false, + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "M2": { + "src_port": "2", + "dst_port": "102R", + "used": false, + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "M3": { + "src_port": "3", + "dst_port": "103R", + "used": false, + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + } + } + }, + "r1-t1": { + "length": 0, + "source" : "srgT", + "target" : "muxR", + "fibers" : { + "S1": { + "src_port": "101T", + "dst_port": "1", + "used": false, + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "S2": { + "src_port": "102T", + "dst_port": "2", + "used": false, + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "S3": { + "src_port": "103T", + "dst_port": "3", + "used": false, + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + } + } + }, + "t2-r2": { + "length": 0, + "source" : "muxT", + "target" : "srgR", + "fibers" : { + "M1": { + "src_port": "1", + "dst_port": "101R", + "used": false, + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "M2": { + "src_port": "2", + "dst_port": "102R", + "used": false, + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "M3": { + "src_port": "3", + "dst_port": "103R", + "used": false, + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + } + } + }, + "r2-t2": { + "length": 0, + "source" : "srgT", + "target" : "muxR", + "fibers" : { + "S1": { + "src_port": "101T", + "dst_port": "1", + "used": false, + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "S2": { + "src_port": "102T", + "dst_port": "2", + "used": false, + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + }, + "S3": { + "src_port": "103T", + "dst_port": "3", + "used": false, + "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, + "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, + "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} + } + } + } +} diff --git a/src/opticalcontroller/json_files/topology-optical2.json b/src/opticalcontroller/json_files/topology-optical2.json new file mode 100644 index 0000000000000000000000000000000000000000..fe8e9866bcc64d52b2f49089ce03af47d72df9d0 --- /dev/null +++ b/src/opticalcontroller/json_files/topology-optical2.json @@ -0,0 +1,324 @@ +{ + "r1-r2": { + "length": 80, + "source" : "d1", + "target" : "d1", + "fibers" : { + "d1-1": { + "length": 80, + "src_port": "1T", + "dst_port": "1R", + "local_peer_port": "1R", + "remote_peer_port": "1T", + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "d1-2":{ + "length": 80, + "src_port": "2T", + "dst_port": "2R", + "local_peer_port": "2R", + "remote_peer_port": "2T", + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + } + } + }, + "r2-r1": { + "length": 80, + "source" : "d1", + "target" : "d1", + "fibers" : { + "d1-1" : { + "length": 80, + "src_port": "1T", + "dst_port": "1R", + "local_peer_port": "1R", + "remote_peer_port": "1T", + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "d1-2" : { + "length": 80, + "src_port": "2T", + "dst_port": "2R", + "local_peer_port": "2R", + "remote_peer_port": "2T", + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + } + } + }, + "r1-r3": { + "length": 80, + "source" : "d2", + "target" : "d1", + "fibers" : { + "d2-1":{ + "length": 80, + "src_port": "3T", + "dst_port": "1R", + "local_peer_port": "3R", + "remote_peer_port": "1T", + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "d2-2":{ + "length": 80, + "src_port": "4T", + "dst_port": "2R", + "local_peer_port": "4R", + "remote_peer_port": "2T", + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + } + } + }, + "r3-r1": { + "length": 80, + "source" : "d1", + "target" : "d2", + "fibers" : { + "d1-1": { + "length": 80, + "src_port": "1T", + "dst_port": "3R", + "local_peer_port": "1R", + "remote_peer_port": "3T", + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "d1-2": { + "length": 80, + "src_port": "2T", + "dst_port": "4R", + "local_peer_port": "2R", + "remote_peer_port": "4T", + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + } + } + }, + "r2-r3": { + "length": 80, + "source" : "d2", + "target" : "d2", + "fibers" : { + "d2-1": { + "length": 80, + "src_port": "3T", + "dst_port": "3R", + "local_peer_port": "3R", + "remote_peer_port": "3T", + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "d2-2": { + "length": 80, + "src_port": "4T", + "dst_port": "4R", + "local_peer_port": "4R", + "remote_peer_port": "4T", + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + } + } + }, + "r3-r2": { + "length": 80, + "source" : "d2", + "target" : "d2", + "fibers" : { + "d2-1": { + "length": 80, + "src_port": "3T", + "dst_port": "3R", + "local_peer_port": "3R", + "remote_peer_port": "3T", + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "d2-2":{ + "length": 80, + "src_port": "4T", + "dst_port": "4R", + "local_peer_port": "4R", + "remote_peer_port": "4T", + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + } + } + }, + "t1-r1": { + "length": 0, + "source" : "muxT", + "target" : "srgR", + "fibers" : { + "M1": { + "length": 0, + "src_port": "1", + "dst_port": "101R", + "local_peer_port": "1", + "remote_peer_port": "101T", + "used": false, + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "M2": { + "length": 0, + "src_port": "2", + "dst_port": "102R", + "local_peer_port": "2", + "remote_peer_port": "102T", + "used": false, + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "M3": { + "length": 0, + "src_port": "3", + "dst_port": "103R", + "local_peer_port": "3", + "remote_peer_port": "103T", + "used": false, + "c_slots": [], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + } + } + }, + "r1-t1": { + "length": 0, + "source" : "srgT", + "target" : "muxR", + "fibers" : { + "S1": { + "length": 0, + "src_port": "101T", + "dst_port": "1", + "local_peer_port": "101R", + "remote_peer_port": "1", + "used": false, + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "S2": { + "length": 0, + "src_port": "102T", + "dst_port": "2", + "local_peer_port": "102T", + "remote_peer_port": "2", + "used": false, + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "S3": { + "length": 0, + "src_port": "103T", + "dst_port": "3", + "local_peer_port": "103R", + "remote_peer_port": "3", + "used": false, + "c_slots": [], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + } + } + }, + "t2-r2": { + "length": 0, + "source" : "muxT", + "target" : "srgR", + "fibers" : { + "M1": { + "length": 0, + "src_port": "1", + "dst_port": "101R", + "local_peer_port": "1", + "remote_peer_port": "101T", + "used": false, + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "M2": { + "length": 0, + "src_port": "2", + "dst_port": "102R", + "local_peer_port": "2", + "remote_peer_port": "102T", + "used": false, + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "M3": { + "length": 0, + "src_port": "3", + "dst_port": "103R", + "local_peer_port": "3", + "remote_peer_port": "103T", + "used": false, + "c_slots": [], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + } + } + }, + "r2-t2": { + "length": 0, + "source" : "srgT", + "target" : "muxR", + "fibers" : { + "S1": { + "length": 0, + "src_port": "101T", + "dst_port": "1", + "local_peer_port": "101R", + "remote_peer_port": "1", + "used": false, + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "S2": { + "length": 0, + "src_port": "102T", + "dst_port": "2", + "local_peer_port": "102R", + "remote_peer_port": "2", + "used": false, + "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + }, + "S3": { + "length": 0, + "src_port": "103T", + "dst_port": "3", + "local_peer_port": "103R", + "remote_peer_port": "3", + "used": false, + "c_slots": [], + "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], + "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] + } + } + } +} diff --git a/src/opticalcontroller/requirements.in b/src/opticalcontroller/requirements.in new file mode 100644 index 0000000000000000000000000000000000000000..0b1947bee2c7f1e89491dff4f7589d3465d28c38 --- /dev/null +++ b/src/opticalcontroller/requirements.in @@ -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. + +Flask==1.1.2 +flask-restplus==0.13.0 +itsdangerous==1.1.0 +Jinja2==2.11.3 +MarkupSafe==1.1.1 +numpy==1.23.0 +Werkzeug==0.16.1 diff --git a/src/opticalcontroller/tools.py b/src/opticalcontroller/tools.py new file mode 100644 index 0000000000000000000000000000000000000000..a173856b8e7bd00a0e538cd3893e1c762edff8c8 --- /dev/null +++ b/src/opticalcontroller/tools.py @@ -0,0 +1,189 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 numpy as np +from variables import * +import json + + +def common_slots(a, b): + return list(np.intersect1d(a, b)) + + +def map_modulation_to_op(mod): + if mod == "DP-QPSK": + return 1 + if mod == "DP-16QAM": + return 7 + if mod == "DP-64QAM": + return 10 + + +def map_band_to_slot(band): + return int(band/12.5) + + +def map_rate_to_slot(rate): + if rate == 100: + mod = "DP-QPSK" + slots = 4 + op = map_modulation_to_op(mod) + return op, slots + if rate == 400: + mod = "DP-16QAM" + slots = 8 + op = map_modulation_to_op(mod) + return op, slots + if rate == 1000: + mod = "DP-64QAM" + slots = 18 + op = map_modulation_to_op(mod) + return op, slots + else: + return 2, 5 + + +def consecutives(x, val): + res = [] + temp = [] + x.sort() + temp.append(x[0]) + y = 1 + for i in range(1, len(x)): + if x[i] == x[i - 1] + 1: + y += 1 + temp.append(x[i]) + else: + if y >= val: + res.extend(temp) + temp = [x[i]] + y = 1 + if i == len(x) - 1 and y >= val: + res.extend(temp) + return res + + +def combine(ls1, ls2): + temp = ls1 + for i in ls2: + if i not in ls1: + temp.append(i) + temp.sort() + return temp + + +def list_in_list(a, b): + # convert list A to numpy array + a_arr = np.array(a) + # convert list B to numpy array + b_arr = np.array(b) + + for i in range(len(b_arr)): + if np.array_equal(a_arr, b_arr[i:i + len(a_arr)]): + return True + return False + + +def reverse_link(link): + s, d = link.split('-') + r_link = "{}-{}".format(d, s) + return r_link + + +def get_slot_frequency(b, n): + if debug: + print(n) + if b == "c_slots": + return Fc + n * 12.5 + if b == "s_slots": + return Fs + n * 12.5 + if b == "l_slots": + return Fl + n * 12.5 + + +def freqency_converter(b, slots): + l = len(slots) + if debug: + print(slots) + if l % 2 == 0: + if debug: + print("pari {}".format(l)) + fx = get_slot_frequency(b, slots[int(l / 2)-1]) + if debug: + print(fx) + #GHz + # #f0 = fx + 6.25 + #MHz + f0 = int((fx + 6.25) * 1000) + else: + f0 = get_slot_frequency(b, slots[int((l + 1) / 2) - 1]) + #GHz + # #return f0, 12.5 * l + # MHz + return f0, int((12.5 * l) * 1000) + + +def readTopologyData(nodes, topology): + nodes_file = open(nodes, 'r') + topo_file = open(topology, 'r') + nodes = json.load(nodes_file) + topo = json.load(topo_file) + print(topo) + nodes_file.close() + topo_file.close() + return nodes, topo + + +def reverse_links(links): + temp_links = links.copy() + temp_links.reverse() + result = [] + for link in temp_links: + [a, b] = link.split("-") + result.append("{}-{}".format(b, a)) + return result + +def get_links_from_node(topology, node): + result = {} + for link in topology["links"]: + if "{}-".format(node) in link["optical_link"]["name"]: + result[link["optical_link"]["name"]] = link + return result + +def get_links_to_node(topology, node): + result = {} + for link in topology["links"]: + if "-{}".format(node) in link["optical_link"]["name"]: + result[link["optical_link"]["name"]] = link + return result + + +def slot_selection(c, l, s, n_slots, Nc, Nl, Ns): + # First Fit + if isinstance(n_slots, int): + slot_c = n_slots + slot_l = n_slots + slot_s = n_slots + else: + slot_c = Nc + slot_l = Nl + slot_s = Ns + if len(c) >= slot_c: + return "c_slots", c[0: slot_c] + elif len(l) >= slot_l: + return "l_slots", l[0: slot_l] + elif len(l) >= slot_s: + return "s_slots", s[0: slot_s] + else: + return None, None diff --git a/src/opticalcontroller/variables.py b/src/opticalcontroller/variables.py new file mode 100644 index 0000000000000000000000000000000000000000..ca436736b20a525c866ea9745be14bc4db37dfcf --- /dev/null +++ b/src/opticalcontroller/variables.py @@ -0,0 +1,32 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +debug = 1 + +Fl = 184800 +Fc = 192000 +Fs = 196200 + +Nl = 550 +Nc = 320 +#Nc = 10 +Ns = 720 + +nodes_json = 'json_files/nodes.json' +topology_json = 'json_files/tfs.json' #LAST +#topology_json = 'json_files/optical_TFSworking.json' #LAST +#topology_json = 'json_files/optical_topoTFS.json' +#topology_json = 'json_files/topo_2_links.json' + +testing = 1 diff --git a/src/pathcomp/.gitlab-ci.yml b/src/pathcomp/.gitlab-ci.yml index 05113d0feab441543d6567f3eb3ab1cacac3a971..24f6d42d37ec6b6f341616f0badf08e9ef55ffff 100644 --- a/src/pathcomp/.gitlab-ci.yml +++ b/src/pathcomp/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,9 +22,9 @@ build pathcomp: - 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 build -t "${IMAGE_NAME}-backend:${IMAGE_TAG}-builder" --target builder -f ./src/$IMAGE_NAME/backend/Dockerfile . - - docker build -t "${IMAGE_NAME}-backend:$IMAGE_TAG" -f ./src/$IMAGE_NAME/backend/Dockerfile . - - docker build -t "${IMAGE_NAME}-frontend:$IMAGE_TAG" -f ./src/$IMAGE_NAME/frontend/Dockerfile . + - docker buildx build -t "${IMAGE_NAME}-backend:${IMAGE_TAG}-builder" --target builder -f ./src/$IMAGE_NAME/backend/Dockerfile . + - docker buildx build -t "${IMAGE_NAME}-backend:$IMAGE_TAG" -f ./src/$IMAGE_NAME/backend/Dockerfile . + - docker buildx build -t "${IMAGE_NAME}-frontend:$IMAGE_TAG" -f ./src/$IMAGE_NAME/frontend/Dockerfile . - docker tag "${IMAGE_NAME}-backend:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG" - docker tag "${IMAGE_NAME}-frontend:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-frontend:$IMAGE_TAG" - docker push "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG" diff --git a/src/pathcomp/__init__.py b/src/pathcomp/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/pathcomp/__init__.py +++ b/src/pathcomp/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/Dockerfile b/src/pathcomp/backend/Dockerfile index bbe5adc26c4b2b98d3efaaf4d13415f7487d5fa1..0c992f8fbc59020f818def2852c93eeda25efcce 100644 --- a/src/pathcomp/backend/Dockerfile +++ b/src/pathcomp/backend/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/Dockerfile-gdb b/src/pathcomp/backend/Dockerfile-gdb index c505022e3180a1d182d7a3fbc43c57a1be19dea2..a5f18e02bb8ce463b88c93b1e3325eb6eed370fb 100644 --- a/src/pathcomp/backend/Dockerfile-gdb +++ b/src/pathcomp/backend/Dockerfile-gdb @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/Makefile b/src/pathcomp/backend/Makefile index 56d249510497785316c2e0c36ea8ee0e28c461b1..2ca6f42cbf49141d9db9138bb6481ec7a0d3c2a8 100644 --- a/src/pathcomp/backend/Makefile +++ b/src/pathcomp/backend/Makefile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp.c b/src/pathcomp/backend/pathComp.c index 537cf378f1d6124ebc7c2a0140c0a408af547254..4961c55a391d2c48a64ae844adf0eccb351cd7cf 100644 --- a/src/pathcomp/backend/pathComp.c +++ b/src/pathcomp/backend/pathComp.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp.h b/src/pathcomp/backend/pathComp.h index decded67e9e760c4e4905691f2c1ce834f27eb38..ec2c91e88f4fe54c4f66e7df7e6dc8cfd2ee68b8 100644 --- a/src/pathcomp/backend/pathComp.h +++ b/src/pathcomp/backend/pathComp.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_RESTapi.c b/src/pathcomp/backend/pathComp_RESTapi.c index a8c7c7f47aa2f4e88719337d8f09eb955795bf17..093088aa8046d1aa4ac84408557ecbd11b7a7e4e 100644 --- a/src/pathcomp/backend/pathComp_RESTapi.c +++ b/src/pathcomp/backend/pathComp_RESTapi.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_RESTapi.h b/src/pathcomp/backend/pathComp_RESTapi.h index e47c7df4ae0c0190b15cf3b5d5db21322574aa07..b3c7658d93f0f93f1dcdbaeacd5572cf03ad0e51 100644 --- a/src/pathcomp/backend/pathComp_RESTapi.h +++ b/src/pathcomp/backend/pathComp_RESTapi.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_cjson.c b/src/pathcomp/backend/pathComp_cjson.c index f030da9df934bd22295f12b68494f551cab0b79e..b0721f3cd7d15a4c51a26d66d4dfaa48806164a4 100644 --- a/src/pathcomp/backend/pathComp_cjson.c +++ b/src/pathcomp/backend/pathComp_cjson.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_cjson.h b/src/pathcomp/backend/pathComp_cjson.h index dbd233889fc04b8da3a04334d1c8b1e622771690..9e54070a72368d47d617867d53714fe5e71af75a 100644 --- a/src/pathcomp/backend/pathComp_cjson.h +++ b/src/pathcomp/backend/pathComp_cjson.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_ear.c b/src/pathcomp/backend/pathComp_ear.c index aee3d09f768619f3f6eb40231133fedd30dbb769..37be2833d358b359dffacf13e696340ceba0f549 100644 --- a/src/pathcomp/backend/pathComp_ear.c +++ b/src/pathcomp/backend/pathComp_ear.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_ear.h b/src/pathcomp/backend/pathComp_ear.h index dff6202568572bfa3343c21c29ad663e167ccfaa..afe95413a0665ea84edb96ab67828d7df12d1f07 100644 --- a/src/pathcomp/backend/pathComp_ear.h +++ b/src/pathcomp/backend/pathComp_ear.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_ksp.c b/src/pathcomp/backend/pathComp_ksp.c index f5e3c8fb8ea854c9acc9fb9f8bc00e3f34a3141a..13a00ca43a961abfb28579198f2694b89937d8d2 100644 --- a/src/pathcomp/backend/pathComp_ksp.c +++ b/src/pathcomp/backend/pathComp_ksp.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_ksp.h b/src/pathcomp/backend/pathComp_ksp.h index ef52d315903d234568a88b024882654b459b94ff..f155a23d33019466c1ac3021da953f978e3ecf95 100644 --- a/src/pathcomp/backend/pathComp_ksp.h +++ b/src/pathcomp/backend/pathComp_ksp.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_log.c b/src/pathcomp/backend/pathComp_log.c index 1f78ce098888ed198744c8c59bf6458bf4ae8d00..4d2b5cad2a6069834545cb02dcf4909fe37113ed 100644 --- a/src/pathcomp/backend/pathComp_log.c +++ b/src/pathcomp/backend/pathComp_log.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_log.h b/src/pathcomp/backend/pathComp_log.h index e9f12a5f1c40a4835915393e8f154cda46b4e918..559281a3f3b7dbf5d8a232f8073d62c1b9b0cf70 100644 --- a/src/pathcomp/backend/pathComp_log.h +++ b/src/pathcomp/backend/pathComp_log.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_sp.c b/src/pathcomp/backend/pathComp_sp.c index b6fd885e3fec7032993ef4d058df8256cc363965..ac6577520e70314f88f0ba5aa18ea52035f797ad 100644 --- a/src/pathcomp/backend/pathComp_sp.c +++ b/src/pathcomp/backend/pathComp_sp.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_sp.h b/src/pathcomp/backend/pathComp_sp.h index 5b2d31d43566bbdf9d9f927cfe4bca08be0a920b..ab684ffeeafc2a6ca1267583bad1f1b5e7afbe56 100644 --- a/src/pathcomp/backend/pathComp_sp.h +++ b/src/pathcomp/backend/pathComp_sp.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_tools.c b/src/pathcomp/backend/pathComp_tools.c index bd4f7df8ca460e3bab3bb3d9f75e7592f19268c7..e573dce00f15a12cc2749fd6127da8adf56c9d70 100644 --- a/src/pathcomp/backend/pathComp_tools.c +++ b/src/pathcomp/backend/pathComp_tools.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/pathComp_tools.h b/src/pathcomp/backend/pathComp_tools.h index 49280d543a52ede118a1baee988484671bc76f8d..85d1c62ead295642e6d3d297941ae72d532bdeed 100644 --- a/src/pathcomp/backend/pathComp_tools.h +++ b/src/pathcomp/backend/pathComp_tools.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/pathcomp/backend/tests/run-test.sh b/src/pathcomp/backend/tests/run-test.sh index 1f6a4bd4556b380b9ea254341eee640e28e7095d..4a1b1b4bd6d4e4e8fc0989f531021c87a958abd4 100755 --- a/src/pathcomp/backend/tests/run-test.sh +++ b/src/pathcomp/backend/tests/run-test.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/Config.py b/src/pathcomp/frontend/Config.py index 61aa31a8316a67cdba4b214fc0a1ff4b3843b003..08de81b47dd05ce19ac8335b5b31df8ef4ee461e 100644 --- a/src/pathcomp/frontend/Config.py +++ b/src/pathcomp/frontend/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/Dockerfile b/src/pathcomp/frontend/Dockerfile index 955844cf4d80b39fc0913c9c523fd1267ca0fb1d..0c72a1f144da4766215add67c5252ccd939de817 100644 --- a/src/pathcomp/frontend/Dockerfile +++ b/src/pathcomp/frontend/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -54,18 +54,22 @@ 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/pathcomp -WORKDIR /var/teraflow/pathcomp +RUN mkdir -p /var/teraflow/pathcomp/frontend +WORKDIR /var/teraflow/pathcomp/frontend COPY src/pathcomp/frontend/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/pathcomp/__init__.py pathcomp/__init__.py +COPY src/pathcomp/frontend/. pathcomp/frontend/ COPY src/context/__init__.py context/__init__.py COPY src/context/client/. context/client/ COPY src/device/__init__.py device/__init__.py COPY src/device/client/. device/client/ +# Requires entire Forecaster component for the tests +# TODO: Improve testing framework COPY src/forecaster/. forecaster/ COPY src/monitoring/__init__.py monitoring/__init__.py COPY src/monitoring/client/. monitoring/client/ @@ -73,7 +77,6 @@ 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/pathcomp/. pathcomp/ # Start the service ENTRYPOINT ["python", "-m", "pathcomp.frontend.service"] diff --git a/src/pathcomp/frontend/__init__.py b/src/pathcomp/frontend/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/pathcomp/frontend/__init__.py +++ b/src/pathcomp/frontend/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/client/PathCompClient.py b/src/pathcomp/frontend/client/PathCompClient.py index 3ce5b2f33c2c0fac530363dd21f3eac26e42a2c7..14756ea6e2ec452a9c80d8ba09caff4c5435cfa3 100644 --- a/src/pathcomp/frontend/client/PathCompClient.py +++ b/src/pathcomp/frontend/client/PathCompClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/client/__init__.py b/src/pathcomp/frontend/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/pathcomp/frontend/client/__init__.py +++ b/src/pathcomp/frontend/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/requirements.in b/src/pathcomp/frontend/requirements.in index c96d7425c5d2e32d43559b8b138de8200db40eac..0466b25dc1e326d72735c02aa9b581264dd02620 100644 --- a/src/pathcomp/frontend/requirements.in +++ b/src/pathcomp/frontend/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/PathCompService.py b/src/pathcomp/frontend/service/PathCompService.py index d86cea7559758b846f668577b2c3b2c67f4cd6c8..76edef6cf8f34b757f3dd975d51a7e57c328b920 100644 --- a/src/pathcomp/frontend/service/PathCompService.py +++ b/src/pathcomp/frontend/service/PathCompService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/PathCompServiceServicerImpl.py b/src/pathcomp/frontend/service/PathCompServiceServicerImpl.py index 5d3d352d7ddf0638b3d9a3894eb1f9ac3f91c4fb..ffaa6c358811f567de0a38ba3f50d69b5e0e3ced 100644 --- a/src/pathcomp/frontend/service/PathCompServiceServicerImpl.py +++ b/src/pathcomp/frontend/service/PathCompServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/TopologyTools.py b/src/pathcomp/frontend/service/TopologyTools.py index 778cd59acce1eeeeeb1b05bcc3a03f09a9a46a8e..0ae114b1a3dea31e2abd3399e43ba8d131f2b917 100644 --- a/src/pathcomp/frontend/service/TopologyTools.py +++ b/src/pathcomp/frontend/service/TopologyTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/__init__.py b/src/pathcomp/frontend/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/pathcomp/frontend/service/__init__.py +++ b/src/pathcomp/frontend/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/__main__.py b/src/pathcomp/frontend/service/__main__.py index 00da647752e870acc132fc8a96e506ef7327ffa3..9c7b7fe202cde4edae2e9193b3a8a3aa4197e12f 100644 --- a/src/pathcomp/frontend/service/__main__.py +++ b/src/pathcomp/frontend/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/algorithms/Factory.py b/src/pathcomp/frontend/service/algorithms/Factory.py index 0e00dc11b707467b4e36d80d559502deb26d226b..be18bc2bcce7e2037ed1c10a9dad70db2acc5217 100644 --- a/src/pathcomp/frontend/service/algorithms/Factory.py +++ b/src/pathcomp/frontend/service/algorithms/Factory.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py b/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py index 144246620e85dd1aaf507efe75e22b62ce942587..e5dc2938124c6a668e6ddcf3296ebf273786cc2e 100644 --- a/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py +++ b/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/algorithms/KShortestPathAlgorithm.py b/src/pathcomp/frontend/service/algorithms/KShortestPathAlgorithm.py index e0fbbe08a1c01402573333f89b1118b6618cc7ce..57ce43979f4aeb7671bf8be5a6dba5e58a50cd87 100644 --- a/src/pathcomp/frontend/service/algorithms/KShortestPathAlgorithm.py +++ b/src/pathcomp/frontend/service/algorithms/KShortestPathAlgorithm.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/algorithms/ShortestPathAlgorithm.py b/src/pathcomp/frontend/service/algorithms/ShortestPathAlgorithm.py index 4719b8703b4810ad23fcb6e4aa973c7b55088bab..effe6c50b126abb818cbb8de170845ac519a6325 100644 --- a/src/pathcomp/frontend/service/algorithms/ShortestPathAlgorithm.py +++ b/src/pathcomp/frontend/service/algorithms/ShortestPathAlgorithm.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/algorithms/_Algorithm.py b/src/pathcomp/frontend/service/algorithms/_Algorithm.py index 0a1b62040a81ee964d373132763e964381cbc19e..3ed2b13fb33ae06faeacc4286959a8016ca995d1 100644 --- a/src/pathcomp/frontend/service/algorithms/_Algorithm.py +++ b/src/pathcomp/frontend/service/algorithms/_Algorithm.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,12 +15,16 @@ import json, logging, requests, uuid from typing import Dict, List, Optional, Tuple, Union from common.proto.context_pb2 import ( - Connection, Device, DeviceList, EndPointId, Link, LinkList, Service, ServiceStatusEnum, ServiceTypeEnum) + ConfigRule, Connection, Device, DeviceList, EndPointId, Link, LinkList, Service, ServiceStatusEnum, ServiceTypeEnum +) from common.proto.pathcomp_pb2 import PathCompReply, PathCompRequest +from common.tools.grpc.Tools import grpc_message_list_to_json from pathcomp.frontend.Config import BACKEND_URL from .tools.EroPathToHops import eropath_to_hops from .tools.ComposeConfigRules import ( - compose_device_config_rules, compose_l2nm_config_rules, compose_l3nm_config_rules, compose_tapi_config_rules) + compose_device_config_rules, compose_l2nm_config_rules, compose_l3nm_config_rules, compose_tapi_config_rules, + generate_neighbor_endpoint_config_rules +) from .tools.ComposeRequest import compose_device, compose_link, compose_service from .tools.ComputeSubServices import ( convert_explicit_path_hops_to_connections, convert_explicit_path_hops_to_plain_connection) @@ -227,12 +231,25 @@ class _Algorithm: continue orig_config_rules = grpc_orig_service.service_config.config_rules + json_orig_config_rules = grpc_message_list_to_json(orig_config_rules) for service_path_ero in response['path']: self.logger.debug('service_path_ero["devices"] = {:s}'.format(str(service_path_ero['devices']))) _endpoint_to_link_dict = {k:v[0] for k,v in self.endpoint_to_link_dict.items()} self.logger.debug('self.endpoint_to_link_dict = {:s}'.format(str(_endpoint_to_link_dict))) path_hops = eropath_to_hops(service_path_ero['devices'], self.endpoint_to_link_dict) + + json_generated_config_rules = generate_neighbor_endpoint_config_rules( + json_orig_config_rules, path_hops, self.device_name_mapping, self.endpoint_name_mapping + ) + json_extended_config_rules = list() + json_extended_config_rules.extend(json_orig_config_rules) + json_extended_config_rules.extend(json_generated_config_rules) + extended_config_rules = [ + ConfigRule(**json_extended_config_rule) + for json_extended_config_rule in json_extended_config_rules + ] + self.logger.debug('path_hops = {:s}'.format(str(path_hops))) try: _device_dict = {k:v[0] for k,v in self.device_dict.items()} @@ -256,7 +273,7 @@ class _Algorithm: if service_key in grpc_services: continue grpc_service = self.add_service_to_reply( reply, context_uuid, service_uuid, service_type, path_hops=path_hops, - config_rules=orig_config_rules) + config_rules=extended_config_rules) grpc_services[service_key] = grpc_service for connection in connections: diff --git a/src/pathcomp/frontend/service/algorithms/__init__.py b/src/pathcomp/frontend/service/algorithms/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/pathcomp/frontend/service/algorithms/__init__.py +++ b/src/pathcomp/frontend/service/algorithms/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py b/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py index 329552a914e478f0e927bd6f04fce6725bef0b5e..f92f9b2fff11ab585813ab59e07c463f361413d2 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import itertools, json, logging, re -from typing import Dict, List, Optional, Tuple +import copy, itertools, json, logging, re +from typing import Dict, Iterable, List, Optional, Set, Tuple from common.proto.context_pb2 import ConfigRule from common.tools.grpc.Tools import grpc_message_to_json_string from common.tools.object_factory.ConfigRule import json_config_rule_set @@ -21,19 +21,26 @@ from common.tools.object_factory.ConfigRule import json_config_rule_set LOGGER = logging.getLogger(__name__) SETTINGS_RULE_NAME = '/settings' +STATIC_ROUTING_RULE_NAME = '/static_routing' -DEVICE_SETTINGS = re.compile(r'\/device\[([^\]]+)\]\/settings') -ENDPOINT_SETTINGS = re.compile(r'\/device\[([^\]]+)\]\/endpoint\[([^\]]+)\]\/settings') +RE_UUID = re.compile(r'([0-9a-fA-F]{8})\-([0-9a-fA-F]{4})\-([0-9a-fA-F]{4})\-([0-9a-fA-F]{4})\-([0-9a-fA-F]{12})') + +RE_DEVICE_SETTINGS = re.compile(r'\/device\[([^\]]+)\]\/settings') +RE_ENDPOINT_SETTINGS = re.compile(r'\/device\[([^\]]+)\]\/endpoint\[([^\]]+)\]\/settings') +RE_ENDPOINT_VLAN_SETTINGS = re.compile(r'\/device\[([^\]]+)\]\/endpoint\[([^\]]+)\]\/vlan\[([^\]]+)\]\/settings') + +TMPL_ENDPOINT_SETTINGS = '/device[{:s}]/endpoint[{:s}]/settings' +TMPL_ENDPOINT_VLAN_SETTINGS = '/device[{:s}]/endpoint[{:s}]/vlan[{:s}]/settings' L2NM_SETTINGS_FIELD_DEFAULTS = { - 'encapsulation_type': 'dot1q', - 'vlan_id' : 100, + #'encapsulation_type': 'dot1q', + #'vlan_id' : 100, 'mtu' : 1450, } L3NM_SETTINGS_FIELD_DEFAULTS = { - 'encapsulation_type': 'dot1q', - 'vlan_id' : 100, + #'encapsulation_type': 'dot1q', + #'vlan_id' : 100, 'mtu' : 1450, } @@ -54,26 +61,48 @@ def find_custom_config_rule(config_rules : List, resource_name : str) -> Optiona return resource_value def compose_config_rules( - main_service_config_rules : List, subservice_config_rules : List, field_defaults : Dict + main_service_config_rules : List, subservice_config_rules : List, settings_rule_name : str, field_defaults : Dict ) -> None: - settings = find_custom_config_rule(main_service_config_rules, SETTINGS_RULE_NAME) + settings = find_custom_config_rule(main_service_config_rules, settings_rule_name) if settings is None: return json_settings = {} - for field_name,default_value in field_defaults.items(): - json_settings[field_name] = settings.get(field_name, default_value) - config_rule = ConfigRule(**json_config_rule_set('/settings', json_settings)) + if len(field_defaults) == 0: + for field_name,field_value in settings.items(): + json_settings[field_name] = field_value + else: + for field_name,default_value in field_defaults.items(): + field_value = settings.get(field_name, default_value) + if field_value is None: continue + json_settings[field_name] = field_value + + if len(json_settings) == 0: return + + config_rule = ConfigRule(**json_config_rule_set(settings_rule_name, json_settings)) subservice_config_rules.append(config_rule) def compose_l2nm_config_rules(main_service_config_rules : List, subservice_config_rules : List) -> None: - compose_config_rules(main_service_config_rules, subservice_config_rules, L2NM_SETTINGS_FIELD_DEFAULTS) + CONFIG_RULES = [ + (SETTINGS_RULE_NAME, L2NM_SETTINGS_FIELD_DEFAULTS), + ] + for rule_name, defaults in CONFIG_RULES: + compose_config_rules(main_service_config_rules, subservice_config_rules, rule_name, defaults) def compose_l3nm_config_rules(main_service_config_rules : List, subservice_config_rules : List) -> None: - compose_config_rules(main_service_config_rules, subservice_config_rules, L3NM_SETTINGS_FIELD_DEFAULTS) + CONFIG_RULES = [ + (SETTINGS_RULE_NAME, L3NM_SETTINGS_FIELD_DEFAULTS), + (STATIC_ROUTING_RULE_NAME, {}), + ] + for rule_name, defaults in CONFIG_RULES: + compose_config_rules(main_service_config_rules, subservice_config_rules, rule_name, defaults) def compose_tapi_config_rules(main_service_config_rules : List, subservice_config_rules : List) -> None: - compose_config_rules(main_service_config_rules, subservice_config_rules, TAPI_SETTINGS_FIELD_DEFAULTS) + CONFIG_RULES = [ + (SETTINGS_RULE_NAME, TAPI_SETTINGS_FIELD_DEFAULTS), + ] + for rule_name, defaults in CONFIG_RULES: + compose_config_rules(main_service_config_rules, subservice_config_rules, rule_name, defaults) def compose_device_config_rules( config_rules : List, subservice_config_rules : List, path_hops : List, @@ -127,30 +156,182 @@ def compose_device_config_rules( elif config_rule.WhichOneof('config_rule') == 'custom': LOGGER.debug('[compose_device_config_rules] is custom') - match = DEVICE_SETTINGS.match(config_rule.custom.resource_key) + match = RE_DEVICE_SETTINGS.match(config_rule.custom.resource_key) if match is not None: device_uuid_or_name = match.group(1) - device_name_or_uuid = device_name_mapping[device_uuid_or_name] - device_keys = {device_uuid_or_name, device_name_or_uuid} + device_keys = {device_uuid_or_name} + device_name_or_uuid = device_name_mapping.get(device_uuid_or_name) + if device_name_or_uuid is not None: device_keys.add(device_name_or_uuid) if len(device_keys.intersection(devices_traversed)) == 0: continue subservice_config_rules.append(config_rule) - match = ENDPOINT_SETTINGS.match(config_rule.custom.resource_key) + match = RE_ENDPOINT_SETTINGS.match(config_rule.custom.resource_key) + if match is None: + match = RE_ENDPOINT_VLAN_SETTINGS.match(config_rule.custom.resource_key) if match is not None: device_uuid_or_name = match.group(1) - device_name_or_uuid = device_name_mapping[device_uuid_or_name] - device_keys = {device_uuid_or_name, device_name_or_uuid} + device_keys = {device_uuid_or_name} + device_name_or_uuid = device_name_mapping.get(device_uuid_or_name) + if device_name_or_uuid is not None: device_keys.add(device_name_or_uuid) endpoint_uuid_or_name = match.group(2) - endpoint_name_or_uuid_1 = endpoint_name_mapping[(device_uuid_or_name, endpoint_uuid_or_name)] - endpoint_name_or_uuid_2 = endpoint_name_mapping[(device_name_or_uuid, endpoint_uuid_or_name)] - endpoint_keys = {endpoint_uuid_or_name, endpoint_name_or_uuid_1, endpoint_name_or_uuid_2} + endpoint_keys = {endpoint_uuid_or_name} + endpoint_name_or_uuid_1 = endpoint_name_mapping.get((device_uuid_or_name, endpoint_uuid_or_name)) + if endpoint_name_or_uuid_1 is not None: endpoint_keys.add(endpoint_name_or_uuid_1) + endpoint_name_or_uuid_2 = endpoint_name_mapping.get((device_name_or_uuid, endpoint_uuid_or_name)) + if endpoint_name_or_uuid_2 is not None: endpoint_keys.add(endpoint_name_or_uuid_2) device_endpoint_keys = set(itertools.product(device_keys, endpoint_keys)) if len(device_endpoint_keys.intersection(endpoints_traversed)) == 0: continue + + # TODO: check if vlan needs to be removed from config_rule + #config_rule.custom.resource_key = re.sub('\/vlan\[[^\]]+\]', '', config_rule.custom.resource_key) + subservice_config_rules.append(config_rule) else: continue + for config_rule in subservice_config_rules: + LOGGER.debug('[compose_device_config_rules] result config_rule: {:s}'.format( + grpc_message_to_json_string(config_rule))) + LOGGER.debug('[compose_device_config_rules] end') + +def pairwise(iterable : Iterable) -> Tuple[Iterable, Iterable]: + # TODO: To be replaced by itertools.pairwise() when we move to Python 3.10 + # Python 3.10 introduced method itertools.pairwise() + # Standalone method extracted from: + # - https://docs.python.org/3/library/itertools.html#itertools.pairwise + a, b = itertools.tee(iterable, 2) + next(b, None) + return zip(a, b) + +def compute_device_keys( + device_uuid_or_name : str, device_name_mapping : Dict[str, str] +) -> Set[str]: + LOGGER.debug('[compute_device_keys] begin') + LOGGER.debug('[compute_device_keys] device_uuid_or_name={:s}'.format(str(device_uuid_or_name))) + #LOGGER.debug('[compute_device_keys] device_name_mapping={:s}'.format(str(device_name_mapping))) + + device_keys = {device_uuid_or_name} + for k,v in device_name_mapping.items(): + if device_uuid_or_name not in {k, v}: continue + device_keys.add(k) + device_keys.add(v) + + LOGGER.debug('[compute_device_keys] device_keys={:s}'.format(str(device_keys))) + LOGGER.debug('[compute_device_keys] end') + return device_keys + +def compute_endpoint_keys( + device_keys : Set[str], endpoint_uuid_or_name : str, endpoint_name_mapping : Dict[str, str] +) -> Set[str]: + LOGGER.debug('[compute_endpoint_keys] begin') + LOGGER.debug('[compute_endpoint_keys] device_keys={:s}'.format(str(device_keys))) + LOGGER.debug('[compute_endpoint_keys] endpoint_uuid_or_name={:s}'.format(str(endpoint_uuid_or_name))) + #LOGGER.debug('[compute_device_endpoint_keys] endpoint_name_mapping={:s}'.format(str(endpoint_name_mapping))) + + endpoint_keys = {endpoint_uuid_or_name} + for k,v in endpoint_name_mapping.items(): + if (k[0] in device_keys or v in device_keys) and (endpoint_uuid_or_name in {k[1], v}): + endpoint_keys.add(k[1]) + endpoint_keys.add(v) + + LOGGER.debug('[compute_endpoint_keys] endpoint_keys={:s}'.format(str(endpoint_keys))) + LOGGER.debug('[compute_endpoint_keys] end') + return endpoint_keys + +def compute_device_endpoint_keys( + device_uuid_or_name : str, endpoint_uuid_or_name : str, + device_name_mapping : Dict[str, str], endpoint_name_mapping : Dict[Tuple[str, str], str] +) -> Set[Tuple[str, str]]: + LOGGER.debug('[compute_device_endpoint_keys] begin') + LOGGER.debug('[compute_device_endpoint_keys] device_uuid_or_name={:s}'.format(str(device_uuid_or_name))) + LOGGER.debug('[compute_device_endpoint_keys] endpoint_uuid_or_name={:s}'.format(str(endpoint_uuid_or_name))) + #LOGGER.debug('[compute_device_endpoint_keys] device_name_mapping={:s}'.format(str(device_name_mapping))) + #LOGGER.debug('[compute_device_endpoint_keys] endpoint_name_mapping={:s}'.format(str(endpoint_name_mapping))) + + device_keys = compute_device_keys(device_uuid_or_name, device_name_mapping) + endpoint_keys = compute_endpoint_keys(device_keys, endpoint_uuid_or_name, endpoint_name_mapping) + device_endpoint_keys = set(itertools.product(device_keys, endpoint_keys)) + + LOGGER.debug('[compute_device_endpoint_keys] device_endpoint_keys={:s}'.format(str(device_endpoint_keys))) + LOGGER.debug('[compute_device_endpoint_keys] end') + return device_endpoint_keys + +def generate_neighbor_endpoint_config_rules( + config_rules : List[Dict], path_hops : List[Dict], + device_name_mapping : Dict[str, str], endpoint_name_mapping : Dict[Tuple[str, str], str] +) -> List[Dict]: + LOGGER.debug('[generate_neighbor_endpoint_config_rules] begin') + LOGGER.debug('[generate_neighbor_endpoint_config_rules] config_rules={:s}'.format(str(config_rules))) + LOGGER.debug('[generate_neighbor_endpoint_config_rules] path_hops={:s}'.format(str(path_hops))) + LOGGER.debug('[generate_neighbor_endpoint_config_rules] device_name_mapping={:s}'.format(str(device_name_mapping))) + LOGGER.debug('[generate_neighbor_endpoint_config_rules] endpoint_name_mapping={:s}'.format(str(endpoint_name_mapping))) + + generated_config_rules = list() + for link_endpoint_a, link_endpoint_b in pairwise(path_hops): + LOGGER.debug('[generate_neighbor_endpoint_config_rules] loop begin') + LOGGER.debug('[generate_neighbor_endpoint_config_rules] link_endpoint_a={:s}'.format(str(link_endpoint_a))) + LOGGER.debug('[generate_neighbor_endpoint_config_rules] link_endpoint_b={:s}'.format(str(link_endpoint_b))) + + device_endpoint_keys_a = compute_device_endpoint_keys( + link_endpoint_a['device'], link_endpoint_a['egress_ep'], + device_name_mapping, endpoint_name_mapping + ) + + device_endpoint_keys_b = compute_device_endpoint_keys( + link_endpoint_b['device'], link_endpoint_b['ingress_ep'], + device_name_mapping, endpoint_name_mapping + ) + + for config_rule in config_rules: + # Only applicable, by now, to Custom Config Rules for endpoint settings + if 'custom' not in config_rule: continue + match = RE_ENDPOINT_SETTINGS.match(config_rule['custom']['resource_key']) + if match is None: + match = RE_ENDPOINT_VLAN_SETTINGS.match(config_rule['custom']['resource_key']) + if match is None: continue + + resource_key_values = match.groups() + if resource_key_values[0:2] in device_endpoint_keys_a: + resource_key_values = list(resource_key_values) + resource_key_values[0] = link_endpoint_b['device'] + resource_key_values[1] = link_endpoint_b['ingress_ep'] + elif resource_key_values[0:2] in device_endpoint_keys_b: + resource_key_values = list(resource_key_values) + resource_key_values[0] = link_endpoint_a['device'] + resource_key_values[1] = link_endpoint_a['egress_ep'] + else: + continue + + device_keys = compute_device_keys(resource_key_values[0], device_name_mapping) + device_names = {device_key for device_key in device_keys if RE_UUID.match(device_key) is None} + if len(device_names) != 1: + MSG = 'Unable to identify name for Device({:s}): device_keys({:s})' + raise Exception(MSG.format(str(resource_key_values[0]), str(device_keys))) + resource_key_values[0] = device_names.pop() + + endpoint_keys = compute_endpoint_keys(device_keys, resource_key_values[1], endpoint_name_mapping) + endpoint_names = {endpoint_key for endpoint_key in endpoint_keys if RE_UUID.match(endpoint_key) is None} + if len(endpoint_names) != 1: + MSG = 'Unable to identify name for Endpoint({:s}): endpoint_keys({:s})' + raise Exception(MSG.format(str(resource_key_values[1]), str(endpoint_keys))) + resource_key_values[1] = endpoint_names.pop() + + resource_value : Dict = json.loads(config_rule['custom']['resource_value']) + if 'neighbor_address' not in resource_value: continue + resource_value['ip_address'] = resource_value.pop('neighbor_address') + + # remove neighbor_address also from original rule as it is already consumed + + resource_key_template = TMPL_ENDPOINT_VLAN_SETTINGS if len(match.groups()) == 3 else TMPL_ENDPOINT_SETTINGS + generated_config_rule = copy.deepcopy(config_rule) + generated_config_rule['custom']['resource_key'] = resource_key_template.format(*resource_key_values) + generated_config_rule['custom']['resource_value'] = json.dumps(resource_value) + generated_config_rules.append(generated_config_rule) + + LOGGER.debug('[generate_neighbor_endpoint_config_rules] generated_config_rules={:s}'.format(str(generated_config_rules))) + LOGGER.debug('[generate_neighbor_endpoint_config_rules] end') + return generated_config_rules diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py b/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py index 02765901ec1084e32fde440ff531f035249fc750..c4141c47855140259309efa43edfad35138968c4 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py b/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py index 06b24031bd82b6b51add6569b9c35b360f0491fe..a34798b137fed759837bad04a47212fa867e54dd 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -95,6 +95,36 @@ def convert_explicit_path_hops_to_connections( connections.append(connection) connection_stack.queue[-1][3].append(connection[0]) #connection_stack.queue[-1][2].append(path_hop) + elif prv_res_class[2] is None and res_class[2] is not None: + # entering domain of a device controller, create underlying connection + LOGGER.debug(' entering domain of a device controller, create underlying connection') + sub_service_uuid = str(uuid.uuid4()) + prv_service_type = connection_stack.queue[-1][1] + service_type = get_service_type(res_class[1], prv_service_type) + connection_stack.put((sub_service_uuid, service_type, [path_hop], [])) + elif prv_res_class[2] is not None and res_class[2] is None: + # leaving domain of a device controller, terminate underlying connection + LOGGER.debug(' leaving domain of a device controller, terminate underlying connection') + connection = connection_stack.get() + connections.append(connection) + connection_stack.queue[-1][3].append(connection[0]) + connection_stack.queue[-1][2].append(path_hop) + elif prv_res_class[2] is not None and res_class[2] is not None: + if prv_res_class[2] == res_class[2]: + # stay in domain of a device controller, connection continues + LOGGER.debug(' stay in domain of a device controller, connection continues') + connection_stack.queue[-1][2].append(path_hop) + else: + # switching to different device controller, chain connections + LOGGER.debug(' switching to different device controller, chain connections') + connection = connection_stack.get() + connections.append(connection) + connection_stack.queue[-1][3].append(connection[0]) + + sub_service_uuid = str(uuid.uuid4()) + prv_service_type = connection_stack.queue[-1][1] + service_type = get_service_type(res_class[1], prv_service_type) + connection_stack.put((sub_service_uuid, service_type, [path_hop], [])) elif prv_res_class[0] is None: # path ingress LOGGER.debug(' path ingress') diff --git a/src/pathcomp/frontend/service/algorithms/tools/ConstantsMappings.py b/src/pathcomp/frontend/service/algorithms/tools/ConstantsMappings.py index bd06e6ba19b3da9e2d38d5b83e1d7d3a806ff14f..9f596b4b324b2bf06c58cd9eb6d96c5753257ae4 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ConstantsMappings.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ConstantsMappings.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/algorithms/tools/EroPathToHops.py b/src/pathcomp/frontend/service/algorithms/tools/EroPathToHops.py index c3e1a0d5738bc2fe4706c336b587ece97746da85..a33397bb4e21a50c247b74a1ef6c55c8768e0c7f 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/EroPathToHops.py +++ b/src/pathcomp/frontend/service/algorithms/tools/EroPathToHops.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py b/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py index 843c41803805106e9f7575fb9ff6b1344d036994..185b111657ce0a3964879bb322fe146b9b7811c2 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,6 +24,9 @@ DEVICE_TYPE_TO_DEEPNESS = { DeviceTypeEnum.DATACENTER.value : 90, DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value : 80, + DeviceTypeEnum.EMULATED_IP_SDN_CONTROLLER.value : 80, + DeviceTypeEnum.IP_SDN_CONTROLLER.value : 80, + DeviceTypeEnum.EMULATED_PACKET_ROUTER.value : 70, DeviceTypeEnum.PACKET_ROUTER.value : 70, diff --git a/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py b/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py index 73a741ae551c5179cb78268f6fb87040c8481c53..2792a86639fbd6852a41499e928de7a4131ed408 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ NETWORK_DEVICE_TYPES = { PACKET_DEVICE_TYPES = { DeviceTypeEnum.TERAFLOWSDN_CONTROLLER, + DeviceTypeEnum.IP_SDN_CONTROLLER, DeviceTypeEnum.EMULATED_IP_SDN_CONTROLLER, DeviceTypeEnum.PACKET_ROUTER, DeviceTypeEnum.EMULATED_PACKET_ROUTER, DeviceTypeEnum.PACKET_SWITCH, DeviceTypeEnum.EMULATED_PACKET_SWITCH, } diff --git a/src/pathcomp/frontend/service/algorithms/tools/__init__.py b/src/pathcomp/frontend/service/algorithms/tools/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/__init__.py +++ b/src/pathcomp/frontend/service/algorithms/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/tests/MockService_Dependencies.py b/src/pathcomp/frontend/tests/MockService_Dependencies.py index 858db17a9e35e30ea93c965815b39a068c696b4b..55a28e39405ee2f99806f69cb2cc8f792fd97482 100644 --- a/src/pathcomp/frontend/tests/MockService_Dependencies.py +++ b/src/pathcomp/frontend/tests/MockService_Dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/tests/Objects_A_B_C.py b/src/pathcomp/frontend/tests/Objects_A_B_C.py index 4bd1907cd71530973424d623428d8318acdf8ea9..1be130c7be1525f670e351ff979e2911b6e8f34f 100644 --- a/src/pathcomp/frontend/tests/Objects_A_B_C.py +++ b/src/pathcomp/frontend/tests/Objects_A_B_C.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN.py b/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN.py index 38218e987a2aadf1d3a7152fa64125f606e3f947..7c92179b05ebe3ae7a14f2b302451a86c3c65ea2 100644 --- a/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN.py +++ b/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN_OLS.py b/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN_OLS.py index 3b385412038edfcfa8a1c7c8d5a805c867c69993..2b786119294e6badee097fc35a3a76bfaf301a26 100644 --- a/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN_OLS.py +++ b/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN_OLS.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/tests/PrepareTestScenario.py b/src/pathcomp/frontend/tests/PrepareTestScenario.py index 8cc06349b3dc61fc62a6711d4cb72c09e39c9a64..8b00fb3e81f64467a7c1fedf284a42ba7fa1ef64 100644 --- a/src/pathcomp/frontend/tests/PrepareTestScenario.py +++ b/src/pathcomp/frontend/tests/PrepareTestScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/tests/__init__.py b/src/pathcomp/frontend/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/pathcomp/frontend/tests/__init__.py +++ b/src/pathcomp/frontend/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/tests/test_ero_path.py b/src/pathcomp/frontend/tests/test_ero_path.py index e263544a00e104065495fda3f2c85f1528ad8561..1b80ca83cc567be120ed07df8b4c228ac20052fa 100644 --- a/src/pathcomp/frontend/tests/test_ero_path.py +++ b/src/pathcomp/frontend/tests/test_ero_path.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/tests/test_pathcomp/__init__.py b/src/pathcomp/frontend/tests/test_pathcomp/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/pathcomp/frontend/tests/test_pathcomp/__init__.py +++ b/src/pathcomp/frontend/tests/test_pathcomp/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/tests/test_pathcomp/__main__.py b/src/pathcomp/frontend/tests/test_pathcomp/__main__.py index ba1cc4a2c1838248882b983c1ed25c27b395aa9a..687e9b96dfbdd543b49641f2dd8357c69485d102 100644 --- a/src/pathcomp/frontend/tests/test_pathcomp/__main__.py +++ b/src/pathcomp/frontend/tests/test_pathcomp/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/tests/test_pathcomp/data.py b/src/pathcomp/frontend/tests/test_pathcomp/data.py index aeac5e38a222fb2dfc3f7ae98b2737b47f855ee4..3fc5c6fac2bf2c5739872ec4bc21621599ad7883 100644 --- a/src/pathcomp/frontend/tests/test_pathcomp/data.py +++ b/src/pathcomp/frontend/tests/test_pathcomp/data.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/tests/test_unitary.py b/src/pathcomp/frontend/tests/test_unitary.py index 4d5b3549ba52e3ef448a05c6d137f2a75531f3ea..902b84c63f60a8f47b5fe15ec18278f4392de8f2 100644 --- a/src/pathcomp/frontend/tests/test_unitary.py +++ b/src/pathcomp/frontend/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/frontend/tests/test_unitary_pathcomp_forecaster.py b/src/pathcomp/frontend/tests/test_unitary_pathcomp_forecaster.py index d6d39d3177f1a3d2275a6b48d68478c0a37e9d6a..62750b52519c77e6c00d482f785fc7455b2f3dc2 100644 --- a/src/pathcomp/frontend/tests/test_unitary_pathcomp_forecaster.py +++ b/src/pathcomp/frontend/tests/test_unitary_pathcomp_forecaster.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/misc/my_deploy-tests.sh b/src/pathcomp/misc/my_deploy-tests.sh index a22cc1822287216dd79f88d6076687d868f45276..15ce64cfc31ee2ff42a697d2a3f51e2765d7c45b 100755 --- a/src/pathcomp/misc/my_deploy-tests.sh +++ b/src/pathcomp/misc/my_deploy-tests.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/pathcomp/misc/test-commands.sh b/src/pathcomp/misc/test-commands.sh index c52b6ce50d761cd2d2d469ad5e55c26bfe84a035..f4aefabbb056bc874215f0aa626f826ad103864d 100755 --- a/src/pathcomp/misc/test-commands.sh +++ b/src/pathcomp/misc/test-commands.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/policy/.gitlab-ci.yml b/src/policy/.gitlab-ci.yml index 8c326ff16e77e2bfef7e065b1e11921e65ec8e9b..881da003e198a3bed3c498e2060c2d321a66e857 100644 --- a/src/policy/.gitlab-ci.yml +++ b/src/policy/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ build policy: - export IMAGE_TAG=$(grep -m1 '' ./src/$IMAGE_NAME_POLICY/pom.xml | grep -oP '(?<=>).*(?=<)') - echo "IMAGE_TAG=${IMAGE_TAG}" >> ${BUILD_ENV_POLICY} - cat ${BUILD_ENV_POLICY} - - docker build -t "$IMAGE_NAME_POLICY:$IMAGE_TAG" -f ./src/$IMAGE_NAME_POLICY/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME_POLICY/ --target builder + - docker buildx build -t "$IMAGE_NAME_POLICY:$IMAGE_TAG" -f ./src/$IMAGE_NAME_POLICY/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME_POLICY/ --target builder after_script: - docker images --filter="dangling=true" --quiet | xargs -r docker rmi artifacts: @@ -50,7 +50,7 @@ unit_test policy: - docker rm ${REPORTS_CONTAINER} || true script: - echo "Running tests for image ${IMAGE_TAG}" - - docker build -t "$IMAGE_NAME_POLICY:$IMAGE_TAG" -f ./src/$IMAGE_NAME_POLICY/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME_POLICY/ --target unit-test + - docker buildx build -t "$IMAGE_NAME_POLICY:$IMAGE_TAG" -f ./src/$IMAGE_NAME_POLICY/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME_POLICY/ --target unit-test # Transfer JaCoCo and Surefire reports from within tests image - docker create --name ${REPORTS_CONTAINER} "$IMAGE_NAME_POLICY:$IMAGE_TAG" - mkdir -p ${REPORTS_PATH_POLICY} @@ -60,7 +60,7 @@ unit_test policy: - cat ${REPORTS_PATH_POLICY}/coverage.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/JaCoCo Coverage Total:/' - docker run -v "$(pwd)/src/${IMAGE_NAME_POLICY}:/${IMAGE_NAME_POLICY}" --rm registry.gitlab.com/haynes/jacoco2cobertura:1.0.7 python /opt/cover2cover.py ${IMAGE_NAME_POLICY}/reports/jacoco.xml ${IMAGE_NAME_POLICY}/src/main/java > ${REPORTS_PATH_POLICY}/cobertura.xml # Build final image - - docker build -t "$IMAGE_NAME_POLICY:$IMAGE_TAG" -f ./src/$IMAGE_NAME_POLICY/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME_POLICY/ --target release + - docker buildx build -t "$IMAGE_NAME_POLICY:$IMAGE_TAG" -f ./src/$IMAGE_NAME_POLICY/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME_POLICY/ --target release - docker tag "$IMAGE_NAME_POLICY:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME_POLICY:$IMAGE_TAG" - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME_POLICY:$IMAGE_TAG" after_script: diff --git a/src/policy/.mvn/wrapper/maven-wrapper.properties b/src/policy/.mvn/wrapper/maven-wrapper.properties index ffdc10e59f87823d5abb635aa2e37bf281698e83..abd303b6738e8492a676925355189594fe1528ac 100644 --- a/src/policy/.mvn/wrapper/maven-wrapper.properties +++ b/src/policy/.mvn/wrapper/maven-wrapper.properties @@ -1,2 +1,2 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.2/apache-maven-3.8.2-bin.zip wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/src/policy/pom.xml b/src/policy/pom.xml index 267006311f82c11bce4db29f2d114f30c1832f88..79294fba4020c091ee5234649c788d2ea7e88b56 100644 --- a/src/policy/pom.xml +++ b/src/policy/pom.xml @@ -1,6 +1,6 @@ - 2.2.2.Final + 3.1.3.Final @@ -151,6 +152,13 @@ quarkus-config-yaml + + org.projectlombok + lombok + 1.18.30 + provided + + org.assertj @@ -277,7 +285,7 @@ io.quarkus quarkus-bootstrap-maven-plugin - ${quarkus-maven-plugin.version} + ${quarkus-bootstrap-maven-version} diff --git a/src/policy/src/main/docker/Dockerfile.multistage.jvm b/src/policy/src/main/docker/Dockerfile.multistage.jvm index 2c6412d0766558edf3bb469b17c7f2b6a1c7dd08..9f07d861c2d5b2563c078b9895b470b32984351f 100644 --- a/src/policy/src/main/docker/Dockerfile.multistage.jvm +++ b/src/policy/src/main/docker/Dockerfile.multistage.jvm @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java deleted file mode 100644 index 48ca52dd6e4337441c433cafc1bef8bc4f6eb181..0000000000000000000000000000000000000000 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java +++ /dev/null @@ -1,928 +0,0 @@ -/* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package eu.teraflow.policy; - -import eu.teraflow.policy.context.ContextService; -import eu.teraflow.policy.context.model.ConfigActionEnum; -import eu.teraflow.policy.context.model.ConfigRule; -import eu.teraflow.policy.context.model.ConfigRuleCustom; -import eu.teraflow.policy.context.model.ConfigRuleTypeCustom; -import eu.teraflow.policy.context.model.Constraint; -import eu.teraflow.policy.context.model.ConstraintCustom; -import eu.teraflow.policy.context.model.ConstraintTypeCustom; -import eu.teraflow.policy.context.model.ServiceConfig; -import eu.teraflow.policy.device.DeviceService; -import eu.teraflow.policy.model.BooleanOperator; -import eu.teraflow.policy.model.PolicyRule; -import eu.teraflow.policy.model.PolicyRuleAction; -import eu.teraflow.policy.model.PolicyRuleActionConfig; -import eu.teraflow.policy.model.PolicyRuleActionEnum; -import eu.teraflow.policy.model.PolicyRuleBasic; -import eu.teraflow.policy.model.PolicyRuleCondition; -import eu.teraflow.policy.model.PolicyRuleDevice; -import eu.teraflow.policy.model.PolicyRuleService; -import eu.teraflow.policy.model.PolicyRuleState; -import eu.teraflow.policy.model.PolicyRuleStateEnum; -import eu.teraflow.policy.model.PolicyRuleTypeDevice; -import eu.teraflow.policy.model.PolicyRuleTypeService; -import eu.teraflow.policy.monitoring.MonitoringService; -import eu.teraflow.policy.monitoring.model.AlarmDescriptor; -import eu.teraflow.policy.monitoring.model.AlarmResponse; -import eu.teraflow.policy.monitoring.model.AlarmSubscription; -import eu.teraflow.policy.monitoring.model.KpiValueRange; -import eu.teraflow.policy.service.ServiceService; -import io.smallrye.mutiny.Multi; -import io.smallrye.mutiny.Uni; -import io.smallrye.mutiny.groups.UniJoin; -import io.smallrye.mutiny.subscription.Cancellable; -import java.time.Instant; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Random; -import java.util.concurrent.ConcurrentHashMap; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import org.jboss.logging.Logger; - -@ApplicationScoped -public class PolicyServiceImpl implements PolicyService { - - private static final Logger LOGGER = Logger.getLogger(PolicyServiceImpl.class); - private static final String INVALID_MESSAGE = "%s is invalid."; - private static final String VALID_MESSAGE = "%s is valid."; - private static final int POLICY_EVALUATION_TIMEOUT = 5; - private static final int ACCEPTABLE_NUMBER_OF_ALARMS = 3; - private static final int MONITORING_WINDOW_IN_SECONDS = 5; - private static final int SAMPLING_RATE_PER_SECOND = 1; - // TODO: Find a better way to disregard alarms while reconfiguring path - // Temporary solution for not calling the same rpc more than it's needed - private static int noAlarms = 0; - - private static final PolicyRuleState INSERTED_POLICYRULE_STATE = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_INSERTED, "Successfully entered to INSERTED state"); - private static final PolicyRuleState VALIDATED_POLICYRULE_STATE = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_VALIDATED, "Successfully transitioned to VALIDATED state"); - private static final PolicyRuleState PROVISIONED_POLICYRULE_STATE = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_PROVISIONED, - "Successfully transitioned from VALIDATED to PROVISIONED state"); - private static final PolicyRuleState ACTIVE_POLICYRULE_STATE = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_ACTIVE, - "Successfully transitioned from PROVISIONED to ACTIVE state"); - private static final PolicyRuleState ENFORCED_POLICYRULE_STATE = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_ENFORCED, - "Successfully transitioned from ACTIVE to ENFORCED state"); - private static final PolicyRuleState INEFFECTIVE_POLICYRULE_STATE = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_INEFFECTIVE, - "Transitioned from ENFORCED to INEFFECTIVE state"); - private static final PolicyRuleState EFFECTIVE_POLICYRULE_STATE = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_EFFECTIVE, - "Successfully transitioned from ENFORCED to EFFECTIVE state"); - private static final PolicyRuleState UPDATED_POLICYRULE_STATE = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_UPDATED, "Successfully entered to UPDATED state"); - private static final PolicyRuleState REMOVED_POLICYRULE_STATE = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_REMOVED, "Successfully entered to REMOVED state"); - - private final ContextService contextService; - private final MonitoringService monitoringService; - private final ServiceService serviceService; - private final DeviceService deviceService; - private final PolicyRuleConditionValidator policyRuleConditionValidator; - private final PolicyRuleConditionFieldsGetter policyRuleConditionFieldsGetter; - - private HashMap policyRuleActionMap = new HashMap<>(); - private ConcurrentHashMap alarmPolicyRuleServiceMap = - new ConcurrentHashMap<>(); - private ConcurrentHashMap alarmPolicyRuleDeviceMap = - new ConcurrentHashMap<>(); - private ConcurrentHashMap subscriptionList = new ConcurrentHashMap<>(); - - @Inject - public PolicyServiceImpl( - ContextService contextService, - MonitoringService monitoringService, - ServiceService serviceService, - DeviceService deviceService, - PolicyRuleConditionValidator policyRuleConditionValidator, - PolicyRuleConditionFieldsGetter policyRuleConditionFieldsGetter) { - this.contextService = contextService; - this.monitoringService = monitoringService; - this.serviceService = serviceService; - this.deviceService = deviceService; - this.policyRuleConditionValidator = policyRuleConditionValidator; - this.policyRuleConditionFieldsGetter = policyRuleConditionFieldsGetter; - } - - private static String gen() { - Random r = new Random(System.currentTimeMillis()); - return String.valueOf((1 + r.nextInt(2)) * 10000 + r.nextInt(10000)); - } - - private static double getTimeStamp() { - long now = Instant.now().getEpochSecond(); - return Long.valueOf(now).doubleValue(); - } - - @Override - public Uni addPolicyService(PolicyRuleService policyRuleService) { - LOGGER.infof("Received %s", policyRuleService); - - if (!policyRuleService.areArgumentsValid()) { - LOGGER.error(policyRuleService.getExeceptionMessage()); - final var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, policyRuleService.getExeceptionMessage()); - - return Uni.createFrom().item(policyRuleState); - } - - final var policyRuleBasic = policyRuleService.getPolicyRuleBasic(); - if (!policyRuleBasic.areArgumentsValid()) { - LOGGER.error(policyRuleService.getExeceptionMessage()); - final var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, policyRuleBasic.getExeceptionMessage()); - return Uni.createFrom().item(policyRuleState); - } - - final var serviceId = policyRuleService.getServiceId(); - final var deviceIds = policyRuleService.getDeviceIds(); - final var isServiceValid = policyRuleConditionValidator.isServiceIdValid(serviceId, deviceIds); - - return isServiceValid - .onItem() - .transform( - isService -> { - if (!isService) { - var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, - String.format(INVALID_MESSAGE, serviceId)); - - return policyRuleState; - } - - final var policyRuleTypeService = new PolicyRuleTypeService(policyRuleService); - final var policyRule = new PolicyRule(policyRuleTypeService); - final var alarmDescriptorList = createAlarmDescriptorList(policyRule); - - if (alarmDescriptorList.isEmpty()) { - var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, - String.format( - "Invalid PolicyRuleConditions in PolicyRule with ID: %s", - policyRuleBasic.getPolicyRuleId())); - return policyRuleState; - } else { - contextService - .setPolicyRule(policyRule) - .subscribe() - .with( - policyId -> { - setPolicyRuleServiceToContext( - policyRuleService, VALIDATED_POLICYRULE_STATE); - noAlarms = 0; - - // Create an alarmIds list that contains the promised ids returned from - // setKpiAlarm - List> alarmIds = new ArrayList>(); - for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { - LOGGER.infof("alarmDescriptor:"); - LOGGER.infof(alarmDescriptor.toString()); - alarmIds.add(monitoringService.setKpiAlarm(alarmDescriptor)); - } - // Transform the alarmIds into promised alarms returned from the - // getAlarmResponseStream - List> alarmResponseStreamList = new ArrayList<>(); - for (Uni alarmId : alarmIds) { - alarmResponseStreamList.add( - alarmId - .onItem() - .transformToMulti( - id -> { - alarmPolicyRuleServiceMap.put(id, policyRuleService); - - // TODO: Create infinite subscription - var alarmSubscription = - new AlarmSubscription(id, 259200, 5000); - return monitoringService.getAlarmResponseStream( - alarmSubscription); - })); - } - - // Merge the promised alarms into one stream (Multi Object) - final var multi = - Multi.createBy().merging().streams(alarmResponseStreamList); - setPolicyRuleServiceToContext( - policyRuleService, PROVISIONED_POLICYRULE_STATE); - - subscriptionList.put(policyId, monitorAlarmResponseForService(multi)); - - // TODO: Resubscribe to the stream, if it has ended - - // TODO: Redesign evaluation of action - // evaluateAction(policyRule, alarmDescriptorList, multi); - }); - return VALIDATED_POLICYRULE_STATE; - } - }); - } - - @Override - public Uni addPolicyDevice(PolicyRuleDevice policyRuleDevice) { - LOGGER.infof("Received %s", policyRuleDevice); - - if (!policyRuleDevice.areArgumentsValid()) { - LOGGER.error(policyRuleDevice.getExeceptionMessage()); - final var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, policyRuleDevice.getExeceptionMessage()); - - return Uni.createFrom().item(policyRuleState); - } - - final var policyRuleBasic = policyRuleDevice.getPolicyRuleBasic(); - if (!policyRuleBasic.areArgumentsValid()) { - LOGGER.error(policyRuleDevice.getExeceptionMessage()); - final var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, policyRuleBasic.getExeceptionMessage()); - return Uni.createFrom().item(policyRuleState); - } - - final var deviceIds = policyRuleDevice.getDeviceIds(); - final var areDevicesValid = returnInvalidDeviceIds(deviceIds); - - return areDevicesValid - .onItem() - .transform( - areDevices -> { - if (areDevices.contains(false)) { - var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, - String.format( - INVALID_MESSAGE, - policyRuleDevice.getPolicyRuleBasic().getPolicyRuleId())); - - return policyRuleState; - } - - final var policyRuleTypeDevice = new PolicyRuleTypeDevice(policyRuleDevice); - final var policyRule = new PolicyRule(policyRuleTypeDevice); - - final var alarmDescriptorList = createAlarmDescriptorList(policyRule); - if (alarmDescriptorList.isEmpty()) { - var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, - String.format( - "Invalid PolicyRuleConditions in PolicyRule with ID: %s", - policyRuleBasic.getPolicyRuleId())); - return policyRuleState; - } - - contextService.setPolicyRule(policyRule).subscribe().with(x -> {}); - setPolicyRuleDeviceToContext(policyRuleDevice, VALIDATED_POLICYRULE_STATE); - noAlarms = 0; - - List> alarmIds = new ArrayList>(); - for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { - LOGGER.infof("alarmDescriptor:"); - LOGGER.infof(alarmDescriptor.toString()); - alarmIds.add(monitoringService.setKpiAlarm(alarmDescriptor)); - } - - // Transform the alarmIds into promised alarms returned from the - // getAlarmResponseStream - List> alarmResponseStreamList = new ArrayList<>(); - for (Uni alarmId : alarmIds) { - alarmResponseStreamList.add( - alarmId - .onItem() - .transformToMulti( - id -> { - alarmPolicyRuleDeviceMap.put(id, policyRuleDevice); - - // TODO: Create infinite subscription - var alarmSubscription = new AlarmSubscription(id, 259200, 5000); - return monitoringService.getAlarmResponseStream(alarmSubscription); - })); - } - - // Merge the promised alarms into one stream (Multi Object) - final var multi = Multi.createBy().merging().streams(alarmResponseStreamList); - setPolicyRuleDeviceToContext(policyRuleDevice, PROVISIONED_POLICYRULE_STATE); - - monitorAlarmResponseForDevice(multi); - - // TODO: Resubscribe to the stream, if it has ended - - // TODO: Redesign evaluation of action - // evaluateAction(policyRule, alarmDescriptorList, multi); - - return VALIDATED_POLICYRULE_STATE; - }); - } - - @Override - public Uni updatePolicyService(PolicyRuleService policyRuleService) { - LOGGER.infof("Received %s", policyRuleService); - - if (!policyRuleService.areArgumentsValid()) { - LOGGER.error(policyRuleService.getExeceptionMessage()); - final var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, policyRuleService.getExeceptionMessage()); - - return Uni.createFrom().item(policyRuleState); - } - - final var policyRuleBasic = policyRuleService.getPolicyRuleBasic(); - if (!policyRuleBasic.areArgumentsValid()) { - LOGGER.error(policyRuleService.getExeceptionMessage()); - final var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, policyRuleBasic.getExeceptionMessage()); - return Uni.createFrom().item(policyRuleState); - } - - final var serviceId = policyRuleService.getServiceId(); - final var policyRuleId = policyRuleBasic.getPolicyRuleId(); - final var isPolicyRuleServiceValid = - policyRuleConditionValidator.isPolicyRuleServiceValid(policyRuleId, serviceId); - - return isPolicyRuleServiceValid - .onItem() - .transform( - isPolicyRuleService -> { - if (!isPolicyRuleService) { - return new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, String.format(INVALID_MESSAGE, serviceId)); - } - - return VALIDATED_POLICYRULE_STATE; - }); - } - - @Override - public Uni updatePolicyDevice(PolicyRuleDevice policyRuleDevice) { - LOGGER.infof("Received %s", policyRuleDevice); - - if (!policyRuleDevice.areArgumentsValid()) { - LOGGER.error(policyRuleDevice.getExeceptionMessage()); - final var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, policyRuleDevice.getExeceptionMessage()); - - return Uni.createFrom().item(policyRuleState); - } - - final var policyRuleBasic = policyRuleDevice.getPolicyRuleBasic(); - if (!policyRuleBasic.areArgumentsValid()) { - final var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, policyRuleBasic.getExeceptionMessage()); - return Uni.createFrom().item(policyRuleState); - } - - final var policyRuleId = policyRuleBasic.getPolicyRuleId(); - final var isPolicyRuleValid = - policyRuleConditionValidator.isUpdatedPolicyRuleIdValid(policyRuleId); - - return isPolicyRuleValid - .onItem() - .transform( - isPolicyRuleService -> { - if (!isPolicyRuleService) { - return new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, - String.format(INVALID_MESSAGE, policyRuleId)); - } - - return VALIDATED_POLICYRULE_STATE; - }); - } - - @Override - public Uni deletePolicy(String policyRuleId) { - LOGGER.infof("Received %s", policyRuleId); - - final var getPolicyRule = contextService.getPolicyRule(policyRuleId); - - return getPolicyRule - .onItem() - .transform( - policyRule -> { - var policyRuleBasic = policyRule.getPolicyRuleType().getPolicyRuleBasic(); - String policyId = policyRuleBasic.getPolicyRuleId(); - - policyRule - .getPolicyRuleType() - .getPolicyRuleBasic() - .setPolicyRuleState(REMOVED_POLICYRULE_STATE); - - contextService - .setPolicyRule(policyRule) - .subscribe() - .with( - tmp -> - LOGGER.infof( - "DeletePolicy with id: " + VALID_MESSAGE, - policyRuleBasic.getPolicyRuleId())); - - contextService.removePolicyRule(policyId).subscribe().with(x -> {}); - subscriptionList.get(policyId).cancel(); - - return policyRuleBasic.getPolicyRuleState(); - }); - } - - private Uni> returnInvalidDeviceIds(List deviceIds) { - UniJoin.Builder builder = Uni.join().builder(); - for (String deviceId : deviceIds) { - final var validatedDeviceId = policyRuleConditionValidator.isDeviceIdValid(deviceId); - builder.add(validatedDeviceId); - } - return builder.joinAll().andFailFast(); - } - - private List createAlarmDescriptorList(PolicyRule policyRule) { - final var policyRuleType = policyRule.getPolicyRuleType(); - final var policyRuleTypeSpecificType = policyRuleType.getPolicyRuleType(); - - List alarmDescriptorList = new ArrayList<>(); - if (policyRuleTypeSpecificType instanceof PolicyRuleService) { - final var policyRuleService = (PolicyRuleService) policyRuleTypeSpecificType; - final var policyRuleBasic = policyRuleService.getPolicyRuleBasic(); - - alarmDescriptorList = parsePolicyRuleCondition(policyRuleBasic); - if (alarmDescriptorList.isEmpty()) { - return List.of(); - } - } else { - final var policyRuleDevice = (PolicyRuleDevice) policyRuleTypeSpecificType; - final var policyRuleBasic = policyRuleDevice.getPolicyRuleBasic(); - - alarmDescriptorList = parsePolicyRuleCondition(policyRuleBasic); - if (alarmDescriptorList.isEmpty()) { - return List.of(); - } - for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { - alarmPolicyRuleDeviceMap.put(alarmDescriptor.getAlarmId(), policyRuleDevice); - } - } - - return alarmDescriptorList; - } - - private Cancellable monitorAlarmResponseForService(Multi multi) { - return multi - .subscribe() - .with( - alarmResponse -> { - LOGGER.infof("**************************Received Alarm!**************************"); - LOGGER.infof("alarmResponse:"); - LOGGER.info(alarmResponse); - LOGGER.info(alarmResponse.getAlarmId()); - applyActionService(alarmResponse.getAlarmId()); - }); - } - - private void monitorAlarmResponseForDevice(Multi multi) { - multi - .subscribe() - .with( - alarmResponse -> { - LOGGER.infof("**************************Received Alarm!**************************"); - LOGGER.infof("alarmResponse:"); - LOGGER.info(alarmResponse); - LOGGER.info(alarmResponse.getAlarmId()); - applyActionDevice(alarmResponse.getAlarmId()); - }); - } - - // TODO: To be refactored or deprecated - // private void evaluateAction( - // PolicyRule policyRule, - // List alarmDescriptorList, - // Multi multi) { - // - // Long count = - // multi - // .collect() - // .with(Collectors.counting()) - // .await() - // .atMost(Duration.ofMinutes(POLICY_EVALUATION_TIMEOUT)); - // - // if (count > ACCEPTABLE_NUMBER_OF_ALARMS) { - // for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { - // monitoringService - // .deleteAlarm(alarmDescriptor.getAlarmId()) - // .subscribe() - // .with( - // emptyMessage -> - // LOGGER.infof( - // "Alarm [%s] has been deleted as ineffective.\n", - // alarmDescriptor.getAlarmId())); - // } - // setPolicyRuleToContext(policyRule, INEFFECTIVE_POLICYRULE_STATE); - // } else { - // setPolicyRuleToContext(policyRule, EFFECTIVE_POLICYRULE_STATE); - // } - // } - - private void applyActionDevice(String alarmId) { - PolicyRuleDevice policyRuleDevice = alarmPolicyRuleDeviceMap.get(alarmId); - - if (policyRuleActionMap.get(alarmId).getPolicyRuleActionEnum() - == PolicyRuleActionEnum.POLICY_RULE_ACTION_SET_DEVICE_STATUS) { - // In case additional PolicyRuleAction for Devices will be added - } - - setPolicyRuleDeviceToContext(policyRuleDevice, ACTIVE_POLICYRULE_STATE); - - List deviceIds = policyRuleDevice.getDeviceIds(); - List actionConfigs = - policyRuleActionMap.get(alarmId).getPolicyRuleActionConfigs(); - - if (deviceIds.size() != actionConfigs.size()) { - String message = - String.format( - "The number of action parameters in PolicyRuleDevice with ID: %s, is not aligned with the number of devices.", - policyRuleDevice.getPolicyRuleBasic().getPolicyRuleId()); - setPolicyRuleDeviceToContext( - policyRuleDevice, new PolicyRuleState(PolicyRuleStateEnum.POLICY_FAILED, message)); - return; - } - - for (var i = 0; i < deviceIds.size(); i++) { - activateDevice(deviceIds.get(i), actionConfigs.get(i)); - } - - setPolicyRuleDeviceToContext(policyRuleDevice, ENFORCED_POLICYRULE_STATE); - } - - private void activateDevice(String deviceId, PolicyRuleActionConfig actionConfig) { - - Boolean toBeEnabled; - if (actionConfig.getActionKey() == "ENABLED") { - toBeEnabled = true; - } else if (actionConfig.getActionKey() == "DISABLED") { - toBeEnabled = false; - } else { - LOGGER.errorf(INVALID_MESSAGE, actionConfig.getActionKey()); - return; - } - - final var deserializedDeviceUni = contextService.getDevice(deviceId); - - deserializedDeviceUni - .subscribe() - .with( - device -> { - if (toBeEnabled && device.isDisabled()) { - device.enableDevice(); - } else if (!toBeEnabled && device.isEnabled()) { - device.disableDevice(); - } else { - LOGGER.errorf(INVALID_MESSAGE, "Device is already in the desired state"); - return; - } - - deviceService.configureDevice(device); - }); - } - - private void addServiceConfigRule( - PolicyRuleService policyRuleService, PolicyRuleAction policyRuleAction) { - - ConfigActionEnum configActionEnum = ConfigActionEnum.SET; - List actionConfigs = policyRuleAction.getPolicyRuleActionConfigs(); - List newConfigRules = new ArrayList<>(); - - for (PolicyRuleActionConfig actionConfig : actionConfigs) { - ConfigRuleCustom configRuleCustom = - new ConfigRuleCustom(actionConfig.getActionKey(), actionConfig.getActionValue()); - ConfigRuleTypeCustom configRuleType = new ConfigRuleTypeCustom(configRuleCustom); - ConfigRule configRule = new ConfigRule(configActionEnum, configRuleType); - newConfigRules.add(configRule); - } - - var deserializedServiceUni = contextService.getService(policyRuleService.getServiceId()); - deserializedServiceUni - .subscribe() - .with( - deserializedService -> { - List configRules = - deserializedService.getServiceConfig().getConfigRules(); - configRules.addAll(newConfigRules); - deserializedService.setServiceConfig(new ServiceConfig(configRules)); - }); - } - - private void addServiceConstraint( - PolicyRuleService policyRuleService, PolicyRuleAction policyRuleAction) { - - List actionConfigs = policyRuleAction.getPolicyRuleActionConfigs(); - List constraintList = new ArrayList<>(); - - for (PolicyRuleActionConfig actionConfig : actionConfigs) { - var constraintCustom = - new ConstraintCustom(actionConfig.getActionKey(), actionConfig.getActionValue()); - var constraintTypeCustom = new ConstraintTypeCustom(constraintCustom); - constraintList.add(new Constraint(constraintTypeCustom)); - } - - final var deserializedServiceUni = contextService.getService(policyRuleService.getServiceId()); - - deserializedServiceUni - .subscribe() - .with( - deserializedService -> { - deserializedService.appendServiceConstraints(constraintList); - serviceService.updateService(deserializedService); - setPolicyRuleServiceToContext(policyRuleService, ENFORCED_POLICYRULE_STATE); - }); - } - - private void callRecalculatePathRPC( - PolicyRuleService policyRuleService, PolicyRuleAction policyRuleAction) { - - final var deserializedServiceUni = contextService.getService(policyRuleService.getServiceId()); - - deserializedServiceUni - .subscribe() - .with( - deserializedService -> { - serviceService - .recomputeConnections(deserializedService) - .subscribe() - .with( - x -> { - LOGGER.info("called recomputeConnections with:"); - LOGGER.info(deserializedService); - setPolicyRuleServiceToContext(policyRuleService, ENFORCED_POLICYRULE_STATE); - }); - }); - } - - private void applyActionService(String alarmId) { - PolicyRuleService policyRuleService = alarmPolicyRuleServiceMap.get(alarmId); - PolicyRuleAction policyRuleAction = - policyRuleService.getPolicyRuleBasic().getPolicyRuleActions().get(0); - - if (noAlarms == 0) { - noAlarms++; - 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; - } - } else if (noAlarms == 2) { - noAlarms = 0; - } else { - noAlarms++; - } - } - - private List parsePolicyRuleCondition(PolicyRuleBasic policyRuleBasic) { - BooleanOperator booleanOperator = policyRuleBasic.getBooleanOperator(); - if (booleanOperator == BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_OR) { - return parsePolicyRuleConditionOr(policyRuleBasic); - } - if (booleanOperator == BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_AND) { - return Arrays.asList(parsePolicyRuleConditionAnd(policyRuleBasic)); - } - return List.of(); - } - - private List parsePolicyRuleConditionOr(PolicyRuleBasic policyRuleBasic) { - - List policyRuleConditions = policyRuleBasic.getPolicyRuleConditions(); - List alarmDescriptorList = new ArrayList<>(); - - for (PolicyRuleCondition policyRuleCondition : policyRuleConditions) { - var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); - - // TODO: Temp fix for AlarmDescriptor object - AlarmDescriptor alarmDescriptor = - new AlarmDescriptor( - "", - "alarmDescription", - "alarmName-" + gen(), - policyRuleCondition.getKpiId(), - kpiValueRange, - getTimeStamp()); - - alarmDescriptorList.add(alarmDescriptor); - } - - HashMap policyRuleActionMap = new HashMap<>(); - List policyRuleActions = policyRuleBasic.getPolicyRuleActions(); - - for (int i = 0; i < policyRuleActions.size(); i++) { - policyRuleActionMap.put(alarmDescriptorList.get(i).getAlarmId(), policyRuleActions.get(i)); - } - - return alarmDescriptorList; - } - - private AlarmDescriptor parsePolicyRuleConditionAnd(PolicyRuleBasic policyRuleBasic) { - - // TODO: KpiIds should be the same. Add check. - - List policyRuleConditionList = policyRuleBasic.getPolicyRuleConditions(); - List kpisList = new ArrayList(); - - for (PolicyRuleCondition policyRuleCondition : policyRuleConditionList) { - kpisList.add(policyRuleCondition.getKpiId()); - } - - if (policyRuleConditionList.size() > 1) { - return createAlarmDescriptorWithRange(policyRuleConditionList); - } - - return createAlarmDescriptorWithoutRange(policyRuleConditionList.get(0)); - } - - private AlarmDescriptor createAlarmDescriptorWithoutRange( - PolicyRuleCondition policyRuleCondition) { - - final var kpiId = policyRuleCondition.getKpiId(); - final var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); - - return new AlarmDescriptor( - "", "alarmDescription", "alarmName-" + gen(), kpiId, kpiValueRange, getTimeStamp()); - } - - private AlarmDescriptor createAlarmDescriptorWithRange( - List policyRuleConditionList) { - - final var kpiId = policyRuleConditionList.get(0).getKpiId(); - - HashMap KpiValueRangeMap = new HashMap<>(); - for (PolicyRuleCondition policyRuleCondition : policyRuleConditionList) { - - if (!KpiValueRangeMap.containsKey(kpiId)) { - var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); - KpiValueRangeMap.put(kpiId, kpiValueRange); - continue; - } - - var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); - // TODO: Handle combineKpiValueRanges exceptions - var combinedKpiValueRange = - combineKpiValueRanges(kpiId, KpiValueRangeMap.get(kpiId), kpiValueRange); - KpiValueRangeMap.put(kpiId, combinedKpiValueRange); - } - - return new AlarmDescriptor( - "", - "alarmDescription", - "alarmName-" + gen(), - kpiId, - KpiValueRangeMap.get(kpiId), - getTimeStamp()); - } - - private KpiValueRange convertPolicyRuleConditionToKpiValueRange( - PolicyRuleCondition policyRuleCondition) { - - switch (policyRuleCondition.getNumericalOperator()) { - case POLICY_RULE_CONDITION_NUMERICAL_EQUAL: - return new KpiValueRange( - policyRuleCondition.getKpiValue(), policyRuleCondition.getKpiValue(), true, true, true); - case POLICY_RULE_CONDITION_NUMERICAL_NOT_EQUAL: - return new KpiValueRange( - policyRuleCondition.getKpiValue(), - policyRuleCondition.getKpiValue(), - true, - false, - false); - - case POLICY_RULE_CONDITION_NUMERICAL_GREATER_THAN: - return new KpiValueRange(null, policyRuleCondition.getKpiValue(), true, false, false); - - case POLICY_RULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL: - return new KpiValueRange(null, policyRuleCondition.getKpiValue(), true, true, false); - - case POLICY_RULE_CONDITION_NUMERICAL_LESS_THAN: - return new KpiValueRange(policyRuleCondition.getKpiValue(), null, true, false, false); - - case POLICY_RULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL: - return new KpiValueRange(policyRuleCondition.getKpiValue(), null, true, false, true); - default: - return null; - } - } - - private KpiValueRange combineKpiValueRanges( - String kpiId, KpiValueRange firstKpiValueRange, KpiValueRange secondKpiValueRange) { - if (secondKpiValueRange.getInRange() == true) { - LOGGER.errorf("KpiId: %s, has already range values", kpiId); - return null; - } - - if ((firstKpiValueRange.getKpiMinValue() != null) - && (secondKpiValueRange.getKpiMinValue() != null)) { - LOGGER.errorf("KpiId: %s, has already min value", kpiId); - return null; - } - - if ((firstKpiValueRange.getKpiMaxValue() != null) - && (secondKpiValueRange.getKpiMinValue() != null)) { - LOGGER.errorf("KpiId: %s, has already max value", kpiId); - return null; - } - - // Objects.nonNull(secondKpiValueRange); - - var kpiMinValue = - firstKpiValueRange.getKpiMinValue() != null - ? firstKpiValueRange.getKpiMinValue() - : secondKpiValueRange.getKpiMinValue(); - var kpiMaxValue = - firstKpiValueRange.getKpiMaxValue() != null - ? firstKpiValueRange.getKpiMaxValue() - : secondKpiValueRange.getKpiMaxValue(); - boolean includeMinValue = - firstKpiValueRange.getIncludeMinValue() || secondKpiValueRange.getIncludeMinValue(); - boolean includeMaxValue = - firstKpiValueRange.getIncludeMaxValue() || secondKpiValueRange.getIncludeMaxValue(); - - return new KpiValueRange(kpiMinValue, kpiMaxValue, true, includeMinValue, includeMaxValue); - } - - private void setPolicyRuleToContext(PolicyRule policyRule, PolicyRuleState policyRuleState) { - final var policyRuleType = policyRule.getPolicyRuleType(); - final var policyRuleTypeSpecificType = policyRuleType.getPolicyRuleType(); - - if (policyRuleTypeSpecificType instanceof PolicyRuleService) { - setPolicyRuleServiceToContext( - (PolicyRuleService) policyRuleTypeSpecificType, policyRuleState); - } - if (policyRuleTypeSpecificType instanceof PolicyRuleDevice) { - setPolicyRuleDeviceToContext((PolicyRuleDevice) policyRuleTypeSpecificType, policyRuleState); - } - } - - private void setPolicyRuleServiceToContext( - PolicyRuleService policyRuleService, PolicyRuleState policyRuleState) { - LOGGER.infof("Setting Policy Rule state to [%s]", policyRuleState.toString()); - - final var policyRuleBasic = policyRuleService.getPolicyRuleBasic(); - policyRuleBasic.setPolicyRuleState(policyRuleState); - policyRuleService.setPolicyRuleBasic(policyRuleBasic); - - final var policyRuleTypeService = new PolicyRuleTypeService(policyRuleService); - final var policyRule = new PolicyRule(policyRuleTypeService); - contextService.setPolicyRule(policyRule).subscribe().with(x -> {}); - } - - private void setPolicyRuleDeviceToContext( - PolicyRuleDevice policyRuleDevice, PolicyRuleState policyRuleState) { - LOGGER.infof("Setting Policy Rule state to [%s]", policyRuleState.toString()); - - final var policyRuleBasic = policyRuleDevice.getPolicyRuleBasic(); - policyRuleBasic.setPolicyRuleState(policyRuleState); - policyRuleDevice.setPolicyRuleBasic(policyRuleBasic); - - final var policyRuleTypeService = new PolicyRuleTypeDevice(policyRuleDevice); - final var policyRule = new PolicyRule(policyRuleTypeService); - contextService.setPolicyRule(policyRule).subscribe().with(x -> {}); - } -} diff --git a/src/policy/src/main/java/eu/teraflow/policy/Serializer.java b/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java similarity index 95% rename from src/policy/src/main/java/eu/teraflow/policy/Serializer.java rename to src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java index 4f0c600923b6004d3e4e260d9dad973d1396830c..654e7b6ce1d68f6facaec8c772e16dde68e710f0 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/Serializer.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; import acl.Acl; import context.ContextOuterClass; @@ -25,82 +25,96 @@ import context.ContextOuterClass.DeviceId; import context.ContextOuterClass.DeviceOperationalStatusEnum; import context.ContextOuterClass.Location.LocationCase; import context.ContextOuterClass.Uuid; -import eu.teraflow.policy.acl.AclAction; -import eu.teraflow.policy.acl.AclEntry; -import eu.teraflow.policy.acl.AclForwardActionEnum; -import eu.teraflow.policy.acl.AclLogActionEnum; -import eu.teraflow.policy.acl.AclMatch; -import eu.teraflow.policy.acl.AclRuleSet; -import eu.teraflow.policy.acl.AclRuleTypeEnum; -import eu.teraflow.policy.context.model.ConfigActionEnum; -import eu.teraflow.policy.context.model.ConfigRule; -import eu.teraflow.policy.context.model.ConfigRuleAcl; -import eu.teraflow.policy.context.model.ConfigRuleCustom; -import eu.teraflow.policy.context.model.ConfigRuleTypeAcl; -import eu.teraflow.policy.context.model.ConfigRuleTypeCustom; -import eu.teraflow.policy.context.model.Constraint; -import eu.teraflow.policy.context.model.ConstraintCustom; -import eu.teraflow.policy.context.model.ConstraintEndPointLocation; -import eu.teraflow.policy.context.model.ConstraintSchedule; -import eu.teraflow.policy.context.model.ConstraintSlaAvailability; -import eu.teraflow.policy.context.model.ConstraintSlaCapacity; -import eu.teraflow.policy.context.model.ConstraintSlaIsolationLevel; -import eu.teraflow.policy.context.model.ConstraintSlaLatency; -import eu.teraflow.policy.context.model.ConstraintTypeCustom; -import eu.teraflow.policy.context.model.ConstraintTypeEndPointLocation; -import eu.teraflow.policy.context.model.ConstraintTypeSchedule; -import eu.teraflow.policy.context.model.ConstraintTypeSlaAvailability; -import eu.teraflow.policy.context.model.ConstraintTypeSlaCapacity; -import eu.teraflow.policy.context.model.ConstraintTypeSlaIsolationLevel; -import eu.teraflow.policy.context.model.ConstraintTypeSlaLatency; -import eu.teraflow.policy.context.model.Device; -import eu.teraflow.policy.context.model.DeviceConfig; -import eu.teraflow.policy.context.model.DeviceDriverEnum; -import eu.teraflow.policy.context.model.DeviceOperationalStatus; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.context.model.EndPoint; -import eu.teraflow.policy.context.model.EndPointId; -import eu.teraflow.policy.context.model.Event; -import eu.teraflow.policy.context.model.EventTypeEnum; -import eu.teraflow.policy.context.model.GpsPosition; -import eu.teraflow.policy.context.model.IsolationLevelEnum; -import eu.teraflow.policy.context.model.Location; -import eu.teraflow.policy.context.model.LocationTypeGpsPosition; -import eu.teraflow.policy.context.model.LocationTypeRegion; -import eu.teraflow.policy.context.model.Service; -import eu.teraflow.policy.context.model.ServiceConfig; -import eu.teraflow.policy.context.model.ServiceId; -import eu.teraflow.policy.context.model.ServiceStatus; -import eu.teraflow.policy.context.model.ServiceStatusEnum; -import eu.teraflow.policy.context.model.ServiceTypeEnum; -import eu.teraflow.policy.context.model.SliceId; -import eu.teraflow.policy.context.model.TopologyId; -import eu.teraflow.policy.kpi_sample_types.model.KpiSampleType; -import eu.teraflow.policy.model.*; -import eu.teraflow.policy.monitoring.model.AlarmDescriptor; -import eu.teraflow.policy.monitoring.model.AlarmResponse; -import eu.teraflow.policy.monitoring.model.AlarmSubscription; -import eu.teraflow.policy.monitoring.model.BooleanKpiValue; -import eu.teraflow.policy.monitoring.model.FloatKpiValue; -import eu.teraflow.policy.monitoring.model.IntegerKpiValue; -import eu.teraflow.policy.monitoring.model.Kpi; -import eu.teraflow.policy.monitoring.model.KpiDescriptor; -import eu.teraflow.policy.monitoring.model.KpiValue; -import eu.teraflow.policy.monitoring.model.KpiValueRange; -import eu.teraflow.policy.monitoring.model.LongKpiValue; -import eu.teraflow.policy.monitoring.model.MonitorKpiRequest; -import eu.teraflow.policy.monitoring.model.StringKpiValue; -import eu.teraflow.policy.monitoring.model.SubsDescriptor; -import eu.teraflow.policy.monitoring.model.SubsResponse; +import jakarta.inject.Singleton; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; -import javax.inject.Singleton; import kpi_sample_types.KpiSampleTypes; import monitoring.Monitoring; import monitoring.Monitoring.AlarmID; import monitoring.Monitoring.KpiId; import monitoring.Monitoring.SubscriptionID; +import org.etsi.tfs.policy.acl.AclAction; +import org.etsi.tfs.policy.acl.AclEntry; +import org.etsi.tfs.policy.acl.AclForwardActionEnum; +import org.etsi.tfs.policy.acl.AclLogActionEnum; +import org.etsi.tfs.policy.acl.AclMatch; +import org.etsi.tfs.policy.acl.AclRuleSet; +import org.etsi.tfs.policy.acl.AclRuleTypeEnum; +import org.etsi.tfs.policy.context.model.ConfigActionEnum; +import org.etsi.tfs.policy.context.model.ConfigRule; +import org.etsi.tfs.policy.context.model.ConfigRuleAcl; +import org.etsi.tfs.policy.context.model.ConfigRuleCustom; +import org.etsi.tfs.policy.context.model.ConfigRuleTypeAcl; +import org.etsi.tfs.policy.context.model.ConfigRuleTypeCustom; +import org.etsi.tfs.policy.context.model.Constraint; +import org.etsi.tfs.policy.context.model.ConstraintCustom; +import org.etsi.tfs.policy.context.model.ConstraintEndPointLocation; +import org.etsi.tfs.policy.context.model.ConstraintSchedule; +import org.etsi.tfs.policy.context.model.ConstraintSlaAvailability; +import org.etsi.tfs.policy.context.model.ConstraintSlaCapacity; +import org.etsi.tfs.policy.context.model.ConstraintSlaIsolationLevel; +import org.etsi.tfs.policy.context.model.ConstraintSlaLatency; +import org.etsi.tfs.policy.context.model.ConstraintTypeCustom; +import org.etsi.tfs.policy.context.model.ConstraintTypeEndPointLocation; +import org.etsi.tfs.policy.context.model.ConstraintTypeSchedule; +import org.etsi.tfs.policy.context.model.ConstraintTypeSlaAvailability; +import org.etsi.tfs.policy.context.model.ConstraintTypeSlaCapacity; +import org.etsi.tfs.policy.context.model.ConstraintTypeSlaIsolationLevel; +import org.etsi.tfs.policy.context.model.ConstraintTypeSlaLatency; +import org.etsi.tfs.policy.context.model.Device; +import org.etsi.tfs.policy.context.model.DeviceConfig; +import org.etsi.tfs.policy.context.model.DeviceDriverEnum; +import org.etsi.tfs.policy.context.model.DeviceOperationalStatus; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.context.model.EndPoint; +import org.etsi.tfs.policy.context.model.EndPointId; +import org.etsi.tfs.policy.context.model.Event; +import org.etsi.tfs.policy.context.model.EventTypeEnum; +import org.etsi.tfs.policy.context.model.GpsPosition; +import org.etsi.tfs.policy.context.model.IsolationLevelEnum; +import org.etsi.tfs.policy.context.model.Location; +import org.etsi.tfs.policy.context.model.LocationTypeGpsPosition; +import org.etsi.tfs.policy.context.model.LocationTypeRegion; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceConfig; +import org.etsi.tfs.policy.context.model.ServiceId; +import org.etsi.tfs.policy.context.model.ServiceStatus; +import org.etsi.tfs.policy.context.model.ServiceStatusEnum; +import org.etsi.tfs.policy.context.model.ServiceTypeEnum; +import org.etsi.tfs.policy.context.model.SliceId; +import org.etsi.tfs.policy.context.model.TopologyId; +import org.etsi.tfs.policy.kpi_sample_types.model.KpiSampleType; +import org.etsi.tfs.policy.monitoring.model.AlarmDescriptor; +import org.etsi.tfs.policy.monitoring.model.AlarmResponse; +import org.etsi.tfs.policy.monitoring.model.AlarmSubscription; +import org.etsi.tfs.policy.monitoring.model.BooleanKpiValue; +import org.etsi.tfs.policy.monitoring.model.FloatKpiValue; +import org.etsi.tfs.policy.monitoring.model.IntegerKpiValue; +import org.etsi.tfs.policy.monitoring.model.Kpi; +import org.etsi.tfs.policy.monitoring.model.KpiDescriptor; +import org.etsi.tfs.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.monitoring.model.KpiValueRange; +import org.etsi.tfs.policy.monitoring.model.LongKpiValue; +import org.etsi.tfs.policy.monitoring.model.MonitorKpiRequest; +import org.etsi.tfs.policy.monitoring.model.StringKpiValue; +import org.etsi.tfs.policy.monitoring.model.SubsDescriptor; +import org.etsi.tfs.policy.monitoring.model.SubsResponse; +import org.etsi.tfs.policy.policy.model.*; +import org.etsi.tfs.policy.policy.model.BooleanOperator; +import org.etsi.tfs.policy.policy.model.NumericalOperator; +import org.etsi.tfs.policy.policy.model.PolicyRule; +import org.etsi.tfs.policy.policy.model.PolicyRuleAction; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; +import org.etsi.tfs.policy.policy.model.PolicyRuleDevice; +import org.etsi.tfs.policy.policy.model.PolicyRuleService; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleTypeDevice; +import org.etsi.tfs.policy.policy.model.PolicyRuleTypeService; import policy.Policy; import policy.Policy.PolicyRuleId; import policy.PolicyAction; @@ -2284,6 +2298,12 @@ public class Serializer { return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_XR; case IETF_L2VPN: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN; + case GNMI_OPENCONFIG: + return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG; + case OPTICAL_TFS: + return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS; + case IETF_ACTN: + return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN; case UNDEFINED: default: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_UNDEFINED; @@ -2307,6 +2327,12 @@ public class Serializer { return DeviceDriverEnum.XR; case DEVICEDRIVER_IETF_L2VPN: return DeviceDriverEnum.IETF_L2VPN; + case DEVICEDRIVER_GNMI_OPENCONFIG: + return DeviceDriverEnum.GNMI_OPENCONFIG; + case DEVICEDRIVER_OPTICAL_TFS: + return DeviceDriverEnum.OPTICAL_TFS; + case DEVICEDRIVER_IETF_ACTN: + return DeviceDriverEnum.IETF_ACTN; case DEVICEDRIVER_UNDEFINED: case UNRECOGNIZED: default: diff --git a/src/policy/src/main/java/eu/teraflow/policy/SimpleLivenessCheck.java b/src/policy/src/main/java/org/etsi/tfs/policy/SimpleLivenessCheck.java similarity index 85% rename from src/policy/src/main/java/eu/teraflow/policy/SimpleLivenessCheck.java rename to src/policy/src/main/java/org/etsi/tfs/policy/SimpleLivenessCheck.java index ec0859cb73fca89ec8c0b0d2651f5752baa8c590..31f5584ef475f4ec06d295c423480ecb3df3ef3d 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/SimpleLivenessCheck.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/SimpleLivenessCheck.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,9 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.eclipse.microprofile.health.HealthCheck; import org.eclipse.microprofile.health.HealthCheckResponse; import org.eclipse.microprofile.health.Liveness; diff --git a/src/policy/src/main/java/eu/teraflow/policy/SimpleReadinessCheck.java b/src/policy/src/main/java/org/etsi/tfs/policy/SimpleReadinessCheck.java similarity index 85% rename from src/policy/src/main/java/eu/teraflow/policy/SimpleReadinessCheck.java rename to src/policy/src/main/java/org/etsi/tfs/policy/SimpleReadinessCheck.java index 7bbfd38c3f8abff20daaf5633de79237db54b9c6..83968b386836bbbe7e67b756077edd69ecada16b 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/SimpleReadinessCheck.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/SimpleReadinessCheck.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,9 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.eclipse.microprofile.health.HealthCheck; import org.eclipse.microprofile.health.HealthCheckResponse; import org.eclipse.microprofile.health.Readiness; diff --git a/src/policy/src/main/java/eu/teraflow/policy/acl/AclAction.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclAction.java similarity index 92% rename from src/policy/src/main/java/eu/teraflow/policy/acl/AclAction.java rename to src/policy/src/main/java/org/etsi/tfs/policy/acl/AclAction.java index eb2fdc33be1b4d20020fe68b2fb29845a265c09a..7d46f1d41dfa2a265501767a233fa8d7bdbb57f4 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/acl/AclAction.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclAction.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.acl; +package org.etsi.tfs.policy.acl; public class AclAction { diff --git a/src/policy/src/main/java/eu/teraflow/policy/acl/AclEntry.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclEntry.java similarity index 93% rename from src/policy/src/main/java/eu/teraflow/policy/acl/AclEntry.java rename to src/policy/src/main/java/org/etsi/tfs/policy/acl/AclEntry.java index 08ff7b0add7bf1a4531790b81b5a5780e03f920a..a9d6e1fc8f7caac1e7e1f95d6a8228530cbf62d5 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/acl/AclEntry.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclEntry.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.acl; +package org.etsi.tfs.policy.acl; public class AclEntry { diff --git a/src/policy/src/main/java/eu/teraflow/policy/acl/AclForwardActionEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclForwardActionEnum.java similarity index 85% rename from src/policy/src/main/java/eu/teraflow/policy/acl/AclForwardActionEnum.java rename to src/policy/src/main/java/org/etsi/tfs/policy/acl/AclForwardActionEnum.java index b42fe12e6af90881035686c7166cd0d03f9b063a..d6c5654a54c258d69690b779657fd130dce31857 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/acl/AclForwardActionEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclForwardActionEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.acl; +package org.etsi.tfs.policy.acl; public enum AclForwardActionEnum { UNDEFINED, diff --git a/src/policy/src/main/java/eu/teraflow/policy/acl/AclLogActionEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclLogActionEnum.java similarity index 85% rename from src/policy/src/main/java/eu/teraflow/policy/acl/AclLogActionEnum.java rename to src/policy/src/main/java/org/etsi/tfs/policy/acl/AclLogActionEnum.java index df814f35d7694403a54bb509340fed7efdd07bc0..135ff4336b499970f0b5a322787df775c170ab4e 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/acl/AclLogActionEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclLogActionEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.acl; +package org.etsi.tfs.policy.acl; public enum AclLogActionEnum { UNDEFINED, diff --git a/src/policy/src/main/java/eu/teraflow/policy/acl/AclMatch.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclMatch.java similarity index 95% rename from src/policy/src/main/java/eu/teraflow/policy/acl/AclMatch.java rename to src/policy/src/main/java/org/etsi/tfs/policy/acl/AclMatch.java index b6ec8ff76de2f900f2080560369da08c23281f97..6115f2d2f01d295f5cf3dc113e21661ec37aa57f 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/acl/AclMatch.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclMatch.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.acl; +package org.etsi.tfs.policy.acl; public class AclMatch { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclRuleSet.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleSet.java similarity index 92% rename from src/ztp/src/main/java/eu/teraflow/ztp/acl/AclRuleSet.java rename to src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleSet.java index 2c5efbd383092ba4b2d3153052ad586d17ee2486..e01c325fd8974854e0ea3d07c179618778e1f7fb 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclRuleSet.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleSet.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.ztp.acl; +package org.etsi.tfs.policy.acl; -import eu.teraflow.ztp.common.Util; import java.util.List; +import org.etsi.tfs.policy.common.Util; public class AclRuleSet { diff --git a/src/policy/src/main/java/eu/teraflow/policy/acl/AclRuleTypeEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleTypeEnum.java similarity index 85% rename from src/policy/src/main/java/eu/teraflow/policy/acl/AclRuleTypeEnum.java rename to src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleTypeEnum.java index 70788feda321df6d01cea25315d4440ccc05c551..2b6779f3ebc3e0563c99e3cea47d4c8de2b05f17 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/acl/AclRuleTypeEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleTypeEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.acl; +package org.etsi.tfs.policy.acl; public enum AclRuleTypeEnum { UNDEFINED, 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 new file mode 100644 index 0000000000000000000000000000000000000000..4b890485e854feaf093cb51141c2ed352c33cbd4 --- /dev/null +++ b/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java @@ -0,0 +1,59 @@ +/* +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY 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; + +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; + +public class ApplicationProperties { + + public static final String INVALID_MESSAGE = "%s is invalid."; + public static final String VALID_MESSAGE = "%s is valid."; + + public static final PolicyRuleState INSERTED_POLICYRULE_STATE = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_INSERTED, "Successfully entered to INSERTED state"); + public static final PolicyRuleState VALIDATED_POLICYRULE_STATE = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_VALIDATED, "Successfully transitioned to VALIDATED state"); + public static final PolicyRuleState PROVISIONED_POLICYRULE_STATE = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_PROVISIONED, + "Successfully transitioned from VALIDATED to PROVISIONED state"); + public static final PolicyRuleState ACTIVE_POLICYRULE_STATE = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_ACTIVE, + "Successfully transitioned from PROVISIONED to ACTIVE state"); + public static final PolicyRuleState ENFORCED_POLICYRULE_STATE = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_ENFORCED, + "Successfully transitioned from ACTIVE to ENFORCED state"); + public static final PolicyRuleState INEFFECTIVE_POLICYRULE_STATE = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_INEFFECTIVE, + "Transitioned from ENFORCED to INEFFECTIVE state"); + public static final PolicyRuleState EFFECTIVE_POLICYRULE_STATE = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_EFFECTIVE, + "Successfully transitioned from ENFORCED to EFFECTIVE state"); + public static final PolicyRuleState UPDATED_POLICYRULE_STATE = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_UPDATED, "Successfully entered to UPDATED state"); + public static final PolicyRuleState REMOVED_POLICYRULE_STATE = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_REMOVED, "Successfully entered to REMOVED state"); +} diff --git a/src/policy/src/main/java/eu/teraflow/policy/common/Util.java b/src/policy/src/main/java/org/etsi/tfs/policy/common/Util.java similarity index 87% rename from src/policy/src/main/java/eu/teraflow/policy/common/Util.java rename to src/policy/src/main/java/org/etsi/tfs/policy/common/Util.java index 889f44feef9df2eb66c5f3dfccb4198837fb037f..a3e5a318cc54323cabdd02626d157b95bb8ef480 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/common/Util.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/common/Util.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.common; +package org.etsi.tfs.policy.common; import java.util.List; import java.util.stream.Collectors; diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/ContextGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGateway.java similarity index 73% rename from src/policy/src/main/java/eu/teraflow/policy/context/ContextGateway.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGateway.java index de2d327721636bbfdbbdd46ac3a6a5853bf44025..126bad6115e79ae0befbfb3e4793931b8f26eecf 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/ContextGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGateway.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ * limitations under the License. */ -package eu.teraflow.policy.context; +package org.etsi.tfs.policy.context; -import eu.teraflow.policy.context.model.Device; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.context.model.Service; -import eu.teraflow.policy.context.model.ServiceId; -import eu.teraflow.policy.model.PolicyRule; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.policy.context.model.Device; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceId; +import org.etsi.tfs.policy.policy.model.PolicyRule; public interface ContextGateway { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/ContextGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGatewayImpl.java similarity index 87% rename from src/policy/src/main/java/eu/teraflow/policy/context/ContextGatewayImpl.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGatewayImpl.java index 3b4754c8a61d2a8809af7ec0b60c5e55557cf05b..2484a586ec62e96c0621ab320cc8cbca59200d59 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/ContextGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGatewayImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,20 +14,20 @@ * limitations under the License. */ -package eu.teraflow.policy.context; +package org.etsi.tfs.policy.context; import context.MutinyContextServiceGrpc.MutinyContextServiceStub; import context_policy.MutinyContextPolicyServiceGrpc.MutinyContextPolicyServiceStub; -import eu.teraflow.policy.Serializer; -import eu.teraflow.policy.context.model.Device; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.context.model.Service; -import eu.teraflow.policy.context.model.ServiceId; -import eu.teraflow.policy.model.PolicyRule; import io.quarkus.grpc.GrpcClient; import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.etsi.tfs.policy.Serializer; +import org.etsi.tfs.policy.context.model.Device; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceId; +import org.etsi.tfs.policy.policy.model.PolicyRule; @ApplicationScoped public class ContextGatewayImpl implements ContextGateway { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/ContextService.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextService.java similarity index 71% rename from src/policy/src/main/java/eu/teraflow/policy/context/ContextService.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/ContextService.java index 20574e8af2a91563032f82393e4bccd65af2670e..2d68d0c5e365d20672716e85f88f15f10419115c 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/ContextService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ * limitations under the License. */ -package eu.teraflow.policy.context; +package org.etsi.tfs.policy.context; -import eu.teraflow.policy.context.model.Device; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.context.model.Service; -import eu.teraflow.policy.context.model.ServiceId; -import eu.teraflow.policy.model.PolicyRule; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.policy.context.model.Device; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceId; +import org.etsi.tfs.policy.policy.model.PolicyRule; public interface ContextService { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/ContextServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextServiceImpl.java similarity index 78% rename from src/policy/src/main/java/eu/teraflow/policy/context/ContextServiceImpl.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/ContextServiceImpl.java index 7e52ade3c6d3abb772414d715b1768d121f6c2e7..c48feed649071c0627a06adc3d5e56d7e3f7273a 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/ContextServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextServiceImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,16 +14,16 @@ * limitations under the License. */ -package eu.teraflow.policy.context; +package org.etsi.tfs.policy.context; -import eu.teraflow.policy.context.model.Device; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.context.model.Service; -import eu.teraflow.policy.context.model.ServiceId; -import eu.teraflow.policy.model.PolicyRule; import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.etsi.tfs.policy.context.model.Device; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceId; +import org.etsi.tfs.policy.policy.model.PolicyRule; @ApplicationScoped public class ContextServiceImpl implements ContextService { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigActionEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigActionEnum.java similarity index 83% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigActionEnum.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigActionEnum.java index f85dc5a89cc71c0fcc9fe84e82f24a4e90113b60..83c90851641e3333d57a475f4370d993e07a065d 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigActionEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigActionEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.policy.context.model; public enum ConfigActionEnum { UNDEFINED, diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRule.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRule.java similarity index 91% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRule.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRule.java index 60ffba56282f1d77ef376696721c5c07b51e72f5..4d9c366b5c6ed602d06d15525563d496280ebe9b 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRule.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConfigRule { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleAcl.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleAcl.java similarity index 87% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleAcl.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleAcl.java index 9a022a9c62fe75dece83448986771ba67f0fc6ce..bb0d4ebc9b809579a765aab61a7f3dfba30f3093 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleAcl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleAcl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,9 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; -import eu.teraflow.policy.acl.AclRuleSet; +import org.etsi.tfs.policy.acl.AclRuleSet; public class ConfigRuleAcl { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleCustom.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleCustom.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleCustom.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleCustom.java index c8e64f192011e0e3343197f06f02a68a7b24db5a..2b7dc0eb58de0a534f355c3eafa87f4443933486 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleCustom.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleCustom.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConfigRuleCustom { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleType.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleType.java similarity index 83% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleType.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleType.java index 2cd3528bf486a2f9b7f5065f78ebf708c14aa0b7..75542af1226ba40d5520ea88399b65faf60ba9ec 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public interface ConfigRuleType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleTypeAcl.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeAcl.java similarity index 89% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleTypeAcl.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeAcl.java index 35c63468d97847686115af53e92595115bf2fdb7..8ac855e36c20b5b74e18162da7c28e7422f79566 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleTypeAcl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeAcl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConfigRuleTypeAcl implements ConfigRuleType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleTypeCustom.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeCustom.java similarity index 89% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleTypeCustom.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeCustom.java index 5d6ac12468cf286a9060fd22b8e0126f66ff2b51..40e0992f24f0f760459d1ba5b6fa7f1b2b6a1106 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigRuleTypeCustom.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeCustom.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConfigRuleTypeCustom implements ConfigRuleType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/Constraint.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Constraint.java similarity index 88% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/Constraint.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/Constraint.java index 7403a94f40d143f79d52907d31a5373d877540cd..954360ad5b4e056e566693c8925049b58b5975e0 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/Constraint.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Constraint.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class Constraint { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintCustom.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintCustom.java similarity index 91% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintCustom.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintCustom.java index d5b196d3d60452214fcd672573d3e684eaa63646..9708090e19e5db8c06af8db8c63a475b6d92ff88 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintCustom.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintCustom.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintCustom { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintEndPointLocation.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintEndPointLocation.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintEndPointLocation.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintEndPointLocation.java index 0852f2fe2a7b819d2a527554075f1d0e271bf544..3554cbafc2567e8835253d8a6798e46c80b6f446 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintEndPointLocation.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintEndPointLocation.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintEndPointLocation { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSchedule.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSchedule.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java index a450d2244a9e9b30608813df23e6dff3ad7b7e84..c17aade1596c7dc4b65ca55f23845fe194a77fc2 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSchedule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintSchedule { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSlaAvailability.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaAvailability.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSlaAvailability.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaAvailability.java index 9daf6e31a7ab8e149d7609db1fd19af591108792..b0d988aae9b1e41dc1f5cb42297ab32df3c86ea0 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSlaAvailability.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaAvailability.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintSlaAvailability { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSlaCapacity.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaCapacity.java similarity index 88% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSlaCapacity.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaCapacity.java index db3bc1cdd8512bf1f4fb80dfc57bd3b2940fddde..4a1638d5177344f8426126fd4489ae2f7f5c10a7 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSlaCapacity.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaCapacity.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintSlaCapacity { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSlaIsolationLevel.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaIsolationLevel.java similarity index 87% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSlaIsolationLevel.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaIsolationLevel.java index 7d873694213544e938f7767781772959dfd4bc7f..f10b95e5ef0e4c3bac1d396954689d84eac339f5 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSlaIsolationLevel.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaIsolationLevel.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; -import eu.teraflow.policy.common.Util; import java.util.List; +import org.etsi.tfs.policy.common.Util; public class ConstraintSlaIsolationLevel { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSlaLatency.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaLatency.java similarity index 88% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSlaLatency.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaLatency.java index ef28227bd904576f6f2609691bf02fe31db7c9f7..04ff65f4fc8c33ab4fb1520ff07cd7d65cbe18c9 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintSlaLatency.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaLatency.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintSlaLatency { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintType.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintType.java similarity index 83% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintType.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintType.java index 0202399adad25ffe3609e47d7dd375e7524fc1f4..f302bac299e6c32e1a92eb73a49895585ffca132 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public interface ConstraintType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeCustom.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeCustom.java similarity index 89% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeCustom.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeCustom.java index 447a3edd3493fa71e57874f1b911abfd3a7b0220..675b3de188c76ce30523c27f99ca373dee3c6966 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeCustom.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeCustom.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintTypeCustom implements ConstraintType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeEndPointLocation.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeEndPointLocation.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeEndPointLocation.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeEndPointLocation.java index b35832b7d2a6c4d2e6487c0b16192b9ad02b0124..0832153e3c1d5aef9d253bab344e12cb16b5aaef 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeEndPointLocation.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeEndPointLocation.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintTypeEndPointLocation implements ConstraintType { private final ConstraintEndPointLocation constraintEndPointLocation; diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSchedule.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSchedule.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSchedule.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSchedule.java index 3120d376cfdcd12c6885534219cfee55855275b6..bead74a143ffaffed6467b2f7d57106134ec3249 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSchedule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSchedule.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintTypeSchedule implements ConstraintType { private final ConstraintSchedule constraintSchedule; diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSlaAvailability.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaAvailability.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSlaAvailability.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaAvailability.java index 1486c83be2522bc35dee7f88f0bdeada71cc36ed..89add927b596134c9c96b9f752e66590ddb4ff44 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSlaAvailability.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaAvailability.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintTypeSlaAvailability implements ConstraintType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSlaCapacity.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaCapacity.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSlaCapacity.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaCapacity.java index dd3fd7037fffa171159f0323288717db917d7989..08fe4684db7e9581dd250174a5c018095f404ce6 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSlaCapacity.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaCapacity.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintTypeSlaCapacity implements ConstraintType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSlaIsolationLevel.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaIsolationLevel.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSlaIsolationLevel.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaIsolationLevel.java index 7cf05a416cdf5fe5acdc38a52e64ce2d38f1b7d5..d60bf5e432fc5d7c116baf16a88d8ea3c0d5c37d 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSlaIsolationLevel.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaIsolationLevel.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintTypeSlaIsolationLevel implements ConstraintType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSlaLatency.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaLatency.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSlaLatency.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaLatency.java index 20a285902a3364f2a7819e3970b915914ce32f19..0ff1fb71f2d788dc5965f35d61b8f72fc47c9181 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConstraintTypeSlaLatency.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaLatency.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ConstraintTypeSlaLatency implements ConstraintType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/Device.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Device.java similarity index 94% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/Device.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/Device.java index 06c6d4c5c233af579a4aa5db832c2871b96bdd4e..20bdf807acffc80254afb7c952ea7f3c59f8d6f1 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/Device.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Device.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; -import eu.teraflow.policy.common.Util; import java.util.List; +import org.etsi.tfs.policy.common.Util; public class Device { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceConfig.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceConfig.java similarity index 86% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceConfig.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceConfig.java index 815589b5572cd87a8bba18f77c46bf56c6fb9838..08af313a362cf683a41cb8468e55fd684288c164 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceConfig.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceConfig.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; -import eu.teraflow.policy.common.Util; import java.util.List; +import org.etsi.tfs.policy.common.Util; public class DeviceConfig { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceDriverEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java similarity index 78% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceDriverEnum.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java index fe623175a791517846d329de6c83571a3a043a26..3273725afd41e3552bf71e3e0b1ee6c347512c6e 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceDriverEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.policy.context.model; public enum DeviceDriverEnum { UNDEFINED, @@ -24,5 +24,8 @@ public enum DeviceDriverEnum { IETF_NETWORK_TOPOLOGY, ONF_TR_532, XR, - IETF_L2VPN + IETF_L2VPN, + GNMI_OPENCONFIG, + OPTICAL_TFS, + IETF_ACTN } diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceOperationalStatus.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceOperationalStatus.java similarity index 84% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceOperationalStatus.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceOperationalStatus.java index 4a7dc438c367ce1171ce01fbc33e56d4b73b7d67..60373f0bd3c7e8bdb525f0892e84a0f57d21c226 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceOperationalStatus.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceOperationalStatus.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public enum DeviceOperationalStatus { UNDEFINED, diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/Empty.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Empty.java similarity index 85% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/Empty.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/Empty.java index a81bed099c181df3a519d50f9f6967f987912860..d1fd4b17a85f3081c11ad091d9d269171322c1e6 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/Empty.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Empty.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class Empty { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/EndPoint.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPoint.java similarity index 93% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/EndPoint.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPoint.java index 6e1056408e799f78e3c71648dd65ec279085e4c8..cf3ada8aadd9b3295ffb472165bc61478a44005d 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/EndPoint.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPoint.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,11 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; -import eu.teraflow.policy.common.Util; -import eu.teraflow.policy.kpi_sample_types.model.KpiSampleType; import java.util.List; +import org.etsi.tfs.policy.common.Util; +import org.etsi.tfs.policy.kpi_sample_types.model.KpiSampleType; public class EndPoint { private final EndPointId endPointId; diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/EndPointId.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPointId.java similarity index 91% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/EndPointId.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPointId.java index ddda2eb439301f8d77533974a337851ad2186ce9..674e1446bb22e15670722de18efeb784bc3a961b 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/EndPointId.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPointId.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.policy.context.model; public class EndPointId { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/Event.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Event.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/Event.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/Event.java index 05ba6451399598f958c2a055a4c938c6592627d1..e1f649e00f37d110159256953fe3fb837d47b7b2 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/Event.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Event.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class Event { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/EventTypeEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EventTypeEnum.java similarity index 84% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/EventTypeEnum.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/EventTypeEnum.java index b732a26cd7a6d3609f8e1d670c5e8b501e971f18..c613eefc59aaee553db9baa6b4eea5081ec64668 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/EventTypeEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EventTypeEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.policy.context.model; public enum EventTypeEnum { UNDEFINED, diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/GpsPosition.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/GpsPosition.java similarity index 90% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/GpsPosition.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/GpsPosition.java index c0dc6e3e788d1a1df8336ca97fc068857fc56495..58bc1647e700dbf27c505240dab28fffea368d1c 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/GpsPosition.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/GpsPosition.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.policy.context.model; public class GpsPosition { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/IsolationLevelEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/IsolationLevelEnum.java similarity index 87% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/IsolationLevelEnum.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/IsolationLevelEnum.java index 4b6e129d1c1899da43d5cf48f0e43d87a56abb83..bf44270eb5d790fdc2398f66e6d58dbf91684985 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/IsolationLevelEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/IsolationLevelEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public enum IsolationLevelEnum { NO_ISOLATION, diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Location.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Location.java similarity index 88% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/Location.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/Location.java index fa937d91cae6796594028d313d85509c6df5cd09..c5a0dd22d244ddca76b591dd9b9828f12a68fb12 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Location.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Location.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.policy.context.model; public class Location { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/LocationType.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationType.java similarity index 83% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/LocationType.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationType.java index f88d30db76c37c3ae5955fdc4a4d3cf8e002546d..1c12ece116d921fcc09004864fe92d44a27f2eac 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/LocationType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public interface LocationType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/LocationTypeGpsPosition.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeGpsPosition.java similarity index 89% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/LocationTypeGpsPosition.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeGpsPosition.java index f010024133fb12644a79eb1534f26e54874bd63b..0dbcc315a1af976a7e41163f6ef07f7c03c0358f 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/LocationTypeGpsPosition.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeGpsPosition.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class LocationTypeGpsPosition implements LocationType { private final GpsPosition gpsPosition; diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationTypeRegion.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeRegion.java similarity index 88% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationTypeRegion.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeRegion.java index 8691de64238c4c947335bfc834ef0a9ce194763e..b7796fb53d6c75ad8caeda114ca8458a000f3b63 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationTypeRegion.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeRegion.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.policy.context.model; public class LocationTypeRegion implements LocationType { private final String region; diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/Service.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Service.java similarity index 94% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/Service.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/Service.java index e3456b32607ed49d465b40db826124a15c6f7a84..0c964b7da7160bbe4beb9d0ba326fc7e4036f931 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/Service.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Service.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; -import eu.teraflow.policy.common.Util; import java.util.List; +import org.etsi.tfs.policy.common.Util; public class Service { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceConfig.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceConfig.java similarity index 86% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceConfig.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceConfig.java index a99c949d1fd63c8ad31f8d0b14fe6f460ad43a17..3b9dac9a967b6fbf3ff0bee42c91ba21fd01b904 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceConfig.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceConfig.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; -import eu.teraflow.policy.common.Util; import java.util.List; +import org.etsi.tfs.policy.common.Util; public class ServiceConfig { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceId.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceId.java similarity index 89% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceId.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceId.java index 81763a9dec19881982a7ef0b14d9a8226eee2233..f9d99c58530758ae087685f4bda6e3298075cc99 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceId.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceId.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ServiceId { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceStatus.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatus.java similarity index 89% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceStatus.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatus.java index 5fd6dfa26e70bf5e4ee710052e6bbb15aeb2136f..72766be4232ca1b1a03b74eaaa6ce885187cec87 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceStatus.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatus.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class ServiceStatus { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceStatusEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatusEnum.java similarity index 85% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceStatusEnum.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatusEnum.java index 353b78eba1ad261d6c65561d1fe3e4f64a914420..69688ab44a85932e8f1058b1bb0ff4fcd29a6ed0 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceStatusEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatusEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public enum ServiceStatusEnum { UNDEFINED, diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceTypeEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceTypeEnum.java similarity index 84% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceTypeEnum.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceTypeEnum.java index 45215ca00fc9c5f6be076519dc0cfc41b167b0f4..6df2f302c968dc8ebcb9525364b377f79f6db240 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ServiceTypeEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceTypeEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public enum ServiceTypeEnum { UNKNOWN, diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/SliceId.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/SliceId.java similarity index 89% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/SliceId.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/SliceId.java index ee1dc7d2fddc8d523c5dcd41a060c5b13a304ab6..db2d04be58b61b69806ce32a9fd1f0c6e36e4d2a 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/SliceId.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/SliceId.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class SliceId { private final String contextId; diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/TopologyId.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/TopologyId.java similarity index 89% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/TopologyId.java rename to src/policy/src/main/java/org/etsi/tfs/policy/context/model/TopologyId.java index 5997291d1ebef92021fca361bf300b3da2871c1e..34d0ba06a9ad4f210c7039d2d23dcd6e1b39956b 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/TopologyId.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/TopologyId.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.policy.context.model; public class TopologyId { diff --git a/src/policy/src/main/java/eu/teraflow/policy/device/DeviceGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGateway.java similarity index 74% rename from src/policy/src/main/java/eu/teraflow/policy/device/DeviceGateway.java rename to src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGateway.java index bd2487fe5f7f33f7d94279ecbfcd96cb8fc11a9b..a3dc71113a60db4b8b0af14ccc09ee50a6a45d47 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/device/DeviceGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGateway.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.policy.device; +package org.etsi.tfs.policy.device; -import eu.teraflow.policy.context.model.Device; -import eu.teraflow.policy.context.model.DeviceConfig; -import eu.teraflow.policy.context.model.Empty; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.policy.context.model.Device; +import org.etsi.tfs.policy.context.model.DeviceConfig; +import org.etsi.tfs.policy.context.model.Empty; public interface DeviceGateway { Uni getInitialConfiguration(String deviceId); diff --git a/src/policy/src/main/java/eu/teraflow/policy/device/DeviceGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGatewayImpl.java similarity index 83% rename from src/policy/src/main/java/eu/teraflow/policy/device/DeviceGatewayImpl.java rename to src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGatewayImpl.java index 3cb88fe08095bc8b65a72a560b11f9bc3e3ba995..9bd63ee07e5d985d3e50b734521defa883194403 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/device/DeviceGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGatewayImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,17 +14,17 @@ * limitations under the License. */ -package eu.teraflow.policy.device; +package org.etsi.tfs.policy.device; import device.DeviceService; -import eu.teraflow.policy.Serializer; -import eu.teraflow.policy.context.model.Device; -import eu.teraflow.policy.context.model.DeviceConfig; -import eu.teraflow.policy.context.model.Empty; import io.quarkus.grpc.GrpcClient; import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.etsi.tfs.policy.Serializer; +import org.etsi.tfs.policy.context.model.Device; +import org.etsi.tfs.policy.context.model.DeviceConfig; +import org.etsi.tfs.policy.context.model.Empty; @ApplicationScoped public class DeviceGatewayImpl implements DeviceGateway { diff --git a/src/policy/src/main/java/eu/teraflow/policy/device/DeviceService.java b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceService.java similarity index 74% rename from src/policy/src/main/java/eu/teraflow/policy/device/DeviceService.java rename to src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceService.java index 4e7419a6a93c523a571f8f5e75d08b5cffba424c..dfba5ee76ac334051bb38963d51d87c345e05a30 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/device/DeviceService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.policy.device; +package org.etsi.tfs.policy.device; -import eu.teraflow.policy.context.model.Device; -import eu.teraflow.policy.context.model.DeviceConfig; -import eu.teraflow.policy.context.model.Empty; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.policy.context.model.Device; +import org.etsi.tfs.policy.context.model.DeviceConfig; +import org.etsi.tfs.policy.context.model.Empty; public interface DeviceService { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceServiceImpl.java similarity index 78% rename from src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceServiceImpl.java rename to src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceServiceImpl.java index 67446b8c20fb65cba6242547967d3adc714f96d0..041631ce03ba99b0ba828d0547328708e6750949 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceServiceImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ * limitations under the License. */ -package eu.teraflow.ztp.device; +package org.etsi.tfs.policy.device; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceConfig; -import eu.teraflow.ztp.context.model.Empty; import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.etsi.tfs.policy.context.model.Device; +import org.etsi.tfs.policy.context.model.DeviceConfig; +import org.etsi.tfs.policy.context.model.Empty; @ApplicationScoped public class DeviceServiceImpl implements DeviceService { 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 new file mode 100644 index 0000000000000000000000000000000000000000..8a070ce8947e5d0fb21ad54f72a6261c696d1fc9 --- /dev/null +++ b/src/policy/src/main/java/org/etsi/tfs/policy/exception/ExternalServiceFailureException.java @@ -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. +*/ + +package org.etsi.tfs.policy.exception; + +public class ExternalServiceFailureException extends RuntimeException { + + public ExternalServiceFailureException(String message, Exception e) { + super(message, e); + } + + public ExternalServiceFailureException(String message) { + super(message); + } +} 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 new file mode 100644 index 0000000000000000000000000000000000000000..4e591aed9a99ff208b6704946c580e5478fb82d8 --- /dev/null +++ b/src/policy/src/main/java/org/etsi/tfs/policy/exception/GeneralExceptionHandler.java @@ -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. +*/ + +package org.etsi.tfs.policy.exception; + +import io.grpc.Metadata; +import io.grpc.ServerCall; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import io.quarkus.grpc.ExceptionHandler; +import io.quarkus.grpc.ExceptionHandlerProvider; +import jakarta.enterprise.context.ApplicationScoped; + +@ApplicationScoped +public class GeneralExceptionHandler implements ExceptionHandlerProvider { + @Override + public ExceptionHandler createHandler( + ServerCall.Listener listener, ServerCall serverCall, Metadata metadata) { + return new HelloExceptionHandler<>(listener, serverCall, metadata); + } + + @Override + public Throwable transform(Throwable t) { + if (t instanceof ExternalServiceFailureException) { + return new StatusRuntimeException(Status.INTERNAL.withDescription(t.getMessage())); + } else { + return ExceptionHandlerProvider.toStatusException(t, true); + } + } + + private static class HelloExceptionHandler extends ExceptionHandler { + public HelloExceptionHandler( + ServerCall.Listener listener, ServerCall call, Metadata metadata) { + super(listener, call, metadata); + } + + @Override + protected void handleException(Throwable t, ServerCall call, Metadata metadata) { + StatusRuntimeException sre = + (StatusRuntimeException) ExceptionHandlerProvider.toStatusException(t, true); + Metadata trailers = sre.getTrailers() != null ? sre.getTrailers() : metadata; + call.close(sre.getStatus(), trailers); + } + } +} diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/kpi_sample_types/model/KpiSampleType.java b/src/policy/src/main/java/org/etsi/tfs/policy/kpi_sample_types/model/KpiSampleType.java similarity index 85% rename from src/ztp/src/main/java/eu/teraflow/ztp/kpi_sample_types/model/KpiSampleType.java rename to src/policy/src/main/java/org/etsi/tfs/policy/kpi_sample_types/model/KpiSampleType.java index 6db242d9d1f1eda6aa221c6bdd60e4fd94045abf..2c0e559a89402804bcc03975aed25258872dfd7a 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/kpi_sample_types/model/KpiSampleType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/kpi_sample_types/model/KpiSampleType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.kpi_sample_types.model; +package org.etsi.tfs.policy.kpi_sample_types.model; public enum KpiSampleType { UNKNOWN, diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGateway.java similarity index 68% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGateway.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGateway.java index 89e9152c6b5402d56c22afcd01ddaac7c81c6dde..29f535eee5f83b0e79496e134e75af9a48278763 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGateway.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,18 +14,18 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring; +package org.etsi.tfs.policy.monitoring; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.monitoring.model.AlarmDescriptor; -import eu.teraflow.policy.monitoring.model.AlarmResponse; -import eu.teraflow.policy.monitoring.model.AlarmSubscription; -import eu.teraflow.policy.monitoring.model.KpiDescriptor; -import eu.teraflow.policy.monitoring.model.MonitorKpiRequest; -import eu.teraflow.policy.monitoring.model.SubsDescriptor; -import eu.teraflow.policy.monitoring.model.SubsResponse; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.monitoring.model.AlarmDescriptor; +import org.etsi.tfs.policy.monitoring.model.AlarmResponse; +import org.etsi.tfs.policy.monitoring.model.AlarmSubscription; +import org.etsi.tfs.policy.monitoring.model.KpiDescriptor; +import org.etsi.tfs.policy.monitoring.model.MonitorKpiRequest; +import org.etsi.tfs.policy.monitoring.model.SubsDescriptor; +import org.etsi.tfs.policy.monitoring.model.SubsResponse; public interface MonitoringGateway { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGatewayImpl.java similarity index 86% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGatewayImpl.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGatewayImpl.java index cc6c97f32e746dcf898bcd6880b8ffd3708e3e34..08026dae7cefc0a4fe21d37c1fc36f80420a908a 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGatewayImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,23 +14,23 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring; - -import eu.teraflow.policy.Serializer; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.monitoring.model.AlarmDescriptor; -import eu.teraflow.policy.monitoring.model.AlarmResponse; -import eu.teraflow.policy.monitoring.model.AlarmSubscription; -import eu.teraflow.policy.monitoring.model.KpiDescriptor; -import eu.teraflow.policy.monitoring.model.MonitorKpiRequest; -import eu.teraflow.policy.monitoring.model.SubsDescriptor; -import eu.teraflow.policy.monitoring.model.SubsResponse; +package org.etsi.tfs.policy.monitoring; + import io.quarkus.grpc.GrpcClient; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import monitoring.MutinyMonitoringServiceGrpc.MutinyMonitoringServiceStub; +import org.etsi.tfs.policy.Serializer; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.monitoring.model.AlarmDescriptor; +import org.etsi.tfs.policy.monitoring.model.AlarmResponse; +import org.etsi.tfs.policy.monitoring.model.AlarmSubscription; +import org.etsi.tfs.policy.monitoring.model.KpiDescriptor; +import org.etsi.tfs.policy.monitoring.model.MonitorKpiRequest; +import org.etsi.tfs.policy.monitoring.model.SubsDescriptor; +import org.etsi.tfs.policy.monitoring.model.SubsResponse; @ApplicationScoped public class MonitoringGatewayImpl implements MonitoringGateway { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringService.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringService.java similarity index 68% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringService.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringService.java index 6010ec04a515dcfa9c84c7ce2363c9dea72640e1..091f6b795e5a96812f7e5e1d7d10a54e6f2a9fcf 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,18 +14,18 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring; +package org.etsi.tfs.policy.monitoring; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.monitoring.model.AlarmDescriptor; -import eu.teraflow.policy.monitoring.model.AlarmResponse; -import eu.teraflow.policy.monitoring.model.AlarmSubscription; -import eu.teraflow.policy.monitoring.model.KpiDescriptor; -import eu.teraflow.policy.monitoring.model.MonitorKpiRequest; -import eu.teraflow.policy.monitoring.model.SubsDescriptor; -import eu.teraflow.policy.monitoring.model.SubsResponse; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.monitoring.model.AlarmDescriptor; +import org.etsi.tfs.policy.monitoring.model.AlarmResponse; +import org.etsi.tfs.policy.monitoring.model.AlarmSubscription; +import org.etsi.tfs.policy.monitoring.model.KpiDescriptor; +import org.etsi.tfs.policy.monitoring.model.MonitorKpiRequest; +import org.etsi.tfs.policy.monitoring.model.SubsDescriptor; +import org.etsi.tfs.policy.monitoring.model.SubsResponse; public interface MonitoringService { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringServiceImpl.java similarity index 78% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringServiceImpl.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringServiceImpl.java index a3f9f223bc1ef012263366af409214a427162c59..825758534d4fc37d711dbacfc3df2c6b636ef6f5 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/MonitoringServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringServiceImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,20 +14,20 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring; +package org.etsi.tfs.policy.monitoring; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.monitoring.model.AlarmDescriptor; -import eu.teraflow.policy.monitoring.model.AlarmResponse; -import eu.teraflow.policy.monitoring.model.AlarmSubscription; -import eu.teraflow.policy.monitoring.model.KpiDescriptor; -import eu.teraflow.policy.monitoring.model.MonitorKpiRequest; -import eu.teraflow.policy.monitoring.model.SubsDescriptor; -import eu.teraflow.policy.monitoring.model.SubsResponse; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.monitoring.model.AlarmDescriptor; +import org.etsi.tfs.policy.monitoring.model.AlarmResponse; +import org.etsi.tfs.policy.monitoring.model.AlarmSubscription; +import org.etsi.tfs.policy.monitoring.model.KpiDescriptor; +import org.etsi.tfs.policy.monitoring.model.MonitorKpiRequest; +import org.etsi.tfs.policy.monitoring.model.SubsDescriptor; +import org.etsi.tfs.policy.monitoring.model.SubsResponse; @ApplicationScoped public class MonitoringServiceImpl implements MonitoringService { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmDescriptor.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmDescriptor.java similarity index 94% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmDescriptor.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmDescriptor.java index 090237f947743b200d0217a00a4b87c251587623..707537f3254ec8dd3e9e9f42b64baf52e584e416 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmDescriptor.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmDescriptor.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; public class AlarmDescriptor { private final String alarmId; diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmResponse.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmResponse.java similarity index 87% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmResponse.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmResponse.java index a92ae4decfe54f9bce06db1dda53ccadea52946a..408d1c833a903d9730b0ce17371b74a9582e86f2 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmResponse.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmResponse.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; -import eu.teraflow.policy.common.Util; import java.util.List; +import org.etsi.tfs.policy.common.Util; public class AlarmResponse { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmSubscription.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmSubscription.java similarity index 92% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmSubscription.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmSubscription.java index 7b99c20456987b6c56a0af00821fb5ef33954ada..b50093870d7aefca58750e4edfe32c625de22495 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/AlarmSubscription.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmSubscription.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; public class AlarmSubscription { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/BooleanKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/BooleanKpiValue.java similarity index 88% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/BooleanKpiValue.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/BooleanKpiValue.java index c93aeb520b6fe6ec68a3d745b5161450130045c2..75adc4c769e8395c7e69404abb8456fbddf51447 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/BooleanKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/BooleanKpiValue.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; public class BooleanKpiValue implements KpiValue { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/FloatKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/FloatKpiValue.java similarity index 88% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/FloatKpiValue.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/FloatKpiValue.java index 2e19b2b2be6dd4ec7dd25f52ad19c99227fa5ef4..57fdcef3c1379d2aeb1782744eb3d2d39c0f240d 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/FloatKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/FloatKpiValue.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; public class FloatKpiValue implements KpiValue { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/IntegerKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/IntegerKpiValue.java similarity index 88% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/IntegerKpiValue.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/IntegerKpiValue.java index cc3f92111d360271d3b85c152e6465d6e0a3bcc3..19172a3819295b318ac0900cb47bec0761df4d1b 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/IntegerKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/IntegerKpiValue.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; public class IntegerKpiValue implements KpiValue { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/Kpi.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/Kpi.java similarity index 91% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/Kpi.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/Kpi.java index 92439d01f08b5f3ee55f15fe8c67ed484fa38306..10cfa3e1bbf846daf4c91d96c74fd5a2a49d5fbc 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/Kpi.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/Kpi.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; public class Kpi { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/KpiDescriptor.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiDescriptor.java similarity index 86% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/KpiDescriptor.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiDescriptor.java index 0f7aeca64c97958c5417083ae49f1003667f6693..c62c3926ccfd7d9fcb3bcc9a31a108c8830a0782 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/KpiDescriptor.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiDescriptor.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; -import eu.teraflow.policy.context.model.EndPointId; -import eu.teraflow.policy.context.model.ServiceId; -import eu.teraflow.policy.context.model.SliceId; -import eu.teraflow.policy.kpi_sample_types.model.KpiSampleType; +import org.etsi.tfs.policy.context.model.EndPointId; +import org.etsi.tfs.policy.context.model.ServiceId; +import org.etsi.tfs.policy.context.model.SliceId; +import org.etsi.tfs.policy.kpi_sample_types.model.KpiSampleType; public class KpiDescriptor { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/KpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValue.java similarity index 83% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/KpiValue.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValue.java index 0a4418d65bff29d5e0df0134ad15a409b7fd2d30..3a9d7d21409a032beedc11fd41c5d4a41de9a74c 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/KpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValue.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; public interface KpiValue { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/KpiValueRange.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValueRange.java similarity index 94% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/KpiValueRange.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValueRange.java index 6a0bba6c6a5af5fb53745768f01d1a0e5bf6c85d..a7de600ce84dab44795337709b93997f4c0365e4 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/KpiValueRange.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValueRange.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; public class KpiValueRange { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/LongKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/LongKpiValue.java similarity index 88% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/LongKpiValue.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/LongKpiValue.java index c57e605ffdda7f45de06fec47813a522c06d7b93..4777a62d6fb9a52bfbe3c4df4f2bbb951970834a 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/LongKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/LongKpiValue.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; public class LongKpiValue implements KpiValue { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/MonitorKpiRequest.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/MonitorKpiRequest.java similarity index 91% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/MonitorKpiRequest.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/MonitorKpiRequest.java index 30aaad2e8e1514d788c4493bf15eb887f4d02d9b..6311118ca2cf6044a02eb108ee26b7d61e6feb6d 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/MonitorKpiRequest.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/MonitorKpiRequest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; public class MonitorKpiRequest { private final String kpiId; diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/StringKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/StringKpiValue.java similarity index 88% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/StringKpiValue.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/StringKpiValue.java index 649d06ceeff84d2daf7ef5c9589c361873c23987..7d26911d481e72a16b6f15be6e4428ddda66ebb6 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/StringKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/StringKpiValue.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; public class StringKpiValue implements KpiValue { diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/SubsDescriptor.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsDescriptor.java similarity index 94% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/SubsDescriptor.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsDescriptor.java index 96569bbc7fab5ef18b34ea78c5951949e804eafc..247043f02fc035f4a34951877de44b7abcb035a6 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/SubsDescriptor.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsDescriptor.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; public class SubsDescriptor { private final String subscriptionId; diff --git a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/SubsResponse.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsResponse.java similarity index 88% rename from src/policy/src/main/java/eu/teraflow/policy/monitoring/model/SubsResponse.java rename to src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsResponse.java index b4a2b16a6dd73bfa2e91b9fd2d501f814af9531f..832d9278bbac0e6e0eefba131f637b1f42ccefac 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/monitoring/model/SubsResponse.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsResponse.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.policy.monitoring.model; +package org.etsi.tfs.policy.monitoring.model; -import eu.teraflow.policy.common.Util; import java.util.List; +import org.etsi.tfs.policy.common.Util; public class SubsResponse { 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 new file mode 100644 index 0000000000000000000000000000000000000000..05109df421a085eeeb65b4e2de1bf4534f5e6332 --- /dev/null +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyDeviceImpl.java @@ -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. +*/ + +package org.etsi.tfs.policy.policy; + +import static org.etsi.tfs.policy.common.ApplicationProperties.INVALID_MESSAGE; +import static org.etsi.tfs.policy.common.ApplicationProperties.VALIDATED_POLICYRULE_STATE; + +import io.smallrye.mutiny.Uni; +import io.smallrye.mutiny.groups.UniJoin; +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.exception.ExternalServiceFailureException; +import org.etsi.tfs.policy.policy.model.PolicyRule; +import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; +import org.etsi.tfs.policy.policy.model.PolicyRuleDevice; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleTypeDevice; +import org.etsi.tfs.policy.policy.service.PolicyRuleConditionValidator; + +@ApplicationScoped +public class AddPolicyDeviceImpl { + + @Inject private PolicyRuleConditionValidator policyRuleConditionValidator; + + @Inject private CommonPolicyServiceImpl commonPolicyServiceImpl; + @Inject private CommonAlarmService commonAlarmService; + + @Inject private ContextService contextService; + + public Uni> returnInvalidDeviceIds(List deviceIds) { + UniJoin.Builder builder = Uni.join().builder(); + for (String deviceId : deviceIds) { + final var validatedDeviceId = policyRuleConditionValidator.isDeviceIdValid(deviceId); + builder.add(validatedDeviceId); + } + return builder.joinAll().andFailFast(); + } + + public Uni areDeviceOnContext( + List areDevices, + PolicyRuleDevice policyRuleDevice, + PolicyRuleBasic policyRuleBasic) { + if (areDevices.contains(false)) { + var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, + String.format( + INVALID_MESSAGE, policyRuleDevice.getPolicyRuleBasic().getPolicyRuleId())); + + return Uni.createFrom().item(policyRuleState); + } + + final var policyRuleTypeDevice = new PolicyRuleTypeDevice(policyRuleDevice); + final var policyRule = new PolicyRule(policyRuleTypeDevice); + + final var alarmDescriptorList = commonPolicyServiceImpl.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); + } + + return contextService + .setPolicyRule(policyRule) + .onFailure() + .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) + .onItem() + .transform( + policyId -> { + commonAlarmService.startMonitoringBasedOnAlarmDescriptors( + policyId, policyRuleDevice, alarmDescriptorList); + return VALIDATED_POLICYRULE_STATE; + }); + } +} 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 new file mode 100644 index 0000000000000000000000000000000000000000..77aa96d2652768382c1312393cb5be7cc22ac5ae --- /dev/null +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyServiceImpl.java @@ -0,0 +1,92 @@ +/* +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY 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; + +import static org.etsi.tfs.policy.common.ApplicationProperties.INVALID_MESSAGE; +import static org.etsi.tfs.policy.common.ApplicationProperties.VALIDATED_POLICYRULE_STATE; + +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; +import org.etsi.tfs.policy.policy.model.PolicyRuleTypeService; + +@ApplicationScoped +public class AddPolicyServiceImpl { + + @Inject private CommonPolicyServiceImpl commonPolicyService; + @Inject private CommonAlarmService commonAlarmService; + @Inject private ContextService contextService; + + public Uni constructPolicyStateBasedOnCriteria( + Boolean isService, + ServiceId serviceId, + PolicyRuleService policyRuleService, + PolicyRuleBasic policyRuleBasic) { + + if (!isService) { + var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, String.format(INVALID_MESSAGE, serviceId)); + + return Uni.createFrom().item(policyRuleState); + } + + 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); + } + + return setPolicyRuleOnContextAndReturnState(policyRule, policyRuleService, alarmDescriptorList); + } + + private Uni setPolicyRuleOnContextAndReturnState( + PolicyRule policyRule, + PolicyRuleService policyRuleService, + List alarmDescriptorList) { + return contextService + .setPolicyRule(policyRule) + .onFailure() + .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) + .onItem() + .transform( + policyId -> { + commonAlarmService.startMonitoringBasedOnAlarmDescriptors( + policyId, policyRuleService, alarmDescriptorList); + + return 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 new file mode 100644 index 0000000000000000000000000000000000000000..9db561204b4e41e7429d12e663ae6dc321140ab1 --- /dev/null +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonAlarmService.java @@ -0,0 +1,189 @@ +/* +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY 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; + +import static org.etsi.tfs.policy.common.ApplicationProperties.PROVISIONED_POLICYRULE_STATE; +import static org.etsi.tfs.policy.common.ApplicationProperties.VALIDATED_POLICYRULE_STATE; + +import io.smallrye.mutiny.Multi; +import io.smallrye.mutiny.Uni; +import io.smallrye.mutiny.subscription.Cancellable; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import java.util.ArrayList; +import java.util.List; +import org.etsi.tfs.policy.monitoring.MonitoringService; +import org.etsi.tfs.policy.monitoring.model.AlarmDescriptor; +import org.etsi.tfs.policy.monitoring.model.AlarmResponse; +import org.etsi.tfs.policy.monitoring.model.AlarmSubscription; +import org.etsi.tfs.policy.policy.model.PolicyRuleDevice; +import org.etsi.tfs.policy.policy.model.PolicyRuleService; +import org.jboss.logging.Logger; + +@ApplicationScoped +public class CommonAlarmService { + private static final Logger LOGGER = Logger.getLogger(CommonAlarmService.class); + + @Inject private CommonPolicyServiceImpl commonPolicyServiceImpl; + @Inject private MonitoringService monitoringService; + + public void startMonitoringBasedOnAlarmDescriptors( + String policyId, + PolicyRuleDevice policyRuleDevice, + List alarmDescriptorList) { + commonPolicyServiceImpl.setPolicyRuleDeviceToContext( + policyRuleDevice, VALIDATED_POLICYRULE_STATE); + commonPolicyServiceImpl.noAlarms = 0; + + List> alarmIds = createAlarmList(alarmDescriptorList); + + List> alarmResponseStreamList = + transformAlarmIds(alarmIds, policyRuleDevice); + + // Merge the promised alarms into one stream (Multi Object) + final var multi = Multi.createBy().merging().streams(alarmResponseStreamList); + commonPolicyServiceImpl.setPolicyRuleDeviceToContext( + policyRuleDevice, PROVISIONED_POLICYRULE_STATE); + + commonPolicyServiceImpl + .getSubscriptionList() + .put(policyId, monitorAlarmResponseForDevice(multi)); + + // TODO: Resubscribe to the stream, if it has ended + + // TODO: Redesign evaluation of action + // evaluateAction(policyRule, alarmDescriptorList, multi); + } + + public void startMonitoringBasedOnAlarmDescriptors( + String policyId, + PolicyRuleService policyRuleService, + List alarmDescriptorList) { + commonPolicyServiceImpl.setPolicyRuleServiceToContext( + policyRuleService, VALIDATED_POLICYRULE_STATE); + commonPolicyServiceImpl.noAlarms = 0; + + List> alarmIds = + createAlarmList(alarmDescriptorList); // setAllarmtomonitoring get back alarmid + + List> alarmResponseStreamList = + transformAlarmIds(alarmIds, policyRuleService); + + // Merge the promised alarms into one stream (Multi Object) + final var multi = Multi.createBy().merging().streams(alarmResponseStreamList); + commonPolicyServiceImpl.setPolicyRuleServiceToContext( + policyRuleService, PROVISIONED_POLICYRULE_STATE); + + commonPolicyServiceImpl + .getSubscriptionList() + .put(policyId, monitorAlarmResponseForService(multi)); + + // TODO: Resubscribe to the stream, if it has ended + + // TODO: Redesign evaluation of action + // evaluateAction(policyRule, alarmDescriptorList, multi); + } + + /** + * 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> transformAlarmIds( + List> alarmIds, PolicyRuleService policyRuleService) { + List> alarmResponseStreamList = new ArrayList<>(); + for (Uni alarmId : alarmIds) { + Multi alarmResponseStream = + alarmId.onItem().transformToMulti(id -> setPolicyMonitor(policyRuleService, id)); + + alarmResponseStreamList.add(alarmResponseStream); + } + return alarmResponseStreamList; + } + + private List> transformAlarmIds( + List> alarmIds, PolicyRuleDevice policyRuleDevice) { + // Transform the alarmIds into promised alarms returned from the + // getAlarmResponseStream + List> alarmResponseStreamList = new ArrayList<>(); + for (Uni alarmId : alarmIds) { + alarmResponseStreamList.add( + alarmId.onItem().transformToMulti(id -> setPolicyMonitor(policyRuleDevice, id))); + } + return alarmResponseStreamList; + } + + private Multi setPolicyMonitor(PolicyRuleService policyRuleService, String id) { + commonPolicyServiceImpl.getAlarmPolicyRuleServiceMap().put(id, policyRuleService); + + // TODO: Create infinite subscription + var alarmSubscription = new AlarmSubscription(id, 259200, 5000); + return monitoringService.getAlarmResponseStream(alarmSubscription); + } + + private Multi setPolicyMonitor(PolicyRuleDevice policyRuleDevice, String id) { + commonPolicyServiceImpl.getAlarmPolicyRuleDeviceMap().put(id, policyRuleDevice); + + // TODO: Create infinite subscription + var alarmSubscription = new AlarmSubscription(id, 259200, 5000); + return monitoringService.getAlarmResponseStream(alarmSubscription); + } + + /** + * 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> createAlarmList(List alarmDescriptorList) { + List> alarmIds = new ArrayList>(); + for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { + LOGGER.infof("alarmDescriptor:"); + LOGGER.infof(alarmDescriptor.toString()); + alarmIds.add(monitoringService.setKpiAlarm(alarmDescriptor)); + } + return alarmIds; + } + + private Cancellable monitorAlarmResponseForService(Multi multi) { + return multi + .subscribe() + .with( + alarmResponse -> { + LOGGER.infof("**************************Received Alarm!**************************"); + LOGGER.infof("alarmResponse:"); + LOGGER.info(alarmResponse); + LOGGER.info(alarmResponse.getAlarmId()); + commonPolicyServiceImpl.applyActionService(alarmResponse.getAlarmId()); + }); + } + + private Cancellable monitorAlarmResponseForDevice(Multi multi) { + return multi + .subscribe() + .with( + alarmResponse -> { + LOGGER.infof("**************************Received Alarm!**************************"); + LOGGER.infof("alarmResponse:"); + LOGGER.info(alarmResponse); + LOGGER.info(alarmResponse.getAlarmId()); + commonPolicyServiceImpl.applyActionDevice(alarmResponse.getAlarmId()); + }); + } +} 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 new file mode 100644 index 0000000000000000000000000000000000000000..f4d1f84a253a0f63f45ee3c2974668878037c293 --- /dev/null +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonPolicyServiceImpl.java @@ -0,0 +1,541 @@ +/* +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY 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; + +import static org.etsi.tfs.policy.common.ApplicationProperties.ACTIVE_POLICYRULE_STATE; +import static org.etsi.tfs.policy.common.ApplicationProperties.ENFORCED_POLICYRULE_STATE; +import static org.etsi.tfs.policy.common.ApplicationProperties.INVALID_MESSAGE; + +import io.smallrye.mutiny.subscription.Cancellable; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import java.time.Instant; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Random; +import java.util.concurrent.ConcurrentHashMap; +import org.etsi.tfs.policy.context.ContextService; +import org.etsi.tfs.policy.context.model.ConfigActionEnum; +import org.etsi.tfs.policy.context.model.ConfigRule; +import org.etsi.tfs.policy.context.model.ConfigRuleCustom; +import org.etsi.tfs.policy.context.model.ConfigRuleTypeCustom; +import org.etsi.tfs.policy.context.model.Constraint; +import org.etsi.tfs.policy.context.model.ConstraintCustom; +import org.etsi.tfs.policy.context.model.ConstraintTypeCustom; +import org.etsi.tfs.policy.context.model.ServiceConfig; +import org.etsi.tfs.policy.device.DeviceService; +import org.etsi.tfs.policy.monitoring.MonitoringService; +import org.etsi.tfs.policy.monitoring.model.AlarmDescriptor; +import org.etsi.tfs.policy.monitoring.model.KpiValueRange; +import org.etsi.tfs.policy.policy.model.BooleanOperator; +import org.etsi.tfs.policy.policy.model.PolicyRule; +import org.etsi.tfs.policy.policy.model.PolicyRuleAction; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; +import org.etsi.tfs.policy.policy.model.PolicyRuleDevice; +import org.etsi.tfs.policy.policy.model.PolicyRuleService; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleTypeDevice; +import org.etsi.tfs.policy.policy.model.PolicyRuleTypeService; +import org.etsi.tfs.policy.service.ServiceService; +import org.jboss.logging.Logger; + +@ApplicationScoped +public class CommonPolicyServiceImpl { + + private static final Logger LOGGER = Logger.getLogger(CommonPolicyServiceImpl.class); + + @Inject private MonitoringService monitoringService; + @Inject private ContextService contextService; + @Inject private ServiceService serviceService; + @Inject private DeviceService deviceService; + + private static final int POLICY_EVALUATION_TIMEOUT = 5; + private static final int ACCEPTABLE_NUMBER_OF_ALARMS = 3; + private static final int MONITORING_WINDOW_IN_SECONDS = 5; + private static final int SAMPLING_RATE_PER_SECOND = 1; + + // 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 alarmPolicyRuleServiceMap = + new ConcurrentHashMap<>(); + private ConcurrentHashMap alarmPolicyRuleDeviceMap = + new ConcurrentHashMap<>(); + private ConcurrentHashMap subscriptionList = new ConcurrentHashMap<>(); + private HashMap policyRuleActionMap = new HashMap<>(); + + public ConcurrentHashMap getSubscriptionList() { + return subscriptionList; + } + + public ConcurrentHashMap getAlarmPolicyRuleServiceMap() { + return alarmPolicyRuleServiceMap; + } + + public ConcurrentHashMap getAlarmPolicyRuleDeviceMap() { + return alarmPolicyRuleDeviceMap; + } + + public HashMap getPolicyRuleActionMap() { + return policyRuleActionMap; + } + + private static String gen() { + Random r = new Random(System.currentTimeMillis()); + return String.valueOf((1 + r.nextInt(2)) * 10000 + r.nextInt(10000)); + } + + private static double getTimeStamp() { + long now = Instant.now().getEpochSecond(); + return Long.valueOf(now).doubleValue(); + } + + public void applyActionService(String alarmId) { + PolicyRuleService policyRuleService = alarmPolicyRuleServiceMap.get(alarmId); + PolicyRuleAction policyRuleAction = + policyRuleService.getPolicyRuleBasic().getPolicyRuleActions().get(0); + + if (noAlarms == 0) { + noAlarms++; + 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; + } + } else if (noAlarms == 2) { + noAlarms = 0; + } else { + noAlarms++; + } + } + + public List createAlarmDescriptorList(PolicyRule policyRule) { + final var policyRuleType = policyRule.getPolicyRuleType(); + final var policyRuleTypeSpecificType = policyRuleType.getPolicyRuleType(); + + List alarmDescriptorList = new ArrayList<>(); + if (policyRuleTypeSpecificType instanceof PolicyRuleService) { + final var policyRuleService = (PolicyRuleService) policyRuleTypeSpecificType; + final var policyRuleBasic = policyRuleService.getPolicyRuleBasic(); + + alarmDescriptorList = parsePolicyRuleCondition(policyRuleBasic); + if (alarmDescriptorList.isEmpty()) { + return List.of(); + } + } else { + final var policyRuleDevice = (PolicyRuleDevice) policyRuleTypeSpecificType; + final var policyRuleBasic = policyRuleDevice.getPolicyRuleBasic(); + + alarmDescriptorList = parsePolicyRuleCondition(policyRuleBasic); + if (alarmDescriptorList.isEmpty()) { + return List.of(); + } + for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { + alarmPolicyRuleDeviceMap.put(alarmDescriptor.getAlarmId(), policyRuleDevice); + } + } + + return alarmDescriptorList; + } + + private List parsePolicyRuleCondition(PolicyRuleBasic policyRuleBasic) { + BooleanOperator booleanOperator = policyRuleBasic.getBooleanOperator(); + if (booleanOperator == BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_OR) { + return parsePolicyRuleConditionOr(policyRuleBasic); + } + if (booleanOperator == BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_AND) { + return Arrays.asList(parsePolicyRuleConditionAnd(policyRuleBasic)); + } + return List.of(); + } + + private List parsePolicyRuleConditionOr(PolicyRuleBasic policyRuleBasic) { + + List policyRuleConditions = policyRuleBasic.getPolicyRuleConditions(); + List alarmDescriptorList = new ArrayList<>(); + + for (PolicyRuleCondition policyRuleCondition : policyRuleConditions) { + var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); + + // TODO: Temp fix for AlarmDescriptor object + AlarmDescriptor alarmDescriptor = + new AlarmDescriptor( + "", + "alarmDescription", + "alarmName-" + gen(), + policyRuleCondition.getKpiId(), + kpiValueRange, + getTimeStamp()); + + alarmDescriptorList.add(alarmDescriptor); + } + + HashMap policyRuleActionMap = new HashMap<>(); + List policyRuleActions = policyRuleBasic.getPolicyRuleActions(); + + for (int i = 0; i < policyRuleActions.size(); i++) { + policyRuleActionMap.put(alarmDescriptorList.get(i).getAlarmId(), policyRuleActions.get(i)); + } + + return alarmDescriptorList; + } + + private AlarmDescriptor parsePolicyRuleConditionAnd(PolicyRuleBasic policyRuleBasic) { + + // TODO: KpiIds should be the same. Add check. + + List policyRuleConditionList = policyRuleBasic.getPolicyRuleConditions(); + List kpisList = new ArrayList(); + + for (PolicyRuleCondition policyRuleCondition : policyRuleConditionList) { + kpisList.add(policyRuleCondition.getKpiId()); + } + + if (policyRuleConditionList.size() > 1) { + return createAlarmDescriptorWithRange(policyRuleConditionList); + } + + return createAlarmDescriptorWithoutRange(policyRuleConditionList.get(0)); + } + + private AlarmDescriptor createAlarmDescriptorWithRange( + List policyRuleConditionList) { + + final var kpiId = policyRuleConditionList.get(0).getKpiId(); + + HashMap KpiValueRangeMap = new HashMap<>(); + for (PolicyRuleCondition policyRuleCondition : policyRuleConditionList) { + + if (!KpiValueRangeMap.containsKey(kpiId)) { + var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); + KpiValueRangeMap.put(kpiId, kpiValueRange); + continue; + } + + var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); + // TODO: Handle combineKpiValueRanges exceptions + var combinedKpiValueRange = + combineKpiValueRanges(kpiId, KpiValueRangeMap.get(kpiId), kpiValueRange); + KpiValueRangeMap.put(kpiId, combinedKpiValueRange); + } + + return new AlarmDescriptor( + "", + "alarmDescription", + "alarmName-" + gen(), + kpiId, + KpiValueRangeMap.get(kpiId), + getTimeStamp()); + } + + private KpiValueRange convertPolicyRuleConditionToKpiValueRange( + PolicyRuleCondition policyRuleCondition) { + + switch (policyRuleCondition.getNumericalOperator()) { + case POLICY_RULE_CONDITION_NUMERICAL_EQUAL: + return new KpiValueRange( + policyRuleCondition.getKpiValue(), policyRuleCondition.getKpiValue(), true, true, true); + case POLICY_RULE_CONDITION_NUMERICAL_NOT_EQUAL: + return new KpiValueRange( + policyRuleCondition.getKpiValue(), + policyRuleCondition.getKpiValue(), + true, + false, + false); + + case POLICY_RULE_CONDITION_NUMERICAL_GREATER_THAN: + return new KpiValueRange(null, policyRuleCondition.getKpiValue(), true, false, false); + + case POLICY_RULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL: + return new KpiValueRange(null, policyRuleCondition.getKpiValue(), true, true, false); + + case POLICY_RULE_CONDITION_NUMERICAL_LESS_THAN: + return new KpiValueRange(policyRuleCondition.getKpiValue(), null, true, false, false); + + case POLICY_RULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL: + return new KpiValueRange(policyRuleCondition.getKpiValue(), null, true, false, true); + default: + return null; + } + } + + private KpiValueRange combineKpiValueRanges( + String kpiId, KpiValueRange firstKpiValueRange, KpiValueRange secondKpiValueRange) { + if (secondKpiValueRange.getInRange() == true) { + LOGGER.errorf("KpiId: %s, has already range values", kpiId); + return null; + } + + if ((firstKpiValueRange.getKpiMinValue() != null) + && (secondKpiValueRange.getKpiMinValue() != null)) { + LOGGER.errorf("KpiId: %s, has already min value", kpiId); + return null; + } + + if ((firstKpiValueRange.getKpiMaxValue() != null) + && (secondKpiValueRange.getKpiMinValue() != null)) { + LOGGER.errorf("KpiId: %s, has already max value", kpiId); + return null; + } + + // Objects.nonNull(secondKpiValueRange); + + var kpiMinValue = + firstKpiValueRange.getKpiMinValue() != null + ? firstKpiValueRange.getKpiMinValue() + : secondKpiValueRange.getKpiMinValue(); + var kpiMaxValue = + firstKpiValueRange.getKpiMaxValue() != null + ? firstKpiValueRange.getKpiMaxValue() + : secondKpiValueRange.getKpiMaxValue(); + boolean includeMinValue = + firstKpiValueRange.getIncludeMinValue() || secondKpiValueRange.getIncludeMinValue(); + boolean includeMaxValue = + firstKpiValueRange.getIncludeMaxValue() || secondKpiValueRange.getIncludeMaxValue(); + + return new KpiValueRange(kpiMinValue, kpiMaxValue, true, includeMinValue, includeMaxValue); + } + + private AlarmDescriptor createAlarmDescriptorWithoutRange( + PolicyRuleCondition policyRuleCondition) { + + final var kpiId = policyRuleCondition.getKpiId(); + final var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); + + return new AlarmDescriptor( + "", "alarmDescription", "alarmName-" + gen(), kpiId, kpiValueRange, getTimeStamp()); + } + + // TODO: To be refactored or deprecated + // private void evaluateAction( + // PolicyRule policyRule, + // List alarmDescriptorList, + // Multi multi) { + // + // Long count = + // multi + // .collect() + // .with(Collectors.counting()) + // .await() + // .atMost(Duration.ofMinutes(POLICY_EVALUATION_TIMEOUT)); + // + // if (count > ACCEPTABLE_NUMBER_OF_ALARMS) { + // for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { + // monitoringService + // .deleteAlarm(alarmDescriptor.getAlarmId()) + // .subscribe() + // .with( + // emptyMessage -> + // LOGGER.infof( + // "Alarm [%s] has been deleted as ineffective.\n", + // alarmDescriptor.getAlarmId())); + // } + // setPolicyRuleToContext(policyRule, INEFFECTIVE_POLICYRULE_STATE); + // } else { + // setPolicyRuleToContext(policyRule, EFFECTIVE_POLICYRULE_STATE); + // } + // } + + public void applyActionDevice(String alarmId) { + PolicyRuleDevice policyRuleDevice = alarmPolicyRuleDeviceMap.get(alarmId); + + if (policyRuleActionMap.get(alarmId).getPolicyRuleActionEnum() + == PolicyRuleActionEnum.POLICY_RULE_ACTION_SET_DEVICE_STATUS) { + // In case additional PolicyRuleAction for Devices will be added + } + + setPolicyRuleDeviceToContext(policyRuleDevice, ACTIVE_POLICYRULE_STATE); + + List deviceIds = policyRuleDevice.getDeviceIds(); + List actionConfigs = + policyRuleActionMap.get(alarmId).getPolicyRuleActionConfigs(); + + if (deviceIds.size() != actionConfigs.size()) { + String message = + String.format( + "The number of action parameters in PolicyRuleDevice with ID: %s, is not aligned with the number of devices.", + policyRuleDevice.getPolicyRuleBasic().getPolicyRuleId()); + setPolicyRuleDeviceToContext( + policyRuleDevice, new PolicyRuleState(PolicyRuleStateEnum.POLICY_FAILED, message)); + return; + } + + for (var i = 0; i < deviceIds.size(); i++) { + activateDevice(deviceIds.get(i), actionConfigs.get(i)); + } + + setPolicyRuleDeviceToContext(policyRuleDevice, ENFORCED_POLICYRULE_STATE); + } + + private void activateDevice(String deviceId, PolicyRuleActionConfig actionConfig) { + + Boolean toBeEnabled; + if (actionConfig.getActionKey() == "ENABLED") { + toBeEnabled = true; + } else if (actionConfig.getActionKey() == "DISABLED") { + toBeEnabled = false; + } else { + LOGGER.errorf(INVALID_MESSAGE, actionConfig.getActionKey()); + return; + } + + final var deserializedDeviceUni = contextService.getDevice(deviceId); + + deserializedDeviceUni + .subscribe() + .with( + device -> { + if (toBeEnabled && device.isDisabled()) { + device.enableDevice(); + } else if (!toBeEnabled && device.isEnabled()) { + device.disableDevice(); + } else { + LOGGER.errorf(INVALID_MESSAGE, "Device is already in the desired state"); + return; + } + + deviceService.configureDevice(device); + }); + } + + private void addServiceConfigRule( + PolicyRuleService policyRuleService, PolicyRuleAction policyRuleAction) { + + ConfigActionEnum configActionEnum = ConfigActionEnum.SET; + List actionConfigs = policyRuleAction.getPolicyRuleActionConfigs(); + List newConfigRules = new ArrayList<>(); + + for (PolicyRuleActionConfig actionConfig : actionConfigs) { + ConfigRuleCustom configRuleCustom = + new ConfigRuleCustom(actionConfig.getActionKey(), actionConfig.getActionValue()); + ConfigRuleTypeCustom configRuleType = new ConfigRuleTypeCustom(configRuleCustom); + ConfigRule configRule = new ConfigRule(configActionEnum, configRuleType); + newConfigRules.add(configRule); + } + + var deserializedServiceUni = contextService.getService(policyRuleService.getServiceId()); + deserializedServiceUni + .subscribe() + .with( + deserializedService -> { + List configRules = + deserializedService.getServiceConfig().getConfigRules(); + configRules.addAll(newConfigRules); + deserializedService.setServiceConfig(new ServiceConfig(configRules)); + }); + } + + private void addServiceConstraint( + PolicyRuleService policyRuleService, PolicyRuleAction policyRuleAction) { + + List actionConfigs = policyRuleAction.getPolicyRuleActionConfigs(); + List constraintList = new ArrayList<>(); + + for (PolicyRuleActionConfig actionConfig : actionConfigs) { + var constraintCustom = + new ConstraintCustom(actionConfig.getActionKey(), actionConfig.getActionValue()); + var constraintTypeCustom = new ConstraintTypeCustom(constraintCustom); + constraintList.add(new Constraint(constraintTypeCustom)); + } + + final var deserializedServiceUni = contextService.getService(policyRuleService.getServiceId()); + + deserializedServiceUni + .subscribe() + .with( + deserializedService -> { + deserializedService.appendServiceConstraints(constraintList); + serviceService.updateService(deserializedService); + setPolicyRuleServiceToContext(policyRuleService, ENFORCED_POLICYRULE_STATE); + }); + } + + private void callRecalculatePathRPC( + PolicyRuleService policyRuleService, PolicyRuleAction policyRuleAction) { + + final var deserializedServiceUni = contextService.getService(policyRuleService.getServiceId()); + + deserializedServiceUni + .subscribe() + .with( + deserializedService -> { + serviceService + .recomputeConnections(deserializedService) + .subscribe() + .with( + x -> { + LOGGER.info("called recomputeConnections with:"); + LOGGER.info(deserializedService); + setPolicyRuleServiceToContext(policyRuleService, ENFORCED_POLICYRULE_STATE); + }); + }); + } + + private void setPolicyRuleToContext(PolicyRule policyRule, PolicyRuleState policyRuleState) { + final var policyRuleType = policyRule.getPolicyRuleType(); + final var policyRuleTypeSpecificType = policyRuleType.getPolicyRuleType(); + + if (policyRuleTypeSpecificType instanceof PolicyRuleService) { + setPolicyRuleServiceToContext( + (PolicyRuleService) policyRuleTypeSpecificType, policyRuleState); + } + if (policyRuleTypeSpecificType instanceof PolicyRuleDevice) { + setPolicyRuleDeviceToContext((PolicyRuleDevice) policyRuleTypeSpecificType, policyRuleState); + } + } + + public void setPolicyRuleServiceToContext( + PolicyRuleService policyRuleService, PolicyRuleState policyRuleState) { + LOGGER.infof("Setting Policy Rule state to [%s]", policyRuleState.toString()); + + final var policyRuleBasic = policyRuleService.getPolicyRuleBasic(); + policyRuleBasic.setPolicyRuleState(policyRuleState); + policyRuleService.setPolicyRuleBasic(policyRuleBasic); + + final var policyRuleTypeService = new PolicyRuleTypeService(policyRuleService); + final var policyRule = new PolicyRule(policyRuleTypeService); + contextService.setPolicyRule(policyRule).subscribe().with(x -> {}); + } + + public void setPolicyRuleDeviceToContext( + PolicyRuleDevice policyRuleDevice, PolicyRuleState policyRuleState) { + LOGGER.infof("Setting Policy Rule state to [%s]", policyRuleState.toString()); + + final var policyRuleBasic = policyRuleDevice.getPolicyRuleBasic(); + policyRuleBasic.setPolicyRuleState(policyRuleState); + policyRuleDevice.setPolicyRuleBasic(policyRuleBasic); + + final var policyRuleTypeService = new PolicyRuleTypeDevice(policyRuleDevice); + final var policyRule = new PolicyRule(policyRuleTypeService); + contextService.setPolicyRule(policyRule).subscribe().with(x -> {}); + } +} diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGateway.java similarity index 85% rename from src/policy/src/main/java/eu/teraflow/policy/PolicyGateway.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGateway.java index c5570af74136ea4b8afc465f10fcb7d269db41a0..db01eb9df714023fd11e71beb32904a9fa0272ec 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGateway.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy.policy; import policy.PolicyService; diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGatewayImpl.java similarity index 96% rename from src/policy/src/main/java/eu/teraflow/policy/PolicyGatewayImpl.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGatewayImpl.java index 30e888d9fab1aae535dca345c7c56e28218bd2c2..d8ba0ca8d158858dd512b40bd0e97937edca9cd2 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGatewayImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,15 +14,16 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy.policy; import context.ContextOuterClass.ServiceId; import io.quarkus.grpc.GrpcService; import io.smallrye.mutiny.Uni; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.eclipse.microprofile.metrics.MetricUnits; import org.eclipse.microprofile.metrics.annotation.Counted; import org.eclipse.microprofile.metrics.annotation.Timed; +import org.etsi.tfs.policy.Serializer; import policy.Policy; import policy.Policy.PolicyRuleBasic; import policy.Policy.PolicyRuleDevice; diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyService.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyService.java similarity index 77% rename from src/policy/src/main/java/eu/teraflow/policy/PolicyService.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyService.java index 556e350322de1df29c38cbc852106b4845e25095..22cb203abea8899297b3aadf53c162fda252ed37 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy.policy; -import eu.teraflow.policy.model.PolicyRuleDevice; -import eu.teraflow.policy.model.PolicyRuleService; -import eu.teraflow.policy.model.PolicyRuleState; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.policy.policy.model.PolicyRuleDevice; +import org.etsi.tfs.policy.policy.model.PolicyRuleService; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; public interface PolicyService { 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 new file mode 100644 index 0000000000000000000000000000000000000000..f2cc6f99a68351fba1a93af0880bc61eace74cbb --- /dev/null +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyServiceImpl.java @@ -0,0 +1,252 @@ +/* +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY 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; + +import static org.etsi.tfs.policy.common.ApplicationProperties.*; + +import io.smallrye.mutiny.Uni; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import java.util.function.Function; +import org.etsi.tfs.policy.context.ContextService; +import org.etsi.tfs.policy.exception.ExternalServiceFailureException; +import org.etsi.tfs.policy.policy.model.PolicyRule; +import org.etsi.tfs.policy.policy.model.PolicyRuleDevice; +import org.etsi.tfs.policy.policy.model.PolicyRuleService; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; +import org.etsi.tfs.policy.policy.service.PolicyRuleConditionValidator; +import org.jboss.logging.Logger; + +@ApplicationScoped +public class PolicyServiceImpl implements PolicyService { + + private static final Logger LOGGER = Logger.getLogger(PolicyServiceImpl.class); + + private final ContextService contextService; + private final PolicyRuleConditionValidator policyRuleConditionValidator; + private final CommonPolicyServiceImpl commonPolicyServiceImpl; + private final AddPolicyServiceImpl addPolicyServiceImpl; + private final AddPolicyDeviceImpl addPolicyDeviceImpl; + + @Inject + public PolicyServiceImpl( + ContextService contextService, + PolicyRuleConditionValidator policyRuleConditionValidator, + CommonPolicyServiceImpl commonPolicyServiceImpl, + AddPolicyServiceImpl addPolicyServiceImpl, + AddPolicyDeviceImpl addPolicyDeviceImpl) { + this.contextService = contextService; + this.policyRuleConditionValidator = policyRuleConditionValidator; + this.commonPolicyServiceImpl = commonPolicyServiceImpl; + this.addPolicyServiceImpl = addPolicyServiceImpl; + this.addPolicyDeviceImpl = addPolicyDeviceImpl; + } + + @Override + public Uni addPolicyService(PolicyRuleService policyRuleService) { + LOGGER.infof("Received %s", policyRuleService); + + if (!policyRuleService.areArgumentsValid()) { + LOGGER.error(policyRuleService.getExceptionMessage()); + final var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, policyRuleService.getExceptionMessage()); + + return Uni.createFrom().item(policyRuleState); + } + + final var policyRuleBasic = policyRuleService.getPolicyRuleBasic(); + if (!policyRuleBasic.areArgumentsValid()) { + LOGGER.error(policyRuleService.getExceptionMessage()); + final var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, policyRuleBasic.getExceptionMessage()); + return Uni.createFrom().item(policyRuleState); + } + + final var serviceId = policyRuleService.getServiceId(); + final var deviceIds = policyRuleService.getDeviceIds(); + final var isServiceValid = policyRuleConditionValidator.isServiceIdValid(serviceId, deviceIds); + + return isServiceValid + .onFailure() + .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) + .onItem() + .transform( + isService -> + addPolicyServiceImpl.constructPolicyStateBasedOnCriteria( + isService, serviceId, policyRuleService, policyRuleBasic)) + .flatMap(Function.identity()); + } + + @Override + public Uni addPolicyDevice(PolicyRuleDevice policyRuleDevice) { + LOGGER.infof("Received %s", policyRuleDevice); + + if (!policyRuleDevice.areArgumentsValid()) { + LOGGER.error(policyRuleDevice.getExceptionMessage()); + final var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, policyRuleDevice.getExceptionMessage()); + + return Uni.createFrom().item(policyRuleState); + } + + final var policyRuleBasic = policyRuleDevice.getPolicyRuleBasic(); + if (!policyRuleBasic.areArgumentsValid()) { + LOGGER.error(policyRuleDevice.getExceptionMessage()); + final var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, policyRuleBasic.getExceptionMessage()); + return Uni.createFrom().item(policyRuleState); + } + + final var deviceIds = policyRuleDevice.getDeviceIds(); + final var areDevicesValid = addPolicyDeviceImpl.returnInvalidDeviceIds(deviceIds); + + return areDevicesValid + .onFailure() + .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) + .onItem() + .transform( + areDevices -> + addPolicyDeviceImpl.areDeviceOnContext( + areDevices, policyRuleDevice, policyRuleBasic)) + .flatMap(Function.identity()); + } + + @Override + public Uni updatePolicyService(PolicyRuleService policyRuleService) { + LOGGER.infof("Received %s", policyRuleService); + + if (!policyRuleService.areArgumentsValid()) { + LOGGER.error(policyRuleService.getExceptionMessage()); + final var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, policyRuleService.getExceptionMessage()); + + return Uni.createFrom().item(policyRuleState); + } + + final var policyRuleBasic = policyRuleService.getPolicyRuleBasic(); + if (!policyRuleBasic.areArgumentsValid()) { + LOGGER.error(policyRuleService.getExceptionMessage()); + final var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, policyRuleBasic.getExceptionMessage()); + return Uni.createFrom().item(policyRuleState); + } + + final var serviceId = policyRuleService.getServiceId(); + final var policyRuleId = policyRuleBasic.getPolicyRuleId(); + final var isPolicyRuleServiceValid = + policyRuleConditionValidator.isPolicyRuleServiceValid(policyRuleId, serviceId); + + return isPolicyRuleServiceValid + .onFailure() + .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) + .onItem() + .transform( + isPolicyRuleService -> { + if (!isPolicyRuleService) { + return new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, String.format(INVALID_MESSAGE, serviceId)); + } + + return VALIDATED_POLICYRULE_STATE; + }); + } + + @Override + public Uni updatePolicyDevice(PolicyRuleDevice policyRuleDevice) { + LOGGER.infof("Received %s", policyRuleDevice); + + if (!policyRuleDevice.areArgumentsValid()) { + LOGGER.error(policyRuleDevice.getExceptionMessage()); + final var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, policyRuleDevice.getExceptionMessage()); + + return Uni.createFrom().item(policyRuleState); + } + + final var policyRuleBasic = policyRuleDevice.getPolicyRuleBasic(); + if (!policyRuleBasic.areArgumentsValid()) { + final var policyRuleState = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, policyRuleBasic.getExceptionMessage()); + return Uni.createFrom().item(policyRuleState); + } + + final var policyRuleId = policyRuleBasic.getPolicyRuleId(); + final var isPolicyRuleValid = + policyRuleConditionValidator.isUpdatedPolicyRuleIdValid(policyRuleId); + + return isPolicyRuleValid + .onFailure() + .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) + .onItem() + .transform( + isPolicyRuleService -> { + if (!isPolicyRuleService) { + return new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, + String.format(INVALID_MESSAGE, policyRuleId)); + } + + return VALIDATED_POLICYRULE_STATE; + }); + } + + @Override + public Uni deletePolicy(String policyRuleId) { + LOGGER.infof("Received %s", policyRuleId); + + final var getPolicyRule = contextService.getPolicyRule(policyRuleId); + + return getPolicyRule.onItem().transform(policyRule -> removePolicyFromContext(policyRule)); + } + + private PolicyRuleState removePolicyFromContext(PolicyRule policyRule) { + var policyRuleBasic = policyRule.getPolicyRuleType().getPolicyRuleBasic(); + String policyId = policyRuleBasic.getPolicyRuleId(); + + policyRule + .getPolicyRuleType() + .getPolicyRuleBasic() + .setPolicyRuleState(REMOVED_POLICYRULE_STATE); + + contextService + .setPolicyRule(policyRule) + .onFailure() + .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) + .subscribe() + .with( + tmp -> + LOGGER.infof( + "DeletePolicy with id: " + VALID_MESSAGE, policyRuleBasic.getPolicyRuleId())); + + contextService.removePolicyRule(policyId).subscribe().with(x -> {}); + + // TODO: When the Map doesn't contains the policyId we should throw an exception? + if (commonPolicyServiceImpl.getSubscriptionList().contains(policyId)) + commonPolicyServiceImpl.getSubscriptionList().get(policyId).cancel(); + + return policyRuleBasic.getPolicyRuleState(); + } +} diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/BooleanOperator.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/BooleanOperator.java similarity index 85% rename from src/policy/src/main/java/eu/teraflow/policy/model/BooleanOperator.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/BooleanOperator.java index 1c8208ebd2fc545b3cbdda090ee6a02658c8e55c..a4f5ef12cd1197e4ba7e18937b12bb6c952e7f91 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/BooleanOperator.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/BooleanOperator.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; public enum BooleanOperator { POLICYRULE_CONDITION_BOOLEAN_UNDEFINED, diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/NumericalOperator.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/NumericalOperator.java similarity index 88% rename from src/policy/src/main/java/eu/teraflow/policy/model/NumericalOperator.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/NumericalOperator.java index 3d59ac0a786ec4d5454711b739cc4337a8845450..bcb27cdaf162b0959ffbb68ce2c1737ece04412a 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/NumericalOperator.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/NumericalOperator.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; public enum NumericalOperator { POLICY_RULE_CONDITION_NUMERICAL_UNDEFINED, diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRule.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRule.java similarity index 89% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRule.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRule.java index 177bf85f69e00b793a4c4846f58677c0d619f536..423b3a05d1879b91728b469bccc21d4d3cf64fcb 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRule.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; public class PolicyRule { diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleAction.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleAction.java similarity index 93% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleAction.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleAction.java index 2c9bcae09826da7ec17f42f743515384f10cd886..a84ceaf58141815f6bbc24d822985fd2df2001e8 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleAction.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleAction.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; import java.util.List; import java.util.stream.Collectors; diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleActionConfig.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionConfig.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleActionConfig.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionConfig.java index 871fd933a3143a94eea616eae00aedf63bbb8168..7399a3bfb2bde611a4d0ea99b4d1f9fd742aca84 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleActionConfig.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionConfig.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; public class PolicyRuleActionConfig { diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleActionEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionEnum.java similarity index 87% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleActionEnum.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionEnum.java index 971dfbaf29bba86ce0043e2edc6bb1e21f181643..10bd7ec61bf8c839a248a420362bf248bd420e80 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleActionEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; public enum PolicyRuleActionEnum { POLICY_RULE_ACTION_NO_ACTION, 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 new file mode 100644 index 0000000000000000000000000000000000000000..d4cf83fc65a6569f12808850788f4caa0238fa47 --- /dev/null +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBase.java @@ -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. +*/ + +package org.etsi.tfs.policy.policy.model; + +import java.util.List; +import lombok.Data; + +@Data +public class PolicyRuleBase { + + protected PolicyRuleBasic policyRuleBasic; + protected List deviceIds; + protected Boolean isValid; + protected String exceptionMessage; +} diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleBasic.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBasic.java similarity index 93% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleBasic.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBasic.java index 9b6c3282886a2373d8a60493add54422e11b4b07..085767bd19539f015de07c7850a29759b12f49d8 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleBasic.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBasic.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,13 +14,13 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; import static com.google.common.base.Preconditions.checkArgument; -import eu.teraflow.policy.common.Util; import java.util.ArrayList; import java.util.List; +import org.etsi.tfs.policy.common.Util; public class PolicyRuleBasic { @@ -64,7 +64,7 @@ public class PolicyRuleBasic { this.booleanOperator = BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_UNDEFINED; this.policyRuleActions = new ArrayList(); this.isValid = false; - this.exceptionMessage = e.toString(); + this.exceptionMessage = e.getMessage(); } } @@ -72,7 +72,7 @@ public class PolicyRuleBasic { return isValid; } - public String getExeceptionMessage() { + public String getExceptionMessage() { return exceptionMessage; } diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleCondition.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleCondition.java similarity index 93% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleCondition.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleCondition.java index 9b7de240deb8a75316501dac1765a7c5518e97ab..f872e9980986dcb5ba8279f1c04a3d41f1a27791 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleCondition.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleCondition.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import eu.teraflow.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.monitoring.model.KpiValue; public class PolicyRuleCondition { diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleDevice.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleDevice.java similarity index 65% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleDevice.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleDevice.java index 516cc969024e509c95c9cc41576f5f962c882ef2..2e7d93951b2b891eeec63c65cf7b6fdf08c2c813 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleDevice.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleDevice.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,20 +14,15 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; import static com.google.common.base.Preconditions.checkArgument; -import eu.teraflow.policy.common.Util; import java.util.ArrayList; import java.util.List; +import org.etsi.tfs.policy.common.Util; -public class PolicyRuleDevice { - - private PolicyRuleBasic policyRuleBasic; - private List deviceIds; - private Boolean isValid; - private String exceptionMessage; +public class PolicyRuleDevice extends PolicyRuleBase { public PolicyRuleDevice(PolicyRuleBasic policyRuleBasic, List deviceIds) { @@ -40,7 +35,7 @@ public class PolicyRuleDevice { this.policyRuleBasic = policyRuleBasic; this.deviceIds = new ArrayList(); this.isValid = false; - this.exceptionMessage = e.toString(); + this.exceptionMessage = e.getMessage(); } } @@ -48,22 +43,6 @@ public class PolicyRuleDevice { return isValid; } - public String getExeceptionMessage() { - return exceptionMessage; - } - - public PolicyRuleBasic getPolicyRuleBasic() { - return policyRuleBasic; - } - - public void setPolicyRuleBasic(PolicyRuleBasic policyRuleBasic) { - this.policyRuleBasic = policyRuleBasic; - } - - public List getDeviceIds() { - return deviceIds; - } - @Override public String toString() { return String.format( diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleService.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleService.java similarity index 69% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleService.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleService.java index 9d362919aadb772f97199df394f851953b446619..f10d4b58e9d74638c96d497d034b42927d84130e 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,22 +14,20 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; import static com.google.common.base.Preconditions.checkArgument; -import eu.teraflow.policy.common.Util; -import eu.teraflow.policy.context.model.ServiceId; import java.util.ArrayList; import java.util.List; +import lombok.Data; +import org.etsi.tfs.policy.common.Util; +import org.etsi.tfs.policy.context.model.ServiceId; -public class PolicyRuleService { +@Data +public class PolicyRuleService extends PolicyRuleBase { - private PolicyRuleBasic policyRuleBasic; private ServiceId serviceId; - private List deviceIds; - private Boolean isValid; - private String exceptionMessage; public PolicyRuleService( PolicyRuleBasic policyRuleBasic, ServiceId serviceId, List deviceIds) { @@ -50,7 +48,7 @@ public class PolicyRuleService { this.serviceId = new ServiceId("", ""); this.deviceIds = new ArrayList(); this.isValid = false; - this.exceptionMessage = e.toString(); + this.exceptionMessage = e.getMessage(); } } @@ -58,26 +56,6 @@ public class PolicyRuleService { return isValid; } - public String getExeceptionMessage() { - return exceptionMessage; - } - - public PolicyRuleBasic getPolicyRuleBasic() { - return policyRuleBasic; - } - - public void setPolicyRuleBasic(PolicyRuleBasic policyRuleBasic) { - this.policyRuleBasic = policyRuleBasic; - } - - public ServiceId getServiceId() { - return serviceId; - } - - public List getDeviceIds() { - return deviceIds; - } - @Override public String toString() { return String.format( diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleState.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleState.java similarity index 92% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleState.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleState.java index 1102e4778fec00d3f65b4cb43408b25d1254fb17..2e96d8d9c760c88d036208d43ba982842b52bb3b 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleState.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleState.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; public class PolicyRuleState { diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleStateEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleStateEnum.java similarity index 87% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleStateEnum.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleStateEnum.java index 749ca389e1f2ced8037078dea429938257ee8082..95711def2f1f47d40079d21d241c433c9546a19b 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleStateEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleStateEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; public enum PolicyRuleStateEnum { POLICY_UNDEFINED, diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleType.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleType.java similarity index 85% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleType.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleType.java index b3389f6a99bcbd4f7c8f5b77f863b15891bf8db2..5cb04c05c685b70e70b88f7595246aa49b00237a 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; public interface PolicyRuleType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleTypeDevice.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeDevice.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleTypeDevice.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeDevice.java index d262f254bbb4583256bfc18e8526a12bd1c048f1..476bba516df51c12ded9e628f83cf3710bb34c1e 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleTypeDevice.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeDevice.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; public class PolicyRuleTypeDevice implements PolicyRuleType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleTypeService.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeService.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleTypeService.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeService.java index 54978476f457581670184feaec679b59f07d45e2..1de46182267e1d8ed0c61be36f2ed638a52042bb 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/model/PolicyRuleTypeService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.model; +package org.etsi.tfs.policy.policy.model; public class PolicyRuleTypeService implements PolicyRuleType { diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyRuleConditionFieldsGetter.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionFieldsGetter.java similarity index 81% rename from src/policy/src/main/java/eu/teraflow/policy/PolicyRuleConditionFieldsGetter.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionFieldsGetter.java index 89330354ef0fae7ce0b4834e9f57640b3e8dc027..cf58b9d6c46af9a7710f4daf436ccc62754e8139 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyRuleConditionFieldsGetter.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionFieldsGetter.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy.policy.service; -import eu.teraflow.policy.model.NumericalOperator; -import eu.teraflow.policy.model.PolicyRuleCondition; -import eu.teraflow.policy.monitoring.model.KpiValue; +import jakarta.inject.Singleton; import java.util.List; import java.util.stream.Collectors; -import javax.inject.Singleton; +import org.etsi.tfs.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.policy.model.NumericalOperator; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; @Singleton public class PolicyRuleConditionFieldsGetter { diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyRuleConditionValidator.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionValidator.java similarity index 89% rename from src/policy/src/main/java/eu/teraflow/policy/PolicyRuleConditionValidator.java rename to src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionValidator.java index a1556ffbd715e0065681dcfa6001dd041ff89ef0..090579fee16901ad1d427755be9fc330efad8ea7 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyRuleConditionValidator.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionValidator.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,19 +14,19 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy.policy.service; -import eu.teraflow.policy.context.ContextService; -import eu.teraflow.policy.context.model.Device; -import eu.teraflow.policy.context.model.EndPointId; -import eu.teraflow.policy.context.model.Service; -import eu.teraflow.policy.context.model.ServiceId; -import eu.teraflow.policy.model.PolicyRuleService; import io.smallrye.mutiny.Uni; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import java.util.ArrayList; import java.util.List; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import org.etsi.tfs.policy.context.ContextService; +import org.etsi.tfs.policy.context.model.Device; +import org.etsi.tfs.policy.context.model.EndPointId; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceId; +import org.etsi.tfs.policy.policy.model.PolicyRuleService; import org.jboss.logging.Logger; @ApplicationScoped diff --git a/src/policy/src/main/java/eu/teraflow/policy/service/ServiceGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGateway.java similarity index 73% rename from src/policy/src/main/java/eu/teraflow/policy/service/ServiceGateway.java rename to src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGateway.java index b8764efe312bae8b395beb3a22b1d2a57346b37d..4e065132fe4805462386d55ffa2a6ee284778644 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/service/ServiceGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGateway.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.policy.service; +package org.etsi.tfs.policy.service; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.context.model.Service; -import eu.teraflow.policy.context.model.ServiceId; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceId; public interface ServiceGateway { diff --git a/src/policy/src/main/java/eu/teraflow/policy/service/ServiceGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGatewayImpl.java similarity index 84% rename from src/policy/src/main/java/eu/teraflow/policy/service/ServiceGatewayImpl.java rename to src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGatewayImpl.java index f8f38f7520f608b52f432e41b96e46448234a68e..fbf96534b892a84208ace947b9664a6e0a2833e2 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/service/ServiceGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGatewayImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,16 +14,16 @@ * limitations under the License. */ -package eu.teraflow.policy.service; +package org.etsi.tfs.policy.service; -import eu.teraflow.policy.Serializer; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.context.model.Service; -import eu.teraflow.policy.context.model.ServiceId; import io.quarkus.grpc.GrpcClient; import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.etsi.tfs.policy.Serializer; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceId; import org.jboss.logging.Logger; import service.MutinyServiceServiceGrpc.MutinyServiceServiceStub; diff --git a/src/policy/src/main/java/eu/teraflow/policy/service/ServiceService.java b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceService.java similarity index 73% rename from src/policy/src/main/java/eu/teraflow/policy/service/ServiceService.java rename to src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceService.java index aa4411ee9d79ea56c3d6f5b901f92b0125fe4b00..b6b05370f633568f0b294ef6672040431ec871d3 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/service/ServiceService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.policy.service; +package org.etsi.tfs.policy.service; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.context.model.Service; -import eu.teraflow.policy.context.model.ServiceId; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceId; public interface ServiceService { diff --git a/src/policy/src/main/java/eu/teraflow/policy/service/ServiceServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceServiceImpl.java similarity index 76% rename from src/policy/src/main/java/eu/teraflow/policy/service/ServiceServiceImpl.java rename to src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceServiceImpl.java index 109bcba261d4464313d5b6f21ee2bdde76b17879..125dd144999661ef1b1fe86787f1e91772a09b8e 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/service/ServiceServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceServiceImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ * limitations under the License. */ -package eu.teraflow.policy.service; +package org.etsi.tfs.policy.service; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.context.model.Service; -import eu.teraflow.policy.context.model.ServiceId; import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceId; @ApplicationScoped public class ServiceServiceImpl implements ServiceService { diff --git a/src/policy/src/main/resources/application.yml b/src/policy/src/main/resources/application.yml index 38a222d7934751e9eac28854300d55bd631a669c..c006f5472d5d4fbd062f143988132fa62fa2c8ed 100644 --- a/src/policy/src/main/resources/application.yml +++ b/src/policy/src/main/resources/application.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,6 +23,9 @@ quarkus: context: host: ${quarkus.kubernetes.env.vars.context-service-host} port: 1010 + context_policy: + host: ${quarkus.kubernetes.env.vars.context-service-host} + port: 1010 monitoring: host: ${quarkus.kubernetes.env.vars.monitoring-service-host} port: 7070 diff --git a/src/policy/src/test/java/eu/teraflow/policy/ConfigRuleTypeTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/ConfigRuleTypeTest.java similarity index 77% rename from src/policy/src/test/java/eu/teraflow/policy/ConfigRuleTypeTest.java rename to src/policy/src/test/java/org/etsi/tfs/policy/ConfigRuleTypeTest.java index 2a32fc076853057f547df9d38abbba08611c21a0..69e63ff4c399a6f8f4a11f38f23800d350b926c3 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/ConfigRuleTypeTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/ConfigRuleTypeTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,25 +14,25 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; import static org.assertj.core.api.Assertions.assertThat; -import eu.teraflow.policy.acl.AclAction; -import eu.teraflow.policy.acl.AclEntry; -import eu.teraflow.policy.acl.AclForwardActionEnum; -import eu.teraflow.policy.acl.AclLogActionEnum; -import eu.teraflow.policy.acl.AclMatch; -import eu.teraflow.policy.acl.AclRuleSet; -import eu.teraflow.policy.acl.AclRuleTypeEnum; -import eu.teraflow.policy.context.model.ConfigRuleAcl; -import eu.teraflow.policy.context.model.ConfigRuleCustom; -import eu.teraflow.policy.context.model.ConfigRuleTypeAcl; -import eu.teraflow.policy.context.model.ConfigRuleTypeCustom; -import eu.teraflow.policy.context.model.EndPointId; -import eu.teraflow.policy.context.model.TopologyId; import io.quarkus.test.junit.QuarkusTest; import java.util.List; +import org.etsi.tfs.policy.acl.AclAction; +import org.etsi.tfs.policy.acl.AclEntry; +import org.etsi.tfs.policy.acl.AclForwardActionEnum; +import org.etsi.tfs.policy.acl.AclLogActionEnum; +import org.etsi.tfs.policy.acl.AclMatch; +import org.etsi.tfs.policy.acl.AclRuleSet; +import org.etsi.tfs.policy.acl.AclRuleTypeEnum; +import org.etsi.tfs.policy.context.model.ConfigRuleAcl; +import org.etsi.tfs.policy.context.model.ConfigRuleCustom; +import org.etsi.tfs.policy.context.model.ConfigRuleTypeAcl; +import org.etsi.tfs.policy.context.model.ConfigRuleTypeCustom; +import org.etsi.tfs.policy.context.model.EndPointId; +import org.etsi.tfs.policy.context.model.TopologyId; import org.junit.jupiter.api.Test; @QuarkusTest diff --git a/src/policy/src/test/java/eu/teraflow/policy/ConstraintTypeTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/ConstraintTypeTest.java similarity index 78% rename from src/policy/src/test/java/eu/teraflow/policy/ConstraintTypeTest.java rename to src/policy/src/test/java/org/etsi/tfs/policy/ConstraintTypeTest.java index 9dc97b4a1269580a93e58f495d28c0f8d81c1c31..b6271469ace381eb647f083fe8dea3439040f202 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/ConstraintTypeTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/ConstraintTypeTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,31 +14,31 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; import static org.assertj.core.api.Assertions.assertThat; -import eu.teraflow.policy.context.model.ConstraintCustom; -import eu.teraflow.policy.context.model.ConstraintEndPointLocation; -import eu.teraflow.policy.context.model.ConstraintSchedule; -import eu.teraflow.policy.context.model.ConstraintSlaAvailability; -import eu.teraflow.policy.context.model.ConstraintSlaCapacity; -import eu.teraflow.policy.context.model.ConstraintSlaIsolationLevel; -import eu.teraflow.policy.context.model.ConstraintSlaLatency; -import eu.teraflow.policy.context.model.ConstraintTypeCustom; -import eu.teraflow.policy.context.model.ConstraintTypeEndPointLocation; -import eu.teraflow.policy.context.model.ConstraintTypeSchedule; -import eu.teraflow.policy.context.model.ConstraintTypeSlaAvailability; -import eu.teraflow.policy.context.model.ConstraintTypeSlaCapacity; -import eu.teraflow.policy.context.model.ConstraintTypeSlaIsolationLevel; -import eu.teraflow.policy.context.model.ConstraintTypeSlaLatency; -import eu.teraflow.policy.context.model.EndPointId; -import eu.teraflow.policy.context.model.IsolationLevelEnum; -import eu.teraflow.policy.context.model.Location; -import eu.teraflow.policy.context.model.LocationTypeRegion; -import eu.teraflow.policy.context.model.TopologyId; import io.quarkus.test.junit.QuarkusTest; import java.util.List; +import org.etsi.tfs.policy.context.model.ConstraintCustom; +import org.etsi.tfs.policy.context.model.ConstraintEndPointLocation; +import org.etsi.tfs.policy.context.model.ConstraintSchedule; +import org.etsi.tfs.policy.context.model.ConstraintSlaAvailability; +import org.etsi.tfs.policy.context.model.ConstraintSlaCapacity; +import org.etsi.tfs.policy.context.model.ConstraintSlaIsolationLevel; +import org.etsi.tfs.policy.context.model.ConstraintSlaLatency; +import org.etsi.tfs.policy.context.model.ConstraintTypeCustom; +import org.etsi.tfs.policy.context.model.ConstraintTypeEndPointLocation; +import org.etsi.tfs.policy.context.model.ConstraintTypeSchedule; +import org.etsi.tfs.policy.context.model.ConstraintTypeSlaAvailability; +import org.etsi.tfs.policy.context.model.ConstraintTypeSlaCapacity; +import org.etsi.tfs.policy.context.model.ConstraintTypeSlaIsolationLevel; +import org.etsi.tfs.policy.context.model.ConstraintTypeSlaLatency; +import org.etsi.tfs.policy.context.model.EndPointId; +import org.etsi.tfs.policy.context.model.IsolationLevelEnum; +import org.etsi.tfs.policy.context.model.Location; +import org.etsi.tfs.policy.context.model.LocationTypeRegion; +import org.etsi.tfs.policy.context.model.TopologyId; import org.junit.jupiter.api.Test; @QuarkusTest diff --git a/src/policy/src/test/java/eu/teraflow/policy/EndPointCreationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/EndPointCreationTest.java similarity index 92% rename from src/policy/src/test/java/eu/teraflow/policy/EndPointCreationTest.java rename to src/policy/src/test/java/org/etsi/tfs/policy/EndPointCreationTest.java index 72501b3c6fc010a928a30edc5cad002deb38f440..6542a593167a0ff1c5ff245d20fcabec564b57e2 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/EndPointCreationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/EndPointCreationTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,19 +14,19 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import eu.teraflow.policy.context.model.EndPoint; -import eu.teraflow.policy.context.model.EndPointId; -import eu.teraflow.policy.context.model.Location; -import eu.teraflow.policy.context.model.LocationTypeRegion; -import eu.teraflow.policy.context.model.TopologyId; -import eu.teraflow.policy.kpi_sample_types.model.KpiSampleType; import io.quarkus.test.junit.QuarkusTest; import java.util.List; +import org.etsi.tfs.policy.context.model.EndPoint; +import org.etsi.tfs.policy.context.model.EndPointId; +import org.etsi.tfs.policy.context.model.Location; +import org.etsi.tfs.policy.context.model.LocationTypeRegion; +import org.etsi.tfs.policy.context.model.TopologyId; +import org.etsi.tfs.policy.kpi_sample_types.model.KpiSampleType; import org.junit.jupiter.api.Test; @QuarkusTest diff --git a/src/policy/src/test/java/eu/teraflow/policy/LocationTypeTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/LocationTypeTest.java similarity index 83% rename from src/policy/src/test/java/eu/teraflow/policy/LocationTypeTest.java rename to src/policy/src/test/java/org/etsi/tfs/policy/LocationTypeTest.java index cc4813c76f02a23e6662cf2593680dc8f3b39962..ed4f5d712197106c5afeca04aa64543823778707 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/LocationTypeTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/LocationTypeTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; import static org.assertj.core.api.Assertions.assertThat; -import eu.teraflow.policy.context.model.GpsPosition; -import eu.teraflow.policy.context.model.LocationTypeGpsPosition; -import eu.teraflow.policy.context.model.LocationTypeRegion; import io.quarkus.test.junit.QuarkusTest; +import org.etsi.tfs.policy.context.model.GpsPosition; +import org.etsi.tfs.policy.context.model.LocationTypeGpsPosition; +import org.etsi.tfs.policy.context.model.LocationTypeRegion; import org.junit.jupiter.api.Test; @QuarkusTest 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 new file mode 100644 index 0000000000000000000000000000000000000000..91ed70a1687eacac35e08c28e0da0596e62df1de --- /dev/null +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java @@ -0,0 +1,250 @@ +/* +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package org.etsi.tfs.policy; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.etsi.tfs.policy.common.ApplicationProperties.INVALID_MESSAGE; +import static org.etsi.tfs.policy.common.ApplicationProperties.VALIDATED_POLICYRULE_STATE; + +import io.quarkus.test.junit.QuarkusTest; +import io.quarkus.test.junit.mockito.InjectMock; +import io.smallrye.mutiny.Uni; +import jakarta.inject.Inject; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.etsi.tfs.policy.context.ContextService; +import org.etsi.tfs.policy.monitoring.MonitoringService; +import org.etsi.tfs.policy.monitoring.model.IntegerKpiValue; +import org.etsi.tfs.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.policy.PolicyServiceImpl; +import org.etsi.tfs.policy.policy.model.BooleanOperator; +import org.etsi.tfs.policy.policy.model.NumericalOperator; +import org.etsi.tfs.policy.policy.model.PolicyRuleAction; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; +import org.etsi.tfs.policy.policy.model.PolicyRuleDevice; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; +import org.etsi.tfs.policy.policy.service.PolicyRuleConditionValidator; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +@QuarkusTest +class PolicyAddDeviceTest { + + @Inject PolicyServiceImpl policyService; + + @InjectMock PolicyRuleConditionValidator policyRuleConditionValidator; + + @InjectMock ContextService contextService; + + @InjectMock MonitoringService monitoringService; + static PolicyRuleBasic policyRuleBasic; + static PolicyRuleDevice policyRuleDevice; + + @BeforeAll + static void init() { + + String policyId = "policyRuleId"; + KpiValue kpiValue = new IntegerKpiValue(100); + + PolicyRuleCondition policyRuleCondition = + new PolicyRuleCondition( + "kpiId", NumericalOperator.POLICY_RULE_CONDITION_NUMERICAL_GREATER_THAN, kpiValue); + + PolicyRuleActionConfig policyRuleActionConfig = new PolicyRuleActionConfig("key", "value"); + + PolicyRuleAction policyRuleAction = + new PolicyRuleAction( + PolicyRuleActionEnum.POLICY_RULE_ACTION_NO_ACTION, + Arrays.asList(policyRuleActionConfig)); + + policyRuleBasic = + new PolicyRuleBasic( + policyId, + new PolicyRuleState(PolicyRuleStateEnum.POLICY_INSERTED, "Failed due to some errors"), + 1, + Arrays.asList(policyRuleCondition), + BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_OR, + Arrays.asList(policyRuleAction)); + + List deviceIds = Arrays.asList("device1", "device2"); + + policyRuleDevice = new PolicyRuleDevice(policyRuleBasic, deviceIds); + } + + @Test + void deviceListMustNotBeEmpty() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + PolicyRuleDevice policyRuleDevice = new PolicyRuleDevice(policyRuleBasic, new ArrayList<>()); + + PolicyRuleState expectedResult = + new PolicyRuleState(PolicyRuleStateEnum.POLICY_FAILED, "Device Ids must not be empty."); + + policyService + .addPolicyDevice(policyRuleDevice) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void isPolicyRuleBasicValid() throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + PolicyRuleBasic policyRuleBasic = + new PolicyRuleBasic( + "policyId", + new PolicyRuleState(PolicyRuleStateEnum.POLICY_INSERTED, "Failed due to some errors"), + 0, + new ArrayList<>(), + BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_OR, + new ArrayList<>()); + + PolicyRuleDevice policyRuleDevice = + new PolicyRuleDevice(policyRuleBasic, Arrays.asList("device1", "device2")); + + PolicyRuleState expectedResult = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, "Policy Rule conditions cannot be empty."); + + policyService + .addPolicyDevice(policyRuleDevice) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void isPolicyRuleIdValid() throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + PolicyRuleDevice policyRuleDevice = + new PolicyRuleDevice(policyRuleBasic, Arrays.asList("device1", "device2")); + + PolicyRuleState expectedResult = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, + String.format( + INVALID_MESSAGE, policyRuleDevice.getPolicyRuleBasic().getPolicyRuleId())); + + Mockito.when(policyRuleConditionValidator.isUpdatedPolicyRuleIdValid(Mockito.anyString())) + .thenReturn(Uni.createFrom().item(Boolean.FALSE)); + + policyService + .addPolicyDevice(policyRuleDevice) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void successPolicyDevice() throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + PolicyRuleDevice policyRuleDevice = + new PolicyRuleDevice(policyRuleBasic, Arrays.asList("device1", "device2")); + + PolicyRuleState expectedResult = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_VALIDATED, + VALIDATED_POLICYRULE_STATE.getPolicyRuleStateMessage()); + + Mockito.when(policyRuleConditionValidator.isDeviceIdValid(Mockito.anyString())) + .thenReturn(Uni.createFrom().item(Boolean.TRUE)); + + Mockito.when(contextService.setPolicyRule(Mockito.any())) + .thenReturn(Uni.createFrom().item("policyRuleId")); + + policyService + .addPolicyDevice(policyRuleDevice) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + // @Test + // void failurePolicyDevice() throws ExecutionException, InterruptedException, TimeoutException + // { + // CompletableFuture message = new CompletableFuture<>(); + // + // PolicyRuleDevice policyRuleDevice = + // new PolicyRuleDevice(policyRuleBasic, Arrays.asList("device1", "device2")); + // + // // String expectedResult = "Failed1 to set policy rule for testing purposes."; + // + // PolicyRuleState expectedResult = + // new PolicyRuleState( + // PolicyRuleStateEnum.POLICY_VALIDATED, + // "Failed1 to set policy rule for testing purposes."); + // + // Mockito.when(policyRuleConditionValidator.isDeviceIdValid(Mockito.anyString())) + // .thenReturn(Uni.createFrom().item(Boolean.TRUE)); + // + // Mockito.when(contextService.setPolicyRule(Mockito.any())) + // .thenReturn( + // Uni.createFrom() + // .failure( + // new ExternalServiceFailureException( + // "Failed to set policy rule for testing + // purposes."))); + // + // policyService + // .addPolicyDevice(policyRuleDevice) + // .subscribe() + // .with( + // item -> {}, + // error -> { + // + // assertThat(error.getMessage()).isEqualTo(expectedResult.getPolicyRuleStateMessage()); + // message.completeExceptionally(error); + // }); + // + // assertThat(message.get(5, TimeUnit.SECONDS).getMessage()) + // .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + // } +} 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 new file mode 100644 index 0000000000000000000000000000000000000000..398a8b5feea479ce7f70c8fe9dfed189802b1c82 --- /dev/null +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddServiceTest.java @@ -0,0 +1,253 @@ +/* +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package org.etsi.tfs.policy; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.etsi.tfs.policy.common.ApplicationProperties.*; + +import io.quarkus.test.junit.QuarkusTest; +import io.quarkus.test.junit.mockito.InjectMock; +import io.smallrye.mutiny.Uni; +import jakarta.inject.Inject; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.etsi.tfs.policy.context.ContextService; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceId; +import org.etsi.tfs.policy.context.model.ServiceTypeEnum; +import org.etsi.tfs.policy.monitoring.MonitoringService; +import org.etsi.tfs.policy.monitoring.model.IntegerKpiValue; +import org.etsi.tfs.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.policy.PolicyServiceImpl; +import org.etsi.tfs.policy.policy.model.BooleanOperator; +import org.etsi.tfs.policy.policy.model.NumericalOperator; +import org.etsi.tfs.policy.policy.model.PolicyRule; +import org.etsi.tfs.policy.policy.model.PolicyRuleAction; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; +import org.etsi.tfs.policy.policy.model.PolicyRuleService; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; +import org.etsi.tfs.policy.policy.service.PolicyRuleConditionValidator; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +@QuarkusTest +public class PolicyAddServiceTest { + + @Inject PolicyServiceImpl policyService; + + @InjectMock PolicyRuleConditionValidator policyRuleConditionValidator; + + @InjectMock ContextService contextService; + + @InjectMock MonitoringService monitoringService; + + static PolicyRuleBasic policyRuleBasic; + static PolicyRuleService policyRuleService; + + @BeforeAll + static void init() { + + String policyId = "policyRuleId"; + KpiValue kpiValue = new IntegerKpiValue(100); + + PolicyRuleCondition policyRuleCondition = + new PolicyRuleCondition( + "kpiId", NumericalOperator.POLICY_RULE_CONDITION_NUMERICAL_GREATER_THAN, kpiValue); + + PolicyRuleActionConfig policyRuleActionConfig = new PolicyRuleActionConfig("key", "value"); + + PolicyRuleAction policyRuleAction = + new PolicyRuleAction( + PolicyRuleActionEnum.POLICY_RULE_ACTION_NO_ACTION, + Arrays.asList(policyRuleActionConfig)); + + policyRuleBasic = + new PolicyRuleBasic( + policyId, + new PolicyRuleState(PolicyRuleStateEnum.POLICY_INSERTED, "Failed due to some errors"), + 1, + Arrays.asList(policyRuleCondition), + BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_OR, + Arrays.asList(policyRuleAction)); + + ServiceId serviceId = new ServiceId("contextId", "serviceId"); + + Service service = new Service(serviceId, ServiceTypeEnum.UNKNOWN, null, null, null, null, 0.0); + + List deviceIds = Arrays.asList("device1", "device2"); + + policyRuleService = new PolicyRuleService(policyRuleBasic, serviceId, deviceIds); + } + + @Test + void contextOrServiceIdMustNotBeEmpty() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + ServiceId serviceId = new ServiceId("", ""); + List deviceIds = Arrays.asList("device1", "device2"); + + PolicyRuleService policyRuleService = + new PolicyRuleService(policyRuleBasic, serviceId, deviceIds); + + PolicyRuleState expectedResult = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, "Context Id of Service Id must not be empty."); + + policyService + .addPolicyService(policyRuleService) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void serviceIdMustNotBeEmpty() throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + ServiceId serviceId = new ServiceId("sdf", ""); + List deviceIds = Arrays.asList("device1", "device2"); + + PolicyRuleService policyRuleService = + new PolicyRuleService(policyRuleBasic, serviceId, deviceIds); + + PolicyRuleState expectedResult = + new PolicyRuleState(PolicyRuleStateEnum.POLICY_FAILED, "Service Id must not be empty."); + + policyService + .addPolicyService(policyRuleService) + .subscribe() + .with(item -> message.complete(item)); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void policyRuleIdMustNotBeEmpty() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + String policyId = ""; + + PolicyRuleBasic policyRuleBasic = + new PolicyRuleBasic( + policyId, + new PolicyRuleState(PolicyRuleStateEnum.POLICY_INSERTED, "Failed due to some errors"), + 1, + new ArrayList<>(), + null, + new ArrayList<>()); + + ServiceId serviceId = new ServiceId("contextId", "serviceId"); + + Service service = new Service(serviceId, ServiceTypeEnum.UNKNOWN, null, null, null, null, 0.0); + + PolicyRuleService policyRuleService = + new PolicyRuleService(policyRuleBasic, serviceId, new ArrayList<>()); + + PolicyRuleState expectedResult = + new PolicyRuleState(PolicyRuleStateEnum.POLICY_FAILED, "Policy rule ID must not be empty."); + + policyService + .addPolicyService(policyRuleService) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void checkMessageIfServiceIsNotValid() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + ServiceId serviceId = new ServiceId("contextId", "serviceId"); + + PolicyRuleService policyRuleService = + new PolicyRuleService(policyRuleBasic, serviceId, new ArrayList<>()); + + PolicyRuleState expectedResult = + new PolicyRuleState(PolicyRuleStateEnum.POLICY_FAILED, serviceId + " is invalid."); + + Mockito.when( + policyRuleConditionValidator.isServiceIdValid( + Mockito.any(ServiceId.class), Mockito.anyList())) + .thenReturn(Uni.createFrom().item(Boolean.FALSE)); + + policyService + .addPolicyService(policyRuleService) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void policyServiceSuccess() + throws ExecutionException, InterruptedException, TimeoutException, IOException { + CompletableFuture message = new CompletableFuture<>(); + + PolicyRuleState expectedResult = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_VALIDATED, + VALIDATED_POLICYRULE_STATE.getPolicyRuleStateMessage()); + + Mockito.when( + policyRuleConditionValidator.isServiceIdValid( + Mockito.any(ServiceId.class), Mockito.anyList())) + .thenReturn(Uni.createFrom().item(Boolean.TRUE)); + + Mockito.when(contextService.setPolicyRule(Mockito.any(PolicyRule.class))) + .thenReturn(Uni.createFrom().item("policyRuleId")); + + policyService + .addPolicyService(policyRuleService) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } +} 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 new file mode 100644 index 0000000000000000000000000000000000000000..464ff7fc800ee196459698de39e85a2666b29159 --- /dev/null +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyDeleteServiceTest.java @@ -0,0 +1,132 @@ +/* +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package org.etsi.tfs.policy; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.etsi.tfs.policy.common.ApplicationProperties.REMOVED_POLICYRULE_STATE; + +import io.quarkus.test.junit.QuarkusTest; +import io.quarkus.test.junit.mockito.InjectMock; +import io.smallrye.mutiny.Uni; +import jakarta.inject.Inject; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.etsi.tfs.policy.context.ContextService; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceId; +import org.etsi.tfs.policy.context.model.ServiceTypeEnum; +import org.etsi.tfs.policy.monitoring.MonitoringService; +import org.etsi.tfs.policy.monitoring.model.IntegerKpiValue; +import org.etsi.tfs.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.policy.PolicyServiceImpl; +import org.etsi.tfs.policy.policy.model.BooleanOperator; +import org.etsi.tfs.policy.policy.model.NumericalOperator; +import org.etsi.tfs.policy.policy.model.PolicyRule; +import org.etsi.tfs.policy.policy.model.PolicyRuleAction; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; +import org.etsi.tfs.policy.policy.model.PolicyRuleService; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleType; +import org.etsi.tfs.policy.policy.model.PolicyRuleTypeService; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +@QuarkusTest +class PolicyDeleteServiceTest { + + @Inject PolicyServiceImpl policyService; + @InjectMock ContextService contextService; + + @InjectMock MonitoringService monitoringService; + + static PolicyRuleBasic policyRuleBasic; + static PolicyRuleService policyRuleService; + + @BeforeAll + static void init() { + + String policyId = "policyRuleId"; + KpiValue kpiValue = new IntegerKpiValue(100); + + PolicyRuleCondition policyRuleCondition = + new PolicyRuleCondition( + "kpiId", NumericalOperator.POLICY_RULE_CONDITION_NUMERICAL_GREATER_THAN, kpiValue); + + PolicyRuleActionConfig policyRuleActionConfig = new PolicyRuleActionConfig("key", "value"); + + PolicyRuleAction policyRuleAction = + new PolicyRuleAction( + PolicyRuleActionEnum.POLICY_RULE_ACTION_NO_ACTION, + Arrays.asList(policyRuleActionConfig)); + + policyRuleBasic = + new PolicyRuleBasic( + policyId, + new PolicyRuleState(PolicyRuleStateEnum.POLICY_INSERTED, "Failed due to some errors"), + 1, + Arrays.asList(policyRuleCondition), + BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_OR, + Arrays.asList(policyRuleAction)); + + ServiceId serviceId = new ServiceId("contextId", "serviceId"); + + Service service = new Service(serviceId, ServiceTypeEnum.UNKNOWN, null, null, null, null, 0.0); + + List deviceIds = Arrays.asList("device1", "device2"); + + policyRuleService = new PolicyRuleService(policyRuleBasic, serviceId, deviceIds); + } + + @Test + void contextOrServiceIdMustNotBeEmpty() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + String policyRuleId = ""; + PolicyRuleState expectedResult = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_REMOVED, + REMOVED_POLICYRULE_STATE.getPolicyRuleStateMessage()); + + PolicyRuleType policyRuleType = new PolicyRuleTypeService(policyRuleService); + + PolicyRule policyRule = new PolicyRule(policyRuleType); + + Mockito.when(contextService.getPolicyRule(Mockito.anyString())) + .thenReturn(Uni.createFrom().item(policyRule)); + + policyService + .deletePolicy(policyRuleId) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } +} diff --git a/src/policy/src/test/java/eu/teraflow/policy/PolicyServiceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyGrpcServiceTest.java similarity index 95% rename from src/policy/src/test/java/eu/teraflow/policy/PolicyServiceTest.java rename to src/policy/src/test/java/org/etsi/tfs/policy/PolicyGrpcServiceTest.java index 2f5266c9591144fe4ab70bf38f7cc3943ef4cdd9..a179ea710fa72fd63dec6336bd3ee1d4dc0cdb84 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/PolicyServiceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyGrpcServiceTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,24 +14,25 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; import static org.assertj.core.api.Assertions.assertThat; import context.ContextOuterClass; import context.ContextOuterClass.Uuid; -import eu.teraflow.policy.monitoring.model.FloatKpiValue; -import eu.teraflow.policy.monitoring.model.IntegerKpiValue; import io.quarkus.grpc.GrpcClient; import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; import java.util.List; import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import javax.inject.Inject; import monitoring.Monitoring.KpiId; +import org.etsi.tfs.policy.monitoring.model.FloatKpiValue; +import org.etsi.tfs.policy.monitoring.model.IntegerKpiValue; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig; import org.jboss.logging.Logger; import org.junit.jupiter.api.Test; import policy.Policy; @@ -46,14 +47,14 @@ import policy.PolicyCondition.PolicyRuleCondition; import policy.PolicyService; @QuarkusTest -class PolicyServiceTest { - private static final Logger LOGGER = Logger.getLogger(PolicyServiceTest.class); +class PolicyGrpcServiceTest { + private static final Logger LOGGER = Logger.getLogger(PolicyGrpcServiceTest.class); @GrpcClient PolicyService client; private final Serializer serializer; @Inject - PolicyServiceTest(Serializer serializer) { + PolicyGrpcServiceTest(Serializer serializer) { this.serializer = serializer; } @@ -112,13 +113,13 @@ class PolicyServiceTest { final var expectedPolicyRuleConditions = List.of(firstExpectedPolicyRuleCondition, secondExpectedPolicyRuleCondition); - eu.teraflow.policy.model.PolicyRuleActionConfig policyRuleActionConfig_1 = - new eu.teraflow.policy.model.PolicyRuleActionConfig("paramater1", "parameter2"); + PolicyRuleActionConfig policyRuleActionConfig_1 = + new PolicyRuleActionConfig("paramater1", "parameter2"); final var serializedPolicyRuleActionConfigList_1 = serializer.serialize(policyRuleActionConfig_1); - eu.teraflow.policy.model.PolicyRuleActionConfig policyRuleActionConfig_2 = - new eu.teraflow.policy.model.PolicyRuleActionConfig("paramater3", "parameter4"); + PolicyRuleActionConfig policyRuleActionConfig_2 = + new PolicyRuleActionConfig("paramater3", "parameter4"); final var serializedPolicyRuleActionConfigList_2 = serializer.serialize(policyRuleActionConfig_2); diff --git a/src/policy/src/test/java/eu/teraflow/policy/PolicyRuleBasicValidationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleBasicValidationTest.java similarity index 95% rename from src/policy/src/test/java/eu/teraflow/policy/PolicyRuleBasicValidationTest.java rename to src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleBasicValidationTest.java index 6e0f220535a239be4b98c895fd70efa4d05758b0..06364ab2fc1bb2b842db8268354f98ddd6b366af 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/PolicyRuleBasicValidationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleBasicValidationTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,26 +14,26 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import eu.teraflow.policy.model.BooleanOperator; -import eu.teraflow.policy.model.NumericalOperator; -import eu.teraflow.policy.model.PolicyRuleAction; -import eu.teraflow.policy.model.PolicyRuleActionConfig; -import eu.teraflow.policy.model.PolicyRuleActionEnum; -import eu.teraflow.policy.model.PolicyRuleBasic; -import eu.teraflow.policy.model.PolicyRuleCondition; -import eu.teraflow.policy.model.PolicyRuleState; -import eu.teraflow.policy.model.PolicyRuleStateEnum; -import eu.teraflow.policy.monitoring.model.IntegerKpiValue; -import eu.teraflow.policy.monitoring.model.KpiValue; import io.quarkus.test.junit.QuarkusTest; import java.util.Collections; import java.util.List; import java.util.UUID; +import org.etsi.tfs.policy.monitoring.model.IntegerKpiValue; +import org.etsi.tfs.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.policy.model.BooleanOperator; +import org.etsi.tfs.policy.policy.model.NumericalOperator; +import org.etsi.tfs.policy.policy.model.PolicyRuleAction; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; import org.junit.jupiter.api.Test; // TODO: Revisit PolicyRuleBasicValidationTest cases after handling exceptions in PolicyRuleBasic diff --git a/src/policy/src/test/java/eu/teraflow/policy/PolicyRuleConditionValidationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleConditionValidationTest.java similarity index 91% rename from src/policy/src/test/java/eu/teraflow/policy/PolicyRuleConditionValidationTest.java rename to src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleConditionValidationTest.java index fb7cb38abdaa383986215d9692129086332e1a48..f442543676934a5866e9b0972adc53e384336b4a 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/PolicyRuleConditionValidationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleConditionValidationTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,20 +14,20 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import eu.teraflow.policy.model.NumericalOperator; -import eu.teraflow.policy.model.PolicyRuleCondition; -import eu.teraflow.policy.monitoring.model.BooleanKpiValue; -import eu.teraflow.policy.monitoring.model.FloatKpiValue; -import eu.teraflow.policy.monitoring.model.IntegerKpiValue; -import eu.teraflow.policy.monitoring.model.KpiValue; -import eu.teraflow.policy.monitoring.model.StringKpiValue; import io.quarkus.test.junit.QuarkusTest; import java.util.stream.Stream; +import org.etsi.tfs.policy.monitoring.model.BooleanKpiValue; +import org.etsi.tfs.policy.monitoring.model.FloatKpiValue; +import org.etsi.tfs.policy.monitoring.model.IntegerKpiValue; +import org.etsi.tfs.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.monitoring.model.StringKpiValue; +import org.etsi.tfs.policy.policy.model.NumericalOperator; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; diff --git a/src/policy/src/test/java/eu/teraflow/policy/PolicyRuleDeviceValidationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleDeviceValidationTest.java similarity index 89% rename from src/policy/src/test/java/eu/teraflow/policy/PolicyRuleDeviceValidationTest.java rename to src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleDeviceValidationTest.java index aaaea41f8f292b409328e2e95e8797f9f250f47f..57e350067fa44da1d59f4a972143b9ed07740ef9 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/PolicyRuleDeviceValidationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleDeviceValidationTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,25 +14,25 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; import static org.assertj.core.api.Assertions.assertThat; -import eu.teraflow.policy.model.BooleanOperator; -import eu.teraflow.policy.model.NumericalOperator; -import eu.teraflow.policy.model.PolicyRuleAction; -import eu.teraflow.policy.model.PolicyRuleActionConfig; -import eu.teraflow.policy.model.PolicyRuleActionEnum; -import eu.teraflow.policy.model.PolicyRuleBasic; -import eu.teraflow.policy.model.PolicyRuleCondition; -import eu.teraflow.policy.model.PolicyRuleDevice; -import eu.teraflow.policy.model.PolicyRuleState; -import eu.teraflow.policy.model.PolicyRuleStateEnum; -import eu.teraflow.policy.monitoring.model.IntegerKpiValue; -import eu.teraflow.policy.monitoring.model.KpiValue; import io.quarkus.test.junit.QuarkusTest; import java.util.List; import java.util.UUID; +import org.etsi.tfs.policy.monitoring.model.IntegerKpiValue; +import org.etsi.tfs.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.policy.model.BooleanOperator; +import org.etsi.tfs.policy.policy.model.NumericalOperator; +import org.etsi.tfs.policy.policy.model.PolicyRuleAction; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; +import org.etsi.tfs.policy.policy.model.PolicyRuleDevice; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; import org.junit.jupiter.api.Test; @QuarkusTest diff --git a/src/policy/src/test/java/eu/teraflow/policy/PolicyRuleServiceValidationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleServiceValidationTest.java similarity index 86% rename from src/policy/src/test/java/eu/teraflow/policy/PolicyRuleServiceValidationTest.java rename to src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleServiceValidationTest.java index 95819965e77a4ba61d13ee240594e37c1eb4cd74..e02af1e2aba9c276df6d2ec76d1cb4b8e44a5bd8 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/PolicyRuleServiceValidationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleServiceValidationTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,46 +14,47 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.when; -import eu.teraflow.policy.context.ContextService; -import eu.teraflow.policy.context.model.ConfigActionEnum; -import eu.teraflow.policy.context.model.ConfigRule; -import eu.teraflow.policy.context.model.ConfigRuleCustom; -import eu.teraflow.policy.context.model.ConfigRuleTypeCustom; -import eu.teraflow.policy.context.model.Device; -import eu.teraflow.policy.context.model.DeviceConfig; -import eu.teraflow.policy.context.model.DeviceDriverEnum; -import eu.teraflow.policy.context.model.DeviceOperationalStatus; -import eu.teraflow.policy.context.model.EndPoint.EndPointBuilder; -import eu.teraflow.policy.context.model.EndPointId; -import eu.teraflow.policy.context.model.Location; -import eu.teraflow.policy.context.model.LocationTypeRegion; -import eu.teraflow.policy.context.model.ServiceId; -import eu.teraflow.policy.context.model.TopologyId; -import eu.teraflow.policy.kpi_sample_types.model.KpiSampleType; -import eu.teraflow.policy.model.BooleanOperator; -import eu.teraflow.policy.model.NumericalOperator; -import eu.teraflow.policy.model.PolicyRuleAction; -import eu.teraflow.policy.model.PolicyRuleActionConfig; -import eu.teraflow.policy.model.PolicyRuleActionEnum; -import eu.teraflow.policy.model.PolicyRuleBasic; -import eu.teraflow.policy.model.PolicyRuleCondition; -import eu.teraflow.policy.model.PolicyRuleService; -import eu.teraflow.policy.model.PolicyRuleState; -import eu.teraflow.policy.model.PolicyRuleStateEnum; -import eu.teraflow.policy.monitoring.model.IntegerKpiValue; -import eu.teraflow.policy.monitoring.model.KpiValue; import io.quarkus.test.junit.QuarkusTest; import io.smallrye.mutiny.Uni; +import jakarta.inject.Inject; import java.util.Collections; import java.util.List; import java.util.UUID; -import javax.inject.Inject; +import org.etsi.tfs.policy.context.ContextService; +import org.etsi.tfs.policy.context.model.ConfigActionEnum; +import org.etsi.tfs.policy.context.model.ConfigRule; +import org.etsi.tfs.policy.context.model.ConfigRuleCustom; +import org.etsi.tfs.policy.context.model.ConfigRuleTypeCustom; +import org.etsi.tfs.policy.context.model.Device; +import org.etsi.tfs.policy.context.model.DeviceConfig; +import org.etsi.tfs.policy.context.model.DeviceDriverEnum; +import org.etsi.tfs.policy.context.model.DeviceOperationalStatus; +import org.etsi.tfs.policy.context.model.EndPoint.EndPointBuilder; +import org.etsi.tfs.policy.context.model.EndPointId; +import org.etsi.tfs.policy.context.model.Location; +import org.etsi.tfs.policy.context.model.LocationTypeRegion; +import org.etsi.tfs.policy.context.model.ServiceId; +import org.etsi.tfs.policy.context.model.TopologyId; +import org.etsi.tfs.policy.kpi_sample_types.model.KpiSampleType; +import org.etsi.tfs.policy.monitoring.model.IntegerKpiValue; +import org.etsi.tfs.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.policy.model.BooleanOperator; +import org.etsi.tfs.policy.policy.model.NumericalOperator; +import org.etsi.tfs.policy.policy.model.PolicyRuleAction; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; +import org.etsi.tfs.policy.policy.model.PolicyRuleService; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; +import org.etsi.tfs.policy.policy.service.PolicyRuleConditionValidator; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mockito; 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 new file mode 100644 index 0000000000000000000000000000000000000000..f549eb0c63bd115e5b94ad2949ced89177ecc58a --- /dev/null +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateDeviceTest.java @@ -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. +*/ + +package org.etsi.tfs.policy; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.etsi.tfs.policy.common.ApplicationProperties.INVALID_MESSAGE; +import static org.etsi.tfs.policy.common.ApplicationProperties.VALIDATED_POLICYRULE_STATE; + +import io.quarkus.test.junit.QuarkusTest; +import io.quarkus.test.junit.mockito.InjectMock; +import io.smallrye.mutiny.Uni; +import jakarta.inject.Inject; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.etsi.tfs.policy.monitoring.MonitoringService; +import org.etsi.tfs.policy.monitoring.model.IntegerKpiValue; +import org.etsi.tfs.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.policy.PolicyServiceImpl; +import org.etsi.tfs.policy.policy.model.BooleanOperator; +import org.etsi.tfs.policy.policy.model.NumericalOperator; +import org.etsi.tfs.policy.policy.model.PolicyRuleAction; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; +import org.etsi.tfs.policy.policy.model.PolicyRuleDevice; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; +import org.etsi.tfs.policy.policy.service.PolicyRuleConditionValidator; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +@QuarkusTest +class PolicyUpdateDeviceTest { + + @Inject PolicyServiceImpl policyService; + + @InjectMock PolicyRuleConditionValidator policyRuleConditionValidator; + + @InjectMock MonitoringService monitoringService; + + static PolicyRuleBasic policyRuleBasic; + static PolicyRuleDevice policyRuleDevice; + + @BeforeAll + static void init() { + + String policyId = "policyRuleId"; + KpiValue kpiValue = new IntegerKpiValue(100); + + PolicyRuleCondition policyRuleCondition = + new PolicyRuleCondition( + "kpiId", NumericalOperator.POLICY_RULE_CONDITION_NUMERICAL_GREATER_THAN, kpiValue); + + PolicyRuleActionConfig policyRuleActionConfig = new PolicyRuleActionConfig("key", "value"); + + PolicyRuleAction policyRuleAction = + new PolicyRuleAction( + PolicyRuleActionEnum.POLICY_RULE_ACTION_NO_ACTION, + Arrays.asList(policyRuleActionConfig)); + + policyRuleBasic = + new PolicyRuleBasic( + policyId, + new PolicyRuleState(PolicyRuleStateEnum.POLICY_INSERTED, "Failed due to some errors"), + 1, + Arrays.asList(policyRuleCondition), + BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_OR, + Arrays.asList(policyRuleAction)); + + List deviceIds = Arrays.asList("device1", "device2"); + + policyRuleDevice = new PolicyRuleDevice(policyRuleBasic, deviceIds); + } + + @Test + void deviceListMustNotBeEmpty() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + PolicyRuleDevice policyRuleDevice = new PolicyRuleDevice(policyRuleBasic, new ArrayList<>()); + + PolicyRuleState expectedResult = + new PolicyRuleState(PolicyRuleStateEnum.POLICY_FAILED, "Device Ids must not be empty."); + + policyService + .updatePolicyDevice(policyRuleDevice) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void isPolicyRuleBasicValid() throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + PolicyRuleBasic policyRuleBasic = + new PolicyRuleBasic( + "policyId", + new PolicyRuleState(PolicyRuleStateEnum.POLICY_INSERTED, "Failed due to some errors"), + 0, + new ArrayList<>(), + BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_OR, + new ArrayList<>()); + + PolicyRuleDevice policyRuleDevice = + new PolicyRuleDevice(policyRuleBasic, Arrays.asList("device1", "device2")); + + PolicyRuleState expectedResult = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, "Policy Rule conditions cannot be empty."); + + policyService + .updatePolicyDevice(policyRuleDevice) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void isUpdatedPolicyRuleIdValid() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + PolicyRuleDevice policyRuleDevice = + new PolicyRuleDevice(policyRuleBasic, Arrays.asList("device1", "device2")); + + PolicyRuleState expectedResult = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, + String.format( + INVALID_MESSAGE, policyRuleDevice.getPolicyRuleBasic().getPolicyRuleId())); + + Mockito.when(policyRuleConditionValidator.isUpdatedPolicyRuleIdValid(Mockito.anyString())) + .thenReturn(Uni.createFrom().item(Boolean.FALSE)); + + policyService + .updatePolicyDevice(policyRuleDevice) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void successUpdatePolicyService() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + PolicyRuleDevice policyRuleDevice = + new PolicyRuleDevice(policyRuleBasic, Arrays.asList("device1")); + + PolicyRuleState expectedResult = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_VALIDATED, + VALIDATED_POLICYRULE_STATE.getPolicyRuleStateMessage()); + + Mockito.when(policyRuleConditionValidator.isUpdatedPolicyRuleIdValid(Mockito.anyString())) + .thenReturn(Uni.createFrom().item(Boolean.TRUE)); + + policyService + .updatePolicyDevice(policyRuleDevice) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } +} 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 new file mode 100644 index 0000000000000000000000000000000000000000..4cf62695ac16c63eb5185356d93ed076391b5a4c --- /dev/null +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateServiceTest.java @@ -0,0 +1,217 @@ +/* +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package org.etsi.tfs.policy; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.etsi.tfs.policy.common.ApplicationProperties.INVALID_MESSAGE; +import static org.etsi.tfs.policy.common.ApplicationProperties.VALIDATED_POLICYRULE_STATE; + +import io.quarkus.test.junit.QuarkusTest; +import io.quarkus.test.junit.mockito.InjectMock; +import io.smallrye.mutiny.Uni; +import jakarta.inject.Inject; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.etsi.tfs.policy.context.ContextService; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceId; +import org.etsi.tfs.policy.context.model.ServiceTypeEnum; +import org.etsi.tfs.policy.monitoring.MonitoringService; +import org.etsi.tfs.policy.monitoring.model.IntegerKpiValue; +import org.etsi.tfs.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.policy.PolicyServiceImpl; +import org.etsi.tfs.policy.policy.model.BooleanOperator; +import org.etsi.tfs.policy.policy.model.NumericalOperator; +import org.etsi.tfs.policy.policy.model.PolicyRuleAction; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; +import org.etsi.tfs.policy.policy.model.PolicyRuleService; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; +import org.etsi.tfs.policy.policy.service.PolicyRuleConditionValidator; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +@QuarkusTest +class PolicyUpdateServiceTest { + + @Inject PolicyServiceImpl policyService; + + @InjectMock PolicyRuleConditionValidator policyRuleConditionValidator; + + @InjectMock ContextService contextService; + + @InjectMock MonitoringService monitoringService; + + static PolicyRuleBasic policyRuleBasic; + static PolicyRuleService policyRuleService; + + @BeforeAll + static void init() { + + String policyId = "policyRuleId"; + KpiValue kpiValue = new IntegerKpiValue(100); + + PolicyRuleCondition policyRuleCondition = + new PolicyRuleCondition( + "kpiId", NumericalOperator.POLICY_RULE_CONDITION_NUMERICAL_GREATER_THAN, kpiValue); + + PolicyRuleActionConfig policyRuleActionConfig = new PolicyRuleActionConfig("key", "value"); + + PolicyRuleAction policyRuleAction = + new PolicyRuleAction( + PolicyRuleActionEnum.POLICY_RULE_ACTION_NO_ACTION, + Arrays.asList(policyRuleActionConfig)); + + policyRuleBasic = + new PolicyRuleBasic( + policyId, + new PolicyRuleState(PolicyRuleStateEnum.POLICY_INSERTED, "Failed due to some errors"), + 1, + Arrays.asList(policyRuleCondition), + BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_OR, + Arrays.asList(policyRuleAction)); + + ServiceId serviceId = new ServiceId("contextId", "serviceId"); + + Service service = new Service(serviceId, ServiceTypeEnum.UNKNOWN, null, null, null, null, 0.0); + + List deviceIds = Arrays.asList("device1", "device2"); + + policyRuleService = new PolicyRuleService(policyRuleBasic, serviceId, deviceIds); + } + + @Test + void contextOrServiceIdMustNotBeEmpty() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + ServiceId serviceId = new ServiceId("", ""); + List deviceIds = Arrays.asList("device1", "device2"); + + PolicyRuleService policyRuleService = + new PolicyRuleService(policyRuleBasic, serviceId, deviceIds); + + PolicyRuleState expectedResult = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, "Context Id of Service Id must not be empty."); + + policyService + .updatePolicyService(policyRuleService) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void serviceIdMustNotBeEmpty() throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + ServiceId serviceId = new ServiceId("sdf", ""); + List deviceIds = Arrays.asList("device1", "device2"); + + PolicyRuleService policyRuleService = + new PolicyRuleService(policyRuleBasic, serviceId, deviceIds); + + PolicyRuleState expectedResult = + new PolicyRuleState(PolicyRuleStateEnum.POLICY_FAILED, "Service Id must not be empty."); + + policyService + .updatePolicyService(policyRuleService) + .subscribe() + .with(item -> message.complete(item)); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void checkMessageIfServiceIsNotValid() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + ServiceId serviceId = new ServiceId("contextId", "serviceId"); + + PolicyRuleService policyRuleService = + new PolicyRuleService(policyRuleBasic, serviceId, new ArrayList<>()); + + PolicyRuleState expectedResult = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_FAILED, String.format(INVALID_MESSAGE, serviceId)); + + Mockito.when( + policyRuleConditionValidator.isPolicyRuleServiceValid( + Mockito.anyString(), Mockito.any(ServiceId.class))) + .thenReturn(Uni.createFrom().item(Boolean.FALSE)); + + policyService + .updatePolicyService(policyRuleService) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } + + @Test + void successUpdatePolicyService() + throws ExecutionException, InterruptedException, TimeoutException { + CompletableFuture message = new CompletableFuture<>(); + + ServiceId serviceId = new ServiceId("contextId", "serviceId"); + + PolicyRuleService policyRuleService = + new PolicyRuleService(policyRuleBasic, serviceId, new ArrayList<>()); + + PolicyRuleState expectedResult = + new PolicyRuleState( + PolicyRuleStateEnum.POLICY_VALIDATED, + VALIDATED_POLICYRULE_STATE.getPolicyRuleStateMessage()); + + Mockito.when( + policyRuleConditionValidator.isPolicyRuleServiceValid( + Mockito.anyString(), Mockito.any(ServiceId.class))) + .thenReturn(Uni.createFrom().item(Boolean.TRUE)); + + policyService + .updatePolicyService(policyRuleService) + .subscribe() + .with( + item -> { + message.complete(item); + }); + + assertThat(message.get(5, TimeUnit.SECONDS).getPolicyRuleStateMessage()) + .isEqualTo(expectedResult.getPolicyRuleStateMessage().toString()); + } +} diff --git a/src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/SerializerTest.java similarity index 97% rename from src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java rename to src/policy/src/test/java/org/etsi/tfs/policy/SerializerTest.java index b57bdf10af1bbbfda187e89d7cb3d7951b200db6..9ebbfe762b0857ee314cb690775d01c052328024 100644 --- a/src/policy/src/test/java/eu/teraflow/policy/SerializerTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/SerializerTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy; +package org.etsi.tfs.policy; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -25,88 +25,88 @@ import context.ContextOuterClass.ContextId; import context.ContextOuterClass.DeviceId; import context.ContextOuterClass.DeviceOperationalStatusEnum; import context.ContextOuterClass.Uuid; -import eu.teraflow.policy.acl.AclAction; -import eu.teraflow.policy.acl.AclEntry; -import eu.teraflow.policy.acl.AclForwardActionEnum; -import eu.teraflow.policy.acl.AclLogActionEnum; -import eu.teraflow.policy.acl.AclMatch; -import eu.teraflow.policy.acl.AclRuleSet; -import eu.teraflow.policy.acl.AclRuleTypeEnum; -import eu.teraflow.policy.context.model.ConfigActionEnum; -import eu.teraflow.policy.context.model.ConfigRule; -import eu.teraflow.policy.context.model.ConfigRuleAcl; -import eu.teraflow.policy.context.model.ConfigRuleCustom; -import eu.teraflow.policy.context.model.ConfigRuleTypeAcl; -import eu.teraflow.policy.context.model.ConfigRuleTypeCustom; -import eu.teraflow.policy.context.model.Constraint; -import eu.teraflow.policy.context.model.ConstraintCustom; -import eu.teraflow.policy.context.model.ConstraintEndPointLocation; -import eu.teraflow.policy.context.model.ConstraintSchedule; -import eu.teraflow.policy.context.model.ConstraintSlaAvailability; -import eu.teraflow.policy.context.model.ConstraintSlaCapacity; -import eu.teraflow.policy.context.model.ConstraintSlaIsolationLevel; -import eu.teraflow.policy.context.model.ConstraintSlaLatency; -import eu.teraflow.policy.context.model.ConstraintTypeCustom; -import eu.teraflow.policy.context.model.ConstraintTypeEndPointLocation; -import eu.teraflow.policy.context.model.ConstraintTypeSchedule; -import eu.teraflow.policy.context.model.ConstraintTypeSlaAvailability; -import eu.teraflow.policy.context.model.ConstraintTypeSlaCapacity; -import eu.teraflow.policy.context.model.ConstraintTypeSlaIsolationLevel; -import eu.teraflow.policy.context.model.ConstraintTypeSlaLatency; -import eu.teraflow.policy.context.model.Device; -import eu.teraflow.policy.context.model.DeviceConfig; -import eu.teraflow.policy.context.model.DeviceDriverEnum; -import eu.teraflow.policy.context.model.DeviceOperationalStatus; -import eu.teraflow.policy.context.model.Empty; -import eu.teraflow.policy.context.model.EndPoint.EndPointBuilder; -import eu.teraflow.policy.context.model.EndPointId; -import eu.teraflow.policy.context.model.Event; -import eu.teraflow.policy.context.model.EventTypeEnum; -import eu.teraflow.policy.context.model.GpsPosition; -import eu.teraflow.policy.context.model.IsolationLevelEnum; -import eu.teraflow.policy.context.model.Location; -import eu.teraflow.policy.context.model.LocationTypeGpsPosition; -import eu.teraflow.policy.context.model.LocationTypeRegion; -import eu.teraflow.policy.context.model.Service; -import eu.teraflow.policy.context.model.ServiceConfig; -import eu.teraflow.policy.context.model.ServiceId; -import eu.teraflow.policy.context.model.ServiceStatus; -import eu.teraflow.policy.context.model.ServiceStatusEnum; -import eu.teraflow.policy.context.model.ServiceTypeEnum; -import eu.teraflow.policy.context.model.SliceId; -import eu.teraflow.policy.context.model.TopologyId; -import eu.teraflow.policy.kpi_sample_types.model.KpiSampleType; -import eu.teraflow.policy.model.BooleanOperator; -import eu.teraflow.policy.model.NumericalOperator; -import eu.teraflow.policy.model.PolicyRuleAction; -import eu.teraflow.policy.model.PolicyRuleActionConfig; -import eu.teraflow.policy.model.PolicyRuleActionEnum; -import eu.teraflow.policy.model.PolicyRuleBasic; -import eu.teraflow.policy.model.PolicyRuleCondition; -import eu.teraflow.policy.model.PolicyRuleDevice; -import eu.teraflow.policy.model.PolicyRuleService; -import eu.teraflow.policy.model.PolicyRuleState; -import eu.teraflow.policy.model.PolicyRuleStateEnum; -import eu.teraflow.policy.monitoring.model.AlarmDescriptor; -import eu.teraflow.policy.monitoring.model.AlarmResponse; -import eu.teraflow.policy.monitoring.model.BooleanKpiValue; -import eu.teraflow.policy.monitoring.model.FloatKpiValue; -import eu.teraflow.policy.monitoring.model.IntegerKpiValue; -import eu.teraflow.policy.monitoring.model.Kpi; -import eu.teraflow.policy.monitoring.model.KpiDescriptor; -import eu.teraflow.policy.monitoring.model.KpiValue; -import eu.teraflow.policy.monitoring.model.KpiValueRange; -import eu.teraflow.policy.monitoring.model.StringKpiValue; -import eu.teraflow.policy.monitoring.model.SubsDescriptor; import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; -import javax.inject.Inject; import kpi_sample_types.KpiSampleTypes; import monitoring.Monitoring; import monitoring.Monitoring.AlarmID; import monitoring.Monitoring.KpiId; +import org.etsi.tfs.policy.acl.AclAction; +import org.etsi.tfs.policy.acl.AclEntry; +import org.etsi.tfs.policy.acl.AclForwardActionEnum; +import org.etsi.tfs.policy.acl.AclLogActionEnum; +import org.etsi.tfs.policy.acl.AclMatch; +import org.etsi.tfs.policy.acl.AclRuleSet; +import org.etsi.tfs.policy.acl.AclRuleTypeEnum; +import org.etsi.tfs.policy.context.model.ConfigActionEnum; +import org.etsi.tfs.policy.context.model.ConfigRule; +import org.etsi.tfs.policy.context.model.ConfigRuleAcl; +import org.etsi.tfs.policy.context.model.ConfigRuleCustom; +import org.etsi.tfs.policy.context.model.ConfigRuleTypeAcl; +import org.etsi.tfs.policy.context.model.ConfigRuleTypeCustom; +import org.etsi.tfs.policy.context.model.Constraint; +import org.etsi.tfs.policy.context.model.ConstraintCustom; +import org.etsi.tfs.policy.context.model.ConstraintEndPointLocation; +import org.etsi.tfs.policy.context.model.ConstraintSchedule; +import org.etsi.tfs.policy.context.model.ConstraintSlaAvailability; +import org.etsi.tfs.policy.context.model.ConstraintSlaCapacity; +import org.etsi.tfs.policy.context.model.ConstraintSlaIsolationLevel; +import org.etsi.tfs.policy.context.model.ConstraintSlaLatency; +import org.etsi.tfs.policy.context.model.ConstraintTypeCustom; +import org.etsi.tfs.policy.context.model.ConstraintTypeEndPointLocation; +import org.etsi.tfs.policy.context.model.ConstraintTypeSchedule; +import org.etsi.tfs.policy.context.model.ConstraintTypeSlaAvailability; +import org.etsi.tfs.policy.context.model.ConstraintTypeSlaCapacity; +import org.etsi.tfs.policy.context.model.ConstraintTypeSlaIsolationLevel; +import org.etsi.tfs.policy.context.model.ConstraintTypeSlaLatency; +import org.etsi.tfs.policy.context.model.Device; +import org.etsi.tfs.policy.context.model.DeviceConfig; +import org.etsi.tfs.policy.context.model.DeviceDriverEnum; +import org.etsi.tfs.policy.context.model.DeviceOperationalStatus; +import org.etsi.tfs.policy.context.model.Empty; +import org.etsi.tfs.policy.context.model.EndPoint.EndPointBuilder; +import org.etsi.tfs.policy.context.model.EndPointId; +import org.etsi.tfs.policy.context.model.Event; +import org.etsi.tfs.policy.context.model.EventTypeEnum; +import org.etsi.tfs.policy.context.model.GpsPosition; +import org.etsi.tfs.policy.context.model.IsolationLevelEnum; +import org.etsi.tfs.policy.context.model.Location; +import org.etsi.tfs.policy.context.model.LocationTypeGpsPosition; +import org.etsi.tfs.policy.context.model.LocationTypeRegion; +import org.etsi.tfs.policy.context.model.Service; +import org.etsi.tfs.policy.context.model.ServiceConfig; +import org.etsi.tfs.policy.context.model.ServiceId; +import org.etsi.tfs.policy.context.model.ServiceStatus; +import org.etsi.tfs.policy.context.model.ServiceStatusEnum; +import org.etsi.tfs.policy.context.model.ServiceTypeEnum; +import org.etsi.tfs.policy.context.model.SliceId; +import org.etsi.tfs.policy.context.model.TopologyId; +import org.etsi.tfs.policy.kpi_sample_types.model.KpiSampleType; +import org.etsi.tfs.policy.monitoring.model.AlarmDescriptor; +import org.etsi.tfs.policy.monitoring.model.AlarmResponse; +import org.etsi.tfs.policy.monitoring.model.BooleanKpiValue; +import org.etsi.tfs.policy.monitoring.model.FloatKpiValue; +import org.etsi.tfs.policy.monitoring.model.IntegerKpiValue; +import org.etsi.tfs.policy.monitoring.model.Kpi; +import org.etsi.tfs.policy.monitoring.model.KpiDescriptor; +import org.etsi.tfs.policy.monitoring.model.KpiValue; +import org.etsi.tfs.policy.monitoring.model.KpiValueRange; +import org.etsi.tfs.policy.monitoring.model.StringKpiValue; +import org.etsi.tfs.policy.monitoring.model.SubsDescriptor; +import org.etsi.tfs.policy.policy.model.BooleanOperator; +import org.etsi.tfs.policy.policy.model.NumericalOperator; +import org.etsi.tfs.policy.policy.model.PolicyRuleAction; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig; +import org.etsi.tfs.policy.policy.model.PolicyRuleActionEnum; +import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; +import org.etsi.tfs.policy.policy.model.PolicyRuleCondition; +import org.etsi.tfs.policy.policy.model.PolicyRuleDevice; +import org.etsi.tfs.policy.policy.model.PolicyRuleService; +import org.etsi.tfs.policy.policy.model.PolicyRuleState; +import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -862,7 +862,7 @@ class SerializerTest { final var aclRuleSet = new AclRuleSet( "aclRuleName", - eu.teraflow.policy.acl.AclRuleTypeEnum.IPV4, + org.etsi.tfs.policy.acl.AclRuleTypeEnum.IPV4, "AclRuleDescription", "userId", List.of(aclEntry)); @@ -3614,6 +3614,14 @@ class SerializerTest { Arguments.of( DeviceDriverEnum.IETF_L2VPN, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN), + Arguments.of( + DeviceDriverEnum.GNMI_OPENCONFIG, + ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG), + Arguments.of( + DeviceDriverEnum.OPTICAL_TFS, + ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS), + Arguments.of( + DeviceDriverEnum.IETF_ACTN, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN), Arguments.of( DeviceDriverEnum.UNDEFINED, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_UNDEFINED)); } diff --git a/src/policy/target/generated-sources/grpc/acl/Acl.java b/src/policy/target/generated-sources/grpc/acl/Acl.java index 521294eefdec36b373b99aaca5281be28e01d2db..f1895fa7206642f8f8d6b63f5d2635fb68816f89 100644 --- a/src/policy/target/generated-sources/grpc/acl/Acl.java +++ b/src/policy/target/generated-sources/grpc/acl/Acl.java @@ -1,4654 +1,4432 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: acl.proto - package acl; public final class Acl { - private Acl() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * Protobuf enum {@code acl.AclRuleTypeEnum} - */ - public enum AclRuleTypeEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ACLRULETYPE_UNDEFINED = 0; - */ - ACLRULETYPE_UNDEFINED(0), - /** - * ACLRULETYPE_IPV4 = 1; - */ - ACLRULETYPE_IPV4(1), - /** - * ACLRULETYPE_IPV6 = 2; - */ - ACLRULETYPE_IPV6(2), - /** - * ACLRULETYPE_L2 = 3; - */ - ACLRULETYPE_L2(3), - /** - * ACLRULETYPE_MPLS = 4; - */ - ACLRULETYPE_MPLS(4), - /** - * ACLRULETYPE_MIXED = 5; - */ - ACLRULETYPE_MIXED(5), - UNRECOGNIZED(-1), - ; - - /** - * ACLRULETYPE_UNDEFINED = 0; - */ - public static final int ACLRULETYPE_UNDEFINED_VALUE = 0; - /** - * ACLRULETYPE_IPV4 = 1; - */ - public static final int ACLRULETYPE_IPV4_VALUE = 1; - /** - * ACLRULETYPE_IPV6 = 2; - */ - public static final int ACLRULETYPE_IPV6_VALUE = 2; - /** - * ACLRULETYPE_L2 = 3; - */ - public static final int ACLRULETYPE_L2_VALUE = 3; - /** - * ACLRULETYPE_MPLS = 4; - */ - public static final int ACLRULETYPE_MPLS_VALUE = 4; - /** - * ACLRULETYPE_MIXED = 5; - */ - public static final int ACLRULETYPE_MIXED_VALUE = 5; + private Acl() { + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AclRuleTypeEnum valueOf(int value) { - return forNumber(value); + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code acl.AclRuleTypeEnum} */ - public static AclRuleTypeEnum forNumber(int value) { - switch (value) { - case 0: return ACLRULETYPE_UNDEFINED; - case 1: return ACLRULETYPE_IPV4; - case 2: return ACLRULETYPE_IPV6; - case 3: return ACLRULETYPE_L2; - case 4: return ACLRULETYPE_MPLS; - case 5: return ACLRULETYPE_MIXED; - default: return null; - } - } + public enum AclRuleTypeEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * ACLRULETYPE_UNDEFINED = 0; + */ + ACLRULETYPE_UNDEFINED(0), + /** + * ACLRULETYPE_IPV4 = 1; + */ + ACLRULETYPE_IPV4(1), + /** + * ACLRULETYPE_IPV6 = 2; + */ + ACLRULETYPE_IPV6(2), + /** + * ACLRULETYPE_L2 = 3; + */ + ACLRULETYPE_L2(3), + /** + * ACLRULETYPE_MPLS = 4; + */ + ACLRULETYPE_MPLS(4), + /** + * ACLRULETYPE_MIXED = 5; + */ + ACLRULETYPE_MIXED(5), + UNRECOGNIZED(-1); + + /** + * ACLRULETYPE_UNDEFINED = 0; + */ + public static final int ACLRULETYPE_UNDEFINED_VALUE = 0; + + /** + * ACLRULETYPE_IPV4 = 1; + */ + public static final int ACLRULETYPE_IPV4_VALUE = 1; + + /** + * ACLRULETYPE_IPV6 = 2; + */ + public static final int ACLRULETYPE_IPV6_VALUE = 2; + + /** + * ACLRULETYPE_L2 = 3; + */ + public static final int ACLRULETYPE_L2_VALUE = 3; + + /** + * ACLRULETYPE_MPLS = 4; + */ + public static final int ACLRULETYPE_MPLS_VALUE = 4; + + /** + * ACLRULETYPE_MIXED = 5; + */ + public static final int ACLRULETYPE_MIXED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AclRuleTypeEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AclRuleTypeEnum findValueByNumber(int number) { - return AclRuleTypeEnum.forNumber(number); + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AclRuleTypeEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AclRuleTypeEnum forNumber(int value) { + switch(value) { + case 0: + return ACLRULETYPE_UNDEFINED; + case 1: + return ACLRULETYPE_IPV4; + case 2: + return ACLRULETYPE_IPV6; + case 3: + return ACLRULETYPE_L2; + case 4: + return ACLRULETYPE_MPLS; + case 5: + return ACLRULETYPE_MIXED; + default: + return null; } - }; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return acl.Acl.getDescriptor().getEnumTypes().get(0); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final AclRuleTypeEnum[] VALUES = values(); - - public static AclRuleTypeEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public AclRuleTypeEnum findValueByNumber(int number) { + return AclRuleTypeEnum.forNumber(number); + } + }; - private AclRuleTypeEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:acl.AclRuleTypeEnum) - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * Protobuf enum {@code acl.AclForwardActionEnum} - */ - public enum AclForwardActionEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ACLFORWARDINGACTION_UNDEFINED = 0; - */ - ACLFORWARDINGACTION_UNDEFINED(0), - /** - * ACLFORWARDINGACTION_DROP = 1; - */ - ACLFORWARDINGACTION_DROP(1), - /** - * ACLFORWARDINGACTION_ACCEPT = 2; - */ - ACLFORWARDINGACTION_ACCEPT(2), - /** - * ACLFORWARDINGACTION_REJECT = 3; - */ - ACLFORWARDINGACTION_REJECT(3), - UNRECOGNIZED(-1), - ; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return acl.Acl.getDescriptor().getEnumTypes().get(0); + } - /** - * ACLFORWARDINGACTION_UNDEFINED = 0; - */ - public static final int ACLFORWARDINGACTION_UNDEFINED_VALUE = 0; - /** - * ACLFORWARDINGACTION_DROP = 1; - */ - public static final int ACLFORWARDINGACTION_DROP_VALUE = 1; - /** - * ACLFORWARDINGACTION_ACCEPT = 2; - */ - public static final int ACLFORWARDINGACTION_ACCEPT_VALUE = 2; - /** - * ACLFORWARDINGACTION_REJECT = 3; - */ - public static final int ACLFORWARDINGACTION_REJECT_VALUE = 3; + private static final AclRuleTypeEnum[] VALUES = values(); + public static AclRuleTypeEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + private final int value; - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AclForwardActionEnum valueOf(int value) { - return forNumber(value); + private AclRuleTypeEnum(int value) { + this.value = value; + } } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code acl.AclForwardActionEnum} */ - public static AclForwardActionEnum forNumber(int value) { - switch (value) { - case 0: return ACLFORWARDINGACTION_UNDEFINED; - case 1: return ACLFORWARDINGACTION_DROP; - case 2: return ACLFORWARDINGACTION_ACCEPT; - case 3: return ACLFORWARDINGACTION_REJECT; - default: return null; - } - } + public enum AclForwardActionEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * ACLFORWARDINGACTION_UNDEFINED = 0; + */ + ACLFORWARDINGACTION_UNDEFINED(0), + /** + * ACLFORWARDINGACTION_DROP = 1; + */ + ACLFORWARDINGACTION_DROP(1), + /** + * ACLFORWARDINGACTION_ACCEPT = 2; + */ + ACLFORWARDINGACTION_ACCEPT(2), + /** + * ACLFORWARDINGACTION_REJECT = 3; + */ + ACLFORWARDINGACTION_REJECT(3), + UNRECOGNIZED(-1); + + /** + * ACLFORWARDINGACTION_UNDEFINED = 0; + */ + public static final int ACLFORWARDINGACTION_UNDEFINED_VALUE = 0; + + /** + * ACLFORWARDINGACTION_DROP = 1; + */ + public static final int ACLFORWARDINGACTION_DROP_VALUE = 1; + + /** + * ACLFORWARDINGACTION_ACCEPT = 2; + */ + public static final int ACLFORWARDINGACTION_ACCEPT_VALUE = 2; + + /** + * ACLFORWARDINGACTION_REJECT = 3; + */ + public static final int ACLFORWARDINGACTION_REJECT_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AclForwardActionEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AclForwardActionEnum findValueByNumber(int number) { - return AclForwardActionEnum.forNumber(number); + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AclForwardActionEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AclForwardActionEnum forNumber(int value) { + switch(value) { + case 0: + return ACLFORWARDINGACTION_UNDEFINED; + case 1: + return ACLFORWARDINGACTION_DROP; + case 2: + return ACLFORWARDINGACTION_ACCEPT; + case 3: + return ACLFORWARDINGACTION_REJECT; + default: + return null; } - }; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return acl.Acl.getDescriptor().getEnumTypes().get(1); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final AclForwardActionEnum[] VALUES = values(); - - public static AclForwardActionEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public AclForwardActionEnum findValueByNumber(int number) { + return AclForwardActionEnum.forNumber(number); + } + }; - private AclForwardActionEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:acl.AclForwardActionEnum) - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * Protobuf enum {@code acl.AclLogActionEnum} - */ - public enum AclLogActionEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ACLLOGACTION_UNDEFINED = 0; - */ - ACLLOGACTION_UNDEFINED(0), - /** - * ACLLOGACTION_NOLOG = 1; - */ - ACLLOGACTION_NOLOG(1), - /** - * ACLLOGACTION_SYSLOG = 2; - */ - ACLLOGACTION_SYSLOG(2), - UNRECOGNIZED(-1), - ; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return acl.Acl.getDescriptor().getEnumTypes().get(1); + } - /** - * ACLLOGACTION_UNDEFINED = 0; - */ - public static final int ACLLOGACTION_UNDEFINED_VALUE = 0; - /** - * ACLLOGACTION_NOLOG = 1; - */ - public static final int ACLLOGACTION_NOLOG_VALUE = 1; - /** - * ACLLOGACTION_SYSLOG = 2; - */ - public static final int ACLLOGACTION_SYSLOG_VALUE = 2; + private static final AclForwardActionEnum[] VALUES = values(); + public static AclForwardActionEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + private final int value; - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AclLogActionEnum valueOf(int value) { - return forNumber(value); + private AclForwardActionEnum(int value) { + this.value = value; + } } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code acl.AclLogActionEnum} */ - public static AclLogActionEnum forNumber(int value) { - switch (value) { - case 0: return ACLLOGACTION_UNDEFINED; - case 1: return ACLLOGACTION_NOLOG; - case 2: return ACLLOGACTION_SYSLOG; - default: return null; - } - } + public enum AclLogActionEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * ACLLOGACTION_UNDEFINED = 0; + */ + ACLLOGACTION_UNDEFINED(0), + /** + * ACLLOGACTION_NOLOG = 1; + */ + ACLLOGACTION_NOLOG(1), + /** + * ACLLOGACTION_SYSLOG = 2; + */ + ACLLOGACTION_SYSLOG(2), + UNRECOGNIZED(-1); + + /** + * ACLLOGACTION_UNDEFINED = 0; + */ + public static final int ACLLOGACTION_UNDEFINED_VALUE = 0; + + /** + * ACLLOGACTION_NOLOG = 1; + */ + public static final int ACLLOGACTION_NOLOG_VALUE = 1; + + /** + * ACLLOGACTION_SYSLOG = 2; + */ + public static final int ACLLOGACTION_SYSLOG_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AclLogActionEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AclLogActionEnum forNumber(int value) { + switch(value) { + case 0: + return ACLLOGACTION_UNDEFINED; + case 1: + return ACLLOGACTION_NOLOG; + case 2: + return ACLLOGACTION_SYSLOG; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AclLogActionEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { public AclLogActionEnum findValueByNumber(int number) { - return AclLogActionEnum.forNumber(number); + return AclLogActionEnum.forNumber(number); } - }; + }; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return acl.Acl.getDescriptor().getEnumTypes().get(2); - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - private static final AclLogActionEnum[] VALUES = values(); - - public static AclLogActionEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - private final int value; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return acl.Acl.getDescriptor().getEnumTypes().get(2); + } - private AclLogActionEnum(int value) { - this.value = value; - } + private static final AclLogActionEnum[] VALUES = values(); - // @@protoc_insertion_point(enum_scope:acl.AclLogActionEnum) - } + public static AclLogActionEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public interface AclMatchOrBuilder extends - // @@protoc_insertion_point(interface_extends:acl.AclMatch) - com.google.protobuf.MessageOrBuilder { + private final int value; - /** - * uint32 dscp = 1; - * @return The dscp. - */ - int getDscp(); + private AclLogActionEnum(int value) { + this.value = value; + } + } - /** - * uint32 protocol = 2; - * @return The protocol. - */ - int getProtocol(); + public interface AclMatchOrBuilder extends // @@protoc_insertion_point(interface_extends:acl.AclMatch) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 dscp = 1; + * @return The dscp. + */ + int getDscp(); + + /** + * uint32 protocol = 2; + * @return The protocol. + */ + int getProtocol(); + + /** + * string src_address = 3; + * @return The srcAddress. + */ + java.lang.String getSrcAddress(); + + /** + * string src_address = 3; + * @return The bytes for srcAddress. + */ + com.google.protobuf.ByteString getSrcAddressBytes(); + + /** + * string dst_address = 4; + * @return The dstAddress. + */ + java.lang.String getDstAddress(); + + /** + * string dst_address = 4; + * @return The bytes for dstAddress. + */ + com.google.protobuf.ByteString getDstAddressBytes(); + + /** + * uint32 src_port = 5; + * @return The srcPort. + */ + int getSrcPort(); + + /** + * uint32 dst_port = 6; + * @return The dstPort. + */ + int getDstPort(); + + /** + * uint32 start_mpls_label = 7; + * @return The startMplsLabel. + */ + int getStartMplsLabel(); + + /** + * uint32 end_mpls_label = 8; + * @return The endMplsLabel. + */ + int getEndMplsLabel(); + } /** - * string src_address = 3; - * @return The srcAddress. - */ - java.lang.String getSrcAddress(); - /** - * string src_address = 3; - * @return The bytes for srcAddress. + * Protobuf type {@code acl.AclMatch} */ - com.google.protobuf.ByteString - getSrcAddressBytes(); + public static final class AclMatch extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:acl.AclMatch) + AclMatchOrBuilder { - /** - * string dst_address = 4; - * @return The dstAddress. - */ - java.lang.String getDstAddress(); - /** - * string dst_address = 4; - * @return The bytes for dstAddress. - */ - com.google.protobuf.ByteString - getDstAddressBytes(); + private static final long serialVersionUID = 0L; - /** - * uint32 src_port = 5; - * @return The srcPort. - */ - int getSrcPort(); + // Use AclMatch.newBuilder() to construct. + private AclMatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - /** - * uint32 dst_port = 6; - * @return The dstPort. - */ - int getDstPort(); + private AclMatch() { + srcAddress_ = ""; + dstAddress_ = ""; + } - /** - * uint32 start_mpls_label = 7; - * @return The startMplsLabel. - */ - int getStartMplsLabel(); + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AclMatch(); + } - /** - * uint32 end_mpls_label = 8; - * @return The endMplsLabel. - */ - int getEndMplsLabel(); - } - /** - * Protobuf type {@code acl.AclMatch} - */ - public static final class AclMatch extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:acl.AclMatch) - AclMatchOrBuilder { - private static final long serialVersionUID = 0L; - // Use AclMatch.newBuilder() to construct. - private AclMatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AclMatch() { - srcAddress_ = ""; - dstAddress_ = ""; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AclMatch(); - } + 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(); + } + } - @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; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return acl.Acl.internal_static_acl_AclMatch_descriptor; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclMatch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclMatch.class, acl.Acl.AclMatch.Builder.class); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclMatch_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclMatch.class, acl.Acl.AclMatch.Builder.class); + } - public static final int DSCP_FIELD_NUMBER = 1; - private int dscp_; - /** - * uint32 dscp = 1; - * @return The dscp. - */ - @java.lang.Override - public int getDscp() { - return dscp_; - } + public static final int DSCP_FIELD_NUMBER = 1; - public static final int PROTOCOL_FIELD_NUMBER = 2; - private int protocol_; - /** - * uint32 protocol = 2; - * @return The protocol. - */ - @java.lang.Override - public int getProtocol() { - return protocol_; - } + private int dscp_; - public static final int SRC_ADDRESS_FIELD_NUMBER = 3; - private volatile java.lang.Object srcAddress_; - /** - * string src_address = 3; - * @return The srcAddress. - */ - @java.lang.Override - public java.lang.String getSrcAddress() { - java.lang.Object ref = srcAddress_; - 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(); - srcAddress_ = s; - return s; - } - } - /** - * string src_address = 3; - * @return The bytes for srcAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSrcAddressBytes() { - java.lang.Object ref = srcAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - srcAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * uint32 dscp = 1; + * @return The dscp. + */ + @java.lang.Override + public int getDscp() { + return dscp_; + } - public static final int DST_ADDRESS_FIELD_NUMBER = 4; - private volatile java.lang.Object dstAddress_; - /** - * string dst_address = 4; - * @return The dstAddress. - */ - @java.lang.Override - public java.lang.String getDstAddress() { - java.lang.Object ref = dstAddress_; - 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(); - dstAddress_ = s; - return s; - } - } - /** - * string dst_address = 4; - * @return The bytes for dstAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDstAddressBytes() { - java.lang.Object ref = dstAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dstAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static final int PROTOCOL_FIELD_NUMBER = 2; - public static final int SRC_PORT_FIELD_NUMBER = 5; - private int srcPort_; - /** - * uint32 src_port = 5; - * @return The srcPort. - */ - @java.lang.Override - public int getSrcPort() { - return srcPort_; - } + private int protocol_; - public static final int DST_PORT_FIELD_NUMBER = 6; - private int dstPort_; - /** - * uint32 dst_port = 6; - * @return The dstPort. - */ - @java.lang.Override - public int getDstPort() { - return dstPort_; - } + /** + * uint32 protocol = 2; + * @return The protocol. + */ + @java.lang.Override + public int getProtocol() { + return protocol_; + } - public static final int START_MPLS_LABEL_FIELD_NUMBER = 7; - private int startMplsLabel_; - /** - * uint32 start_mpls_label = 7; - * @return The startMplsLabel. - */ - @java.lang.Override - public int getStartMplsLabel() { - return startMplsLabel_; - } + public static final int SRC_ADDRESS_FIELD_NUMBER = 3; - public static final int END_MPLS_LABEL_FIELD_NUMBER = 8; - private int endMplsLabel_; - /** - * uint32 end_mpls_label = 8; - * @return The endMplsLabel. - */ - @java.lang.Override - public int getEndMplsLabel() { - return endMplsLabel_; - } + private volatile java.lang.Object srcAddress_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * string src_address = 3; + * @return The srcAddress. + */ + @java.lang.Override + public java.lang.String getSrcAddress() { + java.lang.Object ref = srcAddress_; + 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(); + srcAddress_ = s; + return s; + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * string src_address = 3; + * @return The bytes for srcAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSrcAddressBytes() { + java.lang.Object ref = srcAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (dscp_ != 0) { - output.writeUInt32(1, dscp_); - } - if (protocol_ != 0) { - output.writeUInt32(2, protocol_); - } - if (!getSrcAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, srcAddress_); - } - if (!getDstAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dstAddress_); - } - if (srcPort_ != 0) { - output.writeUInt32(5, srcPort_); - } - if (dstPort_ != 0) { - output.writeUInt32(6, dstPort_); - } - if (startMplsLabel_ != 0) { - output.writeUInt32(7, startMplsLabel_); - } - if (endMplsLabel_ != 0) { - output.writeUInt32(8, endMplsLabel_); - } - unknownFields.writeTo(output); - } + public static final int DST_ADDRESS_FIELD_NUMBER = 4; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dscp_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, dscp_); - } - if (protocol_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, protocol_); - } - if (!getSrcAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, srcAddress_); - } - if (!getDstAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dstAddress_); - } - if (srcPort_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, srcPort_); - } - if (dstPort_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, dstPort_); - } - if (startMplsLabel_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, startMplsLabel_); - } - if (endMplsLabel_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(8, endMplsLabel_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private volatile java.lang.Object dstAddress_; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof acl.Acl.AclMatch)) { - return super.equals(obj); - } - acl.Acl.AclMatch other = (acl.Acl.AclMatch) obj; - - if (getDscp() - != other.getDscp()) return false; - if (getProtocol() - != other.getProtocol()) return false; - if (!getSrcAddress() - .equals(other.getSrcAddress())) return false; - if (!getDstAddress() - .equals(other.getDstAddress())) return false; - if (getSrcPort() - != other.getSrcPort()) return false; - if (getDstPort() - != other.getDstPort()) return false; - if (getStartMplsLabel() - != other.getStartMplsLabel()) return false; - if (getEndMplsLabel() - != other.getEndMplsLabel()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string dst_address = 4; + * @return The dstAddress. + */ + @java.lang.Override + public java.lang.String getDstAddress() { + java.lang.Object ref = dstAddress_; + 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(); + dstAddress_ = s; + return s; + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DSCP_FIELD_NUMBER; - hash = (53 * hash) + getDscp(); - hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; - hash = (53 * hash) + getProtocol(); - hash = (37 * hash) + SRC_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getSrcAddress().hashCode(); - hash = (37 * hash) + DST_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getDstAddress().hashCode(); - hash = (37 * hash) + SRC_PORT_FIELD_NUMBER; - hash = (53 * hash) + getSrcPort(); - hash = (37 * hash) + DST_PORT_FIELD_NUMBER; - hash = (53 * hash) + getDstPort(); - hash = (37 * hash) + START_MPLS_LABEL_FIELD_NUMBER; - hash = (53 * hash) + getStartMplsLabel(); - hash = (37 * hash) + END_MPLS_LABEL_FIELD_NUMBER; - hash = (53 * hash) + getEndMplsLabel(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * string dst_address = 4; + * @return The bytes for dstAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDstAddressBytes() { + java.lang.Object ref = dstAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static acl.Acl.AclMatch parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclMatch parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclMatch parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclMatch parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclMatch parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclMatch parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclMatch parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclMatch parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclMatch parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static acl.Acl.AclMatch parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclMatch parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclMatch parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int SRC_PORT_FIELD_NUMBER = 5; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(acl.Acl.AclMatch prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private int srcPort_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code acl.AclMatch} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:acl.AclMatch) - acl.Acl.AclMatchOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return acl.Acl.internal_static_acl_AclMatch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclMatch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclMatch.class, acl.Acl.AclMatch.Builder.class); - } - - // 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(); - dscp_ = 0; - - protocol_ = 0; - - srcAddress_ = ""; - - dstAddress_ = ""; - - srcPort_ = 0; - - dstPort_ = 0; - - startMplsLabel_ = 0; - - endMplsLabel_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return acl.Acl.internal_static_acl_AclMatch_descriptor; - } - - @java.lang.Override - public acl.Acl.AclMatch getDefaultInstanceForType() { - return acl.Acl.AclMatch.getDefaultInstance(); - } - - @java.lang.Override - public acl.Acl.AclMatch build() { - acl.Acl.AclMatch result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof acl.Acl.AclMatch) { - return mergeFrom((acl.Acl.AclMatch)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(acl.Acl.AclMatch other) { - if (other == acl.Acl.AclMatch.getDefaultInstance()) return this; - if (other.getDscp() != 0) { - setDscp(other.getDscp()); - } - if (other.getProtocol() != 0) { - setProtocol(other.getProtocol()); - } - if (!other.getSrcAddress().isEmpty()) { - srcAddress_ = other.srcAddress_; - onChanged(); - } - if (!other.getDstAddress().isEmpty()) { - dstAddress_ = other.dstAddress_; - onChanged(); - } - if (other.getSrcPort() != 0) { - setSrcPort(other.getSrcPort()); - } - if (other.getDstPort() != 0) { - setDstPort(other.getDstPort()); - } - if (other.getStartMplsLabel() != 0) { - setStartMplsLabel(other.getStartMplsLabel()); - } - if (other.getEndMplsLabel() != 0) { - setEndMplsLabel(other.getEndMplsLabel()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclMatch) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int dscp_ ; - /** - * uint32 dscp = 1; - * @return The dscp. - */ - @java.lang.Override - public int getDscp() { - return dscp_; - } - /** - * uint32 dscp = 1; - * @param value The dscp to set. - * @return This builder for chaining. - */ - public Builder setDscp(int value) { - - dscp_ = value; - onChanged(); - return this; - } - /** - * uint32 dscp = 1; - * @return This builder for chaining. - */ - public Builder clearDscp() { - - dscp_ = 0; - onChanged(); - return this; - } - - private int protocol_ ; - /** - * uint32 protocol = 2; - * @return The protocol. - */ - @java.lang.Override - public int getProtocol() { - return protocol_; - } - /** - * uint32 protocol = 2; - * @param value The protocol to set. - * @return This builder for chaining. - */ - public Builder setProtocol(int value) { - - protocol_ = value; - onChanged(); - return this; - } - /** - * uint32 protocol = 2; - * @return This builder for chaining. - */ - public Builder clearProtocol() { - - protocol_ = 0; - onChanged(); - return this; - } - - private java.lang.Object srcAddress_ = ""; - /** - * string src_address = 3; - * @return The srcAddress. - */ - public java.lang.String getSrcAddress() { - java.lang.Object ref = srcAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - srcAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string src_address = 3; - * @return The bytes for srcAddress. - */ - public com.google.protobuf.ByteString - getSrcAddressBytes() { - java.lang.Object ref = srcAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - srcAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string src_address = 3; - * @param value The srcAddress to set. - * @return This builder for chaining. - */ - public Builder setSrcAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - srcAddress_ = value; - onChanged(); - return this; - } - /** - * string src_address = 3; - * @return This builder for chaining. - */ - public Builder clearSrcAddress() { - - srcAddress_ = getDefaultInstance().getSrcAddress(); - onChanged(); - return this; - } - /** - * string src_address = 3; - * @param value The bytes for srcAddress to set. - * @return This builder for chaining. - */ - public Builder setSrcAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - srcAddress_ = value; - onChanged(); - return this; - } - - private java.lang.Object dstAddress_ = ""; - /** - * string dst_address = 4; - * @return The dstAddress. - */ - public java.lang.String getDstAddress() { - java.lang.Object ref = dstAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dstAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string dst_address = 4; - * @return The bytes for dstAddress. - */ - public com.google.protobuf.ByteString - getDstAddressBytes() { - java.lang.Object ref = dstAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dstAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string dst_address = 4; - * @param value The dstAddress to set. - * @return This builder for chaining. - */ - public Builder setDstAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dstAddress_ = value; - onChanged(); - return this; - } - /** - * string dst_address = 4; - * @return This builder for chaining. - */ - public Builder clearDstAddress() { - - dstAddress_ = getDefaultInstance().getDstAddress(); - onChanged(); - return this; - } - /** - * string dst_address = 4; - * @param value The bytes for dstAddress to set. - * @return This builder for chaining. - */ - public Builder setDstAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dstAddress_ = value; - onChanged(); - return this; - } - - private int srcPort_ ; - /** - * uint32 src_port = 5; - * @return The srcPort. - */ - @java.lang.Override - public int getSrcPort() { - return srcPort_; - } - /** - * uint32 src_port = 5; - * @param value The srcPort to set. - * @return This builder for chaining. - */ - public Builder setSrcPort(int value) { - - srcPort_ = value; - onChanged(); - return this; - } - /** - * uint32 src_port = 5; - * @return This builder for chaining. - */ - public Builder clearSrcPort() { - - srcPort_ = 0; - onChanged(); - return this; - } - - private int dstPort_ ; - /** - * uint32 dst_port = 6; - * @return The dstPort. - */ - @java.lang.Override - public int getDstPort() { - return dstPort_; - } - /** - * uint32 dst_port = 6; - * @param value The dstPort to set. - * @return This builder for chaining. - */ - public Builder setDstPort(int value) { - - dstPort_ = value; - onChanged(); - return this; - } - /** - * uint32 dst_port = 6; - * @return This builder for chaining. - */ - public Builder clearDstPort() { - - dstPort_ = 0; - onChanged(); - return this; - } - - private int startMplsLabel_ ; - /** - * uint32 start_mpls_label = 7; - * @return The startMplsLabel. - */ - @java.lang.Override - public int getStartMplsLabel() { - return startMplsLabel_; - } - /** - * uint32 start_mpls_label = 7; - * @param value The startMplsLabel to set. - * @return This builder for chaining. - */ - public Builder setStartMplsLabel(int value) { - - startMplsLabel_ = value; - onChanged(); - return this; - } - /** - * uint32 start_mpls_label = 7; - * @return This builder for chaining. - */ - public Builder clearStartMplsLabel() { - - startMplsLabel_ = 0; - onChanged(); - return this; - } - - private int endMplsLabel_ ; - /** - * uint32 end_mpls_label = 8; - * @return The endMplsLabel. - */ - @java.lang.Override - public int getEndMplsLabel() { - return endMplsLabel_; - } - /** - * uint32 end_mpls_label = 8; - * @param value The endMplsLabel to set. - * @return This builder for chaining. - */ - public Builder setEndMplsLabel(int value) { - - endMplsLabel_ = value; - onChanged(); - return this; - } - /** - * uint32 end_mpls_label = 8; - * @return This builder for chaining. - */ - public Builder clearEndMplsLabel() { - - endMplsLabel_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:acl.AclMatch) - } + /** + * uint32 src_port = 5; + * @return The srcPort. + */ + @java.lang.Override + public int getSrcPort() { + return srcPort_; + } - // @@protoc_insertion_point(class_scope:acl.AclMatch) - private static final acl.Acl.AclMatch DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new acl.Acl.AclMatch(); - } + public static final int DST_PORT_FIELD_NUMBER = 6; - public static acl.Acl.AclMatch getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private int dstPort_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * uint32 dst_port = 6; + * @return The dstPort. + */ + @java.lang.Override + public int getDstPort() { + return dstPort_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static final int START_MPLS_LABEL_FIELD_NUMBER = 7; - @java.lang.Override - public acl.Acl.AclMatch getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private int startMplsLabel_; - } + /** + * uint32 start_mpls_label = 7; + * @return The startMplsLabel. + */ + @java.lang.Override + public int getStartMplsLabel() { + return startMplsLabel_; + } - public interface AclActionOrBuilder extends - // @@protoc_insertion_point(interface_extends:acl.AclAction) - com.google.protobuf.MessageOrBuilder { + public static final int END_MPLS_LABEL_FIELD_NUMBER = 8; - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return The enum numeric value on the wire for forwardAction. - */ - int getForwardActionValue(); - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return The forwardAction. - */ - acl.Acl.AclForwardActionEnum getForwardAction(); + private int endMplsLabel_; + + /** + * uint32 end_mpls_label = 8; + * @return The endMplsLabel. + */ + @java.lang.Override + public int getEndMplsLabel() { + return endMplsLabel_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (dscp_ != 0) { + output.writeUInt32(1, dscp_); + } + if (protocol_ != 0) { + output.writeUInt32(2, protocol_); + } + if (!getSrcAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, srcAddress_); + } + if (!getDstAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dstAddress_); + } + if (srcPort_ != 0) { + output.writeUInt32(5, srcPort_); + } + if (dstPort_ != 0) { + output.writeUInt32(6, dstPort_); + } + if (startMplsLabel_ != 0) { + output.writeUInt32(7, startMplsLabel_); + } + if (endMplsLabel_ != 0) { + output.writeUInt32(8, endMplsLabel_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (dscp_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(1, dscp_); + } + if (protocol_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, protocol_); + } + if (!getSrcAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, srcAddress_); + } + if (!getDstAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dstAddress_); + } + if (srcPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(5, srcPort_); + } + if (dstPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(6, dstPort_); + } + if (startMplsLabel_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(7, startMplsLabel_); + } + if (endMplsLabel_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(8, endMplsLabel_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof acl.Acl.AclMatch)) { + return super.equals(obj); + } + acl.Acl.AclMatch other = (acl.Acl.AclMatch) obj; + if (getDscp() != other.getDscp()) + return false; + if (getProtocol() != other.getProtocol()) + return false; + if (!getSrcAddress().equals(other.getSrcAddress())) + return false; + if (!getDstAddress().equals(other.getDstAddress())) + return false; + if (getSrcPort() != other.getSrcPort()) + return false; + if (getDstPort() != other.getDstPort()) + return false; + if (getStartMplsLabel() != other.getStartMplsLabel()) + return false; + if (getEndMplsLabel() != other.getEndMplsLabel()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DSCP_FIELD_NUMBER; + hash = (53 * hash) + getDscp(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol(); + hash = (37 * hash) + SRC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getSrcAddress().hashCode(); + hash = (37 * hash) + DST_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getDstAddress().hashCode(); + hash = (37 * hash) + SRC_PORT_FIELD_NUMBER; + hash = (53 * hash) + getSrcPort(); + hash = (37 * hash) + DST_PORT_FIELD_NUMBER; + hash = (53 * hash) + getDstPort(); + hash = (37 * hash) + START_MPLS_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getStartMplsLabel(); + hash = (37 * hash) + END_MPLS_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getEndMplsLabel(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static acl.Acl.AclMatch parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclMatch parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclMatch parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclMatch parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclMatch parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclMatch parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclMatch parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclMatch parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclMatch parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static acl.Acl.AclMatch parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclMatch parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclMatch parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(acl.Acl.AclMatch prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code acl.AclMatch} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:acl.AclMatch) + acl.Acl.AclMatchOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return acl.Acl.internal_static_acl_AclMatch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclMatch_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclMatch.class, acl.Acl.AclMatch.Builder.class); + } + + // 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(); + dscp_ = 0; + protocol_ = 0; + srcAddress_ = ""; + dstAddress_ = ""; + srcPort_ = 0; + dstPort_ = 0; + startMplsLabel_ = 0; + endMplsLabel_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return acl.Acl.internal_static_acl_AclMatch_descriptor; + } + + @java.lang.Override + public acl.Acl.AclMatch getDefaultInstanceForType() { + return acl.Acl.AclMatch.getDefaultInstance(); + } + + @java.lang.Override + public acl.Acl.AclMatch build() { + acl.Acl.AclMatch result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof acl.Acl.AclMatch) { + return mergeFrom((acl.Acl.AclMatch) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(acl.Acl.AclMatch other) { + if (other == acl.Acl.AclMatch.getDefaultInstance()) + return this; + if (other.getDscp() != 0) { + setDscp(other.getDscp()); + } + if (other.getProtocol() != 0) { + setProtocol(other.getProtocol()); + } + if (!other.getSrcAddress().isEmpty()) { + srcAddress_ = other.srcAddress_; + onChanged(); + } + if (!other.getDstAddress().isEmpty()) { + dstAddress_ = other.dstAddress_; + onChanged(); + } + if (other.getSrcPort() != 0) { + setSrcPort(other.getSrcPort()); + } + if (other.getDstPort() != 0) { + setDstPort(other.getDstPort()); + } + if (other.getStartMplsLabel() != 0) { + setStartMplsLabel(other.getStartMplsLabel()); + } + if (other.getEndMplsLabel() != 0) { + setEndMplsLabel(other.getEndMplsLabel()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (acl.Acl.AclMatch) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dscp_; + + /** + * uint32 dscp = 1; + * @return The dscp. + */ + @java.lang.Override + public int getDscp() { + return dscp_; + } + + /** + * uint32 dscp = 1; + * @param value The dscp to set. + * @return This builder for chaining. + */ + public Builder setDscp(int value) { + dscp_ = value; + onChanged(); + return this; + } + + /** + * uint32 dscp = 1; + * @return This builder for chaining. + */ + public Builder clearDscp() { + dscp_ = 0; + onChanged(); + return this; + } + + private int protocol_; + + /** + * uint32 protocol = 2; + * @return The protocol. + */ + @java.lang.Override + public int getProtocol() { + return protocol_; + } + + /** + * uint32 protocol = 2; + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(int value) { + protocol_ = value; + onChanged(); + return this; + } + + /** + * uint32 protocol = 2; + * @return This builder for chaining. + */ + public Builder clearProtocol() { + protocol_ = 0; + onChanged(); + return this; + } + + private java.lang.Object srcAddress_ = ""; + + /** + * string src_address = 3; + * @return The srcAddress. + */ + public java.lang.String getSrcAddress() { + java.lang.Object ref = srcAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string src_address = 3; + * @return The bytes for srcAddress. + */ + public com.google.protobuf.ByteString getSrcAddressBytes() { + java.lang.Object ref = srcAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string src_address = 3; + * @param value The srcAddress to set. + * @return This builder for chaining. + */ + public Builder setSrcAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + srcAddress_ = value; + onChanged(); + return this; + } + + /** + * string src_address = 3; + * @return This builder for chaining. + */ + public Builder clearSrcAddress() { + srcAddress_ = getDefaultInstance().getSrcAddress(); + onChanged(); + return this; + } + + /** + * string src_address = 3; + * @param value The bytes for srcAddress to set. + * @return This builder for chaining. + */ + public Builder setSrcAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + srcAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object dstAddress_ = ""; + + /** + * string dst_address = 4; + * @return The dstAddress. + */ + public java.lang.String getDstAddress() { + java.lang.Object ref = dstAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dstAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string dst_address = 4; + * @return The bytes for dstAddress. + */ + public com.google.protobuf.ByteString getDstAddressBytes() { + java.lang.Object ref = dstAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string dst_address = 4; + * @param value The dstAddress to set. + * @return This builder for chaining. + */ + public Builder setDstAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dstAddress_ = value; + onChanged(); + return this; + } + + /** + * string dst_address = 4; + * @return This builder for chaining. + */ + public Builder clearDstAddress() { + dstAddress_ = getDefaultInstance().getDstAddress(); + onChanged(); + return this; + } + + /** + * string dst_address = 4; + * @param value The bytes for dstAddress to set. + * @return This builder for chaining. + */ + public Builder setDstAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dstAddress_ = value; + onChanged(); + return this; + } + + private int srcPort_; + + /** + * uint32 src_port = 5; + * @return The srcPort. + */ + @java.lang.Override + public int getSrcPort() { + return srcPort_; + } + + /** + * uint32 src_port = 5; + * @param value The srcPort to set. + * @return This builder for chaining. + */ + public Builder setSrcPort(int value) { + srcPort_ = value; + onChanged(); + return this; + } + + /** + * uint32 src_port = 5; + * @return This builder for chaining. + */ + public Builder clearSrcPort() { + srcPort_ = 0; + onChanged(); + return this; + } + + private int dstPort_; + + /** + * uint32 dst_port = 6; + * @return The dstPort. + */ + @java.lang.Override + public int getDstPort() { + return dstPort_; + } + + /** + * uint32 dst_port = 6; + * @param value The dstPort to set. + * @return This builder for chaining. + */ + public Builder setDstPort(int value) { + dstPort_ = value; + onChanged(); + return this; + } + + /** + * uint32 dst_port = 6; + * @return This builder for chaining. + */ + public Builder clearDstPort() { + dstPort_ = 0; + onChanged(); + return this; + } + + private int startMplsLabel_; + + /** + * uint32 start_mpls_label = 7; + * @return The startMplsLabel. + */ + @java.lang.Override + public int getStartMplsLabel() { + return startMplsLabel_; + } + + /** + * uint32 start_mpls_label = 7; + * @param value The startMplsLabel to set. + * @return This builder for chaining. + */ + public Builder setStartMplsLabel(int value) { + startMplsLabel_ = value; + onChanged(); + return this; + } + + /** + * uint32 start_mpls_label = 7; + * @return This builder for chaining. + */ + public Builder clearStartMplsLabel() { + startMplsLabel_ = 0; + onChanged(); + return this; + } + + private int endMplsLabel_; + + /** + * uint32 end_mpls_label = 8; + * @return The endMplsLabel. + */ + @java.lang.Override + public int getEndMplsLabel() { + return endMplsLabel_; + } + + /** + * uint32 end_mpls_label = 8; + * @param value The endMplsLabel to set. + * @return This builder for chaining. + */ + public Builder setEndMplsLabel(int value) { + endMplsLabel_ = value; + onChanged(); + return this; + } + + /** + * uint32 end_mpls_label = 8; + * @return This builder for chaining. + */ + public Builder clearEndMplsLabel() { + endMplsLabel_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:acl.AclMatch) + } + + // @@protoc_insertion_point(class_scope:acl.AclMatch) + private static final acl.Acl.AclMatch DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new acl.Acl.AclMatch(); + } + + public static acl.Acl.AclMatch getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public acl.Acl.AclMatch getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AclActionOrBuilder extends // @@protoc_insertion_point(interface_extends:acl.AclAction) + com.google.protobuf.MessageOrBuilder { + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return The enum numeric value on the wire for forwardAction. + */ + int getForwardActionValue(); + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return The forwardAction. + */ + acl.Acl.AclForwardActionEnum getForwardAction(); + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return The enum numeric value on the wire for logAction. + */ + int getLogActionValue(); + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return The logAction. + */ + acl.Acl.AclLogActionEnum getLogAction(); + } /** - * .acl.AclLogActionEnum log_action = 2; - * @return The enum numeric value on the wire for logAction. - */ - int getLogActionValue(); - /** - * .acl.AclLogActionEnum log_action = 2; - * @return The logAction. + * Protobuf type {@code acl.AclAction} */ - acl.Acl.AclLogActionEnum getLogAction(); - } - /** - * Protobuf type {@code acl.AclAction} - */ - public static final class AclAction extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:acl.AclAction) - AclActionOrBuilder { - private static final long serialVersionUID = 0L; - // Use AclAction.newBuilder() to construct. - private AclAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); + public static final class AclAction extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:acl.AclAction) + AclActionOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use AclAction.newBuilder() to construct. + private AclAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AclAction() { + forwardAction_ = 0; + logAction_ = 0; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclAction_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclAction.class, acl.Acl.AclAction.Builder.class); + } + + public static final int FORWARD_ACTION_FIELD_NUMBER = 1; + + private int forwardAction_; + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return The enum numeric value on the wire for forwardAction. + */ + @java.lang.Override + public int getForwardActionValue() { + return forwardAction_; + } + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return The forwardAction. + */ + @java.lang.Override + public acl.Acl.AclForwardActionEnum getForwardAction() { + @SuppressWarnings("deprecation") + acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.valueOf(forwardAction_); + return result == null ? acl.Acl.AclForwardActionEnum.UNRECOGNIZED : result; + } + + public static final int LOG_ACTION_FIELD_NUMBER = 2; + + private int logAction_; + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return The enum numeric value on the wire for logAction. + */ + @java.lang.Override + public int getLogActionValue() { + return logAction_; + } + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return The logAction. + */ + @java.lang.Override + public acl.Acl.AclLogActionEnum getLogAction() { + @SuppressWarnings("deprecation") + acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.valueOf(logAction_); + return result == null ? acl.Acl.AclLogActionEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (forwardAction_ != acl.Acl.AclForwardActionEnum.ACLFORWARDINGACTION_UNDEFINED.getNumber()) { + output.writeEnum(1, forwardAction_); + } + if (logAction_ != acl.Acl.AclLogActionEnum.ACLLOGACTION_UNDEFINED.getNumber()) { + output.writeEnum(2, logAction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (forwardAction_ != acl.Acl.AclForwardActionEnum.ACLFORWARDINGACTION_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, forwardAction_); + } + if (logAction_ != acl.Acl.AclLogActionEnum.ACLLOGACTION_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, logAction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof acl.Acl.AclAction)) { + return super.equals(obj); + } + acl.Acl.AclAction other = (acl.Acl.AclAction) obj; + if (forwardAction_ != other.forwardAction_) + return false; + if (logAction_ != other.logAction_) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FORWARD_ACTION_FIELD_NUMBER; + hash = (53 * hash) + forwardAction_; + hash = (37 * hash) + LOG_ACTION_FIELD_NUMBER; + hash = (53 * hash) + logAction_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static acl.Acl.AclAction parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclAction parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclAction parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclAction parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclAction parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclAction parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclAction parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclAction parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclAction parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static acl.Acl.AclAction parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclAction parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclAction parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(acl.Acl.AclAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code acl.AclAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:acl.AclAction) + acl.Acl.AclActionOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return acl.Acl.internal_static_acl_AclAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclAction_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclAction.class, acl.Acl.AclAction.Builder.class); + } + + // 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(); + forwardAction_ = 0; + logAction_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return acl.Acl.internal_static_acl_AclAction_descriptor; + } + + @java.lang.Override + public acl.Acl.AclAction getDefaultInstanceForType() { + return acl.Acl.AclAction.getDefaultInstance(); + } + + @java.lang.Override + public acl.Acl.AclAction build() { + acl.Acl.AclAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public acl.Acl.AclAction buildPartial() { + acl.Acl.AclAction result = new acl.Acl.AclAction(this); + result.forwardAction_ = forwardAction_; + result.logAction_ = logAction_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof acl.Acl.AclAction) { + return mergeFrom((acl.Acl.AclAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(acl.Acl.AclAction other) { + if (other == acl.Acl.AclAction.getDefaultInstance()) + return this; + if (other.forwardAction_ != 0) { + setForwardActionValue(other.getForwardActionValue()); + } + if (other.logAction_ != 0) { + setLogActionValue(other.getLogActionValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (acl.Acl.AclAction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int forwardAction_ = 0; + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return The enum numeric value on the wire for forwardAction. + */ + @java.lang.Override + public int getForwardActionValue() { + return forwardAction_; + } + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @param value The enum numeric value on the wire for forwardAction to set. + * @return This builder for chaining. + */ + public Builder setForwardActionValue(int value) { + forwardAction_ = value; + onChanged(); + return this; + } + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return The forwardAction. + */ + @java.lang.Override + public acl.Acl.AclForwardActionEnum getForwardAction() { + @SuppressWarnings("deprecation") + acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.valueOf(forwardAction_); + return result == null ? acl.Acl.AclForwardActionEnum.UNRECOGNIZED : result; + } + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @param value The forwardAction to set. + * @return This builder for chaining. + */ + public Builder setForwardAction(acl.Acl.AclForwardActionEnum value) { + if (value == null) { + throw new NullPointerException(); + } + forwardAction_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return This builder for chaining. + */ + public Builder clearForwardAction() { + forwardAction_ = 0; + onChanged(); + return this; + } + + private int logAction_ = 0; + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return The enum numeric value on the wire for logAction. + */ + @java.lang.Override + public int getLogActionValue() { + return logAction_; + } + + /** + * .acl.AclLogActionEnum log_action = 2; + * @param value The enum numeric value on the wire for logAction to set. + * @return This builder for chaining. + */ + public Builder setLogActionValue(int value) { + logAction_ = value; + onChanged(); + return this; + } + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return The logAction. + */ + @java.lang.Override + public acl.Acl.AclLogActionEnum getLogAction() { + @SuppressWarnings("deprecation") + acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.valueOf(logAction_); + return result == null ? acl.Acl.AclLogActionEnum.UNRECOGNIZED : result; + } + + /** + * .acl.AclLogActionEnum log_action = 2; + * @param value The logAction to set. + * @return This builder for chaining. + */ + public Builder setLogAction(acl.Acl.AclLogActionEnum value) { + if (value == null) { + throw new NullPointerException(); + } + logAction_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return This builder for chaining. + */ + public Builder clearLogAction() { + logAction_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:acl.AclAction) + } + + // @@protoc_insertion_point(class_scope:acl.AclAction) + private static final acl.Acl.AclAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new acl.Acl.AclAction(); + } + + public static acl.Acl.AclAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public acl.Acl.AclAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - private AclAction() { - forwardAction_ = 0; - logAction_ = 0; + + public interface AclEntryOrBuilder extends // @@protoc_insertion_point(interface_extends:acl.AclEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 sequence_id = 1; + * @return The sequenceId. + */ + int getSequenceId(); + + /** + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + + /** + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * .acl.AclMatch match = 3; + * @return Whether the match field is set. + */ + boolean hasMatch(); + + /** + * .acl.AclMatch match = 3; + * @return The match. + */ + acl.Acl.AclMatch getMatch(); + + /** + * .acl.AclMatch match = 3; + */ + acl.Acl.AclMatchOrBuilder getMatchOrBuilder(); + + /** + * .acl.AclAction action = 4; + * @return Whether the action field is set. + */ + boolean hasAction(); + + /** + * .acl.AclAction action = 4; + * @return The action. + */ + acl.Acl.AclAction getAction(); + + /** + * .acl.AclAction action = 4; + */ + acl.Acl.AclActionOrBuilder getActionOrBuilder(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AclAction(); - } + /** + * Protobuf type {@code acl.AclEntry} + */ + public static final class AclEntry extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:acl.AclEntry) + AclEntryOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use AclEntry.newBuilder() to construct. + private AclEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AclEntry() { + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclEntry_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclEntry.class, acl.Acl.AclEntry.Builder.class); + } + + public static final int SEQUENCE_ID_FIELD_NUMBER = 1; + + private int sequenceId_; + + /** + * uint32 sequence_id = 1; + * @return The sequenceId. + */ + @java.lang.Override + public int getSequenceId() { + return sequenceId_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + private volatile java.lang.Object description_; + + /** + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCH_FIELD_NUMBER = 3; + + private acl.Acl.AclMatch match_; + + /** + * .acl.AclMatch match = 3; + * @return Whether the match field is set. + */ + @java.lang.Override + public boolean hasMatch() { + return match_ != null; + } + + /** + * .acl.AclMatch match = 3; + * @return The match. + */ + @java.lang.Override + public acl.Acl.AclMatch getMatch() { + return match_ == null ? acl.Acl.AclMatch.getDefaultInstance() : match_; + } + + /** + * .acl.AclMatch match = 3; + */ + @java.lang.Override + public acl.Acl.AclMatchOrBuilder getMatchOrBuilder() { + return getMatch(); + } + + public static final int ACTION_FIELD_NUMBER = 4; + + private acl.Acl.AclAction action_; + + /** + * .acl.AclAction action = 4; + * @return Whether the action field is set. + */ + @java.lang.Override + public boolean hasAction() { + return action_ != null; + } + + /** + * .acl.AclAction action = 4; + * @return The action. + */ + @java.lang.Override + public acl.Acl.AclAction getAction() { + return action_ == null ? acl.Acl.AclAction.getDefaultInstance() : action_; + } + + /** + * .acl.AclAction action = 4; + */ + @java.lang.Override + public acl.Acl.AclActionOrBuilder getActionOrBuilder() { + return getAction(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sequenceId_ != 0) { + output.writeUInt32(1, sequenceId_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (match_ != null) { + output.writeMessage(3, getMatch()); + } + if (action_ != null) { + output.writeMessage(4, getAction()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (sequenceId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(1, sequenceId_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (match_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMatch()); + } + if (action_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAction()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof acl.Acl.AclEntry)) { + return super.equals(obj); + } + acl.Acl.AclEntry other = (acl.Acl.AclEntry) obj; + if (getSequenceId() != other.getSequenceId()) + return false; + if (!getDescription().equals(other.getDescription())) + return false; + if (hasMatch() != other.hasMatch()) + return false; + if (hasMatch()) { + if (!getMatch().equals(other.getMatch())) + return false; + } + if (hasAction() != other.hasAction()) + return false; + if (hasAction()) { + if (!getAction().equals(other.getAction())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SEQUENCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSequenceId(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasMatch()) { + hash = (37 * hash) + MATCH_FIELD_NUMBER; + hash = (53 * hash) + getMatch().hashCode(); + } + if (hasAction()) { + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static acl.Acl.AclEntry parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclEntry parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclEntry parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclEntry parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclEntry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclEntry parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclEntry parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclEntry parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclEntry parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static acl.Acl.AclEntry parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclEntry parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclEntry parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(acl.Acl.AclEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code acl.AclEntry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:acl.AclEntry) + acl.Acl.AclEntryOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return acl.Acl.internal_static_acl_AclEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclEntry_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclEntry.class, acl.Acl.AclEntry.Builder.class); + } + + // 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(); + sequenceId_ = 0; + description_ = ""; + if (matchBuilder_ == null) { + match_ = null; + } else { + match_ = null; + matchBuilder_ = null; + } + if (actionBuilder_ == null) { + action_ = null; + } else { + action_ = null; + actionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return acl.Acl.internal_static_acl_AclEntry_descriptor; + } + + @java.lang.Override + public acl.Acl.AclEntry getDefaultInstanceForType() { + return acl.Acl.AclEntry.getDefaultInstance(); + } + + @java.lang.Override + public acl.Acl.AclEntry build() { + acl.Acl.AclEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof acl.Acl.AclEntry) { + return mergeFrom((acl.Acl.AclEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(acl.Acl.AclEntry other) { + if (other == acl.Acl.AclEntry.getDefaultInstance()) + return this; + if (other.getSequenceId() != 0) { + setSequenceId(other.getSequenceId()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasMatch()) { + mergeMatch(other.getMatch()); + } + if (other.hasAction()) { + mergeAction(other.getAction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (acl.Acl.AclEntry) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sequenceId_; + + /** + * uint32 sequence_id = 1; + * @return The sequenceId. + */ + @java.lang.Override + public int getSequenceId() { + return sequenceId_; + } + + /** + * uint32 sequence_id = 1; + * @param value The sequenceId to set. + * @return This builder for chaining. + */ + public Builder setSequenceId(int value) { + sequenceId_ = value; + onChanged(); + return this; + } - @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; - } + /** + * uint32 sequence_id = 1; + * @return This builder for chaining. + */ + public Builder clearSequenceId() { + sequenceId_ = 0; + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclAction.class, acl.Acl.AclAction.Builder.class); - } + private java.lang.Object description_ = ""; + + /** + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static final int FORWARD_ACTION_FIELD_NUMBER = 1; - private int forwardAction_; - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return The enum numeric value on the wire for forwardAction. - */ - @java.lang.Override public int getForwardActionValue() { - return forwardAction_; - } - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return The forwardAction. - */ - @java.lang.Override public acl.Acl.AclForwardActionEnum getForwardAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.valueOf(forwardAction_); - return result == null ? acl.Acl.AclForwardActionEnum.UNRECOGNIZED : result; + /** + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + onChanged(); + return this; + } + + /** + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + + /** + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + onChanged(); + return this; + } + + private acl.Acl.AclMatch match_; + + private com.google.protobuf.SingleFieldBuilderV3 matchBuilder_; + + /** + * .acl.AclMatch match = 3; + * @return Whether the match field is set. + */ + public boolean hasMatch() { + return matchBuilder_ != null || match_ != null; + } + + /** + * .acl.AclMatch match = 3; + * @return The match. + */ + public acl.Acl.AclMatch getMatch() { + if (matchBuilder_ == null) { + return match_ == null ? acl.Acl.AclMatch.getDefaultInstance() : match_; + } else { + return matchBuilder_.getMessage(); + } + } + + /** + * .acl.AclMatch match = 3; + */ + public Builder setMatch(acl.Acl.AclMatch value) { + if (matchBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + match_ = value; + onChanged(); + } else { + matchBuilder_.setMessage(value); + } + return this; + } + + /** + * .acl.AclMatch match = 3; + */ + public Builder setMatch(acl.Acl.AclMatch.Builder builderForValue) { + if (matchBuilder_ == null) { + match_ = builderForValue.build(); + onChanged(); + } else { + matchBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .acl.AclMatch match = 3; + */ + public Builder mergeMatch(acl.Acl.AclMatch value) { + if (matchBuilder_ == null) { + if (match_ != null) { + match_ = acl.Acl.AclMatch.newBuilder(match_).mergeFrom(value).buildPartial(); + } else { + match_ = value; + } + onChanged(); + } else { + matchBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .acl.AclMatch match = 3; + */ + public Builder clearMatch() { + if (matchBuilder_ == null) { + match_ = null; + onChanged(); + } else { + match_ = null; + matchBuilder_ = null; + } + return this; + } + + /** + * .acl.AclMatch match = 3; + */ + public acl.Acl.AclMatch.Builder getMatchBuilder() { + onChanged(); + return getMatchFieldBuilder().getBuilder(); + } + + /** + * .acl.AclMatch match = 3; + */ + public acl.Acl.AclMatchOrBuilder getMatchOrBuilder() { + if (matchBuilder_ != null) { + return matchBuilder_.getMessageOrBuilder(); + } else { + return match_ == null ? acl.Acl.AclMatch.getDefaultInstance() : match_; + } + } + + /** + * .acl.AclMatch match = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getMatchFieldBuilder() { + if (matchBuilder_ == null) { + matchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getMatch(), getParentForChildren(), isClean()); + match_ = null; + } + return matchBuilder_; + } + + private acl.Acl.AclAction action_; + + private com.google.protobuf.SingleFieldBuilderV3 actionBuilder_; + + /** + * .acl.AclAction action = 4; + * @return Whether the action field is set. + */ + public boolean hasAction() { + return actionBuilder_ != null || action_ != null; + } + + /** + * .acl.AclAction action = 4; + * @return The action. + */ + public acl.Acl.AclAction getAction() { + if (actionBuilder_ == null) { + return action_ == null ? acl.Acl.AclAction.getDefaultInstance() : action_; + } else { + return actionBuilder_.getMessage(); + } + } + + /** + * .acl.AclAction action = 4; + */ + public Builder setAction(acl.Acl.AclAction value) { + if (actionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + actionBuilder_.setMessage(value); + } + return this; + } + + /** + * .acl.AclAction action = 4; + */ + public Builder setAction(acl.Acl.AclAction.Builder builderForValue) { + if (actionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + actionBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .acl.AclAction action = 4; + */ + public Builder mergeAction(acl.Acl.AclAction value) { + if (actionBuilder_ == null) { + if (action_ != null) { + action_ = acl.Acl.AclAction.newBuilder(action_).mergeFrom(value).buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + actionBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .acl.AclAction action = 4; + */ + public Builder clearAction() { + if (actionBuilder_ == null) { + action_ = null; + onChanged(); + } else { + action_ = null; + actionBuilder_ = null; + } + return this; + } + + /** + * .acl.AclAction action = 4; + */ + public acl.Acl.AclAction.Builder getActionBuilder() { + onChanged(); + return getActionFieldBuilder().getBuilder(); + } + + /** + * .acl.AclAction action = 4; + */ + public acl.Acl.AclActionOrBuilder getActionOrBuilder() { + if (actionBuilder_ != null) { + return actionBuilder_.getMessageOrBuilder(); + } else { + return action_ == null ? acl.Acl.AclAction.getDefaultInstance() : action_; + } + } + + /** + * .acl.AclAction action = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getActionFieldBuilder() { + if (actionBuilder_ == null) { + actionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getAction(), getParentForChildren(), isClean()); + action_ = null; + } + return actionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:acl.AclEntry) + } + + // @@protoc_insertion_point(class_scope:acl.AclEntry) + private static final acl.Acl.AclEntry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new acl.Acl.AclEntry(); + } + + public static acl.Acl.AclEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public acl.Acl.AclEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static final int LOG_ACTION_FIELD_NUMBER = 2; - private int logAction_; - /** - * .acl.AclLogActionEnum log_action = 2; - * @return The enum numeric value on the wire for logAction. - */ - @java.lang.Override public int getLogActionValue() { - return logAction_; + public interface AclRuleSetOrBuilder extends // @@protoc_insertion_point(interface_extends:acl.AclRuleSet) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * .acl.AclRuleTypeEnum type = 2; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * .acl.AclRuleTypeEnum type = 2; + * @return The type. + */ + acl.Acl.AclRuleTypeEnum getType(); + + /** + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + + /** + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * string user_id = 4; + * @return The userId. + */ + java.lang.String getUserId(); + + /** + * string user_id = 4; + * @return The bytes for userId. + */ + com.google.protobuf.ByteString getUserIdBytes(); + + /** + * repeated .acl.AclEntry entries = 5; + */ + java.util.List getEntriesList(); + + /** + * repeated .acl.AclEntry entries = 5; + */ + acl.Acl.AclEntry getEntries(int index); + + /** + * repeated .acl.AclEntry entries = 5; + */ + int getEntriesCount(); + + /** + * repeated .acl.AclEntry entries = 5; + */ + java.util.List getEntriesOrBuilderList(); + + /** + * repeated .acl.AclEntry entries = 5; + */ + acl.Acl.AclEntryOrBuilder getEntriesOrBuilder(int index); } + /** - * .acl.AclLogActionEnum log_action = 2; - * @return The logAction. + * Protobuf type {@code acl.AclRuleSet} */ - @java.lang.Override public acl.Acl.AclLogActionEnum getLogAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.valueOf(logAction_); - return result == null ? acl.Acl.AclLogActionEnum.UNRECOGNIZED : result; - } + public static final class AclRuleSet extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:acl.AclRuleSet) + AclRuleSetOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use AclRuleSet.newBuilder() to construct. + private AclRuleSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (forwardAction_ != acl.Acl.AclForwardActionEnum.ACLFORWARDINGACTION_UNDEFINED.getNumber()) { - output.writeEnum(1, forwardAction_); - } - if (logAction_ != acl.Acl.AclLogActionEnum.ACLLOGACTION_UNDEFINED.getNumber()) { - output.writeEnum(2, logAction_); - } - unknownFields.writeTo(output); - } + private AclRuleSet() { + name_ = ""; + type_ = 0; + description_ = ""; + userId_ = ""; + entries_ = java.util.Collections.emptyList(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (forwardAction_ != acl.Acl.AclForwardActionEnum.ACLFORWARDINGACTION_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, forwardAction_); - } - if (logAction_ != acl.Acl.AclLogActionEnum.ACLLOGACTION_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, logAction_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AclRuleSet(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof acl.Acl.AclAction)) { - return super.equals(obj); - } - acl.Acl.AclAction other = (acl.Acl.AclAction) obj; - - if (forwardAction_ != other.forwardAction_) return false; - if (logAction_ != other.logAction_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FORWARD_ACTION_FIELD_NUMBER; - hash = (53 * hash) + forwardAction_; - hash = (37 * hash) + LOG_ACTION_FIELD_NUMBER; - hash = (53 * hash) + logAction_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + 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(); + 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 acl.Acl.AclAction parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclAction parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclAction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclAction parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclAction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclAction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclAction parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclAction parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclAction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static acl.Acl.AclAction parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclAction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclAction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return acl.Acl.internal_static_acl_AclRuleSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclRuleSet_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclRuleSet.class, acl.Acl.AclRuleSet.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + private volatile java.lang.Object name_; + + /** + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + + private int type_; + + /** + * .acl.AclRuleTypeEnum type = 2; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * .acl.AclRuleTypeEnum type = 2; + * @return The type. + */ + @java.lang.Override + public acl.Acl.AclRuleTypeEnum getType() { + @SuppressWarnings("deprecation") + acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.valueOf(type_); + return result == null ? acl.Acl.AclRuleTypeEnum.UNRECOGNIZED : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + private volatile java.lang.Object description_; + + /** + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_FIELD_NUMBER = 4; + + private volatile java.lang.Object userId_; + + /** + * string user_id = 4; + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + 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(); + userId_ = s; + return s; + } + } + + /** + * string user_id = 4; + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTRIES_FIELD_NUMBER = 5; + + private java.util.List entries_; + + /** + * repeated .acl.AclEntry entries = 5; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + + /** + * repeated .acl.AclEntry entries = 5; + */ + @java.lang.Override + public java.util.List getEntriesOrBuilderList() { + return entries_; + } + + /** + * repeated .acl.AclEntry entries = 5; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + + /** + * repeated .acl.AclEntry entries = 5; + */ + @java.lang.Override + public acl.Acl.AclEntry getEntries(int index) { + return entries_.get(index); + } + + /** + * repeated .acl.AclEntry entries = 5; + */ + @java.lang.Override + public acl.Acl.AclEntryOrBuilder getEntriesOrBuilder(int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ != acl.Acl.AclRuleTypeEnum.ACLRULETYPE_UNDEFINED.getNumber()) { + output.writeEnum(2, type_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!getUserIdBytes().isEmpty()) { + 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); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getNameBytes().isEmpty()) { + 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()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!getUserIdBytes().isEmpty()) { + 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(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof acl.Acl.AclRuleSet)) { + return super.equals(obj); + } + acl.Acl.AclRuleSet other = (acl.Acl.AclRuleSet) obj; + if (!getName().equals(other.getName())) + return false; + if (type_ != other.type_) + return false; + if (!getDescription().equals(other.getDescription())) + return false; + if (!getUserId().equals(other.getUserId())) + return false; + if (!getEntriesList().equals(other.getEntriesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static acl.Acl.AclRuleSet parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclRuleSet parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclRuleSet parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclRuleSet parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclRuleSet parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclRuleSet parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclRuleSet parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclRuleSet parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclRuleSet parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static acl.Acl.AclRuleSet parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclRuleSet parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclRuleSet parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(acl.Acl.AclRuleSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code acl.AclRuleSet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:acl.AclRuleSet) + acl.Acl.AclRuleSetOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return acl.Acl.internal_static_acl_AclRuleSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclRuleSet_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclRuleSet.class, acl.Acl.AclRuleSet.Builder.class); + } + + // 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(); + name_ = ""; + type_ = 0; + description_ = ""; + userId_ = ""; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + entriesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return acl.Acl.internal_static_acl_AclRuleSet_descriptor; + } + + @java.lang.Override + public acl.Acl.AclRuleSet getDefaultInstanceForType() { + return acl.Acl.AclRuleSet.getDefaultInstance(); + } + + @java.lang.Override + public acl.Acl.AclRuleSet build() { + acl.Acl.AclRuleSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof acl.Acl.AclRuleSet) { + return mergeFrom((acl.Acl.AclRuleSet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(acl.Acl.AclRuleSet other) { + if (other == acl.Acl.AclRuleSet.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + onChanged(); + } + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEntriesFieldBuilder() : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(acl.Acl.AclAction prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code acl.AclAction} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:acl.AclAction) - acl.Acl.AclActionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return acl.Acl.internal_static_acl_AclAction_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclAction.class, acl.Acl.AclAction.Builder.class); - } - - // 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(); - forwardAction_ = 0; - - logAction_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return acl.Acl.internal_static_acl_AclAction_descriptor; - } - - @java.lang.Override - public acl.Acl.AclAction getDefaultInstanceForType() { - return acl.Acl.AclAction.getDefaultInstance(); - } - - @java.lang.Override - public acl.Acl.AclAction build() { - acl.Acl.AclAction result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public acl.Acl.AclAction buildPartial() { - acl.Acl.AclAction result = new acl.Acl.AclAction(this); - result.forwardAction_ = forwardAction_; - result.logAction_ = logAction_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof acl.Acl.AclAction) { - return mergeFrom((acl.Acl.AclAction)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(acl.Acl.AclAction other) { - if (other == acl.Acl.AclAction.getDefaultInstance()) return this; - if (other.forwardAction_ != 0) { - setForwardActionValue(other.getForwardActionValue()); - } - if (other.logAction_ != 0) { - setLogActionValue(other.getLogActionValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclAction) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int forwardAction_ = 0; - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return The enum numeric value on the wire for forwardAction. - */ - @java.lang.Override public int getForwardActionValue() { - return forwardAction_; - } - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @param value The enum numeric value on the wire for forwardAction to set. - * @return This builder for chaining. - */ - public Builder setForwardActionValue(int value) { - - forwardAction_ = value; - onChanged(); - return this; - } - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return The forwardAction. - */ - @java.lang.Override - public acl.Acl.AclForwardActionEnum getForwardAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.valueOf(forwardAction_); - return result == null ? acl.Acl.AclForwardActionEnum.UNRECOGNIZED : result; - } - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @param value The forwardAction to set. - * @return This builder for chaining. - */ - public Builder setForwardAction(acl.Acl.AclForwardActionEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - forwardAction_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return This builder for chaining. - */ - public Builder clearForwardAction() { - - forwardAction_ = 0; - onChanged(); - return this; - } - - private int logAction_ = 0; - /** - * .acl.AclLogActionEnum log_action = 2; - * @return The enum numeric value on the wire for logAction. - */ - @java.lang.Override public int getLogActionValue() { - return logAction_; - } - /** - * .acl.AclLogActionEnum log_action = 2; - * @param value The enum numeric value on the wire for logAction to set. - * @return This builder for chaining. - */ - public Builder setLogActionValue(int value) { - - logAction_ = value; - onChanged(); - return this; - } - /** - * .acl.AclLogActionEnum log_action = 2; - * @return The logAction. - */ - @java.lang.Override - public acl.Acl.AclLogActionEnum getLogAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.valueOf(logAction_); - return result == null ? acl.Acl.AclLogActionEnum.UNRECOGNIZED : result; - } - /** - * .acl.AclLogActionEnum log_action = 2; - * @param value The logAction to set. - * @return This builder for chaining. - */ - public Builder setLogAction(acl.Acl.AclLogActionEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - logAction_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .acl.AclLogActionEnum log_action = 2; - * @return This builder for chaining. - */ - public Builder clearLogAction() { - - logAction_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:acl.AclAction) - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (acl.Acl.AclRuleSet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - // @@protoc_insertion_point(class_scope:acl.AclAction) - private static final acl.Acl.AclAction DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new acl.Acl.AclAction(); - } + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static acl.Acl.AclAction getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } - @java.lang.Override - public acl.Acl.AclAction getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } - } + private int type_ = 0; - public interface AclEntryOrBuilder extends - // @@protoc_insertion_point(interface_extends:acl.AclEntry) - com.google.protobuf.MessageOrBuilder { + /** + * .acl.AclRuleTypeEnum type = 2; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } - /** - * uint32 sequence_id = 1; - * @return The sequenceId. - */ - int getSequenceId(); + /** + * .acl.AclRuleTypeEnum type = 2; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + onChanged(); + return this; + } - /** - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); + /** + * .acl.AclRuleTypeEnum type = 2; + * @return The type. + */ + @java.lang.Override + public acl.Acl.AclRuleTypeEnum getType() { + @SuppressWarnings("deprecation") + acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.valueOf(type_); + return result == null ? acl.Acl.AclRuleTypeEnum.UNRECOGNIZED : result; + } - /** - * .acl.AclMatch match = 3; - * @return Whether the match field is set. - */ - boolean hasMatch(); - /** - * .acl.AclMatch match = 3; - * @return The match. - */ - acl.Acl.AclMatch getMatch(); - /** - * .acl.AclMatch match = 3; - */ - acl.Acl.AclMatchOrBuilder getMatchOrBuilder(); + /** + * .acl.AclRuleTypeEnum type = 2; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(acl.Acl.AclRuleTypeEnum value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value.getNumber(); + onChanged(); + return this; + } - /** - * .acl.AclAction action = 4; - * @return Whether the action field is set. - */ - boolean hasAction(); - /** - * .acl.AclAction action = 4; - * @return The action. - */ - acl.Acl.AclAction getAction(); - /** - * .acl.AclAction action = 4; - */ - acl.Acl.AclActionOrBuilder getActionOrBuilder(); - } - /** - * Protobuf type {@code acl.AclEntry} - */ - public static final class AclEntry extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:acl.AclEntry) - AclEntryOrBuilder { - private static final long serialVersionUID = 0L; - // Use AclEntry.newBuilder() to construct. - private AclEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AclEntry() { - description_ = ""; - } + /** + * .acl.AclRuleTypeEnum type = 2; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = 0; + onChanged(); + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AclEntry(); - } + private java.lang.Object description_ = ""; + + /** + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @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; - } + /** + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclEntry_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclEntry.class, acl.Acl.AclEntry.Builder.class); - } + /** + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + onChanged(); + return this; + } - public static final int SEQUENCE_ID_FIELD_NUMBER = 1; - private int sequenceId_; - /** - * uint32 sequence_id = 1; - * @return The sequenceId. - */ - @java.lang.Override - public int getSequenceId() { - return sequenceId_; - } + /** + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - * string description = 2; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - /** - * string description = 2; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + onChanged(); + return this; + } - public static final int MATCH_FIELD_NUMBER = 3; - private acl.Acl.AclMatch match_; - /** - * .acl.AclMatch match = 3; - * @return Whether the match field is set. - */ - @java.lang.Override - public boolean hasMatch() { - return match_ != null; - } - /** - * .acl.AclMatch match = 3; - * @return The match. - */ - @java.lang.Override - public acl.Acl.AclMatch getMatch() { - return match_ == null ? acl.Acl.AclMatch.getDefaultInstance() : match_; - } - /** - * .acl.AclMatch match = 3; - */ - @java.lang.Override - public acl.Acl.AclMatchOrBuilder getMatchOrBuilder() { - return getMatch(); - } + private java.lang.Object userId_ = ""; + + /** + * string user_id = 4; + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static final int ACTION_FIELD_NUMBER = 4; - private acl.Acl.AclAction action_; - /** - * .acl.AclAction action = 4; - * @return Whether the action field is set. - */ - @java.lang.Override - public boolean hasAction() { - return action_ != null; - } - /** - * .acl.AclAction action = 4; - * @return The action. - */ - @java.lang.Override - public acl.Acl.AclAction getAction() { - return action_ == null ? acl.Acl.AclAction.getDefaultInstance() : action_; - } - /** - * .acl.AclAction action = 4; - */ - @java.lang.Override - public acl.Acl.AclActionOrBuilder getActionOrBuilder() { - return getAction(); - } + /** + * string user_id = 4; + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * string user_id = 4; + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userId_ = value; + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * string user_id = 4; + * @return This builder for chaining. + */ + public Builder clearUserId() { + userId_ = getDefaultInstance().getUserId(); + onChanged(); + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sequenceId_ != 0) { - output.writeUInt32(1, sequenceId_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (match_ != null) { - output.writeMessage(3, getMatch()); - } - if (action_ != null) { - output.writeMessage(4, getAction()); - } - unknownFields.writeTo(output); - } + /** + * string user_id = 4; + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userId_ = value; + onChanged(); + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sequenceId_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, sequenceId_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (match_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getMatch()); - } - if (action_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getAction()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private java.util.List entries_ = java.util.Collections.emptyList(); - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof acl.Acl.AclEntry)) { - return super.equals(obj); - } - acl.Acl.AclEntry other = (acl.Acl.AclEntry) obj; - - if (getSequenceId() - != other.getSequenceId()) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (hasMatch() != other.hasMatch()) return false; - if (hasMatch()) { - if (!getMatch() - .equals(other.getMatch())) return false; - } - if (hasAction() != other.hasAction()) return false; - if (hasAction()) { - if (!getAction() - .equals(other.getAction())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SEQUENCE_ID_FIELD_NUMBER; - hash = (53 * hash) + getSequenceId(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasMatch()) { - hash = (37 * hash) + MATCH_FIELD_NUMBER; - hash = (53 * hash) + getMatch().hashCode(); - } - if (hasAction()) { - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + getAction().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private com.google.protobuf.RepeatedFieldBuilderV3 entriesBuilder_; + + /** + * repeated .acl.AclEntry entries = 5; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } - public static acl.Acl.AclEntry parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclEntry parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclEntry parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclEntry parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclEntry parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclEntry parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclEntry parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclEntry parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclEntry parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static acl.Acl.AclEntry parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclEntry parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclEntry parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(acl.Acl.AclEntry prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public acl.Acl.AclEntry getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code acl.AclEntry} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:acl.AclEntry) - acl.Acl.AclEntryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return acl.Acl.internal_static_acl_AclEntry_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclEntry_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclEntry.class, acl.Acl.AclEntry.Builder.class); - } - - // 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(); - sequenceId_ = 0; - - description_ = ""; - - if (matchBuilder_ == null) { - match_ = null; - } else { - match_ = null; - matchBuilder_ = null; - } - if (actionBuilder_ == null) { - action_ = null; - } else { - action_ = null; - actionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return acl.Acl.internal_static_acl_AclEntry_descriptor; - } - - @java.lang.Override - public acl.Acl.AclEntry getDefaultInstanceForType() { - return acl.Acl.AclEntry.getDefaultInstance(); - } - - @java.lang.Override - public acl.Acl.AclEntry build() { - acl.Acl.AclEntry result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof acl.Acl.AclEntry) { - return mergeFrom((acl.Acl.AclEntry)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(acl.Acl.AclEntry other) { - if (other == acl.Acl.AclEntry.getDefaultInstance()) return this; - if (other.getSequenceId() != 0) { - setSequenceId(other.getSequenceId()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasMatch()) { - mergeMatch(other.getMatch()); - } - if (other.hasAction()) { - mergeAction(other.getAction()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclEntry) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int sequenceId_ ; - /** - * uint32 sequence_id = 1; - * @return The sequenceId. - */ - @java.lang.Override - public int getSequenceId() { - return sequenceId_; - } - /** - * uint32 sequence_id = 1; - * @param value The sequenceId to set. - * @return This builder for chaining. - */ - public Builder setSequenceId(int value) { - - sequenceId_ = value; - onChanged(); - return this; - } - /** - * uint32 sequence_id = 1; - * @return This builder for chaining. - */ - public Builder clearSequenceId() { - - sequenceId_ = 0; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * string description = 2; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string description = 2; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string description = 2; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * string description = 2; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private acl.Acl.AclMatch match_; - private com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclMatch, acl.Acl.AclMatch.Builder, acl.Acl.AclMatchOrBuilder> matchBuilder_; - /** - * .acl.AclMatch match = 3; - * @return Whether the match field is set. - */ - public boolean hasMatch() { - return matchBuilder_ != null || match_ != null; - } - /** - * .acl.AclMatch match = 3; - * @return The match. - */ - public acl.Acl.AclMatch getMatch() { - if (matchBuilder_ == null) { - return match_ == null ? acl.Acl.AclMatch.getDefaultInstance() : match_; - } else { - return matchBuilder_.getMessage(); - } - } - /** - * .acl.AclMatch match = 3; - */ - public Builder setMatch(acl.Acl.AclMatch value) { - if (matchBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - match_ = value; - onChanged(); - } else { - matchBuilder_.setMessage(value); - } - - return this; - } - /** - * .acl.AclMatch match = 3; - */ - public Builder setMatch( - acl.Acl.AclMatch.Builder builderForValue) { - if (matchBuilder_ == null) { - match_ = builderForValue.build(); - onChanged(); - } else { - matchBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .acl.AclMatch match = 3; - */ - public Builder mergeMatch(acl.Acl.AclMatch value) { - if (matchBuilder_ == null) { - if (match_ != null) { - match_ = - acl.Acl.AclMatch.newBuilder(match_).mergeFrom(value).buildPartial(); - } else { - match_ = value; - } - onChanged(); - } else { - matchBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .acl.AclMatch match = 3; - */ - public Builder clearMatch() { - if (matchBuilder_ == null) { - match_ = null; - onChanged(); - } else { - match_ = null; - matchBuilder_ = null; - } - - return this; - } - /** - * .acl.AclMatch match = 3; - */ - public acl.Acl.AclMatch.Builder getMatchBuilder() { - - onChanged(); - return getMatchFieldBuilder().getBuilder(); - } - /** - * .acl.AclMatch match = 3; - */ - public acl.Acl.AclMatchOrBuilder getMatchOrBuilder() { - if (matchBuilder_ != null) { - return matchBuilder_.getMessageOrBuilder(); - } else { - return match_ == null ? - acl.Acl.AclMatch.getDefaultInstance() : match_; - } - } - /** - * .acl.AclMatch match = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclMatch, acl.Acl.AclMatch.Builder, acl.Acl.AclMatchOrBuilder> - getMatchFieldBuilder() { - if (matchBuilder_ == null) { - matchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclMatch, acl.Acl.AclMatch.Builder, acl.Acl.AclMatchOrBuilder>( - getMatch(), - getParentForChildren(), - isClean()); - match_ = null; - } - return matchBuilder_; - } - - private acl.Acl.AclAction action_; - private com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclAction, acl.Acl.AclAction.Builder, acl.Acl.AclActionOrBuilder> actionBuilder_; - /** - * .acl.AclAction action = 4; - * @return Whether the action field is set. - */ - public boolean hasAction() { - return actionBuilder_ != null || action_ != null; - } - /** - * .acl.AclAction action = 4; - * @return The action. - */ - public acl.Acl.AclAction getAction() { - if (actionBuilder_ == null) { - return action_ == null ? acl.Acl.AclAction.getDefaultInstance() : action_; - } else { - return actionBuilder_.getMessage(); - } - } - /** - * .acl.AclAction action = 4; - */ - public Builder setAction(acl.Acl.AclAction value) { - if (actionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - onChanged(); - } else { - actionBuilder_.setMessage(value); - } - - return this; - } - /** - * .acl.AclAction action = 4; - */ - public Builder setAction( - acl.Acl.AclAction.Builder builderForValue) { - if (actionBuilder_ == null) { - action_ = builderForValue.build(); - onChanged(); - } else { - actionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .acl.AclAction action = 4; - */ - public Builder mergeAction(acl.Acl.AclAction value) { - if (actionBuilder_ == null) { - if (action_ != null) { - action_ = - acl.Acl.AclAction.newBuilder(action_).mergeFrom(value).buildPartial(); - } else { - action_ = value; - } - onChanged(); - } else { - actionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .acl.AclAction action = 4; - */ - public Builder clearAction() { - if (actionBuilder_ == null) { - action_ = null; - onChanged(); - } else { - action_ = null; - actionBuilder_ = null; - } - - return this; - } - /** - * .acl.AclAction action = 4; - */ - public acl.Acl.AclAction.Builder getActionBuilder() { - - onChanged(); - return getActionFieldBuilder().getBuilder(); - } - /** - * .acl.AclAction action = 4; - */ - public acl.Acl.AclActionOrBuilder getActionOrBuilder() { - if (actionBuilder_ != null) { - return actionBuilder_.getMessageOrBuilder(); - } else { - return action_ == null ? - acl.Acl.AclAction.getDefaultInstance() : action_; - } - } - /** - * .acl.AclAction action = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclAction, acl.Acl.AclAction.Builder, acl.Acl.AclActionOrBuilder> - getActionFieldBuilder() { - if (actionBuilder_ == null) { - actionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclAction, acl.Acl.AclAction.Builder, acl.Acl.AclActionOrBuilder>( - getAction(), - getParentForChildren(), - isClean()); - action_ = null; - } - return actionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:acl.AclEntry) - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder setEntries(int index, acl.Acl.AclEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } - // @@protoc_insertion_point(class_scope:acl.AclEntry) - private static final acl.Acl.AclEntry DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new acl.Acl.AclEntry(); - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder setEntries(int index, acl.Acl.AclEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - public static acl.Acl.AclEntry getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder addEntries(acl.Acl.AclEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder addEntries(int index, acl.Acl.AclEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder addEntries(acl.Acl.AclEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public acl.Acl.AclEntry getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder addEntries(int index, acl.Acl.AclEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder addAllEntries(java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } - public interface AclRuleSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:acl.AclRuleSet) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } - /** - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } - /** - * .acl.AclRuleTypeEnum type = 2; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * .acl.AclRuleTypeEnum type = 2; - * @return The type. - */ - acl.Acl.AclRuleTypeEnum getType(); + /** + * repeated .acl.AclEntry entries = 5; + */ + public acl.Acl.AclEntry.Builder getEntriesBuilder(int index) { + return getEntriesFieldBuilder().getBuilder(index); + } - /** - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); + /** + * repeated .acl.AclEntry entries = 5; + */ + public acl.Acl.AclEntryOrBuilder getEntriesOrBuilder(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } - /** - * string user_id = 4; - * @return The userId. - */ - java.lang.String getUserId(); - /** - * string user_id = 4; - * @return The bytes for userId. - */ - com.google.protobuf.ByteString - getUserIdBytes(); + /** + * repeated .acl.AclEntry entries = 5; + */ + public java.util.List getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } - /** - * repeated .acl.AclEntry entries = 5; - */ - java.util.List - getEntriesList(); - /** - * repeated .acl.AclEntry entries = 5; - */ - acl.Acl.AclEntry getEntries(int index); - /** - * repeated .acl.AclEntry entries = 5; - */ - int getEntriesCount(); - /** - * repeated .acl.AclEntry entries = 5; - */ - java.util.List - getEntriesOrBuilderList(); - /** - * repeated .acl.AclEntry entries = 5; - */ - acl.Acl.AclEntryOrBuilder getEntriesOrBuilder( - int index); - } - /** - * Protobuf type {@code acl.AclRuleSet} - */ - public static final class AclRuleSet extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:acl.AclRuleSet) - AclRuleSetOrBuilder { - private static final long serialVersionUID = 0L; - // Use AclRuleSet.newBuilder() to construct. - private AclRuleSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AclRuleSet() { - name_ = ""; - type_ = 0; - description_ = ""; - userId_ = ""; - entries_ = java.util.Collections.emptyList(); - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public acl.Acl.AclEntry.Builder addEntriesBuilder() { + return getEntriesFieldBuilder().addBuilder(acl.Acl.AclEntry.getDefaultInstance()); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AclRuleSet(); - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public acl.Acl.AclEntry.Builder addEntriesBuilder(int index) { + return getEntriesFieldBuilder().addBuilder(index, acl.Acl.AclEntry.getDefaultInstance()); + } - @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(); - 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; - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public java.util.List getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclRuleSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclRuleSet.class, acl.Acl.AclRuleSet.Builder.class); - } + private com.google.protobuf.RepeatedFieldBuilderV3 getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public static final int TYPE_FIELD_NUMBER = 2; - private int type_; - /** - * .acl.AclRuleTypeEnum type = 2; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - * .acl.AclRuleTypeEnum type = 2; - * @return The type. - */ - @java.lang.Override public acl.Acl.AclRuleTypeEnum getType() { - @SuppressWarnings("deprecation") - acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.valueOf(type_); - return result == null ? acl.Acl.AclRuleTypeEnum.UNRECOGNIZED : result; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:acl.AclRuleSet) + } - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - /** - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + // @@protoc_insertion_point(class_scope:acl.AclRuleSet) + private static final acl.Acl.AclRuleSet DEFAULT_INSTANCE; - public static final int USER_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object userId_; - /** - * string user_id = 4; - * @return The userId. - */ - @java.lang.Override - public java.lang.String getUserId() { - java.lang.Object ref = userId_; - 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(); - userId_ = s; - return s; - } - } - /** - * string user_id = 4; - * @return The bytes for userId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUserIdBytes() { - java.lang.Object ref = userId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + static { + DEFAULT_INSTANCE = new acl.Acl.AclRuleSet(); + } - public static final int ENTRIES_FIELD_NUMBER = 5; - private java.util.List entries_; - /** - * repeated .acl.AclEntry entries = 5; - */ - @java.lang.Override - public java.util.List getEntriesList() { - return entries_; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - @java.lang.Override - public java.util.List - getEntriesOrBuilderList() { - return entries_; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - @java.lang.Override - public int getEntriesCount() { - return entries_.size(); - } - /** - * repeated .acl.AclEntry entries = 5; - */ - @java.lang.Override - public acl.Acl.AclEntry getEntries(int index) { - return entries_.get(index); - } - /** - * repeated .acl.AclEntry entries = 5; - */ - @java.lang.Override - public acl.Acl.AclEntryOrBuilder getEntriesOrBuilder( - int index) { - return entries_.get(index); - } + public static acl.Acl.AclRuleSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - memoizedIsInitialized = 1; - return true; - } + @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); + } + }; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (type_ != acl.Acl.AclRuleTypeEnum.ACLRULETYPE_UNDEFINED.getNumber()) { - output.writeEnum(2, type_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (!getUserIdBytes().isEmpty()) { - 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); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - 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()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (!getUserIdBytes().isEmpty()) { - 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(); - memoizedSize = size; - return size; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof acl.Acl.AclRuleSet)) { - return super.equals(obj); - } - acl.Acl.AclRuleSet other = (acl.Acl.AclRuleSet) obj; - - if (!getName() - .equals(other.getName())) return false; - if (type_ != other.type_) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getUserId() - .equals(other.getUserId())) return false; - if (!getEntriesList() - .equals(other.getEntriesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; + @java.lang.Override + public acl.Acl.AclRuleSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + USER_ID_FIELD_NUMBER; - hash = (53 * hash) + getUserId().hashCode(); - if (getEntriesCount() > 0) { - hash = (37 * hash) + ENTRIES_FIELD_NUMBER; - hash = (53 * hash) + getEntriesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_acl_AclMatch_descriptor; - public static acl.Acl.AclRuleSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclRuleSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclRuleSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclRuleSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclRuleSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclRuleSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclRuleSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclRuleSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclRuleSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static acl.Acl.AclRuleSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclRuleSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclRuleSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_acl_AclMatch_fieldAccessorTable; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(acl.Acl.AclRuleSet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_acl_AclAction_descriptor; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code acl.AclRuleSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:acl.AclRuleSet) - acl.Acl.AclRuleSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return acl.Acl.internal_static_acl_AclRuleSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclRuleSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclRuleSet.class, acl.Acl.AclRuleSet.Builder.class); - } - - // 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(); - name_ = ""; - - type_ = 0; - - description_ = ""; - - userId_ = ""; - - if (entriesBuilder_ == null) { - entries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - entriesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return acl.Acl.internal_static_acl_AclRuleSet_descriptor; - } - - @java.lang.Override - public acl.Acl.AclRuleSet getDefaultInstanceForType() { - return acl.Acl.AclRuleSet.getDefaultInstance(); - } - - @java.lang.Override - public acl.Acl.AclRuleSet build() { - acl.Acl.AclRuleSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - if (entriesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - entries_ = java.util.Collections.unmodifiableList(entries_); - bitField0_ = (bitField0_ & ~0x00000001); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof acl.Acl.AclRuleSet) { - return mergeFrom((acl.Acl.AclRuleSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(acl.Acl.AclRuleSet other) { - if (other == acl.Acl.AclRuleSet.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getUserId().isEmpty()) { - userId_ = other.userId_; - onChanged(); - } - if (entriesBuilder_ == null) { - if (!other.entries_.isEmpty()) { - if (entries_.isEmpty()) { - entries_ = other.entries_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureEntriesIsMutable(); - entries_.addAll(other.entries_); - } - onChanged(); - } - } else { - if (!other.entries_.isEmpty()) { - if (entriesBuilder_.isEmpty()) { - entriesBuilder_.dispose(); - entriesBuilder_ = null; - entries_ = other.entries_; - bitField0_ = (bitField0_ & ~0x00000001); - entriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEntriesFieldBuilder() : null; - } else { - entriesBuilder_.addAllMessages(other.entries_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclRuleSet) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int type_ = 0; - /** - * .acl.AclRuleTypeEnum type = 2; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - * .acl.AclRuleTypeEnum type = 2; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - * .acl.AclRuleTypeEnum type = 2; - * @return The type. - */ - @java.lang.Override - public acl.Acl.AclRuleTypeEnum getType() { - @SuppressWarnings("deprecation") - acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.valueOf(type_); - return result == null ? acl.Acl.AclRuleTypeEnum.UNRECOGNIZED : result; - } - /** - * .acl.AclRuleTypeEnum type = 2; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(acl.Acl.AclRuleTypeEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .acl.AclRuleTypeEnum type = 2; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.lang.Object userId_ = ""; - /** - * string user_id = 4; - * @return The userId. - */ - public java.lang.String getUserId() { - java.lang.Object ref = userId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - userId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string user_id = 4; - * @return The bytes for userId. - */ - public com.google.protobuf.ByteString - getUserIdBytes() { - java.lang.Object ref = userId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string user_id = 4; - * @param value The userId to set. - * @return This builder for chaining. - */ - public Builder setUserId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - userId_ = value; - onChanged(); - return this; - } - /** - * string user_id = 4; - * @return This builder for chaining. - */ - public Builder clearUserId() { - - userId_ = getDefaultInstance().getUserId(); - onChanged(); - return this; - } - /** - * string user_id = 4; - * @param value The bytes for userId to set. - * @return This builder for chaining. - */ - public Builder setUserIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - userId_ = value; - onChanged(); - return this; - } - - private java.util.List entries_ = - java.util.Collections.emptyList(); - private void ensureEntriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - entries_ = new java.util.ArrayList(entries_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - acl.Acl.AclEntry, acl.Acl.AclEntry.Builder, acl.Acl.AclEntryOrBuilder> entriesBuilder_; - - /** - * repeated .acl.AclEntry entries = 5; - */ - public java.util.List getEntriesList() { - if (entriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(entries_); - } else { - return entriesBuilder_.getMessageList(); - } - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public int getEntriesCount() { - if (entriesBuilder_ == null) { - return entries_.size(); - } else { - return entriesBuilder_.getCount(); - } - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public acl.Acl.AclEntry getEntries(int index) { - if (entriesBuilder_ == null) { - return entries_.get(index); - } else { - return entriesBuilder_.getMessage(index); - } - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder setEntries( - int index, acl.Acl.AclEntry value) { - if (entriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntriesIsMutable(); - entries_.set(index, value); - onChanged(); - } else { - entriesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder setEntries( - int index, acl.Acl.AclEntry.Builder builderForValue) { - if (entriesBuilder_ == null) { - ensureEntriesIsMutable(); - entries_.set(index, builderForValue.build()); - onChanged(); - } else { - entriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder addEntries(acl.Acl.AclEntry value) { - if (entriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntriesIsMutable(); - entries_.add(value); - onChanged(); - } else { - entriesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder addEntries( - int index, acl.Acl.AclEntry value) { - if (entriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntriesIsMutable(); - entries_.add(index, value); - onChanged(); - } else { - entriesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder addEntries( - acl.Acl.AclEntry.Builder builderForValue) { - if (entriesBuilder_ == null) { - ensureEntriesIsMutable(); - entries_.add(builderForValue.build()); - onChanged(); - } else { - entriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder addEntries( - int index, acl.Acl.AclEntry.Builder builderForValue) { - if (entriesBuilder_ == null) { - ensureEntriesIsMutable(); - entries_.add(index, builderForValue.build()); - onChanged(); - } else { - entriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder addAllEntries( - java.lang.Iterable values) { - if (entriesBuilder_ == null) { - ensureEntriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, entries_); - onChanged(); - } else { - entriesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder clearEntries() { - if (entriesBuilder_ == null) { - entries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - entriesBuilder_.clear(); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder removeEntries(int index) { - if (entriesBuilder_ == null) { - ensureEntriesIsMutable(); - entries_.remove(index); - onChanged(); - } else { - entriesBuilder_.remove(index); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public acl.Acl.AclEntry.Builder getEntriesBuilder( - int index) { - return getEntriesFieldBuilder().getBuilder(index); - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public acl.Acl.AclEntryOrBuilder getEntriesOrBuilder( - int index) { - if (entriesBuilder_ == null) { - return entries_.get(index); } else { - return entriesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public java.util.List - getEntriesOrBuilderList() { - if (entriesBuilder_ != null) { - return entriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(entries_); - } - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public acl.Acl.AclEntry.Builder addEntriesBuilder() { - return getEntriesFieldBuilder().addBuilder( - acl.Acl.AclEntry.getDefaultInstance()); - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public acl.Acl.AclEntry.Builder addEntriesBuilder( - int index) { - return getEntriesFieldBuilder().addBuilder( - index, acl.Acl.AclEntry.getDefaultInstance()); - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public java.util.List - getEntriesBuilderList() { - return getEntriesFieldBuilder().getBuilderList(); - } - 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()); - entries_ = null; - } - return entriesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:acl.AclRuleSet) - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_acl_AclAction_fieldAccessorTable; - // @@protoc_insertion_point(class_scope:acl.AclRuleSet) - private static final acl.Acl.AclRuleSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new acl.Acl.AclRuleSet(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_acl_AclEntry_descriptor; - public static acl.Acl.AclRuleSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_acl_AclEntry_fieldAccessorTable; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_acl_AclRuleSet_descriptor; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_acl_AclRuleSet_fieldAccessorTable; - @java.lang.Override - public acl.Acl.AclRuleSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_acl_AclMatch_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_acl_AclMatch_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_acl_AclAction_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_acl_AclAction_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_acl_AclEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_acl_AclEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_acl_AclRuleSet_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_acl_AclRuleSet_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - 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" - }; - 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_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); - internal_static_acl_AclEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_acl_AclEntry_descriptor, - new java.lang.String[] { "SequenceId", "Description", "Match", "Action", }); - internal_static_acl_AclRuleSet_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_acl_AclRuleSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_acl_AclRuleSet_descriptor, - new java.lang.String[] { "Name", "Type", "Description", "UserId", "Entries", }); - } - - // @@protoc_insertion_point(outer_class_scope) + 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" }; + 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_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); + internal_static_acl_AclEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_acl_AclEntry_descriptor, new java.lang.String[] { "SequenceId", "Description", "Match", "Action" }); + internal_static_acl_AclRuleSet_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_acl_AclRuleSet_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_acl_AclRuleSet_descriptor, new java.lang.String[] { "Name", "Type", "Description", "UserId", "Entries" }); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java index 85bc0d278365971bbf1bcb135d05fd8523392716..4593770498216267b8d2f95dd728fccfbb9dc134 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java @@ -1,75644 +1,79934 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: context.proto - package context; public final class ContextOuterClass { - private ContextOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * Protobuf enum {@code context.EventTypeEnum} - */ - public enum EventTypeEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * EVENTTYPE_UNDEFINED = 0; - */ - EVENTTYPE_UNDEFINED(0), - /** - * EVENTTYPE_CREATE = 1; - */ - EVENTTYPE_CREATE(1), - /** - * EVENTTYPE_UPDATE = 2; - */ - EVENTTYPE_UPDATE(2), - /** - * EVENTTYPE_REMOVE = 3; - */ - EVENTTYPE_REMOVE(3), - UNRECOGNIZED(-1), - ; - - /** - * EVENTTYPE_UNDEFINED = 0; - */ - public static final int EVENTTYPE_UNDEFINED_VALUE = 0; - /** - * EVENTTYPE_CREATE = 1; - */ - public static final int EVENTTYPE_CREATE_VALUE = 1; - /** - * EVENTTYPE_UPDATE = 2; - */ - public static final int EVENTTYPE_UPDATE_VALUE = 2; - /** - * EVENTTYPE_REMOVE = 3; - */ - public static final int EVENTTYPE_REMOVE_VALUE = 3; + private ContextOuterClass() { + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static EventTypeEnum valueOf(int value) { - return forNumber(value); + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code context.EventTypeEnum} */ - public static EventTypeEnum forNumber(int value) { - switch (value) { - case 0: return EVENTTYPE_UNDEFINED; - case 1: return EVENTTYPE_CREATE; - case 2: return EVENTTYPE_UPDATE; - case 3: return EVENTTYPE_REMOVE; - default: return null; - } - } + public enum EventTypeEnum implements com.google.protobuf.ProtocolMessageEnum { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - EventTypeEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public EventTypeEnum findValueByNumber(int number) { - return EventTypeEnum.forNumber(number); - } - }; + /** + * EVENTTYPE_UNDEFINED = 0; + */ + EVENTTYPE_UNDEFINED(0), + /** + * EVENTTYPE_CREATE = 1; + */ + EVENTTYPE_CREATE(1), + /** + * EVENTTYPE_UPDATE = 2; + */ + EVENTTYPE_UPDATE(2), + /** + * EVENTTYPE_REMOVE = 3; + */ + EVENTTYPE_REMOVE(3), + UNRECOGNIZED(-1); - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(0); - } + /** + * EVENTTYPE_UNDEFINED = 0; + */ + public static final int EVENTTYPE_UNDEFINED_VALUE = 0; - private static final EventTypeEnum[] VALUES = values(); - - public static EventTypeEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + /** + * EVENTTYPE_CREATE = 1; + */ + public static final int EVENTTYPE_CREATE_VALUE = 1; - private final int value; + /** + * EVENTTYPE_UPDATE = 2; + */ + public static final int EVENTTYPE_UPDATE_VALUE = 2; - private EventTypeEnum(int value) { - this.value = value; - } + /** + * EVENTTYPE_REMOVE = 3; + */ + public static final int EVENTTYPE_REMOVE_VALUE = 3; - // @@protoc_insertion_point(enum_scope:context.EventTypeEnum) - } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EventTypeEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EventTypeEnum forNumber(int value) { + switch(value) { + case 0: + return EVENTTYPE_UNDEFINED; + case 1: + return EVENTTYPE_CREATE; + case 2: + return EVENTTYPE_UPDATE; + case 3: + return EVENTTYPE_REMOVE; + default: + return null; + } + } - /** - * Protobuf enum {@code context.DeviceDriverEnum} - */ - public enum DeviceDriverEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * also used for emulated
-     * 
- * - * DEVICEDRIVER_UNDEFINED = 0; - */ - DEVICEDRIVER_UNDEFINED(0), - /** - * DEVICEDRIVER_OPENCONFIG = 1; - */ - DEVICEDRIVER_OPENCONFIG(1), - /** - * DEVICEDRIVER_TRANSPORT_API = 2; - */ - DEVICEDRIVER_TRANSPORT_API(2), - /** - * DEVICEDRIVER_P4 = 3; - */ - DEVICEDRIVER_P4(3), - /** - * DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; - */ - DEVICEDRIVER_IETF_NETWORK_TOPOLOGY(4), - /** - * DEVICEDRIVER_ONF_TR_532 = 5; - */ - DEVICEDRIVER_ONF_TR_532(5), - /** - * DEVICEDRIVER_XR = 6; - */ - DEVICEDRIVER_XR(6), - /** - * DEVICEDRIVER_IETF_L2VPN = 7; - */ - DEVICEDRIVER_IETF_L2VPN(7), - /** - * DEVICEDRIVER_GNMI_OPENCONFIG = 8; - */ - DEVICEDRIVER_GNMI_OPENCONFIG(8), - UNRECOGNIZED(-1), - ; + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - /** - *
-     * also used for emulated
-     * 
- * - * DEVICEDRIVER_UNDEFINED = 0; - */ - public static final int DEVICEDRIVER_UNDEFINED_VALUE = 0; - /** - * DEVICEDRIVER_OPENCONFIG = 1; - */ - public static final int DEVICEDRIVER_OPENCONFIG_VALUE = 1; - /** - * DEVICEDRIVER_TRANSPORT_API = 2; - */ - public static final int DEVICEDRIVER_TRANSPORT_API_VALUE = 2; - /** - * DEVICEDRIVER_P4 = 3; - */ - public static final int DEVICEDRIVER_P4_VALUE = 3; - /** - * DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; - */ - public static final int DEVICEDRIVER_IETF_NETWORK_TOPOLOGY_VALUE = 4; - /** - * DEVICEDRIVER_ONF_TR_532 = 5; - */ - public static final int DEVICEDRIVER_ONF_TR_532_VALUE = 5; - /** - * DEVICEDRIVER_XR = 6; - */ - public static final int DEVICEDRIVER_XR_VALUE = 6; - /** - * DEVICEDRIVER_IETF_L2VPN = 7; - */ - public static final int DEVICEDRIVER_IETF_L2VPN_VALUE = 7; - /** - * DEVICEDRIVER_GNMI_OPENCONFIG = 8; - */ - public static final int DEVICEDRIVER_GNMI_OPENCONFIG_VALUE = 8; + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { + public EventTypeEnum findValueByNumber(int number) { + return EventTypeEnum.forNumber(number); + } + }; - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DeviceDriverEnum valueOf(int value) { - return forNumber(value); - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DeviceDriverEnum forNumber(int value) { - switch (value) { - case 0: return DEVICEDRIVER_UNDEFINED; - case 1: return DEVICEDRIVER_OPENCONFIG; - case 2: return DEVICEDRIVER_TRANSPORT_API; - case 3: return DEVICEDRIVER_P4; - case 4: return DEVICEDRIVER_IETF_NETWORK_TOPOLOGY; - case 5: return DEVICEDRIVER_ONF_TR_532; - case 6: return DEVICEDRIVER_XR; - case 7: return DEVICEDRIVER_IETF_L2VPN; - case 8: return DEVICEDRIVER_GNMI_OPENCONFIG; - default: return null; - } - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(0); + } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DeviceDriverEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DeviceDriverEnum findValueByNumber(int number) { - return DeviceDriverEnum.forNumber(number); + private static final EventTypeEnum[] VALUES = values(); + + public static EventTypeEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } - }; + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EventTypeEnum(int value) { + this.value = value; + } + } + + /** + * Protobuf enum {@code context.DeviceDriverEnum} + */ + public enum DeviceDriverEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + *
+         * also used for emulated
+         * 
+ * + * DEVICEDRIVER_UNDEFINED = 0; + */ + DEVICEDRIVER_UNDEFINED(0), + /** + * DEVICEDRIVER_OPENCONFIG = 1; + */ + DEVICEDRIVER_OPENCONFIG(1), + /** + * DEVICEDRIVER_TRANSPORT_API = 2; + */ + DEVICEDRIVER_TRANSPORT_API(2), + /** + * DEVICEDRIVER_P4 = 3; + */ + DEVICEDRIVER_P4(3), + /** + * DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; + */ + DEVICEDRIVER_IETF_NETWORK_TOPOLOGY(4), + /** + * DEVICEDRIVER_ONF_TR_532 = 5; + */ + DEVICEDRIVER_ONF_TR_532(5), + /** + * DEVICEDRIVER_XR = 6; + */ + DEVICEDRIVER_XR(6), + /** + * DEVICEDRIVER_IETF_L2VPN = 7; + */ + DEVICEDRIVER_IETF_L2VPN(7), + /** + * DEVICEDRIVER_GNMI_OPENCONFIG = 8; + */ + DEVICEDRIVER_GNMI_OPENCONFIG(8), + /** + * DEVICEDRIVER_OPTICAL_TFS = 9; + */ + DEVICEDRIVER_OPTICAL_TFS(9), + /** + * DEVICEDRIVER_IETF_ACTN = 10; + */ + DEVICEDRIVER_IETF_ACTN(10), + /** + * DEVICEDRIVER_OC = 11; + */ + DEVICEDRIVER_OC(11), + UNRECOGNIZED(-1); + + /** + *
+         * also used for emulated
+         * 
+ * + * DEVICEDRIVER_UNDEFINED = 0; + */ + public static final int DEVICEDRIVER_UNDEFINED_VALUE = 0; + + /** + * DEVICEDRIVER_OPENCONFIG = 1; + */ + public static final int DEVICEDRIVER_OPENCONFIG_VALUE = 1; + + /** + * DEVICEDRIVER_TRANSPORT_API = 2; + */ + public static final int DEVICEDRIVER_TRANSPORT_API_VALUE = 2; + + /** + * DEVICEDRIVER_P4 = 3; + */ + public static final int DEVICEDRIVER_P4_VALUE = 3; + + /** + * DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; + */ + public static final int DEVICEDRIVER_IETF_NETWORK_TOPOLOGY_VALUE = 4; + + /** + * DEVICEDRIVER_ONF_TR_532 = 5; + */ + public static final int DEVICEDRIVER_ONF_TR_532_VALUE = 5; + + /** + * DEVICEDRIVER_XR = 6; + */ + public static final int DEVICEDRIVER_XR_VALUE = 6; + + /** + * DEVICEDRIVER_IETF_L2VPN = 7; + */ + public static final int DEVICEDRIVER_IETF_L2VPN_VALUE = 7; + + /** + * DEVICEDRIVER_GNMI_OPENCONFIG = 8; + */ + public static final int DEVICEDRIVER_GNMI_OPENCONFIG_VALUE = 8; + + /** + * DEVICEDRIVER_OPTICAL_TFS = 9; + */ + public static final int DEVICEDRIVER_OPTICAL_TFS_VALUE = 9; + + /** + * DEVICEDRIVER_IETF_ACTN = 10; + */ + public static final int DEVICEDRIVER_IETF_ACTN_VALUE = 10; + + /** + * DEVICEDRIVER_OC = 11; + */ + public static final int DEVICEDRIVER_OC_VALUE = 11; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DeviceDriverEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DeviceDriverEnum forNumber(int value) { + switch(value) { + case 0: + return DEVICEDRIVER_UNDEFINED; + case 1: + return DEVICEDRIVER_OPENCONFIG; + case 2: + return DEVICEDRIVER_TRANSPORT_API; + case 3: + return DEVICEDRIVER_P4; + case 4: + return DEVICEDRIVER_IETF_NETWORK_TOPOLOGY; + case 5: + return DEVICEDRIVER_ONF_TR_532; + case 6: + return DEVICEDRIVER_XR; + case 7: + return DEVICEDRIVER_IETF_L2VPN; + case 8: + return DEVICEDRIVER_GNMI_OPENCONFIG; + case 9: + return DEVICEDRIVER_OPTICAL_TFS; + case 10: + return DEVICEDRIVER_IETF_ACTN; + case 11: + return DEVICEDRIVER_OC; + default: + return null; + } + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(1); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final DeviceDriverEnum[] VALUES = values(); - - public static DeviceDriverEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public DeviceDriverEnum findValueByNumber(int number) { + return DeviceDriverEnum.forNumber(number); + } + }; - private DeviceDriverEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:context.DeviceDriverEnum) - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * Protobuf enum {@code context.DeviceOperationalStatusEnum} - */ - public enum DeviceOperationalStatusEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DEVICEOPERATIONALSTATUS_UNDEFINED = 0; - */ - DEVICEOPERATIONALSTATUS_UNDEFINED(0), - /** - * DEVICEOPERATIONALSTATUS_DISABLED = 1; - */ - DEVICEOPERATIONALSTATUS_DISABLED(1), - /** - * DEVICEOPERATIONALSTATUS_ENABLED = 2; - */ - DEVICEOPERATIONALSTATUS_ENABLED(2), - UNRECOGNIZED(-1), - ; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(1); + } - /** - * DEVICEOPERATIONALSTATUS_UNDEFINED = 0; - */ - public static final int DEVICEOPERATIONALSTATUS_UNDEFINED_VALUE = 0; - /** - * DEVICEOPERATIONALSTATUS_DISABLED = 1; - */ - public static final int DEVICEOPERATIONALSTATUS_DISABLED_VALUE = 1; - /** - * DEVICEOPERATIONALSTATUS_ENABLED = 2; - */ - public static final int DEVICEOPERATIONALSTATUS_ENABLED_VALUE = 2; + private static final DeviceDriverEnum[] VALUES = values(); + public static DeviceDriverEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + private final int value; - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DeviceOperationalStatusEnum valueOf(int value) { - return forNumber(value); + private DeviceDriverEnum(int value) { + this.value = value; + } } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code context.DeviceOperationalStatusEnum} */ - public static DeviceOperationalStatusEnum forNumber(int value) { - switch (value) { - case 0: return DEVICEOPERATIONALSTATUS_UNDEFINED; - case 1: return DEVICEOPERATIONALSTATUS_DISABLED; - case 2: return DEVICEOPERATIONALSTATUS_ENABLED; - default: return null; - } - } + public enum DeviceOperationalStatusEnum implements com.google.protobuf.ProtocolMessageEnum { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DeviceOperationalStatusEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DeviceOperationalStatusEnum findValueByNumber(int number) { - return DeviceOperationalStatusEnum.forNumber(number); - } - }; + /** + * DEVICEOPERATIONALSTATUS_UNDEFINED = 0; + */ + DEVICEOPERATIONALSTATUS_UNDEFINED(0), + /** + * DEVICEOPERATIONALSTATUS_DISABLED = 1; + */ + DEVICEOPERATIONALSTATUS_DISABLED(1), + /** + * DEVICEOPERATIONALSTATUS_ENABLED = 2; + */ + DEVICEOPERATIONALSTATUS_ENABLED(2), + UNRECOGNIZED(-1); - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(2); - } + /** + * DEVICEOPERATIONALSTATUS_UNDEFINED = 0; + */ + public static final int DEVICEOPERATIONALSTATUS_UNDEFINED_VALUE = 0; - private static final DeviceOperationalStatusEnum[] VALUES = values(); - - public static DeviceOperationalStatusEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + /** + * DEVICEOPERATIONALSTATUS_DISABLED = 1; + */ + public static final int DEVICEOPERATIONALSTATUS_DISABLED_VALUE = 1; - private final int value; + /** + * DEVICEOPERATIONALSTATUS_ENABLED = 2; + */ + public static final int DEVICEOPERATIONALSTATUS_ENABLED_VALUE = 2; - private DeviceOperationalStatusEnum(int value) { - this.value = value; - } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DeviceOperationalStatusEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DeviceOperationalStatusEnum forNumber(int value) { + switch(value) { + case 0: + return DEVICEOPERATIONALSTATUS_UNDEFINED; + case 1: + return DEVICEOPERATIONALSTATUS_DISABLED; + case 2: + return DEVICEOPERATIONALSTATUS_ENABLED; + default: + return null; + } + } - // @@protoc_insertion_point(enum_scope:context.DeviceOperationalStatusEnum) - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - /** - * Protobuf enum {@code context.ServiceTypeEnum} - */ - public enum ServiceTypeEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SERVICETYPE_UNKNOWN = 0; - */ - SERVICETYPE_UNKNOWN(0), - /** - * SERVICETYPE_L3NM = 1; - */ - SERVICETYPE_L3NM(1), - /** - * SERVICETYPE_L2NM = 2; - */ - SERVICETYPE_L2NM(2), - /** - * SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; - */ - SERVICETYPE_TAPI_CONNECTIVITY_SERVICE(3), - /** - * SERVICETYPE_TE = 4; - */ - SERVICETYPE_TE(4), - UNRECOGNIZED(-1), - ; + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - /** - * SERVICETYPE_UNKNOWN = 0; - */ - public static final int SERVICETYPE_UNKNOWN_VALUE = 0; - /** - * SERVICETYPE_L3NM = 1; - */ - public static final int SERVICETYPE_L3NM_VALUE = 1; - /** - * SERVICETYPE_L2NM = 2; - */ - public static final int SERVICETYPE_L2NM_VALUE = 2; - /** - * SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; - */ - public static final int SERVICETYPE_TAPI_CONNECTIVITY_SERVICE_VALUE = 3; - /** - * SERVICETYPE_TE = 4; - */ - public static final int SERVICETYPE_TE_VALUE = 4; + public DeviceOperationalStatusEnum findValueByNumber(int number) { + return DeviceOperationalStatusEnum.forNumber(number); + } + }; + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ServiceTypeEnum valueOf(int value) { - return forNumber(value); - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(2); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ServiceTypeEnum forNumber(int value) { - switch (value) { - case 0: return SERVICETYPE_UNKNOWN; - case 1: return SERVICETYPE_L3NM; - case 2: return SERVICETYPE_L2NM; - case 3: return SERVICETYPE_TAPI_CONNECTIVITY_SERVICE; - case 4: return SERVICETYPE_TE; - default: return null; - } - } + private static final DeviceOperationalStatusEnum[] VALUES = values(); + + public static DeviceOperationalStatusEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DeviceOperationalStatusEnum(int value) { + this.value = value; + } + } + + /** + * Protobuf enum {@code context.ServiceTypeEnum} + */ + public enum ServiceTypeEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * SERVICETYPE_UNKNOWN = 0; + */ + SERVICETYPE_UNKNOWN(0), + /** + * SERVICETYPE_L3NM = 1; + */ + SERVICETYPE_L3NM(1), + /** + * SERVICETYPE_L2NM = 2; + */ + SERVICETYPE_L2NM(2), + /** + * SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; + */ + SERVICETYPE_TAPI_CONNECTIVITY_SERVICE(3), + /** + * SERVICETYPE_TE = 4; + */ + SERVICETYPE_TE(4), + /** + * SERVICETYPE_E2E = 5; + */ + SERVICETYPE_E2E(5), + /** + * SERVICETYPE_OPTICAL_CONNECTIVITY = 6; + */ + SERVICETYPE_OPTICAL_CONNECTIVITY(6), + UNRECOGNIZED(-1); + + /** + * SERVICETYPE_UNKNOWN = 0; + */ + public static final int SERVICETYPE_UNKNOWN_VALUE = 0; + + /** + * SERVICETYPE_L3NM = 1; + */ + public static final int SERVICETYPE_L3NM_VALUE = 1; + + /** + * SERVICETYPE_L2NM = 2; + */ + public static final int SERVICETYPE_L2NM_VALUE = 2; + + /** + * SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; + */ + public static final int SERVICETYPE_TAPI_CONNECTIVITY_SERVICE_VALUE = 3; + + /** + * SERVICETYPE_TE = 4; + */ + public static final int SERVICETYPE_TE_VALUE = 4; + + /** + * SERVICETYPE_E2E = 5; + */ + public static final int SERVICETYPE_E2E_VALUE = 5; + + /** + * SERVICETYPE_OPTICAL_CONNECTIVITY = 6; + */ + public static final int SERVICETYPE_OPTICAL_CONNECTIVITY_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ServiceTypeEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ServiceTypeEnum forNumber(int value) { + switch(value) { + case 0: + return SERVICETYPE_UNKNOWN; + case 1: + return SERVICETYPE_L3NM; + case 2: + return SERVICETYPE_L2NM; + case 3: + return SERVICETYPE_TAPI_CONNECTIVITY_SERVICE; + case 4: + return SERVICETYPE_TE; + case 5: + return SERVICETYPE_E2E; + case 6: + return SERVICETYPE_OPTICAL_CONNECTIVITY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ServiceTypeEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { public ServiceTypeEnum findValueByNumber(int number) { - return ServiceTypeEnum.forNumber(number); + return ServiceTypeEnum.forNumber(number); } - }; + }; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(3); - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - private static final ServiceTypeEnum[] VALUES = values(); - - public static ServiceTypeEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - private final int value; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(3); + } - private ServiceTypeEnum(int value) { - this.value = value; - } + private static final ServiceTypeEnum[] VALUES = values(); - // @@protoc_insertion_point(enum_scope:context.ServiceTypeEnum) - } + public static ServiceTypeEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ServiceTypeEnum(int value) { + this.value = value; + } + } + + /** + * Protobuf enum {@code context.ServiceStatusEnum} + */ + public enum ServiceStatusEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * SERVICESTATUS_UNDEFINED = 0; + */ + SERVICESTATUS_UNDEFINED(0), + /** + * SERVICESTATUS_PLANNED = 1; + */ + SERVICESTATUS_PLANNED(1), + /** + * SERVICESTATUS_ACTIVE = 2; + */ + SERVICESTATUS_ACTIVE(2), + /** + * SERVICESTATUS_UPDATING = 3; + */ + SERVICESTATUS_UPDATING(3), + /** + * SERVICESTATUS_PENDING_REMOVAL = 4; + */ + SERVICESTATUS_PENDING_REMOVAL(4), + /** + * SERVICESTATUS_SLA_VIOLATED = 5; + */ + SERVICESTATUS_SLA_VIOLATED(5), + UNRECOGNIZED(-1); + + /** + * SERVICESTATUS_UNDEFINED = 0; + */ + public static final int SERVICESTATUS_UNDEFINED_VALUE = 0; + + /** + * SERVICESTATUS_PLANNED = 1; + */ + public static final int SERVICESTATUS_PLANNED_VALUE = 1; + + /** + * SERVICESTATUS_ACTIVE = 2; + */ + public static final int SERVICESTATUS_ACTIVE_VALUE = 2; + + /** + * SERVICESTATUS_UPDATING = 3; + */ + public static final int SERVICESTATUS_UPDATING_VALUE = 3; + + /** + * SERVICESTATUS_PENDING_REMOVAL = 4; + */ + public static final int SERVICESTATUS_PENDING_REMOVAL_VALUE = 4; + + /** + * SERVICESTATUS_SLA_VIOLATED = 5; + */ + public static final int SERVICESTATUS_SLA_VIOLATED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ServiceStatusEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ServiceStatusEnum forNumber(int value) { + switch(value) { + case 0: + return SERVICESTATUS_UNDEFINED; + case 1: + return SERVICESTATUS_PLANNED; + case 2: + return SERVICESTATUS_ACTIVE; + case 3: + return SERVICESTATUS_UPDATING; + case 4: + return SERVICESTATUS_PENDING_REMOVAL; + case 5: + return SERVICESTATUS_SLA_VIOLATED; + default: + return null; + } + } - /** - * Protobuf enum {@code context.ServiceStatusEnum} - */ - public enum ServiceStatusEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SERVICESTATUS_UNDEFINED = 0; - */ - SERVICESTATUS_UNDEFINED(0), - /** - * SERVICESTATUS_PLANNED = 1; - */ - SERVICESTATUS_PLANNED(1), - /** - * SERVICESTATUS_ACTIVE = 2; - */ - SERVICESTATUS_ACTIVE(2), - /** - * SERVICESTATUS_UPDATING = 3; - */ - SERVICESTATUS_UPDATING(3), - /** - * SERVICESTATUS_PENDING_REMOVAL = 4; - */ - SERVICESTATUS_PENDING_REMOVAL(4), - /** - * SERVICESTATUS_SLA_VIOLATED = 5; - */ - SERVICESTATUS_SLA_VIOLATED(5), - UNRECOGNIZED(-1), - ; + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - /** - * SERVICESTATUS_UNDEFINED = 0; - */ - public static final int SERVICESTATUS_UNDEFINED_VALUE = 0; - /** - * SERVICESTATUS_PLANNED = 1; - */ - public static final int SERVICESTATUS_PLANNED_VALUE = 1; - /** - * SERVICESTATUS_ACTIVE = 2; - */ - public static final int SERVICESTATUS_ACTIVE_VALUE = 2; - /** - * SERVICESTATUS_UPDATING = 3; - */ - public static final int SERVICESTATUS_UPDATING_VALUE = 3; - /** - * SERVICESTATUS_PENDING_REMOVAL = 4; - */ - public static final int SERVICESTATUS_PENDING_REMOVAL_VALUE = 4; - /** - * SERVICESTATUS_SLA_VIOLATED = 5; - */ - public static final int SERVICESTATUS_SLA_VIOLATED_VALUE = 5; + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { + + public ServiceStatusEnum findValueByNumber(int number) { + return ServiceStatusEnum.forNumber(number); + } + }; + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ServiceStatusEnum valueOf(int value) { - return forNumber(value); - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(4); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ServiceStatusEnum forNumber(int value) { - switch (value) { - case 0: return SERVICESTATUS_UNDEFINED; - case 1: return SERVICESTATUS_PLANNED; - case 2: return SERVICESTATUS_ACTIVE; - case 3: return SERVICESTATUS_UPDATING; - case 4: return SERVICESTATUS_PENDING_REMOVAL; - case 5: return SERVICESTATUS_SLA_VIOLATED; - default: return null; - } - } + private static final ServiceStatusEnum[] VALUES = values(); - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ServiceStatusEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ServiceStatusEnum findValueByNumber(int number) { - return ServiceStatusEnum.forNumber(number); + public static ServiceStatusEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ServiceStatusEnum(int value) { + this.value = value; + } + } + + /** + * Protobuf enum {@code context.SliceStatusEnum} + */ + public enum SliceStatusEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * SLICESTATUS_UNDEFINED = 0; + */ + SLICESTATUS_UNDEFINED(0), + /** + * SLICESTATUS_PLANNED = 1; + */ + SLICESTATUS_PLANNED(1), + /** + * SLICESTATUS_INIT = 2; + */ + SLICESTATUS_INIT(2), + /** + * SLICESTATUS_ACTIVE = 3; + */ + SLICESTATUS_ACTIVE(3), + /** + * SLICESTATUS_DEINIT = 4; + */ + SLICESTATUS_DEINIT(4), + /** + * SLICESTATUS_SLA_VIOLATED = 5; + */ + SLICESTATUS_SLA_VIOLATED(5), + UNRECOGNIZED(-1); + + /** + * SLICESTATUS_UNDEFINED = 0; + */ + public static final int SLICESTATUS_UNDEFINED_VALUE = 0; + + /** + * SLICESTATUS_PLANNED = 1; + */ + public static final int SLICESTATUS_PLANNED_VALUE = 1; + + /** + * SLICESTATUS_INIT = 2; + */ + public static final int SLICESTATUS_INIT_VALUE = 2; + + /** + * SLICESTATUS_ACTIVE = 3; + */ + public static final int SLICESTATUS_ACTIVE_VALUE = 3; + + /** + * SLICESTATUS_DEINIT = 4; + */ + public static final int SLICESTATUS_DEINIT_VALUE = 4; + + /** + * SLICESTATUS_SLA_VIOLATED = 5; + */ + public static final int SLICESTATUS_SLA_VIOLATED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); } - }; + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SliceStatusEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SliceStatusEnum forNumber(int value) { + switch(value) { + case 0: + return SLICESTATUS_UNDEFINED; + case 1: + return SLICESTATUS_PLANNED; + case 2: + return SLICESTATUS_INIT; + case 3: + return SLICESTATUS_ACTIVE; + case 4: + return SLICESTATUS_DEINIT; + case 5: + return SLICESTATUS_SLA_VIOLATED; + default: + return null; + } + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(4); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final ServiceStatusEnum[] VALUES = values(); - - public static ServiceStatusEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public SliceStatusEnum findValueByNumber(int number) { + return SliceStatusEnum.forNumber(number); + } + }; - private ServiceStatusEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:context.ServiceStatusEnum) - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * Protobuf enum {@code context.SliceStatusEnum} - */ - public enum SliceStatusEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SLICESTATUS_UNDEFINED = 0; - */ - SLICESTATUS_UNDEFINED(0), - /** - * SLICESTATUS_PLANNED = 1; - */ - SLICESTATUS_PLANNED(1), - /** - * SLICESTATUS_INIT = 2; - */ - SLICESTATUS_INIT(2), - /** - * SLICESTATUS_ACTIVE = 3; - */ - SLICESTATUS_ACTIVE(3), - /** - * SLICESTATUS_DEINIT = 4; - */ - SLICESTATUS_DEINIT(4), - /** - * SLICESTATUS_SLA_VIOLATED = 5; - */ - SLICESTATUS_SLA_VIOLATED(5), - UNRECOGNIZED(-1), - ; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(5); + } - /** - * SLICESTATUS_UNDEFINED = 0; - */ - public static final int SLICESTATUS_UNDEFINED_VALUE = 0; - /** - * SLICESTATUS_PLANNED = 1; - */ - public static final int SLICESTATUS_PLANNED_VALUE = 1; - /** - * SLICESTATUS_INIT = 2; - */ - public static final int SLICESTATUS_INIT_VALUE = 2; - /** - * SLICESTATUS_ACTIVE = 3; - */ - public static final int SLICESTATUS_ACTIVE_VALUE = 3; - /** - * SLICESTATUS_DEINIT = 4; - */ - public static final int SLICESTATUS_DEINIT_VALUE = 4; - /** - * SLICESTATUS_SLA_VIOLATED = 5; - */ - public static final int SLICESTATUS_SLA_VIOLATED_VALUE = 5; + private static final SliceStatusEnum[] VALUES = values(); + public static SliceStatusEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + private final int value; - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SliceStatusEnum valueOf(int value) { - return forNumber(value); + private SliceStatusEnum(int value) { + this.value = value; + } } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static SliceStatusEnum forNumber(int value) { - switch (value) { - case 0: return SLICESTATUS_UNDEFINED; - case 1: return SLICESTATUS_PLANNED; - case 2: return SLICESTATUS_INIT; - case 3: return SLICESTATUS_ACTIVE; - case 4: return SLICESTATUS_DEINIT; - case 5: return SLICESTATUS_SLA_VIOLATED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - SliceStatusEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public SliceStatusEnum findValueByNumber(int number) { - return SliceStatusEnum.forNumber(number); + *
+     * ----- Configuration -------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf enum {@code context.ConfigActionEnum} + */ + public enum ConfigActionEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * CONFIGACTION_UNDEFINED = 0; + */ + CONFIGACTION_UNDEFINED(0), + /** + * CONFIGACTION_SET = 1; + */ + CONFIGACTION_SET(1), + /** + * CONFIGACTION_DELETE = 2; + */ + CONFIGACTION_DELETE(2), + UNRECOGNIZED(-1); + + /** + * CONFIGACTION_UNDEFINED = 0; + */ + public static final int CONFIGACTION_UNDEFINED_VALUE = 0; + + /** + * CONFIGACTION_SET = 1; + */ + public static final int CONFIGACTION_SET_VALUE = 1; + + /** + * CONFIGACTION_DELETE = 2; + */ + public static final int CONFIGACTION_DELETE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConfigActionEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ConfigActionEnum forNumber(int value) { + switch(value) { + case 0: + return CONFIGACTION_UNDEFINED; + case 1: + return CONFIGACTION_SET; + case 2: + return CONFIGACTION_DELETE; + default: + return null; } - }; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(5); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final SliceStatusEnum[] VALUES = values(); - - public static SliceStatusEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public ConfigActionEnum findValueByNumber(int number) { + return ConfigActionEnum.forNumber(number); + } + }; - private SliceStatusEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:context.SliceStatusEnum) - } - - /** - *
-   * ----- Configuration -------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf enum {@code context.ConfigActionEnum} - */ - public enum ConfigActionEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * CONFIGACTION_UNDEFINED = 0; - */ - CONFIGACTION_UNDEFINED(0), - /** - * CONFIGACTION_SET = 1; - */ - CONFIGACTION_SET(1), - /** - * CONFIGACTION_DELETE = 2; - */ - CONFIGACTION_DELETE(2), - UNRECOGNIZED(-1), - ; + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * CONFIGACTION_UNDEFINED = 0; - */ - public static final int CONFIGACTION_UNDEFINED_VALUE = 0; - /** - * CONFIGACTION_SET = 1; - */ - public static final int CONFIGACTION_SET_VALUE = 1; - /** - * CONFIGACTION_DELETE = 2; - */ - public static final int CONFIGACTION_DELETE_VALUE = 2; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(6); + } + private static final ConfigActionEnum[] VALUES = values(); - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + public static ConfigActionEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ConfigActionEnum valueOf(int value) { - return forNumber(value); - } + private final int value; - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ConfigActionEnum forNumber(int value) { - switch (value) { - case 0: return CONFIGACTION_UNDEFINED; - case 1: return CONFIGACTION_SET; - case 2: return CONFIGACTION_DELETE; - default: return null; - } + private ConfigActionEnum(int value) { + this.value = value; + } } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ConfigActionEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ConfigActionEnum findValueByNumber(int number) { - return ConfigActionEnum.forNumber(number); + /** + *
+     * ----- Constraint ----------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf enum {@code context.ConstraintActionEnum} + */ + public enum ConstraintActionEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * CONSTRAINTACTION_UNDEFINED = 0; + */ + CONSTRAINTACTION_UNDEFINED(0), + /** + * CONSTRAINTACTION_SET = 1; + */ + CONSTRAINTACTION_SET(1), + /** + * CONSTRAINTACTION_DELETE = 2; + */ + CONSTRAINTACTION_DELETE(2), + UNRECOGNIZED(-1); + + /** + * CONSTRAINTACTION_UNDEFINED = 0; + */ + public static final int CONSTRAINTACTION_UNDEFINED_VALUE = 0; + + /** + * CONSTRAINTACTION_SET = 1; + */ + public static final int CONSTRAINTACTION_SET_VALUE = 1; + + /** + * CONSTRAINTACTION_DELETE = 2; + */ + public static final int CONSTRAINTACTION_DELETE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConstraintActionEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ConstraintActionEnum forNumber(int value) { + switch(value) { + case 0: + return CONSTRAINTACTION_UNDEFINED; + case 1: + return CONSTRAINTACTION_SET; + case 2: + return CONSTRAINTACTION_DELETE; + default: + return null; } - }; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(6); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final ConfigActionEnum[] VALUES = values(); - - public static ConfigActionEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public ConstraintActionEnum findValueByNumber(int number) { + return ConstraintActionEnum.forNumber(number); + } + }; - private ConfigActionEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:context.ConfigActionEnum) - } - - /** - *
-   * ----- Constraint ----------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf enum {@code context.ConstraintActionEnum} - */ - public enum ConstraintActionEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * CONSTRAINTACTION_UNDEFINED = 0; - */ - CONSTRAINTACTION_UNDEFINED(0), - /** - * CONSTRAINTACTION_SET = 1; - */ - CONSTRAINTACTION_SET(1), - /** - * CONSTRAINTACTION_DELETE = 2; - */ - CONSTRAINTACTION_DELETE(2), - UNRECOGNIZED(-1), - ; + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * CONSTRAINTACTION_UNDEFINED = 0; - */ - public static final int CONSTRAINTACTION_UNDEFINED_VALUE = 0; - /** - * CONSTRAINTACTION_SET = 1; - */ - public static final int CONSTRAINTACTION_SET_VALUE = 1; - /** - * CONSTRAINTACTION_DELETE = 2; - */ - public static final int CONSTRAINTACTION_DELETE_VALUE = 2; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(7); + } + private static final ConstraintActionEnum[] VALUES = values(); - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + public static ConstraintActionEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ConstraintActionEnum(int value) { + this.value = value; + } + } + + /** + * Protobuf enum {@code context.IsolationLevelEnum} + */ + public enum IsolationLevelEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * NO_ISOLATION = 0; + */ + NO_ISOLATION(0), + /** + * PHYSICAL_ISOLATION = 1; + */ + PHYSICAL_ISOLATION(1), + /** + * LOGICAL_ISOLATION = 2; + */ + LOGICAL_ISOLATION(2), + /** + * PROCESS_ISOLATION = 3; + */ + PROCESS_ISOLATION(3), + /** + * PHYSICAL_MEMORY_ISOLATION = 4; + */ + PHYSICAL_MEMORY_ISOLATION(4), + /** + * PHYSICAL_NETWORK_ISOLATION = 5; + */ + PHYSICAL_NETWORK_ISOLATION(5), + /** + * VIRTUAL_RESOURCE_ISOLATION = 6; + */ + VIRTUAL_RESOURCE_ISOLATION(6), + /** + * NETWORK_FUNCTIONS_ISOLATION = 7; + */ + NETWORK_FUNCTIONS_ISOLATION(7), + /** + * SERVICE_ISOLATION = 8; + */ + SERVICE_ISOLATION(8), + UNRECOGNIZED(-1); + + /** + * NO_ISOLATION = 0; + */ + public static final int NO_ISOLATION_VALUE = 0; + + /** + * PHYSICAL_ISOLATION = 1; + */ + public static final int PHYSICAL_ISOLATION_VALUE = 1; + + /** + * LOGICAL_ISOLATION = 2; + */ + public static final int LOGICAL_ISOLATION_VALUE = 2; + + /** + * PROCESS_ISOLATION = 3; + */ + public static final int PROCESS_ISOLATION_VALUE = 3; + + /** + * PHYSICAL_MEMORY_ISOLATION = 4; + */ + public static final int PHYSICAL_MEMORY_ISOLATION_VALUE = 4; + + /** + * PHYSICAL_NETWORK_ISOLATION = 5; + */ + public static final int PHYSICAL_NETWORK_ISOLATION_VALUE = 5; + + /** + * VIRTUAL_RESOURCE_ISOLATION = 6; + */ + public static final int VIRTUAL_RESOURCE_ISOLATION_VALUE = 6; + + /** + * NETWORK_FUNCTIONS_ISOLATION = 7; + */ + public static final int NETWORK_FUNCTIONS_ISOLATION_VALUE = 7; + + /** + * SERVICE_ISOLATION = 8; + */ + public static final int SERVICE_ISOLATION_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IsolationLevelEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static IsolationLevelEnum forNumber(int value) { + switch(value) { + case 0: + return NO_ISOLATION; + case 1: + return PHYSICAL_ISOLATION; + case 2: + return LOGICAL_ISOLATION; + case 3: + return PROCESS_ISOLATION; + case 4: + return PHYSICAL_MEMORY_ISOLATION; + case 5: + return PHYSICAL_NETWORK_ISOLATION; + case 6: + return VIRTUAL_RESOURCE_ISOLATION; + case 7: + return NETWORK_FUNCTIONS_ISOLATION; + case 8: + return SERVICE_ISOLATION; + default: + return null; + } + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ConstraintActionEnum valueOf(int value) { - return forNumber(value); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ConstraintActionEnum forNumber(int value) { - switch (value) { - case 0: return CONSTRAINTACTION_UNDEFINED; - case 1: return CONSTRAINTACTION_SET; - case 2: return CONSTRAINTACTION_DELETE; - default: return null; - } - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ConstraintActionEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ConstraintActionEnum findValueByNumber(int number) { - return ConstraintActionEnum.forNumber(number); + public IsolationLevelEnum findValueByNumber(int number) { + return IsolationLevelEnum.forNumber(number); } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(7); - } - - private static final ConstraintActionEnum[] VALUES = values(); - - public static ConstraintActionEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + }; - private final int value; + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - private ConstraintActionEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - // @@protoc_insertion_point(enum_scope:context.ConstraintActionEnum) - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(8); + } - /** - * Protobuf enum {@code context.IsolationLevelEnum} - */ - public enum IsolationLevelEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * NO_ISOLATION = 0; - */ - NO_ISOLATION(0), - /** - * PHYSICAL_ISOLATION = 1; - */ - PHYSICAL_ISOLATION(1), - /** - * LOGICAL_ISOLATION = 2; - */ - LOGICAL_ISOLATION(2), - /** - * PROCESS_ISOLATION = 3; - */ - PROCESS_ISOLATION(3), - /** - * PHYSICAL_MEMORY_ISOLATION = 4; - */ - PHYSICAL_MEMORY_ISOLATION(4), - /** - * PHYSICAL_NETWORK_ISOLATION = 5; - */ - PHYSICAL_NETWORK_ISOLATION(5), - /** - * VIRTUAL_RESOURCE_ISOLATION = 6; - */ - VIRTUAL_RESOURCE_ISOLATION(6), - /** - * NETWORK_FUNCTIONS_ISOLATION = 7; - */ - NETWORK_FUNCTIONS_ISOLATION(7), - /** - * SERVICE_ISOLATION = 8; - */ - SERVICE_ISOLATION(8), - UNRECOGNIZED(-1), - ; + private static final IsolationLevelEnum[] VALUES = values(); - /** - * NO_ISOLATION = 0; - */ - public static final int NO_ISOLATION_VALUE = 0; - /** - * PHYSICAL_ISOLATION = 1; - */ - public static final int PHYSICAL_ISOLATION_VALUE = 1; - /** - * LOGICAL_ISOLATION = 2; - */ - public static final int LOGICAL_ISOLATION_VALUE = 2; - /** - * PROCESS_ISOLATION = 3; - */ - public static final int PROCESS_ISOLATION_VALUE = 3; - /** - * PHYSICAL_MEMORY_ISOLATION = 4; - */ - public static final int PHYSICAL_MEMORY_ISOLATION_VALUE = 4; - /** - * PHYSICAL_NETWORK_ISOLATION = 5; - */ - public static final int PHYSICAL_NETWORK_ISOLATION_VALUE = 5; - /** - * VIRTUAL_RESOURCE_ISOLATION = 6; - */ - public static final int VIRTUAL_RESOURCE_ISOLATION_VALUE = 6; - /** - * NETWORK_FUNCTIONS_ISOLATION = 7; - */ - public static final int NETWORK_FUNCTIONS_ISOLATION_VALUE = 7; - /** - * SERVICE_ISOLATION = 8; - */ - public static final int SERVICE_ISOLATION_VALUE = 8; + public static IsolationLevelEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + private final int value; - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; + private IsolationLevelEnum(int value) { + this.value = value; + } } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static IsolationLevelEnum valueOf(int value) { - return forNumber(value); + public interface EmptyOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Empty) + com.google.protobuf.MessageOrBuilder { } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + *
+     * ----- Generic -------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.Empty} */ - public static IsolationLevelEnum forNumber(int value) { - switch (value) { - case 0: return NO_ISOLATION; - case 1: return PHYSICAL_ISOLATION; - case 2: return LOGICAL_ISOLATION; - case 3: return PROCESS_ISOLATION; - case 4: return PHYSICAL_MEMORY_ISOLATION; - case 5: return PHYSICAL_NETWORK_ISOLATION; - case 6: return VIRTUAL_RESOURCE_ISOLATION; - case 7: return NETWORK_FUNCTIONS_ISOLATION; - case 8: return SERVICE_ISOLATION; - default: return null; - } - } + public static final class Empty extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Empty) + EmptyOrBuilder { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - IsolationLevelEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public IsolationLevelEnum findValueByNumber(int number) { - return IsolationLevelEnum.forNumber(number); - } - }; + private static final long serialVersionUID = 0L; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(8); - } + // Use Empty.newBuilder() to construct. + private Empty(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final IsolationLevelEnum[] VALUES = values(); - - public static IsolationLevelEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private Empty() { + } - private final int value; + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Empty(); + } - private IsolationLevelEnum(int value) { - this.value = value; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - // @@protoc_insertion_point(enum_scope:context.IsolationLevelEnum) - } - - public interface EmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Empty) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * ----- Generic -------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.Empty} - */ - public static final class Empty extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Empty) - EmptyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Empty.newBuilder() to construct. - private Empty(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Empty() { - } + 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(); + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Empty(); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Empty_descriptor; + } - @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; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Empty_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Empty.class, context.ContextOuterClass.Empty.Builder.class); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Empty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Empty.class, context.ContextOuterClass.Empty.Builder.class); - } + private byte memoizedIsInitialized = -1; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Empty)) { + return super.equals(obj); + } + context.ContextOuterClass.Empty other = (context.ContextOuterClass.Empty) obj; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Empty)) { - return super.equals(obj); - } - context.ContextOuterClass.Empty other = (context.ContextOuterClass.Empty) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.Empty parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.Empty parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.Empty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Empty parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Empty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Empty parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Empty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Empty parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Empty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Empty parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Empty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Empty parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Empty parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Empty parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.Empty parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Empty prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.Empty parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Generic -------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.Empty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Empty) - context.ContextOuterClass.EmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Empty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Empty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Empty.class, context.ContextOuterClass.Empty.Builder.class); - } - - // 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 - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Empty_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Empty getDefaultInstanceForType() { - return context.ContextOuterClass.Empty.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Empty build() { - context.ContextOuterClass.Empty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.Empty buildPartial() { - context.ContextOuterClass.Empty result = new context.ContextOuterClass.Empty(this); - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Empty) { - return mergeFrom((context.ContextOuterClass.Empty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Empty other) { - if (other == context.ContextOuterClass.Empty.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Empty) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Empty) - } + public static context.ContextOuterClass.Empty parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(class_scope:context.Empty) - private static final context.ContextOuterClass.Empty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Empty(); - } + public static context.ContextOuterClass.Empty parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.Empty getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Empty parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.Empty parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.Empty parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public context.ContextOuterClass.Empty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Empty parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - } + public static context.ContextOuterClass.Empty parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public interface UuidOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Uuid) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.Empty parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - /** - * string uuid = 1; - * @return The uuid. - */ - java.lang.String getUuid(); - /** - * string uuid = 1; - * @return The bytes for uuid. - */ - com.google.protobuf.ByteString - getUuidBytes(); - } - /** - * Protobuf type {@code context.Uuid} - */ - public static final class Uuid extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Uuid) - UuidOrBuilder { - private static final long serialVersionUID = 0L; - // Use Uuid.newBuilder() to construct. - private Uuid(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Uuid() { - uuid_ = ""; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Uuid(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @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; - } + public static Builder newBuilder(context.ContextOuterClass.Empty prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Uuid_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Uuid.class, context.ContextOuterClass.Uuid.Builder.class); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static final int UUID_FIELD_NUMBER = 1; - private volatile java.lang.Object uuid_; - /** - * string uuid = 1; - * @return The uuid. - */ - @java.lang.Override - public java.lang.String getUuid() { - java.lang.Object ref = uuid_; - 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(); - uuid_ = s; - return s; - } - } - /** - * string uuid = 1; - * @return The bytes for uuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUuidBytes() { - java.lang.Object ref = uuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + *
+         * ----- Generic -------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.Empty} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Empty) + context.ContextOuterClass.EmptyOrBuilder { - memoizedIsInitialized = 1; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Empty_descriptor; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getUuidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uuid_); - } - unknownFields.writeTo(output); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Empty_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Empty.class, context.ContextOuterClass.Empty.Builder.class); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getUuidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uuid_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + // Construct using context.ContextOuterClass.Empty.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Uuid)) { - return super.equals(obj); - } - context.ContextOuterClass.Uuid other = (context.ContextOuterClass.Uuid) obj; - - if (!getUuid() - .equals(other.getUuid())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + UUID_FIELD_NUMBER; - hash = (53 * hash) + getUuid().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - public static context.ContextOuterClass.Uuid parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Uuid parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Uuid parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Uuid parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Uuid parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Uuid parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Uuid parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Uuid parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Uuid parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Uuid parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Uuid parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Uuid parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Uuid prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Empty_descriptor; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Uuid} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Uuid) - context.ContextOuterClass.UuidOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Uuid_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Uuid_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Uuid.class, context.ContextOuterClass.Uuid.Builder.class); - } - - // 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(); - uuid_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Uuid_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Uuid getDefaultInstanceForType() { - return context.ContextOuterClass.Uuid.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Uuid build() { - context.ContextOuterClass.Uuid result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.Uuid buildPartial() { - context.ContextOuterClass.Uuid result = new context.ContextOuterClass.Uuid(this); - result.uuid_ = uuid_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Uuid) { - return mergeFrom((context.ContextOuterClass.Uuid)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Uuid other) { - if (other == context.ContextOuterClass.Uuid.getDefaultInstance()) return this; - if (!other.getUuid().isEmpty()) { - uuid_ = other.uuid_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Uuid) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uuid_ = ""; - /** - * string uuid = 1; - * @return The uuid. - */ - public java.lang.String getUuid() { - java.lang.Object ref = uuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string uuid = 1; - * @return The bytes for uuid. - */ - public com.google.protobuf.ByteString - getUuidBytes() { - java.lang.Object ref = uuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string uuid = 1; - * @param value The uuid to set. - * @return This builder for chaining. - */ - public Builder setUuid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uuid_ = value; - onChanged(); - return this; - } - /** - * string uuid = 1; - * @return This builder for chaining. - */ - public Builder clearUuid() { - - uuid_ = getDefaultInstance().getUuid(); - onChanged(); - return this; - } - /** - * string uuid = 1; - * @param value The bytes for uuid to set. - * @return This builder for chaining. - */ - public Builder setUuidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uuid_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Uuid) - } + @java.lang.Override + public context.ContextOuterClass.Empty getDefaultInstanceForType() { + return context.ContextOuterClass.Empty.getDefaultInstance(); + } - // @@protoc_insertion_point(class_scope:context.Uuid) - private static final context.ContextOuterClass.Uuid DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Uuid(); - } + @java.lang.Override + public context.ContextOuterClass.Empty build() { + context.ContextOuterClass.Empty result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static context.ContextOuterClass.Uuid getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public context.ContextOuterClass.Empty buildPartial() { + context.ContextOuterClass.Empty result = new context.ContextOuterClass.Empty(this); + onBuilt(); + return result; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @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 context.ContextOuterClass.Uuid getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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); + } - public interface TimestampOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Timestamp) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - /** - * double timestamp = 1; - * @return The timestamp. - */ - double getTimestamp(); - } - /** - * Protobuf type {@code context.Timestamp} - */ - public static final class Timestamp extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Timestamp) - TimestampOrBuilder { - private static final long serialVersionUID = 0L; - // Use Timestamp.newBuilder() to construct. - private Timestamp(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Timestamp() { - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Timestamp(); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Empty) { + return mergeFrom((context.ContextOuterClass.Empty) other); + } else { + super.mergeFrom(other); + return this; + } + } - @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; - } + public Builder mergeFrom(context.ContextOuterClass.Empty other) { + if (other == context.ContextOuterClass.Empty.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Timestamp_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Timestamp.class, context.ContextOuterClass.Timestamp.Builder.class); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static final int TIMESTAMP_FIELD_NUMBER = 1; - private double timestamp_; - /** - * double timestamp = 1; - * @return The timestamp. - */ - @java.lang.Override - public double getTimestamp() { - return timestamp_; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Empty) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Empty) + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (timestamp_ != 0D) { - output.writeDouble(1, timestamp_); - } - unknownFields.writeTo(output); - } + // @@protoc_insertion_point(class_scope:context.Empty) + private static final context.ContextOuterClass.Empty DEFAULT_INSTANCE; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (timestamp_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, timestamp_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Empty(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Timestamp)) { - return super.equals(obj); - } - 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)) return false; - return true; - } + public static context.ContextOuterClass.Empty getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - 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(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static context.ContextOuterClass.Timestamp parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Timestamp parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Timestamp parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Timestamp parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Timestamp parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Timestamp parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Timestamp parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Timestamp parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Timestamp parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Timestamp parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Timestamp parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Timestamp parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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); + } + }; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Timestamp prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Empty getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public interface UuidOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Uuid) + com.google.protobuf.MessageOrBuilder { + + /** + * string uuid = 1; + * @return The uuid. + */ + java.lang.String getUuid(); + + /** + * string uuid = 1; + * @return The bytes for uuid. + */ + com.google.protobuf.ByteString getUuidBytes(); } + /** - * Protobuf type {@code context.Timestamp} + * Protobuf type {@code context.Uuid} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Timestamp) - context.ContextOuterClass.TimestampOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Timestamp_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Timestamp_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Timestamp.class, context.ContextOuterClass.Timestamp.Builder.class); - } - - // 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(); - timestamp_ = 0D; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Timestamp_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Timestamp getDefaultInstanceForType() { - return context.ContextOuterClass.Timestamp.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Timestamp build() { - context.ContextOuterClass.Timestamp result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.Timestamp buildPartial() { - context.ContextOuterClass.Timestamp result = new context.ContextOuterClass.Timestamp(this); - result.timestamp_ = timestamp_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Timestamp) { - return mergeFrom((context.ContextOuterClass.Timestamp)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Timestamp other) { - if (other == context.ContextOuterClass.Timestamp.getDefaultInstance()) return this; - if (other.getTimestamp() != 0D) { - setTimestamp(other.getTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Timestamp) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double timestamp_ ; - /** - * double timestamp = 1; - * @return The timestamp. - */ - @java.lang.Override - public double getTimestamp() { - return timestamp_; - } - /** - * double timestamp = 1; - * @param value The timestamp to set. - * @return This builder for chaining. - */ - public Builder setTimestamp(double value) { - - timestamp_ = value; - onChanged(); - return this; - } - /** - * double timestamp = 1; - * @return This builder for chaining. - */ - public Builder clearTimestamp() { - - timestamp_ = 0D; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Timestamp) - } + public static final class Uuid extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Uuid) + UuidOrBuilder { - // @@protoc_insertion_point(class_scope:context.Timestamp) - private static final context.ContextOuterClass.Timestamp DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Timestamp(); - } + private static final long serialVersionUID = 0L; - public static context.ContextOuterClass.Timestamp getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Use Uuid.newBuilder() to construct. + private Uuid(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private Uuid() { + uuid_ = ""; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Uuid(); + } - @java.lang.Override - public context.ContextOuterClass.Timestamp getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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 interface EventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Event) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Uuid_descriptor; + } - /** - * .context.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 1; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 1; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Uuid_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Uuid.class, context.ContextOuterClass.Uuid.Builder.class); + } - /** - * .context.EventTypeEnum event_type = 2; - * @return The enum numeric value on the wire for eventType. - */ - int getEventTypeValue(); - /** - * .context.EventTypeEnum event_type = 2; - * @return The eventType. - */ - context.ContextOuterClass.EventTypeEnum getEventType(); - } - /** - * Protobuf type {@code context.Event} - */ - public static final class Event extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Event) - EventOrBuilder { - private static final long serialVersionUID = 0L; - // Use Event.newBuilder() to construct. - private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Event() { - eventType_ = 0; - } + public static final int UUID_FIELD_NUMBER = 1; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Event(); - } + private volatile java.lang.Object uuid_; - @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; - } + /** + * string uuid = 1; + * @return The uuid. + */ + @java.lang.Override + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + 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(); + uuid_ = s; + return s; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Event_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Event.class, context.ContextOuterClass.Event.Builder.class); - } + /** + * string uuid = 1; + * @return The bytes for uuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static final int TIMESTAMP_FIELD_NUMBER = 1; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 1; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .context.Timestamp timestamp = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } + private byte memoizedIsInitialized = -1; - public static final int EVENT_TYPE_FIELD_NUMBER = 2; - private int eventType_; - /** - * .context.EventTypeEnum event_type = 2; - * @return The enum numeric value on the wire for eventType. - */ - @java.lang.Override public int getEventTypeValue() { - return eventType_; - } - /** - * .context.EventTypeEnum event_type = 2; - * @return The eventType. - */ - @java.lang.Override public context.ContextOuterClass.EventTypeEnum getEventType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.valueOf(eventType_); - return result == null ? context.ContextOuterClass.EventTypeEnum.UNRECOGNIZED : result; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getUuidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uuid_); + } + unknownFields.writeTo(output); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getUuidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uuid_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (timestamp_ != null) { - output.writeMessage(1, getTimestamp()); - } - if (eventType_ != context.ContextOuterClass.EventTypeEnum.EVENTTYPE_UNDEFINED.getNumber()) { - output.writeEnum(2, eventType_); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Uuid)) { + return super.equals(obj); + } + context.ContextOuterClass.Uuid other = (context.ContextOuterClass.Uuid) obj; + if (!getUuid().equals(other.getUuid())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuid().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTimestamp()); - } - if (eventType_ != context.ContextOuterClass.EventTypeEnum.EVENTTYPE_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, eventType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.Uuid parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Event)) { - return super.equals(obj); - } - context.ContextOuterClass.Event other = (context.ContextOuterClass.Event) obj; - - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (eventType_ != other.eventType_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.Uuid parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - hash = (37 * hash) + EVENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + eventType_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.Uuid parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static context.ContextOuterClass.Event parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Event parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Event parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Event parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Event parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Event parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Event parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Event parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Event parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Event parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Event parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Event parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.Uuid parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Event prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.Uuid parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Event} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Event) - context.ContextOuterClass.EventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Event_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Event_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Event.class, context.ContextOuterClass.Event.Builder.class); - } - - // 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; - timestampBuilder_ = null; - } - eventType_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Event_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Event getDefaultInstanceForType() { - return context.ContextOuterClass.Event.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Event build() { - context.ContextOuterClass.Event result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Event) { - return mergeFrom((context.ContextOuterClass.Event)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Event other) { - if (other == context.ContextOuterClass.Event.getDefaultInstance()) return this; - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - if (other.eventType_ != 0) { - setEventTypeValue(other.getEventTypeValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Event) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; - /** - * .context.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 1; - * @return The timestamp. - */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .context.Timestamp timestamp = 1; - */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - * .context.Timestamp timestamp = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - - private int eventType_ = 0; - /** - * .context.EventTypeEnum event_type = 2; - * @return The enum numeric value on the wire for eventType. - */ - @java.lang.Override public int getEventTypeValue() { - return eventType_; - } - /** - * .context.EventTypeEnum event_type = 2; - * @param value The enum numeric value on the wire for eventType to set. - * @return This builder for chaining. - */ - public Builder setEventTypeValue(int value) { - - eventType_ = value; - onChanged(); - return this; - } - /** - * .context.EventTypeEnum event_type = 2; - * @return The eventType. - */ - @java.lang.Override - public context.ContextOuterClass.EventTypeEnum getEventType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.valueOf(eventType_); - return result == null ? context.ContextOuterClass.EventTypeEnum.UNRECOGNIZED : result; - } - /** - * .context.EventTypeEnum event_type = 2; - * @param value The eventType to set. - * @return This builder for chaining. - */ - public Builder setEventType(context.ContextOuterClass.EventTypeEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - eventType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.EventTypeEnum event_type = 2; - * @return This builder for chaining. - */ - public Builder clearEventType() { - - eventType_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Event) - } + public static context.ContextOuterClass.Uuid parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:context.Event) - private static final context.ContextOuterClass.Event DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Event(); - } + public static context.ContextOuterClass.Uuid parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static context.ContextOuterClass.Event getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Uuid parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.Uuid parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.Uuid parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public context.ContextOuterClass.Event getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Uuid parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - } + public static context.ContextOuterClass.Uuid parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public interface ContextIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ContextId) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - /** - * .context.Uuid context_uuid = 1; - * @return Whether the contextUuid field is set. - */ - boolean hasContextUuid(); - /** - * .context.Uuid context_uuid = 1; - * @return The contextUuid. - */ - context.ContextOuterClass.Uuid getContextUuid(); - /** - * .context.Uuid context_uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder(); - } - /** - *
-   * ----- Context -------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.ContextId} - */ - public static final class ContextId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ContextId) - ContextIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use ContextId.newBuilder() to construct. - private ContextId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ContextId() { - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ContextId(); - } + public static Builder newBuilder(context.ContextOuterClass.Uuid prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @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; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextId.class, context.ContextOuterClass.ContextId.Builder.class); - } - - public static final int CONTEXT_UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid contextUuid_; - /** - * .context.Uuid context_uuid = 1; - * @return Whether the contextUuid field is set. - */ - @java.lang.Override - public boolean hasContextUuid() { - return contextUuid_ != null; - } - /** - * .context.Uuid context_uuid = 1; - * @return The contextUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getContextUuid() { - return contextUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; - } - /** - * .context.Uuid context_uuid = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder() { - return getContextUuid(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - memoizedIsInitialized = 1; - return true; - } + /** + * Protobuf type {@code context.Uuid} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Uuid) + context.ContextOuterClass.UuidOrBuilder { - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextUuid_ != null) { - output.writeMessage(1, getContextUuid()); - } - unknownFields.writeTo(output); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Uuid_descriptor; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Uuid_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Uuid.class, context.ContextOuterClass.Uuid.Builder.class); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ContextId)) { - return super.equals(obj); - } - context.ContextOuterClass.ContextId other = (context.ContextOuterClass.ContextId) obj; - - if (hasContextUuid() != other.hasContextUuid()) return false; - if (hasContextUuid()) { - if (!getContextUuid() - .equals(other.getContextUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + // Construct using context.ContextOuterClass.Uuid.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextUuid()) { - hash = (37 * hash) + CONTEXT_UUID_FIELD_NUMBER; - hash = (53 * hash) + getContextUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public static context.ContextOuterClass.ContextId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ContextId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder clear() { + super.clear(); + uuid_ = ""; + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Context -------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.ContextId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ContextId) - context.ContextOuterClass.ContextIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ContextId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextId.class, context.ContextOuterClass.ContextId.Builder.class); - } - - // 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; - contextUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ContextId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ContextId getDefaultInstanceForType() { - return context.ContextOuterClass.ContextId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ContextId build() { - context.ContextOuterClass.ContextId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ContextId) { - return mergeFrom((context.ContextOuterClass.ContextId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ContextId other) { - if (other == context.ContextOuterClass.ContextId.getDefaultInstance()) return this; - if (other.hasContextUuid()) { - mergeContextUuid(other.getContextUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid contextUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> contextUuidBuilder_; - /** - * .context.Uuid context_uuid = 1; - * @return Whether the contextUuid field is set. - */ - public boolean hasContextUuid() { - return contextUuidBuilder_ != null || contextUuid_ != null; - } - /** - * .context.Uuid context_uuid = 1; - * @return The contextUuid. - */ - public context.ContextOuterClass.Uuid getContextUuid() { - if (contextUuidBuilder_ == null) { - return contextUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; - } else { - return contextUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid context_uuid = 1; - */ - public Builder setContextUuid(context.ContextOuterClass.Uuid value) { - if (contextUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextUuid_ = value; - onChanged(); - } else { - contextUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid context_uuid = 1; - */ - public Builder setContextUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (contextUuidBuilder_ == null) { - contextUuid_ = builderForValue.build(); - onChanged(); - } else { - contextUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid context_uuid = 1; - */ - public Builder mergeContextUuid(context.ContextOuterClass.Uuid value) { - if (contextUuidBuilder_ == null) { - if (contextUuid_ != null) { - contextUuid_ = - context.ContextOuterClass.Uuid.newBuilder(contextUuid_).mergeFrom(value).buildPartial(); - } else { - contextUuid_ = value; - } - onChanged(); - } else { - contextUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid context_uuid = 1; - */ - public Builder clearContextUuid() { - if (contextUuidBuilder_ == null) { - contextUuid_ = null; - onChanged(); - } else { - contextUuid_ = null; - contextUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid context_uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getContextUuidBuilder() { - - onChanged(); - return getContextUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid context_uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder() { - if (contextUuidBuilder_ != null) { - return contextUuidBuilder_.getMessageOrBuilder(); - } else { - return contextUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; - } - } - /** - * .context.Uuid context_uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getContextUuidFieldBuilder() { - if (contextUuidBuilder_ == null) { - contextUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getContextUuid(), - getParentForChildren(), - isClean()); - contextUuid_ = null; - } - return contextUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ContextId) - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Uuid_descriptor; + } - // @@protoc_insertion_point(class_scope:context.ContextId) - private static final context.ContextOuterClass.ContextId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ContextId(); - } + @java.lang.Override + public context.ContextOuterClass.Uuid getDefaultInstanceForType() { + return context.ContextOuterClass.Uuid.getDefaultInstance(); + } - public static context.ContextOuterClass.ContextId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public context.ContextOuterClass.Uuid build() { + context.ContextOuterClass.Uuid result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public context.ContextOuterClass.Uuid buildPartial() { + context.ContextOuterClass.Uuid result = new context.ContextOuterClass.Uuid(this); + result.uuid_ = uuid_; + onBuilt(); + return result; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public context.ContextOuterClass.ContextId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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); + } - public interface ContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Context) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - java.util.List - getTopologyIdsList(); - /** - * repeated .context.TopologyId topology_ids = 3; - */ - context.ContextOuterClass.TopologyId getTopologyIds(int index); - /** - * repeated .context.TopologyId topology_ids = 3; - */ - int getTopologyIdsCount(); - /** - * repeated .context.TopologyId topology_ids = 3; - */ - java.util.List - getTopologyIdsOrBuilderList(); - /** - * repeated .context.TopologyId topology_ids = 3; - */ - context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder( - int index); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Uuid) { + return mergeFrom((context.ContextOuterClass.Uuid) other); + } else { + super.mergeFrom(other); + return this; + } + } - /** - * repeated .context.ServiceId service_ids = 4; - */ - java.util.List - getServiceIdsList(); - /** - * repeated .context.ServiceId service_ids = 4; - */ - context.ContextOuterClass.ServiceId getServiceIds(int index); - /** - * repeated .context.ServiceId service_ids = 4; - */ - int getServiceIdsCount(); - /** - * repeated .context.ServiceId service_ids = 4; - */ - java.util.List - getServiceIdsOrBuilderList(); - /** - * repeated .context.ServiceId service_ids = 4; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder( - int index); + public Builder mergeFrom(context.ContextOuterClass.Uuid other) { + if (other == context.ContextOuterClass.Uuid.getDefaultInstance()) + return this; + if (!other.getUuid().isEmpty()) { + uuid_ = other.uuid_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - /** - * repeated .context.SliceId slice_ids = 5; - */ - java.util.List - getSliceIdsList(); - /** - * repeated .context.SliceId slice_ids = 5; - */ - context.ContextOuterClass.SliceId getSliceIds(int index); - /** - * repeated .context.SliceId slice_ids = 5; - */ - int getSliceIdsCount(); - /** - * repeated .context.SliceId slice_ids = 5; - */ - java.util.List - getSliceIdsOrBuilderList(); - /** - * repeated .context.SliceId slice_ids = 5; - */ - context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder( - int index); + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * .context.TeraFlowController controller = 6; - * @return Whether the controller field is set. - */ - boolean hasController(); - /** - * .context.TeraFlowController controller = 6; - * @return The controller. - */ - context.ContextOuterClass.TeraFlowController getController(); - /** - * .context.TeraFlowController controller = 6; - */ - context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder(); - } - /** - * Protobuf type {@code context.Context} - */ - public static final class Context extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Context) - ContextOrBuilder { - private static final long serialVersionUID = 0L; - // Use Context.newBuilder() to construct. - private Context(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Context() { - name_ = ""; - topologyIds_ = java.util.Collections.emptyList(); - serviceIds_ = java.util.Collections.emptyList(); - sliceIds_ = java.util.Collections.emptyList(); - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Uuid) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Context(); - } + private java.lang.Object uuid_ = ""; + + /** + * string uuid = 1; + * @return The uuid. + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @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(); - 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(); - 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(); - 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; - } + /** + * string uuid = 1; + * @return The bytes for uuid. + */ + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Context_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Context.class, context.ContextOuterClass.Context.Builder.class); - } + /** + * string uuid = 1; + * @param value The uuid to set. + * @return This builder for chaining. + */ + public Builder setUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uuid_ = value; + onChanged(); + return this; + } - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - /** - * .context.ContextId context_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + /** + * string uuid = 1; + * @return This builder for chaining. + */ + public Builder clearUuid() { + uuid_ = getDefaultInstance().getUuid(); + onChanged(); + return this; + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * string uuid = 1; + * @param value The bytes for uuid to set. + * @return This builder for chaining. + */ + public Builder setUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uuid_ = value; + onChanged(); + return this; + } - public static final int TOPOLOGY_IDS_FIELD_NUMBER = 3; - private java.util.List topologyIds_; - /** - * repeated .context.TopologyId topology_ids = 3; - */ - @java.lang.Override - public java.util.List getTopologyIdsList() { - return topologyIds_; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - @java.lang.Override - public java.util.List - getTopologyIdsOrBuilderList() { - return topologyIds_; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - @java.lang.Override - public int getTopologyIdsCount() { - return topologyIds_.size(); - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyId getTopologyIds(int index) { - return topologyIds_.get(index); - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder( - int index) { - return topologyIds_.get(index); - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public static final int SERVICE_IDS_FIELD_NUMBER = 4; - private java.util.List serviceIds_; - /** - * repeated .context.ServiceId service_ids = 4; - */ - @java.lang.Override - public java.util.List getServiceIdsList() { - return serviceIds_; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - @java.lang.Override - public java.util.List - getServiceIdsOrBuilderList() { - return serviceIds_; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - @java.lang.Override - public int getServiceIdsCount() { - return serviceIds_.size(); - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceIds(int index) { - return serviceIds_.get(index); - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder( - int index) { - return serviceIds_.get(index); - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Uuid) + } - public static final int SLICE_IDS_FIELD_NUMBER = 5; - private java.util.List sliceIds_; - /** - * repeated .context.SliceId slice_ids = 5; - */ - @java.lang.Override - public java.util.List getSliceIdsList() { - return sliceIds_; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - @java.lang.Override - public java.util.List - getSliceIdsOrBuilderList() { - return sliceIds_; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - @java.lang.Override - public int getSliceIdsCount() { - return sliceIds_.size(); - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - @java.lang.Override - public context.ContextOuterClass.SliceId getSliceIds(int index) { - return sliceIds_.get(index); - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder( - int index) { - return sliceIds_.get(index); - } + // @@protoc_insertion_point(class_scope:context.Uuid) + private static final context.ContextOuterClass.Uuid DEFAULT_INSTANCE; - public static final int CONTROLLER_FIELD_NUMBER = 6; - private context.ContextOuterClass.TeraFlowController controller_; - /** - * .context.TeraFlowController controller = 6; - * @return Whether the controller field is set. - */ - @java.lang.Override - public boolean hasController() { - return controller_ != null; - } - /** - * .context.TeraFlowController controller = 6; - * @return The controller. - */ - @java.lang.Override - public context.ContextOuterClass.TeraFlowController getController() { - return controller_ == null ? context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; - } - /** - * .context.TeraFlowController controller = 6; - */ - @java.lang.Override - public context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder() { - return getController(); - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Uuid(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.Uuid getDefaultInstance() { + return DEFAULT_INSTANCE; + } - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - for (int i = 0; i < topologyIds_.size(); i++) { - output.writeMessage(3, topologyIds_.get(i)); - } - for (int i = 0; i < serviceIds_.size(); i++) { - output.writeMessage(4, serviceIds_.get(i)); - } - for (int i = 0; i < sliceIds_.size(); i++) { - output.writeMessage(5, sliceIds_.get(i)); - } - if (controller_ != null) { - output.writeMessage(6, getController()); - } - unknownFields.writeTo(output); - } + @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); + } + }; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - for (int i = 0; i < topologyIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, topologyIds_.get(i)); - } - for (int i = 0; i < serviceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, serviceIds_.get(i)); - } - for (int i = 0; i < sliceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, sliceIds_.get(i)); - } - if (controller_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getController()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Context)) { - return super.equals(obj); - } - context.ContextOuterClass.Context other = (context.ContextOuterClass.Context) obj; - - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getTopologyIdsList() - .equals(other.getTopologyIdsList())) return false; - if (!getServiceIdsList() - .equals(other.getServiceIdsList())) return false; - if (!getSliceIdsList() - .equals(other.getSliceIdsList())) return false; - if (hasController() != other.hasController()) return false; - if (hasController()) { - if (!getController() - .equals(other.getController())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getTopologyIdsCount() > 0) { - hash = (37 * hash) + TOPOLOGY_IDS_FIELD_NUMBER; - hash = (53 * hash) + getTopologyIdsList().hashCode(); - } - if (getServiceIdsCount() > 0) { - hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getServiceIdsList().hashCode(); - } - if (getSliceIdsCount() > 0) { - hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSliceIdsList().hashCode(); - } - if (hasController()) { - hash = (37 * hash) + CONTROLLER_FIELD_NUMBER; - hash = (53 * hash) + getController().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + @java.lang.Override + public context.ContextOuterClass.Uuid getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static context.ContextOuterClass.Context parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Context parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Context parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Context parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Context parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Context parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Context parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Context parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Context parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Context parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Context parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Context parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public interface TimestampOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Timestamp) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Context prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * double timestamp = 1; + * @return The timestamp. + */ + double getTimestamp(); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** - * Protobuf type {@code context.Context} + * Protobuf type {@code context.Timestamp} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Context) - context.ContextOuterClass.ContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Context_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Context_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Context.class, context.ContextOuterClass.Context.Builder.class); - } - - // 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; - contextIdBuilder_ = null; - } - name_ = ""; - - if (topologyIdsBuilder_ == null) { - topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - topologyIdsBuilder_.clear(); - } - if (serviceIdsBuilder_ == null) { - serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - serviceIdsBuilder_.clear(); - } - if (sliceIdsBuilder_ == null) { - sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - sliceIdsBuilder_.clear(); - } - if (controllerBuilder_ == null) { - controller_ = null; - } else { - controller_ = null; - controllerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Context_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Context getDefaultInstanceForType() { - return context.ContextOuterClass.Context.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Context build() { - context.ContextOuterClass.Context result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - if (topologyIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.topologyIds_ = topologyIds_; - } else { - result.topologyIds_ = topologyIdsBuilder_.build(); - } - if (serviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.serviceIds_ = serviceIds_; - } else { - result.serviceIds_ = serviceIdsBuilder_.build(); - } - if (sliceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); - bitField0_ = (bitField0_ & ~0x00000004); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Context) { - return mergeFrom((context.ContextOuterClass.Context)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Context other) { - if (other == context.ContextOuterClass.Context.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (topologyIdsBuilder_ == null) { - if (!other.topologyIds_.isEmpty()) { - if (topologyIds_.isEmpty()) { - topologyIds_ = other.topologyIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTopologyIdsIsMutable(); - topologyIds_.addAll(other.topologyIds_); - } - onChanged(); - } - } else { - if (!other.topologyIds_.isEmpty()) { - if (topologyIdsBuilder_.isEmpty()) { - topologyIdsBuilder_.dispose(); - topologyIdsBuilder_ = null; - topologyIds_ = other.topologyIds_; - bitField0_ = (bitField0_ & ~0x00000001); - topologyIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTopologyIdsFieldBuilder() : null; - } else { - topologyIdsBuilder_.addAllMessages(other.topologyIds_); - } - } - } - if (serviceIdsBuilder_ == null) { - if (!other.serviceIds_.isEmpty()) { - if (serviceIds_.isEmpty()) { - serviceIds_ = other.serviceIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureServiceIdsIsMutable(); - serviceIds_.addAll(other.serviceIds_); - } - onChanged(); - } - } else { - if (!other.serviceIds_.isEmpty()) { - if (serviceIdsBuilder_.isEmpty()) { - serviceIdsBuilder_.dispose(); - serviceIdsBuilder_ = null; - serviceIds_ = other.serviceIds_; - bitField0_ = (bitField0_ & ~0x00000002); - serviceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getServiceIdsFieldBuilder() : null; - } else { - serviceIdsBuilder_.addAllMessages(other.serviceIds_); - } - } - } - if (sliceIdsBuilder_ == null) { - if (!other.sliceIds_.isEmpty()) { - if (sliceIds_.isEmpty()) { - sliceIds_ = other.sliceIds_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureSliceIdsIsMutable(); - sliceIds_.addAll(other.sliceIds_); - } - onChanged(); - } - } else { - if (!other.sliceIds_.isEmpty()) { - if (sliceIdsBuilder_.isEmpty()) { - sliceIdsBuilder_.dispose(); - sliceIdsBuilder_ = null; - sliceIds_ = other.sliceIds_; - bitField0_ = (bitField0_ & ~0x00000004); - sliceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSliceIdsFieldBuilder() : null; - } else { - sliceIdsBuilder_.addAllMessages(other.sliceIds_); - } - } - } - if (other.hasController()) { - mergeController(other.getController()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Context) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List topologyIds_ = - java.util.Collections.emptyList(); - private void ensureTopologyIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - topologyIds_ = new java.util.ArrayList(topologyIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> topologyIdsBuilder_; - - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public java.util.List getTopologyIdsList() { - if (topologyIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(topologyIds_); - } else { - return topologyIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public int getTopologyIdsCount() { - if (topologyIdsBuilder_ == null) { - return topologyIds_.size(); - } else { - return topologyIdsBuilder_.getCount(); - } - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public context.ContextOuterClass.TopologyId getTopologyIds(int index) { - if (topologyIdsBuilder_ == null) { - return topologyIds_.get(index); - } else { - return topologyIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder setTopologyIds( - int index, context.ContextOuterClass.TopologyId value) { - if (topologyIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologyIdsIsMutable(); - topologyIds_.set(index, value); - onChanged(); - } else { - topologyIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder setTopologyIds( - int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.set(index, builderForValue.build()); - onChanged(); - } else { - topologyIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder addTopologyIds(context.ContextOuterClass.TopologyId value) { - if (topologyIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologyIdsIsMutable(); - topologyIds_.add(value); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder addTopologyIds( - int index, context.ContextOuterClass.TopologyId value) { - if (topologyIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologyIdsIsMutable(); - topologyIds_.add(index, value); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder addTopologyIds( - context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.add(builderForValue.build()); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder addTopologyIds( - int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.add(index, builderForValue.build()); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder addAllTopologyIds( - java.lang.Iterable values) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, topologyIds_); - onChanged(); - } else { - topologyIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder clearTopologyIds() { - if (topologyIdsBuilder_ == null) { - topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - topologyIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder removeTopologyIds(int index) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.remove(index); - onChanged(); - } else { - topologyIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public context.ContextOuterClass.TopologyId.Builder getTopologyIdsBuilder( - int index) { - return getTopologyIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder( - int index) { - if (topologyIdsBuilder_ == null) { - return topologyIds_.get(index); } else { - return topologyIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public java.util.List - getTopologyIdsOrBuilderList() { - if (topologyIdsBuilder_ != null) { - return topologyIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(topologyIds_); - } - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder() { - return getTopologyIdsFieldBuilder().addBuilder( - context.ContextOuterClass.TopologyId.getDefaultInstance()); - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder( - int index) { - return getTopologyIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.TopologyId.getDefaultInstance()); - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public java.util.List - getTopologyIdsBuilderList() { - return getTopologyIdsFieldBuilder().getBuilderList(); - } - 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()); - topologyIds_ = null; - } - return topologyIdsBuilder_; - } - - private java.util.List serviceIds_ = - java.util.Collections.emptyList(); - private void ensureServiceIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - serviceIds_ = new java.util.ArrayList(serviceIds_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdsBuilder_; - - /** - * repeated .context.ServiceId service_ids = 4; - */ - public java.util.List getServiceIdsList() { - if (serviceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(serviceIds_); - } else { - return serviceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public int getServiceIdsCount() { - if (serviceIdsBuilder_ == null) { - return serviceIds_.size(); - } else { - return serviceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public context.ContextOuterClass.ServiceId getServiceIds(int index) { - if (serviceIdsBuilder_ == null) { - return serviceIds_.get(index); - } else { - return serviceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder setServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceIdsIsMutable(); - serviceIds_.set(index, value); - onChanged(); - } else { - serviceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder setServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - serviceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder addServiceIds(context.ContextOuterClass.ServiceId value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceIdsIsMutable(); - serviceIds_.add(value); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder addServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceIdsIsMutable(); - serviceIds_.add(index, value); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder addServiceIds( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.add(builderForValue.build()); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder addServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder addAllServiceIds( - java.lang.Iterable values) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, serviceIds_); - onChanged(); - } else { - serviceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder clearServiceIds() { - if (serviceIdsBuilder_ == null) { - serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - serviceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder removeServiceIds(int index) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.remove(index); - onChanged(); - } else { - serviceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdsBuilder( - int index) { - return getServiceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder( - int index) { - if (serviceIdsBuilder_ == null) { - return serviceIds_.get(index); } else { - return serviceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public java.util.List - getServiceIdsOrBuilderList() { - if (serviceIdsBuilder_ != null) { - return serviceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(serviceIds_); - } - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder() { - return getServiceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder( - int index) { - return getServiceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public java.util.List - getServiceIdsBuilderList() { - return getServiceIdsFieldBuilder().getBuilderList(); - } - 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()); - serviceIds_ = null; - } - return serviceIdsBuilder_; - } - - private java.util.List sliceIds_ = - java.util.Collections.emptyList(); - private void ensureSliceIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - sliceIds_ = new java.util.ArrayList(sliceIds_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> sliceIdsBuilder_; - - /** - * repeated .context.SliceId slice_ids = 5; - */ - public java.util.List getSliceIdsList() { - if (sliceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sliceIds_); - } else { - return sliceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public int getSliceIdsCount() { - if (sliceIdsBuilder_ == null) { - return sliceIds_.size(); - } else { - return sliceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public context.ContextOuterClass.SliceId getSliceIds(int index) { - if (sliceIdsBuilder_ == null) { - return sliceIds_.get(index); - } else { - return sliceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder setSliceIds( - int index, context.ContextOuterClass.SliceId value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceIdsIsMutable(); - sliceIds_.set(index, value); - onChanged(); - } else { - sliceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder setSliceIds( - int index, context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - sliceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder addSliceIds(context.ContextOuterClass.SliceId value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceIdsIsMutable(); - sliceIds_.add(value); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder addSliceIds( - int index, context.ContextOuterClass.SliceId value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceIdsIsMutable(); - sliceIds_.add(index, value); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder addSliceIds( - context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.add(builderForValue.build()); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder addSliceIds( - int index, context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder addAllSliceIds( - java.lang.Iterable values) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sliceIds_); - onChanged(); - } else { - sliceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder clearSliceIds() { - if (sliceIdsBuilder_ == null) { - sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - sliceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder removeSliceIds(int index) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.remove(index); - onChanged(); - } else { - sliceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public context.ContextOuterClass.SliceId.Builder getSliceIdsBuilder( - int index) { - return getSliceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder( - int index) { - if (sliceIdsBuilder_ == null) { - return sliceIds_.get(index); } else { - return sliceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public java.util.List - getSliceIdsOrBuilderList() { - if (sliceIdsBuilder_ != null) { - return sliceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sliceIds_); - } - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder() { - return getSliceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.SliceId.getDefaultInstance()); - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder( - int index) { - return getSliceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.SliceId.getDefaultInstance()); - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public java.util.List - getSliceIdsBuilderList() { - return getSliceIdsFieldBuilder().getBuilderList(); - } - 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()); - sliceIds_ = null; - } - return sliceIdsBuilder_; - } - - private context.ContextOuterClass.TeraFlowController controller_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TeraFlowController, context.ContextOuterClass.TeraFlowController.Builder, context.ContextOuterClass.TeraFlowControllerOrBuilder> controllerBuilder_; - /** - * .context.TeraFlowController controller = 6; - * @return Whether the controller field is set. - */ - public boolean hasController() { - return controllerBuilder_ != null || controller_ != null; - } - /** - * .context.TeraFlowController controller = 6; - * @return The controller. - */ - public context.ContextOuterClass.TeraFlowController getController() { - if (controllerBuilder_ == null) { - return controller_ == null ? context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; - } else { - return controllerBuilder_.getMessage(); - } - } - /** - * .context.TeraFlowController controller = 6; - */ - public Builder setController(context.ContextOuterClass.TeraFlowController value) { - if (controllerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - controller_ = value; - onChanged(); - } else { - controllerBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.TeraFlowController controller = 6; - */ - public Builder setController( - context.ContextOuterClass.TeraFlowController.Builder builderForValue) { - if (controllerBuilder_ == null) { - controller_ = builderForValue.build(); - onChanged(); - } else { - controllerBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.TeraFlowController controller = 6; - */ - public Builder mergeController(context.ContextOuterClass.TeraFlowController value) { - if (controllerBuilder_ == null) { - if (controller_ != null) { - controller_ = - context.ContextOuterClass.TeraFlowController.newBuilder(controller_).mergeFrom(value).buildPartial(); - } else { - controller_ = value; - } - onChanged(); - } else { - controllerBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.TeraFlowController controller = 6; - */ - public Builder clearController() { - if (controllerBuilder_ == null) { - controller_ = null; - onChanged(); - } else { - controller_ = null; - controllerBuilder_ = null; - } - - return this; - } - /** - * .context.TeraFlowController controller = 6; - */ - public context.ContextOuterClass.TeraFlowController.Builder getControllerBuilder() { - - onChanged(); - return getControllerFieldBuilder().getBuilder(); - } - /** - * .context.TeraFlowController controller = 6; - */ - public context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder() { - if (controllerBuilder_ != null) { - return controllerBuilder_.getMessageOrBuilder(); - } else { - return controller_ == null ? - context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; - } - } - /** - * .context.TeraFlowController controller = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TeraFlowController, context.ContextOuterClass.TeraFlowController.Builder, context.ContextOuterClass.TeraFlowControllerOrBuilder> - getControllerFieldBuilder() { - if (controllerBuilder_ == null) { - controllerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TeraFlowController, context.ContextOuterClass.TeraFlowController.Builder, context.ContextOuterClass.TeraFlowControllerOrBuilder>( - getController(), - getParentForChildren(), - isClean()); - controller_ = null; - } - return controllerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Context) - } + public static final class Timestamp extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Timestamp) + TimestampOrBuilder { - // @@protoc_insertion_point(class_scope:context.Context) - private static final context.ContextOuterClass.Context DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Context(); - } + private static final long serialVersionUID = 0L; - public static context.ContextOuterClass.Context getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Use Timestamp.newBuilder() to construct. + private Timestamp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private Timestamp() { + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Timestamp(); + } - @java.lang.Override - public context.ContextOuterClass.Context getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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 interface ContextIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ContextIdList) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Timestamp_descriptor; + } - /** - * repeated .context.ContextId context_ids = 1; - */ - java.util.List - getContextIdsList(); - /** - * repeated .context.ContextId context_ids = 1; - */ - context.ContextOuterClass.ContextId getContextIds(int index); - /** - * repeated .context.ContextId context_ids = 1; - */ - int getContextIdsCount(); - /** - * repeated .context.ContextId context_ids = 1; - */ - java.util.List - getContextIdsOrBuilderList(); - /** - * repeated .context.ContextId context_ids = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ContextIdList} - */ - public static final class ContextIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ContextIdList) - ContextIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ContextIdList.newBuilder() to construct. - private ContextIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ContextIdList() { - contextIds_ = java.util.Collections.emptyList(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Timestamp_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Timestamp.class, context.ContextOuterClass.Timestamp.Builder.class); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ContextIdList(); - } + public static final int TIMESTAMP_FIELD_NUMBER = 1; - @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(); - 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; - } + private double timestamp_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextIdList.class, context.ContextOuterClass.ContextIdList.Builder.class); - } + /** + * double timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public double getTimestamp() { + return timestamp_; + } - public static final int CONTEXT_IDS_FIELD_NUMBER = 1; - private java.util.List contextIds_; - /** - * repeated .context.ContextId context_ids = 1; - */ - @java.lang.Override - public java.util.List getContextIdsList() { - return contextIds_; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - @java.lang.Override - public java.util.List - getContextIdsOrBuilderList() { - return contextIds_; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - @java.lang.Override - public int getContextIdsCount() { - return contextIds_.size(); - } - /** - * repeated .context.ContextId context_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextIds(int index) { - return contextIds_.get(index); - } - /** - * repeated .context.ContextId context_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdsOrBuilder( - int index) { - return contextIds_.get(index); - } + private byte memoizedIsInitialized = -1; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (timestamp_ != 0D) { + output.writeDouble(1, timestamp_); + } + unknownFields.writeTo(output); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < contextIds_.size(); i++) { - output.writeMessage(1, contextIds_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (timestamp_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, timestamp_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < contextIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, contextIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Timestamp)) { + return super.equals(obj); + } + 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)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + 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(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ContextIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.ContextIdList other = (context.ContextOuterClass.ContextIdList) obj; - - if (!getContextIdsList() - .equals(other.getContextIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.Timestamp parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getContextIdsCount() > 0) { - hash = (37 * hash) + CONTEXT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getContextIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.Timestamp parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.ContextIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.Timestamp parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ContextIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.Timestamp parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ContextIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ContextIdList) - context.ContextOuterClass.ContextIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ContextIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextIdList.class, context.ContextOuterClass.ContextIdList.Builder.class); - } - - // 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(); - if (contextIdsBuilder_ == null) { - contextIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - contextIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ContextIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ContextIdList getDefaultInstanceForType() { - return context.ContextOuterClass.ContextIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ContextIdList build() { - context.ContextOuterClass.ContextIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ContextIdList buildPartial() { - context.ContextOuterClass.ContextIdList result = new context.ContextOuterClass.ContextIdList(this); - int from_bitField0_ = bitField0_; - if (contextIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - contextIds_ = java.util.Collections.unmodifiableList(contextIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.contextIds_ = contextIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ContextIdList) { - return mergeFrom((context.ContextOuterClass.ContextIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ContextIdList other) { - if (other == context.ContextOuterClass.ContextIdList.getDefaultInstance()) return this; - if (contextIdsBuilder_ == null) { - if (!other.contextIds_.isEmpty()) { - if (contextIds_.isEmpty()) { - contextIds_ = other.contextIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureContextIdsIsMutable(); - contextIds_.addAll(other.contextIds_); - } - onChanged(); - } - } else { - if (!other.contextIds_.isEmpty()) { - if (contextIdsBuilder_.isEmpty()) { - contextIdsBuilder_.dispose(); - contextIdsBuilder_ = null; - contextIds_ = other.contextIds_; - bitField0_ = (bitField0_ & ~0x00000001); - contextIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getContextIdsFieldBuilder() : null; - } else { - contextIdsBuilder_.addAllMessages(other.contextIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List contextIds_ = - java.util.Collections.emptyList(); - private void ensureContextIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - contextIds_ = new java.util.ArrayList(contextIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdsBuilder_; - - /** - * repeated .context.ContextId context_ids = 1; - */ - public java.util.List getContextIdsList() { - if (contextIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(contextIds_); - } else { - return contextIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public int getContextIdsCount() { - if (contextIdsBuilder_ == null) { - return contextIds_.size(); - } else { - return contextIdsBuilder_.getCount(); - } - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public context.ContextOuterClass.ContextId getContextIds(int index) { - if (contextIdsBuilder_ == null) { - return contextIds_.get(index); - } else { - return contextIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder setContextIds( - int index, context.ContextOuterClass.ContextId value) { - if (contextIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContextIdsIsMutable(); - contextIds_.set(index, value); - onChanged(); - } else { - contextIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder setContextIds( - int index, context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdsBuilder_ == null) { - ensureContextIdsIsMutable(); - contextIds_.set(index, builderForValue.build()); - onChanged(); - } else { - contextIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder addContextIds(context.ContextOuterClass.ContextId value) { - if (contextIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContextIdsIsMutable(); - contextIds_.add(value); - onChanged(); - } else { - contextIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder addContextIds( - int index, context.ContextOuterClass.ContextId value) { - if (contextIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContextIdsIsMutable(); - contextIds_.add(index, value); - onChanged(); - } else { - contextIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder addContextIds( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdsBuilder_ == null) { - ensureContextIdsIsMutable(); - contextIds_.add(builderForValue.build()); - onChanged(); - } else { - contextIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder addContextIds( - int index, context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdsBuilder_ == null) { - ensureContextIdsIsMutable(); - contextIds_.add(index, builderForValue.build()); - onChanged(); - } else { - contextIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder addAllContextIds( - java.lang.Iterable values) { - if (contextIdsBuilder_ == null) { - ensureContextIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, contextIds_); - onChanged(); - } else { - contextIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder clearContextIds() { - if (contextIdsBuilder_ == null) { - contextIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - contextIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder removeContextIds(int index) { - if (contextIdsBuilder_ == null) { - ensureContextIdsIsMutable(); - contextIds_.remove(index); - onChanged(); - } else { - contextIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdsBuilder( - int index) { - return getContextIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdsOrBuilder( - int index) { - if (contextIdsBuilder_ == null) { - return contextIds_.get(index); } else { - return contextIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public java.util.List - getContextIdsOrBuilderList() { - if (contextIdsBuilder_ != null) { - return contextIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(contextIds_); - } - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public context.ContextOuterClass.ContextId.Builder addContextIdsBuilder() { - return getContextIdsFieldBuilder().addBuilder( - context.ContextOuterClass.ContextId.getDefaultInstance()); - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public context.ContextOuterClass.ContextId.Builder addContextIdsBuilder( - int index) { - return getContextIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.ContextId.getDefaultInstance()); - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public java.util.List - getContextIdsBuilderList() { - return getContextIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdsFieldBuilder() { - if (contextIdsBuilder_ == null) { - contextIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - contextIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - contextIds_ = null; - } - return contextIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ContextIdList) - } + public static context.ContextOuterClass.Timestamp parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(class_scope:context.ContextIdList) - private static final context.ContextOuterClass.ContextIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ContextIdList(); - } + public static context.ContextOuterClass.Timestamp parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.ContextIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Timestamp parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.Timestamp parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.Timestamp parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public context.ContextOuterClass.ContextIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Timestamp parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - } + public static context.ContextOuterClass.Timestamp parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public interface ContextListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ContextList) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.Timestamp parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - /** - * repeated .context.Context contexts = 1; - */ - java.util.List - getContextsList(); - /** - * repeated .context.Context contexts = 1; - */ - context.ContextOuterClass.Context getContexts(int index); - /** - * repeated .context.Context contexts = 1; - */ - int getContextsCount(); - /** - * repeated .context.Context contexts = 1; - */ - java.util.List - getContextsOrBuilderList(); - /** - * repeated .context.Context contexts = 1; - */ - context.ContextOuterClass.ContextOrBuilder getContextsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ContextList} - */ - public static final class ContextList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ContextList) - ContextListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ContextList.newBuilder() to construct. - private ContextList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ContextList() { - contexts_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ContextList(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @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(); - 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; - } + public static Builder newBuilder(context.ContextOuterClass.Timestamp prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextList.class, context.ContextOuterClass.ContextList.Builder.class); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static final int CONTEXTS_FIELD_NUMBER = 1; - private java.util.List contexts_; - /** - * repeated .context.Context contexts = 1; - */ - @java.lang.Override - public java.util.List getContextsList() { - return contexts_; - } - /** - * repeated .context.Context contexts = 1; - */ - @java.lang.Override - public java.util.List - getContextsOrBuilderList() { - return contexts_; - } - /** - * repeated .context.Context contexts = 1; - */ - @java.lang.Override - public int getContextsCount() { - return contexts_.size(); - } - /** - * repeated .context.Context contexts = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Context getContexts(int index) { - return contexts_.get(index); - } - /** - * repeated .context.Context contexts = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextOrBuilder getContextsOrBuilder( - int index) { - return contexts_.get(index); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * Protobuf type {@code context.Timestamp} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Timestamp) + context.ContextOuterClass.TimestampOrBuilder { - memoizedIsInitialized = 1; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Timestamp_descriptor; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < contexts_.size(); i++) { - output.writeMessage(1, contexts_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Timestamp_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Timestamp.class, context.ContextOuterClass.Timestamp.Builder.class); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < contexts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, contexts_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + // Construct using context.ContextOuterClass.Timestamp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ContextList)) { - return super.equals(obj); - } - context.ContextOuterClass.ContextList other = (context.ContextOuterClass.ContextList) obj; - - if (!getContextsList() - .equals(other.getContextsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getContextsCount() > 0) { - hash = (37 * hash) + CONTEXTS_FIELD_NUMBER; - hash = (53 * hash) + getContextsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - public static context.ContextOuterClass.ContextList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clear() { + super.clear(); + timestamp_ = 0D; + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ContextList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Timestamp_descriptor; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ContextList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ContextList) - context.ContextOuterClass.ContextListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ContextList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextList.class, context.ContextOuterClass.ContextList.Builder.class); - } - - // 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(); - if (contextsBuilder_ == null) { - contexts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - contextsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ContextList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ContextList getDefaultInstanceForType() { - return context.ContextOuterClass.ContextList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ContextList build() { - context.ContextOuterClass.ContextList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ContextList buildPartial() { - context.ContextOuterClass.ContextList result = new context.ContextOuterClass.ContextList(this); - int from_bitField0_ = bitField0_; - if (contextsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - contexts_ = java.util.Collections.unmodifiableList(contexts_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.contexts_ = contexts_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ContextList) { - return mergeFrom((context.ContextOuterClass.ContextList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ContextList other) { - if (other == context.ContextOuterClass.ContextList.getDefaultInstance()) return this; - if (contextsBuilder_ == null) { - if (!other.contexts_.isEmpty()) { - if (contexts_.isEmpty()) { - contexts_ = other.contexts_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureContextsIsMutable(); - contexts_.addAll(other.contexts_); - } - onChanged(); - } - } else { - if (!other.contexts_.isEmpty()) { - if (contextsBuilder_.isEmpty()) { - contextsBuilder_.dispose(); - contextsBuilder_ = null; - contexts_ = other.contexts_; - bitField0_ = (bitField0_ & ~0x00000001); - contextsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getContextsFieldBuilder() : null; - } else { - contextsBuilder_.addAllMessages(other.contexts_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List contexts_ = - java.util.Collections.emptyList(); - private void ensureContextsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - contexts_ = new java.util.ArrayList(contexts_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Context, context.ContextOuterClass.Context.Builder, context.ContextOuterClass.ContextOrBuilder> contextsBuilder_; - - /** - * repeated .context.Context contexts = 1; - */ - public java.util.List getContextsList() { - if (contextsBuilder_ == null) { - return java.util.Collections.unmodifiableList(contexts_); - } else { - return contextsBuilder_.getMessageList(); - } - } - /** - * repeated .context.Context contexts = 1; - */ - public int getContextsCount() { - if (contextsBuilder_ == null) { - return contexts_.size(); - } else { - return contextsBuilder_.getCount(); - } - } - /** - * repeated .context.Context contexts = 1; - */ - public context.ContextOuterClass.Context getContexts(int index) { - if (contextsBuilder_ == null) { - return contexts_.get(index); - } else { - return contextsBuilder_.getMessage(index); - } - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder setContexts( - int index, context.ContextOuterClass.Context value) { - if (contextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContextsIsMutable(); - contexts_.set(index, value); - onChanged(); - } else { - contextsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder setContexts( - int index, context.ContextOuterClass.Context.Builder builderForValue) { - if (contextsBuilder_ == null) { - ensureContextsIsMutable(); - contexts_.set(index, builderForValue.build()); - onChanged(); - } else { - contextsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder addContexts(context.ContextOuterClass.Context value) { - if (contextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContextsIsMutable(); - contexts_.add(value); - onChanged(); - } else { - contextsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder addContexts( - int index, context.ContextOuterClass.Context value) { - if (contextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContextsIsMutable(); - contexts_.add(index, value); - onChanged(); - } else { - contextsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder addContexts( - context.ContextOuterClass.Context.Builder builderForValue) { - if (contextsBuilder_ == null) { - ensureContextsIsMutable(); - contexts_.add(builderForValue.build()); - onChanged(); - } else { - contextsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder addContexts( - int index, context.ContextOuterClass.Context.Builder builderForValue) { - if (contextsBuilder_ == null) { - ensureContextsIsMutable(); - contexts_.add(index, builderForValue.build()); - onChanged(); - } else { - contextsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder addAllContexts( - java.lang.Iterable values) { - if (contextsBuilder_ == null) { - ensureContextsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, contexts_); - onChanged(); - } else { - contextsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder clearContexts() { - if (contextsBuilder_ == null) { - contexts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - contextsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder removeContexts(int index) { - if (contextsBuilder_ == null) { - ensureContextsIsMutable(); - contexts_.remove(index); - onChanged(); - } else { - contextsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public context.ContextOuterClass.Context.Builder getContextsBuilder( - int index) { - return getContextsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Context contexts = 1; - */ - public context.ContextOuterClass.ContextOrBuilder getContextsOrBuilder( - int index) { - if (contextsBuilder_ == null) { - return contexts_.get(index); } else { - return contextsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Context contexts = 1; - */ - public java.util.List - getContextsOrBuilderList() { - if (contextsBuilder_ != null) { - return contextsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(contexts_); - } - } - /** - * repeated .context.Context contexts = 1; - */ - public context.ContextOuterClass.Context.Builder addContextsBuilder() { - return getContextsFieldBuilder().addBuilder( - context.ContextOuterClass.Context.getDefaultInstance()); - } - /** - * repeated .context.Context contexts = 1; - */ - public context.ContextOuterClass.Context.Builder addContextsBuilder( - int index) { - return getContextsFieldBuilder().addBuilder( - index, context.ContextOuterClass.Context.getDefaultInstance()); - } - /** - * repeated .context.Context contexts = 1; - */ - public java.util.List - getContextsBuilderList() { - return getContextsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Context, context.ContextOuterClass.Context.Builder, context.ContextOuterClass.ContextOrBuilder> - getContextsFieldBuilder() { - if (contextsBuilder_ == null) { - contextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Context, context.ContextOuterClass.Context.Builder, context.ContextOuterClass.ContextOrBuilder>( - contexts_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - contexts_ = null; - } - return contextsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ContextList) - } + @java.lang.Override + public context.ContextOuterClass.Timestamp getDefaultInstanceForType() { + return context.ContextOuterClass.Timestamp.getDefaultInstance(); + } - // @@protoc_insertion_point(class_scope:context.ContextList) - private static final context.ContextOuterClass.ContextList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ContextList(); - } + @java.lang.Override + public context.ContextOuterClass.Timestamp build() { + context.ContextOuterClass.Timestamp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static context.ContextOuterClass.ContextList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public context.ContextOuterClass.Timestamp buildPartial() { + context.ContextOuterClass.Timestamp result = new context.ContextOuterClass.Timestamp(this); + result.timestamp_ = timestamp_; + onBuilt(); + return result; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @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 context.ContextOuterClass.ContextList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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); + } - public interface ContextEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ContextEvent) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - /** - * .context.ContextId context_id = 2; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 2; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 2; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); - } - /** - * Protobuf type {@code context.ContextEvent} - */ - public static final class ContextEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ContextEvent) - ContextEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use ContextEvent.newBuilder() to construct. - private ContextEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ContextEvent() { - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Timestamp) { + return mergeFrom((context.ContextOuterClass.Timestamp) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ContextEvent(); - } + public Builder mergeFrom(context.ContextOuterClass.Timestamp other) { + if (other == context.ContextOuterClass.Timestamp.getDefaultInstance()) + return this; + if (other.getTimestamp() != 0D) { + setTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @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; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextEvent.class, context.ContextOuterClass.ContextEvent.Builder.class); - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Timestamp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + private double timestamp_; - public static final int CONTEXT_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 2; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 2; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - /** - * .context.ContextId context_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + /** + * double timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public double getTimestamp() { + return timestamp_; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * double timestamp = 1; + * @param value The timestamp to set. + * @return This builder for chaining. + */ + public Builder setTimestamp(double value) { + timestamp_ = value; + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * double timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearTimestamp() { + timestamp_ = 0D; + onChanged(); + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (contextId_ != null) { - output.writeMessage(2, getContextId()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getContextId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Timestamp) + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ContextEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.ContextEvent other = (context.ContextOuterClass.ContextEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + // @@protoc_insertion_point(class_scope:context.Timestamp) + private static final context.ContextOuterClass.Timestamp DEFAULT_INSTANCE; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Timestamp(); + } - public static context.ContextOuterClass.ContextEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.Timestamp getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ContextEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ContextEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ContextEvent) - context.ContextOuterClass.ContextEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ContextEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextEvent.class, context.ContextOuterClass.ContextEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ContextEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ContextEvent getDefaultInstanceForType() { - return context.ContextOuterClass.ContextEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ContextEvent build() { - context.ContextOuterClass.ContextEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ContextEvent) { - return mergeFrom((context.ContextOuterClass.ContextEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ContextEvent other) { - if (other == context.ContextOuterClass.ContextEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.ContextId contextId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; - /** - * .context.ContextId context_id = 2; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 2; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 2; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 2; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 2; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 2; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 2; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 2; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ContextEvent) - } - - // @@protoc_insertion_point(class_scope:context.ContextEvent) - private static final context.ContextOuterClass.ContextEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ContextEvent(); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static context.ContextOuterClass.ContextEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @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); + } + }; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public context.ContextOuterClass.ContextEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + @java.lang.Override + public context.ContextOuterClass.Timestamp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - } - - public interface TopologyIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.TopologyId) - com.google.protobuf.MessageOrBuilder { + public interface EventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Event) + com.google.protobuf.MessageOrBuilder { - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + /** + * .context.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); - /** - * .context.Uuid topology_uuid = 2; - * @return Whether the topologyUuid field is set. - */ - boolean hasTopologyUuid(); - /** - * .context.Uuid topology_uuid = 2; - * @return The topologyUuid. - */ - context.ContextOuterClass.Uuid getTopologyUuid(); - /** - * .context.Uuid topology_uuid = 2; - */ - context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder(); - } - /** - *
-   * ----- Topology ------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.TopologyId} - */ - public static final class TopologyId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.TopologyId) - TopologyIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use TopologyId.newBuilder() to construct. - private TopologyId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TopologyId() { - } + /** + * .context.Timestamp timestamp = 1; + * @return The timestamp. + */ + context.ContextOuterClass.Timestamp getTimestamp(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TopologyId(); - } + /** + * .context.Timestamp timestamp = 1; + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); - @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; - } + /** + * .context.EventTypeEnum event_type = 2; + * @return The enum numeric value on the wire for eventType. + */ + int getEventTypeValue(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyId.class, context.ContextOuterClass.TopologyId.Builder.class); + /** + * .context.EventTypeEnum event_type = 2; + * @return The eventType. + */ + context.ContextOuterClass.EventTypeEnum getEventType(); } - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } /** - * .context.ContextId context_id = 1; + * Protobuf type {@code context.Event} */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + public static final class Event extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Event) + EventOrBuilder { - public static final int TOPOLOGY_UUID_FIELD_NUMBER = 2; - private context.ContextOuterClass.Uuid topologyUuid_; - /** - * .context.Uuid topology_uuid = 2; - * @return Whether the topologyUuid field is set. - */ - @java.lang.Override - public boolean hasTopologyUuid() { - return topologyUuid_ != null; - } - /** - * .context.Uuid topology_uuid = 2; - * @return The topologyUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getTopologyUuid() { - return topologyUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; - } - /** - * .context.Uuid topology_uuid = 2; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder() { - return getTopologyUuid(); - } + private static final long serialVersionUID = 0L; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + // Use Event.newBuilder() to construct. + private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - memoizedIsInitialized = 1; - return true; - } + private Event() { + eventType_ = 0; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (topologyUuid_ != null) { - output.writeMessage(2, getTopologyUuid()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Event(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextId()); - } - if (topologyUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getTopologyUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.TopologyId)) { - return super.equals(obj); - } - context.ContextOuterClass.TopologyId other = (context.ContextOuterClass.TopologyId) obj; - - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (hasTopologyUuid() != other.hasTopologyUuid()) return false; - if (hasTopologyUuid()) { - if (!getTopologyUuid() - .equals(other.getTopologyUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + 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(); + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - if (hasTopologyUuid()) { - hash = (37 * hash) + TOPOLOGY_UUID_FIELD_NUMBER; - hash = (53 * hash) + getTopologyUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Event_descriptor; + } - public static context.ContextOuterClass.TopologyId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Event_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Event.class, context.ContextOuterClass.Event.Builder.class); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.TopologyId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static final int TIMESTAMP_FIELD_NUMBER = 1; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Topology ------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.TopologyId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.TopologyId) - context.ContextOuterClass.TopologyIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_TopologyId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyId.class, context.ContextOuterClass.TopologyId.Builder.class); - } - - // 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; - contextIdBuilder_ = null; - } - if (topologyUuidBuilder_ == null) { - topologyUuid_ = null; - } else { - topologyUuid_ = null; - topologyUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TopologyId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyId getDefaultInstanceForType() { - return context.ContextOuterClass.TopologyId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.TopologyId build() { - context.ContextOuterClass.TopologyId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TopologyId) { - return mergeFrom((context.ContextOuterClass.TopologyId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.TopologyId other) { - if (other == context.ContextOuterClass.TopologyId.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (other.hasTopologyUuid()) { - mergeTopologyUuid(other.getTopologyUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ContextId contextId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private context.ContextOuterClass.Uuid topologyUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> topologyUuidBuilder_; - /** - * .context.Uuid topology_uuid = 2; - * @return Whether the topologyUuid field is set. - */ - public boolean hasTopologyUuid() { - return topologyUuidBuilder_ != null || topologyUuid_ != null; - } - /** - * .context.Uuid topology_uuid = 2; - * @return The topologyUuid. - */ - public context.ContextOuterClass.Uuid getTopologyUuid() { - if (topologyUuidBuilder_ == null) { - return topologyUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; - } else { - return topologyUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid topology_uuid = 2; - */ - public Builder setTopologyUuid(context.ContextOuterClass.Uuid value) { - if (topologyUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - topologyUuid_ = value; - onChanged(); - } else { - topologyUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid topology_uuid = 2; - */ - public Builder setTopologyUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (topologyUuidBuilder_ == null) { - topologyUuid_ = builderForValue.build(); - onChanged(); - } else { - topologyUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid topology_uuid = 2; - */ - public Builder mergeTopologyUuid(context.ContextOuterClass.Uuid value) { - if (topologyUuidBuilder_ == null) { - if (topologyUuid_ != null) { - topologyUuid_ = - context.ContextOuterClass.Uuid.newBuilder(topologyUuid_).mergeFrom(value).buildPartial(); - } else { - topologyUuid_ = value; - } - onChanged(); - } else { - topologyUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid topology_uuid = 2; - */ - public Builder clearTopologyUuid() { - if (topologyUuidBuilder_ == null) { - topologyUuid_ = null; - onChanged(); - } else { - topologyUuid_ = null; - topologyUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid topology_uuid = 2; - */ - public context.ContextOuterClass.Uuid.Builder getTopologyUuidBuilder() { - - onChanged(); - return getTopologyUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid topology_uuid = 2; - */ - public context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder() { - if (topologyUuidBuilder_ != null) { - return topologyUuidBuilder_.getMessageOrBuilder(); - } else { - return topologyUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; - } - } - /** - * .context.Uuid topology_uuid = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getTopologyUuidFieldBuilder() { - if (topologyUuidBuilder_ == null) { - topologyUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getTopologyUuid(), - getParentForChildren(), - isClean()); - topologyUuid_ = null; - } - return topologyUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.TopologyId) - } + private context.ContextOuterClass.Timestamp timestamp_; - // @@protoc_insertion_point(class_scope:context.TopologyId) - private static final context.ContextOuterClass.TopologyId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyId(); - } + /** + * .context.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } - public static context.ContextOuterClass.TopologyId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Timestamp timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Timestamp timestamp = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static final int EVENT_TYPE_FIELD_NUMBER = 2; - @java.lang.Override - public context.ContextOuterClass.TopologyId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private int eventType_; - } + /** + * .context.EventTypeEnum event_type = 2; + * @return The enum numeric value on the wire for eventType. + */ + @java.lang.Override + public int getEventTypeValue() { + return eventType_; + } - public interface TopologyOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Topology) - com.google.protobuf.MessageOrBuilder { + /** + * .context.EventTypeEnum event_type = 2; + * @return The eventType. + */ + @java.lang.Override + public context.ContextOuterClass.EventTypeEnum getEventType() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.valueOf(eventType_); + return result == null ? context.ContextOuterClass.EventTypeEnum.UNRECOGNIZED : result; + } - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - boolean hasTopologyId(); - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - context.ContextOuterClass.TopologyId getTopologyId(); - /** - * .context.TopologyId topology_id = 1; - */ - context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + private byte memoizedIsInitialized = -1; - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - /** - * repeated .context.DeviceId device_ids = 3; - */ - java.util.List - getDeviceIdsList(); - /** - * repeated .context.DeviceId device_ids = 3; - */ - context.ContextOuterClass.DeviceId getDeviceIds(int index); - /** - * repeated .context.DeviceId device_ids = 3; - */ - int getDeviceIdsCount(); - /** - * repeated .context.DeviceId device_ids = 3; - */ - java.util.List - getDeviceIdsOrBuilderList(); - /** - * repeated .context.DeviceId device_ids = 3; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (timestamp_ != null) { + output.writeMessage(1, getTimestamp()); + } + if (eventType_ != context.ContextOuterClass.EventTypeEnum.EVENTTYPE_UNDEFINED.getNumber()) { + output.writeEnum(2, eventType_); + } + unknownFields.writeTo(output); + } - /** - * repeated .context.LinkId link_ids = 4; - */ - java.util.List - getLinkIdsList(); - /** - * repeated .context.LinkId link_ids = 4; - */ - context.ContextOuterClass.LinkId getLinkIds(int index); - /** - * repeated .context.LinkId link_ids = 4; - */ - int getLinkIdsCount(); - /** - * repeated .context.LinkId link_ids = 4; - */ - java.util.List - getLinkIdsOrBuilderList(); - /** - * repeated .context.LinkId link_ids = 4; - */ - context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.Topology} - */ - public static final class Topology extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Topology) - TopologyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Topology.newBuilder() to construct. - private Topology(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Topology() { - name_ = ""; - deviceIds_ = java.util.Collections.emptyList(); - linkIds_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimestamp()); + } + if (eventType_ != context.ContextOuterClass.EventTypeEnum.EVENTTYPE_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, eventType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Topology(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Event)) { + return super.equals(obj); + } + context.ContextOuterClass.Event other = (context.ContextOuterClass.Event) obj; + if (hasTimestamp() != other.hasTimestamp()) + return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) + return false; + } + if (eventType_ != other.eventType_) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - @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(); - 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(); - 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; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (37 * hash) + EVENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + eventType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Topology_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Topology.class, context.ContextOuterClass.Topology.Builder.class); - } + public static context.ContextOuterClass.Event parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int TOPOLOGY_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.TopologyId topologyId_; - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - @java.lang.Override - public boolean hasTopologyId() { - return topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - @java.lang.Override - public context.ContextOuterClass.TopologyId getTopologyId() { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - /** - * .context.TopologyId topology_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); - } + public static context.ContextOuterClass.Event parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static context.ContextOuterClass.Event parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int DEVICE_IDS_FIELD_NUMBER = 3; - private java.util.List deviceIds_; - /** - * repeated .context.DeviceId device_ids = 3; - */ - @java.lang.Override - public java.util.List getDeviceIdsList() { - return deviceIds_; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - @java.lang.Override - public java.util.List - getDeviceIdsOrBuilderList() { - return deviceIds_; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - @java.lang.Override - public int getDeviceIdsCount() { - return deviceIds_.size(); - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceIds(int index) { - return deviceIds_.get(index); - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index) { - return deviceIds_.get(index); - } + public static context.ContextOuterClass.Event parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int LINK_IDS_FIELD_NUMBER = 4; - private java.util.List linkIds_; - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public java.util.List getLinkIdsList() { - return linkIds_; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public java.util.List - getLinkIdsOrBuilderList() { - return linkIds_; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public int getLinkIdsCount() { - return linkIds_.size(); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.LinkId getLinkIds(int index) { - return linkIds_.get(index); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index) { - return linkIds_.get(index); - } + public static context.ContextOuterClass.Event parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.Event parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.Event parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (topologyId_ != null) { - output.writeMessage(1, getTopologyId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - for (int i = 0; i < deviceIds_.size(); i++) { - output.writeMessage(3, deviceIds_.get(i)); - } - for (int i = 0; i < linkIds_.size(); i++) { - output.writeMessage(4, linkIds_.get(i)); - } - unknownFields.writeTo(output); - } + public static context.ContextOuterClass.Event parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (topologyId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTopologyId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - for (int i = 0; i < deviceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, deviceIds_.get(i)); - } - for (int i = 0; i < linkIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, linkIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.Event parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Topology)) { - return super.equals(obj); - } - context.ContextOuterClass.Topology other = (context.ContextOuterClass.Topology) obj; - - if (hasTopologyId() != other.hasTopologyId()) return false; - if (hasTopologyId()) { - if (!getTopologyId() - .equals(other.getTopologyId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getDeviceIdsList() - .equals(other.getDeviceIdsList())) return false; - if (!getLinkIdsList() - .equals(other.getLinkIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.Event parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTopologyId()) { - hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; - hash = (53 * hash) + getTopologyId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getDeviceIdsCount() > 0) { - hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getDeviceIdsList().hashCode(); - } - if (getLinkIdsCount() > 0) { - hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; - hash = (53 * hash) + getLinkIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.Event parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static context.ContextOuterClass.Topology parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Topology parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Topology parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Topology parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Topology parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Topology parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Topology parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Topology parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Topology parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Topology parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Topology parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Topology parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.Event parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Topology prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Topology} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Topology) - context.ContextOuterClass.TopologyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Topology_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Topology_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Topology.class, context.ContextOuterClass.Topology.Builder.class); - } - - // 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; - topologyIdBuilder_ = null; - } - name_ = ""; - - if (deviceIdsBuilder_ == null) { - deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - deviceIdsBuilder_.clear(); - } - if (linkIdsBuilder_ == null) { - linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - linkIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Topology_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Topology getDefaultInstanceForType() { - return context.ContextOuterClass.Topology.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Topology build() { - context.ContextOuterClass.Topology result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - if (deviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deviceIds_ = deviceIds_; - } else { - result.deviceIds_ = deviceIdsBuilder_.build(); - } - if (linkIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - bitField0_ = (bitField0_ & ~0x00000002); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Topology) { - return mergeFrom((context.ContextOuterClass.Topology)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Topology other) { - if (other == context.ContextOuterClass.Topology.getDefaultInstance()) return this; - if (other.hasTopologyId()) { - mergeTopologyId(other.getTopologyId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (deviceIdsBuilder_ == null) { - if (!other.deviceIds_.isEmpty()) { - if (deviceIds_.isEmpty()) { - deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeviceIdsIsMutable(); - deviceIds_.addAll(other.deviceIds_); - } - onChanged(); - } - } else { - if (!other.deviceIds_.isEmpty()) { - if (deviceIdsBuilder_.isEmpty()) { - deviceIdsBuilder_.dispose(); - deviceIdsBuilder_ = null; - deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - deviceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDeviceIdsFieldBuilder() : null; - } else { - deviceIdsBuilder_.addAllMessages(other.deviceIds_); - } - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - if (linkIdsBuilder_ == null) { - if (!other.linkIds_.isEmpty()) { - if (linkIds_.isEmpty()) { - linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLinkIdsIsMutable(); - linkIds_.addAll(other.linkIds_); - } - onChanged(); - } - } else { - if (!other.linkIds_.isEmpty()) { - if (linkIdsBuilder_.isEmpty()) { - linkIdsBuilder_.dispose(); - linkIdsBuilder_ = null; - linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000002); - linkIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLinkIdsFieldBuilder() : null; - } else { - linkIdsBuilder_.addAllMessages(other.linkIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Topology) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - public context.ContextOuterClass.TopologyId getTopologyId() { - if (topologyIdBuilder_ == null) { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } else { - return topologyIdBuilder_.getMessage(); - } - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - topologyId_ = value; - onChanged(); - } else { - topologyIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder setTopologyId( - context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdBuilder_ == null) { - topologyId_ = builderForValue.build(); - onChanged(); - } else { - topologyIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = - context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); - } else { - topologyId_ = value; - } - onChanged(); - } else { - topologyIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; - topologyIdBuilder_ = null; - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { - - onChanged(); - return getTopologyIdFieldBuilder().getBuilder(); - } - /** - * .context.TopologyId topology_id = 1; - */ - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - if (topologyIdBuilder_ != null) { - return topologyIdBuilder_.getMessageOrBuilder(); - } else { - return topologyId_ == null ? - context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - } - /** - * .context.TopologyId topology_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> - getTopologyIdFieldBuilder() { - if (topologyIdBuilder_ == null) { - topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder>( - getTopologyId(), - getParentForChildren(), - isClean()); - topologyId_ = null; - } - return topologyIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List deviceIds_ = - java.util.Collections.emptyList(); - private void ensureDeviceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deviceIds_ = new java.util.ArrayList(deviceIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdsBuilder_; - - /** - * repeated .context.DeviceId device_ids = 3; - */ - public java.util.List getDeviceIdsList() { - if (deviceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(deviceIds_); - } else { - return deviceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public int getDeviceIdsCount() { - if (deviceIdsBuilder_ == null) { - return deviceIds_.size(); - } else { - return deviceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public context.ContextOuterClass.DeviceId getDeviceIds(int index) { - if (deviceIdsBuilder_ == null) { - return deviceIds_.get(index); - } else { - return deviceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder setDeviceIds( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.set(index, value); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder setDeviceIds( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder addDeviceIds(context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.add(value); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder addDeviceIds( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.add(index, value); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder addDeviceIds( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.add(builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder addDeviceIds( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder addAllDeviceIds( - java.lang.Iterable values) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deviceIds_); - onChanged(); - } else { - deviceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder clearDeviceIds() { - if (deviceIdsBuilder_ == null) { - deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - deviceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder removeDeviceIds(int index) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.remove(index); - onChanged(); - } else { - deviceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdsBuilder( - int index) { - return getDeviceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index) { - if (deviceIdsBuilder_ == null) { - return deviceIds_.get(index); } else { - return deviceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public java.util.List - getDeviceIdsOrBuilderList() { - if (deviceIdsBuilder_ != null) { - return deviceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deviceIds_); - } - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder() { - return getDeviceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder( - int index) { - return getDeviceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public java.util.List - getDeviceIdsBuilderList() { - return getDeviceIdsFieldBuilder().getBuilderList(); - } - 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()); - deviceIds_ = null; - } - return deviceIdsBuilder_; - } - - private java.util.List linkIds_ = - java.util.Collections.emptyList(); - private void ensureLinkIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - linkIds_ = new java.util.ArrayList(linkIds_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> linkIdsBuilder_; - - /** - * repeated .context.LinkId link_ids = 4; - */ - public java.util.List getLinkIdsList() { - if (linkIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(linkIds_); - } else { - return linkIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public int getLinkIdsCount() { - if (linkIdsBuilder_ == null) { - return linkIds_.size(); - } else { - return linkIdsBuilder_.getCount(); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId getLinkIds(int index) { - if (linkIdsBuilder_ == null) { - return linkIds_.get(index); - } else { - return linkIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder setLinkIds( - int index, context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.set(index, value); - onChanged(); - } else { - linkIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder setLinkIds( - int index, context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.set(index, builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds(context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.add(value); - onChanged(); - } else { - linkIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds( - int index, context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.add(index, value); - onChanged(); - } else { - linkIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds( - context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.add(builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds( - int index, context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.add(index, builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addAllLinkIds( - java.lang.Iterable values) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, linkIds_); - onChanged(); - } else { - linkIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder clearLinkIds() { - if (linkIdsBuilder_ == null) { - linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - linkIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder removeLinkIds(int index) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.remove(index); - onChanged(); - } else { - linkIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId.Builder getLinkIdsBuilder( - int index) { - return getLinkIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index) { - if (linkIdsBuilder_ == null) { - return linkIds_.get(index); } else { - return linkIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public java.util.List - getLinkIdsOrBuilderList() { - if (linkIdsBuilder_ != null) { - return linkIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(linkIds_); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder() { - return getLinkIdsFieldBuilder().addBuilder( - context.ContextOuterClass.LinkId.getDefaultInstance()); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder( - int index) { - return getLinkIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.LinkId.getDefaultInstance()); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public java.util.List - getLinkIdsBuilderList() { - return getLinkIdsFieldBuilder().getBuilderList(); - } - 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()); - linkIds_ = null; - } - return linkIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Topology) - } - // @@protoc_insertion_point(class_scope:context.Topology) - private static final context.ContextOuterClass.Topology DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Topology(); - } + public static Builder newBuilder(context.ContextOuterClass.Event prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static context.ContextOuterClass.Topology getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * Protobuf type {@code context.Event} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Event) + context.ContextOuterClass.EventOrBuilder { - @java.lang.Override - public context.ContextOuterClass.Topology getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Event_descriptor; + } - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Event_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Event.class, context.ContextOuterClass.Event.Builder.class); + } - public interface TopologyDetailsOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.TopologyDetails) - com.google.protobuf.MessageOrBuilder { + // Construct using context.ContextOuterClass.Event.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - boolean hasTopologyId(); - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - context.ContextOuterClass.TopologyId getTopologyId(); - /** - * .context.TopologyId topology_id = 1; - */ - context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - /** - * repeated .context.Device devices = 3; - */ - java.util.List - getDevicesList(); - /** - * repeated .context.Device devices = 3; - */ - context.ContextOuterClass.Device getDevices(int index); - /** - * repeated .context.Device devices = 3; - */ - int getDevicesCount(); - /** - * repeated .context.Device devices = 3; - */ - java.util.List - getDevicesOrBuilderList(); - /** - * repeated .context.Device devices = 3; - */ - context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder( - int index); + @java.lang.Override + public Builder clear() { + super.clear(); + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + eventType_ = 0; + return this; + } - /** - * repeated .context.Link links = 4; - */ - java.util.List - getLinksList(); - /** - * repeated .context.Link links = 4; - */ - context.ContextOuterClass.Link getLinks(int index); - /** - * repeated .context.Link links = 4; - */ - int getLinksCount(); - /** - * repeated .context.Link links = 4; - */ - java.util.List - getLinksOrBuilderList(); - /** - * repeated .context.Link links = 4; - */ - context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder( - int index); - } - /** - * Protobuf type {@code context.TopologyDetails} - */ - public static final class TopologyDetails extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.TopologyDetails) - TopologyDetailsOrBuilder { - private static final long serialVersionUID = 0L; - // Use TopologyDetails.newBuilder() to construct. - private TopologyDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TopologyDetails() { - name_ = ""; - devices_ = java.util.Collections.emptyList(); - links_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Event_descriptor; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TopologyDetails(); - } + @java.lang.Override + public context.ContextOuterClass.Event getDefaultInstanceForType() { + return context.ContextOuterClass.Event.getDefaultInstance(); + } - @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(); - 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(); - 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; - } + @java.lang.Override + public context.ContextOuterClass.Event build() { + context.ContextOuterClass.Event result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyDetails.class, context.ContextOuterClass.TopologyDetails.Builder.class); - } + @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(); + } + result.eventType_ = eventType_; + onBuilt(); + return result; + } - public static final int TOPOLOGY_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.TopologyId topologyId_; - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - @java.lang.Override - public boolean hasTopologyId() { - return topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - @java.lang.Override - public context.ContextOuterClass.TopologyId getTopologyId() { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - /** - * .context.TopologyId topology_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static final int DEVICES_FIELD_NUMBER = 3; - private java.util.List devices_; - /** - * repeated .context.Device devices = 3; - */ - @java.lang.Override - public java.util.List getDevicesList() { - return devices_; - } - /** - * repeated .context.Device devices = 3; - */ - @java.lang.Override - public java.util.List - getDevicesOrBuilderList() { - return devices_; - } - /** - * repeated .context.Device devices = 3; - */ - @java.lang.Override - public int getDevicesCount() { - return devices_.size(); - } - /** - * repeated .context.Device devices = 3; - */ - @java.lang.Override - public context.ContextOuterClass.Device getDevices(int index) { - return devices_.get(index); - } - /** - * repeated .context.Device devices = 3; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder( - int index) { - return devices_.get(index); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static final int LINKS_FIELD_NUMBER = 4; - private java.util.List links_; - /** - * repeated .context.Link links = 4; - */ - @java.lang.Override - public java.util.List getLinksList() { - return links_; - } - /** - * repeated .context.Link links = 4; - */ - @java.lang.Override - public java.util.List - getLinksOrBuilderList() { - return links_; - } - /** - * repeated .context.Link links = 4; - */ - @java.lang.Override - public int getLinksCount() { - return links_.size(); - } - /** - * repeated .context.Link links = 4; - */ - @java.lang.Override - public context.ContextOuterClass.Link getLinks(int index) { - return links_.get(index); - } - /** - * repeated .context.Link links = 4; - */ - @java.lang.Override - public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder( - int index) { - return links_.get(index); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - memoizedIsInitialized = 1; - return true; - } + @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 void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (topologyId_ != null) { - output.writeMessage(1, getTopologyId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - for (int i = 0; i < devices_.size(); i++) { - output.writeMessage(3, devices_.get(i)); - } - for (int i = 0; i < links_.size(); i++) { - output.writeMessage(4, links_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Event) { + return mergeFrom((context.ContextOuterClass.Event) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (topologyId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTopologyId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - for (int i = 0; i < devices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, devices_.get(i)); - } - for (int i = 0; i < links_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, links_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public Builder mergeFrom(context.ContextOuterClass.Event other) { + if (other == context.ContextOuterClass.Event.getDefaultInstance()) + return this; + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (other.eventType_ != 0) { + setEventTypeValue(other.getEventTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.TopologyDetails)) { - return super.equals(obj); - } - context.ContextOuterClass.TopologyDetails other = (context.ContextOuterClass.TopologyDetails) obj; - - if (hasTopologyId() != other.hasTopologyId()) return false; - if (hasTopologyId()) { - if (!getTopologyId() - .equals(other.getTopologyId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getDevicesList() - .equals(other.getDevicesList())) return false; - if (!getLinksList() - .equals(other.getLinksList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTopologyId()) { - hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; - hash = (53 * hash) + getTopologyId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getDevicesCount() > 0) { - hash = (37 * hash) + DEVICES_FIELD_NUMBER; - hash = (53 * hash) + getDevicesList().hashCode(); - } - if (getLinksCount() > 0) { - hash = (37 * hash) + LINKS_FIELD_NUMBER; - hash = (53 * hash) + getLinksList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Event) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - public static context.ContextOuterClass.TopologyDetails parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyDetails parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyDetails parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyDetails parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyDetails parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private context.ContextOuterClass.Timestamp timestamp_; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.TopologyDetails prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.TopologyDetails} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.TopologyDetails) - context.ContextOuterClass.TopologyDetailsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_TopologyDetails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyDetails.class, context.ContextOuterClass.TopologyDetails.Builder.class); - } - - // 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; - topologyIdBuilder_ = null; - } - name_ = ""; - - if (devicesBuilder_ == null) { - devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - devicesBuilder_.clear(); - } - if (linksBuilder_ == null) { - links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - linksBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TopologyDetails_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyDetails getDefaultInstanceForType() { - return context.ContextOuterClass.TopologyDetails.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.TopologyDetails build() { - context.ContextOuterClass.TopologyDetails result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - if (devicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - devices_ = java.util.Collections.unmodifiableList(devices_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.devices_ = devices_; - } else { - result.devices_ = devicesBuilder_.build(); - } - if (linksBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - links_ = java.util.Collections.unmodifiableList(links_); - bitField0_ = (bitField0_ & ~0x00000002); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TopologyDetails) { - return mergeFrom((context.ContextOuterClass.TopologyDetails)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.TopologyDetails other) { - if (other == context.ContextOuterClass.TopologyDetails.getDefaultInstance()) return this; - if (other.hasTopologyId()) { - mergeTopologyId(other.getTopologyId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (devicesBuilder_ == null) { - if (!other.devices_.isEmpty()) { - if (devices_.isEmpty()) { - devices_ = other.devices_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDevicesIsMutable(); - devices_.addAll(other.devices_); - } - onChanged(); - } - } else { - if (!other.devices_.isEmpty()) { - if (devicesBuilder_.isEmpty()) { - devicesBuilder_.dispose(); - devicesBuilder_ = null; - devices_ = other.devices_; - bitField0_ = (bitField0_ & ~0x00000001); - devicesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDevicesFieldBuilder() : null; - } else { - devicesBuilder_.addAllMessages(other.devices_); + /** + * .context.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; } - } - } - if (linksBuilder_ == null) { - if (!other.links_.isEmpty()) { - if (links_.isEmpty()) { - links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLinksIsMutable(); - links_.addAll(other.links_); - } - onChanged(); - } - } else { - if (!other.links_.isEmpty()) { - if (linksBuilder_.isEmpty()) { - linksBuilder_.dispose(); - linksBuilder_ = null; - links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000002); - linksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLinksFieldBuilder() : null; - } else { - linksBuilder_.addAllMessages(other.links_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyDetails) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - public context.ContextOuterClass.TopologyId getTopologyId() { - if (topologyIdBuilder_ == null) { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } else { - return topologyIdBuilder_.getMessage(); - } - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - topologyId_ = value; - onChanged(); - } else { - topologyIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder setTopologyId( - context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdBuilder_ == null) { - topologyId_ = builderForValue.build(); - onChanged(); - } else { - topologyIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = - context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); - } else { - topologyId_ = value; - } - onChanged(); - } else { - topologyIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; - topologyIdBuilder_ = null; - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { - - onChanged(); - return getTopologyIdFieldBuilder().getBuilder(); - } - /** - * .context.TopologyId topology_id = 1; - */ - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - if (topologyIdBuilder_ != null) { - return topologyIdBuilder_.getMessageOrBuilder(); - } else { - return topologyId_ == null ? - context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - } - /** - * .context.TopologyId topology_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> - getTopologyIdFieldBuilder() { - if (topologyIdBuilder_ == null) { - topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder>( - getTopologyId(), - getParentForChildren(), - isClean()); - topologyId_ = null; - } - return topologyIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List devices_ = - java.util.Collections.emptyList(); - private void ensureDevicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - devices_ = new java.util.ArrayList(devices_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Device, context.ContextOuterClass.Device.Builder, context.ContextOuterClass.DeviceOrBuilder> devicesBuilder_; - - /** - * repeated .context.Device devices = 3; - */ - public java.util.List getDevicesList() { - if (devicesBuilder_ == null) { - return java.util.Collections.unmodifiableList(devices_); - } else { - return devicesBuilder_.getMessageList(); - } - } - /** - * repeated .context.Device devices = 3; - */ - public int getDevicesCount() { - if (devicesBuilder_ == null) { - return devices_.size(); - } else { - return devicesBuilder_.getCount(); - } - } - /** - * repeated .context.Device devices = 3; - */ - public context.ContextOuterClass.Device getDevices(int index) { - if (devicesBuilder_ == null) { - return devices_.get(index); - } else { - return devicesBuilder_.getMessage(index); - } - } - /** - * repeated .context.Device devices = 3; - */ - public Builder setDevices( - int index, context.ContextOuterClass.Device value) { - if (devicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevicesIsMutable(); - devices_.set(index, value); - onChanged(); - } else { - devicesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder setDevices( - int index, context.ContextOuterClass.Device.Builder builderForValue) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.set(index, builderForValue.build()); - onChanged(); - } else { - devicesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder addDevices(context.ContextOuterClass.Device value) { - if (devicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevicesIsMutable(); - devices_.add(value); - onChanged(); - } else { - devicesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder addDevices( - int index, context.ContextOuterClass.Device value) { - if (devicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevicesIsMutable(); - devices_.add(index, value); - onChanged(); - } else { - devicesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder addDevices( - context.ContextOuterClass.Device.Builder builderForValue) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.add(builderForValue.build()); - onChanged(); - } else { - devicesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder addDevices( - int index, context.ContextOuterClass.Device.Builder builderForValue) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.add(index, builderForValue.build()); - onChanged(); - } else { - devicesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder addAllDevices( - java.lang.Iterable values) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, devices_); - onChanged(); - } else { - devicesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder clearDevices() { - if (devicesBuilder_ == null) { - devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - devicesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder removeDevices(int index) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.remove(index); - onChanged(); - } else { - devicesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public context.ContextOuterClass.Device.Builder getDevicesBuilder( - int index) { - return getDevicesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Device devices = 3; - */ - public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder( - int index) { - if (devicesBuilder_ == null) { - return devices_.get(index); } else { - return devicesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Device devices = 3; - */ - public java.util.List - getDevicesOrBuilderList() { - if (devicesBuilder_ != null) { - return devicesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(devices_); - } - } - /** - * repeated .context.Device devices = 3; - */ - public context.ContextOuterClass.Device.Builder addDevicesBuilder() { - return getDevicesFieldBuilder().addBuilder( - context.ContextOuterClass.Device.getDefaultInstance()); - } - /** - * repeated .context.Device devices = 3; - */ - public context.ContextOuterClass.Device.Builder addDevicesBuilder( - int index) { - return getDevicesFieldBuilder().addBuilder( - index, context.ContextOuterClass.Device.getDefaultInstance()); - } - /** - * repeated .context.Device devices = 3; - */ - public java.util.List - getDevicesBuilderList() { - return getDevicesFieldBuilder().getBuilderList(); - } - 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()); - devices_ = null; - } - return devicesBuilder_; - } - - private java.util.List links_ = - java.util.Collections.emptyList(); - private void ensureLinksIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - links_ = new java.util.ArrayList(links_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Link, context.ContextOuterClass.Link.Builder, context.ContextOuterClass.LinkOrBuilder> linksBuilder_; - - /** - * repeated .context.Link links = 4; - */ - public java.util.List getLinksList() { - if (linksBuilder_ == null) { - return java.util.Collections.unmodifiableList(links_); - } else { - return linksBuilder_.getMessageList(); - } - } - /** - * repeated .context.Link links = 4; - */ - public int getLinksCount() { - if (linksBuilder_ == null) { - return links_.size(); - } else { - return linksBuilder_.getCount(); - } - } - /** - * repeated .context.Link links = 4; - */ - public context.ContextOuterClass.Link getLinks(int index) { - if (linksBuilder_ == null) { - return links_.get(index); - } else { - return linksBuilder_.getMessage(index); - } - } - /** - * repeated .context.Link links = 4; - */ - public Builder setLinks( - int index, context.ContextOuterClass.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.set(index, value); - onChanged(); - } else { - linksBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder setLinks( - int index, context.ContextOuterClass.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.set(index, builderForValue.build()); - onChanged(); - } else { - linksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder addLinks(context.ContextOuterClass.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.add(value); - onChanged(); - } else { - linksBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder addLinks( - int index, context.ContextOuterClass.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.add(index, value); - onChanged(); - } else { - linksBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder addLinks( - context.ContextOuterClass.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.add(builderForValue.build()); - onChanged(); - } else { - linksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder addLinks( - int index, context.ContextOuterClass.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.add(index, builderForValue.build()); - onChanged(); - } else { - linksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder addAllLinks( - java.lang.Iterable values) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, links_); - onChanged(); - } else { - linksBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder clearLinks() { - if (linksBuilder_ == null) { - links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - linksBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder removeLinks(int index) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.remove(index); - onChanged(); - } else { - linksBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public context.ContextOuterClass.Link.Builder getLinksBuilder( - int index) { - return getLinksFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Link links = 4; - */ - public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder( - int index) { - if (linksBuilder_ == null) { - return links_.get(index); } else { - return linksBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Link links = 4; - */ - public java.util.List - getLinksOrBuilderList() { - if (linksBuilder_ != null) { - return linksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(links_); - } - } - /** - * repeated .context.Link links = 4; - */ - public context.ContextOuterClass.Link.Builder addLinksBuilder() { - return getLinksFieldBuilder().addBuilder( - context.ContextOuterClass.Link.getDefaultInstance()); - } - /** - * repeated .context.Link links = 4; - */ - public context.ContextOuterClass.Link.Builder addLinksBuilder( - int index) { - return getLinksFieldBuilder().addBuilder( - index, context.ContextOuterClass.Link.getDefaultInstance()); - } - /** - * repeated .context.Link links = 4; - */ - public java.util.List - getLinksBuilderList() { - return getLinksFieldBuilder().getBuilderList(); - } - 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()); - links_ = null; - } - return linksBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.TopologyDetails) - } - // @@protoc_insertion_point(class_scope:context.TopologyDetails) - private static final context.ContextOuterClass.TopologyDetails DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyDetails(); - } + /** + * .context.Timestamp timestamp = 1; + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } - public static context.ContextOuterClass.TopologyDetails getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Timestamp timestamp = 1; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Timestamp timestamp = 1; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Timestamp timestamp = 1; + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + return this; + } - @java.lang.Override - public context.ContextOuterClass.TopologyDetails getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Timestamp timestamp = 1; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } - } + /** + * .context.Timestamp timestamp = 1; + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } - public interface TopologyIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.TopologyIdList) - com.google.protobuf.MessageOrBuilder { + /** + * .context.Timestamp timestamp = 1; + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - java.util.List - getTopologyIdsList(); - /** - * repeated .context.TopologyId topology_ids = 1; - */ - context.ContextOuterClass.TopologyId getTopologyIds(int index); - /** - * repeated .context.TopologyId topology_ids = 1; - */ - int getTopologyIdsCount(); - /** - * repeated .context.TopologyId topology_ids = 1; - */ - java.util.List - getTopologyIdsOrBuilderList(); - /** - * repeated .context.TopologyId topology_ids = 1; - */ - context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.TopologyIdList} - */ - public static final class TopologyIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.TopologyIdList) - TopologyIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use TopologyIdList.newBuilder() to construct. - private TopologyIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TopologyIdList() { - topologyIds_ = java.util.Collections.emptyList(); - } + /** + * .context.Timestamp timestamp = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TopologyIdList(); - } + private int eventType_ = 0; - @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(); - 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; - } + /** + * .context.EventTypeEnum event_type = 2; + * @return The enum numeric value on the wire for eventType. + */ + @java.lang.Override + public int getEventTypeValue() { + return eventType_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyIdList.class, context.ContextOuterClass.TopologyIdList.Builder.class); - } + /** + * .context.EventTypeEnum event_type = 2; + * @param value The enum numeric value on the wire for eventType to set. + * @return This builder for chaining. + */ + public Builder setEventTypeValue(int value) { + eventType_ = value; + onChanged(); + return this; + } - public static final int TOPOLOGY_IDS_FIELD_NUMBER = 1; - private java.util.List topologyIds_; - /** - * repeated .context.TopologyId topology_ids = 1; - */ - @java.lang.Override - public java.util.List getTopologyIdsList() { - return topologyIds_; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - @java.lang.Override - public java.util.List - getTopologyIdsOrBuilderList() { - return topologyIds_; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - @java.lang.Override - public int getTopologyIdsCount() { - return topologyIds_.size(); - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyId getTopologyIds(int index) { - return topologyIds_.get(index); - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder( - int index) { - return topologyIds_.get(index); - } + /** + * .context.EventTypeEnum event_type = 2; + * @return The eventType. + */ + @java.lang.Override + public context.ContextOuterClass.EventTypeEnum getEventType() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.valueOf(eventType_); + return result == null ? context.ContextOuterClass.EventTypeEnum.UNRECOGNIZED : result; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.EventTypeEnum event_type = 2; + * @param value The eventType to set. + * @return This builder for chaining. + */ + public Builder setEventType(context.ContextOuterClass.EventTypeEnum value) { + if (value == null) { + throw new NullPointerException(); + } + eventType_ = value.getNumber(); + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.EventTypeEnum event_type = 2; + * @return This builder for chaining. + */ + public Builder clearEventType() { + eventType_ = 0; + onChanged(); + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < topologyIds_.size(); i++) { - output.writeMessage(1, topologyIds_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < topologyIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, topologyIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Event) + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.TopologyIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.TopologyIdList other = (context.ContextOuterClass.TopologyIdList) obj; - - if (!getTopologyIdsList() - .equals(other.getTopologyIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + // @@protoc_insertion_point(class_scope:context.Event) + private static final context.ContextOuterClass.Event DEFAULT_INSTANCE; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getTopologyIdsCount() > 0) { - hash = (37 * hash) + TOPOLOGY_IDS_FIELD_NUMBER; - hash = (53 * hash) + getTopologyIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Event(); + } - public static context.ContextOuterClass.TopologyIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.Event getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.TopologyIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.TopologyIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.TopologyIdList) - context.ContextOuterClass.TopologyIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_TopologyIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyIdList.class, context.ContextOuterClass.TopologyIdList.Builder.class); - } - - // 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(); - if (topologyIdsBuilder_ == null) { - topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - topologyIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TopologyIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyIdList getDefaultInstanceForType() { - return context.ContextOuterClass.TopologyIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.TopologyIdList build() { - context.ContextOuterClass.TopologyIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyIdList buildPartial() { - context.ContextOuterClass.TopologyIdList result = new context.ContextOuterClass.TopologyIdList(this); - int from_bitField0_ = bitField0_; - if (topologyIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.topologyIds_ = topologyIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TopologyIdList) { - return mergeFrom((context.ContextOuterClass.TopologyIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.TopologyIdList other) { - if (other == context.ContextOuterClass.TopologyIdList.getDefaultInstance()) return this; - if (topologyIdsBuilder_ == null) { - if (!other.topologyIds_.isEmpty()) { - if (topologyIds_.isEmpty()) { - topologyIds_ = other.topologyIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTopologyIdsIsMutable(); - topologyIds_.addAll(other.topologyIds_); - } - onChanged(); - } - } else { - if (!other.topologyIds_.isEmpty()) { - if (topologyIdsBuilder_.isEmpty()) { - topologyIdsBuilder_.dispose(); - topologyIdsBuilder_ = null; - topologyIds_ = other.topologyIds_; - bitField0_ = (bitField0_ & ~0x00000001); - topologyIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTopologyIdsFieldBuilder() : null; - } else { - topologyIdsBuilder_.addAllMessages(other.topologyIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List topologyIds_ = - java.util.Collections.emptyList(); - private void ensureTopologyIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - topologyIds_ = new java.util.ArrayList(topologyIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> topologyIdsBuilder_; - - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public java.util.List getTopologyIdsList() { - if (topologyIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(topologyIds_); - } else { - return topologyIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public int getTopologyIdsCount() { - if (topologyIdsBuilder_ == null) { - return topologyIds_.size(); - } else { - return topologyIdsBuilder_.getCount(); - } - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public context.ContextOuterClass.TopologyId getTopologyIds(int index) { - if (topologyIdsBuilder_ == null) { - return topologyIds_.get(index); - } else { - return topologyIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder setTopologyIds( - int index, context.ContextOuterClass.TopologyId value) { - if (topologyIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologyIdsIsMutable(); - topologyIds_.set(index, value); - onChanged(); - } else { - topologyIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder setTopologyIds( - int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.set(index, builderForValue.build()); - onChanged(); - } else { - topologyIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder addTopologyIds(context.ContextOuterClass.TopologyId value) { - if (topologyIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologyIdsIsMutable(); - topologyIds_.add(value); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder addTopologyIds( - int index, context.ContextOuterClass.TopologyId value) { - if (topologyIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologyIdsIsMutable(); - topologyIds_.add(index, value); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder addTopologyIds( - context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.add(builderForValue.build()); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder addTopologyIds( - int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.add(index, builderForValue.build()); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder addAllTopologyIds( - java.lang.Iterable values) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, topologyIds_); - onChanged(); - } else { - topologyIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder clearTopologyIds() { - if (topologyIdsBuilder_ == null) { - topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - topologyIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder removeTopologyIds(int index) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.remove(index); - onChanged(); - } else { - topologyIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public context.ContextOuterClass.TopologyId.Builder getTopologyIdsBuilder( - int index) { - return getTopologyIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder( - int index) { - if (topologyIdsBuilder_ == null) { - return topologyIds_.get(index); } else { - return topologyIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public java.util.List - getTopologyIdsOrBuilderList() { - if (topologyIdsBuilder_ != null) { - return topologyIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(topologyIds_); - } - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder() { - return getTopologyIdsFieldBuilder().addBuilder( - context.ContextOuterClass.TopologyId.getDefaultInstance()); - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder( - int index) { - return getTopologyIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.TopologyId.getDefaultInstance()); - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public java.util.List - getTopologyIdsBuilderList() { - return getTopologyIdsFieldBuilder().getBuilderList(); - } - 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()); - topologyIds_ = null; - } - return topologyIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.TopologyIdList) - } + @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); + } + }; - // @@protoc_insertion_point(class_scope:context.TopologyIdList) - private static final context.ContextOuterClass.TopologyIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyIdList(); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - public static context.ContextOuterClass.TopologyIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; + @java.lang.Override + public context.ContextOuterClass.Event getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public interface ContextIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ContextId) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public context.ContextOuterClass.TopologyIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid context_uuid = 1; + * @return Whether the contextUuid field is set. + */ + boolean hasContextUuid(); - } + /** + * .context.Uuid context_uuid = 1; + * @return The contextUuid. + */ + context.ContextOuterClass.Uuid getContextUuid(); - public interface TopologyListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.TopologyList) - com.google.protobuf.MessageOrBuilder { + /** + * .context.Uuid context_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder(); + } /** - * repeated .context.Topology topologies = 1; - */ - java.util.List - getTopologiesList(); - /** - * repeated .context.Topology topologies = 1; - */ - context.ContextOuterClass.Topology getTopologies(int index); - /** - * repeated .context.Topology topologies = 1; - */ - int getTopologiesCount(); - /** - * repeated .context.Topology topologies = 1; + *
+     * ----- Context -------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.ContextId} */ - java.util.List - getTopologiesOrBuilderList(); - /** - * repeated .context.Topology topologies = 1; - */ - context.ContextOuterClass.TopologyOrBuilder getTopologiesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.TopologyList} - */ - public static final class TopologyList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.TopologyList) - TopologyListOrBuilder { - private static final long serialVersionUID = 0L; - // Use TopologyList.newBuilder() to construct. - private TopologyList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TopologyList() { - topologies_ = java.util.Collections.emptyList(); - } + public static final class ContextId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ContextId) + ContextIdOrBuilder { - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TopologyList(); - } + private static final long serialVersionUID = 0L; - @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(); - 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; - } + // Use ContextId.newBuilder() to construct. + private ContextId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyList.class, context.ContextOuterClass.TopologyList.Builder.class); - } + private ContextId() { + } - public static final int TOPOLOGIES_FIELD_NUMBER = 1; - private java.util.List topologies_; - /** - * repeated .context.Topology topologies = 1; - */ - @java.lang.Override - public java.util.List getTopologiesList() { - return topologies_; - } - /** - * repeated .context.Topology topologies = 1; - */ - @java.lang.Override - public java.util.List - getTopologiesOrBuilderList() { - return topologies_; - } - /** - * repeated .context.Topology topologies = 1; - */ - @java.lang.Override - public int getTopologiesCount() { - return topologies_.size(); - } - /** - * repeated .context.Topology topologies = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Topology getTopologies(int index) { - return topologies_.get(index); - } - /** - * repeated .context.Topology topologies = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyOrBuilder getTopologiesOrBuilder( - int index) { - return topologies_.get(index); - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContextId(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - memoizedIsInitialized = 1; - return true; - } + 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(); + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < topologies_.size(); i++) { - output.writeMessage(1, topologies_.get(i)); - } - unknownFields.writeTo(output); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ContextId_descriptor; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < topologies_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, topologies_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextId.class, context.ContextOuterClass.ContextId.Builder.class); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.TopologyList)) { - return super.equals(obj); - } - context.ContextOuterClass.TopologyList other = (context.ContextOuterClass.TopologyList) obj; - - if (!getTopologiesList() - .equals(other.getTopologiesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static final int CONTEXT_UUID_FIELD_NUMBER = 1; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getTopologiesCount() > 0) { - hash = (37 * hash) + TOPOLOGIES_FIELD_NUMBER; - hash = (53 * hash) + getTopologiesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private context.ContextOuterClass.Uuid contextUuid_; - public static context.ContextOuterClass.TopologyList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Uuid context_uuid = 1; + * @return Whether the contextUuid field is set. + */ + @java.lang.Override + public boolean hasContextUuid() { + return contextUuid_ != null; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.TopologyList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Uuid context_uuid = 1; + * @return The contextUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getContextUuid() { + return contextUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.TopologyList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.TopologyList) - context.ContextOuterClass.TopologyListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_TopologyList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyList.class, context.ContextOuterClass.TopologyList.Builder.class); - } - - // 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(); - if (topologiesBuilder_ == null) { - topologies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - topologiesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TopologyList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyList getDefaultInstanceForType() { - return context.ContextOuterClass.TopologyList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.TopologyList build() { - context.ContextOuterClass.TopologyList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyList buildPartial() { - context.ContextOuterClass.TopologyList result = new context.ContextOuterClass.TopologyList(this); - int from_bitField0_ = bitField0_; - if (topologiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - topologies_ = java.util.Collections.unmodifiableList(topologies_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.topologies_ = topologies_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TopologyList) { - return mergeFrom((context.ContextOuterClass.TopologyList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.TopologyList other) { - if (other == context.ContextOuterClass.TopologyList.getDefaultInstance()) return this; - if (topologiesBuilder_ == null) { - if (!other.topologies_.isEmpty()) { - if (topologies_.isEmpty()) { - topologies_ = other.topologies_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTopologiesIsMutable(); - topologies_.addAll(other.topologies_); - } - onChanged(); - } - } else { - if (!other.topologies_.isEmpty()) { - if (topologiesBuilder_.isEmpty()) { - topologiesBuilder_.dispose(); - topologiesBuilder_ = null; - topologies_ = other.topologies_; - bitField0_ = (bitField0_ & ~0x00000001); - topologiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTopologiesFieldBuilder() : null; - } else { - topologiesBuilder_.addAllMessages(other.topologies_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List topologies_ = - java.util.Collections.emptyList(); - private void ensureTopologiesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - topologies_ = new java.util.ArrayList(topologies_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Topology, context.ContextOuterClass.Topology.Builder, context.ContextOuterClass.TopologyOrBuilder> topologiesBuilder_; - - /** - * repeated .context.Topology topologies = 1; - */ - public java.util.List getTopologiesList() { - if (topologiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(topologies_); - } else { - return topologiesBuilder_.getMessageList(); - } - } - /** - * repeated .context.Topology topologies = 1; - */ - public int getTopologiesCount() { - if (topologiesBuilder_ == null) { - return topologies_.size(); - } else { - return topologiesBuilder_.getCount(); - } - } - /** - * repeated .context.Topology topologies = 1; - */ - public context.ContextOuterClass.Topology getTopologies(int index) { - if (topologiesBuilder_ == null) { - return topologies_.get(index); - } else { - return topologiesBuilder_.getMessage(index); - } - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder setTopologies( - int index, context.ContextOuterClass.Topology value) { - if (topologiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologiesIsMutable(); - topologies_.set(index, value); - onChanged(); - } else { - topologiesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder setTopologies( - int index, context.ContextOuterClass.Topology.Builder builderForValue) { - if (topologiesBuilder_ == null) { - ensureTopologiesIsMutable(); - topologies_.set(index, builderForValue.build()); - onChanged(); - } else { - topologiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder addTopologies(context.ContextOuterClass.Topology value) { - if (topologiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologiesIsMutable(); - topologies_.add(value); - onChanged(); - } else { - topologiesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder addTopologies( - int index, context.ContextOuterClass.Topology value) { - if (topologiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologiesIsMutable(); - topologies_.add(index, value); - onChanged(); - } else { - topologiesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder addTopologies( - context.ContextOuterClass.Topology.Builder builderForValue) { - if (topologiesBuilder_ == null) { - ensureTopologiesIsMutable(); - topologies_.add(builderForValue.build()); - onChanged(); - } else { - topologiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder addTopologies( - int index, context.ContextOuterClass.Topology.Builder builderForValue) { - if (topologiesBuilder_ == null) { - ensureTopologiesIsMutable(); - topologies_.add(index, builderForValue.build()); - onChanged(); - } else { - topologiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder addAllTopologies( - java.lang.Iterable values) { - if (topologiesBuilder_ == null) { - ensureTopologiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, topologies_); - onChanged(); - } else { - topologiesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder clearTopologies() { - if (topologiesBuilder_ == null) { - topologies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - topologiesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder removeTopologies(int index) { - if (topologiesBuilder_ == null) { - ensureTopologiesIsMutable(); - topologies_.remove(index); - onChanged(); - } else { - topologiesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public context.ContextOuterClass.Topology.Builder getTopologiesBuilder( - int index) { - return getTopologiesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Topology topologies = 1; - */ - public context.ContextOuterClass.TopologyOrBuilder getTopologiesOrBuilder( - int index) { - if (topologiesBuilder_ == null) { - return topologies_.get(index); } else { - return topologiesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Topology topologies = 1; - */ - public java.util.List - getTopologiesOrBuilderList() { - if (topologiesBuilder_ != null) { - return topologiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(topologies_); - } - } - /** - * repeated .context.Topology topologies = 1; - */ - public context.ContextOuterClass.Topology.Builder addTopologiesBuilder() { - return getTopologiesFieldBuilder().addBuilder( - context.ContextOuterClass.Topology.getDefaultInstance()); - } - /** - * repeated .context.Topology topologies = 1; - */ - public context.ContextOuterClass.Topology.Builder addTopologiesBuilder( - int index) { - return getTopologiesFieldBuilder().addBuilder( - index, context.ContextOuterClass.Topology.getDefaultInstance()); - } - /** - * repeated .context.Topology topologies = 1; - */ - public java.util.List - getTopologiesBuilderList() { - return getTopologiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Topology, context.ContextOuterClass.Topology.Builder, context.ContextOuterClass.TopologyOrBuilder> - getTopologiesFieldBuilder() { - if (topologiesBuilder_ == null) { - topologiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Topology, context.ContextOuterClass.Topology.Builder, context.ContextOuterClass.TopologyOrBuilder>( - topologies_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - topologies_ = null; - } - return topologiesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.TopologyList) - } + /** + * .context.Uuid context_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder() { + return getContextUuid(); + } - // @@protoc_insertion_point(class_scope:context.TopologyList) - private static final context.ContextOuterClass.TopologyList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyList(); - } + private byte memoizedIsInitialized = -1; - public static context.ContextOuterClass.TopologyList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextUuid_ != null) { + output.writeMessage(1, getContextUuid()); + } + unknownFields.writeTo(output); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public context.ContextOuterClass.TopologyList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ContextId)) { + return super.equals(obj); + } + context.ContextOuterClass.ContextId other = (context.ContextOuterClass.ContextId) obj; + if (hasContextUuid() != other.hasContextUuid()) + return false; + if (hasContextUuid()) { + if (!getContextUuid().equals(other.getContextUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextUuid()) { + hash = (37 * hash) + CONTEXT_UUID_FIELD_NUMBER; + hash = (53 * hash) + getContextUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - public interface TopologyEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.TopologyEvent) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.ContextId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + public static context.ContextOuterClass.ContextId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * .context.TopologyId topology_id = 2; - * @return Whether the topologyId field is set. - */ - boolean hasTopologyId(); - /** - * .context.TopologyId topology_id = 2; - * @return The topologyId. - */ - context.ContextOuterClass.TopologyId getTopologyId(); - /** - * .context.TopologyId topology_id = 2; - */ - context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); - } - /** - * Protobuf type {@code context.TopologyEvent} - */ - public static final class TopologyEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.TopologyEvent) - TopologyEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use TopologyEvent.newBuilder() to construct. - private TopologyEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TopologyEvent() { - } + public static context.ContextOuterClass.ContextId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TopologyEvent(); - } + public static context.ContextOuterClass.ContextId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @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; - } + public static context.ContextOuterClass.ContextId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyEvent.class, context.ContextOuterClass.TopologyEvent.Builder.class); - } + public static context.ContextOuterClass.ContextId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + public static context.ContextOuterClass.ContextId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static final int TOPOLOGY_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.TopologyId topologyId_; - /** - * .context.TopologyId topology_id = 2; - * @return Whether the topologyId field is set. - */ - @java.lang.Override - public boolean hasTopologyId() { - return topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 2; - * @return The topologyId. - */ - @java.lang.Override - public context.ContextOuterClass.TopologyId getTopologyId() { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - /** - * .context.TopologyId topology_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); - } + public static context.ContextOuterClass.ContextId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.ContextId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.ContextId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (topologyId_ != null) { - output.writeMessage(2, getTopologyId()); - } - unknownFields.writeTo(output); - } + public static context.ContextOuterClass.ContextId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (topologyId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getTopologyId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.ContextId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.TopologyEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.TopologyEvent other = (context.ContextOuterClass.TopologyEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasTopologyId() != other.hasTopologyId()) return false; - if (hasTopologyId()) { - if (!getTopologyId() - .equals(other.getTopologyId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasTopologyId()) { - hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; - hash = (53 * hash) + getTopologyId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public static context.ContextOuterClass.TopologyEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static Builder newBuilder(context.ContextOuterClass.ContextId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.TopologyEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.TopologyEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.TopologyEvent) - context.ContextOuterClass.TopologyEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_TopologyEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyEvent.class, context.ContextOuterClass.TopologyEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (topologyIdBuilder_ == null) { - topologyId_ = null; - } else { - topologyId_ = null; - topologyIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TopologyEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyEvent getDefaultInstanceForType() { - return context.ContextOuterClass.TopologyEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.TopologyEvent build() { - context.ContextOuterClass.TopologyEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TopologyEvent) { - return mergeFrom((context.ContextOuterClass.TopologyEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.TopologyEvent other) { - if (other == context.ContextOuterClass.TopologyEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasTopologyId()) { - mergeTopologyId(other.getTopologyId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.TopologyId topologyId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> topologyIdBuilder_; - /** - * .context.TopologyId topology_id = 2; - * @return Whether the topologyId field is set. - */ - public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 2; - * @return The topologyId. - */ - public context.ContextOuterClass.TopologyId getTopologyId() { - if (topologyIdBuilder_ == null) { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } else { - return topologyIdBuilder_.getMessage(); - } - } - /** - * .context.TopologyId topology_id = 2; - */ - public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - topologyId_ = value; - onChanged(); - } else { - topologyIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 2; - */ - public Builder setTopologyId( - context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdBuilder_ == null) { - topologyId_ = builderForValue.build(); - onChanged(); - } else { - topologyIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.TopologyId topology_id = 2; - */ - public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = - context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); - } else { - topologyId_ = value; - } - onChanged(); - } else { - topologyIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 2; - */ - public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; - topologyIdBuilder_ = null; - } - - return this; - } - /** - * .context.TopologyId topology_id = 2; - */ - public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { - - onChanged(); - return getTopologyIdFieldBuilder().getBuilder(); - } - /** - * .context.TopologyId topology_id = 2; - */ - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - if (topologyIdBuilder_ != null) { - return topologyIdBuilder_.getMessageOrBuilder(); - } else { - return topologyId_ == null ? - context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - } - /** - * .context.TopologyId topology_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> - getTopologyIdFieldBuilder() { - if (topologyIdBuilder_ == null) { - topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder>( - getTopologyId(), - getParentForChildren(), - isClean()); - topologyId_ = null; - } - return topologyIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.TopologyEvent) - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - // @@protoc_insertion_point(class_scope:context.TopologyEvent) - private static final context.ContextOuterClass.TopologyEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyEvent(); - } + /** + *
+         * ----- Context -------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.ContextId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ContextId) + context.ContextOuterClass.ContextIdOrBuilder { - public static context.ContextOuterClass.TopologyEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ContextId_descriptor; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextId.class, context.ContextOuterClass.ContextId.Builder.class); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + // Construct using context.ContextOuterClass.ContextId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public context.ContextOuterClass.TopologyEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - public interface DeviceIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.DeviceId) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder clear() { + super.clear(); + if (contextUuidBuilder_ == null) { + contextUuid_ = null; + } else { + contextUuid_ = null; + contextUuidBuilder_ = null; + } + return this; + } - /** - * .context.Uuid device_uuid = 1; - * @return Whether the deviceUuid field is set. - */ - boolean hasDeviceUuid(); - /** - * .context.Uuid device_uuid = 1; - * @return The deviceUuid. - */ - context.ContextOuterClass.Uuid getDeviceUuid(); - /** - * .context.Uuid device_uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder(); - } - /** - *
-   * ----- Device --------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.DeviceId} - */ - public static final class DeviceId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.DeviceId) - DeviceIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceId.newBuilder() to construct. - private DeviceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceId() { - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ContextId_descriptor; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceId(); - } + @java.lang.Override + public context.ContextOuterClass.ContextId getDefaultInstanceForType() { + return context.ContextOuterClass.ContextId.getDefaultInstance(); + } - @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; - } + @java.lang.Override + public context.ContextOuterClass.ContextId build() { + context.ContextOuterClass.ContextId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceId.class, context.ContextOuterClass.DeviceId.Builder.class); - } + @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(); + } + onBuilt(); + return result; + } - public static final int DEVICE_UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid deviceUuid_; - /** - * .context.Uuid device_uuid = 1; - * @return Whether the deviceUuid field is set. - */ - @java.lang.Override - public boolean hasDeviceUuid() { - return deviceUuid_ != null; - } - /** - * .context.Uuid device_uuid = 1; - * @return The deviceUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getDeviceUuid() { - return deviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; - } - /** - * .context.Uuid device_uuid = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder() { - return getDeviceUuid(); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (deviceUuid_ != null) { - output.writeMessage(1, getDeviceUuid()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (deviceUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDeviceUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @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 boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.DeviceId)) { - return super.equals(obj); - } - context.ContextOuterClass.DeviceId other = (context.ContextOuterClass.DeviceId) obj; - - if (hasDeviceUuid() != other.hasDeviceUuid()) return false; - if (hasDeviceUuid()) { - if (!getDeviceUuid() - .equals(other.getDeviceUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @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 int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDeviceUuid()) { - hash = (37 * hash) + DEVICE_UUID_FIELD_NUMBER; - hash = (53 * hash) + getDeviceUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ContextId) { + return mergeFrom((context.ContextOuterClass.ContextId) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static context.ContextOuterClass.DeviceId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public Builder mergeFrom(context.ContextOuterClass.ContextId other) { + if (other == context.ContextOuterClass.ContextId.getDefaultInstance()) + return this; + if (other.hasContextUuid()) { + mergeContextUuid(other.getContextUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.DeviceId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Device --------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.DeviceId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.DeviceId) - context.ContextOuterClass.DeviceIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_DeviceId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceId.class, context.ContextOuterClass.DeviceId.Builder.class); - } - - // 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; - deviceUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_DeviceId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceId getDefaultInstanceForType() { - return context.ContextOuterClass.DeviceId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.DeviceId build() { - context.ContextOuterClass.DeviceId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.DeviceId) { - return mergeFrom((context.ContextOuterClass.DeviceId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.DeviceId other) { - if (other == context.ContextOuterClass.DeviceId.getDefaultInstance()) return this; - if (other.hasDeviceUuid()) { - mergeDeviceUuid(other.getDeviceUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid deviceUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> deviceUuidBuilder_; - /** - * .context.Uuid device_uuid = 1; - * @return Whether the deviceUuid field is set. - */ - public boolean hasDeviceUuid() { - return deviceUuidBuilder_ != null || deviceUuid_ != null; - } - /** - * .context.Uuid device_uuid = 1; - * @return The deviceUuid. - */ - public context.ContextOuterClass.Uuid getDeviceUuid() { - if (deviceUuidBuilder_ == null) { - return deviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; - } else { - return deviceUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid device_uuid = 1; - */ - public Builder setDeviceUuid(context.ContextOuterClass.Uuid value) { - if (deviceUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceUuid_ = value; - onChanged(); - } else { - deviceUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid device_uuid = 1; - */ - public Builder setDeviceUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (deviceUuidBuilder_ == null) { - deviceUuid_ = builderForValue.build(); - onChanged(); - } else { - deviceUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid device_uuid = 1; - */ - public Builder mergeDeviceUuid(context.ContextOuterClass.Uuid value) { - if (deviceUuidBuilder_ == null) { - if (deviceUuid_ != null) { - deviceUuid_ = - context.ContextOuterClass.Uuid.newBuilder(deviceUuid_).mergeFrom(value).buildPartial(); - } else { - deviceUuid_ = value; - } - onChanged(); - } else { - deviceUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid device_uuid = 1; - */ - public Builder clearDeviceUuid() { - if (deviceUuidBuilder_ == null) { - deviceUuid_ = null; - onChanged(); - } else { - deviceUuid_ = null; - deviceUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid device_uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getDeviceUuidBuilder() { - - onChanged(); - return getDeviceUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid device_uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder() { - if (deviceUuidBuilder_ != null) { - return deviceUuidBuilder_.getMessageOrBuilder(); - } else { - return deviceUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; - } - } - /** - * .context.Uuid device_uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getDeviceUuidFieldBuilder() { - if (deviceUuidBuilder_ == null) { - deviceUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getDeviceUuid(), - getParentForChildren(), - isClean()); - deviceUuid_ = null; - } - return deviceUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.DeviceId) - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ContextId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - // @@protoc_insertion_point(class_scope:context.DeviceId) - private static final context.ContextOuterClass.DeviceId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceId(); - } + private context.ContextOuterClass.Uuid contextUuid_; - public static context.ContextOuterClass.DeviceId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3 contextUuidBuilder_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Uuid context_uuid = 1; + * @return Whether the contextUuid field is set. + */ + public boolean hasContextUuid() { + return contextUuidBuilder_ != null || contextUuid_ != null; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Uuid context_uuid = 1; + * @return The contextUuid. + */ + public context.ContextOuterClass.Uuid getContextUuid() { + if (contextUuidBuilder_ == null) { + return contextUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; + } else { + return contextUuidBuilder_.getMessage(); + } + } - @java.lang.Override - public context.ContextOuterClass.DeviceId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + /** + * .context.Uuid context_uuid = 1; + */ + public Builder setContextUuid(context.ContextOuterClass.Uuid value) { + if (contextUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextUuid_ = value; + onChanged(); + } else { + contextUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid context_uuid = 1; + */ + public Builder setContextUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (contextUuidBuilder_ == null) { + contextUuid_ = builderForValue.build(); + onChanged(); + } else { + contextUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid context_uuid = 1; + */ + public Builder mergeContextUuid(context.ContextOuterClass.Uuid value) { + if (contextUuidBuilder_ == null) { + if (contextUuid_ != null) { + contextUuid_ = context.ContextOuterClass.Uuid.newBuilder(contextUuid_).mergeFrom(value).buildPartial(); + } else { + contextUuid_ = value; + } + onChanged(); + } else { + contextUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid context_uuid = 1; + */ + public Builder clearContextUuid() { + if (contextUuidBuilder_ == null) { + contextUuid_ = null; + onChanged(); + } else { + contextUuid_ = null; + contextUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid context_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getContextUuidBuilder() { + onChanged(); + return getContextUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid context_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder() { + if (contextUuidBuilder_ != null) { + return contextUuidBuilder_.getMessageOrBuilder(); + } else { + return contextUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; + } + } + + /** + * .context.Uuid context_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextUuidFieldBuilder() { + if (contextUuidBuilder_ == null) { + contextUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextUuid(), getParentForChildren(), isClean()); + contextUuid_ = null; + } + return contextUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ContextId) + } + + // @@protoc_insertion_point(class_scope:context.ContextId) + private static final context.ContextOuterClass.ContextId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ContextId(); + } + + public static context.ContextOuterClass.ContextId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ContextId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ContextOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Context) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); + + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + java.util.List getTopologyIdsList(); + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + context.ContextOuterClass.TopologyId getTopologyIds(int index); + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + int getTopologyIdsCount(); + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + java.util.List getTopologyIdsOrBuilderList(); + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder(int index); + + /** + * repeated .context.ServiceId service_ids = 4; + */ + java.util.List getServiceIdsList(); + + /** + * repeated .context.ServiceId service_ids = 4; + */ + context.ContextOuterClass.ServiceId getServiceIds(int index); + + /** + * repeated .context.ServiceId service_ids = 4; + */ + int getServiceIdsCount(); + + /** + * repeated .context.ServiceId service_ids = 4; + */ + java.util.List getServiceIdsOrBuilderList(); + + /** + * repeated .context.ServiceId service_ids = 4; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder(int index); + + /** + * repeated .context.SliceId slice_ids = 5; + */ + java.util.List getSliceIdsList(); + + /** + * repeated .context.SliceId slice_ids = 5; + */ + context.ContextOuterClass.SliceId getSliceIds(int index); + + /** + * repeated .context.SliceId slice_ids = 5; + */ + int getSliceIdsCount(); + + /** + * repeated .context.SliceId slice_ids = 5; + */ + java.util.List getSliceIdsOrBuilderList(); + + /** + * repeated .context.SliceId slice_ids = 5; + */ + context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder(int index); + + /** + * .context.TeraFlowController controller = 6; + * @return Whether the controller field is set. + */ + boolean hasController(); + + /** + * .context.TeraFlowController controller = 6; + * @return The controller. + */ + context.ContextOuterClass.TeraFlowController getController(); + + /** + * .context.TeraFlowController controller = 6; + */ + context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder(); + } + + /** + * Protobuf type {@code context.Context} + */ + public static final class Context extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Context) + ContextOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Context.newBuilder() to construct. + private Context(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Context() { + name_ = ""; + topologyIds_ = java.util.Collections.emptyList(); + serviceIds_ = java.util.Collections.emptyList(); + sliceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Context_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Context.class, context.ContextOuterClass.Context.Builder.class); + } + + public static final int CONTEXT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ContextId contextId_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOPOLOGY_IDS_FIELD_NUMBER = 3; + + private java.util.List topologyIds_; + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + @java.lang.Override + public java.util.List getTopologyIdsList() { + return topologyIds_; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + @java.lang.Override + public java.util.List getTopologyIdsOrBuilderList() { + return topologyIds_; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + @java.lang.Override + public int getTopologyIdsCount() { + return topologyIds_.size(); + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyId getTopologyIds(int index) { + return topologyIds_.get(index); + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder(int index) { + return topologyIds_.get(index); + } + + public static final int SERVICE_IDS_FIELD_NUMBER = 4; + + private java.util.List serviceIds_; + + /** + * repeated .context.ServiceId service_ids = 4; + */ + @java.lang.Override + public java.util.List getServiceIdsList() { + return serviceIds_; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + @java.lang.Override + public java.util.List getServiceIdsOrBuilderList() { + return serviceIds_; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + @java.lang.Override + public int getServiceIdsCount() { + return serviceIds_.size(); + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceIds(int index) { + return serviceIds_.get(index); + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder(int index) { + return serviceIds_.get(index); + } + + public static final int SLICE_IDS_FIELD_NUMBER = 5; + + private java.util.List sliceIds_; + + /** + * repeated .context.SliceId slice_ids = 5; + */ + @java.lang.Override + public java.util.List getSliceIdsList() { + return sliceIds_; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + @java.lang.Override + public java.util.List getSliceIdsOrBuilderList() { + return sliceIds_; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + @java.lang.Override + public int getSliceIdsCount() { + return sliceIds_.size(); + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + @java.lang.Override + public context.ContextOuterClass.SliceId getSliceIds(int index) { + return sliceIds_.get(index); + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder(int index) { + return sliceIds_.get(index); + } + + public static final int CONTROLLER_FIELD_NUMBER = 6; + + private context.ContextOuterClass.TeraFlowController controller_; + + /** + * .context.TeraFlowController controller = 6; + * @return Whether the controller field is set. + */ + @java.lang.Override + public boolean hasController() { + return controller_ != null; + } + + /** + * .context.TeraFlowController controller = 6; + * @return The controller. + */ + @java.lang.Override + public context.ContextOuterClass.TeraFlowController getController() { + return controller_ == null ? context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; + } + + /** + * .context.TeraFlowController controller = 6; + */ + @java.lang.Override + public context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder() { + return getController(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < topologyIds_.size(); i++) { + output.writeMessage(3, topologyIds_.get(i)); + } + for (int i = 0; i < serviceIds_.size(); i++) { + output.writeMessage(4, serviceIds_.get(i)); + } + for (int i = 0; i < sliceIds_.size(); i++) { + output.writeMessage(5, sliceIds_.get(i)); + } + if (controller_ != null) { + output.writeMessage(6, getController()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < topologyIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, topologyIds_.get(i)); + } + for (int i = 0; i < serviceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, serviceIds_.get(i)); + } + for (int i = 0; i < sliceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, sliceIds_.get(i)); + } + if (controller_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getController()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Context)) { + return super.equals(obj); + } + context.ContextOuterClass.Context other = (context.ContextOuterClass.Context) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getTopologyIdsList().equals(other.getTopologyIdsList())) + return false; + if (!getServiceIdsList().equals(other.getServiceIdsList())) + return false; + if (!getSliceIdsList().equals(other.getSliceIdsList())) + return false; + if (hasController() != other.hasController()) + return false; + if (hasController()) { + if (!getController().equals(other.getController())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getTopologyIdsCount() > 0) { + hash = (37 * hash) + TOPOLOGY_IDS_FIELD_NUMBER; + hash = (53 * hash) + getTopologyIdsList().hashCode(); + } + if (getServiceIdsCount() > 0) { + hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getServiceIdsList().hashCode(); + } + if (getSliceIdsCount() > 0) { + hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSliceIdsList().hashCode(); + } + if (hasController()) { + hash = (37 * hash) + CONTROLLER_FIELD_NUMBER; + hash = (53 * hash) + getController().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Context parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Context parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Context parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Context parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Context parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Context parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Context parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Context parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Context parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Context parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Context parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Context parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Context prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Context} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Context) + context.ContextOuterClass.ContextOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Context_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Context_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Context.class, context.ContextOuterClass.Context.Builder.class); + } + + // 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; + contextIdBuilder_ = null; + } + name_ = ""; + if (topologyIdsBuilder_ == null) { + topologyIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + topologyIdsBuilder_.clear(); + } + if (serviceIdsBuilder_ == null) { + serviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + serviceIdsBuilder_.clear(); + } + if (sliceIdsBuilder_ == null) { + sliceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + sliceIdsBuilder_.clear(); + } + if (controllerBuilder_ == null) { + controller_ = null; + } else { + controller_ = null; + controllerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Context_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Context getDefaultInstanceForType() { + return context.ContextOuterClass.Context.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Context build() { + context.ContextOuterClass.Context result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + if (topologyIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.topologyIds_ = topologyIds_; + } else { + result.topologyIds_ = topologyIdsBuilder_.build(); + } + if (serviceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.serviceIds_ = serviceIds_; + } else { + result.serviceIds_ = serviceIdsBuilder_.build(); + } + if (sliceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); + bitField0_ = (bitField0_ & ~0x00000004); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Context) { + return mergeFrom((context.ContextOuterClass.Context) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Context other) { + if (other == context.ContextOuterClass.Context.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (topologyIdsBuilder_ == null) { + if (!other.topologyIds_.isEmpty()) { + if (topologyIds_.isEmpty()) { + topologyIds_ = other.topologyIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTopologyIdsIsMutable(); + topologyIds_.addAll(other.topologyIds_); + } + onChanged(); + } + } else { + if (!other.topologyIds_.isEmpty()) { + if (topologyIdsBuilder_.isEmpty()) { + topologyIdsBuilder_.dispose(); + topologyIdsBuilder_ = null; + topologyIds_ = other.topologyIds_; + bitField0_ = (bitField0_ & ~0x00000001); + topologyIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTopologyIdsFieldBuilder() : null; + } else { + topologyIdsBuilder_.addAllMessages(other.topologyIds_); + } + } + } + if (serviceIdsBuilder_ == null) { + if (!other.serviceIds_.isEmpty()) { + if (serviceIds_.isEmpty()) { + serviceIds_ = other.serviceIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureServiceIdsIsMutable(); + serviceIds_.addAll(other.serviceIds_); + } + onChanged(); + } + } else { + if (!other.serviceIds_.isEmpty()) { + if (serviceIdsBuilder_.isEmpty()) { + serviceIdsBuilder_.dispose(); + serviceIdsBuilder_ = null; + serviceIds_ = other.serviceIds_; + bitField0_ = (bitField0_ & ~0x00000002); + serviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceIdsFieldBuilder() : null; + } else { + serviceIdsBuilder_.addAllMessages(other.serviceIds_); + } + } + } + if (sliceIdsBuilder_ == null) { + if (!other.sliceIds_.isEmpty()) { + if (sliceIds_.isEmpty()) { + sliceIds_ = other.sliceIds_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSliceIdsIsMutable(); + sliceIds_.addAll(other.sliceIds_); + } + onChanged(); + } + } else { + if (!other.sliceIds_.isEmpty()) { + if (sliceIdsBuilder_.isEmpty()) { + sliceIdsBuilder_.dispose(); + sliceIdsBuilder_ = null; + sliceIds_ = other.sliceIds_; + bitField0_ = (bitField0_ & ~0x00000004); + sliceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceIdsFieldBuilder() : null; + } else { + sliceIdsBuilder_.addAllMessages(other.sliceIds_); + } + } + } + if (other.hasController()) { + mergeController(other.getController()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Context) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.ContextId contextId_; + + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } + + /** + * .context.ContextId context_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.util.List topologyIds_ = java.util.Collections.emptyList(); + + private void ensureTopologyIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + topologyIds_ = new java.util.ArrayList(topologyIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 topologyIdsBuilder_; + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public java.util.List getTopologyIdsList() { + if (topologyIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(topologyIds_); + } else { + return topologyIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public int getTopologyIdsCount() { + if (topologyIdsBuilder_ == null) { + return topologyIds_.size(); + } else { + return topologyIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public context.ContextOuterClass.TopologyId getTopologyIds(int index) { + if (topologyIdsBuilder_ == null) { + return topologyIds_.get(index); + } else { + return topologyIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder setTopologyIds(int index, context.ContextOuterClass.TopologyId value) { + if (topologyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologyIdsIsMutable(); + topologyIds_.set(index, value); + onChanged(); + } else { + topologyIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder setTopologyIds(int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.set(index, builderForValue.build()); + onChanged(); + } else { + topologyIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder addTopologyIds(context.ContextOuterClass.TopologyId value) { + if (topologyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologyIdsIsMutable(); + topologyIds_.add(value); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder addTopologyIds(int index, context.ContextOuterClass.TopologyId value) { + if (topologyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologyIdsIsMutable(); + topologyIds_.add(index, value); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder addTopologyIds(context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.add(builderForValue.build()); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder addTopologyIds(int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.add(index, builderForValue.build()); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder addAllTopologyIds(java.lang.Iterable values) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, topologyIds_); + onChanged(); + } else { + topologyIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder clearTopologyIds() { + if (topologyIdsBuilder_ == null) { + topologyIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + topologyIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder removeTopologyIds(int index) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.remove(index); + onChanged(); + } else { + topologyIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public context.ContextOuterClass.TopologyId.Builder getTopologyIdsBuilder(int index) { + return getTopologyIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder(int index) { + if (topologyIdsBuilder_ == null) { + return topologyIds_.get(index); + } else { + return topologyIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public java.util.List getTopologyIdsOrBuilderList() { + if (topologyIdsBuilder_ != null) { + return topologyIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(topologyIds_); + } + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder() { + return getTopologyIdsFieldBuilder().addBuilder(context.ContextOuterClass.TopologyId.getDefaultInstance()); + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder(int index) { + return getTopologyIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.TopologyId.getDefaultInstance()); + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public java.util.List getTopologyIdsBuilderList() { + return getTopologyIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getTopologyIdsFieldBuilder() { + if (topologyIdsBuilder_ == null) { + topologyIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(topologyIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + topologyIds_ = null; + } + return topologyIdsBuilder_; + } + + private java.util.List serviceIds_ = java.util.Collections.emptyList(); + + private void ensureServiceIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + serviceIds_ = new java.util.ArrayList(serviceIds_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 serviceIdsBuilder_; + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public java.util.List getServiceIdsList() { + if (serviceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceIds_); + } else { + return serviceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public int getServiceIdsCount() { + if (serviceIdsBuilder_ == null) { + return serviceIds_.size(); + } else { + return serviceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public context.ContextOuterClass.ServiceId getServiceIds(int index) { + if (serviceIdsBuilder_ == null) { + return serviceIds_.get(index); + } else { + return serviceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder setServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceIdsIsMutable(); + serviceIds_.set(index, value); + onChanged(); + } else { + serviceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder setServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder addServiceIds(context.ContextOuterClass.ServiceId value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceIdsIsMutable(); + serviceIds_.add(value); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder addServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceIdsIsMutable(); + serviceIds_.add(index, value); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder addServiceIds(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.add(builderForValue.build()); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder addServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder addAllServiceIds(java.lang.Iterable values) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceIds_); + onChanged(); + } else { + serviceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder clearServiceIds() { + if (serviceIdsBuilder_ == null) { + serviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + serviceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder removeServiceIds(int index) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.remove(index); + onChanged(); + } else { + serviceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdsBuilder(int index) { + return getServiceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder(int index) { + if (serviceIdsBuilder_ == null) { + return serviceIds_.get(index); + } else { + return serviceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public java.util.List getServiceIdsOrBuilderList() { + if (serviceIdsBuilder_ != null) { + return serviceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceIds_); + } + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder() { + return getServiceIdsFieldBuilder().addBuilder(context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder(int index) { + return getServiceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public java.util.List getServiceIdsBuilderList() { + return getServiceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getServiceIdsFieldBuilder() { + if (serviceIdsBuilder_ == null) { + serviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + serviceIds_ = null; + } + return serviceIdsBuilder_; + } + + private java.util.List sliceIds_ = java.util.Collections.emptyList(); + + private void ensureSliceIdsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + sliceIds_ = new java.util.ArrayList(sliceIds_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 sliceIdsBuilder_; + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public java.util.List getSliceIdsList() { + if (sliceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sliceIds_); + } else { + return sliceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public int getSliceIdsCount() { + if (sliceIdsBuilder_ == null) { + return sliceIds_.size(); + } else { + return sliceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public context.ContextOuterClass.SliceId getSliceIds(int index) { + if (sliceIdsBuilder_ == null) { + return sliceIds_.get(index); + } else { + return sliceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder setSliceIds(int index, context.ContextOuterClass.SliceId value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceIdsIsMutable(); + sliceIds_.set(index, value); + onChanged(); + } else { + sliceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder setSliceIds(int index, context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + sliceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder addSliceIds(context.ContextOuterClass.SliceId value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceIdsIsMutable(); + sliceIds_.add(value); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder addSliceIds(int index, context.ContextOuterClass.SliceId value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceIdsIsMutable(); + sliceIds_.add(index, value); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder addSliceIds(context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.add(builderForValue.build()); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder addSliceIds(int index, context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder addAllSliceIds(java.lang.Iterable values) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceIds_); + onChanged(); + } else { + sliceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder clearSliceIds() { + if (sliceIdsBuilder_ == null) { + sliceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + sliceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder removeSliceIds(int index) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.remove(index); + onChanged(); + } else { + sliceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public context.ContextOuterClass.SliceId.Builder getSliceIdsBuilder(int index) { + return getSliceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder(int index) { + if (sliceIdsBuilder_ == null) { + return sliceIds_.get(index); + } else { + return sliceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public java.util.List getSliceIdsOrBuilderList() { + if (sliceIdsBuilder_ != null) { + return sliceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sliceIds_); + } + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder() { + return getSliceIdsFieldBuilder().addBuilder(context.ContextOuterClass.SliceId.getDefaultInstance()); + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder(int index) { + return getSliceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.SliceId.getDefaultInstance()); + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public java.util.List getSliceIdsBuilderList() { + return getSliceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSliceIdsFieldBuilder() { + if (sliceIdsBuilder_ == null) { + sliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + sliceIds_ = null; + } + return sliceIdsBuilder_; + } + + private context.ContextOuterClass.TeraFlowController controller_; + + private com.google.protobuf.SingleFieldBuilderV3 controllerBuilder_; + + /** + * .context.TeraFlowController controller = 6; + * @return Whether the controller field is set. + */ + public boolean hasController() { + return controllerBuilder_ != null || controller_ != null; + } + + /** + * .context.TeraFlowController controller = 6; + * @return The controller. + */ + public context.ContextOuterClass.TeraFlowController getController() { + if (controllerBuilder_ == null) { + return controller_ == null ? context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; + } else { + return controllerBuilder_.getMessage(); + } + } + + /** + * .context.TeraFlowController controller = 6; + */ + public Builder setController(context.ContextOuterClass.TeraFlowController value) { + if (controllerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + controller_ = value; + onChanged(); + } else { + controllerBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.TeraFlowController controller = 6; + */ + public Builder setController(context.ContextOuterClass.TeraFlowController.Builder builderForValue) { + if (controllerBuilder_ == null) { + controller_ = builderForValue.build(); + onChanged(); + } else { + controllerBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.TeraFlowController controller = 6; + */ + public Builder mergeController(context.ContextOuterClass.TeraFlowController value) { + if (controllerBuilder_ == null) { + if (controller_ != null) { + controller_ = context.ContextOuterClass.TeraFlowController.newBuilder(controller_).mergeFrom(value).buildPartial(); + } else { + controller_ = value; + } + onChanged(); + } else { + controllerBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.TeraFlowController controller = 6; + */ + public Builder clearController() { + if (controllerBuilder_ == null) { + controller_ = null; + onChanged(); + } else { + controller_ = null; + controllerBuilder_ = null; + } + return this; + } + + /** + * .context.TeraFlowController controller = 6; + */ + public context.ContextOuterClass.TeraFlowController.Builder getControllerBuilder() { + onChanged(); + return getControllerFieldBuilder().getBuilder(); + } + + /** + * .context.TeraFlowController controller = 6; + */ + public context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder() { + if (controllerBuilder_ != null) { + return controllerBuilder_.getMessageOrBuilder(); + } else { + return controller_ == null ? context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; + } + } + + /** + * .context.TeraFlowController controller = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3 getControllerFieldBuilder() { + if (controllerBuilder_ == null) { + controllerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getController(), getParentForChildren(), isClean()); + controller_ = null; + } + return controllerBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Context) + } + + // @@protoc_insertion_point(class_scope:context.Context) + private static final context.ContextOuterClass.Context DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Context(); + } + + public static context.ContextOuterClass.Context getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Context getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ContextIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ContextIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.ContextId context_ids = 1; + */ + java.util.List getContextIdsList(); + + /** + * repeated .context.ContextId context_ids = 1; + */ + context.ContextOuterClass.ContextId getContextIds(int index); + + /** + * repeated .context.ContextId context_ids = 1; + */ + int getContextIdsCount(); + + /** + * repeated .context.ContextId context_ids = 1; + */ + java.util.List getContextIdsOrBuilderList(); + + /** + * repeated .context.ContextId context_ids = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ContextIdList} + */ + public static final class ContextIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ContextIdList) + ContextIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ContextIdList.newBuilder() to construct. + private ContextIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContextIdList() { + contextIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextIdList.class, context.ContextOuterClass.ContextIdList.Builder.class); + } + + public static final int CONTEXT_IDS_FIELD_NUMBER = 1; + + private java.util.List contextIds_; + + /** + * repeated .context.ContextId context_ids = 1; + */ + @java.lang.Override + public java.util.List getContextIdsList() { + return contextIds_; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + @java.lang.Override + public java.util.List getContextIdsOrBuilderList() { + return contextIds_; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + @java.lang.Override + public int getContextIdsCount() { + return contextIds_.size(); + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextIds(int index) { + return contextIds_.get(index); + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdsOrBuilder(int index) { + return contextIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < contextIds_.size(); i++) { + output.writeMessage(1, contextIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < contextIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, contextIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ContextIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.ContextIdList other = (context.ContextOuterClass.ContextIdList) obj; + if (!getContextIdsList().equals(other.getContextIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getContextIdsCount() > 0) { + hash = (37 * hash) + CONTEXT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getContextIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ContextIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ContextIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ContextIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ContextIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ContextIdList) + context.ContextOuterClass.ContextIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ContextIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextIdList.class, context.ContextOuterClass.ContextIdList.Builder.class); + } + + // 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(); + if (contextIdsBuilder_ == null) { + contextIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + contextIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ContextIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ContextIdList getDefaultInstanceForType() { + return context.ContextOuterClass.ContextIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ContextIdList build() { + context.ContextOuterClass.ContextIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ContextIdList buildPartial() { + context.ContextOuterClass.ContextIdList result = new context.ContextOuterClass.ContextIdList(this); + int from_bitField0_ = bitField0_; + if (contextIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + contextIds_ = java.util.Collections.unmodifiableList(contextIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.contextIds_ = contextIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ContextIdList) { + return mergeFrom((context.ContextOuterClass.ContextIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ContextIdList other) { + if (other == context.ContextOuterClass.ContextIdList.getDefaultInstance()) + return this; + if (contextIdsBuilder_ == null) { + if (!other.contextIds_.isEmpty()) { + if (contextIds_.isEmpty()) { + contextIds_ = other.contextIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureContextIdsIsMutable(); + contextIds_.addAll(other.contextIds_); + } + onChanged(); + } + } else { + if (!other.contextIds_.isEmpty()) { + if (contextIdsBuilder_.isEmpty()) { + contextIdsBuilder_.dispose(); + contextIdsBuilder_ = null; + contextIds_ = other.contextIds_; + bitField0_ = (bitField0_ & ~0x00000001); + contextIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getContextIdsFieldBuilder() : null; + } else { + contextIdsBuilder_.addAllMessages(other.contextIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ContextIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List contextIds_ = java.util.Collections.emptyList(); + + private void ensureContextIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + contextIds_ = new java.util.ArrayList(contextIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 contextIdsBuilder_; + + /** + * repeated .context.ContextId context_ids = 1; + */ + public java.util.List getContextIdsList() { + if (contextIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(contextIds_); + } else { + return contextIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public int getContextIdsCount() { + if (contextIdsBuilder_ == null) { + return contextIds_.size(); + } else { + return contextIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public context.ContextOuterClass.ContextId getContextIds(int index) { + if (contextIdsBuilder_ == null) { + return contextIds_.get(index); + } else { + return contextIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder setContextIds(int index, context.ContextOuterClass.ContextId value) { + if (contextIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextIdsIsMutable(); + contextIds_.set(index, value); + onChanged(); + } else { + contextIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder setContextIds(int index, context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdsBuilder_ == null) { + ensureContextIdsIsMutable(); + contextIds_.set(index, builderForValue.build()); + onChanged(); + } else { + contextIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder addContextIds(context.ContextOuterClass.ContextId value) { + if (contextIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextIdsIsMutable(); + contextIds_.add(value); + onChanged(); + } else { + contextIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder addContextIds(int index, context.ContextOuterClass.ContextId value) { + if (contextIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextIdsIsMutable(); + contextIds_.add(index, value); + onChanged(); + } else { + contextIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder addContextIds(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdsBuilder_ == null) { + ensureContextIdsIsMutable(); + contextIds_.add(builderForValue.build()); + onChanged(); + } else { + contextIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder addContextIds(int index, context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdsBuilder_ == null) { + ensureContextIdsIsMutable(); + contextIds_.add(index, builderForValue.build()); + onChanged(); + } else { + contextIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder addAllContextIds(java.lang.Iterable values) { + if (contextIdsBuilder_ == null) { + ensureContextIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contextIds_); + onChanged(); + } else { + contextIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder clearContextIds() { + if (contextIdsBuilder_ == null) { + contextIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + contextIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder removeContextIds(int index) { + if (contextIdsBuilder_ == null) { + ensureContextIdsIsMutable(); + contextIds_.remove(index); + onChanged(); + } else { + contextIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdsBuilder(int index) { + return getContextIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdsOrBuilder(int index) { + if (contextIdsBuilder_ == null) { + return contextIds_.get(index); + } else { + return contextIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public java.util.List getContextIdsOrBuilderList() { + if (contextIdsBuilder_ != null) { + return contextIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(contextIds_); + } + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public context.ContextOuterClass.ContextId.Builder addContextIdsBuilder() { + return getContextIdsFieldBuilder().addBuilder(context.ContextOuterClass.ContextId.getDefaultInstance()); + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public context.ContextOuterClass.ContextId.Builder addContextIdsBuilder(int index) { + return getContextIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.ContextId.getDefaultInstance()); + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public java.util.List getContextIdsBuilderList() { + return getContextIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getContextIdsFieldBuilder() { + if (contextIdsBuilder_ == null) { + contextIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(contextIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + contextIds_ = null; + } + return contextIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ContextIdList) + } + + // @@protoc_insertion_point(class_scope:context.ContextIdList) + private static final context.ContextOuterClass.ContextIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ContextIdList(); + } + + public static context.ContextOuterClass.ContextIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ContextIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ContextListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ContextList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Context contexts = 1; + */ + java.util.List getContextsList(); + + /** + * repeated .context.Context contexts = 1; + */ + context.ContextOuterClass.Context getContexts(int index); + + /** + * repeated .context.Context contexts = 1; + */ + int getContextsCount(); + + /** + * repeated .context.Context contexts = 1; + */ + java.util.List getContextsOrBuilderList(); + + /** + * repeated .context.Context contexts = 1; + */ + context.ContextOuterClass.ContextOrBuilder getContextsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ContextList} + */ + public static final class ContextList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ContextList) + ContextListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ContextList.newBuilder() to construct. + private ContextList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContextList() { + contexts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextList.class, context.ContextOuterClass.ContextList.Builder.class); + } + + public static final int CONTEXTS_FIELD_NUMBER = 1; + + private java.util.List contexts_; + + /** + * repeated .context.Context contexts = 1; + */ + @java.lang.Override + public java.util.List getContextsList() { + return contexts_; + } + + /** + * repeated .context.Context contexts = 1; + */ + @java.lang.Override + public java.util.List getContextsOrBuilderList() { + return contexts_; + } + + /** + * repeated .context.Context contexts = 1; + */ + @java.lang.Override + public int getContextsCount() { + return contexts_.size(); + } + + /** + * repeated .context.Context contexts = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Context getContexts(int index) { + return contexts_.get(index); + } + + /** + * repeated .context.Context contexts = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextOrBuilder getContextsOrBuilder(int index) { + return contexts_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < contexts_.size(); i++) { + output.writeMessage(1, contexts_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < contexts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, contexts_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ContextList)) { + return super.equals(obj); + } + context.ContextOuterClass.ContextList other = (context.ContextOuterClass.ContextList) obj; + if (!getContextsList().equals(other.getContextsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getContextsCount() > 0) { + hash = (37 * hash) + CONTEXTS_FIELD_NUMBER; + hash = (53 * hash) + getContextsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ContextList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ContextList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ContextList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ContextList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ContextList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ContextList) + context.ContextOuterClass.ContextListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ContextList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextList.class, context.ContextOuterClass.ContextList.Builder.class); + } + + // 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(); + if (contextsBuilder_ == null) { + contexts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + contextsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ContextList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ContextList getDefaultInstanceForType() { + return context.ContextOuterClass.ContextList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ContextList build() { + context.ContextOuterClass.ContextList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ContextList buildPartial() { + context.ContextOuterClass.ContextList result = new context.ContextOuterClass.ContextList(this); + int from_bitField0_ = bitField0_; + if (contextsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + contexts_ = java.util.Collections.unmodifiableList(contexts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.contexts_ = contexts_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ContextList) { + return mergeFrom((context.ContextOuterClass.ContextList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ContextList other) { + if (other == context.ContextOuterClass.ContextList.getDefaultInstance()) + return this; + if (contextsBuilder_ == null) { + if (!other.contexts_.isEmpty()) { + if (contexts_.isEmpty()) { + contexts_ = other.contexts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureContextsIsMutable(); + contexts_.addAll(other.contexts_); + } + onChanged(); + } + } else { + if (!other.contexts_.isEmpty()) { + if (contextsBuilder_.isEmpty()) { + contextsBuilder_.dispose(); + contextsBuilder_ = null; + contexts_ = other.contexts_; + bitField0_ = (bitField0_ & ~0x00000001); + contextsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getContextsFieldBuilder() : null; + } else { + contextsBuilder_.addAllMessages(other.contexts_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ContextList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List contexts_ = java.util.Collections.emptyList(); + + private void ensureContextsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + contexts_ = new java.util.ArrayList(contexts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 contextsBuilder_; + + /** + * repeated .context.Context contexts = 1; + */ + public java.util.List getContextsList() { + if (contextsBuilder_ == null) { + return java.util.Collections.unmodifiableList(contexts_); + } else { + return contextsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Context contexts = 1; + */ + public int getContextsCount() { + if (contextsBuilder_ == null) { + return contexts_.size(); + } else { + return contextsBuilder_.getCount(); + } + } + + /** + * repeated .context.Context contexts = 1; + */ + public context.ContextOuterClass.Context getContexts(int index) { + if (contextsBuilder_ == null) { + return contexts_.get(index); + } else { + return contextsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder setContexts(int index, context.ContextOuterClass.Context value) { + if (contextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextsIsMutable(); + contexts_.set(index, value); + onChanged(); + } else { + contextsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder setContexts(int index, context.ContextOuterClass.Context.Builder builderForValue) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.set(index, builderForValue.build()); + onChanged(); + } else { + contextsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder addContexts(context.ContextOuterClass.Context value) { + if (contextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextsIsMutable(); + contexts_.add(value); + onChanged(); + } else { + contextsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder addContexts(int index, context.ContextOuterClass.Context value) { + if (contextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextsIsMutable(); + contexts_.add(index, value); + onChanged(); + } else { + contextsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder addContexts(context.ContextOuterClass.Context.Builder builderForValue) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.add(builderForValue.build()); + onChanged(); + } else { + contextsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder addContexts(int index, context.ContextOuterClass.Context.Builder builderForValue) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.add(index, builderForValue.build()); + onChanged(); + } else { + contextsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder addAllContexts(java.lang.Iterable values) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contexts_); + onChanged(); + } else { + contextsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder clearContexts() { + if (contextsBuilder_ == null) { + contexts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + contextsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder removeContexts(int index) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.remove(index); + onChanged(); + } else { + contextsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public context.ContextOuterClass.Context.Builder getContextsBuilder(int index) { + return getContextsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Context contexts = 1; + */ + public context.ContextOuterClass.ContextOrBuilder getContextsOrBuilder(int index) { + if (contextsBuilder_ == null) { + return contexts_.get(index); + } else { + return contextsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Context contexts = 1; + */ + public java.util.List getContextsOrBuilderList() { + if (contextsBuilder_ != null) { + return contextsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(contexts_); + } + } + + /** + * repeated .context.Context contexts = 1; + */ + public context.ContextOuterClass.Context.Builder addContextsBuilder() { + return getContextsFieldBuilder().addBuilder(context.ContextOuterClass.Context.getDefaultInstance()); + } + + /** + * repeated .context.Context contexts = 1; + */ + public context.ContextOuterClass.Context.Builder addContextsBuilder(int index) { + return getContextsFieldBuilder().addBuilder(index, context.ContextOuterClass.Context.getDefaultInstance()); + } + + /** + * repeated .context.Context contexts = 1; + */ + public java.util.List getContextsBuilderList() { + return getContextsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getContextsFieldBuilder() { + if (contextsBuilder_ == null) { + contextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(contexts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + contexts_ = null; + } + return contextsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ContextList) + } + + // @@protoc_insertion_point(class_scope:context.ContextList) + private static final context.ContextOuterClass.ContextList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ContextList(); + } + + public static context.ContextOuterClass.ContextList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ContextList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ContextEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ContextEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.ContextId context_id = 2; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); + + /** + * .context.ContextId context_id = 2; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); + + /** + * .context.ContextId context_id = 2; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + } + + /** + * Protobuf type {@code context.ContextEvent} + */ + public static final class ContextEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ContextEvent) + ContextEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ContextEvent.newBuilder() to construct. + private ContextEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContextEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextEvent.class, context.ContextOuterClass.ContextEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int CONTEXT_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.ContextId contextId_; + + /** + * .context.ContextId context_id = 2; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } + + /** + * .context.ContextId context_id = 2; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + /** + * .context.ContextId context_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (contextId_ != null) { + output.writeMessage(2, getContextId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContextId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ContextEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.ContextEvent other = (context.ContextOuterClass.ContextEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ContextEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ContextEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ContextEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ContextEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ContextEvent) + context.ContextOuterClass.ContextEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ContextEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextEvent.class, context.ContextOuterClass.ContextEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (contextIdBuilder_ == null) { + contextId_ = null; + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ContextEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ContextEvent getDefaultInstanceForType() { + return context.ContextOuterClass.ContextEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ContextEvent build() { + context.ContextOuterClass.ContextEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ContextEvent) { + return mergeFrom((context.ContextOuterClass.ContextEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ContextEvent other) { + if (other == context.ContextOuterClass.ContextEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ContextEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.ContextId contextId_; + + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; + + /** + * .context.ContextId context_id = 2; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } + + /** + * .context.ContextId context_id = 2; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } + + /** + * .context.ContextId context_id = 2; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ContextId context_id = 2; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ContextId context_id = 2; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ContextId context_id = 2; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } + + /** + * .context.ContextId context_id = 2; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } + + /** + * .context.ContextId context_id = 2; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } + + /** + * .context.ContextId context_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ContextEvent) + } + + // @@protoc_insertion_point(class_scope:context.ContextEvent) + private static final context.ContextOuterClass.ContextEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ContextEvent(); + } + + public static context.ContextOuterClass.ContextEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ContextEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TopologyIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TopologyId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); + + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + + /** + * .context.Uuid topology_uuid = 2; + * @return Whether the topologyUuid field is set. + */ + boolean hasTopologyUuid(); + + /** + * .context.Uuid topology_uuid = 2; + * @return The topologyUuid. + */ + context.ContextOuterClass.Uuid getTopologyUuid(); + + /** + * .context.Uuid topology_uuid = 2; + */ + context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder(); + } + + /** + *
+     * ----- Topology ------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.TopologyId} + */ + public static final class TopologyId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TopologyId) + TopologyIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use TopologyId.newBuilder() to construct. + private TopologyId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TopologyId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyId.class, context.ContextOuterClass.TopologyId.Builder.class); + } + + public static final int CONTEXT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ContextId contextId_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } + + public static final int TOPOLOGY_UUID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.Uuid topologyUuid_; + + /** + * .context.Uuid topology_uuid = 2; + * @return Whether the topologyUuid field is set. + */ + @java.lang.Override + public boolean hasTopologyUuid() { + return topologyUuid_ != null; + } + + /** + * .context.Uuid topology_uuid = 2; + * @return The topologyUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getTopologyUuid() { + return topologyUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; + } + + /** + * .context.Uuid topology_uuid = 2; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder() { + return getTopologyUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (topologyUuid_ != null) { + output.writeMessage(2, getTopologyUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (topologyUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTopologyUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TopologyId)) { + return super.equals(obj); + } + context.ContextOuterClass.TopologyId other = (context.ContextOuterClass.TopologyId) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (hasTopologyUuid() != other.hasTopologyUuid()) + return false; + if (hasTopologyUuid()) { + if (!getTopologyUuid().equals(other.getTopologyUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + if (hasTopologyUuid()) { + hash = (37 * hash) + TOPOLOGY_UUID_FIELD_NUMBER; + hash = (53 * hash) + getTopologyUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.TopologyId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.TopologyId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Topology ------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.TopologyId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TopologyId) + context.ContextOuterClass.TopologyIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TopologyId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyId.class, context.ContextOuterClass.TopologyId.Builder.class); + } + + // 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; + contextIdBuilder_ = null; + } + if (topologyUuidBuilder_ == null) { + topologyUuid_ = null; + } else { + topologyUuid_ = null; + topologyUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TopologyId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyId getDefaultInstanceForType() { + return context.ContextOuterClass.TopologyId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.TopologyId build() { + context.ContextOuterClass.TopologyId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TopologyId) { + return mergeFrom((context.ContextOuterClass.TopologyId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.TopologyId other) { + if (other == context.ContextOuterClass.TopologyId.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (other.hasTopologyUuid()) { + mergeTopologyUuid(other.getTopologyUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.TopologyId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.ContextId contextId_; + + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } + + /** + * .context.ContextId context_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } + + private context.ContextOuterClass.Uuid topologyUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 topologyUuidBuilder_; + + /** + * .context.Uuid topology_uuid = 2; + * @return Whether the topologyUuid field is set. + */ + public boolean hasTopologyUuid() { + return topologyUuidBuilder_ != null || topologyUuid_ != null; + } + + /** + * .context.Uuid topology_uuid = 2; + * @return The topologyUuid. + */ + public context.ContextOuterClass.Uuid getTopologyUuid() { + if (topologyUuidBuilder_ == null) { + return topologyUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; + } else { + return topologyUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid topology_uuid = 2; + */ + public Builder setTopologyUuid(context.ContextOuterClass.Uuid value) { + if (topologyUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topologyUuid_ = value; + onChanged(); + } else { + topologyUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid topology_uuid = 2; + */ + public Builder setTopologyUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (topologyUuidBuilder_ == null) { + topologyUuid_ = builderForValue.build(); + onChanged(); + } else { + topologyUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid topology_uuid = 2; + */ + public Builder mergeTopologyUuid(context.ContextOuterClass.Uuid value) { + if (topologyUuidBuilder_ == null) { + if (topologyUuid_ != null) { + topologyUuid_ = context.ContextOuterClass.Uuid.newBuilder(topologyUuid_).mergeFrom(value).buildPartial(); + } else { + topologyUuid_ = value; + } + onChanged(); + } else { + topologyUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid topology_uuid = 2; + */ + public Builder clearTopologyUuid() { + if (topologyUuidBuilder_ == null) { + topologyUuid_ = null; + onChanged(); + } else { + topologyUuid_ = null; + topologyUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid topology_uuid = 2; + */ + public context.ContextOuterClass.Uuid.Builder getTopologyUuidBuilder() { + onChanged(); + return getTopologyUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid topology_uuid = 2; + */ + public context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder() { + if (topologyUuidBuilder_ != null) { + return topologyUuidBuilder_.getMessageOrBuilder(); + } else { + return topologyUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; + } + } + + /** + * .context.Uuid topology_uuid = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTopologyUuidFieldBuilder() { + if (topologyUuidBuilder_ == null) { + topologyUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTopologyUuid(), getParentForChildren(), isClean()); + topologyUuid_ = null; + } + return topologyUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.TopologyId) + } + + // @@protoc_insertion_point(class_scope:context.TopologyId) + private static final context.ContextOuterClass.TopologyId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyId(); + } + + public static context.ContextOuterClass.TopologyId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TopologyOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Topology) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + boolean hasTopologyId(); + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + context.ContextOuterClass.TopologyId getTopologyId(); + + /** + * .context.TopologyId topology_id = 1; + */ + context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * repeated .context.DeviceId device_ids = 3; + */ + java.util.List getDeviceIdsList(); + + /** + * repeated .context.DeviceId device_ids = 3; + */ + context.ContextOuterClass.DeviceId getDeviceIds(int index); + + /** + * repeated .context.DeviceId device_ids = 3; + */ + int getDeviceIdsCount(); + + /** + * repeated .context.DeviceId device_ids = 3; + */ + java.util.List getDeviceIdsOrBuilderList(); + + /** + * repeated .context.DeviceId device_ids = 3; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index); + + /** + * repeated .context.LinkId link_ids = 4; + */ + java.util.List getLinkIdsList(); + + /** + * repeated .context.LinkId link_ids = 4; + */ + context.ContextOuterClass.LinkId getLinkIds(int index); + + /** + * repeated .context.LinkId link_ids = 4; + */ + int getLinkIdsCount(); + + /** + * repeated .context.LinkId link_ids = 4; + */ + java.util.List getLinkIdsOrBuilderList(); + + /** + * repeated .context.LinkId link_ids = 4; + */ + context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.Topology} + */ + public static final class Topology extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Topology) + TopologyOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Topology.newBuilder() to construct. + private Topology(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Topology() { + name_ = ""; + deviceIds_ = java.util.Collections.emptyList(); + linkIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Topology_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Topology.class, context.ContextOuterClass.Topology.Builder.class); + } + + public static final int TOPOLOGY_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.TopologyId topologyId_; + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + @java.lang.Override + public boolean hasTopologyId() { + return topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + @java.lang.Override + public context.ContextOuterClass.TopologyId getTopologyId() { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + + /** + * .context.TopologyId topology_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + return getTopologyId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICE_IDS_FIELD_NUMBER = 3; + + private java.util.List deviceIds_; + + /** + * repeated .context.DeviceId device_ids = 3; + */ + @java.lang.Override + public java.util.List getDeviceIdsList() { + return deviceIds_; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + @java.lang.Override + public java.util.List getDeviceIdsOrBuilderList() { + return deviceIds_; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + @java.lang.Override + public int getDeviceIdsCount() { + return deviceIds_.size(); + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceIds(int index) { + return deviceIds_.get(index); + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index) { + return deviceIds_.get(index); + } + + public static final int LINK_IDS_FIELD_NUMBER = 4; + + private java.util.List linkIds_; + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public java.util.List getLinkIdsList() { + return linkIds_; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public java.util.List getLinkIdsOrBuilderList() { + return linkIds_; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public int getLinkIdsCount() { + return linkIds_.size(); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkIds(int index) { + return linkIds_.get(index); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index) { + return linkIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (topologyId_ != null) { + output.writeMessage(1, getTopologyId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < deviceIds_.size(); i++) { + output.writeMessage(3, deviceIds_.get(i)); + } + for (int i = 0; i < linkIds_.size(); i++) { + output.writeMessage(4, linkIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (topologyId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTopologyId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < deviceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, deviceIds_.get(i)); + } + for (int i = 0; i < linkIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Topology)) { + return super.equals(obj); + } + context.ContextOuterClass.Topology other = (context.ContextOuterClass.Topology) obj; + if (hasTopologyId() != other.hasTopologyId()) + return false; + if (hasTopologyId()) { + if (!getTopologyId().equals(other.getTopologyId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getDeviceIdsList().equals(other.getDeviceIdsList())) + return false; + if (!getLinkIdsList().equals(other.getLinkIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTopologyId()) { + hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; + hash = (53 * hash) + getTopologyId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getDeviceIdsCount() > 0) { + hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceIdsList().hashCode(); + } + if (getLinkIdsCount() > 0) { + hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getLinkIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Topology parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Topology parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Topology parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Topology parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Topology parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Topology parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Topology parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Topology parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Topology parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Topology parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Topology parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Topology parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Topology prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Topology} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Topology) + context.ContextOuterClass.TopologyOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Topology_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Topology_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Topology.class, context.ContextOuterClass.Topology.Builder.class); + } + + // 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; + topologyIdBuilder_ = null; + } + name_ = ""; + if (deviceIdsBuilder_ == null) { + deviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deviceIdsBuilder_.clear(); + } + if (linkIdsBuilder_ == null) { + linkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + linkIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Topology_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Topology getDefaultInstanceForType() { + return context.ContextOuterClass.Topology.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Topology build() { + context.ContextOuterClass.Topology result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + if (deviceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deviceIds_ = deviceIds_; + } else { + result.deviceIds_ = deviceIdsBuilder_.build(); + } + if (linkIdsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + linkIds_ = java.util.Collections.unmodifiableList(linkIds_); + bitField0_ = (bitField0_ & ~0x00000002); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Topology) { + return mergeFrom((context.ContextOuterClass.Topology) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Topology other) { + if (other == context.ContextOuterClass.Topology.getDefaultInstance()) + return this; + if (other.hasTopologyId()) { + mergeTopologyId(other.getTopologyId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (deviceIdsBuilder_ == null) { + if (!other.deviceIds_.isEmpty()) { + if (deviceIds_.isEmpty()) { + deviceIds_ = other.deviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeviceIdsIsMutable(); + deviceIds_.addAll(other.deviceIds_); + } + onChanged(); + } + } else { + if (!other.deviceIds_.isEmpty()) { + if (deviceIdsBuilder_.isEmpty()) { + deviceIdsBuilder_.dispose(); + deviceIdsBuilder_ = null; + deviceIds_ = other.deviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + deviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceIdsFieldBuilder() : null; + } else { + deviceIdsBuilder_.addAllMessages(other.deviceIds_); + } + } + } + if (linkIdsBuilder_ == null) { + if (!other.linkIds_.isEmpty()) { + if (linkIds_.isEmpty()) { + linkIds_ = other.linkIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLinkIdsIsMutable(); + linkIds_.addAll(other.linkIds_); + } + onChanged(); + } + } else { + if (!other.linkIds_.isEmpty()) { + if (linkIdsBuilder_.isEmpty()) { + linkIdsBuilder_.dispose(); + linkIdsBuilder_ = null; + linkIds_ = other.linkIds_; + bitField0_ = (bitField0_ & ~0x00000002); + linkIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkIdsFieldBuilder() : null; + } else { + linkIdsBuilder_.addAllMessages(other.linkIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Topology) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.TopologyId topologyId_; + + private com.google.protobuf.SingleFieldBuilderV3 topologyIdBuilder_; + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + public boolean hasTopologyId() { + return topologyIdBuilder_ != null || topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + public context.ContextOuterClass.TopologyId getTopologyId() { + if (topologyIdBuilder_ == null) { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } else { + return topologyIdBuilder_.getMessage(); + } + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topologyId_ = value; + onChanged(); + } else { + topologyIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdBuilder_ == null) { + topologyId_ = builderForValue.build(); + onChanged(); + } else { + topologyIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (topologyId_ != null) { + topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + } else { + topologyId_ = value; + } + onChanged(); + } else { + topologyIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder clearTopologyId() { + if (topologyIdBuilder_ == null) { + topologyId_ = null; + onChanged(); + } else { + topologyId_ = null; + topologyIdBuilder_ = null; + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + onChanged(); + return getTopologyIdFieldBuilder().getBuilder(); + } + + /** + * .context.TopologyId topology_id = 1; + */ + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + if (topologyIdBuilder_ != null) { + return topologyIdBuilder_.getMessageOrBuilder(); + } else { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + } + + /** + * .context.TopologyId topology_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTopologyIdFieldBuilder() { + if (topologyIdBuilder_ == null) { + topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTopologyId(), getParentForChildren(), isClean()); + topologyId_ = null; + } + return topologyIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.util.List deviceIds_ = java.util.Collections.emptyList(); + + private void ensureDeviceIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceIds_ = new java.util.ArrayList(deviceIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 deviceIdsBuilder_; + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public java.util.List getDeviceIdsList() { + if (deviceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deviceIds_); + } else { + return deviceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public int getDeviceIdsCount() { + if (deviceIdsBuilder_ == null) { + return deviceIds_.size(); + } else { + return deviceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public context.ContextOuterClass.DeviceId getDeviceIds(int index) { + if (deviceIdsBuilder_ == null) { + return deviceIds_.get(index); + } else { + return deviceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder setDeviceIds(int index, context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.set(index, value); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder setDeviceIds(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder addDeviceIds(context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.add(value); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder addDeviceIds(int index, context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.add(index, value); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder addDeviceIds(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder addDeviceIds(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder addAllDeviceIds(java.lang.Iterable values) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deviceIds_); + onChanged(); + } else { + deviceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder clearDeviceIds() { + if (deviceIdsBuilder_ == null) { + deviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deviceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder removeDeviceIds(int index) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.remove(index); + onChanged(); + } else { + deviceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdsBuilder(int index) { + return getDeviceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index) { + if (deviceIdsBuilder_ == null) { + return deviceIds_.get(index); + } else { + return deviceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public java.util.List getDeviceIdsOrBuilderList() { + if (deviceIdsBuilder_ != null) { + return deviceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deviceIds_); + } + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder() { + return getDeviceIdsFieldBuilder().addBuilder(context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder(int index) { + return getDeviceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public java.util.List getDeviceIdsBuilderList() { + return getDeviceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceIdsFieldBuilder() { + if (deviceIdsBuilder_ == null) { + deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceIds_ = null; + } + return deviceIdsBuilder_; + } + + private java.util.List linkIds_ = java.util.Collections.emptyList(); + + private void ensureLinkIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + linkIds_ = new java.util.ArrayList(linkIds_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 linkIdsBuilder_; + + /** + * repeated .context.LinkId link_ids = 4; + */ + public java.util.List getLinkIdsList() { + if (linkIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(linkIds_); + } else { + return linkIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public int getLinkIdsCount() { + if (linkIdsBuilder_ == null) { + return linkIds_.size(); + } else { + return linkIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId getLinkIds(int index) { + if (linkIdsBuilder_ == null) { + return linkIds_.get(index); + } else { + return linkIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder setLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.set(index, value); + onChanged(); + } else { + linkIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder setLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.set(index, builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.add(value); + onChanged(); + } else { + linkIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.add(index, value); + onChanged(); + } else { + linkIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(index, builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addAllLinkIds(java.lang.Iterable values) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, linkIds_); + onChanged(); + } else { + linkIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder clearLinkIds() { + if (linkIdsBuilder_ == null) { + linkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + linkIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder removeLinkIds(int index) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.remove(index); + onChanged(); + } else { + linkIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdsBuilder(int index) { + return getLinkIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index) { + if (linkIdsBuilder_ == null) { + return linkIds_.get(index); + } else { + return linkIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public java.util.List getLinkIdsOrBuilderList() { + if (linkIdsBuilder_ != null) { + return linkIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(linkIds_); + } + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder() { + return getLinkIdsFieldBuilder().addBuilder(context.ContextOuterClass.LinkId.getDefaultInstance()); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder(int index) { + return getLinkIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.LinkId.getDefaultInstance()); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public java.util.List getLinkIdsBuilderList() { + return getLinkIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getLinkIdsFieldBuilder() { + if (linkIdsBuilder_ == null) { + linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + linkIds_ = null; + } + return linkIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Topology) + } + + // @@protoc_insertion_point(class_scope:context.Topology) + private static final context.ContextOuterClass.Topology DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Topology(); + } + + public static context.ContextOuterClass.Topology getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Topology getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TopologyDetailsOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TopologyDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + boolean hasTopologyId(); + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + context.ContextOuterClass.TopologyId getTopologyId(); + + /** + * .context.TopologyId topology_id = 1; + */ + context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * repeated .context.Device devices = 3; + */ + java.util.List getDevicesList(); + + /** + * repeated .context.Device devices = 3; + */ + context.ContextOuterClass.Device getDevices(int index); + + /** + * repeated .context.Device devices = 3; + */ + int getDevicesCount(); + + /** + * repeated .context.Device devices = 3; + */ + java.util.List getDevicesOrBuilderList(); + + /** + * repeated .context.Device devices = 3; + */ + context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder(int index); + + /** + * repeated .context.Link links = 4; + */ + java.util.List getLinksList(); + + /** + * repeated .context.Link links = 4; + */ + context.ContextOuterClass.Link getLinks(int index); + + /** + * repeated .context.Link links = 4; + */ + int getLinksCount(); + + /** + * repeated .context.Link links = 4; + */ + java.util.List getLinksOrBuilderList(); + + /** + * repeated .context.Link links = 4; + */ + context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index); + } + + /** + * Protobuf type {@code context.TopologyDetails} + */ + public static final class TopologyDetails extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TopologyDetails) + TopologyDetailsOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use TopologyDetails.newBuilder() to construct. + private TopologyDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TopologyDetails() { + name_ = ""; + devices_ = java.util.Collections.emptyList(); + links_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyDetails.class, context.ContextOuterClass.TopologyDetails.Builder.class); + } + + public static final int TOPOLOGY_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.TopologyId topologyId_; + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + @java.lang.Override + public boolean hasTopologyId() { + return topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + @java.lang.Override + public context.ContextOuterClass.TopologyId getTopologyId() { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + + /** + * .context.TopologyId topology_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + return getTopologyId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICES_FIELD_NUMBER = 3; + + private java.util.List devices_; + + /** + * repeated .context.Device devices = 3; + */ + @java.lang.Override + public java.util.List getDevicesList() { + return devices_; + } + + /** + * repeated .context.Device devices = 3; + */ + @java.lang.Override + public java.util.List getDevicesOrBuilderList() { + return devices_; + } + + /** + * repeated .context.Device devices = 3; + */ + @java.lang.Override + public int getDevicesCount() { + return devices_.size(); + } + + /** + * repeated .context.Device devices = 3; + */ + @java.lang.Override + public context.ContextOuterClass.Device getDevices(int index) { + return devices_.get(index); + } + + /** + * repeated .context.Device devices = 3; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder(int index) { + return devices_.get(index); + } + + public static final int LINKS_FIELD_NUMBER = 4; + + private java.util.List links_; + + /** + * repeated .context.Link links = 4; + */ + @java.lang.Override + public java.util.List getLinksList() { + return links_; + } + + /** + * repeated .context.Link links = 4; + */ + @java.lang.Override + public java.util.List getLinksOrBuilderList() { + return links_; + } + + /** + * repeated .context.Link links = 4; + */ + @java.lang.Override + public int getLinksCount() { + return links_.size(); + } + + /** + * repeated .context.Link links = 4; + */ + @java.lang.Override + public context.ContextOuterClass.Link getLinks(int index) { + return links_.get(index); + } + + /** + * repeated .context.Link links = 4; + */ + @java.lang.Override + public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index) { + return links_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (topologyId_ != null) { + output.writeMessage(1, getTopologyId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < devices_.size(); i++) { + output.writeMessage(3, devices_.get(i)); + } + for (int i = 0; i < links_.size(); i++) { + output.writeMessage(4, links_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (topologyId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTopologyId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < devices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, devices_.get(i)); + } + for (int i = 0; i < links_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, links_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TopologyDetails)) { + return super.equals(obj); + } + context.ContextOuterClass.TopologyDetails other = (context.ContextOuterClass.TopologyDetails) obj; + if (hasTopologyId() != other.hasTopologyId()) + return false; + if (hasTopologyId()) { + if (!getTopologyId().equals(other.getTopologyId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getDevicesList().equals(other.getDevicesList())) + return false; + if (!getLinksList().equals(other.getLinksList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTopologyId()) { + hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; + hash = (53 * hash) + getTopologyId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getDevicesCount() > 0) { + hash = (37 * hash) + DEVICES_FIELD_NUMBER; + hash = (53 * hash) + getDevicesList().hashCode(); + } + if (getLinksCount() > 0) { + hash = (37 * hash) + LINKS_FIELD_NUMBER; + hash = (53 * hash) + getLinksList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyDetails parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyDetails parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.TopologyDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.TopologyDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TopologyDetails) + context.ContextOuterClass.TopologyDetailsOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TopologyDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyDetails.class, context.ContextOuterClass.TopologyDetails.Builder.class); + } + + // 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; + topologyIdBuilder_ = null; + } + name_ = ""; + if (devicesBuilder_ == null) { + devices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + devicesBuilder_.clear(); + } + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + linksBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TopologyDetails_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyDetails getDefaultInstanceForType() { + return context.ContextOuterClass.TopologyDetails.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.TopologyDetails build() { + context.ContextOuterClass.TopologyDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + if (devicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + devices_ = java.util.Collections.unmodifiableList(devices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.devices_ = devices_; + } else { + result.devices_ = devicesBuilder_.build(); + } + if (linksBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + links_ = java.util.Collections.unmodifiableList(links_); + bitField0_ = (bitField0_ & ~0x00000002); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TopologyDetails) { + return mergeFrom((context.ContextOuterClass.TopologyDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.TopologyDetails other) { + if (other == context.ContextOuterClass.TopologyDetails.getDefaultInstance()) + return this; + if (other.hasTopologyId()) { + mergeTopologyId(other.getTopologyId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (devicesBuilder_ == null) { + if (!other.devices_.isEmpty()) { + if (devices_.isEmpty()) { + devices_ = other.devices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDevicesIsMutable(); + devices_.addAll(other.devices_); + } + onChanged(); + } + } else { + if (!other.devices_.isEmpty()) { + if (devicesBuilder_.isEmpty()) { + devicesBuilder_.dispose(); + devicesBuilder_ = null; + devices_ = other.devices_; + bitField0_ = (bitField0_ & ~0x00000001); + devicesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDevicesFieldBuilder() : null; + } else { + devicesBuilder_.addAllMessages(other.devices_); + } + } + } + if (linksBuilder_ == null) { + if (!other.links_.isEmpty()) { + if (links_.isEmpty()) { + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLinksIsMutable(); + links_.addAll(other.links_); + } + onChanged(); + } + } else { + if (!other.links_.isEmpty()) { + if (linksBuilder_.isEmpty()) { + linksBuilder_.dispose(); + linksBuilder_ = null; + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000002); + linksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinksFieldBuilder() : null; + } else { + linksBuilder_.addAllMessages(other.links_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.TopologyDetails) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.TopologyId topologyId_; + + private com.google.protobuf.SingleFieldBuilderV3 topologyIdBuilder_; + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + public boolean hasTopologyId() { + return topologyIdBuilder_ != null || topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + public context.ContextOuterClass.TopologyId getTopologyId() { + if (topologyIdBuilder_ == null) { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } else { + return topologyIdBuilder_.getMessage(); + } + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topologyId_ = value; + onChanged(); + } else { + topologyIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdBuilder_ == null) { + topologyId_ = builderForValue.build(); + onChanged(); + } else { + topologyIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (topologyId_ != null) { + topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + } else { + topologyId_ = value; + } + onChanged(); + } else { + topologyIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder clearTopologyId() { + if (topologyIdBuilder_ == null) { + topologyId_ = null; + onChanged(); + } else { + topologyId_ = null; + topologyIdBuilder_ = null; + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + onChanged(); + return getTopologyIdFieldBuilder().getBuilder(); + } + + /** + * .context.TopologyId topology_id = 1; + */ + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + if (topologyIdBuilder_ != null) { + return topologyIdBuilder_.getMessageOrBuilder(); + } else { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + } + + /** + * .context.TopologyId topology_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTopologyIdFieldBuilder() { + if (topologyIdBuilder_ == null) { + topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTopologyId(), getParentForChildren(), isClean()); + topologyId_ = null; + } + return topologyIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.util.List devices_ = java.util.Collections.emptyList(); + + private void ensureDevicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + devices_ = new java.util.ArrayList(devices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 devicesBuilder_; + + /** + * repeated .context.Device devices = 3; + */ + public java.util.List getDevicesList() { + if (devicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(devices_); + } else { + return devicesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Device devices = 3; + */ + public int getDevicesCount() { + if (devicesBuilder_ == null) { + return devices_.size(); + } else { + return devicesBuilder_.getCount(); + } + } + + /** + * repeated .context.Device devices = 3; + */ + public context.ContextOuterClass.Device getDevices(int index) { + if (devicesBuilder_ == null) { + return devices_.get(index); + } else { + return devicesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder setDevices(int index, context.ContextOuterClass.Device value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.set(index, value); + onChanged(); + } else { + devicesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder setDevices(int index, context.ContextOuterClass.Device.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.set(index, builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder addDevices(context.ContextOuterClass.Device value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.add(value); + onChanged(); + } else { + devicesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder addDevices(int index, context.ContextOuterClass.Device value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.add(index, value); + onChanged(); + } else { + devicesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder addDevices(context.ContextOuterClass.Device.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder addDevices(int index, context.ContextOuterClass.Device.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(index, builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder addAllDevices(java.lang.Iterable values) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, devices_); + onChanged(); + } else { + devicesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder clearDevices() { + if (devicesBuilder_ == null) { + devices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + devicesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder removeDevices(int index) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.remove(index); + onChanged(); + } else { + devicesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public context.ContextOuterClass.Device.Builder getDevicesBuilder(int index) { + return getDevicesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Device devices = 3; + */ + public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder(int index) { + if (devicesBuilder_ == null) { + return devices_.get(index); + } else { + return devicesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Device devices = 3; + */ + public java.util.List getDevicesOrBuilderList() { + if (devicesBuilder_ != null) { + return devicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(devices_); + } + } + + /** + * repeated .context.Device devices = 3; + */ + public context.ContextOuterClass.Device.Builder addDevicesBuilder() { + return getDevicesFieldBuilder().addBuilder(context.ContextOuterClass.Device.getDefaultInstance()); + } + + /** + * repeated .context.Device devices = 3; + */ + public context.ContextOuterClass.Device.Builder addDevicesBuilder(int index) { + return getDevicesFieldBuilder().addBuilder(index, context.ContextOuterClass.Device.getDefaultInstance()); + } + + /** + * repeated .context.Device devices = 3; + */ + public java.util.List getDevicesBuilderList() { + return getDevicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDevicesFieldBuilder() { + if (devicesBuilder_ == null) { + devicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(devices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + devices_ = null; + } + return devicesBuilder_; + } + + private java.util.List links_ = java.util.Collections.emptyList(); + + private void ensureLinksIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + links_ = new java.util.ArrayList(links_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 linksBuilder_; + + /** + * repeated .context.Link links = 4; + */ + public java.util.List getLinksList() { + if (linksBuilder_ == null) { + return java.util.Collections.unmodifiableList(links_); + } else { + return linksBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Link links = 4; + */ + public int getLinksCount() { + if (linksBuilder_ == null) { + return links_.size(); + } else { + return linksBuilder_.getCount(); + } + } + + /** + * repeated .context.Link links = 4; + */ + public context.ContextOuterClass.Link getLinks(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Link links = 4; + */ + public Builder setLinks(int index, context.ContextOuterClass.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.set(index, value); + onChanged(); + } else { + linksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder setLinks(int index, context.ContextOuterClass.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.set(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder addLinks(context.ContextOuterClass.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + } else { + linksBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder addLinks(int index, context.ContextOuterClass.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(index, value); + onChanged(); + } else { + linksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder addLinks(context.ContextOuterClass.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder addLinks(int index, context.ContextOuterClass.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder addAllLinks(java.lang.Iterable values) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, links_); + onChanged(); + } else { + linksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder clearLinks() { + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + linksBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder removeLinks(int index) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.remove(index); + onChanged(); + } else { + linksBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public context.ContextOuterClass.Link.Builder getLinksBuilder(int index) { + return getLinksFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Link links = 4; + */ + public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Link links = 4; + */ + public java.util.List getLinksOrBuilderList() { + if (linksBuilder_ != null) { + return linksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(links_); + } + } + + /** + * repeated .context.Link links = 4; + */ + public context.ContextOuterClass.Link.Builder addLinksBuilder() { + return getLinksFieldBuilder().addBuilder(context.ContextOuterClass.Link.getDefaultInstance()); + } + + /** + * repeated .context.Link links = 4; + */ + public context.ContextOuterClass.Link.Builder addLinksBuilder(int index) { + return getLinksFieldBuilder().addBuilder(index, context.ContextOuterClass.Link.getDefaultInstance()); + } + + /** + * repeated .context.Link links = 4; + */ + public java.util.List getLinksBuilderList() { + return getLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getLinksFieldBuilder() { + if (linksBuilder_ == null) { + linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(links_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + links_ = null; + } + return linksBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.TopologyDetails) + } + + // @@protoc_insertion_point(class_scope:context.TopologyDetails) + private static final context.ContextOuterClass.TopologyDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyDetails(); + } + + public static context.ContextOuterClass.TopologyDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TopologyIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TopologyIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + java.util.List getTopologyIdsList(); + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + context.ContextOuterClass.TopologyId getTopologyIds(int index); + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + int getTopologyIdsCount(); + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + java.util.List getTopologyIdsOrBuilderList(); + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.TopologyIdList} + */ + public static final class TopologyIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TopologyIdList) + TopologyIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use TopologyIdList.newBuilder() to construct. + private TopologyIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TopologyIdList() { + topologyIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyIdList.class, context.ContextOuterClass.TopologyIdList.Builder.class); + } + + public static final int TOPOLOGY_IDS_FIELD_NUMBER = 1; + + private java.util.List topologyIds_; + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + @java.lang.Override + public java.util.List getTopologyIdsList() { + return topologyIds_; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + @java.lang.Override + public java.util.List getTopologyIdsOrBuilderList() { + return topologyIds_; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + @java.lang.Override + public int getTopologyIdsCount() { + return topologyIds_.size(); + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyId getTopologyIds(int index) { + return topologyIds_.get(index); + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder(int index) { + return topologyIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < topologyIds_.size(); i++) { + output.writeMessage(1, topologyIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < topologyIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topologyIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TopologyIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.TopologyIdList other = (context.ContextOuterClass.TopologyIdList) obj; + if (!getTopologyIdsList().equals(other.getTopologyIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTopologyIdsCount() > 0) { + hash = (37 * hash) + TOPOLOGY_IDS_FIELD_NUMBER; + hash = (53 * hash) + getTopologyIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.TopologyIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.TopologyIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TopologyIdList) + context.ContextOuterClass.TopologyIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TopologyIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyIdList.class, context.ContextOuterClass.TopologyIdList.Builder.class); + } + + // 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(); + if (topologyIdsBuilder_ == null) { + topologyIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + topologyIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TopologyIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyIdList getDefaultInstanceForType() { + return context.ContextOuterClass.TopologyIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.TopologyIdList build() { + context.ContextOuterClass.TopologyIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyIdList buildPartial() { + context.ContextOuterClass.TopologyIdList result = new context.ContextOuterClass.TopologyIdList(this); + int from_bitField0_ = bitField0_; + if (topologyIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.topologyIds_ = topologyIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TopologyIdList) { + return mergeFrom((context.ContextOuterClass.TopologyIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.TopologyIdList other) { + if (other == context.ContextOuterClass.TopologyIdList.getDefaultInstance()) + return this; + if (topologyIdsBuilder_ == null) { + if (!other.topologyIds_.isEmpty()) { + if (topologyIds_.isEmpty()) { + topologyIds_ = other.topologyIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTopologyIdsIsMutable(); + topologyIds_.addAll(other.topologyIds_); + } + onChanged(); + } + } else { + if (!other.topologyIds_.isEmpty()) { + if (topologyIdsBuilder_.isEmpty()) { + topologyIdsBuilder_.dispose(); + topologyIdsBuilder_ = null; + topologyIds_ = other.topologyIds_; + bitField0_ = (bitField0_ & ~0x00000001); + topologyIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTopologyIdsFieldBuilder() : null; + } else { + topologyIdsBuilder_.addAllMessages(other.topologyIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.TopologyIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List topologyIds_ = java.util.Collections.emptyList(); + + private void ensureTopologyIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + topologyIds_ = new java.util.ArrayList(topologyIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 topologyIdsBuilder_; + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public java.util.List getTopologyIdsList() { + if (topologyIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(topologyIds_); + } else { + return topologyIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public int getTopologyIdsCount() { + if (topologyIdsBuilder_ == null) { + return topologyIds_.size(); + } else { + return topologyIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public context.ContextOuterClass.TopologyId getTopologyIds(int index) { + if (topologyIdsBuilder_ == null) { + return topologyIds_.get(index); + } else { + return topologyIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder setTopologyIds(int index, context.ContextOuterClass.TopologyId value) { + if (topologyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologyIdsIsMutable(); + topologyIds_.set(index, value); + onChanged(); + } else { + topologyIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder setTopologyIds(int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.set(index, builderForValue.build()); + onChanged(); + } else { + topologyIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder addTopologyIds(context.ContextOuterClass.TopologyId value) { + if (topologyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologyIdsIsMutable(); + topologyIds_.add(value); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder addTopologyIds(int index, context.ContextOuterClass.TopologyId value) { + if (topologyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologyIdsIsMutable(); + topologyIds_.add(index, value); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder addTopologyIds(context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.add(builderForValue.build()); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder addTopologyIds(int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.add(index, builderForValue.build()); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder addAllTopologyIds(java.lang.Iterable values) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, topologyIds_); + onChanged(); + } else { + topologyIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder clearTopologyIds() { + if (topologyIdsBuilder_ == null) { + topologyIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + topologyIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder removeTopologyIds(int index) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.remove(index); + onChanged(); + } else { + topologyIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public context.ContextOuterClass.TopologyId.Builder getTopologyIdsBuilder(int index) { + return getTopologyIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder(int index) { + if (topologyIdsBuilder_ == null) { + return topologyIds_.get(index); + } else { + return topologyIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public java.util.List getTopologyIdsOrBuilderList() { + if (topologyIdsBuilder_ != null) { + return topologyIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(topologyIds_); + } + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder() { + return getTopologyIdsFieldBuilder().addBuilder(context.ContextOuterClass.TopologyId.getDefaultInstance()); + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder(int index) { + return getTopologyIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.TopologyId.getDefaultInstance()); + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public java.util.List getTopologyIdsBuilderList() { + return getTopologyIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getTopologyIdsFieldBuilder() { + if (topologyIdsBuilder_ == null) { + topologyIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(topologyIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + topologyIds_ = null; + } + return topologyIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.TopologyIdList) + } + + // @@protoc_insertion_point(class_scope:context.TopologyIdList) + private static final context.ContextOuterClass.TopologyIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyIdList(); + } + + public static context.ContextOuterClass.TopologyIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TopologyListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TopologyList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Topology topologies = 1; + */ + java.util.List getTopologiesList(); + + /** + * repeated .context.Topology topologies = 1; + */ + context.ContextOuterClass.Topology getTopologies(int index); + + /** + * repeated .context.Topology topologies = 1; + */ + int getTopologiesCount(); + + /** + * repeated .context.Topology topologies = 1; + */ + java.util.List getTopologiesOrBuilderList(); + + /** + * repeated .context.Topology topologies = 1; + */ + context.ContextOuterClass.TopologyOrBuilder getTopologiesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.TopologyList} + */ + public static final class TopologyList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TopologyList) + TopologyListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use TopologyList.newBuilder() to construct. + private TopologyList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TopologyList() { + topologies_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyList.class, context.ContextOuterClass.TopologyList.Builder.class); + } + + public static final int TOPOLOGIES_FIELD_NUMBER = 1; + + private java.util.List topologies_; + + /** + * repeated .context.Topology topologies = 1; + */ + @java.lang.Override + public java.util.List getTopologiesList() { + return topologies_; + } + + /** + * repeated .context.Topology topologies = 1; + */ + @java.lang.Override + public java.util.List getTopologiesOrBuilderList() { + return topologies_; + } + + /** + * repeated .context.Topology topologies = 1; + */ + @java.lang.Override + public int getTopologiesCount() { + return topologies_.size(); + } + + /** + * repeated .context.Topology topologies = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Topology getTopologies(int index) { + return topologies_.get(index); + } + + /** + * repeated .context.Topology topologies = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyOrBuilder getTopologiesOrBuilder(int index) { + return topologies_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < topologies_.size(); i++) { + output.writeMessage(1, topologies_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < topologies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topologies_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TopologyList)) { + return super.equals(obj); + } + context.ContextOuterClass.TopologyList other = (context.ContextOuterClass.TopologyList) obj; + if (!getTopologiesList().equals(other.getTopologiesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTopologiesCount() > 0) { + hash = (37 * hash) + TOPOLOGIES_FIELD_NUMBER; + hash = (53 * hash) + getTopologiesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.TopologyList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.TopologyList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.TopologyList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TopologyList) + context.ContextOuterClass.TopologyListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TopologyList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyList.class, context.ContextOuterClass.TopologyList.Builder.class); + } + + // 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(); + if (topologiesBuilder_ == null) { + topologies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + topologiesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TopologyList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyList getDefaultInstanceForType() { + return context.ContextOuterClass.TopologyList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.TopologyList build() { + context.ContextOuterClass.TopologyList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyList buildPartial() { + context.ContextOuterClass.TopologyList result = new context.ContextOuterClass.TopologyList(this); + int from_bitField0_ = bitField0_; + if (topologiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + topologies_ = java.util.Collections.unmodifiableList(topologies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.topologies_ = topologies_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TopologyList) { + return mergeFrom((context.ContextOuterClass.TopologyList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.TopologyList other) { + if (other == context.ContextOuterClass.TopologyList.getDefaultInstance()) + return this; + if (topologiesBuilder_ == null) { + if (!other.topologies_.isEmpty()) { + if (topologies_.isEmpty()) { + topologies_ = other.topologies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTopologiesIsMutable(); + topologies_.addAll(other.topologies_); + } + onChanged(); + } + } else { + if (!other.topologies_.isEmpty()) { + if (topologiesBuilder_.isEmpty()) { + topologiesBuilder_.dispose(); + topologiesBuilder_ = null; + topologies_ = other.topologies_; + bitField0_ = (bitField0_ & ~0x00000001); + topologiesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTopologiesFieldBuilder() : null; + } else { + topologiesBuilder_.addAllMessages(other.topologies_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.TopologyList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List topologies_ = java.util.Collections.emptyList(); + + private void ensureTopologiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + topologies_ = new java.util.ArrayList(topologies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 topologiesBuilder_; + + /** + * repeated .context.Topology topologies = 1; + */ + public java.util.List getTopologiesList() { + if (topologiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(topologies_); + } else { + return topologiesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Topology topologies = 1; + */ + public int getTopologiesCount() { + if (topologiesBuilder_ == null) { + return topologies_.size(); + } else { + return topologiesBuilder_.getCount(); + } + } + + /** + * repeated .context.Topology topologies = 1; + */ + public context.ContextOuterClass.Topology getTopologies(int index) { + if (topologiesBuilder_ == null) { + return topologies_.get(index); + } else { + return topologiesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder setTopologies(int index, context.ContextOuterClass.Topology value) { + if (topologiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologiesIsMutable(); + topologies_.set(index, value); + onChanged(); + } else { + topologiesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder setTopologies(int index, context.ContextOuterClass.Topology.Builder builderForValue) { + if (topologiesBuilder_ == null) { + ensureTopologiesIsMutable(); + topologies_.set(index, builderForValue.build()); + onChanged(); + } else { + topologiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder addTopologies(context.ContextOuterClass.Topology value) { + if (topologiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologiesIsMutable(); + topologies_.add(value); + onChanged(); + } else { + topologiesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder addTopologies(int index, context.ContextOuterClass.Topology value) { + if (topologiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologiesIsMutable(); + topologies_.add(index, value); + onChanged(); + } else { + topologiesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder addTopologies(context.ContextOuterClass.Topology.Builder builderForValue) { + if (topologiesBuilder_ == null) { + ensureTopologiesIsMutable(); + topologies_.add(builderForValue.build()); + onChanged(); + } else { + topologiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder addTopologies(int index, context.ContextOuterClass.Topology.Builder builderForValue) { + if (topologiesBuilder_ == null) { + ensureTopologiesIsMutable(); + topologies_.add(index, builderForValue.build()); + onChanged(); + } else { + topologiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder addAllTopologies(java.lang.Iterable values) { + if (topologiesBuilder_ == null) { + ensureTopologiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, topologies_); + onChanged(); + } else { + topologiesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder clearTopologies() { + if (topologiesBuilder_ == null) { + topologies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + topologiesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder removeTopologies(int index) { + if (topologiesBuilder_ == null) { + ensureTopologiesIsMutable(); + topologies_.remove(index); + onChanged(); + } else { + topologiesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public context.ContextOuterClass.Topology.Builder getTopologiesBuilder(int index) { + return getTopologiesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Topology topologies = 1; + */ + public context.ContextOuterClass.TopologyOrBuilder getTopologiesOrBuilder(int index) { + if (topologiesBuilder_ == null) { + return topologies_.get(index); + } else { + return topologiesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Topology topologies = 1; + */ + public java.util.List getTopologiesOrBuilderList() { + if (topologiesBuilder_ != null) { + return topologiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(topologies_); + } + } + + /** + * repeated .context.Topology topologies = 1; + */ + public context.ContextOuterClass.Topology.Builder addTopologiesBuilder() { + return getTopologiesFieldBuilder().addBuilder(context.ContextOuterClass.Topology.getDefaultInstance()); + } + + /** + * repeated .context.Topology topologies = 1; + */ + public context.ContextOuterClass.Topology.Builder addTopologiesBuilder(int index) { + return getTopologiesFieldBuilder().addBuilder(index, context.ContextOuterClass.Topology.getDefaultInstance()); + } + + /** + * repeated .context.Topology topologies = 1; + */ + public java.util.List getTopologiesBuilderList() { + return getTopologiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getTopologiesFieldBuilder() { + if (topologiesBuilder_ == null) { + topologiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(topologies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + topologies_ = null; + } + return topologiesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.TopologyList) + } + + // @@protoc_insertion_point(class_scope:context.TopologyList) + private static final context.ContextOuterClass.TopologyList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyList(); + } + + public static context.ContextOuterClass.TopologyList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TopologyEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TopologyEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.TopologyId topology_id = 2; + * @return Whether the topologyId field is set. + */ + boolean hasTopologyId(); + + /** + * .context.TopologyId topology_id = 2; + * @return The topologyId. + */ + context.ContextOuterClass.TopologyId getTopologyId(); + + /** + * .context.TopologyId topology_id = 2; + */ + context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + } + + /** + * Protobuf type {@code context.TopologyEvent} + */ + public static final class TopologyEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TopologyEvent) + TopologyEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use TopologyEvent.newBuilder() to construct. + private TopologyEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TopologyEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyEvent.class, context.ContextOuterClass.TopologyEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int TOPOLOGY_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.TopologyId topologyId_; + + /** + * .context.TopologyId topology_id = 2; + * @return Whether the topologyId field is set. + */ + @java.lang.Override + public boolean hasTopologyId() { + return topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 2; + * @return The topologyId. + */ + @java.lang.Override + public context.ContextOuterClass.TopologyId getTopologyId() { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + + /** + * .context.TopologyId topology_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + return getTopologyId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (topologyId_ != null) { + output.writeMessage(2, getTopologyId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (topologyId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTopologyId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TopologyEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.TopologyEvent other = (context.ContextOuterClass.TopologyEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasTopologyId() != other.hasTopologyId()) + return false; + if (hasTopologyId()) { + if (!getTopologyId().equals(other.getTopologyId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasTopologyId()) { + hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; + hash = (53 * hash) + getTopologyId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.TopologyEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.TopologyEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TopologyEvent) + context.ContextOuterClass.TopologyEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TopologyEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyEvent.class, context.ContextOuterClass.TopologyEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (topologyIdBuilder_ == null) { + topologyId_ = null; + } else { + topologyId_ = null; + topologyIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TopologyEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyEvent getDefaultInstanceForType() { + return context.ContextOuterClass.TopologyEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.TopologyEvent build() { + context.ContextOuterClass.TopologyEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TopologyEvent) { + return mergeFrom((context.ContextOuterClass.TopologyEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.TopologyEvent other) { + if (other == context.ContextOuterClass.TopologyEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasTopologyId()) { + mergeTopologyId(other.getTopologyId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.TopologyEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.TopologyId topologyId_; + + private com.google.protobuf.SingleFieldBuilderV3 topologyIdBuilder_; + + /** + * .context.TopologyId topology_id = 2; + * @return Whether the topologyId field is set. + */ + public boolean hasTopologyId() { + return topologyIdBuilder_ != null || topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 2; + * @return The topologyId. + */ + public context.ContextOuterClass.TopologyId getTopologyId() { + if (topologyIdBuilder_ == null) { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } else { + return topologyIdBuilder_.getMessage(); + } + } + + /** + * .context.TopologyId topology_id = 2; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topologyId_ = value; + onChanged(); + } else { + topologyIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 2; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdBuilder_ == null) { + topologyId_ = builderForValue.build(); + onChanged(); + } else { + topologyIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.TopologyId topology_id = 2; + */ + public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (topologyId_ != null) { + topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + } else { + topologyId_ = value; + } + onChanged(); + } else { + topologyIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 2; + */ + public Builder clearTopologyId() { + if (topologyIdBuilder_ == null) { + topologyId_ = null; + onChanged(); + } else { + topologyId_ = null; + topologyIdBuilder_ = null; + } + return this; + } + + /** + * .context.TopologyId topology_id = 2; + */ + public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + onChanged(); + return getTopologyIdFieldBuilder().getBuilder(); + } + + /** + * .context.TopologyId topology_id = 2; + */ + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + if (topologyIdBuilder_ != null) { + return topologyIdBuilder_.getMessageOrBuilder(); + } else { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + } + + /** + * .context.TopologyId topology_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTopologyIdFieldBuilder() { + if (topologyIdBuilder_ == null) { + topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTopologyId(), getParentForChildren(), isClean()); + topologyId_ = null; + } + return topologyIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.TopologyEvent) + } + + // @@protoc_insertion_point(class_scope:context.TopologyEvent) + private static final context.ContextOuterClass.TopologyEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyEvent(); + } + + public static context.ContextOuterClass.TopologyEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.DeviceId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid device_uuid = 1; + * @return Whether the deviceUuid field is set. + */ + boolean hasDeviceUuid(); + + /** + * .context.Uuid device_uuid = 1; + * @return The deviceUuid. + */ + context.ContextOuterClass.Uuid getDeviceUuid(); + + /** + * .context.Uuid device_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder(); + } + + /** + *
+     * ----- Device --------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.DeviceId} + */ + public static final class DeviceId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.DeviceId) + DeviceIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceId.newBuilder() to construct. + private DeviceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceId.class, context.ContextOuterClass.DeviceId.Builder.class); + } + + public static final int DEVICE_UUID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid deviceUuid_; + + /** + * .context.Uuid device_uuid = 1; + * @return Whether the deviceUuid field is set. + */ + @java.lang.Override + public boolean hasDeviceUuid() { + return deviceUuid_ != null; + } + + /** + * .context.Uuid device_uuid = 1; + * @return The deviceUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getDeviceUuid() { + return deviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; + } + + /** + * .context.Uuid device_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder() { + return getDeviceUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (deviceUuid_ != null) { + output.writeMessage(1, getDeviceUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (deviceUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeviceUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.DeviceId)) { + return super.equals(obj); + } + context.ContextOuterClass.DeviceId other = (context.ContextOuterClass.DeviceId) obj; + if (hasDeviceUuid() != other.hasDeviceUuid()) + return false; + if (hasDeviceUuid()) { + if (!getDeviceUuid().equals(other.getDeviceUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDeviceUuid()) { + hash = (37 * hash) + DEVICE_UUID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.DeviceId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.DeviceId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Device --------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.DeviceId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.DeviceId) + context.ContextOuterClass.DeviceIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_DeviceId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceId.class, context.ContextOuterClass.DeviceId.Builder.class); + } + + // 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; + deviceUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_DeviceId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceId getDefaultInstanceForType() { + return context.ContextOuterClass.DeviceId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.DeviceId build() { + context.ContextOuterClass.DeviceId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.DeviceId) { + return mergeFrom((context.ContextOuterClass.DeviceId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.DeviceId other) { + if (other == context.ContextOuterClass.DeviceId.getDefaultInstance()) + return this; + if (other.hasDeviceUuid()) { + mergeDeviceUuid(other.getDeviceUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.DeviceId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid deviceUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceUuidBuilder_; + + /** + * .context.Uuid device_uuid = 1; + * @return Whether the deviceUuid field is set. + */ + public boolean hasDeviceUuid() { + return deviceUuidBuilder_ != null || deviceUuid_ != null; + } + + /** + * .context.Uuid device_uuid = 1; + * @return The deviceUuid. + */ + public context.ContextOuterClass.Uuid getDeviceUuid() { + if (deviceUuidBuilder_ == null) { + return deviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; + } else { + return deviceUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid device_uuid = 1; + */ + public Builder setDeviceUuid(context.ContextOuterClass.Uuid value) { + if (deviceUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceUuid_ = value; + onChanged(); + } else { + deviceUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid device_uuid = 1; + */ + public Builder setDeviceUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (deviceUuidBuilder_ == null) { + deviceUuid_ = builderForValue.build(); + onChanged(); + } else { + deviceUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid device_uuid = 1; + */ + public Builder mergeDeviceUuid(context.ContextOuterClass.Uuid value) { + if (deviceUuidBuilder_ == null) { + if (deviceUuid_ != null) { + deviceUuid_ = context.ContextOuterClass.Uuid.newBuilder(deviceUuid_).mergeFrom(value).buildPartial(); + } else { + deviceUuid_ = value; + } + onChanged(); + } else { + deviceUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid device_uuid = 1; + */ + public Builder clearDeviceUuid() { + if (deviceUuidBuilder_ == null) { + deviceUuid_ = null; + onChanged(); + } else { + deviceUuid_ = null; + deviceUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid device_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getDeviceUuidBuilder() { + onChanged(); + return getDeviceUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid device_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder() { + if (deviceUuidBuilder_ != null) { + return deviceUuidBuilder_.getMessageOrBuilder(); + } else { + return deviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; + } + } + + /** + * .context.Uuid device_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceUuidFieldBuilder() { + if (deviceUuidBuilder_ == null) { + deviceUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceUuid(), getParentForChildren(), isClean()); + deviceUuid_ = null; + } + return deviceUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.DeviceId) + } + + // @@protoc_insertion_point(class_scope:context.DeviceId) + private static final context.ContextOuterClass.DeviceId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceId(); + } + + public static context.ContextOuterClass.DeviceId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Device) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.DeviceId device_id = 1; + * @return Whether the deviceId field is set. + */ + boolean hasDeviceId(); + + /** + * .context.DeviceId device_id = 1; + * @return The deviceId. + */ + context.ContextOuterClass.DeviceId getDeviceId(); + + /** + * .context.DeviceId device_id = 1; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * string device_type = 3; + * @return The deviceType. + */ + java.lang.String getDeviceType(); + + /** + * string device_type = 3; + * @return The bytes for deviceType. + */ + com.google.protobuf.ByteString getDeviceTypeBytes(); + + /** + * .context.DeviceConfig device_config = 4; + * @return Whether the deviceConfig field is set. + */ + boolean hasDeviceConfig(); + + /** + * .context.DeviceConfig device_config = 4; + * @return The deviceConfig. + */ + context.ContextOuterClass.DeviceConfig getDeviceConfig(); + + /** + * .context.DeviceConfig device_config = 4; + */ + context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder(); + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return The enum numeric value on the wire for deviceOperationalStatus. + */ + int getDeviceOperationalStatusValue(); + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return The deviceOperationalStatus. + */ + context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus(); + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return A list containing the deviceDrivers. + */ + java.util.List getDeviceDriversList(); + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return The count of deviceDrivers. + */ + int getDeviceDriversCount(); + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the element to return. + * @return The deviceDrivers at the given index. + */ + context.ContextOuterClass.DeviceDriverEnum getDeviceDrivers(int index); + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return A list containing the enum numeric values on the wire for deviceDrivers. + */ + java.util.List getDeviceDriversValueList(); + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of deviceDrivers at the given index. + */ + int getDeviceDriversValue(int index); + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + java.util.List getDeviceEndpointsList(); + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + context.ContextOuterClass.EndPoint getDeviceEndpoints(int index); + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + int getDeviceEndpointsCount(); + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + java.util.List getDeviceEndpointsOrBuilderList(); + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + context.ContextOuterClass.EndPointOrBuilder getDeviceEndpointsOrBuilder(int index); + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + java.util.List getComponentsList(); + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + context.ContextOuterClass.Component getComponents(int index); + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + int getComponentsCount(); + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + java.util.List getComponentsOrBuilderList(); + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder(int index); + + /** + *
+         * Identifier of node controlling the actual device
+         * 
+ * + * .context.DeviceId controller_id = 9; + * @return Whether the controllerId field is set. + */ + boolean hasControllerId(); + + /** + *
+         * Identifier of node controlling the actual device
+         * 
+ * + * .context.DeviceId controller_id = 9; + * @return The controllerId. + */ + context.ContextOuterClass.DeviceId getControllerId(); + + /** + *
+         * Identifier of node controlling the actual device
+         * 
+ * + * .context.DeviceId controller_id = 9; + */ + context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder(); + } + + /** + * Protobuf type {@code context.Device} + */ + public static final class Device extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Device) + DeviceOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Device.newBuilder() to construct. + private Device(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Device() { + name_ = ""; + deviceType_ = ""; + deviceOperationalStatus_ = 0; + deviceDrivers_ = java.util.Collections.emptyList(); + deviceEndpoints_ = java.util.Collections.emptyList(); + components_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + mutable_bitField0_ |= 0x00000001; + } + deviceDrivers_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 58: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + deviceEndpoints_ = new java.util.ArrayList(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Device_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Device.class, context.ContextOuterClass.Device.Builder.class); + } + + public static final int DEVICE_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.DeviceId deviceId_; + + /** + * .context.DeviceId device_id = 1; + * @return Whether the deviceId field is set. + */ + @java.lang.Override + public boolean hasDeviceId() { + return deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 1; + * @return The deviceId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceId() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + + /** + * .context.DeviceId device_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + return getDeviceId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICE_TYPE_FIELD_NUMBER = 3; + + private volatile java.lang.Object deviceType_; + + /** + * string device_type = 3; + * @return The deviceType. + */ + @java.lang.Override + public java.lang.String getDeviceType() { + java.lang.Object ref = deviceType_; + 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(); + deviceType_ = s; + return s; + } + } + + /** + * string device_type = 3; + * @return The bytes for deviceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeviceTypeBytes() { + java.lang.Object ref = deviceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICE_CONFIG_FIELD_NUMBER = 4; + + private context.ContextOuterClass.DeviceConfig deviceConfig_; + + /** + * .context.DeviceConfig device_config = 4; + * @return Whether the deviceConfig field is set. + */ + @java.lang.Override + public boolean hasDeviceConfig() { + return deviceConfig_ != null; + } + + /** + * .context.DeviceConfig device_config = 4; + * @return The deviceConfig. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceConfig getDeviceConfig() { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } + + /** + * .context.DeviceConfig device_config = 4; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { + return getDeviceConfig(); + } + + public static final int DEVICE_OPERATIONAL_STATUS_FIELD_NUMBER = 5; + + private int deviceOperationalStatus_; + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return The enum numeric value on the wire for deviceOperationalStatus. + */ + @java.lang.Override + public int getDeviceOperationalStatusValue() { + return deviceOperationalStatus_; + } + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return The deviceOperationalStatus. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.valueOf(deviceOperationalStatus_); + return result == null ? context.ContextOuterClass.DeviceOperationalStatusEnum.UNRECOGNIZED : result; + } + + public static final int DEVICE_DRIVERS_FIELD_NUMBER = 6; + + private java.util.List deviceDrivers_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter deviceDrivers_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter() { + + public context.ContextOuterClass.DeviceDriverEnum convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + context.ContextOuterClass.DeviceDriverEnum result = context.ContextOuterClass.DeviceDriverEnum.valueOf(from); + return result == null ? context.ContextOuterClass.DeviceDriverEnum.UNRECOGNIZED : result; + } + }; + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return A list containing the deviceDrivers. + */ + @java.lang.Override + public java.util.List getDeviceDriversList() { + return new com.google.protobuf.Internal.ListAdapter(deviceDrivers_, deviceDrivers_converter_); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return The count of deviceDrivers. + */ + @java.lang.Override + public int getDeviceDriversCount() { + return deviceDrivers_.size(); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the element to return. + * @return The deviceDrivers at the given index. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceDriverEnum getDeviceDrivers(int index) { + return deviceDrivers_converter_.convert(deviceDrivers_.get(index)); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return A list containing the enum numeric values on the wire for deviceDrivers. + */ + @java.lang.Override + public java.util.List getDeviceDriversValueList() { + return deviceDrivers_; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of deviceDrivers at the given index. + */ + @java.lang.Override + public int getDeviceDriversValue(int index) { + return deviceDrivers_.get(index); + } + + private int deviceDriversMemoizedSerializedSize; + + public static final int DEVICE_ENDPOINTS_FIELD_NUMBER = 7; + + private java.util.List deviceEndpoints_; + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + @java.lang.Override + public java.util.List getDeviceEndpointsList() { + return deviceEndpoints_; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + @java.lang.Override + public java.util.List getDeviceEndpointsOrBuilderList() { + return deviceEndpoints_; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + @java.lang.Override + public int getDeviceEndpointsCount() { + return deviceEndpoints_.size(); + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + @java.lang.Override + public context.ContextOuterClass.EndPoint getDeviceEndpoints(int index) { + return deviceEndpoints_.get(index); + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointOrBuilder getDeviceEndpointsOrBuilder(int index) { + return deviceEndpoints_.get(index); + } + + public static final int COMPONENTS_FIELD_NUMBER = 8; + + private java.util.List components_; + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + @java.lang.Override + public java.util.List getComponentsList() { + return components_; + } + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + @java.lang.Override + public java.util.List getComponentsOrBuilderList() { + return components_; + } + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + @java.lang.Override + public int getComponentsCount() { + return components_.size(); + } + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + @java.lang.Override + public context.ContextOuterClass.Component getComponents(int index) { + return components_.get(index); + } + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + @java.lang.Override + public context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder(int index) { + return components_.get(index); + } + + public static final int CONTROLLER_ID_FIELD_NUMBER = 9; + + private context.ContextOuterClass.DeviceId controllerId_; + + /** + *
+         * Identifier of node controlling the actual device
+         * 
+ * + * .context.DeviceId controller_id = 9; + * @return Whether the controllerId field is set. + */ + @java.lang.Override + public boolean hasControllerId() { + return controllerId_ != null; + } + + /** + *
+         * Identifier of node controlling the actual device
+         * 
+ * + * .context.DeviceId controller_id = 9; + * @return The controllerId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getControllerId() { + return controllerId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; + } + + /** + *
+         * Identifier of node controlling the actual device
+         * 
+ * + * .context.DeviceId controller_id = 9; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder() { + return getControllerId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (deviceId_ != null) { + output.writeMessage(1, getDeviceId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getDeviceTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceType_); + } + if (deviceConfig_ != null) { + output.writeMessage(4, getDeviceConfig()); + } + if (deviceOperationalStatus_ != context.ContextOuterClass.DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED.getNumber()) { + output.writeEnum(5, deviceOperationalStatus_); + } + if (getDeviceDriversList().size() > 0) { + output.writeUInt32NoTag(50); + output.writeUInt32NoTag(deviceDriversMemoizedSerializedSize); + } + for (int i = 0; i < deviceDrivers_.size(); i++) { + output.writeEnumNoTag(deviceDrivers_.get(i)); + } + for (int i = 0; i < deviceEndpoints_.size(); i++) { + output.writeMessage(7, deviceEndpoints_.get(i)); + } + for (int i = 0; i < components_.size(); i++) { + output.writeMessage(8, components_.get(i)); + } + if (controllerId_ != null) { + output.writeMessage(9, getControllerId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (deviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeviceId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getDeviceTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceType_); + } + if (deviceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDeviceConfig()); + } + if (deviceOperationalStatus_ != context.ContextOuterClass.DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, deviceOperationalStatus_); + } + { + int dataSize = 0; + for (int i = 0; i < deviceDrivers_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(deviceDrivers_.get(i)); + } + size += dataSize; + if (!getDeviceDriversList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + deviceDriversMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < deviceEndpoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, deviceEndpoints_.get(i)); + } + for (int i = 0; i < components_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, components_.get(i)); + } + if (controllerId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getControllerId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Device)) { + return super.equals(obj); + } + context.ContextOuterClass.Device other = (context.ContextOuterClass.Device) obj; + if (hasDeviceId() != other.hasDeviceId()) + return false; + if (hasDeviceId()) { + if (!getDeviceId().equals(other.getDeviceId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getDeviceType().equals(other.getDeviceType())) + return false; + if (hasDeviceConfig() != other.hasDeviceConfig()) + return false; + if (hasDeviceConfig()) { + if (!getDeviceConfig().equals(other.getDeviceConfig())) + return false; + } + if (deviceOperationalStatus_ != other.deviceOperationalStatus_) + return false; + if (!deviceDrivers_.equals(other.deviceDrivers_)) + return false; + if (!getDeviceEndpointsList().equals(other.getDeviceEndpointsList())) + return false; + if (!getComponentsList().equals(other.getComponentsList())) + return false; + if (hasControllerId() != other.hasControllerId()) + return false; + if (hasControllerId()) { + if (!getControllerId().equals(other.getControllerId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDeviceId()) { + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DEVICE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getDeviceType().hashCode(); + if (hasDeviceConfig()) { + hash = (37 * hash) + DEVICE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDeviceConfig().hashCode(); + } + hash = (37 * hash) + DEVICE_OPERATIONAL_STATUS_FIELD_NUMBER; + hash = (53 * hash) + deviceOperationalStatus_; + if (getDeviceDriversCount() > 0) { + hash = (37 * hash) + DEVICE_DRIVERS_FIELD_NUMBER; + hash = (53 * hash) + deviceDrivers_.hashCode(); + } + if (getDeviceEndpointsCount() > 0) { + hash = (37 * hash) + DEVICE_ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceEndpointsList().hashCode(); + } + if (getComponentsCount() > 0) { + hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + getComponentsList().hashCode(); + } + if (hasControllerId()) { + hash = (37 * hash) + CONTROLLER_ID_FIELD_NUMBER; + hash = (53 * hash) + getControllerId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Device parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Device parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Device parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Device parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Device parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Device parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Device parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Device parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Device parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Device parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Device parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Device parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Device prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Device} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Device) + context.ContextOuterClass.DeviceOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Device_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Device_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Device.class, context.ContextOuterClass.Device.Builder.class); + } + + // 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; + deviceIdBuilder_ = null; + } + name_ = ""; + deviceType_ = ""; + if (deviceConfigBuilder_ == null) { + deviceConfig_ = null; + } else { + deviceConfig_ = null; + deviceConfigBuilder_ = null; + } + deviceOperationalStatus_ = 0; + deviceDrivers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + if (deviceEndpointsBuilder_ == null) { + deviceEndpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + deviceEndpointsBuilder_.clear(); + } + if (componentsBuilder_ == null) { + components_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + componentsBuilder_.clear(); + } + if (controllerIdBuilder_ == null) { + controllerId_ = null; + } else { + controllerId_ = null; + controllerIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Device_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Device getDefaultInstanceForType() { + return context.ContextOuterClass.Device.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Device build() { + context.ContextOuterClass.Device result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + result.deviceType_ = deviceType_; + if (deviceConfigBuilder_ == null) { + result.deviceConfig_ = deviceConfig_; + } else { + result.deviceConfig_ = deviceConfigBuilder_.build(); + } + result.deviceOperationalStatus_ = deviceOperationalStatus_; + if (((bitField0_ & 0x00000001) != 0)) { + deviceDrivers_ = java.util.Collections.unmodifiableList(deviceDrivers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deviceDrivers_ = deviceDrivers_; + if (deviceEndpointsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + deviceEndpoints_ = java.util.Collections.unmodifiableList(deviceEndpoints_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.deviceEndpoints_ = deviceEndpoints_; + } else { + result.deviceEndpoints_ = deviceEndpointsBuilder_.build(); + } + if (componentsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + components_ = java.util.Collections.unmodifiableList(components_); + bitField0_ = (bitField0_ & ~0x00000004); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Device) { + return mergeFrom((context.ContextOuterClass.Device) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Device other) { + if (other == context.ContextOuterClass.Device.getDefaultInstance()) + return this; + if (other.hasDeviceId()) { + mergeDeviceId(other.getDeviceId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDeviceType().isEmpty()) { + deviceType_ = other.deviceType_; + onChanged(); + } + if (other.hasDeviceConfig()) { + mergeDeviceConfig(other.getDeviceConfig()); + } + if (other.deviceOperationalStatus_ != 0) { + setDeviceOperationalStatusValue(other.getDeviceOperationalStatusValue()); + } + if (!other.deviceDrivers_.isEmpty()) { + if (deviceDrivers_.isEmpty()) { + deviceDrivers_ = other.deviceDrivers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeviceDriversIsMutable(); + deviceDrivers_.addAll(other.deviceDrivers_); + } + onChanged(); + } + if (deviceEndpointsBuilder_ == null) { + if (!other.deviceEndpoints_.isEmpty()) { + if (deviceEndpoints_.isEmpty()) { + deviceEndpoints_ = other.deviceEndpoints_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.addAll(other.deviceEndpoints_); + } + onChanged(); + } + } else { + if (!other.deviceEndpoints_.isEmpty()) { + if (deviceEndpointsBuilder_.isEmpty()) { + deviceEndpointsBuilder_.dispose(); + deviceEndpointsBuilder_ = null; + deviceEndpoints_ = other.deviceEndpoints_; + bitField0_ = (bitField0_ & ~0x00000002); + deviceEndpointsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceEndpointsFieldBuilder() : null; + } else { + deviceEndpointsBuilder_.addAllMessages(other.deviceEndpoints_); + } + } + } + if (componentsBuilder_ == null) { + if (!other.components_.isEmpty()) { + if (components_.isEmpty()) { + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureComponentsIsMutable(); + components_.addAll(other.components_); + } + onChanged(); + } + } else { + if (!other.components_.isEmpty()) { + if (componentsBuilder_.isEmpty()) { + componentsBuilder_.dispose(); + componentsBuilder_ = null; + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00000004); + componentsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getComponentsFieldBuilder() : null; + } else { + componentsBuilder_.addAllMessages(other.components_); + } + } + } + if (other.hasControllerId()) { + mergeControllerId(other.getControllerId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Device) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.DeviceId deviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceIdBuilder_; + + /** + * .context.DeviceId device_id = 1; + * @return Whether the deviceId field is set. + */ + public boolean hasDeviceId() { + return deviceIdBuilder_ != null || deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 1; + * @return The deviceId. + */ + public context.ContextOuterClass.DeviceId getDeviceId() { + if (deviceIdBuilder_ == null) { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } else { + return deviceIdBuilder_.getMessage(); + } + } + + /** + * .context.DeviceId device_id = 1; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceId_ = value; + onChanged(); + } else { + deviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 1; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdBuilder_ == null) { + deviceId_ = builderForValue.build(); + onChanged(); + } else { + deviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceId device_id = 1; + */ + public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (deviceId_ != null) { + deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + } else { + deviceId_ = value; + } + onChanged(); + } else { + deviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 1; + */ + public Builder clearDeviceId() { + if (deviceIdBuilder_ == null) { + deviceId_ = null; + onChanged(); + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceId device_id = 1; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + onChanged(); + return getDeviceIdFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceId device_id = 1; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + if (deviceIdBuilder_ != null) { + return deviceIdBuilder_.getMessageOrBuilder(); + } else { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + } + + /** + * .context.DeviceId device_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdFieldBuilder() { + if (deviceIdBuilder_ == null) { + deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceId(), getParentForChildren(), isClean()); + deviceId_ = null; + } + return deviceIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object deviceType_ = ""; + + /** + * string device_type = 3; + * @return The deviceType. + */ + public java.lang.String getDeviceType() { + java.lang.Object ref = deviceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string device_type = 3; + * @return The bytes for deviceType. + */ + public com.google.protobuf.ByteString getDeviceTypeBytes() { + java.lang.Object ref = deviceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string device_type = 3; + * @param value The deviceType to set. + * @return This builder for chaining. + */ + public Builder setDeviceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deviceType_ = value; + onChanged(); + return this; + } + + /** + * string device_type = 3; + * @return This builder for chaining. + */ + public Builder clearDeviceType() { + deviceType_ = getDefaultInstance().getDeviceType(); + onChanged(); + return this; + } + + /** + * string device_type = 3; + * @param value The bytes for deviceType to set. + * @return This builder for chaining. + */ + public Builder setDeviceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deviceType_ = value; + onChanged(); + return this; + } + + private context.ContextOuterClass.DeviceConfig deviceConfig_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceConfigBuilder_; + + /** + * .context.DeviceConfig device_config = 4; + * @return Whether the deviceConfig field is set. + */ + public boolean hasDeviceConfig() { + return deviceConfigBuilder_ != null || deviceConfig_ != null; + } + + /** + * .context.DeviceConfig device_config = 4; + * @return The deviceConfig. + */ + public context.ContextOuterClass.DeviceConfig getDeviceConfig() { + if (deviceConfigBuilder_ == null) { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } else { + return deviceConfigBuilder_.getMessage(); + } + } + + /** + * .context.DeviceConfig device_config = 4; + */ + public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig value) { + if (deviceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceConfig_ = value; + onChanged(); + } else { + deviceConfigBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceConfig device_config = 4; + */ + public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig.Builder builderForValue) { + if (deviceConfigBuilder_ == null) { + deviceConfig_ = builderForValue.build(); + onChanged(); + } else { + deviceConfigBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceConfig device_config = 4; + */ + public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) { + if (deviceConfigBuilder_ == null) { + if (deviceConfig_ != null) { + deviceConfig_ = context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial(); + } else { + deviceConfig_ = value; + } + onChanged(); + } else { + deviceConfigBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceConfig device_config = 4; + */ + public Builder clearDeviceConfig() { + if (deviceConfigBuilder_ == null) { + deviceConfig_ = null; + onChanged(); + } else { + deviceConfig_ = null; + deviceConfigBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceConfig device_config = 4; + */ + public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() { + onChanged(); + return getDeviceConfigFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceConfig device_config = 4; + */ + public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { + if (deviceConfigBuilder_ != null) { + return deviceConfigBuilder_.getMessageOrBuilder(); + } else { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } + } + + /** + * .context.DeviceConfig device_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceConfigFieldBuilder() { + if (deviceConfigBuilder_ == null) { + deviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceConfig(), getParentForChildren(), isClean()); + deviceConfig_ = null; + } + return deviceConfigBuilder_; + } + + private int deviceOperationalStatus_ = 0; + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return The enum numeric value on the wire for deviceOperationalStatus. + */ + @java.lang.Override + public int getDeviceOperationalStatusValue() { + return deviceOperationalStatus_; + } + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @param value The enum numeric value on the wire for deviceOperationalStatus to set. + * @return This builder for chaining. + */ + public Builder setDeviceOperationalStatusValue(int value) { + deviceOperationalStatus_ = value; + onChanged(); + return this; + } + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return The deviceOperationalStatus. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.valueOf(deviceOperationalStatus_); + return result == null ? context.ContextOuterClass.DeviceOperationalStatusEnum.UNRECOGNIZED : result; + } + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @param value The deviceOperationalStatus to set. + * @return This builder for chaining. + */ + public Builder setDeviceOperationalStatus(context.ContextOuterClass.DeviceOperationalStatusEnum value) { + if (value == null) { + throw new NullPointerException(); + } + deviceOperationalStatus_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return This builder for chaining. + */ + public Builder clearDeviceOperationalStatus() { + deviceOperationalStatus_ = 0; + onChanged(); + return this; + } + + private java.util.List deviceDrivers_ = java.util.Collections.emptyList(); + + private void ensureDeviceDriversIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceDrivers_ = new java.util.ArrayList(deviceDrivers_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return A list containing the deviceDrivers. + */ + public java.util.List getDeviceDriversList() { + return new com.google.protobuf.Internal.ListAdapter(deviceDrivers_, deviceDrivers_converter_); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return The count of deviceDrivers. + */ + public int getDeviceDriversCount() { + return deviceDrivers_.size(); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the element to return. + * @return The deviceDrivers at the given index. + */ + public context.ContextOuterClass.DeviceDriverEnum getDeviceDrivers(int index) { + return deviceDrivers_converter_.convert(deviceDrivers_.get(index)); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index to set the value at. + * @param value The deviceDrivers to set. + * @return This builder for chaining. + */ + public Builder setDeviceDrivers(int index, context.ContextOuterClass.DeviceDriverEnum value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceDriversIsMutable(); + deviceDrivers_.set(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param value The deviceDrivers to add. + * @return This builder for chaining. + */ + public Builder addDeviceDrivers(context.ContextOuterClass.DeviceDriverEnum value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceDriversIsMutable(); + deviceDrivers_.add(value.getNumber()); + onChanged(); + return this; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param values The deviceDrivers to add. + * @return This builder for chaining. + */ + public Builder addAllDeviceDrivers(java.lang.Iterable values) { + ensureDeviceDriversIsMutable(); + for (context.ContextOuterClass.DeviceDriverEnum value : values) { + deviceDrivers_.add(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return This builder for chaining. + */ + public Builder clearDeviceDrivers() { + deviceDrivers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return A list containing the enum numeric values on the wire for deviceDrivers. + */ + public java.util.List getDeviceDriversValueList() { + return java.util.Collections.unmodifiableList(deviceDrivers_); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of deviceDrivers at the given index. + */ + public int getDeviceDriversValue(int index) { + return deviceDrivers_.get(index); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of deviceDrivers at the given index. + * @return This builder for chaining. + */ + public Builder setDeviceDriversValue(int index, int value) { + ensureDeviceDriversIsMutable(); + deviceDrivers_.set(index, value); + onChanged(); + return this; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param value The enum numeric value on the wire for deviceDrivers to add. + * @return This builder for chaining. + */ + public Builder addDeviceDriversValue(int value) { + ensureDeviceDriversIsMutable(); + deviceDrivers_.add(value); + onChanged(); + return this; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param values The enum numeric values on the wire for deviceDrivers to add. + * @return This builder for chaining. + */ + public Builder addAllDeviceDriversValue(java.lang.Iterable values) { + ensureDeviceDriversIsMutable(); + for (int value : values) { + deviceDrivers_.add(value); + } + onChanged(); + return this; + } + + private java.util.List deviceEndpoints_ = java.util.Collections.emptyList(); + + private void ensureDeviceEndpointsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + deviceEndpoints_ = new java.util.ArrayList(deviceEndpoints_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 deviceEndpointsBuilder_; + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public java.util.List getDeviceEndpointsList() { + if (deviceEndpointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deviceEndpoints_); + } else { + return deviceEndpointsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public int getDeviceEndpointsCount() { + if (deviceEndpointsBuilder_ == null) { + return deviceEndpoints_.size(); + } else { + return deviceEndpointsBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public context.ContextOuterClass.EndPoint getDeviceEndpoints(int index) { + if (deviceEndpointsBuilder_ == null) { + return deviceEndpoints_.get(index); + } else { + return deviceEndpointsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder setDeviceEndpoints(int index, context.ContextOuterClass.EndPoint value) { + if (deviceEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.set(index, value); + onChanged(); + } else { + deviceEndpointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder setDeviceEndpoints(int index, context.ContextOuterClass.EndPoint.Builder builderForValue) { + if (deviceEndpointsBuilder_ == null) { + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.set(index, builderForValue.build()); + onChanged(); + } else { + deviceEndpointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder addDeviceEndpoints(context.ContextOuterClass.EndPoint value) { + if (deviceEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.add(value); + onChanged(); + } else { + deviceEndpointsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder addDeviceEndpoints(int index, context.ContextOuterClass.EndPoint value) { + if (deviceEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.add(index, value); + onChanged(); + } else { + deviceEndpointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder addDeviceEndpoints(context.ContextOuterClass.EndPoint.Builder builderForValue) { + if (deviceEndpointsBuilder_ == null) { + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.add(builderForValue.build()); + onChanged(); + } else { + deviceEndpointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder addDeviceEndpoints(int index, context.ContextOuterClass.EndPoint.Builder builderForValue) { + if (deviceEndpointsBuilder_ == null) { + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.add(index, builderForValue.build()); + onChanged(); + } else { + deviceEndpointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder addAllDeviceEndpoints(java.lang.Iterable values) { + if (deviceEndpointsBuilder_ == null) { + ensureDeviceEndpointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deviceEndpoints_); + onChanged(); + } else { + deviceEndpointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder clearDeviceEndpoints() { + if (deviceEndpointsBuilder_ == null) { + deviceEndpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + deviceEndpointsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder removeDeviceEndpoints(int index) { + if (deviceEndpointsBuilder_ == null) { + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.remove(index); + onChanged(); + } else { + deviceEndpointsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public context.ContextOuterClass.EndPoint.Builder getDeviceEndpointsBuilder(int index) { + return getDeviceEndpointsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public context.ContextOuterClass.EndPointOrBuilder getDeviceEndpointsOrBuilder(int index) { + if (deviceEndpointsBuilder_ == null) { + return deviceEndpoints_.get(index); + } else { + return deviceEndpointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public java.util.List getDeviceEndpointsOrBuilderList() { + if (deviceEndpointsBuilder_ != null) { + return deviceEndpointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deviceEndpoints_); + } + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public context.ContextOuterClass.EndPoint.Builder addDeviceEndpointsBuilder() { + return getDeviceEndpointsFieldBuilder().addBuilder(context.ContextOuterClass.EndPoint.getDefaultInstance()); + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public context.ContextOuterClass.EndPoint.Builder addDeviceEndpointsBuilder(int index) { + return getDeviceEndpointsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPoint.getDefaultInstance()); + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public java.util.List getDeviceEndpointsBuilderList() { + return getDeviceEndpointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceEndpointsFieldBuilder() { + if (deviceEndpointsBuilder_ == null) { + deviceEndpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceEndpoints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + deviceEndpoints_ = null; + } + return deviceEndpointsBuilder_; + } + + private java.util.List components_ = java.util.Collections.emptyList(); + + private void ensureComponentsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + components_ = new java.util.ArrayList(components_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 componentsBuilder_; + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public java.util.List getComponentsList() { + if (componentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(components_); + } else { + return componentsBuilder_.getMessageList(); + } + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public int getComponentsCount() { + if (componentsBuilder_ == null) { + return components_.size(); + } else { + return componentsBuilder_.getCount(); + } + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public context.ContextOuterClass.Component getComponents(int index) { + if (componentsBuilder_ == null) { + return components_.get(index); + } else { + return componentsBuilder_.getMessage(index); + } + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder setComponents(int index, context.ContextOuterClass.Component value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.set(index, value); + onChanged(); + } else { + componentsBuilder_.setMessage(index, value); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder setComponents(int index, context.ContextOuterClass.Component.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.set(index, builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder addComponents(context.ContextOuterClass.Component value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(value); + onChanged(); + } else { + componentsBuilder_.addMessage(value); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder addComponents(int index, context.ContextOuterClass.Component value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(index, value); + onChanged(); + } else { + componentsBuilder_.addMessage(index, value); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder addComponents(context.ContextOuterClass.Component.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder addComponents(int index, context.ContextOuterClass.Component.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(index, builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder addAllComponents(java.lang.Iterable values) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, components_); + onChanged(); + } else { + componentsBuilder_.addAllMessages(values); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder clearComponents() { + if (componentsBuilder_ == null) { + components_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + componentsBuilder_.clear(); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder removeComponents(int index) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.remove(index); + onChanged(); + } else { + componentsBuilder_.remove(index); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public context.ContextOuterClass.Component.Builder getComponentsBuilder(int index) { + return getComponentsFieldBuilder().getBuilder(index); + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder(int index) { + if (componentsBuilder_ == null) { + return components_.get(index); + } else { + return componentsBuilder_.getMessageOrBuilder(index); + } + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public java.util.List getComponentsOrBuilderList() { + if (componentsBuilder_ != null) { + return componentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(components_); + } + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public context.ContextOuterClass.Component.Builder addComponentsBuilder() { + return getComponentsFieldBuilder().addBuilder(context.ContextOuterClass.Component.getDefaultInstance()); + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public context.ContextOuterClass.Component.Builder addComponentsBuilder(int index) { + return getComponentsFieldBuilder().addBuilder(index, context.ContextOuterClass.Component.getDefaultInstance()); + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public java.util.List getComponentsBuilderList() { + return getComponentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getComponentsFieldBuilder() { + if (componentsBuilder_ == null) { + componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(components_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + components_ = null; + } + return componentsBuilder_; + } + + private context.ContextOuterClass.DeviceId controllerId_; + + private com.google.protobuf.SingleFieldBuilderV3 controllerIdBuilder_; + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + * @return Whether the controllerId field is set. + */ + public boolean hasControllerId() { + return controllerIdBuilder_ != null || controllerId_ != null; + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + * @return The controllerId. + */ + public context.ContextOuterClass.DeviceId getControllerId() { + if (controllerIdBuilder_ == null) { + return controllerId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; + } else { + return controllerIdBuilder_.getMessage(); + } + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + public Builder setControllerId(context.ContextOuterClass.DeviceId value) { + if (controllerIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + controllerId_ = value; + onChanged(); + } else { + controllerIdBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + public Builder setControllerId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (controllerIdBuilder_ == null) { + controllerId_ = builderForValue.build(); + onChanged(); + } else { + controllerIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + public Builder mergeControllerId(context.ContextOuterClass.DeviceId value) { + if (controllerIdBuilder_ == null) { + if (controllerId_ != null) { + controllerId_ = context.ContextOuterClass.DeviceId.newBuilder(controllerId_).mergeFrom(value).buildPartial(); + } else { + controllerId_ = value; + } + onChanged(); + } else { + controllerIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + public Builder clearControllerId() { + if (controllerIdBuilder_ == null) { + controllerId_ = null; + onChanged(); + } else { + controllerId_ = null; + controllerIdBuilder_ = null; + } + return this; + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + public context.ContextOuterClass.DeviceId.Builder getControllerIdBuilder() { + onChanged(); + return getControllerIdFieldBuilder().getBuilder(); + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder() { + if (controllerIdBuilder_ != null) { + return controllerIdBuilder_.getMessageOrBuilder(); + } else { + return controllerId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; + } + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3 getControllerIdFieldBuilder() { + if (controllerIdBuilder_ == null) { + controllerIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getControllerId(), getParentForChildren(), isClean()); + controllerId_ = null; + } + return controllerIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Device) + } + + // @@protoc_insertion_point(class_scope:context.Device) + private static final context.ContextOuterClass.Device DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Device(); + } + + public static context.ContextOuterClass.Device getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Device getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ComponentOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Component) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid component_uuid = 1; + * @return Whether the componentUuid field is set. + */ + boolean hasComponentUuid(); + + /** + * .context.Uuid component_uuid = 1; + * @return The componentUuid. + */ + context.ContextOuterClass.Uuid getComponentUuid(); + + /** + * .context.Uuid component_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * string type = 3; + * @return The type. + */ + java.lang.String getType(); + + /** + * string type = 3; + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + int getAttributesCount(); + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + boolean containsAttributes(java.lang.String key); + + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map getAttributes(); + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + java.util.Map getAttributesMap(); + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue); + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + java.lang.String getAttributesOrThrow(java.lang.String key); + + /** + * string parent = 5; + * @return The parent. + */ + java.lang.String getParent(); + + /** + * string parent = 5; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + } + + /** + *
+     * Defined previously to this section - Tested OK
+     *  
+ * + * Protobuf type {@code context.Component} + */ + public static final class Component extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Component) + ComponentOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Component.newBuilder() to construct. + private Component(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Component() { + name_ = ""; + type_ = ""; + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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 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; + } + + @SuppressWarnings({ "rawtypes" }) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch(number) { + case 4: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Component_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Component.class, context.ContextOuterClass.Component.Builder.class); + } + + public static final int COMPONENT_UUID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid componentUuid_; + + /** + * .context.Uuid component_uuid = 1; + * @return Whether the componentUuid field is set. + */ + @java.lang.Override + public boolean hasComponentUuid() { + return componentUuid_ != null; + } + + /** + * .context.Uuid component_uuid = 1; + * @return The componentUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getComponentUuid() { + return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; + } + + /** + * .context.Uuid component_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder() { + return getComponentUuid(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + + private volatile java.lang.Object type_; + + /** + * string type = 3; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + + /** + * string type = 3; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 4; + + private static final class AttributesDefaultEntryHolder { + + static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance(context.ContextOuterClass.internal_static_context_Component_AttributesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); + } + + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAttributes().getMap().containsKey(key); + } + + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public java.lang.String getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PARENT_FIELD_NUMBER = 5; + + private volatile java.lang.Object parent_; + + /** + * string parent = 5; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * string parent = 5; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (componentUuid_ != null) { + output.writeMessage(1, getComponentUuid()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 4); + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (componentUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getComponentUuid()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); + } + for (java.util.Map.Entry entry : internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry attributes__ = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, attributes__); + } + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Component)) { + return super.equals(obj); + } + context.ContextOuterClass.Component other = (context.ContextOuterClass.Component) obj; + if (hasComponentUuid() != other.hasComponentUuid()) + return false; + if (hasComponentUuid()) { + if (!getComponentUuid().equals(other.getComponentUuid())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getType().equals(other.getType())) + return false; + if (!internalGetAttributes().equals(other.internalGetAttributes())) + return false; + if (!getParent().equals(other.getParent())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasComponentUuid()) { + hash = (37 * hash) + COMPONENT_UUID_FIELD_NUMBER; + hash = (53 * hash) + getComponentUuid().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Component parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Component parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Component parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Component parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Component parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Component parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Component parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Component parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Component parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Component parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Component parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Component parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Component prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * Defined previously to this section - Tested OK
+         *  
+ * + * Protobuf type {@code context.Component} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Component) + context.ContextOuterClass.ComponentOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Component_descriptor; + } + + @SuppressWarnings({ "rawtypes" }) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch(number) { + case 4: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({ "rawtypes" }) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch(number) { + case 4: + return internalGetMutableAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Component_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Component.class, context.ContextOuterClass.Component.Builder.class); + } + + // 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; + componentUuidBuilder_ = null; + } + name_ = ""; + type_ = ""; + internalGetMutableAttributes().clear(); + parent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Component_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Component getDefaultInstanceForType() { + return context.ContextOuterClass.Component.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Component build() { + context.ContextOuterClass.Component result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Component) { + return mergeFrom((context.ContextOuterClass.Component) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Component other) { + if (other == context.ContextOuterClass.Component.getDefaultInstance()) + return this; + if (other.hasComponentUuid()) { + mergeComponentUuid(other.getComponentUuid()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Component) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.Uuid componentUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 componentUuidBuilder_; + + /** + * .context.Uuid component_uuid = 1; + * @return Whether the componentUuid field is set. + */ + public boolean hasComponentUuid() { + return componentUuidBuilder_ != null || componentUuid_ != null; + } + + /** + * .context.Uuid component_uuid = 1; + * @return The componentUuid. + */ + public context.ContextOuterClass.Uuid getComponentUuid() { + if (componentUuidBuilder_ == null) { + return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; + } else { + return componentUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid component_uuid = 1; + */ + public Builder setComponentUuid(context.ContextOuterClass.Uuid value) { + if (componentUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + componentUuid_ = value; + onChanged(); + } else { + componentUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid component_uuid = 1; + */ + public Builder setComponentUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (componentUuidBuilder_ == null) { + componentUuid_ = builderForValue.build(); + onChanged(); + } else { + componentUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid component_uuid = 1; + */ + public Builder mergeComponentUuid(context.ContextOuterClass.Uuid value) { + if (componentUuidBuilder_ == null) { + if (componentUuid_ != null) { + componentUuid_ = context.ContextOuterClass.Uuid.newBuilder(componentUuid_).mergeFrom(value).buildPartial(); + } else { + componentUuid_ = value; + } + onChanged(); + } else { + componentUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid component_uuid = 1; + */ + public Builder clearComponentUuid() { + if (componentUuidBuilder_ == null) { + componentUuid_ = null; + onChanged(); + } else { + componentUuid_ = null; + componentUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid component_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getComponentUuidBuilder() { + onChanged(); + return getComponentUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid component_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder() { + if (componentUuidBuilder_ != null) { + return componentUuidBuilder_.getMessageOrBuilder(); + } else { + return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; + } + } + + /** + * .context.Uuid component_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getComponentUuidFieldBuilder() { + if (componentUuidBuilder_ == null) { + componentUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getComponentUuid(), getParentForChildren(), isClean()); + componentUuid_ = null; + } + return componentUuidBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + + /** + * string type = 3; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string type = 3; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string type = 3; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + return this; + } + + /** + * string type = 3; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + + /** + * string type = 3; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + private com.google.protobuf.MapField internalGetMutableAttributes() { + onChanged(); + ; + if (attributes_ == null) { + attributes_ = com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); + } + if (!attributes_.isMutable()) { + attributes_ = attributes_.copy(); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAttributes().getMap().containsKey(key); + } + + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public java.lang.String getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttributes() { + internalGetMutableAttributes().getMutableMap().clear(); + return this; + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + public Builder removeAttributes(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAttributes().getMutableMap().remove(key); + return this; + } + + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map getMutableAttributes() { + return internalGetMutableAttributes().getMutableMap(); + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + public Builder putAttributes(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAttributes().getMutableMap().put(key, value); + return this; + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + public Builder putAllAttributes(java.util.Map values) { + internalGetMutableAttributes().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object parent_ = ""; + + /** + * string parent = 5; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string parent = 5; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string parent = 5; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + onChanged(); + return this; + } + + /** + * string parent = 5; + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + + /** + * string parent = 5; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Component) + } + + // @@protoc_insertion_point(class_scope:context.Component) + private static final context.ContextOuterClass.Component DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Component(); + } + + public static context.ContextOuterClass.Component getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Component getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:context.DeviceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + java.util.List getConfigRulesList(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + context.ContextOuterClass.ConfigRule getConfigRules(int index); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + int getConfigRulesCount(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + java.util.List getConfigRulesOrBuilderList(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.DeviceConfig} + */ + public static final class DeviceConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.DeviceConfig) + DeviceConfigOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceConfig.newBuilder() to construct. + private DeviceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceConfig() { + configRules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceConfig.class, context.ContextOuterClass.DeviceConfig.Builder.class); + } + + public static final int CONFIG_RULES_FIELD_NUMBER = 1; + + private java.util.List configRules_; + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public java.util.List getConfigRulesList() { + return configRules_; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public java.util.List getConfigRulesOrBuilderList() { + return configRules_; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public int getConfigRulesCount() { + return configRules_.size(); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule getConfigRules(int index) { + return configRules_.get(index); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index) { + return configRules_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < configRules_.size(); i++) { + output.writeMessage(1, configRules_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < configRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configRules_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.DeviceConfig)) { + return super.equals(obj); + } + context.ContextOuterClass.DeviceConfig other = (context.ContextOuterClass.DeviceConfig) obj; + if (!getConfigRulesList().equals(other.getConfigRulesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConfigRulesCount() > 0) { + hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; + hash = (53 * hash) + getConfigRulesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.DeviceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.DeviceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.DeviceConfig) + context.ContextOuterClass.DeviceConfigOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_DeviceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceConfig.class, context.ContextOuterClass.DeviceConfig.Builder.class); + } + + // 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(); + if (configRulesBuilder_ == null) { + configRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + configRulesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_DeviceConfig_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceConfig getDefaultInstanceForType() { + return context.ContextOuterClass.DeviceConfig.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.DeviceConfig build() { + context.ContextOuterClass.DeviceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceConfig buildPartial() { + context.ContextOuterClass.DeviceConfig result = new context.ContextOuterClass.DeviceConfig(this); + int from_bitField0_ = bitField0_; + if (configRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + configRules_ = java.util.Collections.unmodifiableList(configRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.configRules_ = configRules_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.DeviceConfig) { + return mergeFrom((context.ContextOuterClass.DeviceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.DeviceConfig other) { + if (other == context.ContextOuterClass.DeviceConfig.getDefaultInstance()) + return this; + if (configRulesBuilder_ == null) { + if (!other.configRules_.isEmpty()) { + if (configRules_.isEmpty()) { + configRules_ = other.configRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfigRulesIsMutable(); + configRules_.addAll(other.configRules_); + } + onChanged(); + } + } else { + if (!other.configRules_.isEmpty()) { + if (configRulesBuilder_.isEmpty()) { + configRulesBuilder_.dispose(); + configRulesBuilder_ = null; + configRules_ = other.configRules_; + bitField0_ = (bitField0_ & ~0x00000001); + configRulesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConfigRulesFieldBuilder() : null; + } else { + configRulesBuilder_.addAllMessages(other.configRules_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.DeviceConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List configRules_ = java.util.Collections.emptyList(); + + private void ensureConfigRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + configRules_ = new java.util.ArrayList(configRules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 configRulesBuilder_; + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesList() { + if (configRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(configRules_); + } else { + return configRulesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public int getConfigRulesCount() { + if (configRulesBuilder_ == null) { + return configRules_.size(); + } else { + return configRulesBuilder_.getCount(); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule getConfigRules(int index) { + if (configRulesBuilder_ == null) { + return configRules_.get(index); + } else { + return configRulesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder setConfigRules(int index, context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.set(index, value); + onChanged(); + } else { + configRulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder setConfigRules(int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.set(index, builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.add(value); + onChanged(); + } else { + configRulesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(int index, context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.add(index, value); + onChanged(); + } else { + configRulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(index, builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addAllConfigRules(java.lang.Iterable values) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, configRules_); + onChanged(); + } else { + configRulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder clearConfigRules() { + if (configRulesBuilder_ == null) { + configRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + configRulesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder removeConfigRules(int index) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.remove(index); + onChanged(); + } else { + configRulesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder getConfigRulesBuilder(int index) { + return getConfigRulesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index) { + if (configRulesBuilder_ == null) { + return configRules_.get(index); + } else { + return configRulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesOrBuilderList() { + if (configRulesBuilder_ != null) { + return configRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configRules_); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder() { + return getConfigRulesFieldBuilder().addBuilder(context.ContextOuterClass.ConfigRule.getDefaultInstance()); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder(int index) { + return getConfigRulesFieldBuilder().addBuilder(index, context.ContextOuterClass.ConfigRule.getDefaultInstance()); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesBuilderList() { + return getConfigRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getConfigRulesFieldBuilder() { + if (configRulesBuilder_ == null) { + configRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(configRules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + configRules_ = null; + } + return configRulesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.DeviceConfig) + } + + // @@protoc_insertion_point(class_scope:context.DeviceConfig) + private static final context.ContextOuterClass.DeviceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceConfig(); + } + + public static context.ContextOuterClass.DeviceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.DeviceIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.DeviceId device_ids = 1; + */ + java.util.List getDeviceIdsList(); + + /** + * repeated .context.DeviceId device_ids = 1; + */ + context.ContextOuterClass.DeviceId getDeviceIds(int index); + + /** + * repeated .context.DeviceId device_ids = 1; + */ + int getDeviceIdsCount(); + + /** + * repeated .context.DeviceId device_ids = 1; + */ + java.util.List getDeviceIdsOrBuilderList(); + + /** + * repeated .context.DeviceId device_ids = 1; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.DeviceIdList} + */ + public static final class DeviceIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.DeviceIdList) + DeviceIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceIdList.newBuilder() to construct. + private DeviceIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceIdList() { + deviceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceIdList.class, context.ContextOuterClass.DeviceIdList.Builder.class); + } + + public static final int DEVICE_IDS_FIELD_NUMBER = 1; + + private java.util.List deviceIds_; + + /** + * repeated .context.DeviceId device_ids = 1; + */ + @java.lang.Override + public java.util.List getDeviceIdsList() { + return deviceIds_; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + @java.lang.Override + public java.util.List getDeviceIdsOrBuilderList() { + return deviceIds_; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + @java.lang.Override + public int getDeviceIdsCount() { + return deviceIds_.size(); + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceIds(int index) { + return deviceIds_.get(index); + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index) { + return deviceIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < deviceIds_.size(); i++) { + output.writeMessage(1, deviceIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < deviceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, deviceIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.DeviceIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.DeviceIdList other = (context.ContextOuterClass.DeviceIdList) obj; + if (!getDeviceIdsList().equals(other.getDeviceIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeviceIdsCount() > 0) { + hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.DeviceIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.DeviceIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.DeviceIdList) + context.ContextOuterClass.DeviceIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_DeviceIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceIdList.class, context.ContextOuterClass.DeviceIdList.Builder.class); + } + + // 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(); + if (deviceIdsBuilder_ == null) { + deviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deviceIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_DeviceIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceIdList getDefaultInstanceForType() { + return context.ContextOuterClass.DeviceIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.DeviceIdList build() { + context.ContextOuterClass.DeviceIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceIdList buildPartial() { + context.ContextOuterClass.DeviceIdList result = new context.ContextOuterClass.DeviceIdList(this); + int from_bitField0_ = bitField0_; + if (deviceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deviceIds_ = deviceIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.DeviceIdList) { + return mergeFrom((context.ContextOuterClass.DeviceIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.DeviceIdList other) { + if (other == context.ContextOuterClass.DeviceIdList.getDefaultInstance()) + return this; + if (deviceIdsBuilder_ == null) { + if (!other.deviceIds_.isEmpty()) { + if (deviceIds_.isEmpty()) { + deviceIds_ = other.deviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeviceIdsIsMutable(); + deviceIds_.addAll(other.deviceIds_); + } + onChanged(); + } + } else { + if (!other.deviceIds_.isEmpty()) { + if (deviceIdsBuilder_.isEmpty()) { + deviceIdsBuilder_.dispose(); + deviceIdsBuilder_ = null; + deviceIds_ = other.deviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + deviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceIdsFieldBuilder() : null; + } else { + deviceIdsBuilder_.addAllMessages(other.deviceIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.DeviceIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List deviceIds_ = java.util.Collections.emptyList(); + + private void ensureDeviceIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceIds_ = new java.util.ArrayList(deviceIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 deviceIdsBuilder_; + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public java.util.List getDeviceIdsList() { + if (deviceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deviceIds_); + } else { + return deviceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public int getDeviceIdsCount() { + if (deviceIdsBuilder_ == null) { + return deviceIds_.size(); + } else { + return deviceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public context.ContextOuterClass.DeviceId getDeviceIds(int index) { + if (deviceIdsBuilder_ == null) { + return deviceIds_.get(index); + } else { + return deviceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder setDeviceIds(int index, context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.set(index, value); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder setDeviceIds(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder addDeviceIds(context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.add(value); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder addDeviceIds(int index, context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.add(index, value); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder addDeviceIds(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder addDeviceIds(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder addAllDeviceIds(java.lang.Iterable values) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deviceIds_); + onChanged(); + } else { + deviceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder clearDeviceIds() { + if (deviceIdsBuilder_ == null) { + deviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deviceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder removeDeviceIds(int index) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.remove(index); + onChanged(); + } else { + deviceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdsBuilder(int index) { + return getDeviceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index) { + if (deviceIdsBuilder_ == null) { + return deviceIds_.get(index); + } else { + return deviceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public java.util.List getDeviceIdsOrBuilderList() { + if (deviceIdsBuilder_ != null) { + return deviceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deviceIds_); + } + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder() { + return getDeviceIdsFieldBuilder().addBuilder(context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder(int index) { + return getDeviceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public java.util.List getDeviceIdsBuilderList() { + return getDeviceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceIdsFieldBuilder() { + if (deviceIdsBuilder_ == null) { + deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceIds_ = null; + } + return deviceIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.DeviceIdList) + } + + // @@protoc_insertion_point(class_scope:context.DeviceIdList) + private static final context.ContextOuterClass.DeviceIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceIdList(); + } + + public static context.ContextOuterClass.DeviceIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.DeviceList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Device devices = 1; + */ + java.util.List getDevicesList(); + + /** + * repeated .context.Device devices = 1; + */ + context.ContextOuterClass.Device getDevices(int index); + + /** + * repeated .context.Device devices = 1; + */ + int getDevicesCount(); + + /** + * repeated .context.Device devices = 1; + */ + java.util.List getDevicesOrBuilderList(); + + /** + * repeated .context.Device devices = 1; + */ + context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.DeviceList} + */ + public static final class DeviceList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.DeviceList) + DeviceListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceList.newBuilder() to construct. + private DeviceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceList() { + devices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceList.class, context.ContextOuterClass.DeviceList.Builder.class); + } + + public static final int DEVICES_FIELD_NUMBER = 1; + + private java.util.List devices_; + + /** + * repeated .context.Device devices = 1; + */ + @java.lang.Override + public java.util.List getDevicesList() { + return devices_; + } + + /** + * repeated .context.Device devices = 1; + */ + @java.lang.Override + public java.util.List getDevicesOrBuilderList() { + return devices_; + } + + /** + * repeated .context.Device devices = 1; + */ + @java.lang.Override + public int getDevicesCount() { + return devices_.size(); + } + + /** + * repeated .context.Device devices = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Device getDevices(int index) { + return devices_.get(index); + } + + /** + * repeated .context.Device devices = 1; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder(int index) { + return devices_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < devices_.size(); i++) { + output.writeMessage(1, devices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < devices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, devices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.DeviceList)) { + return super.equals(obj); + } + context.ContextOuterClass.DeviceList other = (context.ContextOuterClass.DeviceList) obj; + if (!getDevicesList().equals(other.getDevicesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDevicesCount() > 0) { + hash = (37 * hash) + DEVICES_FIELD_NUMBER; + hash = (53 * hash) + getDevicesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.DeviceList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.DeviceList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.DeviceList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.DeviceList) + context.ContextOuterClass.DeviceListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_DeviceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceList.class, context.ContextOuterClass.DeviceList.Builder.class); + } + + // 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(); + if (devicesBuilder_ == null) { + devices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + devicesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_DeviceList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceList getDefaultInstanceForType() { + return context.ContextOuterClass.DeviceList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.DeviceList build() { + context.ContextOuterClass.DeviceList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceList buildPartial() { + context.ContextOuterClass.DeviceList result = new context.ContextOuterClass.DeviceList(this); + int from_bitField0_ = bitField0_; + if (devicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + devices_ = java.util.Collections.unmodifiableList(devices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.devices_ = devices_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.DeviceList) { + return mergeFrom((context.ContextOuterClass.DeviceList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.DeviceList other) { + if (other == context.ContextOuterClass.DeviceList.getDefaultInstance()) + return this; + if (devicesBuilder_ == null) { + if (!other.devices_.isEmpty()) { + if (devices_.isEmpty()) { + devices_ = other.devices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDevicesIsMutable(); + devices_.addAll(other.devices_); + } + onChanged(); + } + } else { + if (!other.devices_.isEmpty()) { + if (devicesBuilder_.isEmpty()) { + devicesBuilder_.dispose(); + devicesBuilder_ = null; + devices_ = other.devices_; + bitField0_ = (bitField0_ & ~0x00000001); + devicesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDevicesFieldBuilder() : null; + } else { + devicesBuilder_.addAllMessages(other.devices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.DeviceList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List devices_ = java.util.Collections.emptyList(); + + private void ensureDevicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + devices_ = new java.util.ArrayList(devices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 devicesBuilder_; + + /** + * repeated .context.Device devices = 1; + */ + public java.util.List getDevicesList() { + if (devicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(devices_); + } else { + return devicesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Device devices = 1; + */ + public int getDevicesCount() { + if (devicesBuilder_ == null) { + return devices_.size(); + } else { + return devicesBuilder_.getCount(); + } + } + + /** + * repeated .context.Device devices = 1; + */ + public context.ContextOuterClass.Device getDevices(int index) { + if (devicesBuilder_ == null) { + return devices_.get(index); + } else { + return devicesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder setDevices(int index, context.ContextOuterClass.Device value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.set(index, value); + onChanged(); + } else { + devicesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder setDevices(int index, context.ContextOuterClass.Device.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.set(index, builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder addDevices(context.ContextOuterClass.Device value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.add(value); + onChanged(); + } else { + devicesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder addDevices(int index, context.ContextOuterClass.Device value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.add(index, value); + onChanged(); + } else { + devicesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder addDevices(context.ContextOuterClass.Device.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder addDevices(int index, context.ContextOuterClass.Device.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(index, builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder addAllDevices(java.lang.Iterable values) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, devices_); + onChanged(); + } else { + devicesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder clearDevices() { + if (devicesBuilder_ == null) { + devices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + devicesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder removeDevices(int index) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.remove(index); + onChanged(); + } else { + devicesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public context.ContextOuterClass.Device.Builder getDevicesBuilder(int index) { + return getDevicesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Device devices = 1; + */ + public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder(int index) { + if (devicesBuilder_ == null) { + return devices_.get(index); + } else { + return devicesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Device devices = 1; + */ + public java.util.List getDevicesOrBuilderList() { + if (devicesBuilder_ != null) { + return devicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(devices_); + } + } + + /** + * repeated .context.Device devices = 1; + */ + public context.ContextOuterClass.Device.Builder addDevicesBuilder() { + return getDevicesFieldBuilder().addBuilder(context.ContextOuterClass.Device.getDefaultInstance()); + } + + /** + * repeated .context.Device devices = 1; + */ + public context.ContextOuterClass.Device.Builder addDevicesBuilder(int index) { + return getDevicesFieldBuilder().addBuilder(index, context.ContextOuterClass.Device.getDefaultInstance()); + } + + /** + * repeated .context.Device devices = 1; + */ + public java.util.List getDevicesBuilderList() { + return getDevicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDevicesFieldBuilder() { + if (devicesBuilder_ == null) { + devicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(devices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + devices_ = null; + } + return devicesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.DeviceList) + } + + // @@protoc_insertion_point(class_scope:context.DeviceList) + private static final context.ContextOuterClass.DeviceList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceList(); + } + + public static context.ContextOuterClass.DeviceList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceFilterOrBuilder extends // @@protoc_insertion_point(interface_extends:context.DeviceFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.DeviceIdList device_ids = 1; + * @return Whether the deviceIds field is set. + */ + boolean hasDeviceIds(); + + /** + * .context.DeviceIdList device_ids = 1; + * @return The deviceIds. + */ + context.ContextOuterClass.DeviceIdList getDeviceIds(); + + /** + * .context.DeviceIdList device_ids = 1; + */ + context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder(); + + /** + * bool include_endpoints = 2; + * @return The includeEndpoints. + */ + boolean getIncludeEndpoints(); + + /** + * bool include_config_rules = 3; + * @return The includeConfigRules. + */ + boolean getIncludeConfigRules(); + + /** + * bool include_components = 4; + * @return The includeComponents. + */ + boolean getIncludeComponents(); + } + + /** + * Protobuf type {@code context.DeviceFilter} + */ + public static final class DeviceFilter extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.DeviceFilter) + DeviceFilterOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceFilter.newBuilder() to construct. + private DeviceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceFilter() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceFilter_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceFilter.class, context.ContextOuterClass.DeviceFilter.Builder.class); + } + + public static final int DEVICE_IDS_FIELD_NUMBER = 1; + + private context.ContextOuterClass.DeviceIdList deviceIds_; + + /** + * .context.DeviceIdList device_ids = 1; + * @return Whether the deviceIds field is set. + */ + @java.lang.Override + public boolean hasDeviceIds() { + return deviceIds_ != null; + } + + /** + * .context.DeviceIdList device_ids = 1; + * @return The deviceIds. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdList getDeviceIds() { + return deviceIds_ == null ? context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder() { + return getDeviceIds(); + } + + public static final int INCLUDE_ENDPOINTS_FIELD_NUMBER = 2; + + private boolean includeEndpoints_; + + /** + * bool include_endpoints = 2; + * @return The includeEndpoints. + */ + @java.lang.Override + public boolean getIncludeEndpoints() { + return includeEndpoints_; + } + + public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 3; + + private boolean includeConfigRules_; + + /** + * bool include_config_rules = 3; + * @return The includeConfigRules. + */ + @java.lang.Override + public boolean getIncludeConfigRules() { + return includeConfigRules_; + } + + public static final int INCLUDE_COMPONENTS_FIELD_NUMBER = 4; + + private boolean includeComponents_; + + /** + * bool include_components = 4; + * @return The includeComponents. + */ + @java.lang.Override + public boolean getIncludeComponents() { + return includeComponents_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (deviceIds_ != null) { + output.writeMessage(1, getDeviceIds()); + } + if (includeEndpoints_ != false) { + output.writeBool(2, includeEndpoints_); + } + if (includeConfigRules_ != false) { + output.writeBool(3, includeConfigRules_); + } + if (includeComponents_ != false) { + output.writeBool(4, includeComponents_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (deviceIds_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeviceIds()); + } + if (includeEndpoints_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeEndpoints_); + } + if (includeConfigRules_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, includeConfigRules_); + } + if (includeComponents_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeComponents_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.DeviceFilter)) { + return super.equals(obj); + } + context.ContextOuterClass.DeviceFilter other = (context.ContextOuterClass.DeviceFilter) obj; + if (hasDeviceIds() != other.hasDeviceIds()) + return false; + if (hasDeviceIds()) { + if (!getDeviceIds().equals(other.getDeviceIds())) + return false; + } + if (getIncludeEndpoints() != other.getIncludeEndpoints()) + return false; + if (getIncludeConfigRules() != other.getIncludeConfigRules()) + return false; + if (getIncludeComponents() != other.getIncludeComponents()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDeviceIds()) { + hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceIds().hashCode(); + } + hash = (37 * hash) + INCLUDE_ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeEndpoints()); + hash = (37 * hash) + INCLUDE_CONFIG_RULES_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceFilter parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceFilter parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.DeviceFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.DeviceFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.DeviceFilter) + context.ContextOuterClass.DeviceFilterOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_DeviceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceFilter_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceFilter.class, context.ContextOuterClass.DeviceFilter.Builder.class); + } + + // 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; + deviceIdsBuilder_ = null; + } + includeEndpoints_ = false; + includeConfigRules_ = false; + includeComponents_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_DeviceFilter_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceFilter getDefaultInstanceForType() { + return context.ContextOuterClass.DeviceFilter.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.DeviceFilter build() { + context.ContextOuterClass.DeviceFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.DeviceFilter) { + return mergeFrom((context.ContextOuterClass.DeviceFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.DeviceFilter other) { + if (other == context.ContextOuterClass.DeviceFilter.getDefaultInstance()) + return this; + if (other.hasDeviceIds()) { + mergeDeviceIds(other.getDeviceIds()); + } + if (other.getIncludeEndpoints() != false) { + setIncludeEndpoints(other.getIncludeEndpoints()); + } + if (other.getIncludeConfigRules() != false) { + setIncludeConfigRules(other.getIncludeConfigRules()); + } + if (other.getIncludeComponents() != false) { + setIncludeComponents(other.getIncludeComponents()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.DeviceFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.DeviceIdList deviceIds_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceIdsBuilder_; + + /** + * .context.DeviceIdList device_ids = 1; + * @return Whether the deviceIds field is set. + */ + public boolean hasDeviceIds() { + return deviceIdsBuilder_ != null || deviceIds_ != null; + } + + /** + * .context.DeviceIdList device_ids = 1; + * @return The deviceIds. + */ + public context.ContextOuterClass.DeviceIdList getDeviceIds() { + if (deviceIdsBuilder_ == null) { + return deviceIds_ == null ? context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; + } else { + return deviceIdsBuilder_.getMessage(); + } + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + public Builder setDeviceIds(context.ContextOuterClass.DeviceIdList value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceIds_ = value; + onChanged(); + } else { + deviceIdsBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + public Builder setDeviceIds(context.ContextOuterClass.DeviceIdList.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + deviceIds_ = builderForValue.build(); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + public Builder mergeDeviceIds(context.ContextOuterClass.DeviceIdList value) { + if (deviceIdsBuilder_ == null) { + if (deviceIds_ != null) { + deviceIds_ = context.ContextOuterClass.DeviceIdList.newBuilder(deviceIds_).mergeFrom(value).buildPartial(); + } else { + deviceIds_ = value; + } + onChanged(); + } else { + deviceIdsBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + public Builder clearDeviceIds() { + if (deviceIdsBuilder_ == null) { + deviceIds_ = null; + onChanged(); + } else { + deviceIds_ = null; + deviceIdsBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + public context.ContextOuterClass.DeviceIdList.Builder getDeviceIdsBuilder() { + onChanged(); + return getDeviceIdsFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + public context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder() { + if (deviceIdsBuilder_ != null) { + return deviceIdsBuilder_.getMessageOrBuilder(); + } else { + return deviceIds_ == null ? context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; + } + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdsFieldBuilder() { + if (deviceIdsBuilder_ == null) { + deviceIdsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceIds(), getParentForChildren(), isClean()); + deviceIds_ = null; + } + return deviceIdsBuilder_; + } + + private boolean includeEndpoints_; + + /** + * bool include_endpoints = 2; + * @return The includeEndpoints. + */ + @java.lang.Override + public boolean getIncludeEndpoints() { + return includeEndpoints_; + } + + /** + * bool include_endpoints = 2; + * @param value The includeEndpoints to set. + * @return This builder for chaining. + */ + public Builder setIncludeEndpoints(boolean value) { + includeEndpoints_ = value; + onChanged(); + return this; + } + + /** + * bool include_endpoints = 2; + * @return This builder for chaining. + */ + public Builder clearIncludeEndpoints() { + includeEndpoints_ = false; + onChanged(); + return this; + } + + private boolean includeConfigRules_; + + /** + * bool include_config_rules = 3; + * @return The includeConfigRules. + */ + @java.lang.Override + public boolean getIncludeConfigRules() { + return includeConfigRules_; + } + + /** + * bool include_config_rules = 3; + * @param value The includeConfigRules to set. + * @return This builder for chaining. + */ + public Builder setIncludeConfigRules(boolean value) { + includeConfigRules_ = value; + onChanged(); + return this; + } + + /** + * bool include_config_rules = 3; + * @return This builder for chaining. + */ + public Builder clearIncludeConfigRules() { + includeConfigRules_ = false; + onChanged(); + return this; + } + + private boolean includeComponents_; + + /** + * bool include_components = 4; + * @return The includeComponents. + */ + @java.lang.Override + public boolean getIncludeComponents() { + return includeComponents_; + } + + /** + * bool include_components = 4; + * @param value The includeComponents to set. + * @return This builder for chaining. + */ + public Builder setIncludeComponents(boolean value) { + includeComponents_ = value; + onChanged(); + return this; + } + + /** + * bool include_components = 4; + * @return This builder for chaining. + */ + public Builder clearIncludeComponents() { + includeComponents_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.DeviceFilter) + } + + // @@protoc_insertion_point(class_scope:context.DeviceFilter) + private static final context.ContextOuterClass.DeviceFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceFilter(); + } + + public static context.ContextOuterClass.DeviceFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.DeviceEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + boolean hasDeviceId(); + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + context.ContextOuterClass.DeviceId getDeviceId(); + + /** + * .context.DeviceId device_id = 2; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + + /** + * .context.DeviceConfig device_config = 3; + * @return Whether the deviceConfig field is set. + */ + boolean hasDeviceConfig(); + + /** + * .context.DeviceConfig device_config = 3; + * @return The deviceConfig. + */ + context.ContextOuterClass.DeviceConfig getDeviceConfig(); + + /** + * .context.DeviceConfig device_config = 3; + */ + context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder(); + } + + /** + * Protobuf type {@code context.DeviceEvent} + */ + public static final class DeviceEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.DeviceEvent) + DeviceEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceEvent.newBuilder() to construct. + private DeviceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceEvent.class, context.ContextOuterClass.DeviceEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int DEVICE_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.DeviceId deviceId_; + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + @java.lang.Override + public boolean hasDeviceId() { + return deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceId() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + + /** + * .context.DeviceId device_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + return getDeviceId(); + } + + public static final int DEVICE_CONFIG_FIELD_NUMBER = 3; + + private context.ContextOuterClass.DeviceConfig deviceConfig_; + + /** + * .context.DeviceConfig device_config = 3; + * @return Whether the deviceConfig field is set. + */ + @java.lang.Override + public boolean hasDeviceConfig() { + return deviceConfig_ != null; + } + + /** + * .context.DeviceConfig device_config = 3; + * @return The deviceConfig. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceConfig getDeviceConfig() { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } + + /** + * .context.DeviceConfig device_config = 3; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { + return getDeviceConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (deviceId_ != null) { + output.writeMessage(2, getDeviceId()); + } + if (deviceConfig_ != null) { + output.writeMessage(3, getDeviceConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (deviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeviceId()); + } + if (deviceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeviceConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.DeviceEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.DeviceEvent other = (context.ContextOuterClass.DeviceEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasDeviceId() != other.hasDeviceId()) + return false; + if (hasDeviceId()) { + if (!getDeviceId().equals(other.getDeviceId())) + return false; + } + if (hasDeviceConfig() != other.hasDeviceConfig()) + return false; + if (hasDeviceConfig()) { + if (!getDeviceConfig().equals(other.getDeviceConfig())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasDeviceId()) { + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + } + if (hasDeviceConfig()) { + hash = (37 * hash) + DEVICE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDeviceConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.DeviceEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.DeviceEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.DeviceEvent) + context.ContextOuterClass.DeviceEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_DeviceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceEvent.class, context.ContextOuterClass.DeviceEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (deviceIdBuilder_ == null) { + deviceId_ = null; + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + if (deviceConfigBuilder_ == null) { + deviceConfig_ = null; + } else { + deviceConfig_ = null; + deviceConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_DeviceEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceEvent getDefaultInstanceForType() { + return context.ContextOuterClass.DeviceEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.DeviceEvent build() { + context.ContextOuterClass.DeviceEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.DeviceEvent) { + return mergeFrom((context.ContextOuterClass.DeviceEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.DeviceEvent other) { + if (other == context.ContextOuterClass.DeviceEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasDeviceId()) { + mergeDeviceId(other.getDeviceId()); + } + if (other.hasDeviceConfig()) { + mergeDeviceConfig(other.getDeviceConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.DeviceEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.DeviceId deviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceIdBuilder_; + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + public boolean hasDeviceId() { + return deviceIdBuilder_ != null || deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + public context.ContextOuterClass.DeviceId getDeviceId() { + if (deviceIdBuilder_ == null) { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } else { + return deviceIdBuilder_.getMessage(); + } + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceId_ = value; + onChanged(); + } else { + deviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdBuilder_ == null) { + deviceId_ = builderForValue.build(); + onChanged(); + } else { + deviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (deviceId_ != null) { + deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + } else { + deviceId_ = value; + } + onChanged(); + } else { + deviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder clearDeviceId() { + if (deviceIdBuilder_ == null) { + deviceId_ = null; + onChanged(); + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + onChanged(); + return getDeviceIdFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceId device_id = 2; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + if (deviceIdBuilder_ != null) { + return deviceIdBuilder_.getMessageOrBuilder(); + } else { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + } + + /** + * .context.DeviceId device_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdFieldBuilder() { + if (deviceIdBuilder_ == null) { + deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceId(), getParentForChildren(), isClean()); + deviceId_ = null; + } + return deviceIdBuilder_; + } + + private context.ContextOuterClass.DeviceConfig deviceConfig_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceConfigBuilder_; + + /** + * .context.DeviceConfig device_config = 3; + * @return Whether the deviceConfig field is set. + */ + public boolean hasDeviceConfig() { + return deviceConfigBuilder_ != null || deviceConfig_ != null; + } + + /** + * .context.DeviceConfig device_config = 3; + * @return The deviceConfig. + */ + public context.ContextOuterClass.DeviceConfig getDeviceConfig() { + if (deviceConfigBuilder_ == null) { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } else { + return deviceConfigBuilder_.getMessage(); + } + } + + /** + * .context.DeviceConfig device_config = 3; + */ + public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig value) { + if (deviceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceConfig_ = value; + onChanged(); + } else { + deviceConfigBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceConfig device_config = 3; + */ + public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig.Builder builderForValue) { + if (deviceConfigBuilder_ == null) { + deviceConfig_ = builderForValue.build(); + onChanged(); + } else { + deviceConfigBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceConfig device_config = 3; + */ + public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) { + if (deviceConfigBuilder_ == null) { + if (deviceConfig_ != null) { + deviceConfig_ = context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial(); + } else { + deviceConfig_ = value; + } + onChanged(); + } else { + deviceConfigBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceConfig device_config = 3; + */ + public Builder clearDeviceConfig() { + if (deviceConfigBuilder_ == null) { + deviceConfig_ = null; + onChanged(); + } else { + deviceConfig_ = null; + deviceConfigBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceConfig device_config = 3; + */ + public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() { + onChanged(); + return getDeviceConfigFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceConfig device_config = 3; + */ + public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { + if (deviceConfigBuilder_ != null) { + return deviceConfigBuilder_.getMessageOrBuilder(); + } else { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } + } + + /** + * .context.DeviceConfig device_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceConfigFieldBuilder() { + if (deviceConfigBuilder_ == null) { + deviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceConfig(), getParentForChildren(), isClean()); + deviceConfig_ = null; + } + return deviceConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.DeviceEvent) + } + + // @@protoc_insertion_point(class_scope:context.DeviceEvent) + private static final context.ContextOuterClass.DeviceEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceEvent(); + } + + public static context.ContextOuterClass.DeviceEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.LinkId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid link_uuid = 1; + * @return Whether the linkUuid field is set. + */ + boolean hasLinkUuid(); + + /** + * .context.Uuid link_uuid = 1; + * @return The linkUuid. + */ + context.ContextOuterClass.Uuid getLinkUuid(); + + /** + * .context.Uuid link_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder(); + } + + /** + *
+     * ----- Link ----------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.LinkId} + */ + public static final class LinkId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.LinkId) + LinkIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use LinkId.newBuilder() to construct. + private LinkId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkId.class, context.ContextOuterClass.LinkId.Builder.class); + } + + public static final int LINK_UUID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid linkUuid_; + + /** + * .context.Uuid link_uuid = 1; + * @return Whether the linkUuid field is set. + */ + @java.lang.Override + public boolean hasLinkUuid() { + return linkUuid_ != null; + } + + /** + * .context.Uuid link_uuid = 1; + * @return The linkUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getLinkUuid() { + return linkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; + } + + /** + * .context.Uuid link_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder() { + return getLinkUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (linkUuid_ != null) { + output.writeMessage(1, getLinkUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (linkUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLinkUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.LinkId)) { + return super.equals(obj); + } + context.ContextOuterClass.LinkId other = (context.ContextOuterClass.LinkId) obj; + if (hasLinkUuid() != other.hasLinkUuid()) + return false; + if (hasLinkUuid()) { + if (!getLinkUuid().equals(other.getLinkUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLinkUuid()) { + hash = (37 * hash) + LINK_UUID_FIELD_NUMBER; + hash = (53 * hash) + getLinkUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.LinkId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.LinkId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Link ----------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.LinkId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.LinkId) + context.ContextOuterClass.LinkIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_LinkId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkId.class, context.ContextOuterClass.LinkId.Builder.class); + } + + // 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; + linkUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_LinkId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.LinkId getDefaultInstanceForType() { + return context.ContextOuterClass.LinkId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.LinkId build() { + context.ContextOuterClass.LinkId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.LinkId) { + return mergeFrom((context.ContextOuterClass.LinkId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.LinkId other) { + if (other == context.ContextOuterClass.LinkId.getDefaultInstance()) + return this; + if (other.hasLinkUuid()) { + mergeLinkUuid(other.getLinkUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.LinkId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid linkUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 linkUuidBuilder_; + + /** + * .context.Uuid link_uuid = 1; + * @return Whether the linkUuid field is set. + */ + public boolean hasLinkUuid() { + return linkUuidBuilder_ != null || linkUuid_ != null; + } + + /** + * .context.Uuid link_uuid = 1; + * @return The linkUuid. + */ + public context.ContextOuterClass.Uuid getLinkUuid() { + if (linkUuidBuilder_ == null) { + return linkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; + } else { + return linkUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid link_uuid = 1; + */ + public Builder setLinkUuid(context.ContextOuterClass.Uuid value) { + if (linkUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkUuid_ = value; + onChanged(); + } else { + linkUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid link_uuid = 1; + */ + public Builder setLinkUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (linkUuidBuilder_ == null) { + linkUuid_ = builderForValue.build(); + onChanged(); + } else { + linkUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid link_uuid = 1; + */ + public Builder mergeLinkUuid(context.ContextOuterClass.Uuid value) { + if (linkUuidBuilder_ == null) { + if (linkUuid_ != null) { + linkUuid_ = context.ContextOuterClass.Uuid.newBuilder(linkUuid_).mergeFrom(value).buildPartial(); + } else { + linkUuid_ = value; + } + onChanged(); + } else { + linkUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid link_uuid = 1; + */ + public Builder clearLinkUuid() { + if (linkUuidBuilder_ == null) { + linkUuid_ = null; + onChanged(); + } else { + linkUuid_ = null; + linkUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid link_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getLinkUuidBuilder() { + onChanged(); + return getLinkUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid link_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder() { + if (linkUuidBuilder_ != null) { + return linkUuidBuilder_.getMessageOrBuilder(); + } else { + return linkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; + } + } + + /** + * .context.Uuid link_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getLinkUuidFieldBuilder() { + if (linkUuidBuilder_ == null) { + linkUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getLinkUuid(), getParentForChildren(), isClean()); + linkUuid_ = null; + } + return linkUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.LinkId) + } + + // @@protoc_insertion_point(class_scope:context.LinkId) + private static final context.ContextOuterClass.LinkId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.LinkId(); + } + + public static context.ContextOuterClass.LinkId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.LinkId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkAttributesOrBuilder extends // @@protoc_insertion_point(interface_extends:context.LinkAttributes) + com.google.protobuf.MessageOrBuilder { + + /** + * float total_capacity_gbps = 1; + * @return The totalCapacityGbps. + */ + float getTotalCapacityGbps(); + + /** + * float used_capacity_gbps = 2; + * @return The usedCapacityGbps. + */ + float getUsedCapacityGbps(); + } + + /** + * Protobuf type {@code context.LinkAttributes} + */ + public static final class LinkAttributes extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.LinkAttributes) + LinkAttributesOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use LinkAttributes.newBuilder() to construct. + private LinkAttributes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkAttributes() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkAttributes_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkAttributes.class, context.ContextOuterClass.LinkAttributes.Builder.class); + } + + public static final int TOTAL_CAPACITY_GBPS_FIELD_NUMBER = 1; + + private float totalCapacityGbps_; + + /** + * float total_capacity_gbps = 1; + * @return The totalCapacityGbps. + */ + @java.lang.Override + public float getTotalCapacityGbps() { + return totalCapacityGbps_; + } + + public static final int USED_CAPACITY_GBPS_FIELD_NUMBER = 2; + + private float usedCapacityGbps_; + + /** + * float used_capacity_gbps = 2; + * @return The usedCapacityGbps. + */ + @java.lang.Override + public float getUsedCapacityGbps() { + return usedCapacityGbps_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (totalCapacityGbps_ != 0F) { + output.writeFloat(1, totalCapacityGbps_); + } + if (usedCapacityGbps_ != 0F) { + output.writeFloat(2, usedCapacityGbps_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (totalCapacityGbps_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, totalCapacityGbps_); + } + if (usedCapacityGbps_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, usedCapacityGbps_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.LinkAttributes)) { + return super.equals(obj); + } + context.ContextOuterClass.LinkAttributes other = (context.ContextOuterClass.LinkAttributes) obj; + if (java.lang.Float.floatToIntBits(getTotalCapacityGbps()) != java.lang.Float.floatToIntBits(other.getTotalCapacityGbps())) + return false; + if (java.lang.Float.floatToIntBits(getUsedCapacityGbps()) != java.lang.Float.floatToIntBits(other.getUsedCapacityGbps())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOTAL_CAPACITY_GBPS_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkAttributes parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkAttributes parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.LinkAttributes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.LinkAttributes} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.LinkAttributes) + context.ContextOuterClass.LinkAttributesOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_LinkAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkAttributes_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkAttributes.class, context.ContextOuterClass.LinkAttributes.Builder.class); + } + + // 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(); + totalCapacityGbps_ = 0F; + usedCapacityGbps_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_LinkAttributes_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.LinkAttributes getDefaultInstanceForType() { + return context.ContextOuterClass.LinkAttributes.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.LinkAttributes build() { + context.ContextOuterClass.LinkAttributes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.LinkAttributes buildPartial() { + context.ContextOuterClass.LinkAttributes result = new context.ContextOuterClass.LinkAttributes(this); + result.totalCapacityGbps_ = totalCapacityGbps_; + result.usedCapacityGbps_ = usedCapacityGbps_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.LinkAttributes) { + return mergeFrom((context.ContextOuterClass.LinkAttributes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.LinkAttributes other) { + if (other == context.ContextOuterClass.LinkAttributes.getDefaultInstance()) + return this; + if (other.getTotalCapacityGbps() != 0F) { + setTotalCapacityGbps(other.getTotalCapacityGbps()); + } + if (other.getUsedCapacityGbps() != 0F) { + setUsedCapacityGbps(other.getUsedCapacityGbps()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.LinkAttributes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float totalCapacityGbps_; + + /** + * float total_capacity_gbps = 1; + * @return The totalCapacityGbps. + */ + @java.lang.Override + public float getTotalCapacityGbps() { + return totalCapacityGbps_; + } + + /** + * float total_capacity_gbps = 1; + * @param value The totalCapacityGbps to set. + * @return This builder for chaining. + */ + public Builder setTotalCapacityGbps(float value) { + totalCapacityGbps_ = value; + onChanged(); + return this; + } + + /** + * float total_capacity_gbps = 1; + * @return This builder for chaining. + */ + public Builder clearTotalCapacityGbps() { + totalCapacityGbps_ = 0F; + onChanged(); + return this; + } + + private float usedCapacityGbps_; + + /** + * float used_capacity_gbps = 2; + * @return The usedCapacityGbps. + */ + @java.lang.Override + public float getUsedCapacityGbps() { + return usedCapacityGbps_; + } + + /** + * float used_capacity_gbps = 2; + * @param value The usedCapacityGbps to set. + * @return This builder for chaining. + */ + public Builder setUsedCapacityGbps(float value) { + usedCapacityGbps_ = value; + onChanged(); + return this; + } + + /** + * float used_capacity_gbps = 2; + * @return This builder for chaining. + */ + public Builder clearUsedCapacityGbps() { + usedCapacityGbps_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.LinkAttributes) + } + + // @@protoc_insertion_point(class_scope:context.LinkAttributes) + private static final context.ContextOuterClass.LinkAttributes DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.LinkAttributes(); + } + + public static context.ContextOuterClass.LinkAttributes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.LinkAttributes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Link) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.LinkId link_id = 1; + * @return Whether the linkId field is set. + */ + boolean hasLinkId(); + + /** + * .context.LinkId link_id = 1; + * @return The linkId. + */ + context.ContextOuterClass.LinkId getLinkId(); + + /** + * .context.LinkId link_id = 1; + */ + context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + java.util.List getLinkEndpointIdsList(); + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointId getLinkEndpointIds(int index); + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + int getLinkEndpointIdsCount(); + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + java.util.List getLinkEndpointIdsOrBuilderList(); + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index); + + /** + * .context.LinkAttributes attributes = 4; + * @return Whether the attributes field is set. + */ + boolean hasAttributes(); + + /** + * .context.LinkAttributes attributes = 4; + * @return The attributes. + */ + context.ContextOuterClass.LinkAttributes getAttributes(); + + /** + * .context.LinkAttributes attributes = 4; + */ + context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder(); + } + + /** + * Protobuf type {@code context.Link} + */ + public static final class Link extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Link) + LinkOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Link.newBuilder() to construct. + private Link(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Link() { + name_ = ""; + linkEndpointIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Link_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Link.class, context.ContextOuterClass.Link.Builder.class); + } + + public static final int LINK_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.LinkId linkId_; + + /** + * .context.LinkId link_id = 1; + * @return Whether the linkId field is set. + */ + @java.lang.Override + public boolean hasLinkId() { + return linkId_ != null; + } + + /** + * .context.LinkId link_id = 1; + * @return The linkId. + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkId() { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + + /** + * .context.LinkId link_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + return getLinkId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 3; + + private java.util.List linkEndpointIds_; + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getLinkEndpointIdsList() { + return linkEndpointIds_; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getLinkEndpointIdsOrBuilderList() { + return linkEndpointIds_; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + @java.lang.Override + public int getLinkEndpointIdsCount() { + return linkEndpointIds_.size(); + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { + return linkEndpointIds_.get(index); + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { + return linkEndpointIds_.get(index); + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 4; + + private context.ContextOuterClass.LinkAttributes attributes_; + + /** + * .context.LinkAttributes attributes = 4; + * @return Whether the attributes field is set. + */ + @java.lang.Override + public boolean hasAttributes() { + return attributes_ != null; + } + + /** + * .context.LinkAttributes attributes = 4; + * @return The attributes. + */ + @java.lang.Override + public context.ContextOuterClass.LinkAttributes getAttributes() { + return attributes_ == null ? context.ContextOuterClass.LinkAttributes.getDefaultInstance() : attributes_; + } + + /** + * .context.LinkAttributes attributes = 4; + */ + @java.lang.Override + public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() { + return getAttributes(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (linkId_ != null) { + output.writeMessage(1, getLinkId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < linkEndpointIds_.size(); i++) { + output.writeMessage(3, linkEndpointIds_.get(i)); + } + if (attributes_ != null) { + output.writeMessage(4, getAttributes()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (linkId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLinkId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < linkEndpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, linkEndpointIds_.get(i)); + } + if (attributes_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAttributes()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Link)) { + return super.equals(obj); + } + context.ContextOuterClass.Link other = (context.ContextOuterClass.Link) obj; + if (hasLinkId() != other.hasLinkId()) + return false; + if (hasLinkId()) { + if (!getLinkId().equals(other.getLinkId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getLinkEndpointIdsList().equals(other.getLinkEndpointIdsList())) + return false; + if (hasAttributes() != other.hasAttributes()) + return false; + if (hasAttributes()) { + if (!getAttributes().equals(other.getAttributes())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLinkId()) { + hash = (37 * hash) + LINK_ID_FIELD_NUMBER; + hash = (53 * hash) + getLinkId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getLinkEndpointIdsCount() > 0) { + hash = (37 * hash) + LINK_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getLinkEndpointIdsList().hashCode(); + } + if (hasAttributes()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributes().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Link parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Link parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Link parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Link parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Link parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Link parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Link parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Link parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Link parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Link parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Link parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Link parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Link prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Link} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Link) + context.ContextOuterClass.LinkOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Link_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Link_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Link.class, context.ContextOuterClass.Link.Builder.class); + } + + // 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; + linkIdBuilder_ = null; + } + name_ = ""; + if (linkEndpointIdsBuilder_ == null) { + linkEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + linkEndpointIdsBuilder_.clear(); + } + if (attributesBuilder_ == null) { + attributes_ = null; + } else { + attributes_ = null; + attributesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Link_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Link getDefaultInstanceForType() { + return context.ContextOuterClass.Link.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Link build() { + context.ContextOuterClass.Link result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + if (linkEndpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Link) { + return mergeFrom((context.ContextOuterClass.Link) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Link other) { + if (other == context.ContextOuterClass.Link.getDefaultInstance()) + return this; + if (other.hasLinkId()) { + mergeLinkId(other.getLinkId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (linkEndpointIdsBuilder_ == null) { + if (!other.linkEndpointIds_.isEmpty()) { + if (linkEndpointIds_.isEmpty()) { + linkEndpointIds_ = other.linkEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.addAll(other.linkEndpointIds_); + } + onChanged(); + } + } else { + if (!other.linkEndpointIds_.isEmpty()) { + if (linkEndpointIdsBuilder_.isEmpty()) { + linkEndpointIdsBuilder_.dispose(); + linkEndpointIdsBuilder_ = null; + linkEndpointIds_ = other.linkEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + linkEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkEndpointIdsFieldBuilder() : null; + } else { + linkEndpointIdsBuilder_.addAllMessages(other.linkEndpointIds_); + } + } + } + if (other.hasAttributes()) { + mergeAttributes(other.getAttributes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Link) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.LinkId linkId_; + + private com.google.protobuf.SingleFieldBuilderV3 linkIdBuilder_; + + /** + * .context.LinkId link_id = 1; + * @return Whether the linkId field is set. + */ + public boolean hasLinkId() { + return linkIdBuilder_ != null || linkId_ != null; + } + + /** + * .context.LinkId link_id = 1; + * @return The linkId. + */ + public context.ContextOuterClass.LinkId getLinkId() { + if (linkIdBuilder_ == null) { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } else { + return linkIdBuilder_.getMessage(); + } + } + + /** + * .context.LinkId link_id = 1; + */ + public Builder setLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkId_ = value; + onChanged(); + } else { + linkIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.LinkId link_id = 1; + */ + public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdBuilder_ == null) { + linkId_ = builderForValue.build(); + onChanged(); + } else { + linkIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.LinkId link_id = 1; + */ + public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (linkId_ != null) { + linkId_ = context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); + } else { + linkId_ = value; + } + onChanged(); + } else { + linkIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.LinkId link_id = 1; + */ + public Builder clearLinkId() { + if (linkIdBuilder_ == null) { + linkId_ = null; + onChanged(); + } else { + linkId_ = null; + linkIdBuilder_ = null; + } + return this; + } + + /** + * .context.LinkId link_id = 1; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { + onChanged(); + return getLinkIdFieldBuilder().getBuilder(); + } + + /** + * .context.LinkId link_id = 1; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + if (linkIdBuilder_ != null) { + return linkIdBuilder_.getMessageOrBuilder(); + } else { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + } + + /** + * .context.LinkId link_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getLinkIdFieldBuilder() { + if (linkIdBuilder_ == null) { + linkIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getLinkId(), getParentForChildren(), isClean()); + linkId_ = null; + } + return linkIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.util.List linkEndpointIds_ = java.util.Collections.emptyList(); + + private void ensureLinkEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + linkEndpointIds_ = new java.util.ArrayList(linkEndpointIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 linkEndpointIdsBuilder_; + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public java.util.List getLinkEndpointIdsList() { + if (linkEndpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(linkEndpointIds_); + } else { + return linkEndpointIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public int getLinkEndpointIdsCount() { + if (linkEndpointIdsBuilder_ == null) { + return linkEndpointIds_.size(); + } else { + return linkEndpointIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { + if (linkEndpointIdsBuilder_ == null) { + return linkEndpointIds_.get(index); + } else { + return linkEndpointIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (linkEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.set(index, value); + onChanged(); + } else { + linkEndpointIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.set(index, builderForValue.build()); + onChanged(); + } else { + linkEndpointIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId value) { + if (linkEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(value); + onChanged(); + } else { + linkEndpointIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (linkEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(index, value); + onChanged(); + } else { + linkEndpointIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(builderForValue.build()); + onChanged(); + } else { + linkEndpointIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(index, builderForValue.build()); + onChanged(); + } else { + linkEndpointIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder addAllLinkEndpointIds(java.lang.Iterable values) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, linkEndpointIds_); + onChanged(); + } else { + linkEndpointIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder clearLinkEndpointIds() { + if (linkEndpointIdsBuilder_ == null) { + linkEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + linkEndpointIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder removeLinkEndpointIds(int index) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.remove(index); + onChanged(); + } else { + linkEndpointIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder getLinkEndpointIdsBuilder(int index) { + return getLinkEndpointIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { + if (linkEndpointIdsBuilder_ == null) { + return linkEndpointIds_.get(index); + } else { + return linkEndpointIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public java.util.List getLinkEndpointIdsOrBuilderList() { + if (linkEndpointIdsBuilder_ != null) { + return linkEndpointIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(linkEndpointIds_); + } + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder() { + return getLinkEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder(int index) { + return getLinkEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public java.util.List getLinkEndpointIdsBuilderList() { + return getLinkEndpointIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getLinkEndpointIdsFieldBuilder() { + if (linkEndpointIdsBuilder_ == null) { + linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + linkEndpointIds_ = null; + } + return linkEndpointIdsBuilder_; + } + + private context.ContextOuterClass.LinkAttributes attributes_; + + private com.google.protobuf.SingleFieldBuilderV3 attributesBuilder_; + + /** + * .context.LinkAttributes attributes = 4; + * @return Whether the attributes field is set. + */ + public boolean hasAttributes() { + return attributesBuilder_ != null || attributes_ != null; + } + + /** + * .context.LinkAttributes attributes = 4; + * @return The attributes. + */ + public context.ContextOuterClass.LinkAttributes getAttributes() { + if (attributesBuilder_ == null) { + return attributes_ == null ? context.ContextOuterClass.LinkAttributes.getDefaultInstance() : attributes_; + } else { + return attributesBuilder_.getMessage(); + } + } + + /** + * .context.LinkAttributes attributes = 4; + */ + public Builder setAttributes(context.ContextOuterClass.LinkAttributes value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attributes_ = value; + onChanged(); + } else { + attributesBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.LinkAttributes attributes = 4; + */ + public Builder setAttributes(context.ContextOuterClass.LinkAttributes.Builder builderForValue) { + if (attributesBuilder_ == null) { + attributes_ = builderForValue.build(); + onChanged(); + } else { + attributesBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.LinkAttributes attributes = 4; + */ + public Builder mergeAttributes(context.ContextOuterClass.LinkAttributes value) { + if (attributesBuilder_ == null) { + if (attributes_ != null) { + attributes_ = context.ContextOuterClass.LinkAttributes.newBuilder(attributes_).mergeFrom(value).buildPartial(); + } else { + attributes_ = value; + } + onChanged(); + } else { + attributesBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.LinkAttributes attributes = 4; + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = null; + onChanged(); + } else { + attributes_ = null; + attributesBuilder_ = null; + } + return this; + } + + /** + * .context.LinkAttributes attributes = 4; + */ + public context.ContextOuterClass.LinkAttributes.Builder getAttributesBuilder() { + onChanged(); + return getAttributesFieldBuilder().getBuilder(); + } + + /** + * .context.LinkAttributes attributes = 4; + */ + public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilder(); + } else { + return attributes_ == null ? context.ContextOuterClass.LinkAttributes.getDefaultInstance() : attributes_; + } + } + + /** + * .context.LinkAttributes attributes = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getAttributes(), getParentForChildren(), isClean()); + attributes_ = null; + } + return attributesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Link) + } + + // @@protoc_insertion_point(class_scope:context.Link) + private static final context.ContextOuterClass.Link DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Link(); + } + + public static context.ContextOuterClass.Link getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Link getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.LinkIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.LinkId link_ids = 1; + */ + java.util.List getLinkIdsList(); + + /** + * repeated .context.LinkId link_ids = 1; + */ + context.ContextOuterClass.LinkId getLinkIds(int index); + + /** + * repeated .context.LinkId link_ids = 1; + */ + int getLinkIdsCount(); + + /** + * repeated .context.LinkId link_ids = 1; + */ + java.util.List getLinkIdsOrBuilderList(); + + /** + * repeated .context.LinkId link_ids = 1; + */ + context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.LinkIdList} + */ + public static final class LinkIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.LinkIdList) + LinkIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use LinkIdList.newBuilder() to construct. + private LinkIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkIdList() { + linkIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkIdList.class, context.ContextOuterClass.LinkIdList.Builder.class); + } + + public static final int LINK_IDS_FIELD_NUMBER = 1; + + private java.util.List linkIds_; + + /** + * repeated .context.LinkId link_ids = 1; + */ + @java.lang.Override + public java.util.List getLinkIdsList() { + return linkIds_; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + @java.lang.Override + public java.util.List getLinkIdsOrBuilderList() { + return linkIds_; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + @java.lang.Override + public int getLinkIdsCount() { + return linkIds_.size(); + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkIds(int index) { + return linkIds_.get(index); + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index) { + return linkIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < linkIds_.size(); i++) { + output.writeMessage(1, linkIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < linkIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, linkIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.LinkIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.LinkIdList other = (context.ContextOuterClass.LinkIdList) obj; + if (!getLinkIdsList().equals(other.getLinkIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLinkIdsCount() > 0) { + hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getLinkIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.LinkIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.LinkIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.LinkIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.LinkIdList) + context.ContextOuterClass.LinkIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_LinkIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkIdList.class, context.ContextOuterClass.LinkIdList.Builder.class); + } + + // 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(); + if (linkIdsBuilder_ == null) { + linkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + linkIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_LinkIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.LinkIdList getDefaultInstanceForType() { + return context.ContextOuterClass.LinkIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.LinkIdList build() { + context.ContextOuterClass.LinkIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.LinkIdList buildPartial() { + context.ContextOuterClass.LinkIdList result = new context.ContextOuterClass.LinkIdList(this); + int from_bitField0_ = bitField0_; + if (linkIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + linkIds_ = java.util.Collections.unmodifiableList(linkIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.LinkIdList) { + return mergeFrom((context.ContextOuterClass.LinkIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.LinkIdList other) { + if (other == context.ContextOuterClass.LinkIdList.getDefaultInstance()) + return this; + if (linkIdsBuilder_ == null) { + if (!other.linkIds_.isEmpty()) { + if (linkIds_.isEmpty()) { + linkIds_ = other.linkIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinkIdsIsMutable(); + linkIds_.addAll(other.linkIds_); + } + onChanged(); + } + } else { + if (!other.linkIds_.isEmpty()) { + if (linkIdsBuilder_.isEmpty()) { + linkIdsBuilder_.dispose(); + linkIdsBuilder_ = null; + linkIds_ = other.linkIds_; + bitField0_ = (bitField0_ & ~0x00000001); + linkIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkIdsFieldBuilder() : null; + } else { + linkIdsBuilder_.addAllMessages(other.linkIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.LinkIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List linkIds_ = java.util.Collections.emptyList(); + + private void ensureLinkIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + linkIds_ = new java.util.ArrayList(linkIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 linkIdsBuilder_; + + /** + * repeated .context.LinkId link_ids = 1; + */ + public java.util.List getLinkIdsList() { + if (linkIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(linkIds_); + } else { + return linkIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public int getLinkIdsCount() { + if (linkIdsBuilder_ == null) { + return linkIds_.size(); + } else { + return linkIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public context.ContextOuterClass.LinkId getLinkIds(int index) { + if (linkIdsBuilder_ == null) { + return linkIds_.get(index); + } else { + return linkIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder setLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.set(index, value); + onChanged(); + } else { + linkIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder setLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.set(index, builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder addLinkIds(context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.add(value); + onChanged(); + } else { + linkIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder addLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.add(index, value); + onChanged(); + } else { + linkIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder addLinkIds(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder addLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(index, builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder addAllLinkIds(java.lang.Iterable values) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, linkIds_); + onChanged(); + } else { + linkIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder clearLinkIds() { + if (linkIdsBuilder_ == null) { + linkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + linkIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder removeLinkIds(int index) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.remove(index); + onChanged(); + } else { + linkIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdsBuilder(int index) { + return getLinkIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index) { + if (linkIdsBuilder_ == null) { + return linkIds_.get(index); + } else { + return linkIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public java.util.List getLinkIdsOrBuilderList() { + if (linkIdsBuilder_ != null) { + return linkIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(linkIds_); + } + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder() { + return getLinkIdsFieldBuilder().addBuilder(context.ContextOuterClass.LinkId.getDefaultInstance()); + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder(int index) { + return getLinkIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.LinkId.getDefaultInstance()); + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public java.util.List getLinkIdsBuilderList() { + return getLinkIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getLinkIdsFieldBuilder() { + if (linkIdsBuilder_ == null) { + linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + linkIds_ = null; + } + return linkIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.LinkIdList) + } + + // @@protoc_insertion_point(class_scope:context.LinkIdList) + private static final context.ContextOuterClass.LinkIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.LinkIdList(); + } + + public static context.ContextOuterClass.LinkIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.LinkIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.LinkList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Link links = 1; + */ + java.util.List getLinksList(); + + /** + * repeated .context.Link links = 1; + */ + context.ContextOuterClass.Link getLinks(int index); + + /** + * repeated .context.Link links = 1; + */ + int getLinksCount(); + + /** + * repeated .context.Link links = 1; + */ + java.util.List getLinksOrBuilderList(); + + /** + * repeated .context.Link links = 1; + */ + context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index); + } + + /** + * Protobuf type {@code context.LinkList} + */ + public static final class LinkList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.LinkList) + LinkListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use LinkList.newBuilder() to construct. + private LinkList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkList() { + links_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkList.class, context.ContextOuterClass.LinkList.Builder.class); + } + + public static final int LINKS_FIELD_NUMBER = 1; + + private java.util.List links_; + + /** + * repeated .context.Link links = 1; + */ + @java.lang.Override + public java.util.List getLinksList() { + return links_; + } + + /** + * repeated .context.Link links = 1; + */ + @java.lang.Override + public java.util.List getLinksOrBuilderList() { + return links_; + } + + /** + * repeated .context.Link links = 1; + */ + @java.lang.Override + public int getLinksCount() { + return links_.size(); + } + + /** + * repeated .context.Link links = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Link getLinks(int index) { + return links_.get(index); + } + + /** + * repeated .context.Link links = 1; + */ + @java.lang.Override + public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index) { + return links_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < links_.size(); i++) { + output.writeMessage(1, links_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < links_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, links_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.LinkList)) { + return super.equals(obj); + } + context.ContextOuterClass.LinkList other = (context.ContextOuterClass.LinkList) obj; + if (!getLinksList().equals(other.getLinksList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLinksCount() > 0) { + hash = (37 * hash) + LINKS_FIELD_NUMBER; + hash = (53 * hash) + getLinksList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.LinkList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.LinkList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.LinkList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.LinkList) + context.ContextOuterClass.LinkListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_LinkList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkList.class, context.ContextOuterClass.LinkList.Builder.class); + } + + // 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(); + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + linksBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_LinkList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.LinkList getDefaultInstanceForType() { + return context.ContextOuterClass.LinkList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.LinkList build() { + context.ContextOuterClass.LinkList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.LinkList buildPartial() { + context.ContextOuterClass.LinkList result = new context.ContextOuterClass.LinkList(this); + int from_bitField0_ = bitField0_; + if (linksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + links_ = java.util.Collections.unmodifiableList(links_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.LinkList) { + return mergeFrom((context.ContextOuterClass.LinkList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.LinkList other) { + if (other == context.ContextOuterClass.LinkList.getDefaultInstance()) + return this; + if (linksBuilder_ == null) { + if (!other.links_.isEmpty()) { + if (links_.isEmpty()) { + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinksIsMutable(); + links_.addAll(other.links_); + } + onChanged(); + } + } else { + if (!other.links_.isEmpty()) { + if (linksBuilder_.isEmpty()) { + linksBuilder_.dispose(); + linksBuilder_ = null; + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + linksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinksFieldBuilder() : null; + } else { + linksBuilder_.addAllMessages(other.links_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.LinkList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List links_ = java.util.Collections.emptyList(); + + private void ensureLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + links_ = new java.util.ArrayList(links_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 linksBuilder_; + + /** + * repeated .context.Link links = 1; + */ + public java.util.List getLinksList() { + if (linksBuilder_ == null) { + return java.util.Collections.unmodifiableList(links_); + } else { + return linksBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Link links = 1; + */ + public int getLinksCount() { + if (linksBuilder_ == null) { + return links_.size(); + } else { + return linksBuilder_.getCount(); + } + } + + /** + * repeated .context.Link links = 1; + */ + public context.ContextOuterClass.Link getLinks(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Link links = 1; + */ + public Builder setLinks(int index, context.ContextOuterClass.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.set(index, value); + onChanged(); + } else { + linksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder setLinks(int index, context.ContextOuterClass.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.set(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder addLinks(context.ContextOuterClass.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + } else { + linksBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder addLinks(int index, context.ContextOuterClass.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(index, value); + onChanged(); + } else { + linksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder addLinks(context.ContextOuterClass.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder addLinks(int index, context.ContextOuterClass.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder addAllLinks(java.lang.Iterable values) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, links_); + onChanged(); + } else { + linksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder clearLinks() { + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + linksBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder removeLinks(int index) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.remove(index); + onChanged(); + } else { + linksBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public context.ContextOuterClass.Link.Builder getLinksBuilder(int index) { + return getLinksFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Link links = 1; + */ + public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Link links = 1; + */ + public java.util.List getLinksOrBuilderList() { + if (linksBuilder_ != null) { + return linksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(links_); + } + } + + /** + * repeated .context.Link links = 1; + */ + public context.ContextOuterClass.Link.Builder addLinksBuilder() { + return getLinksFieldBuilder().addBuilder(context.ContextOuterClass.Link.getDefaultInstance()); + } + + /** + * repeated .context.Link links = 1; + */ + public context.ContextOuterClass.Link.Builder addLinksBuilder(int index) { + return getLinksFieldBuilder().addBuilder(index, context.ContextOuterClass.Link.getDefaultInstance()); + } + + /** + * repeated .context.Link links = 1; + */ + public java.util.List getLinksBuilderList() { + return getLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getLinksFieldBuilder() { + if (linksBuilder_ == null) { + linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(links_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + links_ = null; + } + return linksBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.LinkList) + } + + // @@protoc_insertion_point(class_scope:context.LinkList) + private static final context.ContextOuterClass.LinkList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.LinkList(); + } + + public static context.ContextOuterClass.LinkList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.LinkList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.LinkEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.LinkId link_id = 2; + * @return Whether the linkId field is set. + */ + boolean hasLinkId(); + + /** + * .context.LinkId link_id = 2; + * @return The linkId. + */ + context.ContextOuterClass.LinkId getLinkId(); + + /** + * .context.LinkId link_id = 2; + */ + context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder(); + } + + /** + * Protobuf type {@code context.LinkEvent} + */ + public static final class LinkEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.LinkEvent) + LinkEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use LinkEvent.newBuilder() to construct. + private LinkEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkEvent.class, context.ContextOuterClass.LinkEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int LINK_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.LinkId linkId_; + + /** + * .context.LinkId link_id = 2; + * @return Whether the linkId field is set. + */ + @java.lang.Override + public boolean hasLinkId() { + return linkId_ != null; + } + + /** + * .context.LinkId link_id = 2; + * @return The linkId. + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkId() { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + + /** + * .context.LinkId link_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + return getLinkId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (linkId_ != null) { + output.writeMessage(2, getLinkId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (linkId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLinkId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.LinkEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.LinkEvent other = (context.ContextOuterClass.LinkEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasLinkId() != other.hasLinkId()) + return false; + if (hasLinkId()) { + if (!getLinkId().equals(other.getLinkId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasLinkId()) { + hash = (37 * hash) + LINK_ID_FIELD_NUMBER; + hash = (53 * hash) + getLinkId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.LinkEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.LinkEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.LinkEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.LinkEvent) + context.ContextOuterClass.LinkEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_LinkEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkEvent.class, context.ContextOuterClass.LinkEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (linkIdBuilder_ == null) { + linkId_ = null; + } else { + linkId_ = null; + linkIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_LinkEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.LinkEvent getDefaultInstanceForType() { + return context.ContextOuterClass.LinkEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.LinkEvent build() { + context.ContextOuterClass.LinkEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.LinkEvent) { + return mergeFrom((context.ContextOuterClass.LinkEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.LinkEvent other) { + if (other == context.ContextOuterClass.LinkEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasLinkId()) { + mergeLinkId(other.getLinkId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.LinkEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.LinkId linkId_; + + private com.google.protobuf.SingleFieldBuilderV3 linkIdBuilder_; + + /** + * .context.LinkId link_id = 2; + * @return Whether the linkId field is set. + */ + public boolean hasLinkId() { + return linkIdBuilder_ != null || linkId_ != null; + } + + /** + * .context.LinkId link_id = 2; + * @return The linkId. + */ + public context.ContextOuterClass.LinkId getLinkId() { + if (linkIdBuilder_ == null) { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } else { + return linkIdBuilder_.getMessage(); + } + } + + /** + * .context.LinkId link_id = 2; + */ + public Builder setLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkId_ = value; + onChanged(); + } else { + linkIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.LinkId link_id = 2; + */ + public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdBuilder_ == null) { + linkId_ = builderForValue.build(); + onChanged(); + } else { + linkIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.LinkId link_id = 2; + */ + public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (linkId_ != null) { + linkId_ = context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); + } else { + linkId_ = value; + } + onChanged(); + } else { + linkIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.LinkId link_id = 2; + */ + public Builder clearLinkId() { + if (linkIdBuilder_ == null) { + linkId_ = null; + onChanged(); + } else { + linkId_ = null; + linkIdBuilder_ = null; + } + return this; + } + + /** + * .context.LinkId link_id = 2; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { + onChanged(); + return getLinkIdFieldBuilder().getBuilder(); + } + + /** + * .context.LinkId link_id = 2; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + if (linkIdBuilder_ != null) { + return linkIdBuilder_.getMessageOrBuilder(); + } else { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + } + + /** + * .context.LinkId link_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getLinkIdFieldBuilder() { + if (linkIdBuilder_ == null) { + linkIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getLinkId(), getParentForChildren(), isClean()); + linkId_ = null; + } + return linkIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.LinkEvent) + } + + // @@protoc_insertion_point(class_scope:context.LinkEvent) + private static final context.ContextOuterClass.LinkEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.LinkEvent(); + } + + public static context.ContextOuterClass.LinkEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.LinkEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); + + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + + /** + * .context.Uuid service_uuid = 2; + * @return Whether the serviceUuid field is set. + */ + boolean hasServiceUuid(); + + /** + * .context.Uuid service_uuid = 2; + * @return The serviceUuid. + */ + context.ContextOuterClass.Uuid getServiceUuid(); + + /** + * .context.Uuid service_uuid = 2; + */ + context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder(); + } + + /** + *
+     * ----- Service -------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.ServiceId} + */ + public static final class ServiceId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceId) + ServiceIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceId.newBuilder() to construct. + private ServiceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceId.class, context.ContextOuterClass.ServiceId.Builder.class); + } + + public static final int CONTEXT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ContextId contextId_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } + + public static final int SERVICE_UUID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.Uuid serviceUuid_; + + /** + * .context.Uuid service_uuid = 2; + * @return Whether the serviceUuid field is set. + */ + @java.lang.Override + public boolean hasServiceUuid() { + return serviceUuid_ != null; + } + + /** + * .context.Uuid service_uuid = 2; + * @return The serviceUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getServiceUuid() { + return serviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; + } + + /** + * .context.Uuid service_uuid = 2; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder() { + return getServiceUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (serviceUuid_ != null) { + output.writeMessage(2, getServiceUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (serviceUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceId)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceId other = (context.ContextOuterClass.ServiceId) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (hasServiceUuid() != other.hasServiceUuid()) + return false; + if (hasServiceUuid()) { + if (!getServiceUuid().equals(other.getServiceUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + if (hasServiceUuid()) { + hash = (37 * hash) + SERVICE_UUID_FIELD_NUMBER; + hash = (53 * hash) + getServiceUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Service -------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.ServiceId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceId) + context.ContextOuterClass.ServiceIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceId.class, context.ContextOuterClass.ServiceId.Builder.class); + } + + // 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; + contextIdBuilder_ = null; + } + if (serviceUuidBuilder_ == null) { + serviceUuid_ = null; + } else { + serviceUuid_ = null; + serviceUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceId getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceId build() { + context.ContextOuterClass.ServiceId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceId) { + return mergeFrom((context.ContextOuterClass.ServiceId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceId other) { + if (other == context.ContextOuterClass.ServiceId.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (other.hasServiceUuid()) { + mergeServiceUuid(other.getServiceUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.ContextId contextId_; + + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } + + /** + * .context.ContextId context_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } + + private context.ContextOuterClass.Uuid serviceUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceUuidBuilder_; + + /** + * .context.Uuid service_uuid = 2; + * @return Whether the serviceUuid field is set. + */ + public boolean hasServiceUuid() { + return serviceUuidBuilder_ != null || serviceUuid_ != null; + } + + /** + * .context.Uuid service_uuid = 2; + * @return The serviceUuid. + */ + public context.ContextOuterClass.Uuid getServiceUuid() { + if (serviceUuidBuilder_ == null) { + return serviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; + } else { + return serviceUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid service_uuid = 2; + */ + public Builder setServiceUuid(context.ContextOuterClass.Uuid value) { + if (serviceUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceUuid_ = value; + onChanged(); + } else { + serviceUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid service_uuid = 2; + */ + public Builder setServiceUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (serviceUuidBuilder_ == null) { + serviceUuid_ = builderForValue.build(); + onChanged(); + } else { + serviceUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid service_uuid = 2; + */ + public Builder mergeServiceUuid(context.ContextOuterClass.Uuid value) { + if (serviceUuidBuilder_ == null) { + if (serviceUuid_ != null) { + serviceUuid_ = context.ContextOuterClass.Uuid.newBuilder(serviceUuid_).mergeFrom(value).buildPartial(); + } else { + serviceUuid_ = value; + } + onChanged(); + } else { + serviceUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid service_uuid = 2; + */ + public Builder clearServiceUuid() { + if (serviceUuidBuilder_ == null) { + serviceUuid_ = null; + onChanged(); + } else { + serviceUuid_ = null; + serviceUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid service_uuid = 2; + */ + public context.ContextOuterClass.Uuid.Builder getServiceUuidBuilder() { + onChanged(); + return getServiceUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid service_uuid = 2; + */ + public context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder() { + if (serviceUuidBuilder_ != null) { + return serviceUuidBuilder_.getMessageOrBuilder(); + } else { + return serviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; + } + } + + /** + * .context.Uuid service_uuid = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceUuidFieldBuilder() { + if (serviceUuidBuilder_ == null) { + serviceUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceUuid(), getParentForChildren(), isClean()); + serviceUuid_ = null; + } + return serviceUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceId) + } + + // @@protoc_insertion_point(class_scope:context.ServiceId) + private static final context.ContextOuterClass.ServiceId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceId(); + } + + public static context.ContextOuterClass.ServiceId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Service) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ServiceId service_id = 1; + * @return Whether the serviceId field is set. + */ + boolean hasServiceId(); + + /** + * .context.ServiceId service_id = 1; + * @return The serviceId. + */ + context.ContextOuterClass.ServiceId getServiceId(); + + /** + * .context.ServiceId service_id = 1; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return The enum numeric value on the wire for serviceType. + */ + int getServiceTypeValue(); + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return The serviceType. + */ + context.ContextOuterClass.ServiceTypeEnum getServiceType(); + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + java.util.List getServiceEndpointIdsList(); + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + context.ContextOuterClass.EndPointId getServiceEndpointIds(int index); + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + int getServiceEndpointIdsCount(); + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + java.util.List getServiceEndpointIdsOrBuilderList(); + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + context.ContextOuterClass.EndPointIdOrBuilder getServiceEndpointIdsOrBuilder(int index); + + /** + * repeated .context.Constraint service_constraints = 5; + */ + java.util.List getServiceConstraintsList(); + + /** + * repeated .context.Constraint service_constraints = 5; + */ + context.ContextOuterClass.Constraint getServiceConstraints(int index); + + /** + * repeated .context.Constraint service_constraints = 5; + */ + int getServiceConstraintsCount(); + + /** + * repeated .context.Constraint service_constraints = 5; + */ + java.util.List getServiceConstraintsOrBuilderList(); + + /** + * repeated .context.Constraint service_constraints = 5; + */ + context.ContextOuterClass.ConstraintOrBuilder getServiceConstraintsOrBuilder(int index); + + /** + * .context.ServiceStatus service_status = 6; + * @return Whether the serviceStatus field is set. + */ + boolean hasServiceStatus(); + + /** + * .context.ServiceStatus service_status = 6; + * @return The serviceStatus. + */ + context.ContextOuterClass.ServiceStatus getServiceStatus(); + + /** + * .context.ServiceStatus service_status = 6; + */ + context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder(); + + /** + * .context.ServiceConfig service_config = 7; + * @return Whether the serviceConfig field is set. + */ + boolean hasServiceConfig(); + + /** + * .context.ServiceConfig service_config = 7; + * @return The serviceConfig. + */ + context.ContextOuterClass.ServiceConfig getServiceConfig(); + + /** + * .context.ServiceConfig service_config = 7; + */ + context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder(); + + /** + * .context.Timestamp timestamp = 8; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + + /** + * .context.Timestamp timestamp = 8; + * @return The timestamp. + */ + context.ContextOuterClass.Timestamp getTimestamp(); + + /** + * .context.Timestamp timestamp = 8; + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + } + + /** + * Protobuf type {@code context.Service} + */ + public static final class Service extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Service) + ServiceOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Service.newBuilder() to construct. + private Service(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Service() { + name_ = ""; + serviceType_ = 0; + serviceEndpointIds_ = java.util.Collections.emptyList(); + serviceConstraints_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Service_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Service.class, context.ContextOuterClass.Service.Builder.class); + } + + public static final int SERVICE_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ServiceId serviceId_; + + /** + * .context.ServiceId service_id = 1; + * @return Whether the serviceId field is set. + */ + @java.lang.Override + public boolean hasServiceId() { + return serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 1; + * @return The serviceId. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceId() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + + /** + * .context.ServiceId service_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + return getServiceId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_TYPE_FIELD_NUMBER = 3; + + private int serviceType_; + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return The enum numeric value on the wire for serviceType. + */ + @java.lang.Override + public int getServiceTypeValue() { + return serviceType_; + } + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return The serviceType. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceTypeEnum getServiceType() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.valueOf(serviceType_); + return result == null ? context.ContextOuterClass.ServiceTypeEnum.UNRECOGNIZED : result; + } + + public static final int SERVICE_ENDPOINT_IDS_FIELD_NUMBER = 4; + + private java.util.List serviceEndpointIds_; + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + @java.lang.Override + public java.util.List getServiceEndpointIdsList() { + return serviceEndpointIds_; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + @java.lang.Override + public java.util.List getServiceEndpointIdsOrBuilderList() { + return serviceEndpointIds_; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + @java.lang.Override + public int getServiceEndpointIdsCount() { + return serviceEndpointIds_.size(); + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getServiceEndpointIds(int index) { + return serviceEndpointIds_.get(index); + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getServiceEndpointIdsOrBuilder(int index) { + return serviceEndpointIds_.get(index); + } + + public static final int SERVICE_CONSTRAINTS_FIELD_NUMBER = 5; + + private java.util.List serviceConstraints_; + + /** + * repeated .context.Constraint service_constraints = 5; + */ + @java.lang.Override + public java.util.List getServiceConstraintsList() { + return serviceConstraints_; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + @java.lang.Override + public java.util.List getServiceConstraintsOrBuilderList() { + return serviceConstraints_; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + @java.lang.Override + public int getServiceConstraintsCount() { + return serviceConstraints_.size(); + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint getServiceConstraints(int index) { + return serviceConstraints_.get(index); + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + @java.lang.Override + public context.ContextOuterClass.ConstraintOrBuilder getServiceConstraintsOrBuilder(int index) { + return serviceConstraints_.get(index); + } + + public static final int SERVICE_STATUS_FIELD_NUMBER = 6; + + private context.ContextOuterClass.ServiceStatus serviceStatus_; + + /** + * .context.ServiceStatus service_status = 6; + * @return Whether the serviceStatus field is set. + */ + @java.lang.Override + public boolean hasServiceStatus() { + return serviceStatus_ != null; + } + + /** + * .context.ServiceStatus service_status = 6; + * @return The serviceStatus. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceStatus getServiceStatus() { + return serviceStatus_ == null ? context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; + } + + /** + * .context.ServiceStatus service_status = 6; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder() { + return getServiceStatus(); + } + + public static final int SERVICE_CONFIG_FIELD_NUMBER = 7; + + private context.ContextOuterClass.ServiceConfig serviceConfig_; + + /** + * .context.ServiceConfig service_config = 7; + * @return Whether the serviceConfig field is set. + */ + @java.lang.Override + public boolean hasServiceConfig() { + return serviceConfig_ != null; + } + + /** + * .context.ServiceConfig service_config = 7; + * @return The serviceConfig. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceConfig getServiceConfig() { + return serviceConfig_ == null ? context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; + } + + /** + * .context.ServiceConfig service_config = 7; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder() { + return getServiceConfig(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 8; + + private context.ContextOuterClass.Timestamp timestamp_; + + /** + * .context.Timestamp timestamp = 8; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 8; + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + + /** + * .context.Timestamp timestamp = 8; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (serviceId_ != null) { + output.writeMessage(1, getServiceId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (serviceType_ != context.ContextOuterClass.ServiceTypeEnum.SERVICETYPE_UNKNOWN.getNumber()) { + output.writeEnum(3, serviceType_); + } + for (int i = 0; i < serviceEndpointIds_.size(); i++) { + output.writeMessage(4, serviceEndpointIds_.get(i)); + } + for (int i = 0; i < serviceConstraints_.size(); i++) { + output.writeMessage(5, serviceConstraints_.get(i)); + } + if (serviceStatus_ != null) { + output.writeMessage(6, getServiceStatus()); + } + if (serviceConfig_ != null) { + output.writeMessage(7, getServiceConfig()); + } + if (timestamp_ != null) { + output.writeMessage(8, getTimestamp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (serviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getServiceId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (serviceType_ != context.ContextOuterClass.ServiceTypeEnum.SERVICETYPE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, serviceType_); + } + for (int i = 0; i < serviceEndpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, serviceEndpointIds_.get(i)); + } + for (int i = 0; i < serviceConstraints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, serviceConstraints_.get(i)); + } + if (serviceStatus_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getServiceStatus()); + } + if (serviceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getServiceConfig()); + } + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getTimestamp()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Service)) { + return super.equals(obj); + } + context.ContextOuterClass.Service other = (context.ContextOuterClass.Service) obj; + if (hasServiceId() != other.hasServiceId()) + return false; + if (hasServiceId()) { + if (!getServiceId().equals(other.getServiceId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (serviceType_ != other.serviceType_) + return false; + if (!getServiceEndpointIdsList().equals(other.getServiceEndpointIdsList())) + return false; + if (!getServiceConstraintsList().equals(other.getServiceConstraintsList())) + return false; + if (hasServiceStatus() != other.hasServiceStatus()) + return false; + if (hasServiceStatus()) { + if (!getServiceStatus().equals(other.getServiceStatus())) + return false; + } + if (hasServiceConfig() != other.hasServiceConfig()) + return false; + if (hasServiceConfig()) { + if (!getServiceConfig().equals(other.getServiceConfig())) + return false; + } + if (hasTimestamp() != other.hasTimestamp()) + return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasServiceId()) { + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SERVICE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + serviceType_; + if (getServiceEndpointIdsCount() > 0) { + hash = (37 * hash) + SERVICE_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getServiceEndpointIdsList().hashCode(); + } + if (getServiceConstraintsCount() > 0) { + hash = (37 * hash) + SERVICE_CONSTRAINTS_FIELD_NUMBER; + hash = (53 * hash) + getServiceConstraintsList().hashCode(); + } + if (hasServiceStatus()) { + hash = (37 * hash) + SERVICE_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getServiceStatus().hashCode(); + } + if (hasServiceConfig()) { + hash = (37 * hash) + SERVICE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServiceConfig().hashCode(); + } + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Service parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Service parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Service parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Service parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Service parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Service parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Service parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Service parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Service parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Service parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Service parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Service parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Service prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Service} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Service) + context.ContextOuterClass.ServiceOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Service_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Service_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Service.class, context.ContextOuterClass.Service.Builder.class); + } + + // 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; + serviceIdBuilder_ = null; + } + name_ = ""; + serviceType_ = 0; + if (serviceEndpointIdsBuilder_ == null) { + serviceEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + serviceEndpointIdsBuilder_.clear(); + } + if (serviceConstraintsBuilder_ == null) { + serviceConstraints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + serviceConstraintsBuilder_.clear(); + } + if (serviceStatusBuilder_ == null) { + serviceStatus_ = null; + } else { + serviceStatus_ = null; + serviceStatusBuilder_ = null; + } + if (serviceConfigBuilder_ == null) { + serviceConfig_ = null; + } else { + serviceConfig_ = null; + serviceConfigBuilder_ = null; + } + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Service_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Service getDefaultInstanceForType() { + return context.ContextOuterClass.Service.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Service build() { + context.ContextOuterClass.Service result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + result.serviceType_ = serviceType_; + if (serviceEndpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + serviceEndpointIds_ = java.util.Collections.unmodifiableList(serviceEndpointIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.serviceEndpointIds_ = serviceEndpointIds_; + } else { + result.serviceEndpointIds_ = serviceEndpointIdsBuilder_.build(); + } + if (serviceConstraintsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + serviceConstraints_ = java.util.Collections.unmodifiableList(serviceConstraints_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.serviceConstraints_ = serviceConstraints_; + } else { + result.serviceConstraints_ = serviceConstraintsBuilder_.build(); + } + if (serviceStatusBuilder_ == null) { + result.serviceStatus_ = serviceStatus_; + } else { + result.serviceStatus_ = serviceStatusBuilder_.build(); + } + if (serviceConfigBuilder_ == null) { + result.serviceConfig_ = serviceConfig_; + } else { + result.serviceConfig_ = serviceConfigBuilder_.build(); + } + if (timestampBuilder_ == null) { + result.timestamp_ = timestamp_; + } else { + result.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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Service) { + return mergeFrom((context.ContextOuterClass.Service) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Service other) { + if (other == context.ContextOuterClass.Service.getDefaultInstance()) + return this; + if (other.hasServiceId()) { + mergeServiceId(other.getServiceId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.serviceType_ != 0) { + setServiceTypeValue(other.getServiceTypeValue()); + } + if (serviceEndpointIdsBuilder_ == null) { + if (!other.serviceEndpointIds_.isEmpty()) { + if (serviceEndpointIds_.isEmpty()) { + serviceEndpointIds_ = other.serviceEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.addAll(other.serviceEndpointIds_); + } + onChanged(); + } + } else { + if (!other.serviceEndpointIds_.isEmpty()) { + if (serviceEndpointIdsBuilder_.isEmpty()) { + serviceEndpointIdsBuilder_.dispose(); + serviceEndpointIdsBuilder_ = null; + serviceEndpointIds_ = other.serviceEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + serviceEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceEndpointIdsFieldBuilder() : null; + } else { + serviceEndpointIdsBuilder_.addAllMessages(other.serviceEndpointIds_); + } + } + } + if (serviceConstraintsBuilder_ == null) { + if (!other.serviceConstraints_.isEmpty()) { + if (serviceConstraints_.isEmpty()) { + serviceConstraints_ = other.serviceConstraints_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureServiceConstraintsIsMutable(); + serviceConstraints_.addAll(other.serviceConstraints_); + } + onChanged(); + } + } else { + if (!other.serviceConstraints_.isEmpty()) { + if (serviceConstraintsBuilder_.isEmpty()) { + serviceConstraintsBuilder_.dispose(); + serviceConstraintsBuilder_ = null; + serviceConstraints_ = other.serviceConstraints_; + bitField0_ = (bitField0_ & ~0x00000002); + serviceConstraintsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceConstraintsFieldBuilder() : null; + } else { + serviceConstraintsBuilder_.addAllMessages(other.serviceConstraints_); + } + } + } + if (other.hasServiceStatus()) { + mergeServiceStatus(other.getServiceStatus()); + } + if (other.hasServiceConfig()) { + mergeServiceConfig(other.getServiceConfig()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Service) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.ServiceId serviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceIdBuilder_; + + /** + * .context.ServiceId service_id = 1; + * @return Whether the serviceId field is set. + */ + public boolean hasServiceId() { + return serviceIdBuilder_ != null || serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 1; + * @return The serviceId. + */ + public context.ContextOuterClass.ServiceId getServiceId() { + if (serviceIdBuilder_ == null) { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } else { + return serviceIdBuilder_.getMessage(); + } + } + + /** + * .context.ServiceId service_id = 1; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceId_ = value; + onChanged(); + } else { + serviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 1; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdBuilder_ == null) { + serviceId_ = builderForValue.build(); + onChanged(); + } else { + serviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceId service_id = 1; + */ + public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (serviceId_ != null) { + serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + } else { + serviceId_ = value; + } + onChanged(); + } else { + serviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 1; + */ + public Builder clearServiceId() { + if (serviceIdBuilder_ == null) { + serviceId_ = null; + onChanged(); + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceId service_id = 1; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + onChanged(); + return getServiceIdFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceId service_id = 1; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + if (serviceIdBuilder_ != null) { + return serviceIdBuilder_.getMessageOrBuilder(); + } else { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + } + + /** + * .context.ServiceId service_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdFieldBuilder() { + if (serviceIdBuilder_ == null) { + serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceId(), getParentForChildren(), isClean()); + serviceId_ = null; + } + return serviceIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private int serviceType_ = 0; + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return The enum numeric value on the wire for serviceType. + */ + @java.lang.Override + public int getServiceTypeValue() { + return serviceType_; + } + + /** + * .context.ServiceTypeEnum service_type = 3; + * @param value The enum numeric value on the wire for serviceType to set. + * @return This builder for chaining. + */ + public Builder setServiceTypeValue(int value) { + serviceType_ = value; + onChanged(); + return this; + } + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return The serviceType. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceTypeEnum getServiceType() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.valueOf(serviceType_); + return result == null ? context.ContextOuterClass.ServiceTypeEnum.UNRECOGNIZED : result; + } + + /** + * .context.ServiceTypeEnum service_type = 3; + * @param value The serviceType to set. + * @return This builder for chaining. + */ + public Builder setServiceType(context.ContextOuterClass.ServiceTypeEnum value) { + if (value == null) { + throw new NullPointerException(); + } + serviceType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return This builder for chaining. + */ + public Builder clearServiceType() { + serviceType_ = 0; + onChanged(); + return this; + } + + private java.util.List serviceEndpointIds_ = java.util.Collections.emptyList(); + + private void ensureServiceEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + serviceEndpointIds_ = new java.util.ArrayList(serviceEndpointIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 serviceEndpointIdsBuilder_; + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public java.util.List getServiceEndpointIdsList() { + if (serviceEndpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceEndpointIds_); + } else { + return serviceEndpointIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public int getServiceEndpointIdsCount() { + if (serviceEndpointIdsBuilder_ == null) { + return serviceEndpointIds_.size(); + } else { + return serviceEndpointIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public context.ContextOuterClass.EndPointId getServiceEndpointIds(int index) { + if (serviceEndpointIdsBuilder_ == null) { + return serviceEndpointIds_.get(index); + } else { + return serviceEndpointIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder setServiceEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (serviceEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.set(index, value); + onChanged(); + } else { + serviceEndpointIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder setServiceEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (serviceEndpointIdsBuilder_ == null) { + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceEndpointIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder addServiceEndpointIds(context.ContextOuterClass.EndPointId value) { + if (serviceEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.add(value); + onChanged(); + } else { + serviceEndpointIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder addServiceEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (serviceEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.add(index, value); + onChanged(); + } else { + serviceEndpointIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder addServiceEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (serviceEndpointIdsBuilder_ == null) { + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.add(builderForValue.build()); + onChanged(); + } else { + serviceEndpointIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder addServiceEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (serviceEndpointIdsBuilder_ == null) { + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceEndpointIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder addAllServiceEndpointIds(java.lang.Iterable values) { + if (serviceEndpointIdsBuilder_ == null) { + ensureServiceEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceEndpointIds_); + onChanged(); + } else { + serviceEndpointIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder clearServiceEndpointIds() { + if (serviceEndpointIdsBuilder_ == null) { + serviceEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + serviceEndpointIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder removeServiceEndpointIds(int index) { + if (serviceEndpointIdsBuilder_ == null) { + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.remove(index); + onChanged(); + } else { + serviceEndpointIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public context.ContextOuterClass.EndPointId.Builder getServiceEndpointIdsBuilder(int index) { + return getServiceEndpointIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getServiceEndpointIdsOrBuilder(int index) { + if (serviceEndpointIdsBuilder_ == null) { + return serviceEndpointIds_.get(index); + } else { + return serviceEndpointIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public java.util.List getServiceEndpointIdsOrBuilderList() { + if (serviceEndpointIdsBuilder_ != null) { + return serviceEndpointIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceEndpointIds_); + } + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public context.ContextOuterClass.EndPointId.Builder addServiceEndpointIdsBuilder() { + return getServiceEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public context.ContextOuterClass.EndPointId.Builder addServiceEndpointIdsBuilder(int index) { + return getServiceEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public java.util.List getServiceEndpointIdsBuilderList() { + return getServiceEndpointIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getServiceEndpointIdsFieldBuilder() { + if (serviceEndpointIdsBuilder_ == null) { + serviceEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + serviceEndpointIds_ = null; + } + return serviceEndpointIdsBuilder_; + } + + private java.util.List serviceConstraints_ = java.util.Collections.emptyList(); + + private void ensureServiceConstraintsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + serviceConstraints_ = new java.util.ArrayList(serviceConstraints_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 serviceConstraintsBuilder_; + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public java.util.List getServiceConstraintsList() { + if (serviceConstraintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceConstraints_); + } else { + return serviceConstraintsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public int getServiceConstraintsCount() { + if (serviceConstraintsBuilder_ == null) { + return serviceConstraints_.size(); + } else { + return serviceConstraintsBuilder_.getCount(); + } + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public context.ContextOuterClass.Constraint getServiceConstraints(int index) { + if (serviceConstraintsBuilder_ == null) { + return serviceConstraints_.get(index); + } else { + return serviceConstraintsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder setServiceConstraints(int index, context.ContextOuterClass.Constraint value) { + if (serviceConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceConstraintsIsMutable(); + serviceConstraints_.set(index, value); + onChanged(); + } else { + serviceConstraintsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder setServiceConstraints(int index, context.ContextOuterClass.Constraint.Builder builderForValue) { + if (serviceConstraintsBuilder_ == null) { + ensureServiceConstraintsIsMutable(); + serviceConstraints_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceConstraintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder addServiceConstraints(context.ContextOuterClass.Constraint value) { + if (serviceConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceConstraintsIsMutable(); + serviceConstraints_.add(value); + onChanged(); + } else { + serviceConstraintsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder addServiceConstraints(int index, context.ContextOuterClass.Constraint value) { + if (serviceConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceConstraintsIsMutable(); + serviceConstraints_.add(index, value); + onChanged(); + } else { + serviceConstraintsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder addServiceConstraints(context.ContextOuterClass.Constraint.Builder builderForValue) { + if (serviceConstraintsBuilder_ == null) { + ensureServiceConstraintsIsMutable(); + serviceConstraints_.add(builderForValue.build()); + onChanged(); + } else { + serviceConstraintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder addServiceConstraints(int index, context.ContextOuterClass.Constraint.Builder builderForValue) { + if (serviceConstraintsBuilder_ == null) { + ensureServiceConstraintsIsMutable(); + serviceConstraints_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceConstraintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder addAllServiceConstraints(java.lang.Iterable values) { + if (serviceConstraintsBuilder_ == null) { + ensureServiceConstraintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceConstraints_); + onChanged(); + } else { + serviceConstraintsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder clearServiceConstraints() { + if (serviceConstraintsBuilder_ == null) { + serviceConstraints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + serviceConstraintsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder removeServiceConstraints(int index) { + if (serviceConstraintsBuilder_ == null) { + ensureServiceConstraintsIsMutable(); + serviceConstraints_.remove(index); + onChanged(); + } else { + serviceConstraintsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public context.ContextOuterClass.Constraint.Builder getServiceConstraintsBuilder(int index) { + return getServiceConstraintsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public context.ContextOuterClass.ConstraintOrBuilder getServiceConstraintsOrBuilder(int index) { + if (serviceConstraintsBuilder_ == null) { + return serviceConstraints_.get(index); + } else { + return serviceConstraintsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public java.util.List getServiceConstraintsOrBuilderList() { + if (serviceConstraintsBuilder_ != null) { + return serviceConstraintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceConstraints_); + } + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public context.ContextOuterClass.Constraint.Builder addServiceConstraintsBuilder() { + return getServiceConstraintsFieldBuilder().addBuilder(context.ContextOuterClass.Constraint.getDefaultInstance()); + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public context.ContextOuterClass.Constraint.Builder addServiceConstraintsBuilder(int index) { + return getServiceConstraintsFieldBuilder().addBuilder(index, context.ContextOuterClass.Constraint.getDefaultInstance()); + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public java.util.List getServiceConstraintsBuilderList() { + return getServiceConstraintsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getServiceConstraintsFieldBuilder() { + if (serviceConstraintsBuilder_ == null) { + serviceConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceConstraints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + serviceConstraints_ = null; + } + return serviceConstraintsBuilder_; + } + + private context.ContextOuterClass.ServiceStatus serviceStatus_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceStatusBuilder_; + + /** + * .context.ServiceStatus service_status = 6; + * @return Whether the serviceStatus field is set. + */ + public boolean hasServiceStatus() { + return serviceStatusBuilder_ != null || serviceStatus_ != null; + } + + /** + * .context.ServiceStatus service_status = 6; + * @return The serviceStatus. + */ + public context.ContextOuterClass.ServiceStatus getServiceStatus() { + if (serviceStatusBuilder_ == null) { + return serviceStatus_ == null ? context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; + } else { + return serviceStatusBuilder_.getMessage(); + } + } + + /** + * .context.ServiceStatus service_status = 6; + */ + public Builder setServiceStatus(context.ContextOuterClass.ServiceStatus value) { + if (serviceStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceStatus_ = value; + onChanged(); + } else { + serviceStatusBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceStatus service_status = 6; + */ + public Builder setServiceStatus(context.ContextOuterClass.ServiceStatus.Builder builderForValue) { + if (serviceStatusBuilder_ == null) { + serviceStatus_ = builderForValue.build(); + onChanged(); + } else { + serviceStatusBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceStatus service_status = 6; + */ + public Builder mergeServiceStatus(context.ContextOuterClass.ServiceStatus value) { + if (serviceStatusBuilder_ == null) { + if (serviceStatus_ != null) { + serviceStatus_ = context.ContextOuterClass.ServiceStatus.newBuilder(serviceStatus_).mergeFrom(value).buildPartial(); + } else { + serviceStatus_ = value; + } + onChanged(); + } else { + serviceStatusBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceStatus service_status = 6; + */ + public Builder clearServiceStatus() { + if (serviceStatusBuilder_ == null) { + serviceStatus_ = null; + onChanged(); + } else { + serviceStatus_ = null; + serviceStatusBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceStatus service_status = 6; + */ + public context.ContextOuterClass.ServiceStatus.Builder getServiceStatusBuilder() { + onChanged(); + return getServiceStatusFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceStatus service_status = 6; + */ + public context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder() { + if (serviceStatusBuilder_ != null) { + return serviceStatusBuilder_.getMessageOrBuilder(); + } else { + return serviceStatus_ == null ? context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; + } + } + + /** + * .context.ServiceStatus service_status = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceStatusFieldBuilder() { + if (serviceStatusBuilder_ == null) { + serviceStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceStatus(), getParentForChildren(), isClean()); + serviceStatus_ = null; + } + return serviceStatusBuilder_; + } + + private context.ContextOuterClass.ServiceConfig serviceConfig_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceConfigBuilder_; + + /** + * .context.ServiceConfig service_config = 7; + * @return Whether the serviceConfig field is set. + */ + public boolean hasServiceConfig() { + return serviceConfigBuilder_ != null || serviceConfig_ != null; + } + + /** + * .context.ServiceConfig service_config = 7; + * @return The serviceConfig. + */ + public context.ContextOuterClass.ServiceConfig getServiceConfig() { + if (serviceConfigBuilder_ == null) { + return serviceConfig_ == null ? context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; + } else { + return serviceConfigBuilder_.getMessage(); + } + } + + /** + * .context.ServiceConfig service_config = 7; + */ + public Builder setServiceConfig(context.ContextOuterClass.ServiceConfig value) { + if (serviceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceConfig_ = value; + onChanged(); + } else { + serviceConfigBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceConfig service_config = 7; + */ + public Builder setServiceConfig(context.ContextOuterClass.ServiceConfig.Builder builderForValue) { + if (serviceConfigBuilder_ == null) { + serviceConfig_ = builderForValue.build(); + onChanged(); + } else { + serviceConfigBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceConfig service_config = 7; + */ + public Builder mergeServiceConfig(context.ContextOuterClass.ServiceConfig value) { + if (serviceConfigBuilder_ == null) { + if (serviceConfig_ != null) { + serviceConfig_ = context.ContextOuterClass.ServiceConfig.newBuilder(serviceConfig_).mergeFrom(value).buildPartial(); + } else { + serviceConfig_ = value; + } + onChanged(); + } else { + serviceConfigBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceConfig service_config = 7; + */ + public Builder clearServiceConfig() { + if (serviceConfigBuilder_ == null) { + serviceConfig_ = null; + onChanged(); + } else { + serviceConfig_ = null; + serviceConfigBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceConfig service_config = 7; + */ + public context.ContextOuterClass.ServiceConfig.Builder getServiceConfigBuilder() { + onChanged(); + return getServiceConfigFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceConfig service_config = 7; + */ + public context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder() { + if (serviceConfigBuilder_ != null) { + return serviceConfigBuilder_.getMessageOrBuilder(); + } else { + return serviceConfig_ == null ? context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; + } + } + + /** + * .context.ServiceConfig service_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceConfigFieldBuilder() { + if (serviceConfigBuilder_ == null) { + serviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceConfig(), getParentForChildren(), isClean()); + serviceConfig_ = null; + } + return serviceConfigBuilder_; + } + + private context.ContextOuterClass.Timestamp timestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; + + /** + * .context.Timestamp timestamp = 8; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 8; + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * .context.Timestamp timestamp = 8; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 8; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Timestamp timestamp = 8; + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 8; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + /** + * .context.Timestamp timestamp = 8; + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + + /** + * .context.Timestamp timestamp = 8; + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } + + /** + * .context.Timestamp timestamp = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Service) + } + + // @@protoc_insertion_point(class_scope:context.Service) + private static final context.ContextOuterClass.Service DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Service(); + } + + public static context.ContextOuterClass.Service getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Service getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceStatusOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return The enum numeric value on the wire for serviceStatus. + */ + int getServiceStatusValue(); + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return The serviceStatus. + */ + context.ContextOuterClass.ServiceStatusEnum getServiceStatus(); + } + + /** + * Protobuf type {@code context.ServiceStatus} + */ + public static final class ServiceStatus extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceStatus) + ServiceStatusOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceStatus.newBuilder() to construct. + private ServiceStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceStatus() { + serviceStatus_ = 0; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceStatus_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceStatus.class, context.ContextOuterClass.ServiceStatus.Builder.class); + } + + public static final int SERVICE_STATUS_FIELD_NUMBER = 1; + + private int serviceStatus_; + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return The enum numeric value on the wire for serviceStatus. + */ + @java.lang.Override + public int getServiceStatusValue() { + return serviceStatus_; + } + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return The serviceStatus. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceStatusEnum getServiceStatus() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.valueOf(serviceStatus_); + return result == null ? context.ContextOuterClass.ServiceStatusEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (serviceStatus_ != context.ContextOuterClass.ServiceStatusEnum.SERVICESTATUS_UNDEFINED.getNumber()) { + output.writeEnum(1, serviceStatus_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (serviceStatus_ != context.ContextOuterClass.ServiceStatusEnum.SERVICESTATUS_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, serviceStatus_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceStatus)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceStatus other = (context.ContextOuterClass.ServiceStatus) obj; + if (serviceStatus_ != other.serviceStatus_) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_STATUS_FIELD_NUMBER; + hash = (53 * hash) + serviceStatus_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceStatus parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceStatus parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ServiceStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceStatus) + context.ContextOuterClass.ServiceStatusOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceStatus_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceStatus.class, context.ContextOuterClass.ServiceStatus.Builder.class); + } + + // 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(); + serviceStatus_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceStatus_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceStatus getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceStatus.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceStatus build() { + context.ContextOuterClass.ServiceStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceStatus buildPartial() { + context.ContextOuterClass.ServiceStatus result = new context.ContextOuterClass.ServiceStatus(this); + result.serviceStatus_ = serviceStatus_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceStatus) { + return mergeFrom((context.ContextOuterClass.ServiceStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceStatus other) { + if (other == context.ContextOuterClass.ServiceStatus.getDefaultInstance()) + return this; + if (other.serviceStatus_ != 0) { + setServiceStatusValue(other.getServiceStatusValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int serviceStatus_ = 0; + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return The enum numeric value on the wire for serviceStatus. + */ + @java.lang.Override + public int getServiceStatusValue() { + return serviceStatus_; + } + + /** + * .context.ServiceStatusEnum service_status = 1; + * @param value The enum numeric value on the wire for serviceStatus to set. + * @return This builder for chaining. + */ + public Builder setServiceStatusValue(int value) { + serviceStatus_ = value; + onChanged(); + return this; + } + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return The serviceStatus. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceStatusEnum getServiceStatus() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.valueOf(serviceStatus_); + return result == null ? context.ContextOuterClass.ServiceStatusEnum.UNRECOGNIZED : result; + } + + /** + * .context.ServiceStatusEnum service_status = 1; + * @param value The serviceStatus to set. + * @return This builder for chaining. + */ + public Builder setServiceStatus(context.ContextOuterClass.ServiceStatusEnum value) { + if (value == null) { + throw new NullPointerException(); + } + serviceStatus_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return This builder for chaining. + */ + public Builder clearServiceStatus() { + serviceStatus_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceStatus) + } + + // @@protoc_insertion_point(class_scope:context.ServiceStatus) + private static final context.ContextOuterClass.ServiceStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceStatus(); + } + + public static context.ContextOuterClass.ServiceStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + java.util.List getConfigRulesList(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + context.ContextOuterClass.ConfigRule getConfigRules(int index); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + int getConfigRulesCount(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + java.util.List getConfigRulesOrBuilderList(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ServiceConfig} + */ + public static final class ServiceConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceConfig) + ServiceConfigOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceConfig.newBuilder() to construct. + private ServiceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceConfig() { + configRules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceConfig.class, context.ContextOuterClass.ServiceConfig.Builder.class); + } + + public static final int CONFIG_RULES_FIELD_NUMBER = 1; + + private java.util.List configRules_; + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public java.util.List getConfigRulesList() { + return configRules_; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public java.util.List getConfigRulesOrBuilderList() { + return configRules_; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public int getConfigRulesCount() { + return configRules_.size(); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule getConfigRules(int index) { + return configRules_.get(index); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index) { + return configRules_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < configRules_.size(); i++) { + output.writeMessage(1, configRules_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < configRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configRules_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceConfig)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceConfig other = (context.ContextOuterClass.ServiceConfig) obj; + if (!getConfigRulesList().equals(other.getConfigRulesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConfigRulesCount() > 0) { + hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; + hash = (53 * hash) + getConfigRulesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ServiceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceConfig) + context.ContextOuterClass.ServiceConfigOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceConfig.class, context.ContextOuterClass.ServiceConfig.Builder.class); + } + + // 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(); + if (configRulesBuilder_ == null) { + configRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + configRulesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceConfig_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceConfig getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceConfig.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceConfig build() { + context.ContextOuterClass.ServiceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceConfig buildPartial() { + context.ContextOuterClass.ServiceConfig result = new context.ContextOuterClass.ServiceConfig(this); + int from_bitField0_ = bitField0_; + if (configRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + configRules_ = java.util.Collections.unmodifiableList(configRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.configRules_ = configRules_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceConfig) { + return mergeFrom((context.ContextOuterClass.ServiceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceConfig other) { + if (other == context.ContextOuterClass.ServiceConfig.getDefaultInstance()) + return this; + if (configRulesBuilder_ == null) { + if (!other.configRules_.isEmpty()) { + if (configRules_.isEmpty()) { + configRules_ = other.configRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfigRulesIsMutable(); + configRules_.addAll(other.configRules_); + } + onChanged(); + } + } else { + if (!other.configRules_.isEmpty()) { + if (configRulesBuilder_.isEmpty()) { + configRulesBuilder_.dispose(); + configRulesBuilder_ = null; + configRules_ = other.configRules_; + bitField0_ = (bitField0_ & ~0x00000001); + configRulesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConfigRulesFieldBuilder() : null; + } else { + configRulesBuilder_.addAllMessages(other.configRules_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List configRules_ = java.util.Collections.emptyList(); + + private void ensureConfigRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + configRules_ = new java.util.ArrayList(configRules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 configRulesBuilder_; + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesList() { + if (configRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(configRules_); + } else { + return configRulesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public int getConfigRulesCount() { + if (configRulesBuilder_ == null) { + return configRules_.size(); + } else { + return configRulesBuilder_.getCount(); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule getConfigRules(int index) { + if (configRulesBuilder_ == null) { + return configRules_.get(index); + } else { + return configRulesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder setConfigRules(int index, context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.set(index, value); + onChanged(); + } else { + configRulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder setConfigRules(int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.set(index, builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.add(value); + onChanged(); + } else { + configRulesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(int index, context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.add(index, value); + onChanged(); + } else { + configRulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(index, builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addAllConfigRules(java.lang.Iterable values) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, configRules_); + onChanged(); + } else { + configRulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder clearConfigRules() { + if (configRulesBuilder_ == null) { + configRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + configRulesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder removeConfigRules(int index) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.remove(index); + onChanged(); + } else { + configRulesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder getConfigRulesBuilder(int index) { + return getConfigRulesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index) { + if (configRulesBuilder_ == null) { + return configRules_.get(index); + } else { + return configRulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesOrBuilderList() { + if (configRulesBuilder_ != null) { + return configRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configRules_); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder() { + return getConfigRulesFieldBuilder().addBuilder(context.ContextOuterClass.ConfigRule.getDefaultInstance()); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder(int index) { + return getConfigRulesFieldBuilder().addBuilder(index, context.ContextOuterClass.ConfigRule.getDefaultInstance()); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesBuilderList() { + return getConfigRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getConfigRulesFieldBuilder() { + if (configRulesBuilder_ == null) { + configRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(configRules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + configRules_ = null; + } + return configRulesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceConfig) + } + + // @@protoc_insertion_point(class_scope:context.ServiceConfig) + private static final context.ContextOuterClass.ServiceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceConfig(); + } + + public static context.ContextOuterClass.ServiceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.ServiceId service_ids = 1; + */ + java.util.List getServiceIdsList(); + + /** + * repeated .context.ServiceId service_ids = 1; + */ + context.ContextOuterClass.ServiceId getServiceIds(int index); + + /** + * repeated .context.ServiceId service_ids = 1; + */ + int getServiceIdsCount(); + + /** + * repeated .context.ServiceId service_ids = 1; + */ + java.util.List getServiceIdsOrBuilderList(); + + /** + * repeated .context.ServiceId service_ids = 1; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ServiceIdList} + */ + public static final class ServiceIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceIdList) + ServiceIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceIdList.newBuilder() to construct. + private ServiceIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceIdList() { + serviceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceIdList.class, context.ContextOuterClass.ServiceIdList.Builder.class); + } + + public static final int SERVICE_IDS_FIELD_NUMBER = 1; + + private java.util.List serviceIds_; + + /** + * repeated .context.ServiceId service_ids = 1; + */ + @java.lang.Override + public java.util.List getServiceIdsList() { + return serviceIds_; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + @java.lang.Override + public java.util.List getServiceIdsOrBuilderList() { + return serviceIds_; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + @java.lang.Override + public int getServiceIdsCount() { + return serviceIds_.size(); + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceIds(int index) { + return serviceIds_.get(index); + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder(int index) { + return serviceIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < serviceIds_.size(); i++) { + output.writeMessage(1, serviceIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < serviceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, serviceIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceIdList other = (context.ContextOuterClass.ServiceIdList) obj; + if (!getServiceIdsList().equals(other.getServiceIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getServiceIdsCount() > 0) { + hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getServiceIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ServiceIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceIdList) + context.ContextOuterClass.ServiceIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceIdList.class, context.ContextOuterClass.ServiceIdList.Builder.class); + } + + // 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(); + if (serviceIdsBuilder_ == null) { + serviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + serviceIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceIdList getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceIdList build() { + context.ContextOuterClass.ServiceIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceIdList buildPartial() { + context.ContextOuterClass.ServiceIdList result = new context.ContextOuterClass.ServiceIdList(this); + int from_bitField0_ = bitField0_; + if (serviceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.serviceIds_ = serviceIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceIdList) { + return mergeFrom((context.ContextOuterClass.ServiceIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceIdList other) { + if (other == context.ContextOuterClass.ServiceIdList.getDefaultInstance()) + return this; + if (serviceIdsBuilder_ == null) { + if (!other.serviceIds_.isEmpty()) { + if (serviceIds_.isEmpty()) { + serviceIds_ = other.serviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServiceIdsIsMutable(); + serviceIds_.addAll(other.serviceIds_); + } + onChanged(); + } + } else { + if (!other.serviceIds_.isEmpty()) { + if (serviceIdsBuilder_.isEmpty()) { + serviceIdsBuilder_.dispose(); + serviceIdsBuilder_ = null; + serviceIds_ = other.serviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + serviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceIdsFieldBuilder() : null; + } else { + serviceIdsBuilder_.addAllMessages(other.serviceIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List serviceIds_ = java.util.Collections.emptyList(); + + private void ensureServiceIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + serviceIds_ = new java.util.ArrayList(serviceIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 serviceIdsBuilder_; + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public java.util.List getServiceIdsList() { + if (serviceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceIds_); + } else { + return serviceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public int getServiceIdsCount() { + if (serviceIdsBuilder_ == null) { + return serviceIds_.size(); + } else { + return serviceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public context.ContextOuterClass.ServiceId getServiceIds(int index) { + if (serviceIdsBuilder_ == null) { + return serviceIds_.get(index); + } else { + return serviceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder setServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceIdsIsMutable(); + serviceIds_.set(index, value); + onChanged(); + } else { + serviceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder setServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder addServiceIds(context.ContextOuterClass.ServiceId value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceIdsIsMutable(); + serviceIds_.add(value); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder addServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceIdsIsMutable(); + serviceIds_.add(index, value); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder addServiceIds(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.add(builderForValue.build()); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder addServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder addAllServiceIds(java.lang.Iterable values) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceIds_); + onChanged(); + } else { + serviceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder clearServiceIds() { + if (serviceIdsBuilder_ == null) { + serviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + serviceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder removeServiceIds(int index) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.remove(index); + onChanged(); + } else { + serviceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdsBuilder(int index) { + return getServiceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder(int index) { + if (serviceIdsBuilder_ == null) { + return serviceIds_.get(index); + } else { + return serviceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public java.util.List getServiceIdsOrBuilderList() { + if (serviceIdsBuilder_ != null) { + return serviceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceIds_); + } + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder() { + return getServiceIdsFieldBuilder().addBuilder(context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder(int index) { + return getServiceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public java.util.List getServiceIdsBuilderList() { + return getServiceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getServiceIdsFieldBuilder() { + if (serviceIdsBuilder_ == null) { + serviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + serviceIds_ = null; + } + return serviceIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceIdList) + } + + // @@protoc_insertion_point(class_scope:context.ServiceIdList) + private static final context.ContextOuterClass.ServiceIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceIdList(); + } + + public static context.ContextOuterClass.ServiceIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Service services = 1; + */ + java.util.List getServicesList(); + + /** + * repeated .context.Service services = 1; + */ + context.ContextOuterClass.Service getServices(int index); + + /** + * repeated .context.Service services = 1; + */ + int getServicesCount(); + + /** + * repeated .context.Service services = 1; + */ + java.util.List getServicesOrBuilderList(); + + /** + * repeated .context.Service services = 1; + */ + context.ContextOuterClass.ServiceOrBuilder getServicesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ServiceList} + */ + public static final class ServiceList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceList) + ServiceListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceList.newBuilder() to construct. + private ServiceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceList() { + services_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceList.class, context.ContextOuterClass.ServiceList.Builder.class); + } + + public static final int SERVICES_FIELD_NUMBER = 1; + + private java.util.List services_; + + /** + * repeated .context.Service services = 1; + */ + @java.lang.Override + public java.util.List getServicesList() { + return services_; + } + + /** + * repeated .context.Service services = 1; + */ + @java.lang.Override + public java.util.List getServicesOrBuilderList() { + return services_; + } + + /** + * repeated .context.Service services = 1; + */ + @java.lang.Override + public int getServicesCount() { + return services_.size(); + } + + /** + * repeated .context.Service services = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Service getServices(int index) { + return services_.get(index); + } + + /** + * repeated .context.Service services = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceOrBuilder getServicesOrBuilder(int index) { + return services_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < services_.size(); i++) { + output.writeMessage(1, services_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < services_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, services_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceList)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceList other = (context.ContextOuterClass.ServiceList) obj; + if (!getServicesList().equals(other.getServicesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getServicesCount() > 0) { + hash = (37 * hash) + SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getServicesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ServiceList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceList) + context.ContextOuterClass.ServiceListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceList.class, context.ContextOuterClass.ServiceList.Builder.class); + } + + // 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(); + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + servicesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceList getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceList build() { + context.ContextOuterClass.ServiceList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceList buildPartial() { + context.ContextOuterClass.ServiceList result = new context.ContextOuterClass.ServiceList(this); + int from_bitField0_ = bitField0_; + if (servicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + services_ = java.util.Collections.unmodifiableList(services_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.services_ = services_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceList) { + return mergeFrom((context.ContextOuterClass.ServiceList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceList other) { + if (other == context.ContextOuterClass.ServiceList.getDefaultInstance()) + return this; + if (servicesBuilder_ == null) { + if (!other.services_.isEmpty()) { + if (services_.isEmpty()) { + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServicesIsMutable(); + services_.addAll(other.services_); + } + onChanged(); + } + } else { + if (!other.services_.isEmpty()) { + if (servicesBuilder_.isEmpty()) { + servicesBuilder_.dispose(); + servicesBuilder_ = null; + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + servicesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServicesFieldBuilder() : null; + } else { + servicesBuilder_.addAllMessages(other.services_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List services_ = java.util.Collections.emptyList(); + + private void ensureServicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + services_ = new java.util.ArrayList(services_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 servicesBuilder_; + + /** + * repeated .context.Service services = 1; + */ + public java.util.List getServicesList() { + if (servicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(services_); + } else { + return servicesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Service services = 1; + */ + public int getServicesCount() { + if (servicesBuilder_ == null) { + return services_.size(); + } else { + return servicesBuilder_.getCount(); + } + } + + /** + * repeated .context.Service services = 1; + */ + public context.ContextOuterClass.Service getServices(int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Service services = 1; + */ + public Builder setServices(int index, context.ContextOuterClass.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.set(index, value); + onChanged(); + } else { + servicesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder setServices(int index, context.ContextOuterClass.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.set(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder addServices(context.ContextOuterClass.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(value); + onChanged(); + } else { + servicesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder addServices(int index, context.ContextOuterClass.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(index, value); + onChanged(); + } else { + servicesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder addServices(context.ContextOuterClass.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder addServices(int index, context.ContextOuterClass.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder addAllServices(java.lang.Iterable values) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, services_); + onChanged(); + } else { + servicesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder clearServices() { + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + servicesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder removeServices(int index) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.remove(index); + onChanged(); + } else { + servicesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public context.ContextOuterClass.Service.Builder getServicesBuilder(int index) { + return getServicesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Service services = 1; + */ + public context.ContextOuterClass.ServiceOrBuilder getServicesOrBuilder(int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Service services = 1; + */ + public java.util.List getServicesOrBuilderList() { + if (servicesBuilder_ != null) { + return servicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(services_); + } + } + + /** + * repeated .context.Service services = 1; + */ + public context.ContextOuterClass.Service.Builder addServicesBuilder() { + return getServicesFieldBuilder().addBuilder(context.ContextOuterClass.Service.getDefaultInstance()); + } + + /** + * repeated .context.Service services = 1; + */ + public context.ContextOuterClass.Service.Builder addServicesBuilder(int index) { + return getServicesFieldBuilder().addBuilder(index, context.ContextOuterClass.Service.getDefaultInstance()); + } + + /** + * repeated .context.Service services = 1; + */ + public java.util.List getServicesBuilderList() { + return getServicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getServicesFieldBuilder() { + if (servicesBuilder_ == null) { + servicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(services_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + services_ = null; + } + return servicesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceList) + } + + // @@protoc_insertion_point(class_scope:context.ServiceList) + private static final context.ContextOuterClass.ServiceList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceList(); + } + + public static context.ContextOuterClass.ServiceList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceFilterOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ServiceIdList service_ids = 1; + * @return Whether the serviceIds field is set. + */ + boolean hasServiceIds(); + + /** + * .context.ServiceIdList service_ids = 1; + * @return The serviceIds. + */ + context.ContextOuterClass.ServiceIdList getServiceIds(); + + /** + * .context.ServiceIdList service_ids = 1; + */ + context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder(); + + /** + * bool include_endpoint_ids = 2; + * @return The includeEndpointIds. + */ + boolean getIncludeEndpointIds(); + + /** + * bool include_constraints = 3; + * @return The includeConstraints. + */ + boolean getIncludeConstraints(); + + /** + * bool include_config_rules = 4; + * @return The includeConfigRules. + */ + boolean getIncludeConfigRules(); + } + + /** + * Protobuf type {@code context.ServiceFilter} + */ + public static final class ServiceFilter extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceFilter) + ServiceFilterOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceFilter.newBuilder() to construct. + private ServiceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceFilter() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceFilter_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceFilter.class, context.ContextOuterClass.ServiceFilter.Builder.class); + } + + public static final int SERVICE_IDS_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ServiceIdList serviceIds_; + + /** + * .context.ServiceIdList service_ids = 1; + * @return Whether the serviceIds field is set. + */ + @java.lang.Override + public boolean hasServiceIds() { + return serviceIds_ != null; + } + + /** + * .context.ServiceIdList service_ids = 1; + * @return The serviceIds. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdList getServiceIds() { + return serviceIds_ == null ? context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder() { + return getServiceIds(); + } + + public static final int INCLUDE_ENDPOINT_IDS_FIELD_NUMBER = 2; + + private boolean includeEndpointIds_; + + /** + * bool include_endpoint_ids = 2; + * @return The includeEndpointIds. + */ + @java.lang.Override + public boolean getIncludeEndpointIds() { + return includeEndpointIds_; + } + + public static final int INCLUDE_CONSTRAINTS_FIELD_NUMBER = 3; + + private boolean includeConstraints_; + + /** + * bool include_constraints = 3; + * @return The includeConstraints. + */ + @java.lang.Override + public boolean getIncludeConstraints() { + return includeConstraints_; + } + + public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 4; + + private boolean includeConfigRules_; + + /** + * bool include_config_rules = 4; + * @return The includeConfigRules. + */ + @java.lang.Override + public boolean getIncludeConfigRules() { + return includeConfigRules_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (serviceIds_ != null) { + output.writeMessage(1, getServiceIds()); + } + if (includeEndpointIds_ != false) { + output.writeBool(2, includeEndpointIds_); + } + if (includeConstraints_ != false) { + output.writeBool(3, includeConstraints_); + } + if (includeConfigRules_ != false) { + output.writeBool(4, includeConfigRules_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (serviceIds_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getServiceIds()); + } + if (includeEndpointIds_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeEndpointIds_); + } + if (includeConstraints_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, includeConstraints_); + } + if (includeConfigRules_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeConfigRules_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceFilter)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceFilter other = (context.ContextOuterClass.ServiceFilter) obj; + if (hasServiceIds() != other.hasServiceIds()) + return false; + if (hasServiceIds()) { + if (!getServiceIds().equals(other.getServiceIds())) + return false; + } + if (getIncludeEndpointIds() != other.getIncludeEndpointIds()) + return false; + if (getIncludeConstraints() != other.getIncludeConstraints()) + return false; + if (getIncludeConfigRules() != other.getIncludeConfigRules()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasServiceIds()) { + hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getServiceIds().hashCode(); + } + hash = (37 * hash) + INCLUDE_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeEndpointIds()); + hash = (37 * hash) + INCLUDE_CONSTRAINTS_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceFilter parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceFilter parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ServiceFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceFilter) + context.ContextOuterClass.ServiceFilterOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceFilter_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceFilter.class, context.ContextOuterClass.ServiceFilter.Builder.class); + } + + // 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; + serviceIdsBuilder_ = null; + } + includeEndpointIds_ = false; + includeConstraints_ = false; + includeConfigRules_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceFilter_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceFilter getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceFilter.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceFilter build() { + context.ContextOuterClass.ServiceFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceFilter) { + return mergeFrom((context.ContextOuterClass.ServiceFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceFilter other) { + if (other == context.ContextOuterClass.ServiceFilter.getDefaultInstance()) + return this; + if (other.hasServiceIds()) { + mergeServiceIds(other.getServiceIds()); + } + if (other.getIncludeEndpointIds() != false) { + setIncludeEndpointIds(other.getIncludeEndpointIds()); + } + if (other.getIncludeConstraints() != false) { + setIncludeConstraints(other.getIncludeConstraints()); + } + if (other.getIncludeConfigRules() != false) { + setIncludeConfigRules(other.getIncludeConfigRules()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.ServiceIdList serviceIds_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceIdsBuilder_; + + /** + * .context.ServiceIdList service_ids = 1; + * @return Whether the serviceIds field is set. + */ + public boolean hasServiceIds() { + return serviceIdsBuilder_ != null || serviceIds_ != null; + } + + /** + * .context.ServiceIdList service_ids = 1; + * @return The serviceIds. + */ + public context.ContextOuterClass.ServiceIdList getServiceIds() { + if (serviceIdsBuilder_ == null) { + return serviceIds_ == null ? context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; + } else { + return serviceIdsBuilder_.getMessage(); + } + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + public Builder setServiceIds(context.ContextOuterClass.ServiceIdList value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceIds_ = value; + onChanged(); + } else { + serviceIdsBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + public Builder setServiceIds(context.ContextOuterClass.ServiceIdList.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + serviceIds_ = builderForValue.build(); + onChanged(); + } else { + serviceIdsBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + public Builder mergeServiceIds(context.ContextOuterClass.ServiceIdList value) { + if (serviceIdsBuilder_ == null) { + if (serviceIds_ != null) { + serviceIds_ = context.ContextOuterClass.ServiceIdList.newBuilder(serviceIds_).mergeFrom(value).buildPartial(); + } else { + serviceIds_ = value; + } + onChanged(); + } else { + serviceIdsBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + public Builder clearServiceIds() { + if (serviceIdsBuilder_ == null) { + serviceIds_ = null; + onChanged(); + } else { + serviceIds_ = null; + serviceIdsBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + public context.ContextOuterClass.ServiceIdList.Builder getServiceIdsBuilder() { + onChanged(); + return getServiceIdsFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + public context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder() { + if (serviceIdsBuilder_ != null) { + return serviceIdsBuilder_.getMessageOrBuilder(); + } else { + return serviceIds_ == null ? context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; + } + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdsFieldBuilder() { + if (serviceIdsBuilder_ == null) { + serviceIdsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceIds(), getParentForChildren(), isClean()); + serviceIds_ = null; + } + return serviceIdsBuilder_; + } + + private boolean includeEndpointIds_; + + /** + * bool include_endpoint_ids = 2; + * @return The includeEndpointIds. + */ + @java.lang.Override + public boolean getIncludeEndpointIds() { + return includeEndpointIds_; + } + + /** + * bool include_endpoint_ids = 2; + * @param value The includeEndpointIds to set. + * @return This builder for chaining. + */ + public Builder setIncludeEndpointIds(boolean value) { + includeEndpointIds_ = value; + onChanged(); + return this; + } + + /** + * bool include_endpoint_ids = 2; + * @return This builder for chaining. + */ + public Builder clearIncludeEndpointIds() { + includeEndpointIds_ = false; + onChanged(); + return this; + } + + private boolean includeConstraints_; + + /** + * bool include_constraints = 3; + * @return The includeConstraints. + */ + @java.lang.Override + public boolean getIncludeConstraints() { + return includeConstraints_; + } + + /** + * bool include_constraints = 3; + * @param value The includeConstraints to set. + * @return This builder for chaining. + */ + public Builder setIncludeConstraints(boolean value) { + includeConstraints_ = value; + onChanged(); + return this; + } + + /** + * bool include_constraints = 3; + * @return This builder for chaining. + */ + public Builder clearIncludeConstraints() { + includeConstraints_ = false; + onChanged(); + return this; + } + + private boolean includeConfigRules_; + + /** + * bool include_config_rules = 4; + * @return The includeConfigRules. + */ + @java.lang.Override + public boolean getIncludeConfigRules() { + return includeConfigRules_; + } + + /** + * bool include_config_rules = 4; + * @param value The includeConfigRules to set. + * @return This builder for chaining. + */ + public Builder setIncludeConfigRules(boolean value) { + includeConfigRules_ = value; + onChanged(); + return this; + } + + /** + * bool include_config_rules = 4; + * @return This builder for chaining. + */ + public Builder clearIncludeConfigRules() { + includeConfigRules_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceFilter) + } + + // @@protoc_insertion_point(class_scope:context.ServiceFilter) + private static final context.ContextOuterClass.ServiceFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceFilter(); + } + + public static context.ContextOuterClass.ServiceFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.ServiceId service_id = 2; + * @return Whether the serviceId field is set. + */ + boolean hasServiceId(); + + /** + * .context.ServiceId service_id = 2; + * @return The serviceId. + */ + context.ContextOuterClass.ServiceId getServiceId(); + + /** + * .context.ServiceId service_id = 2; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + } + + /** + * Protobuf type {@code context.ServiceEvent} + */ + public static final class ServiceEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceEvent) + ServiceEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceEvent.newBuilder() to construct. + private ServiceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceEvent.class, context.ContextOuterClass.ServiceEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int SERVICE_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.ServiceId serviceId_; + + /** + * .context.ServiceId service_id = 2; + * @return Whether the serviceId field is set. + */ + @java.lang.Override + public boolean hasServiceId() { + return serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 2; + * @return The serviceId. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceId() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + + /** + * .context.ServiceId service_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + return getServiceId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (serviceId_ != null) { + output.writeMessage(2, getServiceId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (serviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceEvent other = (context.ContextOuterClass.ServiceEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasServiceId() != other.hasServiceId()) + return false; + if (hasServiceId()) { + if (!getServiceId().equals(other.getServiceId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasServiceId()) { + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ServiceEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceEvent) + context.ContextOuterClass.ServiceEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceEvent.class, context.ContextOuterClass.ServiceEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (serviceIdBuilder_ == null) { + serviceId_ = null; + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceEvent getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceEvent build() { + context.ContextOuterClass.ServiceEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceEvent) { + return mergeFrom((context.ContextOuterClass.ServiceEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceEvent other) { + if (other == context.ContextOuterClass.ServiceEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasServiceId()) { + mergeServiceId(other.getServiceId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.ServiceId serviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceIdBuilder_; + + /** + * .context.ServiceId service_id = 2; + * @return Whether the serviceId field is set. + */ + public boolean hasServiceId() { + return serviceIdBuilder_ != null || serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 2; + * @return The serviceId. + */ + public context.ContextOuterClass.ServiceId getServiceId() { + if (serviceIdBuilder_ == null) { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } else { + return serviceIdBuilder_.getMessage(); + } + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceId_ = value; + onChanged(); + } else { + serviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdBuilder_ == null) { + serviceId_ = builderForValue.build(); + onChanged(); + } else { + serviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (serviceId_ != null) { + serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + } else { + serviceId_ = value; + } + onChanged(); + } else { + serviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder clearServiceId() { + if (serviceIdBuilder_ == null) { + serviceId_ = null; + onChanged(); + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + onChanged(); + return getServiceIdFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceId service_id = 2; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + if (serviceIdBuilder_ != null) { + return serviceIdBuilder_.getMessageOrBuilder(); + } else { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + } + + /** + * .context.ServiceId service_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdFieldBuilder() { + if (serviceIdBuilder_ == null) { + serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceId(), getParentForChildren(), isClean()); + serviceId_ = null; + } + return serviceIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceEvent) + } + + // @@protoc_insertion_point(class_scope:context.ServiceEvent) + private static final context.ContextOuterClass.ServiceEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceEvent(); + } + + public static context.ContextOuterClass.ServiceEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); + + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + + /** + * .context.Uuid slice_uuid = 2; + * @return Whether the sliceUuid field is set. + */ + boolean hasSliceUuid(); + + /** + * .context.Uuid slice_uuid = 2; + * @return The sliceUuid. + */ + context.ContextOuterClass.Uuid getSliceUuid(); + + /** + * .context.Uuid slice_uuid = 2; + */ + context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder(); + } + + /** + *
+     * ----- Slice ---------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.SliceId} + */ + public static final class SliceId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceId) + SliceIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceId.newBuilder() to construct. + private SliceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceId.class, context.ContextOuterClass.SliceId.Builder.class); + } + + public static final int CONTEXT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ContextId contextId_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } + + public static final int SLICE_UUID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.Uuid sliceUuid_; + + /** + * .context.Uuid slice_uuid = 2; + * @return Whether the sliceUuid field is set. + */ + @java.lang.Override + public boolean hasSliceUuid() { + return sliceUuid_ != null; + } + + /** + * .context.Uuid slice_uuid = 2; + * @return The sliceUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getSliceUuid() { + return sliceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; + } + + /** + * .context.Uuid slice_uuid = 2; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder() { + return getSliceUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (sliceUuid_ != null) { + output.writeMessage(2, getSliceUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (sliceUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSliceUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceId)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceId other = (context.ContextOuterClass.SliceId) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (hasSliceUuid() != other.hasSliceUuid()) + return false; + if (hasSliceUuid()) { + if (!getSliceUuid().equals(other.getSliceUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + if (hasSliceUuid()) { + hash = (37 * hash) + SLICE_UUID_FIELD_NUMBER; + hash = (53 * hash) + getSliceUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Slice ---------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.SliceId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceId) + context.ContextOuterClass.SliceIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceId.class, context.ContextOuterClass.SliceId.Builder.class); + } + + // 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; + contextIdBuilder_ = null; + } + if (sliceUuidBuilder_ == null) { + sliceUuid_ = null; + } else { + sliceUuid_ = null; + sliceUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceId getDefaultInstanceForType() { + return context.ContextOuterClass.SliceId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceId build() { + context.ContextOuterClass.SliceId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceId) { + return mergeFrom((context.ContextOuterClass.SliceId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceId other) { + if (other == context.ContextOuterClass.SliceId.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (other.hasSliceUuid()) { + mergeSliceUuid(other.getSliceUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.ContextId contextId_; + + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } + + /** + * .context.ContextId context_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } + + private context.ContextOuterClass.Uuid sliceUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceUuidBuilder_; + + /** + * .context.Uuid slice_uuid = 2; + * @return Whether the sliceUuid field is set. + */ + public boolean hasSliceUuid() { + return sliceUuidBuilder_ != null || sliceUuid_ != null; + } + + /** + * .context.Uuid slice_uuid = 2; + * @return The sliceUuid. + */ + public context.ContextOuterClass.Uuid getSliceUuid() { + if (sliceUuidBuilder_ == null) { + return sliceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; + } else { + return sliceUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid slice_uuid = 2; + */ + public Builder setSliceUuid(context.ContextOuterClass.Uuid value) { + if (sliceUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceUuid_ = value; + onChanged(); + } else { + sliceUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid slice_uuid = 2; + */ + public Builder setSliceUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (sliceUuidBuilder_ == null) { + sliceUuid_ = builderForValue.build(); + onChanged(); + } else { + sliceUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid slice_uuid = 2; + */ + public Builder mergeSliceUuid(context.ContextOuterClass.Uuid value) { + if (sliceUuidBuilder_ == null) { + if (sliceUuid_ != null) { + sliceUuid_ = context.ContextOuterClass.Uuid.newBuilder(sliceUuid_).mergeFrom(value).buildPartial(); + } else { + sliceUuid_ = value; + } + onChanged(); + } else { + sliceUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid slice_uuid = 2; + */ + public Builder clearSliceUuid() { + if (sliceUuidBuilder_ == null) { + sliceUuid_ = null; + onChanged(); + } else { + sliceUuid_ = null; + sliceUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid slice_uuid = 2; + */ + public context.ContextOuterClass.Uuid.Builder getSliceUuidBuilder() { + onChanged(); + return getSliceUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid slice_uuid = 2; + */ + public context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder() { + if (sliceUuidBuilder_ != null) { + return sliceUuidBuilder_.getMessageOrBuilder(); + } else { + return sliceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; + } + } + + /** + * .context.Uuid slice_uuid = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceUuidFieldBuilder() { + if (sliceUuidBuilder_ == null) { + sliceUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceUuid(), getParentForChildren(), isClean()); + sliceUuid_ = null; + } + return sliceUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceId) + } + + // @@protoc_insertion_point(class_scope:context.SliceId) + private static final context.ContextOuterClass.SliceId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceId(); + } + + public static context.ContextOuterClass.SliceId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Slice) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.SliceId slice_id = 1; + * @return Whether the sliceId field is set. + */ + boolean hasSliceId(); + + /** + * .context.SliceId slice_id = 1; + * @return The sliceId. + */ + context.ContextOuterClass.SliceId getSliceId(); + + /** + * .context.SliceId slice_id = 1; + */ + context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + java.util.List getSliceEndpointIdsList(); + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointId getSliceEndpointIds(int index); + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + int getSliceEndpointIdsCount(); + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + java.util.List getSliceEndpointIdsOrBuilderList(); + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointIdOrBuilder getSliceEndpointIdsOrBuilder(int index); + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + java.util.List getSliceConstraintsList(); + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + context.ContextOuterClass.Constraint getSliceConstraints(int index); + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + int getSliceConstraintsCount(); + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + java.util.List getSliceConstraintsOrBuilderList(); + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + context.ContextOuterClass.ConstraintOrBuilder getSliceConstraintsOrBuilder(int index); + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + java.util.List getSliceServiceIdsList(); + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + context.ContextOuterClass.ServiceId getSliceServiceIds(int index); + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + int getSliceServiceIdsCount(); + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + java.util.List getSliceServiceIdsOrBuilderList(); + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + context.ContextOuterClass.ServiceIdOrBuilder getSliceServiceIdsOrBuilder(int index); + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + java.util.List getSliceSubsliceIdsList(); + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + context.ContextOuterClass.SliceId getSliceSubsliceIds(int index); + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + int getSliceSubsliceIdsCount(); + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + java.util.List getSliceSubsliceIdsOrBuilderList(); + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + context.ContextOuterClass.SliceIdOrBuilder getSliceSubsliceIdsOrBuilder(int index); + + /** + * .context.SliceStatus slice_status = 7; + * @return Whether the sliceStatus field is set. + */ + boolean hasSliceStatus(); + + /** + * .context.SliceStatus slice_status = 7; + * @return The sliceStatus. + */ + context.ContextOuterClass.SliceStatus getSliceStatus(); + + /** + * .context.SliceStatus slice_status = 7; + */ + context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder(); + + /** + * .context.SliceConfig slice_config = 8; + * @return Whether the sliceConfig field is set. + */ + boolean hasSliceConfig(); + + /** + * .context.SliceConfig slice_config = 8; + * @return The sliceConfig. + */ + context.ContextOuterClass.SliceConfig getSliceConfig(); + + /** + * .context.SliceConfig slice_config = 8; + */ + context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder(); + + /** + * .context.SliceOwner slice_owner = 9; + * @return Whether the sliceOwner field is set. + */ + boolean hasSliceOwner(); + + /** + * .context.SliceOwner slice_owner = 9; + * @return The sliceOwner. + */ + context.ContextOuterClass.SliceOwner getSliceOwner(); + + /** + * .context.SliceOwner slice_owner = 9; + */ + context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder(); + + /** + * .context.Timestamp timestamp = 10; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + + /** + * .context.Timestamp timestamp = 10; + * @return The timestamp. + */ + context.ContextOuterClass.Timestamp getTimestamp(); + + /** + * .context.Timestamp timestamp = 10; + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + } + + /** + * Protobuf type {@code context.Slice} + */ + public static final class Slice extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Slice) + SliceOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Slice.newBuilder() to construct. + private Slice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Slice() { + name_ = ""; + sliceEndpointIds_ = java.util.Collections.emptyList(); + sliceConstraints_ = java.util.Collections.emptyList(); + sliceServiceIds_ = java.util.Collections.emptyList(); + sliceSubsliceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Slice_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Slice.class, context.ContextOuterClass.Slice.Builder.class); + } + + public static final int SLICE_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.SliceId sliceId_; + + /** + * .context.SliceId slice_id = 1; + * @return Whether the sliceId field is set. + */ + @java.lang.Override + public boolean hasSliceId() { + return sliceId_ != null; + } + + /** + * .context.SliceId slice_id = 1; + * @return The sliceId. + */ + @java.lang.Override + public context.ContextOuterClass.SliceId getSliceId() { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } + + /** + * .context.SliceId slice_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { + return getSliceId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SLICE_ENDPOINT_IDS_FIELD_NUMBER = 3; + + private java.util.List sliceEndpointIds_; + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getSliceEndpointIdsList() { + return sliceEndpointIds_; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getSliceEndpointIdsOrBuilderList() { + return sliceEndpointIds_; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + @java.lang.Override + public int getSliceEndpointIdsCount() { + return sliceEndpointIds_.size(); + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getSliceEndpointIds(int index) { + return sliceEndpointIds_.get(index); + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getSliceEndpointIdsOrBuilder(int index) { + return sliceEndpointIds_.get(index); + } + + public static final int SLICE_CONSTRAINTS_FIELD_NUMBER = 4; + + private java.util.List sliceConstraints_; + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + @java.lang.Override + public java.util.List getSliceConstraintsList() { + return sliceConstraints_; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + @java.lang.Override + public java.util.List getSliceConstraintsOrBuilderList() { + return sliceConstraints_; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + @java.lang.Override + public int getSliceConstraintsCount() { + return sliceConstraints_.size(); + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint getSliceConstraints(int index) { + return sliceConstraints_.get(index); + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + @java.lang.Override + public context.ContextOuterClass.ConstraintOrBuilder getSliceConstraintsOrBuilder(int index) { + return sliceConstraints_.get(index); + } + + public static final int SLICE_SERVICE_IDS_FIELD_NUMBER = 5; + + private java.util.List sliceServiceIds_; + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + @java.lang.Override + public java.util.List getSliceServiceIdsList() { + return sliceServiceIds_; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + @java.lang.Override + public java.util.List getSliceServiceIdsOrBuilderList() { + return sliceServiceIds_; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + @java.lang.Override + public int getSliceServiceIdsCount() { + return sliceServiceIds_.size(); + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getSliceServiceIds(int index) { + return sliceServiceIds_.get(index); + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getSliceServiceIdsOrBuilder(int index) { + return sliceServiceIds_.get(index); + } + + public static final int SLICE_SUBSLICE_IDS_FIELD_NUMBER = 6; + + private java.util.List sliceSubsliceIds_; + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + @java.lang.Override + public java.util.List getSliceSubsliceIdsList() { + return sliceSubsliceIds_; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + @java.lang.Override + public java.util.List getSliceSubsliceIdsOrBuilderList() { + return sliceSubsliceIds_; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + @java.lang.Override + public int getSliceSubsliceIdsCount() { + return sliceSubsliceIds_.size(); + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + @java.lang.Override + public context.ContextOuterClass.SliceId getSliceSubsliceIds(int index) { + return sliceSubsliceIds_.get(index); + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdOrBuilder getSliceSubsliceIdsOrBuilder(int index) { + return sliceSubsliceIds_.get(index); + } + + public static final int SLICE_STATUS_FIELD_NUMBER = 7; + + private context.ContextOuterClass.SliceStatus sliceStatus_; + + /** + * .context.SliceStatus slice_status = 7; + * @return Whether the sliceStatus field is set. + */ + @java.lang.Override + public boolean hasSliceStatus() { + return sliceStatus_ != null; + } + + /** + * .context.SliceStatus slice_status = 7; + * @return The sliceStatus. + */ + @java.lang.Override + public context.ContextOuterClass.SliceStatus getSliceStatus() { + return sliceStatus_ == null ? context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; + } + + /** + * .context.SliceStatus slice_status = 7; + */ + @java.lang.Override + public context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder() { + return getSliceStatus(); + } + + public static final int SLICE_CONFIG_FIELD_NUMBER = 8; + + private context.ContextOuterClass.SliceConfig sliceConfig_; + + /** + * .context.SliceConfig slice_config = 8; + * @return Whether the sliceConfig field is set. + */ + @java.lang.Override + public boolean hasSliceConfig() { + return sliceConfig_ != null; + } + + /** + * .context.SliceConfig slice_config = 8; + * @return The sliceConfig. + */ + @java.lang.Override + public context.ContextOuterClass.SliceConfig getSliceConfig() { + return sliceConfig_ == null ? context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; + } + + /** + * .context.SliceConfig slice_config = 8; + */ + @java.lang.Override + public context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder() { + return getSliceConfig(); + } + + public static final int SLICE_OWNER_FIELD_NUMBER = 9; + + private context.ContextOuterClass.SliceOwner sliceOwner_; + + /** + * .context.SliceOwner slice_owner = 9; + * @return Whether the sliceOwner field is set. + */ + @java.lang.Override + public boolean hasSliceOwner() { + return sliceOwner_ != null; + } + + /** + * .context.SliceOwner slice_owner = 9; + * @return The sliceOwner. + */ + @java.lang.Override + public context.ContextOuterClass.SliceOwner getSliceOwner() { + return sliceOwner_ == null ? context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + @java.lang.Override + public context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder() { + return getSliceOwner(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 10; + + private context.ContextOuterClass.Timestamp timestamp_; + + /** + * .context.Timestamp timestamp = 10; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 10; + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + + /** + * .context.Timestamp timestamp = 10; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sliceId_ != null) { + output.writeMessage(1, getSliceId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < sliceEndpointIds_.size(); i++) { + output.writeMessage(3, sliceEndpointIds_.get(i)); + } + for (int i = 0; i < sliceConstraints_.size(); i++) { + output.writeMessage(4, sliceConstraints_.get(i)); + } + for (int i = 0; i < sliceServiceIds_.size(); i++) { + output.writeMessage(5, sliceServiceIds_.get(i)); + } + for (int i = 0; i < sliceSubsliceIds_.size(); i++) { + output.writeMessage(6, sliceSubsliceIds_.get(i)); + } + if (sliceStatus_ != null) { + output.writeMessage(7, getSliceStatus()); + } + if (sliceConfig_ != null) { + output.writeMessage(8, getSliceConfig()); + } + if (sliceOwner_ != null) { + output.writeMessage(9, getSliceOwner()); + } + if (timestamp_ != null) { + output.writeMessage(10, getTimestamp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (sliceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSliceId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < sliceEndpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, sliceEndpointIds_.get(i)); + } + for (int i = 0; i < sliceConstraints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, sliceConstraints_.get(i)); + } + for (int i = 0; i < sliceServiceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, sliceServiceIds_.get(i)); + } + for (int i = 0; i < sliceSubsliceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, sliceSubsliceIds_.get(i)); + } + if (sliceStatus_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSliceStatus()); + } + if (sliceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSliceConfig()); + } + if (sliceOwner_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSliceOwner()); + } + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getTimestamp()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Slice)) { + return super.equals(obj); + } + context.ContextOuterClass.Slice other = (context.ContextOuterClass.Slice) obj; + if (hasSliceId() != other.hasSliceId()) + return false; + if (hasSliceId()) { + if (!getSliceId().equals(other.getSliceId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getSliceEndpointIdsList().equals(other.getSliceEndpointIdsList())) + return false; + if (!getSliceConstraintsList().equals(other.getSliceConstraintsList())) + return false; + if (!getSliceServiceIdsList().equals(other.getSliceServiceIdsList())) + return false; + if (!getSliceSubsliceIdsList().equals(other.getSliceSubsliceIdsList())) + return false; + if (hasSliceStatus() != other.hasSliceStatus()) + return false; + if (hasSliceStatus()) { + if (!getSliceStatus().equals(other.getSliceStatus())) + return false; + } + if (hasSliceConfig() != other.hasSliceConfig()) + return false; + if (hasSliceConfig()) { + if (!getSliceConfig().equals(other.getSliceConfig())) + return false; + } + if (hasSliceOwner() != other.hasSliceOwner()) + return false; + if (hasSliceOwner()) { + if (!getSliceOwner().equals(other.getSliceOwner())) + return false; + } + if (hasTimestamp() != other.hasTimestamp()) + return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSliceId()) { + hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSliceId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getSliceEndpointIdsCount() > 0) { + hash = (37 * hash) + SLICE_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSliceEndpointIdsList().hashCode(); + } + if (getSliceConstraintsCount() > 0) { + hash = (37 * hash) + SLICE_CONSTRAINTS_FIELD_NUMBER; + hash = (53 * hash) + getSliceConstraintsList().hashCode(); + } + if (getSliceServiceIdsCount() > 0) { + hash = (37 * hash) + SLICE_SERVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSliceServiceIdsList().hashCode(); + } + if (getSliceSubsliceIdsCount() > 0) { + hash = (37 * hash) + SLICE_SUBSLICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSliceSubsliceIdsList().hashCode(); + } + if (hasSliceStatus()) { + hash = (37 * hash) + SLICE_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getSliceStatus().hashCode(); + } + if (hasSliceConfig()) { + hash = (37 * hash) + SLICE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSliceConfig().hashCode(); + } + if (hasSliceOwner()) { + hash = (37 * hash) + SLICE_OWNER_FIELD_NUMBER; + hash = (53 * hash) + getSliceOwner().hashCode(); + } + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Slice parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Slice parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Slice parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Slice parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Slice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Slice parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Slice parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Slice parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Slice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Slice parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Slice parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Slice parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Slice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Slice} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Slice) + context.ContextOuterClass.SliceOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Slice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Slice_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Slice.class, context.ContextOuterClass.Slice.Builder.class); + } + + // 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; + sliceIdBuilder_ = null; + } + name_ = ""; + if (sliceEndpointIdsBuilder_ == null) { + sliceEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + sliceEndpointIdsBuilder_.clear(); + } + if (sliceConstraintsBuilder_ == null) { + sliceConstraints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + sliceConstraintsBuilder_.clear(); + } + if (sliceServiceIdsBuilder_ == null) { + sliceServiceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + sliceServiceIdsBuilder_.clear(); + } + if (sliceSubsliceIdsBuilder_ == null) { + sliceSubsliceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + sliceSubsliceIdsBuilder_.clear(); + } + if (sliceStatusBuilder_ == null) { + sliceStatus_ = null; + } else { + sliceStatus_ = null; + sliceStatusBuilder_ = null; + } + if (sliceConfigBuilder_ == null) { + sliceConfig_ = null; + } else { + sliceConfig_ = null; + sliceConfigBuilder_ = null; + } + if (sliceOwnerBuilder_ == null) { + sliceOwner_ = null; + } else { + sliceOwner_ = null; + sliceOwnerBuilder_ = null; + } + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Slice_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Slice getDefaultInstanceForType() { + return context.ContextOuterClass.Slice.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Slice build() { + context.ContextOuterClass.Slice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + if (sliceEndpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sliceEndpointIds_ = java.util.Collections.unmodifiableList(sliceEndpointIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sliceEndpointIds_ = sliceEndpointIds_; + } else { + result.sliceEndpointIds_ = sliceEndpointIdsBuilder_.build(); + } + if (sliceConstraintsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + sliceConstraints_ = java.util.Collections.unmodifiableList(sliceConstraints_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.sliceConstraints_ = sliceConstraints_; + } else { + result.sliceConstraints_ = sliceConstraintsBuilder_.build(); + } + if (sliceServiceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + sliceServiceIds_ = java.util.Collections.unmodifiableList(sliceServiceIds_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.sliceServiceIds_ = sliceServiceIds_; + } else { + result.sliceServiceIds_ = sliceServiceIdsBuilder_.build(); + } + if (sliceSubsliceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + sliceSubsliceIds_ = java.util.Collections.unmodifiableList(sliceSubsliceIds_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.sliceSubsliceIds_ = sliceSubsliceIds_; + } else { + result.sliceSubsliceIds_ = sliceSubsliceIdsBuilder_.build(); + } + if (sliceStatusBuilder_ == null) { + result.sliceStatus_ = sliceStatus_; + } else { + result.sliceStatus_ = sliceStatusBuilder_.build(); + } + if (sliceConfigBuilder_ == null) { + result.sliceConfig_ = sliceConfig_; + } else { + result.sliceConfig_ = sliceConfigBuilder_.build(); + } + if (sliceOwnerBuilder_ == null) { + result.sliceOwner_ = sliceOwner_; + } else { + result.sliceOwner_ = sliceOwnerBuilder_.build(); + } + if (timestampBuilder_ == null) { + result.timestamp_ = timestamp_; + } else { + result.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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Slice) { + return mergeFrom((context.ContextOuterClass.Slice) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Slice other) { + if (other == context.ContextOuterClass.Slice.getDefaultInstance()) + return this; + if (other.hasSliceId()) { + mergeSliceId(other.getSliceId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (sliceEndpointIdsBuilder_ == null) { + if (!other.sliceEndpointIds_.isEmpty()) { + if (sliceEndpointIds_.isEmpty()) { + sliceEndpointIds_ = other.sliceEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.addAll(other.sliceEndpointIds_); + } + onChanged(); + } + } else { + if (!other.sliceEndpointIds_.isEmpty()) { + if (sliceEndpointIdsBuilder_.isEmpty()) { + sliceEndpointIdsBuilder_.dispose(); + sliceEndpointIdsBuilder_ = null; + sliceEndpointIds_ = other.sliceEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + sliceEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceEndpointIdsFieldBuilder() : null; + } else { + sliceEndpointIdsBuilder_.addAllMessages(other.sliceEndpointIds_); + } + } + } + if (sliceConstraintsBuilder_ == null) { + if (!other.sliceConstraints_.isEmpty()) { + if (sliceConstraints_.isEmpty()) { + sliceConstraints_ = other.sliceConstraints_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSliceConstraintsIsMutable(); + sliceConstraints_.addAll(other.sliceConstraints_); + } + onChanged(); + } + } else { + if (!other.sliceConstraints_.isEmpty()) { + if (sliceConstraintsBuilder_.isEmpty()) { + sliceConstraintsBuilder_.dispose(); + sliceConstraintsBuilder_ = null; + sliceConstraints_ = other.sliceConstraints_; + bitField0_ = (bitField0_ & ~0x00000002); + sliceConstraintsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceConstraintsFieldBuilder() : null; + } else { + sliceConstraintsBuilder_.addAllMessages(other.sliceConstraints_); + } + } + } + if (sliceServiceIdsBuilder_ == null) { + if (!other.sliceServiceIds_.isEmpty()) { + if (sliceServiceIds_.isEmpty()) { + sliceServiceIds_ = other.sliceServiceIds_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.addAll(other.sliceServiceIds_); + } + onChanged(); + } + } else { + if (!other.sliceServiceIds_.isEmpty()) { + if (sliceServiceIdsBuilder_.isEmpty()) { + sliceServiceIdsBuilder_.dispose(); + sliceServiceIdsBuilder_ = null; + sliceServiceIds_ = other.sliceServiceIds_; + bitField0_ = (bitField0_ & ~0x00000004); + sliceServiceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceServiceIdsFieldBuilder() : null; + } else { + sliceServiceIdsBuilder_.addAllMessages(other.sliceServiceIds_); + } + } + } + if (sliceSubsliceIdsBuilder_ == null) { + if (!other.sliceSubsliceIds_.isEmpty()) { + if (sliceSubsliceIds_.isEmpty()) { + sliceSubsliceIds_ = other.sliceSubsliceIds_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.addAll(other.sliceSubsliceIds_); + } + onChanged(); + } + } else { + if (!other.sliceSubsliceIds_.isEmpty()) { + if (sliceSubsliceIdsBuilder_.isEmpty()) { + sliceSubsliceIdsBuilder_.dispose(); + sliceSubsliceIdsBuilder_ = null; + sliceSubsliceIds_ = other.sliceSubsliceIds_; + bitField0_ = (bitField0_ & ~0x00000008); + sliceSubsliceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceSubsliceIdsFieldBuilder() : null; + } else { + sliceSubsliceIdsBuilder_.addAllMessages(other.sliceSubsliceIds_); + } + } + } + if (other.hasSliceStatus()) { + mergeSliceStatus(other.getSliceStatus()); + } + if (other.hasSliceConfig()) { + mergeSliceConfig(other.getSliceConfig()); + } + if (other.hasSliceOwner()) { + mergeSliceOwner(other.getSliceOwner()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Slice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.SliceId sliceId_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceIdBuilder_; + + /** + * .context.SliceId slice_id = 1; + * @return Whether the sliceId field is set. + */ + public boolean hasSliceId() { + return sliceIdBuilder_ != null || sliceId_ != null; + } + + /** + * .context.SliceId slice_id = 1; + * @return The sliceId. + */ + public context.ContextOuterClass.SliceId getSliceId() { + if (sliceIdBuilder_ == null) { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } else { + return sliceIdBuilder_.getMessage(); + } + } + + /** + * .context.SliceId slice_id = 1; + */ + public Builder setSliceId(context.ContextOuterClass.SliceId value) { + if (sliceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceId_ = value; + onChanged(); + } else { + sliceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceId slice_id = 1; + */ + public Builder setSliceId(context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdBuilder_ == null) { + sliceId_ = builderForValue.build(); + onChanged(); + } else { + sliceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceId slice_id = 1; + */ + public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { + if (sliceIdBuilder_ == null) { + if (sliceId_ != null) { + sliceId_ = context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); + } else { + sliceId_ = value; + } + onChanged(); + } else { + sliceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceId slice_id = 1; + */ + public Builder clearSliceId() { + if (sliceIdBuilder_ == null) { + sliceId_ = null; + onChanged(); + } else { + sliceId_ = null; + sliceIdBuilder_ = null; + } + return this; + } + + /** + * .context.SliceId slice_id = 1; + */ + public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { + onChanged(); + return getSliceIdFieldBuilder().getBuilder(); + } + + /** + * .context.SliceId slice_id = 1; + */ + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { + if (sliceIdBuilder_ != null) { + return sliceIdBuilder_.getMessageOrBuilder(); + } else { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } + } + + /** + * .context.SliceId slice_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceIdFieldBuilder() { + if (sliceIdBuilder_ == null) { + sliceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceId(), getParentForChildren(), isClean()); + sliceId_ = null; + } + return sliceIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.util.List sliceEndpointIds_ = java.util.Collections.emptyList(); + + private void ensureSliceEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sliceEndpointIds_ = new java.util.ArrayList(sliceEndpointIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 sliceEndpointIdsBuilder_; + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public java.util.List getSliceEndpointIdsList() { + if (sliceEndpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sliceEndpointIds_); + } else { + return sliceEndpointIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public int getSliceEndpointIdsCount() { + if (sliceEndpointIdsBuilder_ == null) { + return sliceEndpointIds_.size(); + } else { + return sliceEndpointIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId getSliceEndpointIds(int index) { + if (sliceEndpointIdsBuilder_ == null) { + return sliceEndpointIds_.get(index); + } else { + return sliceEndpointIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder setSliceEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (sliceEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.set(index, value); + onChanged(); + } else { + sliceEndpointIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder setSliceEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (sliceEndpointIdsBuilder_ == null) { + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.set(index, builderForValue.build()); + onChanged(); + } else { + sliceEndpointIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder addSliceEndpointIds(context.ContextOuterClass.EndPointId value) { + if (sliceEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.add(value); + onChanged(); + } else { + sliceEndpointIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder addSliceEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (sliceEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.add(index, value); + onChanged(); + } else { + sliceEndpointIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder addSliceEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (sliceEndpointIdsBuilder_ == null) { + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.add(builderForValue.build()); + onChanged(); + } else { + sliceEndpointIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder addSliceEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (sliceEndpointIdsBuilder_ == null) { + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.add(index, builderForValue.build()); + onChanged(); + } else { + sliceEndpointIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder addAllSliceEndpointIds(java.lang.Iterable values) { + if (sliceEndpointIdsBuilder_ == null) { + ensureSliceEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceEndpointIds_); + onChanged(); + } else { + sliceEndpointIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder clearSliceEndpointIds() { + if (sliceEndpointIdsBuilder_ == null) { + sliceEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sliceEndpointIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder removeSliceEndpointIds(int index) { + if (sliceEndpointIdsBuilder_ == null) { + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.remove(index); + onChanged(); + } else { + sliceEndpointIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder getSliceEndpointIdsBuilder(int index) { + return getSliceEndpointIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getSliceEndpointIdsOrBuilder(int index) { + if (sliceEndpointIdsBuilder_ == null) { + return sliceEndpointIds_.get(index); + } else { + return sliceEndpointIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public java.util.List getSliceEndpointIdsOrBuilderList() { + if (sliceEndpointIdsBuilder_ != null) { + return sliceEndpointIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sliceEndpointIds_); + } + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addSliceEndpointIdsBuilder() { + return getSliceEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addSliceEndpointIdsBuilder(int index) { + return getSliceEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public java.util.List getSliceEndpointIdsBuilderList() { + return getSliceEndpointIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSliceEndpointIdsFieldBuilder() { + if (sliceEndpointIdsBuilder_ == null) { + sliceEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + sliceEndpointIds_ = null; + } + return sliceEndpointIdsBuilder_; + } + + private java.util.List sliceConstraints_ = java.util.Collections.emptyList(); + + private void ensureSliceConstraintsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + sliceConstraints_ = new java.util.ArrayList(sliceConstraints_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 sliceConstraintsBuilder_; + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public java.util.List getSliceConstraintsList() { + if (sliceConstraintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sliceConstraints_); + } else { + return sliceConstraintsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public int getSliceConstraintsCount() { + if (sliceConstraintsBuilder_ == null) { + return sliceConstraints_.size(); + } else { + return sliceConstraintsBuilder_.getCount(); + } + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public context.ContextOuterClass.Constraint getSliceConstraints(int index) { + if (sliceConstraintsBuilder_ == null) { + return sliceConstraints_.get(index); + } else { + return sliceConstraintsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder setSliceConstraints(int index, context.ContextOuterClass.Constraint value) { + if (sliceConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceConstraintsIsMutable(); + sliceConstraints_.set(index, value); + onChanged(); + } else { + sliceConstraintsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder setSliceConstraints(int index, context.ContextOuterClass.Constraint.Builder builderForValue) { + if (sliceConstraintsBuilder_ == null) { + ensureSliceConstraintsIsMutable(); + sliceConstraints_.set(index, builderForValue.build()); + onChanged(); + } else { + sliceConstraintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder addSliceConstraints(context.ContextOuterClass.Constraint value) { + if (sliceConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceConstraintsIsMutable(); + sliceConstraints_.add(value); + onChanged(); + } else { + sliceConstraintsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder addSliceConstraints(int index, context.ContextOuterClass.Constraint value) { + if (sliceConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceConstraintsIsMutable(); + sliceConstraints_.add(index, value); + onChanged(); + } else { + sliceConstraintsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder addSliceConstraints(context.ContextOuterClass.Constraint.Builder builderForValue) { + if (sliceConstraintsBuilder_ == null) { + ensureSliceConstraintsIsMutable(); + sliceConstraints_.add(builderForValue.build()); + onChanged(); + } else { + sliceConstraintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder addSliceConstraints(int index, context.ContextOuterClass.Constraint.Builder builderForValue) { + if (sliceConstraintsBuilder_ == null) { + ensureSliceConstraintsIsMutable(); + sliceConstraints_.add(index, builderForValue.build()); + onChanged(); + } else { + sliceConstraintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder addAllSliceConstraints(java.lang.Iterable values) { + if (sliceConstraintsBuilder_ == null) { + ensureSliceConstraintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceConstraints_); + onChanged(); + } else { + sliceConstraintsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder clearSliceConstraints() { + if (sliceConstraintsBuilder_ == null) { + sliceConstraints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + sliceConstraintsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder removeSliceConstraints(int index) { + if (sliceConstraintsBuilder_ == null) { + ensureSliceConstraintsIsMutable(); + sliceConstraints_.remove(index); + onChanged(); + } else { + sliceConstraintsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public context.ContextOuterClass.Constraint.Builder getSliceConstraintsBuilder(int index) { + return getSliceConstraintsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public context.ContextOuterClass.ConstraintOrBuilder getSliceConstraintsOrBuilder(int index) { + if (sliceConstraintsBuilder_ == null) { + return sliceConstraints_.get(index); + } else { + return sliceConstraintsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public java.util.List getSliceConstraintsOrBuilderList() { + if (sliceConstraintsBuilder_ != null) { + return sliceConstraintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sliceConstraints_); + } + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public context.ContextOuterClass.Constraint.Builder addSliceConstraintsBuilder() { + return getSliceConstraintsFieldBuilder().addBuilder(context.ContextOuterClass.Constraint.getDefaultInstance()); + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public context.ContextOuterClass.Constraint.Builder addSliceConstraintsBuilder(int index) { + return getSliceConstraintsFieldBuilder().addBuilder(index, context.ContextOuterClass.Constraint.getDefaultInstance()); + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public java.util.List getSliceConstraintsBuilderList() { + return getSliceConstraintsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSliceConstraintsFieldBuilder() { + if (sliceConstraintsBuilder_ == null) { + sliceConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceConstraints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + sliceConstraints_ = null; + } + return sliceConstraintsBuilder_; + } + + private java.util.List sliceServiceIds_ = java.util.Collections.emptyList(); + + private void ensureSliceServiceIdsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + sliceServiceIds_ = new java.util.ArrayList(sliceServiceIds_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 sliceServiceIdsBuilder_; + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public java.util.List getSliceServiceIdsList() { + if (sliceServiceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sliceServiceIds_); + } else { + return sliceServiceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public int getSliceServiceIdsCount() { + if (sliceServiceIdsBuilder_ == null) { + return sliceServiceIds_.size(); + } else { + return sliceServiceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public context.ContextOuterClass.ServiceId getSliceServiceIds(int index) { + if (sliceServiceIdsBuilder_ == null) { + return sliceServiceIds_.get(index); + } else { + return sliceServiceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder setSliceServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (sliceServiceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.set(index, value); + onChanged(); + } else { + sliceServiceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder setSliceServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (sliceServiceIdsBuilder_ == null) { + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + sliceServiceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder addSliceServiceIds(context.ContextOuterClass.ServiceId value) { + if (sliceServiceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.add(value); + onChanged(); + } else { + sliceServiceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder addSliceServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (sliceServiceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.add(index, value); + onChanged(); + } else { + sliceServiceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder addSliceServiceIds(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (sliceServiceIdsBuilder_ == null) { + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.add(builderForValue.build()); + onChanged(); + } else { + sliceServiceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder addSliceServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (sliceServiceIdsBuilder_ == null) { + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + sliceServiceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder addAllSliceServiceIds(java.lang.Iterable values) { + if (sliceServiceIdsBuilder_ == null) { + ensureSliceServiceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceServiceIds_); + onChanged(); + } else { + sliceServiceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder clearSliceServiceIds() { + if (sliceServiceIdsBuilder_ == null) { + sliceServiceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + sliceServiceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder removeSliceServiceIds(int index) { + if (sliceServiceIdsBuilder_ == null) { + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.remove(index); + onChanged(); + } else { + sliceServiceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public context.ContextOuterClass.ServiceId.Builder getSliceServiceIdsBuilder(int index) { + return getSliceServiceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getSliceServiceIdsOrBuilder(int index) { + if (sliceServiceIdsBuilder_ == null) { + return sliceServiceIds_.get(index); + } else { + return sliceServiceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public java.util.List getSliceServiceIdsOrBuilderList() { + if (sliceServiceIdsBuilder_ != null) { + return sliceServiceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sliceServiceIds_); + } + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public context.ContextOuterClass.ServiceId.Builder addSliceServiceIdsBuilder() { + return getSliceServiceIdsFieldBuilder().addBuilder(context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public context.ContextOuterClass.ServiceId.Builder addSliceServiceIdsBuilder(int index) { + return getSliceServiceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public java.util.List getSliceServiceIdsBuilderList() { + return getSliceServiceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSliceServiceIdsFieldBuilder() { + if (sliceServiceIdsBuilder_ == null) { + sliceServiceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceServiceIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + sliceServiceIds_ = null; + } + return sliceServiceIdsBuilder_; + } + + private java.util.List sliceSubsliceIds_ = java.util.Collections.emptyList(); + + private void ensureSliceSubsliceIdsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + sliceSubsliceIds_ = new java.util.ArrayList(sliceSubsliceIds_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 sliceSubsliceIdsBuilder_; + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public java.util.List getSliceSubsliceIdsList() { + if (sliceSubsliceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sliceSubsliceIds_); + } else { + return sliceSubsliceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public int getSliceSubsliceIdsCount() { + if (sliceSubsliceIdsBuilder_ == null) { + return sliceSubsliceIds_.size(); + } else { + return sliceSubsliceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public context.ContextOuterClass.SliceId getSliceSubsliceIds(int index) { + if (sliceSubsliceIdsBuilder_ == null) { + return sliceSubsliceIds_.get(index); + } else { + return sliceSubsliceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder setSliceSubsliceIds(int index, context.ContextOuterClass.SliceId value) { + if (sliceSubsliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.set(index, value); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder setSliceSubsliceIds(int index, context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceSubsliceIdsBuilder_ == null) { + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder addSliceSubsliceIds(context.ContextOuterClass.SliceId value) { + if (sliceSubsliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.add(value); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder addSliceSubsliceIds(int index, context.ContextOuterClass.SliceId value) { + if (sliceSubsliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.add(index, value); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder addSliceSubsliceIds(context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceSubsliceIdsBuilder_ == null) { + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.add(builderForValue.build()); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder addSliceSubsliceIds(int index, context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceSubsliceIdsBuilder_ == null) { + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder addAllSliceSubsliceIds(java.lang.Iterable values) { + if (sliceSubsliceIdsBuilder_ == null) { + ensureSliceSubsliceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceSubsliceIds_); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder clearSliceSubsliceIds() { + if (sliceSubsliceIdsBuilder_ == null) { + sliceSubsliceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder removeSliceSubsliceIds(int index) { + if (sliceSubsliceIdsBuilder_ == null) { + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.remove(index); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public context.ContextOuterClass.SliceId.Builder getSliceSubsliceIdsBuilder(int index) { + return getSliceSubsliceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public context.ContextOuterClass.SliceIdOrBuilder getSliceSubsliceIdsOrBuilder(int index) { + if (sliceSubsliceIdsBuilder_ == null) { + return sliceSubsliceIds_.get(index); + } else { + return sliceSubsliceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public java.util.List getSliceSubsliceIdsOrBuilderList() { + if (sliceSubsliceIdsBuilder_ != null) { + return sliceSubsliceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sliceSubsliceIds_); + } + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public context.ContextOuterClass.SliceId.Builder addSliceSubsliceIdsBuilder() { + return getSliceSubsliceIdsFieldBuilder().addBuilder(context.ContextOuterClass.SliceId.getDefaultInstance()); + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public context.ContextOuterClass.SliceId.Builder addSliceSubsliceIdsBuilder(int index) { + return getSliceSubsliceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.SliceId.getDefaultInstance()); + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public java.util.List getSliceSubsliceIdsBuilderList() { + return getSliceSubsliceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSliceSubsliceIdsFieldBuilder() { + if (sliceSubsliceIdsBuilder_ == null) { + sliceSubsliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceSubsliceIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + sliceSubsliceIds_ = null; + } + return sliceSubsliceIdsBuilder_; + } + + private context.ContextOuterClass.SliceStatus sliceStatus_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceStatusBuilder_; + + /** + * .context.SliceStatus slice_status = 7; + * @return Whether the sliceStatus field is set. + */ + public boolean hasSliceStatus() { + return sliceStatusBuilder_ != null || sliceStatus_ != null; + } + + /** + * .context.SliceStatus slice_status = 7; + * @return The sliceStatus. + */ + public context.ContextOuterClass.SliceStatus getSliceStatus() { + if (sliceStatusBuilder_ == null) { + return sliceStatus_ == null ? context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; + } else { + return sliceStatusBuilder_.getMessage(); + } + } + + /** + * .context.SliceStatus slice_status = 7; + */ + public Builder setSliceStatus(context.ContextOuterClass.SliceStatus value) { + if (sliceStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceStatus_ = value; + onChanged(); + } else { + sliceStatusBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceStatus slice_status = 7; + */ + public Builder setSliceStatus(context.ContextOuterClass.SliceStatus.Builder builderForValue) { + if (sliceStatusBuilder_ == null) { + sliceStatus_ = builderForValue.build(); + onChanged(); + } else { + sliceStatusBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceStatus slice_status = 7; + */ + public Builder mergeSliceStatus(context.ContextOuterClass.SliceStatus value) { + if (sliceStatusBuilder_ == null) { + if (sliceStatus_ != null) { + sliceStatus_ = context.ContextOuterClass.SliceStatus.newBuilder(sliceStatus_).mergeFrom(value).buildPartial(); + } else { + sliceStatus_ = value; + } + onChanged(); + } else { + sliceStatusBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceStatus slice_status = 7; + */ + public Builder clearSliceStatus() { + if (sliceStatusBuilder_ == null) { + sliceStatus_ = null; + onChanged(); + } else { + sliceStatus_ = null; + sliceStatusBuilder_ = null; + } + return this; + } + + /** + * .context.SliceStatus slice_status = 7; + */ + public context.ContextOuterClass.SliceStatus.Builder getSliceStatusBuilder() { + onChanged(); + return getSliceStatusFieldBuilder().getBuilder(); + } + + /** + * .context.SliceStatus slice_status = 7; + */ + public context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder() { + if (sliceStatusBuilder_ != null) { + return sliceStatusBuilder_.getMessageOrBuilder(); + } else { + return sliceStatus_ == null ? context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; + } + } + + /** + * .context.SliceStatus slice_status = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceStatusFieldBuilder() { + if (sliceStatusBuilder_ == null) { + sliceStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceStatus(), getParentForChildren(), isClean()); + sliceStatus_ = null; + } + return sliceStatusBuilder_; + } + + private context.ContextOuterClass.SliceConfig sliceConfig_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceConfigBuilder_; + + /** + * .context.SliceConfig slice_config = 8; + * @return Whether the sliceConfig field is set. + */ + public boolean hasSliceConfig() { + return sliceConfigBuilder_ != null || sliceConfig_ != null; + } + + /** + * .context.SliceConfig slice_config = 8; + * @return The sliceConfig. + */ + public context.ContextOuterClass.SliceConfig getSliceConfig() { + if (sliceConfigBuilder_ == null) { + return sliceConfig_ == null ? context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; + } else { + return sliceConfigBuilder_.getMessage(); + } + } + + /** + * .context.SliceConfig slice_config = 8; + */ + public Builder setSliceConfig(context.ContextOuterClass.SliceConfig value) { + if (sliceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceConfig_ = value; + onChanged(); + } else { + sliceConfigBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceConfig slice_config = 8; + */ + public Builder setSliceConfig(context.ContextOuterClass.SliceConfig.Builder builderForValue) { + if (sliceConfigBuilder_ == null) { + sliceConfig_ = builderForValue.build(); + onChanged(); + } else { + sliceConfigBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceConfig slice_config = 8; + */ + public Builder mergeSliceConfig(context.ContextOuterClass.SliceConfig value) { + if (sliceConfigBuilder_ == null) { + if (sliceConfig_ != null) { + sliceConfig_ = context.ContextOuterClass.SliceConfig.newBuilder(sliceConfig_).mergeFrom(value).buildPartial(); + } else { + sliceConfig_ = value; + } + onChanged(); + } else { + sliceConfigBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceConfig slice_config = 8; + */ + public Builder clearSliceConfig() { + if (sliceConfigBuilder_ == null) { + sliceConfig_ = null; + onChanged(); + } else { + sliceConfig_ = null; + sliceConfigBuilder_ = null; + } + return this; + } + + /** + * .context.SliceConfig slice_config = 8; + */ + public context.ContextOuterClass.SliceConfig.Builder getSliceConfigBuilder() { + onChanged(); + return getSliceConfigFieldBuilder().getBuilder(); + } + + /** + * .context.SliceConfig slice_config = 8; + */ + public context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder() { + if (sliceConfigBuilder_ != null) { + return sliceConfigBuilder_.getMessageOrBuilder(); + } else { + return sliceConfig_ == null ? context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; + } + } + + /** + * .context.SliceConfig slice_config = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceConfigFieldBuilder() { + if (sliceConfigBuilder_ == null) { + sliceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceConfig(), getParentForChildren(), isClean()); + sliceConfig_ = null; + } + return sliceConfigBuilder_; + } + + private context.ContextOuterClass.SliceOwner sliceOwner_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceOwnerBuilder_; + + /** + * .context.SliceOwner slice_owner = 9; + * @return Whether the sliceOwner field is set. + */ + public boolean hasSliceOwner() { + return sliceOwnerBuilder_ != null || sliceOwner_ != null; + } + + /** + * .context.SliceOwner slice_owner = 9; + * @return The sliceOwner. + */ + public context.ContextOuterClass.SliceOwner getSliceOwner() { + if (sliceOwnerBuilder_ == null) { + return sliceOwner_ == null ? context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; + } else { + return sliceOwnerBuilder_.getMessage(); + } + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + public Builder setSliceOwner(context.ContextOuterClass.SliceOwner value) { + if (sliceOwnerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceOwner_ = value; + onChanged(); + } else { + sliceOwnerBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + public Builder setSliceOwner(context.ContextOuterClass.SliceOwner.Builder builderForValue) { + if (sliceOwnerBuilder_ == null) { + sliceOwner_ = builderForValue.build(); + onChanged(); + } else { + sliceOwnerBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + public Builder mergeSliceOwner(context.ContextOuterClass.SliceOwner value) { + if (sliceOwnerBuilder_ == null) { + if (sliceOwner_ != null) { + sliceOwner_ = context.ContextOuterClass.SliceOwner.newBuilder(sliceOwner_).mergeFrom(value).buildPartial(); + } else { + sliceOwner_ = value; + } + onChanged(); + } else { + sliceOwnerBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + public Builder clearSliceOwner() { + if (sliceOwnerBuilder_ == null) { + sliceOwner_ = null; + onChanged(); + } else { + sliceOwner_ = null; + sliceOwnerBuilder_ = null; + } + return this; + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + public context.ContextOuterClass.SliceOwner.Builder getSliceOwnerBuilder() { + onChanged(); + return getSliceOwnerFieldBuilder().getBuilder(); + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + public context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder() { + if (sliceOwnerBuilder_ != null) { + return sliceOwnerBuilder_.getMessageOrBuilder(); + } else { + return sliceOwner_ == null ? context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; + } + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceOwnerFieldBuilder() { + if (sliceOwnerBuilder_ == null) { + sliceOwnerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceOwner(), getParentForChildren(), isClean()); + sliceOwner_ = null; + } + return sliceOwnerBuilder_; + } + + private context.ContextOuterClass.Timestamp timestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; + + /** + * .context.Timestamp timestamp = 10; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 10; + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * .context.Timestamp timestamp = 10; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 10; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Timestamp timestamp = 10; + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 10; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + /** + * .context.Timestamp timestamp = 10; + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + + /** + * .context.Timestamp timestamp = 10; + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } + + /** + * .context.Timestamp timestamp = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Slice) + } + + // @@protoc_insertion_point(class_scope:context.Slice) + private static final context.ContextOuterClass.Slice DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Slice(); + } + + public static context.ContextOuterClass.Slice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Slice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceOwnerOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceOwner) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid owner_uuid = 1; + * @return Whether the ownerUuid field is set. + */ + boolean hasOwnerUuid(); + + /** + * .context.Uuid owner_uuid = 1; + * @return The ownerUuid. + */ + context.ContextOuterClass.Uuid getOwnerUuid(); + + /** + * .context.Uuid owner_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder(); + + /** + * string owner_string = 2; + * @return The ownerString. + */ + java.lang.String getOwnerString(); + + /** + * string owner_string = 2; + * @return The bytes for ownerString. + */ + com.google.protobuf.ByteString getOwnerStringBytes(); + } + + /** + * Protobuf type {@code context.SliceOwner} + */ + public static final class SliceOwner extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceOwner) + SliceOwnerOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceOwner.newBuilder() to construct. + private SliceOwner(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceOwner() { + ownerString_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceOwner_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceOwner.class, context.ContextOuterClass.SliceOwner.Builder.class); + } + + public static final int OWNER_UUID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid ownerUuid_; + + /** + * .context.Uuid owner_uuid = 1; + * @return Whether the ownerUuid field is set. + */ + @java.lang.Override + public boolean hasOwnerUuid() { + return ownerUuid_ != null; + } + + /** + * .context.Uuid owner_uuid = 1; + * @return The ownerUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getOwnerUuid() { + return ownerUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; + } + + /** + * .context.Uuid owner_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder() { + return getOwnerUuid(); + } + + public static final int OWNER_STRING_FIELD_NUMBER = 2; + + private volatile java.lang.Object ownerString_; + + /** + * string owner_string = 2; + * @return The ownerString. + */ + @java.lang.Override + public java.lang.String getOwnerString() { + java.lang.Object ref = ownerString_; + 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(); + ownerString_ = s; + return s; + } + } + + /** + * string owner_string = 2; + * @return The bytes for ownerString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOwnerStringBytes() { + java.lang.Object ref = ownerString_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ownerString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (ownerUuid_ != null) { + output.writeMessage(1, getOwnerUuid()); + } + if (!getOwnerStringBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ownerString_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (ownerUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOwnerUuid()); + } + if (!getOwnerStringBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ownerString_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceOwner)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceOwner other = (context.ContextOuterClass.SliceOwner) obj; + if (hasOwnerUuid() != other.hasOwnerUuid()) + return false; + if (hasOwnerUuid()) { + if (!getOwnerUuid().equals(other.getOwnerUuid())) + return false; + } + if (!getOwnerString().equals(other.getOwnerString())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOwnerUuid()) { + hash = (37 * hash) + OWNER_UUID_FIELD_NUMBER; + hash = (53 * hash) + getOwnerUuid().hashCode(); + } + hash = (37 * hash) + OWNER_STRING_FIELD_NUMBER; + hash = (53 * hash) + getOwnerString().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceOwner parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceOwner parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceOwner parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceOwner prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceOwner} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceOwner) + context.ContextOuterClass.SliceOwnerOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceOwner_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceOwner_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceOwner.class, context.ContextOuterClass.SliceOwner.Builder.class); + } + + // 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; + ownerUuidBuilder_ = null; + } + ownerString_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceOwner_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceOwner getDefaultInstanceForType() { + return context.ContextOuterClass.SliceOwner.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceOwner build() { + context.ContextOuterClass.SliceOwner result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceOwner) { + return mergeFrom((context.ContextOuterClass.SliceOwner) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceOwner other) { + if (other == context.ContextOuterClass.SliceOwner.getDefaultInstance()) + return this; + if (other.hasOwnerUuid()) { + mergeOwnerUuid(other.getOwnerUuid()); + } + if (!other.getOwnerString().isEmpty()) { + ownerString_ = other.ownerString_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceOwner) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid ownerUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 ownerUuidBuilder_; + + /** + * .context.Uuid owner_uuid = 1; + * @return Whether the ownerUuid field is set. + */ + public boolean hasOwnerUuid() { + return ownerUuidBuilder_ != null || ownerUuid_ != null; + } + + /** + * .context.Uuid owner_uuid = 1; + * @return The ownerUuid. + */ + public context.ContextOuterClass.Uuid getOwnerUuid() { + if (ownerUuidBuilder_ == null) { + return ownerUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; + } else { + return ownerUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid owner_uuid = 1; + */ + public Builder setOwnerUuid(context.ContextOuterClass.Uuid value) { + if (ownerUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ownerUuid_ = value; + onChanged(); + } else { + ownerUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid owner_uuid = 1; + */ + public Builder setOwnerUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (ownerUuidBuilder_ == null) { + ownerUuid_ = builderForValue.build(); + onChanged(); + } else { + ownerUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid owner_uuid = 1; + */ + public Builder mergeOwnerUuid(context.ContextOuterClass.Uuid value) { + if (ownerUuidBuilder_ == null) { + if (ownerUuid_ != null) { + ownerUuid_ = context.ContextOuterClass.Uuid.newBuilder(ownerUuid_).mergeFrom(value).buildPartial(); + } else { + ownerUuid_ = value; + } + onChanged(); + } else { + ownerUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid owner_uuid = 1; + */ + public Builder clearOwnerUuid() { + if (ownerUuidBuilder_ == null) { + ownerUuid_ = null; + onChanged(); + } else { + ownerUuid_ = null; + ownerUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid owner_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getOwnerUuidBuilder() { + onChanged(); + return getOwnerUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid owner_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder() { + if (ownerUuidBuilder_ != null) { + return ownerUuidBuilder_.getMessageOrBuilder(); + } else { + return ownerUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; + } + } + + /** + * .context.Uuid owner_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getOwnerUuidFieldBuilder() { + if (ownerUuidBuilder_ == null) { + ownerUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOwnerUuid(), getParentForChildren(), isClean()); + ownerUuid_ = null; + } + return ownerUuidBuilder_; + } + + private java.lang.Object ownerString_ = ""; + + /** + * string owner_string = 2; + * @return The ownerString. + */ + public java.lang.String getOwnerString() { + java.lang.Object ref = ownerString_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ownerString_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string owner_string = 2; + * @return The bytes for ownerString. + */ + public com.google.protobuf.ByteString getOwnerStringBytes() { + java.lang.Object ref = ownerString_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ownerString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string owner_string = 2; + * @param value The ownerString to set. + * @return This builder for chaining. + */ + public Builder setOwnerString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ownerString_ = value; + onChanged(); + return this; + } + + /** + * string owner_string = 2; + * @return This builder for chaining. + */ + public Builder clearOwnerString() { + ownerString_ = getDefaultInstance().getOwnerString(); + onChanged(); + return this; + } + + /** + * string owner_string = 2; + * @param value The bytes for ownerString to set. + * @return This builder for chaining. + */ + public Builder setOwnerStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ownerString_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceOwner) + } + + // @@protoc_insertion_point(class_scope:context.SliceOwner) + private static final context.ContextOuterClass.SliceOwner DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceOwner(); + } + + public static context.ContextOuterClass.SliceOwner getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceOwner getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceStatusOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return The enum numeric value on the wire for sliceStatus. + */ + int getSliceStatusValue(); + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return The sliceStatus. + */ + context.ContextOuterClass.SliceStatusEnum getSliceStatus(); + } + + /** + * Protobuf type {@code context.SliceStatus} + */ + public static final class SliceStatus extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceStatus) + SliceStatusOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceStatus.newBuilder() to construct. + private SliceStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceStatus() { + sliceStatus_ = 0; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceStatus_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceStatus.class, context.ContextOuterClass.SliceStatus.Builder.class); + } + + public static final int SLICE_STATUS_FIELD_NUMBER = 1; + + private int sliceStatus_; + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return The enum numeric value on the wire for sliceStatus. + */ + @java.lang.Override + public int getSliceStatusValue() { + return sliceStatus_; + } + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return The sliceStatus. + */ + @java.lang.Override + public context.ContextOuterClass.SliceStatusEnum getSliceStatus() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.valueOf(sliceStatus_); + return result == null ? context.ContextOuterClass.SliceStatusEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sliceStatus_ != context.ContextOuterClass.SliceStatusEnum.SLICESTATUS_UNDEFINED.getNumber()) { + output.writeEnum(1, sliceStatus_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (sliceStatus_ != context.ContextOuterClass.SliceStatusEnum.SLICESTATUS_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, sliceStatus_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceStatus)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceStatus other = (context.ContextOuterClass.SliceStatus) obj; + if (sliceStatus_ != other.sliceStatus_) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SLICE_STATUS_FIELD_NUMBER; + hash = (53 * hash) + sliceStatus_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceStatus parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceStatus parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceStatus parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceStatus) + context.ContextOuterClass.SliceStatusOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceStatus_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceStatus.class, context.ContextOuterClass.SliceStatus.Builder.class); + } + + // 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(); + sliceStatus_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceStatus_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceStatus getDefaultInstanceForType() { + return context.ContextOuterClass.SliceStatus.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceStatus build() { + context.ContextOuterClass.SliceStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.SliceStatus buildPartial() { + context.ContextOuterClass.SliceStatus result = new context.ContextOuterClass.SliceStatus(this); + result.sliceStatus_ = sliceStatus_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceStatus) { + return mergeFrom((context.ContextOuterClass.SliceStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceStatus other) { + if (other == context.ContextOuterClass.SliceStatus.getDefaultInstance()) + return this; + if (other.sliceStatus_ != 0) { + setSliceStatusValue(other.getSliceStatusValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sliceStatus_ = 0; + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return The enum numeric value on the wire for sliceStatus. + */ + @java.lang.Override + public int getSliceStatusValue() { + return sliceStatus_; + } + + /** + * .context.SliceStatusEnum slice_status = 1; + * @param value The enum numeric value on the wire for sliceStatus to set. + * @return This builder for chaining. + */ + public Builder setSliceStatusValue(int value) { + sliceStatus_ = value; + onChanged(); + return this; + } + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return The sliceStatus. + */ + @java.lang.Override + public context.ContextOuterClass.SliceStatusEnum getSliceStatus() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.valueOf(sliceStatus_); + return result == null ? context.ContextOuterClass.SliceStatusEnum.UNRECOGNIZED : result; + } + + /** + * .context.SliceStatusEnum slice_status = 1; + * @param value The sliceStatus to set. + * @return This builder for chaining. + */ + public Builder setSliceStatus(context.ContextOuterClass.SliceStatusEnum value) { + if (value == null) { + throw new NullPointerException(); + } + sliceStatus_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return This builder for chaining. + */ + public Builder clearSliceStatus() { + sliceStatus_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceStatus) + } + + // @@protoc_insertion_point(class_scope:context.SliceStatus) + private static final context.ContextOuterClass.SliceStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceStatus(); + } + + public static context.ContextOuterClass.SliceStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + java.util.List getConfigRulesList(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + context.ContextOuterClass.ConfigRule getConfigRules(int index); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + int getConfigRulesCount(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + java.util.List getConfigRulesOrBuilderList(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.SliceConfig} + */ + public static final class SliceConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceConfig) + SliceConfigOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceConfig.newBuilder() to construct. + private SliceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceConfig() { + configRules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceConfig.class, context.ContextOuterClass.SliceConfig.Builder.class); + } + + public static final int CONFIG_RULES_FIELD_NUMBER = 1; + + private java.util.List configRules_; + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public java.util.List getConfigRulesList() { + return configRules_; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public java.util.List getConfigRulesOrBuilderList() { + return configRules_; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public int getConfigRulesCount() { + return configRules_.size(); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule getConfigRules(int index) { + return configRules_.get(index); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index) { + return configRules_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < configRules_.size(); i++) { + output.writeMessage(1, configRules_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < configRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configRules_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceConfig)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceConfig other = (context.ContextOuterClass.SliceConfig) obj; + if (!getConfigRulesList().equals(other.getConfigRulesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConfigRulesCount() > 0) { + hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; + hash = (53 * hash) + getConfigRulesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceConfig) + context.ContextOuterClass.SliceConfigOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceConfig.class, context.ContextOuterClass.SliceConfig.Builder.class); + } + + // 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(); + if (configRulesBuilder_ == null) { + configRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + configRulesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceConfig_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceConfig getDefaultInstanceForType() { + return context.ContextOuterClass.SliceConfig.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceConfig build() { + context.ContextOuterClass.SliceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.SliceConfig buildPartial() { + context.ContextOuterClass.SliceConfig result = new context.ContextOuterClass.SliceConfig(this); + int from_bitField0_ = bitField0_; + if (configRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + configRules_ = java.util.Collections.unmodifiableList(configRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.configRules_ = configRules_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceConfig) { + return mergeFrom((context.ContextOuterClass.SliceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceConfig other) { + if (other == context.ContextOuterClass.SliceConfig.getDefaultInstance()) + return this; + if (configRulesBuilder_ == null) { + if (!other.configRules_.isEmpty()) { + if (configRules_.isEmpty()) { + configRules_ = other.configRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfigRulesIsMutable(); + configRules_.addAll(other.configRules_); + } + onChanged(); + } + } else { + if (!other.configRules_.isEmpty()) { + if (configRulesBuilder_.isEmpty()) { + configRulesBuilder_.dispose(); + configRulesBuilder_ = null; + configRules_ = other.configRules_; + bitField0_ = (bitField0_ & ~0x00000001); + configRulesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConfigRulesFieldBuilder() : null; + } else { + configRulesBuilder_.addAllMessages(other.configRules_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List configRules_ = java.util.Collections.emptyList(); + + private void ensureConfigRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + configRules_ = new java.util.ArrayList(configRules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 configRulesBuilder_; + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesList() { + if (configRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(configRules_); + } else { + return configRulesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public int getConfigRulesCount() { + if (configRulesBuilder_ == null) { + return configRules_.size(); + } else { + return configRulesBuilder_.getCount(); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule getConfigRules(int index) { + if (configRulesBuilder_ == null) { + return configRules_.get(index); + } else { + return configRulesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder setConfigRules(int index, context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.set(index, value); + onChanged(); + } else { + configRulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder setConfigRules(int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.set(index, builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.add(value); + onChanged(); + } else { + configRulesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(int index, context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.add(index, value); + onChanged(); + } else { + configRulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(index, builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addAllConfigRules(java.lang.Iterable values) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, configRules_); + onChanged(); + } else { + configRulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder clearConfigRules() { + if (configRulesBuilder_ == null) { + configRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + configRulesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder removeConfigRules(int index) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.remove(index); + onChanged(); + } else { + configRulesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder getConfigRulesBuilder(int index) { + return getConfigRulesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index) { + if (configRulesBuilder_ == null) { + return configRules_.get(index); + } else { + return configRulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesOrBuilderList() { + if (configRulesBuilder_ != null) { + return configRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configRules_); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder() { + return getConfigRulesFieldBuilder().addBuilder(context.ContextOuterClass.ConfigRule.getDefaultInstance()); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder(int index) { + return getConfigRulesFieldBuilder().addBuilder(index, context.ContextOuterClass.ConfigRule.getDefaultInstance()); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesBuilderList() { + return getConfigRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getConfigRulesFieldBuilder() { + if (configRulesBuilder_ == null) { + configRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(configRules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + configRules_ = null; + } + return configRulesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceConfig) + } + + // @@protoc_insertion_point(class_scope:context.SliceConfig) + private static final context.ContextOuterClass.SliceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceConfig(); + } + + public static context.ContextOuterClass.SliceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.SliceId slice_ids = 1; + */ + java.util.List getSliceIdsList(); + + /** + * repeated .context.SliceId slice_ids = 1; + */ + context.ContextOuterClass.SliceId getSliceIds(int index); + + /** + * repeated .context.SliceId slice_ids = 1; + */ + int getSliceIdsCount(); + + /** + * repeated .context.SliceId slice_ids = 1; + */ + java.util.List getSliceIdsOrBuilderList(); + + /** + * repeated .context.SliceId slice_ids = 1; + */ + context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.SliceIdList} + */ + public static final class SliceIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceIdList) + SliceIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceIdList.newBuilder() to construct. + private SliceIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceIdList() { + sliceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceIdList.class, context.ContextOuterClass.SliceIdList.Builder.class); + } + + public static final int SLICE_IDS_FIELD_NUMBER = 1; + + private java.util.List sliceIds_; + + /** + * repeated .context.SliceId slice_ids = 1; + */ + @java.lang.Override + public java.util.List getSliceIdsList() { + return sliceIds_; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + @java.lang.Override + public java.util.List getSliceIdsOrBuilderList() { + return sliceIds_; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + @java.lang.Override + public int getSliceIdsCount() { + return sliceIds_.size(); + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.SliceId getSliceIds(int index) { + return sliceIds_.get(index); + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder(int index) { + return sliceIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < sliceIds_.size(); i++) { + output.writeMessage(1, sliceIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < sliceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, sliceIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceIdList other = (context.ContextOuterClass.SliceIdList) obj; + if (!getSliceIdsList().equals(other.getSliceIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSliceIdsCount() > 0) { + hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSliceIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceIdList) + context.ContextOuterClass.SliceIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceIdList.class, context.ContextOuterClass.SliceIdList.Builder.class); + } + + // 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(); + if (sliceIdsBuilder_ == null) { + sliceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + sliceIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceIdList getDefaultInstanceForType() { + return context.ContextOuterClass.SliceIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceIdList build() { + context.ContextOuterClass.SliceIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.SliceIdList buildPartial() { + context.ContextOuterClass.SliceIdList result = new context.ContextOuterClass.SliceIdList(this); + int from_bitField0_ = bitField0_; + if (sliceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sliceIds_ = sliceIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceIdList) { + return mergeFrom((context.ContextOuterClass.SliceIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceIdList other) { + if (other == context.ContextOuterClass.SliceIdList.getDefaultInstance()) + return this; + if (sliceIdsBuilder_ == null) { + if (!other.sliceIds_.isEmpty()) { + if (sliceIds_.isEmpty()) { + sliceIds_ = other.sliceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSliceIdsIsMutable(); + sliceIds_.addAll(other.sliceIds_); + } + onChanged(); + } + } else { + if (!other.sliceIds_.isEmpty()) { + if (sliceIdsBuilder_.isEmpty()) { + sliceIdsBuilder_.dispose(); + sliceIdsBuilder_ = null; + sliceIds_ = other.sliceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + sliceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceIdsFieldBuilder() : null; + } else { + sliceIdsBuilder_.addAllMessages(other.sliceIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List sliceIds_ = java.util.Collections.emptyList(); + + private void ensureSliceIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sliceIds_ = new java.util.ArrayList(sliceIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 sliceIdsBuilder_; + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public java.util.List getSliceIdsList() { + if (sliceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sliceIds_); + } else { + return sliceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public int getSliceIdsCount() { + if (sliceIdsBuilder_ == null) { + return sliceIds_.size(); + } else { + return sliceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public context.ContextOuterClass.SliceId getSliceIds(int index) { + if (sliceIdsBuilder_ == null) { + return sliceIds_.get(index); + } else { + return sliceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder setSliceIds(int index, context.ContextOuterClass.SliceId value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceIdsIsMutable(); + sliceIds_.set(index, value); + onChanged(); + } else { + sliceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder setSliceIds(int index, context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + sliceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder addSliceIds(context.ContextOuterClass.SliceId value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceIdsIsMutable(); + sliceIds_.add(value); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder addSliceIds(int index, context.ContextOuterClass.SliceId value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceIdsIsMutable(); + sliceIds_.add(index, value); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder addSliceIds(context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.add(builderForValue.build()); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder addSliceIds(int index, context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder addAllSliceIds(java.lang.Iterable values) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceIds_); + onChanged(); + } else { + sliceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder clearSliceIds() { + if (sliceIdsBuilder_ == null) { + sliceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sliceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder removeSliceIds(int index) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.remove(index); + onChanged(); + } else { + sliceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public context.ContextOuterClass.SliceId.Builder getSliceIdsBuilder(int index) { + return getSliceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder(int index) { + if (sliceIdsBuilder_ == null) { + return sliceIds_.get(index); + } else { + return sliceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public java.util.List getSliceIdsOrBuilderList() { + if (sliceIdsBuilder_ != null) { + return sliceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sliceIds_); + } + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder() { + return getSliceIdsFieldBuilder().addBuilder(context.ContextOuterClass.SliceId.getDefaultInstance()); + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder(int index) { + return getSliceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.SliceId.getDefaultInstance()); + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public java.util.List getSliceIdsBuilderList() { + return getSliceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSliceIdsFieldBuilder() { + if (sliceIdsBuilder_ == null) { + sliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + sliceIds_ = null; + } + return sliceIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceIdList) + } + + // @@protoc_insertion_point(class_scope:context.SliceIdList) + private static final context.ContextOuterClass.SliceIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceIdList(); + } + + public static context.ContextOuterClass.SliceIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Slice slices = 1; + */ + java.util.List getSlicesList(); + + /** + * repeated .context.Slice slices = 1; + */ + context.ContextOuterClass.Slice getSlices(int index); + + /** + * repeated .context.Slice slices = 1; + */ + int getSlicesCount(); + + /** + * repeated .context.Slice slices = 1; + */ + java.util.List getSlicesOrBuilderList(); + + /** + * repeated .context.Slice slices = 1; + */ + context.ContextOuterClass.SliceOrBuilder getSlicesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.SliceList} + */ + public static final class SliceList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceList) + SliceListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceList.newBuilder() to construct. + private SliceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceList() { + slices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceList.class, context.ContextOuterClass.SliceList.Builder.class); + } + + public static final int SLICES_FIELD_NUMBER = 1; + + private java.util.List slices_; + + /** + * repeated .context.Slice slices = 1; + */ + @java.lang.Override + public java.util.List getSlicesList() { + return slices_; + } + + /** + * repeated .context.Slice slices = 1; + */ + @java.lang.Override + public java.util.List getSlicesOrBuilderList() { + return slices_; + } + + /** + * repeated .context.Slice slices = 1; + */ + @java.lang.Override + public int getSlicesCount() { + return slices_.size(); + } + + /** + * repeated .context.Slice slices = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Slice getSlices(int index) { + return slices_.get(index); + } + + /** + * repeated .context.Slice slices = 1; + */ + @java.lang.Override + public context.ContextOuterClass.SliceOrBuilder getSlicesOrBuilder(int index) { + return slices_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < slices_.size(); i++) { + output.writeMessage(1, slices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < slices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, slices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceList)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceList other = (context.ContextOuterClass.SliceList) obj; + if (!getSlicesList().equals(other.getSlicesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSlicesCount() > 0) { + hash = (37 * hash) + SLICES_FIELD_NUMBER; + hash = (53 * hash) + getSlicesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceList) + context.ContextOuterClass.SliceListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceList.class, context.ContextOuterClass.SliceList.Builder.class); + } + + // 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(); + if (slicesBuilder_ == null) { + slices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + slicesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceList getDefaultInstanceForType() { + return context.ContextOuterClass.SliceList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceList build() { + context.ContextOuterClass.SliceList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.SliceList buildPartial() { + context.ContextOuterClass.SliceList result = new context.ContextOuterClass.SliceList(this); + int from_bitField0_ = bitField0_; + if (slicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + slices_ = java.util.Collections.unmodifiableList(slices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.slices_ = slices_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceList) { + return mergeFrom((context.ContextOuterClass.SliceList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceList other) { + if (other == context.ContextOuterClass.SliceList.getDefaultInstance()) + return this; + if (slicesBuilder_ == null) { + if (!other.slices_.isEmpty()) { + if (slices_.isEmpty()) { + slices_ = other.slices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSlicesIsMutable(); + slices_.addAll(other.slices_); + } + onChanged(); + } + } else { + if (!other.slices_.isEmpty()) { + if (slicesBuilder_.isEmpty()) { + slicesBuilder_.dispose(); + slicesBuilder_ = null; + slices_ = other.slices_; + bitField0_ = (bitField0_ & ~0x00000001); + slicesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSlicesFieldBuilder() : null; + } else { + slicesBuilder_.addAllMessages(other.slices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List slices_ = java.util.Collections.emptyList(); + + private void ensureSlicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + slices_ = new java.util.ArrayList(slices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 slicesBuilder_; + + /** + * repeated .context.Slice slices = 1; + */ + public java.util.List getSlicesList() { + if (slicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(slices_); + } else { + return slicesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Slice slices = 1; + */ + public int getSlicesCount() { + if (slicesBuilder_ == null) { + return slices_.size(); + } else { + return slicesBuilder_.getCount(); + } + } + + /** + * repeated .context.Slice slices = 1; + */ + public context.ContextOuterClass.Slice getSlices(int index) { + if (slicesBuilder_ == null) { + return slices_.get(index); + } else { + return slicesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder setSlices(int index, context.ContextOuterClass.Slice value) { + if (slicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSlicesIsMutable(); + slices_.set(index, value); + onChanged(); + } else { + slicesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder setSlices(int index, context.ContextOuterClass.Slice.Builder builderForValue) { + if (slicesBuilder_ == null) { + ensureSlicesIsMutable(); + slices_.set(index, builderForValue.build()); + onChanged(); + } else { + slicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder addSlices(context.ContextOuterClass.Slice value) { + if (slicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSlicesIsMutable(); + slices_.add(value); + onChanged(); + } else { + slicesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder addSlices(int index, context.ContextOuterClass.Slice value) { + if (slicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSlicesIsMutable(); + slices_.add(index, value); + onChanged(); + } else { + slicesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder addSlices(context.ContextOuterClass.Slice.Builder builderForValue) { + if (slicesBuilder_ == null) { + ensureSlicesIsMutable(); + slices_.add(builderForValue.build()); + onChanged(); + } else { + slicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder addSlices(int index, context.ContextOuterClass.Slice.Builder builderForValue) { + if (slicesBuilder_ == null) { + ensureSlicesIsMutable(); + slices_.add(index, builderForValue.build()); + onChanged(); + } else { + slicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder addAllSlices(java.lang.Iterable values) { + if (slicesBuilder_ == null) { + ensureSlicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, slices_); + onChanged(); + } else { + slicesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder clearSlices() { + if (slicesBuilder_ == null) { + slices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + slicesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder removeSlices(int index) { + if (slicesBuilder_ == null) { + ensureSlicesIsMutable(); + slices_.remove(index); + onChanged(); + } else { + slicesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public context.ContextOuterClass.Slice.Builder getSlicesBuilder(int index) { + return getSlicesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Slice slices = 1; + */ + public context.ContextOuterClass.SliceOrBuilder getSlicesOrBuilder(int index) { + if (slicesBuilder_ == null) { + return slices_.get(index); + } else { + return slicesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Slice slices = 1; + */ + public java.util.List getSlicesOrBuilderList() { + if (slicesBuilder_ != null) { + return slicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(slices_); + } + } + + /** + * repeated .context.Slice slices = 1; + */ + public context.ContextOuterClass.Slice.Builder addSlicesBuilder() { + return getSlicesFieldBuilder().addBuilder(context.ContextOuterClass.Slice.getDefaultInstance()); + } + + /** + * repeated .context.Slice slices = 1; + */ + public context.ContextOuterClass.Slice.Builder addSlicesBuilder(int index) { + return getSlicesFieldBuilder().addBuilder(index, context.ContextOuterClass.Slice.getDefaultInstance()); + } + + /** + * repeated .context.Slice slices = 1; + */ + public java.util.List getSlicesBuilderList() { + return getSlicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSlicesFieldBuilder() { + if (slicesBuilder_ == null) { + slicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(slices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + slices_ = null; + } + return slicesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceList) + } + + // @@protoc_insertion_point(class_scope:context.SliceList) + private static final context.ContextOuterClass.SliceList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceList(); + } + + public static context.ContextOuterClass.SliceList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceFilterOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.SliceIdList slice_ids = 1; + * @return Whether the sliceIds field is set. + */ + boolean hasSliceIds(); + + /** + * .context.SliceIdList slice_ids = 1; + * @return The sliceIds. + */ + context.ContextOuterClass.SliceIdList getSliceIds(); + + /** + * .context.SliceIdList slice_ids = 1; + */ + context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder(); + + /** + * bool include_endpoint_ids = 2; + * @return The includeEndpointIds. + */ + boolean getIncludeEndpointIds(); + + /** + * bool include_constraints = 3; + * @return The includeConstraints. + */ + boolean getIncludeConstraints(); + + /** + * bool include_service_ids = 4; + * @return The includeServiceIds. + */ + boolean getIncludeServiceIds(); + + /** + * bool include_subslice_ids = 5; + * @return The includeSubsliceIds. + */ + boolean getIncludeSubsliceIds(); + + /** + * bool include_config_rules = 6; + * @return The includeConfigRules. + */ + boolean getIncludeConfigRules(); + } + + /** + * Protobuf type {@code context.SliceFilter} + */ + public static final class SliceFilter extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceFilter) + SliceFilterOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceFilter.newBuilder() to construct. + private SliceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceFilter() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceFilter_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceFilter.class, context.ContextOuterClass.SliceFilter.Builder.class); + } + + public static final int SLICE_IDS_FIELD_NUMBER = 1; + + private context.ContextOuterClass.SliceIdList sliceIds_; + + /** + * .context.SliceIdList slice_ids = 1; + * @return Whether the sliceIds field is set. + */ + @java.lang.Override + public boolean hasSliceIds() { + return sliceIds_ != null; + } + + /** + * .context.SliceIdList slice_ids = 1; + * @return The sliceIds. + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdList getSliceIds() { + return sliceIds_ == null ? context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder() { + return getSliceIds(); + } + + public static final int INCLUDE_ENDPOINT_IDS_FIELD_NUMBER = 2; + + private boolean includeEndpointIds_; + + /** + * bool include_endpoint_ids = 2; + * @return The includeEndpointIds. + */ + @java.lang.Override + public boolean getIncludeEndpointIds() { + return includeEndpointIds_; + } + + public static final int INCLUDE_CONSTRAINTS_FIELD_NUMBER = 3; + + private boolean includeConstraints_; + + /** + * bool include_constraints = 3; + * @return The includeConstraints. + */ + @java.lang.Override + public boolean getIncludeConstraints() { + return includeConstraints_; + } + + public static final int INCLUDE_SERVICE_IDS_FIELD_NUMBER = 4; + + private boolean includeServiceIds_; + + /** + * bool include_service_ids = 4; + * @return The includeServiceIds. + */ + @java.lang.Override + public boolean getIncludeServiceIds() { + return includeServiceIds_; + } + + public static final int INCLUDE_SUBSLICE_IDS_FIELD_NUMBER = 5; + + private boolean includeSubsliceIds_; + + /** + * bool include_subslice_ids = 5; + * @return The includeSubsliceIds. + */ + @java.lang.Override + public boolean getIncludeSubsliceIds() { + return includeSubsliceIds_; + } + + public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 6; + + private boolean includeConfigRules_; + + /** + * bool include_config_rules = 6; + * @return The includeConfigRules. + */ + @java.lang.Override + public boolean getIncludeConfigRules() { + return includeConfigRules_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sliceIds_ != null) { + output.writeMessage(1, getSliceIds()); + } + if (includeEndpointIds_ != false) { + output.writeBool(2, includeEndpointIds_); + } + if (includeConstraints_ != false) { + output.writeBool(3, includeConstraints_); + } + if (includeServiceIds_ != false) { + output.writeBool(4, includeServiceIds_); + } + if (includeSubsliceIds_ != false) { + output.writeBool(5, includeSubsliceIds_); + } + if (includeConfigRules_ != false) { + output.writeBool(6, includeConfigRules_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (sliceIds_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSliceIds()); + } + if (includeEndpointIds_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeEndpointIds_); + } + if (includeConstraints_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, includeConstraints_); + } + if (includeServiceIds_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeServiceIds_); + } + if (includeSubsliceIds_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, includeSubsliceIds_); + } + if (includeConfigRules_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, includeConfigRules_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceFilter)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceFilter other = (context.ContextOuterClass.SliceFilter) obj; + if (hasSliceIds() != other.hasSliceIds()) + return false; + if (hasSliceIds()) { + if (!getSliceIds().equals(other.getSliceIds())) + return false; + } + if (getIncludeEndpointIds() != other.getIncludeEndpointIds()) + return false; + if (getIncludeConstraints() != other.getIncludeConstraints()) + return false; + if (getIncludeServiceIds() != other.getIncludeServiceIds()) + return false; + if (getIncludeSubsliceIds() != other.getIncludeSubsliceIds()) + return false; + if (getIncludeConfigRules() != other.getIncludeConfigRules()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSliceIds()) { + hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSliceIds().hashCode(); + } + hash = (37 * hash) + INCLUDE_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeEndpointIds()); + hash = (37 * hash) + INCLUDE_CONSTRAINTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeConstraints()); + hash = (37 * hash) + INCLUDE_SERVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeServiceIds()); + hash = (37 * hash) + INCLUDE_SUBSLICE_IDS_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceFilter parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceFilter parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceFilter parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceFilter) + context.ContextOuterClass.SliceFilterOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceFilter_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceFilter.class, context.ContextOuterClass.SliceFilter.Builder.class); + } + + // 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; + sliceIdsBuilder_ = null; + } + includeEndpointIds_ = false; + includeConstraints_ = false; + includeServiceIds_ = false; + includeSubsliceIds_ = false; + includeConfigRules_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceFilter_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceFilter getDefaultInstanceForType() { + return context.ContextOuterClass.SliceFilter.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceFilter build() { + context.ContextOuterClass.SliceFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceFilter) { + return mergeFrom((context.ContextOuterClass.SliceFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceFilter other) { + if (other == context.ContextOuterClass.SliceFilter.getDefaultInstance()) + return this; + if (other.hasSliceIds()) { + mergeSliceIds(other.getSliceIds()); + } + if (other.getIncludeEndpointIds() != false) { + setIncludeEndpointIds(other.getIncludeEndpointIds()); + } + if (other.getIncludeConstraints() != false) { + setIncludeConstraints(other.getIncludeConstraints()); + } + if (other.getIncludeServiceIds() != false) { + setIncludeServiceIds(other.getIncludeServiceIds()); + } + if (other.getIncludeSubsliceIds() != false) { + setIncludeSubsliceIds(other.getIncludeSubsliceIds()); + } + if (other.getIncludeConfigRules() != false) { + setIncludeConfigRules(other.getIncludeConfigRules()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.SliceIdList sliceIds_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceIdsBuilder_; + + /** + * .context.SliceIdList slice_ids = 1; + * @return Whether the sliceIds field is set. + */ + public boolean hasSliceIds() { + return sliceIdsBuilder_ != null || sliceIds_ != null; + } + + /** + * .context.SliceIdList slice_ids = 1; + * @return The sliceIds. + */ + public context.ContextOuterClass.SliceIdList getSliceIds() { + if (sliceIdsBuilder_ == null) { + return sliceIds_ == null ? context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; + } else { + return sliceIdsBuilder_.getMessage(); + } + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + public Builder setSliceIds(context.ContextOuterClass.SliceIdList value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceIds_ = value; + onChanged(); + } else { + sliceIdsBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + public Builder setSliceIds(context.ContextOuterClass.SliceIdList.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + sliceIds_ = builderForValue.build(); + onChanged(); + } else { + sliceIdsBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + public Builder mergeSliceIds(context.ContextOuterClass.SliceIdList value) { + if (sliceIdsBuilder_ == null) { + if (sliceIds_ != null) { + sliceIds_ = context.ContextOuterClass.SliceIdList.newBuilder(sliceIds_).mergeFrom(value).buildPartial(); + } else { + sliceIds_ = value; + } + onChanged(); + } else { + sliceIdsBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + public Builder clearSliceIds() { + if (sliceIdsBuilder_ == null) { + sliceIds_ = null; + onChanged(); + } else { + sliceIds_ = null; + sliceIdsBuilder_ = null; + } + return this; + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + public context.ContextOuterClass.SliceIdList.Builder getSliceIdsBuilder() { + onChanged(); + return getSliceIdsFieldBuilder().getBuilder(); + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + public context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder() { + if (sliceIdsBuilder_ != null) { + return sliceIdsBuilder_.getMessageOrBuilder(); + } else { + return sliceIds_ == null ? context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; + } + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceIdsFieldBuilder() { + if (sliceIdsBuilder_ == null) { + sliceIdsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceIds(), getParentForChildren(), isClean()); + sliceIds_ = null; + } + return sliceIdsBuilder_; + } + + private boolean includeEndpointIds_; + + /** + * bool include_endpoint_ids = 2; + * @return The includeEndpointIds. + */ + @java.lang.Override + public boolean getIncludeEndpointIds() { + return includeEndpointIds_; + } + + /** + * bool include_endpoint_ids = 2; + * @param value The includeEndpointIds to set. + * @return This builder for chaining. + */ + public Builder setIncludeEndpointIds(boolean value) { + includeEndpointIds_ = value; + onChanged(); + return this; + } + + /** + * bool include_endpoint_ids = 2; + * @return This builder for chaining. + */ + public Builder clearIncludeEndpointIds() { + includeEndpointIds_ = false; + onChanged(); + return this; + } + + private boolean includeConstraints_; + + /** + * bool include_constraints = 3; + * @return The includeConstraints. + */ + @java.lang.Override + public boolean getIncludeConstraints() { + return includeConstraints_; + } + + /** + * bool include_constraints = 3; + * @param value The includeConstraints to set. + * @return This builder for chaining. + */ + public Builder setIncludeConstraints(boolean value) { + includeConstraints_ = value; + onChanged(); + return this; + } + + /** + * bool include_constraints = 3; + * @return This builder for chaining. + */ + public Builder clearIncludeConstraints() { + includeConstraints_ = false; + onChanged(); + return this; + } + + private boolean includeServiceIds_; + + /** + * bool include_service_ids = 4; + * @return The includeServiceIds. + */ + @java.lang.Override + public boolean getIncludeServiceIds() { + return includeServiceIds_; + } + + /** + * bool include_service_ids = 4; + * @param value The includeServiceIds to set. + * @return This builder for chaining. + */ + public Builder setIncludeServiceIds(boolean value) { + includeServiceIds_ = value; + onChanged(); + return this; + } + + /** + * bool include_service_ids = 4; + * @return This builder for chaining. + */ + public Builder clearIncludeServiceIds() { + includeServiceIds_ = false; + onChanged(); + return this; + } + + private boolean includeSubsliceIds_; + + /** + * bool include_subslice_ids = 5; + * @return The includeSubsliceIds. + */ + @java.lang.Override + public boolean getIncludeSubsliceIds() { + return includeSubsliceIds_; + } + + /** + * bool include_subslice_ids = 5; + * @param value The includeSubsliceIds to set. + * @return This builder for chaining. + */ + public Builder setIncludeSubsliceIds(boolean value) { + includeSubsliceIds_ = value; + onChanged(); + return this; + } + + /** + * bool include_subslice_ids = 5; + * @return This builder for chaining. + */ + public Builder clearIncludeSubsliceIds() { + includeSubsliceIds_ = false; + onChanged(); + return this; + } + + private boolean includeConfigRules_; + + /** + * bool include_config_rules = 6; + * @return The includeConfigRules. + */ + @java.lang.Override + public boolean getIncludeConfigRules() { + return includeConfigRules_; + } + + /** + * bool include_config_rules = 6; + * @param value The includeConfigRules to set. + * @return This builder for chaining. + */ + public Builder setIncludeConfigRules(boolean value) { + includeConfigRules_ = value; + onChanged(); + return this; + } + + /** + * bool include_config_rules = 6; + * @return This builder for chaining. + */ + public Builder clearIncludeConfigRules() { + includeConfigRules_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceFilter) + } + + // @@protoc_insertion_point(class_scope:context.SliceFilter) + private static final context.ContextOuterClass.SliceFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceFilter(); + } + + public static context.ContextOuterClass.SliceFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.SliceId slice_id = 2; + * @return Whether the sliceId field is set. + */ + boolean hasSliceId(); + + /** + * .context.SliceId slice_id = 2; + * @return The sliceId. + */ + context.ContextOuterClass.SliceId getSliceId(); + + /** + * .context.SliceId slice_id = 2; + */ + context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); + } + + /** + * Protobuf type {@code context.SliceEvent} + */ + public static final class SliceEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceEvent) + SliceEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceEvent.newBuilder() to construct. + private SliceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceEvent.class, context.ContextOuterClass.SliceEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int SLICE_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.SliceId sliceId_; + + /** + * .context.SliceId slice_id = 2; + * @return Whether the sliceId field is set. + */ + @java.lang.Override + public boolean hasSliceId() { + return sliceId_ != null; + } + + /** + * .context.SliceId slice_id = 2; + * @return The sliceId. + */ + @java.lang.Override + public context.ContextOuterClass.SliceId getSliceId() { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } + + /** + * .context.SliceId slice_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { + return getSliceId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (sliceId_ != null) { + output.writeMessage(2, getSliceId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (sliceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSliceId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceEvent other = (context.ContextOuterClass.SliceEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasSliceId() != other.hasSliceId()) + return false; + if (hasSliceId()) { + if (!getSliceId().equals(other.getSliceId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasSliceId()) { + hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSliceId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceEvent) + context.ContextOuterClass.SliceEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceEvent.class, context.ContextOuterClass.SliceEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (sliceIdBuilder_ == null) { + sliceId_ = null; + } else { + sliceId_ = null; + sliceIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceEvent getDefaultInstanceForType() { + return context.ContextOuterClass.SliceEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceEvent build() { + context.ContextOuterClass.SliceEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceEvent) { + return mergeFrom((context.ContextOuterClass.SliceEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceEvent other) { + if (other == context.ContextOuterClass.SliceEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasSliceId()) { + mergeSliceId(other.getSliceId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.SliceId sliceId_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceIdBuilder_; + + /** + * .context.SliceId slice_id = 2; + * @return Whether the sliceId field is set. + */ + public boolean hasSliceId() { + return sliceIdBuilder_ != null || sliceId_ != null; + } + + /** + * .context.SliceId slice_id = 2; + * @return The sliceId. + */ + public context.ContextOuterClass.SliceId getSliceId() { + if (sliceIdBuilder_ == null) { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } else { + return sliceIdBuilder_.getMessage(); + } + } + + /** + * .context.SliceId slice_id = 2; + */ + public Builder setSliceId(context.ContextOuterClass.SliceId value) { + if (sliceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceId_ = value; + onChanged(); + } else { + sliceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceId slice_id = 2; + */ + public Builder setSliceId(context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdBuilder_ == null) { + sliceId_ = builderForValue.build(); + onChanged(); + } else { + sliceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceId slice_id = 2; + */ + public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { + if (sliceIdBuilder_ == null) { + if (sliceId_ != null) { + sliceId_ = context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); + } else { + sliceId_ = value; + } + onChanged(); + } else { + sliceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceId slice_id = 2; + */ + public Builder clearSliceId() { + if (sliceIdBuilder_ == null) { + sliceId_ = null; + onChanged(); + } else { + sliceId_ = null; + sliceIdBuilder_ = null; + } + return this; + } + + /** + * .context.SliceId slice_id = 2; + */ + public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { + onChanged(); + return getSliceIdFieldBuilder().getBuilder(); + } + + /** + * .context.SliceId slice_id = 2; + */ + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { + if (sliceIdBuilder_ != null) { + return sliceIdBuilder_.getMessageOrBuilder(); + } else { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } + } + + /** + * .context.SliceId slice_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceIdFieldBuilder() { + if (sliceIdBuilder_ == null) { + sliceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceId(), getParentForChildren(), isClean()); + sliceId_ = null; + } + return sliceIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceEvent) + } + + // @@protoc_insertion_point(class_scope:context.SliceEvent) + private static final context.ContextOuterClass.SliceEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceEvent(); + } + + public static context.ContextOuterClass.SliceEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid connection_uuid = 1; + * @return Whether the connectionUuid field is set. + */ + boolean hasConnectionUuid(); + + /** + * .context.Uuid connection_uuid = 1; + * @return The connectionUuid. + */ + context.ContextOuterClass.Uuid getConnectionUuid(); + + /** + * .context.Uuid connection_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder(); + } + + /** + *
+     * ----- Connection ----------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.ConnectionId} + */ + public static final class ConnectionId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionId) + ConnectionIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionId.newBuilder() to construct. + private ConnectionId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionId.class, context.ContextOuterClass.ConnectionId.Builder.class); + } + + public static final int CONNECTION_UUID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid connectionUuid_; + + /** + * .context.Uuid connection_uuid = 1; + * @return Whether the connectionUuid field is set. + */ + @java.lang.Override + public boolean hasConnectionUuid() { + return connectionUuid_ != null; + } + + /** + * .context.Uuid connection_uuid = 1; + * @return The connectionUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getConnectionUuid() { + return connectionUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; + } + + /** + * .context.Uuid connection_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder() { + return getConnectionUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (connectionUuid_ != null) { + output.writeMessage(1, getConnectionUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (connectionUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getConnectionUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionId)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionId other = (context.ContextOuterClass.ConnectionId) obj; + if (hasConnectionUuid() != other.hasConnectionUuid()) + return false; + if (hasConnectionUuid()) { + if (!getConnectionUuid().equals(other.getConnectionUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasConnectionUuid()) { + hash = (37 * hash) + CONNECTION_UUID_FIELD_NUMBER; + hash = (53 * hash) + getConnectionUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Connection ----------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.ConnectionId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionId) + context.ContextOuterClass.ConnectionIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionId.class, context.ContextOuterClass.ConnectionId.Builder.class); + } + + // 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; + connectionUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionId getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionId build() { + context.ContextOuterClass.ConnectionId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionId) { + return mergeFrom((context.ContextOuterClass.ConnectionId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionId other) { + if (other == context.ContextOuterClass.ConnectionId.getDefaultInstance()) + return this; + if (other.hasConnectionUuid()) { + mergeConnectionUuid(other.getConnectionUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid connectionUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 connectionUuidBuilder_; + + /** + * .context.Uuid connection_uuid = 1; + * @return Whether the connectionUuid field is set. + */ + public boolean hasConnectionUuid() { + return connectionUuidBuilder_ != null || connectionUuid_ != null; + } + + /** + * .context.Uuid connection_uuid = 1; + * @return The connectionUuid. + */ + public context.ContextOuterClass.Uuid getConnectionUuid() { + if (connectionUuidBuilder_ == null) { + return connectionUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; + } else { + return connectionUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid connection_uuid = 1; + */ + public Builder setConnectionUuid(context.ContextOuterClass.Uuid value) { + if (connectionUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionUuid_ = value; + onChanged(); + } else { + connectionUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid connection_uuid = 1; + */ + public Builder setConnectionUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (connectionUuidBuilder_ == null) { + connectionUuid_ = builderForValue.build(); + onChanged(); + } else { + connectionUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid connection_uuid = 1; + */ + public Builder mergeConnectionUuid(context.ContextOuterClass.Uuid value) { + if (connectionUuidBuilder_ == null) { + if (connectionUuid_ != null) { + connectionUuid_ = context.ContextOuterClass.Uuid.newBuilder(connectionUuid_).mergeFrom(value).buildPartial(); + } else { + connectionUuid_ = value; + } + onChanged(); + } else { + connectionUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid connection_uuid = 1; + */ + public Builder clearConnectionUuid() { + if (connectionUuidBuilder_ == null) { + connectionUuid_ = null; + onChanged(); + } else { + connectionUuid_ = null; + connectionUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid connection_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getConnectionUuidBuilder() { + onChanged(); + return getConnectionUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid connection_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder() { + if (connectionUuidBuilder_ != null) { + return connectionUuidBuilder_.getMessageOrBuilder(); + } else { + return connectionUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; + } + } + + /** + * .context.Uuid connection_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getConnectionUuidFieldBuilder() { + if (connectionUuidBuilder_ == null) { + connectionUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getConnectionUuid(), getParentForChildren(), isClean()); + connectionUuid_ = null; + } + return connectionUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionId) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionId) + private static final context.ContextOuterClass.ConnectionId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionId(); + } + + public static context.ContextOuterClass.ConnectionId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionSettings_L0OrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L0) + com.google.protobuf.MessageOrBuilder { + + /** + * string lsp_symbolic_name = 1; + * @return The lspSymbolicName. + */ + java.lang.String getLspSymbolicName(); + + /** + * string lsp_symbolic_name = 1; + * @return The bytes for lspSymbolicName. + */ + com.google.protobuf.ByteString getLspSymbolicNameBytes(); + } + + /** + * Protobuf type {@code context.ConnectionSettings_L0} + */ + public static final class ConnectionSettings_L0 extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L0) + ConnectionSettings_L0OrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionSettings_L0.newBuilder() to construct. + private ConnectionSettings_L0(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionSettings_L0() { + lspSymbolicName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L0.class, context.ContextOuterClass.ConnectionSettings_L0.Builder.class); + } + + public static final int LSP_SYMBOLIC_NAME_FIELD_NUMBER = 1; + + private volatile java.lang.Object lspSymbolicName_; + + /** + * string lsp_symbolic_name = 1; + * @return The lspSymbolicName. + */ + @java.lang.Override + public java.lang.String getLspSymbolicName() { + java.lang.Object ref = lspSymbolicName_; + 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(); + lspSymbolicName_ = s; + return s; + } + } + + /** + * string lsp_symbolic_name = 1; + * @return The bytes for lspSymbolicName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLspSymbolicNameBytes() { + java.lang.Object ref = lspSymbolicName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lspSymbolicName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getLspSymbolicNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, lspSymbolicName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getLspSymbolicNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, lspSymbolicName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L0)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionSettings_L0 other = (context.ContextOuterClass.ConnectionSettings_L0) obj; + if (!getLspSymbolicName().equals(other.getLspSymbolicName())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LSP_SYMBOLIC_NAME_FIELD_NUMBER; + hash = (53 * hash) + getLspSymbolicName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L0 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionSettings_L0} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L0) + context.ContextOuterClass.ConnectionSettings_L0OrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L0.class, context.ContextOuterClass.ConnectionSettings_L0.Builder.class); + } + + // 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(); + lspSymbolicName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L0 getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L0 build() { + context.ContextOuterClass.ConnectionSettings_L0 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L0 buildPartial() { + context.ContextOuterClass.ConnectionSettings_L0 result = new context.ContextOuterClass.ConnectionSettings_L0(this); + result.lspSymbolicName_ = lspSymbolicName_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionSettings_L0) { + return mergeFrom((context.ContextOuterClass.ConnectionSettings_L0) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L0 other) { + if (other == context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance()) + return this; + if (!other.getLspSymbolicName().isEmpty()) { + lspSymbolicName_ = other.lspSymbolicName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionSettings_L0) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object lspSymbolicName_ = ""; + + /** + * string lsp_symbolic_name = 1; + * @return The lspSymbolicName. + */ + public java.lang.String getLspSymbolicName() { + java.lang.Object ref = lspSymbolicName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lspSymbolicName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string lsp_symbolic_name = 1; + * @return The bytes for lspSymbolicName. + */ + public com.google.protobuf.ByteString getLspSymbolicNameBytes() { + java.lang.Object ref = lspSymbolicName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lspSymbolicName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string lsp_symbolic_name = 1; + * @param value The lspSymbolicName to set. + * @return This builder for chaining. + */ + public Builder setLspSymbolicName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + lspSymbolicName_ = value; + onChanged(); + return this; + } + + /** + * string lsp_symbolic_name = 1; + * @return This builder for chaining. + */ + public Builder clearLspSymbolicName() { + lspSymbolicName_ = getDefaultInstance().getLspSymbolicName(); + onChanged(); + return this; + } + + /** + * string lsp_symbolic_name = 1; + * @param value The bytes for lspSymbolicName to set. + * @return This builder for chaining. + */ + public Builder setLspSymbolicNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + lspSymbolicName_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L0) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L0) + private static final context.ContextOuterClass.ConnectionSettings_L0 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L0(); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L0 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionSettings_L2OrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L2) + com.google.protobuf.MessageOrBuilder { + + /** + * string src_mac_address = 1; + * @return The srcMacAddress. + */ + java.lang.String getSrcMacAddress(); + + /** + * string src_mac_address = 1; + * @return The bytes for srcMacAddress. + */ + com.google.protobuf.ByteString getSrcMacAddressBytes(); + + /** + * string dst_mac_address = 2; + * @return The dstMacAddress. + */ + java.lang.String getDstMacAddress(); + + /** + * string dst_mac_address = 2; + * @return The bytes for dstMacAddress. + */ + com.google.protobuf.ByteString getDstMacAddressBytes(); + + /** + * uint32 ether_type = 3; + * @return The etherType. + */ + int getEtherType(); + + /** + * uint32 vlan_id = 4; + * @return The vlanId. + */ + int getVlanId(); + + /** + * uint32 mpls_label = 5; + * @return The mplsLabel. + */ + int getMplsLabel(); + + /** + * uint32 mpls_traffic_class = 6; + * @return The mplsTrafficClass. + */ + int getMplsTrafficClass(); + } + + /** + * Protobuf type {@code context.ConnectionSettings_L2} + */ + public static final class ConnectionSettings_L2 extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L2) + ConnectionSettings_L2OrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionSettings_L2.newBuilder() to construct. + private ConnectionSettings_L2(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionSettings_L2() { + srcMacAddress_ = ""; + dstMacAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L2.class, context.ContextOuterClass.ConnectionSettings_L2.Builder.class); + } + + public static final int SRC_MAC_ADDRESS_FIELD_NUMBER = 1; + + private volatile java.lang.Object srcMacAddress_; + + /** + * string src_mac_address = 1; + * @return The srcMacAddress. + */ + @java.lang.Override + public java.lang.String getSrcMacAddress() { + java.lang.Object ref = srcMacAddress_; + 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(); + srcMacAddress_ = s; + return s; + } + } + + /** + * string src_mac_address = 1; + * @return The bytes for srcMacAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSrcMacAddressBytes() { + java.lang.Object ref = srcMacAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcMacAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DST_MAC_ADDRESS_FIELD_NUMBER = 2; + + private volatile java.lang.Object dstMacAddress_; + + /** + * string dst_mac_address = 2; + * @return The dstMacAddress. + */ + @java.lang.Override + public java.lang.String getDstMacAddress() { + java.lang.Object ref = dstMacAddress_; + 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(); + dstMacAddress_ = s; + return s; + } + } + + /** + * string dst_mac_address = 2; + * @return The bytes for dstMacAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDstMacAddressBytes() { + java.lang.Object ref = dstMacAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstMacAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETHER_TYPE_FIELD_NUMBER = 3; + + private int etherType_; + + /** + * uint32 ether_type = 3; + * @return The etherType. + */ + @java.lang.Override + public int getEtherType() { + return etherType_; + } + + public static final int VLAN_ID_FIELD_NUMBER = 4; + + private int vlanId_; + + /** + * uint32 vlan_id = 4; + * @return The vlanId. + */ + @java.lang.Override + public int getVlanId() { + return vlanId_; + } + + public static final int MPLS_LABEL_FIELD_NUMBER = 5; + + private int mplsLabel_; + + /** + * uint32 mpls_label = 5; + * @return The mplsLabel. + */ + @java.lang.Override + public int getMplsLabel() { + return mplsLabel_; + } + + public static final int MPLS_TRAFFIC_CLASS_FIELD_NUMBER = 6; + + private int mplsTrafficClass_; + + /** + * uint32 mpls_traffic_class = 6; + * @return The mplsTrafficClass. + */ + @java.lang.Override + public int getMplsTrafficClass() { + return mplsTrafficClass_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getSrcMacAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcMacAddress_); + } + if (!getDstMacAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstMacAddress_); + } + if (etherType_ != 0) { + output.writeUInt32(3, etherType_); + } + if (vlanId_ != 0) { + output.writeUInt32(4, vlanId_); + } + if (mplsLabel_ != 0) { + output.writeUInt32(5, mplsLabel_); + } + if (mplsTrafficClass_ != 0) { + output.writeUInt32(6, mplsTrafficClass_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getSrcMacAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcMacAddress_); + } + if (!getDstMacAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstMacAddress_); + } + if (etherType_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, etherType_); + } + if (vlanId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(4, vlanId_); + } + if (mplsLabel_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(5, mplsLabel_); + } + if (mplsTrafficClass_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(6, mplsTrafficClass_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L2)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionSettings_L2 other = (context.ContextOuterClass.ConnectionSettings_L2) obj; + if (!getSrcMacAddress().equals(other.getSrcMacAddress())) + return false; + if (!getDstMacAddress().equals(other.getDstMacAddress())) + return false; + if (getEtherType() != other.getEtherType()) + return false; + if (getVlanId() != other.getVlanId()) + return false; + if (getMplsLabel() != other.getMplsLabel()) + return false; + if (getMplsTrafficClass() != other.getMplsTrafficClass()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SRC_MAC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getSrcMacAddress().hashCode(); + hash = (37 * hash) + DST_MAC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getDstMacAddress().hashCode(); + hash = (37 * hash) + ETHER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getEtherType(); + hash = (37 * hash) + VLAN_ID_FIELD_NUMBER; + hash = (53 * hash) + getVlanId(); + hash = (37 * hash) + MPLS_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getMplsLabel(); + hash = (37 * hash) + MPLS_TRAFFIC_CLASS_FIELD_NUMBER; + hash = (53 * hash) + getMplsTrafficClass(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionSettings_L2} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L2) + context.ContextOuterClass.ConnectionSettings_L2OrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L2.class, context.ContextOuterClass.ConnectionSettings_L2.Builder.class); + } + + // 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(); + srcMacAddress_ = ""; + dstMacAddress_ = ""; + etherType_ = 0; + vlanId_ = 0; + mplsLabel_ = 0; + mplsTrafficClass_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L2 getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L2 build() { + context.ContextOuterClass.ConnectionSettings_L2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionSettings_L2) { + return mergeFrom((context.ContextOuterClass.ConnectionSettings_L2) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L2 other) { + if (other == context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance()) + return this; + if (!other.getSrcMacAddress().isEmpty()) { + srcMacAddress_ = other.srcMacAddress_; + onChanged(); + } + if (!other.getDstMacAddress().isEmpty()) { + dstMacAddress_ = other.dstMacAddress_; + onChanged(); + } + if (other.getEtherType() != 0) { + setEtherType(other.getEtherType()); + } + if (other.getVlanId() != 0) { + setVlanId(other.getVlanId()); + } + if (other.getMplsLabel() != 0) { + setMplsLabel(other.getMplsLabel()); + } + if (other.getMplsTrafficClass() != 0) { + setMplsTrafficClass(other.getMplsTrafficClass()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionSettings_L2) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object srcMacAddress_ = ""; + + /** + * string src_mac_address = 1; + * @return The srcMacAddress. + */ + public java.lang.String getSrcMacAddress() { + java.lang.Object ref = srcMacAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcMacAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string src_mac_address = 1; + * @return The bytes for srcMacAddress. + */ + public com.google.protobuf.ByteString getSrcMacAddressBytes() { + java.lang.Object ref = srcMacAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcMacAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string src_mac_address = 1; + * @param value The srcMacAddress to set. + * @return This builder for chaining. + */ + public Builder setSrcMacAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + srcMacAddress_ = value; + onChanged(); + return this; + } + + /** + * string src_mac_address = 1; + * @return This builder for chaining. + */ + public Builder clearSrcMacAddress() { + srcMacAddress_ = getDefaultInstance().getSrcMacAddress(); + onChanged(); + return this; + } + + /** + * string src_mac_address = 1; + * @param value The bytes for srcMacAddress to set. + * @return This builder for chaining. + */ + public Builder setSrcMacAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + srcMacAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object dstMacAddress_ = ""; + + /** + * string dst_mac_address = 2; + * @return The dstMacAddress. + */ + public java.lang.String getDstMacAddress() { + java.lang.Object ref = dstMacAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dstMacAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string dst_mac_address = 2; + * @return The bytes for dstMacAddress. + */ + public com.google.protobuf.ByteString getDstMacAddressBytes() { + java.lang.Object ref = dstMacAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstMacAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string dst_mac_address = 2; + * @param value The dstMacAddress to set. + * @return This builder for chaining. + */ + public Builder setDstMacAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dstMacAddress_ = value; + onChanged(); + return this; + } + + /** + * string dst_mac_address = 2; + * @return This builder for chaining. + */ + public Builder clearDstMacAddress() { + dstMacAddress_ = getDefaultInstance().getDstMacAddress(); + onChanged(); + return this; + } + + /** + * string dst_mac_address = 2; + * @param value The bytes for dstMacAddress to set. + * @return This builder for chaining. + */ + public Builder setDstMacAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dstMacAddress_ = value; + onChanged(); + return this; + } + + private int etherType_; + + /** + * uint32 ether_type = 3; + * @return The etherType. + */ + @java.lang.Override + public int getEtherType() { + return etherType_; + } + + /** + * uint32 ether_type = 3; + * @param value The etherType to set. + * @return This builder for chaining. + */ + public Builder setEtherType(int value) { + etherType_ = value; + onChanged(); + return this; + } + + /** + * uint32 ether_type = 3; + * @return This builder for chaining. + */ + public Builder clearEtherType() { + etherType_ = 0; + onChanged(); + return this; + } + + private int vlanId_; + + /** + * uint32 vlan_id = 4; + * @return The vlanId. + */ + @java.lang.Override + public int getVlanId() { + return vlanId_; + } + + /** + * uint32 vlan_id = 4; + * @param value The vlanId to set. + * @return This builder for chaining. + */ + public Builder setVlanId(int value) { + vlanId_ = value; + onChanged(); + return this; + } + + /** + * uint32 vlan_id = 4; + * @return This builder for chaining. + */ + public Builder clearVlanId() { + vlanId_ = 0; + onChanged(); + return this; + } + + private int mplsLabel_; + + /** + * uint32 mpls_label = 5; + * @return The mplsLabel. + */ + @java.lang.Override + public int getMplsLabel() { + return mplsLabel_; + } + + /** + * uint32 mpls_label = 5; + * @param value The mplsLabel to set. + * @return This builder for chaining. + */ + public Builder setMplsLabel(int value) { + mplsLabel_ = value; + onChanged(); + return this; + } + + /** + * uint32 mpls_label = 5; + * @return This builder for chaining. + */ + public Builder clearMplsLabel() { + mplsLabel_ = 0; + onChanged(); + return this; + } + + private int mplsTrafficClass_; + + /** + * uint32 mpls_traffic_class = 6; + * @return The mplsTrafficClass. + */ + @java.lang.Override + public int getMplsTrafficClass() { + return mplsTrafficClass_; + } + + /** + * uint32 mpls_traffic_class = 6; + * @param value The mplsTrafficClass to set. + * @return This builder for chaining. + */ + public Builder setMplsTrafficClass(int value) { + mplsTrafficClass_ = value; + onChanged(); + return this; + } + + /** + * uint32 mpls_traffic_class = 6; + * @return This builder for chaining. + */ + public Builder clearMplsTrafficClass() { + mplsTrafficClass_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L2) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L2) + private static final context.ContextOuterClass.ConnectionSettings_L2 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L2(); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionSettings_L3OrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L3) + com.google.protobuf.MessageOrBuilder { + + /** + * string src_ip_address = 1; + * @return The srcIpAddress. + */ + java.lang.String getSrcIpAddress(); + + /** + * string src_ip_address = 1; + * @return The bytes for srcIpAddress. + */ + com.google.protobuf.ByteString getSrcIpAddressBytes(); + + /** + * string dst_ip_address = 2; + * @return The dstIpAddress. + */ + java.lang.String getDstIpAddress(); + + /** + * string dst_ip_address = 2; + * @return The bytes for dstIpAddress. + */ + com.google.protobuf.ByteString getDstIpAddressBytes(); + + /** + * uint32 dscp = 3; + * @return The dscp. + */ + int getDscp(); + + /** + * uint32 protocol = 4; + * @return The protocol. + */ + int getProtocol(); + + /** + * uint32 ttl = 5; + * @return The ttl. + */ + int getTtl(); + } + + /** + * Protobuf type {@code context.ConnectionSettings_L3} + */ + public static final class ConnectionSettings_L3 extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L3) + ConnectionSettings_L3OrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionSettings_L3.newBuilder() to construct. + private ConnectionSettings_L3(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionSettings_L3() { + srcIpAddress_ = ""; + dstIpAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L3.class, context.ContextOuterClass.ConnectionSettings_L3.Builder.class); + } + + public static final int SRC_IP_ADDRESS_FIELD_NUMBER = 1; + + private volatile java.lang.Object srcIpAddress_; + + /** + * string src_ip_address = 1; + * @return The srcIpAddress. + */ + @java.lang.Override + public java.lang.String getSrcIpAddress() { + java.lang.Object ref = srcIpAddress_; + 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(); + srcIpAddress_ = s; + return s; + } + } + + /** + * string src_ip_address = 1; + * @return The bytes for srcIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSrcIpAddressBytes() { + java.lang.Object ref = srcIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DST_IP_ADDRESS_FIELD_NUMBER = 2; + + private volatile java.lang.Object dstIpAddress_; + + /** + * string dst_ip_address = 2; + * @return The dstIpAddress. + */ + @java.lang.Override + public java.lang.String getDstIpAddress() { + java.lang.Object ref = dstIpAddress_; + 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(); + dstIpAddress_ = s; + return s; + } + } + + /** + * string dst_ip_address = 2; + * @return The bytes for dstIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDstIpAddressBytes() { + java.lang.Object ref = dstIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DSCP_FIELD_NUMBER = 3; + + private int dscp_; + + /** + * uint32 dscp = 3; + * @return The dscp. + */ + @java.lang.Override + public int getDscp() { + return dscp_; + } + + public static final int PROTOCOL_FIELD_NUMBER = 4; + + private int protocol_; + + /** + * uint32 protocol = 4; + * @return The protocol. + */ + @java.lang.Override + public int getProtocol() { + return protocol_; + } + + public static final int TTL_FIELD_NUMBER = 5; + + private int ttl_; + + /** + * uint32 ttl = 5; + * @return The ttl. + */ + @java.lang.Override + public int getTtl() { + return ttl_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getSrcIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcIpAddress_); + } + if (!getDstIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstIpAddress_); + } + if (dscp_ != 0) { + output.writeUInt32(3, dscp_); + } + if (protocol_ != 0) { + output.writeUInt32(4, protocol_); + } + if (ttl_ != 0) { + output.writeUInt32(5, ttl_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getSrcIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcIpAddress_); + } + if (!getDstIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstIpAddress_); + } + if (dscp_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, dscp_); + } + if (protocol_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(4, protocol_); + } + if (ttl_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(5, ttl_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L3)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionSettings_L3 other = (context.ContextOuterClass.ConnectionSettings_L3) obj; + if (!getSrcIpAddress().equals(other.getSrcIpAddress())) + return false; + if (!getDstIpAddress().equals(other.getDstIpAddress())) + return false; + if (getDscp() != other.getDscp()) + return false; + if (getProtocol() != other.getProtocol()) + return false; + if (getTtl() != other.getTtl()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SRC_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getSrcIpAddress().hashCode(); + hash = (37 * hash) + DST_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getDstIpAddress().hashCode(); + hash = (37 * hash) + DSCP_FIELD_NUMBER; + hash = (53 * hash) + getDscp(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol(); + hash = (37 * hash) + TTL_FIELD_NUMBER; + hash = (53 * hash) + getTtl(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionSettings_L3} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L3) + context.ContextOuterClass.ConnectionSettings_L3OrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L3.class, context.ContextOuterClass.ConnectionSettings_L3.Builder.class); + } + + // 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(); + srcIpAddress_ = ""; + dstIpAddress_ = ""; + dscp_ = 0; + protocol_ = 0; + ttl_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L3 getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L3 build() { + context.ContextOuterClass.ConnectionSettings_L3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionSettings_L3) { + return mergeFrom((context.ContextOuterClass.ConnectionSettings_L3) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L3 other) { + if (other == context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance()) + return this; + if (!other.getSrcIpAddress().isEmpty()) { + srcIpAddress_ = other.srcIpAddress_; + onChanged(); + } + if (!other.getDstIpAddress().isEmpty()) { + dstIpAddress_ = other.dstIpAddress_; + onChanged(); + } + if (other.getDscp() != 0) { + setDscp(other.getDscp()); + } + if (other.getProtocol() != 0) { + setProtocol(other.getProtocol()); + } + if (other.getTtl() != 0) { + setTtl(other.getTtl()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionSettings_L3) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object srcIpAddress_ = ""; + + /** + * string src_ip_address = 1; + * @return The srcIpAddress. + */ + public java.lang.String getSrcIpAddress() { + java.lang.Object ref = srcIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string src_ip_address = 1; + * @return The bytes for srcIpAddress. + */ + public com.google.protobuf.ByteString getSrcIpAddressBytes() { + java.lang.Object ref = srcIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string src_ip_address = 1; + * @param value The srcIpAddress to set. + * @return This builder for chaining. + */ + public Builder setSrcIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + srcIpAddress_ = value; + onChanged(); + return this; + } + + /** + * string src_ip_address = 1; + * @return This builder for chaining. + */ + public Builder clearSrcIpAddress() { + srcIpAddress_ = getDefaultInstance().getSrcIpAddress(); + onChanged(); + return this; + } + + /** + * string src_ip_address = 1; + * @param value The bytes for srcIpAddress to set. + * @return This builder for chaining. + */ + public Builder setSrcIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + srcIpAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object dstIpAddress_ = ""; + + /** + * string dst_ip_address = 2; + * @return The dstIpAddress. + */ + public java.lang.String getDstIpAddress() { + java.lang.Object ref = dstIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dstIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string dst_ip_address = 2; + * @return The bytes for dstIpAddress. + */ + public com.google.protobuf.ByteString getDstIpAddressBytes() { + java.lang.Object ref = dstIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string dst_ip_address = 2; + * @param value The dstIpAddress to set. + * @return This builder for chaining. + */ + public Builder setDstIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dstIpAddress_ = value; + onChanged(); + return this; + } + + /** + * string dst_ip_address = 2; + * @return This builder for chaining. + */ + public Builder clearDstIpAddress() { + dstIpAddress_ = getDefaultInstance().getDstIpAddress(); + onChanged(); + return this; + } + + /** + * string dst_ip_address = 2; + * @param value The bytes for dstIpAddress to set. + * @return This builder for chaining. + */ + public Builder setDstIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dstIpAddress_ = value; + onChanged(); + return this; + } + + private int dscp_; + + /** + * uint32 dscp = 3; + * @return The dscp. + */ + @java.lang.Override + public int getDscp() { + return dscp_; + } + + /** + * uint32 dscp = 3; + * @param value The dscp to set. + * @return This builder for chaining. + */ + public Builder setDscp(int value) { + dscp_ = value; + onChanged(); + return this; + } + + /** + * uint32 dscp = 3; + * @return This builder for chaining. + */ + public Builder clearDscp() { + dscp_ = 0; + onChanged(); + return this; + } + + private int protocol_; + + /** + * uint32 protocol = 4; + * @return The protocol. + */ + @java.lang.Override + public int getProtocol() { + return protocol_; + } + + /** + * uint32 protocol = 4; + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(int value) { + protocol_ = value; + onChanged(); + return this; + } + + /** + * uint32 protocol = 4; + * @return This builder for chaining. + */ + public Builder clearProtocol() { + protocol_ = 0; + onChanged(); + return this; + } + + private int ttl_; + + /** + * uint32 ttl = 5; + * @return The ttl. + */ + @java.lang.Override + public int getTtl() { + return ttl_; + } + + /** + * uint32 ttl = 5; + * @param value The ttl to set. + * @return This builder for chaining. + */ + public Builder setTtl(int value) { + ttl_ = value; + onChanged(); + return this; + } + + /** + * uint32 ttl = 5; + * @return This builder for chaining. + */ + public Builder clearTtl() { + ttl_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L3) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L3) + private static final context.ContextOuterClass.ConnectionSettings_L3 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L3(); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionSettings_L4OrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L4) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 src_port = 1; + * @return The srcPort. + */ + int getSrcPort(); + + /** + * uint32 dst_port = 2; + * @return The dstPort. + */ + int getDstPort(); + + /** + * uint32 tcp_flags = 3; + * @return The tcpFlags. + */ + int getTcpFlags(); + + /** + * uint32 ttl = 4; + * @return The ttl. + */ + int getTtl(); + } + + /** + * Protobuf type {@code context.ConnectionSettings_L4} + */ + public static final class ConnectionSettings_L4 extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L4) + ConnectionSettings_L4OrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionSettings_L4.newBuilder() to construct. + private ConnectionSettings_L4(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionSettings_L4() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L4.class, context.ContextOuterClass.ConnectionSettings_L4.Builder.class); + } + + public static final int SRC_PORT_FIELD_NUMBER = 1; + + private int srcPort_; + + /** + * uint32 src_port = 1; + * @return The srcPort. + */ + @java.lang.Override + public int getSrcPort() { + return srcPort_; + } + + public static final int DST_PORT_FIELD_NUMBER = 2; + + private int dstPort_; + + /** + * uint32 dst_port = 2; + * @return The dstPort. + */ + @java.lang.Override + public int getDstPort() { + return dstPort_; + } + + public static final int TCP_FLAGS_FIELD_NUMBER = 3; + + private int tcpFlags_; + + /** + * uint32 tcp_flags = 3; + * @return The tcpFlags. + */ + @java.lang.Override + public int getTcpFlags() { + return tcpFlags_; + } + + public static final int TTL_FIELD_NUMBER = 4; + + private int ttl_; + + /** + * uint32 ttl = 4; + * @return The ttl. + */ + @java.lang.Override + public int getTtl() { + return ttl_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (srcPort_ != 0) { + output.writeUInt32(1, srcPort_); + } + if (dstPort_ != 0) { + output.writeUInt32(2, dstPort_); + } + if (tcpFlags_ != 0) { + output.writeUInt32(3, tcpFlags_); + } + if (ttl_ != 0) { + output.writeUInt32(4, ttl_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (srcPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(1, srcPort_); + } + if (dstPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, dstPort_); + } + if (tcpFlags_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, tcpFlags_); + } + if (ttl_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(4, ttl_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L4)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionSettings_L4 other = (context.ContextOuterClass.ConnectionSettings_L4) obj; + if (getSrcPort() != other.getSrcPort()) + return false; + if (getDstPort() != other.getDstPort()) + return false; + if (getTcpFlags() != other.getTcpFlags()) + return false; + if (getTtl() != other.getTtl()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SRC_PORT_FIELD_NUMBER; + hash = (53 * hash) + getSrcPort(); + hash = (37 * hash) + DST_PORT_FIELD_NUMBER; + hash = (53 * hash) + getDstPort(); + hash = (37 * hash) + TCP_FLAGS_FIELD_NUMBER; + hash = (53 * hash) + getTcpFlags(); + hash = (37 * hash) + TTL_FIELD_NUMBER; + hash = (53 * hash) + getTtl(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L4 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionSettings_L4} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L4) + context.ContextOuterClass.ConnectionSettings_L4OrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L4.class, context.ContextOuterClass.ConnectionSettings_L4.Builder.class); + } + + // 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(); + srcPort_ = 0; + dstPort_ = 0; + tcpFlags_ = 0; + ttl_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L4 getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L4 build() { + context.ContextOuterClass.ConnectionSettings_L4 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionSettings_L4) { + return mergeFrom((context.ContextOuterClass.ConnectionSettings_L4) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L4 other) { + if (other == context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance()) + return this; + if (other.getSrcPort() != 0) { + setSrcPort(other.getSrcPort()); + } + if (other.getDstPort() != 0) { + setDstPort(other.getDstPort()); + } + if (other.getTcpFlags() != 0) { + setTcpFlags(other.getTcpFlags()); + } + if (other.getTtl() != 0) { + setTtl(other.getTtl()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionSettings_L4) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int srcPort_; + + /** + * uint32 src_port = 1; + * @return The srcPort. + */ + @java.lang.Override + public int getSrcPort() { + return srcPort_; + } + + /** + * uint32 src_port = 1; + * @param value The srcPort to set. + * @return This builder for chaining. + */ + public Builder setSrcPort(int value) { + srcPort_ = value; + onChanged(); + return this; + } + + /** + * uint32 src_port = 1; + * @return This builder for chaining. + */ + public Builder clearSrcPort() { + srcPort_ = 0; + onChanged(); + return this; + } + + private int dstPort_; + + /** + * uint32 dst_port = 2; + * @return The dstPort. + */ + @java.lang.Override + public int getDstPort() { + return dstPort_; + } + + /** + * uint32 dst_port = 2; + * @param value The dstPort to set. + * @return This builder for chaining. + */ + public Builder setDstPort(int value) { + dstPort_ = value; + onChanged(); + return this; + } + + /** + * uint32 dst_port = 2; + * @return This builder for chaining. + */ + public Builder clearDstPort() { + dstPort_ = 0; + onChanged(); + return this; + } + + private int tcpFlags_; + + /** + * uint32 tcp_flags = 3; + * @return The tcpFlags. + */ + @java.lang.Override + public int getTcpFlags() { + return tcpFlags_; + } + + /** + * uint32 tcp_flags = 3; + * @param value The tcpFlags to set. + * @return This builder for chaining. + */ + public Builder setTcpFlags(int value) { + tcpFlags_ = value; + onChanged(); + return this; + } + + /** + * uint32 tcp_flags = 3; + * @return This builder for chaining. + */ + public Builder clearTcpFlags() { + tcpFlags_ = 0; + onChanged(); + return this; + } + + private int ttl_; + + /** + * uint32 ttl = 4; + * @return The ttl. + */ + @java.lang.Override + public int getTtl() { + return ttl_; + } + + /** + * uint32 ttl = 4; + * @param value The ttl to set. + * @return This builder for chaining. + */ + public Builder setTtl(int value) { + ttl_ = value; + onChanged(); + return this; + } + + /** + * uint32 ttl = 4; + * @return This builder for chaining. + */ + public Builder clearTtl() { + ttl_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L4) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L4) + private static final context.ContextOuterClass.ConnectionSettings_L4 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L4(); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L4 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionSettingsOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ConnectionSettings_L0 l0 = 1; + * @return Whether the l0 field is set. + */ + boolean hasL0(); + + /** + * .context.ConnectionSettings_L0 l0 = 1; + * @return The l0. + */ + context.ContextOuterClass.ConnectionSettings_L0 getL0(); + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder(); + + /** + * .context.ConnectionSettings_L2 l2 = 2; + * @return Whether the l2 field is set. + */ + boolean hasL2(); + + /** + * .context.ConnectionSettings_L2 l2 = 2; + * @return The l2. + */ + context.ContextOuterClass.ConnectionSettings_L2 getL2(); + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder(); + + /** + * .context.ConnectionSettings_L3 l3 = 3; + * @return Whether the l3 field is set. + */ + boolean hasL3(); + + /** + * .context.ConnectionSettings_L3 l3 = 3; + * @return The l3. + */ + context.ContextOuterClass.ConnectionSettings_L3 getL3(); + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder(); + + /** + * .context.ConnectionSettings_L4 l4 = 4; + * @return Whether the l4 field is set. + */ + boolean hasL4(); + + /** + * .context.ConnectionSettings_L4 l4 = 4; + * @return The l4. + */ + context.ContextOuterClass.ConnectionSettings_L4 getL4(); + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder(); + } + + /** + * Protobuf type {@code context.ConnectionSettings} + */ + public static final class ConnectionSettings extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionSettings) + ConnectionSettingsOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionSettings.newBuilder() to construct. + private ConnectionSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionSettings() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings.class, context.ContextOuterClass.ConnectionSettings.Builder.class); + } + + public static final int L0_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ConnectionSettings_L0 l0_; + + /** + * .context.ConnectionSettings_L0 l0 = 1; + * @return Whether the l0 field is set. + */ + @java.lang.Override + public boolean hasL0() { + return l0_ != null; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + * @return The l0. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L0 getL0() { + return l0_ == null ? context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder() { + return getL0(); + } + + public static final int L2_FIELD_NUMBER = 2; + + private context.ContextOuterClass.ConnectionSettings_L2 l2_; + + /** + * .context.ConnectionSettings_L2 l2 = 2; + * @return Whether the l2 field is set. + */ + @java.lang.Override + public boolean hasL2() { + return l2_ != null; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + * @return The l2. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L2 getL2() { + return l2_ == null ? context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder() { + return getL2(); + } + + public static final int L3_FIELD_NUMBER = 3; + + private context.ContextOuterClass.ConnectionSettings_L3 l3_; + + /** + * .context.ConnectionSettings_L3 l3 = 3; + * @return Whether the l3 field is set. + */ + @java.lang.Override + public boolean hasL3() { + return l3_ != null; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + * @return The l3. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L3 getL3() { + return l3_ == null ? context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder() { + return getL3(); + } + + public static final int L4_FIELD_NUMBER = 4; + + private context.ContextOuterClass.ConnectionSettings_L4 l4_; + + /** + * .context.ConnectionSettings_L4 l4 = 4; + * @return Whether the l4 field is set. + */ + @java.lang.Override + public boolean hasL4() { + return l4_ != null; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + * @return The l4. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L4 getL4() { + return l4_ == null ? context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder() { + return getL4(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (l0_ != null) { + output.writeMessage(1, getL0()); + } + if (l2_ != null) { + output.writeMessage(2, getL2()); + } + if (l3_ != null) { + output.writeMessage(3, getL3()); + } + if (l4_ != null) { + output.writeMessage(4, getL4()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (l0_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getL0()); + } + if (l2_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getL2()); + } + if (l3_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getL3()); + } + if (l4_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getL4()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionSettings)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionSettings other = (context.ContextOuterClass.ConnectionSettings) obj; + if (hasL0() != other.hasL0()) + return false; + if (hasL0()) { + if (!getL0().equals(other.getL0())) + return false; + } + if (hasL2() != other.hasL2()) + return false; + if (hasL2()) { + if (!getL2().equals(other.getL2())) + return false; + } + if (hasL3() != other.hasL3()) + return false; + if (hasL3()) { + if (!getL3().equals(other.getL3())) + return false; + } + if (hasL4() != other.hasL4()) + return false; + if (hasL4()) { + if (!getL4().equals(other.getL4())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasL0()) { + hash = (37 * hash) + L0_FIELD_NUMBER; + hash = (53 * hash) + getL0().hashCode(); + } + if (hasL2()) { + hash = (37 * hash) + L2_FIELD_NUMBER; + hash = (53 * hash) + getL2().hashCode(); + } + if (hasL3()) { + hash = (37 * hash) + L3_FIELD_NUMBER; + hash = (53 * hash) + getL3().hashCode(); + } + if (hasL4()) { + hash = (37 * hash) + L4_FIELD_NUMBER; + hash = (53 * hash) + getL4().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionSettings) + context.ContextOuterClass.ConnectionSettingsOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings.class, context.ContextOuterClass.ConnectionSettings.Builder.class); + } + + // 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; + l0Builder_ = null; + } + if (l2Builder_ == null) { + l2_ = null; + } else { + l2_ = null; + l2Builder_ = null; + } + if (l3Builder_ == null) { + l3_ = null; + } else { + l3_ = null; + l3Builder_ = null; + } + if (l4Builder_ == null) { + l4_ = null; + } else { + l4_ = null; + l4Builder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionSettings.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings build() { + context.ContextOuterClass.ConnectionSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionSettings) { + return mergeFrom((context.ContextOuterClass.ConnectionSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings other) { + if (other == context.ContextOuterClass.ConnectionSettings.getDefaultInstance()) + return this; + if (other.hasL0()) { + mergeL0(other.getL0()); + } + if (other.hasL2()) { + mergeL2(other.getL2()); + } + if (other.hasL3()) { + mergeL3(other.getL3()); + } + if (other.hasL4()) { + mergeL4(other.getL4()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.ConnectionSettings_L0 l0_; + + private com.google.protobuf.SingleFieldBuilderV3 l0Builder_; + + /** + * .context.ConnectionSettings_L0 l0 = 1; + * @return Whether the l0 field is set. + */ + public boolean hasL0() { + return l0Builder_ != null || l0_ != null; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + * @return The l0. + */ + public context.ContextOuterClass.ConnectionSettings_L0 getL0() { + if (l0Builder_ == null) { + return l0_ == null ? context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; + } else { + return l0Builder_.getMessage(); + } + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + public Builder setL0(context.ContextOuterClass.ConnectionSettings_L0 value) { + if (l0Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + l0_ = value; + onChanged(); + } else { + l0Builder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + public Builder setL0(context.ContextOuterClass.ConnectionSettings_L0.Builder builderForValue) { + if (l0Builder_ == null) { + l0_ = builderForValue.build(); + onChanged(); + } else { + l0Builder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + public Builder mergeL0(context.ContextOuterClass.ConnectionSettings_L0 value) { + if (l0Builder_ == null) { + if (l0_ != null) { + l0_ = context.ContextOuterClass.ConnectionSettings_L0.newBuilder(l0_).mergeFrom(value).buildPartial(); + } else { + l0_ = value; + } + onChanged(); + } else { + l0Builder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + public Builder clearL0() { + if (l0Builder_ == null) { + l0_ = null; + onChanged(); + } else { + l0_ = null; + l0Builder_ = null; + } + return this; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + public context.ContextOuterClass.ConnectionSettings_L0.Builder getL0Builder() { + onChanged(); + return getL0FieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + public context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder() { + if (l0Builder_ != null) { + return l0Builder_.getMessageOrBuilder(); + } else { + return l0_ == null ? context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; + } + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getL0FieldBuilder() { + if (l0Builder_ == null) { + l0Builder_ = new com.google.protobuf.SingleFieldBuilderV3(getL0(), getParentForChildren(), isClean()); + l0_ = null; + } + return l0Builder_; + } + + private context.ContextOuterClass.ConnectionSettings_L2 l2_; + + private com.google.protobuf.SingleFieldBuilderV3 l2Builder_; + + /** + * .context.ConnectionSettings_L2 l2 = 2; + * @return Whether the l2 field is set. + */ + public boolean hasL2() { + return l2Builder_ != null || l2_ != null; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + * @return The l2. + */ + public context.ContextOuterClass.ConnectionSettings_L2 getL2() { + if (l2Builder_ == null) { + return l2_ == null ? context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; + } else { + return l2Builder_.getMessage(); + } + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + public Builder setL2(context.ContextOuterClass.ConnectionSettings_L2 value) { + if (l2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + l2_ = value; + onChanged(); + } else { + l2Builder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + public Builder setL2(context.ContextOuterClass.ConnectionSettings_L2.Builder builderForValue) { + if (l2Builder_ == null) { + l2_ = builderForValue.build(); + onChanged(); + } else { + l2Builder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + public Builder mergeL2(context.ContextOuterClass.ConnectionSettings_L2 value) { + if (l2Builder_ == null) { + if (l2_ != null) { + l2_ = context.ContextOuterClass.ConnectionSettings_L2.newBuilder(l2_).mergeFrom(value).buildPartial(); + } else { + l2_ = value; + } + onChanged(); + } else { + l2Builder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + public Builder clearL2() { + if (l2Builder_ == null) { + l2_ = null; + onChanged(); + } else { + l2_ = null; + l2Builder_ = null; + } + return this; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + public context.ContextOuterClass.ConnectionSettings_L2.Builder getL2Builder() { + onChanged(); + return getL2FieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + public context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder() { + if (l2Builder_ != null) { + return l2Builder_.getMessageOrBuilder(); + } else { + return l2_ == null ? context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; + } + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getL2FieldBuilder() { + if (l2Builder_ == null) { + l2Builder_ = new com.google.protobuf.SingleFieldBuilderV3(getL2(), getParentForChildren(), isClean()); + l2_ = null; + } + return l2Builder_; + } + + private context.ContextOuterClass.ConnectionSettings_L3 l3_; + + private com.google.protobuf.SingleFieldBuilderV3 l3Builder_; + + /** + * .context.ConnectionSettings_L3 l3 = 3; + * @return Whether the l3 field is set. + */ + public boolean hasL3() { + return l3Builder_ != null || l3_ != null; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + * @return The l3. + */ + public context.ContextOuterClass.ConnectionSettings_L3 getL3() { + if (l3Builder_ == null) { + return l3_ == null ? context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; + } else { + return l3Builder_.getMessage(); + } + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + public Builder setL3(context.ContextOuterClass.ConnectionSettings_L3 value) { + if (l3Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + l3_ = value; + onChanged(); + } else { + l3Builder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + public Builder setL3(context.ContextOuterClass.ConnectionSettings_L3.Builder builderForValue) { + if (l3Builder_ == null) { + l3_ = builderForValue.build(); + onChanged(); + } else { + l3Builder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + public Builder mergeL3(context.ContextOuterClass.ConnectionSettings_L3 value) { + if (l3Builder_ == null) { + if (l3_ != null) { + l3_ = context.ContextOuterClass.ConnectionSettings_L3.newBuilder(l3_).mergeFrom(value).buildPartial(); + } else { + l3_ = value; + } + onChanged(); + } else { + l3Builder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + public Builder clearL3() { + if (l3Builder_ == null) { + l3_ = null; + onChanged(); + } else { + l3_ = null; + l3Builder_ = null; + } + return this; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + public context.ContextOuterClass.ConnectionSettings_L3.Builder getL3Builder() { + onChanged(); + return getL3FieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + public context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder() { + if (l3Builder_ != null) { + return l3Builder_.getMessageOrBuilder(); + } else { + return l3_ == null ? context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; + } + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getL3FieldBuilder() { + if (l3Builder_ == null) { + l3Builder_ = new com.google.protobuf.SingleFieldBuilderV3(getL3(), getParentForChildren(), isClean()); + l3_ = null; + } + return l3Builder_; + } + + private context.ContextOuterClass.ConnectionSettings_L4 l4_; + + private com.google.protobuf.SingleFieldBuilderV3 l4Builder_; + + /** + * .context.ConnectionSettings_L4 l4 = 4; + * @return Whether the l4 field is set. + */ + public boolean hasL4() { + return l4Builder_ != null || l4_ != null; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + * @return The l4. + */ + public context.ContextOuterClass.ConnectionSettings_L4 getL4() { + if (l4Builder_ == null) { + return l4_ == null ? context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; + } else { + return l4Builder_.getMessage(); + } + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + public Builder setL4(context.ContextOuterClass.ConnectionSettings_L4 value) { + if (l4Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + l4_ = value; + onChanged(); + } else { + l4Builder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + public Builder setL4(context.ContextOuterClass.ConnectionSettings_L4.Builder builderForValue) { + if (l4Builder_ == null) { + l4_ = builderForValue.build(); + onChanged(); + } else { + l4Builder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + public Builder mergeL4(context.ContextOuterClass.ConnectionSettings_L4 value) { + if (l4Builder_ == null) { + if (l4_ != null) { + l4_ = context.ContextOuterClass.ConnectionSettings_L4.newBuilder(l4_).mergeFrom(value).buildPartial(); + } else { + l4_ = value; + } + onChanged(); + } else { + l4Builder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + public Builder clearL4() { + if (l4Builder_ == null) { + l4_ = null; + onChanged(); + } else { + l4_ = null; + l4Builder_ = null; + } + return this; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + public context.ContextOuterClass.ConnectionSettings_L4.Builder getL4Builder() { + onChanged(); + return getL4FieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + public context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder() { + if (l4Builder_ != null) { + return l4Builder_.getMessageOrBuilder(); + } else { + return l4_ == null ? context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; + } + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getL4FieldBuilder() { + if (l4Builder_ == null) { + l4Builder_ = new com.google.protobuf.SingleFieldBuilderV3(getL4(), getParentForChildren(), isClean()); + l4_ = null; + } + return l4Builder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionSettings) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionSettings) + private static final context.ContextOuterClass.ConnectionSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings(); + } + + public static context.ContextOuterClass.ConnectionSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Connection) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ConnectionId connection_id = 1; + * @return Whether the connectionId field is set. + */ + boolean hasConnectionId(); + + /** + * .context.ConnectionId connection_id = 1; + * @return The connectionId. + */ + context.ContextOuterClass.ConnectionId getConnectionId(); + + /** + * .context.ConnectionId connection_id = 1; + */ + context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); + + /** + * .context.ServiceId service_id = 2; + * @return Whether the serviceId field is set. + */ + boolean hasServiceId(); + + /** + * .context.ServiceId service_id = 2; + * @return The serviceId. + */ + context.ContextOuterClass.ServiceId getServiceId(); + + /** + * .context.ServiceId service_id = 2; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + java.util.List getPathHopsEndpointIdsList(); + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointId getPathHopsEndpointIds(int index); + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + int getPathHopsEndpointIdsCount(); + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + java.util.List getPathHopsEndpointIdsOrBuilderList(); + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointIdOrBuilder getPathHopsEndpointIdsOrBuilder(int index); + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + java.util.List getSubServiceIdsList(); + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + context.ContextOuterClass.ServiceId getSubServiceIds(int index); + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + int getSubServiceIdsCount(); + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + java.util.List getSubServiceIdsOrBuilderList(); + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + context.ContextOuterClass.ServiceIdOrBuilder getSubServiceIdsOrBuilder(int index); + + /** + * .context.ConnectionSettings settings = 5; + * @return Whether the settings field is set. + */ + boolean hasSettings(); + + /** + * .context.ConnectionSettings settings = 5; + * @return The settings. + */ + context.ContextOuterClass.ConnectionSettings getSettings(); + + /** + * .context.ConnectionSettings settings = 5; + */ + context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder(); + } + + /** + * Protobuf type {@code context.Connection} + */ + public static final class Connection extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Connection) + ConnectionOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Connection.newBuilder() to construct. + private Connection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Connection() { + pathHopsEndpointIds_ = java.util.Collections.emptyList(); + subServiceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Connection_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Connection.class, context.ContextOuterClass.Connection.Builder.class); + } + + public static final int CONNECTION_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ConnectionId connectionId_; + + /** + * .context.ConnectionId connection_id = 1; + * @return Whether the connectionId field is set. + */ + @java.lang.Override + public boolean hasConnectionId() { + return connectionId_ != null; + } + + /** + * .context.ConnectionId connection_id = 1; + * @return The connectionId. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionId getConnectionId() { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + + /** + * .context.ConnectionId connection_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + return getConnectionId(); + } + + public static final int SERVICE_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.ServiceId serviceId_; + + /** + * .context.ServiceId service_id = 2; + * @return Whether the serviceId field is set. + */ + @java.lang.Override + public boolean hasServiceId() { + return serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 2; + * @return The serviceId. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceId() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + + /** + * .context.ServiceId service_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + return getServiceId(); + } + + public static final int PATH_HOPS_ENDPOINT_IDS_FIELD_NUMBER = 3; + + private java.util.List pathHopsEndpointIds_; + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getPathHopsEndpointIdsList() { + return pathHopsEndpointIds_; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getPathHopsEndpointIdsOrBuilderList() { + return pathHopsEndpointIds_; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + @java.lang.Override + public int getPathHopsEndpointIdsCount() { + return pathHopsEndpointIds_.size(); + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getPathHopsEndpointIds(int index) { + return pathHopsEndpointIds_.get(index); + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getPathHopsEndpointIdsOrBuilder(int index) { + return pathHopsEndpointIds_.get(index); + } + + public static final int SUB_SERVICE_IDS_FIELD_NUMBER = 4; + + private java.util.List subServiceIds_; + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + @java.lang.Override + public java.util.List getSubServiceIdsList() { + return subServiceIds_; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + @java.lang.Override + public java.util.List getSubServiceIdsOrBuilderList() { + return subServiceIds_; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + @java.lang.Override + public int getSubServiceIdsCount() { + return subServiceIds_.size(); + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getSubServiceIds(int index) { + return subServiceIds_.get(index); + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getSubServiceIdsOrBuilder(int index) { + return subServiceIds_.get(index); + } + + public static final int SETTINGS_FIELD_NUMBER = 5; + + private context.ContextOuterClass.ConnectionSettings settings_; + + /** + * .context.ConnectionSettings settings = 5; + * @return Whether the settings field is set. + */ + @java.lang.Override + public boolean hasSettings() { + return settings_ != null; + } + + /** + * .context.ConnectionSettings settings = 5; + * @return The settings. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings getSettings() { + return settings_ == null ? context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; + } + + /** + * .context.ConnectionSettings settings = 5; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder() { + return getSettings(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (connectionId_ != null) { + output.writeMessage(1, getConnectionId()); + } + if (serviceId_ != null) { + output.writeMessage(2, getServiceId()); + } + for (int i = 0; i < pathHopsEndpointIds_.size(); i++) { + output.writeMessage(3, pathHopsEndpointIds_.get(i)); + } + for (int i = 0; i < subServiceIds_.size(); i++) { + output.writeMessage(4, subServiceIds_.get(i)); + } + if (settings_ != null) { + output.writeMessage(5, getSettings()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (connectionId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getConnectionId()); + } + if (serviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceId()); + } + for (int i = 0; i < pathHopsEndpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, pathHopsEndpointIds_.get(i)); + } + for (int i = 0; i < subServiceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, subServiceIds_.get(i)); + } + if (settings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSettings()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Connection)) { + return super.equals(obj); + } + context.ContextOuterClass.Connection other = (context.ContextOuterClass.Connection) obj; + if (hasConnectionId() != other.hasConnectionId()) + return false; + if (hasConnectionId()) { + if (!getConnectionId().equals(other.getConnectionId())) + return false; + } + if (hasServiceId() != other.hasServiceId()) + return false; + if (hasServiceId()) { + if (!getServiceId().equals(other.getServiceId())) + return false; + } + if (!getPathHopsEndpointIdsList().equals(other.getPathHopsEndpointIdsList())) + return false; + if (!getSubServiceIdsList().equals(other.getSubServiceIdsList())) + return false; + if (hasSettings() != other.hasSettings()) + return false; + if (hasSettings()) { + if (!getSettings().equals(other.getSettings())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasConnectionId()) { + hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getConnectionId().hashCode(); + } + if (hasServiceId()) { + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + } + if (getPathHopsEndpointIdsCount() > 0) { + hash = (37 * hash) + PATH_HOPS_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getPathHopsEndpointIdsList().hashCode(); + } + if (getSubServiceIdsCount() > 0) { + hash = (37 * hash) + SUB_SERVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSubServiceIdsList().hashCode(); + } + if (hasSettings()) { + hash = (37 * hash) + SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSettings().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Connection parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Connection parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Connection parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Connection parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Connection parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Connection parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Connection parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Connection parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Connection parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Connection parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Connection parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Connection parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Connection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Connection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Connection) + context.ContextOuterClass.ConnectionOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Connection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Connection_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Connection.class, context.ContextOuterClass.Connection.Builder.class); + } + + // 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; + connectionIdBuilder_ = null; + } + if (serviceIdBuilder_ == null) { + serviceId_ = null; + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + if (pathHopsEndpointIdsBuilder_ == null) { + pathHopsEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pathHopsEndpointIdsBuilder_.clear(); + } + if (subServiceIdsBuilder_ == null) { + subServiceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + subServiceIdsBuilder_.clear(); + } + if (settingsBuilder_ == null) { + settings_ = null; + } else { + settings_ = null; + settingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Connection_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Connection getDefaultInstanceForType() { + return context.ContextOuterClass.Connection.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Connection build() { + context.ContextOuterClass.Connection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + if (pathHopsEndpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pathHopsEndpointIds_ = java.util.Collections.unmodifiableList(pathHopsEndpointIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pathHopsEndpointIds_ = pathHopsEndpointIds_; + } else { + result.pathHopsEndpointIds_ = pathHopsEndpointIdsBuilder_.build(); + } + if (subServiceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + subServiceIds_ = java.util.Collections.unmodifiableList(subServiceIds_); + bitField0_ = (bitField0_ & ~0x00000002); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Connection) { + return mergeFrom((context.ContextOuterClass.Connection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Connection other) { + if (other == context.ContextOuterClass.Connection.getDefaultInstance()) + return this; + if (other.hasConnectionId()) { + mergeConnectionId(other.getConnectionId()); + } + if (other.hasServiceId()) { + mergeServiceId(other.getServiceId()); + } + if (pathHopsEndpointIdsBuilder_ == null) { + if (!other.pathHopsEndpointIds_.isEmpty()) { + if (pathHopsEndpointIds_.isEmpty()) { + pathHopsEndpointIds_ = other.pathHopsEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.addAll(other.pathHopsEndpointIds_); + } + onChanged(); + } + } else { + if (!other.pathHopsEndpointIds_.isEmpty()) { + if (pathHopsEndpointIdsBuilder_.isEmpty()) { + pathHopsEndpointIdsBuilder_.dispose(); + pathHopsEndpointIdsBuilder_ = null; + pathHopsEndpointIds_ = other.pathHopsEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + pathHopsEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPathHopsEndpointIdsFieldBuilder() : null; + } else { + pathHopsEndpointIdsBuilder_.addAllMessages(other.pathHopsEndpointIds_); + } + } + } + if (subServiceIdsBuilder_ == null) { + if (!other.subServiceIds_.isEmpty()) { + if (subServiceIds_.isEmpty()) { + subServiceIds_ = other.subServiceIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSubServiceIdsIsMutable(); + subServiceIds_.addAll(other.subServiceIds_); + } + onChanged(); + } + } else { + if (!other.subServiceIds_.isEmpty()) { + if (subServiceIdsBuilder_.isEmpty()) { + subServiceIdsBuilder_.dispose(); + subServiceIdsBuilder_ = null; + subServiceIds_ = other.subServiceIds_; + bitField0_ = (bitField0_ & ~0x00000002); + subServiceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSubServiceIdsFieldBuilder() : null; + } else { + subServiceIdsBuilder_.addAllMessages(other.subServiceIds_); + } + } + } + if (other.hasSettings()) { + mergeSettings(other.getSettings()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Connection) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.ConnectionId connectionId_; + + private com.google.protobuf.SingleFieldBuilderV3 connectionIdBuilder_; + + /** + * .context.ConnectionId connection_id = 1; + * @return Whether the connectionId field is set. + */ + public boolean hasConnectionId() { + return connectionIdBuilder_ != null || connectionId_ != null; + } + + /** + * .context.ConnectionId connection_id = 1; + * @return The connectionId. + */ + public context.ContextOuterClass.ConnectionId getConnectionId() { + if (connectionIdBuilder_ == null) { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } else { + return connectionIdBuilder_.getMessage(); + } + } + + /** + * .context.ConnectionId connection_id = 1; + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionId_ = value; + onChanged(); + } else { + connectionIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 1; + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdBuilder_ == null) { + connectionId_ = builderForValue.build(); + onChanged(); + } else { + connectionIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 1; + */ + public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (connectionId_ != null) { + connectionId_ = context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); + } else { + connectionId_ = value; + } + onChanged(); + } else { + connectionIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 1; + */ + public Builder clearConnectionId() { + if (connectionIdBuilder_ == null) { + connectionId_ = null; + onChanged(); + } else { + connectionId_ = null; + connectionIdBuilder_ = null; + } + return this; + } + + /** + * .context.ConnectionId connection_id = 1; + */ + public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { + onChanged(); + return getConnectionIdFieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionId connection_id = 1; + */ + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + if (connectionIdBuilder_ != null) { + return connectionIdBuilder_.getMessageOrBuilder(); + } else { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + } + + /** + * .context.ConnectionId connection_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getConnectionIdFieldBuilder() { + if (connectionIdBuilder_ == null) { + connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getConnectionId(), getParentForChildren(), isClean()); + connectionId_ = null; + } + return connectionIdBuilder_; + } + + private context.ContextOuterClass.ServiceId serviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceIdBuilder_; + + /** + * .context.ServiceId service_id = 2; + * @return Whether the serviceId field is set. + */ + public boolean hasServiceId() { + return serviceIdBuilder_ != null || serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 2; + * @return The serviceId. + */ + public context.ContextOuterClass.ServiceId getServiceId() { + if (serviceIdBuilder_ == null) { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } else { + return serviceIdBuilder_.getMessage(); + } + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceId_ = value; + onChanged(); + } else { + serviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdBuilder_ == null) { + serviceId_ = builderForValue.build(); + onChanged(); + } else { + serviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (serviceId_ != null) { + serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + } else { + serviceId_ = value; + } + onChanged(); + } else { + serviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder clearServiceId() { + if (serviceIdBuilder_ == null) { + serviceId_ = null; + onChanged(); + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + onChanged(); + return getServiceIdFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceId service_id = 2; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + if (serviceIdBuilder_ != null) { + return serviceIdBuilder_.getMessageOrBuilder(); + } else { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + } + + /** + * .context.ServiceId service_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdFieldBuilder() { + if (serviceIdBuilder_ == null) { + serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceId(), getParentForChildren(), isClean()); + serviceId_ = null; + } + return serviceIdBuilder_; + } + + private java.util.List pathHopsEndpointIds_ = java.util.Collections.emptyList(); + + private void ensurePathHopsEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pathHopsEndpointIds_ = new java.util.ArrayList(pathHopsEndpointIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 pathHopsEndpointIdsBuilder_; + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public java.util.List getPathHopsEndpointIdsList() { + if (pathHopsEndpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pathHopsEndpointIds_); + } else { + return pathHopsEndpointIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public int getPathHopsEndpointIdsCount() { + if (pathHopsEndpointIdsBuilder_ == null) { + return pathHopsEndpointIds_.size(); + } else { + return pathHopsEndpointIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId getPathHopsEndpointIds(int index) { + if (pathHopsEndpointIdsBuilder_ == null) { + return pathHopsEndpointIds_.get(index); + } else { + return pathHopsEndpointIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder setPathHopsEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (pathHopsEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.set(index, value); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder setPathHopsEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (pathHopsEndpointIdsBuilder_ == null) { + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.set(index, builderForValue.build()); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder addPathHopsEndpointIds(context.ContextOuterClass.EndPointId value) { + if (pathHopsEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.add(value); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder addPathHopsEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (pathHopsEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.add(index, value); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder addPathHopsEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (pathHopsEndpointIdsBuilder_ == null) { + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.add(builderForValue.build()); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder addPathHopsEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (pathHopsEndpointIdsBuilder_ == null) { + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.add(index, builderForValue.build()); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder addAllPathHopsEndpointIds(java.lang.Iterable values) { + if (pathHopsEndpointIdsBuilder_ == null) { + ensurePathHopsEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pathHopsEndpointIds_); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder clearPathHopsEndpointIds() { + if (pathHopsEndpointIdsBuilder_ == null) { + pathHopsEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder removePathHopsEndpointIds(int index) { + if (pathHopsEndpointIdsBuilder_ == null) { + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.remove(index); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder getPathHopsEndpointIdsBuilder(int index) { + return getPathHopsEndpointIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getPathHopsEndpointIdsOrBuilder(int index) { + if (pathHopsEndpointIdsBuilder_ == null) { + return pathHopsEndpointIds_.get(index); + } else { + return pathHopsEndpointIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public java.util.List getPathHopsEndpointIdsOrBuilderList() { + if (pathHopsEndpointIdsBuilder_ != null) { + return pathHopsEndpointIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pathHopsEndpointIds_); + } + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addPathHopsEndpointIdsBuilder() { + return getPathHopsEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addPathHopsEndpointIdsBuilder(int index) { + return getPathHopsEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public java.util.List getPathHopsEndpointIdsBuilderList() { + return getPathHopsEndpointIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getPathHopsEndpointIdsFieldBuilder() { + if (pathHopsEndpointIdsBuilder_ == null) { + pathHopsEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(pathHopsEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + pathHopsEndpointIds_ = null; + } + return pathHopsEndpointIdsBuilder_; + } + + private java.util.List subServiceIds_ = java.util.Collections.emptyList(); + + private void ensureSubServiceIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + subServiceIds_ = new java.util.ArrayList(subServiceIds_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 subServiceIdsBuilder_; + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public java.util.List getSubServiceIdsList() { + if (subServiceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subServiceIds_); + } else { + return subServiceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public int getSubServiceIdsCount() { + if (subServiceIdsBuilder_ == null) { + return subServiceIds_.size(); + } else { + return subServiceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public context.ContextOuterClass.ServiceId getSubServiceIds(int index) { + if (subServiceIdsBuilder_ == null) { + return subServiceIds_.get(index); + } else { + return subServiceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder setSubServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (subServiceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubServiceIdsIsMutable(); + subServiceIds_.set(index, value); + onChanged(); + } else { + subServiceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder setSubServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (subServiceIdsBuilder_ == null) { + ensureSubServiceIdsIsMutable(); + subServiceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + subServiceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder addSubServiceIds(context.ContextOuterClass.ServiceId value) { + if (subServiceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubServiceIdsIsMutable(); + subServiceIds_.add(value); + onChanged(); + } else { + subServiceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder addSubServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (subServiceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubServiceIdsIsMutable(); + subServiceIds_.add(index, value); + onChanged(); + } else { + subServiceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder addSubServiceIds(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (subServiceIdsBuilder_ == null) { + ensureSubServiceIdsIsMutable(); + subServiceIds_.add(builderForValue.build()); + onChanged(); + } else { + subServiceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder addSubServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (subServiceIdsBuilder_ == null) { + ensureSubServiceIdsIsMutable(); + subServiceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + subServiceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder addAllSubServiceIds(java.lang.Iterable values) { + if (subServiceIdsBuilder_ == null) { + ensureSubServiceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subServiceIds_); + onChanged(); + } else { + subServiceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder clearSubServiceIds() { + if (subServiceIdsBuilder_ == null) { + subServiceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + subServiceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder removeSubServiceIds(int index) { + if (subServiceIdsBuilder_ == null) { + ensureSubServiceIdsIsMutable(); + subServiceIds_.remove(index); + onChanged(); + } else { + subServiceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public context.ContextOuterClass.ServiceId.Builder getSubServiceIdsBuilder(int index) { + return getSubServiceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getSubServiceIdsOrBuilder(int index) { + if (subServiceIdsBuilder_ == null) { + return subServiceIds_.get(index); + } else { + return subServiceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public java.util.List getSubServiceIdsOrBuilderList() { + if (subServiceIdsBuilder_ != null) { + return subServiceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subServiceIds_); + } + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public context.ContextOuterClass.ServiceId.Builder addSubServiceIdsBuilder() { + return getSubServiceIdsFieldBuilder().addBuilder(context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public context.ContextOuterClass.ServiceId.Builder addSubServiceIdsBuilder(int index) { + return getSubServiceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public java.util.List getSubServiceIdsBuilderList() { + return getSubServiceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSubServiceIdsFieldBuilder() { + if (subServiceIdsBuilder_ == null) { + subServiceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(subServiceIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + subServiceIds_ = null; + } + return subServiceIdsBuilder_; + } + + private context.ContextOuterClass.ConnectionSettings settings_; + + private com.google.protobuf.SingleFieldBuilderV3 settingsBuilder_; + + /** + * .context.ConnectionSettings settings = 5; + * @return Whether the settings field is set. + */ + public boolean hasSettings() { + return settingsBuilder_ != null || settings_ != null; + } + + /** + * .context.ConnectionSettings settings = 5; + * @return The settings. + */ + public context.ContextOuterClass.ConnectionSettings getSettings() { + if (settingsBuilder_ == null) { + return settings_ == null ? context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; + } else { + return settingsBuilder_.getMessage(); + } + } + + /** + * .context.ConnectionSettings settings = 5; + */ + public Builder setSettings(context.ContextOuterClass.ConnectionSettings value) { + if (settingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + settings_ = value; + onChanged(); + } else { + settingsBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionSettings settings = 5; + */ + public Builder setSettings(context.ContextOuterClass.ConnectionSettings.Builder builderForValue) { + if (settingsBuilder_ == null) { + settings_ = builderForValue.build(); + onChanged(); + } else { + settingsBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionSettings settings = 5; + */ + public Builder mergeSettings(context.ContextOuterClass.ConnectionSettings value) { + if (settingsBuilder_ == null) { + if (settings_ != null) { + settings_ = context.ContextOuterClass.ConnectionSettings.newBuilder(settings_).mergeFrom(value).buildPartial(); + } else { + settings_ = value; + } + onChanged(); + } else { + settingsBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionSettings settings = 5; + */ + public Builder clearSettings() { + if (settingsBuilder_ == null) { + settings_ = null; + onChanged(); + } else { + settings_ = null; + settingsBuilder_ = null; + } + return this; + } + + /** + * .context.ConnectionSettings settings = 5; + */ + public context.ContextOuterClass.ConnectionSettings.Builder getSettingsBuilder() { + onChanged(); + return getSettingsFieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionSettings settings = 5; + */ + public context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder() { + if (settingsBuilder_ != null) { + return settingsBuilder_.getMessageOrBuilder(); + } else { + return settings_ == null ? context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; + } + } + + /** + * .context.ConnectionSettings settings = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSettingsFieldBuilder() { + if (settingsBuilder_ == null) { + settingsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSettings(), getParentForChildren(), isClean()); + settings_ = null; + } + return settingsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Connection) + } + + // @@protoc_insertion_point(class_scope:context.Connection) + private static final context.ContextOuterClass.Connection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Connection(); + } + + public static context.ContextOuterClass.Connection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Connection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + java.util.List getConnectionIdsList(); + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + context.ContextOuterClass.ConnectionId getConnectionIds(int index); + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + int getConnectionIdsCount(); + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + java.util.List getConnectionIdsOrBuilderList(); + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ConnectionIdList} + */ + public static final class ConnectionIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionIdList) + ConnectionIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionIdList.newBuilder() to construct. + private ConnectionIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionIdList() { + connectionIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionIdList.class, context.ContextOuterClass.ConnectionIdList.Builder.class); + } + + public static final int CONNECTION_IDS_FIELD_NUMBER = 1; + + private java.util.List connectionIds_; + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + @java.lang.Override + public java.util.List getConnectionIdsList() { + return connectionIds_; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + @java.lang.Override + public java.util.List getConnectionIdsOrBuilderList() { + return connectionIds_; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + @java.lang.Override + public int getConnectionIdsCount() { + return connectionIds_.size(); + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionId getConnectionIds(int index) { + return connectionIds_.get(index); + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdsOrBuilder(int index) { + return connectionIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < connectionIds_.size(); i++) { + output.writeMessage(1, connectionIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < connectionIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, connectionIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionIdList other = (context.ContextOuterClass.ConnectionIdList) obj; + if (!getConnectionIdsList().equals(other.getConnectionIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConnectionIdsCount() > 0) { + hash = (37 * hash) + CONNECTION_IDS_FIELD_NUMBER; + hash = (53 * hash) + getConnectionIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionIdList) + context.ContextOuterClass.ConnectionIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionIdList.class, context.ContextOuterClass.ConnectionIdList.Builder.class); + } + + // 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(); + if (connectionIdsBuilder_ == null) { + connectionIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + connectionIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionIdList getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionIdList build() { + context.ContextOuterClass.ConnectionIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionIdList buildPartial() { + context.ContextOuterClass.ConnectionIdList result = new context.ContextOuterClass.ConnectionIdList(this); + int from_bitField0_ = bitField0_; + if (connectionIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + connectionIds_ = java.util.Collections.unmodifiableList(connectionIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.connectionIds_ = connectionIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionIdList) { + return mergeFrom((context.ContextOuterClass.ConnectionIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionIdList other) { + if (other == context.ContextOuterClass.ConnectionIdList.getDefaultInstance()) + return this; + if (connectionIdsBuilder_ == null) { + if (!other.connectionIds_.isEmpty()) { + if (connectionIds_.isEmpty()) { + connectionIds_ = other.connectionIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConnectionIdsIsMutable(); + connectionIds_.addAll(other.connectionIds_); + } + onChanged(); + } + } else { + if (!other.connectionIds_.isEmpty()) { + if (connectionIdsBuilder_.isEmpty()) { + connectionIdsBuilder_.dispose(); + connectionIdsBuilder_ = null; + connectionIds_ = other.connectionIds_; + bitField0_ = (bitField0_ & ~0x00000001); + connectionIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConnectionIdsFieldBuilder() : null; + } else { + connectionIdsBuilder_.addAllMessages(other.connectionIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List connectionIds_ = java.util.Collections.emptyList(); + + private void ensureConnectionIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + connectionIds_ = new java.util.ArrayList(connectionIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 connectionIdsBuilder_; + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public java.util.List getConnectionIdsList() { + if (connectionIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(connectionIds_); + } else { + return connectionIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public int getConnectionIdsCount() { + if (connectionIdsBuilder_ == null) { + return connectionIds_.size(); + } else { + return connectionIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public context.ContextOuterClass.ConnectionId getConnectionIds(int index) { + if (connectionIdsBuilder_ == null) { + return connectionIds_.get(index); + } else { + return connectionIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder setConnectionIds(int index, context.ContextOuterClass.ConnectionId value) { + if (connectionIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionIdsIsMutable(); + connectionIds_.set(index, value); + onChanged(); + } else { + connectionIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder setConnectionIds(int index, context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdsBuilder_ == null) { + ensureConnectionIdsIsMutable(); + connectionIds_.set(index, builderForValue.build()); + onChanged(); + } else { + connectionIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder addConnectionIds(context.ContextOuterClass.ConnectionId value) { + if (connectionIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionIdsIsMutable(); + connectionIds_.add(value); + onChanged(); + } else { + connectionIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder addConnectionIds(int index, context.ContextOuterClass.ConnectionId value) { + if (connectionIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionIdsIsMutable(); + connectionIds_.add(index, value); + onChanged(); + } else { + connectionIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder addConnectionIds(context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdsBuilder_ == null) { + ensureConnectionIdsIsMutable(); + connectionIds_.add(builderForValue.build()); + onChanged(); + } else { + connectionIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder addConnectionIds(int index, context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdsBuilder_ == null) { + ensureConnectionIdsIsMutable(); + connectionIds_.add(index, builderForValue.build()); + onChanged(); + } else { + connectionIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder addAllConnectionIds(java.lang.Iterable values) { + if (connectionIdsBuilder_ == null) { + ensureConnectionIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, connectionIds_); + onChanged(); + } else { + connectionIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder clearConnectionIds() { + if (connectionIdsBuilder_ == null) { + connectionIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + connectionIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder removeConnectionIds(int index) { + if (connectionIdsBuilder_ == null) { + ensureConnectionIdsIsMutable(); + connectionIds_.remove(index); + onChanged(); + } else { + connectionIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public context.ContextOuterClass.ConnectionId.Builder getConnectionIdsBuilder(int index) { + return getConnectionIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdsOrBuilder(int index) { + if (connectionIdsBuilder_ == null) { + return connectionIds_.get(index); + } else { + return connectionIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public java.util.List getConnectionIdsOrBuilderList() { + if (connectionIdsBuilder_ != null) { + return connectionIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(connectionIds_); + } + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public context.ContextOuterClass.ConnectionId.Builder addConnectionIdsBuilder() { + return getConnectionIdsFieldBuilder().addBuilder(context.ContextOuterClass.ConnectionId.getDefaultInstance()); + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public context.ContextOuterClass.ConnectionId.Builder addConnectionIdsBuilder(int index) { + return getConnectionIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.ConnectionId.getDefaultInstance()); + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public java.util.List getConnectionIdsBuilderList() { + return getConnectionIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getConnectionIdsFieldBuilder() { + if (connectionIdsBuilder_ == null) { + connectionIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(connectionIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + connectionIds_ = null; + } + return connectionIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionIdList) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionIdList) + private static final context.ContextOuterClass.ConnectionIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionIdList(); + } + + public static context.ContextOuterClass.ConnectionIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Connection connections = 1; + */ + java.util.List getConnectionsList(); + + /** + * repeated .context.Connection connections = 1; + */ + context.ContextOuterClass.Connection getConnections(int index); + + /** + * repeated .context.Connection connections = 1; + */ + int getConnectionsCount(); + + /** + * repeated .context.Connection connections = 1; + */ + java.util.List getConnectionsOrBuilderList(); + + /** + * repeated .context.Connection connections = 1; + */ + context.ContextOuterClass.ConnectionOrBuilder getConnectionsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ConnectionList} + */ + public static final class ConnectionList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionList) + ConnectionListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionList.newBuilder() to construct. + private ConnectionList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionList() { + connections_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionList.class, context.ContextOuterClass.ConnectionList.Builder.class); + } + + public static final int CONNECTIONS_FIELD_NUMBER = 1; + + private java.util.List connections_; + + /** + * repeated .context.Connection connections = 1; + */ + @java.lang.Override + public java.util.List getConnectionsList() { + return connections_; + } + + /** + * repeated .context.Connection connections = 1; + */ + @java.lang.Override + public java.util.List getConnectionsOrBuilderList() { + return connections_; + } + + /** + * repeated .context.Connection connections = 1; + */ + @java.lang.Override + public int getConnectionsCount() { + return connections_.size(); + } + + /** + * repeated .context.Connection connections = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Connection getConnections(int index) { + return connections_.get(index); + } + + /** + * repeated .context.Connection connections = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionOrBuilder getConnectionsOrBuilder(int index) { + return connections_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < connections_.size(); i++) { + output.writeMessage(1, connections_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < connections_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, connections_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionList)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionList other = (context.ContextOuterClass.ConnectionList) obj; + if (!getConnectionsList().equals(other.getConnectionsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConnectionsCount() > 0) { + hash = (37 * hash) + CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getConnectionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionList) + context.ContextOuterClass.ConnectionListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionList.class, context.ContextOuterClass.ConnectionList.Builder.class); + } + + // 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(); + if (connectionsBuilder_ == null) { + connections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + connectionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionList getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionList build() { + context.ContextOuterClass.ConnectionList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionList buildPartial() { + context.ContextOuterClass.ConnectionList result = new context.ContextOuterClass.ConnectionList(this); + int from_bitField0_ = bitField0_; + if (connectionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + connections_ = java.util.Collections.unmodifiableList(connections_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.connections_ = connections_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionList) { + return mergeFrom((context.ContextOuterClass.ConnectionList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionList other) { + if (other == context.ContextOuterClass.ConnectionList.getDefaultInstance()) + return this; + if (connectionsBuilder_ == null) { + if (!other.connections_.isEmpty()) { + if (connections_.isEmpty()) { + connections_ = other.connections_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConnectionsIsMutable(); + connections_.addAll(other.connections_); + } + onChanged(); + } + } else { + if (!other.connections_.isEmpty()) { + if (connectionsBuilder_.isEmpty()) { + connectionsBuilder_.dispose(); + connectionsBuilder_ = null; + connections_ = other.connections_; + bitField0_ = (bitField0_ & ~0x00000001); + connectionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConnectionsFieldBuilder() : null; + } else { + connectionsBuilder_.addAllMessages(other.connections_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List connections_ = java.util.Collections.emptyList(); + + private void ensureConnectionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + connections_ = new java.util.ArrayList(connections_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 connectionsBuilder_; + + /** + * repeated .context.Connection connections = 1; + */ + public java.util.List getConnectionsList() { + if (connectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(connections_); + } else { + return connectionsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Connection connections = 1; + */ + public int getConnectionsCount() { + if (connectionsBuilder_ == null) { + return connections_.size(); + } else { + return connectionsBuilder_.getCount(); + } + } + + /** + * repeated .context.Connection connections = 1; + */ + public context.ContextOuterClass.Connection getConnections(int index) { + if (connectionsBuilder_ == null) { + return connections_.get(index); + } else { + return connectionsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder setConnections(int index, context.ContextOuterClass.Connection value) { + if (connectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionsIsMutable(); + connections_.set(index, value); + onChanged(); + } else { + connectionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder setConnections(int index, context.ContextOuterClass.Connection.Builder builderForValue) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.set(index, builderForValue.build()); + onChanged(); + } else { + connectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder addConnections(context.ContextOuterClass.Connection value) { + if (connectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionsIsMutable(); + connections_.add(value); + onChanged(); + } else { + connectionsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder addConnections(int index, context.ContextOuterClass.Connection value) { + if (connectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionsIsMutable(); + connections_.add(index, value); + onChanged(); + } else { + connectionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder addConnections(context.ContextOuterClass.Connection.Builder builderForValue) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.add(builderForValue.build()); + onChanged(); + } else { + connectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder addConnections(int index, context.ContextOuterClass.Connection.Builder builderForValue) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.add(index, builderForValue.build()); + onChanged(); + } else { + connectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder addAllConnections(java.lang.Iterable values) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, connections_); + onChanged(); + } else { + connectionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder clearConnections() { + if (connectionsBuilder_ == null) { + connections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + connectionsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder removeConnections(int index) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.remove(index); + onChanged(); + } else { + connectionsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public context.ContextOuterClass.Connection.Builder getConnectionsBuilder(int index) { + return getConnectionsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Connection connections = 1; + */ + public context.ContextOuterClass.ConnectionOrBuilder getConnectionsOrBuilder(int index) { + if (connectionsBuilder_ == null) { + return connections_.get(index); + } else { + return connectionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Connection connections = 1; + */ + public java.util.List getConnectionsOrBuilderList() { + if (connectionsBuilder_ != null) { + return connectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(connections_); + } + } + + /** + * repeated .context.Connection connections = 1; + */ + public context.ContextOuterClass.Connection.Builder addConnectionsBuilder() { + return getConnectionsFieldBuilder().addBuilder(context.ContextOuterClass.Connection.getDefaultInstance()); + } + + /** + * repeated .context.Connection connections = 1; + */ + public context.ContextOuterClass.Connection.Builder addConnectionsBuilder(int index) { + return getConnectionsFieldBuilder().addBuilder(index, context.ContextOuterClass.Connection.getDefaultInstance()); + } + + /** + * repeated .context.Connection connections = 1; + */ + public java.util.List getConnectionsBuilderList() { + return getConnectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getConnectionsFieldBuilder() { + if (connectionsBuilder_ == null) { + connectionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(connections_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + connections_ = null; + } + return connectionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionList) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionList) + private static final context.ContextOuterClass.ConnectionList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionList(); + } + + public static context.ContextOuterClass.ConnectionList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.ConnectionId connection_id = 2; + * @return Whether the connectionId field is set. + */ + boolean hasConnectionId(); + + /** + * .context.ConnectionId connection_id = 2; + * @return The connectionId. + */ + context.ContextOuterClass.ConnectionId getConnectionId(); + + /** + * .context.ConnectionId connection_id = 2; + */ + context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); + } + + /** + * Protobuf type {@code context.ConnectionEvent} + */ + public static final class ConnectionEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionEvent) + ConnectionEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionEvent.newBuilder() to construct. + private ConnectionEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionEvent.class, context.ContextOuterClass.ConnectionEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int CONNECTION_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.ConnectionId connectionId_; + + /** + * .context.ConnectionId connection_id = 2; + * @return Whether the connectionId field is set. + */ + @java.lang.Override + public boolean hasConnectionId() { + return connectionId_ != null; + } + + /** + * .context.ConnectionId connection_id = 2; + * @return The connectionId. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionId getConnectionId() { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + + /** + * .context.ConnectionId connection_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + return getConnectionId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (connectionId_ != null) { + output.writeMessage(2, getConnectionId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (connectionId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConnectionId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionEvent other = (context.ContextOuterClass.ConnectionEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasConnectionId() != other.hasConnectionId()) + return false; + if (hasConnectionId()) { + if (!getConnectionId().equals(other.getConnectionId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasConnectionId()) { + hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getConnectionId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionEvent) + context.ContextOuterClass.ConnectionEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionEvent.class, context.ContextOuterClass.ConnectionEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (connectionIdBuilder_ == null) { + connectionId_ = null; + } else { + connectionId_ = null; + connectionIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionEvent getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionEvent build() { + context.ContextOuterClass.ConnectionEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionEvent) { + return mergeFrom((context.ContextOuterClass.ConnectionEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionEvent other) { + if (other == context.ContextOuterClass.ConnectionEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasConnectionId()) { + mergeConnectionId(other.getConnectionId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.ConnectionId connectionId_; + + private com.google.protobuf.SingleFieldBuilderV3 connectionIdBuilder_; + + /** + * .context.ConnectionId connection_id = 2; + * @return Whether the connectionId field is set. + */ + public boolean hasConnectionId() { + return connectionIdBuilder_ != null || connectionId_ != null; + } + + /** + * .context.ConnectionId connection_id = 2; + * @return The connectionId. + */ + public context.ContextOuterClass.ConnectionId getConnectionId() { + if (connectionIdBuilder_ == null) { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } else { + return connectionIdBuilder_.getMessage(); + } + } + + /** + * .context.ConnectionId connection_id = 2; + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionId_ = value; + onChanged(); + } else { + connectionIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 2; + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdBuilder_ == null) { + connectionId_ = builderForValue.build(); + onChanged(); + } else { + connectionIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 2; + */ + public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (connectionId_ != null) { + connectionId_ = context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); + } else { + connectionId_ = value; + } + onChanged(); + } else { + connectionIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 2; + */ + public Builder clearConnectionId() { + if (connectionIdBuilder_ == null) { + connectionId_ = null; + onChanged(); + } else { + connectionId_ = null; + connectionIdBuilder_ = null; + } + return this; + } + + /** + * .context.ConnectionId connection_id = 2; + */ + public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { + onChanged(); + return getConnectionIdFieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionId connection_id = 2; + */ + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + if (connectionIdBuilder_ != null) { + return connectionIdBuilder_.getMessageOrBuilder(); + } else { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + } + + /** + * .context.ConnectionId connection_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getConnectionIdFieldBuilder() { + if (connectionIdBuilder_ == null) { + connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getConnectionId(), getParentForChildren(), isClean()); + connectionId_ = null; + } + return connectionIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionEvent) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionEvent) + private static final context.ContextOuterClass.ConnectionEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionEvent(); + } + + public static context.ContextOuterClass.ConnectionEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EndPointIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.EndPointId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + boolean hasTopologyId(); + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + context.ContextOuterClass.TopologyId getTopologyId(); + + /** + * .context.TopologyId topology_id = 1; + */ + context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + boolean hasDeviceId(); + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + context.ContextOuterClass.DeviceId getDeviceId(); + + /** + * .context.DeviceId device_id = 2; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + + /** + * .context.Uuid endpoint_uuid = 3; + * @return Whether the endpointUuid field is set. + */ + boolean hasEndpointUuid(); + + /** + * .context.Uuid endpoint_uuid = 3; + * @return The endpointUuid. + */ + context.ContextOuterClass.Uuid getEndpointUuid(); + + /** + * .context.Uuid endpoint_uuid = 3; + */ + context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder(); + } + + /** + *
+     * ----- Endpoint ------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.EndPointId} + */ + public static final class EndPointId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.EndPointId) + EndPointIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use EndPointId.newBuilder() to construct. + private EndPointId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndPointId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointId.class, context.ContextOuterClass.EndPointId.Builder.class); + } + + public static final int TOPOLOGY_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.TopologyId topologyId_; + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + @java.lang.Override + public boolean hasTopologyId() { + return topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + @java.lang.Override + public context.ContextOuterClass.TopologyId getTopologyId() { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + + /** + * .context.TopologyId topology_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + return getTopologyId(); + } + + public static final int DEVICE_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.DeviceId deviceId_; + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + @java.lang.Override + public boolean hasDeviceId() { + return deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceId() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + + /** + * .context.DeviceId device_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + return getDeviceId(); + } + + public static final int ENDPOINT_UUID_FIELD_NUMBER = 3; + + private context.ContextOuterClass.Uuid endpointUuid_; + + /** + * .context.Uuid endpoint_uuid = 3; + * @return Whether the endpointUuid field is set. + */ + @java.lang.Override + public boolean hasEndpointUuid() { + return endpointUuid_ != null; + } + + /** + * .context.Uuid endpoint_uuid = 3; + * @return The endpointUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getEndpointUuid() { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { + return getEndpointUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (topologyId_ != null) { + output.writeMessage(1, getTopologyId()); + } + if (deviceId_ != null) { + output.writeMessage(2, getDeviceId()); + } + if (endpointUuid_ != null) { + output.writeMessage(3, getEndpointUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (topologyId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTopologyId()); + } + if (deviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeviceId()); + } + if (endpointUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndpointUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.EndPointId)) { + return super.equals(obj); + } + context.ContextOuterClass.EndPointId other = (context.ContextOuterClass.EndPointId) obj; + if (hasTopologyId() != other.hasTopologyId()) + return false; + if (hasTopologyId()) { + if (!getTopologyId().equals(other.getTopologyId())) + return false; + } + if (hasDeviceId() != other.hasDeviceId()) + return false; + if (hasDeviceId()) { + if (!getDeviceId().equals(other.getDeviceId())) + return false; + } + if (hasEndpointUuid() != other.hasEndpointUuid()) + return false; + if (hasEndpointUuid()) { + if (!getEndpointUuid().equals(other.getEndpointUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTopologyId()) { + hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; + hash = (53 * hash) + getTopologyId().hashCode(); + } + if (hasDeviceId()) { + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + } + if (hasEndpointUuid()) { + hash = (37 * hash) + ENDPOINT_UUID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.EndPointId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.EndPointId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Endpoint ------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.EndPointId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.EndPointId) + context.ContextOuterClass.EndPointIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_EndPointId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointId.class, context.ContextOuterClass.EndPointId.Builder.class); + } + + // 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; + topologyIdBuilder_ = null; + } + if (deviceIdBuilder_ == null) { + deviceId_ = null; + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + if (endpointUuidBuilder_ == null) { + endpointUuid_ = null; + } else { + endpointUuid_ = null; + endpointUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_EndPointId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointId getDefaultInstanceForType() { + return context.ContextOuterClass.EndPointId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.EndPointId build() { + context.ContextOuterClass.EndPointId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.EndPointId) { + return mergeFrom((context.ContextOuterClass.EndPointId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.EndPointId other) { + if (other == context.ContextOuterClass.EndPointId.getDefaultInstance()) + return this; + if (other.hasTopologyId()) { + mergeTopologyId(other.getTopologyId()); + } + if (other.hasDeviceId()) { + mergeDeviceId(other.getDeviceId()); + } + if (other.hasEndpointUuid()) { + mergeEndpointUuid(other.getEndpointUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.EndPointId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.TopologyId topologyId_; + + private com.google.protobuf.SingleFieldBuilderV3 topologyIdBuilder_; + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + public boolean hasTopologyId() { + return topologyIdBuilder_ != null || topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + public context.ContextOuterClass.TopologyId getTopologyId() { + if (topologyIdBuilder_ == null) { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } else { + return topologyIdBuilder_.getMessage(); + } + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topologyId_ = value; + onChanged(); + } else { + topologyIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdBuilder_ == null) { + topologyId_ = builderForValue.build(); + onChanged(); + } else { + topologyIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (topologyId_ != null) { + topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + } else { + topologyId_ = value; + } + onChanged(); + } else { + topologyIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder clearTopologyId() { + if (topologyIdBuilder_ == null) { + topologyId_ = null; + onChanged(); + } else { + topologyId_ = null; + topologyIdBuilder_ = null; + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + onChanged(); + return getTopologyIdFieldBuilder().getBuilder(); + } + + /** + * .context.TopologyId topology_id = 1; + */ + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + if (topologyIdBuilder_ != null) { + return topologyIdBuilder_.getMessageOrBuilder(); + } else { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + } + + /** + * .context.TopologyId topology_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTopologyIdFieldBuilder() { + if (topologyIdBuilder_ == null) { + topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTopologyId(), getParentForChildren(), isClean()); + topologyId_ = null; + } + return topologyIdBuilder_; + } + + private context.ContextOuterClass.DeviceId deviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceIdBuilder_; + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + public boolean hasDeviceId() { + return deviceIdBuilder_ != null || deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + public context.ContextOuterClass.DeviceId getDeviceId() { + if (deviceIdBuilder_ == null) { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } else { + return deviceIdBuilder_.getMessage(); + } + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceId_ = value; + onChanged(); + } else { + deviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdBuilder_ == null) { + deviceId_ = builderForValue.build(); + onChanged(); + } else { + deviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (deviceId_ != null) { + deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + } else { + deviceId_ = value; + } + onChanged(); + } else { + deviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder clearDeviceId() { + if (deviceIdBuilder_ == null) { + deviceId_ = null; + onChanged(); + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + onChanged(); + return getDeviceIdFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceId device_id = 2; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + if (deviceIdBuilder_ != null) { + return deviceIdBuilder_.getMessageOrBuilder(); + } else { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + } + + /** + * .context.DeviceId device_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdFieldBuilder() { + if (deviceIdBuilder_ == null) { + deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceId(), getParentForChildren(), isClean()); + deviceId_ = null; + } + return deviceIdBuilder_; + } + + private context.ContextOuterClass.Uuid endpointUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointUuidBuilder_; + + /** + * .context.Uuid endpoint_uuid = 3; + * @return Whether the endpointUuid field is set. + */ + public boolean hasEndpointUuid() { + return endpointUuidBuilder_ != null || endpointUuid_ != null; + } + + /** + * .context.Uuid endpoint_uuid = 3; + * @return The endpointUuid. + */ + public context.ContextOuterClass.Uuid getEndpointUuid() { + if (endpointUuidBuilder_ == null) { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; + } else { + return endpointUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder setEndpointUuid(context.ContextOuterClass.Uuid value) { + if (endpointUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointUuid_ = value; + onChanged(); + } else { + endpointUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder setEndpointUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (endpointUuidBuilder_ == null) { + endpointUuid_ = builderForValue.build(); + onChanged(); + } else { + endpointUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder mergeEndpointUuid(context.ContextOuterClass.Uuid value) { + if (endpointUuidBuilder_ == null) { + if (endpointUuid_ != null) { + endpointUuid_ = context.ContextOuterClass.Uuid.newBuilder(endpointUuid_).mergeFrom(value).buildPartial(); + } else { + endpointUuid_ = value; + } + onChanged(); + } else { + endpointUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder clearEndpointUuid() { + if (endpointUuidBuilder_ == null) { + endpointUuid_ = null; + onChanged(); + } else { + endpointUuid_ = null; + endpointUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public context.ContextOuterClass.Uuid.Builder getEndpointUuidBuilder() { + onChanged(); + return getEndpointUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { + if (endpointUuidBuilder_ != null) { + return endpointUuidBuilder_.getMessageOrBuilder(); + } else { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; + } + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointUuidFieldBuilder() { + if (endpointUuidBuilder_ == null) { + endpointUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointUuid(), getParentForChildren(), isClean()); + endpointUuid_ = null; + } + return endpointUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.EndPointId) + } + + // @@protoc_insertion_point(class_scope:context.EndPointId) + private static final context.ContextOuterClass.EndPointId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointId(); + } + + public static context.ContextOuterClass.EndPointId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EndPointOrBuilder extends // @@protoc_insertion_point(interface_extends:context.EndPoint) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + boolean hasEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + context.ContextOuterClass.EndPointId getEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * string endpoint_type = 3; + * @return The endpointType. + */ + java.lang.String getEndpointType(); + + /** + * string endpoint_type = 3; + * @return The bytes for endpointType. + */ + com.google.protobuf.ByteString getEndpointTypeBytes(); + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return A list containing the kpiSampleTypes. + */ + java.util.List getKpiSampleTypesList(); + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return The count of kpiSampleTypes. + */ + int getKpiSampleTypesCount(); + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the element to return. + * @return The kpiSampleTypes at the given index. + */ + kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleTypes(int index); + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return A list containing the enum numeric values on the wire for kpiSampleTypes. + */ + java.util.List getKpiSampleTypesValueList(); + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of kpiSampleTypes at the given index. + */ + int getKpiSampleTypesValue(int index); + + /** + * .context.Location endpoint_location = 5; + * @return Whether the endpointLocation field is set. + */ + boolean hasEndpointLocation(); + + /** + * .context.Location endpoint_location = 5; + * @return The endpointLocation. + */ + context.ContextOuterClass.Location getEndpointLocation(); + + /** + * .context.Location endpoint_location = 5; + */ + context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder(); + } + + /** + * Protobuf type {@code context.EndPoint} + */ + public static final class EndPoint extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.EndPoint) + EndPointOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use EndPoint.newBuilder() to construct. + private EndPoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndPoint() { + name_ = ""; + endpointType_ = ""; + kpiSampleTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPoint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPoint.class, context.ContextOuterClass.EndPoint.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.EndPointId endpointId_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + @java.lang.Override + public boolean hasEndpointId() { + return endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointId() { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + return getEndpointId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_TYPE_FIELD_NUMBER = 3; + + private volatile java.lang.Object endpointType_; + + /** + * string endpoint_type = 3; + * @return The endpointType. + */ + @java.lang.Override + public java.lang.String getEndpointType() { + java.lang.Object ref = endpointType_; + 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(); + endpointType_ = s; + return s; + } + } + + /** + * string endpoint_type = 3; + * @return The bytes for endpointType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointTypeBytes() { + java.lang.Object ref = endpointType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KPI_SAMPLE_TYPES_FIELD_NUMBER = 4; + + private java.util.List kpiSampleTypes_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter kpiSampleTypes_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter() { + + 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); + return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; + } + }; + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return A list containing the kpiSampleTypes. + */ + @java.lang.Override + public java.util.List getKpiSampleTypesList() { + return new com.google.protobuf.Internal.ListAdapter(kpiSampleTypes_, kpiSampleTypes_converter_); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return The count of kpiSampleTypes. + */ + @java.lang.Override + public int getKpiSampleTypesCount() { + return kpiSampleTypes_.size(); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the element to return. + * @return The kpiSampleTypes at the given index. + */ + @java.lang.Override + public kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleTypes(int index) { + return kpiSampleTypes_converter_.convert(kpiSampleTypes_.get(index)); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return A list containing the enum numeric values on the wire for kpiSampleTypes. + */ + @java.lang.Override + public java.util.List getKpiSampleTypesValueList() { + return kpiSampleTypes_; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of kpiSampleTypes at the given index. + */ + @java.lang.Override + public int getKpiSampleTypesValue(int index) { + return kpiSampleTypes_.get(index); + } + + private int kpiSampleTypesMemoizedSerializedSize; + + public static final int ENDPOINT_LOCATION_FIELD_NUMBER = 5; + + private context.ContextOuterClass.Location endpointLocation_; + + /** + * .context.Location endpoint_location = 5; + * @return Whether the endpointLocation field is set. + */ + @java.lang.Override + public boolean hasEndpointLocation() { + return endpointLocation_ != null; + } + + /** + * .context.Location endpoint_location = 5; + * @return The endpointLocation. + */ + @java.lang.Override + public context.ContextOuterClass.Location getEndpointLocation() { + return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; + } + + /** + * .context.Location endpoint_location = 5; + */ + @java.lang.Override + public context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder() { + return getEndpointLocation(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (endpointId_ != null) { + output.writeMessage(1, getEndpointId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getEndpointTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointType_); + } + if (getKpiSampleTypesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(kpiSampleTypesMemoizedSerializedSize); + } + for (int i = 0; i < kpiSampleTypes_.size(); i++) { + output.writeEnumNoTag(kpiSampleTypes_.get(i)); + } + if (endpointLocation_ != null) { + output.writeMessage(5, getEndpointLocation()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (endpointId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getEndpointTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointType_); + } + { + int dataSize = 0; + for (int i = 0; i < kpiSampleTypes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(kpiSampleTypes_.get(i)); + } + size += dataSize; + if (!getKpiSampleTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + kpiSampleTypesMemoizedSerializedSize = dataSize; + } + if (endpointLocation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndpointLocation()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.EndPoint)) { + return super.equals(obj); + } + context.ContextOuterClass.EndPoint other = (context.ContextOuterClass.EndPoint) obj; + if (hasEndpointId() != other.hasEndpointId()) + return false; + if (hasEndpointId()) { + if (!getEndpointId().equals(other.getEndpointId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getEndpointType().equals(other.getEndpointType())) + return false; + if (!kpiSampleTypes_.equals(other.kpiSampleTypes_)) + return false; + if (hasEndpointLocation() != other.hasEndpointLocation()) + return false; + if (hasEndpointLocation()) { + if (!getEndpointLocation().equals(other.getEndpointLocation())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointId()) { + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ENDPOINT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getEndpointType().hashCode(); + if (getKpiSampleTypesCount() > 0) { + hash = (37 * hash) + KPI_SAMPLE_TYPES_FIELD_NUMBER; + hash = (53 * hash) + kpiSampleTypes_.hashCode(); + } + if (hasEndpointLocation()) { + hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getEndpointLocation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.EndPoint parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPoint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPoint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPoint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPoint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPoint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPoint parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPoint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPoint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPoint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPoint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPoint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.EndPoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.EndPoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.EndPoint) + context.ContextOuterClass.EndPointOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_EndPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPoint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPoint.class, context.ContextOuterClass.EndPoint.Builder.class); + } + + // 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; + endpointIdBuilder_ = null; + } + name_ = ""; + endpointType_ = ""; + kpiSampleTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + if (endpointLocationBuilder_ == null) { + endpointLocation_ = null; + } else { + endpointLocation_ = null; + endpointLocationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_EndPoint_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.EndPoint getDefaultInstanceForType() { + return context.ContextOuterClass.EndPoint.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.EndPoint build() { + context.ContextOuterClass.EndPoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.EndPoint) { + return mergeFrom((context.ContextOuterClass.EndPoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.EndPoint other) { + if (other == context.ContextOuterClass.EndPoint.getDefaultInstance()) + return this; + if (other.hasEndpointId()) { + mergeEndpointId(other.getEndpointId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getEndpointType().isEmpty()) { + endpointType_ = other.endpointType_; + onChanged(); + } + if (!other.kpiSampleTypes_.isEmpty()) { + if (kpiSampleTypes_.isEmpty()) { + kpiSampleTypes_ = other.kpiSampleTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKpiSampleTypesIsMutable(); + kpiSampleTypes_.addAll(other.kpiSampleTypes_); + } + onChanged(); + } + if (other.hasEndpointLocation()) { + mergeEndpointLocation(other.getEndpointLocation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.EndPoint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.EndPointId endpointId_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + public boolean hasEndpointId() { + return endpointIdBuilder_ != null || endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + public context.ContextOuterClass.EndPointId getEndpointId() { + if (endpointIdBuilder_ == null) { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } else { + return endpointIdBuilder_.getMessage(); + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + onChanged(); + } else { + endpointIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdBuilder_ == null) { + endpointId_ = builderForValue.build(); + onChanged(); + } else { + endpointIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (endpointId_ != null) { + endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + } else { + endpointId_ = value; + } + onChanged(); + } else { + endpointIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder clearEndpointId() { + if (endpointIdBuilder_ == null) { + endpointId_ = null; + onChanged(); + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + onChanged(); + return getEndpointIdFieldBuilder().getBuilder(); + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + if (endpointIdBuilder_ != null) { + return endpointIdBuilder_.getMessageOrBuilder(); + } else { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointIdFieldBuilder() { + if (endpointIdBuilder_ == null) { + endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointId(), getParentForChildren(), isClean()); + endpointId_ = null; + } + return endpointIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object endpointType_ = ""; + + /** + * string endpoint_type = 3; + * @return The endpointType. + */ + public java.lang.String getEndpointType() { + java.lang.Object ref = endpointType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string endpoint_type = 3; + * @return The bytes for endpointType. + */ + public com.google.protobuf.ByteString getEndpointTypeBytes() { + java.lang.Object ref = endpointType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string endpoint_type = 3; + * @param value The endpointType to set. + * @return This builder for chaining. + */ + public Builder setEndpointType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpointType_ = value; + onChanged(); + return this; + } + + /** + * string endpoint_type = 3; + * @return This builder for chaining. + */ + public Builder clearEndpointType() { + endpointType_ = getDefaultInstance().getEndpointType(); + onChanged(); + return this; + } + + /** + * string endpoint_type = 3; + * @param value The bytes for endpointType to set. + * @return This builder for chaining. + */ + public Builder setEndpointTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpointType_ = value; + onChanged(); + return this; + } + + private java.util.List kpiSampleTypes_ = java.util.Collections.emptyList(); + + private void ensureKpiSampleTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + kpiSampleTypes_ = new java.util.ArrayList(kpiSampleTypes_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return A list containing the kpiSampleTypes. + */ + public java.util.List getKpiSampleTypesList() { + return new com.google.protobuf.Internal.ListAdapter(kpiSampleTypes_, kpiSampleTypes_converter_); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return The count of kpiSampleTypes. + */ + public int getKpiSampleTypesCount() { + return kpiSampleTypes_.size(); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the element to return. + * @return The kpiSampleTypes at the given index. + */ + public kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleTypes(int index) { + return kpiSampleTypes_converter_.convert(kpiSampleTypes_.get(index)); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index to set the value at. + * @param value The kpiSampleTypes to set. + * @return This builder for chaining. + */ + public Builder setKpiSampleTypes(int index, kpi_sample_types.KpiSampleTypes.KpiSampleType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiSampleTypesIsMutable(); + kpiSampleTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param value The kpiSampleTypes to add. + * @return This builder for chaining. + */ + public Builder addKpiSampleTypes(kpi_sample_types.KpiSampleTypes.KpiSampleType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiSampleTypesIsMutable(); + kpiSampleTypes_.add(value.getNumber()); + onChanged(); + return this; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param values The kpiSampleTypes to add. + * @return This builder for chaining. + */ + public Builder addAllKpiSampleTypes(java.lang.Iterable values) { + ensureKpiSampleTypesIsMutable(); + for (kpi_sample_types.KpiSampleTypes.KpiSampleType value : values) { + kpiSampleTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return This builder for chaining. + */ + public Builder clearKpiSampleTypes() { + kpiSampleTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return A list containing the enum numeric values on the wire for kpiSampleTypes. + */ + public java.util.List getKpiSampleTypesValueList() { + return java.util.Collections.unmodifiableList(kpiSampleTypes_); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of kpiSampleTypes at the given index. + */ + public int getKpiSampleTypesValue(int index) { + return kpiSampleTypes_.get(index); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of kpiSampleTypes at the given index. + * @return This builder for chaining. + */ + public Builder setKpiSampleTypesValue(int index, int value) { + ensureKpiSampleTypesIsMutable(); + kpiSampleTypes_.set(index, value); + onChanged(); + return this; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param value The enum numeric value on the wire for kpiSampleTypes to add. + * @return This builder for chaining. + */ + public Builder addKpiSampleTypesValue(int value) { + ensureKpiSampleTypesIsMutable(); + kpiSampleTypes_.add(value); + onChanged(); + return this; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param values The enum numeric values on the wire for kpiSampleTypes to add. + * @return This builder for chaining. + */ + public Builder addAllKpiSampleTypesValue(java.lang.Iterable values) { + ensureKpiSampleTypesIsMutable(); + for (int value : values) { + kpiSampleTypes_.add(value); + } + onChanged(); + return this; + } + + private context.ContextOuterClass.Location endpointLocation_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointLocationBuilder_; + + /** + * .context.Location endpoint_location = 5; + * @return Whether the endpointLocation field is set. + */ + public boolean hasEndpointLocation() { + return endpointLocationBuilder_ != null || endpointLocation_ != null; + } + + /** + * .context.Location endpoint_location = 5; + * @return The endpointLocation. + */ + public context.ContextOuterClass.Location getEndpointLocation() { + if (endpointLocationBuilder_ == null) { + return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; + } else { + return endpointLocationBuilder_.getMessage(); + } + } + + /** + * .context.Location endpoint_location = 5; + */ + public Builder setEndpointLocation(context.ContextOuterClass.Location value) { + if (endpointLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointLocation_ = value; + onChanged(); + } else { + endpointLocationBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Location endpoint_location = 5; + */ + public Builder setEndpointLocation(context.ContextOuterClass.Location.Builder builderForValue) { + if (endpointLocationBuilder_ == null) { + endpointLocation_ = builderForValue.build(); + onChanged(); + } else { + endpointLocationBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Location endpoint_location = 5; + */ + public Builder mergeEndpointLocation(context.ContextOuterClass.Location value) { + if (endpointLocationBuilder_ == null) { + if (endpointLocation_ != null) { + endpointLocation_ = context.ContextOuterClass.Location.newBuilder(endpointLocation_).mergeFrom(value).buildPartial(); + } else { + endpointLocation_ = value; + } + onChanged(); + } else { + endpointLocationBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Location endpoint_location = 5; + */ + public Builder clearEndpointLocation() { + if (endpointLocationBuilder_ == null) { + endpointLocation_ = null; + onChanged(); + } else { + endpointLocation_ = null; + endpointLocationBuilder_ = null; + } + return this; + } + + /** + * .context.Location endpoint_location = 5; + */ + public context.ContextOuterClass.Location.Builder getEndpointLocationBuilder() { + onChanged(); + return getEndpointLocationFieldBuilder().getBuilder(); + } + + /** + * .context.Location endpoint_location = 5; + */ + public context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder() { + if (endpointLocationBuilder_ != null) { + return endpointLocationBuilder_.getMessageOrBuilder(); + } else { + return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; + } + } + + /** + * .context.Location endpoint_location = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointLocationFieldBuilder() { + if (endpointLocationBuilder_ == null) { + endpointLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointLocation(), getParentForChildren(), isClean()); + endpointLocation_ = null; + } + return endpointLocationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.EndPoint) + } + + // @@protoc_insertion_point(class_scope:context.EndPoint) + private static final context.ContextOuterClass.EndPoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.EndPoint(); + } + + public static context.ContextOuterClass.EndPoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.EndPoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EndPointNameOrBuilder extends // @@protoc_insertion_point(interface_extends:context.EndPointName) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + boolean hasEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + context.ContextOuterClass.EndPointId getEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + + /** + * string device_name = 2; + * @return The deviceName. + */ + java.lang.String getDeviceName(); + + /** + * string device_name = 2; + * @return The bytes for deviceName. + */ + com.google.protobuf.ByteString getDeviceNameBytes(); + + /** + * string endpoint_name = 3; + * @return The endpointName. + */ + java.lang.String getEndpointName(); + + /** + * string endpoint_name = 3; + * @return The bytes for endpointName. + */ + com.google.protobuf.ByteString getEndpointNameBytes(); + + /** + * string endpoint_type = 4; + * @return The endpointType. + */ + java.lang.String getEndpointType(); + + /** + * string endpoint_type = 4; + * @return The bytes for endpointType. + */ + com.google.protobuf.ByteString getEndpointTypeBytes(); + } + + /** + * Protobuf type {@code context.EndPointName} + */ + public static final class EndPointName extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.EndPointName) + EndPointNameOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use EndPointName.newBuilder() to construct. + private EndPointName(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndPointName() { + deviceName_ = ""; + endpointName_ = ""; + endpointType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointName_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointName.class, context.ContextOuterClass.EndPointName.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.EndPointId endpointId_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + @java.lang.Override + public boolean hasEndpointId() { + return endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointId() { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + return getEndpointId(); + } + + public static final int DEVICE_NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object deviceName_; + + /** + * string device_name = 2; + * @return The deviceName. + */ + @java.lang.Override + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + 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(); + deviceName_ = s; + return s; + } + } + + /** + * string device_name = 2; + * @return The bytes for deviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_NAME_FIELD_NUMBER = 3; + + private volatile java.lang.Object endpointName_; + + /** + * string endpoint_name = 3; + * @return The endpointName. + */ + @java.lang.Override + public java.lang.String getEndpointName() { + java.lang.Object ref = endpointName_; + 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(); + endpointName_ = s; + return s; + } + } + + /** + * string endpoint_name = 3; + * @return The bytes for endpointName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointNameBytes() { + java.lang.Object ref = endpointName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_TYPE_FIELD_NUMBER = 4; + + private volatile java.lang.Object endpointType_; + + /** + * string endpoint_type = 4; + * @return The endpointType. + */ + @java.lang.Override + public java.lang.String getEndpointType() { + java.lang.Object ref = endpointType_; + 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(); + endpointType_ = s; + return s; + } + } + + /** + * string endpoint_type = 4; + * @return The bytes for endpointType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointTypeBytes() { + java.lang.Object ref = endpointType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (endpointId_ != null) { + output.writeMessage(1, getEndpointId()); + } + if (!getDeviceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceName_); + } + if (!getEndpointNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointName_); + } + if (!getEndpointTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, endpointType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (endpointId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId()); + } + if (!getDeviceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceName_); + } + if (!getEndpointNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointName_); + } + if (!getEndpointTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, endpointType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.EndPointName)) { + return super.equals(obj); + } + context.ContextOuterClass.EndPointName other = (context.ContextOuterClass.EndPointName) obj; + if (hasEndpointId() != other.hasEndpointId()) + return false; + if (hasEndpointId()) { + if (!getEndpointId().equals(other.getEndpointId())) + return false; + } + if (!getDeviceName().equals(other.getDeviceName())) + return false; + if (!getEndpointName().equals(other.getEndpointName())) + return false; + if (!getEndpointType().equals(other.getEndpointType())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointId()) { + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + } + hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDeviceName().hashCode(); + hash = (37 * hash) + ENDPOINT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getEndpointName().hashCode(); + hash = (37 * hash) + ENDPOINT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getEndpointType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.EndPointName parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointName parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointName parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointName parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointName parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointName parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointName parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointName parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointName parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointName parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointName parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointName parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.EndPointName prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.EndPointName} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.EndPointName) + context.ContextOuterClass.EndPointNameOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_EndPointName_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointName_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointName.class, context.ContextOuterClass.EndPointName.Builder.class); + } + + // 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; + endpointIdBuilder_ = null; + } + deviceName_ = ""; + endpointName_ = ""; + endpointType_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_EndPointName_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointName getDefaultInstanceForType() { + return context.ContextOuterClass.EndPointName.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.EndPointName build() { + context.ContextOuterClass.EndPointName result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.EndPointName) { + return mergeFrom((context.ContextOuterClass.EndPointName) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.EndPointName other) { + if (other == context.ContextOuterClass.EndPointName.getDefaultInstance()) + return this; + if (other.hasEndpointId()) { + mergeEndpointId(other.getEndpointId()); + } + if (!other.getDeviceName().isEmpty()) { + deviceName_ = other.deviceName_; + onChanged(); + } + if (!other.getEndpointName().isEmpty()) { + endpointName_ = other.endpointName_; + onChanged(); + } + if (!other.getEndpointType().isEmpty()) { + endpointType_ = other.endpointType_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.EndPointName) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.EndPointId endpointId_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + public boolean hasEndpointId() { + return endpointIdBuilder_ != null || endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + public context.ContextOuterClass.EndPointId getEndpointId() { + if (endpointIdBuilder_ == null) { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } else { + return endpointIdBuilder_.getMessage(); + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + onChanged(); + } else { + endpointIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdBuilder_ == null) { + endpointId_ = builderForValue.build(); + onChanged(); + } else { + endpointIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (endpointId_ != null) { + endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + } else { + endpointId_ = value; + } + onChanged(); + } else { + endpointIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder clearEndpointId() { + if (endpointIdBuilder_ == null) { + endpointId_ = null; + onChanged(); + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + onChanged(); + return getEndpointIdFieldBuilder().getBuilder(); + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + if (endpointIdBuilder_ != null) { + return endpointIdBuilder_.getMessageOrBuilder(); + } else { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointIdFieldBuilder() { + if (endpointIdBuilder_ == null) { + endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointId(), getParentForChildren(), isClean()); + endpointId_ = null; + } + return endpointIdBuilder_; + } + + private java.lang.Object deviceName_ = ""; + + /** + * string device_name = 2; + * @return The deviceName. + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string device_name = 2; + * @return The bytes for deviceName. + */ + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string device_name = 2; + * @param value The deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deviceName_ = value; + onChanged(); + return this; + } + + /** + * string device_name = 2; + * @return This builder for chaining. + */ + public Builder clearDeviceName() { + deviceName_ = getDefaultInstance().getDeviceName(); + onChanged(); + return this; + } + + /** + * string device_name = 2; + * @param value The bytes for deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object endpointName_ = ""; + + /** + * string endpoint_name = 3; + * @return The endpointName. + */ + public java.lang.String getEndpointName() { + java.lang.Object ref = endpointName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string endpoint_name = 3; + * @return The bytes for endpointName. + */ + public com.google.protobuf.ByteString getEndpointNameBytes() { + java.lang.Object ref = endpointName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string endpoint_name = 3; + * @param value The endpointName to set. + * @return This builder for chaining. + */ + public Builder setEndpointName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpointName_ = value; + onChanged(); + return this; + } + + /** + * string endpoint_name = 3; + * @return This builder for chaining. + */ + public Builder clearEndpointName() { + endpointName_ = getDefaultInstance().getEndpointName(); + onChanged(); + return this; + } + + /** + * string endpoint_name = 3; + * @param value The bytes for endpointName to set. + * @return This builder for chaining. + */ + public Builder setEndpointNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpointName_ = value; + onChanged(); + return this; + } + + private java.lang.Object endpointType_ = ""; + + /** + * string endpoint_type = 4; + * @return The endpointType. + */ + public java.lang.String getEndpointType() { + java.lang.Object ref = endpointType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string endpoint_type = 4; + * @return The bytes for endpointType. + */ + public com.google.protobuf.ByteString getEndpointTypeBytes() { + java.lang.Object ref = endpointType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string endpoint_type = 4; + * @param value The endpointType to set. + * @return This builder for chaining. + */ + public Builder setEndpointType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpointType_ = value; + onChanged(); + return this; + } + + /** + * string endpoint_type = 4; + * @return This builder for chaining. + */ + public Builder clearEndpointType() { + endpointType_ = getDefaultInstance().getEndpointType(); + onChanged(); + return this; + } + + /** + * string endpoint_type = 4; + * @param value The bytes for endpointType to set. + * @return This builder for chaining. + */ + public Builder setEndpointTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpointType_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.EndPointName) + } + + // @@protoc_insertion_point(class_scope:context.EndPointName) + private static final context.ContextOuterClass.EndPointName DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointName(); + } + + public static context.ContextOuterClass.EndPointName getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointName getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EndPointIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.EndPointIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + java.util.List getEndpointIdsList(); + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + context.ContextOuterClass.EndPointId getEndpointIds(int index); + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + int getEndpointIdsCount(); + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + java.util.List getEndpointIdsOrBuilderList(); + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.EndPointIdList} + */ + public static final class EndPointIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.EndPointIdList) + EndPointIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use EndPointIdList.newBuilder() to construct. + private EndPointIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndPointIdList() { + endpointIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointIdList.class, context.ContextOuterClass.EndPointIdList.Builder.class); + } + + public static final int ENDPOINT_IDS_FIELD_NUMBER = 1; + + private java.util.List endpointIds_; + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + @java.lang.Override + public java.util.List getEndpointIdsList() { + return endpointIds_; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + @java.lang.Override + public java.util.List getEndpointIdsOrBuilderList() { + return endpointIds_; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + @java.lang.Override + public int getEndpointIdsCount() { + return endpointIds_.size(); + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointIds(int index) { + return endpointIds_.get(index); + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder(int index) { + return endpointIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < endpointIds_.size(); i++) { + output.writeMessage(1, endpointIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < endpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpointIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.EndPointIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.EndPointIdList other = (context.ContextOuterClass.EndPointIdList) obj; + if (!getEndpointIdsList().equals(other.getEndpointIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEndpointIdsCount() > 0) { + hash = (37 * hash) + ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getEndpointIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.EndPointIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.EndPointIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.EndPointIdList) + context.ContextOuterClass.EndPointIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_EndPointIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointIdList.class, context.ContextOuterClass.EndPointIdList.Builder.class); + } + + // 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(); + if (endpointIdsBuilder_ == null) { + endpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + endpointIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_EndPointIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointIdList getDefaultInstanceForType() { + return context.ContextOuterClass.EndPointIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.EndPointIdList build() { + context.ContextOuterClass.EndPointIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointIdList buildPartial() { + context.ContextOuterClass.EndPointIdList result = new context.ContextOuterClass.EndPointIdList(this); + int from_bitField0_ = bitField0_; + if (endpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.endpointIds_ = endpointIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.EndPointIdList) { + return mergeFrom((context.ContextOuterClass.EndPointIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.EndPointIdList other) { + if (other == context.ContextOuterClass.EndPointIdList.getDefaultInstance()) + return this; + if (endpointIdsBuilder_ == null) { + if (!other.endpointIds_.isEmpty()) { + if (endpointIds_.isEmpty()) { + endpointIds_ = other.endpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEndpointIdsIsMutable(); + endpointIds_.addAll(other.endpointIds_); + } + onChanged(); + } + } else { + if (!other.endpointIds_.isEmpty()) { + if (endpointIdsBuilder_.isEmpty()) { + endpointIdsBuilder_.dispose(); + endpointIdsBuilder_ = null; + endpointIds_ = other.endpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + endpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndpointIdsFieldBuilder() : null; + } else { + endpointIdsBuilder_.addAllMessages(other.endpointIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.EndPointIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List endpointIds_ = java.util.Collections.emptyList(); + + private void ensureEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + endpointIds_ = new java.util.ArrayList(endpointIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 endpointIdsBuilder_; + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public java.util.List getEndpointIdsList() { + if (endpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(endpointIds_); + } else { + return endpointIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public int getEndpointIdsCount() { + if (endpointIdsBuilder_ == null) { + return endpointIds_.size(); + } else { + return endpointIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public context.ContextOuterClass.EndPointId getEndpointIds(int index) { + if (endpointIdsBuilder_ == null) { + return endpointIds_.get(index); + } else { + return endpointIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder setEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (endpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIdsIsMutable(); + endpointIds_.set(index, value); + onChanged(); + } else { + endpointIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder setEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.set(index, builderForValue.build()); + onChanged(); + } else { + endpointIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder addEndpointIds(context.ContextOuterClass.EndPointId value) { + if (endpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIdsIsMutable(); + endpointIds_.add(value); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder addEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (endpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIdsIsMutable(); + endpointIds_.add(index, value); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder addEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.add(builderForValue.build()); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder addEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.add(index, builderForValue.build()); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder addAllEndpointIds(java.lang.Iterable values) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endpointIds_); + onChanged(); + } else { + endpointIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder clearEndpointIds() { + if (endpointIdsBuilder_ == null) { + endpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + endpointIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder removeEndpointIds(int index) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.remove(index); + onChanged(); + } else { + endpointIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdsBuilder(int index) { + return getEndpointIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder(int index) { + if (endpointIdsBuilder_ == null) { + return endpointIds_.get(index); + } else { + return endpointIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public java.util.List getEndpointIdsOrBuilderList() { + if (endpointIdsBuilder_ != null) { + return endpointIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endpointIds_); + } + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder() { + return getEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder(int index) { + return getEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public java.util.List getEndpointIdsBuilderList() { + return getEndpointIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getEndpointIdsFieldBuilder() { + if (endpointIdsBuilder_ == null) { + endpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(endpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + endpointIds_ = null; + } + return endpointIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.EndPointIdList) + } + + // @@protoc_insertion_point(class_scope:context.EndPointIdList) + private static final context.ContextOuterClass.EndPointIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointIdList(); + } + + public static context.ContextOuterClass.EndPointIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EndPointNameListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.EndPointNameList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + java.util.List getEndpointNamesList(); + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + context.ContextOuterClass.EndPointName getEndpointNames(int index); + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + int getEndpointNamesCount(); + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + java.util.List getEndpointNamesOrBuilderList(); + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + context.ContextOuterClass.EndPointNameOrBuilder getEndpointNamesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.EndPointNameList} + */ + public static final class EndPointNameList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.EndPointNameList) + EndPointNameListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use EndPointNameList.newBuilder() to construct. + private EndPointNameList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndPointNameList() { + endpointNames_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointNameList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointNameList.class, context.ContextOuterClass.EndPointNameList.Builder.class); + } + + public static final int ENDPOINT_NAMES_FIELD_NUMBER = 1; + + private java.util.List endpointNames_; + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + @java.lang.Override + public java.util.List getEndpointNamesList() { + return endpointNames_; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + @java.lang.Override + public java.util.List getEndpointNamesOrBuilderList() { + return endpointNames_; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + @java.lang.Override + public int getEndpointNamesCount() { + return endpointNames_.size(); + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointName getEndpointNames(int index) { + return endpointNames_.get(index); + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointNameOrBuilder getEndpointNamesOrBuilder(int index) { + return endpointNames_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < endpointNames_.size(); i++) { + output.writeMessage(1, endpointNames_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < endpointNames_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpointNames_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.EndPointNameList)) { + return super.equals(obj); + } + context.ContextOuterClass.EndPointNameList other = (context.ContextOuterClass.EndPointNameList) obj; + if (!getEndpointNamesList().equals(other.getEndpointNamesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEndpointNamesCount() > 0) { + hash = (37 * hash) + ENDPOINT_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getEndpointNamesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointNameList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointNameList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.EndPointNameList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.EndPointNameList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.EndPointNameList) + context.ContextOuterClass.EndPointNameListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_EndPointNameList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointNameList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointNameList.class, context.ContextOuterClass.EndPointNameList.Builder.class); + } + + // 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(); + if (endpointNamesBuilder_ == null) { + endpointNames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + endpointNamesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_EndPointNameList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointNameList getDefaultInstanceForType() { + return context.ContextOuterClass.EndPointNameList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.EndPointNameList build() { + context.ContextOuterClass.EndPointNameList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointNameList buildPartial() { + context.ContextOuterClass.EndPointNameList result = new context.ContextOuterClass.EndPointNameList(this); + int from_bitField0_ = bitField0_; + if (endpointNamesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + endpointNames_ = java.util.Collections.unmodifiableList(endpointNames_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.endpointNames_ = endpointNames_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.EndPointNameList) { + return mergeFrom((context.ContextOuterClass.EndPointNameList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.EndPointNameList other) { + if (other == context.ContextOuterClass.EndPointNameList.getDefaultInstance()) + return this; + if (endpointNamesBuilder_ == null) { + if (!other.endpointNames_.isEmpty()) { + if (endpointNames_.isEmpty()) { + endpointNames_ = other.endpointNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEndpointNamesIsMutable(); + endpointNames_.addAll(other.endpointNames_); + } + onChanged(); + } + } else { + if (!other.endpointNames_.isEmpty()) { + if (endpointNamesBuilder_.isEmpty()) { + endpointNamesBuilder_.dispose(); + endpointNamesBuilder_ = null; + endpointNames_ = other.endpointNames_; + bitField0_ = (bitField0_ & ~0x00000001); + endpointNamesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndpointNamesFieldBuilder() : null; + } else { + endpointNamesBuilder_.addAllMessages(other.endpointNames_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.EndPointNameList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List endpointNames_ = java.util.Collections.emptyList(); + + private void ensureEndpointNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + endpointNames_ = new java.util.ArrayList(endpointNames_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 endpointNamesBuilder_; + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public java.util.List getEndpointNamesList() { + if (endpointNamesBuilder_ == null) { + return java.util.Collections.unmodifiableList(endpointNames_); + } else { + return endpointNamesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public int getEndpointNamesCount() { + if (endpointNamesBuilder_ == null) { + return endpointNames_.size(); + } else { + return endpointNamesBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public context.ContextOuterClass.EndPointName getEndpointNames(int index) { + if (endpointNamesBuilder_ == null) { + return endpointNames_.get(index); + } else { + return endpointNamesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder setEndpointNames(int index, context.ContextOuterClass.EndPointName value) { + if (endpointNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointNamesIsMutable(); + endpointNames_.set(index, value); + onChanged(); + } else { + endpointNamesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder setEndpointNames(int index, context.ContextOuterClass.EndPointName.Builder builderForValue) { + if (endpointNamesBuilder_ == null) { + ensureEndpointNamesIsMutable(); + endpointNames_.set(index, builderForValue.build()); + onChanged(); + } else { + endpointNamesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder addEndpointNames(context.ContextOuterClass.EndPointName value) { + if (endpointNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointNamesIsMutable(); + endpointNames_.add(value); + onChanged(); + } else { + endpointNamesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder addEndpointNames(int index, context.ContextOuterClass.EndPointName value) { + if (endpointNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointNamesIsMutable(); + endpointNames_.add(index, value); + onChanged(); + } else { + endpointNamesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder addEndpointNames(context.ContextOuterClass.EndPointName.Builder builderForValue) { + if (endpointNamesBuilder_ == null) { + ensureEndpointNamesIsMutable(); + endpointNames_.add(builderForValue.build()); + onChanged(); + } else { + endpointNamesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder addEndpointNames(int index, context.ContextOuterClass.EndPointName.Builder builderForValue) { + if (endpointNamesBuilder_ == null) { + ensureEndpointNamesIsMutable(); + endpointNames_.add(index, builderForValue.build()); + onChanged(); + } else { + endpointNamesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder addAllEndpointNames(java.lang.Iterable values) { + if (endpointNamesBuilder_ == null) { + ensureEndpointNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endpointNames_); + onChanged(); + } else { + endpointNamesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder clearEndpointNames() { + if (endpointNamesBuilder_ == null) { + endpointNames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + endpointNamesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder removeEndpointNames(int index) { + if (endpointNamesBuilder_ == null) { + ensureEndpointNamesIsMutable(); + endpointNames_.remove(index); + onChanged(); + } else { + endpointNamesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public context.ContextOuterClass.EndPointName.Builder getEndpointNamesBuilder(int index) { + return getEndpointNamesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public context.ContextOuterClass.EndPointNameOrBuilder getEndpointNamesOrBuilder(int index) { + if (endpointNamesBuilder_ == null) { + return endpointNames_.get(index); + } else { + return endpointNamesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public java.util.List getEndpointNamesOrBuilderList() { + if (endpointNamesBuilder_ != null) { + return endpointNamesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endpointNames_); + } + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public context.ContextOuterClass.EndPointName.Builder addEndpointNamesBuilder() { + return getEndpointNamesFieldBuilder().addBuilder(context.ContextOuterClass.EndPointName.getDefaultInstance()); + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public context.ContextOuterClass.EndPointName.Builder addEndpointNamesBuilder(int index) { + return getEndpointNamesFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointName.getDefaultInstance()); + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public java.util.List getEndpointNamesBuilderList() { + return getEndpointNamesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getEndpointNamesFieldBuilder() { + if (endpointNamesBuilder_ == null) { + endpointNamesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(endpointNames_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + endpointNames_ = null; + } + return endpointNamesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.EndPointNameList) + } + + // @@protoc_insertion_point(class_scope:context.EndPointNameList) + private static final context.ContextOuterClass.EndPointNameList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointNameList(); + } + + public static context.ContextOuterClass.EndPointNameList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointNameList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConfigRule_CustomOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConfigRule_Custom) + com.google.protobuf.MessageOrBuilder { + + /** + * string resource_key = 1; + * @return The resourceKey. + */ + java.lang.String getResourceKey(); + + /** + * string resource_key = 1; + * @return The bytes for resourceKey. + */ + com.google.protobuf.ByteString getResourceKeyBytes(); + + /** + * string resource_value = 2; + * @return The resourceValue. + */ + java.lang.String getResourceValue(); + + /** + * string resource_value = 2; + * @return The bytes for resourceValue. + */ + com.google.protobuf.ByteString getResourceValueBytes(); + } + + /** + * Protobuf type {@code context.ConfigRule_Custom} + */ + public static final class ConfigRule_Custom extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConfigRule_Custom) + ConfigRule_CustomOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConfigRule_Custom.newBuilder() to construct. + private ConfigRule_Custom(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigRule_Custom() { + resourceKey_ = ""; + resourceValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConfigRule_Custom.class, context.ContextOuterClass.ConfigRule_Custom.Builder.class); + } + + public static final int RESOURCE_KEY_FIELD_NUMBER = 1; + + private volatile java.lang.Object resourceKey_; + + /** + * string resource_key = 1; + * @return The resourceKey. + */ + @java.lang.Override + public java.lang.String getResourceKey() { + java.lang.Object ref = resourceKey_; + 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(); + resourceKey_ = s; + return s; + } + } + + /** + * string resource_key = 1; + * @return The bytes for resourceKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceKeyBytes() { + java.lang.Object ref = resourceKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_VALUE_FIELD_NUMBER = 2; + + private volatile java.lang.Object resourceValue_; + + /** + * string resource_value = 2; + * @return The resourceValue. + */ + @java.lang.Override + public java.lang.String getResourceValue() { + java.lang.Object ref = resourceValue_; + 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(); + resourceValue_ = s; + return s; + } + } + + /** + * string resource_value = 2; + * @return The bytes for resourceValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceValueBytes() { + java.lang.Object ref = resourceValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getResourceKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceKey_); + } + if (!getResourceValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getResourceKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceKey_); + } + if (!getResourceValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConfigRule_Custom)) { + return super.equals(obj); + } + context.ContextOuterClass.ConfigRule_Custom other = (context.ContextOuterClass.ConfigRule_Custom) obj; + if (!getResourceKey().equals(other.getResourceKey())) + return false; + if (!getResourceValue().equals(other.getResourceValue())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_KEY_FIELD_NUMBER; + hash = (53 * hash) + getResourceKey().hashCode(); + hash = (37 * hash) + RESOURCE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getResourceValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConfigRule_Custom prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConfigRule_Custom} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConfigRule_Custom) + context.ContextOuterClass.ConfigRule_CustomOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConfigRule_Custom.class, context.ContextOuterClass.ConfigRule_Custom.Builder.class); + } + + // 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(); + resourceKey_ = ""; + resourceValue_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule_Custom getDefaultInstanceForType() { + return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule_Custom build() { + context.ContextOuterClass.ConfigRule_Custom result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConfigRule_Custom) { + return mergeFrom((context.ContextOuterClass.ConfigRule_Custom) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConfigRule_Custom other) { + if (other == context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance()) + return this; + if (!other.getResourceKey().isEmpty()) { + resourceKey_ = other.resourceKey_; + onChanged(); + } + if (!other.getResourceValue().isEmpty()) { + resourceValue_ = other.resourceValue_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConfigRule_Custom) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object resourceKey_ = ""; + + /** + * string resource_key = 1; + * @return The resourceKey. + */ + public java.lang.String getResourceKey() { + java.lang.Object ref = resourceKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string resource_key = 1; + * @return The bytes for resourceKey. + */ + public com.google.protobuf.ByteString getResourceKeyBytes() { + java.lang.Object ref = resourceKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string resource_key = 1; + * @param value The resourceKey to set. + * @return This builder for chaining. + */ + public Builder setResourceKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceKey_ = value; + onChanged(); + return this; + } + + /** + * string resource_key = 1; + * @return This builder for chaining. + */ + public Builder clearResourceKey() { + resourceKey_ = getDefaultInstance().getResourceKey(); + onChanged(); + return this; + } + + /** + * string resource_key = 1; + * @param value The bytes for resourceKey to set. + * @return This builder for chaining. + */ + public Builder setResourceKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object resourceValue_ = ""; + + /** + * string resource_value = 2; + * @return The resourceValue. + */ + public java.lang.String getResourceValue() { + java.lang.Object ref = resourceValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string resource_value = 2; + * @return The bytes for resourceValue. + */ + public com.google.protobuf.ByteString getResourceValueBytes() { + java.lang.Object ref = resourceValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string resource_value = 2; + * @param value The resourceValue to set. + * @return This builder for chaining. + */ + public Builder setResourceValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceValue_ = value; + onChanged(); + return this; + } + + /** + * string resource_value = 2; + * @return This builder for chaining. + */ + public Builder clearResourceValue() { + resourceValue_ = getDefaultInstance().getResourceValue(); + onChanged(); + return this; + } + + /** + * string resource_value = 2; + * @param value The bytes for resourceValue to set. + * @return This builder for chaining. + */ + public Builder setResourceValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceValue_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConfigRule_Custom) + } + + // @@protoc_insertion_point(class_scope:context.ConfigRule_Custom) + private static final context.ContextOuterClass.ConfigRule_Custom DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConfigRule_Custom(); + } + + public static context.ContextOuterClass.ConfigRule_Custom getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule_Custom getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConfigRule_ACLOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConfigRule_ACL) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + boolean hasEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + context.ContextOuterClass.EndPointId getEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + + /** + * .acl.AclRuleSet rule_set = 2; + * @return Whether the ruleSet field is set. + */ + boolean hasRuleSet(); + + /** + * .acl.AclRuleSet rule_set = 2; + * @return The ruleSet. + */ + acl.Acl.AclRuleSet getRuleSet(); + + /** + * .acl.AclRuleSet rule_set = 2; + */ + acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder(); + } + + /** + * Protobuf type {@code context.ConfigRule_ACL} + */ + public static final class ConfigRule_ACL extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConfigRule_ACL) + ConfigRule_ACLOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConfigRule_ACL.newBuilder() to construct. + private ConfigRule_ACL(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigRule_ACL() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConfigRule_ACL.class, context.ContextOuterClass.ConfigRule_ACL.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.EndPointId endpointId_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + @java.lang.Override + public boolean hasEndpointId() { + return endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointId() { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + return getEndpointId(); + } + + public static final int RULE_SET_FIELD_NUMBER = 2; + + private acl.Acl.AclRuleSet ruleSet_; + + /** + * .acl.AclRuleSet rule_set = 2; + * @return Whether the ruleSet field is set. + */ + @java.lang.Override + public boolean hasRuleSet() { + return ruleSet_ != null; + } + + /** + * .acl.AclRuleSet rule_set = 2; + * @return The ruleSet. + */ + @java.lang.Override + public acl.Acl.AclRuleSet getRuleSet() { + return ruleSet_ == null ? acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + @java.lang.Override + public acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder() { + return getRuleSet(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (endpointId_ != null) { + output.writeMessage(1, getEndpointId()); + } + if (ruleSet_ != null) { + output.writeMessage(2, getRuleSet()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (endpointId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId()); + } + if (ruleSet_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRuleSet()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConfigRule_ACL)) { + return super.equals(obj); + } + context.ContextOuterClass.ConfigRule_ACL other = (context.ContextOuterClass.ConfigRule_ACL) obj; + if (hasEndpointId() != other.hasEndpointId()) + return false; + if (hasEndpointId()) { + if (!getEndpointId().equals(other.getEndpointId())) + return false; + } + if (hasRuleSet() != other.hasRuleSet()) + return false; + if (hasRuleSet()) { + if (!getRuleSet().equals(other.getRuleSet())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointId()) { + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + } + if (hasRuleSet()) { + hash = (37 * hash) + RULE_SET_FIELD_NUMBER; + hash = (53 * hash) + getRuleSet().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConfigRule_ACL prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConfigRule_ACL} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConfigRule_ACL) + context.ContextOuterClass.ConfigRule_ACLOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConfigRule_ACL.class, context.ContextOuterClass.ConfigRule_ACL.Builder.class); + } + + // 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; + endpointIdBuilder_ = null; + } + if (ruleSetBuilder_ == null) { + ruleSet_ = null; + } else { + ruleSet_ = null; + ruleSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACL getDefaultInstanceForType() { + return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACL build() { + context.ContextOuterClass.ConfigRule_ACL result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConfigRule_ACL) { + return mergeFrom((context.ContextOuterClass.ConfigRule_ACL) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConfigRule_ACL other) { + if (other == context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance()) + return this; + if (other.hasEndpointId()) { + mergeEndpointId(other.getEndpointId()); + } + if (other.hasRuleSet()) { + mergeRuleSet(other.getRuleSet()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConfigRule_ACL) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.EndPointId endpointId_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + public boolean hasEndpointId() { + return endpointIdBuilder_ != null || endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + public context.ContextOuterClass.EndPointId getEndpointId() { + if (endpointIdBuilder_ == null) { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } else { + return endpointIdBuilder_.getMessage(); + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + onChanged(); + } else { + endpointIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdBuilder_ == null) { + endpointId_ = builderForValue.build(); + onChanged(); + } else { + endpointIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (endpointId_ != null) { + endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + } else { + endpointId_ = value; + } + onChanged(); + } else { + endpointIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder clearEndpointId() { + if (endpointIdBuilder_ == null) { + endpointId_ = null; + onChanged(); + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + onChanged(); + return getEndpointIdFieldBuilder().getBuilder(); + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + if (endpointIdBuilder_ != null) { + return endpointIdBuilder_.getMessageOrBuilder(); + } else { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointIdFieldBuilder() { + if (endpointIdBuilder_ == null) { + endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointId(), getParentForChildren(), isClean()); + endpointId_ = null; + } + return endpointIdBuilder_; + } + + private acl.Acl.AclRuleSet ruleSet_; + + private com.google.protobuf.SingleFieldBuilderV3 ruleSetBuilder_; + + /** + * .acl.AclRuleSet rule_set = 2; + * @return Whether the ruleSet field is set. + */ + public boolean hasRuleSet() { + return ruleSetBuilder_ != null || ruleSet_ != null; + } + + /** + * .acl.AclRuleSet rule_set = 2; + * @return The ruleSet. + */ + public acl.Acl.AclRuleSet getRuleSet() { + if (ruleSetBuilder_ == null) { + return ruleSet_ == null ? acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; + } else { + return ruleSetBuilder_.getMessage(); + } + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + public Builder setRuleSet(acl.Acl.AclRuleSet value) { + if (ruleSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ruleSet_ = value; + onChanged(); + } else { + ruleSetBuilder_.setMessage(value); + } + return this; + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + public Builder setRuleSet(acl.Acl.AclRuleSet.Builder builderForValue) { + if (ruleSetBuilder_ == null) { + ruleSet_ = builderForValue.build(); + onChanged(); + } else { + ruleSetBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + public Builder mergeRuleSet(acl.Acl.AclRuleSet value) { + if (ruleSetBuilder_ == null) { + if (ruleSet_ != null) { + ruleSet_ = acl.Acl.AclRuleSet.newBuilder(ruleSet_).mergeFrom(value).buildPartial(); + } else { + ruleSet_ = value; + } + onChanged(); + } else { + ruleSetBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + public Builder clearRuleSet() { + if (ruleSetBuilder_ == null) { + ruleSet_ = null; + onChanged(); + } else { + ruleSet_ = null; + ruleSetBuilder_ = null; + } + return this; + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + public acl.Acl.AclRuleSet.Builder getRuleSetBuilder() { + onChanged(); + return getRuleSetFieldBuilder().getBuilder(); + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + public acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder() { + if (ruleSetBuilder_ != null) { + return ruleSetBuilder_.getMessageOrBuilder(); + } else { + return ruleSet_ == null ? acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; + } + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getRuleSetFieldBuilder() { + if (ruleSetBuilder_ == null) { + ruleSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getRuleSet(), getParentForChildren(), isClean()); + ruleSet_ = null; + } + return ruleSetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConfigRule_ACL) + } + + // @@protoc_insertion_point(class_scope:context.ConfigRule_ACL) + private static final context.ContextOuterClass.ConfigRule_ACL DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConfigRule_ACL(); + } + + public static context.ContextOuterClass.ConfigRule_ACL getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACL getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConfigRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConfigRule) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ConfigActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + + /** + * .context.ConfigActionEnum action = 1; + * @return The action. + */ + context.ContextOuterClass.ConfigActionEnum getAction(); + + /** + * .context.ConfigRule_Custom custom = 2; + * @return Whether the custom field is set. + */ + boolean hasCustom(); + + /** + * .context.ConfigRule_Custom custom = 2; + * @return The custom. + */ + context.ContextOuterClass.ConfigRule_Custom getCustom(); + + /** + * .context.ConfigRule_Custom custom = 2; + */ + context.ContextOuterClass.ConfigRule_CustomOrBuilder getCustomOrBuilder(); + + /** + * .context.ConfigRule_ACL acl = 3; + * @return Whether the acl field is set. + */ + boolean hasAcl(); + + /** + * .context.ConfigRule_ACL acl = 3; + * @return The acl. + */ + context.ContextOuterClass.ConfigRule_ACL getAcl(); + + /** + * .context.ConfigRule_ACL acl = 3; + */ + context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder(); + + public context.ContextOuterClass.ConfigRule.ConfigRuleCase getConfigRuleCase(); + } + + /** + * Protobuf type {@code context.ConfigRule} + */ + public static final class ConfigRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConfigRule) + ConfigRuleOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConfigRule.newBuilder() to construct. + private ConfigRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigRule() { + action_ = 0; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConfigRule_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConfigRule.class, context.ContextOuterClass.ConfigRule.Builder.class); + } + + private int configRuleCase_ = 0; + + private java.lang.Object configRule_; + + public enum ConfigRuleCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { + + CUSTOM(2), ACL(3), CONFIGRULE_NOT_SET(0); + + private final int value; + + private ConfigRuleCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConfigRuleCase valueOf(int value) { + return forNumber(value); + } + + public static ConfigRuleCase forNumber(int value) { + switch(value) { + case 2: + return CUSTOM; + case 3: + return ACL; + case 0: + return CONFIGRULE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + } + + public ConfigRuleCase getConfigRuleCase() { + return ConfigRuleCase.forNumber(configRuleCase_); + } + + public static final int ACTION_FIELD_NUMBER = 1; + + private int action_; + + /** + * .context.ConfigActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + + /** + * .context.ConfigActionEnum action = 1; + * @return The action. + */ + @java.lang.Override + public context.ContextOuterClass.ConfigActionEnum getAction() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.valueOf(action_); + return result == null ? context.ContextOuterClass.ConfigActionEnum.UNRECOGNIZED : result; + } + + public static final int CUSTOM_FIELD_NUMBER = 2; + + /** + * .context.ConfigRule_Custom custom = 2; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return configRuleCase_ == 2; + } + + /** + * .context.ConfigRule_Custom custom = 2; + * @return The custom. + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_Custom getCustom() { + if (configRuleCase_ == 2) { + return (context.ContextOuterClass.ConfigRule_Custom) configRule_; + } + return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_CustomOrBuilder getCustomOrBuilder() { + if (configRuleCase_ == 2) { + return (context.ContextOuterClass.ConfigRule_Custom) configRule_; + } + return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } + + public static final int ACL_FIELD_NUMBER = 3; + + /** + * .context.ConfigRule_ACL acl = 3; + * @return Whether the acl field is set. + */ + @java.lang.Override + public boolean hasAcl() { + return configRuleCase_ == 3; + } + + /** + * .context.ConfigRule_ACL acl = 3; + * @return The acl. + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACL getAcl() { + if (configRuleCase_ == 3) { + return (context.ContextOuterClass.ConfigRule_ACL) configRule_; + } + return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder() { + if (configRuleCase_ == 3) { + return (context.ContextOuterClass.ConfigRule_ACL) configRule_; + } + return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (action_ != context.ContextOuterClass.ConfigActionEnum.CONFIGACTION_UNDEFINED.getNumber()) { + output.writeEnum(1, action_); + } + if (configRuleCase_ == 2) { + output.writeMessage(2, (context.ContextOuterClass.ConfigRule_Custom) configRule_); + } + if (configRuleCase_ == 3) { + output.writeMessage(3, (context.ContextOuterClass.ConfigRule_ACL) configRule_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (action_ != context.ContextOuterClass.ConfigActionEnum.CONFIGACTION_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_); + } + if (configRuleCase_ == 2) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.ConfigRule_Custom) configRule_); + } + if (configRuleCase_ == 3) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, (context.ContextOuterClass.ConfigRule_ACL) configRule_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConfigRule)) { + return super.equals(obj); + } + context.ContextOuterClass.ConfigRule other = (context.ContextOuterClass.ConfigRule) obj; + if (action_ != other.action_) + return false; + if (!getConfigRuleCase().equals(other.getConfigRuleCase())) + return false; + switch(configRuleCase_) { + case 2: + if (!getCustom().equals(other.getCustom())) + return false; + break; + case 3: + if (!getAcl().equals(other.getAcl())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + switch(configRuleCase_) { + case 2: + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + getCustom().hashCode(); + break; + case 3: + hash = (37 * hash) + ACL_FIELD_NUMBER; + hash = (53 * hash) + getAcl().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConfigRule parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConfigRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConfigRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConfigRule) + context.ContextOuterClass.ConfigRuleOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConfigRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConfigRule_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConfigRule.class, context.ContextOuterClass.ConfigRule.Builder.class); + } + + // 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(); + action_ = 0; + configRuleCase_ = 0; + configRule_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConfigRule_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule getDefaultInstanceForType() { + return context.ContextOuterClass.ConfigRule.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule build() { + context.ContextOuterClass.ConfigRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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 (configRuleCase_ == 3) { + if (aclBuilder_ == null) { + result.configRule_ = configRule_; + } else { + result.configRule_ = aclBuilder_.build(); + } + } + result.configRuleCase_ = configRuleCase_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConfigRule) { + return mergeFrom((context.ContextOuterClass.ConfigRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConfigRule other) { + if (other == context.ContextOuterClass.ConfigRule.getDefaultInstance()) + return this; + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + switch(other.getConfigRuleCase()) { + case CUSTOM: + { + mergeCustom(other.getCustom()); + break; + } + case ACL: + { + mergeAcl(other.getAcl()); + break; + } + case CONFIGRULE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConfigRule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int configRuleCase_ = 0; + + private java.lang.Object configRule_; + + public ConfigRuleCase getConfigRuleCase() { + return ConfigRuleCase.forNumber(configRuleCase_); + } + + public Builder clearConfigRule() { + configRuleCase_ = 0; + configRule_ = null; + onChanged(); + return this; + } + + private int action_ = 0; + + /** + * .context.ConfigActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + + /** + * .context.ConfigActionEnum action = 1; + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + action_ = value; + onChanged(); + return this; + } + + /** + * .context.ConfigActionEnum action = 1; + * @return The action. + */ + @java.lang.Override + public context.ContextOuterClass.ConfigActionEnum getAction() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.valueOf(action_); + return result == null ? context.ContextOuterClass.ConfigActionEnum.UNRECOGNIZED : result; + } + + /** + * .context.ConfigActionEnum action = 1; + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(context.ContextOuterClass.ConfigActionEnum value) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.ConfigActionEnum action = 1; + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3 customBuilder_; + + /** + * .context.ConfigRule_Custom custom = 2; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return configRuleCase_ == 2; + } + + /** + * .context.ConfigRule_Custom custom = 2; + * @return The custom. + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_Custom getCustom() { + if (customBuilder_ == null) { + if (configRuleCase_ == 2) { + return (context.ContextOuterClass.ConfigRule_Custom) configRule_; + } + return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } else { + if (configRuleCase_ == 2) { + return customBuilder_.getMessage(); + } + return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + public Builder setCustom(context.ContextOuterClass.ConfigRule_Custom value) { + if (customBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configRule_ = value; + onChanged(); + } else { + customBuilder_.setMessage(value); + } + configRuleCase_ = 2; + return this; + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + public Builder setCustom(context.ContextOuterClass.ConfigRule_Custom.Builder builderForValue) { + if (customBuilder_ == null) { + configRule_ = builderForValue.build(); + onChanged(); + } else { + customBuilder_.setMessage(builderForValue.build()); + } + configRuleCase_ = 2; + return this; + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + public Builder mergeCustom(context.ContextOuterClass.ConfigRule_Custom value) { + if (customBuilder_ == null) { + if (configRuleCase_ == 2 && configRule_ != context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance()) { + configRule_ = context.ContextOuterClass.ConfigRule_Custom.newBuilder((context.ContextOuterClass.ConfigRule_Custom) configRule_).mergeFrom(value).buildPartial(); + } else { + configRule_ = value; + } + onChanged(); + } else { + if (configRuleCase_ == 2) { + customBuilder_.mergeFrom(value); + } + customBuilder_.setMessage(value); + } + configRuleCase_ = 2; + return this; + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + public Builder clearCustom() { + if (customBuilder_ == null) { + if (configRuleCase_ == 2) { + configRuleCase_ = 0; + configRule_ = null; + onChanged(); + } + } else { + if (configRuleCase_ == 2) { + configRuleCase_ = 0; + configRule_ = null; + } + customBuilder_.clear(); + } + return this; + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + public context.ContextOuterClass.ConfigRule_Custom.Builder getCustomBuilder() { + return getCustomFieldBuilder().getBuilder(); + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_CustomOrBuilder getCustomOrBuilder() { + if ((configRuleCase_ == 2) && (customBuilder_ != null)) { + return customBuilder_.getMessageOrBuilder(); + } else { + if (configRuleCase_ == 2) { + return (context.ContextOuterClass.ConfigRule_Custom) configRule_; + } + return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getCustomFieldBuilder() { + if (customBuilder_ == null) { + if (!(configRuleCase_ == 2)) { + configRule_ = context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } + customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.ConfigRule_Custom) configRule_, getParentForChildren(), isClean()); + configRule_ = null; + } + configRuleCase_ = 2; + onChanged(); + ; + return customBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3 aclBuilder_; + + /** + * .context.ConfigRule_ACL acl = 3; + * @return Whether the acl field is set. + */ + @java.lang.Override + public boolean hasAcl() { + return configRuleCase_ == 3; + } + + /** + * .context.ConfigRule_ACL acl = 3; + * @return The acl. + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACL getAcl() { + if (aclBuilder_ == null) { + if (configRuleCase_ == 3) { + return (context.ContextOuterClass.ConfigRule_ACL) configRule_; + } + return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } else { + if (configRuleCase_ == 3) { + return aclBuilder_.getMessage(); + } + return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + public Builder setAcl(context.ContextOuterClass.ConfigRule_ACL value) { + if (aclBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configRule_ = value; + onChanged(); + } else { + aclBuilder_.setMessage(value); + } + configRuleCase_ = 3; + return this; + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + public Builder setAcl(context.ContextOuterClass.ConfigRule_ACL.Builder builderForValue) { + if (aclBuilder_ == null) { + configRule_ = builderForValue.build(); + onChanged(); + } else { + aclBuilder_.setMessage(builderForValue.build()); + } + configRuleCase_ = 3; + return this; + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + public Builder mergeAcl(context.ContextOuterClass.ConfigRule_ACL value) { + if (aclBuilder_ == null) { + if (configRuleCase_ == 3 && configRule_ != context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance()) { + configRule_ = context.ContextOuterClass.ConfigRule_ACL.newBuilder((context.ContextOuterClass.ConfigRule_ACL) configRule_).mergeFrom(value).buildPartial(); + } else { + configRule_ = value; + } + onChanged(); + } else { + if (configRuleCase_ == 3) { + aclBuilder_.mergeFrom(value); + } + aclBuilder_.setMessage(value); + } + configRuleCase_ = 3; + return this; + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + public Builder clearAcl() { + if (aclBuilder_ == null) { + if (configRuleCase_ == 3) { + configRuleCase_ = 0; + configRule_ = null; + onChanged(); + } + } else { + if (configRuleCase_ == 3) { + configRuleCase_ = 0; + configRule_ = null; + } + aclBuilder_.clear(); + } + return this; + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + public context.ContextOuterClass.ConfigRule_ACL.Builder getAclBuilder() { + return getAclFieldBuilder().getBuilder(); + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder() { + if ((configRuleCase_ == 3) && (aclBuilder_ != null)) { + return aclBuilder_.getMessageOrBuilder(); + } else { + if (configRuleCase_ == 3) { + return (context.ContextOuterClass.ConfigRule_ACL) configRule_; + } + return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getAclFieldBuilder() { + if (aclBuilder_ == null) { + if (!(configRuleCase_ == 3)) { + configRule_ = context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } + aclBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.ConfigRule_ACL) configRule_, getParentForChildren(), isClean()); + configRule_ = null; + } + configRuleCase_ = 3; + onChanged(); + ; + return aclBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConfigRule) + } + + // @@protoc_insertion_point(class_scope:context.ConfigRule) + private static final context.ContextOuterClass.ConfigRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConfigRule(); + } + + public static context.ContextOuterClass.ConfigRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_CustomOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_Custom) + com.google.protobuf.MessageOrBuilder { + + /** + * string constraint_type = 1; + * @return The constraintType. + */ + java.lang.String getConstraintType(); + + /** + * string constraint_type = 1; + * @return The bytes for constraintType. + */ + com.google.protobuf.ByteString getConstraintTypeBytes(); + + /** + * string constraint_value = 2; + * @return The constraintValue. + */ + java.lang.String getConstraintValue(); + + /** + * string constraint_value = 2; + * @return The bytes for constraintValue. + */ + com.google.protobuf.ByteString getConstraintValueBytes(); + } + + /** + * Protobuf type {@code context.Constraint_Custom} + */ + public static final class Constraint_Custom extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_Custom) + Constraint_CustomOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_Custom.newBuilder() to construct. + private Constraint_Custom(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_Custom() { + constraintType_ = ""; + constraintValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_Custom_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_Custom.class, context.ContextOuterClass.Constraint_Custom.Builder.class); + } + + public static final int CONSTRAINT_TYPE_FIELD_NUMBER = 1; + + private volatile java.lang.Object constraintType_; + + /** + * string constraint_type = 1; + * @return The constraintType. + */ + @java.lang.Override + public java.lang.String getConstraintType() { + java.lang.Object ref = constraintType_; + 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(); + constraintType_ = s; + return s; + } + } + + /** + * string constraint_type = 1; + * @return The bytes for constraintType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConstraintTypeBytes() { + java.lang.Object ref = constraintType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + constraintType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONSTRAINT_VALUE_FIELD_NUMBER = 2; + + private volatile java.lang.Object constraintValue_; + + /** + * string constraint_value = 2; + * @return The constraintValue. + */ + @java.lang.Override + public java.lang.String getConstraintValue() { + java.lang.Object ref = constraintValue_; + 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(); + constraintValue_ = s; + return s; + } + } + + /** + * string constraint_value = 2; + * @return The bytes for constraintValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConstraintValueBytes() { + java.lang.Object ref = constraintValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + constraintValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getConstraintTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, constraintType_); + } + if (!getConstraintValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, constraintValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getConstraintTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, constraintType_); + } + if (!getConstraintValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, constraintValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_Custom)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint_Custom other = (context.ContextOuterClass.Constraint_Custom) obj; + if (!getConstraintType().equals(other.getConstraintType())) + return false; + if (!getConstraintValue().equals(other.getConstraintValue())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONSTRAINT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getConstraintType().hashCode(); + hash = (37 * hash) + CONSTRAINT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getConstraintValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Custom parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Custom parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_Custom prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_Custom} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_Custom) + context.ContextOuterClass.Constraint_CustomOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_Custom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_Custom_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_Custom.class, context.ContextOuterClass.Constraint_Custom.Builder.class); + } + + // 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(); + constraintType_ = ""; + constraintValue_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_Custom_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Custom getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Custom build() { + context.ContextOuterClass.Constraint_Custom result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_Custom) { + return mergeFrom((context.ContextOuterClass.Constraint_Custom) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_Custom other) { + if (other == context.ContextOuterClass.Constraint_Custom.getDefaultInstance()) + return this; + if (!other.getConstraintType().isEmpty()) { + constraintType_ = other.constraintType_; + onChanged(); + } + if (!other.getConstraintValue().isEmpty()) { + constraintValue_ = other.constraintValue_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_Custom) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object constraintType_ = ""; + + /** + * string constraint_type = 1; + * @return The constraintType. + */ + public java.lang.String getConstraintType() { + java.lang.Object ref = constraintType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + constraintType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string constraint_type = 1; + * @return The bytes for constraintType. + */ + public com.google.protobuf.ByteString getConstraintTypeBytes() { + java.lang.Object ref = constraintType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + constraintType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string constraint_type = 1; + * @param value The constraintType to set. + * @return This builder for chaining. + */ + public Builder setConstraintType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + constraintType_ = value; + onChanged(); + return this; + } + + /** + * string constraint_type = 1; + * @return This builder for chaining. + */ + public Builder clearConstraintType() { + constraintType_ = getDefaultInstance().getConstraintType(); + onChanged(); + return this; + } + + /** + * string constraint_type = 1; + * @param value The bytes for constraintType to set. + * @return This builder for chaining. + */ + public Builder setConstraintTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + constraintType_ = value; + onChanged(); + return this; + } + + private java.lang.Object constraintValue_ = ""; + + /** + * string constraint_value = 2; + * @return The constraintValue. + */ + public java.lang.String getConstraintValue() { + java.lang.Object ref = constraintValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + constraintValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string constraint_value = 2; + * @return The bytes for constraintValue. + */ + public com.google.protobuf.ByteString getConstraintValueBytes() { + java.lang.Object ref = constraintValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + constraintValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string constraint_value = 2; + * @param value The constraintValue to set. + * @return This builder for chaining. + */ + public Builder setConstraintValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + constraintValue_ = value; + onChanged(); + return this; + } + + /** + * string constraint_value = 2; + * @return This builder for chaining. + */ + public Builder clearConstraintValue() { + constraintValue_ = getDefaultInstance().getConstraintValue(); + onChanged(); + return this; + } + + /** + * string constraint_value = 2; + * @param value The bytes for constraintValue to set. + * @return This builder for chaining. + */ + public Builder setConstraintValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + constraintValue_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_Custom) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_Custom) + private static final context.ContextOuterClass.Constraint_Custom DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_Custom(); + } + + public static context.ContextOuterClass.Constraint_Custom getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Custom getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_ScheduleOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_Schedule) + com.google.protobuf.MessageOrBuilder { + + /** + * float start_timestamp = 1; + * @return The startTimestamp. + */ + float getStartTimestamp(); + + /** + * float duration_days = 2; + * @return The durationDays. + */ + float getDurationDays(); + } + + /** + * Protobuf type {@code context.Constraint_Schedule} + */ + public static final class Constraint_Schedule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_Schedule) + Constraint_ScheduleOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_Schedule.newBuilder() to construct. + private Constraint_Schedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_Schedule() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_Schedule_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_Schedule.class, context.ContextOuterClass.Constraint_Schedule.Builder.class); + } + + public static final int START_TIMESTAMP_FIELD_NUMBER = 1; + + private float startTimestamp_; + + /** + * float start_timestamp = 1; + * @return The startTimestamp. + */ + @java.lang.Override + public float getStartTimestamp() { + return startTimestamp_; + } + + public static final int DURATION_DAYS_FIELD_NUMBER = 2; + + private float durationDays_; + + /** + * float duration_days = 2; + * @return The durationDays. + */ + @java.lang.Override + public float getDurationDays() { + return durationDays_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (startTimestamp_ != 0F) { + output.writeFloat(1, startTimestamp_); + } + if (durationDays_ != 0F) { + output.writeFloat(2, durationDays_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (startTimestamp_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, startTimestamp_); + } + if (durationDays_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, durationDays_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_Schedule)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint_Schedule other = (context.ContextOuterClass.Constraint_Schedule) obj; + if (java.lang.Float.floatToIntBits(getStartTimestamp()) != java.lang.Float.floatToIntBits(other.getStartTimestamp())) + return false; + if (java.lang.Float.floatToIntBits(getDurationDays()) != java.lang.Float.floatToIntBits(other.getDurationDays())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Schedule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Schedule parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_Schedule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_Schedule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_Schedule) + context.ContextOuterClass.Constraint_ScheduleOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_Schedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_Schedule_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_Schedule.class, context.ContextOuterClass.Constraint_Schedule.Builder.class); + } + + // 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(); + startTimestamp_ = 0F; + durationDays_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_Schedule_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Schedule getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Schedule build() { + context.ContextOuterClass.Constraint_Schedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_Schedule) { + return mergeFrom((context.ContextOuterClass.Constraint_Schedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_Schedule other) { + if (other == context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) + return this; + if (other.getStartTimestamp() != 0F) { + setStartTimestamp(other.getStartTimestamp()); + } + if (other.getDurationDays() != 0F) { + setDurationDays(other.getDurationDays()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_Schedule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float startTimestamp_; + + /** + * float start_timestamp = 1; + * @return The startTimestamp. + */ + @java.lang.Override + public float getStartTimestamp() { + return startTimestamp_; + } + + /** + * float start_timestamp = 1; + * @param value The startTimestamp to set. + * @return This builder for chaining. + */ + public Builder setStartTimestamp(float value) { + startTimestamp_ = value; + onChanged(); + return this; + } + + /** + * float start_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearStartTimestamp() { + startTimestamp_ = 0F; + onChanged(); + return this; + } + + private float durationDays_; + + /** + * float duration_days = 2; + * @return The durationDays. + */ + @java.lang.Override + public float getDurationDays() { + return durationDays_; + } + + /** + * float duration_days = 2; + * @param value The durationDays to set. + * @return This builder for chaining. + */ + public Builder setDurationDays(float value) { + durationDays_ = value; + onChanged(); + return this; + } + + /** + * float duration_days = 2; + * @return This builder for chaining. + */ + public Builder clearDurationDays() { + durationDays_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_Schedule) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_Schedule) + private static final context.ContextOuterClass.Constraint_Schedule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_Schedule(); + } + + public static context.ContextOuterClass.Constraint_Schedule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Schedule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GPS_PositionOrBuilder extends // @@protoc_insertion_point(interface_extends:context.GPS_Position) + com.google.protobuf.MessageOrBuilder { + + /** + * float latitude = 1; + * @return The latitude. + */ + float getLatitude(); + + /** + * float longitude = 2; + * @return The longitude. + */ + float getLongitude(); + } + + /** + * Protobuf type {@code context.GPS_Position} + */ + public static final class GPS_Position extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.GPS_Position) + GPS_PositionOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use GPS_Position.newBuilder() to construct. + private GPS_Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GPS_Position() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_GPS_Position_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.GPS_Position.class, context.ContextOuterClass.GPS_Position.Builder.class); + } + + public static final int LATITUDE_FIELD_NUMBER = 1; + + private float latitude_; + + /** + * float latitude = 1; + * @return The latitude. + */ + @java.lang.Override + public float getLatitude() { + return latitude_; + } + + public static final int LONGITUDE_FIELD_NUMBER = 2; + + private float longitude_; + + /** + * float longitude = 2; + * @return The longitude. + */ + @java.lang.Override + public float getLongitude() { + return longitude_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (latitude_ != 0F) { + output.writeFloat(1, latitude_); + } + if (longitude_ != 0F) { + output.writeFloat(2, longitude_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (latitude_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, latitude_); + } + if (longitude_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, longitude_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.GPS_Position)) { + return super.equals(obj); + } + context.ContextOuterClass.GPS_Position other = (context.ContextOuterClass.GPS_Position) obj; + if (java.lang.Float.floatToIntBits(getLatitude()) != java.lang.Float.floatToIntBits(other.getLatitude())) + return false; + if (java.lang.Float.floatToIntBits(getLongitude()) != java.lang.Float.floatToIntBits(other.getLongitude())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LATITUDE_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.GPS_Position parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.GPS_Position parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.GPS_Position parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.GPS_Position prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.GPS_Position} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.GPS_Position) + context.ContextOuterClass.GPS_PositionOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_GPS_Position_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_GPS_Position_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.GPS_Position.class, context.ContextOuterClass.GPS_Position.Builder.class); + } + + // 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(); + latitude_ = 0F; + longitude_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_GPS_Position_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.GPS_Position getDefaultInstanceForType() { + return context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.GPS_Position build() { + context.ContextOuterClass.GPS_Position result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.GPS_Position) { + return mergeFrom((context.ContextOuterClass.GPS_Position) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.GPS_Position other) { + if (other == context.ContextOuterClass.GPS_Position.getDefaultInstance()) + return this; + if (other.getLatitude() != 0F) { + setLatitude(other.getLatitude()); + } + if (other.getLongitude() != 0F) { + setLongitude(other.getLongitude()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.GPS_Position) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float latitude_; + + /** + * float latitude = 1; + * @return The latitude. + */ + @java.lang.Override + public float getLatitude() { + return latitude_; + } + + /** + * float latitude = 1; + * @param value The latitude to set. + * @return This builder for chaining. + */ + public Builder setLatitude(float value) { + latitude_ = value; + onChanged(); + return this; + } + + /** + * float latitude = 1; + * @return This builder for chaining. + */ + public Builder clearLatitude() { + latitude_ = 0F; + onChanged(); + return this; + } + + private float longitude_; + + /** + * float longitude = 2; + * @return The longitude. + */ + @java.lang.Override + public float getLongitude() { + return longitude_; + } + + /** + * float longitude = 2; + * @param value The longitude to set. + * @return This builder for chaining. + */ + public Builder setLongitude(float value) { + longitude_ = value; + onChanged(); + return this; + } + + /** + * float longitude = 2; + * @return This builder for chaining. + */ + public Builder clearLongitude() { + longitude_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.GPS_Position) + } + + // @@protoc_insertion_point(class_scope:context.GPS_Position) + private static final context.ContextOuterClass.GPS_Position DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.GPS_Position(); + } + + public static context.ContextOuterClass.GPS_Position getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.GPS_Position getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LocationOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Location) + com.google.protobuf.MessageOrBuilder { + + /** + * string region = 1; + * @return Whether the region field is set. + */ + boolean hasRegion(); + + /** + * string region = 1; + * @return The region. + */ + java.lang.String getRegion(); + + /** + * string region = 1; + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); + + /** + * .context.GPS_Position gps_position = 2; + * @return Whether the gpsPosition field is set. + */ + boolean hasGpsPosition(); + + /** + * .context.GPS_Position gps_position = 2; + * @return The gpsPosition. + */ + context.ContextOuterClass.GPS_Position getGpsPosition(); + + /** + * .context.GPS_Position gps_position = 2; + */ + context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder(); + + public context.ContextOuterClass.Location.LocationCase getLocationCase(); + } + + /** + * Protobuf type {@code context.Location} + */ + public static final class Location extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Location) + LocationOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Location.newBuilder() to construct. + private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Location() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Location_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Location.class, context.ContextOuterClass.Location.Builder.class); + } + + private int locationCase_ = 0; + + private java.lang.Object location_; + + public enum LocationCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { + + REGION(1), GPS_POSITION(2), LOCATION_NOT_SET(0); + + private final int value; + + private LocationCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LocationCase valueOf(int value) { + return forNumber(value); + } + + public static LocationCase forNumber(int value) { + switch(value) { + case 1: + return REGION; + case 2: + return GPS_POSITION; + case 0: + return LOCATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + } + + public LocationCase getLocationCase() { + return LocationCase.forNumber(locationCase_); + } + + public static final int REGION_FIELD_NUMBER = 1; + + /** + * string region = 1; + * @return Whether the region field is set. + */ + public boolean hasRegion() { + return locationCase_ == 1; + } + + /** + * string region = 1; + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = ""; + if (locationCase_ == 1) { + ref = location_; + } + 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(); + if (locationCase_ == 1) { + location_ = s; + } + return s; + } + } + + /** + * string region = 1; + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = ""; + if (locationCase_ == 1) { + ref = location_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationCase_ == 1) { + location_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GPS_POSITION_FIELD_NUMBER = 2; + + /** + * .context.GPS_Position gps_position = 2; + * @return Whether the gpsPosition field is set. + */ + @java.lang.Override + public boolean hasGpsPosition() { + return locationCase_ == 2; + } + + /** + * .context.GPS_Position gps_position = 2; + * @return The gpsPosition. + */ + @java.lang.Override + public context.ContextOuterClass.GPS_Position getGpsPosition() { + if (locationCase_ == 2) { + return (context.ContextOuterClass.GPS_Position) location_; + } + return context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } + + /** + * .context.GPS_Position gps_position = 2; + */ + @java.lang.Override + public context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder() { + if (locationCase_ == 2) { + return (context.ContextOuterClass.GPS_Position) location_; + } + return context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (locationCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + } + if (locationCase_ == 2) { + output.writeMessage(2, (context.ContextOuterClass.GPS_Position) location_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (locationCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + } + if (locationCase_ == 2) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.GPS_Position) location_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Location)) { + return super.equals(obj); + } + context.ContextOuterClass.Location other = (context.ContextOuterClass.Location) obj; + if (!getLocationCase().equals(other.getLocationCase())) + return false; + switch(locationCase_) { + case 1: + if (!getRegion().equals(other.getRegion())) + return false; + break; + case 2: + if (!getGpsPosition().equals(other.getGpsPosition())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch(locationCase_) { + case 1: + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + break; + case 2: + hash = (37 * hash) + GPS_POSITION_FIELD_NUMBER; + hash = (53 * hash) + getGpsPosition().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Location parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Location parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Location parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Location parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Location parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Location parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Location parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Location parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Location parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Location parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Location parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Location parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Location prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Location} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Location) + context.ContextOuterClass.LocationOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Location_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Location.class, context.ContextOuterClass.Location.Builder.class); + } + + // 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(); + locationCase_ = 0; + location_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Location_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Location getDefaultInstanceForType() { + return context.ContextOuterClass.Location.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Location build() { + context.ContextOuterClass.Location result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + } + result.locationCase_ = locationCase_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Location) { + return mergeFrom((context.ContextOuterClass.Location) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Location other) { + if (other == context.ContextOuterClass.Location.getDefaultInstance()) + return this; + switch(other.getLocationCase()) { + case REGION: + { + locationCase_ = 1; + location_ = other.location_; + onChanged(); + break; + } + case GPS_POSITION: + { + mergeGpsPosition(other.getGpsPosition()); + break; + } + case LOCATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Location) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int locationCase_ = 0; + + private java.lang.Object location_; + + public LocationCase getLocationCase() { + return LocationCase.forNumber(locationCase_); + } + + public Builder clearLocation() { + locationCase_ = 0; + location_ = null; + onChanged(); + return this; + } + + /** + * string region = 1; + * @return Whether the region field is set. + */ + @java.lang.Override + public boolean hasRegion() { + return locationCase_ == 1; + } + + /** + * string region = 1; + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = ""; + if (locationCase_ == 1) { + ref = location_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (locationCase_ == 1) { + location_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string region = 1; + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = ""; + if (locationCase_ == 1) { + ref = location_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationCase_ == 1) { + location_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string region = 1; + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + locationCase_ = 1; + location_ = value; + onChanged(); + return this; + } + + /** + * string region = 1; + * @return This builder for chaining. + */ + public Builder clearRegion() { + if (locationCase_ == 1) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + return this; + } + + /** + * string region = 1; + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + locationCase_ = 1; + location_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3 gpsPositionBuilder_; + + /** + * .context.GPS_Position gps_position = 2; + * @return Whether the gpsPosition field is set. + */ + @java.lang.Override + public boolean hasGpsPosition() { + return locationCase_ == 2; + } + + /** + * .context.GPS_Position gps_position = 2; + * @return The gpsPosition. + */ + @java.lang.Override + public context.ContextOuterClass.GPS_Position getGpsPosition() { + if (gpsPositionBuilder_ == null) { + if (locationCase_ == 2) { + return (context.ContextOuterClass.GPS_Position) location_; + } + return context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } else { + if (locationCase_ == 2) { + return gpsPositionBuilder_.getMessage(); + } + return context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } + } + + /** + * .context.GPS_Position gps_position = 2; + */ + public Builder setGpsPosition(context.ContextOuterClass.GPS_Position value) { + if (gpsPositionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + gpsPositionBuilder_.setMessage(value); + } + locationCase_ = 2; + return this; + } + + /** + * .context.GPS_Position gps_position = 2; + */ + public Builder setGpsPosition(context.ContextOuterClass.GPS_Position.Builder builderForValue) { + if (gpsPositionBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + gpsPositionBuilder_.setMessage(builderForValue.build()); + } + locationCase_ = 2; + return this; + } + + /** + * .context.GPS_Position gps_position = 2; + */ + public Builder mergeGpsPosition(context.ContextOuterClass.GPS_Position value) { + if (gpsPositionBuilder_ == null) { + if (locationCase_ == 2 && location_ != context.ContextOuterClass.GPS_Position.getDefaultInstance()) { + location_ = context.ContextOuterClass.GPS_Position.newBuilder((context.ContextOuterClass.GPS_Position) location_).mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + if (locationCase_ == 2) { + gpsPositionBuilder_.mergeFrom(value); + } + gpsPositionBuilder_.setMessage(value); + } + locationCase_ = 2; + return this; + } + + /** + * .context.GPS_Position gps_position = 2; + */ + public Builder clearGpsPosition() { + if (gpsPositionBuilder_ == null) { + if (locationCase_ == 2) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + } else { + if (locationCase_ == 2) { + locationCase_ = 0; + location_ = null; + } + gpsPositionBuilder_.clear(); + } + return this; + } + + /** + * .context.GPS_Position gps_position = 2; + */ + public context.ContextOuterClass.GPS_Position.Builder getGpsPositionBuilder() { + return getGpsPositionFieldBuilder().getBuilder(); + } + + /** + * .context.GPS_Position gps_position = 2; + */ + @java.lang.Override + public context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder() { + if ((locationCase_ == 2) && (gpsPositionBuilder_ != null)) { + return gpsPositionBuilder_.getMessageOrBuilder(); + } else { + if (locationCase_ == 2) { + return (context.ContextOuterClass.GPS_Position) location_; + } + return context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } + } + + /** + * .context.GPS_Position gps_position = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getGpsPositionFieldBuilder() { + if (gpsPositionBuilder_ == null) { + if (!(locationCase_ == 2)) { + location_ = context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } + gpsPositionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.GPS_Position) location_, getParentForChildren(), isClean()); + location_ = null; + } + locationCase_ = 2; + onChanged(); + ; + return gpsPositionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Location) + } + + // @@protoc_insertion_point(class_scope:context.Location) + private static final context.ContextOuterClass.Location DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Location(); + } + + public static context.ContextOuterClass.Location getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Location getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_EndPointLocationOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_EndPointLocation) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + boolean hasEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + context.ContextOuterClass.EndPointId getEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + + /** + * .context.Location location = 2; + * @return Whether the location field is set. + */ + boolean hasLocation(); + + /** + * .context.Location location = 2; + * @return The location. + */ + context.ContextOuterClass.Location getLocation(); + + /** + * .context.Location location = 2; + */ + context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder(); + } + + /** + * Protobuf type {@code context.Constraint_EndPointLocation} + */ + public static final class Constraint_EndPointLocation extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_EndPointLocation) + Constraint_EndPointLocationOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_EndPointLocation.newBuilder() to construct. + private Constraint_EndPointLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_EndPointLocation() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_EndPointLocation.class, context.ContextOuterClass.Constraint_EndPointLocation.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.EndPointId endpointId_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + @java.lang.Override + public boolean hasEndpointId() { + return endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointId() { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + return getEndpointId(); + } + + public static final int LOCATION_FIELD_NUMBER = 2; + + private context.ContextOuterClass.Location location_; + + /** + * .context.Location location = 2; + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return location_ != null; + } + + /** + * .context.Location location = 2; + * @return The location. + */ + @java.lang.Override + public context.ContextOuterClass.Location getLocation() { + return location_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : location_; + } + + /** + * .context.Location location = 2; + */ + @java.lang.Override + public context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder() { + return getLocation(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (endpointId_ != null) { + output.writeMessage(1, getEndpointId()); + } + if (location_ != null) { + output.writeMessage(2, getLocation()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (endpointId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId()); + } + if (location_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLocation()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_EndPointLocation)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint_EndPointLocation other = (context.ContextOuterClass.Constraint_EndPointLocation) obj; + if (hasEndpointId() != other.hasEndpointId()) + return false; + if (hasEndpointId()) { + if (!getEndpointId().equals(other.getEndpointId())) + return false; + } + if (hasLocation() != other.hasLocation()) + return false; + if (hasLocation()) { + if (!getLocation().equals(other.getLocation())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointId()) { + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + } + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_EndPointLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_EndPointLocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_EndPointLocation) + context.ContextOuterClass.Constraint_EndPointLocationOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_EndPointLocation.class, context.ContextOuterClass.Constraint_EndPointLocation.Builder.class); + } + + // 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; + endpointIdBuilder_ = null; + } + if (locationBuilder_ == null) { + location_ = null; + } else { + location_ = null; + locationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocation getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocation build() { + context.ContextOuterClass.Constraint_EndPointLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_EndPointLocation) { + return mergeFrom((context.ContextOuterClass.Constraint_EndPointLocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_EndPointLocation other) { + if (other == context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance()) + return this; + if (other.hasEndpointId()) { + mergeEndpointId(other.getEndpointId()); + } + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_EndPointLocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.EndPointId endpointId_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + public boolean hasEndpointId() { + return endpointIdBuilder_ != null || endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + public context.ContextOuterClass.EndPointId getEndpointId() { + if (endpointIdBuilder_ == null) { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } else { + return endpointIdBuilder_.getMessage(); + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + onChanged(); + } else { + endpointIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdBuilder_ == null) { + endpointId_ = builderForValue.build(); + onChanged(); + } else { + endpointIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (endpointId_ != null) { + endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + } else { + endpointId_ = value; + } + onChanged(); + } else { + endpointIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder clearEndpointId() { + if (endpointIdBuilder_ == null) { + endpointId_ = null; + onChanged(); + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + onChanged(); + return getEndpointIdFieldBuilder().getBuilder(); + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + if (endpointIdBuilder_ != null) { + return endpointIdBuilder_.getMessageOrBuilder(); + } else { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointIdFieldBuilder() { + if (endpointIdBuilder_ == null) { + endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointId(), getParentForChildren(), isClean()); + endpointId_ = null; + } + return endpointIdBuilder_; + } + + private context.ContextOuterClass.Location location_; + + private com.google.protobuf.SingleFieldBuilderV3 locationBuilder_; + + /** + * .context.Location location = 2; + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return locationBuilder_ != null || location_ != null; + } + + /** + * .context.Location location = 2; + * @return The location. + */ + public context.ContextOuterClass.Location getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + + /** + * .context.Location location = 2; + */ + public Builder setLocation(context.ContextOuterClass.Location value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + locationBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Location location = 2; + */ + public Builder setLocation(context.ContextOuterClass.Location.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Location location = 2; + */ + public Builder mergeLocation(context.ContextOuterClass.Location value) { + if (locationBuilder_ == null) { + if (location_ != null) { + location_ = context.ContextOuterClass.Location.newBuilder(location_).mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + locationBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Location location = 2; + */ + public Builder clearLocation() { + if (locationBuilder_ == null) { + location_ = null; + onChanged(); + } else { + location_ = null; + locationBuilder_ = null; + } + return this; + } + + /** + * .context.Location location = 2; + */ + public context.ContextOuterClass.Location.Builder getLocationBuilder() { + onChanged(); + return getLocationFieldBuilder().getBuilder(); + } + + /** + * .context.Location location = 2; + */ + public context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : location_; + } + } + + /** + * .context.Location location = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getLocation(), getParentForChildren(), isClean()); + location_ = null; + } + return locationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_EndPointLocation) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_EndPointLocation) + private static final context.ContextOuterClass.Constraint_EndPointLocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_EndPointLocation(); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_EndPointPriorityOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_EndPointPriority) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + boolean hasEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + context.ContextOuterClass.EndPointId getEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + + /** + * uint32 priority = 2; + * @return The priority. + */ + int getPriority(); + } + + /** + * Protobuf type {@code context.Constraint_EndPointPriority} + */ + public static final class Constraint_EndPointPriority extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_EndPointPriority) + Constraint_EndPointPriorityOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_EndPointPriority.newBuilder() to construct. + private Constraint_EndPointPriority(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_EndPointPriority() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_EndPointPriority.class, context.ContextOuterClass.Constraint_EndPointPriority.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.EndPointId endpointId_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + @java.lang.Override + public boolean hasEndpointId() { + return endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointId() { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + return getEndpointId(); + } + + public static final int PRIORITY_FIELD_NUMBER = 2; + + private int priority_; + + /** + * uint32 priority = 2; + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (endpointId_ != null) { + output.writeMessage(1, getEndpointId()); + } + if (priority_ != 0) { + output.writeUInt32(2, priority_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (endpointId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId()); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, priority_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_EndPointPriority)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint_EndPointPriority other = (context.ContextOuterClass.Constraint_EndPointPriority) obj; + if (hasEndpointId() != other.hasEndpointId()) + return false; + if (hasEndpointId()) { + if (!getEndpointId().equals(other.getEndpointId())) + return false; + } + if (getPriority() != other.getPriority()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointId()) { + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + } + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_EndPointPriority prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_EndPointPriority} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_EndPointPriority) + context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_EndPointPriority.class, context.ContextOuterClass.Constraint_EndPointPriority.Builder.class); + } + + // 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; + endpointIdBuilder_ = null; + } + priority_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriority getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriority build() { + context.ContextOuterClass.Constraint_EndPointPriority result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_EndPointPriority) { + return mergeFrom((context.ContextOuterClass.Constraint_EndPointPriority) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_EndPointPriority other) { + if (other == context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance()) + return this; + if (other.hasEndpointId()) { + mergeEndpointId(other.getEndpointId()); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_EndPointPriority) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.EndPointId endpointId_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + public boolean hasEndpointId() { + return endpointIdBuilder_ != null || endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + public context.ContextOuterClass.EndPointId getEndpointId() { + if (endpointIdBuilder_ == null) { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } else { + return endpointIdBuilder_.getMessage(); + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + onChanged(); + } else { + endpointIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdBuilder_ == null) { + endpointId_ = builderForValue.build(); + onChanged(); + } else { + endpointIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (endpointId_ != null) { + endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + } else { + endpointId_ = value; + } + onChanged(); + } else { + endpointIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder clearEndpointId() { + if (endpointIdBuilder_ == null) { + endpointId_ = null; + onChanged(); + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + onChanged(); + return getEndpointIdFieldBuilder().getBuilder(); + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + if (endpointIdBuilder_ != null) { + return endpointIdBuilder_.getMessageOrBuilder(); + } else { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointIdFieldBuilder() { + if (endpointIdBuilder_ == null) { + endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointId(), getParentForChildren(), isClean()); + endpointId_ = null; + } + return endpointIdBuilder_; + } + + private int priority_; + + /** + * uint32 priority = 2; + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + /** + * uint32 priority = 2; + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + priority_ = value; + onChanged(); + return this; + } + + /** + * uint32 priority = 2; + * @return This builder for chaining. + */ + public Builder clearPriority() { + priority_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_EndPointPriority) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_EndPointPriority) + private static final context.ContextOuterClass.Constraint_EndPointPriority DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_EndPointPriority(); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriority getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_SLA_LatencyOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Latency) + com.google.protobuf.MessageOrBuilder { + + /** + * float e2e_latency_ms = 1; + * @return The e2eLatencyMs. + */ + float getE2ELatencyMs(); + } + + /** + * Protobuf type {@code context.Constraint_SLA_Latency} + */ + public static final class Constraint_SLA_Latency extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Latency) + Constraint_SLA_LatencyOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_SLA_Latency.newBuilder() to construct. + private Constraint_SLA_Latency(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_SLA_Latency() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Latency.class, context.ContextOuterClass.Constraint_SLA_Latency.Builder.class); + } + + public static final int E2E_LATENCY_MS_FIELD_NUMBER = 1; + + private float e2ELatencyMs_; + + /** + * float e2e_latency_ms = 1; + * @return The e2eLatencyMs. + */ + @java.lang.Override + public float getE2ELatencyMs() { + return e2ELatencyMs_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (e2ELatencyMs_ != 0F) { + output.writeFloat(1, e2ELatencyMs_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (e2ELatencyMs_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, e2ELatencyMs_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Latency)) { + return super.equals(obj); + } + 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)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Latency prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_SLA_Latency} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Latency) + context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Latency.class, context.ContextOuterClass.Constraint_SLA_Latency.Builder.class); + } + + // 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(); + e2ELatencyMs_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Latency getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Latency build() { + context.ContextOuterClass.Constraint_SLA_Latency result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_SLA_Latency) { + return mergeFrom((context.ContextOuterClass.Constraint_SLA_Latency) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Latency other) { + if (other == context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance()) + return this; + if (other.getE2ELatencyMs() != 0F) { + setE2ELatencyMs(other.getE2ELatencyMs()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_SLA_Latency) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float e2ELatencyMs_; + + /** + * float e2e_latency_ms = 1; + * @return The e2eLatencyMs. + */ + @java.lang.Override + public float getE2ELatencyMs() { + return e2ELatencyMs_; + } + + /** + * float e2e_latency_ms = 1; + * @param value The e2eLatencyMs to set. + * @return This builder for chaining. + */ + public Builder setE2ELatencyMs(float value) { + e2ELatencyMs_ = value; + onChanged(); + return this; + } + + /** + * float e2e_latency_ms = 1; + * @return This builder for chaining. + */ + public Builder clearE2ELatencyMs() { + e2ELatencyMs_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Latency) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Latency) + private static final context.ContextOuterClass.Constraint_SLA_Latency DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Latency(); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Latency getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_SLA_CapacityOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Capacity) + com.google.protobuf.MessageOrBuilder { + + /** + * float capacity_gbps = 1; + * @return The capacityGbps. + */ + float getCapacityGbps(); + } + + /** + * Protobuf type {@code context.Constraint_SLA_Capacity} + */ + public static final class Constraint_SLA_Capacity extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Capacity) + Constraint_SLA_CapacityOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_SLA_Capacity.newBuilder() to construct. + private Constraint_SLA_Capacity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_SLA_Capacity() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Capacity.class, context.ContextOuterClass.Constraint_SLA_Capacity.Builder.class); + } + + public static final int CAPACITY_GBPS_FIELD_NUMBER = 1; + + private float capacityGbps_; + + /** + * float capacity_gbps = 1; + * @return The capacityGbps. + */ + @java.lang.Override + public float getCapacityGbps() { + return capacityGbps_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (capacityGbps_ != 0F) { + output.writeFloat(1, capacityGbps_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (capacityGbps_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, capacityGbps_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Capacity)) { + return super.equals(obj); + } + 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)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Capacity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_SLA_Capacity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Capacity) + context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Capacity.class, context.ContextOuterClass.Constraint_SLA_Capacity.Builder.class); + } + + // 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(); + capacityGbps_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Capacity getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Capacity build() { + context.ContextOuterClass.Constraint_SLA_Capacity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_SLA_Capacity) { + return mergeFrom((context.ContextOuterClass.Constraint_SLA_Capacity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Capacity other) { + if (other == context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance()) + return this; + if (other.getCapacityGbps() != 0F) { + setCapacityGbps(other.getCapacityGbps()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_SLA_Capacity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float capacityGbps_; + + /** + * float capacity_gbps = 1; + * @return The capacityGbps. + */ + @java.lang.Override + public float getCapacityGbps() { + return capacityGbps_; + } + + /** + * float capacity_gbps = 1; + * @param value The capacityGbps to set. + * @return This builder for chaining. + */ + public Builder setCapacityGbps(float value) { + capacityGbps_ = value; + onChanged(); + return this; + } + + /** + * float capacity_gbps = 1; + * @return This builder for chaining. + */ + public Builder clearCapacityGbps() { + capacityGbps_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Capacity) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Capacity) + private static final context.ContextOuterClass.Constraint_SLA_Capacity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Capacity(); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Capacity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_SLA_AvailabilityOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Availability) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 num_disjoint_paths = 1; + * @return The numDisjointPaths. + */ + int getNumDisjointPaths(); + + /** + * bool all_active = 2; + * @return The allActive. + */ + boolean getAllActive(); + + /** + *
+         * 0.0 .. 100.0 percentage of availability
+         * 
+ * + * float availability = 3; + * @return The availability. + */ + float getAvailability(); + } + + /** + * Protobuf type {@code context.Constraint_SLA_Availability} + */ + public static final class Constraint_SLA_Availability extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Availability) + Constraint_SLA_AvailabilityOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_SLA_Availability.newBuilder() to construct. + private Constraint_SLA_Availability(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_SLA_Availability() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Availability.class, context.ContextOuterClass.Constraint_SLA_Availability.Builder.class); + } + + public static final int NUM_DISJOINT_PATHS_FIELD_NUMBER = 1; + + private int numDisjointPaths_; + + /** + * uint32 num_disjoint_paths = 1; + * @return The numDisjointPaths. + */ + @java.lang.Override + public int getNumDisjointPaths() { + return numDisjointPaths_; + } + + public static final int ALL_ACTIVE_FIELD_NUMBER = 2; + + private boolean allActive_; + + /** + * bool all_active = 2; + * @return The allActive. + */ + @java.lang.Override + public boolean getAllActive() { + return allActive_; + } + + public static final int AVAILABILITY_FIELD_NUMBER = 3; + + private float availability_; + + /** + *
+         * 0.0 .. 100.0 percentage of availability
+         * 
+ * + * float availability = 3; + * @return The availability. + */ + @java.lang.Override + public float getAvailability() { + return availability_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (numDisjointPaths_ != 0) { + output.writeUInt32(1, numDisjointPaths_); + } + if (allActive_ != false) { + output.writeBool(2, allActive_); + } + if (availability_ != 0F) { + output.writeFloat(3, availability_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (numDisjointPaths_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(1, numDisjointPaths_); + } + if (allActive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allActive_); + } + if (availability_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, availability_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Availability)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint_SLA_Availability other = (context.ContextOuterClass.Constraint_SLA_Availability) obj; + if (getNumDisjointPaths() != other.getNumDisjointPaths()) + return false; + if (getAllActive() != other.getAllActive()) + return false; + if (java.lang.Float.floatToIntBits(getAvailability()) != java.lang.Float.floatToIntBits(other.getAvailability())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NUM_DISJOINT_PATHS_FIELD_NUMBER; + hash = (53 * hash) + getNumDisjointPaths(); + hash = (37 * hash) + ALL_ACTIVE_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Availability prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_SLA_Availability} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Availability) + context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Availability.class, context.ContextOuterClass.Constraint_SLA_Availability.Builder.class); + } + + // 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(); + numDisjointPaths_ = 0; + allActive_ = false; + availability_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Availability getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Availability build() { + context.ContextOuterClass.Constraint_SLA_Availability result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_SLA_Availability) { + return mergeFrom((context.ContextOuterClass.Constraint_SLA_Availability) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Availability other) { + if (other == context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance()) + return this; + if (other.getNumDisjointPaths() != 0) { + setNumDisjointPaths(other.getNumDisjointPaths()); + } + if (other.getAllActive() != false) { + setAllActive(other.getAllActive()); + } + if (other.getAvailability() != 0F) { + setAvailability(other.getAvailability()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_SLA_Availability) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int numDisjointPaths_; + + /** + * uint32 num_disjoint_paths = 1; + * @return The numDisjointPaths. + */ + @java.lang.Override + public int getNumDisjointPaths() { + return numDisjointPaths_; + } + + /** + * uint32 num_disjoint_paths = 1; + * @param value The numDisjointPaths to set. + * @return This builder for chaining. + */ + public Builder setNumDisjointPaths(int value) { + numDisjointPaths_ = value; + onChanged(); + return this; + } + + /** + * uint32 num_disjoint_paths = 1; + * @return This builder for chaining. + */ + public Builder clearNumDisjointPaths() { + numDisjointPaths_ = 0; + onChanged(); + return this; + } + + private boolean allActive_; + + /** + * bool all_active = 2; + * @return The allActive. + */ + @java.lang.Override + public boolean getAllActive() { + return allActive_; + } + + /** + * bool all_active = 2; + * @param value The allActive to set. + * @return This builder for chaining. + */ + public Builder setAllActive(boolean value) { + allActive_ = value; + onChanged(); + return this; + } + + /** + * bool all_active = 2; + * @return This builder for chaining. + */ + public Builder clearAllActive() { + allActive_ = false; + onChanged(); + return this; + } + + private float availability_; + + /** + *
+             * 0.0 .. 100.0 percentage of availability
+             * 
+ * + * float availability = 3; + * @return The availability. + */ + @java.lang.Override + public float getAvailability() { + return availability_; + } + + /** + *
+             * 0.0 .. 100.0 percentage of availability
+             * 
+ * + * float availability = 3; + * @param value The availability to set. + * @return This builder for chaining. + */ + public Builder setAvailability(float value) { + availability_ = value; + onChanged(); + return this; + } + + /** + *
+             * 0.0 .. 100.0 percentage of availability
+             * 
+ * + * float availability = 3; + * @return This builder for chaining. + */ + public Builder clearAvailability() { + availability_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Availability) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Availability) + private static final context.ContextOuterClass.Constraint_SLA_Availability DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Availability(); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Availability getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - } + public interface Constraint_SLA_Isolation_levelOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Isolation_level) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return A list containing the isolationLevel. + */ + java.util.List getIsolationLevelList(); + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return The count of isolationLevel. + */ + int getIsolationLevelCount(); + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the element to return. + * @return The isolationLevel at the given index. + */ + context.ContextOuterClass.IsolationLevelEnum getIsolationLevel(int index); + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return A list containing the enum numeric values on the wire for isolationLevel. + */ + java.util.List getIsolationLevelValueList(); - public interface DeviceOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Device) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of isolationLevel at the given index. + */ + int getIsolationLevelValue(int index); + } /** - * .context.DeviceId device_id = 1; - * @return Whether the deviceId field is set. - */ - boolean hasDeviceId(); - /** - * .context.DeviceId device_id = 1; - * @return The deviceId. - */ - context.ContextOuterClass.DeviceId getDeviceId(); - /** - * .context.DeviceId device_id = 1; + * Protobuf type {@code context.Constraint_SLA_Isolation_level} */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + public static final class Constraint_SLA_Isolation_level extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Isolation_level) + Constraint_SLA_Isolation_levelOrBuilder { - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + private static final long serialVersionUID = 0L; - /** - * string device_type = 3; - * @return The deviceType. - */ - java.lang.String getDeviceType(); - /** - * string device_type = 3; - * @return The bytes for deviceType. - */ - com.google.protobuf.ByteString - getDeviceTypeBytes(); + // Use Constraint_SLA_Isolation_level.newBuilder() to construct. + private Constraint_SLA_Isolation_level(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - /** - * .context.DeviceConfig device_config = 4; - * @return Whether the deviceConfig field is set. - */ - boolean hasDeviceConfig(); - /** - * .context.DeviceConfig device_config = 4; - * @return The deviceConfig. - */ - context.ContextOuterClass.DeviceConfig getDeviceConfig(); - /** - * .context.DeviceConfig device_config = 4; - */ - context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder(); + private Constraint_SLA_Isolation_level() { + isolationLevel_ = java.util.Collections.emptyList(); + } - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return The enum numeric value on the wire for deviceOperationalStatus. - */ - int getDeviceOperationalStatusValue(); - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return The deviceOperationalStatus. - */ - context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus(); + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Constraint_SLA_Isolation_level(); + } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return A list containing the deviceDrivers. - */ - java.util.List getDeviceDriversList(); - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return The count of deviceDrivers. - */ - int getDeviceDriversCount(); - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the element to return. - * @return The deviceDrivers at the given index. - */ - context.ContextOuterClass.DeviceDriverEnum getDeviceDrivers(int index); - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return A list containing the enum numeric values on the wire for deviceDrivers. - */ - java.util.List - getDeviceDriversValueList(); - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of deviceDrivers at the given index. - */ - int getDeviceDriversValue(int index); + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - java.util.List - getDeviceEndpointsList(); - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - context.ContextOuterClass.EndPoint getDeviceEndpoints(int index); - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - int getDeviceEndpointsCount(); - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - java.util.List - getDeviceEndpointsOrBuilderList(); - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - context.ContextOuterClass.EndPointOrBuilder getDeviceEndpointsOrBuilder( - int index); + 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(); + 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(); + 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(); + } + } - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - java.util.List - getComponentsList(); - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - context.ContextOuterClass.Component getComponents(int index); - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - int getComponentsCount(); - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - java.util.List - getComponentsOrBuilderList(); - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder( - int index); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_descriptor; + } - /** - *
-     * Identifier of node controlling the actual device
-     * 
- * - * .context.DeviceId controller_id = 9; - * @return Whether the controllerId field is set. - */ - boolean hasControllerId(); - /** - *
-     * Identifier of node controlling the actual device
-     * 
- * - * .context.DeviceId controller_id = 9; - * @return The controllerId. - */ - context.ContextOuterClass.DeviceId getControllerId(); - /** - *
-     * Identifier of node controlling the actual device
-     * 
- * - * .context.DeviceId controller_id = 9; - */ - context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder(); - } - /** - * Protobuf type {@code context.Device} - */ - public static final class Device extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Device) - DeviceOrBuilder { - private static final long serialVersionUID = 0L; - // Use Device.newBuilder() to construct. - private Device(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Device() { - name_ = ""; - deviceType_ = ""; - deviceOperationalStatus_ = 0; - deviceDrivers_ = java.util.Collections.emptyList(); - deviceEndpoints_ = java.util.Collections.emptyList(); - components_ = java.util.Collections.emptyList(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Isolation_level.class, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder.class); + } + + public static final int ISOLATION_LEVEL_FIELD_NUMBER = 1; + + private java.util.List isolationLevel_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter isolationLevel_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter() { + + public context.ContextOuterClass.IsolationLevelEnum convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + context.ContextOuterClass.IsolationLevelEnum result = context.ContextOuterClass.IsolationLevelEnum.valueOf(from); + return result == null ? context.ContextOuterClass.IsolationLevelEnum.UNRECOGNIZED : result; + } + }; + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return A list containing the isolationLevel. + */ + @java.lang.Override + public java.util.List getIsolationLevelList() { + return new com.google.protobuf.Internal.ListAdapter(isolationLevel_, isolationLevel_converter_); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return The count of isolationLevel. + */ + @java.lang.Override + public int getIsolationLevelCount() { + return isolationLevel_.size(); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the element to return. + * @return The isolationLevel at the given index. + */ + @java.lang.Override + public context.ContextOuterClass.IsolationLevelEnum getIsolationLevel(int index) { + return isolationLevel_converter_.convert(isolationLevel_.get(index)); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return A list containing the enum numeric values on the wire for isolationLevel. + */ + @java.lang.Override + public java.util.List getIsolationLevelValueList() { + return isolationLevel_; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of isolationLevel at the given index. + */ + @java.lang.Override + public int getIsolationLevelValue(int index) { + return isolationLevel_.get(index); + } + + private int isolationLevelMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (getIsolationLevelList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(isolationLevelMemoizedSerializedSize); + } + for (int i = 0; i < isolationLevel_.size(); i++) { + output.writeEnumNoTag(isolationLevel_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + { + int dataSize = 0; + for (int i = 0; i < isolationLevel_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(isolationLevel_.get(i)); + } + size += dataSize; + if (!getIsolationLevelList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + isolationLevelMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Isolation_level)) { + return super.equals(obj); + } + 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)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIsolationLevelCount() > 0) { + hash = (37 * hash) + ISOLATION_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + isolationLevel_.hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Isolation_level prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_SLA_Isolation_level} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Isolation_level) + context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Isolation_level.class, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder.class); + } + + // 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(); + isolationLevel_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_level getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_level build() { + context.ContextOuterClass.Constraint_SLA_Isolation_level result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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); + } + 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); + } + + @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.Constraint_SLA_Isolation_level) { + return mergeFrom((context.ContextOuterClass.Constraint_SLA_Isolation_level) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Isolation_level other) { + if (other == context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance()) + return this; + if (!other.isolationLevel_.isEmpty()) { + if (isolationLevel_.isEmpty()) { + isolationLevel_ = other.isolationLevel_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIsolationLevelIsMutable(); + isolationLevel_.addAll(other.isolationLevel_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_SLA_Isolation_level) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List isolationLevel_ = java.util.Collections.emptyList(); + + private void ensureIsolationLevelIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + isolationLevel_ = new java.util.ArrayList(isolationLevel_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return A list containing the isolationLevel. + */ + public java.util.List getIsolationLevelList() { + return new com.google.protobuf.Internal.ListAdapter(isolationLevel_, isolationLevel_converter_); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return The count of isolationLevel. + */ + public int getIsolationLevelCount() { + return isolationLevel_.size(); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the element to return. + * @return The isolationLevel at the given index. + */ + public context.ContextOuterClass.IsolationLevelEnum getIsolationLevel(int index) { + return isolationLevel_converter_.convert(isolationLevel_.get(index)); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index to set the value at. + * @param value The isolationLevel to set. + * @return This builder for chaining. + */ + public Builder setIsolationLevel(int index, context.ContextOuterClass.IsolationLevelEnum value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIsolationLevelIsMutable(); + isolationLevel_.set(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param value The isolationLevel to add. + * @return This builder for chaining. + */ + public Builder addIsolationLevel(context.ContextOuterClass.IsolationLevelEnum value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIsolationLevelIsMutable(); + isolationLevel_.add(value.getNumber()); + onChanged(); + return this; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param values The isolationLevel to add. + * @return This builder for chaining. + */ + public Builder addAllIsolationLevel(java.lang.Iterable values) { + ensureIsolationLevelIsMutable(); + for (context.ContextOuterClass.IsolationLevelEnum value : values) { + isolationLevel_.add(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return This builder for chaining. + */ + public Builder clearIsolationLevel() { + isolationLevel_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return A list containing the enum numeric values on the wire for isolationLevel. + */ + public java.util.List getIsolationLevelValueList() { + return java.util.Collections.unmodifiableList(isolationLevel_); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of isolationLevel at the given index. + */ + public int getIsolationLevelValue(int index) { + return isolationLevel_.get(index); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of isolationLevel at the given index. + * @return This builder for chaining. + */ + public Builder setIsolationLevelValue(int index, int value) { + ensureIsolationLevelIsMutable(); + isolationLevel_.set(index, value); + onChanged(); + return this; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param value The enum numeric value on the wire for isolationLevel to add. + * @return This builder for chaining. + */ + public Builder addIsolationLevelValue(int value) { + ensureIsolationLevelIsMutable(); + isolationLevel_.add(value); + onChanged(); + return this; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param values The enum numeric values on the wire for isolationLevel to add. + * @return This builder for chaining. + */ + public Builder addAllIsolationLevelValue(java.lang.Iterable values) { + ensureIsolationLevelIsMutable(); + for (int value : values) { + isolationLevel_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Isolation_level) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Isolation_level) + private static final context.ContextOuterClass.Constraint_SLA_Isolation_level DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Isolation_level(); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_level getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Device(); - } + public interface Constraint_ExclusionsOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_Exclusions) + com.google.protobuf.MessageOrBuilder { + + /** + * bool is_permanent = 1; + * @return The isPermanent. + */ + boolean getIsPermanent(); + + /** + * repeated .context.DeviceId device_ids = 2; + */ + java.util.List getDeviceIdsList(); + + /** + * repeated .context.DeviceId device_ids = 2; + */ + context.ContextOuterClass.DeviceId getDeviceIds(int index); + + /** + * repeated .context.DeviceId device_ids = 2; + */ + int getDeviceIdsCount(); + + /** + * repeated .context.DeviceId device_ids = 2; + */ + java.util.List getDeviceIdsOrBuilderList(); + + /** + * repeated .context.DeviceId device_ids = 2; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index); - @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(); - 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(); - mutable_bitField0_ |= 0x00000001; - } - deviceDrivers_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - deviceEndpoints_ = new java.util.ArrayList(); - 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(); - 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; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + java.util.List getEndpointIdsList(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Device_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Device.class, context.ContextOuterClass.Device.Builder.class); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointId getEndpointIds(int index); - public static final int DEVICE_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.DeviceId deviceId_; - /** - * .context.DeviceId device_id = 1; - * @return Whether the deviceId field is set. - */ - @java.lang.Override - public boolean hasDeviceId() { - return deviceId_ != null; - } - /** - * .context.DeviceId device_id = 1; - * @return The deviceId. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceId() { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - /** - * .context.DeviceId device_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + int getEndpointIdsCount(); - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + java.util.List getEndpointIdsOrBuilderList(); - public static final int DEVICE_TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object deviceType_; - /** - * string device_type = 3; - * @return The deviceType. - */ - @java.lang.Override - public java.lang.String getDeviceType() { - java.lang.Object ref = deviceType_; - 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(); - deviceType_ = s; - return s; - } - } - /** - * string device_type = 3; - * @return The bytes for deviceType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDeviceTypeBytes() { - java.lang.Object ref = deviceType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deviceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder(int index); - public static final int DEVICE_CONFIG_FIELD_NUMBER = 4; - private context.ContextOuterClass.DeviceConfig deviceConfig_; - /** - * .context.DeviceConfig device_config = 4; - * @return Whether the deviceConfig field is set. - */ - @java.lang.Override - public boolean hasDeviceConfig() { - return deviceConfig_ != null; - } - /** - * .context.DeviceConfig device_config = 4; - * @return The deviceConfig. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceConfig getDeviceConfig() { - return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; - } - /** - * .context.DeviceConfig device_config = 4; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { - return getDeviceConfig(); - } + /** + * repeated .context.LinkId link_ids = 4; + */ + java.util.List getLinkIdsList(); - public static final int DEVICE_OPERATIONAL_STATUS_FIELD_NUMBER = 5; - private int deviceOperationalStatus_; - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return The enum numeric value on the wire for deviceOperationalStatus. - */ - @java.lang.Override public int getDeviceOperationalStatusValue() { - return deviceOperationalStatus_; - } - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return The deviceOperationalStatus. - */ - @java.lang.Override public context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.valueOf(deviceOperationalStatus_); - return result == null ? context.ContextOuterClass.DeviceOperationalStatusEnum.UNRECOGNIZED : result; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + context.ContextOuterClass.LinkId getLinkIds(int index); - public static final int DEVICE_DRIVERS_FIELD_NUMBER = 6; - private java.util.List 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); - return result == null ? context.ContextOuterClass.DeviceDriverEnum.UNRECOGNIZED : result; - } - }; - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return A list containing the deviceDrivers. - */ - @java.lang.Override - public java.util.List getDeviceDriversList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, context.ContextOuterClass.DeviceDriverEnum>(deviceDrivers_, deviceDrivers_converter_); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return The count of deviceDrivers. - */ - @java.lang.Override - public int getDeviceDriversCount() { - return deviceDrivers_.size(); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the element to return. - * @return The deviceDrivers at the given index. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceDriverEnum getDeviceDrivers(int index) { - return deviceDrivers_converter_.convert(deviceDrivers_.get(index)); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return A list containing the enum numeric values on the wire for deviceDrivers. - */ - @java.lang.Override - public java.util.List - getDeviceDriversValueList() { - return deviceDrivers_; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of deviceDrivers at the given index. - */ - @java.lang.Override - public int getDeviceDriversValue(int index) { - return deviceDrivers_.get(index); - } - private int deviceDriversMemoizedSerializedSize; + /** + * repeated .context.LinkId link_ids = 4; + */ + int getLinkIdsCount(); - public static final int DEVICE_ENDPOINTS_FIELD_NUMBER = 7; - private java.util.List deviceEndpoints_; - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - @java.lang.Override - public java.util.List getDeviceEndpointsList() { - return deviceEndpoints_; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - @java.lang.Override - public java.util.List - getDeviceEndpointsOrBuilderList() { - return deviceEndpoints_; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - @java.lang.Override - public int getDeviceEndpointsCount() { - return deviceEndpoints_.size(); - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - @java.lang.Override - public context.ContextOuterClass.EndPoint getDeviceEndpoints(int index) { - return deviceEndpoints_.get(index); - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointOrBuilder getDeviceEndpointsOrBuilder( - int index) { - return deviceEndpoints_.get(index); - } + /** + * repeated .context.LinkId link_ids = 4; + */ + java.util.List getLinkIdsOrBuilderList(); - public static final int COMPONENTS_FIELD_NUMBER = 8; - private java.util.List components_; - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - @java.lang.Override - public java.util.List getComponentsList() { - return components_; - } - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - @java.lang.Override - public java.util.List - getComponentsOrBuilderList() { - return components_; - } - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - @java.lang.Override - public int getComponentsCount() { - return components_.size(); - } - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - @java.lang.Override - public context.ContextOuterClass.Component getComponents(int index) { - return components_.get(index); - } - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - @java.lang.Override - public context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder( - int index) { - return components_.get(index); + /** + * repeated .context.LinkId link_ids = 4; + */ + context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index); } - public static final int CONTROLLER_ID_FIELD_NUMBER = 9; - private context.ContextOuterClass.DeviceId controllerId_; - /** - *
-     * Identifier of node controlling the actual device
-     * 
- * - * .context.DeviceId controller_id = 9; - * @return Whether the controllerId field is set. - */ - @java.lang.Override - public boolean hasControllerId() { - return controllerId_ != null; - } - /** - *
-     * Identifier of node controlling the actual device
-     * 
- * - * .context.DeviceId controller_id = 9; - * @return The controllerId. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getControllerId() { - return controllerId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; - } /** - *
-     * Identifier of node controlling the actual device
-     * 
- * - * .context.DeviceId controller_id = 9; + * Protobuf type {@code context.Constraint_Exclusions} */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder() { - return getControllerId(); - } + public static final class Constraint_Exclusions extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_Exclusions) + Constraint_ExclusionsOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use Constraint_Exclusions.newBuilder() to construct. + private Constraint_Exclusions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (deviceId_ != null) { - output.writeMessage(1, getDeviceId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (!getDeviceTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceType_); - } - if (deviceConfig_ != null) { - output.writeMessage(4, getDeviceConfig()); - } - if (deviceOperationalStatus_ != context.ContextOuterClass.DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED.getNumber()) { - output.writeEnum(5, deviceOperationalStatus_); - } - if (getDeviceDriversList().size() > 0) { - output.writeUInt32NoTag(50); - output.writeUInt32NoTag(deviceDriversMemoizedSerializedSize); - } - for (int i = 0; i < deviceDrivers_.size(); i++) { - output.writeEnumNoTag(deviceDrivers_.get(i)); - } - for (int i = 0; i < deviceEndpoints_.size(); i++) { - output.writeMessage(7, deviceEndpoints_.get(i)); - } - for (int i = 0; i < components_.size(); i++) { - output.writeMessage(8, components_.get(i)); - } - if (controllerId_ != null) { - output.writeMessage(9, getControllerId()); - } - unknownFields.writeTo(output); - } + private Constraint_Exclusions() { + deviceIds_ = java.util.Collections.emptyList(); + endpointIds_ = java.util.Collections.emptyList(); + linkIds_ = java.util.Collections.emptyList(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (deviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDeviceId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (!getDeviceTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceType_); - } - if (deviceConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getDeviceConfig()); - } - if (deviceOperationalStatus_ != context.ContextOuterClass.DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, deviceOperationalStatus_); - } - { - int dataSize = 0; - for (int i = 0; i < deviceDrivers_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(deviceDrivers_.get(i)); - } - size += dataSize; - if (!getDeviceDriversList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }deviceDriversMemoizedSerializedSize = dataSize; - } - for (int i = 0; i < deviceEndpoints_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, deviceEndpoints_.get(i)); - } - for (int i = 0; i < components_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, components_.get(i)); - } - if (controllerId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getControllerId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Constraint_Exclusions(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Device)) { - return super.equals(obj); - } - context.ContextOuterClass.Device other = (context.ContextOuterClass.Device) obj; - - if (hasDeviceId() != other.hasDeviceId()) return false; - if (hasDeviceId()) { - if (!getDeviceId() - .equals(other.getDeviceId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getDeviceType() - .equals(other.getDeviceType())) return false; - if (hasDeviceConfig() != other.hasDeviceConfig()) return false; - if (hasDeviceConfig()) { - if (!getDeviceConfig() - .equals(other.getDeviceConfig())) return false; - } - if (deviceOperationalStatus_ != other.deviceOperationalStatus_) return false; - if (!deviceDrivers_.equals(other.deviceDrivers_)) return false; - if (!getDeviceEndpointsList() - .equals(other.getDeviceEndpointsList())) return false; - if (!getComponentsList() - .equals(other.getComponentsList())) return false; - if (hasControllerId() != other.hasControllerId()) return false; - if (hasControllerId()) { - if (!getControllerId() - .equals(other.getControllerId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDeviceId()) { - hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getDeviceId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DEVICE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getDeviceType().hashCode(); - if (hasDeviceConfig()) { - hash = (37 * hash) + DEVICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDeviceConfig().hashCode(); - } - hash = (37 * hash) + DEVICE_OPERATIONAL_STATUS_FIELD_NUMBER; - hash = (53 * hash) + deviceOperationalStatus_; - if (getDeviceDriversCount() > 0) { - hash = (37 * hash) + DEVICE_DRIVERS_FIELD_NUMBER; - hash = (53 * hash) + deviceDrivers_.hashCode(); - } - if (getDeviceEndpointsCount() > 0) { - hash = (37 * hash) + DEVICE_ENDPOINTS_FIELD_NUMBER; - hash = (53 * hash) + getDeviceEndpointsList().hashCode(); - } - if (getComponentsCount() > 0) { - hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; - hash = (53 * hash) + getComponentsList().hashCode(); - } - if (hasControllerId()) { - hash = (37 * hash) + CONTROLLER_ID_FIELD_NUMBER; - hash = (53 * hash) + getControllerId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + 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(); + 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(); + 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(); + 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 context.ContextOuterClass.Device parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Device parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Device parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Device parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Device parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Device parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Device parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Device parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Device parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Device parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Device parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Device parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Device prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_Exclusions.class, context.ContextOuterClass.Constraint_Exclusions.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Device} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Device) - context.ContextOuterClass.DeviceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Device_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Device_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Device.class, context.ContextOuterClass.Device.Builder.class); - } - - // 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; - deviceIdBuilder_ = null; - } - name_ = ""; - - deviceType_ = ""; - - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - } else { - deviceConfig_ = null; - deviceConfigBuilder_ = null; - } - deviceOperationalStatus_ = 0; - - deviceDrivers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - if (deviceEndpointsBuilder_ == null) { - deviceEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - deviceEndpointsBuilder_.clear(); - } - if (componentsBuilder_ == null) { - components_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - componentsBuilder_.clear(); - } - if (controllerIdBuilder_ == null) { - controllerId_ = null; - } else { - controllerId_ = null; - controllerIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Device_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Device getDefaultInstanceForType() { - return context.ContextOuterClass.Device.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Device build() { - context.ContextOuterClass.Device result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - result.deviceType_ = deviceType_; - if (deviceConfigBuilder_ == null) { - result.deviceConfig_ = deviceConfig_; - } else { - result.deviceConfig_ = deviceConfigBuilder_.build(); - } - result.deviceOperationalStatus_ = deviceOperationalStatus_; - if (((bitField0_ & 0x00000001) != 0)) { - deviceDrivers_ = java.util.Collections.unmodifiableList(deviceDrivers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deviceDrivers_ = deviceDrivers_; - if (deviceEndpointsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - deviceEndpoints_ = java.util.Collections.unmodifiableList(deviceEndpoints_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.deviceEndpoints_ = deviceEndpoints_; - } else { - result.deviceEndpoints_ = deviceEndpointsBuilder_.build(); - } - if (componentsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - components_ = java.util.Collections.unmodifiableList(components_); - bitField0_ = (bitField0_ & ~0x00000004); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Device) { - return mergeFrom((context.ContextOuterClass.Device)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Device other) { - if (other == context.ContextOuterClass.Device.getDefaultInstance()) return this; - if (other.hasDeviceId()) { - mergeDeviceId(other.getDeviceId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDeviceType().isEmpty()) { - deviceType_ = other.deviceType_; - onChanged(); - } - if (other.hasDeviceConfig()) { - mergeDeviceConfig(other.getDeviceConfig()); - } - if (other.deviceOperationalStatus_ != 0) { - setDeviceOperationalStatusValue(other.getDeviceOperationalStatusValue()); - } - if (!other.deviceDrivers_.isEmpty()) { - if (deviceDrivers_.isEmpty()) { - deviceDrivers_ = other.deviceDrivers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeviceDriversIsMutable(); - deviceDrivers_.addAll(other.deviceDrivers_); - } - onChanged(); - } - if (deviceEndpointsBuilder_ == null) { - if (!other.deviceEndpoints_.isEmpty()) { - if (deviceEndpoints_.isEmpty()) { - deviceEndpoints_ = other.deviceEndpoints_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.addAll(other.deviceEndpoints_); - } - onChanged(); - } - } else { - if (!other.deviceEndpoints_.isEmpty()) { - if (deviceEndpointsBuilder_.isEmpty()) { - deviceEndpointsBuilder_.dispose(); - deviceEndpointsBuilder_ = null; - deviceEndpoints_ = other.deviceEndpoints_; - bitField0_ = (bitField0_ & ~0x00000002); - deviceEndpointsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDeviceEndpointsFieldBuilder() : null; - } else { - deviceEndpointsBuilder_.addAllMessages(other.deviceEndpoints_); + public static final int IS_PERMANENT_FIELD_NUMBER = 1; + + private boolean isPermanent_; + + /** + * bool is_permanent = 1; + * @return The isPermanent. + */ + @java.lang.Override + public boolean getIsPermanent() { + return isPermanent_; + } + + public static final int DEVICE_IDS_FIELD_NUMBER = 2; + + private java.util.List deviceIds_; + + /** + * repeated .context.DeviceId device_ids = 2; + */ + @java.lang.Override + public java.util.List getDeviceIdsList() { + return deviceIds_; + } + + /** + * repeated .context.DeviceId device_ids = 2; + */ + @java.lang.Override + public java.util.List getDeviceIdsOrBuilderList() { + return deviceIds_; + } + + /** + * repeated .context.DeviceId device_ids = 2; + */ + @java.lang.Override + public int getDeviceIdsCount() { + return deviceIds_.size(); + } + + /** + * repeated .context.DeviceId device_ids = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceIds(int index) { + return deviceIds_.get(index); + } + + /** + * repeated .context.DeviceId device_ids = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index) { + return deviceIds_.get(index); + } + + public static final int ENDPOINT_IDS_FIELD_NUMBER = 3; + + private java.util.List endpointIds_; + + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getEndpointIdsList() { + return endpointIds_; + } + + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getEndpointIdsOrBuilderList() { + return endpointIds_; + } + + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + @java.lang.Override + public int getEndpointIdsCount() { + return endpointIds_.size(); + } + + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointIds(int index) { + return endpointIds_.get(index); + } + + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder(int index) { + return endpointIds_.get(index); + } + + public static final int LINK_IDS_FIELD_NUMBER = 4; + + private java.util.List linkIds_; + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public java.util.List getLinkIdsList() { + return linkIds_; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public java.util.List getLinkIdsOrBuilderList() { + return linkIds_; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public int getLinkIdsCount() { + return linkIds_.size(); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkIds(int index) { + return linkIds_.get(index); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index) { + return linkIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (isPermanent_ != false) { + output.writeBool(1, isPermanent_); + } + for (int i = 0; i < deviceIds_.size(); i++) { + output.writeMessage(2, deviceIds_.get(i)); } - } + for (int i = 0; i < endpointIds_.size(); i++) { + output.writeMessage(3, endpointIds_.get(i)); + } + for (int i = 0; i < linkIds_.size(); i++) { + output.writeMessage(4, linkIds_.get(i)); + } + unknownFields.writeTo(output); } - if (componentsBuilder_ == null) { - if (!other.components_.isEmpty()) { - if (components_.isEmpty()) { - components_ = other.components_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureComponentsIsMutable(); - components_.addAll(other.components_); - } - onChanged(); - } - } else { - if (!other.components_.isEmpty()) { - if (componentsBuilder_.isEmpty()) { - componentsBuilder_.dispose(); - componentsBuilder_ = null; - components_ = other.components_; - bitField0_ = (bitField0_ & ~0x00000004); - componentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getComponentsFieldBuilder() : null; - } else { - componentsBuilder_.addAllMessages(other.components_); - } - } - } - if (other.hasControllerId()) { - mergeControllerId(other.getControllerId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Device) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private context.ContextOuterClass.DeviceId deviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdBuilder_; - /** - * .context.DeviceId device_id = 1; - * @return Whether the deviceId field is set. - */ - public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; - } - /** - * .context.DeviceId device_id = 1; - * @return The deviceId. - */ - public context.ContextOuterClass.DeviceId getDeviceId() { - if (deviceIdBuilder_ == null) { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } else { - return deviceIdBuilder_.getMessage(); - } - } - /** - * .context.DeviceId device_id = 1; - */ - public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceId_ = value; - onChanged(); - } else { - deviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 1; - */ - public Builder setDeviceId( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdBuilder_ == null) { - deviceId_ = builderForValue.build(); - onChanged(); - } else { - deviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceId device_id = 1; - */ - public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = - context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); - } else { - deviceId_ = value; - } - onChanged(); - } else { - deviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 1; - */ - public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceId device_id = 1; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { - - onChanged(); - return getDeviceIdFieldBuilder().getBuilder(); - } - /** - * .context.DeviceId device_id = 1; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - if (deviceIdBuilder_ != null) { - return deviceIdBuilder_.getMessageOrBuilder(); - } else { - return deviceId_ == null ? - context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - } - /** - * .context.DeviceId device_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> - getDeviceIdFieldBuilder() { - if (deviceIdBuilder_ == null) { - deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( - getDeviceId(), - getParentForChildren(), - isClean()); - deviceId_ = null; - } - return deviceIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object deviceType_ = ""; - /** - * string device_type = 3; - * @return The deviceType. - */ - public java.lang.String getDeviceType() { - java.lang.Object ref = deviceType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - deviceType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string device_type = 3; - * @return The bytes for deviceType. - */ - public com.google.protobuf.ByteString - getDeviceTypeBytes() { - java.lang.Object ref = deviceType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deviceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string device_type = 3; - * @param value The deviceType to set. - * @return This builder for chaining. - */ - public Builder setDeviceType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - deviceType_ = value; - onChanged(); - return this; - } - /** - * string device_type = 3; - * @return This builder for chaining. - */ - public Builder clearDeviceType() { - - deviceType_ = getDefaultInstance().getDeviceType(); - onChanged(); - return this; - } - /** - * string device_type = 3; - * @param value The bytes for deviceType to set. - * @return This builder for chaining. - */ - public Builder setDeviceTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - deviceType_ = value; - onChanged(); - return this; - } - - private context.ContextOuterClass.DeviceConfig deviceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder> deviceConfigBuilder_; - /** - * .context.DeviceConfig device_config = 4; - * @return Whether the deviceConfig field is set. - */ - public boolean hasDeviceConfig() { - return deviceConfigBuilder_ != null || deviceConfig_ != null; - } - /** - * .context.DeviceConfig device_config = 4; - * @return The deviceConfig. - */ - public context.ContextOuterClass.DeviceConfig getDeviceConfig() { - if (deviceConfigBuilder_ == null) { - return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; - } else { - return deviceConfigBuilder_.getMessage(); - } - } - /** - * .context.DeviceConfig device_config = 4; - */ - public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig value) { - if (deviceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceConfig_ = value; - onChanged(); - } else { - deviceConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceConfig device_config = 4; - */ - public Builder setDeviceConfig( - context.ContextOuterClass.DeviceConfig.Builder builderForValue) { - if (deviceConfigBuilder_ == null) { - deviceConfig_ = builderForValue.build(); - onChanged(); - } else { - deviceConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceConfig device_config = 4; - */ - public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) { - if (deviceConfigBuilder_ == null) { - if (deviceConfig_ != null) { - deviceConfig_ = - context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial(); - } else { - deviceConfig_ = value; - } - onChanged(); - } else { - deviceConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceConfig device_config = 4; - */ - public Builder clearDeviceConfig() { - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - onChanged(); - } else { - deviceConfig_ = null; - deviceConfigBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceConfig device_config = 4; - */ - public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() { - - onChanged(); - return getDeviceConfigFieldBuilder().getBuilder(); - } - /** - * .context.DeviceConfig device_config = 4; - */ - public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { - if (deviceConfigBuilder_ != null) { - return deviceConfigBuilder_.getMessageOrBuilder(); - } else { - return deviceConfig_ == null ? - context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; - } - } - /** - * .context.DeviceConfig device_config = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder> - getDeviceConfigFieldBuilder() { - if (deviceConfigBuilder_ == null) { - deviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder>( - getDeviceConfig(), - getParentForChildren(), - isClean()); - deviceConfig_ = null; - } - return deviceConfigBuilder_; - } - - private int deviceOperationalStatus_ = 0; - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return The enum numeric value on the wire for deviceOperationalStatus. - */ - @java.lang.Override public int getDeviceOperationalStatusValue() { - return deviceOperationalStatus_; - } - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @param value The enum numeric value on the wire for deviceOperationalStatus to set. - * @return This builder for chaining. - */ - public Builder setDeviceOperationalStatusValue(int value) { - - deviceOperationalStatus_ = value; - onChanged(); - return this; - } - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return The deviceOperationalStatus. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.valueOf(deviceOperationalStatus_); - return result == null ? context.ContextOuterClass.DeviceOperationalStatusEnum.UNRECOGNIZED : result; - } - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @param value The deviceOperationalStatus to set. - * @return This builder for chaining. - */ - public Builder setDeviceOperationalStatus(context.ContextOuterClass.DeviceOperationalStatusEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - deviceOperationalStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return This builder for chaining. - */ - public Builder clearDeviceOperationalStatus() { - - deviceOperationalStatus_ = 0; - onChanged(); - return this; - } - - private java.util.List deviceDrivers_ = - java.util.Collections.emptyList(); - private void ensureDeviceDriversIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deviceDrivers_ = new java.util.ArrayList(deviceDrivers_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return A list containing the deviceDrivers. - */ - public java.util.List getDeviceDriversList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, context.ContextOuterClass.DeviceDriverEnum>(deviceDrivers_, deviceDrivers_converter_); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return The count of deviceDrivers. - */ - public int getDeviceDriversCount() { - return deviceDrivers_.size(); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the element to return. - * @return The deviceDrivers at the given index. - */ - public context.ContextOuterClass.DeviceDriverEnum getDeviceDrivers(int index) { - return deviceDrivers_converter_.convert(deviceDrivers_.get(index)); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index to set the value at. - * @param value The deviceDrivers to set. - * @return This builder for chaining. - */ - public Builder setDeviceDrivers( - int index, context.ContextOuterClass.DeviceDriverEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceDriversIsMutable(); - deviceDrivers_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param value The deviceDrivers to add. - * @return This builder for chaining. - */ - public Builder addDeviceDrivers(context.ContextOuterClass.DeviceDriverEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceDriversIsMutable(); - deviceDrivers_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param values The deviceDrivers to add. - * @return This builder for chaining. - */ - public Builder addAllDeviceDrivers( - java.lang.Iterable values) { - ensureDeviceDriversIsMutable(); - for (context.ContextOuterClass.DeviceDriverEnum value : values) { - deviceDrivers_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return This builder for chaining. - */ - public Builder clearDeviceDrivers() { - deviceDrivers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return A list containing the enum numeric values on the wire for deviceDrivers. - */ - public java.util.List - getDeviceDriversValueList() { - return java.util.Collections.unmodifiableList(deviceDrivers_); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of deviceDrivers at the given index. - */ - public int getDeviceDriversValue(int index) { - return deviceDrivers_.get(index); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of deviceDrivers at the given index. - * @return This builder for chaining. - */ - public Builder setDeviceDriversValue( - int index, int value) { - ensureDeviceDriversIsMutable(); - deviceDrivers_.set(index, value); - onChanged(); - return this; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param value The enum numeric value on the wire for deviceDrivers to add. - * @return This builder for chaining. - */ - public Builder addDeviceDriversValue(int value) { - ensureDeviceDriversIsMutable(); - deviceDrivers_.add(value); - onChanged(); - return this; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param values The enum numeric values on the wire for deviceDrivers to add. - * @return This builder for chaining. - */ - public Builder addAllDeviceDriversValue( - java.lang.Iterable values) { - ensureDeviceDriversIsMutable(); - for (int value : values) { - deviceDrivers_.add(value); - } - onChanged(); - return this; - } - - private java.util.List deviceEndpoints_ = - java.util.Collections.emptyList(); - private void ensureDeviceEndpointsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - deviceEndpoints_ = new java.util.ArrayList(deviceEndpoints_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPoint, context.ContextOuterClass.EndPoint.Builder, context.ContextOuterClass.EndPointOrBuilder> deviceEndpointsBuilder_; - - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public java.util.List getDeviceEndpointsList() { - if (deviceEndpointsBuilder_ == null) { - return java.util.Collections.unmodifiableList(deviceEndpoints_); - } else { - return deviceEndpointsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public int getDeviceEndpointsCount() { - if (deviceEndpointsBuilder_ == null) { - return deviceEndpoints_.size(); - } else { - return deviceEndpointsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public context.ContextOuterClass.EndPoint getDeviceEndpoints(int index) { - if (deviceEndpointsBuilder_ == null) { - return deviceEndpoints_.get(index); - } else { - return deviceEndpointsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder setDeviceEndpoints( - int index, context.ContextOuterClass.EndPoint value) { - if (deviceEndpointsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.set(index, value); - onChanged(); - } else { - deviceEndpointsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder setDeviceEndpoints( - int index, context.ContextOuterClass.EndPoint.Builder builderForValue) { - if (deviceEndpointsBuilder_ == null) { - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.set(index, builderForValue.build()); - onChanged(); - } else { - deviceEndpointsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder addDeviceEndpoints(context.ContextOuterClass.EndPoint value) { - if (deviceEndpointsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.add(value); - onChanged(); - } else { - deviceEndpointsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder addDeviceEndpoints( - int index, context.ContextOuterClass.EndPoint value) { - if (deviceEndpointsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.add(index, value); - onChanged(); - } else { - deviceEndpointsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder addDeviceEndpoints( - context.ContextOuterClass.EndPoint.Builder builderForValue) { - if (deviceEndpointsBuilder_ == null) { - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.add(builderForValue.build()); - onChanged(); - } else { - deviceEndpointsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder addDeviceEndpoints( - int index, context.ContextOuterClass.EndPoint.Builder builderForValue) { - if (deviceEndpointsBuilder_ == null) { - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.add(index, builderForValue.build()); - onChanged(); - } else { - deviceEndpointsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder addAllDeviceEndpoints( - java.lang.Iterable values) { - if (deviceEndpointsBuilder_ == null) { - ensureDeviceEndpointsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deviceEndpoints_); - onChanged(); - } else { - deviceEndpointsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder clearDeviceEndpoints() { - if (deviceEndpointsBuilder_ == null) { - deviceEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - deviceEndpointsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder removeDeviceEndpoints(int index) { - if (deviceEndpointsBuilder_ == null) { - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.remove(index); - onChanged(); - } else { - deviceEndpointsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public context.ContextOuterClass.EndPoint.Builder getDeviceEndpointsBuilder( - int index) { - return getDeviceEndpointsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public context.ContextOuterClass.EndPointOrBuilder getDeviceEndpointsOrBuilder( - int index) { - if (deviceEndpointsBuilder_ == null) { - return deviceEndpoints_.get(index); } else { - return deviceEndpointsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public java.util.List - getDeviceEndpointsOrBuilderList() { - if (deviceEndpointsBuilder_ != null) { - return deviceEndpointsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deviceEndpoints_); - } - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public context.ContextOuterClass.EndPoint.Builder addDeviceEndpointsBuilder() { - return getDeviceEndpointsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPoint.getDefaultInstance()); - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public context.ContextOuterClass.EndPoint.Builder addDeviceEndpointsBuilder( - int index) { - return getDeviceEndpointsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPoint.getDefaultInstance()); - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public java.util.List - getDeviceEndpointsBuilderList() { - return getDeviceEndpointsFieldBuilder().getBuilderList(); - } - 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()); - deviceEndpoints_ = null; - } - return deviceEndpointsBuilder_; - } - - private java.util.List components_ = - java.util.Collections.emptyList(); - private void ensureComponentsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - components_ = new java.util.ArrayList(components_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Component, context.ContextOuterClass.Component.Builder, context.ContextOuterClass.ComponentOrBuilder> componentsBuilder_; - - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public java.util.List getComponentsList() { - if (componentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(components_); - } else { - return componentsBuilder_.getMessageList(); - } - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public int getComponentsCount() { - if (componentsBuilder_ == null) { - return components_.size(); - } else { - return componentsBuilder_.getCount(); - } - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public context.ContextOuterClass.Component getComponents(int index) { - if (componentsBuilder_ == null) { - return components_.get(index); - } else { - return componentsBuilder_.getMessage(index); - } - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder setComponents( - int index, context.ContextOuterClass.Component value) { - if (componentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureComponentsIsMutable(); - components_.set(index, value); - onChanged(); - } else { - componentsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder setComponents( - int index, context.ContextOuterClass.Component.Builder builderForValue) { - if (componentsBuilder_ == null) { - ensureComponentsIsMutable(); - components_.set(index, builderForValue.build()); - onChanged(); - } else { - componentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder addComponents(context.ContextOuterClass.Component value) { - if (componentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureComponentsIsMutable(); - components_.add(value); - onChanged(); - } else { - componentsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder addComponents( - int index, context.ContextOuterClass.Component value) { - if (componentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureComponentsIsMutable(); - components_.add(index, value); - onChanged(); - } else { - componentsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder addComponents( - context.ContextOuterClass.Component.Builder builderForValue) { - if (componentsBuilder_ == null) { - ensureComponentsIsMutable(); - components_.add(builderForValue.build()); - onChanged(); - } else { - componentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder addComponents( - int index, context.ContextOuterClass.Component.Builder builderForValue) { - if (componentsBuilder_ == null) { - ensureComponentsIsMutable(); - components_.add(index, builderForValue.build()); - onChanged(); - } else { - componentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder addAllComponents( - java.lang.Iterable values) { - if (componentsBuilder_ == null) { - ensureComponentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, components_); - onChanged(); - } else { - componentsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder clearComponents() { - if (componentsBuilder_ == null) { - components_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - componentsBuilder_.clear(); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder removeComponents(int index) { - if (componentsBuilder_ == null) { - ensureComponentsIsMutable(); - components_.remove(index); - onChanged(); - } else { - componentsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public context.ContextOuterClass.Component.Builder getComponentsBuilder( - int index) { - return getComponentsFieldBuilder().getBuilder(index); - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder( - int index) { - if (componentsBuilder_ == null) { - return components_.get(index); } else { - return componentsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public java.util.List - getComponentsOrBuilderList() { - if (componentsBuilder_ != null) { - return componentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(components_); - } - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public context.ContextOuterClass.Component.Builder addComponentsBuilder() { - return getComponentsFieldBuilder().addBuilder( - context.ContextOuterClass.Component.getDefaultInstance()); - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public context.ContextOuterClass.Component.Builder addComponentsBuilder( - int index) { - return getComponentsFieldBuilder().addBuilder( - index, context.ContextOuterClass.Component.getDefaultInstance()); - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public java.util.List - getComponentsBuilderList() { - return getComponentsFieldBuilder().getBuilderList(); - } - 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()); - components_ = null; - } - return componentsBuilder_; - } - - private context.ContextOuterClass.DeviceId controllerId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> controllerIdBuilder_; - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - * @return Whether the controllerId field is set. - */ - public boolean hasControllerId() { - return controllerIdBuilder_ != null || controllerId_ != null; - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - * @return The controllerId. - */ - public context.ContextOuterClass.DeviceId getControllerId() { - if (controllerIdBuilder_ == null) { - return controllerId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; - } else { - return controllerIdBuilder_.getMessage(); - } - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - public Builder setControllerId(context.ContextOuterClass.DeviceId value) { - if (controllerIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - controllerId_ = value; - onChanged(); - } else { - controllerIdBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - public Builder setControllerId( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (controllerIdBuilder_ == null) { - controllerId_ = builderForValue.build(); - onChanged(); - } else { - controllerIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - public Builder mergeControllerId(context.ContextOuterClass.DeviceId value) { - if (controllerIdBuilder_ == null) { - if (controllerId_ != null) { - controllerId_ = - context.ContextOuterClass.DeviceId.newBuilder(controllerId_).mergeFrom(value).buildPartial(); - } else { - controllerId_ = value; - } - onChanged(); - } else { - controllerIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - public Builder clearControllerId() { - if (controllerIdBuilder_ == null) { - controllerId_ = null; - onChanged(); - } else { - controllerId_ = null; - controllerIdBuilder_ = null; - } - - return this; - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - public context.ContextOuterClass.DeviceId.Builder getControllerIdBuilder() { - - onChanged(); - return getControllerIdFieldBuilder().getBuilder(); - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder() { - if (controllerIdBuilder_ != null) { - return controllerIdBuilder_.getMessageOrBuilder(); - } else { - return controllerId_ == null ? - context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; - } - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> - getControllerIdFieldBuilder() { - if (controllerIdBuilder_ == null) { - controllerIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( - getControllerId(), - getParentForChildren(), - isClean()); - controllerId_ = null; - } - return controllerIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Device) - } - // @@protoc_insertion_point(class_scope:context.Device) - private static final context.ContextOuterClass.Device DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Device(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (isPermanent_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, isPermanent_); + } + for (int i = 0; i < deviceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, deviceIds_.get(i)); + } + for (int i = 0; i < endpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, endpointIds_.get(i)); + } + for (int i = 0; i < linkIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static context.ContextOuterClass.Device getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_Exclusions)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint_Exclusions other = (context.ContextOuterClass.Constraint_Exclusions) obj; + if (getIsPermanent() != other.getIsPermanent()) + return false; + if (!getDeviceIdsList().equals(other.getDeviceIdsList())) + return false; + if (!getEndpointIdsList().equals(other.getEndpointIdsList())) + return false; + if (!getLinkIdsList().equals(other.getLinkIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IS_PERMANENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsPermanent()); + if (getDeviceIdsCount() > 0) { + hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceIdsList().hashCode(); + } + if (getEndpointIdsCount() > 0) { + hash = (37 * hash) + ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getEndpointIdsList().hashCode(); + } + if (getLinkIdsCount() > 0) { + hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getLinkIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public context.ContextOuterClass.Device getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - } + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public interface ComponentOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Component) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * .context.Uuid component_uuid = 1; - * @return Whether the componentUuid field is set. - */ - boolean hasComponentUuid(); - /** - * .context.Uuid component_uuid = 1; - * @return The componentUuid. - */ - context.ContextOuterClass.Uuid getComponentUuid(); - /** - * .context.Uuid component_uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder(); + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - /** - * string type = 3; - * @return The type. - */ - java.lang.String getType(); - /** - * string type = 3; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Exclusions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Exclusions parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ - int getAttributesCount(); - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ - boolean containsAttributes( - java.lang.String key); - /** - * Use {@link #getAttributesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getAttributes(); - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ - java.util.Map - getAttributesMap(); - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - java.lang.String getAttributesOrDefault( - java.lang.String key, - java.lang.String defaultValue); - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - java.lang.String getAttributesOrThrow( - java.lang.String key); + public static Builder newBuilder(context.ContextOuterClass.Constraint_Exclusions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * string parent = 5; - * @return The parent. - */ - java.lang.String getParent(); - /** - * string parent = 5; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - } - /** - *
-   *Defined previously to this section - Tested OK
-   * 
- * - * Protobuf type {@code context.Component} - */ - public static final class Component extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Component) - ComponentOrBuilder { - private static final long serialVersionUID = 0L; - // Use Component.newBuilder() to construct. - private Component(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Component() { - name_ = ""; - type_ = ""; - parent_ = ""; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Component(); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @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 - 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; - } + /** + * Protobuf type {@code context.Constraint_Exclusions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_Exclusions) + context.ContextOuterClass.Constraint_ExclusionsOrBuilder { - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 4: - return internalGetAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Component_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Component.class, context.ContextOuterClass.Component.Builder.class); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_descriptor; + } - public static final int COMPONENT_UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid componentUuid_; - /** - * .context.Uuid component_uuid = 1; - * @return Whether the componentUuid field is set. - */ - @java.lang.Override - public boolean hasComponentUuid() { - return componentUuid_ != null; - } - /** - * .context.Uuid component_uuid = 1; - * @return The componentUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getComponentUuid() { - return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; - } - /** - * .context.Uuid component_uuid = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder() { - return getComponentUuid(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_Exclusions.class, context.ContextOuterClass.Constraint_Exclusions.Builder.class); + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + // Construct using context.ContextOuterClass.Constraint_Exclusions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - public static final int TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object type_; - /** - * string type = 3; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - 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(); - type_ = s; - return s; - } - } - /** - * string type = 3; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public static final int ATTRIBUTES_FIELD_NUMBER = 4; - private static final class AttributesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - context.ContextOuterClass.internal_static_context_Component_AttributesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> attributes_; - private com.google.protobuf.MapField - internalGetAttributes() { - if (attributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - return attributes_; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeviceIdsFieldBuilder(); + getEndpointIdsFieldBuilder(); + getLinkIdsFieldBuilder(); + } + } - public int getAttributesCount() { - return internalGetAttributes().getMap().size(); - } - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ + @java.lang.Override + public Builder clear() { + super.clear(); + isPermanent_ = false; + if (deviceIdsBuilder_ == null) { + deviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deviceIdsBuilder_.clear(); + } + if (endpointIdsBuilder_ == null) { + endpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + endpointIdsBuilder_.clear(); + } + if (linkIdsBuilder_ == null) { + linkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + linkIdsBuilder_.clear(); + } + return this; + } - @java.lang.Override - public boolean containsAttributes( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - return internalGetAttributes().getMap().containsKey(key); - } - /** - * Use {@link #getAttributesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAttributes() { - return getAttributesMap(); - } - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ - @java.lang.Override + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_descriptor; + } - public java.util.Map getAttributesMap() { - return internalGetAttributes().getMap(); - } - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ - @java.lang.Override - - public java.lang.String getAttributesOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetAttributes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ - @java.lang.Override - - public java.lang.String getAttributesOrThrow( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetAttributes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } + @java.lang.Override + public context.ContextOuterClass.Constraint_Exclusions getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } - public static final int PARENT_FIELD_NUMBER = 5; - private volatile java.lang.Object parent_; - /** - * string parent = 5; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - 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(); - parent_ = s; - return s; - } - } - /** - * string parent = 5; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public context.ContextOuterClass.Constraint_Exclusions build() { + context.ContextOuterClass.Constraint_Exclusions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @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_; + if (deviceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deviceIds_ = deviceIds_; + } else { + result.deviceIds_ = deviceIdsBuilder_.build(); + } + if (endpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.endpointIds_ = endpointIds_; + } else { + result.endpointIds_ = endpointIdsBuilder_.build(); + } + if (linkIdsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + linkIds_ = java.util.Collections.unmodifiableList(linkIds_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.linkIds_ = linkIds_; + } else { + result.linkIds_ = linkIdsBuilder_.build(); + } + onBuilt(); + return result; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (componentUuid_ != null) { - output.writeMessage(1, getComponentUuid()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (!getTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetAttributes(), - AttributesDefaultEntryHolder.defaultEntry, - 4); - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); - } - unknownFields.writeTo(output); - } + @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 int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (componentUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getComponentUuid()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (!getTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); - } - for (java.util.Map.Entry entry - : internalGetAttributes().getMap().entrySet()) { - com.google.protobuf.MapEntry - attributes__ = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, attributes__); - } - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Component)) { - return super.equals(obj); - } - context.ContextOuterClass.Component other = (context.ContextOuterClass.Component) obj; - - if (hasComponentUuid() != other.hasComponentUuid()) return false; - if (hasComponentUuid()) { - if (!getComponentUuid() - .equals(other.getComponentUuid())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getType() - .equals(other.getType())) return false; - if (!internalGetAttributes().equals( - other.internalGetAttributes())) return false; - if (!getParent() - .equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasComponentUuid()) { - hash = (37 * hash) + COMPONENT_UUID_FIELD_NUMBER; - hash = (53 * hash) + getComponentUuid().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - if (!internalGetAttributes().getMap().isEmpty()) { - hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + internalGetAttributes().hashCode(); - } - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - public static context.ContextOuterClass.Component parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Component parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Component parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Component parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Component parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Component parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Component parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Component parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Component parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Component parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Component parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Component parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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 newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Component prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_Exclusions) { + return mergeFrom((context.ContextOuterClass.Constraint_Exclusions) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     *Defined previously to this section - Tested OK
-     * 
- * - * Protobuf type {@code context.Component} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Component) - context.ContextOuterClass.ComponentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Component_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 4: - return internalGetAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 4: - return internalGetMutableAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Component_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Component.class, context.ContextOuterClass.Component.Builder.class); - } - - // 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; - componentUuidBuilder_ = null; - } - name_ = ""; - - type_ = ""; - - internalGetMutableAttributes().clear(); - parent_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Component_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Component getDefaultInstanceForType() { - return context.ContextOuterClass.Component.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Component build() { - context.ContextOuterClass.Component result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Component) { - return mergeFrom((context.ContextOuterClass.Component)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Component other) { - if (other == context.ContextOuterClass.Component.getDefaultInstance()) return this; - if (other.hasComponentUuid()) { - mergeComponentUuid(other.getComponentUuid()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getType().isEmpty()) { - type_ = other.type_; - onChanged(); - } - internalGetMutableAttributes().mergeFrom( - other.internalGetAttributes()); - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Component) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private context.ContextOuterClass.Uuid componentUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> componentUuidBuilder_; - /** - * .context.Uuid component_uuid = 1; - * @return Whether the componentUuid field is set. - */ - public boolean hasComponentUuid() { - return componentUuidBuilder_ != null || componentUuid_ != null; - } - /** - * .context.Uuid component_uuid = 1; - * @return The componentUuid. - */ - public context.ContextOuterClass.Uuid getComponentUuid() { - if (componentUuidBuilder_ == null) { - return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; - } else { - return componentUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid component_uuid = 1; - */ - public Builder setComponentUuid(context.ContextOuterClass.Uuid value) { - if (componentUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - componentUuid_ = value; - onChanged(); - } else { - componentUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid component_uuid = 1; - */ - public Builder setComponentUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (componentUuidBuilder_ == null) { - componentUuid_ = builderForValue.build(); - onChanged(); - } else { - componentUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid component_uuid = 1; - */ - public Builder mergeComponentUuid(context.ContextOuterClass.Uuid value) { - if (componentUuidBuilder_ == null) { - if (componentUuid_ != null) { - componentUuid_ = - context.ContextOuterClass.Uuid.newBuilder(componentUuid_).mergeFrom(value).buildPartial(); - } else { - componentUuid_ = value; - } - onChanged(); - } else { - componentUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid component_uuid = 1; - */ - public Builder clearComponentUuid() { - if (componentUuidBuilder_ == null) { - componentUuid_ = null; - onChanged(); - } else { - componentUuid_ = null; - componentUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid component_uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getComponentUuidBuilder() { - - onChanged(); - return getComponentUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid component_uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder() { - if (componentUuidBuilder_ != null) { - return componentUuidBuilder_.getMessageOrBuilder(); - } else { - return componentUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; - } - } - /** - * .context.Uuid component_uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getComponentUuidFieldBuilder() { - if (componentUuidBuilder_ == null) { - componentUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getComponentUuid(), - getParentForChildren(), - isClean()); - componentUuid_ = null; - } - return componentUuidBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object type_ = ""; - /** - * string type = 3; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string type = 3; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string type = 3; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value; - onChanged(); - return this; - } - /** - * string type = 3; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - * string type = 3; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - type_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> attributes_; - private com.google.protobuf.MapField - internalGetAttributes() { - if (attributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - return attributes_; - } - private com.google.protobuf.MapField - internalGetMutableAttributes() { - onChanged();; - if (attributes_ == null) { - attributes_ = com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - if (!attributes_.isMutable()) { - attributes_ = attributes_.copy(); - } - return attributes_; - } - - public int getAttributesCount() { - return internalGetAttributes().getMap().size(); - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - - @java.lang.Override - public boolean containsAttributes( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - return internalGetAttributes().getMap().containsKey(key); - } - /** - * Use {@link #getAttributesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAttributes() { - return getAttributesMap(); - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - @java.lang.Override - - public java.util.Map getAttributesMap() { - return internalGetAttributes().getMap(); - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - @java.lang.Override - - public java.lang.String getAttributesOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetAttributes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - @java.lang.Override - - public java.lang.String getAttributesOrThrow( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetAttributes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearAttributes() { - internalGetMutableAttributes().getMutableMap() - .clear(); - return this; - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - - public Builder removeAttributes( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - internalGetMutableAttributes().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableAttributes() { - return internalGetMutableAttributes().getMutableMap(); - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - public Builder putAttributes( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new java.lang.NullPointerException(); } - if (value == null) { throw new java.lang.NullPointerException(); } - internalGetMutableAttributes().getMutableMap() - .put(key, value); - return this; - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - - public Builder putAllAttributes( - java.util.Map values) { - internalGetMutableAttributes().getMutableMap() - .putAll(values); - return this; - } - - private java.lang.Object parent_ = ""; - /** - * string parent = 5; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string parent = 5; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string parent = 5; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * string parent = 5; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * string parent = 5; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Component) - } + public Builder mergeFrom(context.ContextOuterClass.Constraint_Exclusions other) { + if (other == context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance()) + return this; + if (other.getIsPermanent() != false) { + setIsPermanent(other.getIsPermanent()); + } + if (deviceIdsBuilder_ == null) { + if (!other.deviceIds_.isEmpty()) { + if (deviceIds_.isEmpty()) { + deviceIds_ = other.deviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeviceIdsIsMutable(); + deviceIds_.addAll(other.deviceIds_); + } + onChanged(); + } + } else { + if (!other.deviceIds_.isEmpty()) { + if (deviceIdsBuilder_.isEmpty()) { + deviceIdsBuilder_.dispose(); + deviceIdsBuilder_ = null; + deviceIds_ = other.deviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + deviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceIdsFieldBuilder() : null; + } else { + deviceIdsBuilder_.addAllMessages(other.deviceIds_); + } + } + } + if (endpointIdsBuilder_ == null) { + if (!other.endpointIds_.isEmpty()) { + if (endpointIds_.isEmpty()) { + endpointIds_ = other.endpointIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEndpointIdsIsMutable(); + endpointIds_.addAll(other.endpointIds_); + } + onChanged(); + } + } else { + if (!other.endpointIds_.isEmpty()) { + if (endpointIdsBuilder_.isEmpty()) { + endpointIdsBuilder_.dispose(); + endpointIdsBuilder_ = null; + endpointIds_ = other.endpointIds_; + bitField0_ = (bitField0_ & ~0x00000002); + endpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndpointIdsFieldBuilder() : null; + } else { + endpointIdsBuilder_.addAllMessages(other.endpointIds_); + } + } + } + if (linkIdsBuilder_ == null) { + if (!other.linkIds_.isEmpty()) { + if (linkIds_.isEmpty()) { + linkIds_ = other.linkIds_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLinkIdsIsMutable(); + linkIds_.addAll(other.linkIds_); + } + onChanged(); + } + } else { + if (!other.linkIds_.isEmpty()) { + if (linkIdsBuilder_.isEmpty()) { + linkIdsBuilder_.dispose(); + linkIdsBuilder_ = null; + linkIds_ = other.linkIds_; + bitField0_ = (bitField0_ & ~0x00000004); + linkIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkIdsFieldBuilder() : null; + } else { + linkIdsBuilder_.addAllMessages(other.linkIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:context.Component) - private static final context.ContextOuterClass.Component DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Component(); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static context.ContextOuterClass.Component getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_Exclusions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private int bitField0_; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private boolean isPermanent_; - @java.lang.Override - public context.ContextOuterClass.Component getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * bool is_permanent = 1; + * @return The isPermanent. + */ + @java.lang.Override + public boolean getIsPermanent() { + return isPermanent_; + } - } + /** + * bool is_permanent = 1; + * @param value The isPermanent to set. + * @return This builder for chaining. + */ + public Builder setIsPermanent(boolean value) { + isPermanent_ = value; + onChanged(); + return this; + } - public interface DeviceConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.DeviceConfig) - com.google.protobuf.MessageOrBuilder { + /** + * bool is_permanent = 1; + * @return This builder for chaining. + */ + public Builder clearIsPermanent() { + isPermanent_ = false; + onChanged(); + return this; + } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - java.util.List - getConfigRulesList(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - context.ContextOuterClass.ConfigRule getConfigRules(int index); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - int getConfigRulesCount(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - java.util.List - getConfigRulesOrBuilderList(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.DeviceConfig} - */ - public static final class DeviceConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.DeviceConfig) - DeviceConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceConfig.newBuilder() to construct. - private DeviceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceConfig() { - configRules_ = java.util.Collections.emptyList(); - } + private java.util.List deviceIds_ = java.util.Collections.emptyList(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceConfig(); - } + private void ensureDeviceIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceIds_ = new java.util.ArrayList(deviceIds_); + bitField0_ |= 0x00000001; + } + } - @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(); - 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; - } + private com.google.protobuf.RepeatedFieldBuilderV3 deviceIdsBuilder_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceConfig.class, context.ContextOuterClass.DeviceConfig.Builder.class); - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public java.util.List getDeviceIdsList() { + if (deviceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deviceIds_); + } else { + return deviceIdsBuilder_.getMessageList(); + } + } - public static final int CONFIG_RULES_FIELD_NUMBER = 1; - private java.util.List configRules_; - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public java.util.List getConfigRulesList() { - return configRules_; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public java.util.List - getConfigRulesOrBuilderList() { - return configRules_; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public int getConfigRulesCount() { - return configRules_.size(); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule getConfigRules(int index) { - return configRules_.get(index); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index) { - return configRules_.get(index); - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public int getDeviceIdsCount() { + if (deviceIdsBuilder_ == null) { + return deviceIds_.size(); + } else { + return deviceIdsBuilder_.getCount(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .context.DeviceId device_ids = 2; + */ + public context.ContextOuterClass.DeviceId getDeviceIds(int index) { + if (deviceIdsBuilder_ == null) { + return deviceIds_.get(index); + } else { + return deviceIdsBuilder_.getMessage(index); + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder setDeviceIds(int index, context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.set(index, value); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < configRules_.size(); i++) { - output.writeMessage(1, configRules_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder setDeviceIds(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < configRules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, configRules_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder addDeviceIds(context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.add(value); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(value); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.DeviceConfig)) { - return super.equals(obj); - } - context.ContextOuterClass.DeviceConfig other = (context.ContextOuterClass.DeviceConfig) obj; - - if (!getConfigRulesList() - .equals(other.getConfigRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder addDeviceIds(int index, context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.add(index, value); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(index, value); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConfigRulesCount() > 0) { - hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; - hash = (53 * hash) + getConfigRulesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder addDeviceIds(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } - public static context.ContextOuterClass.DeviceConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder addDeviceIds(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.DeviceConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder addAllDeviceIds(java.lang.Iterable values) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deviceIds_); + onChanged(); + } else { + deviceIdsBuilder_.addAllMessages(values); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.DeviceConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.DeviceConfig) - context.ContextOuterClass.DeviceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_DeviceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceConfig.class, context.ContextOuterClass.DeviceConfig.Builder.class); - } - - // 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(); - if (configRulesBuilder_ == null) { - configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - configRulesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_DeviceConfig_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceConfig getDefaultInstanceForType() { - return context.ContextOuterClass.DeviceConfig.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.DeviceConfig build() { - context.ContextOuterClass.DeviceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceConfig buildPartial() { - context.ContextOuterClass.DeviceConfig result = new context.ContextOuterClass.DeviceConfig(this); - int from_bitField0_ = bitField0_; - if (configRulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - configRules_ = java.util.Collections.unmodifiableList(configRules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.configRules_ = configRules_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.DeviceConfig) { - return mergeFrom((context.ContextOuterClass.DeviceConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.DeviceConfig other) { - if (other == context.ContextOuterClass.DeviceConfig.getDefaultInstance()) return this; - if (configRulesBuilder_ == null) { - if (!other.configRules_.isEmpty()) { - if (configRules_.isEmpty()) { - configRules_ = other.configRules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConfigRulesIsMutable(); - configRules_.addAll(other.configRules_); - } - onChanged(); - } - } else { - if (!other.configRules_.isEmpty()) { - if (configRulesBuilder_.isEmpty()) { - configRulesBuilder_.dispose(); - configRulesBuilder_ = null; - configRules_ = other.configRules_; - bitField0_ = (bitField0_ & ~0x00000001); - configRulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConfigRulesFieldBuilder() : null; - } else { - configRulesBuilder_.addAllMessages(other.configRules_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List configRules_ = - java.util.Collections.emptyList(); - private void ensureConfigRulesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - configRules_ = new java.util.ArrayList(configRules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder> configRulesBuilder_; - - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List getConfigRulesList() { - if (configRulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(configRules_); - } else { - return configRulesBuilder_.getMessageList(); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public int getConfigRulesCount() { - if (configRulesBuilder_ == null) { - return configRules_.size(); - } else { - return configRulesBuilder_.getCount(); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule getConfigRules(int index) { - if (configRulesBuilder_ == null) { - return configRules_.get(index); - } else { - return configRulesBuilder_.getMessage(index); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder setConfigRules( - int index, context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.set(index, value); - onChanged(); - } else { - configRulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder setConfigRules( - int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.set(index, builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules(context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.add(value); - onChanged(); - } else { - configRulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - int index, context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.add(index, value); - onChanged(); - } else { - configRulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.add(builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.add(index, builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addAllConfigRules( - java.lang.Iterable values) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, configRules_); - onChanged(); - } else { - configRulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder clearConfigRules() { - if (configRulesBuilder_ == null) { - configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - configRulesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder removeConfigRules(int index) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.remove(index); - onChanged(); - } else { - configRulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder getConfigRulesBuilder( - int index) { - return getConfigRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index) { - if (configRulesBuilder_ == null) { - return configRules_.get(index); } else { - return configRulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List - getConfigRulesOrBuilderList() { - if (configRulesBuilder_ != null) { - return configRulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(configRules_); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder() { - return getConfigRulesFieldBuilder().addBuilder( - context.ContextOuterClass.ConfigRule.getDefaultInstance()); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder( - int index) { - return getConfigRulesFieldBuilder().addBuilder( - index, context.ContextOuterClass.ConfigRule.getDefaultInstance()); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List - getConfigRulesBuilderList() { - return getConfigRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder> - getConfigRulesFieldBuilder() { - if (configRulesBuilder_ == null) { - configRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder>( - configRules_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - configRules_ = null; - } - return configRulesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.DeviceConfig) - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder clearDeviceIds() { + if (deviceIdsBuilder_ == null) { + deviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deviceIdsBuilder_.clear(); + } + return this; + } - // @@protoc_insertion_point(class_scope:context.DeviceConfig) - private static final context.ContextOuterClass.DeviceConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceConfig(); - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder removeDeviceIds(int index) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.remove(index); + onChanged(); + } else { + deviceIdsBuilder_.remove(index); + } + return this; + } - public static context.ContextOuterClass.DeviceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdsBuilder(int index) { + return getDeviceIdsFieldBuilder().getBuilder(index); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index) { + if (deviceIdsBuilder_ == null) { + return deviceIds_.get(index); + } else { + return deviceIdsBuilder_.getMessageOrBuilder(index); + } + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public java.util.List getDeviceIdsOrBuilderList() { + if (deviceIdsBuilder_ != null) { + return deviceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deviceIds_); + } + } - @java.lang.Override - public context.ContextOuterClass.DeviceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder() { + return getDeviceIdsFieldBuilder().addBuilder(context.ContextOuterClass.DeviceId.getDefaultInstance()); + } - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder(int index) { + return getDeviceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.DeviceId.getDefaultInstance()); + } - public interface DeviceIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.DeviceIdList) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.DeviceId device_ids = 2; + */ + public java.util.List getDeviceIdsBuilderList() { + return getDeviceIdsFieldBuilder().getBuilderList(); + } - /** - * repeated .context.DeviceId device_ids = 1; - */ - java.util.List - getDeviceIdsList(); - /** - * repeated .context.DeviceId device_ids = 1; - */ - context.ContextOuterClass.DeviceId getDeviceIds(int index); - /** - * repeated .context.DeviceId device_ids = 1; - */ - int getDeviceIdsCount(); - /** - * repeated .context.DeviceId device_ids = 1; - */ - java.util.List - getDeviceIdsOrBuilderList(); - /** - * repeated .context.DeviceId device_ids = 1; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.DeviceIdList} - */ - public static final class DeviceIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.DeviceIdList) - DeviceIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceIdList.newBuilder() to construct. - private DeviceIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceIdList() { - deviceIds_ = java.util.Collections.emptyList(); - } + private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceIdsFieldBuilder() { + if (deviceIdsBuilder_ == null) { + deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceIds_ = null; + } + return deviceIdsBuilder_; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceIdList(); - } + private java.util.List endpointIds_ = java.util.Collections.emptyList(); - @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(); - 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; - } + private void ensureEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + endpointIds_ = new java.util.ArrayList(endpointIds_); + bitField0_ |= 0x00000002; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceIdList.class, context.ContextOuterClass.DeviceIdList.Builder.class); - } + private com.google.protobuf.RepeatedFieldBuilderV3 endpointIdsBuilder_; - public static final int DEVICE_IDS_FIELD_NUMBER = 1; - private java.util.List deviceIds_; - /** - * repeated .context.DeviceId device_ids = 1; - */ - @java.lang.Override - public java.util.List getDeviceIdsList() { - return deviceIds_; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - @java.lang.Override - public java.util.List - getDeviceIdsOrBuilderList() { - return deviceIds_; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - @java.lang.Override - public int getDeviceIdsCount() { - return deviceIds_.size(); - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceIds(int index) { - return deviceIds_.get(index); - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index) { - return deviceIds_.get(index); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public java.util.List getEndpointIdsList() { + if (endpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(endpointIds_); + } else { + return endpointIdsBuilder_.getMessageList(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public int getEndpointIdsCount() { + if (endpointIdsBuilder_ == null) { + return endpointIds_.size(); + } else { + return endpointIdsBuilder_.getCount(); + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId getEndpointIds(int index) { + if (endpointIdsBuilder_ == null) { + return endpointIds_.get(index); + } else { + return endpointIdsBuilder_.getMessage(index); + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < deviceIds_.size(); i++) { - output.writeMessage(1, deviceIds_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder setEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (endpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIdsIsMutable(); + endpointIds_.set(index, value); + onChanged(); + } else { + endpointIdsBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < deviceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, deviceIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder setEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.set(index, builderForValue.build()); + onChanged(); + } else { + endpointIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.DeviceIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.DeviceIdList other = (context.ContextOuterClass.DeviceIdList) obj; - - if (!getDeviceIdsList() - .equals(other.getDeviceIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder addEndpointIds(context.ContextOuterClass.EndPointId value) { + if (endpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIdsIsMutable(); + endpointIds_.add(value); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(value); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDeviceIdsCount() > 0) { - hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getDeviceIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder addEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (endpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIdsIsMutable(); + endpointIds_.add(index, value); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(index, value); + } + return this; + } - public static context.ContextOuterClass.DeviceIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder addEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.add(builderForValue.build()); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.DeviceIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder addEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.add(index, builderForValue.build()); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.DeviceIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.DeviceIdList) - context.ContextOuterClass.DeviceIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_DeviceIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceIdList.class, context.ContextOuterClass.DeviceIdList.Builder.class); - } - - // 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(); - if (deviceIdsBuilder_ == null) { - deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - deviceIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_DeviceIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceIdList getDefaultInstanceForType() { - return context.ContextOuterClass.DeviceIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.DeviceIdList build() { - context.ContextOuterClass.DeviceIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceIdList buildPartial() { - context.ContextOuterClass.DeviceIdList result = new context.ContextOuterClass.DeviceIdList(this); - int from_bitField0_ = bitField0_; - if (deviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deviceIds_ = deviceIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.DeviceIdList) { - return mergeFrom((context.ContextOuterClass.DeviceIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.DeviceIdList other) { - if (other == context.ContextOuterClass.DeviceIdList.getDefaultInstance()) return this; - if (deviceIdsBuilder_ == null) { - if (!other.deviceIds_.isEmpty()) { - if (deviceIds_.isEmpty()) { - deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeviceIdsIsMutable(); - deviceIds_.addAll(other.deviceIds_); - } - onChanged(); - } - } else { - if (!other.deviceIds_.isEmpty()) { - if (deviceIdsBuilder_.isEmpty()) { - deviceIdsBuilder_.dispose(); - deviceIdsBuilder_ = null; - deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - deviceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDeviceIdsFieldBuilder() : null; - } else { - deviceIdsBuilder_.addAllMessages(other.deviceIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List deviceIds_ = - java.util.Collections.emptyList(); - private void ensureDeviceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deviceIds_ = new java.util.ArrayList(deviceIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdsBuilder_; - - /** - * repeated .context.DeviceId device_ids = 1; - */ - public java.util.List getDeviceIdsList() { - if (deviceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(deviceIds_); - } else { - return deviceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public int getDeviceIdsCount() { - if (deviceIdsBuilder_ == null) { - return deviceIds_.size(); - } else { - return deviceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public context.ContextOuterClass.DeviceId getDeviceIds(int index) { - if (deviceIdsBuilder_ == null) { - return deviceIds_.get(index); - } else { - return deviceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder setDeviceIds( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.set(index, value); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder setDeviceIds( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder addDeviceIds(context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.add(value); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder addDeviceIds( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.add(index, value); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder addDeviceIds( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.add(builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder addDeviceIds( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder addAllDeviceIds( - java.lang.Iterable values) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deviceIds_); - onChanged(); - } else { - deviceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder clearDeviceIds() { - if (deviceIdsBuilder_ == null) { - deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - deviceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder removeDeviceIds(int index) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.remove(index); - onChanged(); - } else { - deviceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdsBuilder( - int index) { - return getDeviceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index) { - if (deviceIdsBuilder_ == null) { - return deviceIds_.get(index); } else { - return deviceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public java.util.List - getDeviceIdsOrBuilderList() { - if (deviceIdsBuilder_ != null) { - return deviceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deviceIds_); - } - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder() { - return getDeviceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder( - int index) { - return getDeviceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public java.util.List - getDeviceIdsBuilderList() { - return getDeviceIdsFieldBuilder().getBuilderList(); - } - 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()); - deviceIds_ = null; - } - return deviceIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.DeviceIdList) - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder addAllEndpointIds(java.lang.Iterable values) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endpointIds_); + onChanged(); + } else { + endpointIdsBuilder_.addAllMessages(values); + } + return this; + } - // @@protoc_insertion_point(class_scope:context.DeviceIdList) - private static final context.ContextOuterClass.DeviceIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceIdList(); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder clearEndpointIds() { + if (endpointIdsBuilder_ == null) { + endpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + endpointIdsBuilder_.clear(); + } + return this; + } - public static context.ContextOuterClass.DeviceIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder removeEndpointIds(int index) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.remove(index); + onChanged(); + } else { + endpointIdsBuilder_.remove(index); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdsBuilder(int index) { + return getEndpointIdsFieldBuilder().getBuilder(index); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder(int index) { + if (endpointIdsBuilder_ == null) { + return endpointIds_.get(index); + } else { + return endpointIdsBuilder_.getMessageOrBuilder(index); + } + } - @java.lang.Override - public context.ContextOuterClass.DeviceIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public java.util.List getEndpointIdsOrBuilderList() { + if (endpointIdsBuilder_ != null) { + return endpointIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endpointIds_); + } + } - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder() { + return getEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); + } - public interface DeviceListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.DeviceList) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder(int index) { + return getEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); + } - /** - * repeated .context.Device devices = 1; - */ - java.util.List - getDevicesList(); - /** - * repeated .context.Device devices = 1; - */ - context.ContextOuterClass.Device getDevices(int index); - /** - * repeated .context.Device devices = 1; - */ - int getDevicesCount(); - /** - * repeated .context.Device devices = 1; - */ - java.util.List - getDevicesOrBuilderList(); - /** - * repeated .context.Device devices = 1; - */ - context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.DeviceList} - */ - public static final class DeviceList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.DeviceList) - DeviceListOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceList.newBuilder() to construct. - private DeviceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceList() { - devices_ = java.util.Collections.emptyList(); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public java.util.List getEndpointIdsBuilderList() { + return getEndpointIdsFieldBuilder().getBuilderList(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceList(); - } + private com.google.protobuf.RepeatedFieldBuilderV3 getEndpointIdsFieldBuilder() { + if (endpointIdsBuilder_ == null) { + endpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(endpointIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + endpointIds_ = null; + } + return endpointIdsBuilder_; + } - @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(); - 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; - } + private java.util.List linkIds_ = java.util.Collections.emptyList(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceList.class, context.ContextOuterClass.DeviceList.Builder.class); - } + private void ensureLinkIdsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + linkIds_ = new java.util.ArrayList(linkIds_); + bitField0_ |= 0x00000004; + } + } - public static final int DEVICES_FIELD_NUMBER = 1; - private java.util.List devices_; - /** - * repeated .context.Device devices = 1; - */ - @java.lang.Override - public java.util.List getDevicesList() { - return devices_; - } - /** - * repeated .context.Device devices = 1; - */ - @java.lang.Override - public java.util.List - getDevicesOrBuilderList() { - return devices_; - } - /** - * repeated .context.Device devices = 1; - */ - @java.lang.Override - public int getDevicesCount() { - return devices_.size(); - } - /** - * repeated .context.Device devices = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Device getDevices(int index) { - return devices_.get(index); - } - /** - * repeated .context.Device devices = 1; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder( - int index) { - return devices_.get(index); - } + private com.google.protobuf.RepeatedFieldBuilderV3 linkIdsBuilder_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .context.LinkId link_ids = 4; + */ + public java.util.List getLinkIdsList() { + if (linkIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(linkIds_); + } else { + return linkIdsBuilder_.getMessageList(); + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public int getLinkIdsCount() { + if (linkIdsBuilder_ == null) { + return linkIds_.size(); + } else { + return linkIdsBuilder_.getCount(); + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < devices_.size(); i++) { - output.writeMessage(1, devices_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId getLinkIds(int index) { + if (linkIdsBuilder_ == null) { + return linkIds_.get(index); + } else { + return linkIdsBuilder_.getMessage(index); + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < devices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, devices_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder setLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.set(index, value); + onChanged(); + } else { + linkIdsBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.DeviceList)) { - return super.equals(obj); - } - context.ContextOuterClass.DeviceList other = (context.ContextOuterClass.DeviceList) obj; - - if (!getDevicesList() - .equals(other.getDevicesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder setLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.set(index, builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDevicesCount() > 0) { - hash = (37 * hash) + DEVICES_FIELD_NUMBER; - hash = (53 * hash) + getDevicesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.add(value); + onChanged(); + } else { + linkIdsBuilder_.addMessage(value); + } + return this; + } - public static context.ContextOuterClass.DeviceList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.add(index, value); + onChanged(); + } else { + linkIdsBuilder_.addMessage(index, value); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.DeviceList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.DeviceList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.DeviceList) - context.ContextOuterClass.DeviceListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_DeviceList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceList.class, context.ContextOuterClass.DeviceList.Builder.class); - } - - // 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(); - if (devicesBuilder_ == null) { - devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - devicesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_DeviceList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceList getDefaultInstanceForType() { - return context.ContextOuterClass.DeviceList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.DeviceList build() { - context.ContextOuterClass.DeviceList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceList buildPartial() { - context.ContextOuterClass.DeviceList result = new context.ContextOuterClass.DeviceList(this); - int from_bitField0_ = bitField0_; - if (devicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - devices_ = java.util.Collections.unmodifiableList(devices_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.devices_ = devices_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.DeviceList) { - return mergeFrom((context.ContextOuterClass.DeviceList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.DeviceList other) { - if (other == context.ContextOuterClass.DeviceList.getDefaultInstance()) return this; - if (devicesBuilder_ == null) { - if (!other.devices_.isEmpty()) { - if (devices_.isEmpty()) { - devices_ = other.devices_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDevicesIsMutable(); - devices_.addAll(other.devices_); - } - onChanged(); - } - } else { - if (!other.devices_.isEmpty()) { - if (devicesBuilder_.isEmpty()) { - devicesBuilder_.dispose(); - devicesBuilder_ = null; - devices_ = other.devices_; - bitField0_ = (bitField0_ & ~0x00000001); - devicesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDevicesFieldBuilder() : null; - } else { - devicesBuilder_.addAllMessages(other.devices_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List devices_ = - java.util.Collections.emptyList(); - private void ensureDevicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - devices_ = new java.util.ArrayList(devices_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Device, context.ContextOuterClass.Device.Builder, context.ContextOuterClass.DeviceOrBuilder> devicesBuilder_; - - /** - * repeated .context.Device devices = 1; - */ - public java.util.List getDevicesList() { - if (devicesBuilder_ == null) { - return java.util.Collections.unmodifiableList(devices_); - } else { - return devicesBuilder_.getMessageList(); - } - } - /** - * repeated .context.Device devices = 1; - */ - public int getDevicesCount() { - if (devicesBuilder_ == null) { - return devices_.size(); - } else { - return devicesBuilder_.getCount(); - } - } - /** - * repeated .context.Device devices = 1; - */ - public context.ContextOuterClass.Device getDevices(int index) { - if (devicesBuilder_ == null) { - return devices_.get(index); - } else { - return devicesBuilder_.getMessage(index); - } - } - /** - * repeated .context.Device devices = 1; - */ - public Builder setDevices( - int index, context.ContextOuterClass.Device value) { - if (devicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevicesIsMutable(); - devices_.set(index, value); - onChanged(); - } else { - devicesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder setDevices( - int index, context.ContextOuterClass.Device.Builder builderForValue) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.set(index, builderForValue.build()); - onChanged(); - } else { - devicesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder addDevices(context.ContextOuterClass.Device value) { - if (devicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevicesIsMutable(); - devices_.add(value); - onChanged(); - } else { - devicesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder addDevices( - int index, context.ContextOuterClass.Device value) { - if (devicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevicesIsMutable(); - devices_.add(index, value); - onChanged(); - } else { - devicesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder addDevices( - context.ContextOuterClass.Device.Builder builderForValue) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.add(builderForValue.build()); - onChanged(); - } else { - devicesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder addDevices( - int index, context.ContextOuterClass.Device.Builder builderForValue) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.add(index, builderForValue.build()); - onChanged(); - } else { - devicesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder addAllDevices( - java.lang.Iterable values) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, devices_); - onChanged(); - } else { - devicesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder clearDevices() { - if (devicesBuilder_ == null) { - devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - devicesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder removeDevices(int index) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.remove(index); - onChanged(); - } else { - devicesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public context.ContextOuterClass.Device.Builder getDevicesBuilder( - int index) { - return getDevicesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Device devices = 1; - */ - public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder( - int index) { - if (devicesBuilder_ == null) { - return devices_.get(index); } else { - return devicesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Device devices = 1; - */ - public java.util.List - getDevicesOrBuilderList() { - if (devicesBuilder_ != null) { - return devicesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(devices_); - } - } - /** - * repeated .context.Device devices = 1; - */ - public context.ContextOuterClass.Device.Builder addDevicesBuilder() { - return getDevicesFieldBuilder().addBuilder( - context.ContextOuterClass.Device.getDefaultInstance()); - } - /** - * repeated .context.Device devices = 1; - */ - public context.ContextOuterClass.Device.Builder addDevicesBuilder( - int index) { - return getDevicesFieldBuilder().addBuilder( - index, context.ContextOuterClass.Device.getDefaultInstance()); - } - /** - * repeated .context.Device devices = 1; - */ - public java.util.List - getDevicesBuilderList() { - return getDevicesFieldBuilder().getBuilderList(); - } - 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()); - devices_ = null; - } - return devicesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.DeviceList) - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(index, builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - // @@protoc_insertion_point(class_scope:context.DeviceList) - private static final context.ContextOuterClass.DeviceList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceList(); - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addAllLinkIds(java.lang.Iterable values) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, linkIds_); + onChanged(); + } else { + linkIdsBuilder_.addAllMessages(values); + } + return this; + } - public static context.ContextOuterClass.DeviceList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder clearLinkIds() { + if (linkIdsBuilder_ == null) { + linkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + linkIdsBuilder_.clear(); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder removeLinkIds(int index) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.remove(index); + onChanged(); + } else { + linkIdsBuilder_.remove(index); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdsBuilder(int index) { + return getLinkIdsFieldBuilder().getBuilder(index); + } - @java.lang.Override - public context.ContextOuterClass.DeviceList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index) { + if (linkIdsBuilder_ == null) { + return linkIds_.get(index); + } else { + return linkIdsBuilder_.getMessageOrBuilder(index); + } + } - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public java.util.List getLinkIdsOrBuilderList() { + if (linkIdsBuilder_ != null) { + return linkIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(linkIds_); + } + } - public interface DeviceFilterOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.DeviceFilter) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder() { + return getLinkIdsFieldBuilder().addBuilder(context.ContextOuterClass.LinkId.getDefaultInstance()); + } - /** - * .context.DeviceIdList device_ids = 1; - * @return Whether the deviceIds field is set. - */ - boolean hasDeviceIds(); - /** - * .context.DeviceIdList device_ids = 1; - * @return The deviceIds. - */ - context.ContextOuterClass.DeviceIdList getDeviceIds(); - /** - * .context.DeviceIdList device_ids = 1; - */ - context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder(); + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder(int index) { + return getLinkIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.LinkId.getDefaultInstance()); + } - /** - * bool include_endpoints = 2; - * @return The includeEndpoints. - */ - boolean getIncludeEndpoints(); + /** + * repeated .context.LinkId link_ids = 4; + */ + public java.util.List getLinkIdsBuilderList() { + return getLinkIdsFieldBuilder().getBuilderList(); + } - /** - * bool include_config_rules = 3; - * @return The includeConfigRules. - */ - boolean getIncludeConfigRules(); + private com.google.protobuf.RepeatedFieldBuilderV3 getLinkIdsFieldBuilder() { + if (linkIdsBuilder_ == null) { + linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + linkIds_ = null; + } + return linkIdsBuilder_; + } - /** - * bool include_components = 4; - * @return The includeComponents. - */ - boolean getIncludeComponents(); - } - /** - * Protobuf type {@code context.DeviceFilter} - */ - public static final class DeviceFilter extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.DeviceFilter) - DeviceFilterOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceFilter.newBuilder() to construct. - private DeviceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceFilter() { - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceFilter(); - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_Exclusions) + } - @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; - } + // @@protoc_insertion_point(class_scope:context.Constraint_Exclusions) + private static final context.ContextOuterClass.Constraint_Exclusions DEFAULT_INSTANCE; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceFilter.class, context.ContextOuterClass.DeviceFilter.Builder.class); - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_Exclusions(); + } - public static final int DEVICE_IDS_FIELD_NUMBER = 1; - private context.ContextOuterClass.DeviceIdList deviceIds_; - /** - * .context.DeviceIdList device_ids = 1; - * @return Whether the deviceIds field is set. - */ - @java.lang.Override - public boolean hasDeviceIds() { - return deviceIds_ != null; - } - /** - * .context.DeviceIdList device_ids = 1; - * @return The deviceIds. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdList getDeviceIds() { - return deviceIds_ == null ? context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; - } - /** - * .context.DeviceIdList device_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder() { - return getDeviceIds(); - } + public static context.ContextOuterClass.Constraint_Exclusions getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static final int INCLUDE_ENDPOINTS_FIELD_NUMBER = 2; - private boolean includeEndpoints_; - /** - * bool include_endpoints = 2; - * @return The includeEndpoints. - */ - @java.lang.Override - public boolean getIncludeEndpoints() { - return includeEndpoints_; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 3; - private boolean includeConfigRules_; - /** - * bool include_config_rules = 3; - * @return The includeConfigRules. - */ - @java.lang.Override - public boolean getIncludeConfigRules() { - return includeConfigRules_; + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Exclusions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConstraintOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ConstraintActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + + /** + * .context.ConstraintActionEnum action = 1; + * @return The action. + */ + context.ContextOuterClass.ConstraintActionEnum getAction(); + + /** + * .context.Constraint_Custom custom = 2; + * @return Whether the custom field is set. + */ + boolean hasCustom(); + + /** + * .context.Constraint_Custom custom = 2; + * @return The custom. + */ + context.ContextOuterClass.Constraint_Custom getCustom(); + + /** + * .context.Constraint_Custom custom = 2; + */ + context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder(); + + /** + * .context.Constraint_Schedule schedule = 3; + * @return Whether the schedule field is set. + */ + boolean hasSchedule(); + + /** + * .context.Constraint_Schedule schedule = 3; + * @return The schedule. + */ + context.ContextOuterClass.Constraint_Schedule getSchedule(); + + /** + * .context.Constraint_Schedule schedule = 3; + */ + context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder(); + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return Whether the endpointLocation field is set. + */ + boolean hasEndpointLocation(); + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return The endpointLocation. + */ + context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation(); + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder(); + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return Whether the endpointPriority field is set. + */ + boolean hasEndpointPriority(); + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return The endpointPriority. + */ + context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority(); + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder(); + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return Whether the slaCapacity field is set. + */ + boolean hasSlaCapacity(); + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return The slaCapacity. + */ + context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity(); + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder(); + + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return Whether the slaLatency field is set. + */ + boolean hasSlaLatency(); + + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return The slaLatency. + */ + context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency(); + + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder(); + + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return Whether the slaAvailability field is set. + */ + boolean hasSlaAvailability(); + + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return The slaAvailability. + */ + context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability(); + + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder(); + + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return Whether the slaIsolation field is set. + */ + boolean hasSlaIsolation(); + + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return The slaIsolation. + */ + context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation(); + + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder(); + + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return Whether the exclusions field is set. + */ + boolean hasExclusions(); + + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return The exclusions. + */ + context.ContextOuterClass.Constraint_Exclusions getExclusions(); + + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder(); + + public context.ContextOuterClass.Constraint.ConstraintCase getConstraintCase(); } - public static final int INCLUDE_COMPONENTS_FIELD_NUMBER = 4; - private boolean includeComponents_; /** - * bool include_components = 4; - * @return The includeComponents. + * Protobuf type {@code context.Constraint} */ - @java.lang.Override - public boolean getIncludeComponents() { - return includeComponents_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static final class Constraint extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint) + ConstraintOrBuilder { - memoizedIsInitialized = 1; - return true; - } + private static final long serialVersionUID = 0L; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (deviceIds_ != null) { - output.writeMessage(1, getDeviceIds()); - } - if (includeEndpoints_ != false) { - output.writeBool(2, includeEndpoints_); - } - if (includeConfigRules_ != false) { - output.writeBool(3, includeConfigRules_); - } - if (includeComponents_ != false) { - output.writeBool(4, includeComponents_); - } - unknownFields.writeTo(output); - } + // Use Constraint.newBuilder() to construct. + private Constraint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (deviceIds_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDeviceIds()); - } - if (includeEndpoints_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, includeEndpoints_); - } - if (includeConfigRules_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, includeConfigRules_); - } - if (includeComponents_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, includeComponents_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private Constraint() { + action_ = 0; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.DeviceFilter)) { - return super.equals(obj); - } - context.ContextOuterClass.DeviceFilter other = (context.ContextOuterClass.DeviceFilter) obj; - - if (hasDeviceIds() != other.hasDeviceIds()) return false; - if (hasDeviceIds()) { - if (!getDeviceIds() - .equals(other.getDeviceIds())) return false; - } - if (getIncludeEndpoints() - != other.getIncludeEndpoints()) return false; - if (getIncludeConfigRules() - != other.getIncludeConfigRules()) return false; - if (getIncludeComponents() - != other.getIncludeComponents()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Constraint(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDeviceIds()) { - hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getDeviceIds().hashCode(); - } - hash = (37 * hash) + INCLUDE_ENDPOINTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeEndpoints()); - hash = (37 * hash) + INCLUDE_CONFIG_RULES_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - public static context.ContextOuterClass.DeviceFilter parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceFilter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceFilter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceFilter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceFilter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + 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(); + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.DeviceFilter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_descriptor; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.DeviceFilter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.DeviceFilter) - context.ContextOuterClass.DeviceFilterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_DeviceFilter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceFilter.class, context.ContextOuterClass.DeviceFilter.Builder.class); - } - - // 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; - deviceIdsBuilder_ = null; - } - includeEndpoints_ = false; - - includeConfigRules_ = false; - - includeComponents_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_DeviceFilter_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceFilter getDefaultInstanceForType() { - return context.ContextOuterClass.DeviceFilter.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.DeviceFilter build() { - context.ContextOuterClass.DeviceFilter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.DeviceFilter) { - return mergeFrom((context.ContextOuterClass.DeviceFilter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.DeviceFilter other) { - if (other == context.ContextOuterClass.DeviceFilter.getDefaultInstance()) return this; - if (other.hasDeviceIds()) { - mergeDeviceIds(other.getDeviceIds()); - } - if (other.getIncludeEndpoints() != false) { - setIncludeEndpoints(other.getIncludeEndpoints()); - } - if (other.getIncludeConfigRules() != false) { - setIncludeConfigRules(other.getIncludeConfigRules()); - } - if (other.getIncludeComponents() != false) { - setIncludeComponents(other.getIncludeComponents()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceFilter) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.DeviceIdList deviceIds_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceIdList, context.ContextOuterClass.DeviceIdList.Builder, context.ContextOuterClass.DeviceIdListOrBuilder> deviceIdsBuilder_; - /** - * .context.DeviceIdList device_ids = 1; - * @return Whether the deviceIds field is set. - */ - public boolean hasDeviceIds() { - return deviceIdsBuilder_ != null || deviceIds_ != null; - } - /** - * .context.DeviceIdList device_ids = 1; - * @return The deviceIds. - */ - public context.ContextOuterClass.DeviceIdList getDeviceIds() { - if (deviceIdsBuilder_ == null) { - return deviceIds_ == null ? context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; - } else { - return deviceIdsBuilder_.getMessage(); - } - } - /** - * .context.DeviceIdList device_ids = 1; - */ - public Builder setDeviceIds(context.ContextOuterClass.DeviceIdList value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceIds_ = value; - onChanged(); - } else { - deviceIdsBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceIdList device_ids = 1; - */ - public Builder setDeviceIds( - context.ContextOuterClass.DeviceIdList.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - deviceIds_ = builderForValue.build(); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceIdList device_ids = 1; - */ - public Builder mergeDeviceIds(context.ContextOuterClass.DeviceIdList value) { - if (deviceIdsBuilder_ == null) { - if (deviceIds_ != null) { - deviceIds_ = - context.ContextOuterClass.DeviceIdList.newBuilder(deviceIds_).mergeFrom(value).buildPartial(); - } else { - deviceIds_ = value; - } - onChanged(); - } else { - deviceIdsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceIdList device_ids = 1; - */ - public Builder clearDeviceIds() { - if (deviceIdsBuilder_ == null) { - deviceIds_ = null; - onChanged(); - } else { - deviceIds_ = null; - deviceIdsBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceIdList device_ids = 1; - */ - public context.ContextOuterClass.DeviceIdList.Builder getDeviceIdsBuilder() { - - onChanged(); - return getDeviceIdsFieldBuilder().getBuilder(); - } - /** - * .context.DeviceIdList device_ids = 1; - */ - public context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder() { - if (deviceIdsBuilder_ != null) { - return deviceIdsBuilder_.getMessageOrBuilder(); - } else { - return deviceIds_ == null ? - context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; - } - } - /** - * .context.DeviceIdList device_ids = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceIdList, context.ContextOuterClass.DeviceIdList.Builder, context.ContextOuterClass.DeviceIdListOrBuilder> - getDeviceIdsFieldBuilder() { - if (deviceIdsBuilder_ == null) { - deviceIdsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceIdList, context.ContextOuterClass.DeviceIdList.Builder, context.ContextOuterClass.DeviceIdListOrBuilder>( - getDeviceIds(), - getParentForChildren(), - isClean()); - deviceIds_ = null; - } - return deviceIdsBuilder_; - } - - private boolean includeEndpoints_ ; - /** - * bool include_endpoints = 2; - * @return The includeEndpoints. - */ - @java.lang.Override - public boolean getIncludeEndpoints() { - return includeEndpoints_; - } - /** - * bool include_endpoints = 2; - * @param value The includeEndpoints to set. - * @return This builder for chaining. - */ - public Builder setIncludeEndpoints(boolean value) { - - includeEndpoints_ = value; - onChanged(); - return this; - } - /** - * bool include_endpoints = 2; - * @return This builder for chaining. - */ - public Builder clearIncludeEndpoints() { - - includeEndpoints_ = false; - onChanged(); - return this; - } - - private boolean includeConfigRules_ ; - /** - * bool include_config_rules = 3; - * @return The includeConfigRules. - */ - @java.lang.Override - public boolean getIncludeConfigRules() { - return includeConfigRules_; - } - /** - * bool include_config_rules = 3; - * @param value The includeConfigRules to set. - * @return This builder for chaining. - */ - public Builder setIncludeConfigRules(boolean value) { - - includeConfigRules_ = value; - onChanged(); - return this; - } - /** - * bool include_config_rules = 3; - * @return This builder for chaining. - */ - public Builder clearIncludeConfigRules() { - - includeConfigRules_ = false; - onChanged(); - return this; - } - - private boolean includeComponents_ ; - /** - * bool include_components = 4; - * @return The includeComponents. - */ - @java.lang.Override - public boolean getIncludeComponents() { - return includeComponents_; - } - /** - * bool include_components = 4; - * @param value The includeComponents to set. - * @return This builder for chaining. - */ - public Builder setIncludeComponents(boolean value) { - - includeComponents_ = value; - onChanged(); - return this; - } - /** - * bool include_components = 4; - * @return This builder for chaining. - */ - public Builder clearIncludeComponents() { - - includeComponents_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.DeviceFilter) - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class); + } - // @@protoc_insertion_point(class_scope:context.DeviceFilter) - private static final context.ContextOuterClass.DeviceFilter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceFilter(); - } + private int constraintCase_ = 0; - public static context.ContextOuterClass.DeviceFilter getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private java.lang.Object constraint_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public enum ConstraintCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + CUSTOM(2), + SCHEDULE(3), + ENDPOINT_LOCATION(4), + ENDPOINT_PRIORITY(5), + SLA_CAPACITY(6), + SLA_LATENCY(7), + SLA_AVAILABILITY(8), + SLA_ISOLATION(9), + EXCLUSIONS(10), + CONSTRAINT_NOT_SET(0); - @java.lang.Override - public context.ContextOuterClass.DeviceFilter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private final int value; - } + private ConstraintCase(int value) { + this.value = value; + } - public interface DeviceEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.DeviceEvent) - com.google.protobuf.MessageOrBuilder { + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConstraintCase valueOf(int value) { + return forNumber(value); + } - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + public static ConstraintCase forNumber(int value) { + switch(value) { + case 2: + return CUSTOM; + case 3: + return SCHEDULE; + case 4: + return ENDPOINT_LOCATION; + case 5: + return ENDPOINT_PRIORITY; + case 6: + return SLA_CAPACITY; + case 7: + return SLA_LATENCY; + case 8: + return SLA_AVAILABILITY; + case 9: + return SLA_ISOLATION; + case 10: + return EXCLUSIONS; + case 0: + return CONSTRAINT_NOT_SET; + default: + return null; + } + } - /** - * .context.DeviceId device_id = 2; - * @return Whether the deviceId field is set. - */ - boolean hasDeviceId(); - /** - * .context.DeviceId device_id = 2; - * @return The deviceId. - */ - context.ContextOuterClass.DeviceId getDeviceId(); - /** - * .context.DeviceId device_id = 2; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + public int getNumber() { + return this.value; + } + } - /** - * .context.DeviceConfig device_config = 3; - * @return Whether the deviceConfig field is set. - */ - boolean hasDeviceConfig(); - /** - * .context.DeviceConfig device_config = 3; - * @return The deviceConfig. - */ - context.ContextOuterClass.DeviceConfig getDeviceConfig(); - /** - * .context.DeviceConfig device_config = 3; - */ - context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder(); - } - /** - * Protobuf type {@code context.DeviceEvent} - */ - public static final class DeviceEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.DeviceEvent) - DeviceEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceEvent.newBuilder() to construct. - private DeviceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceEvent() { - } + public ConstraintCase getConstraintCase() { + return ConstraintCase.forNumber(constraintCase_); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceEvent(); - } + public static final int ACTION_FIELD_NUMBER = 1; - @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; - } + private int action_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceEvent.class, context.ContextOuterClass.DeviceEvent.Builder.class); - } + /** + * .context.ConstraintActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + /** + * .context.ConstraintActionEnum action = 1; + * @return The action. + */ + @java.lang.Override + public context.ContextOuterClass.ConstraintActionEnum getAction() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.valueOf(action_); + return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; + } - public static final int DEVICE_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.DeviceId deviceId_; - /** - * .context.DeviceId device_id = 2; - * @return Whether the deviceId field is set. - */ - @java.lang.Override - public boolean hasDeviceId() { - return deviceId_ != null; - } - /** - * .context.DeviceId device_id = 2; - * @return The deviceId. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceId() { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - /** - * .context.DeviceId device_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); - } + public static final int CUSTOM_FIELD_NUMBER = 2; - public static final int DEVICE_CONFIG_FIELD_NUMBER = 3; - private context.ContextOuterClass.DeviceConfig deviceConfig_; - /** - * .context.DeviceConfig device_config = 3; - * @return Whether the deviceConfig field is set. - */ - @java.lang.Override - public boolean hasDeviceConfig() { - return deviceConfig_ != null; - } - /** - * .context.DeviceConfig device_config = 3; - * @return The deviceConfig. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceConfig getDeviceConfig() { - return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; - } - /** - * .context.DeviceConfig device_config = 3; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { - return getDeviceConfig(); - } + /** + * .context.Constraint_Custom custom = 2; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return constraintCase_ == 2; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.Constraint_Custom custom = 2; + * @return The custom. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Custom getCustom() { + if (constraintCase_ == 2) { + return (context.ContextOuterClass.Constraint_Custom) constraint_; + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.Constraint_Custom custom = 2; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() { + if (constraintCase_ == 2) { + return (context.ContextOuterClass.Constraint_Custom) constraint_; + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (deviceId_ != null) { - output.writeMessage(2, getDeviceId()); - } - if (deviceConfig_ != null) { - output.writeMessage(3, getDeviceConfig()); - } - unknownFields.writeTo(output); - } + public static final int SCHEDULE_FIELD_NUMBER = 3; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (deviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDeviceId()); - } - if (deviceConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getDeviceConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Constraint_Schedule schedule = 3; + * @return Whether the schedule field is set. + */ + @java.lang.Override + public boolean hasSchedule() { + return constraintCase_ == 3; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.DeviceEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.DeviceEvent other = (context.ContextOuterClass.DeviceEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasDeviceId() != other.hasDeviceId()) return false; - if (hasDeviceId()) { - if (!getDeviceId() - .equals(other.getDeviceId())) return false; - } - if (hasDeviceConfig() != other.hasDeviceConfig()) return false; - if (hasDeviceConfig()) { - if (!getDeviceConfig() - .equals(other.getDeviceConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Constraint_Schedule schedule = 3; + * @return The schedule. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Schedule getSchedule() { + if (constraintCase_ == 3) { + return (context.ContextOuterClass.Constraint_Schedule) constraint_; + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasDeviceId()) { - hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getDeviceId().hashCode(); - } - if (hasDeviceConfig()) { - hash = (37 * hash) + DEVICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDeviceConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Constraint_Schedule schedule = 3; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() { + if (constraintCase_ == 3) { + return (context.ContextOuterClass.Constraint_Schedule) constraint_; + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } - public static context.ContextOuterClass.DeviceEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int ENDPOINT_LOCATION_FIELD_NUMBER = 4; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.DeviceEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return Whether the endpointLocation field is set. + */ + @java.lang.Override + public boolean hasEndpointLocation() { + return constraintCase_ == 4; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.DeviceEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.DeviceEvent) - context.ContextOuterClass.DeviceEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_DeviceEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceEvent.class, context.ContextOuterClass.DeviceEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (deviceIdBuilder_ == null) { - deviceId_ = null; - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - } else { - deviceConfig_ = null; - deviceConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_DeviceEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceEvent getDefaultInstanceForType() { - return context.ContextOuterClass.DeviceEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.DeviceEvent build() { - context.ContextOuterClass.DeviceEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.DeviceEvent) { - return mergeFrom((context.ContextOuterClass.DeviceEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.DeviceEvent other) { - if (other == context.ContextOuterClass.DeviceEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasDeviceId()) { - mergeDeviceId(other.getDeviceId()); - } - if (other.hasDeviceConfig()) { - mergeDeviceConfig(other.getDeviceConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.DeviceId deviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdBuilder_; - /** - * .context.DeviceId device_id = 2; - * @return Whether the deviceId field is set. - */ - public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; - } - /** - * .context.DeviceId device_id = 2; - * @return The deviceId. - */ - public context.ContextOuterClass.DeviceId getDeviceId() { - if (deviceIdBuilder_ == null) { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } else { - return deviceIdBuilder_.getMessage(); - } - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceId_ = value; - onChanged(); - } else { - deviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder setDeviceId( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdBuilder_ == null) { - deviceId_ = builderForValue.build(); - onChanged(); - } else { - deviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = - context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); - } else { - deviceId_ = value; - } - onChanged(); - } else { - deviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { - - onChanged(); - return getDeviceIdFieldBuilder().getBuilder(); - } - /** - * .context.DeviceId device_id = 2; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - if (deviceIdBuilder_ != null) { - return deviceIdBuilder_.getMessageOrBuilder(); - } else { - return deviceId_ == null ? - context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - } - /** - * .context.DeviceId device_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> - getDeviceIdFieldBuilder() { - if (deviceIdBuilder_ == null) { - deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( - getDeviceId(), - getParentForChildren(), - isClean()); - deviceId_ = null; - } - return deviceIdBuilder_; - } - - private context.ContextOuterClass.DeviceConfig deviceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder> deviceConfigBuilder_; - /** - * .context.DeviceConfig device_config = 3; - * @return Whether the deviceConfig field is set. - */ - public boolean hasDeviceConfig() { - return deviceConfigBuilder_ != null || deviceConfig_ != null; - } - /** - * .context.DeviceConfig device_config = 3; - * @return The deviceConfig. - */ - public context.ContextOuterClass.DeviceConfig getDeviceConfig() { - if (deviceConfigBuilder_ == null) { - return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; - } else { - return deviceConfigBuilder_.getMessage(); - } - } - /** - * .context.DeviceConfig device_config = 3; - */ - public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig value) { - if (deviceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceConfig_ = value; - onChanged(); - } else { - deviceConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceConfig device_config = 3; - */ - public Builder setDeviceConfig( - context.ContextOuterClass.DeviceConfig.Builder builderForValue) { - if (deviceConfigBuilder_ == null) { - deviceConfig_ = builderForValue.build(); - onChanged(); - } else { - deviceConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceConfig device_config = 3; - */ - public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) { - if (deviceConfigBuilder_ == null) { - if (deviceConfig_ != null) { - deviceConfig_ = - context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial(); - } else { - deviceConfig_ = value; - } - onChanged(); - } else { - deviceConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceConfig device_config = 3; - */ - public Builder clearDeviceConfig() { - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - onChanged(); - } else { - deviceConfig_ = null; - deviceConfigBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceConfig device_config = 3; - */ - public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() { - - onChanged(); - return getDeviceConfigFieldBuilder().getBuilder(); - } - /** - * .context.DeviceConfig device_config = 3; - */ - public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { - if (deviceConfigBuilder_ != null) { - return deviceConfigBuilder_.getMessageOrBuilder(); - } else { - return deviceConfig_ == null ? - context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; - } - } - /** - * .context.DeviceConfig device_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder> - getDeviceConfigFieldBuilder() { - if (deviceConfigBuilder_ == null) { - deviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder>( - getDeviceConfig(), - getParentForChildren(), - isClean()); - deviceConfig_ = null; - } - return deviceConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.DeviceEvent) - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return The endpointLocation. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() { + if (constraintCase_ == 4) { + return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } - // @@protoc_insertion_point(class_scope:context.DeviceEvent) - private static final context.ContextOuterClass.DeviceEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceEvent(); - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() { + if (constraintCase_ == 4) { + return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } - public static context.ContextOuterClass.DeviceEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final int ENDPOINT_PRIORITY_FIELD_NUMBER = 5; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return Whether the endpointPriority field is set. + */ + @java.lang.Override + public boolean hasEndpointPriority() { + return constraintCase_ == 5; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return The endpointPriority. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() { + if (constraintCase_ == 5) { + return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } - @java.lang.Override - public context.ContextOuterClass.DeviceEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() { + if (constraintCase_ == 5) { + return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } - } + public static final int SLA_CAPACITY_FIELD_NUMBER = 6; - public interface LinkIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.LinkId) - com.google.protobuf.MessageOrBuilder { + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return Whether the slaCapacity field is set. + */ + @java.lang.Override + public boolean hasSlaCapacity() { + return constraintCase_ == 6; + } - /** - * .context.Uuid link_uuid = 1; - * @return Whether the linkUuid field is set. - */ - boolean hasLinkUuid(); - /** - * .context.Uuid link_uuid = 1; - * @return The linkUuid. - */ - context.ContextOuterClass.Uuid getLinkUuid(); - /** - * .context.Uuid link_uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder(); - } - /** - *
-   * ----- Link ----------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.LinkId} - */ - public static final class LinkId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.LinkId) - LinkIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use LinkId.newBuilder() to construct. - private LinkId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LinkId() { - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return The slaCapacity. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() { + if (constraintCase_ == 6) { + return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LinkId(); - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() { + if (constraintCase_ == 6) { + return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } - @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; - } + public static final int SLA_LATENCY_FIELD_NUMBER = 7; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkId.class, context.ContextOuterClass.LinkId.Builder.class); - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return Whether the slaLatency field is set. + */ + @java.lang.Override + public boolean hasSlaLatency() { + return constraintCase_ == 7; + } - public static final int LINK_UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid linkUuid_; - /** - * .context.Uuid link_uuid = 1; - * @return Whether the linkUuid field is set. - */ - @java.lang.Override - public boolean hasLinkUuid() { - return linkUuid_ != null; - } - /** - * .context.Uuid link_uuid = 1; - * @return The linkUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getLinkUuid() { - return linkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; - } - /** - * .context.Uuid link_uuid = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder() { - return getLinkUuid(); - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return The slaLatency. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { + if (constraintCase_ == 7) { + return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { + if (constraintCase_ == 7) { + return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } - memoizedIsInitialized = 1; - return true; - } + public static final int SLA_AVAILABILITY_FIELD_NUMBER = 8; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (linkUuid_ != null) { - output.writeMessage(1, getLinkUuid()); - } - unknownFields.writeTo(output); - } + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return Whether the slaAvailability field is set. + */ + @java.lang.Override + public boolean hasSlaAvailability() { + return constraintCase_ == 8; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (linkUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLinkUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return The slaAvailability. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { + if (constraintCase_ == 8) { + return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.LinkId)) { - return super.equals(obj); - } - context.ContextOuterClass.LinkId other = (context.ContextOuterClass.LinkId) obj; - - if (hasLinkUuid() != other.hasLinkUuid()) return false; - if (hasLinkUuid()) { - if (!getLinkUuid() - .equals(other.getLinkUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { + if (constraintCase_ == 8) { + return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLinkUuid()) { - hash = (37 * hash) + LINK_UUID_FIELD_NUMBER; - hash = (53 * hash) + getLinkUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static final int SLA_ISOLATION_FIELD_NUMBER = 9; - public static context.ContextOuterClass.LinkId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return Whether the slaIsolation field is set. + */ + @java.lang.Override + public boolean hasSlaIsolation() { + return constraintCase_ == 9; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.LinkId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return The slaIsolation. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { + if (constraintCase_ == 9) { + return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Link ----------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.LinkId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.LinkId) - context.ContextOuterClass.LinkIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_LinkId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkId.class, context.ContextOuterClass.LinkId.Builder.class); - } - - // 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; - linkUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_LinkId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.LinkId getDefaultInstanceForType() { - return context.ContextOuterClass.LinkId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.LinkId build() { - context.ContextOuterClass.LinkId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.LinkId) { - return mergeFrom((context.ContextOuterClass.LinkId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.LinkId other) { - if (other == context.ContextOuterClass.LinkId.getDefaultInstance()) return this; - if (other.hasLinkUuid()) { - mergeLinkUuid(other.getLinkUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid linkUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> linkUuidBuilder_; - /** - * .context.Uuid link_uuid = 1; - * @return Whether the linkUuid field is set. - */ - public boolean hasLinkUuid() { - return linkUuidBuilder_ != null || linkUuid_ != null; - } - /** - * .context.Uuid link_uuid = 1; - * @return The linkUuid. - */ - public context.ContextOuterClass.Uuid getLinkUuid() { - if (linkUuidBuilder_ == null) { - return linkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; - } else { - return linkUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid link_uuid = 1; - */ - public Builder setLinkUuid(context.ContextOuterClass.Uuid value) { - if (linkUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - linkUuid_ = value; - onChanged(); - } else { - linkUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid link_uuid = 1; - */ - public Builder setLinkUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (linkUuidBuilder_ == null) { - linkUuid_ = builderForValue.build(); - onChanged(); - } else { - linkUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid link_uuid = 1; - */ - public Builder mergeLinkUuid(context.ContextOuterClass.Uuid value) { - if (linkUuidBuilder_ == null) { - if (linkUuid_ != null) { - linkUuid_ = - context.ContextOuterClass.Uuid.newBuilder(linkUuid_).mergeFrom(value).buildPartial(); - } else { - linkUuid_ = value; - } - onChanged(); - } else { - linkUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid link_uuid = 1; - */ - public Builder clearLinkUuid() { - if (linkUuidBuilder_ == null) { - linkUuid_ = null; - onChanged(); - } else { - linkUuid_ = null; - linkUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid link_uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getLinkUuidBuilder() { - - onChanged(); - return getLinkUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid link_uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder() { - if (linkUuidBuilder_ != null) { - return linkUuidBuilder_.getMessageOrBuilder(); - } else { - return linkUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; - } - } - /** - * .context.Uuid link_uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getLinkUuidFieldBuilder() { - if (linkUuidBuilder_ == null) { - linkUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getLinkUuid(), - getParentForChildren(), - isClean()); - linkUuid_ = null; - } - return linkUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.LinkId) - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { + if (constraintCase_ == 9) { + return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } - // @@protoc_insertion_point(class_scope:context.LinkId) - private static final context.ContextOuterClass.LinkId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.LinkId(); - } + public static final int EXCLUSIONS_FIELD_NUMBER = 10; - public static context.ContextOuterClass.LinkId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return Whether the exclusions field is set. + */ + @java.lang.Override + public boolean hasExclusions() { + return constraintCase_ == 10; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return The exclusions. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Exclusions getExclusions() { + if (constraintCase_ == 10) { + return (context.ContextOuterClass.Constraint_Exclusions) constraint_; + } + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { + if (constraintCase_ == 10) { + return (context.ContextOuterClass.Constraint_Exclusions) constraint_; + } + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } - @java.lang.Override - public context.ContextOuterClass.LinkId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private byte memoizedIsInitialized = -1; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - public interface LinkOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Link) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) { + output.writeEnum(1, action_); + } + if (constraintCase_ == 2) { + output.writeMessage(2, (context.ContextOuterClass.Constraint_Custom) constraint_); + } + if (constraintCase_ == 3) { + output.writeMessage(3, (context.ContextOuterClass.Constraint_Schedule) constraint_); + } + if (constraintCase_ == 4) { + output.writeMessage(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_); + } + if (constraintCase_ == 5) { + output.writeMessage(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_); + } + if (constraintCase_ == 6) { + output.writeMessage(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); + } + if (constraintCase_ == 7) { + output.writeMessage(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_); + } + if (constraintCase_ == 8) { + output.writeMessage(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_); + } + if (constraintCase_ == 9) { + output.writeMessage(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); + } + if (constraintCase_ == 10) { + output.writeMessage(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); + } + unknownFields.writeTo(output); + } - /** - * .context.LinkId link_id = 1; - * @return Whether the linkId field is set. - */ - boolean hasLinkId(); - /** - * .context.LinkId link_id = 1; - * @return The linkId. - */ - context.ContextOuterClass.LinkId getLinkId(); - /** - * .context.LinkId link_id = 1; - */ - context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder(); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_); + } + if (constraintCase_ == 2) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.Constraint_Custom) constraint_); + } + if (constraintCase_ == 3) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, (context.ContextOuterClass.Constraint_Schedule) constraint_); + } + if (constraintCase_ == 4) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_); + } + if (constraintCase_ == 5) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_); + } + if (constraintCase_ == 6) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); + } + if (constraintCase_ == 7) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_); + } + if (constraintCase_ == 8) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_); + } + if (constraintCase_ == 9) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); + } + if (constraintCase_ == 10) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint other = (context.ContextOuterClass.Constraint) obj; + if (action_ != other.action_) + return false; + if (!getConstraintCase().equals(other.getConstraintCase())) + return false; + switch(constraintCase_) { + case 2: + if (!getCustom().equals(other.getCustom())) + return false; + break; + case 3: + if (!getSchedule().equals(other.getSchedule())) + return false; + break; + case 4: + if (!getEndpointLocation().equals(other.getEndpointLocation())) + return false; + break; + case 5: + if (!getEndpointPriority().equals(other.getEndpointPriority())) + return false; + break; + case 6: + if (!getSlaCapacity().equals(other.getSlaCapacity())) + return false; + break; + case 7: + if (!getSlaLatency().equals(other.getSlaLatency())) + return false; + break; + case 8: + if (!getSlaAvailability().equals(other.getSlaAvailability())) + return false; + break; + case 9: + if (!getSlaIsolation().equals(other.getSlaIsolation())) + return false; + break; + case 10: + if (!getExclusions().equals(other.getExclusions())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - java.util.List - getLinkEndpointIdsList(); - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointId getLinkEndpointIds(int index); - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - int getLinkEndpointIdsCount(); - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - java.util.List - getLinkEndpointIdsOrBuilderList(); - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.Link} - */ - public static final class Link extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Link) - LinkOrBuilder { - private static final long serialVersionUID = 0L; - // Use Link.newBuilder() to construct. - private Link(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Link() { - name_ = ""; - linkEndpointIds_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + switch(constraintCase_) { + case 2: + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + getCustom().hashCode(); + break; + case 3: + hash = (37 * hash) + SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getSchedule().hashCode(); + break; + case 4: + hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getEndpointLocation().hashCode(); + break; + case 5: + hash = (37 * hash) + ENDPOINT_PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getEndpointPriority().hashCode(); + break; + case 6: + hash = (37 * hash) + SLA_CAPACITY_FIELD_NUMBER; + hash = (53 * hash) + getSlaCapacity().hashCode(); + break; + case 7: + hash = (37 * hash) + SLA_LATENCY_FIELD_NUMBER; + hash = (53 * hash) + getSlaLatency().hashCode(); + break; + case 8: + hash = (37 * hash) + SLA_AVAILABILITY_FIELD_NUMBER; + hash = (53 * hash) + getSlaAvailability().hashCode(); + break; + case 9: + hash = (37 * hash) + SLA_ISOLATION_FIELD_NUMBER; + hash = (53 * hash) + getSlaIsolation().hashCode(); + break; + case 10: + hash = (37 * hash) + EXCLUSIONS_FIELD_NUMBER; + hash = (53 * hash) + getExclusions().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Link(); - } + public static context.ContextOuterClass.Constraint parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @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(); - mutable_bitField0_ |= 0x00000001; - } - linkEndpointIds_.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)) { - 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; - } + public static context.ContextOuterClass.Constraint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Link_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Link.class, context.ContextOuterClass.Link.Builder.class); - } + public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int LINK_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.LinkId linkId_; - /** - * .context.LinkId link_id = 1; - * @return Whether the linkId field is set. - */ - @java.lang.Override - public boolean hasLinkId() { - return linkId_ != null; - } - /** - * .context.LinkId link_id = 1; - * @return The linkId. - */ - @java.lang.Override - public context.ContextOuterClass.LinkId getLinkId() { - return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; - } - /** - * .context.LinkId link_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { - return getLinkId(); - } + public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static context.ContextOuterClass.Constraint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 3; - private java.util.List linkEndpointIds_; - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List getLinkEndpointIdsList() { - return linkEndpointIds_; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List - getLinkEndpointIdsOrBuilderList() { - return linkEndpointIds_; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - @java.lang.Override - public int getLinkEndpointIdsCount() { - return linkEndpointIds_.size(); - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { - return linkEndpointIds_.get(index); - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder( - int index) { - return linkEndpointIds_.get(index); - } + public static context.ContextOuterClass.Constraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (linkId_ != null) { - output.writeMessage(1, getLinkId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - for (int i = 0; i < linkEndpointIds_.size(); i++) { - output.writeMessage(3, linkEndpointIds_.get(i)); - } - unknownFields.writeTo(output); - } + public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (linkId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLinkId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - for (int i = 0; i < linkEndpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, linkEndpointIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Link)) { - return super.equals(obj); - } - context.ContextOuterClass.Link other = (context.ContextOuterClass.Link) obj; - - if (hasLinkId() != other.hasLinkId()) return false; - if (hasLinkId()) { - if (!getLinkId() - .equals(other.getLinkId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getLinkEndpointIdsList() - .equals(other.getLinkEndpointIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLinkId()) { - hash = (37 * hash) + LINK_ID_FIELD_NUMBER; - hash = (53 * hash) + getLinkId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getLinkEndpointIdsCount() > 0) { - hash = (37 * hash) + LINK_ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getLinkEndpointIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public static context.ContextOuterClass.Link parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Link parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Link parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Link parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Link parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Link parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Link parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Link parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Link parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Link parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Link parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Link parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Link prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Link} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Link) - context.ContextOuterClass.LinkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Link_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Link_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Link.class, context.ContextOuterClass.Link.Builder.class); - } - - // 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; - linkIdBuilder_ = null; - } - name_ = ""; - - if (linkEndpointIdsBuilder_ == null) { - linkEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - linkEndpointIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Link_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Link getDefaultInstanceForType() { - return context.ContextOuterClass.Link.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Link build() { - context.ContextOuterClass.Link result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - if (linkEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.linkEndpointIds_ = linkEndpointIds_; - } else { - result.linkEndpointIds_ = linkEndpointIdsBuilder_.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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Link) { - return mergeFrom((context.ContextOuterClass.Link)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Link other) { - if (other == context.ContextOuterClass.Link.getDefaultInstance()) return this; - if (other.hasLinkId()) { - mergeLinkId(other.getLinkId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (linkEndpointIdsBuilder_ == null) { - if (!other.linkEndpointIds_.isEmpty()) { - if (linkEndpointIds_.isEmpty()) { - linkEndpointIds_ = other.linkEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.addAll(other.linkEndpointIds_); - } - onChanged(); - } - } else { - if (!other.linkEndpointIds_.isEmpty()) { - if (linkEndpointIdsBuilder_.isEmpty()) { - linkEndpointIdsBuilder_.dispose(); - linkEndpointIdsBuilder_ = null; - linkEndpointIds_ = other.linkEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - linkEndpointIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLinkEndpointIdsFieldBuilder() : null; - } else { - linkEndpointIdsBuilder_.addAllMessages(other.linkEndpointIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Link) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private context.ContextOuterClass.LinkId linkId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> linkIdBuilder_; - /** - * .context.LinkId link_id = 1; - * @return Whether the linkId field is set. - */ - public boolean hasLinkId() { - return linkIdBuilder_ != null || linkId_ != null; - } - /** - * .context.LinkId link_id = 1; - * @return The linkId. - */ - public context.ContextOuterClass.LinkId getLinkId() { - if (linkIdBuilder_ == null) { - return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; - } else { - return linkIdBuilder_.getMessage(); - } - } - /** - * .context.LinkId link_id = 1; - */ - public Builder setLinkId(context.ContextOuterClass.LinkId value) { - if (linkIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - linkId_ = value; - onChanged(); - } else { - linkIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.LinkId link_id = 1; - */ - public Builder setLinkId( - context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdBuilder_ == null) { - linkId_ = builderForValue.build(); - onChanged(); - } else { - linkIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.LinkId link_id = 1; - */ - public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { - if (linkIdBuilder_ == null) { - if (linkId_ != null) { - linkId_ = - context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); - } else { - linkId_ = value; - } - onChanged(); - } else { - linkIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.LinkId link_id = 1; - */ - public Builder clearLinkId() { - if (linkIdBuilder_ == null) { - linkId_ = null; - onChanged(); - } else { - linkId_ = null; - linkIdBuilder_ = null; - } - - return this; - } - /** - * .context.LinkId link_id = 1; - */ - public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { - - onChanged(); - return getLinkIdFieldBuilder().getBuilder(); - } - /** - * .context.LinkId link_id = 1; - */ - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { - if (linkIdBuilder_ != null) { - return linkIdBuilder_.getMessageOrBuilder(); - } else { - return linkId_ == null ? - context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; - } - } - /** - * .context.LinkId link_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> - getLinkIdFieldBuilder() { - if (linkIdBuilder_ == null) { - linkIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder>( - getLinkId(), - getParentForChildren(), - isClean()); - linkId_ = null; - } - return linkIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List linkEndpointIds_ = - java.util.Collections.emptyList(); - private void ensureLinkEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - linkEndpointIds_ = new java.util.ArrayList(linkEndpointIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> linkEndpointIdsBuilder_; - - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public java.util.List getLinkEndpointIdsList() { - if (linkEndpointIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(linkEndpointIds_); - } else { - return linkEndpointIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public int getLinkEndpointIdsCount() { - if (linkEndpointIdsBuilder_ == null) { - return linkEndpointIds_.size(); - } else { - return linkEndpointIdsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { - if (linkEndpointIdsBuilder_ == null) { - return linkEndpointIds_.get(index); - } else { - return linkEndpointIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder setLinkEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (linkEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.set(index, value); - onChanged(); - } else { - linkEndpointIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder setLinkEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (linkEndpointIdsBuilder_ == null) { - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.set(index, builderForValue.build()); - onChanged(); - } else { - linkEndpointIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId value) { - if (linkEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.add(value); - onChanged(); - } else { - linkEndpointIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder addLinkEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (linkEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.add(index, value); - onChanged(); - } else { - linkEndpointIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder addLinkEndpointIds( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (linkEndpointIdsBuilder_ == null) { - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.add(builderForValue.build()); - onChanged(); - } else { - linkEndpointIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder addLinkEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (linkEndpointIdsBuilder_ == null) { - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.add(index, builderForValue.build()); - onChanged(); - } else { - linkEndpointIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder addAllLinkEndpointIds( - java.lang.Iterable values) { - if (linkEndpointIdsBuilder_ == null) { - ensureLinkEndpointIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, linkEndpointIds_); - onChanged(); - } else { - linkEndpointIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder clearLinkEndpointIds() { - if (linkEndpointIdsBuilder_ == null) { - linkEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - linkEndpointIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder removeLinkEndpointIds(int index) { - if (linkEndpointIdsBuilder_ == null) { - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.remove(index); - onChanged(); - } else { - linkEndpointIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder getLinkEndpointIdsBuilder( - int index) { - return getLinkEndpointIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder( - int index) { - if (linkEndpointIdsBuilder_ == null) { - return linkEndpointIds_.get(index); } else { - return linkEndpointIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public java.util.List - getLinkEndpointIdsOrBuilderList() { - if (linkEndpointIdsBuilder_ != null) { - return linkEndpointIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(linkEndpointIds_); - } - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder() { - return getLinkEndpointIdsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder( - int index) { - return getLinkEndpointIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public java.util.List - getLinkEndpointIdsBuilderList() { - return getLinkEndpointIdsFieldBuilder().getBuilderList(); - } - 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()); - linkEndpointIds_ = null; - } - return linkEndpointIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Link) - } + public static Builder newBuilder(context.ContextOuterClass.Constraint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - // @@protoc_insertion_point(class_scope:context.Link) - private static final context.ContextOuterClass.Link DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Link(); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static context.ContextOuterClass.Link getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * Protobuf type {@code context.Constraint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint) + context.ContextOuterClass.ConstraintOrBuilder { - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_descriptor; + } - @java.lang.Override - public context.ContextOuterClass.Link getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class); + } - } + // Construct using context.ContextOuterClass.Constraint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - public interface LinkIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.LinkIdList) - com.google.protobuf.MessageOrBuilder { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - /** - * repeated .context.LinkId link_ids = 1; - */ - java.util.List - getLinkIdsList(); - /** - * repeated .context.LinkId link_ids = 1; - */ - context.ContextOuterClass.LinkId getLinkIds(int index); - /** - * repeated .context.LinkId link_ids = 1; - */ - int getLinkIdsCount(); - /** - * repeated .context.LinkId link_ids = 1; - */ - java.util.List - getLinkIdsOrBuilderList(); - /** - * repeated .context.LinkId link_ids = 1; - */ - context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.LinkIdList} - */ - public static final class LinkIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.LinkIdList) - LinkIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use LinkIdList.newBuilder() to construct. - private LinkIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LinkIdList() { - linkIds_ = java.util.Collections.emptyList(); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LinkIdList(); - } + @java.lang.Override + public Builder clear() { + super.clear(); + action_ = 0; + constraintCase_ = 0; + constraint_ = null; + return this; + } - @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(); - 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; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_descriptor; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkIdList.class, context.ContextOuterClass.LinkIdList.Builder.class); - } + @java.lang.Override + public context.ContextOuterClass.Constraint getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint.getDefaultInstance(); + } - public static final int LINK_IDS_FIELD_NUMBER = 1; - private java.util.List linkIds_; - /** - * repeated .context.LinkId link_ids = 1; - */ - @java.lang.Override - public java.util.List getLinkIdsList() { - return linkIds_; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - @java.lang.Override - public java.util.List - getLinkIdsOrBuilderList() { - return linkIds_; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - @java.lang.Override - public int getLinkIdsCount() { - return linkIds_.size(); - } - /** - * repeated .context.LinkId link_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.LinkId getLinkIds(int index) { - return linkIds_.get(index); - } - /** - * repeated .context.LinkId link_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index) { - return linkIds_.get(index); - } + @java.lang.Override + public context.ContextOuterClass.Constraint build() { + context.ContextOuterClass.Constraint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @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 (constraintCase_ == 3) { + if (scheduleBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = scheduleBuilder_.build(); + } + } + if (constraintCase_ == 4) { + if (endpointLocationBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = endpointLocationBuilder_.build(); + } + } + if (constraintCase_ == 5) { + if (endpointPriorityBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = endpointPriorityBuilder_.build(); + } + } + if (constraintCase_ == 6) { + if (slaCapacityBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = slaCapacityBuilder_.build(); + } + } + if (constraintCase_ == 7) { + if (slaLatencyBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = slaLatencyBuilder_.build(); + } + } + if (constraintCase_ == 8) { + if (slaAvailabilityBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = slaAvailabilityBuilder_.build(); + } + } + if (constraintCase_ == 9) { + if (slaIsolationBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = slaIsolationBuilder_.build(); + } + } + if (constraintCase_ == 10) { + if (exclusionsBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = exclusionsBuilder_.build(); + } + } + result.constraintCase_ = constraintCase_; + onBuilt(); + return result; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < linkIds_.size(); i++) { - output.writeMessage(1, linkIds_.get(i)); - } - unknownFields.writeTo(output); - } + @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 int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < linkIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, linkIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.LinkIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.LinkIdList other = (context.ContextOuterClass.LinkIdList) obj; - - if (!getLinkIdsList() - .equals(other.getLinkIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getLinkIdsCount() > 0) { - hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; - hash = (53 * hash) + getLinkIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - public static context.ContextOuterClass.LinkIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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 newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.LinkIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint) { + return mergeFrom((context.ContextOuterClass.Constraint) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.LinkIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.LinkIdList) - context.ContextOuterClass.LinkIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_LinkIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkIdList.class, context.ContextOuterClass.LinkIdList.Builder.class); - } - - // 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(); - if (linkIdsBuilder_ == null) { - linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - linkIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_LinkIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.LinkIdList getDefaultInstanceForType() { - return context.ContextOuterClass.LinkIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.LinkIdList build() { - context.ContextOuterClass.LinkIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.LinkIdList buildPartial() { - context.ContextOuterClass.LinkIdList result = new context.ContextOuterClass.LinkIdList(this); - int from_bitField0_ = bitField0_; - if (linkIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.LinkIdList) { - return mergeFrom((context.ContextOuterClass.LinkIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.LinkIdList other) { - if (other == context.ContextOuterClass.LinkIdList.getDefaultInstance()) return this; - if (linkIdsBuilder_ == null) { - if (!other.linkIds_.isEmpty()) { - if (linkIds_.isEmpty()) { - linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLinkIdsIsMutable(); - linkIds_.addAll(other.linkIds_); - } - onChanged(); - } - } else { - if (!other.linkIds_.isEmpty()) { - if (linkIdsBuilder_.isEmpty()) { - linkIdsBuilder_.dispose(); - linkIdsBuilder_ = null; - linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000001); - linkIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLinkIdsFieldBuilder() : null; - } else { - linkIdsBuilder_.addAllMessages(other.linkIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List linkIds_ = - java.util.Collections.emptyList(); - private void ensureLinkIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - linkIds_ = new java.util.ArrayList(linkIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> linkIdsBuilder_; - - /** - * repeated .context.LinkId link_ids = 1; - */ - public java.util.List getLinkIdsList() { - if (linkIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(linkIds_); - } else { - return linkIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public int getLinkIdsCount() { - if (linkIdsBuilder_ == null) { - return linkIds_.size(); - } else { - return linkIdsBuilder_.getCount(); - } - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public context.ContextOuterClass.LinkId getLinkIds(int index) { - if (linkIdsBuilder_ == null) { - return linkIds_.get(index); - } else { - return linkIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder setLinkIds( - int index, context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.set(index, value); - onChanged(); - } else { - linkIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder setLinkIds( - int index, context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.set(index, builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder addLinkIds(context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.add(value); - onChanged(); - } else { - linkIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder addLinkIds( - int index, context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.add(index, value); - onChanged(); - } else { - linkIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder addLinkIds( - context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.add(builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder addLinkIds( - int index, context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.add(index, builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder addAllLinkIds( - java.lang.Iterable values) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, linkIds_); - onChanged(); - } else { - linkIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder clearLinkIds() { - if (linkIdsBuilder_ == null) { - linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - linkIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder removeLinkIds(int index) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.remove(index); - onChanged(); - } else { - linkIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public context.ContextOuterClass.LinkId.Builder getLinkIdsBuilder( - int index) { - return getLinkIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index) { - if (linkIdsBuilder_ == null) { - return linkIds_.get(index); } else { - return linkIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public java.util.List - getLinkIdsOrBuilderList() { - if (linkIdsBuilder_ != null) { - return linkIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(linkIds_); - } - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder() { - return getLinkIdsFieldBuilder().addBuilder( - context.ContextOuterClass.LinkId.getDefaultInstance()); - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder( - int index) { - return getLinkIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.LinkId.getDefaultInstance()); - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public java.util.List - getLinkIdsBuilderList() { - return getLinkIdsFieldBuilder().getBuilderList(); - } - 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_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - linkIds_ = null; - } - return linkIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.LinkIdList) - } + public Builder mergeFrom(context.ContextOuterClass.Constraint other) { + if (other == context.ContextOuterClass.Constraint.getDefaultInstance()) + return this; + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + switch(other.getConstraintCase()) { + case CUSTOM: + { + mergeCustom(other.getCustom()); + break; + } + case SCHEDULE: + { + mergeSchedule(other.getSchedule()); + break; + } + case ENDPOINT_LOCATION: + { + mergeEndpointLocation(other.getEndpointLocation()); + break; + } + case ENDPOINT_PRIORITY: + { + mergeEndpointPriority(other.getEndpointPriority()); + break; + } + case SLA_CAPACITY: + { + mergeSlaCapacity(other.getSlaCapacity()); + break; + } + case SLA_LATENCY: + { + mergeSlaLatency(other.getSlaLatency()); + break; + } + case SLA_AVAILABILITY: + { + mergeSlaAvailability(other.getSlaAvailability()); + break; + } + case SLA_ISOLATION: + { + mergeSlaIsolation(other.getSlaIsolation()); + break; + } + case EXCLUSIONS: + { + mergeExclusions(other.getExclusions()); + break; + } + case CONSTRAINT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:context.LinkIdList) - private static final context.ContextOuterClass.LinkIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.LinkIdList(); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static context.ContextOuterClass.LinkIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private int constraintCase_ = 0; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private java.lang.Object constraint_; - @java.lang.Override - public context.ContextOuterClass.LinkIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public ConstraintCase getConstraintCase() { + return ConstraintCase.forNumber(constraintCase_); + } - } + public Builder clearConstraint() { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + return this; + } - public interface LinkListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.LinkList) - com.google.protobuf.MessageOrBuilder { + private int action_ = 0; - /** - * repeated .context.Link links = 1; - */ - java.util.List - getLinksList(); - /** - * repeated .context.Link links = 1; - */ - context.ContextOuterClass.Link getLinks(int index); - /** - * repeated .context.Link links = 1; - */ - int getLinksCount(); - /** - * repeated .context.Link links = 1; - */ - java.util.List - getLinksOrBuilderList(); - /** - * repeated .context.Link links = 1; - */ - context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder( - int index); - } - /** - * Protobuf type {@code context.LinkList} - */ - public static final class LinkList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.LinkList) - LinkListOrBuilder { - private static final long serialVersionUID = 0L; - // Use LinkList.newBuilder() to construct. - private LinkList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LinkList() { - links_ = java.util.Collections.emptyList(); - } + /** + * .context.ConstraintActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LinkList(); - } + /** + * .context.ConstraintActionEnum action = 1; + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + action_ = value; + onChanged(); + return this; + } - @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(); - 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; - } + /** + * .context.ConstraintActionEnum action = 1; + * @return The action. + */ + @java.lang.Override + public context.ContextOuterClass.ConstraintActionEnum getAction() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.valueOf(action_); + return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkList.class, context.ContextOuterClass.LinkList.Builder.class); - } + /** + * .context.ConstraintActionEnum action = 1; + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(context.ContextOuterClass.ConstraintActionEnum value) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value.getNumber(); + onChanged(); + return this; + } - public static final int LINKS_FIELD_NUMBER = 1; - private java.util.List links_; - /** - * repeated .context.Link links = 1; - */ - @java.lang.Override - public java.util.List getLinksList() { - return links_; - } - /** - * repeated .context.Link links = 1; - */ - @java.lang.Override - public java.util.List - getLinksOrBuilderList() { - return links_; - } - /** - * repeated .context.Link links = 1; - */ - @java.lang.Override - public int getLinksCount() { - return links_.size(); - } - /** - * repeated .context.Link links = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Link getLinks(int index) { - return links_.get(index); - } - /** - * repeated .context.Link links = 1; - */ - @java.lang.Override - public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder( - int index) { - return links_.get(index); - } + /** + * .context.ConstraintActionEnum action = 1; + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = 0; + onChanged(); + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private com.google.protobuf.SingleFieldBuilderV3 customBuilder_; - memoizedIsInitialized = 1; - return true; - } + /** + * .context.Constraint_Custom custom = 2; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return constraintCase_ == 2; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < links_.size(); i++) { - output.writeMessage(1, links_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * .context.Constraint_Custom custom = 2; + * @return The custom. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Custom getCustom() { + if (customBuilder_ == null) { + if (constraintCase_ == 2) { + return (context.ContextOuterClass.Constraint_Custom) constraint_; + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } else { + if (constraintCase_ == 2) { + return customBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < links_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, links_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Constraint_Custom custom = 2; + */ + public Builder setCustom(context.ContextOuterClass.Constraint_Custom value) { + if (customBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + customBuilder_.setMessage(value); + } + constraintCase_ = 2; + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.LinkList)) { - return super.equals(obj); - } - context.ContextOuterClass.LinkList other = (context.ContextOuterClass.LinkList) obj; - - if (!getLinksList() - .equals(other.getLinksList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Constraint_Custom custom = 2; + */ + public Builder setCustom(context.ContextOuterClass.Constraint_Custom.Builder builderForValue) { + if (customBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + customBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 2; + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getLinksCount() > 0) { - hash = (37 * hash) + LINKS_FIELD_NUMBER; - hash = (53 * hash) + getLinksList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Constraint_Custom custom = 2; + */ + public Builder mergeCustom(context.ContextOuterClass.Constraint_Custom value) { + if (customBuilder_ == null) { + if (constraintCase_ == 2 && constraint_ != context.ContextOuterClass.Constraint_Custom.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_Custom.newBuilder((context.ContextOuterClass.Constraint_Custom) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 2) { + customBuilder_.mergeFrom(value); + } + customBuilder_.setMessage(value); + } + constraintCase_ = 2; + return this; + } - public static context.ContextOuterClass.LinkList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Constraint_Custom custom = 2; + */ + public Builder clearCustom() { + if (customBuilder_ == null) { + if (constraintCase_ == 2) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 2) { + constraintCase_ = 0; + constraint_ = null; + } + customBuilder_.clear(); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.LinkList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Constraint_Custom custom = 2; + */ + public context.ContextOuterClass.Constraint_Custom.Builder getCustomBuilder() { + return getCustomFieldBuilder().getBuilder(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.LinkList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.LinkList) - context.ContextOuterClass.LinkListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_LinkList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkList.class, context.ContextOuterClass.LinkList.Builder.class); - } - - // 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(); - if (linksBuilder_ == null) { - links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - linksBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_LinkList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.LinkList getDefaultInstanceForType() { - return context.ContextOuterClass.LinkList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.LinkList build() { - context.ContextOuterClass.LinkList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.LinkList buildPartial() { - context.ContextOuterClass.LinkList result = new context.ContextOuterClass.LinkList(this); - int from_bitField0_ = bitField0_; - if (linksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - links_ = java.util.Collections.unmodifiableList(links_); - bitField0_ = (bitField0_ & ~0x00000001); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.LinkList) { - return mergeFrom((context.ContextOuterClass.LinkList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.LinkList other) { - if (other == context.ContextOuterClass.LinkList.getDefaultInstance()) return this; - if (linksBuilder_ == null) { - if (!other.links_.isEmpty()) { - if (links_.isEmpty()) { - links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLinksIsMutable(); - links_.addAll(other.links_); - } - onChanged(); - } - } else { - if (!other.links_.isEmpty()) { - if (linksBuilder_.isEmpty()) { - linksBuilder_.dispose(); - linksBuilder_ = null; - links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000001); - linksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLinksFieldBuilder() : null; - } else { - linksBuilder_.addAllMessages(other.links_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List links_ = - java.util.Collections.emptyList(); - private void ensureLinksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - links_ = new java.util.ArrayList(links_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Link, context.ContextOuterClass.Link.Builder, context.ContextOuterClass.LinkOrBuilder> linksBuilder_; - - /** - * repeated .context.Link links = 1; - */ - public java.util.List getLinksList() { - if (linksBuilder_ == null) { - return java.util.Collections.unmodifiableList(links_); - } else { - return linksBuilder_.getMessageList(); - } - } - /** - * repeated .context.Link links = 1; - */ - public int getLinksCount() { - if (linksBuilder_ == null) { - return links_.size(); - } else { - return linksBuilder_.getCount(); - } - } - /** - * repeated .context.Link links = 1; - */ - public context.ContextOuterClass.Link getLinks(int index) { - if (linksBuilder_ == null) { - return links_.get(index); - } else { - return linksBuilder_.getMessage(index); - } - } - /** - * repeated .context.Link links = 1; - */ - public Builder setLinks( - int index, context.ContextOuterClass.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.set(index, value); - onChanged(); - } else { - linksBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder setLinks( - int index, context.ContextOuterClass.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.set(index, builderForValue.build()); - onChanged(); - } else { - linksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder addLinks(context.ContextOuterClass.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.add(value); - onChanged(); - } else { - linksBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder addLinks( - int index, context.ContextOuterClass.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.add(index, value); - onChanged(); - } else { - linksBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder addLinks( - context.ContextOuterClass.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.add(builderForValue.build()); - onChanged(); - } else { - linksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder addLinks( - int index, context.ContextOuterClass.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.add(index, builderForValue.build()); - onChanged(); - } else { - linksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder addAllLinks( - java.lang.Iterable values) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, links_); - onChanged(); - } else { - linksBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder clearLinks() { - if (linksBuilder_ == null) { - links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - linksBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder removeLinks(int index) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.remove(index); - onChanged(); - } else { - linksBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public context.ContextOuterClass.Link.Builder getLinksBuilder( - int index) { - return getLinksFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Link links = 1; - */ - public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder( - int index) { - if (linksBuilder_ == null) { - return links_.get(index); } else { - return linksBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Link links = 1; - */ - public java.util.List - getLinksOrBuilderList() { - if (linksBuilder_ != null) { - return linksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(links_); - } - } - /** - * repeated .context.Link links = 1; - */ - public context.ContextOuterClass.Link.Builder addLinksBuilder() { - return getLinksFieldBuilder().addBuilder( - context.ContextOuterClass.Link.getDefaultInstance()); - } - /** - * repeated .context.Link links = 1; - */ - public context.ContextOuterClass.Link.Builder addLinksBuilder( - int index) { - return getLinksFieldBuilder().addBuilder( - index, context.ContextOuterClass.Link.getDefaultInstance()); - } - /** - * repeated .context.Link links = 1; - */ - public java.util.List - getLinksBuilderList() { - return getLinksFieldBuilder().getBuilderList(); - } - 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_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - links_ = null; - } - return linksBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.LinkList) - } + /** + * .context.Constraint_Custom custom = 2; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() { + if ((constraintCase_ == 2) && (customBuilder_ != null)) { + return customBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 2) { + return (context.ContextOuterClass.Constraint_Custom) constraint_; + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + } - // @@protoc_insertion_point(class_scope:context.LinkList) - private static final context.ContextOuterClass.LinkList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.LinkList(); - } + /** + * .context.Constraint_Custom custom = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getCustomFieldBuilder() { + if (customBuilder_ == null) { + if (!(constraintCase_ == 2)) { + constraint_ = context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Custom) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 2; + onChanged(); + ; + return customBuilder_; + } - public static context.ContextOuterClass.LinkList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3 scheduleBuilder_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Constraint_Schedule schedule = 3; + * @return Whether the schedule field is set. + */ + @java.lang.Override + public boolean hasSchedule() { + return constraintCase_ == 3; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Constraint_Schedule schedule = 3; + * @return The schedule. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Schedule getSchedule() { + if (scheduleBuilder_ == null) { + if (constraintCase_ == 3) { + return (context.ContextOuterClass.Constraint_Schedule) constraint_; + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } else { + if (constraintCase_ == 3) { + return scheduleBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + } - @java.lang.Override - public context.ContextOuterClass.LinkList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_Schedule schedule = 3; + */ + public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule value) { + if (scheduleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + scheduleBuilder_.setMessage(value); + } + constraintCase_ = 3; + return this; + } - } + /** + * .context.Constraint_Schedule schedule = 3; + */ + public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule.Builder builderForValue) { + if (scheduleBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + scheduleBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 3; + return this; + } - public interface LinkEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.LinkEvent) - com.google.protobuf.MessageOrBuilder { + /** + * .context.Constraint_Schedule schedule = 3; + */ + public Builder mergeSchedule(context.ContextOuterClass.Constraint_Schedule value) { + if (scheduleBuilder_ == null) { + if (constraintCase_ == 3 && constraint_ != context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_Schedule.newBuilder((context.ContextOuterClass.Constraint_Schedule) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 3) { + scheduleBuilder_.mergeFrom(value); + } + scheduleBuilder_.setMessage(value); + } + constraintCase_ = 3; + return this; + } - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + /** + * .context.Constraint_Schedule schedule = 3; + */ + public Builder clearSchedule() { + if (scheduleBuilder_ == null) { + if (constraintCase_ == 3) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 3) { + constraintCase_ = 0; + constraint_ = null; + } + scheduleBuilder_.clear(); + } + return this; + } - /** - * .context.LinkId link_id = 2; - * @return Whether the linkId field is set. - */ - boolean hasLinkId(); - /** - * .context.LinkId link_id = 2; - * @return The linkId. - */ - context.ContextOuterClass.LinkId getLinkId(); - /** - * .context.LinkId link_id = 2; - */ - context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder(); - } - /** - * Protobuf type {@code context.LinkEvent} - */ - public static final class LinkEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.LinkEvent) - LinkEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use LinkEvent.newBuilder() to construct. - private LinkEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LinkEvent() { - } + /** + * .context.Constraint_Schedule schedule = 3; + */ + public context.ContextOuterClass.Constraint_Schedule.Builder getScheduleBuilder() { + return getScheduleFieldBuilder().getBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LinkEvent(); - } + /** + * .context.Constraint_Schedule schedule = 3; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() { + if ((constraintCase_ == 3) && (scheduleBuilder_ != null)) { + return scheduleBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 3) { + return (context.ContextOuterClass.Constraint_Schedule) constraint_; + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + } - @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; - } + /** + * .context.Constraint_Schedule schedule = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getScheduleFieldBuilder() { + if (scheduleBuilder_ == null) { + if (!(constraintCase_ == 3)) { + constraint_ = context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + scheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Schedule) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 3; + onChanged(); + ; + return scheduleBuilder_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkEvent.class, context.ContextOuterClass.LinkEvent.Builder.class); - } + private com.google.protobuf.SingleFieldBuilderV3 endpointLocationBuilder_; - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return Whether the endpointLocation field is set. + */ + @java.lang.Override + public boolean hasEndpointLocation() { + return constraintCase_ == 4; + } - public static final int LINK_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.LinkId linkId_; - /** - * .context.LinkId link_id = 2; - * @return Whether the linkId field is set. - */ - @java.lang.Override - public boolean hasLinkId() { - return linkId_ != null; - } - /** - * .context.LinkId link_id = 2; - * @return The linkId. - */ - @java.lang.Override - public context.ContextOuterClass.LinkId getLinkId() { - return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; - } - /** - * .context.LinkId link_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { - return getLinkId(); - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return The endpointLocation. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() { + if (endpointLocationBuilder_ == null) { + if (constraintCase_ == 4) { + return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } else { + if (constraintCase_ == 4) { + return endpointLocationBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) { + if (endpointLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + endpointLocationBuilder_.setMessage(value); + } + constraintCase_ = 4; + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation.Builder builderForValue) { + if (endpointLocationBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + endpointLocationBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 4; + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (linkId_ != null) { - output.writeMessage(2, getLinkId()); - } - unknownFields.writeTo(output); - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public Builder mergeEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) { + if (endpointLocationBuilder_ == null) { + if (constraintCase_ == 4 && constraint_ != context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.newBuilder((context.ContextOuterClass.Constraint_EndPointLocation) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 4) { + endpointLocationBuilder_.mergeFrom(value); + } + endpointLocationBuilder_.setMessage(value); + } + constraintCase_ = 4; + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (linkId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getLinkId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public Builder clearEndpointLocation() { + if (endpointLocationBuilder_ == null) { + if (constraintCase_ == 4) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 4) { + constraintCase_ = 0; + constraint_ = null; + } + endpointLocationBuilder_.clear(); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.LinkEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.LinkEvent other = (context.ContextOuterClass.LinkEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasLinkId() != other.hasLinkId()) return false; - if (hasLinkId()) { - if (!getLinkId() - .equals(other.getLinkId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public context.ContextOuterClass.Constraint_EndPointLocation.Builder getEndpointLocationBuilder() { + return getEndpointLocationFieldBuilder().getBuilder(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasLinkId()) { - hash = (37 * hash) + LINK_ID_FIELD_NUMBER; - hash = (53 * hash) + getLinkId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() { + if ((constraintCase_ == 4) && (endpointLocationBuilder_ != null)) { + return endpointLocationBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 4) { + return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + } - public static context.ContextOuterClass.LinkEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointLocationFieldBuilder() { + if (endpointLocationBuilder_ == null) { + if (!(constraintCase_ == 4)) { + constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + endpointLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_EndPointLocation) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 4; + onChanged(); + ; + return endpointLocationBuilder_; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.LinkEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private com.google.protobuf.SingleFieldBuilderV3 endpointPriorityBuilder_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.LinkEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.LinkEvent) - context.ContextOuterClass.LinkEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_LinkEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkEvent.class, context.ContextOuterClass.LinkEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (linkIdBuilder_ == null) { - linkId_ = null; - } else { - linkId_ = null; - linkIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_LinkEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.LinkEvent getDefaultInstanceForType() { - return context.ContextOuterClass.LinkEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.LinkEvent build() { - context.ContextOuterClass.LinkEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.LinkEvent) { - return mergeFrom((context.ContextOuterClass.LinkEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.LinkEvent other) { - if (other == context.ContextOuterClass.LinkEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasLinkId()) { - mergeLinkId(other.getLinkId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.LinkId linkId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> linkIdBuilder_; - /** - * .context.LinkId link_id = 2; - * @return Whether the linkId field is set. - */ - public boolean hasLinkId() { - return linkIdBuilder_ != null || linkId_ != null; - } - /** - * .context.LinkId link_id = 2; - * @return The linkId. - */ - public context.ContextOuterClass.LinkId getLinkId() { - if (linkIdBuilder_ == null) { - return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; - } else { - return linkIdBuilder_.getMessage(); - } - } - /** - * .context.LinkId link_id = 2; - */ - public Builder setLinkId(context.ContextOuterClass.LinkId value) { - if (linkIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - linkId_ = value; - onChanged(); - } else { - linkIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.LinkId link_id = 2; - */ - public Builder setLinkId( - context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdBuilder_ == null) { - linkId_ = builderForValue.build(); - onChanged(); - } else { - linkIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.LinkId link_id = 2; - */ - public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { - if (linkIdBuilder_ == null) { - if (linkId_ != null) { - linkId_ = - context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); - } else { - linkId_ = value; - } - onChanged(); - } else { - linkIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.LinkId link_id = 2; - */ - public Builder clearLinkId() { - if (linkIdBuilder_ == null) { - linkId_ = null; - onChanged(); - } else { - linkId_ = null; - linkIdBuilder_ = null; - } - - return this; - } - /** - * .context.LinkId link_id = 2; - */ - public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { - - onChanged(); - return getLinkIdFieldBuilder().getBuilder(); - } - /** - * .context.LinkId link_id = 2; - */ - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { - if (linkIdBuilder_ != null) { - return linkIdBuilder_.getMessageOrBuilder(); - } else { - return linkId_ == null ? - context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; - } - } - /** - * .context.LinkId link_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> - getLinkIdFieldBuilder() { - if (linkIdBuilder_ == null) { - linkIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder>( - getLinkId(), - getParentForChildren(), - isClean()); - linkId_ = null; - } - return linkIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.LinkEvent) - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return Whether the endpointPriority field is set. + */ + @java.lang.Override + public boolean hasEndpointPriority() { + return constraintCase_ == 5; + } - // @@protoc_insertion_point(class_scope:context.LinkEvent) - private static final context.ContextOuterClass.LinkEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.LinkEvent(); - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return The endpointPriority. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() { + if (endpointPriorityBuilder_ == null) { + if (constraintCase_ == 5) { + return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } else { + if (constraintCase_ == 5) { + return endpointPriorityBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + } - public static context.ContextOuterClass.LinkEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) { + if (endpointPriorityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + endpointPriorityBuilder_.setMessage(value); + } + constraintCase_ = 5; + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority.Builder builderForValue) { + if (endpointPriorityBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + endpointPriorityBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 5; + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public Builder mergeEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) { + if (endpointPriorityBuilder_ == null) { + if (constraintCase_ == 5 && constraint_ != context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.newBuilder((context.ContextOuterClass.Constraint_EndPointPriority) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 5) { + endpointPriorityBuilder_.mergeFrom(value); + } + endpointPriorityBuilder_.setMessage(value); + } + constraintCase_ = 5; + return this; + } - @java.lang.Override - public context.ContextOuterClass.LinkEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public Builder clearEndpointPriority() { + if (endpointPriorityBuilder_ == null) { + if (constraintCase_ == 5) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 5) { + constraintCase_ = 0; + constraint_ = null; + } + endpointPriorityBuilder_.clear(); + } + return this; + } - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public context.ContextOuterClass.Constraint_EndPointPriority.Builder getEndpointPriorityBuilder() { + return getEndpointPriorityFieldBuilder().getBuilder(); + } - public interface ServiceIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceId) - com.google.protobuf.MessageOrBuilder { + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() { + if ((constraintCase_ == 5) && (endpointPriorityBuilder_ != null)) { + return endpointPriorityBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 5) { + return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + } - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointPriorityFieldBuilder() { + if (endpointPriorityBuilder_ == null) { + if (!(constraintCase_ == 5)) { + constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + endpointPriorityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_EndPointPriority) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 5; + onChanged(); + ; + return endpointPriorityBuilder_; + } - /** - * .context.Uuid service_uuid = 2; - * @return Whether the serviceUuid field is set. - */ - boolean hasServiceUuid(); - /** - * .context.Uuid service_uuid = 2; - * @return The serviceUuid. - */ - context.ContextOuterClass.Uuid getServiceUuid(); - /** - * .context.Uuid service_uuid = 2; - */ - context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder(); - } - /** - *
-   * ----- Service -------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.ServiceId} - */ - public static final class ServiceId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceId) - ServiceIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceId.newBuilder() to construct. - private ServiceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceId() { - } + private com.google.protobuf.SingleFieldBuilderV3 slaCapacityBuilder_; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceId(); - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return Whether the slaCapacity field is set. + */ + @java.lang.Override + public boolean hasSlaCapacity() { + return constraintCase_ == 6; + } - @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; - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return The slaCapacity. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() { + if (slaCapacityBuilder_ == null) { + if (constraintCase_ == 6) { + return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } else { + if (constraintCase_ == 6) { + return slaCapacityBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceId.class, context.ContextOuterClass.ServiceId.Builder.class); - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) { + if (slaCapacityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + slaCapacityBuilder_.setMessage(value); + } + constraintCase_ = 6; + return this; + } - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - /** - * .context.ContextId context_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity.Builder builderForValue) { + if (slaCapacityBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + slaCapacityBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 6; + return this; + } - public static final int SERVICE_UUID_FIELD_NUMBER = 2; - private context.ContextOuterClass.Uuid serviceUuid_; - /** - * .context.Uuid service_uuid = 2; - * @return Whether the serviceUuid field is set. - */ - @java.lang.Override - public boolean hasServiceUuid() { - return serviceUuid_ != null; - } - /** - * .context.Uuid service_uuid = 2; - * @return The serviceUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getServiceUuid() { - return serviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; - } - /** - * .context.Uuid service_uuid = 2; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder() { - return getServiceUuid(); - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + public Builder mergeSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) { + if (slaCapacityBuilder_ == null) { + if (constraintCase_ == 6 && constraint_ != context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.newBuilder((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 6) { + slaCapacityBuilder_.mergeFrom(value); + } + slaCapacityBuilder_.setMessage(value); + } + constraintCase_ = 6; + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + public Builder clearSlaCapacity() { + if (slaCapacityBuilder_ == null) { + if (constraintCase_ == 6) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 6) { + constraintCase_ = 0; + constraint_ = null; + } + slaCapacityBuilder_.clear(); + } + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + public context.ContextOuterClass.Constraint_SLA_Capacity.Builder getSlaCapacityBuilder() { + return getSlaCapacityFieldBuilder().getBuilder(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (serviceUuid_ != null) { - output.writeMessage(2, getServiceUuid()); - } - unknownFields.writeTo(output); - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() { + if ((constraintCase_ == 6) && (slaCapacityBuilder_ != null)) { + return slaCapacityBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 6) { + return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextId()); - } - if (serviceUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getServiceUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSlaCapacityFieldBuilder() { + if (slaCapacityBuilder_ == null) { + if (!(constraintCase_ == 6)) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } + slaCapacityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 6; + onChanged(); + ; + return slaCapacityBuilder_; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceId)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceId other = (context.ContextOuterClass.ServiceId) obj; - - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (hasServiceUuid() != other.hasServiceUuid()) return false; - if (hasServiceUuid()) { - if (!getServiceUuid() - .equals(other.getServiceUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private com.google.protobuf.SingleFieldBuilderV3 slaLatencyBuilder_; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - if (hasServiceUuid()) { - hash = (37 * hash) + SERVICE_UUID_FIELD_NUMBER; - hash = (53 * hash) + getServiceUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return Whether the slaLatency field is set. + */ + @java.lang.Override + public boolean hasSlaLatency() { + return constraintCase_ == 7; + } - public static context.ContextOuterClass.ServiceId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return The slaLatency. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { + if (slaLatencyBuilder_ == null) { + if (constraintCase_ == 7) { + return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } else { + if (constraintCase_ == 7) { + return slaLatencyBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { + if (slaLatencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + slaLatencyBuilder_.setMessage(value); + } + constraintCase_ = 7; + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Service -------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.ServiceId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceId) - context.ContextOuterClass.ServiceIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceId.class, context.ContextOuterClass.ServiceId.Builder.class); - } - - // 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; - contextIdBuilder_ = null; - } - if (serviceUuidBuilder_ == null) { - serviceUuid_ = null; - } else { - serviceUuid_ = null; - serviceUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceId getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceId build() { - context.ContextOuterClass.ServiceId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceId) { - return mergeFrom((context.ContextOuterClass.ServiceId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceId other) { - if (other == context.ContextOuterClass.ServiceId.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (other.hasServiceUuid()) { - mergeServiceUuid(other.getServiceUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ContextId contextId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private context.ContextOuterClass.Uuid serviceUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> serviceUuidBuilder_; - /** - * .context.Uuid service_uuid = 2; - * @return Whether the serviceUuid field is set. - */ - public boolean hasServiceUuid() { - return serviceUuidBuilder_ != null || serviceUuid_ != null; - } - /** - * .context.Uuid service_uuid = 2; - * @return The serviceUuid. - */ - public context.ContextOuterClass.Uuid getServiceUuid() { - if (serviceUuidBuilder_ == null) { - return serviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; - } else { - return serviceUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid service_uuid = 2; - */ - public Builder setServiceUuid(context.ContextOuterClass.Uuid value) { - if (serviceUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceUuid_ = value; - onChanged(); - } else { - serviceUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid service_uuid = 2; - */ - public Builder setServiceUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (serviceUuidBuilder_ == null) { - serviceUuid_ = builderForValue.build(); - onChanged(); - } else { - serviceUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid service_uuid = 2; - */ - public Builder mergeServiceUuid(context.ContextOuterClass.Uuid value) { - if (serviceUuidBuilder_ == null) { - if (serviceUuid_ != null) { - serviceUuid_ = - context.ContextOuterClass.Uuid.newBuilder(serviceUuid_).mergeFrom(value).buildPartial(); - } else { - serviceUuid_ = value; - } - onChanged(); - } else { - serviceUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid service_uuid = 2; - */ - public Builder clearServiceUuid() { - if (serviceUuidBuilder_ == null) { - serviceUuid_ = null; - onChanged(); - } else { - serviceUuid_ = null; - serviceUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid service_uuid = 2; - */ - public context.ContextOuterClass.Uuid.Builder getServiceUuidBuilder() { - - onChanged(); - return getServiceUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid service_uuid = 2; - */ - public context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder() { - if (serviceUuidBuilder_ != null) { - return serviceUuidBuilder_.getMessageOrBuilder(); - } else { - return serviceUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; - } - } - /** - * .context.Uuid service_uuid = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getServiceUuidFieldBuilder() { - if (serviceUuidBuilder_ == null) { - serviceUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getServiceUuid(), - getParentForChildren(), - isClean()); - serviceUuid_ = null; - } - return serviceUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceId) - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency.Builder builderForValue) { + if (slaLatencyBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + slaLatencyBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 7; + return this; + } - // @@protoc_insertion_point(class_scope:context.ServiceId) - private static final context.ContextOuterClass.ServiceId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceId(); - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + public Builder mergeSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { + if (slaLatencyBuilder_ == null) { + if (constraintCase_ == 7 && constraint_ != context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.newBuilder((context.ContextOuterClass.Constraint_SLA_Latency) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 7) { + slaLatencyBuilder_.mergeFrom(value); + } + slaLatencyBuilder_.setMessage(value); + } + constraintCase_ = 7; + return this; + } - public static context.ContextOuterClass.ServiceId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + public Builder clearSlaLatency() { + if (slaLatencyBuilder_ == null) { + if (constraintCase_ == 7) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 7) { + constraintCase_ = 0; + constraint_ = null; + } + slaLatencyBuilder_.clear(); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + public context.ContextOuterClass.Constraint_SLA_Latency.Builder getSlaLatencyBuilder() { + return getSlaLatencyFieldBuilder().getBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { + if ((constraintCase_ == 7) && (slaLatencyBuilder_ != null)) { + return slaLatencyBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 7) { + return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } + } - @java.lang.Override - public context.ContextOuterClass.ServiceId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSlaLatencyFieldBuilder() { + if (slaLatencyBuilder_ == null) { + if (!(constraintCase_ == 7)) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } + slaLatencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Latency) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 7; + onChanged(); + ; + return slaLatencyBuilder_; + } - } + private com.google.protobuf.SingleFieldBuilderV3 slaAvailabilityBuilder_; - public interface ServiceOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Service) - com.google.protobuf.MessageOrBuilder { + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return Whether the slaAvailability field is set. + */ + @java.lang.Override + public boolean hasSlaAvailability() { + return constraintCase_ == 8; + } - /** - * .context.ServiceId service_id = 1; - * @return Whether the serviceId field is set. - */ - boolean hasServiceId(); - /** - * .context.ServiceId service_id = 1; - * @return The serviceId. - */ - context.ContextOuterClass.ServiceId getServiceId(); - /** - * .context.ServiceId service_id = 1; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return The slaAvailability. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { + if (slaAvailabilityBuilder_ == null) { + if (constraintCase_ == 8) { + return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } else { + if (constraintCase_ == 8) { + return slaAvailabilityBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { + if (slaAvailabilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + slaAvailabilityBuilder_.setMessage(value); + } + constraintCase_ = 8; + return this; + } - /** - * .context.ServiceTypeEnum service_type = 3; - * @return The enum numeric value on the wire for serviceType. - */ - int getServiceTypeValue(); - /** - * .context.ServiceTypeEnum service_type = 3; - * @return The serviceType. - */ - context.ContextOuterClass.ServiceTypeEnum getServiceType(); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability.Builder builderForValue) { + if (slaAvailabilityBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + slaAvailabilityBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 8; + return this; + } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - java.util.List - getServiceEndpointIdsList(); - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - context.ContextOuterClass.EndPointId getServiceEndpointIds(int index); - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - int getServiceEndpointIdsCount(); - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - java.util.List - getServiceEndpointIdsOrBuilderList(); - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - context.ContextOuterClass.EndPointIdOrBuilder getServiceEndpointIdsOrBuilder( - int index); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + public Builder mergeSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { + if (slaAvailabilityBuilder_ == null) { + if (constraintCase_ == 8 && constraint_ != context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.newBuilder((context.ContextOuterClass.Constraint_SLA_Availability) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 8) { + slaAvailabilityBuilder_.mergeFrom(value); + } + slaAvailabilityBuilder_.setMessage(value); + } + constraintCase_ = 8; + return this; + } - /** - * repeated .context.Constraint service_constraints = 5; - */ - java.util.List - getServiceConstraintsList(); - /** - * repeated .context.Constraint service_constraints = 5; - */ - context.ContextOuterClass.Constraint getServiceConstraints(int index); - /** - * repeated .context.Constraint service_constraints = 5; - */ - int getServiceConstraintsCount(); - /** - * repeated .context.Constraint service_constraints = 5; - */ - java.util.List - getServiceConstraintsOrBuilderList(); - /** - * repeated .context.Constraint service_constraints = 5; - */ - context.ContextOuterClass.ConstraintOrBuilder getServiceConstraintsOrBuilder( - int index); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + public Builder clearSlaAvailability() { + if (slaAvailabilityBuilder_ == null) { + if (constraintCase_ == 8) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 8) { + constraintCase_ = 0; + constraint_ = null; + } + slaAvailabilityBuilder_.clear(); + } + return this; + } - /** - * .context.ServiceStatus service_status = 6; - * @return Whether the serviceStatus field is set. - */ - boolean hasServiceStatus(); - /** - * .context.ServiceStatus service_status = 6; - * @return The serviceStatus. - */ - context.ContextOuterClass.ServiceStatus getServiceStatus(); - /** - * .context.ServiceStatus service_status = 6; - */ - context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder(); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + public context.ContextOuterClass.Constraint_SLA_Availability.Builder getSlaAvailabilityBuilder() { + return getSlaAvailabilityFieldBuilder().getBuilder(); + } - /** - * .context.ServiceConfig service_config = 7; - * @return Whether the serviceConfig field is set. - */ - boolean hasServiceConfig(); - /** - * .context.ServiceConfig service_config = 7; - * @return The serviceConfig. - */ - context.ContextOuterClass.ServiceConfig getServiceConfig(); - /** - * .context.ServiceConfig service_config = 7; - */ - context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder(); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { + if ((constraintCase_ == 8) && (slaAvailabilityBuilder_ != null)) { + return slaAvailabilityBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 8) { + return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } + } - /** - * .context.Timestamp timestamp = 8; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 8; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 8; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); - } - /** - * Protobuf type {@code context.Service} - */ - public static final class Service extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Service) - ServiceOrBuilder { - private static final long serialVersionUID = 0L; - // Use Service.newBuilder() to construct. - private Service(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Service() { - name_ = ""; - serviceType_ = 0; - serviceEndpointIds_ = java.util.Collections.emptyList(); - serviceConstraints_ = java.util.Collections.emptyList(); - } + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSlaAvailabilityFieldBuilder() { + if (slaAvailabilityBuilder_ == null) { + if (!(constraintCase_ == 8)) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } + slaAvailabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Availability) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 8; + onChanged(); + ; + return slaAvailabilityBuilder_; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Service(); - } + private com.google.protobuf.SingleFieldBuilderV3 slaIsolationBuilder_; - @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(); - 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(); - 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; - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return Whether the slaIsolation field is set. + */ + @java.lang.Override + public boolean hasSlaIsolation() { + return constraintCase_ == 9; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Service_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Service.class, context.ContextOuterClass.Service.Builder.class); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return The slaIsolation. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { + if (slaIsolationBuilder_ == null) { + if (constraintCase_ == 9) { + return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } else { + if (constraintCase_ == 9) { + return slaIsolationBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } + } - public static final int SERVICE_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ServiceId serviceId_; - /** - * .context.ServiceId service_id = 1; - * @return Whether the serviceId field is set. - */ - @java.lang.Override - public boolean hasServiceId() { - return serviceId_ != null; - } - /** - * .context.ServiceId service_id = 1; - * @return The serviceId. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceId() { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - /** - * .context.ServiceId service_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { + if (slaIsolationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + slaIsolationBuilder_.setMessage(value); + } + constraintCase_ = 9; + return this; + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder builderForValue) { + if (slaIsolationBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + slaIsolationBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 9; + return this; + } - public static final int SERVICE_TYPE_FIELD_NUMBER = 3; - private int serviceType_; - /** - * .context.ServiceTypeEnum service_type = 3; - * @return The enum numeric value on the wire for serviceType. - */ - @java.lang.Override public int getServiceTypeValue() { - return serviceType_; - } - /** - * .context.ServiceTypeEnum service_type = 3; - * @return The serviceType. - */ - @java.lang.Override public context.ContextOuterClass.ServiceTypeEnum getServiceType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.valueOf(serviceType_); - return result == null ? context.ContextOuterClass.ServiceTypeEnum.UNRECOGNIZED : result; - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + public Builder mergeSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { + if (slaIsolationBuilder_ == null) { + if (constraintCase_ == 9 && constraint_ != context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.newBuilder((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 9) { + slaIsolationBuilder_.mergeFrom(value); + } + slaIsolationBuilder_.setMessage(value); + } + constraintCase_ = 9; + return this; + } - public static final int SERVICE_ENDPOINT_IDS_FIELD_NUMBER = 4; - private java.util.List serviceEndpointIds_; - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - @java.lang.Override - public java.util.List getServiceEndpointIdsList() { - return serviceEndpointIds_; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - @java.lang.Override - public java.util.List - getServiceEndpointIdsOrBuilderList() { - return serviceEndpointIds_; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - @java.lang.Override - public int getServiceEndpointIdsCount() { - return serviceEndpointIds_.size(); - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getServiceEndpointIds(int index) { - return serviceEndpointIds_.get(index); - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getServiceEndpointIdsOrBuilder( - int index) { - return serviceEndpointIds_.get(index); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + public Builder clearSlaIsolation() { + if (slaIsolationBuilder_ == null) { + if (constraintCase_ == 9) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 9) { + constraintCase_ = 0; + constraint_ = null; + } + slaIsolationBuilder_.clear(); + } + return this; + } - public static final int SERVICE_CONSTRAINTS_FIELD_NUMBER = 5; - private java.util.List serviceConstraints_; - /** - * repeated .context.Constraint service_constraints = 5; - */ - @java.lang.Override - public java.util.List getServiceConstraintsList() { - return serviceConstraints_; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - @java.lang.Override - public java.util.List - getServiceConstraintsOrBuilderList() { - return serviceConstraints_; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - @java.lang.Override - public int getServiceConstraintsCount() { - return serviceConstraints_.size(); - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint getServiceConstraints(int index) { - return serviceConstraints_.get(index); - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - @java.lang.Override - public context.ContextOuterClass.ConstraintOrBuilder getServiceConstraintsOrBuilder( - int index) { - return serviceConstraints_.get(index); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + public context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder getSlaIsolationBuilder() { + return getSlaIsolationFieldBuilder().getBuilder(); + } - public static final int SERVICE_STATUS_FIELD_NUMBER = 6; - private context.ContextOuterClass.ServiceStatus serviceStatus_; - /** - * .context.ServiceStatus service_status = 6; - * @return Whether the serviceStatus field is set. - */ - @java.lang.Override - public boolean hasServiceStatus() { - return serviceStatus_ != null; - } - /** - * .context.ServiceStatus service_status = 6; - * @return The serviceStatus. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceStatus getServiceStatus() { - return serviceStatus_ == null ? context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; - } - /** - * .context.ServiceStatus service_status = 6; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder() { - return getServiceStatus(); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { + if ((constraintCase_ == 9) && (slaIsolationBuilder_ != null)) { + return slaIsolationBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 9) { + return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } + } - public static final int SERVICE_CONFIG_FIELD_NUMBER = 7; - private context.ContextOuterClass.ServiceConfig serviceConfig_; - /** - * .context.ServiceConfig service_config = 7; - * @return Whether the serviceConfig field is set. - */ - @java.lang.Override - public boolean hasServiceConfig() { - return serviceConfig_ != null; - } - /** - * .context.ServiceConfig service_config = 7; - * @return The serviceConfig. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceConfig getServiceConfig() { - return serviceConfig_ == null ? context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; - } - /** - * .context.ServiceConfig service_config = 7; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder() { - return getServiceConfig(); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSlaIsolationFieldBuilder() { + if (slaIsolationBuilder_ == null) { + if (!(constraintCase_ == 9)) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } + slaIsolationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 9; + onChanged(); + ; + return slaIsolationBuilder_; + } - public static final int TIMESTAMP_FIELD_NUMBER = 8; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 8; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 8; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .context.Timestamp timestamp = 8; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } + private com.google.protobuf.SingleFieldBuilderV3 exclusionsBuilder_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return Whether the exclusions field is set. + */ + @java.lang.Override + public boolean hasExclusions() { + return constraintCase_ == 10; + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return The exclusions. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Exclusions getExclusions() { + if (exclusionsBuilder_ == null) { + if (constraintCase_ == 10) { + return (context.ContextOuterClass.Constraint_Exclusions) constraint_; + } + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } else { + if (constraintCase_ == 10) { + return exclusionsBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (serviceId_ != null) { - output.writeMessage(1, getServiceId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (serviceType_ != context.ContextOuterClass.ServiceTypeEnum.SERVICETYPE_UNKNOWN.getNumber()) { - output.writeEnum(3, serviceType_); - } - for (int i = 0; i < serviceEndpointIds_.size(); i++) { - output.writeMessage(4, serviceEndpointIds_.get(i)); - } - for (int i = 0; i < serviceConstraints_.size(); i++) { - output.writeMessage(5, serviceConstraints_.get(i)); - } - if (serviceStatus_ != null) { - output.writeMessage(6, getServiceStatus()); - } - if (serviceConfig_ != null) { - output.writeMessage(7, getServiceConfig()); - } - if (timestamp_ != null) { - output.writeMessage(8, getTimestamp()); - } - unknownFields.writeTo(output); - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions value) { + if (exclusionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + exclusionsBuilder_.setMessage(value); + } + constraintCase_ = 10; + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (serviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getServiceId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (serviceType_ != context.ContextOuterClass.ServiceTypeEnum.SERVICETYPE_UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, serviceType_); - } - for (int i = 0; i < serviceEndpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, serviceEndpointIds_.get(i)); - } - for (int i = 0; i < serviceConstraints_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, serviceConstraints_.get(i)); - } - if (serviceStatus_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getServiceStatus()); - } - if (serviceConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getServiceConfig()); - } - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getTimestamp()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions.Builder builderForValue) { + if (exclusionsBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + exclusionsBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 10; + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Service)) { - return super.equals(obj); - } - context.ContextOuterClass.Service other = (context.ContextOuterClass.Service) obj; - - if (hasServiceId() != other.hasServiceId()) return false; - if (hasServiceId()) { - if (!getServiceId() - .equals(other.getServiceId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (serviceType_ != other.serviceType_) return false; - if (!getServiceEndpointIdsList() - .equals(other.getServiceEndpointIdsList())) return false; - if (!getServiceConstraintsList() - .equals(other.getServiceConstraintsList())) return false; - if (hasServiceStatus() != other.hasServiceStatus()) return false; - if (hasServiceStatus()) { - if (!getServiceStatus() - .equals(other.getServiceStatus())) return false; - } - if (hasServiceConfig() != other.hasServiceConfig()) return false; - if (hasServiceConfig()) { - if (!getServiceConfig() - .equals(other.getServiceConfig())) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + public Builder mergeExclusions(context.ContextOuterClass.Constraint_Exclusions value) { + if (exclusionsBuilder_ == null) { + if (constraintCase_ == 10 && constraint_ != context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_Exclusions.newBuilder((context.ContextOuterClass.Constraint_Exclusions) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 10) { + exclusionsBuilder_.mergeFrom(value); + } + exclusionsBuilder_.setMessage(value); + } + constraintCase_ = 10; + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasServiceId()) { - hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + SERVICE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + serviceType_; - if (getServiceEndpointIdsCount() > 0) { - hash = (37 * hash) + SERVICE_ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getServiceEndpointIdsList().hashCode(); - } - if (getServiceConstraintsCount() > 0) { - hash = (37 * hash) + SERVICE_CONSTRAINTS_FIELD_NUMBER; - hash = (53 * hash) + getServiceConstraintsList().hashCode(); - } - if (hasServiceStatus()) { - hash = (37 * hash) + SERVICE_STATUS_FIELD_NUMBER; - hash = (53 * hash) + getServiceStatus().hashCode(); - } - if (hasServiceConfig()) { - hash = (37 * hash) + SERVICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getServiceConfig().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + public Builder clearExclusions() { + if (exclusionsBuilder_ == null) { + if (constraintCase_ == 10) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 10) { + constraintCase_ = 0; + constraint_ = null; + } + exclusionsBuilder_.clear(); + } + return this; + } - public static context.ContextOuterClass.Service parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Service parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Service parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Service parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Service parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Service parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Service parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Service parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Service parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Service parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Service parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Service parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + public context.ContextOuterClass.Constraint_Exclusions.Builder getExclusionsBuilder() { + return getExclusionsFieldBuilder().getBuilder(); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Service prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { + if ((constraintCase_ == 10) && (exclusionsBuilder_ != null)) { + return exclusionsBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 10) { + return (context.ContextOuterClass.Constraint_Exclusions) constraint_; + } + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Service} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Service) - context.ContextOuterClass.ServiceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Service_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Service_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Service.class, context.ContextOuterClass.Service.Builder.class); - } - - // 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; - serviceIdBuilder_ = null; - } - name_ = ""; - - serviceType_ = 0; - - if (serviceEndpointIdsBuilder_ == null) { - serviceEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - serviceEndpointIdsBuilder_.clear(); - } - if (serviceConstraintsBuilder_ == null) { - serviceConstraints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - serviceConstraintsBuilder_.clear(); - } - if (serviceStatusBuilder_ == null) { - serviceStatus_ = null; - } else { - serviceStatus_ = null; - serviceStatusBuilder_ = null; - } - if (serviceConfigBuilder_ == null) { - serviceConfig_ = null; - } else { - serviceConfig_ = null; - serviceConfigBuilder_ = null; - } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Service_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Service getDefaultInstanceForType() { - return context.ContextOuterClass.Service.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Service build() { - context.ContextOuterClass.Service result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - result.serviceType_ = serviceType_; - if (serviceEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - serviceEndpointIds_ = java.util.Collections.unmodifiableList(serviceEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.serviceEndpointIds_ = serviceEndpointIds_; - } else { - result.serviceEndpointIds_ = serviceEndpointIdsBuilder_.build(); - } - if (serviceConstraintsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - serviceConstraints_ = java.util.Collections.unmodifiableList(serviceConstraints_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.serviceConstraints_ = serviceConstraints_; - } else { - result.serviceConstraints_ = serviceConstraintsBuilder_.build(); - } - if (serviceStatusBuilder_ == null) { - result.serviceStatus_ = serviceStatus_; - } else { - result.serviceStatus_ = serviceStatusBuilder_.build(); - } - if (serviceConfigBuilder_ == null) { - result.serviceConfig_ = serviceConfig_; - } else { - result.serviceConfig_ = serviceConfigBuilder_.build(); - } - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; - } else { - result.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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Service) { - return mergeFrom((context.ContextOuterClass.Service)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Service other) { - if (other == context.ContextOuterClass.Service.getDefaultInstance()) return this; - if (other.hasServiceId()) { - mergeServiceId(other.getServiceId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.serviceType_ != 0) { - setServiceTypeValue(other.getServiceTypeValue()); - } - if (serviceEndpointIdsBuilder_ == null) { - if (!other.serviceEndpointIds_.isEmpty()) { - if (serviceEndpointIds_.isEmpty()) { - serviceEndpointIds_ = other.serviceEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.addAll(other.serviceEndpointIds_); - } - onChanged(); - } - } else { - if (!other.serviceEndpointIds_.isEmpty()) { - if (serviceEndpointIdsBuilder_.isEmpty()) { - serviceEndpointIdsBuilder_.dispose(); - serviceEndpointIdsBuilder_ = null; - serviceEndpointIds_ = other.serviceEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - serviceEndpointIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getServiceEndpointIdsFieldBuilder() : null; - } else { - serviceEndpointIdsBuilder_.addAllMessages(other.serviceEndpointIds_); + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3 getExclusionsFieldBuilder() { + if (exclusionsBuilder_ == null) { + if (!(constraintCase_ == 10)) { + constraint_ = context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } + exclusionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Exclusions) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 10; + onChanged(); + ; + return exclusionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - } + // @@protoc_insertion_point(builder_scope:context.Constraint) + } + + // @@protoc_insertion_point(class_scope:context.Constraint) + private static final context.ContextOuterClass.Constraint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint(); + } + + public static context.ContextOuterClass.Constraint getDefaultInstance() { + return DEFAULT_INSTANCE; } - if (serviceConstraintsBuilder_ == null) { - if (!other.serviceConstraints_.isEmpty()) { - if (serviceConstraints_.isEmpty()) { - serviceConstraints_ = other.serviceConstraints_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureServiceConstraintsIsMutable(); - serviceConstraints_.addAll(other.serviceConstraints_); - } - onChanged(); - } - } else { - if (!other.serviceConstraints_.isEmpty()) { - if (serviceConstraintsBuilder_.isEmpty()) { - serviceConstraintsBuilder_.dispose(); - serviceConstraintsBuilder_ = null; - serviceConstraints_ = other.serviceConstraints_; - bitField0_ = (bitField0_ & ~0x00000002); - serviceConstraintsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getServiceConstraintsFieldBuilder() : null; - } else { - serviceConstraintsBuilder_.addAllMessages(other.serviceConstraints_); - } - } - } - if (other.hasServiceStatus()) { - mergeServiceStatus(other.getServiceStatus()); - } - if (other.hasServiceConfig()) { - mergeServiceConfig(other.getServiceConfig()); - } - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Service) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private context.ContextOuterClass.ServiceId serviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdBuilder_; - /** - * .context.ServiceId service_id = 1; - * @return Whether the serviceId field is set. - */ - public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; - } - /** - * .context.ServiceId service_id = 1; - * @return The serviceId. - */ - public context.ContextOuterClass.ServiceId getServiceId() { - if (serviceIdBuilder_ == null) { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } else { - return serviceIdBuilder_.getMessage(); - } - } - /** - * .context.ServiceId service_id = 1; - */ - public Builder setServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - onChanged(); - } else { - serviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 1; - */ - public Builder setServiceId( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdBuilder_ == null) { - serviceId_ = builderForValue.build(); - onChanged(); - } else { - serviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceId service_id = 1; - */ - public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = - context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); - } else { - serviceId_ = value; - } - onChanged(); - } else { - serviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 1; - */ - public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceId service_id = 1; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { - - onChanged(); - return getServiceIdFieldBuilder().getBuilder(); - } - /** - * .context.ServiceId service_id = 1; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - if (serviceIdBuilder_ != null) { - return serviceIdBuilder_.getMessageOrBuilder(); - } else { - return serviceId_ == null ? - context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - } - /** - * .context.ServiceId service_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> - getServiceIdFieldBuilder() { - if (serviceIdBuilder_ == null) { - serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>( - getServiceId(), - getParentForChildren(), - isClean()); - serviceId_ = null; - } - return serviceIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int serviceType_ = 0; - /** - * .context.ServiceTypeEnum service_type = 3; - * @return The enum numeric value on the wire for serviceType. - */ - @java.lang.Override public int getServiceTypeValue() { - return serviceType_; - } - /** - * .context.ServiceTypeEnum service_type = 3; - * @param value The enum numeric value on the wire for serviceType to set. - * @return This builder for chaining. - */ - public Builder setServiceTypeValue(int value) { - - serviceType_ = value; - onChanged(); - return this; - } - /** - * .context.ServiceTypeEnum service_type = 3; - * @return The serviceType. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceTypeEnum getServiceType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.valueOf(serviceType_); - return result == null ? context.ContextOuterClass.ServiceTypeEnum.UNRECOGNIZED : result; - } - /** - * .context.ServiceTypeEnum service_type = 3; - * @param value The serviceType to set. - * @return This builder for chaining. - */ - public Builder setServiceType(context.ContextOuterClass.ServiceTypeEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - serviceType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.ServiceTypeEnum service_type = 3; - * @return This builder for chaining. - */ - public Builder clearServiceType() { - - serviceType_ = 0; - onChanged(); - return this; - } - - private java.util.List serviceEndpointIds_ = - java.util.Collections.emptyList(); - private void ensureServiceEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - serviceEndpointIds_ = new java.util.ArrayList(serviceEndpointIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> serviceEndpointIdsBuilder_; - - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public java.util.List getServiceEndpointIdsList() { - if (serviceEndpointIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(serviceEndpointIds_); - } else { - return serviceEndpointIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public int getServiceEndpointIdsCount() { - if (serviceEndpointIdsBuilder_ == null) { - return serviceEndpointIds_.size(); - } else { - return serviceEndpointIdsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public context.ContextOuterClass.EndPointId getServiceEndpointIds(int index) { - if (serviceEndpointIdsBuilder_ == null) { - return serviceEndpointIds_.get(index); - } else { - return serviceEndpointIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder setServiceEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (serviceEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.set(index, value); - onChanged(); - } else { - serviceEndpointIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder setServiceEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (serviceEndpointIdsBuilder_ == null) { - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.set(index, builderForValue.build()); - onChanged(); - } else { - serviceEndpointIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder addServiceEndpointIds(context.ContextOuterClass.EndPointId value) { - if (serviceEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.add(value); - onChanged(); - } else { - serviceEndpointIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder addServiceEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (serviceEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.add(index, value); - onChanged(); - } else { - serviceEndpointIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder addServiceEndpointIds( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (serviceEndpointIdsBuilder_ == null) { - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.add(builderForValue.build()); - onChanged(); - } else { - serviceEndpointIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder addServiceEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (serviceEndpointIdsBuilder_ == null) { - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.add(index, builderForValue.build()); - onChanged(); - } else { - serviceEndpointIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder addAllServiceEndpointIds( - java.lang.Iterable values) { - if (serviceEndpointIdsBuilder_ == null) { - ensureServiceEndpointIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, serviceEndpointIds_); - onChanged(); - } else { - serviceEndpointIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder clearServiceEndpointIds() { - if (serviceEndpointIdsBuilder_ == null) { - serviceEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - serviceEndpointIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder removeServiceEndpointIds(int index) { - if (serviceEndpointIdsBuilder_ == null) { - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.remove(index); - onChanged(); - } else { - serviceEndpointIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public context.ContextOuterClass.EndPointId.Builder getServiceEndpointIdsBuilder( - int index) { - return getServiceEndpointIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getServiceEndpointIdsOrBuilder( - int index) { - if (serviceEndpointIdsBuilder_ == null) { - return serviceEndpointIds_.get(index); } else { - return serviceEndpointIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public java.util.List - getServiceEndpointIdsOrBuilderList() { - if (serviceEndpointIdsBuilder_ != null) { - return serviceEndpointIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(serviceEndpointIds_); - } - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public context.ContextOuterClass.EndPointId.Builder addServiceEndpointIdsBuilder() { - return getServiceEndpointIdsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public context.ContextOuterClass.EndPointId.Builder addServiceEndpointIdsBuilder( - int index) { - return getServiceEndpointIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public java.util.List - getServiceEndpointIdsBuilderList() { - return getServiceEndpointIdsFieldBuilder().getBuilderList(); - } - 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()); - serviceEndpointIds_ = null; - } - return serviceEndpointIdsBuilder_; - } - - private java.util.List serviceConstraints_ = - java.util.Collections.emptyList(); - private void ensureServiceConstraintsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - serviceConstraints_ = new java.util.ArrayList(serviceConstraints_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Constraint, context.ContextOuterClass.Constraint.Builder, context.ContextOuterClass.ConstraintOrBuilder> serviceConstraintsBuilder_; - - /** - * repeated .context.Constraint service_constraints = 5; - */ - public java.util.List getServiceConstraintsList() { - if (serviceConstraintsBuilder_ == null) { - return java.util.Collections.unmodifiableList(serviceConstraints_); - } else { - return serviceConstraintsBuilder_.getMessageList(); - } - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public int getServiceConstraintsCount() { - if (serviceConstraintsBuilder_ == null) { - return serviceConstraints_.size(); - } else { - return serviceConstraintsBuilder_.getCount(); - } - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public context.ContextOuterClass.Constraint getServiceConstraints(int index) { - if (serviceConstraintsBuilder_ == null) { - return serviceConstraints_.get(index); - } else { - return serviceConstraintsBuilder_.getMessage(index); - } - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder setServiceConstraints( - int index, context.ContextOuterClass.Constraint value) { - if (serviceConstraintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceConstraintsIsMutable(); - serviceConstraints_.set(index, value); - onChanged(); - } else { - serviceConstraintsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder setServiceConstraints( - int index, context.ContextOuterClass.Constraint.Builder builderForValue) { - if (serviceConstraintsBuilder_ == null) { - ensureServiceConstraintsIsMutable(); - serviceConstraints_.set(index, builderForValue.build()); - onChanged(); - } else { - serviceConstraintsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder addServiceConstraints(context.ContextOuterClass.Constraint value) { - if (serviceConstraintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceConstraintsIsMutable(); - serviceConstraints_.add(value); - onChanged(); - } else { - serviceConstraintsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder addServiceConstraints( - int index, context.ContextOuterClass.Constraint value) { - if (serviceConstraintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceConstraintsIsMutable(); - serviceConstraints_.add(index, value); - onChanged(); - } else { - serviceConstraintsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder addServiceConstraints( - context.ContextOuterClass.Constraint.Builder builderForValue) { - if (serviceConstraintsBuilder_ == null) { - ensureServiceConstraintsIsMutable(); - serviceConstraints_.add(builderForValue.build()); - onChanged(); - } else { - serviceConstraintsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder addServiceConstraints( - int index, context.ContextOuterClass.Constraint.Builder builderForValue) { - if (serviceConstraintsBuilder_ == null) { - ensureServiceConstraintsIsMutable(); - serviceConstraints_.add(index, builderForValue.build()); - onChanged(); - } else { - serviceConstraintsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder addAllServiceConstraints( - java.lang.Iterable values) { - if (serviceConstraintsBuilder_ == null) { - ensureServiceConstraintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, serviceConstraints_); - onChanged(); - } else { - serviceConstraintsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder clearServiceConstraints() { - if (serviceConstraintsBuilder_ == null) { - serviceConstraints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - serviceConstraintsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder removeServiceConstraints(int index) { - if (serviceConstraintsBuilder_ == null) { - ensureServiceConstraintsIsMutable(); - serviceConstraints_.remove(index); - onChanged(); - } else { - serviceConstraintsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public context.ContextOuterClass.Constraint.Builder getServiceConstraintsBuilder( - int index) { - return getServiceConstraintsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public context.ContextOuterClass.ConstraintOrBuilder getServiceConstraintsOrBuilder( - int index) { - if (serviceConstraintsBuilder_ == null) { - return serviceConstraints_.get(index); } else { - return serviceConstraintsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public java.util.List - getServiceConstraintsOrBuilderList() { - if (serviceConstraintsBuilder_ != null) { - return serviceConstraintsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(serviceConstraints_); - } - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public context.ContextOuterClass.Constraint.Builder addServiceConstraintsBuilder() { - return getServiceConstraintsFieldBuilder().addBuilder( - context.ContextOuterClass.Constraint.getDefaultInstance()); - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public context.ContextOuterClass.Constraint.Builder addServiceConstraintsBuilder( - int index) { - return getServiceConstraintsFieldBuilder().addBuilder( - index, context.ContextOuterClass.Constraint.getDefaultInstance()); - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public java.util.List - getServiceConstraintsBuilderList() { - return getServiceConstraintsFieldBuilder().getBuilderList(); - } - 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()); - serviceConstraints_ = null; - } - return serviceConstraintsBuilder_; - } - - private context.ContextOuterClass.ServiceStatus serviceStatus_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceStatus, context.ContextOuterClass.ServiceStatus.Builder, context.ContextOuterClass.ServiceStatusOrBuilder> serviceStatusBuilder_; - /** - * .context.ServiceStatus service_status = 6; - * @return Whether the serviceStatus field is set. - */ - public boolean hasServiceStatus() { - return serviceStatusBuilder_ != null || serviceStatus_ != null; - } - /** - * .context.ServiceStatus service_status = 6; - * @return The serviceStatus. - */ - public context.ContextOuterClass.ServiceStatus getServiceStatus() { - if (serviceStatusBuilder_ == null) { - return serviceStatus_ == null ? context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; - } else { - return serviceStatusBuilder_.getMessage(); - } - } - /** - * .context.ServiceStatus service_status = 6; - */ - public Builder setServiceStatus(context.ContextOuterClass.ServiceStatus value) { - if (serviceStatusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceStatus_ = value; - onChanged(); - } else { - serviceStatusBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceStatus service_status = 6; - */ - public Builder setServiceStatus( - context.ContextOuterClass.ServiceStatus.Builder builderForValue) { - if (serviceStatusBuilder_ == null) { - serviceStatus_ = builderForValue.build(); - onChanged(); - } else { - serviceStatusBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceStatus service_status = 6; - */ - public Builder mergeServiceStatus(context.ContextOuterClass.ServiceStatus value) { - if (serviceStatusBuilder_ == null) { - if (serviceStatus_ != null) { - serviceStatus_ = - context.ContextOuterClass.ServiceStatus.newBuilder(serviceStatus_).mergeFrom(value).buildPartial(); - } else { - serviceStatus_ = value; - } - onChanged(); - } else { - serviceStatusBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceStatus service_status = 6; - */ - public Builder clearServiceStatus() { - if (serviceStatusBuilder_ == null) { - serviceStatus_ = null; - onChanged(); - } else { - serviceStatus_ = null; - serviceStatusBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceStatus service_status = 6; - */ - public context.ContextOuterClass.ServiceStatus.Builder getServiceStatusBuilder() { - - onChanged(); - return getServiceStatusFieldBuilder().getBuilder(); - } - /** - * .context.ServiceStatus service_status = 6; - */ - public context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder() { - if (serviceStatusBuilder_ != null) { - return serviceStatusBuilder_.getMessageOrBuilder(); - } else { - return serviceStatus_ == null ? - context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; - } - } - /** - * .context.ServiceStatus service_status = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceStatus, context.ContextOuterClass.ServiceStatus.Builder, context.ContextOuterClass.ServiceStatusOrBuilder> - getServiceStatusFieldBuilder() { - if (serviceStatusBuilder_ == null) { - serviceStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceStatus, context.ContextOuterClass.ServiceStatus.Builder, context.ContextOuterClass.ServiceStatusOrBuilder>( - getServiceStatus(), - getParentForChildren(), - isClean()); - serviceStatus_ = null; - } - return serviceStatusBuilder_; - } - - private context.ContextOuterClass.ServiceConfig serviceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceConfig, context.ContextOuterClass.ServiceConfig.Builder, context.ContextOuterClass.ServiceConfigOrBuilder> serviceConfigBuilder_; - /** - * .context.ServiceConfig service_config = 7; - * @return Whether the serviceConfig field is set. - */ - public boolean hasServiceConfig() { - return serviceConfigBuilder_ != null || serviceConfig_ != null; - } - /** - * .context.ServiceConfig service_config = 7; - * @return The serviceConfig. - */ - public context.ContextOuterClass.ServiceConfig getServiceConfig() { - if (serviceConfigBuilder_ == null) { - return serviceConfig_ == null ? context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; - } else { - return serviceConfigBuilder_.getMessage(); - } - } - /** - * .context.ServiceConfig service_config = 7; - */ - public Builder setServiceConfig(context.ContextOuterClass.ServiceConfig value) { - if (serviceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceConfig_ = value; - onChanged(); - } else { - serviceConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceConfig service_config = 7; - */ - public Builder setServiceConfig( - context.ContextOuterClass.ServiceConfig.Builder builderForValue) { - if (serviceConfigBuilder_ == null) { - serviceConfig_ = builderForValue.build(); - onChanged(); - } else { - serviceConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceConfig service_config = 7; - */ - public Builder mergeServiceConfig(context.ContextOuterClass.ServiceConfig value) { - if (serviceConfigBuilder_ == null) { - if (serviceConfig_ != null) { - serviceConfig_ = - context.ContextOuterClass.ServiceConfig.newBuilder(serviceConfig_).mergeFrom(value).buildPartial(); - } else { - serviceConfig_ = value; - } - onChanged(); - } else { - serviceConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceConfig service_config = 7; - */ - public Builder clearServiceConfig() { - if (serviceConfigBuilder_ == null) { - serviceConfig_ = null; - onChanged(); - } else { - serviceConfig_ = null; - serviceConfigBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceConfig service_config = 7; - */ - public context.ContextOuterClass.ServiceConfig.Builder getServiceConfigBuilder() { - - onChanged(); - return getServiceConfigFieldBuilder().getBuilder(); - } - /** - * .context.ServiceConfig service_config = 7; - */ - public context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder() { - if (serviceConfigBuilder_ != null) { - return serviceConfigBuilder_.getMessageOrBuilder(); - } else { - return serviceConfig_ == null ? - context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; - } - } - /** - * .context.ServiceConfig service_config = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceConfig, context.ContextOuterClass.ServiceConfig.Builder, context.ContextOuterClass.ServiceConfigOrBuilder> - getServiceConfigFieldBuilder() { - if (serviceConfigBuilder_ == null) { - serviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceConfig, context.ContextOuterClass.ServiceConfig.Builder, context.ContextOuterClass.ServiceConfigOrBuilder>( - getServiceConfig(), - getParentForChildren(), - isClean()); - serviceConfig_ = null; - } - return serviceConfigBuilder_; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; - /** - * .context.Timestamp timestamp = 8; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 8; - * @return The timestamp. - */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - * .context.Timestamp timestamp = 8; - */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 8; - */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Timestamp timestamp = 8; - */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 8; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - * .context.Timestamp timestamp = 8; - */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .context.Timestamp timestamp = 8; - */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - * .context.Timestamp timestamp = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Service) - } - // @@protoc_insertion_point(class_scope:context.Service) - private static final context.ContextOuterClass.Service DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Service(); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static context.ContextOuterClass.Service getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @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); + } + }; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public context.ContextOuterClass.Service getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + @java.lang.Override + public context.ContextOuterClass.Constraint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - } + public interface TeraFlowControllerOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TeraFlowController) + com.google.protobuf.MessageOrBuilder { - public interface ServiceStatusOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceStatus) - com.google.protobuf.MessageOrBuilder { + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); - /** - * .context.ServiceStatusEnum service_status = 1; - * @return The enum numeric value on the wire for serviceStatus. - */ - int getServiceStatusValue(); - /** - * .context.ServiceStatusEnum service_status = 1; - * @return The serviceStatus. - */ - context.ContextOuterClass.ServiceStatusEnum getServiceStatus(); - } - /** - * Protobuf type {@code context.ServiceStatus} - */ - public static final class ServiceStatus extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceStatus) - ServiceStatusOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceStatus.newBuilder() to construct. - private ServiceStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceStatus() { - serviceStatus_ = 0; - } + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceStatus(); - } + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); - @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; - } + /** + * string ip_address = 2; + * @return The ipAddress. + */ + java.lang.String getIpAddress(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceStatus.class, context.ContextOuterClass.ServiceStatus.Builder.class); - } + /** + * string ip_address = 2; + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); - public static final int SERVICE_STATUS_FIELD_NUMBER = 1; - private int serviceStatus_; - /** - * .context.ServiceStatusEnum service_status = 1; - * @return The enum numeric value on the wire for serviceStatus. - */ - @java.lang.Override public int getServiceStatusValue() { - return serviceStatus_; + /** + * uint32 port = 3; + * @return The port. + */ + int getPort(); } + /** - * .context.ServiceStatusEnum service_status = 1; - * @return The serviceStatus. + *
+     * ----- Miscellaneous -------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.TeraFlowController} */ - @java.lang.Override public context.ContextOuterClass.ServiceStatusEnum getServiceStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.valueOf(serviceStatus_); - return result == null ? context.ContextOuterClass.ServiceStatusEnum.UNRECOGNIZED : result; - } + public static final class TeraFlowController extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TeraFlowController) + TeraFlowControllerOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use TeraFlowController.newBuilder() to construct. + private TeraFlowController(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (serviceStatus_ != context.ContextOuterClass.ServiceStatusEnum.SERVICESTATUS_UNDEFINED.getNumber()) { - output.writeEnum(1, serviceStatus_); - } - unknownFields.writeTo(output); - } + private TeraFlowController() { + ipAddress_ = ""; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (serviceStatus_ != context.ContextOuterClass.ServiceStatusEnum.SERVICESTATUS_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, serviceStatus_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TeraFlowController(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceStatus)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceStatus other = (context.ContextOuterClass.ServiceStatus) obj; - - if (serviceStatus_ != other.serviceStatus_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_STATUS_FIELD_NUMBER; - hash = (53 * hash) + serviceStatus_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + 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 context.ContextOuterClass.ServiceStatus parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceStatus parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceStatus parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceStatus prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ServiceStatus} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceStatus) - context.ContextOuterClass.ServiceStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceStatus.class, context.ContextOuterClass.ServiceStatus.Builder.class); - } - - // 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(); - serviceStatus_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceStatus_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceStatus getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceStatus.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceStatus build() { - context.ContextOuterClass.ServiceStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceStatus buildPartial() { - context.ContextOuterClass.ServiceStatus result = new context.ContextOuterClass.ServiceStatus(this); - result.serviceStatus_ = serviceStatus_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceStatus) { - return mergeFrom((context.ContextOuterClass.ServiceStatus)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceStatus other) { - if (other == context.ContextOuterClass.ServiceStatus.getDefaultInstance()) return this; - if (other.serviceStatus_ != 0) { - setServiceStatusValue(other.getServiceStatusValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceStatus) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int serviceStatus_ = 0; - /** - * .context.ServiceStatusEnum service_status = 1; - * @return The enum numeric value on the wire for serviceStatus. - */ - @java.lang.Override public int getServiceStatusValue() { - return serviceStatus_; - } - /** - * .context.ServiceStatusEnum service_status = 1; - * @param value The enum numeric value on the wire for serviceStatus to set. - * @return This builder for chaining. - */ - public Builder setServiceStatusValue(int value) { - - serviceStatus_ = value; - onChanged(); - return this; - } - /** - * .context.ServiceStatusEnum service_status = 1; - * @return The serviceStatus. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceStatusEnum getServiceStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.valueOf(serviceStatus_); - return result == null ? context.ContextOuterClass.ServiceStatusEnum.UNRECOGNIZED : result; - } - /** - * .context.ServiceStatusEnum service_status = 1; - * @param value The serviceStatus to set. - * @return This builder for chaining. - */ - public Builder setServiceStatus(context.ContextOuterClass.ServiceStatusEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - serviceStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.ServiceStatusEnum service_status = 1; - * @return This builder for chaining. - */ - public Builder clearServiceStatus() { - - serviceStatus_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceStatus) - } + public static final int CONTEXT_ID_FIELD_NUMBER = 1; - // @@protoc_insertion_point(class_scope:context.ServiceStatus) - private static final context.ContextOuterClass.ServiceStatus DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceStatus(); - } + private context.ContextOuterClass.ContextId contextId_; - public static context.ContextOuterClass.ServiceStatus getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } - @java.lang.Override - public context.ContextOuterClass.ServiceStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static final int IP_ADDRESS_FIELD_NUMBER = 2; - } + private volatile java.lang.Object ipAddress_; - public interface ServiceConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceConfig) - com.google.protobuf.MessageOrBuilder { + /** + * string ip_address = 2; + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + 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(); + ipAddress_ = s; + return s; + } + } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - java.util.List - getConfigRulesList(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - context.ContextOuterClass.ConfigRule getConfigRules(int index); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - int getConfigRulesCount(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - java.util.List - getConfigRulesOrBuilderList(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ServiceConfig} - */ - public static final class ServiceConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceConfig) - ServiceConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceConfig.newBuilder() to construct. - private ServiceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceConfig() { - configRules_ = java.util.Collections.emptyList(); - } + /** + * string ip_address = 2; + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceConfig(); - } + public static final int PORT_FIELD_NUMBER = 3; - @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(); - 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; - } + private int port_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceConfig.class, context.ContextOuterClass.ServiceConfig.Builder.class); - } + /** + * uint32 port = 3; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } - public static final int CONFIG_RULES_FIELD_NUMBER = 1; - private java.util.List configRules_; - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public java.util.List getConfigRulesList() { - return configRules_; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public java.util.List - getConfigRulesOrBuilderList() { - return configRules_; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public int getConfigRulesCount() { - return configRules_.size(); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule getConfigRules(int index) { - return configRules_.get(index); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index) { - return configRules_.get(index); - } + private byte memoizedIsInitialized = -1; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (!getIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_); + } + if (port_ != 0) { + output.writeUInt32(3, port_); + } + unknownFields.writeTo(output); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < configRules_.size(); i++) { - output.writeMessage(1, configRules_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (!getIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, port_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < configRules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, configRules_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TeraFlowController)) { + return super.equals(obj); + } + context.ContextOuterClass.TeraFlowController other = (context.ContextOuterClass.TeraFlowController) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (!getIpAddress().equals(other.getIpAddress())) + return false; + if (getPort() != other.getPort()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceConfig)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceConfig other = (context.ContextOuterClass.ServiceConfig) obj; - - if (!getConfigRulesList() - .equals(other.getConfigRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.TeraFlowController parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConfigRulesCount() > 0) { - hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; - hash = (53 * hash) + getConfigRulesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.TeraFlowController parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.ServiceConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ServiceConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceConfig) - context.ContextOuterClass.ServiceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceConfig.class, context.ContextOuterClass.ServiceConfig.Builder.class); - } - - // 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(); - if (configRulesBuilder_ == null) { - configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - configRulesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceConfig_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceConfig getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceConfig.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceConfig build() { - context.ContextOuterClass.ServiceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceConfig buildPartial() { - context.ContextOuterClass.ServiceConfig result = new context.ContextOuterClass.ServiceConfig(this); - int from_bitField0_ = bitField0_; - if (configRulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - configRules_ = java.util.Collections.unmodifiableList(configRules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.configRules_ = configRules_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceConfig) { - return mergeFrom((context.ContextOuterClass.ServiceConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceConfig other) { - if (other == context.ContextOuterClass.ServiceConfig.getDefaultInstance()) return this; - if (configRulesBuilder_ == null) { - if (!other.configRules_.isEmpty()) { - if (configRules_.isEmpty()) { - configRules_ = other.configRules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConfigRulesIsMutable(); - configRules_.addAll(other.configRules_); - } - onChanged(); - } - } else { - if (!other.configRules_.isEmpty()) { - if (configRulesBuilder_.isEmpty()) { - configRulesBuilder_.dispose(); - configRulesBuilder_ = null; - configRules_ = other.configRules_; - bitField0_ = (bitField0_ & ~0x00000001); - configRulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConfigRulesFieldBuilder() : null; - } else { - configRulesBuilder_.addAllMessages(other.configRules_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List configRules_ = - java.util.Collections.emptyList(); - private void ensureConfigRulesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - configRules_ = new java.util.ArrayList(configRules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder> configRulesBuilder_; - - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List getConfigRulesList() { - if (configRulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(configRules_); - } else { - return configRulesBuilder_.getMessageList(); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public int getConfigRulesCount() { - if (configRulesBuilder_ == null) { - return configRules_.size(); - } else { - return configRulesBuilder_.getCount(); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule getConfigRules(int index) { - if (configRulesBuilder_ == null) { - return configRules_.get(index); - } else { - return configRulesBuilder_.getMessage(index); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder setConfigRules( - int index, context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.set(index, value); - onChanged(); - } else { - configRulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder setConfigRules( - int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.set(index, builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules(context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.add(value); - onChanged(); - } else { - configRulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - int index, context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.add(index, value); - onChanged(); - } else { - configRulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.add(builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.add(index, builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addAllConfigRules( - java.lang.Iterable values) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, configRules_); - onChanged(); - } else { - configRulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder clearConfigRules() { - if (configRulesBuilder_ == null) { - configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - configRulesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder removeConfigRules(int index) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.remove(index); - onChanged(); - } else { - configRulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder getConfigRulesBuilder( - int index) { - return getConfigRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index) { - if (configRulesBuilder_ == null) { - return configRules_.get(index); } else { - return configRulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List - getConfigRulesOrBuilderList() { - if (configRulesBuilder_ != null) { - return configRulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(configRules_); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder() { - return getConfigRulesFieldBuilder().addBuilder( - context.ContextOuterClass.ConfigRule.getDefaultInstance()); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder( - int index) { - return getConfigRulesFieldBuilder().addBuilder( - index, context.ContextOuterClass.ConfigRule.getDefaultInstance()); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List - getConfigRulesBuilderList() { - return getConfigRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder> - getConfigRulesFieldBuilder() { - if (configRulesBuilder_ == null) { - configRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder>( - configRules_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - configRules_ = null; - } - return configRulesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceConfig) - } + public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(class_scope:context.ServiceConfig) - private static final context.ContextOuterClass.ServiceConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceConfig(); - } + public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.ServiceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public context.ContextOuterClass.ServiceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - } + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public interface ServiceIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceIdList) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - /** - * repeated .context.ServiceId service_ids = 1; - */ - java.util.List - getServiceIdsList(); - /** - * repeated .context.ServiceId service_ids = 1; - */ - context.ContextOuterClass.ServiceId getServiceIds(int index); - /** - * repeated .context.ServiceId service_ids = 1; - */ - int getServiceIdsCount(); - /** - * repeated .context.ServiceId service_ids = 1; - */ - java.util.List - getServiceIdsOrBuilderList(); - /** - * repeated .context.ServiceId service_ids = 1; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ServiceIdList} - */ - public static final class ServiceIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceIdList) - ServiceIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceIdList.newBuilder() to construct. - private ServiceIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceIdList() { - serviceIds_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceIdList(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @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(); - 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; - } + public static Builder newBuilder(context.ContextOuterClass.TeraFlowController prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceIdList.class, context.ContextOuterClass.ServiceIdList.Builder.class); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static final int SERVICE_IDS_FIELD_NUMBER = 1; - private java.util.List serviceIds_; - /** - * repeated .context.ServiceId service_ids = 1; - */ - @java.lang.Override - public java.util.List getServiceIdsList() { - return serviceIds_; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - @java.lang.Override - public java.util.List - getServiceIdsOrBuilderList() { - return serviceIds_; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - @java.lang.Override - public int getServiceIdsCount() { - return serviceIds_.size(); - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceIds(int index) { - return serviceIds_.get(index); - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder( - int index) { - return serviceIds_.get(index); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + *
+         * ----- Miscellaneous -------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.TeraFlowController} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TeraFlowController) + context.ContextOuterClass.TeraFlowControllerOrBuilder { - memoizedIsInitialized = 1; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < serviceIds_.size(); i++) { - output.writeMessage(1, serviceIds_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < serviceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, serviceIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + // Construct using context.ContextOuterClass.TeraFlowController.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceIdList other = (context.ContextOuterClass.ServiceIdList) obj; - - if (!getServiceIdsList() - .equals(other.getServiceIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getServiceIdsCount() > 0) { - hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getServiceIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - public static context.ContextOuterClass.ServiceIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (contextIdBuilder_ == null) { + contextId_ = null; + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + ipAddress_ = ""; + port_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { + return context.ContextOuterClass.TeraFlowController.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.TeraFlowController build() { + context.ContextOuterClass.TeraFlowController result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ServiceIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceIdList) - context.ContextOuterClass.ServiceIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceIdList.class, context.ContextOuterClass.ServiceIdList.Builder.class); - } - - // 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(); - if (serviceIdsBuilder_ == null) { - serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - serviceIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceIdList getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceIdList build() { - context.ContextOuterClass.ServiceIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceIdList buildPartial() { - context.ContextOuterClass.ServiceIdList result = new context.ContextOuterClass.ServiceIdList(this); - int from_bitField0_ = bitField0_; - if (serviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.serviceIds_ = serviceIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceIdList) { - return mergeFrom((context.ContextOuterClass.ServiceIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceIdList other) { - if (other == context.ContextOuterClass.ServiceIdList.getDefaultInstance()) return this; - if (serviceIdsBuilder_ == null) { - if (!other.serviceIds_.isEmpty()) { - if (serviceIds_.isEmpty()) { - serviceIds_ = other.serviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureServiceIdsIsMutable(); - serviceIds_.addAll(other.serviceIds_); - } - onChanged(); - } - } else { - if (!other.serviceIds_.isEmpty()) { - if (serviceIdsBuilder_.isEmpty()) { - serviceIdsBuilder_.dispose(); - serviceIdsBuilder_ = null; - serviceIds_ = other.serviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - serviceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getServiceIdsFieldBuilder() : null; - } else { - serviceIdsBuilder_.addAllMessages(other.serviceIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List serviceIds_ = - java.util.Collections.emptyList(); - private void ensureServiceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - serviceIds_ = new java.util.ArrayList(serviceIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdsBuilder_; - - /** - * repeated .context.ServiceId service_ids = 1; - */ - public java.util.List getServiceIdsList() { - if (serviceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(serviceIds_); - } else { - return serviceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public int getServiceIdsCount() { - if (serviceIdsBuilder_ == null) { - return serviceIds_.size(); - } else { - return serviceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public context.ContextOuterClass.ServiceId getServiceIds(int index) { - if (serviceIdsBuilder_ == null) { - return serviceIds_.get(index); - } else { - return serviceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder setServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceIdsIsMutable(); - serviceIds_.set(index, value); - onChanged(); - } else { - serviceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder setServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - serviceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder addServiceIds(context.ContextOuterClass.ServiceId value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceIdsIsMutable(); - serviceIds_.add(value); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder addServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceIdsIsMutable(); - serviceIds_.add(index, value); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder addServiceIds( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.add(builderForValue.build()); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder addServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder addAllServiceIds( - java.lang.Iterable values) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, serviceIds_); - onChanged(); - } else { - serviceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder clearServiceIds() { - if (serviceIdsBuilder_ == null) { - serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - serviceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder removeServiceIds(int index) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.remove(index); - onChanged(); - } else { - serviceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdsBuilder( - int index) { - return getServiceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder( - int index) { - if (serviceIdsBuilder_ == null) { - return serviceIds_.get(index); } else { - return serviceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public java.util.List - getServiceIdsOrBuilderList() { - if (serviceIdsBuilder_ != null) { - return serviceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(serviceIds_); - } - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder() { - return getServiceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder( - int index) { - return getServiceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public java.util.List - getServiceIdsBuilderList() { - return getServiceIdsFieldBuilder().getBuilderList(); - } - 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_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - serviceIds_ = null; - } - return serviceIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceIdList) - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TeraFlowController) { + return mergeFrom((context.ContextOuterClass.TeraFlowController) other); + } else { + super.mergeFrom(other); + return this; + } + } - // @@protoc_insertion_point(class_scope:context.ServiceIdList) - private static final context.ContextOuterClass.ServiceIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceIdList(); - } + public Builder mergeFrom(context.ContextOuterClass.TeraFlowController other) { + if (other == context.ContextOuterClass.TeraFlowController.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - public static context.ContextOuterClass.ServiceIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.TeraFlowController) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private context.ContextOuterClass.ContextId contextId_; - @java.lang.Override - public context.ContextOuterClass.ServiceIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; - } + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } - public interface ServiceListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceList) - com.google.protobuf.MessageOrBuilder { + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } - /** - * repeated .context.Service services = 1; - */ - java.util.List - getServicesList(); - /** - * repeated .context.Service services = 1; - */ - context.ContextOuterClass.Service getServices(int index); - /** - * repeated .context.Service services = 1; - */ - int getServicesCount(); - /** - * repeated .context.Service services = 1; - */ - java.util.List - getServicesOrBuilderList(); - /** - * repeated .context.Service services = 1; - */ - context.ContextOuterClass.ServiceOrBuilder getServicesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ServiceList} - */ - public static final class ServiceList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceList) - ServiceListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceList.newBuilder() to construct. - private ServiceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceList() { - services_ = java.util.Collections.emptyList(); - } + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceList(); - } + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @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(); - 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; - } + /** + * .context.ContextId context_id = 1; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceList.class, context.ContextOuterClass.ServiceList.Builder.class); - } + /** + * .context.ContextId context_id = 1; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } - public static final int SERVICES_FIELD_NUMBER = 1; - private java.util.List services_; - /** - * repeated .context.Service services = 1; - */ - @java.lang.Override - public java.util.List getServicesList() { - return services_; - } - /** - * repeated .context.Service services = 1; - */ - @java.lang.Override - public java.util.List - getServicesOrBuilderList() { - return services_; - } - /** - * repeated .context.Service services = 1; - */ - @java.lang.Override - public int getServicesCount() { - return services_.size(); - } - /** - * repeated .context.Service services = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Service getServices(int index) { - return services_.get(index); - } - /** - * repeated .context.Service services = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceOrBuilder getServicesOrBuilder( - int index) { - return services_.get(index); - } + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.ContextId context_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < services_.size(); i++) { - output.writeMessage(1, services_.get(i)); - } - unknownFields.writeTo(output); - } + private java.lang.Object ipAddress_ = ""; + + /** + * string ip_address = 2; + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < services_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, services_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * string ip_address = 2; + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceList)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceList other = (context.ContextOuterClass.ServiceList) obj; - - if (!getServicesList() - .equals(other.getServicesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string ip_address = 2; + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipAddress_ = value; + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getServicesCount() > 0) { - hash = (37 * hash) + SERVICES_FIELD_NUMBER; - hash = (53 * hash) + getServicesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * string ip_address = 2; + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + onChanged(); + return this; + } - public static context.ContextOuterClass.ServiceList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * string ip_address = 2; + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private int port_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ServiceList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceList) - context.ContextOuterClass.ServiceListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceList.class, context.ContextOuterClass.ServiceList.Builder.class); - } - - // 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(); - if (servicesBuilder_ == null) { - services_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - servicesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceList getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceList build() { - context.ContextOuterClass.ServiceList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceList buildPartial() { - context.ContextOuterClass.ServiceList result = new context.ContextOuterClass.ServiceList(this); - int from_bitField0_ = bitField0_; - if (servicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - services_ = java.util.Collections.unmodifiableList(services_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.services_ = services_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceList) { - return mergeFrom((context.ContextOuterClass.ServiceList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceList other) { - if (other == context.ContextOuterClass.ServiceList.getDefaultInstance()) return this; - if (servicesBuilder_ == null) { - if (!other.services_.isEmpty()) { - if (services_.isEmpty()) { - services_ = other.services_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureServicesIsMutable(); - services_.addAll(other.services_); - } - onChanged(); - } - } else { - if (!other.services_.isEmpty()) { - if (servicesBuilder_.isEmpty()) { - servicesBuilder_.dispose(); - servicesBuilder_ = null; - services_ = other.services_; - bitField0_ = (bitField0_ & ~0x00000001); - servicesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getServicesFieldBuilder() : null; - } else { - servicesBuilder_.addAllMessages(other.services_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List services_ = - java.util.Collections.emptyList(); - private void ensureServicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - services_ = new java.util.ArrayList(services_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Service, context.ContextOuterClass.Service.Builder, context.ContextOuterClass.ServiceOrBuilder> servicesBuilder_; - - /** - * repeated .context.Service services = 1; - */ - public java.util.List getServicesList() { - if (servicesBuilder_ == null) { - return java.util.Collections.unmodifiableList(services_); - } else { - return servicesBuilder_.getMessageList(); - } - } - /** - * repeated .context.Service services = 1; - */ - public int getServicesCount() { - if (servicesBuilder_ == null) { - return services_.size(); - } else { - return servicesBuilder_.getCount(); - } - } - /** - * repeated .context.Service services = 1; - */ - public context.ContextOuterClass.Service getServices(int index) { - if (servicesBuilder_ == null) { - return services_.get(index); - } else { - return servicesBuilder_.getMessage(index); - } - } - /** - * repeated .context.Service services = 1; - */ - public Builder setServices( - int index, context.ContextOuterClass.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.set(index, value); - onChanged(); - } else { - servicesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder setServices( - int index, context.ContextOuterClass.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.set(index, builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder addServices(context.ContextOuterClass.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.add(value); - onChanged(); - } else { - servicesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder addServices( - int index, context.ContextOuterClass.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.add(index, value); - onChanged(); - } else { - servicesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder addServices( - context.ContextOuterClass.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder addServices( - int index, context.ContextOuterClass.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(index, builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder addAllServices( - java.lang.Iterable values) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, services_); - onChanged(); - } else { - servicesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder clearServices() { - if (servicesBuilder_ == null) { - services_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - servicesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder removeServices(int index) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.remove(index); - onChanged(); - } else { - servicesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public context.ContextOuterClass.Service.Builder getServicesBuilder( - int index) { - return getServicesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Service services = 1; - */ - public context.ContextOuterClass.ServiceOrBuilder getServicesOrBuilder( - int index) { - if (servicesBuilder_ == null) { - return services_.get(index); } else { - return servicesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Service services = 1; - */ - public java.util.List - getServicesOrBuilderList() { - if (servicesBuilder_ != null) { - return servicesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(services_); - } - } - /** - * repeated .context.Service services = 1; - */ - public context.ContextOuterClass.Service.Builder addServicesBuilder() { - return getServicesFieldBuilder().addBuilder( - context.ContextOuterClass.Service.getDefaultInstance()); - } - /** - * repeated .context.Service services = 1; - */ - public context.ContextOuterClass.Service.Builder addServicesBuilder( - int index) { - return getServicesFieldBuilder().addBuilder( - index, context.ContextOuterClass.Service.getDefaultInstance()); - } - /** - * repeated .context.Service services = 1; - */ - public java.util.List - getServicesBuilderList() { - return getServicesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Service, context.ContextOuterClass.Service.Builder, context.ContextOuterClass.ServiceOrBuilder> - getServicesFieldBuilder() { - if (servicesBuilder_ == null) { - servicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Service, context.ContextOuterClass.Service.Builder, context.ContextOuterClass.ServiceOrBuilder>( - services_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - services_ = null; - } - return servicesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceList) - } + /** + * uint32 port = 3; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } - // @@protoc_insertion_point(class_scope:context.ServiceList) - private static final context.ContextOuterClass.ServiceList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceList(); - } + /** + * uint32 port = 3; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + port_ = value; + onChanged(); + return this; + } - public static context.ContextOuterClass.ServiceList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * uint32 port = 3; + * @return This builder for chaining. + */ + public Builder clearPort() { + port_ = 0; + onChanged(); + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.TeraFlowController) + } - @java.lang.Override - public context.ContextOuterClass.ServiceList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + // @@protoc_insertion_point(class_scope:context.TeraFlowController) + private static final context.ContextOuterClass.TeraFlowController DEFAULT_INSTANCE; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.TeraFlowController(); + } - public interface ServiceFilterOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceFilter) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.TeraFlowController getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * .context.ServiceIdList service_ids = 1; - * @return Whether the serviceIds field is set. - */ - boolean hasServiceIds(); - /** - * .context.ServiceIdList service_ids = 1; - * @return The serviceIds. - */ - context.ContextOuterClass.ServiceIdList getServiceIds(); - /** - * .context.ServiceIdList service_ids = 1; - */ - context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder(); + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - /** - * bool include_endpoint_ids = 2; - * @return The includeEndpointIds. - */ - boolean getIncludeEndpointIds(); + @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); + } + }; - /** - * bool include_constraints = 3; - * @return The includeConstraints. - */ - boolean getIncludeConstraints(); + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * bool include_config_rules = 4; - * @return The includeConfigRules. - */ - boolean getIncludeConfigRules(); - } - /** - * Protobuf type {@code context.ServiceFilter} - */ - public static final class ServiceFilter extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceFilter) - ServiceFilterOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceFilter.newBuilder() to construct. - private ServiceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceFilter() { - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceFilter(); + @java.lang.Override + public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @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; - } + public interface AuthenticationResultOrBuilder extends // @@protoc_insertion_point(interface_extends:context.AuthenticationResult) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceFilter.class, context.ContextOuterClass.ServiceFilter.Builder.class); - } + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); - public static final int SERVICE_IDS_FIELD_NUMBER = 1; - private context.ContextOuterClass.ServiceIdList serviceIds_; - /** - * .context.ServiceIdList service_ids = 1; - * @return Whether the serviceIds field is set. - */ - @java.lang.Override - public boolean hasServiceIds() { - return serviceIds_ != null; - } - /** - * .context.ServiceIdList service_ids = 1; - * @return The serviceIds. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdList getServiceIds() { - return serviceIds_ == null ? context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; - } - /** - * .context.ServiceIdList service_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder() { - return getServiceIds(); - } + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); - public static final int INCLUDE_ENDPOINT_IDS_FIELD_NUMBER = 2; - private boolean includeEndpointIds_; - /** - * bool include_endpoint_ids = 2; - * @return The includeEndpointIds. - */ - @java.lang.Override - public boolean getIncludeEndpointIds() { - return includeEndpointIds_; - } + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); - public static final int INCLUDE_CONSTRAINTS_FIELD_NUMBER = 3; - private boolean includeConstraints_; - /** - * bool include_constraints = 3; - * @return The includeConstraints. - */ - @java.lang.Override - public boolean getIncludeConstraints() { - return includeConstraints_; + /** + * bool authenticated = 2; + * @return The authenticated. + */ + boolean getAuthenticated(); } - public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 4; - private boolean includeConfigRules_; /** - * bool include_config_rules = 4; - * @return The includeConfigRules. + * Protobuf type {@code context.AuthenticationResult} */ - @java.lang.Override - public boolean getIncludeConfigRules() { - return includeConfigRules_; - } + public static final class AuthenticationResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.AuthenticationResult) + AuthenticationResultOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use AuthenticationResult.newBuilder() to construct. + private AuthenticationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (serviceIds_ != null) { - output.writeMessage(1, getServiceIds()); - } - if (includeEndpointIds_ != false) { - output.writeBool(2, includeEndpointIds_); - } - if (includeConstraints_ != false) { - output.writeBool(3, includeConstraints_); - } - if (includeConfigRules_ != false) { - output.writeBool(4, includeConfigRules_); - } - unknownFields.writeTo(output); - } + private AuthenticationResult() { + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (serviceIds_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getServiceIds()); - } - if (includeEndpointIds_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, includeEndpointIds_); - } - if (includeConstraints_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, includeConstraints_); - } - if (includeConfigRules_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, includeConfigRules_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuthenticationResult(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceFilter)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceFilter other = (context.ContextOuterClass.ServiceFilter) obj; - - if (hasServiceIds() != other.hasServiceIds()) return false; - if (hasServiceIds()) { - if (!getServiceIds() - .equals(other.getServiceIds())) return false; - } - if (getIncludeEndpointIds() - != other.getIncludeEndpointIds()) return false; - if (getIncludeConstraints() - != other.getIncludeConstraints()) return false; - if (getIncludeConfigRules() - != other.getIncludeConfigRules()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasServiceIds()) { - hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getServiceIds().hashCode(); - } - hash = (37 * hash) + INCLUDE_ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeEndpointIds()); - hash = (37 * hash) + INCLUDE_CONSTRAINTS_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + 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 context.ContextOuterClass.ServiceFilter parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceFilter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceFilter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceFilter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceFilter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceFilter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ServiceFilter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceFilter) - context.ContextOuterClass.ServiceFilterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceFilter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceFilter.class, context.ContextOuterClass.ServiceFilter.Builder.class); - } - - // 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; - serviceIdsBuilder_ = null; - } - includeEndpointIds_ = false; - - includeConstraints_ = false; - - includeConfigRules_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceFilter_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceFilter getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceFilter.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceFilter build() { - context.ContextOuterClass.ServiceFilter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceFilter) { - return mergeFrom((context.ContextOuterClass.ServiceFilter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceFilter other) { - if (other == context.ContextOuterClass.ServiceFilter.getDefaultInstance()) return this; - if (other.hasServiceIds()) { - mergeServiceIds(other.getServiceIds()); - } - if (other.getIncludeEndpointIds() != false) { - setIncludeEndpointIds(other.getIncludeEndpointIds()); - } - if (other.getIncludeConstraints() != false) { - setIncludeConstraints(other.getIncludeConstraints()); - } - if (other.getIncludeConfigRules() != false) { - setIncludeConfigRules(other.getIncludeConfigRules()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceFilter) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ServiceIdList serviceIds_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceIdList, context.ContextOuterClass.ServiceIdList.Builder, context.ContextOuterClass.ServiceIdListOrBuilder> serviceIdsBuilder_; - /** - * .context.ServiceIdList service_ids = 1; - * @return Whether the serviceIds field is set. - */ - public boolean hasServiceIds() { - return serviceIdsBuilder_ != null || serviceIds_ != null; - } - /** - * .context.ServiceIdList service_ids = 1; - * @return The serviceIds. - */ - public context.ContextOuterClass.ServiceIdList getServiceIds() { - if (serviceIdsBuilder_ == null) { - return serviceIds_ == null ? context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; - } else { - return serviceIdsBuilder_.getMessage(); - } - } - /** - * .context.ServiceIdList service_ids = 1; - */ - public Builder setServiceIds(context.ContextOuterClass.ServiceIdList value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceIds_ = value; - onChanged(); - } else { - serviceIdsBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceIdList service_ids = 1; - */ - public Builder setServiceIds( - context.ContextOuterClass.ServiceIdList.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - serviceIds_ = builderForValue.build(); - onChanged(); - } else { - serviceIdsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceIdList service_ids = 1; - */ - public Builder mergeServiceIds(context.ContextOuterClass.ServiceIdList value) { - if (serviceIdsBuilder_ == null) { - if (serviceIds_ != null) { - serviceIds_ = - context.ContextOuterClass.ServiceIdList.newBuilder(serviceIds_).mergeFrom(value).buildPartial(); - } else { - serviceIds_ = value; - } - onChanged(); - } else { - serviceIdsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceIdList service_ids = 1; - */ - public Builder clearServiceIds() { - if (serviceIdsBuilder_ == null) { - serviceIds_ = null; - onChanged(); - } else { - serviceIds_ = null; - serviceIdsBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceIdList service_ids = 1; - */ - public context.ContextOuterClass.ServiceIdList.Builder getServiceIdsBuilder() { - - onChanged(); - return getServiceIdsFieldBuilder().getBuilder(); - } - /** - * .context.ServiceIdList service_ids = 1; - */ - public context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder() { - if (serviceIdsBuilder_ != null) { - return serviceIdsBuilder_.getMessageOrBuilder(); - } else { - return serviceIds_ == null ? - context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; - } - } - /** - * .context.ServiceIdList service_ids = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceIdList, context.ContextOuterClass.ServiceIdList.Builder, context.ContextOuterClass.ServiceIdListOrBuilder> - getServiceIdsFieldBuilder() { - if (serviceIdsBuilder_ == null) { - serviceIdsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceIdList, context.ContextOuterClass.ServiceIdList.Builder, context.ContextOuterClass.ServiceIdListOrBuilder>( - getServiceIds(), - getParentForChildren(), - isClean()); - serviceIds_ = null; - } - return serviceIdsBuilder_; - } - - private boolean includeEndpointIds_ ; - /** - * bool include_endpoint_ids = 2; - * @return The includeEndpointIds. - */ - @java.lang.Override - public boolean getIncludeEndpointIds() { - return includeEndpointIds_; - } - /** - * bool include_endpoint_ids = 2; - * @param value The includeEndpointIds to set. - * @return This builder for chaining. - */ - public Builder setIncludeEndpointIds(boolean value) { - - includeEndpointIds_ = value; - onChanged(); - return this; - } - /** - * bool include_endpoint_ids = 2; - * @return This builder for chaining. - */ - public Builder clearIncludeEndpointIds() { - - includeEndpointIds_ = false; - onChanged(); - return this; - } - - private boolean includeConstraints_ ; - /** - * bool include_constraints = 3; - * @return The includeConstraints. - */ - @java.lang.Override - public boolean getIncludeConstraints() { - return includeConstraints_; - } - /** - * bool include_constraints = 3; - * @param value The includeConstraints to set. - * @return This builder for chaining. - */ - public Builder setIncludeConstraints(boolean value) { - - includeConstraints_ = value; - onChanged(); - return this; - } - /** - * bool include_constraints = 3; - * @return This builder for chaining. - */ - public Builder clearIncludeConstraints() { - - includeConstraints_ = false; - onChanged(); - return this; - } - - private boolean includeConfigRules_ ; - /** - * bool include_config_rules = 4; - * @return The includeConfigRules. - */ - @java.lang.Override - public boolean getIncludeConfigRules() { - return includeConfigRules_; - } - /** - * bool include_config_rules = 4; - * @param value The includeConfigRules to set. - * @return This builder for chaining. - */ - public Builder setIncludeConfigRules(boolean value) { - - includeConfigRules_ = value; - onChanged(); - return this; - } - /** - * bool include_config_rules = 4; - * @return This builder for chaining. - */ - public Builder clearIncludeConfigRules() { - - includeConfigRules_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceFilter) - } + public static final int CONTEXT_ID_FIELD_NUMBER = 1; - // @@protoc_insertion_point(class_scope:context.ServiceFilter) - private static final context.ContextOuterClass.ServiceFilter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceFilter(); - } + private context.ContextOuterClass.ContextId contextId_; - public static context.ContextOuterClass.ServiceFilter getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } - @java.lang.Override - public context.ContextOuterClass.ServiceFilter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static final int AUTHENTICATED_FIELD_NUMBER = 2; - } + private boolean authenticated_; - public interface ServiceEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceEvent) - com.google.protobuf.MessageOrBuilder { + /** + * bool authenticated = 2; + * @return The authenticated. + */ + @java.lang.Override + public boolean getAuthenticated() { + return authenticated_; + } - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + private byte memoizedIsInitialized = -1; - /** - * .context.ServiceId service_id = 2; - * @return Whether the serviceId field is set. - */ - boolean hasServiceId(); - /** - * .context.ServiceId service_id = 2; - * @return The serviceId. - */ - context.ContextOuterClass.ServiceId getServiceId(); - /** - * .context.ServiceId service_id = 2; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); - } - /** - * Protobuf type {@code context.ServiceEvent} - */ - public static final class ServiceEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceEvent) - ServiceEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceEvent.newBuilder() to construct. - private ServiceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceEvent() { - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceEvent(); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (authenticated_ != false) { + output.writeBool(2, authenticated_); + } + unknownFields.writeTo(output); + } - @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; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (authenticated_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, authenticated_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceEvent.class, context.ContextOuterClass.ServiceEvent.Builder.class); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.AuthenticationResult)) { + return super.equals(obj); + } + context.ContextOuterClass.AuthenticationResult other = (context.ContextOuterClass.AuthenticationResult) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (getAuthenticated() != other.getAuthenticated()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + hash = (37 * hash) + AUTHENTICATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAuthenticated()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int SERVICE_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.ServiceId serviceId_; - /** - * .context.ServiceId service_id = 2; - * @return Whether the serviceId field is set. - */ - @java.lang.Override - public boolean hasServiceId() { - return serviceId_ != null; - } - /** - * .context.ServiceId service_id = 2; - * @return The serviceId. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceId() { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - /** - * .context.ServiceId service_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (serviceId_ != null) { - output.writeMessage(2, getServiceId()); - } - unknownFields.writeTo(output); - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (serviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getServiceId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceEvent other = (context.ContextOuterClass.ServiceEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasServiceId() != other.hasServiceId()) return false; - if (hasServiceId()) { - if (!getServiceId() - .equals(other.getServiceId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasServiceId()) { - hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - public static context.ContextOuterClass.ServiceEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ServiceEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceEvent) - context.ContextOuterClass.ServiceEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceEvent.class, context.ContextOuterClass.ServiceEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceEvent getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceEvent build() { - context.ContextOuterClass.ServiceEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceEvent) { - return mergeFrom((context.ContextOuterClass.ServiceEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceEvent other) { - if (other == context.ContextOuterClass.ServiceEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasServiceId()) { - mergeServiceId(other.getServiceId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.ServiceId serviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdBuilder_; - /** - * .context.ServiceId service_id = 2; - * @return Whether the serviceId field is set. - */ - public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; - } - /** - * .context.ServiceId service_id = 2; - * @return The serviceId. - */ - public context.ContextOuterClass.ServiceId getServiceId() { - if (serviceIdBuilder_ == null) { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } else { - return serviceIdBuilder_.getMessage(); - } - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder setServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - onChanged(); - } else { - serviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder setServiceId( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdBuilder_ == null) { - serviceId_ = builderForValue.build(); - onChanged(); - } else { - serviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = - context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); - } else { - serviceId_ = value; - } - onChanged(); - } else { - serviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { - - onChanged(); - return getServiceIdFieldBuilder().getBuilder(); - } - /** - * .context.ServiceId service_id = 2; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - if (serviceIdBuilder_ != null) { - return serviceIdBuilder_.getMessageOrBuilder(); - } else { - return serviceId_ == null ? - context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - } - /** - * .context.ServiceId service_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> - getServiceIdFieldBuilder() { - if (serviceIdBuilder_ == null) { - serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>( - getServiceId(), - getParentForChildren(), - isClean()); - serviceId_ = null; - } - return serviceIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceEvent) - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:context.ServiceEvent) - private static final context.ContextOuterClass.ServiceEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceEvent(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static context.ContextOuterClass.ServiceEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static Builder newBuilder(context.ContextOuterClass.AuthenticationResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public context.ContextOuterClass.ServiceEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - } + /** + * Protobuf type {@code context.AuthenticationResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.AuthenticationResult) + context.ContextOuterClass.AuthenticationResultOrBuilder { - public interface SliceIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceId) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; + } - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); + } - /** - * .context.Uuid slice_uuid = 2; - * @return Whether the sliceUuid field is set. - */ - boolean hasSliceUuid(); - /** - * .context.Uuid slice_uuid = 2; - * @return The sliceUuid. - */ - context.ContextOuterClass.Uuid getSliceUuid(); - /** - * .context.Uuid slice_uuid = 2; - */ - context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder(); - } - /** - *
-   * ----- Slice ---------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.SliceId} - */ - public static final class SliceId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceId) - SliceIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceId.newBuilder() to construct. - private SliceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceId() { - } + // Construct using context.ContextOuterClass.AuthenticationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceId(); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @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; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceId.class, context.ContextOuterClass.SliceId.Builder.class); - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (contextIdBuilder_ == null) { + contextId_ = null; + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + authenticated_ = false; + return this; + } - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - /** - * .context.ContextId context_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; + } - public static final int SLICE_UUID_FIELD_NUMBER = 2; - private context.ContextOuterClass.Uuid sliceUuid_; - /** - * .context.Uuid slice_uuid = 2; - * @return Whether the sliceUuid field is set. - */ - @java.lang.Override - public boolean hasSliceUuid() { - return sliceUuid_ != null; - } - /** - * .context.Uuid slice_uuid = 2; - * @return The sliceUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getSliceUuid() { - return sliceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; - } - /** - * .context.Uuid slice_uuid = 2; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder() { - return getSliceUuid(); - } + @java.lang.Override + public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { + return context.ContextOuterClass.AuthenticationResult.getDefaultInstance(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public context.ContextOuterClass.AuthenticationResult build() { + context.ContextOuterClass.AuthenticationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - memoizedIsInitialized = 1; - return true; - } + @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(); + } + result.authenticated_ = authenticated_; + onBuilt(); + return result; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (sliceUuid_ != null) { - output.writeMessage(2, getSliceUuid()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextId()); - } - if (sliceUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSliceUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @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 boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceId)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceId other = (context.ContextOuterClass.SliceId) obj; - - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (hasSliceUuid() != other.hasSliceUuid()) return false; - if (hasSliceUuid()) { - if (!getSliceUuid() - .equals(other.getSliceUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - if (hasSliceUuid()) { - hash = (37 * hash) + SLICE_UUID_FIELD_NUMBER; - hash = (53 * hash) + getSliceUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - public static context.ContextOuterClass.SliceId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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 newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Slice ---------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.SliceId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceId) - context.ContextOuterClass.SliceIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceId.class, context.ContextOuterClass.SliceId.Builder.class); - } - - // 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; - contextIdBuilder_ = null; - } - if (sliceUuidBuilder_ == null) { - sliceUuid_ = null; - } else { - sliceUuid_ = null; - sliceUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceId getDefaultInstanceForType() { - return context.ContextOuterClass.SliceId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceId build() { - context.ContextOuterClass.SliceId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceId) { - return mergeFrom((context.ContextOuterClass.SliceId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceId other) { - if (other == context.ContextOuterClass.SliceId.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (other.hasSliceUuid()) { - mergeSliceUuid(other.getSliceUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ContextId contextId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private context.ContextOuterClass.Uuid sliceUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> sliceUuidBuilder_; - /** - * .context.Uuid slice_uuid = 2; - * @return Whether the sliceUuid field is set. - */ - public boolean hasSliceUuid() { - return sliceUuidBuilder_ != null || sliceUuid_ != null; - } - /** - * .context.Uuid slice_uuid = 2; - * @return The sliceUuid. - */ - public context.ContextOuterClass.Uuid getSliceUuid() { - if (sliceUuidBuilder_ == null) { - return sliceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; - } else { - return sliceUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid slice_uuid = 2; - */ - public Builder setSliceUuid(context.ContextOuterClass.Uuid value) { - if (sliceUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceUuid_ = value; - onChanged(); - } else { - sliceUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid slice_uuid = 2; - */ - public Builder setSliceUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (sliceUuidBuilder_ == null) { - sliceUuid_ = builderForValue.build(); - onChanged(); - } else { - sliceUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid slice_uuid = 2; - */ - public Builder mergeSliceUuid(context.ContextOuterClass.Uuid value) { - if (sliceUuidBuilder_ == null) { - if (sliceUuid_ != null) { - sliceUuid_ = - context.ContextOuterClass.Uuid.newBuilder(sliceUuid_).mergeFrom(value).buildPartial(); - } else { - sliceUuid_ = value; - } - onChanged(); - } else { - sliceUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid slice_uuid = 2; - */ - public Builder clearSliceUuid() { - if (sliceUuidBuilder_ == null) { - sliceUuid_ = null; - onChanged(); - } else { - sliceUuid_ = null; - sliceUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid slice_uuid = 2; - */ - public context.ContextOuterClass.Uuid.Builder getSliceUuidBuilder() { - - onChanged(); - return getSliceUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid slice_uuid = 2; - */ - public context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder() { - if (sliceUuidBuilder_ != null) { - return sliceUuidBuilder_.getMessageOrBuilder(); - } else { - return sliceUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; - } - } - /** - * .context.Uuid slice_uuid = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getSliceUuidFieldBuilder() { - if (sliceUuidBuilder_ == null) { - sliceUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getSliceUuid(), - getParentForChildren(), - isClean()); - sliceUuid_ = null; - } - return sliceUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceId) - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.AuthenticationResult) { + return mergeFrom((context.ContextOuterClass.AuthenticationResult) other); + } else { + super.mergeFrom(other); + return this; + } + } - // @@protoc_insertion_point(class_scope:context.SliceId) - private static final context.ContextOuterClass.SliceId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceId(); - } + public Builder mergeFrom(context.ContextOuterClass.AuthenticationResult other) { + if (other == context.ContextOuterClass.AuthenticationResult.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (other.getAuthenticated() != false) { + setAuthenticated(other.getAuthenticated()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - public static context.ContextOuterClass.SliceId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.AuthenticationResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private context.ContextOuterClass.ContextId contextId_; - @java.lang.Override - public context.ContextOuterClass.SliceId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; - } + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } - public interface SliceOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Slice) - com.google.protobuf.MessageOrBuilder { + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } - /** - * .context.SliceId slice_id = 1; - * @return Whether the sliceId field is set. - */ - boolean hasSliceId(); - /** - * .context.SliceId slice_id = 1; - * @return The sliceId. - */ - context.ContextOuterClass.SliceId getSliceId(); - /** - * .context.SliceId slice_id = 1; - */ - context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - java.util.List - getSliceEndpointIdsList(); - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointId getSliceEndpointIds(int index); - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - int getSliceEndpointIdsCount(); - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - java.util.List - getSliceEndpointIdsOrBuilderList(); - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointIdOrBuilder getSliceEndpointIdsOrBuilder( - int index); + /** + * .context.ContextId context_id = 1; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - java.util.List - getSliceConstraintsList(); - /** - * repeated .context.Constraint slice_constraints = 4; - */ - context.ContextOuterClass.Constraint getSliceConstraints(int index); - /** - * repeated .context.Constraint slice_constraints = 4; - */ - int getSliceConstraintsCount(); - /** - * repeated .context.Constraint slice_constraints = 4; - */ - java.util.List - getSliceConstraintsOrBuilderList(); - /** - * repeated .context.Constraint slice_constraints = 4; - */ - context.ContextOuterClass.ConstraintOrBuilder getSliceConstraintsOrBuilder( - int index); + /** + * .context.ContextId context_id = 1; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - java.util.List - getSliceServiceIdsList(); - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - context.ContextOuterClass.ServiceId getSliceServiceIds(int index); - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - int getSliceServiceIdsCount(); - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - java.util.List - getSliceServiceIdsOrBuilderList(); - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - context.ContextOuterClass.ServiceIdOrBuilder getSliceServiceIdsOrBuilder( - int index); + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - java.util.List - getSliceSubsliceIdsList(); - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - context.ContextOuterClass.SliceId getSliceSubsliceIds(int index); - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - int getSliceSubsliceIdsCount(); - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - java.util.List - getSliceSubsliceIdsOrBuilderList(); - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - context.ContextOuterClass.SliceIdOrBuilder getSliceSubsliceIdsOrBuilder( - int index); + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } - /** - * .context.SliceStatus slice_status = 7; - * @return Whether the sliceStatus field is set. - */ - boolean hasSliceStatus(); - /** - * .context.SliceStatus slice_status = 7; - * @return The sliceStatus. - */ - context.ContextOuterClass.SliceStatus getSliceStatus(); - /** - * .context.SliceStatus slice_status = 7; - */ - context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder(); + /** + * .context.ContextId context_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } - /** - * .context.SliceConfig slice_config = 8; - * @return Whether the sliceConfig field is set. - */ - boolean hasSliceConfig(); - /** - * .context.SliceConfig slice_config = 8; - * @return The sliceConfig. - */ - context.ContextOuterClass.SliceConfig getSliceConfig(); - /** - * .context.SliceConfig slice_config = 8; - */ - context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder(); + private boolean authenticated_; - /** - * .context.SliceOwner slice_owner = 9; - * @return Whether the sliceOwner field is set. - */ - boolean hasSliceOwner(); - /** - * .context.SliceOwner slice_owner = 9; - * @return The sliceOwner. - */ - context.ContextOuterClass.SliceOwner getSliceOwner(); - /** - * .context.SliceOwner slice_owner = 9; - */ - context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder(); + /** + * bool authenticated = 2; + * @return The authenticated. + */ + @java.lang.Override + public boolean getAuthenticated() { + return authenticated_; + } - /** - * .context.Timestamp timestamp = 10; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 10; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 10; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); - } - /** - * Protobuf type {@code context.Slice} - */ - public static final class Slice extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Slice) - SliceOrBuilder { - private static final long serialVersionUID = 0L; - // Use Slice.newBuilder() to construct. - private Slice(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Slice() { - name_ = ""; - sliceEndpointIds_ = java.util.Collections.emptyList(); - sliceConstraints_ = java.util.Collections.emptyList(); - sliceServiceIds_ = java.util.Collections.emptyList(); - sliceSubsliceIds_ = java.util.Collections.emptyList(); - } + /** + * bool authenticated = 2; + * @param value The authenticated to set. + * @return This builder for chaining. + */ + public Builder setAuthenticated(boolean value) { + authenticated_ = value; + onChanged(); + return this; + } + + /** + * bool authenticated = 2; + * @return This builder for chaining. + */ + public Builder clearAuthenticated() { + authenticated_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Slice(); - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.AuthenticationResult) + } - @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(); - 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(); - 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(); - 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(); - 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; - } + // @@protoc_insertion_point(class_scope:context.AuthenticationResult) + private static final context.ContextOuterClass.AuthenticationResult DEFAULT_INSTANCE; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Slice_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Slice.class, context.ContextOuterClass.Slice.Builder.class); - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.AuthenticationResult(); + } - public static final int SLICE_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.SliceId sliceId_; - /** - * .context.SliceId slice_id = 1; - * @return Whether the sliceId field is set. - */ - @java.lang.Override - public boolean hasSliceId() { - return sliceId_ != null; - } - /** - * .context.SliceId slice_id = 1; - * @return The sliceId. - */ - @java.lang.Override - public context.ContextOuterClass.SliceId getSliceId() { - return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } - /** - * .context.SliceId slice_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - return getSliceId(); - } + public static context.ContextOuterClass.AuthenticationResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static final int SLICE_ENDPOINT_IDS_FIELD_NUMBER = 3; - private java.util.List sliceEndpointIds_; - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List getSliceEndpointIdsList() { - return sliceEndpointIds_; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List - getSliceEndpointIdsOrBuilderList() { - return sliceEndpointIds_; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - @java.lang.Override - public int getSliceEndpointIdsCount() { - return sliceEndpointIds_.size(); - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getSliceEndpointIds(int index) { - return sliceEndpointIds_.get(index); - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getSliceEndpointIdsOrBuilder( - int index) { - return sliceEndpointIds_.get(index); - } + @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); + } + }; - public static final int SLICE_CONSTRAINTS_FIELD_NUMBER = 4; - private java.util.List sliceConstraints_; - /** - * repeated .context.Constraint slice_constraints = 4; - */ - @java.lang.Override - public java.util.List getSliceConstraintsList() { - return sliceConstraints_; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - @java.lang.Override - public java.util.List - getSliceConstraintsOrBuilderList() { - return sliceConstraints_; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - @java.lang.Override - public int getSliceConstraintsCount() { - return sliceConstraints_.size(); - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint getSliceConstraints(int index) { - return sliceConstraints_.get(index); - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - @java.lang.Override - public context.ContextOuterClass.ConstraintOrBuilder getSliceConstraintsOrBuilder( - int index) { - return sliceConstraints_.get(index); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - public static final int SLICE_SERVICE_IDS_FIELD_NUMBER = 5; - private java.util.List sliceServiceIds_; - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - @java.lang.Override - public java.util.List getSliceServiceIdsList() { - return sliceServiceIds_; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - @java.lang.Override - public java.util.List - getSliceServiceIdsOrBuilderList() { - return sliceServiceIds_; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - @java.lang.Override - public int getSliceServiceIdsCount() { - return sliceServiceIds_.size(); - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getSliceServiceIds(int index) { - return sliceServiceIds_.get(index); - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getSliceServiceIdsOrBuilder( - int index) { - return sliceServiceIds_.get(index); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static final int SLICE_SUBSLICE_IDS_FIELD_NUMBER = 6; - private java.util.List sliceSubsliceIds_; - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - @java.lang.Override - public java.util.List getSliceSubsliceIdsList() { - return sliceSubsliceIds_; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - @java.lang.Override - public java.util.List - getSliceSubsliceIdsOrBuilderList() { - return sliceSubsliceIds_; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - @java.lang.Override - public int getSliceSubsliceIdsCount() { - return sliceSubsliceIds_.size(); - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - @java.lang.Override - public context.ContextOuterClass.SliceId getSliceSubsliceIds(int index) { - return sliceSubsliceIds_.get(index); - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdOrBuilder getSliceSubsliceIdsOrBuilder( - int index) { - return sliceSubsliceIds_.get(index); + @java.lang.Override + public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static final int SLICE_STATUS_FIELD_NUMBER = 7; - private context.ContextOuterClass.SliceStatus sliceStatus_; - /** - * .context.SliceStatus slice_status = 7; - * @return Whether the sliceStatus field is set. - */ - @java.lang.Override - public boolean hasSliceStatus() { - return sliceStatus_ != null; - } - /** - * .context.SliceStatus slice_status = 7; - * @return The sliceStatus. - */ - @java.lang.Override - public context.ContextOuterClass.SliceStatus getSliceStatus() { - return sliceStatus_ == null ? context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; - } - /** - * .context.SliceStatus slice_status = 7; - */ - @java.lang.Override - public context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder() { - return getSliceStatus(); - } + public interface OpticalConfigIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigId) + com.google.protobuf.MessageOrBuilder { - public static final int SLICE_CONFIG_FIELD_NUMBER = 8; - private context.ContextOuterClass.SliceConfig sliceConfig_; - /** - * .context.SliceConfig slice_config = 8; - * @return Whether the sliceConfig field is set. - */ - @java.lang.Override - public boolean hasSliceConfig() { - return sliceConfig_ != null; - } - /** - * .context.SliceConfig slice_config = 8; - * @return The sliceConfig. - */ - @java.lang.Override - public context.ContextOuterClass.SliceConfig getSliceConfig() { - return sliceConfig_ == null ? context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; - } - /** - * .context.SliceConfig slice_config = 8; - */ - @java.lang.Override - public context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder() { - return getSliceConfig(); - } + /** + * string opticalconfig_uuid = 1; + * @return The opticalconfigUuid. + */ + java.lang.String getOpticalconfigUuid(); - public static final int SLICE_OWNER_FIELD_NUMBER = 9; - private context.ContextOuterClass.SliceOwner sliceOwner_; - /** - * .context.SliceOwner slice_owner = 9; - * @return Whether the sliceOwner field is set. - */ - @java.lang.Override - public boolean hasSliceOwner() { - return sliceOwner_ != null; - } - /** - * .context.SliceOwner slice_owner = 9; - * @return The sliceOwner. - */ - @java.lang.Override - public context.ContextOuterClass.SliceOwner getSliceOwner() { - return sliceOwner_ == null ? context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; - } - /** - * .context.SliceOwner slice_owner = 9; - */ - @java.lang.Override - public context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder() { - return getSliceOwner(); + /** + * string opticalconfig_uuid = 1; + * @return The bytes for opticalconfigUuid. + */ + com.google.protobuf.ByteString getOpticalconfigUuidBytes(); } - public static final int TIMESTAMP_FIELD_NUMBER = 10; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 10; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 10; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } /** - * .context.Timestamp timestamp = 10; + *
+     * ---------------- Experimental ------------------------
+     * 
+ * + * Protobuf type {@code context.OpticalConfigId} */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } + public static final class OpticalConfigId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigId) + OpticalConfigIdOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use OpticalConfigId.newBuilder() to construct. + private OpticalConfigId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sliceId_ != null) { - output.writeMessage(1, getSliceId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - for (int i = 0; i < sliceEndpointIds_.size(); i++) { - output.writeMessage(3, sliceEndpointIds_.get(i)); - } - for (int i = 0; i < sliceConstraints_.size(); i++) { - output.writeMessage(4, sliceConstraints_.get(i)); - } - for (int i = 0; i < sliceServiceIds_.size(); i++) { - output.writeMessage(5, sliceServiceIds_.get(i)); - } - for (int i = 0; i < sliceSubsliceIds_.size(); i++) { - output.writeMessage(6, sliceSubsliceIds_.get(i)); - } - if (sliceStatus_ != null) { - output.writeMessage(7, getSliceStatus()); - } - if (sliceConfig_ != null) { - output.writeMessage(8, getSliceConfig()); - } - if (sliceOwner_ != null) { - output.writeMessage(9, getSliceOwner()); - } - if (timestamp_ != null) { - output.writeMessage(10, getTimestamp()); - } - unknownFields.writeTo(output); - } + private OpticalConfigId() { + opticalconfigUuid_ = ""; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sliceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSliceId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - for (int i = 0; i < sliceEndpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, sliceEndpointIds_.get(i)); - } - for (int i = 0; i < sliceConstraints_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, sliceConstraints_.get(i)); - } - for (int i = 0; i < sliceServiceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, sliceServiceIds_.get(i)); - } - for (int i = 0; i < sliceSubsliceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, sliceSubsliceIds_.get(i)); - } - if (sliceStatus_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getSliceStatus()); - } - if (sliceConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getSliceConfig()); - } - if (sliceOwner_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getSliceOwner()); - } - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getTimestamp()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpticalConfigId(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Slice)) { - return super.equals(obj); - } - context.ContextOuterClass.Slice other = (context.ContextOuterClass.Slice) obj; - - if (hasSliceId() != other.hasSliceId()) return false; - if (hasSliceId()) { - if (!getSliceId() - .equals(other.getSliceId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getSliceEndpointIdsList() - .equals(other.getSliceEndpointIdsList())) return false; - if (!getSliceConstraintsList() - .equals(other.getSliceConstraintsList())) return false; - if (!getSliceServiceIdsList() - .equals(other.getSliceServiceIdsList())) return false; - if (!getSliceSubsliceIdsList() - .equals(other.getSliceSubsliceIdsList())) return false; - if (hasSliceStatus() != other.hasSliceStatus()) return false; - if (hasSliceStatus()) { - if (!getSliceStatus() - .equals(other.getSliceStatus())) return false; - } - if (hasSliceConfig() != other.hasSliceConfig()) return false; - if (hasSliceConfig()) { - if (!getSliceConfig() - .equals(other.getSliceConfig())) return false; - } - if (hasSliceOwner() != other.hasSliceOwner()) return false; - if (hasSliceOwner()) { - if (!getSliceOwner() - .equals(other.getSliceOwner())) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSliceId()) { - hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getSliceId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getSliceEndpointIdsCount() > 0) { - hash = (37 * hash) + SLICE_ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSliceEndpointIdsList().hashCode(); - } - if (getSliceConstraintsCount() > 0) { - hash = (37 * hash) + SLICE_CONSTRAINTS_FIELD_NUMBER; - hash = (53 * hash) + getSliceConstraintsList().hashCode(); - } - if (getSliceServiceIdsCount() > 0) { - hash = (37 * hash) + SLICE_SERVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSliceServiceIdsList().hashCode(); - } - if (getSliceSubsliceIdsCount() > 0) { - hash = (37 * hash) + SLICE_SUBSLICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSliceSubsliceIdsList().hashCode(); - } - if (hasSliceStatus()) { - hash = (37 * hash) + SLICE_STATUS_FIELD_NUMBER; - hash = (53 * hash) + getSliceStatus().hashCode(); - } - if (hasSliceConfig()) { - hash = (37 * hash) + SLICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSliceConfig().hashCode(); - } - if (hasSliceOwner()) { - hash = (37 * hash) + SLICE_OWNER_FIELD_NUMBER; - hash = (53 * hash) + getSliceOwner().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + 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 context.ContextOuterClass.Slice parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Slice parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Slice parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Slice parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Slice parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Slice parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Slice parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Slice parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Slice parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Slice parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Slice parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Slice parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Slice prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfigId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigId.class, context.ContextOuterClass.OpticalConfigId.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Slice} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Slice) - context.ContextOuterClass.SliceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Slice_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Slice_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Slice.class, context.ContextOuterClass.Slice.Builder.class); - } - - // 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; - sliceIdBuilder_ = null; - } - name_ = ""; - - if (sliceEndpointIdsBuilder_ == null) { - sliceEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - sliceEndpointIdsBuilder_.clear(); - } - if (sliceConstraintsBuilder_ == null) { - sliceConstraints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - sliceConstraintsBuilder_.clear(); - } - if (sliceServiceIdsBuilder_ == null) { - sliceServiceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - sliceServiceIdsBuilder_.clear(); - } - if (sliceSubsliceIdsBuilder_ == null) { - sliceSubsliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - sliceSubsliceIdsBuilder_.clear(); - } - if (sliceStatusBuilder_ == null) { - sliceStatus_ = null; - } else { - sliceStatus_ = null; - sliceStatusBuilder_ = null; - } - if (sliceConfigBuilder_ == null) { - sliceConfig_ = null; - } else { - sliceConfig_ = null; - sliceConfigBuilder_ = null; - } - if (sliceOwnerBuilder_ == null) { - sliceOwner_ = null; - } else { - sliceOwner_ = null; - sliceOwnerBuilder_ = null; - } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Slice_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Slice getDefaultInstanceForType() { - return context.ContextOuterClass.Slice.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Slice build() { - context.ContextOuterClass.Slice result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - if (sliceEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - sliceEndpointIds_ = java.util.Collections.unmodifiableList(sliceEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.sliceEndpointIds_ = sliceEndpointIds_; - } else { - result.sliceEndpointIds_ = sliceEndpointIdsBuilder_.build(); - } - if (sliceConstraintsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - sliceConstraints_ = java.util.Collections.unmodifiableList(sliceConstraints_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.sliceConstraints_ = sliceConstraints_; - } else { - result.sliceConstraints_ = sliceConstraintsBuilder_.build(); - } - if (sliceServiceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - sliceServiceIds_ = java.util.Collections.unmodifiableList(sliceServiceIds_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.sliceServiceIds_ = sliceServiceIds_; - } else { - result.sliceServiceIds_ = sliceServiceIdsBuilder_.build(); - } - if (sliceSubsliceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - sliceSubsliceIds_ = java.util.Collections.unmodifiableList(sliceSubsliceIds_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.sliceSubsliceIds_ = sliceSubsliceIds_; - } else { - result.sliceSubsliceIds_ = sliceSubsliceIdsBuilder_.build(); - } - if (sliceStatusBuilder_ == null) { - result.sliceStatus_ = sliceStatus_; - } else { - result.sliceStatus_ = sliceStatusBuilder_.build(); - } - if (sliceConfigBuilder_ == null) { - result.sliceConfig_ = sliceConfig_; - } else { - result.sliceConfig_ = sliceConfigBuilder_.build(); - } - if (sliceOwnerBuilder_ == null) { - result.sliceOwner_ = sliceOwner_; - } else { - result.sliceOwner_ = sliceOwnerBuilder_.build(); - } - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; - } else { - result.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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Slice) { - return mergeFrom((context.ContextOuterClass.Slice)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Slice other) { - if (other == context.ContextOuterClass.Slice.getDefaultInstance()) return this; - if (other.hasSliceId()) { - mergeSliceId(other.getSliceId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (sliceEndpointIdsBuilder_ == null) { - if (!other.sliceEndpointIds_.isEmpty()) { - if (sliceEndpointIds_.isEmpty()) { - sliceEndpointIds_ = other.sliceEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.addAll(other.sliceEndpointIds_); - } - onChanged(); - } - } else { - if (!other.sliceEndpointIds_.isEmpty()) { - if (sliceEndpointIdsBuilder_.isEmpty()) { - sliceEndpointIdsBuilder_.dispose(); - sliceEndpointIdsBuilder_ = null; - sliceEndpointIds_ = other.sliceEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - sliceEndpointIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSliceEndpointIdsFieldBuilder() : null; + public static final int OPTICALCONFIG_UUID_FIELD_NUMBER = 1; + + private volatile java.lang.Object opticalconfigUuid_; + + /** + * string opticalconfig_uuid = 1; + * @return The opticalconfigUuid. + */ + @java.lang.Override + public java.lang.String getOpticalconfigUuid() { + java.lang.Object ref = opticalconfigUuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - sliceEndpointIdsBuilder_.addAllMessages(other.sliceEndpointIds_); + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + opticalconfigUuid_ = s; + return s; } - } } - if (sliceConstraintsBuilder_ == null) { - if (!other.sliceConstraints_.isEmpty()) { - if (sliceConstraints_.isEmpty()) { - sliceConstraints_ = other.sliceConstraints_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSliceConstraintsIsMutable(); - sliceConstraints_.addAll(other.sliceConstraints_); - } - onChanged(); - } - } else { - if (!other.sliceConstraints_.isEmpty()) { - if (sliceConstraintsBuilder_.isEmpty()) { - sliceConstraintsBuilder_.dispose(); - sliceConstraintsBuilder_ = null; - sliceConstraints_ = other.sliceConstraints_; - bitField0_ = (bitField0_ & ~0x00000002); - sliceConstraintsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSliceConstraintsFieldBuilder() : null; + + /** + * string opticalconfig_uuid = 1; + * @return The bytes for opticalconfigUuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOpticalconfigUuidBytes() { + java.lang.Object ref = opticalconfigUuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + opticalconfigUuid_ = b; + return b; } else { - sliceConstraintsBuilder_.addAllMessages(other.sliceConstraints_); + return (com.google.protobuf.ByteString) ref; } - } } - if (sliceServiceIdsBuilder_ == null) { - if (!other.sliceServiceIds_.isEmpty()) { - if (sliceServiceIds_.isEmpty()) { - sliceServiceIds_ = other.sliceServiceIds_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.addAll(other.sliceServiceIds_); - } - onChanged(); - } - } else { - if (!other.sliceServiceIds_.isEmpty()) { - if (sliceServiceIdsBuilder_.isEmpty()) { - sliceServiceIdsBuilder_.dispose(); - sliceServiceIdsBuilder_ = null; - sliceServiceIds_ = other.sliceServiceIds_; - bitField0_ = (bitField0_ & ~0x00000004); - sliceServiceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSliceServiceIdsFieldBuilder() : null; - } else { - sliceServiceIdsBuilder_.addAllMessages(other.sliceServiceIds_); + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getOpticalconfigUuidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, opticalconfigUuid_); } - } + unknownFields.writeTo(output); } - if (sliceSubsliceIdsBuilder_ == null) { - if (!other.sliceSubsliceIds_.isEmpty()) { - if (sliceSubsliceIds_.isEmpty()) { - sliceSubsliceIds_ = other.sliceSubsliceIds_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.addAll(other.sliceSubsliceIds_); - } - onChanged(); - } - } else { - if (!other.sliceSubsliceIds_.isEmpty()) { - if (sliceSubsliceIdsBuilder_.isEmpty()) { - sliceSubsliceIdsBuilder_.dispose(); - sliceSubsliceIdsBuilder_ = null; - sliceSubsliceIds_ = other.sliceSubsliceIds_; - bitField0_ = (bitField0_ & ~0x00000008); - sliceSubsliceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSliceSubsliceIdsFieldBuilder() : null; - } else { - sliceSubsliceIdsBuilder_.addAllMessages(other.sliceSubsliceIds_); - } - } - } - if (other.hasSliceStatus()) { - mergeSliceStatus(other.getSliceStatus()); - } - if (other.hasSliceConfig()) { - mergeSliceConfig(other.getSliceConfig()); - } - if (other.hasSliceOwner()) { - mergeSliceOwner(other.getSliceOwner()); - } - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Slice) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private context.ContextOuterClass.SliceId sliceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> sliceIdBuilder_; - /** - * .context.SliceId slice_id = 1; - * @return Whether the sliceId field is set. - */ - public boolean hasSliceId() { - return sliceIdBuilder_ != null || sliceId_ != null; - } - /** - * .context.SliceId slice_id = 1; - * @return The sliceId. - */ - public context.ContextOuterClass.SliceId getSliceId() { - if (sliceIdBuilder_ == null) { - return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } else { - return sliceIdBuilder_.getMessage(); - } - } - /** - * .context.SliceId slice_id = 1; - */ - public Builder setSliceId(context.ContextOuterClass.SliceId value) { - if (sliceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceId_ = value; - onChanged(); - } else { - sliceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceId slice_id = 1; - */ - public Builder setSliceId( - context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdBuilder_ == null) { - sliceId_ = builderForValue.build(); - onChanged(); - } else { - sliceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceId slice_id = 1; - */ - public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { - if (sliceIdBuilder_ == null) { - if (sliceId_ != null) { - sliceId_ = - context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); - } else { - sliceId_ = value; - } - onChanged(); - } else { - sliceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceId slice_id = 1; - */ - public Builder clearSliceId() { - if (sliceIdBuilder_ == null) { - sliceId_ = null; - onChanged(); - } else { - sliceId_ = null; - sliceIdBuilder_ = null; - } - - return this; - } - /** - * .context.SliceId slice_id = 1; - */ - public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { - - onChanged(); - return getSliceIdFieldBuilder().getBuilder(); - } - /** - * .context.SliceId slice_id = 1; - */ - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - if (sliceIdBuilder_ != null) { - return sliceIdBuilder_.getMessageOrBuilder(); - } else { - return sliceId_ == null ? - context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } - } - /** - * .context.SliceId slice_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> - getSliceIdFieldBuilder() { - if (sliceIdBuilder_ == null) { - sliceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder>( - getSliceId(), - getParentForChildren(), - isClean()); - sliceId_ = null; - } - return sliceIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List sliceEndpointIds_ = - java.util.Collections.emptyList(); - private void ensureSliceEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - sliceEndpointIds_ = new java.util.ArrayList(sliceEndpointIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> sliceEndpointIdsBuilder_; - - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public java.util.List getSliceEndpointIdsList() { - if (sliceEndpointIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sliceEndpointIds_); - } else { - return sliceEndpointIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public int getSliceEndpointIdsCount() { - if (sliceEndpointIdsBuilder_ == null) { - return sliceEndpointIds_.size(); - } else { - return sliceEndpointIdsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId getSliceEndpointIds(int index) { - if (sliceEndpointIdsBuilder_ == null) { - return sliceEndpointIds_.get(index); - } else { - return sliceEndpointIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder setSliceEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (sliceEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.set(index, value); - onChanged(); - } else { - sliceEndpointIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder setSliceEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (sliceEndpointIdsBuilder_ == null) { - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.set(index, builderForValue.build()); - onChanged(); - } else { - sliceEndpointIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder addSliceEndpointIds(context.ContextOuterClass.EndPointId value) { - if (sliceEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.add(value); - onChanged(); - } else { - sliceEndpointIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder addSliceEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (sliceEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.add(index, value); - onChanged(); - } else { - sliceEndpointIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder addSliceEndpointIds( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (sliceEndpointIdsBuilder_ == null) { - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.add(builderForValue.build()); - onChanged(); - } else { - sliceEndpointIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder addSliceEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (sliceEndpointIdsBuilder_ == null) { - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.add(index, builderForValue.build()); - onChanged(); - } else { - sliceEndpointIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder addAllSliceEndpointIds( - java.lang.Iterable values) { - if (sliceEndpointIdsBuilder_ == null) { - ensureSliceEndpointIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sliceEndpointIds_); - onChanged(); - } else { - sliceEndpointIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder clearSliceEndpointIds() { - if (sliceEndpointIdsBuilder_ == null) { - sliceEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - sliceEndpointIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder removeSliceEndpointIds(int index) { - if (sliceEndpointIdsBuilder_ == null) { - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.remove(index); - onChanged(); - } else { - sliceEndpointIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder getSliceEndpointIdsBuilder( - int index) { - return getSliceEndpointIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getSliceEndpointIdsOrBuilder( - int index) { - if (sliceEndpointIdsBuilder_ == null) { - return sliceEndpointIds_.get(index); } else { - return sliceEndpointIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public java.util.List - getSliceEndpointIdsOrBuilderList() { - if (sliceEndpointIdsBuilder_ != null) { - return sliceEndpointIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sliceEndpointIds_); - } - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addSliceEndpointIdsBuilder() { - return getSliceEndpointIdsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addSliceEndpointIdsBuilder( - int index) { - return getSliceEndpointIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public java.util.List - getSliceEndpointIdsBuilderList() { - return getSliceEndpointIdsFieldBuilder().getBuilderList(); - } - 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()); - sliceEndpointIds_ = null; - } - return sliceEndpointIdsBuilder_; - } - - private java.util.List sliceConstraints_ = - java.util.Collections.emptyList(); - private void ensureSliceConstraintsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - sliceConstraints_ = new java.util.ArrayList(sliceConstraints_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Constraint, context.ContextOuterClass.Constraint.Builder, context.ContextOuterClass.ConstraintOrBuilder> sliceConstraintsBuilder_; - - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public java.util.List getSliceConstraintsList() { - if (sliceConstraintsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sliceConstraints_); - } else { - return sliceConstraintsBuilder_.getMessageList(); - } - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public int getSliceConstraintsCount() { - if (sliceConstraintsBuilder_ == null) { - return sliceConstraints_.size(); - } else { - return sliceConstraintsBuilder_.getCount(); - } - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public context.ContextOuterClass.Constraint getSliceConstraints(int index) { - if (sliceConstraintsBuilder_ == null) { - return sliceConstraints_.get(index); - } else { - return sliceConstraintsBuilder_.getMessage(index); - } - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder setSliceConstraints( - int index, context.ContextOuterClass.Constraint value) { - if (sliceConstraintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceConstraintsIsMutable(); - sliceConstraints_.set(index, value); - onChanged(); - } else { - sliceConstraintsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder setSliceConstraints( - int index, context.ContextOuterClass.Constraint.Builder builderForValue) { - if (sliceConstraintsBuilder_ == null) { - ensureSliceConstraintsIsMutable(); - sliceConstraints_.set(index, builderForValue.build()); - onChanged(); - } else { - sliceConstraintsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder addSliceConstraints(context.ContextOuterClass.Constraint value) { - if (sliceConstraintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceConstraintsIsMutable(); - sliceConstraints_.add(value); - onChanged(); - } else { - sliceConstraintsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder addSliceConstraints( - int index, context.ContextOuterClass.Constraint value) { - if (sliceConstraintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceConstraintsIsMutable(); - sliceConstraints_.add(index, value); - onChanged(); - } else { - sliceConstraintsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder addSliceConstraints( - context.ContextOuterClass.Constraint.Builder builderForValue) { - if (sliceConstraintsBuilder_ == null) { - ensureSliceConstraintsIsMutable(); - sliceConstraints_.add(builderForValue.build()); - onChanged(); - } else { - sliceConstraintsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder addSliceConstraints( - int index, context.ContextOuterClass.Constraint.Builder builderForValue) { - if (sliceConstraintsBuilder_ == null) { - ensureSliceConstraintsIsMutable(); - sliceConstraints_.add(index, builderForValue.build()); - onChanged(); - } else { - sliceConstraintsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder addAllSliceConstraints( - java.lang.Iterable values) { - if (sliceConstraintsBuilder_ == null) { - ensureSliceConstraintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sliceConstraints_); - onChanged(); - } else { - sliceConstraintsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder clearSliceConstraints() { - if (sliceConstraintsBuilder_ == null) { - sliceConstraints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - sliceConstraintsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder removeSliceConstraints(int index) { - if (sliceConstraintsBuilder_ == null) { - ensureSliceConstraintsIsMutable(); - sliceConstraints_.remove(index); - onChanged(); - } else { - sliceConstraintsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public context.ContextOuterClass.Constraint.Builder getSliceConstraintsBuilder( - int index) { - return getSliceConstraintsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public context.ContextOuterClass.ConstraintOrBuilder getSliceConstraintsOrBuilder( - int index) { - if (sliceConstraintsBuilder_ == null) { - return sliceConstraints_.get(index); } else { - return sliceConstraintsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public java.util.List - getSliceConstraintsOrBuilderList() { - if (sliceConstraintsBuilder_ != null) { - return sliceConstraintsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sliceConstraints_); - } - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public context.ContextOuterClass.Constraint.Builder addSliceConstraintsBuilder() { - return getSliceConstraintsFieldBuilder().addBuilder( - context.ContextOuterClass.Constraint.getDefaultInstance()); - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public context.ContextOuterClass.Constraint.Builder addSliceConstraintsBuilder( - int index) { - return getSliceConstraintsFieldBuilder().addBuilder( - index, context.ContextOuterClass.Constraint.getDefaultInstance()); - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public java.util.List - getSliceConstraintsBuilderList() { - return getSliceConstraintsFieldBuilder().getBuilderList(); - } - 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()); - sliceConstraints_ = null; - } - return sliceConstraintsBuilder_; - } - - private java.util.List sliceServiceIds_ = - java.util.Collections.emptyList(); - private void ensureSliceServiceIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - sliceServiceIds_ = new java.util.ArrayList(sliceServiceIds_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> sliceServiceIdsBuilder_; - - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public java.util.List getSliceServiceIdsList() { - if (sliceServiceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sliceServiceIds_); - } else { - return sliceServiceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public int getSliceServiceIdsCount() { - if (sliceServiceIdsBuilder_ == null) { - return sliceServiceIds_.size(); - } else { - return sliceServiceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public context.ContextOuterClass.ServiceId getSliceServiceIds(int index) { - if (sliceServiceIdsBuilder_ == null) { - return sliceServiceIds_.get(index); - } else { - return sliceServiceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder setSliceServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (sliceServiceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.set(index, value); - onChanged(); - } else { - sliceServiceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder setSliceServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (sliceServiceIdsBuilder_ == null) { - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - sliceServiceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder addSliceServiceIds(context.ContextOuterClass.ServiceId value) { - if (sliceServiceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.add(value); - onChanged(); - } else { - sliceServiceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder addSliceServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (sliceServiceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.add(index, value); - onChanged(); - } else { - sliceServiceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder addSliceServiceIds( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (sliceServiceIdsBuilder_ == null) { - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.add(builderForValue.build()); - onChanged(); - } else { - sliceServiceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder addSliceServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (sliceServiceIdsBuilder_ == null) { - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - sliceServiceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder addAllSliceServiceIds( - java.lang.Iterable values) { - if (sliceServiceIdsBuilder_ == null) { - ensureSliceServiceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sliceServiceIds_); - onChanged(); - } else { - sliceServiceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder clearSliceServiceIds() { - if (sliceServiceIdsBuilder_ == null) { - sliceServiceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - sliceServiceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder removeSliceServiceIds(int index) { - if (sliceServiceIdsBuilder_ == null) { - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.remove(index); - onChanged(); - } else { - sliceServiceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public context.ContextOuterClass.ServiceId.Builder getSliceServiceIdsBuilder( - int index) { - return getSliceServiceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getSliceServiceIdsOrBuilder( - int index) { - if (sliceServiceIdsBuilder_ == null) { - return sliceServiceIds_.get(index); } else { - return sliceServiceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public java.util.List - getSliceServiceIdsOrBuilderList() { - if (sliceServiceIdsBuilder_ != null) { - return sliceServiceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sliceServiceIds_); - } - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public context.ContextOuterClass.ServiceId.Builder addSliceServiceIdsBuilder() { - return getSliceServiceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public context.ContextOuterClass.ServiceId.Builder addSliceServiceIdsBuilder( - int index) { - return getSliceServiceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public java.util.List - getSliceServiceIdsBuilderList() { - return getSliceServiceIdsFieldBuilder().getBuilderList(); - } - 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()); - sliceServiceIds_ = null; - } - return sliceServiceIdsBuilder_; - } - - private java.util.List sliceSubsliceIds_ = - java.util.Collections.emptyList(); - private void ensureSliceSubsliceIdsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - sliceSubsliceIds_ = new java.util.ArrayList(sliceSubsliceIds_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> sliceSubsliceIdsBuilder_; - - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public java.util.List getSliceSubsliceIdsList() { - if (sliceSubsliceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sliceSubsliceIds_); - } else { - return sliceSubsliceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public int getSliceSubsliceIdsCount() { - if (sliceSubsliceIdsBuilder_ == null) { - return sliceSubsliceIds_.size(); - } else { - return sliceSubsliceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public context.ContextOuterClass.SliceId getSliceSubsliceIds(int index) { - if (sliceSubsliceIdsBuilder_ == null) { - return sliceSubsliceIds_.get(index); - } else { - return sliceSubsliceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder setSliceSubsliceIds( - int index, context.ContextOuterClass.SliceId value) { - if (sliceSubsliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.set(index, value); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder setSliceSubsliceIds( - int index, context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceSubsliceIdsBuilder_ == null) { - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder addSliceSubsliceIds(context.ContextOuterClass.SliceId value) { - if (sliceSubsliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.add(value); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder addSliceSubsliceIds( - int index, context.ContextOuterClass.SliceId value) { - if (sliceSubsliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.add(index, value); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder addSliceSubsliceIds( - context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceSubsliceIdsBuilder_ == null) { - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.add(builderForValue.build()); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder addSliceSubsliceIds( - int index, context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceSubsliceIdsBuilder_ == null) { - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder addAllSliceSubsliceIds( - java.lang.Iterable values) { - if (sliceSubsliceIdsBuilder_ == null) { - ensureSliceSubsliceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sliceSubsliceIds_); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder clearSliceSubsliceIds() { - if (sliceSubsliceIdsBuilder_ == null) { - sliceSubsliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder removeSliceSubsliceIds(int index) { - if (sliceSubsliceIdsBuilder_ == null) { - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.remove(index); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public context.ContextOuterClass.SliceId.Builder getSliceSubsliceIdsBuilder( - int index) { - return getSliceSubsliceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public context.ContextOuterClass.SliceIdOrBuilder getSliceSubsliceIdsOrBuilder( - int index) { - if (sliceSubsliceIdsBuilder_ == null) { - return sliceSubsliceIds_.get(index); } else { - return sliceSubsliceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public java.util.List - getSliceSubsliceIdsOrBuilderList() { - if (sliceSubsliceIdsBuilder_ != null) { - return sliceSubsliceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sliceSubsliceIds_); - } - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public context.ContextOuterClass.SliceId.Builder addSliceSubsliceIdsBuilder() { - return getSliceSubsliceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.SliceId.getDefaultInstance()); - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public context.ContextOuterClass.SliceId.Builder addSliceSubsliceIdsBuilder( - int index) { - return getSliceSubsliceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.SliceId.getDefaultInstance()); - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public java.util.List - getSliceSubsliceIdsBuilderList() { - return getSliceSubsliceIdsFieldBuilder().getBuilderList(); - } - 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()); - sliceSubsliceIds_ = null; - } - return sliceSubsliceIdsBuilder_; - } - - private context.ContextOuterClass.SliceStatus sliceStatus_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceStatus, context.ContextOuterClass.SliceStatus.Builder, context.ContextOuterClass.SliceStatusOrBuilder> sliceStatusBuilder_; - /** - * .context.SliceStatus slice_status = 7; - * @return Whether the sliceStatus field is set. - */ - public boolean hasSliceStatus() { - return sliceStatusBuilder_ != null || sliceStatus_ != null; - } - /** - * .context.SliceStatus slice_status = 7; - * @return The sliceStatus. - */ - public context.ContextOuterClass.SliceStatus getSliceStatus() { - if (sliceStatusBuilder_ == null) { - return sliceStatus_ == null ? context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; - } else { - return sliceStatusBuilder_.getMessage(); - } - } - /** - * .context.SliceStatus slice_status = 7; - */ - public Builder setSliceStatus(context.ContextOuterClass.SliceStatus value) { - if (sliceStatusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceStatus_ = value; - onChanged(); - } else { - sliceStatusBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceStatus slice_status = 7; - */ - public Builder setSliceStatus( - context.ContextOuterClass.SliceStatus.Builder builderForValue) { - if (sliceStatusBuilder_ == null) { - sliceStatus_ = builderForValue.build(); - onChanged(); - } else { - sliceStatusBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceStatus slice_status = 7; - */ - public Builder mergeSliceStatus(context.ContextOuterClass.SliceStatus value) { - if (sliceStatusBuilder_ == null) { - if (sliceStatus_ != null) { - sliceStatus_ = - context.ContextOuterClass.SliceStatus.newBuilder(sliceStatus_).mergeFrom(value).buildPartial(); - } else { - sliceStatus_ = value; - } - onChanged(); - } else { - sliceStatusBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceStatus slice_status = 7; - */ - public Builder clearSliceStatus() { - if (sliceStatusBuilder_ == null) { - sliceStatus_ = null; - onChanged(); - } else { - sliceStatus_ = null; - sliceStatusBuilder_ = null; - } - - return this; - } - /** - * .context.SliceStatus slice_status = 7; - */ - public context.ContextOuterClass.SliceStatus.Builder getSliceStatusBuilder() { - - onChanged(); - return getSliceStatusFieldBuilder().getBuilder(); - } - /** - * .context.SliceStatus slice_status = 7; - */ - public context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder() { - if (sliceStatusBuilder_ != null) { - return sliceStatusBuilder_.getMessageOrBuilder(); - } else { - return sliceStatus_ == null ? - context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; - } - } - /** - * .context.SliceStatus slice_status = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceStatus, context.ContextOuterClass.SliceStatus.Builder, context.ContextOuterClass.SliceStatusOrBuilder> - getSliceStatusFieldBuilder() { - if (sliceStatusBuilder_ == null) { - sliceStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceStatus, context.ContextOuterClass.SliceStatus.Builder, context.ContextOuterClass.SliceStatusOrBuilder>( - getSliceStatus(), - getParentForChildren(), - isClean()); - sliceStatus_ = null; - } - return sliceStatusBuilder_; - } - - private context.ContextOuterClass.SliceConfig sliceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceConfig, context.ContextOuterClass.SliceConfig.Builder, context.ContextOuterClass.SliceConfigOrBuilder> sliceConfigBuilder_; - /** - * .context.SliceConfig slice_config = 8; - * @return Whether the sliceConfig field is set. - */ - public boolean hasSliceConfig() { - return sliceConfigBuilder_ != null || sliceConfig_ != null; - } - /** - * .context.SliceConfig slice_config = 8; - * @return The sliceConfig. - */ - public context.ContextOuterClass.SliceConfig getSliceConfig() { - if (sliceConfigBuilder_ == null) { - return sliceConfig_ == null ? context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; - } else { - return sliceConfigBuilder_.getMessage(); - } - } - /** - * .context.SliceConfig slice_config = 8; - */ - public Builder setSliceConfig(context.ContextOuterClass.SliceConfig value) { - if (sliceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceConfig_ = value; - onChanged(); - } else { - sliceConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceConfig slice_config = 8; - */ - public Builder setSliceConfig( - context.ContextOuterClass.SliceConfig.Builder builderForValue) { - if (sliceConfigBuilder_ == null) { - sliceConfig_ = builderForValue.build(); - onChanged(); - } else { - sliceConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceConfig slice_config = 8; - */ - public Builder mergeSliceConfig(context.ContextOuterClass.SliceConfig value) { - if (sliceConfigBuilder_ == null) { - if (sliceConfig_ != null) { - sliceConfig_ = - context.ContextOuterClass.SliceConfig.newBuilder(sliceConfig_).mergeFrom(value).buildPartial(); - } else { - sliceConfig_ = value; - } - onChanged(); - } else { - sliceConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceConfig slice_config = 8; - */ - public Builder clearSliceConfig() { - if (sliceConfigBuilder_ == null) { - sliceConfig_ = null; - onChanged(); - } else { - sliceConfig_ = null; - sliceConfigBuilder_ = null; - } - - return this; - } - /** - * .context.SliceConfig slice_config = 8; - */ - public context.ContextOuterClass.SliceConfig.Builder getSliceConfigBuilder() { - - onChanged(); - return getSliceConfigFieldBuilder().getBuilder(); - } - /** - * .context.SliceConfig slice_config = 8; - */ - public context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder() { - if (sliceConfigBuilder_ != null) { - return sliceConfigBuilder_.getMessageOrBuilder(); - } else { - return sliceConfig_ == null ? - context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; - } - } - /** - * .context.SliceConfig slice_config = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceConfig, context.ContextOuterClass.SliceConfig.Builder, context.ContextOuterClass.SliceConfigOrBuilder> - getSliceConfigFieldBuilder() { - if (sliceConfigBuilder_ == null) { - sliceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceConfig, context.ContextOuterClass.SliceConfig.Builder, context.ContextOuterClass.SliceConfigOrBuilder>( - getSliceConfig(), - getParentForChildren(), - isClean()); - sliceConfig_ = null; - } - return sliceConfigBuilder_; - } - - private context.ContextOuterClass.SliceOwner sliceOwner_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceOwner, context.ContextOuterClass.SliceOwner.Builder, context.ContextOuterClass.SliceOwnerOrBuilder> sliceOwnerBuilder_; - /** - * .context.SliceOwner slice_owner = 9; - * @return Whether the sliceOwner field is set. - */ - public boolean hasSliceOwner() { - return sliceOwnerBuilder_ != null || sliceOwner_ != null; - } - /** - * .context.SliceOwner slice_owner = 9; - * @return The sliceOwner. - */ - public context.ContextOuterClass.SliceOwner getSliceOwner() { - if (sliceOwnerBuilder_ == null) { - return sliceOwner_ == null ? context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; - } else { - return sliceOwnerBuilder_.getMessage(); - } - } - /** - * .context.SliceOwner slice_owner = 9; - */ - public Builder setSliceOwner(context.ContextOuterClass.SliceOwner value) { - if (sliceOwnerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceOwner_ = value; - onChanged(); - } else { - sliceOwnerBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceOwner slice_owner = 9; - */ - public Builder setSliceOwner( - context.ContextOuterClass.SliceOwner.Builder builderForValue) { - if (sliceOwnerBuilder_ == null) { - sliceOwner_ = builderForValue.build(); - onChanged(); - } else { - sliceOwnerBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceOwner slice_owner = 9; - */ - public Builder mergeSliceOwner(context.ContextOuterClass.SliceOwner value) { - if (sliceOwnerBuilder_ == null) { - if (sliceOwner_ != null) { - sliceOwner_ = - context.ContextOuterClass.SliceOwner.newBuilder(sliceOwner_).mergeFrom(value).buildPartial(); - } else { - sliceOwner_ = value; - } - onChanged(); - } else { - sliceOwnerBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceOwner slice_owner = 9; - */ - public Builder clearSliceOwner() { - if (sliceOwnerBuilder_ == null) { - sliceOwner_ = null; - onChanged(); - } else { - sliceOwner_ = null; - sliceOwnerBuilder_ = null; - } - - return this; - } - /** - * .context.SliceOwner slice_owner = 9; - */ - public context.ContextOuterClass.SliceOwner.Builder getSliceOwnerBuilder() { - - onChanged(); - return getSliceOwnerFieldBuilder().getBuilder(); - } - /** - * .context.SliceOwner slice_owner = 9; - */ - public context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder() { - if (sliceOwnerBuilder_ != null) { - return sliceOwnerBuilder_.getMessageOrBuilder(); - } else { - return sliceOwner_ == null ? - context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; - } - } - /** - * .context.SliceOwner slice_owner = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceOwner, context.ContextOuterClass.SliceOwner.Builder, context.ContextOuterClass.SliceOwnerOrBuilder> - getSliceOwnerFieldBuilder() { - if (sliceOwnerBuilder_ == null) { - sliceOwnerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceOwner, context.ContextOuterClass.SliceOwner.Builder, context.ContextOuterClass.SliceOwnerOrBuilder>( - getSliceOwner(), - getParentForChildren(), - isClean()); - sliceOwner_ = null; - } - return sliceOwnerBuilder_; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; - /** - * .context.Timestamp timestamp = 10; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 10; - * @return The timestamp. - */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - * .context.Timestamp timestamp = 10; - */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 10; - */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Timestamp timestamp = 10; - */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 10; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - * .context.Timestamp timestamp = 10; - */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .context.Timestamp timestamp = 10; - */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - * .context.Timestamp timestamp = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Slice) - } - // @@protoc_insertion_point(class_scope:context.Slice) - private static final context.ContextOuterClass.Slice DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Slice(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getOpticalconfigUuidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, opticalconfigUuid_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static context.ContextOuterClass.Slice getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.OpticalConfigId)) { + return super.equals(obj); + } + context.ContextOuterClass.OpticalConfigId other = (context.ContextOuterClass.OpticalConfigId) obj; + if (!getOpticalconfigUuid().equals(other.getOpticalconfigUuid())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OPTICALCONFIG_UUID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigUuid().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public context.ContextOuterClass.Slice getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public interface SliceOwnerOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceOwner) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.OpticalConfigId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * .context.Uuid owner_uuid = 1; - * @return Whether the ownerUuid field is set. - */ - boolean hasOwnerUuid(); - /** - * .context.Uuid owner_uuid = 1; - * @return The ownerUuid. - */ - context.ContextOuterClass.Uuid getOwnerUuid(); - /** - * .context.Uuid owner_uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder(); + public static context.ContextOuterClass.OpticalConfigId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * string owner_string = 2; - * @return The ownerString. - */ - java.lang.String getOwnerString(); - /** - * string owner_string = 2; - * @return The bytes for ownerString. - */ - com.google.protobuf.ByteString - getOwnerStringBytes(); - } - /** - * Protobuf type {@code context.SliceOwner} - */ - public static final class SliceOwner extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceOwner) - SliceOwnerOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceOwner.newBuilder() to construct. - private SliceOwner(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceOwner() { - ownerString_ = ""; - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceOwner(); - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @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; - } + public static context.ContextOuterClass.OpticalConfigId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceOwner_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceOwner.class, context.ContextOuterClass.SliceOwner.Builder.class); - } + public static context.ContextOuterClass.OpticalConfigId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - public static final int OWNER_UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid ownerUuid_; - /** - * .context.Uuid owner_uuid = 1; - * @return Whether the ownerUuid field is set. - */ - @java.lang.Override - public boolean hasOwnerUuid() { - return ownerUuid_ != null; - } - /** - * .context.Uuid owner_uuid = 1; - * @return The ownerUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getOwnerUuid() { - return ownerUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; - } - /** - * .context.Uuid owner_uuid = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder() { - return getOwnerUuid(); - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.OpticalConfigId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ---------------- Experimental ------------------------
+         * 
+ * + * Protobuf type {@code context.OpticalConfigId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigId) + context.ContextOuterClass.OpticalConfigIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfigId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigId.class, context.ContextOuterClass.OpticalConfigId.Builder.class); + } + + // 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(); + opticalconfigUuid_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.OpticalConfigId getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfigId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.OpticalConfigId build() { + context.ContextOuterClass.OpticalConfigId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.OpticalConfigId buildPartial() { + context.ContextOuterClass.OpticalConfigId result = new context.ContextOuterClass.OpticalConfigId(this); + result.opticalconfigUuid_ = opticalconfigUuid_; + onBuilt(); + return result; + } - public static final int OWNER_STRING_FIELD_NUMBER = 2; - private volatile java.lang.Object ownerString_; - /** - * string owner_string = 2; - * @return The ownerString. - */ - @java.lang.Override - public java.lang.String getOwnerString() { - java.lang.Object ref = ownerString_; - 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(); - ownerString_ = s; - return s; - } - } - /** - * string owner_string = 2; - * @return The bytes for ownerString. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOwnerStringBytes() { - java.lang.Object ref = ownerString_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ownerString_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (ownerUuid_ != null) { - output.writeMessage(1, getOwnerUuid()); - } - if (!getOwnerStringBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ownerString_); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (ownerUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getOwnerUuid()); - } - if (!getOwnerStringBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ownerString_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @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 boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceOwner)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceOwner other = (context.ContextOuterClass.SliceOwner) obj; - - if (hasOwnerUuid() != other.hasOwnerUuid()) return false; - if (hasOwnerUuid()) { - if (!getOwnerUuid() - .equals(other.getOwnerUuid())) return false; - } - if (!getOwnerString() - .equals(other.getOwnerString())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @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 int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOwnerUuid()) { - hash = (37 * hash) + OWNER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getOwnerUuid().hashCode(); - } - hash = (37 * hash) + OWNER_STRING_FIELD_NUMBER; - hash = (53 * hash) + getOwnerString().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalConfigId) { + return mergeFrom((context.ContextOuterClass.OpticalConfigId) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static context.ContextOuterClass.SliceOwner parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceOwner parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceOwner parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceOwner parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceOwner parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public Builder mergeFrom(context.ContextOuterClass.OpticalConfigId other) { + if (other == context.ContextOuterClass.OpticalConfigId.getDefaultInstance()) + return this; + if (!other.getOpticalconfigUuid().isEmpty()) { + opticalconfigUuid_ = other.opticalconfigUuid_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceOwner prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.SliceOwner} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceOwner) - context.ContextOuterClass.SliceOwnerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceOwner_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceOwner_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceOwner.class, context.ContextOuterClass.SliceOwner.Builder.class); - } - - // 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; - ownerUuidBuilder_ = null; - } - ownerString_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceOwner_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceOwner getDefaultInstanceForType() { - return context.ContextOuterClass.SliceOwner.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceOwner build() { - context.ContextOuterClass.SliceOwner result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceOwner) { - return mergeFrom((context.ContextOuterClass.SliceOwner)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceOwner other) { - if (other == context.ContextOuterClass.SliceOwner.getDefaultInstance()) return this; - if (other.hasOwnerUuid()) { - mergeOwnerUuid(other.getOwnerUuid()); - } - if (!other.getOwnerString().isEmpty()) { - ownerString_ = other.ownerString_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceOwner) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid ownerUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> ownerUuidBuilder_; - /** - * .context.Uuid owner_uuid = 1; - * @return Whether the ownerUuid field is set. - */ - public boolean hasOwnerUuid() { - return ownerUuidBuilder_ != null || ownerUuid_ != null; - } - /** - * .context.Uuid owner_uuid = 1; - * @return The ownerUuid. - */ - public context.ContextOuterClass.Uuid getOwnerUuid() { - if (ownerUuidBuilder_ == null) { - return ownerUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; - } else { - return ownerUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid owner_uuid = 1; - */ - public Builder setOwnerUuid(context.ContextOuterClass.Uuid value) { - if (ownerUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ownerUuid_ = value; - onChanged(); - } else { - ownerUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid owner_uuid = 1; - */ - public Builder setOwnerUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (ownerUuidBuilder_ == null) { - ownerUuid_ = builderForValue.build(); - onChanged(); - } else { - ownerUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid owner_uuid = 1; - */ - public Builder mergeOwnerUuid(context.ContextOuterClass.Uuid value) { - if (ownerUuidBuilder_ == null) { - if (ownerUuid_ != null) { - ownerUuid_ = - context.ContextOuterClass.Uuid.newBuilder(ownerUuid_).mergeFrom(value).buildPartial(); - } else { - ownerUuid_ = value; - } - onChanged(); - } else { - ownerUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid owner_uuid = 1; - */ - public Builder clearOwnerUuid() { - if (ownerUuidBuilder_ == null) { - ownerUuid_ = null; - onChanged(); - } else { - ownerUuid_ = null; - ownerUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid owner_uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getOwnerUuidBuilder() { - - onChanged(); - return getOwnerUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid owner_uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder() { - if (ownerUuidBuilder_ != null) { - return ownerUuidBuilder_.getMessageOrBuilder(); - } else { - return ownerUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; - } - } - /** - * .context.Uuid owner_uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getOwnerUuidFieldBuilder() { - if (ownerUuidBuilder_ == null) { - ownerUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getOwnerUuid(), - getParentForChildren(), - isClean()); - ownerUuid_ = null; - } - return ownerUuidBuilder_; - } - - private java.lang.Object ownerString_ = ""; - /** - * string owner_string = 2; - * @return The ownerString. - */ - public java.lang.String getOwnerString() { - java.lang.Object ref = ownerString_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ownerString_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string owner_string = 2; - * @return The bytes for ownerString. - */ - public com.google.protobuf.ByteString - getOwnerStringBytes() { - java.lang.Object ref = ownerString_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ownerString_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string owner_string = 2; - * @param value The ownerString to set. - * @return This builder for chaining. - */ - public Builder setOwnerString( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - ownerString_ = value; - onChanged(); - return this; - } - /** - * string owner_string = 2; - * @return This builder for chaining. - */ - public Builder clearOwnerString() { - - ownerString_ = getDefaultInstance().getOwnerString(); - onChanged(); - return this; - } - /** - * string owner_string = 2; - * @param value The bytes for ownerString to set. - * @return This builder for chaining. - */ - public Builder setOwnerStringBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - ownerString_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceOwner) - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.OpticalConfigId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - // @@protoc_insertion_point(class_scope:context.SliceOwner) - private static final context.ContextOuterClass.SliceOwner DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceOwner(); - } + private java.lang.Object opticalconfigUuid_ = ""; + + /** + * string opticalconfig_uuid = 1; + * @return The opticalconfigUuid. + */ + public java.lang.String getOpticalconfigUuid() { + java.lang.Object ref = opticalconfigUuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + opticalconfigUuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static context.ContextOuterClass.SliceOwner getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * string opticalconfig_uuid = 1; + * @return The bytes for opticalconfigUuid. + */ + public com.google.protobuf.ByteString getOpticalconfigUuidBytes() { + java.lang.Object ref = opticalconfigUuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + opticalconfigUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * string opticalconfig_uuid = 1; + * @param value The opticalconfigUuid to set. + * @return This builder for chaining. + */ + public Builder setOpticalconfigUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + opticalconfigUuid_ = value; + onChanged(); + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * string opticalconfig_uuid = 1; + * @return This builder for chaining. + */ + public Builder clearOpticalconfigUuid() { + opticalconfigUuid_ = getDefaultInstance().getOpticalconfigUuid(); + onChanged(); + return this; + } - @java.lang.Override - public context.ContextOuterClass.SliceOwner getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * string opticalconfig_uuid = 1; + * @param value The bytes for opticalconfigUuid to set. + * @return This builder for chaining. + */ + public Builder setOpticalconfigUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + opticalconfigUuid_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.OpticalConfigId) + } - public interface SliceStatusOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceStatus) - com.google.protobuf.MessageOrBuilder { + // @@protoc_insertion_point(class_scope:context.OpticalConfigId) + private static final context.ContextOuterClass.OpticalConfigId DEFAULT_INSTANCE; - /** - * .context.SliceStatusEnum slice_status = 1; - * @return The enum numeric value on the wire for sliceStatus. - */ - int getSliceStatusValue(); - /** - * .context.SliceStatusEnum slice_status = 1; - * @return The sliceStatus. - */ - context.ContextOuterClass.SliceStatusEnum getSliceStatus(); - } - /** - * Protobuf type {@code context.SliceStatus} - */ - public static final class SliceStatus extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceStatus) - SliceStatusOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceStatus.newBuilder() to construct. - private SliceStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceStatus() { - sliceStatus_ = 0; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigId(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceStatus(); - } + public static context.ContextOuterClass.OpticalConfigId getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @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; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceStatus.class, context.ContextOuterClass.SliceStatus.Builder.class); - } + @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); + } + }; - public static final int SLICE_STATUS_FIELD_NUMBER = 1; - private int sliceStatus_; - /** - * .context.SliceStatusEnum slice_status = 1; - * @return The enum numeric value on the wire for sliceStatus. - */ - @java.lang.Override public int getSliceStatusValue() { - return sliceStatus_; - } - /** - * .context.SliceStatusEnum slice_status = 1; - * @return The sliceStatus. - */ - @java.lang.Override public context.ContextOuterClass.SliceStatusEnum getSliceStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.valueOf(sliceStatus_); - return result == null ? context.ContextOuterClass.SliceStatusEnum.UNRECOGNIZED : result; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - memoizedIsInitialized = 1; - return true; + @java.lang.Override + public context.ContextOuterClass.OpticalConfigId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sliceStatus_ != context.ContextOuterClass.SliceStatusEnum.SLICESTATUS_UNDEFINED.getNumber()) { - output.writeEnum(1, sliceStatus_); - } - unknownFields.writeTo(output); - } + public interface OpticalConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfig) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sliceStatus_ != context.ContextOuterClass.SliceStatusEnum.SLICESTATUS_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, sliceStatus_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return Whether the opticalconfigId field is set. + */ + boolean hasOpticalconfigId(); - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceStatus)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceStatus other = (context.ContextOuterClass.SliceStatus) obj; - - if (sliceStatus_ != other.sliceStatus_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return The opticalconfigId. + */ + context.ContextOuterClass.OpticalConfigId getOpticalconfigId(); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SLICE_STATUS_FIELD_NUMBER; - hash = (53 * hash) + sliceStatus_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder(); - public static context.ContextOuterClass.SliceStatus parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceStatus parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceStatus parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * string config = 2; + * @return The config. + */ + java.lang.String getConfig(); - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceStatus prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * string config = 2; + * @return The bytes for config. + */ + com.google.protobuf.ByteString getConfigBytes(); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** - * Protobuf type {@code context.SliceStatus} + * Protobuf type {@code context.OpticalConfig} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceStatus) - context.ContextOuterClass.SliceStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceStatus.class, context.ContextOuterClass.SliceStatus.Builder.class); - } - - // 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(); - sliceStatus_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceStatus_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceStatus getDefaultInstanceForType() { - return context.ContextOuterClass.SliceStatus.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceStatus build() { - context.ContextOuterClass.SliceStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.SliceStatus buildPartial() { - context.ContextOuterClass.SliceStatus result = new context.ContextOuterClass.SliceStatus(this); - result.sliceStatus_ = sliceStatus_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceStatus) { - return mergeFrom((context.ContextOuterClass.SliceStatus)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceStatus other) { - if (other == context.ContextOuterClass.SliceStatus.getDefaultInstance()) return this; - if (other.sliceStatus_ != 0) { - setSliceStatusValue(other.getSliceStatusValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceStatus) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int sliceStatus_ = 0; - /** - * .context.SliceStatusEnum slice_status = 1; - * @return The enum numeric value on the wire for sliceStatus. - */ - @java.lang.Override public int getSliceStatusValue() { - return sliceStatus_; - } - /** - * .context.SliceStatusEnum slice_status = 1; - * @param value The enum numeric value on the wire for sliceStatus to set. - * @return This builder for chaining. - */ - public Builder setSliceStatusValue(int value) { - - sliceStatus_ = value; - onChanged(); - return this; - } - /** - * .context.SliceStatusEnum slice_status = 1; - * @return The sliceStatus. - */ - @java.lang.Override - public context.ContextOuterClass.SliceStatusEnum getSliceStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.valueOf(sliceStatus_); - return result == null ? context.ContextOuterClass.SliceStatusEnum.UNRECOGNIZED : result; - } - /** - * .context.SliceStatusEnum slice_status = 1; - * @param value The sliceStatus to set. - * @return This builder for chaining. - */ - public Builder setSliceStatus(context.ContextOuterClass.SliceStatusEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - sliceStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.SliceStatusEnum slice_status = 1; - * @return This builder for chaining. - */ - public Builder clearSliceStatus() { - - sliceStatus_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceStatus) - } + public static final class OpticalConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfig) + OpticalConfigOrBuilder { - // @@protoc_insertion_point(class_scope:context.SliceStatus) - private static final context.ContextOuterClass.SliceStatus DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceStatus(); - } + private static final long serialVersionUID = 0L; - public static context.ContextOuterClass.SliceStatus getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Use OpticalConfig.newBuilder() to construct. + private OpticalConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private OpticalConfig() { + config_ = ""; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpticalConfig(); + } - @java.lang.Override - public context.ContextOuterClass.SliceStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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 interface SliceConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceConfig) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; + } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - java.util.List - getConfigRulesList(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - context.ContextOuterClass.ConfigRule getConfigRules(int index); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - int getConfigRulesCount(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - java.util.List - getConfigRulesOrBuilderList(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.SliceConfig} - */ - public static final class SliceConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceConfig) - SliceConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceConfig.newBuilder() to construct. - private SliceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceConfig() { - configRules_ = java.util.Collections.emptyList(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfig.class, context.ContextOuterClass.OpticalConfig.Builder.class); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceConfig(); - } + public static final int OPTICALCONFIG_ID_FIELD_NUMBER = 1; - @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(); - 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; - } + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceConfig.class, context.ContextOuterClass.SliceConfig.Builder.class); - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return Whether the opticalconfigId field is set. + */ + @java.lang.Override + public boolean hasOpticalconfigId() { + return opticalconfigId_ != null; + } - public static final int CONFIG_RULES_FIELD_NUMBER = 1; - private java.util.List configRules_; - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public java.util.List getConfigRulesList() { - return configRules_; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public java.util.List - getConfigRulesOrBuilderList() { - return configRules_; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public int getConfigRulesCount() { - return configRules_.size(); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule getConfigRules(int index) { - return configRules_.get(index); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index) { - return configRules_.get(index); - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return The opticalconfigId. + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { + return getOpticalconfigId(); + } - memoizedIsInitialized = 1; - return true; - } + public static final int CONFIG_FIELD_NUMBER = 2; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < configRules_.size(); i++) { - output.writeMessage(1, configRules_.get(i)); - } - unknownFields.writeTo(output); - } + private volatile java.lang.Object config_; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < configRules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, configRules_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * string config = 2; + * @return The config. + */ + @java.lang.Override + public java.lang.String getConfig() { + java.lang.Object ref = config_; + 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(); + config_ = s; + return s; + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceConfig)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceConfig other = (context.ContextOuterClass.SliceConfig) obj; - - if (!getConfigRulesList() - .equals(other.getConfigRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string config = 2; + * @return The bytes for config. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfigBytes() { + java.lang.Object ref = config_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + config_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConfigRulesCount() > 0) { - hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; - hash = (53 * hash) + getConfigRulesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private byte memoizedIsInitialized = -1; - public static context.ContextOuterClass.SliceConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (opticalconfigId_ != null) { + output.writeMessage(1, getOpticalconfigId()); + } + if (!getConfigBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, config_); + } + unknownFields.writeTo(output); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.SliceConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceConfig) - context.ContextOuterClass.SliceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceConfig.class, context.ContextOuterClass.SliceConfig.Builder.class); - } - - // 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(); - if (configRulesBuilder_ == null) { - configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - configRulesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceConfig_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceConfig getDefaultInstanceForType() { - return context.ContextOuterClass.SliceConfig.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceConfig build() { - context.ContextOuterClass.SliceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.SliceConfig buildPartial() { - context.ContextOuterClass.SliceConfig result = new context.ContextOuterClass.SliceConfig(this); - int from_bitField0_ = bitField0_; - if (configRulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - configRules_ = java.util.Collections.unmodifiableList(configRules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.configRules_ = configRules_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceConfig) { - return mergeFrom((context.ContextOuterClass.SliceConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceConfig other) { - if (other == context.ContextOuterClass.SliceConfig.getDefaultInstance()) return this; - if (configRulesBuilder_ == null) { - if (!other.configRules_.isEmpty()) { - if (configRules_.isEmpty()) { - configRules_ = other.configRules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConfigRulesIsMutable(); - configRules_.addAll(other.configRules_); - } - onChanged(); - } - } else { - if (!other.configRules_.isEmpty()) { - if (configRulesBuilder_.isEmpty()) { - configRulesBuilder_.dispose(); - configRulesBuilder_ = null; - configRules_ = other.configRules_; - bitField0_ = (bitField0_ & ~0x00000001); - configRulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConfigRulesFieldBuilder() : null; - } else { - configRulesBuilder_.addAllMessages(other.configRules_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List configRules_ = - java.util.Collections.emptyList(); - private void ensureConfigRulesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - configRules_ = new java.util.ArrayList(configRules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder> configRulesBuilder_; - - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List getConfigRulesList() { - if (configRulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(configRules_); - } else { - return configRulesBuilder_.getMessageList(); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public int getConfigRulesCount() { - if (configRulesBuilder_ == null) { - return configRules_.size(); - } else { - return configRulesBuilder_.getCount(); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule getConfigRules(int index) { - if (configRulesBuilder_ == null) { - return configRules_.get(index); - } else { - return configRulesBuilder_.getMessage(index); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder setConfigRules( - int index, context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.set(index, value); - onChanged(); - } else { - configRulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder setConfigRules( - int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.set(index, builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules(context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.add(value); - onChanged(); - } else { - configRulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - int index, context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.add(index, value); - onChanged(); - } else { - configRulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.add(builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.add(index, builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addAllConfigRules( - java.lang.Iterable values) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, configRules_); - onChanged(); - } else { - configRulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder clearConfigRules() { - if (configRulesBuilder_ == null) { - configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - configRulesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder removeConfigRules(int index) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.remove(index); - onChanged(); - } else { - configRulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder getConfigRulesBuilder( - int index) { - return getConfigRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index) { - if (configRulesBuilder_ == null) { - return configRules_.get(index); } else { - return configRulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List - getConfigRulesOrBuilderList() { - if (configRulesBuilder_ != null) { - return configRulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(configRules_); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder() { - return getConfigRulesFieldBuilder().addBuilder( - context.ContextOuterClass.ConfigRule.getDefaultInstance()); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder( - int index) { - return getConfigRulesFieldBuilder().addBuilder( - index, context.ContextOuterClass.ConfigRule.getDefaultInstance()); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List - getConfigRulesBuilderList() { - return getConfigRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder> - getConfigRulesFieldBuilder() { - if (configRulesBuilder_ == null) { - configRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder>( - configRules_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - configRules_ = null; - } - return configRulesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceConfig) - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (opticalconfigId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpticalconfigId()); + } + if (!getConfigBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, config_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - // @@protoc_insertion_point(class_scope:context.SliceConfig) - private static final context.ContextOuterClass.SliceConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceConfig(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.OpticalConfig)) { + return super.equals(obj); + } + context.ContextOuterClass.OpticalConfig other = (context.ContextOuterClass.OpticalConfig) obj; + if (hasOpticalconfigId() != other.hasOpticalconfigId()) + return false; + if (hasOpticalconfigId()) { + if (!getOpticalconfigId().equals(other.getOpticalconfigId())) + return false; + } + if (!getConfig().equals(other.getConfig())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - public static context.ContextOuterClass.SliceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOpticalconfigId()) { + hash = (37 * hash) + OPTICALCONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigId().hashCode(); + } + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.OpticalConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.OpticalConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public context.ContextOuterClass.SliceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - } + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public interface SliceIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceIdList) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.OpticalConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * repeated .context.SliceId slice_ids = 1; - */ - java.util.List - getSliceIdsList(); - /** - * repeated .context.SliceId slice_ids = 1; - */ - context.ContextOuterClass.SliceId getSliceIds(int index); - /** - * repeated .context.SliceId slice_ids = 1; - */ - int getSliceIdsCount(); - /** - * repeated .context.SliceId slice_ids = 1; - */ - java.util.List - getSliceIdsOrBuilderList(); - /** - * repeated .context.SliceId slice_ids = 1; - */ - context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.SliceIdList} - */ - public static final class SliceIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceIdList) - SliceIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceIdList.newBuilder() to construct. - private SliceIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceIdList() { - sliceIds_ = java.util.Collections.emptyList(); - } + public static context.ContextOuterClass.OpticalConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceIdList(); - } + public static context.ContextOuterClass.OpticalConfig parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @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(); - 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; - } + public static context.ContextOuterClass.OpticalConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceIdList.class, context.ContextOuterClass.SliceIdList.Builder.class); - } + public static context.ContextOuterClass.OpticalConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - public static final int SLICE_IDS_FIELD_NUMBER = 1; - private java.util.List sliceIds_; - /** - * repeated .context.SliceId slice_ids = 1; - */ - @java.lang.Override - public java.util.List getSliceIdsList() { - return sliceIds_; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - @java.lang.Override - public java.util.List - getSliceIdsOrBuilderList() { - return sliceIds_; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - @java.lang.Override - public int getSliceIdsCount() { - return sliceIds_.size(); - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.SliceId getSliceIds(int index) { - return sliceIds_.get(index); - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder( - int index) { - return sliceIds_.get(index); - } + public static context.ContextOuterClass.OpticalConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < sliceIds_.size(); i++) { - output.writeMessage(1, sliceIds_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < sliceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, sliceIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceIdList other = (context.ContextOuterClass.SliceIdList) obj; - - if (!getSliceIdsList() - .equals(other.getSliceIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static Builder newBuilder(context.ContextOuterClass.OpticalConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSliceIdsCount() > 0) { - hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSliceIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static context.ContextOuterClass.SliceIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * Protobuf type {@code context.OpticalConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfig) + context.ContextOuterClass.OpticalConfigOrBuilder { - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.SliceIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceIdList) - context.ContextOuterClass.SliceIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceIdList.class, context.ContextOuterClass.SliceIdList.Builder.class); - } - - // 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(); - if (sliceIdsBuilder_ == null) { - sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - sliceIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceIdList getDefaultInstanceForType() { - return context.ContextOuterClass.SliceIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceIdList build() { - context.ContextOuterClass.SliceIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.SliceIdList buildPartial() { - context.ContextOuterClass.SliceIdList result = new context.ContextOuterClass.SliceIdList(this); - int from_bitField0_ = bitField0_; - if (sliceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.sliceIds_ = sliceIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceIdList) { - return mergeFrom((context.ContextOuterClass.SliceIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceIdList other) { - if (other == context.ContextOuterClass.SliceIdList.getDefaultInstance()) return this; - if (sliceIdsBuilder_ == null) { - if (!other.sliceIds_.isEmpty()) { - if (sliceIds_.isEmpty()) { - sliceIds_ = other.sliceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSliceIdsIsMutable(); - sliceIds_.addAll(other.sliceIds_); - } - onChanged(); - } - } else { - if (!other.sliceIds_.isEmpty()) { - if (sliceIdsBuilder_.isEmpty()) { - sliceIdsBuilder_.dispose(); - sliceIdsBuilder_ = null; - sliceIds_ = other.sliceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - sliceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSliceIdsFieldBuilder() : null; - } else { - sliceIdsBuilder_.addAllMessages(other.sliceIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List sliceIds_ = - java.util.Collections.emptyList(); - private void ensureSliceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - sliceIds_ = new java.util.ArrayList(sliceIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> sliceIdsBuilder_; - - /** - * repeated .context.SliceId slice_ids = 1; - */ - public java.util.List getSliceIdsList() { - if (sliceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sliceIds_); - } else { - return sliceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public int getSliceIdsCount() { - if (sliceIdsBuilder_ == null) { - return sliceIds_.size(); - } else { - return sliceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public context.ContextOuterClass.SliceId getSliceIds(int index) { - if (sliceIdsBuilder_ == null) { - return sliceIds_.get(index); - } else { - return sliceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder setSliceIds( - int index, context.ContextOuterClass.SliceId value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceIdsIsMutable(); - sliceIds_.set(index, value); - onChanged(); - } else { - sliceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder setSliceIds( - int index, context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - sliceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder addSliceIds(context.ContextOuterClass.SliceId value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceIdsIsMutable(); - sliceIds_.add(value); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder addSliceIds( - int index, context.ContextOuterClass.SliceId value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceIdsIsMutable(); - sliceIds_.add(index, value); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder addSliceIds( - context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.add(builderForValue.build()); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder addSliceIds( - int index, context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder addAllSliceIds( - java.lang.Iterable values) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sliceIds_); - onChanged(); - } else { - sliceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder clearSliceIds() { - if (sliceIdsBuilder_ == null) { - sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - sliceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder removeSliceIds(int index) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.remove(index); - onChanged(); - } else { - sliceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public context.ContextOuterClass.SliceId.Builder getSliceIdsBuilder( - int index) { - return getSliceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder( - int index) { - if (sliceIdsBuilder_ == null) { - return sliceIds_.get(index); } else { - return sliceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public java.util.List - getSliceIdsOrBuilderList() { - if (sliceIdsBuilder_ != null) { - return sliceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sliceIds_); - } - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder() { - return getSliceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.SliceId.getDefaultInstance()); - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder( - int index) { - return getSliceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.SliceId.getDefaultInstance()); - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public java.util.List - getSliceIdsBuilderList() { - return getSliceIdsFieldBuilder().getBuilderList(); - } - 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_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - sliceIds_ = null; - } - return sliceIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceIdList) - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; + } - // @@protoc_insertion_point(class_scope:context.SliceIdList) - private static final context.ContextOuterClass.SliceIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceIdList(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfig.class, context.ContextOuterClass.OpticalConfig.Builder.class); + } - public static context.ContextOuterClass.SliceIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Construct using context.ContextOuterClass.OpticalConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - public context.ContextOuterClass.SliceIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (opticalconfigIdBuilder_ == null) { + opticalconfigId_ = null; + } else { + opticalconfigId_ = null; + opticalconfigIdBuilder_ = null; + } + config_ = ""; + return this; + } - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; + } - public interface SliceListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceList) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public context.ContextOuterClass.OpticalConfig getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfig.getDefaultInstance(); + } - /** - * repeated .context.Slice slices = 1; - */ - java.util.List - getSlicesList(); - /** - * repeated .context.Slice slices = 1; - */ - context.ContextOuterClass.Slice getSlices(int index); - /** - * repeated .context.Slice slices = 1; - */ - int getSlicesCount(); - /** - * repeated .context.Slice slices = 1; - */ - java.util.List - getSlicesOrBuilderList(); - /** - * repeated .context.Slice slices = 1; - */ - context.ContextOuterClass.SliceOrBuilder getSlicesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.SliceList} - */ - public static final class SliceList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceList) - SliceListOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceList.newBuilder() to construct. - private SliceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceList() { - slices_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public context.ContextOuterClass.OpticalConfig build() { + context.ContextOuterClass.OpticalConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceList(); - } + @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(); + } + result.config_ = config_; + onBuilt(); + return result; + } - @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(); - 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; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceList.class, context.ContextOuterClass.SliceList.Builder.class); - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static final int SLICES_FIELD_NUMBER = 1; - private java.util.List slices_; - /** - * repeated .context.Slice slices = 1; - */ - @java.lang.Override - public java.util.List getSlicesList() { - return slices_; - } - /** - * repeated .context.Slice slices = 1; - */ - @java.lang.Override - public java.util.List - getSlicesOrBuilderList() { - return slices_; - } - /** - * repeated .context.Slice slices = 1; - */ - @java.lang.Override - public int getSlicesCount() { - return slices_.size(); - } - /** - * repeated .context.Slice slices = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Slice getSlices(int index) { - return slices_.get(index); - } - /** - * repeated .context.Slice slices = 1; - */ - @java.lang.Override - public context.ContextOuterClass.SliceOrBuilder getSlicesOrBuilder( - int index) { - return slices_.get(index); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - memoizedIsInitialized = 1; - return true; - } + @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 void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < slices_.size(); i++) { - output.writeMessage(1, slices_.get(i)); - } - unknownFields.writeTo(output); - } + @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 int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < slices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, slices_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalConfig) { + return mergeFrom((context.ContextOuterClass.OpticalConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceList)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceList other = (context.ContextOuterClass.SliceList) obj; - - if (!getSlicesList() - .equals(other.getSlicesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public Builder mergeFrom(context.ContextOuterClass.OpticalConfig other) { + if (other == context.ContextOuterClass.OpticalConfig.getDefaultInstance()) + return this; + if (other.hasOpticalconfigId()) { + mergeOpticalconfigId(other.getOpticalconfigId()); + } + if (!other.getConfig().isEmpty()) { + config_ = other.config_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSlicesCount() > 0) { - hash = (37 * hash) + SLICES_FIELD_NUMBER; - hash = (53 * hash) + getSlicesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static context.ContextOuterClass.SliceList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.OpticalConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.SliceList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceList) - context.ContextOuterClass.SliceListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceList.class, context.ContextOuterClass.SliceList.Builder.class); - } - - // 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(); - if (slicesBuilder_ == null) { - slices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - slicesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceList getDefaultInstanceForType() { - return context.ContextOuterClass.SliceList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceList build() { - context.ContextOuterClass.SliceList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.SliceList buildPartial() { - context.ContextOuterClass.SliceList result = new context.ContextOuterClass.SliceList(this); - int from_bitField0_ = bitField0_; - if (slicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - slices_ = java.util.Collections.unmodifiableList(slices_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.slices_ = slices_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceList) { - return mergeFrom((context.ContextOuterClass.SliceList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceList other) { - if (other == context.ContextOuterClass.SliceList.getDefaultInstance()) return this; - if (slicesBuilder_ == null) { - if (!other.slices_.isEmpty()) { - if (slices_.isEmpty()) { - slices_ = other.slices_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSlicesIsMutable(); - slices_.addAll(other.slices_); - } - onChanged(); - } - } else { - if (!other.slices_.isEmpty()) { - if (slicesBuilder_.isEmpty()) { - slicesBuilder_.dispose(); - slicesBuilder_ = null; - slices_ = other.slices_; - bitField0_ = (bitField0_ & ~0x00000001); - slicesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSlicesFieldBuilder() : null; - } else { - slicesBuilder_.addAllMessages(other.slices_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List slices_ = - java.util.Collections.emptyList(); - private void ensureSlicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - slices_ = new java.util.ArrayList(slices_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Slice, context.ContextOuterClass.Slice.Builder, context.ContextOuterClass.SliceOrBuilder> slicesBuilder_; - - /** - * repeated .context.Slice slices = 1; - */ - public java.util.List getSlicesList() { - if (slicesBuilder_ == null) { - return java.util.Collections.unmodifiableList(slices_); - } else { - return slicesBuilder_.getMessageList(); - } - } - /** - * repeated .context.Slice slices = 1; - */ - public int getSlicesCount() { - if (slicesBuilder_ == null) { - return slices_.size(); - } else { - return slicesBuilder_.getCount(); - } - } - /** - * repeated .context.Slice slices = 1; - */ - public context.ContextOuterClass.Slice getSlices(int index) { - if (slicesBuilder_ == null) { - return slices_.get(index); - } else { - return slicesBuilder_.getMessage(index); - } - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder setSlices( - int index, context.ContextOuterClass.Slice value) { - if (slicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSlicesIsMutable(); - slices_.set(index, value); - onChanged(); - } else { - slicesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder setSlices( - int index, context.ContextOuterClass.Slice.Builder builderForValue) { - if (slicesBuilder_ == null) { - ensureSlicesIsMutable(); - slices_.set(index, builderForValue.build()); - onChanged(); - } else { - slicesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder addSlices(context.ContextOuterClass.Slice value) { - if (slicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSlicesIsMutable(); - slices_.add(value); - onChanged(); - } else { - slicesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder addSlices( - int index, context.ContextOuterClass.Slice value) { - if (slicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSlicesIsMutable(); - slices_.add(index, value); - onChanged(); - } else { - slicesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder addSlices( - context.ContextOuterClass.Slice.Builder builderForValue) { - if (slicesBuilder_ == null) { - ensureSlicesIsMutable(); - slices_.add(builderForValue.build()); - onChanged(); - } else { - slicesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder addSlices( - int index, context.ContextOuterClass.Slice.Builder builderForValue) { - if (slicesBuilder_ == null) { - ensureSlicesIsMutable(); - slices_.add(index, builderForValue.build()); - onChanged(); - } else { - slicesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder addAllSlices( - java.lang.Iterable values) { - if (slicesBuilder_ == null) { - ensureSlicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, slices_); - onChanged(); - } else { - slicesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder clearSlices() { - if (slicesBuilder_ == null) { - slices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - slicesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder removeSlices(int index) { - if (slicesBuilder_ == null) { - ensureSlicesIsMutable(); - slices_.remove(index); - onChanged(); - } else { - slicesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public context.ContextOuterClass.Slice.Builder getSlicesBuilder( - int index) { - return getSlicesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Slice slices = 1; - */ - public context.ContextOuterClass.SliceOrBuilder getSlicesOrBuilder( - int index) { - if (slicesBuilder_ == null) { - return slices_.get(index); } else { - return slicesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Slice slices = 1; - */ - public java.util.List - getSlicesOrBuilderList() { - if (slicesBuilder_ != null) { - return slicesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(slices_); - } - } - /** - * repeated .context.Slice slices = 1; - */ - public context.ContextOuterClass.Slice.Builder addSlicesBuilder() { - return getSlicesFieldBuilder().addBuilder( - context.ContextOuterClass.Slice.getDefaultInstance()); - } - /** - * repeated .context.Slice slices = 1; - */ - public context.ContextOuterClass.Slice.Builder addSlicesBuilder( - int index) { - return getSlicesFieldBuilder().addBuilder( - index, context.ContextOuterClass.Slice.getDefaultInstance()); - } - /** - * repeated .context.Slice slices = 1; - */ - public java.util.List - getSlicesBuilderList() { - return getSlicesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Slice, context.ContextOuterClass.Slice.Builder, context.ContextOuterClass.SliceOrBuilder> - getSlicesFieldBuilder() { - if (slicesBuilder_ == null) { - slicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Slice, context.ContextOuterClass.Slice.Builder, context.ContextOuterClass.SliceOrBuilder>( - slices_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - slices_ = null; - } - return slicesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceList) - } + private com.google.protobuf.SingleFieldBuilderV3 opticalconfigIdBuilder_; - // @@protoc_insertion_point(class_scope:context.SliceList) - private static final context.ContextOuterClass.SliceList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceList(); - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return Whether the opticalconfigId field is set. + */ + public boolean hasOpticalconfigId() { + return opticalconfigIdBuilder_ != null || opticalconfigId_ != null; + } - public static context.ContextOuterClass.SliceList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return The opticalconfigId. + */ + public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { + if (opticalconfigIdBuilder_ == null) { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } else { + return opticalconfigIdBuilder_.getMessage(); + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { + if (opticalconfigIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + opticalconfigId_ = value; + onChanged(); + } else { + opticalconfigIdBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId.Builder builderForValue) { + if (opticalconfigIdBuilder_ == null) { + opticalconfigId_ = builderForValue.build(); + onChanged(); + } else { + opticalconfigIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public context.ContextOuterClass.SliceList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder mergeOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { + if (opticalconfigIdBuilder_ == null) { + if (opticalconfigId_ != null) { + opticalconfigId_ = context.ContextOuterClass.OpticalConfigId.newBuilder(opticalconfigId_).mergeFrom(value).buildPartial(); + } else { + opticalconfigId_ = value; + } + onChanged(); + } else { + opticalconfigIdBuilder_.mergeFrom(value); + } + return this; + } - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder clearOpticalconfigId() { + if (opticalconfigIdBuilder_ == null) { + opticalconfigId_ = null; + onChanged(); + } else { + opticalconfigId_ = null; + opticalconfigIdBuilder_ = null; + } + return this; + } - public interface SliceFilterOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceFilter) - com.google.protobuf.MessageOrBuilder { + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public context.ContextOuterClass.OpticalConfigId.Builder getOpticalconfigIdBuilder() { + onChanged(); + return getOpticalconfigIdFieldBuilder().getBuilder(); + } - /** - * .context.SliceIdList slice_ids = 1; - * @return Whether the sliceIds field is set. - */ - boolean hasSliceIds(); - /** - * .context.SliceIdList slice_ids = 1; - * @return The sliceIds. - */ - context.ContextOuterClass.SliceIdList getSliceIds(); - /** - * .context.SliceIdList slice_ids = 1; - */ - context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder(); + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { + if (opticalconfigIdBuilder_ != null) { + return opticalconfigIdBuilder_.getMessageOrBuilder(); + } else { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } + } - /** - * bool include_endpoint_ids = 2; - * @return The includeEndpointIds. - */ - boolean getIncludeEndpointIds(); + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getOpticalconfigIdFieldBuilder() { + if (opticalconfigIdBuilder_ == null) { + opticalconfigIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalconfigId(), getParentForChildren(), isClean()); + opticalconfigId_ = null; + } + return opticalconfigIdBuilder_; + } - /** - * bool include_constraints = 3; - * @return The includeConstraints. - */ - boolean getIncludeConstraints(); + private java.lang.Object config_ = ""; + + /** + * string config = 2; + * @return The config. + */ + public java.lang.String getConfig() { + java.lang.Object ref = config_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + config_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * bool include_service_ids = 4; - * @return The includeServiceIds. - */ - boolean getIncludeServiceIds(); + /** + * string config = 2; + * @return The bytes for config. + */ + public com.google.protobuf.ByteString getConfigBytes() { + java.lang.Object ref = config_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + config_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * bool include_subslice_ids = 5; - * @return The includeSubsliceIds. - */ - boolean getIncludeSubsliceIds(); + /** + * string config = 2; + * @param value The config to set. + * @return This builder for chaining. + */ + public Builder setConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + return this; + } - /** - * bool include_config_rules = 6; - * @return The includeConfigRules. - */ - boolean getIncludeConfigRules(); - } - /** - * Protobuf type {@code context.SliceFilter} - */ - public static final class SliceFilter extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceFilter) - SliceFilterOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceFilter.newBuilder() to construct. - private SliceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceFilter() { - } + /** + * string config = 2; + * @return This builder for chaining. + */ + public Builder clearConfig() { + config_ = getDefaultInstance().getConfig(); + onChanged(); + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceFilter(); - } + /** + * string config = 2; + * @param value The bytes for config to set. + * @return This builder for chaining. + */ + public Builder setConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + config_ = value; + onChanged(); + return this; + } - @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; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceFilter.class, context.ContextOuterClass.SliceFilter.Builder.class); - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.OpticalConfig) + } - public static final int SLICE_IDS_FIELD_NUMBER = 1; - private context.ContextOuterClass.SliceIdList sliceIds_; - /** - * .context.SliceIdList slice_ids = 1; - * @return Whether the sliceIds field is set. - */ - @java.lang.Override - public boolean hasSliceIds() { - return sliceIds_ != null; - } - /** - * .context.SliceIdList slice_ids = 1; - * @return The sliceIds. - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdList getSliceIds() { - return sliceIds_ == null ? context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; - } - /** - * .context.SliceIdList slice_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder() { - return getSliceIds(); - } + // @@protoc_insertion_point(class_scope:context.OpticalConfig) + private static final context.ContextOuterClass.OpticalConfig DEFAULT_INSTANCE; - public static final int INCLUDE_ENDPOINT_IDS_FIELD_NUMBER = 2; - private boolean includeEndpointIds_; - /** - * bool include_endpoint_ids = 2; - * @return The includeEndpointIds. - */ - @java.lang.Override - public boolean getIncludeEndpointIds() { - return includeEndpointIds_; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfig(); + } - public static final int INCLUDE_CONSTRAINTS_FIELD_NUMBER = 3; - private boolean includeConstraints_; - /** - * bool include_constraints = 3; - * @return The includeConstraints. - */ - @java.lang.Override - public boolean getIncludeConstraints() { - return includeConstraints_; - } + public static context.ContextOuterClass.OpticalConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static final int INCLUDE_SERVICE_IDS_FIELD_NUMBER = 4; - private boolean includeServiceIds_; - /** - * bool include_service_ids = 4; - * @return The includeServiceIds. - */ - @java.lang.Override - public boolean getIncludeServiceIds() { - return includeServiceIds_; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static final int INCLUDE_SUBSLICE_IDS_FIELD_NUMBER = 5; - private boolean includeSubsliceIds_; - /** - * bool include_subslice_ids = 5; - * @return The includeSubsliceIds. - */ - @java.lang.Override - public boolean getIncludeSubsliceIds() { - return includeSubsliceIds_; - } + @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); + } + }; - public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 6; - private boolean includeConfigRules_; - /** - * bool include_config_rules = 6; - * @return The includeConfigRules. - */ - @java.lang.Override - public boolean getIncludeConfigRules() { - return includeConfigRules_; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - memoizedIsInitialized = 1; - return true; + @java.lang.Override + public context.ContextOuterClass.OpticalConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sliceIds_ != null) { - output.writeMessage(1, getSliceIds()); - } - if (includeEndpointIds_ != false) { - output.writeBool(2, includeEndpointIds_); - } - if (includeConstraints_ != false) { - output.writeBool(3, includeConstraints_); - } - if (includeServiceIds_ != false) { - output.writeBool(4, includeServiceIds_); - } - if (includeSubsliceIds_ != false) { - output.writeBool(5, includeSubsliceIds_); - } - if (includeConfigRules_ != false) { - output.writeBool(6, includeConfigRules_); - } - unknownFields.writeTo(output); - } + public interface OpticalConfigListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigList) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sliceIds_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSliceIds()); - } - if (includeEndpointIds_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, includeEndpointIds_); - } - if (includeConstraints_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, includeConstraints_); - } - if (includeServiceIds_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, includeServiceIds_); - } - if (includeSubsliceIds_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, includeSubsliceIds_); - } - if (includeConfigRules_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, includeConfigRules_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + java.util.List getOpticalconfigsList(); - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceFilter)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceFilter other = (context.ContextOuterClass.SliceFilter) obj; - - if (hasSliceIds() != other.hasSliceIds()) return false; - if (hasSliceIds()) { - if (!getSliceIds() - .equals(other.getSliceIds())) return false; - } - if (getIncludeEndpointIds() - != other.getIncludeEndpointIds()) return false; - if (getIncludeConstraints() - != other.getIncludeConstraints()) return false; - if (getIncludeServiceIds() - != other.getIncludeServiceIds()) return false; - if (getIncludeSubsliceIds() - != other.getIncludeSubsliceIds()) return false; - if (getIncludeConfigRules() - != other.getIncludeConfigRules()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSliceIds()) { - hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSliceIds().hashCode(); - } - hash = (37 * hash) + INCLUDE_ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeEndpointIds()); - hash = (37 * hash) + INCLUDE_CONSTRAINTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeConstraints()); - hash = (37 * hash) + INCLUDE_SERVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeServiceIds()); - hash = (37 * hash) + INCLUDE_SUBSLICE_IDS_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + int getOpticalconfigsCount(); - public static context.ContextOuterClass.SliceFilter parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceFilter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceFilter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceFilter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceFilter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + java.util.List getOpticalconfigsOrBuilderList(); - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceFilter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** - * Protobuf type {@code context.SliceFilter} + * Protobuf type {@code context.OpticalConfigList} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceFilter) - context.ContextOuterClass.SliceFilterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceFilter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceFilter.class, context.ContextOuterClass.SliceFilter.Builder.class); - } - - // 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; - sliceIdsBuilder_ = null; - } - includeEndpointIds_ = false; - - includeConstraints_ = false; - - includeServiceIds_ = false; - - includeSubsliceIds_ = false; - - includeConfigRules_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceFilter_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceFilter getDefaultInstanceForType() { - return context.ContextOuterClass.SliceFilter.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceFilter build() { - context.ContextOuterClass.SliceFilter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceFilter) { - return mergeFrom((context.ContextOuterClass.SliceFilter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceFilter other) { - if (other == context.ContextOuterClass.SliceFilter.getDefaultInstance()) return this; - if (other.hasSliceIds()) { - mergeSliceIds(other.getSliceIds()); - } - if (other.getIncludeEndpointIds() != false) { - setIncludeEndpointIds(other.getIncludeEndpointIds()); - } - if (other.getIncludeConstraints() != false) { - setIncludeConstraints(other.getIncludeConstraints()); - } - if (other.getIncludeServiceIds() != false) { - setIncludeServiceIds(other.getIncludeServiceIds()); - } - if (other.getIncludeSubsliceIds() != false) { - setIncludeSubsliceIds(other.getIncludeSubsliceIds()); - } - if (other.getIncludeConfigRules() != false) { - setIncludeConfigRules(other.getIncludeConfigRules()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceFilter) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.SliceIdList sliceIds_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceIdList, context.ContextOuterClass.SliceIdList.Builder, context.ContextOuterClass.SliceIdListOrBuilder> sliceIdsBuilder_; - /** - * .context.SliceIdList slice_ids = 1; - * @return Whether the sliceIds field is set. - */ - public boolean hasSliceIds() { - return sliceIdsBuilder_ != null || sliceIds_ != null; - } - /** - * .context.SliceIdList slice_ids = 1; - * @return The sliceIds. - */ - public context.ContextOuterClass.SliceIdList getSliceIds() { - if (sliceIdsBuilder_ == null) { - return sliceIds_ == null ? context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; - } else { - return sliceIdsBuilder_.getMessage(); - } - } - /** - * .context.SliceIdList slice_ids = 1; - */ - public Builder setSliceIds(context.ContextOuterClass.SliceIdList value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceIds_ = value; - onChanged(); - } else { - sliceIdsBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceIdList slice_ids = 1; - */ - public Builder setSliceIds( - context.ContextOuterClass.SliceIdList.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - sliceIds_ = builderForValue.build(); - onChanged(); - } else { - sliceIdsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceIdList slice_ids = 1; - */ - public Builder mergeSliceIds(context.ContextOuterClass.SliceIdList value) { - if (sliceIdsBuilder_ == null) { - if (sliceIds_ != null) { - sliceIds_ = - context.ContextOuterClass.SliceIdList.newBuilder(sliceIds_).mergeFrom(value).buildPartial(); - } else { - sliceIds_ = value; - } - onChanged(); - } else { - sliceIdsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceIdList slice_ids = 1; - */ - public Builder clearSliceIds() { - if (sliceIdsBuilder_ == null) { - sliceIds_ = null; - onChanged(); - } else { - sliceIds_ = null; - sliceIdsBuilder_ = null; - } - - return this; - } - /** - * .context.SliceIdList slice_ids = 1; - */ - public context.ContextOuterClass.SliceIdList.Builder getSliceIdsBuilder() { - - onChanged(); - return getSliceIdsFieldBuilder().getBuilder(); - } - /** - * .context.SliceIdList slice_ids = 1; - */ - public context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder() { - if (sliceIdsBuilder_ != null) { - return sliceIdsBuilder_.getMessageOrBuilder(); - } else { - return sliceIds_ == null ? - context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; - } - } - /** - * .context.SliceIdList slice_ids = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceIdList, context.ContextOuterClass.SliceIdList.Builder, context.ContextOuterClass.SliceIdListOrBuilder> - getSliceIdsFieldBuilder() { - if (sliceIdsBuilder_ == null) { - sliceIdsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceIdList, context.ContextOuterClass.SliceIdList.Builder, context.ContextOuterClass.SliceIdListOrBuilder>( - getSliceIds(), - getParentForChildren(), - isClean()); - sliceIds_ = null; - } - return sliceIdsBuilder_; - } - - private boolean includeEndpointIds_ ; - /** - * bool include_endpoint_ids = 2; - * @return The includeEndpointIds. - */ - @java.lang.Override - public boolean getIncludeEndpointIds() { - return includeEndpointIds_; - } - /** - * bool include_endpoint_ids = 2; - * @param value The includeEndpointIds to set. - * @return This builder for chaining. - */ - public Builder setIncludeEndpointIds(boolean value) { - - includeEndpointIds_ = value; - onChanged(); - return this; - } - /** - * bool include_endpoint_ids = 2; - * @return This builder for chaining. - */ - public Builder clearIncludeEndpointIds() { - - includeEndpointIds_ = false; - onChanged(); - return this; - } - - private boolean includeConstraints_ ; - /** - * bool include_constraints = 3; - * @return The includeConstraints. - */ - @java.lang.Override - public boolean getIncludeConstraints() { - return includeConstraints_; - } - /** - * bool include_constraints = 3; - * @param value The includeConstraints to set. - * @return This builder for chaining. - */ - public Builder setIncludeConstraints(boolean value) { - - includeConstraints_ = value; - onChanged(); - return this; - } - /** - * bool include_constraints = 3; - * @return This builder for chaining. - */ - public Builder clearIncludeConstraints() { - - includeConstraints_ = false; - onChanged(); - return this; - } - - private boolean includeServiceIds_ ; - /** - * bool include_service_ids = 4; - * @return The includeServiceIds. - */ - @java.lang.Override - public boolean getIncludeServiceIds() { - return includeServiceIds_; - } - /** - * bool include_service_ids = 4; - * @param value The includeServiceIds to set. - * @return This builder for chaining. - */ - public Builder setIncludeServiceIds(boolean value) { - - includeServiceIds_ = value; - onChanged(); - return this; - } - /** - * bool include_service_ids = 4; - * @return This builder for chaining. - */ - public Builder clearIncludeServiceIds() { - - includeServiceIds_ = false; - onChanged(); - return this; - } - - private boolean includeSubsliceIds_ ; - /** - * bool include_subslice_ids = 5; - * @return The includeSubsliceIds. - */ - @java.lang.Override - public boolean getIncludeSubsliceIds() { - return includeSubsliceIds_; - } - /** - * bool include_subslice_ids = 5; - * @param value The includeSubsliceIds to set. - * @return This builder for chaining. - */ - public Builder setIncludeSubsliceIds(boolean value) { - - includeSubsliceIds_ = value; - onChanged(); - return this; - } - /** - * bool include_subslice_ids = 5; - * @return This builder for chaining. - */ - public Builder clearIncludeSubsliceIds() { - - includeSubsliceIds_ = false; - onChanged(); - return this; - } - - private boolean includeConfigRules_ ; - /** - * bool include_config_rules = 6; - * @return The includeConfigRules. - */ - @java.lang.Override - public boolean getIncludeConfigRules() { - return includeConfigRules_; - } - /** - * bool include_config_rules = 6; - * @param value The includeConfigRules to set. - * @return This builder for chaining. - */ - public Builder setIncludeConfigRules(boolean value) { - - includeConfigRules_ = value; - onChanged(); - return this; - } - /** - * bool include_config_rules = 6; - * @return This builder for chaining. - */ - public Builder clearIncludeConfigRules() { - - includeConfigRules_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceFilter) - } + public static final class OpticalConfigList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigList) + OpticalConfigListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use OpticalConfigList.newBuilder() to construct. + private OpticalConfigList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OpticalConfigList() { + opticalconfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } - // @@protoc_insertion_point(class_scope:context.SliceFilter) - private static final context.ContextOuterClass.SliceFilter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceFilter(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfigList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigList.class, context.ContextOuterClass.OpticalConfigList.Builder.class); + } - public static context.ContextOuterClass.SliceFilter getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final int OPTICALCONFIGS_FIELD_NUMBER = 1; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private java.util.List opticalconfigs_; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + @java.lang.Override + public java.util.List getOpticalconfigsList() { + return opticalconfigs_; + } - @java.lang.Override - public context.ContextOuterClass.SliceFilter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + @java.lang.Override + public java.util.List getOpticalconfigsOrBuilderList() { + return opticalconfigs_; + } - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + @java.lang.Override + public int getOpticalconfigsCount() { + return opticalconfigs_.size(); + } - public interface SliceEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceEvent) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index) { + return opticalconfigs_.get(index); + } - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index) { + return opticalconfigs_.get(index); + } - /** - * .context.SliceId slice_id = 2; - * @return Whether the sliceId field is set. - */ - boolean hasSliceId(); - /** - * .context.SliceId slice_id = 2; - * @return The sliceId. - */ - context.ContextOuterClass.SliceId getSliceId(); - /** - * .context.SliceId slice_id = 2; - */ - context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); - } - /** - * Protobuf type {@code context.SliceEvent} - */ - public static final class SliceEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceEvent) - SliceEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceEvent.newBuilder() to construct. - private SliceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceEvent() { - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceEvent(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @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; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < opticalconfigs_.size(); i++) { + output.writeMessage(1, opticalconfigs_.get(i)); + } + unknownFields.writeTo(output); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceEvent.class, context.ContextOuterClass.SliceEvent.Builder.class); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < opticalconfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, opticalconfigs_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.OpticalConfigList)) { + return super.equals(obj); + } + context.ContextOuterClass.OpticalConfigList other = (context.ContextOuterClass.OpticalConfigList) obj; + if (!getOpticalconfigsList().equals(other.getOpticalconfigsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOpticalconfigsCount() > 0) { + hash = (37 * hash) + OPTICALCONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - public static final int SLICE_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.SliceId sliceId_; - /** - * .context.SliceId slice_id = 2; - * @return Whether the sliceId field is set. - */ - @java.lang.Override - public boolean hasSliceId() { - return sliceId_ != null; - } - /** - * .context.SliceId slice_id = 2; - * @return The sliceId. - */ - @java.lang.Override - public context.ContextOuterClass.SliceId getSliceId() { - return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } - /** - * .context.SliceId slice_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - return getSliceId(); - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (sliceId_ != null) { - output.writeMessage(2, getSliceId()); - } - unknownFields.writeTo(output); - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (sliceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSliceId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceEvent other = (context.ContextOuterClass.SliceEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasSliceId() != other.hasSliceId()) return false; - if (hasSliceId()) { - if (!getSliceId() - .equals(other.getSliceId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasSliceId()) { - hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getSliceId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static context.ContextOuterClass.SliceEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.OpticalConfigList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.SliceEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceEvent) - context.ContextOuterClass.SliceEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceEvent.class, context.ContextOuterClass.SliceEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (sliceIdBuilder_ == null) { - sliceId_ = null; - } else { - sliceId_ = null; - sliceIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceEvent getDefaultInstanceForType() { - return context.ContextOuterClass.SliceEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceEvent build() { - context.ContextOuterClass.SliceEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceEvent) { - return mergeFrom((context.ContextOuterClass.SliceEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceEvent other) { - if (other == context.ContextOuterClass.SliceEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasSliceId()) { - mergeSliceId(other.getSliceId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.SliceId sliceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> sliceIdBuilder_; - /** - * .context.SliceId slice_id = 2; - * @return Whether the sliceId field is set. - */ - public boolean hasSliceId() { - return sliceIdBuilder_ != null || sliceId_ != null; - } - /** - * .context.SliceId slice_id = 2; - * @return The sliceId. - */ - public context.ContextOuterClass.SliceId getSliceId() { - if (sliceIdBuilder_ == null) { - return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } else { - return sliceIdBuilder_.getMessage(); - } - } - /** - * .context.SliceId slice_id = 2; - */ - public Builder setSliceId(context.ContextOuterClass.SliceId value) { - if (sliceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceId_ = value; - onChanged(); - } else { - sliceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceId slice_id = 2; - */ - public Builder setSliceId( - context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdBuilder_ == null) { - sliceId_ = builderForValue.build(); - onChanged(); - } else { - sliceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceId slice_id = 2; - */ - public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { - if (sliceIdBuilder_ == null) { - if (sliceId_ != null) { - sliceId_ = - context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); - } else { - sliceId_ = value; - } - onChanged(); - } else { - sliceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceId slice_id = 2; - */ - public Builder clearSliceId() { - if (sliceIdBuilder_ == null) { - sliceId_ = null; - onChanged(); - } else { - sliceId_ = null; - sliceIdBuilder_ = null; - } - - return this; - } - /** - * .context.SliceId slice_id = 2; - */ - public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { - - onChanged(); - return getSliceIdFieldBuilder().getBuilder(); - } - /** - * .context.SliceId slice_id = 2; - */ - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - if (sliceIdBuilder_ != null) { - return sliceIdBuilder_.getMessageOrBuilder(); - } else { - return sliceId_ == null ? - context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } - } - /** - * .context.SliceId slice_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> - getSliceIdFieldBuilder() { - if (sliceIdBuilder_ == null) { - sliceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder>( - getSliceId(), - getParentForChildren(), - isClean()); - sliceId_ = null; - } - return sliceIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceEvent) - } + public static context.ContextOuterClass.OpticalConfigList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:context.SliceEvent) - private static final context.ContextOuterClass.SliceEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceEvent(); - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static context.ContextOuterClass.SliceEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public context.ContextOuterClass.SliceEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static Builder newBuilder(context.ContextOuterClass.OpticalConfigList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public interface ConnectionIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionId) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * .context.Uuid connection_uuid = 1; - * @return Whether the connectionUuid field is set. - */ - boolean hasConnectionUuid(); - /** - * .context.Uuid connection_uuid = 1; - * @return The connectionUuid. - */ - context.ContextOuterClass.Uuid getConnectionUuid(); - /** - * .context.Uuid connection_uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder(); - } - /** - *
-   * ----- Connection ----------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.ConnectionId} - */ - public static final class ConnectionId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionId) - ConnectionIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionId.newBuilder() to construct. - private ConnectionId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionId() { - } + /** + * Protobuf type {@code context.OpticalConfigList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigList) + context.ContextOuterClass.OpticalConfigListOrBuilder { - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionId(); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; + } - @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; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfigList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigList.class, context.ContextOuterClass.OpticalConfigList.Builder.class); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionId.class, context.ContextOuterClass.ConnectionId.Builder.class); - } + // Construct using context.ContextOuterClass.OpticalConfigList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - public static final int CONNECTION_UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid connectionUuid_; - /** - * .context.Uuid connection_uuid = 1; - * @return Whether the connectionUuid field is set. - */ - @java.lang.Override - public boolean hasConnectionUuid() { - return connectionUuid_ != null; - } - /** - * .context.Uuid connection_uuid = 1; - * @return The connectionUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getConnectionUuid() { - return connectionUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; - } - /** - * .context.Uuid connection_uuid = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder() { - return getConnectionUuid(); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOpticalconfigsFieldBuilder(); + } + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (opticalconfigsBuilder_ == null) { + opticalconfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + opticalconfigsBuilder_.clear(); + } + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (connectionUuid_ != null) { - output.writeMessage(1, getConnectionUuid()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (connectionUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getConnectionUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public context.ContextOuterClass.OpticalConfigList getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfigList.getDefaultInstance(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionId)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionId other = (context.ContextOuterClass.ConnectionId) obj; - - if (hasConnectionUuid() != other.hasConnectionUuid()) return false; - if (hasConnectionUuid()) { - if (!getConnectionUuid() - .equals(other.getConnectionUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public context.ContextOuterClass.OpticalConfigList build() { + context.ContextOuterClass.OpticalConfigList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConnectionUuid()) { - hash = (37 * hash) + CONNECTION_UUID_FIELD_NUMBER; - hash = (53 * hash) + getConnectionUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public context.ContextOuterClass.OpticalConfigList buildPartial() { + context.ContextOuterClass.OpticalConfigList result = new context.ContextOuterClass.OpticalConfigList(this); + int from_bitField0_ = bitField0_; + if (opticalconfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + opticalconfigs_ = java.util.Collections.unmodifiableList(opticalconfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.opticalconfigs_ = opticalconfigs_; + } else { + result.opticalconfigs_ = opticalconfigsBuilder_.build(); + } + onBuilt(); + return result; + } - public static context.ContextOuterClass.ConnectionId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Connection ----------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.ConnectionId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionId) - context.ContextOuterClass.ConnectionIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionId.class, context.ContextOuterClass.ConnectionId.Builder.class); - } - - // 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; - connectionUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionId getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionId build() { - context.ContextOuterClass.ConnectionId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionId) { - return mergeFrom((context.ContextOuterClass.ConnectionId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionId other) { - if (other == context.ContextOuterClass.ConnectionId.getDefaultInstance()) return this; - if (other.hasConnectionUuid()) { - mergeConnectionUuid(other.getConnectionUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid connectionUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> connectionUuidBuilder_; - /** - * .context.Uuid connection_uuid = 1; - * @return Whether the connectionUuid field is set. - */ - public boolean hasConnectionUuid() { - return connectionUuidBuilder_ != null || connectionUuid_ != null; - } - /** - * .context.Uuid connection_uuid = 1; - * @return The connectionUuid. - */ - public context.ContextOuterClass.Uuid getConnectionUuid() { - if (connectionUuidBuilder_ == null) { - return connectionUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; - } else { - return connectionUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid connection_uuid = 1; - */ - public Builder setConnectionUuid(context.ContextOuterClass.Uuid value) { - if (connectionUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - connectionUuid_ = value; - onChanged(); - } else { - connectionUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid connection_uuid = 1; - */ - public Builder setConnectionUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (connectionUuidBuilder_ == null) { - connectionUuid_ = builderForValue.build(); - onChanged(); - } else { - connectionUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid connection_uuid = 1; - */ - public Builder mergeConnectionUuid(context.ContextOuterClass.Uuid value) { - if (connectionUuidBuilder_ == null) { - if (connectionUuid_ != null) { - connectionUuid_ = - context.ContextOuterClass.Uuid.newBuilder(connectionUuid_).mergeFrom(value).buildPartial(); - } else { - connectionUuid_ = value; - } - onChanged(); - } else { - connectionUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid connection_uuid = 1; - */ - public Builder clearConnectionUuid() { - if (connectionUuidBuilder_ == null) { - connectionUuid_ = null; - onChanged(); - } else { - connectionUuid_ = null; - connectionUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid connection_uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getConnectionUuidBuilder() { - - onChanged(); - return getConnectionUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid connection_uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder() { - if (connectionUuidBuilder_ != null) { - return connectionUuidBuilder_.getMessageOrBuilder(); - } else { - return connectionUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; - } - } - /** - * .context.Uuid connection_uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getConnectionUuidFieldBuilder() { - if (connectionUuidBuilder_ == null) { - connectionUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getConnectionUuid(), - getParentForChildren(), - isClean()); - connectionUuid_ = null; - } - return connectionUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionId) - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - // @@protoc_insertion_point(class_scope:context.ConnectionId) - private static final context.ContextOuterClass.ConnectionId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionId(); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - public static context.ContextOuterClass.ConnectionId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @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 static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @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 com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalConfigList) { + return mergeFrom((context.ContextOuterClass.OpticalConfigList) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public context.ContextOuterClass.ConnectionId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public Builder mergeFrom(context.ContextOuterClass.OpticalConfigList other) { + if (other == context.ContextOuterClass.OpticalConfigList.getDefaultInstance()) + return this; + if (opticalconfigsBuilder_ == null) { + if (!other.opticalconfigs_.isEmpty()) { + if (opticalconfigs_.isEmpty()) { + opticalconfigs_ = other.opticalconfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.addAll(other.opticalconfigs_); + } + onChanged(); + } + } else { + if (!other.opticalconfigs_.isEmpty()) { + if (opticalconfigsBuilder_.isEmpty()) { + opticalconfigsBuilder_.dispose(); + opticalconfigsBuilder_ = null; + opticalconfigs_ = other.opticalconfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + opticalconfigsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOpticalconfigsFieldBuilder() : null; + } else { + opticalconfigsBuilder_.addAllMessages(other.opticalconfigs_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.OpticalConfigList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - public interface ConnectionSettings_L0OrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L0) - com.google.protobuf.MessageOrBuilder { + private int bitField0_; - /** - * string lsp_symbolic_name = 1; - * @return The lspSymbolicName. - */ - java.lang.String getLspSymbolicName(); - /** - * string lsp_symbolic_name = 1; - * @return The bytes for lspSymbolicName. - */ - com.google.protobuf.ByteString - getLspSymbolicNameBytes(); - } - /** - * Protobuf type {@code context.ConnectionSettings_L0} - */ - public static final class ConnectionSettings_L0 extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L0) - ConnectionSettings_L0OrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionSettings_L0.newBuilder() to construct. - private ConnectionSettings_L0(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionSettings_L0() { - lspSymbolicName_ = ""; - } + private java.util.List opticalconfigs_ = java.util.Collections.emptyList(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionSettings_L0(); - } + private void ensureOpticalconfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + opticalconfigs_ = new java.util.ArrayList(opticalconfigs_); + bitField0_ |= 0x00000001; + } + } - @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; - } + private com.google.protobuf.RepeatedFieldBuilderV3 opticalconfigsBuilder_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L0.class, context.ContextOuterClass.ConnectionSettings_L0.Builder.class); - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public java.util.List getOpticalconfigsList() { + if (opticalconfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(opticalconfigs_); + } else { + return opticalconfigsBuilder_.getMessageList(); + } + } - public static final int LSP_SYMBOLIC_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object lspSymbolicName_; - /** - * string lsp_symbolic_name = 1; - * @return The lspSymbolicName. - */ - @java.lang.Override - public java.lang.String getLspSymbolicName() { - java.lang.Object ref = lspSymbolicName_; - 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(); - lspSymbolicName_ = s; - return s; - } - } - /** - * string lsp_symbolic_name = 1; - * @return The bytes for lspSymbolicName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLspSymbolicNameBytes() { - java.lang.Object ref = lspSymbolicName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - lspSymbolicName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public int getOpticalconfigsCount() { + if (opticalconfigsBuilder_ == null) { + return opticalconfigs_.size(); + } else { + return opticalconfigsBuilder_.getCount(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index) { + if (opticalconfigsBuilder_ == null) { + return opticalconfigs_.get(index); + } else { + return opticalconfigsBuilder_.getMessage(index); + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder setOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig value) { + if (opticalconfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalconfigsIsMutable(); + opticalconfigs_.set(index, value); + onChanged(); + } else { + opticalconfigsBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getLspSymbolicNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, lspSymbolicName_); - } - unknownFields.writeTo(output); - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder setOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig.Builder builderForValue) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + opticalconfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getLspSymbolicNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, lspSymbolicName_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder addOpticalconfigs(context.ContextOuterClass.OpticalConfig value) { + if (opticalconfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(value); + onChanged(); + } else { + opticalconfigsBuilder_.addMessage(value); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L0)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionSettings_L0 other = (context.ContextOuterClass.ConnectionSettings_L0) obj; - - if (!getLspSymbolicName() - .equals(other.getLspSymbolicName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder addOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig value) { + if (opticalconfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(index, value); + onChanged(); + } else { + opticalconfigsBuilder_.addMessage(index, value); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LSP_SYMBOLIC_NAME_FIELD_NUMBER; - hash = (53 * hash) + getLspSymbolicName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder addOpticalconfigs(context.ContextOuterClass.OpticalConfig.Builder builderForValue) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(builderForValue.build()); + onChanged(); + } else { + opticalconfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder addOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig.Builder builderForValue) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + opticalconfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder addAllOpticalconfigs(java.lang.Iterable values) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, opticalconfigs_); + onChanged(); + } else { + opticalconfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder clearOpticalconfigs() { + if (opticalconfigsBuilder_ == null) { + opticalconfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + opticalconfigsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder removeOpticalconfigs(int index) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.remove(index); + onChanged(); + } else { + opticalconfigsBuilder_.remove(index); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L0 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public context.ContextOuterClass.OpticalConfig.Builder getOpticalconfigsBuilder(int index) { + return getOpticalconfigsFieldBuilder().getBuilder(index); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionSettings_L0} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L0) - context.ContextOuterClass.ConnectionSettings_L0OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L0.class, context.ContextOuterClass.ConnectionSettings_L0.Builder.class); - } - - // 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(); - lspSymbolicName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L0 getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L0 build() { - context.ContextOuterClass.ConnectionSettings_L0 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L0 buildPartial() { - context.ContextOuterClass.ConnectionSettings_L0 result = new context.ContextOuterClass.ConnectionSettings_L0(this); - result.lspSymbolicName_ = lspSymbolicName_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionSettings_L0) { - return mergeFrom((context.ContextOuterClass.ConnectionSettings_L0)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L0 other) { - if (other == context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance()) return this; - if (!other.getLspSymbolicName().isEmpty()) { - lspSymbolicName_ = other.lspSymbolicName_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings_L0) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object lspSymbolicName_ = ""; - /** - * string lsp_symbolic_name = 1; - * @return The lspSymbolicName. - */ - public java.lang.String getLspSymbolicName() { - java.lang.Object ref = lspSymbolicName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - lspSymbolicName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string lsp_symbolic_name = 1; - * @return The bytes for lspSymbolicName. - */ - public com.google.protobuf.ByteString - getLspSymbolicNameBytes() { - java.lang.Object ref = lspSymbolicName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - lspSymbolicName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string lsp_symbolic_name = 1; - * @param value The lspSymbolicName to set. - * @return This builder for chaining. - */ - public Builder setLspSymbolicName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - lspSymbolicName_ = value; - onChanged(); - return this; - } - /** - * string lsp_symbolic_name = 1; - * @return This builder for chaining. - */ - public Builder clearLspSymbolicName() { - - lspSymbolicName_ = getDefaultInstance().getLspSymbolicName(); - onChanged(); - return this; - } - /** - * string lsp_symbolic_name = 1; - * @param value The bytes for lspSymbolicName to set. - * @return This builder for chaining. - */ - public Builder setLspSymbolicNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - lspSymbolicName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L0) - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index) { + if (opticalconfigsBuilder_ == null) { + return opticalconfigs_.get(index); + } else { + return opticalconfigsBuilder_.getMessageOrBuilder(index); + } + } - // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L0) - private static final context.ContextOuterClass.ConnectionSettings_L0 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L0(); - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public java.util.List getOpticalconfigsOrBuilderList() { + if (opticalconfigsBuilder_ != null) { + return opticalconfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(opticalconfigs_); + } + } - public static context.ContextOuterClass.ConnectionSettings_L0 getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public context.ContextOuterClass.OpticalConfig.Builder addOpticalconfigsBuilder() { + return getOpticalconfigsFieldBuilder().addBuilder(context.ContextOuterClass.OpticalConfig.getDefaultInstance()); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public context.ContextOuterClass.OpticalConfig.Builder addOpticalconfigsBuilder(int index) { + return getOpticalconfigsFieldBuilder().addBuilder(index, context.ContextOuterClass.OpticalConfig.getDefaultInstance()); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public java.util.List getOpticalconfigsBuilderList() { + return getOpticalconfigsFieldBuilder().getBuilderList(); + } - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L0 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.RepeatedFieldBuilderV3 getOpticalconfigsFieldBuilder() { + if (opticalconfigsBuilder_ == null) { + opticalconfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(opticalconfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + opticalconfigs_ = null; + } + return opticalconfigsBuilder_; + } - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public interface ConnectionSettings_L2OrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L2) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.OpticalConfigList) + } - /** - * string src_mac_address = 1; - * @return The srcMacAddress. - */ - java.lang.String getSrcMacAddress(); - /** - * string src_mac_address = 1; - * @return The bytes for srcMacAddress. - */ - com.google.protobuf.ByteString - getSrcMacAddressBytes(); + // @@protoc_insertion_point(class_scope:context.OpticalConfigList) + private static final context.ContextOuterClass.OpticalConfigList DEFAULT_INSTANCE; - /** - * string dst_mac_address = 2; - * @return The dstMacAddress. - */ - java.lang.String getDstMacAddress(); - /** - * string dst_mac_address = 2; - * @return The bytes for dstMacAddress. - */ - com.google.protobuf.ByteString - getDstMacAddressBytes(); + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigList(); + } - /** - * uint32 ether_type = 3; - * @return The etherType. - */ - int getEtherType(); + public static context.ContextOuterClass.OpticalConfigList getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * uint32 vlan_id = 4; - * @return The vlanId. - */ - int getVlanId(); + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - /** - * uint32 mpls_label = 5; - * @return The mplsLabel. - */ - int getMplsLabel(); + @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); + } + }; - /** - * uint32 mpls_traffic_class = 6; - * @return The mplsTrafficClass. - */ - int getMplsTrafficClass(); - } - /** - * Protobuf type {@code context.ConnectionSettings_L2} - */ - public static final class ConnectionSettings_L2 extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L2) - ConnectionSettings_L2OrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionSettings_L2.newBuilder() to construct. - private ConnectionSettings_L2(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionSettings_L2() { - srcMacAddress_ = ""; - dstMacAddress_ = ""; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionSettings_L2(); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @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; + @java.lang.Override + public context.ContextOuterClass.OpticalConfigList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L2.class, context.ContextOuterClass.ConnectionSettings_L2.Builder.class); - } + public interface OpticalLinkIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLinkId) + com.google.protobuf.MessageOrBuilder { - public static final int SRC_MAC_ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object srcMacAddress_; - /** - * string src_mac_address = 1; - * @return The srcMacAddress. - */ - @java.lang.Override - public java.lang.String getSrcMacAddress() { - java.lang.Object ref = srcMacAddress_; - 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(); - srcMacAddress_ = s; - return s; - } - } - /** - * string src_mac_address = 1; - * @return The bytes for srcMacAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSrcMacAddressBytes() { - java.lang.Object ref = srcMacAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - srcMacAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * .context.Uuid optical_link_uuid = 1; + * @return Whether the opticalLinkUuid field is set. + */ + boolean hasOpticalLinkUuid(); - public static final int DST_MAC_ADDRESS_FIELD_NUMBER = 2; - private volatile java.lang.Object dstMacAddress_; - /** - * string dst_mac_address = 2; - * @return The dstMacAddress. - */ - @java.lang.Override - public java.lang.String getDstMacAddress() { - java.lang.Object ref = dstMacAddress_; - 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(); - dstMacAddress_ = s; - return s; - } - } - /** - * string dst_mac_address = 2; - * @return The bytes for dstMacAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDstMacAddressBytes() { - java.lang.Object ref = dstMacAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dstMacAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * .context.Uuid optical_link_uuid = 1; + * @return The opticalLinkUuid. + */ + context.ContextOuterClass.Uuid getOpticalLinkUuid(); - public static final int ETHER_TYPE_FIELD_NUMBER = 3; - private int etherType_; - /** - * uint32 ether_type = 3; - * @return The etherType. - */ - @java.lang.Override - public int getEtherType() { - return etherType_; + /** + * .context.Uuid optical_link_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder(); } - public static final int VLAN_ID_FIELD_NUMBER = 4; - private int vlanId_; /** - * uint32 vlan_id = 4; - * @return The vlanId. + * Protobuf type {@code context.OpticalLinkId} */ - @java.lang.Override - public int getVlanId() { - return vlanId_; - } + public static final class OpticalLinkId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLinkId) + OpticalLinkIdOrBuilder { - public static final int MPLS_LABEL_FIELD_NUMBER = 5; - private int mplsLabel_; - /** - * uint32 mpls_label = 5; - * @return The mplsLabel. - */ - @java.lang.Override - public int getMplsLabel() { - return mplsLabel_; - } + private static final long serialVersionUID = 0L; - public static final int MPLS_TRAFFIC_CLASS_FIELD_NUMBER = 6; - private int mplsTrafficClass_; - /** - * uint32 mpls_traffic_class = 6; - * @return The mplsTrafficClass. - */ - @java.lang.Override - public int getMplsTrafficClass() { - return mplsTrafficClass_; - } + // Use OpticalLinkId.newBuilder() to construct. + private OpticalLinkId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private OpticalLinkId() { + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpticalLinkId(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSrcMacAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcMacAddress_); - } - if (!getDstMacAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstMacAddress_); - } - if (etherType_ != 0) { - output.writeUInt32(3, etherType_); - } - if (vlanId_ != 0) { - output.writeUInt32(4, vlanId_); - } - if (mplsLabel_ != 0) { - output.writeUInt32(5, mplsLabel_); - } - if (mplsTrafficClass_ != 0) { - output.writeUInt32(6, mplsTrafficClass_); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSrcMacAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcMacAddress_); - } - if (!getDstMacAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstMacAddress_); - } - if (etherType_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, etherType_); - } - if (vlanId_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, vlanId_); - } - if (mplsLabel_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, mplsLabel_); - } - if (mplsTrafficClass_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, mplsTrafficClass_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + 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(); + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L2)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionSettings_L2 other = (context.ContextOuterClass.ConnectionSettings_L2) obj; - - if (!getSrcMacAddress() - .equals(other.getSrcMacAddress())) return false; - if (!getDstMacAddress() - .equals(other.getDstMacAddress())) return false; - if (getEtherType() - != other.getEtherType()) return false; - if (getVlanId() - != other.getVlanId()) return false; - if (getMplsLabel() - != other.getMplsLabel()) return false; - if (getMplsTrafficClass() - != other.getMplsTrafficClass()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SRC_MAC_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getSrcMacAddress().hashCode(); - hash = (37 * hash) + DST_MAC_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getDstMacAddress().hashCode(); - hash = (37 * hash) + ETHER_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getEtherType(); - hash = (37 * hash) + VLAN_ID_FIELD_NUMBER; - hash = (53 * hash) + getVlanId(); - hash = (37 * hash) + MPLS_LABEL_FIELD_NUMBER; - hash = (53 * hash) + getMplsLabel(); - hash = (37 * hash) + MPLS_TRAFFIC_CLASS_FIELD_NUMBER; - hash = (53 * hash) + getMplsTrafficClass(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLinkId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkId.class, context.ContextOuterClass.OpticalLinkId.Builder.class); + } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int OPTICAL_LINK_UUID_FIELD_NUMBER = 1; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L2 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private context.ContextOuterClass.Uuid opticalLinkUuid_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionSettings_L2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L2) - context.ContextOuterClass.ConnectionSettings_L2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L2.class, context.ContextOuterClass.ConnectionSettings_L2.Builder.class); - } - - // 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(); - srcMacAddress_ = ""; - - dstMacAddress_ = ""; - - etherType_ = 0; - - vlanId_ = 0; - - mplsLabel_ = 0; - - mplsTrafficClass_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L2 getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L2 build() { - context.ContextOuterClass.ConnectionSettings_L2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionSettings_L2) { - return mergeFrom((context.ContextOuterClass.ConnectionSettings_L2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L2 other) { - if (other == context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance()) return this; - if (!other.getSrcMacAddress().isEmpty()) { - srcMacAddress_ = other.srcMacAddress_; - onChanged(); - } - if (!other.getDstMacAddress().isEmpty()) { - dstMacAddress_ = other.dstMacAddress_; - onChanged(); - } - if (other.getEtherType() != 0) { - setEtherType(other.getEtherType()); - } - if (other.getVlanId() != 0) { - setVlanId(other.getVlanId()); - } - if (other.getMplsLabel() != 0) { - setMplsLabel(other.getMplsLabel()); - } - if (other.getMplsTrafficClass() != 0) { - setMplsTrafficClass(other.getMplsTrafficClass()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings_L2) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object srcMacAddress_ = ""; - /** - * string src_mac_address = 1; - * @return The srcMacAddress. - */ - public java.lang.String getSrcMacAddress() { - java.lang.Object ref = srcMacAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - srcMacAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string src_mac_address = 1; - * @return The bytes for srcMacAddress. - */ - public com.google.protobuf.ByteString - getSrcMacAddressBytes() { - java.lang.Object ref = srcMacAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - srcMacAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string src_mac_address = 1; - * @param value The srcMacAddress to set. - * @return This builder for chaining. - */ - public Builder setSrcMacAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - srcMacAddress_ = value; - onChanged(); - return this; - } - /** - * string src_mac_address = 1; - * @return This builder for chaining. - */ - public Builder clearSrcMacAddress() { - - srcMacAddress_ = getDefaultInstance().getSrcMacAddress(); - onChanged(); - return this; - } - /** - * string src_mac_address = 1; - * @param value The bytes for srcMacAddress to set. - * @return This builder for chaining. - */ - public Builder setSrcMacAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - srcMacAddress_ = value; - onChanged(); - return this; - } - - private java.lang.Object dstMacAddress_ = ""; - /** - * string dst_mac_address = 2; - * @return The dstMacAddress. - */ - public java.lang.String getDstMacAddress() { - java.lang.Object ref = dstMacAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dstMacAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string dst_mac_address = 2; - * @return The bytes for dstMacAddress. - */ - public com.google.protobuf.ByteString - getDstMacAddressBytes() { - java.lang.Object ref = dstMacAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dstMacAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string dst_mac_address = 2; - * @param value The dstMacAddress to set. - * @return This builder for chaining. - */ - public Builder setDstMacAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dstMacAddress_ = value; - onChanged(); - return this; - } - /** - * string dst_mac_address = 2; - * @return This builder for chaining. - */ - public Builder clearDstMacAddress() { - - dstMacAddress_ = getDefaultInstance().getDstMacAddress(); - onChanged(); - return this; - } - /** - * string dst_mac_address = 2; - * @param value The bytes for dstMacAddress to set. - * @return This builder for chaining. - */ - public Builder setDstMacAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dstMacAddress_ = value; - onChanged(); - return this; - } - - private int etherType_ ; - /** - * uint32 ether_type = 3; - * @return The etherType. - */ - @java.lang.Override - public int getEtherType() { - return etherType_; - } - /** - * uint32 ether_type = 3; - * @param value The etherType to set. - * @return This builder for chaining. - */ - public Builder setEtherType(int value) { - - etherType_ = value; - onChanged(); - return this; - } - /** - * uint32 ether_type = 3; - * @return This builder for chaining. - */ - public Builder clearEtherType() { - - etherType_ = 0; - onChanged(); - return this; - } - - private int vlanId_ ; - /** - * uint32 vlan_id = 4; - * @return The vlanId. - */ - @java.lang.Override - public int getVlanId() { - return vlanId_; - } - /** - * uint32 vlan_id = 4; - * @param value The vlanId to set. - * @return This builder for chaining. - */ - public Builder setVlanId(int value) { - - vlanId_ = value; - onChanged(); - return this; - } - /** - * uint32 vlan_id = 4; - * @return This builder for chaining. - */ - public Builder clearVlanId() { - - vlanId_ = 0; - onChanged(); - return this; - } - - private int mplsLabel_ ; - /** - * uint32 mpls_label = 5; - * @return The mplsLabel. - */ - @java.lang.Override - public int getMplsLabel() { - return mplsLabel_; - } - /** - * uint32 mpls_label = 5; - * @param value The mplsLabel to set. - * @return This builder for chaining. - */ - public Builder setMplsLabel(int value) { - - mplsLabel_ = value; - onChanged(); - return this; - } - /** - * uint32 mpls_label = 5; - * @return This builder for chaining. - */ - public Builder clearMplsLabel() { - - mplsLabel_ = 0; - onChanged(); - return this; - } - - private int mplsTrafficClass_ ; - /** - * uint32 mpls_traffic_class = 6; - * @return The mplsTrafficClass. - */ - @java.lang.Override - public int getMplsTrafficClass() { - return mplsTrafficClass_; - } - /** - * uint32 mpls_traffic_class = 6; - * @param value The mplsTrafficClass to set. - * @return This builder for chaining. - */ - public Builder setMplsTrafficClass(int value) { - - mplsTrafficClass_ = value; - onChanged(); - return this; - } - /** - * uint32 mpls_traffic_class = 6; - * @return This builder for chaining. - */ - public Builder clearMplsTrafficClass() { - - mplsTrafficClass_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L2) - } + /** + * .context.Uuid optical_link_uuid = 1; + * @return Whether the opticalLinkUuid field is set. + */ + @java.lang.Override + public boolean hasOpticalLinkUuid() { + return opticalLinkUuid_ != null; + } - // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L2) - private static final context.ContextOuterClass.ConnectionSettings_L2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L2(); - } + /** + * .context.Uuid optical_link_uuid = 1; + * @return The opticalLinkUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getOpticalLinkUuid() { + return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + } - public static context.ContextOuterClass.ConnectionSettings_L2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder() { + return getOpticalLinkUuid(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (opticalLinkUuid_ != null) { + output.writeMessage(1, getOpticalLinkUuid()); + } + unknownFields.writeTo(output); + } - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (opticalLinkUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpticalLinkUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public interface ConnectionSettings_L3OrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L3) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.OpticalLinkId)) { + return super.equals(obj); + } + context.ContextOuterClass.OpticalLinkId other = (context.ContextOuterClass.OpticalLinkId) obj; + if (hasOpticalLinkUuid() != other.hasOpticalLinkUuid()) + return false; + if (hasOpticalLinkUuid()) { + if (!getOpticalLinkUuid().equals(other.getOpticalLinkUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - /** - * string src_ip_address = 1; - * @return The srcIpAddress. - */ - java.lang.String getSrcIpAddress(); - /** - * string src_ip_address = 1; - * @return The bytes for srcIpAddress. - */ - com.google.protobuf.ByteString - getSrcIpAddressBytes(); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOpticalLinkUuid()) { + hash = (37 * hash) + OPTICAL_LINK_UUID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalLinkUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * string dst_ip_address = 2; - * @return The dstIpAddress. - */ - java.lang.String getDstIpAddress(); - /** - * string dst_ip_address = 2; - * @return The bytes for dstIpAddress. - */ - com.google.protobuf.ByteString - getDstIpAddressBytes(); + public static context.ContextOuterClass.OpticalLinkId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * uint32 dscp = 3; - * @return The dscp. - */ - int getDscp(); + public static context.ContextOuterClass.OpticalLinkId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * uint32 protocol = 4; - * @return The protocol. - */ - int getProtocol(); + public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * uint32 ttl = 5; - * @return The ttl. - */ - int getTtl(); - } - /** - * Protobuf type {@code context.ConnectionSettings_L3} - */ - public static final class ConnectionSettings_L3 extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L3) - ConnectionSettings_L3OrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionSettings_L3.newBuilder() to construct. - private ConnectionSettings_L3(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionSettings_L3() { - srcIpAddress_ = ""; - dstIpAddress_ = ""; - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionSettings_L3(); - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @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; - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L3.class, context.ContextOuterClass.ConnectionSettings_L3.Builder.class); - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static final int SRC_IP_ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object srcIpAddress_; - /** - * string src_ip_address = 1; - * @return The srcIpAddress. - */ - @java.lang.Override - public java.lang.String getSrcIpAddress() { - java.lang.Object ref = srcIpAddress_; - 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(); - srcIpAddress_ = s; - return s; - } - } - /** - * string src_ip_address = 1; - * @return The bytes for srcIpAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSrcIpAddressBytes() { - java.lang.Object ref = srcIpAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - srcIpAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public static final int DST_IP_ADDRESS_FIELD_NUMBER = 2; - private volatile java.lang.Object dstIpAddress_; - /** - * string dst_ip_address = 2; - * @return The dstIpAddress. - */ - @java.lang.Override - public java.lang.String getDstIpAddress() { - java.lang.Object ref = dstIpAddress_; - 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(); - dstIpAddress_ = s; - return s; - } - } - /** - * string dst_ip_address = 2; - * @return The bytes for dstIpAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDstIpAddressBytes() { - java.lang.Object ref = dstIpAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dstIpAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static context.ContextOuterClass.OpticalLinkId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - public static final int DSCP_FIELD_NUMBER = 3; - private int dscp_; - /** - * uint32 dscp = 3; - * @return The dscp. - */ - @java.lang.Override - public int getDscp() { - return dscp_; - } + public static context.ContextOuterClass.OpticalLinkId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - public static final int PROTOCOL_FIELD_NUMBER = 4; - private int protocol_; - /** - * uint32 protocol = 4; - * @return The protocol. - */ - @java.lang.Override - public int getProtocol() { - return protocol_; - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static final int TTL_FIELD_NUMBER = 5; - private int ttl_; - /** - * uint32 ttl = 5; - * @return The ttl. - */ - @java.lang.Override - public int getTtl() { - return ttl_; - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - memoizedIsInitialized = 1; - return true; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSrcIpAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcIpAddress_); - } - if (!getDstIpAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstIpAddress_); - } - if (dscp_ != 0) { - output.writeUInt32(3, dscp_); - } - if (protocol_ != 0) { - output.writeUInt32(4, protocol_); - } - if (ttl_ != 0) { - output.writeUInt32(5, ttl_); - } - unknownFields.writeTo(output); - } + public static Builder newBuilder(context.ContextOuterClass.OpticalLinkId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSrcIpAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcIpAddress_); - } - if (!getDstIpAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstIpAddress_); - } - if (dscp_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, dscp_); - } - if (protocol_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, protocol_); - } - if (ttl_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, ttl_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L3)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionSettings_L3 other = (context.ContextOuterClass.ConnectionSettings_L3) obj; - - if (!getSrcIpAddress() - .equals(other.getSrcIpAddress())) return false; - if (!getDstIpAddress() - .equals(other.getDstIpAddress())) return false; - if (getDscp() - != other.getDscp()) return false; - if (getProtocol() - != other.getProtocol()) return false; - if (getTtl() - != other.getTtl()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SRC_IP_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getSrcIpAddress().hashCode(); - hash = (37 * hash) + DST_IP_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getDstIpAddress().hashCode(); - hash = (37 * hash) + DSCP_FIELD_NUMBER; - hash = (53 * hash) + getDscp(); - hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; - hash = (53 * hash) + getProtocol(); - hash = (37 * hash) + TTL_FIELD_NUMBER; - hash = (53 * hash) + getTtl(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * Protobuf type {@code context.OpticalLinkId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLinkId) + context.ContextOuterClass.OpticalLinkIdOrBuilder { - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L3 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLinkId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkId.class, context.ContextOuterClass.OpticalLinkId.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionSettings_L3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L3) - context.ContextOuterClass.ConnectionSettings_L3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L3.class, context.ContextOuterClass.ConnectionSettings_L3.Builder.class); - } - - // 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(); - srcIpAddress_ = ""; - - dstIpAddress_ = ""; - - dscp_ = 0; - - protocol_ = 0; - - ttl_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L3 getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L3 build() { - context.ContextOuterClass.ConnectionSettings_L3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionSettings_L3) { - return mergeFrom((context.ContextOuterClass.ConnectionSettings_L3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L3 other) { - if (other == context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance()) return this; - if (!other.getSrcIpAddress().isEmpty()) { - srcIpAddress_ = other.srcIpAddress_; - onChanged(); - } - if (!other.getDstIpAddress().isEmpty()) { - dstIpAddress_ = other.dstIpAddress_; - onChanged(); - } - if (other.getDscp() != 0) { - setDscp(other.getDscp()); - } - if (other.getProtocol() != 0) { - setProtocol(other.getProtocol()); - } - if (other.getTtl() != 0) { - setTtl(other.getTtl()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings_L3) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object srcIpAddress_ = ""; - /** - * string src_ip_address = 1; - * @return The srcIpAddress. - */ - public java.lang.String getSrcIpAddress() { - java.lang.Object ref = srcIpAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - srcIpAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string src_ip_address = 1; - * @return The bytes for srcIpAddress. - */ - public com.google.protobuf.ByteString - getSrcIpAddressBytes() { - java.lang.Object ref = srcIpAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - srcIpAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string src_ip_address = 1; - * @param value The srcIpAddress to set. - * @return This builder for chaining. - */ - public Builder setSrcIpAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - srcIpAddress_ = value; - onChanged(); - return this; - } - /** - * string src_ip_address = 1; - * @return This builder for chaining. - */ - public Builder clearSrcIpAddress() { - - srcIpAddress_ = getDefaultInstance().getSrcIpAddress(); - onChanged(); - return this; - } - /** - * string src_ip_address = 1; - * @param value The bytes for srcIpAddress to set. - * @return This builder for chaining. - */ - public Builder setSrcIpAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - srcIpAddress_ = value; - onChanged(); - return this; - } - - private java.lang.Object dstIpAddress_ = ""; - /** - * string dst_ip_address = 2; - * @return The dstIpAddress. - */ - public java.lang.String getDstIpAddress() { - java.lang.Object ref = dstIpAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dstIpAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string dst_ip_address = 2; - * @return The bytes for dstIpAddress. - */ - public com.google.protobuf.ByteString - getDstIpAddressBytes() { - java.lang.Object ref = dstIpAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dstIpAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string dst_ip_address = 2; - * @param value The dstIpAddress to set. - * @return This builder for chaining. - */ - public Builder setDstIpAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dstIpAddress_ = value; - onChanged(); - return this; - } - /** - * string dst_ip_address = 2; - * @return This builder for chaining. - */ - public Builder clearDstIpAddress() { - - dstIpAddress_ = getDefaultInstance().getDstIpAddress(); - onChanged(); - return this; - } - /** - * string dst_ip_address = 2; - * @param value The bytes for dstIpAddress to set. - * @return This builder for chaining. - */ - public Builder setDstIpAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dstIpAddress_ = value; - onChanged(); - return this; - } - - private int dscp_ ; - /** - * uint32 dscp = 3; - * @return The dscp. - */ - @java.lang.Override - public int getDscp() { - return dscp_; - } - /** - * uint32 dscp = 3; - * @param value The dscp to set. - * @return This builder for chaining. - */ - public Builder setDscp(int value) { - - dscp_ = value; - onChanged(); - return this; - } - /** - * uint32 dscp = 3; - * @return This builder for chaining. - */ - public Builder clearDscp() { - - dscp_ = 0; - onChanged(); - return this; - } - - private int protocol_ ; - /** - * uint32 protocol = 4; - * @return The protocol. - */ - @java.lang.Override - public int getProtocol() { - return protocol_; - } - /** - * uint32 protocol = 4; - * @param value The protocol to set. - * @return This builder for chaining. - */ - public Builder setProtocol(int value) { - - protocol_ = value; - onChanged(); - return this; - } - /** - * uint32 protocol = 4; - * @return This builder for chaining. - */ - public Builder clearProtocol() { - - protocol_ = 0; - onChanged(); - return this; - } - - private int ttl_ ; - /** - * uint32 ttl = 5; - * @return The ttl. - */ - @java.lang.Override - public int getTtl() { - return ttl_; - } - /** - * uint32 ttl = 5; - * @param value The ttl to set. - * @return This builder for chaining. - */ - public Builder setTtl(int value) { - - ttl_ = value; - onChanged(); - return this; - } - /** - * uint32 ttl = 5; - * @return This builder for chaining. - */ - public Builder clearTtl() { - - ttl_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L3) - } + // Construct using context.ContextOuterClass.OpticalLinkId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L3) - private static final context.ContextOuterClass.ConnectionSettings_L3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L3(); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public static context.ContextOuterClass.ConnectionSettings_L3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuid_ = null; + } else { + opticalLinkUuid_ = null; + opticalLinkUuidBuilder_ = null; + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; + } - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public context.ContextOuterClass.OpticalLinkId getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalLinkId.getDefaultInstance(); + } - } + @java.lang.Override + public context.ContextOuterClass.OpticalLinkId build() { + context.ContextOuterClass.OpticalLinkId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public interface ConnectionSettings_L4OrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L4) - com.google.protobuf.MessageOrBuilder { + @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(); + } + onBuilt(); + return result; + } - /** - * uint32 src_port = 1; - * @return The srcPort. - */ - int getSrcPort(); + @java.lang.Override + public Builder clone() { + return super.clone(); + } - /** - * uint32 dst_port = 2; - * @return The dstPort. - */ - int getDstPort(); + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - /** - * uint32 tcp_flags = 3; - * @return The tcpFlags. - */ - int getTcpFlags(); + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - /** - * uint32 ttl = 4; - * @return The ttl. - */ - int getTtl(); - } - /** - * Protobuf type {@code context.ConnectionSettings_L4} - */ - public static final class ConnectionSettings_L4 extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L4) - ConnectionSettings_L4OrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionSettings_L4.newBuilder() to construct. - private ConnectionSettings_L4(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionSettings_L4() { - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionSettings_L4(); - } + @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 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; - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L4.class, context.ContextOuterClass.ConnectionSettings_L4.Builder.class); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalLinkId) { + return mergeFrom((context.ContextOuterClass.OpticalLinkId) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static final int SRC_PORT_FIELD_NUMBER = 1; - private int srcPort_; - /** - * uint32 src_port = 1; - * @return The srcPort. - */ - @java.lang.Override - public int getSrcPort() { - return srcPort_; - } + public Builder mergeFrom(context.ContextOuterClass.OpticalLinkId other) { + if (other == context.ContextOuterClass.OpticalLinkId.getDefaultInstance()) + return this; + if (other.hasOpticalLinkUuid()) { + mergeOpticalLinkUuid(other.getOpticalLinkUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - public static final int DST_PORT_FIELD_NUMBER = 2; - private int dstPort_; - /** - * uint32 dst_port = 2; - * @return The dstPort. - */ - @java.lang.Override - public int getDstPort() { - return dstPort_; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static final int TCP_FLAGS_FIELD_NUMBER = 3; - private int tcpFlags_; - /** - * uint32 tcp_flags = 3; - * @return The tcpFlags. - */ - @java.lang.Override - public int getTcpFlags() { - return tcpFlags_; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.OpticalLinkId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - public static final int TTL_FIELD_NUMBER = 4; - private int ttl_; - /** - * uint32 ttl = 4; - * @return The ttl. - */ - @java.lang.Override - public int getTtl() { - return ttl_; - } + private context.ContextOuterClass.Uuid opticalLinkUuid_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private com.google.protobuf.SingleFieldBuilderV3 opticalLinkUuidBuilder_; - memoizedIsInitialized = 1; - return true; - } + /** + * .context.Uuid optical_link_uuid = 1; + * @return Whether the opticalLinkUuid field is set. + */ + public boolean hasOpticalLinkUuid() { + return opticalLinkUuidBuilder_ != null || opticalLinkUuid_ != null; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (srcPort_ != 0) { - output.writeUInt32(1, srcPort_); - } - if (dstPort_ != 0) { - output.writeUInt32(2, dstPort_); - } - if (tcpFlags_ != 0) { - output.writeUInt32(3, tcpFlags_); - } - if (ttl_ != 0) { - output.writeUInt32(4, ttl_); - } - unknownFields.writeTo(output); - } + /** + * .context.Uuid optical_link_uuid = 1; + * @return The opticalLinkUuid. + */ + public context.ContextOuterClass.Uuid getOpticalLinkUuid() { + if (opticalLinkUuidBuilder_ == null) { + return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + } else { + return opticalLinkUuidBuilder_.getMessage(); + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (srcPort_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, srcPort_); - } - if (dstPort_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, dstPort_); - } - if (tcpFlags_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, tcpFlags_); - } - if (ttl_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, ttl_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + public Builder setOpticalLinkUuid(context.ContextOuterClass.Uuid value) { + if (opticalLinkUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + opticalLinkUuid_ = value; + onChanged(); + } else { + opticalLinkUuidBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L4)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionSettings_L4 other = (context.ContextOuterClass.ConnectionSettings_L4) obj; - - if (getSrcPort() - != other.getSrcPort()) return false; - if (getDstPort() - != other.getDstPort()) return false; - if (getTcpFlags() - != other.getTcpFlags()) return false; - if (getTtl() - != other.getTtl()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + public Builder setOpticalLinkUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuid_ = builderForValue.build(); + onChanged(); + } else { + opticalLinkUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SRC_PORT_FIELD_NUMBER; - hash = (53 * hash) + getSrcPort(); - hash = (37 * hash) + DST_PORT_FIELD_NUMBER; - hash = (53 * hash) + getDstPort(); - hash = (37 * hash) + TCP_FLAGS_FIELD_NUMBER; - hash = (53 * hash) + getTcpFlags(); - hash = (37 * hash) + TTL_FIELD_NUMBER; - hash = (53 * hash) + getTtl(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + public Builder mergeOpticalLinkUuid(context.ContextOuterClass.Uuid value) { + if (opticalLinkUuidBuilder_ == null) { + if (opticalLinkUuid_ != null) { + opticalLinkUuid_ = context.ContextOuterClass.Uuid.newBuilder(opticalLinkUuid_).mergeFrom(value).buildPartial(); + } else { + opticalLinkUuid_ = value; + } + onChanged(); + } else { + opticalLinkUuidBuilder_.mergeFrom(value); + } + return this; + } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + public Builder clearOpticalLinkUuid() { + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuid_ = null; + onChanged(); + } else { + opticalLinkUuid_ = null; + opticalLinkUuidBuilder_ = null; + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L4 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getOpticalLinkUuidBuilder() { + onChanged(); + return getOpticalLinkUuidFieldBuilder().getBuilder(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionSettings_L4} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L4) - context.ContextOuterClass.ConnectionSettings_L4OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L4.class, context.ContextOuterClass.ConnectionSettings_L4.Builder.class); - } - - // 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(); - srcPort_ = 0; - - dstPort_ = 0; - - tcpFlags_ = 0; - - ttl_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L4 getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L4 build() { - context.ContextOuterClass.ConnectionSettings_L4 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionSettings_L4) { - return mergeFrom((context.ContextOuterClass.ConnectionSettings_L4)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L4 other) { - if (other == context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance()) return this; - if (other.getSrcPort() != 0) { - setSrcPort(other.getSrcPort()); - } - if (other.getDstPort() != 0) { - setDstPort(other.getDstPort()); - } - if (other.getTcpFlags() != 0) { - setTcpFlags(other.getTcpFlags()); - } - if (other.getTtl() != 0) { - setTtl(other.getTtl()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings_L4) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int srcPort_ ; - /** - * uint32 src_port = 1; - * @return The srcPort. - */ - @java.lang.Override - public int getSrcPort() { - return srcPort_; - } - /** - * uint32 src_port = 1; - * @param value The srcPort to set. - * @return This builder for chaining. - */ - public Builder setSrcPort(int value) { - - srcPort_ = value; - onChanged(); - return this; - } - /** - * uint32 src_port = 1; - * @return This builder for chaining. - */ - public Builder clearSrcPort() { - - srcPort_ = 0; - onChanged(); - return this; - } - - private int dstPort_ ; - /** - * uint32 dst_port = 2; - * @return The dstPort. - */ - @java.lang.Override - public int getDstPort() { - return dstPort_; - } - /** - * uint32 dst_port = 2; - * @param value The dstPort to set. - * @return This builder for chaining. - */ - public Builder setDstPort(int value) { - - dstPort_ = value; - onChanged(); - return this; - } - /** - * uint32 dst_port = 2; - * @return This builder for chaining. - */ - public Builder clearDstPort() { - - dstPort_ = 0; - onChanged(); - return this; - } - - private int tcpFlags_ ; - /** - * uint32 tcp_flags = 3; - * @return The tcpFlags. - */ - @java.lang.Override - public int getTcpFlags() { - return tcpFlags_; - } - /** - * uint32 tcp_flags = 3; - * @param value The tcpFlags to set. - * @return This builder for chaining. - */ - public Builder setTcpFlags(int value) { - - tcpFlags_ = value; - onChanged(); - return this; - } - /** - * uint32 tcp_flags = 3; - * @return This builder for chaining. - */ - public Builder clearTcpFlags() { - - tcpFlags_ = 0; - onChanged(); - return this; - } - - private int ttl_ ; - /** - * uint32 ttl = 4; - * @return The ttl. - */ - @java.lang.Override - public int getTtl() { - return ttl_; - } - /** - * uint32 ttl = 4; - * @param value The ttl to set. - * @return This builder for chaining. - */ - public Builder setTtl(int value) { - - ttl_ = value; - onChanged(); - return this; - } - /** - * uint32 ttl = 4; - * @return This builder for chaining. - */ - public Builder clearTtl() { - - ttl_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L4) - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder() { + if (opticalLinkUuidBuilder_ != null) { + return opticalLinkUuidBuilder_.getMessageOrBuilder(); + } else { + return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + } + } - // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L4) - private static final context.ContextOuterClass.ConnectionSettings_L4 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L4(); - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getOpticalLinkUuidFieldBuilder() { + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalLinkUuid(), getParentForChildren(), isClean()); + opticalLinkUuid_ = null; + } + return opticalLinkUuidBuilder_; + } - public static context.ContextOuterClass.ConnectionSettings_L4 getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.OpticalLinkId) + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + // @@protoc_insertion_point(class_scope:context.OpticalLinkId) + private static final context.ContextOuterClass.OpticalLinkId DEFAULT_INSTANCE; - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L4 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLinkId(); + } - } + public static context.ContextOuterClass.OpticalLinkId getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public interface ConnectionSettingsOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionSettings) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - /** - * .context.ConnectionSettings_L0 l0 = 1; - * @return Whether the l0 field is set. - */ - boolean hasL0(); - /** - * .context.ConnectionSettings_L0 l0 = 1; - * @return The l0. - */ - context.ContextOuterClass.ConnectionSettings_L0 getL0(); - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder(); + @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); + } + }; - /** - * .context.ConnectionSettings_L2 l2 = 2; - * @return Whether the l2 field is set. - */ - boolean hasL2(); - /** - * .context.ConnectionSettings_L2 l2 = 2; - * @return The l2. - */ - context.ContextOuterClass.ConnectionSettings_L2 getL2(); - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder(); + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * .context.ConnectionSettings_L3 l3 = 3; - * @return Whether the l3 field is set. - */ - boolean hasL3(); - /** - * .context.ConnectionSettings_L3 l3 = 3; - * @return The l3. - */ - context.ContextOuterClass.ConnectionSettings_L3 getL3(); - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder(); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * .context.ConnectionSettings_L4 l4 = 4; - * @return Whether the l4 field is set. - */ - boolean hasL4(); - /** - * .context.ConnectionSettings_L4 l4 = 4; - * @return The l4. - */ - context.ContextOuterClass.ConnectionSettings_L4 getL4(); - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder(); - } - /** - * Protobuf type {@code context.ConnectionSettings} - */ - public static final class ConnectionSettings extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionSettings) - ConnectionSettingsOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionSettings.newBuilder() to construct. - private ConnectionSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionSettings() { + @java.lang.Override + public context.ContextOuterClass.OpticalLinkId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionSettings(); - } + public interface FiberIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.FiberId) + com.google.protobuf.MessageOrBuilder { - @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; - } + /** + * .context.Uuid fiber_uuid = 1; + * @return Whether the fiberUuid field is set. + */ + boolean hasFiberUuid(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings.class, context.ContextOuterClass.ConnectionSettings.Builder.class); - } + /** + * .context.Uuid fiber_uuid = 1; + * @return The fiberUuid. + */ + context.ContextOuterClass.Uuid getFiberUuid(); - public static final int L0_FIELD_NUMBER = 1; - private context.ContextOuterClass.ConnectionSettings_L0 l0_; - /** - * .context.ConnectionSettings_L0 l0 = 1; - * @return Whether the l0 field is set. - */ - @java.lang.Override - public boolean hasL0() { - return l0_ != null; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - * @return The l0. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L0 getL0() { - return l0_ == null ? context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder() { - return getL0(); + /** + * .context.Uuid fiber_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder(); } - public static final int L2_FIELD_NUMBER = 2; - private context.ContextOuterClass.ConnectionSettings_L2 l2_; - /** - * .context.ConnectionSettings_L2 l2 = 2; - * @return Whether the l2 field is set. - */ - @java.lang.Override - public boolean hasL2() { - return l2_ != null; - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - * @return The l2. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L2 getL2() { - return l2_ == null ? context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; - } /** - * .context.ConnectionSettings_L2 l2 = 2; + * Protobuf type {@code context.FiberId} */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder() { - return getL2(); - } + public static final class FiberId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.FiberId) + FiberIdOrBuilder { - public static final int L3_FIELD_NUMBER = 3; - private context.ContextOuterClass.ConnectionSettings_L3 l3_; - /** - * .context.ConnectionSettings_L3 l3 = 3; - * @return Whether the l3 field is set. - */ - @java.lang.Override - public boolean hasL3() { - return l3_ != null; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - * @return The l3. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L3 getL3() { - return l3_ == null ? context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder() { - return getL3(); - } + private static final long serialVersionUID = 0L; - public static final int L4_FIELD_NUMBER = 4; - private context.ContextOuterClass.ConnectionSettings_L4 l4_; - /** - * .context.ConnectionSettings_L4 l4 = 4; - * @return Whether the l4 field is set. - */ - @java.lang.Override - public boolean hasL4() { - return l4_ != null; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - * @return The l4. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L4 getL4() { - return l4_ == null ? context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder() { - return getL4(); - } + // Use FiberId.newBuilder() to construct. + private FiberId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private FiberId() { + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FiberId(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (l0_ != null) { - output.writeMessage(1, getL0()); - } - if (l2_ != null) { - output.writeMessage(2, getL2()); - } - if (l3_ != null) { - output.writeMessage(3, getL3()); - } - if (l4_ != null) { - output.writeMessage(4, getL4()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (l0_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getL0()); - } - if (l2_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getL2()); - } - if (l3_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getL3()); - } - if (l4_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getL4()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + 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(); + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionSettings)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionSettings other = (context.ContextOuterClass.ConnectionSettings) obj; - - if (hasL0() != other.hasL0()) return false; - if (hasL0()) { - if (!getL0() - .equals(other.getL0())) return false; - } - if (hasL2() != other.hasL2()) return false; - if (hasL2()) { - if (!getL2() - .equals(other.getL2())) return false; - } - if (hasL3() != other.hasL3()) return false; - if (hasL3()) { - if (!getL3() - .equals(other.getL3())) return false; - } - if (hasL4() != other.hasL4()) return false; - if (hasL4()) { - if (!getL4() - .equals(other.getL4())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_FiberId_descriptor; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasL0()) { - hash = (37 * hash) + L0_FIELD_NUMBER; - hash = (53 * hash) + getL0().hashCode(); - } - if (hasL2()) { - hash = (37 * hash) + L2_FIELD_NUMBER; - hash = (53 * hash) + getL2().hashCode(); - } - if (hasL3()) { - hash = (37 * hash) + L3_FIELD_NUMBER; - hash = (53 * hash) + getL3().hashCode(); - } - if (hasL4()) { - hash = (37 * hash) + L4_FIELD_NUMBER; - hash = (53 * hash) + getL4().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_FiberId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.FiberId.class, context.ContextOuterClass.FiberId.Builder.class); + } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int FIBER_UUID_FIELD_NUMBER = 1; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private context.ContextOuterClass.Uuid fiberUuid_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionSettings} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionSettings) - context.ContextOuterClass.ConnectionSettingsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings.class, context.ContextOuterClass.ConnectionSettings.Builder.class); - } - - // 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; - l0Builder_ = null; - } - if (l2Builder_ == null) { - l2_ = null; - } else { - l2_ = null; - l2Builder_ = null; - } - if (l3Builder_ == null) { - l3_ = null; - } else { - l3_ = null; - l3Builder_ = null; - } - if (l4Builder_ == null) { - l4_ = null; - } else { - l4_ = null; - l4Builder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionSettings.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings build() { - context.ContextOuterClass.ConnectionSettings result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionSettings) { - return mergeFrom((context.ContextOuterClass.ConnectionSettings)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings other) { - if (other == context.ContextOuterClass.ConnectionSettings.getDefaultInstance()) return this; - if (other.hasL0()) { - mergeL0(other.getL0()); - } - if (other.hasL2()) { - mergeL2(other.getL2()); - } - if (other.hasL3()) { - mergeL3(other.getL3()); - } - if (other.hasL4()) { - mergeL4(other.getL4()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - 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_; - /** - * .context.ConnectionSettings_L0 l0 = 1; - * @return Whether the l0 field is set. - */ - public boolean hasL0() { - return l0Builder_ != null || l0_ != null; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - * @return The l0. - */ - public context.ContextOuterClass.ConnectionSettings_L0 getL0() { - if (l0Builder_ == null) { - return l0_ == null ? context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; - } else { - return l0Builder_.getMessage(); - } - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - public Builder setL0(context.ContextOuterClass.ConnectionSettings_L0 value) { - if (l0Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - l0_ = value; - onChanged(); - } else { - l0Builder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - public Builder setL0( - context.ContextOuterClass.ConnectionSettings_L0.Builder builderForValue) { - if (l0Builder_ == null) { - l0_ = builderForValue.build(); - onChanged(); - } else { - l0Builder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - public Builder mergeL0(context.ContextOuterClass.ConnectionSettings_L0 value) { - if (l0Builder_ == null) { - if (l0_ != null) { - l0_ = - context.ContextOuterClass.ConnectionSettings_L0.newBuilder(l0_).mergeFrom(value).buildPartial(); - } else { - l0_ = value; - } - onChanged(); - } else { - l0Builder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - public Builder clearL0() { - if (l0Builder_ == null) { - l0_ = null; - onChanged(); - } else { - l0_ = null; - l0Builder_ = null; - } - - return this; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - public context.ContextOuterClass.ConnectionSettings_L0.Builder getL0Builder() { - - onChanged(); - return getL0FieldBuilder().getBuilder(); - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - public context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder() { - if (l0Builder_ != null) { - return l0Builder_.getMessageOrBuilder(); - } else { - return l0_ == null ? - context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; - } - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L0, context.ContextOuterClass.ConnectionSettings_L0.Builder, context.ContextOuterClass.ConnectionSettings_L0OrBuilder> - getL0FieldBuilder() { - if (l0Builder_ == null) { - l0Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L0, context.ContextOuterClass.ConnectionSettings_L0.Builder, context.ContextOuterClass.ConnectionSettings_L0OrBuilder>( - getL0(), - getParentForChildren(), - isClean()); - l0_ = null; - } - return l0Builder_; - } - - private context.ContextOuterClass.ConnectionSettings_L2 l2_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L2, context.ContextOuterClass.ConnectionSettings_L2.Builder, context.ContextOuterClass.ConnectionSettings_L2OrBuilder> l2Builder_; - /** - * .context.ConnectionSettings_L2 l2 = 2; - * @return Whether the l2 field is set. - */ - public boolean hasL2() { - return l2Builder_ != null || l2_ != null; - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - * @return The l2. - */ - public context.ContextOuterClass.ConnectionSettings_L2 getL2() { - if (l2Builder_ == null) { - return l2_ == null ? context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; - } else { - return l2Builder_.getMessage(); - } - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - public Builder setL2(context.ContextOuterClass.ConnectionSettings_L2 value) { - if (l2Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - l2_ = value; - onChanged(); - } else { - l2Builder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - public Builder setL2( - context.ContextOuterClass.ConnectionSettings_L2.Builder builderForValue) { - if (l2Builder_ == null) { - l2_ = builderForValue.build(); - onChanged(); - } else { - l2Builder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - public Builder mergeL2(context.ContextOuterClass.ConnectionSettings_L2 value) { - if (l2Builder_ == null) { - if (l2_ != null) { - l2_ = - context.ContextOuterClass.ConnectionSettings_L2.newBuilder(l2_).mergeFrom(value).buildPartial(); - } else { - l2_ = value; - } - onChanged(); - } else { - l2Builder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - public Builder clearL2() { - if (l2Builder_ == null) { - l2_ = null; - onChanged(); - } else { - l2_ = null; - l2Builder_ = null; - } - - return this; - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - public context.ContextOuterClass.ConnectionSettings_L2.Builder getL2Builder() { - - onChanged(); - return getL2FieldBuilder().getBuilder(); - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - public context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder() { - if (l2Builder_ != null) { - return l2Builder_.getMessageOrBuilder(); - } else { - return l2_ == null ? - context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; - } - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L2, context.ContextOuterClass.ConnectionSettings_L2.Builder, context.ContextOuterClass.ConnectionSettings_L2OrBuilder> - getL2FieldBuilder() { - if (l2Builder_ == null) { - l2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L2, context.ContextOuterClass.ConnectionSettings_L2.Builder, context.ContextOuterClass.ConnectionSettings_L2OrBuilder>( - getL2(), - getParentForChildren(), - isClean()); - l2_ = null; - } - return l2Builder_; - } - - private context.ContextOuterClass.ConnectionSettings_L3 l3_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L3, context.ContextOuterClass.ConnectionSettings_L3.Builder, context.ContextOuterClass.ConnectionSettings_L3OrBuilder> l3Builder_; - /** - * .context.ConnectionSettings_L3 l3 = 3; - * @return Whether the l3 field is set. - */ - public boolean hasL3() { - return l3Builder_ != null || l3_ != null; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - * @return The l3. - */ - public context.ContextOuterClass.ConnectionSettings_L3 getL3() { - if (l3Builder_ == null) { - return l3_ == null ? context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; - } else { - return l3Builder_.getMessage(); - } - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - public Builder setL3(context.ContextOuterClass.ConnectionSettings_L3 value) { - if (l3Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - l3_ = value; - onChanged(); - } else { - l3Builder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - public Builder setL3( - context.ContextOuterClass.ConnectionSettings_L3.Builder builderForValue) { - if (l3Builder_ == null) { - l3_ = builderForValue.build(); - onChanged(); - } else { - l3Builder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - public Builder mergeL3(context.ContextOuterClass.ConnectionSettings_L3 value) { - if (l3Builder_ == null) { - if (l3_ != null) { - l3_ = - context.ContextOuterClass.ConnectionSettings_L3.newBuilder(l3_).mergeFrom(value).buildPartial(); - } else { - l3_ = value; - } - onChanged(); - } else { - l3Builder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - public Builder clearL3() { - if (l3Builder_ == null) { - l3_ = null; - onChanged(); - } else { - l3_ = null; - l3Builder_ = null; - } - - return this; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - public context.ContextOuterClass.ConnectionSettings_L3.Builder getL3Builder() { - - onChanged(); - return getL3FieldBuilder().getBuilder(); - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - public context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder() { - if (l3Builder_ != null) { - return l3Builder_.getMessageOrBuilder(); - } else { - return l3_ == null ? - context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; - } - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L3, context.ContextOuterClass.ConnectionSettings_L3.Builder, context.ContextOuterClass.ConnectionSettings_L3OrBuilder> - getL3FieldBuilder() { - if (l3Builder_ == null) { - l3Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L3, context.ContextOuterClass.ConnectionSettings_L3.Builder, context.ContextOuterClass.ConnectionSettings_L3OrBuilder>( - getL3(), - getParentForChildren(), - isClean()); - l3_ = null; - } - return l3Builder_; - } - - private context.ContextOuterClass.ConnectionSettings_L4 l4_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L4, context.ContextOuterClass.ConnectionSettings_L4.Builder, context.ContextOuterClass.ConnectionSettings_L4OrBuilder> l4Builder_; - /** - * .context.ConnectionSettings_L4 l4 = 4; - * @return Whether the l4 field is set. - */ - public boolean hasL4() { - return l4Builder_ != null || l4_ != null; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - * @return The l4. - */ - public context.ContextOuterClass.ConnectionSettings_L4 getL4() { - if (l4Builder_ == null) { - return l4_ == null ? context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; - } else { - return l4Builder_.getMessage(); - } - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - public Builder setL4(context.ContextOuterClass.ConnectionSettings_L4 value) { - if (l4Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - l4_ = value; - onChanged(); - } else { - l4Builder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - public Builder setL4( - context.ContextOuterClass.ConnectionSettings_L4.Builder builderForValue) { - if (l4Builder_ == null) { - l4_ = builderForValue.build(); - onChanged(); - } else { - l4Builder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - public Builder mergeL4(context.ContextOuterClass.ConnectionSettings_L4 value) { - if (l4Builder_ == null) { - if (l4_ != null) { - l4_ = - context.ContextOuterClass.ConnectionSettings_L4.newBuilder(l4_).mergeFrom(value).buildPartial(); - } else { - l4_ = value; - } - onChanged(); - } else { - l4Builder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - public Builder clearL4() { - if (l4Builder_ == null) { - l4_ = null; - onChanged(); - } else { - l4_ = null; - l4Builder_ = null; - } - - return this; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - public context.ContextOuterClass.ConnectionSettings_L4.Builder getL4Builder() { - - onChanged(); - return getL4FieldBuilder().getBuilder(); - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - public context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder() { - if (l4Builder_ != null) { - return l4Builder_.getMessageOrBuilder(); - } else { - return l4_ == null ? - context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; - } - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L4, context.ContextOuterClass.ConnectionSettings_L4.Builder, context.ContextOuterClass.ConnectionSettings_L4OrBuilder> - getL4FieldBuilder() { - if (l4Builder_ == null) { - l4Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L4, context.ContextOuterClass.ConnectionSettings_L4.Builder, context.ContextOuterClass.ConnectionSettings_L4OrBuilder>( - getL4(), - getParentForChildren(), - isClean()); - l4_ = null; - } - return l4Builder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionSettings) - } + /** + * .context.Uuid fiber_uuid = 1; + * @return Whether the fiberUuid field is set. + */ + @java.lang.Override + public boolean hasFiberUuid() { + return fiberUuid_ != null; + } - // @@protoc_insertion_point(class_scope:context.ConnectionSettings) - private static final context.ContextOuterClass.ConnectionSettings DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings(); - } + /** + * .context.Uuid fiber_uuid = 1; + * @return The fiberUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getFiberUuid() { + return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + } - public static context.ContextOuterClass.ConnectionSettings getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid fiber_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder() { + return getFiberUuid(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (fiberUuid_ != null) { + output.writeMessage(1, getFiberUuid()); + } + unknownFields.writeTo(output); + } - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (fiberUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFiberUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public interface ConnectionOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Connection) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.FiberId)) { + return super.equals(obj); + } + context.ContextOuterClass.FiberId other = (context.ContextOuterClass.FiberId) obj; + if (hasFiberUuid() != other.hasFiberUuid()) + return false; + if (hasFiberUuid()) { + if (!getFiberUuid().equals(other.getFiberUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - /** - * .context.ConnectionId connection_id = 1; - * @return Whether the connectionId field is set. - */ - boolean hasConnectionId(); - /** - * .context.ConnectionId connection_id = 1; - * @return The connectionId. - */ - context.ContextOuterClass.ConnectionId getConnectionId(); - /** - * .context.ConnectionId connection_id = 1; - */ - context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFiberUuid()) { + hash = (37 * hash) + FIBER_UUID_FIELD_NUMBER; + hash = (53 * hash) + getFiberUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * .context.ServiceId service_id = 2; - * @return Whether the serviceId field is set. - */ - boolean hasServiceId(); - /** - * .context.ServiceId service_id = 2; - * @return The serviceId. - */ - context.ContextOuterClass.ServiceId getServiceId(); - /** - * .context.ServiceId service_id = 2; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + public static context.ContextOuterClass.FiberId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - java.util.List - getPathHopsEndpointIdsList(); - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointId getPathHopsEndpointIds(int index); - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - int getPathHopsEndpointIdsCount(); - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - java.util.List - getPathHopsEndpointIdsOrBuilderList(); - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointIdOrBuilder getPathHopsEndpointIdsOrBuilder( - int index); + public static context.ContextOuterClass.FiberId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - java.util.List - getSubServiceIdsList(); - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - context.ContextOuterClass.ServiceId getSubServiceIds(int index); - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - int getSubServiceIdsCount(); - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - java.util.List - getSubServiceIdsOrBuilderList(); - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - context.ContextOuterClass.ServiceIdOrBuilder getSubServiceIdsOrBuilder( - int index); + public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * .context.ConnectionSettings settings = 5; - * @return Whether the settings field is set. - */ - boolean hasSettings(); - /** - * .context.ConnectionSettings settings = 5; - * @return The settings. - */ - context.ContextOuterClass.ConnectionSettings getSettings(); - /** - * .context.ConnectionSettings settings = 5; - */ - context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder(); - } - /** - * Protobuf type {@code context.Connection} - */ - public static final class Connection extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Connection) - ConnectionOrBuilder { - private static final long serialVersionUID = 0L; - // Use Connection.newBuilder() to construct. - private Connection(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Connection() { - pathHopsEndpointIds_ = java.util.Collections.emptyList(); - subServiceIds_ = java.util.Collections.emptyList(); - } + public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Connection(); - } + public static context.ContextOuterClass.FiberId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @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(); - 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(); - 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; - } + public static context.ContextOuterClass.FiberId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Connection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Connection.class, context.ContextOuterClass.Connection.Builder.class); - } + public static context.ContextOuterClass.FiberId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.FiberId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.FiberId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - public static final int CONNECTION_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ConnectionId connectionId_; - /** - * .context.ConnectionId connection_id = 1; - * @return Whether the connectionId field is set. - */ - @java.lang.Override - public boolean hasConnectionId() { - return connectionId_ != null; - } - /** - * .context.ConnectionId connection_id = 1; - * @return The connectionId. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionId getConnectionId() { - return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } - /** - * .context.ConnectionId connection_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - return getConnectionId(); - } + public static context.ContextOuterClass.FiberId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - public static final int SERVICE_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.ServiceId serviceId_; - /** - * .context.ServiceId service_id = 2; - * @return Whether the serviceId field is set. - */ - @java.lang.Override - public boolean hasServiceId() { - return serviceId_ != null; - } - /** - * .context.ServiceId service_id = 2; - * @return The serviceId. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceId() { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - /** - * .context.ServiceId service_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); - } + public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static final int PATH_HOPS_ENDPOINT_IDS_FIELD_NUMBER = 3; - private java.util.List pathHopsEndpointIds_; - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List getPathHopsEndpointIdsList() { - return pathHopsEndpointIds_; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List - getPathHopsEndpointIdsOrBuilderList() { - return pathHopsEndpointIds_; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - @java.lang.Override - public int getPathHopsEndpointIdsCount() { - return pathHopsEndpointIds_.size(); - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getPathHopsEndpointIds(int index) { - return pathHopsEndpointIds_.get(index); - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getPathHopsEndpointIdsOrBuilder( - int index) { - return pathHopsEndpointIds_.get(index); - } + public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public static final int SUB_SERVICE_IDS_FIELD_NUMBER = 4; - private java.util.List subServiceIds_; - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - @java.lang.Override - public java.util.List getSubServiceIdsList() { - return subServiceIds_; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - @java.lang.Override - public java.util.List - getSubServiceIdsOrBuilderList() { - return subServiceIds_; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - @java.lang.Override - public int getSubServiceIdsCount() { - return subServiceIds_.size(); - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getSubServiceIds(int index) { - return subServiceIds_.get(index); - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getSubServiceIdsOrBuilder( - int index) { - return subServiceIds_.get(index); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static final int SETTINGS_FIELD_NUMBER = 5; - private context.ContextOuterClass.ConnectionSettings settings_; - /** - * .context.ConnectionSettings settings = 5; - * @return Whether the settings field is set. - */ - @java.lang.Override - public boolean hasSettings() { - return settings_ != null; - } - /** - * .context.ConnectionSettings settings = 5; - * @return The settings. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings getSettings() { - return settings_ == null ? context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; - } - /** - * .context.ConnectionSettings settings = 5; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder() { - return getSettings(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static Builder newBuilder(context.ContextOuterClass.FiberId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (connectionId_ != null) { - output.writeMessage(1, getConnectionId()); - } - if (serviceId_ != null) { - output.writeMessage(2, getServiceId()); - } - for (int i = 0; i < pathHopsEndpointIds_.size(); i++) { - output.writeMessage(3, pathHopsEndpointIds_.get(i)); - } - for (int i = 0; i < subServiceIds_.size(); i++) { - output.writeMessage(4, subServiceIds_.get(i)); - } - if (settings_ != null) { - output.writeMessage(5, getSettings()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (connectionId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getConnectionId()); - } - if (serviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getServiceId()); - } - for (int i = 0; i < pathHopsEndpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, pathHopsEndpointIds_.get(i)); - } - for (int i = 0; i < subServiceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, subServiceIds_.get(i)); - } - if (settings_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getSettings()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * Protobuf type {@code context.FiberId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.FiberId) + context.ContextOuterClass.FiberIdOrBuilder { - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Connection)) { - return super.equals(obj); - } - context.ContextOuterClass.Connection other = (context.ContextOuterClass.Connection) obj; - - if (hasConnectionId() != other.hasConnectionId()) return false; - if (hasConnectionId()) { - if (!getConnectionId() - .equals(other.getConnectionId())) return false; - } - if (hasServiceId() != other.hasServiceId()) return false; - if (hasServiceId()) { - if (!getServiceId() - .equals(other.getServiceId())) return false; - } - if (!getPathHopsEndpointIdsList() - .equals(other.getPathHopsEndpointIdsList())) return false; - if (!getSubServiceIdsList() - .equals(other.getSubServiceIdsList())) return false; - if (hasSettings() != other.hasSettings()) return false; - if (hasSettings()) { - if (!getSettings() - .equals(other.getSettings())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_FiberId_descriptor; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConnectionId()) { - hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; - hash = (53 * hash) + getConnectionId().hashCode(); - } - if (hasServiceId()) { - hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); - } - if (getPathHopsEndpointIdsCount() > 0) { - hash = (37 * hash) + PATH_HOPS_ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getPathHopsEndpointIdsList().hashCode(); - } - if (getSubServiceIdsCount() > 0) { - hash = (37 * hash) + SUB_SERVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSubServiceIdsList().hashCode(); - } - if (hasSettings()) { - hash = (37 * hash) + SETTINGS_FIELD_NUMBER; - hash = (53 * hash) + getSettings().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_FiberId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.FiberId.class, context.ContextOuterClass.FiberId.Builder.class); + } - public static context.ContextOuterClass.Connection parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Connection parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Connection parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Connection parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Connection parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Connection parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Connection parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Connection parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Connection parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Connection parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Connection parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Connection parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + // Construct using context.ContextOuterClass.FiberId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Connection prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Connection} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Connection) - context.ContextOuterClass.ConnectionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Connection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Connection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Connection.class, context.ContextOuterClass.Connection.Builder.class); - } - - // 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; - connectionIdBuilder_ = null; - } - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - if (pathHopsEndpointIdsBuilder_ == null) { - pathHopsEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - pathHopsEndpointIdsBuilder_.clear(); - } - if (subServiceIdsBuilder_ == null) { - subServiceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - subServiceIdsBuilder_.clear(); - } - if (settingsBuilder_ == null) { - settings_ = null; - } else { - settings_ = null; - settingsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Connection_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Connection getDefaultInstanceForType() { - return context.ContextOuterClass.Connection.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Connection build() { - context.ContextOuterClass.Connection result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - if (pathHopsEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - pathHopsEndpointIds_ = java.util.Collections.unmodifiableList(pathHopsEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.pathHopsEndpointIds_ = pathHopsEndpointIds_; - } else { - result.pathHopsEndpointIds_ = pathHopsEndpointIdsBuilder_.build(); - } - if (subServiceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - subServiceIds_ = java.util.Collections.unmodifiableList(subServiceIds_); - bitField0_ = (bitField0_ & ~0x00000002); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Connection) { - return mergeFrom((context.ContextOuterClass.Connection)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Connection other) { - if (other == context.ContextOuterClass.Connection.getDefaultInstance()) return this; - if (other.hasConnectionId()) { - mergeConnectionId(other.getConnectionId()); - } - if (other.hasServiceId()) { - mergeServiceId(other.getServiceId()); - } - if (pathHopsEndpointIdsBuilder_ == null) { - if (!other.pathHopsEndpointIds_.isEmpty()) { - if (pathHopsEndpointIds_.isEmpty()) { - pathHopsEndpointIds_ = other.pathHopsEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.addAll(other.pathHopsEndpointIds_); - } - onChanged(); - } - } else { - if (!other.pathHopsEndpointIds_.isEmpty()) { - if (pathHopsEndpointIdsBuilder_.isEmpty()) { - pathHopsEndpointIdsBuilder_.dispose(); - pathHopsEndpointIdsBuilder_ = null; - pathHopsEndpointIds_ = other.pathHopsEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - pathHopsEndpointIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPathHopsEndpointIdsFieldBuilder() : null; - } else { - pathHopsEndpointIdsBuilder_.addAllMessages(other.pathHopsEndpointIds_); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } } - } - } - if (subServiceIdsBuilder_ == null) { - if (!other.subServiceIds_.isEmpty()) { - if (subServiceIds_.isEmpty()) { - subServiceIds_ = other.subServiceIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSubServiceIdsIsMutable(); - subServiceIds_.addAll(other.subServiceIds_); - } - onChanged(); - } - } else { - if (!other.subServiceIds_.isEmpty()) { - if (subServiceIdsBuilder_.isEmpty()) { - subServiceIdsBuilder_.dispose(); - subServiceIdsBuilder_ = null; - subServiceIds_ = other.subServiceIds_; - bitField0_ = (bitField0_ & ~0x00000002); - subServiceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubServiceIdsFieldBuilder() : null; - } else { - subServiceIdsBuilder_.addAllMessages(other.subServiceIds_); - } - } - } - if (other.hasSettings()) { - mergeSettings(other.getSettings()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Connection) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private context.ContextOuterClass.ConnectionId connectionId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> connectionIdBuilder_; - /** - * .context.ConnectionId connection_id = 1; - * @return Whether the connectionId field is set. - */ - public boolean hasConnectionId() { - return connectionIdBuilder_ != null || connectionId_ != null; - } - /** - * .context.ConnectionId connection_id = 1; - * @return The connectionId. - */ - public context.ContextOuterClass.ConnectionId getConnectionId() { - if (connectionIdBuilder_ == null) { - return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } else { - return connectionIdBuilder_.getMessage(); - } - } - /** - * .context.ConnectionId connection_id = 1; - */ - public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { - if (connectionIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - connectionId_ = value; - onChanged(); - } else { - connectionIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 1; - */ - public Builder setConnectionId( - context.ContextOuterClass.ConnectionId.Builder builderForValue) { - if (connectionIdBuilder_ == null) { - connectionId_ = builderForValue.build(); - onChanged(); - } else { - connectionIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 1; - */ - public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { - if (connectionIdBuilder_ == null) { - if (connectionId_ != null) { - connectionId_ = - context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); - } else { - connectionId_ = value; - } - onChanged(); - } else { - connectionIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 1; - */ - public Builder clearConnectionId() { - if (connectionIdBuilder_ == null) { - connectionId_ = null; - onChanged(); - } else { - connectionId_ = null; - connectionIdBuilder_ = null; - } - - return this; - } - /** - * .context.ConnectionId connection_id = 1; - */ - public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { - - onChanged(); - return getConnectionIdFieldBuilder().getBuilder(); - } - /** - * .context.ConnectionId connection_id = 1; - */ - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - if (connectionIdBuilder_ != null) { - return connectionIdBuilder_.getMessageOrBuilder(); - } else { - return connectionId_ == null ? - context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } - } - /** - * .context.ConnectionId connection_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> - getConnectionIdFieldBuilder() { - if (connectionIdBuilder_ == null) { - connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder>( - getConnectionId(), - getParentForChildren(), - isClean()); - connectionId_ = null; - } - return connectionIdBuilder_; - } - - private context.ContextOuterClass.ServiceId serviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdBuilder_; - /** - * .context.ServiceId service_id = 2; - * @return Whether the serviceId field is set. - */ - public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; - } - /** - * .context.ServiceId service_id = 2; - * @return The serviceId. - */ - public context.ContextOuterClass.ServiceId getServiceId() { - if (serviceIdBuilder_ == null) { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } else { - return serviceIdBuilder_.getMessage(); - } - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder setServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - onChanged(); - } else { - serviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder setServiceId( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdBuilder_ == null) { - serviceId_ = builderForValue.build(); - onChanged(); - } else { - serviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = - context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); - } else { - serviceId_ = value; - } - onChanged(); - } else { - serviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { - - onChanged(); - return getServiceIdFieldBuilder().getBuilder(); - } - /** - * .context.ServiceId service_id = 2; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - if (serviceIdBuilder_ != null) { - return serviceIdBuilder_.getMessageOrBuilder(); - } else { - return serviceId_ == null ? - context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - } - /** - * .context.ServiceId service_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> - getServiceIdFieldBuilder() { - if (serviceIdBuilder_ == null) { - serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>( - getServiceId(), - getParentForChildren(), - isClean()); - serviceId_ = null; - } - return serviceIdBuilder_; - } - - private java.util.List pathHopsEndpointIds_ = - java.util.Collections.emptyList(); - private void ensurePathHopsEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - pathHopsEndpointIds_ = new java.util.ArrayList(pathHopsEndpointIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> pathHopsEndpointIdsBuilder_; - - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public java.util.List getPathHopsEndpointIdsList() { - if (pathHopsEndpointIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(pathHopsEndpointIds_); - } else { - return pathHopsEndpointIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public int getPathHopsEndpointIdsCount() { - if (pathHopsEndpointIdsBuilder_ == null) { - return pathHopsEndpointIds_.size(); - } else { - return pathHopsEndpointIdsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId getPathHopsEndpointIds(int index) { - if (pathHopsEndpointIdsBuilder_ == null) { - return pathHopsEndpointIds_.get(index); - } else { - return pathHopsEndpointIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder setPathHopsEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (pathHopsEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.set(index, value); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder setPathHopsEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (pathHopsEndpointIdsBuilder_ == null) { - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.set(index, builderForValue.build()); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder addPathHopsEndpointIds(context.ContextOuterClass.EndPointId value) { - if (pathHopsEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.add(value); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder addPathHopsEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (pathHopsEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.add(index, value); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder addPathHopsEndpointIds( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (pathHopsEndpointIdsBuilder_ == null) { - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.add(builderForValue.build()); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder addPathHopsEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (pathHopsEndpointIdsBuilder_ == null) { - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.add(index, builderForValue.build()); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder addAllPathHopsEndpointIds( - java.lang.Iterable values) { - if (pathHopsEndpointIdsBuilder_ == null) { - ensurePathHopsEndpointIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pathHopsEndpointIds_); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder clearPathHopsEndpointIds() { - if (pathHopsEndpointIdsBuilder_ == null) { - pathHopsEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder removePathHopsEndpointIds(int index) { - if (pathHopsEndpointIdsBuilder_ == null) { - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.remove(index); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder getPathHopsEndpointIdsBuilder( - int index) { - return getPathHopsEndpointIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getPathHopsEndpointIdsOrBuilder( - int index) { - if (pathHopsEndpointIdsBuilder_ == null) { - return pathHopsEndpointIds_.get(index); } else { - return pathHopsEndpointIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public java.util.List - getPathHopsEndpointIdsOrBuilderList() { - if (pathHopsEndpointIdsBuilder_ != null) { - return pathHopsEndpointIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pathHopsEndpointIds_); - } - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addPathHopsEndpointIdsBuilder() { - return getPathHopsEndpointIdsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addPathHopsEndpointIdsBuilder( - int index) { - return getPathHopsEndpointIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public java.util.List - getPathHopsEndpointIdsBuilderList() { - return getPathHopsEndpointIdsFieldBuilder().getBuilderList(); - } - 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()); - pathHopsEndpointIds_ = null; - } - return pathHopsEndpointIdsBuilder_; - } - - private java.util.List subServiceIds_ = - java.util.Collections.emptyList(); - private void ensureSubServiceIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - subServiceIds_ = new java.util.ArrayList(subServiceIds_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> subServiceIdsBuilder_; - - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public java.util.List getSubServiceIdsList() { - if (subServiceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subServiceIds_); - } else { - return subServiceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public int getSubServiceIdsCount() { - if (subServiceIdsBuilder_ == null) { - return subServiceIds_.size(); - } else { - return subServiceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public context.ContextOuterClass.ServiceId getSubServiceIds(int index) { - if (subServiceIdsBuilder_ == null) { - return subServiceIds_.get(index); - } else { - return subServiceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder setSubServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (subServiceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubServiceIdsIsMutable(); - subServiceIds_.set(index, value); - onChanged(); - } else { - subServiceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder setSubServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (subServiceIdsBuilder_ == null) { - ensureSubServiceIdsIsMutable(); - subServiceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - subServiceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder addSubServiceIds(context.ContextOuterClass.ServiceId value) { - if (subServiceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubServiceIdsIsMutable(); - subServiceIds_.add(value); - onChanged(); - } else { - subServiceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder addSubServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (subServiceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubServiceIdsIsMutable(); - subServiceIds_.add(index, value); - onChanged(); - } else { - subServiceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder addSubServiceIds( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (subServiceIdsBuilder_ == null) { - ensureSubServiceIdsIsMutable(); - subServiceIds_.add(builderForValue.build()); - onChanged(); - } else { - subServiceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder addSubServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (subServiceIdsBuilder_ == null) { - ensureSubServiceIdsIsMutable(); - subServiceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - subServiceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder addAllSubServiceIds( - java.lang.Iterable values) { - if (subServiceIdsBuilder_ == null) { - ensureSubServiceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subServiceIds_); - onChanged(); - } else { - subServiceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder clearSubServiceIds() { - if (subServiceIdsBuilder_ == null) { - subServiceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - subServiceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder removeSubServiceIds(int index) { - if (subServiceIdsBuilder_ == null) { - ensureSubServiceIdsIsMutable(); - subServiceIds_.remove(index); - onChanged(); - } else { - subServiceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public context.ContextOuterClass.ServiceId.Builder getSubServiceIdsBuilder( - int index) { - return getSubServiceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getSubServiceIdsOrBuilder( - int index) { - if (subServiceIdsBuilder_ == null) { - return subServiceIds_.get(index); } else { - return subServiceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public java.util.List - getSubServiceIdsOrBuilderList() { - if (subServiceIdsBuilder_ != null) { - return subServiceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subServiceIds_); - } - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public context.ContextOuterClass.ServiceId.Builder addSubServiceIdsBuilder() { - return getSubServiceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public context.ContextOuterClass.ServiceId.Builder addSubServiceIdsBuilder( - int index) { - return getSubServiceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public java.util.List - getSubServiceIdsBuilderList() { - return getSubServiceIdsFieldBuilder().getBuilderList(); - } - 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()); - subServiceIds_ = null; - } - return subServiceIdsBuilder_; - } - - private context.ContextOuterClass.ConnectionSettings settings_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings, context.ContextOuterClass.ConnectionSettings.Builder, context.ContextOuterClass.ConnectionSettingsOrBuilder> settingsBuilder_; - /** - * .context.ConnectionSettings settings = 5; - * @return Whether the settings field is set. - */ - public boolean hasSettings() { - return settingsBuilder_ != null || settings_ != null; - } - /** - * .context.ConnectionSettings settings = 5; - * @return The settings. - */ - public context.ContextOuterClass.ConnectionSettings getSettings() { - if (settingsBuilder_ == null) { - return settings_ == null ? context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; - } else { - return settingsBuilder_.getMessage(); - } - } - /** - * .context.ConnectionSettings settings = 5; - */ - public Builder setSettings(context.ContextOuterClass.ConnectionSettings value) { - if (settingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - settings_ = value; - onChanged(); - } else { - settingsBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionSettings settings = 5; - */ - public Builder setSettings( - context.ContextOuterClass.ConnectionSettings.Builder builderForValue) { - if (settingsBuilder_ == null) { - settings_ = builderForValue.build(); - onChanged(); - } else { - settingsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionSettings settings = 5; - */ - public Builder mergeSettings(context.ContextOuterClass.ConnectionSettings value) { - if (settingsBuilder_ == null) { - if (settings_ != null) { - settings_ = - context.ContextOuterClass.ConnectionSettings.newBuilder(settings_).mergeFrom(value).buildPartial(); - } else { - settings_ = value; - } - onChanged(); - } else { - settingsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionSettings settings = 5; - */ - public Builder clearSettings() { - if (settingsBuilder_ == null) { - settings_ = null; - onChanged(); - } else { - settings_ = null; - settingsBuilder_ = null; - } - - return this; - } - /** - * .context.ConnectionSettings settings = 5; - */ - public context.ContextOuterClass.ConnectionSettings.Builder getSettingsBuilder() { - - onChanged(); - return getSettingsFieldBuilder().getBuilder(); - } - /** - * .context.ConnectionSettings settings = 5; - */ - public context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder() { - if (settingsBuilder_ != null) { - return settingsBuilder_.getMessageOrBuilder(); - } else { - return settings_ == null ? - context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; - } - } - /** - * .context.ConnectionSettings settings = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings, context.ContextOuterClass.ConnectionSettings.Builder, context.ContextOuterClass.ConnectionSettingsOrBuilder> - getSettingsFieldBuilder() { - if (settingsBuilder_ == null) { - settingsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings, context.ContextOuterClass.ConnectionSettings.Builder, context.ContextOuterClass.ConnectionSettingsOrBuilder>( - getSettings(), - getParentForChildren(), - isClean()); - settings_ = null; - } - return settingsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Connection) - } - // @@protoc_insertion_point(class_scope:context.Connection) - private static final context.ContextOuterClass.Connection DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Connection(); - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fiberUuidBuilder_ == null) { + fiberUuid_ = null; + } else { + fiberUuid_ = null; + fiberUuidBuilder_ = null; + } + return this; + } - public static context.ContextOuterClass.Connection getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_FiberId_descriptor; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public context.ContextOuterClass.FiberId getDefaultInstanceForType() { + return context.ContextOuterClass.FiberId.getDefaultInstance(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public context.ContextOuterClass.FiberId build() { + context.ContextOuterClass.FiberId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public context.ContextOuterClass.Connection getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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(); + } + onBuilt(); + return result; + } - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public interface ConnectionIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionIdList) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - java.util.List - getConnectionIdsList(); - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - context.ContextOuterClass.ConnectionId getConnectionIds(int index); - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - int getConnectionIdsCount(); - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - java.util.List - getConnectionIdsOrBuilderList(); - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ConnectionIdList} - */ - public static final class ConnectionIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionIdList) - ConnectionIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionIdList.newBuilder() to construct. - private ConnectionIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionIdList() { - connectionIds_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionIdList(); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @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(); - 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; - } + @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 - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionIdList.class, context.ContextOuterClass.ConnectionIdList.Builder.class); - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - public static final int CONNECTION_IDS_FIELD_NUMBER = 1; - private java.util.List connectionIds_; - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - @java.lang.Override - public java.util.List getConnectionIdsList() { - return connectionIds_; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - @java.lang.Override - public java.util.List - getConnectionIdsOrBuilderList() { - return connectionIds_; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - @java.lang.Override - public int getConnectionIdsCount() { - return connectionIds_.size(); - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionId getConnectionIds(int index) { - return connectionIds_.get(index); - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdsOrBuilder( - int index) { - return connectionIds_.get(index); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.FiberId) { + return mergeFrom((context.ContextOuterClass.FiberId) other); + } else { + super.mergeFrom(other); + return this; + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public Builder mergeFrom(context.ContextOuterClass.FiberId other) { + if (other == context.ContextOuterClass.FiberId.getDefaultInstance()) + return this; + if (other.hasFiberUuid()) { + mergeFiberUuid(other.getFiberUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < connectionIds_.size(); i++) { - output.writeMessage(1, connectionIds_.get(i)); - } - unknownFields.writeTo(output); - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.FiberId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < connectionIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, connectionIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private context.ContextOuterClass.Uuid fiberUuid_; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionIdList other = (context.ContextOuterClass.ConnectionIdList) obj; - - if (!getConnectionIdsList() - .equals(other.getConnectionIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private com.google.protobuf.SingleFieldBuilderV3 fiberUuidBuilder_; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConnectionIdsCount() > 0) { - hash = (37 * hash) + CONNECTION_IDS_FIELD_NUMBER; - hash = (53 * hash) + getConnectionIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Uuid fiber_uuid = 1; + * @return Whether the fiberUuid field is set. + */ + public boolean hasFiberUuid() { + return fiberUuidBuilder_ != null || fiberUuid_ != null; + } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Uuid fiber_uuid = 1; + * @return The fiberUuid. + */ + public context.ContextOuterClass.Uuid getFiberUuid() { + if (fiberUuidBuilder_ == null) { + return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + } else { + return fiberUuidBuilder_.getMessage(); + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Uuid fiber_uuid = 1; + */ + public Builder setFiberUuid(context.ContextOuterClass.Uuid value) { + if (fiberUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fiberUuid_ = value; + onChanged(); + } else { + fiberUuidBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionIdList) - context.ContextOuterClass.ConnectionIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionIdList.class, context.ContextOuterClass.ConnectionIdList.Builder.class); - } - - // 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(); - if (connectionIdsBuilder_ == null) { - connectionIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - connectionIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionIdList getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionIdList build() { - context.ContextOuterClass.ConnectionIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionIdList buildPartial() { - context.ContextOuterClass.ConnectionIdList result = new context.ContextOuterClass.ConnectionIdList(this); - int from_bitField0_ = bitField0_; - if (connectionIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - connectionIds_ = java.util.Collections.unmodifiableList(connectionIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.connectionIds_ = connectionIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionIdList) { - return mergeFrom((context.ContextOuterClass.ConnectionIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionIdList other) { - if (other == context.ContextOuterClass.ConnectionIdList.getDefaultInstance()) return this; - if (connectionIdsBuilder_ == null) { - if (!other.connectionIds_.isEmpty()) { - if (connectionIds_.isEmpty()) { - connectionIds_ = other.connectionIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConnectionIdsIsMutable(); - connectionIds_.addAll(other.connectionIds_); - } - onChanged(); - } - } else { - if (!other.connectionIds_.isEmpty()) { - if (connectionIdsBuilder_.isEmpty()) { - connectionIdsBuilder_.dispose(); - connectionIdsBuilder_ = null; - connectionIds_ = other.connectionIds_; - bitField0_ = (bitField0_ & ~0x00000001); - connectionIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConnectionIdsFieldBuilder() : null; - } else { - connectionIdsBuilder_.addAllMessages(other.connectionIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List connectionIds_ = - java.util.Collections.emptyList(); - private void ensureConnectionIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - connectionIds_ = new java.util.ArrayList(connectionIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> connectionIdsBuilder_; - - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public java.util.List getConnectionIdsList() { - if (connectionIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(connectionIds_); - } else { - return connectionIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public int getConnectionIdsCount() { - if (connectionIdsBuilder_ == null) { - return connectionIds_.size(); - } else { - return connectionIdsBuilder_.getCount(); - } - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public context.ContextOuterClass.ConnectionId getConnectionIds(int index) { - if (connectionIdsBuilder_ == null) { - return connectionIds_.get(index); - } else { - return connectionIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder setConnectionIds( - int index, context.ContextOuterClass.ConnectionId value) { - if (connectionIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionIdsIsMutable(); - connectionIds_.set(index, value); - onChanged(); - } else { - connectionIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder setConnectionIds( - int index, context.ContextOuterClass.ConnectionId.Builder builderForValue) { - if (connectionIdsBuilder_ == null) { - ensureConnectionIdsIsMutable(); - connectionIds_.set(index, builderForValue.build()); - onChanged(); - } else { - connectionIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder addConnectionIds(context.ContextOuterClass.ConnectionId value) { - if (connectionIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionIdsIsMutable(); - connectionIds_.add(value); - onChanged(); - } else { - connectionIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder addConnectionIds( - int index, context.ContextOuterClass.ConnectionId value) { - if (connectionIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionIdsIsMutable(); - connectionIds_.add(index, value); - onChanged(); - } else { - connectionIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder addConnectionIds( - context.ContextOuterClass.ConnectionId.Builder builderForValue) { - if (connectionIdsBuilder_ == null) { - ensureConnectionIdsIsMutable(); - connectionIds_.add(builderForValue.build()); - onChanged(); - } else { - connectionIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder addConnectionIds( - int index, context.ContextOuterClass.ConnectionId.Builder builderForValue) { - if (connectionIdsBuilder_ == null) { - ensureConnectionIdsIsMutable(); - connectionIds_.add(index, builderForValue.build()); - onChanged(); - } else { - connectionIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder addAllConnectionIds( - java.lang.Iterable values) { - if (connectionIdsBuilder_ == null) { - ensureConnectionIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, connectionIds_); - onChanged(); - } else { - connectionIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder clearConnectionIds() { - if (connectionIdsBuilder_ == null) { - connectionIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - connectionIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder removeConnectionIds(int index) { - if (connectionIdsBuilder_ == null) { - ensureConnectionIdsIsMutable(); - connectionIds_.remove(index); - onChanged(); - } else { - connectionIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public context.ContextOuterClass.ConnectionId.Builder getConnectionIdsBuilder( - int index) { - return getConnectionIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdsOrBuilder( - int index) { - if (connectionIdsBuilder_ == null) { - return connectionIds_.get(index); } else { - return connectionIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public java.util.List - getConnectionIdsOrBuilderList() { - if (connectionIdsBuilder_ != null) { - return connectionIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(connectionIds_); - } - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public context.ContextOuterClass.ConnectionId.Builder addConnectionIdsBuilder() { - return getConnectionIdsFieldBuilder().addBuilder( - context.ContextOuterClass.ConnectionId.getDefaultInstance()); - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public context.ContextOuterClass.ConnectionId.Builder addConnectionIdsBuilder( - int index) { - return getConnectionIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.ConnectionId.getDefaultInstance()); - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public java.util.List - getConnectionIdsBuilderList() { - return getConnectionIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> - getConnectionIdsFieldBuilder() { - if (connectionIdsBuilder_ == null) { - connectionIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder>( - connectionIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - connectionIds_ = null; - } - return connectionIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionIdList) - } + /** + * .context.Uuid fiber_uuid = 1; + */ + public Builder setFiberUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (fiberUuidBuilder_ == null) { + fiberUuid_ = builderForValue.build(); + onChanged(); + } else { + fiberUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } - // @@protoc_insertion_point(class_scope:context.ConnectionIdList) - private static final context.ContextOuterClass.ConnectionIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionIdList(); - } + /** + * .context.Uuid fiber_uuid = 1; + */ + public Builder mergeFiberUuid(context.ContextOuterClass.Uuid value) { + if (fiberUuidBuilder_ == null) { + if (fiberUuid_ != null) { + fiberUuid_ = context.ContextOuterClass.Uuid.newBuilder(fiberUuid_).mergeFrom(value).buildPartial(); + } else { + fiberUuid_ = value; + } + onChanged(); + } else { + fiberUuidBuilder_.mergeFrom(value); + } + return this; + } - public static context.ContextOuterClass.ConnectionIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid fiber_uuid = 1; + */ + public Builder clearFiberUuid() { + if (fiberUuidBuilder_ == null) { + fiberUuid_ = null; + onChanged(); + } else { + fiberUuid_ = null; + fiberUuidBuilder_ = null; + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Uuid fiber_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getFiberUuidBuilder() { + onChanged(); + return getFiberUuidFieldBuilder().getBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Uuid fiber_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder() { + if (fiberUuidBuilder_ != null) { + return fiberUuidBuilder_.getMessageOrBuilder(); + } else { + return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + } + } - @java.lang.Override - public context.ContextOuterClass.ConnectionIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid fiber_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getFiberUuidFieldBuilder() { + if (fiberUuidBuilder_ == null) { + fiberUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getFiberUuid(), getParentForChildren(), isClean()); + fiberUuid_ = null; + } + return fiberUuidBuilder_; + } - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public interface ConnectionListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionList) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.FiberId) + } - /** - * repeated .context.Connection connections = 1; - */ - java.util.List - getConnectionsList(); - /** - * repeated .context.Connection connections = 1; - */ - context.ContextOuterClass.Connection getConnections(int index); - /** - * repeated .context.Connection connections = 1; - */ - int getConnectionsCount(); - /** - * repeated .context.Connection connections = 1; - */ - java.util.List - getConnectionsOrBuilderList(); - /** - * repeated .context.Connection connections = 1; - */ - context.ContextOuterClass.ConnectionOrBuilder getConnectionsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ConnectionList} - */ - public static final class ConnectionList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionList) - ConnectionListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionList.newBuilder() to construct. - private ConnectionList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionList() { - connections_ = java.util.Collections.emptyList(); - } + // @@protoc_insertion_point(class_scope:context.FiberId) + private static final context.ContextOuterClass.FiberId DEFAULT_INSTANCE; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionList(); - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.FiberId(); + } - @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(); - 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; - } + public static context.ContextOuterClass.FiberId getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionList.class, context.ContextOuterClass.ConnectionList.Builder.class); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static final int CONNECTIONS_FIELD_NUMBER = 1; - private java.util.List connections_; - /** - * repeated .context.Connection connections = 1; - */ - @java.lang.Override - public java.util.List getConnectionsList() { - return connections_; - } - /** - * repeated .context.Connection connections = 1; - */ - @java.lang.Override - public java.util.List - getConnectionsOrBuilderList() { - return connections_; - } - /** - * repeated .context.Connection connections = 1; - */ - @java.lang.Override - public int getConnectionsCount() { - return connections_.size(); - } - /** - * repeated .context.Connection connections = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Connection getConnections(int index) { - return connections_.get(index); - } - /** - * repeated .context.Connection connections = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionOrBuilder getConnectionsOrBuilder( - int index) { - return connections_.get(index); - } + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.FiberId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FiberOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Fiber) + com.google.protobuf.MessageOrBuilder { + + /** + * string ID = 10; + * @return The iD. + */ + java.lang.String getID(); + + /** + * string ID = 10; + * @return The bytes for iD. + */ + com.google.protobuf.ByteString getIDBytes(); + + /** + * string src_port = 1; + * @return The srcPort. + */ + java.lang.String getSrcPort(); + + /** + * string src_port = 1; + * @return The bytes for srcPort. + */ + com.google.protobuf.ByteString getSrcPortBytes(); + + /** + * string dst_port = 2; + * @return The dstPort. + */ + java.lang.String getDstPort(); + + /** + * string dst_port = 2; + * @return The bytes for dstPort. + */ + com.google.protobuf.ByteString getDstPortBytes(); + + /** + * string local_peer_port = 3; + * @return The localPeerPort. + */ + java.lang.String getLocalPeerPort(); + + /** + * string local_peer_port = 3; + * @return The bytes for localPeerPort. + */ + com.google.protobuf.ByteString getLocalPeerPortBytes(); + + /** + * string remote_peer_port = 4; + * @return The remotePeerPort. + */ + java.lang.String getRemotePeerPort(); + + /** + * string remote_peer_port = 4; + * @return The bytes for remotePeerPort. + */ + com.google.protobuf.ByteString getRemotePeerPortBytes(); + + /** + * repeated int32 c_slots = 5; + * @return A list containing the cSlots. + */ + java.util.List getCSlotsList(); + + /** + * repeated int32 c_slots = 5; + * @return The count of cSlots. + */ + int getCSlotsCount(); + + /** + * repeated int32 c_slots = 5; + * @param index The index of the element to return. + * @return The cSlots at the given index. + */ + int getCSlots(int index); + + /** + * repeated int32 l_slots = 6; + * @return A list containing the lSlots. + */ + java.util.List getLSlotsList(); + + /** + * repeated int32 l_slots = 6; + * @return The count of lSlots. + */ + int getLSlotsCount(); + + /** + * repeated int32 l_slots = 6; + * @param index The index of the element to return. + * @return The lSlots at the given index. + */ + int getLSlots(int index); + + /** + * repeated int32 s_slots = 7; + * @return A list containing the sSlots. + */ + java.util.List getSSlotsList(); + + /** + * repeated int32 s_slots = 7; + * @return The count of sSlots. + */ + int getSSlotsCount(); + + /** + * repeated int32 s_slots = 7; + * @param index The index of the element to return. + * @return The sSlots at the given index. + */ + int getSSlots(int index); + + /** + * float length = 8; + * @return The length. + */ + float getLength(); + + /** + * bool used = 9; + * @return The used. + */ + boolean getUsed(); + + /** + * .context.FiberId fiber_uuid = 11; + * @return Whether the fiberUuid field is set. + */ + boolean hasFiberUuid(); + + /** + * .context.FiberId fiber_uuid = 11; + * @return The fiberUuid. + */ + context.ContextOuterClass.FiberId getFiberUuid(); + + /** + * .context.FiberId fiber_uuid = 11; + */ + context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder(); + } + + /** + * Protobuf type {@code context.Fiber} + */ + public static final class Fiber extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Fiber) + FiberOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Fiber.newBuilder() to construct. + private Fiber(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Fiber() { + iD_ = ""; + srcPort_ = ""; + dstPort_ = ""; + localPeerPort_ = ""; + remotePeerPort_ = ""; + cSlots_ = emptyIntList(); + lSlots_ = emptyIntList(); + sSlots_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Fiber_descriptor; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Fiber_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Fiber.class, context.ContextOuterClass.Fiber.Builder.class); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < connections_.size(); i++) { - output.writeMessage(1, connections_.get(i)); - } - unknownFields.writeTo(output); - } + public static final int ID_FIELD_NUMBER = 10; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < connections_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, connections_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private volatile java.lang.Object iD_; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionList)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionList other = (context.ContextOuterClass.ConnectionList) obj; - - if (!getConnectionsList() - .equals(other.getConnectionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string ID = 10; + * @return The iD. + */ + @java.lang.Override + public java.lang.String getID() { + java.lang.Object ref = iD_; + 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(); + iD_ = s; + return s; + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConnectionsCount() > 0) { - hash = (37 * hash) + CONNECTIONS_FIELD_NUMBER; - hash = (53 * hash) + getConnectionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * string ID = 10; + * @return The bytes for iD. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIDBytes() { + java.lang.Object ref = iD_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iD_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static context.ContextOuterClass.ConnectionList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int SRC_PORT_FIELD_NUMBER = 1; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private volatile java.lang.Object srcPort_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionList) - context.ContextOuterClass.ConnectionListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionList.class, context.ContextOuterClass.ConnectionList.Builder.class); - } - - // 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(); - if (connectionsBuilder_ == null) { - connections_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - connectionsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionList getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionList build() { - context.ContextOuterClass.ConnectionList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionList buildPartial() { - context.ContextOuterClass.ConnectionList result = new context.ContextOuterClass.ConnectionList(this); - int from_bitField0_ = bitField0_; - if (connectionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - connections_ = java.util.Collections.unmodifiableList(connections_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.connections_ = connections_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionList) { - return mergeFrom((context.ContextOuterClass.ConnectionList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionList other) { - if (other == context.ContextOuterClass.ConnectionList.getDefaultInstance()) return this; - if (connectionsBuilder_ == null) { - if (!other.connections_.isEmpty()) { - if (connections_.isEmpty()) { - connections_ = other.connections_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConnectionsIsMutable(); - connections_.addAll(other.connections_); - } - onChanged(); - } - } else { - if (!other.connections_.isEmpty()) { - if (connectionsBuilder_.isEmpty()) { - connectionsBuilder_.dispose(); - connectionsBuilder_ = null; - connections_ = other.connections_; - bitField0_ = (bitField0_ & ~0x00000001); - connectionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConnectionsFieldBuilder() : null; + /** + * string src_port = 1; + * @return The srcPort. + */ + @java.lang.Override + public java.lang.String getSrcPort() { + java.lang.Object ref = srcPort_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - connectionsBuilder_.addAllMessages(other.connections_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List connections_ = - java.util.Collections.emptyList(); - private void ensureConnectionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - connections_ = new java.util.ArrayList(connections_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Connection, context.ContextOuterClass.Connection.Builder, context.ContextOuterClass.ConnectionOrBuilder> connectionsBuilder_; - - /** - * repeated .context.Connection connections = 1; - */ - public java.util.List getConnectionsList() { - if (connectionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(connections_); - } else { - return connectionsBuilder_.getMessageList(); - } - } - /** - * repeated .context.Connection connections = 1; - */ - public int getConnectionsCount() { - if (connectionsBuilder_ == null) { - return connections_.size(); - } else { - return connectionsBuilder_.getCount(); - } - } - /** - * repeated .context.Connection connections = 1; - */ - public context.ContextOuterClass.Connection getConnections(int index) { - if (connectionsBuilder_ == null) { - return connections_.get(index); - } else { - return connectionsBuilder_.getMessage(index); - } - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder setConnections( - int index, context.ContextOuterClass.Connection value) { - if (connectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionsIsMutable(); - connections_.set(index, value); - onChanged(); - } else { - connectionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder setConnections( - int index, context.ContextOuterClass.Connection.Builder builderForValue) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - connections_.set(index, builderForValue.build()); - onChanged(); - } else { - connectionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder addConnections(context.ContextOuterClass.Connection value) { - if (connectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionsIsMutable(); - connections_.add(value); - onChanged(); - } else { - connectionsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder addConnections( - int index, context.ContextOuterClass.Connection value) { - if (connectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionsIsMutable(); - connections_.add(index, value); - onChanged(); - } else { - connectionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder addConnections( - context.ContextOuterClass.Connection.Builder builderForValue) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - connections_.add(builderForValue.build()); - onChanged(); - } else { - connectionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder addConnections( - int index, context.ContextOuterClass.Connection.Builder builderForValue) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - connections_.add(index, builderForValue.build()); - onChanged(); - } else { - connectionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder addAllConnections( - java.lang.Iterable values) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, connections_); - onChanged(); - } else { - connectionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder clearConnections() { - if (connectionsBuilder_ == null) { - connections_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - connectionsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder removeConnections(int index) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - connections_.remove(index); - onChanged(); - } else { - connectionsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public context.ContextOuterClass.Connection.Builder getConnectionsBuilder( - int index) { - return getConnectionsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Connection connections = 1; - */ - public context.ContextOuterClass.ConnectionOrBuilder getConnectionsOrBuilder( - int index) { - if (connectionsBuilder_ == null) { - return connections_.get(index); } else { - return connectionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Connection connections = 1; - */ - public java.util.List - getConnectionsOrBuilderList() { - if (connectionsBuilder_ != null) { - return connectionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(connections_); - } - } - /** - * repeated .context.Connection connections = 1; - */ - public context.ContextOuterClass.Connection.Builder addConnectionsBuilder() { - return getConnectionsFieldBuilder().addBuilder( - context.ContextOuterClass.Connection.getDefaultInstance()); - } - /** - * repeated .context.Connection connections = 1; - */ - public context.ContextOuterClass.Connection.Builder addConnectionsBuilder( - int index) { - return getConnectionsFieldBuilder().addBuilder( - index, context.ContextOuterClass.Connection.getDefaultInstance()); - } - /** - * repeated .context.Connection connections = 1; - */ - public java.util.List - getConnectionsBuilderList() { - return getConnectionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Connection, context.ContextOuterClass.Connection.Builder, context.ContextOuterClass.ConnectionOrBuilder> - getConnectionsFieldBuilder() { - if (connectionsBuilder_ == null) { - connectionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Connection, context.ContextOuterClass.Connection.Builder, context.ContextOuterClass.ConnectionOrBuilder>( - connections_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - connections_ = null; - } - return connectionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionList) - } + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcPort_ = s; + return s; + } + } - // @@protoc_insertion_point(class_scope:context.ConnectionList) - private static final context.ContextOuterClass.ConnectionList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionList(); - } + /** + * string src_port = 1; + * @return The bytes for srcPort. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSrcPortBytes() { + java.lang.Object ref = srcPort_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static context.ContextOuterClass.ConnectionList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final int DST_PORT_FIELD_NUMBER = 2; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private volatile java.lang.Object dstPort_; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * string dst_port = 2; + * @return The dstPort. + */ + @java.lang.Override + public java.lang.String getDstPort() { + java.lang.Object ref = dstPort_; + 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(); + dstPort_ = s; + return s; + } + } - @java.lang.Override - public context.ContextOuterClass.ConnectionList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * string dst_port = 2; + * @return The bytes for dstPort. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDstPortBytes() { + java.lang.Object ref = dstPort_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - } + public static final int LOCAL_PEER_PORT_FIELD_NUMBER = 3; - public interface ConnectionEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionEvent) - com.google.protobuf.MessageOrBuilder { + private volatile java.lang.Object localPeerPort_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + /** + * string local_peer_port = 3; + * @return The localPeerPort. + */ + @java.lang.Override + public java.lang.String getLocalPeerPort() { + java.lang.Object ref = localPeerPort_; + 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(); + localPeerPort_ = s; + return s; + } + } - /** - * .context.ConnectionId connection_id = 2; - * @return Whether the connectionId field is set. - */ - boolean hasConnectionId(); - /** - * .context.ConnectionId connection_id = 2; - * @return The connectionId. - */ - context.ContextOuterClass.ConnectionId getConnectionId(); - /** - * .context.ConnectionId connection_id = 2; - */ - context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); - } - /** - * Protobuf type {@code context.ConnectionEvent} - */ - public static final class ConnectionEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionEvent) - ConnectionEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionEvent.newBuilder() to construct. - private ConnectionEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionEvent() { - } + /** + * string local_peer_port = 3; + * @return The bytes for localPeerPort. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocalPeerPortBytes() { + java.lang.Object ref = localPeerPort_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + localPeerPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionEvent(); - } + public static final int REMOTE_PEER_PORT_FIELD_NUMBER = 4; - @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; - } + private volatile java.lang.Object remotePeerPort_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionEvent.class, context.ContextOuterClass.ConnectionEvent.Builder.class); - } + /** + * string remote_peer_port = 4; + * @return The remotePeerPort. + */ + @java.lang.Override + public java.lang.String getRemotePeerPort() { + java.lang.Object ref = remotePeerPort_; + 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(); + remotePeerPort_ = s; + return s; + } + } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + /** + * string remote_peer_port = 4; + * @return The bytes for remotePeerPort. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRemotePeerPortBytes() { + java.lang.Object ref = remotePeerPort_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remotePeerPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static final int CONNECTION_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.ConnectionId connectionId_; - /** - * .context.ConnectionId connection_id = 2; - * @return Whether the connectionId field is set. - */ - @java.lang.Override - public boolean hasConnectionId() { - return connectionId_ != null; - } - /** - * .context.ConnectionId connection_id = 2; - * @return The connectionId. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionId getConnectionId() { - return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } - /** - * .context.ConnectionId connection_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - return getConnectionId(); - } + public static final int C_SLOTS_FIELD_NUMBER = 5; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private com.google.protobuf.Internal.IntList cSlots_; - memoizedIsInitialized = 1; - return true; - } + /** + * repeated int32 c_slots = 5; + * @return A list containing the cSlots. + */ + @java.lang.Override + public java.util.List getCSlotsList() { + return cSlots_; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (connectionId_ != null) { - output.writeMessage(2, getConnectionId()); - } - unknownFields.writeTo(output); - } + /** + * repeated int32 c_slots = 5; + * @return The count of cSlots. + */ + public int getCSlotsCount() { + return cSlots_.size(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (connectionId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getConnectionId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated int32 c_slots = 5; + * @param index The index of the element to return. + * @return The cSlots at the given index. + */ + public int getCSlots(int index) { + return cSlots_.getInt(index); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionEvent other = (context.ContextOuterClass.ConnectionEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasConnectionId() != other.hasConnectionId()) return false; - if (hasConnectionId()) { - if (!getConnectionId() - .equals(other.getConnectionId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private int cSlotsMemoizedSerializedSize = -1; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasConnectionId()) { - hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; - hash = (53 * hash) + getConnectionId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static final int L_SLOTS_FIELD_NUMBER = 6; - public static context.ContextOuterClass.ConnectionEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private com.google.protobuf.Internal.IntList lSlots_; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated int32 l_slots = 6; + * @return A list containing the lSlots. + */ + @java.lang.Override + public java.util.List getLSlotsList() { + return lSlots_; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionEvent) - context.ContextOuterClass.ConnectionEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionEvent.class, context.ContextOuterClass.ConnectionEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (connectionIdBuilder_ == null) { - connectionId_ = null; - } else { - connectionId_ = null; - connectionIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionEvent getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionEvent build() { - context.ContextOuterClass.ConnectionEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionEvent) { - return mergeFrom((context.ContextOuterClass.ConnectionEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionEvent other) { - if (other == context.ContextOuterClass.ConnectionEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasConnectionId()) { - mergeConnectionId(other.getConnectionId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.ConnectionId connectionId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> connectionIdBuilder_; - /** - * .context.ConnectionId connection_id = 2; - * @return Whether the connectionId field is set. - */ - public boolean hasConnectionId() { - return connectionIdBuilder_ != null || connectionId_ != null; - } - /** - * .context.ConnectionId connection_id = 2; - * @return The connectionId. - */ - public context.ContextOuterClass.ConnectionId getConnectionId() { - if (connectionIdBuilder_ == null) { - return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } else { - return connectionIdBuilder_.getMessage(); - } - } - /** - * .context.ConnectionId connection_id = 2; - */ - public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { - if (connectionIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - connectionId_ = value; - onChanged(); - } else { - connectionIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 2; - */ - public Builder setConnectionId( - context.ContextOuterClass.ConnectionId.Builder builderForValue) { - if (connectionIdBuilder_ == null) { - connectionId_ = builderForValue.build(); - onChanged(); - } else { - connectionIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 2; - */ - public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { - if (connectionIdBuilder_ == null) { - if (connectionId_ != null) { - connectionId_ = - context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); - } else { - connectionId_ = value; - } - onChanged(); - } else { - connectionIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 2; - */ - public Builder clearConnectionId() { - if (connectionIdBuilder_ == null) { - connectionId_ = null; - onChanged(); - } else { - connectionId_ = null; - connectionIdBuilder_ = null; - } - - return this; - } - /** - * .context.ConnectionId connection_id = 2; - */ - public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { - - onChanged(); - return getConnectionIdFieldBuilder().getBuilder(); - } - /** - * .context.ConnectionId connection_id = 2; - */ - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - if (connectionIdBuilder_ != null) { - return connectionIdBuilder_.getMessageOrBuilder(); - } else { - return connectionId_ == null ? - context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } - } - /** - * .context.ConnectionId connection_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> - getConnectionIdFieldBuilder() { - if (connectionIdBuilder_ == null) { - connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder>( - getConnectionId(), - getParentForChildren(), - isClean()); - connectionId_ = null; - } - return connectionIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionEvent) - } + /** + * repeated int32 l_slots = 6; + * @return The count of lSlots. + */ + public int getLSlotsCount() { + return lSlots_.size(); + } - // @@protoc_insertion_point(class_scope:context.ConnectionEvent) - private static final context.ContextOuterClass.ConnectionEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionEvent(); - } + /** + * repeated int32 l_slots = 6; + * @param index The index of the element to return. + * @return The lSlots at the given index. + */ + public int getLSlots(int index) { + return lSlots_.getInt(index); + } - public static context.ContextOuterClass.ConnectionEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private int lSlotsMemoizedSerializedSize = -1; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static final int S_SLOTS_FIELD_NUMBER = 7; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private com.google.protobuf.Internal.IntList sSlots_; - @java.lang.Override - public context.ContextOuterClass.ConnectionEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated int32 s_slots = 7; + * @return A list containing the sSlots. + */ + @java.lang.Override + public java.util.List getSSlotsList() { + return sSlots_; + } - } + /** + * repeated int32 s_slots = 7; + * @return The count of sSlots. + */ + public int getSSlotsCount() { + return sSlots_.size(); + } - public interface EndPointIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.EndPointId) - com.google.protobuf.MessageOrBuilder { + /** + * repeated int32 s_slots = 7; + * @param index The index of the element to return. + * @return The sSlots at the given index. + */ + public int getSSlots(int index) { + return sSlots_.getInt(index); + } - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - boolean hasTopologyId(); - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - context.ContextOuterClass.TopologyId getTopologyId(); - /** - * .context.TopologyId topology_id = 1; - */ - context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + private int sSlotsMemoizedSerializedSize = -1; - /** - * .context.DeviceId device_id = 2; - * @return Whether the deviceId field is set. - */ - boolean hasDeviceId(); - /** - * .context.DeviceId device_id = 2; - * @return The deviceId. - */ - context.ContextOuterClass.DeviceId getDeviceId(); - /** - * .context.DeviceId device_id = 2; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + public static final int LENGTH_FIELD_NUMBER = 8; - /** - * .context.Uuid endpoint_uuid = 3; - * @return Whether the endpointUuid field is set. - */ - boolean hasEndpointUuid(); - /** - * .context.Uuid endpoint_uuid = 3; - * @return The endpointUuid. - */ - context.ContextOuterClass.Uuid getEndpointUuid(); - /** - * .context.Uuid endpoint_uuid = 3; - */ - context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder(); - } - /** - *
-   * ----- Endpoint ------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.EndPointId} - */ - public static final class EndPointId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.EndPointId) - EndPointIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use EndPointId.newBuilder() to construct. - private EndPointId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EndPointId() { - } + private float length_; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EndPointId(); - } + /** + * float length = 8; + * @return The length. + */ + @java.lang.Override + public float getLength() { + return length_; + } - @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; - } + public static final int USED_FIELD_NUMBER = 9; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointId.class, context.ContextOuterClass.EndPointId.Builder.class); - } + private boolean used_; - public static final int TOPOLOGY_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.TopologyId topologyId_; - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - @java.lang.Override - public boolean hasTopologyId() { - return topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - @java.lang.Override - public context.ContextOuterClass.TopologyId getTopologyId() { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - /** - * .context.TopologyId topology_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); - } + /** + * bool used = 9; + * @return The used. + */ + @java.lang.Override + public boolean getUsed() { + return used_; + } - public static final int DEVICE_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.DeviceId deviceId_; - /** - * .context.DeviceId device_id = 2; - * @return Whether the deviceId field is set. - */ - @java.lang.Override - public boolean hasDeviceId() { - return deviceId_ != null; - } - /** - * .context.DeviceId device_id = 2; - * @return The deviceId. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceId() { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - /** - * .context.DeviceId device_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); - } + public static final int FIBER_UUID_FIELD_NUMBER = 11; - public static final int ENDPOINT_UUID_FIELD_NUMBER = 3; - private context.ContextOuterClass.Uuid endpointUuid_; - /** - * .context.Uuid endpoint_uuid = 3; - * @return Whether the endpointUuid field is set. - */ - @java.lang.Override - public boolean hasEndpointUuid() { - return endpointUuid_ != null; - } - /** - * .context.Uuid endpoint_uuid = 3; - * @return The endpointUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getEndpointUuid() { - return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { - return getEndpointUuid(); - } + private context.ContextOuterClass.FiberId fiberUuid_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.FiberId fiber_uuid = 11; + * @return Whether the fiberUuid field is set. + */ + @java.lang.Override + public boolean hasFiberUuid() { + return fiberUuid_ != null; + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.FiberId fiber_uuid = 11; + * @return The fiberUuid. + */ + @java.lang.Override + public context.ContextOuterClass.FiberId getFiberUuid() { + return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (topologyId_ != null) { - output.writeMessage(1, getTopologyId()); - } - if (deviceId_ != null) { - output.writeMessage(2, getDeviceId()); - } - if (endpointUuid_ != null) { - output.writeMessage(3, getEndpointUuid()); - } - unknownFields.writeTo(output); - } + /** + * .context.FiberId fiber_uuid = 11; + */ + @java.lang.Override + public context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder() { + return getFiberUuid(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (topologyId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTopologyId()); - } - if (deviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDeviceId()); - } - if (endpointUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getEndpointUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.EndPointId)) { - return super.equals(obj); - } - context.ContextOuterClass.EndPointId other = (context.ContextOuterClass.EndPointId) obj; - - if (hasTopologyId() != other.hasTopologyId()) return false; - if (hasTopologyId()) { - if (!getTopologyId() - .equals(other.getTopologyId())) return false; - } - if (hasDeviceId() != other.hasDeviceId()) return false; - if (hasDeviceId()) { - if (!getDeviceId() - .equals(other.getDeviceId())) return false; - } - if (hasEndpointUuid() != other.hasEndpointUuid()) return false; - if (hasEndpointUuid()) { - if (!getEndpointUuid() - .equals(other.getEndpointUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTopologyId()) { - hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; - hash = (53 * hash) + getTopologyId().hashCode(); - } - if (hasDeviceId()) { - hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getDeviceId().hashCode(); - } - if (hasEndpointUuid()) { - hash = (37 * hash) + ENDPOINT_UUID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!getSrcPortBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcPort_); + } + if (!getDstPortBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstPort_); + } + if (!getLocalPeerPortBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, localPeerPort_); + } + if (!getRemotePeerPortBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, remotePeerPort_); + } + if (getCSlotsList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(cSlotsMemoizedSerializedSize); + } + for (int i = 0; i < cSlots_.size(); i++) { + output.writeInt32NoTag(cSlots_.getInt(i)); + } + if (getLSlotsList().size() > 0) { + output.writeUInt32NoTag(50); + output.writeUInt32NoTag(lSlotsMemoizedSerializedSize); + } + for (int i = 0; i < lSlots_.size(); i++) { + output.writeInt32NoTag(lSlots_.getInt(i)); + } + if (getSSlotsList().size() > 0) { + output.writeUInt32NoTag(58); + output.writeUInt32NoTag(sSlotsMemoizedSerializedSize); + } + for (int i = 0; i < sSlots_.size(); i++) { + output.writeInt32NoTag(sSlots_.getInt(i)); + } + if (length_ != 0F) { + output.writeFloat(8, length_); + } + if (used_ != false) { + output.writeBool(9, used_); + } + if (!getIDBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, iD_); + } + if (fiberUuid_ != null) { + output.writeMessage(11, getFiberUuid()); + } + unknownFields.writeTo(output); + } - public static context.ContextOuterClass.EndPointId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getSrcPortBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcPort_); + } + if (!getDstPortBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstPort_); + } + if (!getLocalPeerPortBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, localPeerPort_); + } + if (!getRemotePeerPortBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, remotePeerPort_); + } + { + int dataSize = 0; + for (int i = 0; i < cSlots_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(cSlots_.getInt(i)); + } + size += dataSize; + if (!getCSlotsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + cSlotsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < lSlots_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(lSlots_.getInt(i)); + } + size += dataSize; + if (!getLSlotsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + lSlotsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < sSlots_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(sSlots_.getInt(i)); + } + size += dataSize; + if (!getSSlotsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + sSlotsMemoizedSerializedSize = dataSize; + } + if (length_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, length_); + } + if (used_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, used_); + } + if (!getIDBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, iD_); + } + if (fiberUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getFiberUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.EndPointId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Fiber)) { + return super.equals(obj); + } + context.ContextOuterClass.Fiber other = (context.ContextOuterClass.Fiber) obj; + if (!getID().equals(other.getID())) + return false; + if (!getSrcPort().equals(other.getSrcPort())) + return false; + if (!getDstPort().equals(other.getDstPort())) + return false; + if (!getLocalPeerPort().equals(other.getLocalPeerPort())) + return false; + if (!getRemotePeerPort().equals(other.getRemotePeerPort())) + return false; + if (!getCSlotsList().equals(other.getCSlotsList())) + return false; + if (!getLSlotsList().equals(other.getLSlotsList())) + return false; + if (!getSSlotsList().equals(other.getSSlotsList())) + return false; + if (java.lang.Float.floatToIntBits(getLength()) != java.lang.Float.floatToIntBits(other.getLength())) + return false; + if (getUsed() != other.getUsed()) + return false; + if (hasFiberUuid() != other.hasFiberUuid()) + return false; + if (hasFiberUuid()) { + if (!getFiberUuid().equals(other.getFiberUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Endpoint ------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.EndPointId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.EndPointId) - context.ContextOuterClass.EndPointIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_EndPointId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointId.class, context.ContextOuterClass.EndPointId.Builder.class); - } - - // 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; - topologyIdBuilder_ = null; - } - if (deviceIdBuilder_ == null) { - deviceId_ = null; - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - if (endpointUuidBuilder_ == null) { - endpointUuid_ = null; - } else { - endpointUuid_ = null; - endpointUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_EndPointId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.EndPointId getDefaultInstanceForType() { - return context.ContextOuterClass.EndPointId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.EndPointId build() { - context.ContextOuterClass.EndPointId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.EndPointId) { - return mergeFrom((context.ContextOuterClass.EndPointId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.EndPointId other) { - if (other == context.ContextOuterClass.EndPointId.getDefaultInstance()) return this; - if (other.hasTopologyId()) { - mergeTopologyId(other.getTopologyId()); - } - if (other.hasDeviceId()) { - mergeDeviceId(other.getDeviceId()); - } - if (other.hasEndpointUuid()) { - mergeEndpointUuid(other.getEndpointUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPointId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.TopologyId topologyId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> topologyIdBuilder_; - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - public context.ContextOuterClass.TopologyId getTopologyId() { - if (topologyIdBuilder_ == null) { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } else { - return topologyIdBuilder_.getMessage(); - } - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - topologyId_ = value; - onChanged(); - } else { - topologyIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder setTopologyId( - context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdBuilder_ == null) { - topologyId_ = builderForValue.build(); - onChanged(); - } else { - topologyIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = - context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); - } else { - topologyId_ = value; - } - onChanged(); - } else { - topologyIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; - topologyIdBuilder_ = null; - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { - - onChanged(); - return getTopologyIdFieldBuilder().getBuilder(); - } - /** - * .context.TopologyId topology_id = 1; - */ - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - if (topologyIdBuilder_ != null) { - return topologyIdBuilder_.getMessageOrBuilder(); - } else { - return topologyId_ == null ? - context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - } - /** - * .context.TopologyId topology_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> - getTopologyIdFieldBuilder() { - if (topologyIdBuilder_ == null) { - topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder>( - getTopologyId(), - getParentForChildren(), - isClean()); - topologyId_ = null; - } - return topologyIdBuilder_; - } - - private context.ContextOuterClass.DeviceId deviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdBuilder_; - /** - * .context.DeviceId device_id = 2; - * @return Whether the deviceId field is set. - */ - public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; - } - /** - * .context.DeviceId device_id = 2; - * @return The deviceId. - */ - public context.ContextOuterClass.DeviceId getDeviceId() { - if (deviceIdBuilder_ == null) { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } else { - return deviceIdBuilder_.getMessage(); - } - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceId_ = value; - onChanged(); - } else { - deviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder setDeviceId( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdBuilder_ == null) { - deviceId_ = builderForValue.build(); - onChanged(); - } else { - deviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = - context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); - } else { - deviceId_ = value; - } - onChanged(); - } else { - deviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { - - onChanged(); - return getDeviceIdFieldBuilder().getBuilder(); - } - /** - * .context.DeviceId device_id = 2; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - if (deviceIdBuilder_ != null) { - return deviceIdBuilder_.getMessageOrBuilder(); - } else { - return deviceId_ == null ? - context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - } - /** - * .context.DeviceId device_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> - getDeviceIdFieldBuilder() { - if (deviceIdBuilder_ == null) { - deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( - getDeviceId(), - getParentForChildren(), - isClean()); - deviceId_ = null; - } - return deviceIdBuilder_; - } - - private context.ContextOuterClass.Uuid endpointUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> endpointUuidBuilder_; - /** - * .context.Uuid endpoint_uuid = 3; - * @return Whether the endpointUuid field is set. - */ - public boolean hasEndpointUuid() { - return endpointUuidBuilder_ != null || endpointUuid_ != null; - } - /** - * .context.Uuid endpoint_uuid = 3; - * @return The endpointUuid. - */ - public context.ContextOuterClass.Uuid getEndpointUuid() { - if (endpointUuidBuilder_ == null) { - return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; - } else { - return endpointUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - public Builder setEndpointUuid(context.ContextOuterClass.Uuid value) { - if (endpointUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointUuid_ = value; - onChanged(); - } else { - endpointUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - public Builder setEndpointUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (endpointUuidBuilder_ == null) { - endpointUuid_ = builderForValue.build(); - onChanged(); - } else { - endpointUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - public Builder mergeEndpointUuid(context.ContextOuterClass.Uuid value) { - if (endpointUuidBuilder_ == null) { - if (endpointUuid_ != null) { - endpointUuid_ = - context.ContextOuterClass.Uuid.newBuilder(endpointUuid_).mergeFrom(value).buildPartial(); - } else { - endpointUuid_ = value; - } - onChanged(); - } else { - endpointUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - public Builder clearEndpointUuid() { - if (endpointUuidBuilder_ == null) { - endpointUuid_ = null; - onChanged(); - } else { - endpointUuid_ = null; - endpointUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - public context.ContextOuterClass.Uuid.Builder getEndpointUuidBuilder() { - - onChanged(); - return getEndpointUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { - if (endpointUuidBuilder_ != null) { - return endpointUuidBuilder_.getMessageOrBuilder(); - } else { - return endpointUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; - } - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getEndpointUuidFieldBuilder() { - if (endpointUuidBuilder_ == null) { - endpointUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getEndpointUuid(), - getParentForChildren(), - isClean()); - endpointUuid_ = null; - } - return endpointUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.EndPointId) - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getID().hashCode(); + hash = (37 * hash) + SRC_PORT_FIELD_NUMBER; + hash = (53 * hash) + getSrcPort().hashCode(); + hash = (37 * hash) + DST_PORT_FIELD_NUMBER; + hash = (53 * hash) + getDstPort().hashCode(); + hash = (37 * hash) + LOCAL_PEER_PORT_FIELD_NUMBER; + hash = (53 * hash) + getLocalPeerPort().hashCode(); + hash = (37 * hash) + REMOTE_PEER_PORT_FIELD_NUMBER; + hash = (53 * hash) + getRemotePeerPort().hashCode(); + if (getCSlotsCount() > 0) { + hash = (37 * hash) + C_SLOTS_FIELD_NUMBER; + hash = (53 * hash) + getCSlotsList().hashCode(); + } + if (getLSlotsCount() > 0) { + hash = (37 * hash) + L_SLOTS_FIELD_NUMBER; + hash = (53 * hash) + getLSlotsList().hashCode(); + } + if (getSSlotsCount() > 0) { + hash = (37 * hash) + S_SLOTS_FIELD_NUMBER; + hash = (53 * hash) + getSSlotsList().hashCode(); + } + hash = (37 * hash) + LENGTH_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getLength()); + hash = (37 * hash) + USED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUsed()); + if (hasFiberUuid()) { + hash = (37 * hash) + FIBER_UUID_FIELD_NUMBER; + hash = (53 * hash) + getFiberUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - // @@protoc_insertion_point(class_scope:context.EndPointId) - private static final context.ContextOuterClass.EndPointId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointId(); - } + public static context.ContextOuterClass.Fiber parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static context.ContextOuterClass.EndPointId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Fiber parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public context.ContextOuterClass.EndPointId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Fiber parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - } + public static context.ContextOuterClass.Fiber parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public interface EndPointOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.EndPoint) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.Fiber parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - boolean hasEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - context.ContextOuterClass.EndPointId getEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + public static context.ContextOuterClass.Fiber parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + public static context.ContextOuterClass.Fiber parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - /** - * string endpoint_type = 3; - * @return The endpointType. - */ - java.lang.String getEndpointType(); - /** - * string endpoint_type = 3; - * @return The bytes for endpointType. - */ - com.google.protobuf.ByteString - getEndpointTypeBytes(); + public static context.ContextOuterClass.Fiber parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return A list containing the kpiSampleTypes. - */ - java.util.List getKpiSampleTypesList(); - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return The count of kpiSampleTypes. - */ - int getKpiSampleTypesCount(); - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the element to return. - * @return The kpiSampleTypes at the given index. - */ - kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleTypes(int index); - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return A list containing the enum numeric values on the wire for kpiSampleTypes. - */ - java.util.List - getKpiSampleTypesValueList(); - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of kpiSampleTypes at the given index. - */ - int getKpiSampleTypesValue(int index); + public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - /** - * .context.Location endpoint_location = 5; - * @return Whether the endpointLocation field is set. - */ - boolean hasEndpointLocation(); - /** - * .context.Location endpoint_location = 5; - * @return The endpointLocation. - */ - context.ContextOuterClass.Location getEndpointLocation(); - /** - * .context.Location endpoint_location = 5; - */ - context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder(); - } - /** - * Protobuf type {@code context.EndPoint} - */ - public static final class EndPoint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.EndPoint) - EndPointOrBuilder { - private static final long serialVersionUID = 0L; - // Use EndPoint.newBuilder() to construct. - private EndPoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EndPoint() { - name_ = ""; - endpointType_ = ""; - kpiSampleTypes_ = java.util.Collections.emptyList(); - } + public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EndPoint(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @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(); - 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(); - 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; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPoint.class, context.ContextOuterClass.EndPoint.Builder.class); - } + public static Builder newBuilder(context.ContextOuterClass.Fiber prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static final int ENDPOINT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.EndPointId endpointId_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - @java.lang.Override - public boolean hasEndpointId() { - return endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointId() { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public static final int ENDPOINT_TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object endpointType_; - /** - * string endpoint_type = 3; - * @return The endpointType. - */ - @java.lang.Override - public java.lang.String getEndpointType() { - java.lang.Object ref = endpointType_; - 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(); - endpointType_ = s; - return s; - } - } - /** - * string endpoint_type = 3; - * @return The bytes for endpointType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEndpointTypeBytes() { - java.lang.Object ref = endpointType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * Protobuf type {@code context.Fiber} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Fiber) + context.ContextOuterClass.FiberOrBuilder { - public static final int KPI_SAMPLE_TYPES_FIELD_NUMBER = 4; - private java.util.List 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); - return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; - } - }; - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return A list containing the kpiSampleTypes. - */ - @java.lang.Override - public java.util.List getKpiSampleTypesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, kpi_sample_types.KpiSampleTypes.KpiSampleType>(kpiSampleTypes_, kpiSampleTypes_converter_); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return The count of kpiSampleTypes. - */ - @java.lang.Override - public int getKpiSampleTypesCount() { - return kpiSampleTypes_.size(); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the element to return. - * @return The kpiSampleTypes at the given index. - */ - @java.lang.Override - public kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleTypes(int index) { - return kpiSampleTypes_converter_.convert(kpiSampleTypes_.get(index)); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return A list containing the enum numeric values on the wire for kpiSampleTypes. - */ - @java.lang.Override - public java.util.List - getKpiSampleTypesValueList() { - return kpiSampleTypes_; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of kpiSampleTypes at the given index. - */ - @java.lang.Override - public int getKpiSampleTypesValue(int index) { - return kpiSampleTypes_.get(index); - } - private int kpiSampleTypesMemoizedSerializedSize; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Fiber_descriptor; + } - public static final int ENDPOINT_LOCATION_FIELD_NUMBER = 5; - private context.ContextOuterClass.Location endpointLocation_; - /** - * .context.Location endpoint_location = 5; - * @return Whether the endpointLocation field is set. - */ - @java.lang.Override - public boolean hasEndpointLocation() { - return endpointLocation_ != null; - } - /** - * .context.Location endpoint_location = 5; - * @return The endpointLocation. - */ - @java.lang.Override - public context.ContextOuterClass.Location getEndpointLocation() { - return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; - } - /** - * .context.Location endpoint_location = 5; - */ - @java.lang.Override - public context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder() { - return getEndpointLocation(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Fiber_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Fiber.class, context.ContextOuterClass.Fiber.Builder.class); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + // Construct using context.ContextOuterClass.Fiber.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - memoizedIsInitialized = 1; - return true; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (endpointId_ != null) { - output.writeMessage(1, getEndpointId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (!getEndpointTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointType_); - } - if (getKpiSampleTypesList().size() > 0) { - output.writeUInt32NoTag(34); - output.writeUInt32NoTag(kpiSampleTypesMemoizedSerializedSize); - } - for (int i = 0; i < kpiSampleTypes_.size(); i++) { - output.writeEnumNoTag(kpiSampleTypes_.get(i)); - } - if (endpointLocation_ != null) { - output.writeMessage(5, getEndpointLocation()); - } - unknownFields.writeTo(output); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (endpointId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEndpointId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (!getEndpointTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointType_); - } - { - int dataSize = 0; - for (int i = 0; i < kpiSampleTypes_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(kpiSampleTypes_.get(i)); - } - size += dataSize; - if (!getKpiSampleTypesList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }kpiSampleTypesMemoizedSerializedSize = dataSize; - } - if (endpointLocation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getEndpointLocation()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder clear() { + super.clear(); + 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; + fiberUuidBuilder_ = null; + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.EndPoint)) { - return super.equals(obj); - } - context.ContextOuterClass.EndPoint other = (context.ContextOuterClass.EndPoint) obj; - - if (hasEndpointId() != other.hasEndpointId()) return false; - if (hasEndpointId()) { - if (!getEndpointId() - .equals(other.getEndpointId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getEndpointType() - .equals(other.getEndpointType())) return false; - if (!kpiSampleTypes_.equals(other.kpiSampleTypes_)) return false; - if (hasEndpointLocation() != other.hasEndpointLocation()) return false; - if (hasEndpointLocation()) { - if (!getEndpointLocation() - .equals(other.getEndpointLocation())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Fiber_descriptor; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEndpointId()) { - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ENDPOINT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getEndpointType().hashCode(); - if (getKpiSampleTypesCount() > 0) { - hash = (37 * hash) + KPI_SAMPLE_TYPES_FIELD_NUMBER; - hash = (53 * hash) + kpiSampleTypes_.hashCode(); - } - if (hasEndpointLocation()) { - hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getEndpointLocation().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public context.ContextOuterClass.Fiber getDefaultInstanceForType() { + return context.ContextOuterClass.Fiber.getDefaultInstance(); + } - public static context.ContextOuterClass.EndPoint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPoint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPoint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPoint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPoint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPoint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPoint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPoint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPoint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPoint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPoint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPoint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public context.ContextOuterClass.Fiber build() { + context.ContextOuterClass.Fiber result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.EndPoint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @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)) { + cSlots_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cSlots_ = cSlots_; + if (((bitField0_ & 0x00000002) != 0)) { + lSlots_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.lSlots_ = lSlots_; + if (((bitField0_ & 0x00000004) != 0)) { + sSlots_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000004); + } + 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 - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.EndPoint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.EndPoint) - context.ContextOuterClass.EndPointOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_EndPoint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPoint.class, context.ContextOuterClass.EndPoint.Builder.class); - } - - // 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; - endpointIdBuilder_ = null; - } - name_ = ""; - - endpointType_ = ""; - - kpiSampleTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - if (endpointLocationBuilder_ == null) { - endpointLocation_ = null; - } else { - endpointLocation_ = null; - endpointLocationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_EndPoint_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.EndPoint getDefaultInstanceForType() { - return context.ContextOuterClass.EndPoint.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.EndPoint build() { - context.ContextOuterClass.EndPoint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.EndPoint) { - return mergeFrom((context.ContextOuterClass.EndPoint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.EndPoint other) { - if (other == context.ContextOuterClass.EndPoint.getDefaultInstance()) return this; - if (other.hasEndpointId()) { - mergeEndpointId(other.getEndpointId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getEndpointType().isEmpty()) { - endpointType_ = other.endpointType_; - onChanged(); - } - if (!other.kpiSampleTypes_.isEmpty()) { - if (kpiSampleTypes_.isEmpty()) { - kpiSampleTypes_ = other.kpiSampleTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiSampleTypesIsMutable(); - kpiSampleTypes_.addAll(other.kpiSampleTypes_); - } - onChanged(); - } - if (other.hasEndpointLocation()) { - mergeEndpointLocation(other.getEndpointLocation()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPoint) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - public context.ContextOuterClass.EndPointId getEndpointId() { - if (endpointIdBuilder_ == null) { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } else { - return endpointIdBuilder_.getMessage(); - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - onChanged(); - } else { - endpointIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdBuilder_ == null) { - endpointId_ = builderForValue.build(); - onChanged(); - } else { - endpointIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = - context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); - } else { - endpointId_ = value; - } - onChanged(); - } else { - endpointIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { - - onChanged(); - return getEndpointIdFieldBuilder().getBuilder(); - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - if (endpointIdBuilder_ != null) { - return endpointIdBuilder_.getMessageOrBuilder(); - } else { - return endpointId_ == null ? - context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> - getEndpointIdFieldBuilder() { - if (endpointIdBuilder_ == null) { - endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>( - getEndpointId(), - getParentForChildren(), - isClean()); - endpointId_ = null; - } - return endpointIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object endpointType_ = ""; - /** - * string endpoint_type = 3; - * @return The endpointType. - */ - public java.lang.String getEndpointType() { - java.lang.Object ref = endpointType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string endpoint_type = 3; - * @return The bytes for endpointType. - */ - public com.google.protobuf.ByteString - getEndpointTypeBytes() { - java.lang.Object ref = endpointType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string endpoint_type = 3; - * @param value The endpointType to set. - * @return This builder for chaining. - */ - public Builder setEndpointType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - endpointType_ = value; - onChanged(); - return this; - } - /** - * string endpoint_type = 3; - * @return This builder for chaining. - */ - public Builder clearEndpointType() { - - endpointType_ = getDefaultInstance().getEndpointType(); - onChanged(); - return this; - } - /** - * string endpoint_type = 3; - * @param value The bytes for endpointType to set. - * @return This builder for chaining. - */ - public Builder setEndpointTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - endpointType_ = value; - onChanged(); - return this; - } - - private java.util.List kpiSampleTypes_ = - java.util.Collections.emptyList(); - private void ensureKpiSampleTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiSampleTypes_ = new java.util.ArrayList(kpiSampleTypes_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return A list containing the kpiSampleTypes. - */ - public java.util.List getKpiSampleTypesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, kpi_sample_types.KpiSampleTypes.KpiSampleType>(kpiSampleTypes_, kpiSampleTypes_converter_); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return The count of kpiSampleTypes. - */ - public int getKpiSampleTypesCount() { - return kpiSampleTypes_.size(); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the element to return. - * @return The kpiSampleTypes at the given index. - */ - public kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleTypes(int index) { - return kpiSampleTypes_converter_.convert(kpiSampleTypes_.get(index)); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index to set the value at. - * @param value The kpiSampleTypes to set. - * @return This builder for chaining. - */ - public Builder setKpiSampleTypes( - int index, kpi_sample_types.KpiSampleTypes.KpiSampleType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiSampleTypesIsMutable(); - kpiSampleTypes_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param value The kpiSampleTypes to add. - * @return This builder for chaining. - */ - public Builder addKpiSampleTypes(kpi_sample_types.KpiSampleTypes.KpiSampleType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiSampleTypesIsMutable(); - kpiSampleTypes_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param values The kpiSampleTypes to add. - * @return This builder for chaining. - */ - public Builder addAllKpiSampleTypes( - java.lang.Iterable values) { - ensureKpiSampleTypesIsMutable(); - for (kpi_sample_types.KpiSampleTypes.KpiSampleType value : values) { - kpiSampleTypes_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return This builder for chaining. - */ - public Builder clearKpiSampleTypes() { - kpiSampleTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return A list containing the enum numeric values on the wire for kpiSampleTypes. - */ - public java.util.List - getKpiSampleTypesValueList() { - return java.util.Collections.unmodifiableList(kpiSampleTypes_); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of kpiSampleTypes at the given index. - */ - public int getKpiSampleTypesValue(int index) { - return kpiSampleTypes_.get(index); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of kpiSampleTypes at the given index. - * @return This builder for chaining. - */ - public Builder setKpiSampleTypesValue( - int index, int value) { - ensureKpiSampleTypesIsMutable(); - kpiSampleTypes_.set(index, value); - onChanged(); - return this; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param value The enum numeric value on the wire for kpiSampleTypes to add. - * @return This builder for chaining. - */ - public Builder addKpiSampleTypesValue(int value) { - ensureKpiSampleTypesIsMutable(); - kpiSampleTypes_.add(value); - onChanged(); - return this; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param values The enum numeric values on the wire for kpiSampleTypes to add. - * @return This builder for chaining. - */ - public Builder addAllKpiSampleTypesValue( - java.lang.Iterable values) { - ensureKpiSampleTypesIsMutable(); - for (int value : values) { - kpiSampleTypes_.add(value); - } - onChanged(); - return this; - } - - private context.ContextOuterClass.Location endpointLocation_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Location, context.ContextOuterClass.Location.Builder, context.ContextOuterClass.LocationOrBuilder> endpointLocationBuilder_; - /** - * .context.Location endpoint_location = 5; - * @return Whether the endpointLocation field is set. - */ - public boolean hasEndpointLocation() { - return endpointLocationBuilder_ != null || endpointLocation_ != null; - } - /** - * .context.Location endpoint_location = 5; - * @return The endpointLocation. - */ - public context.ContextOuterClass.Location getEndpointLocation() { - if (endpointLocationBuilder_ == null) { - return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; - } else { - return endpointLocationBuilder_.getMessage(); - } - } - /** - * .context.Location endpoint_location = 5; - */ - public Builder setEndpointLocation(context.ContextOuterClass.Location value) { - if (endpointLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointLocation_ = value; - onChanged(); - } else { - endpointLocationBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Location endpoint_location = 5; - */ - public Builder setEndpointLocation( - context.ContextOuterClass.Location.Builder builderForValue) { - if (endpointLocationBuilder_ == null) { - endpointLocation_ = builderForValue.build(); - onChanged(); - } else { - endpointLocationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Location endpoint_location = 5; - */ - public Builder mergeEndpointLocation(context.ContextOuterClass.Location value) { - if (endpointLocationBuilder_ == null) { - if (endpointLocation_ != null) { - endpointLocation_ = - context.ContextOuterClass.Location.newBuilder(endpointLocation_).mergeFrom(value).buildPartial(); - } else { - endpointLocation_ = value; - } - onChanged(); - } else { - endpointLocationBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Location endpoint_location = 5; - */ - public Builder clearEndpointLocation() { - if (endpointLocationBuilder_ == null) { - endpointLocation_ = null; - onChanged(); - } else { - endpointLocation_ = null; - endpointLocationBuilder_ = null; - } - - return this; - } - /** - * .context.Location endpoint_location = 5; - */ - public context.ContextOuterClass.Location.Builder getEndpointLocationBuilder() { - - onChanged(); - return getEndpointLocationFieldBuilder().getBuilder(); - } - /** - * .context.Location endpoint_location = 5; - */ - public context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder() { - if (endpointLocationBuilder_ != null) { - return endpointLocationBuilder_.getMessageOrBuilder(); - } else { - return endpointLocation_ == null ? - context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; - } - } - /** - * .context.Location endpoint_location = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Location, context.ContextOuterClass.Location.Builder, context.ContextOuterClass.LocationOrBuilder> - getEndpointLocationFieldBuilder() { - if (endpointLocationBuilder_ == null) { - endpointLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Location, context.ContextOuterClass.Location.Builder, context.ContextOuterClass.LocationOrBuilder>( - getEndpointLocation(), - getParentForChildren(), - isClean()); - endpointLocation_ = null; - } - return endpointLocationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.EndPoint) - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - // @@protoc_insertion_point(class_scope:context.EndPoint) - private static final context.ContextOuterClass.EndPoint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.EndPoint(); - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static context.ContextOuterClass.EndPoint getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @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 context.ContextOuterClass.EndPoint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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.Fiber) { + return mergeFrom((context.ContextOuterClass.Fiber) other); + } else { + super.mergeFrom(other); + return this; + } + } - public interface EndPointNameOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.EndPointName) - com.google.protobuf.MessageOrBuilder { + public Builder mergeFrom(context.ContextOuterClass.Fiber other) { + if (other == context.ContextOuterClass.Fiber.getDefaultInstance()) + return this; + if (!other.getID().isEmpty()) { + iD_ = other.iD_; + onChanged(); + } + if (!other.getSrcPort().isEmpty()) { + srcPort_ = other.srcPort_; + onChanged(); + } + if (!other.getDstPort().isEmpty()) { + dstPort_ = other.dstPort_; + onChanged(); + } + if (!other.getLocalPeerPort().isEmpty()) { + localPeerPort_ = other.localPeerPort_; + onChanged(); + } + if (!other.getRemotePeerPort().isEmpty()) { + remotePeerPort_ = other.remotePeerPort_; + onChanged(); + } + if (!other.cSlots_.isEmpty()) { + if (cSlots_.isEmpty()) { + cSlots_ = other.cSlots_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCSlotsIsMutable(); + cSlots_.addAll(other.cSlots_); + } + onChanged(); + } + if (!other.lSlots_.isEmpty()) { + if (lSlots_.isEmpty()) { + lSlots_ = other.lSlots_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLSlotsIsMutable(); + lSlots_.addAll(other.lSlots_); + } + onChanged(); + } + if (!other.sSlots_.isEmpty()) { + if (sSlots_.isEmpty()) { + sSlots_ = other.sSlots_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSSlotsIsMutable(); + sSlots_.addAll(other.sSlots_); + } + onChanged(); + } + if (other.getLength() != 0F) { + setLength(other.getLength()); + } + if (other.getUsed() != false) { + setUsed(other.getUsed()); + } + if (other.hasFiberUuid()) { + mergeFiberUuid(other.getFiberUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - boolean hasEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - context.ContextOuterClass.EndPointId getEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * string device_name = 2; - * @return The deviceName. - */ - java.lang.String getDeviceName(); - /** - * string device_name = 2; - * @return The bytes for deviceName. - */ - com.google.protobuf.ByteString - getDeviceNameBytes(); + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Fiber) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - /** - * string endpoint_name = 3; - * @return The endpointName. - */ - java.lang.String getEndpointName(); - /** - * string endpoint_name = 3; - * @return The bytes for endpointName. - */ - com.google.protobuf.ByteString - getEndpointNameBytes(); + private int bitField0_; + + private java.lang.Object iD_ = ""; + + /** + * string ID = 10; + * @return The iD. + */ + public java.lang.String getID() { + java.lang.Object ref = iD_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iD_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * string endpoint_type = 4; - * @return The endpointType. - */ - java.lang.String getEndpointType(); - /** - * string endpoint_type = 4; - * @return The bytes for endpointType. - */ - com.google.protobuf.ByteString - getEndpointTypeBytes(); - } - /** - * Protobuf type {@code context.EndPointName} - */ - public static final class EndPointName extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.EndPointName) - EndPointNameOrBuilder { - private static final long serialVersionUID = 0L; - // Use EndPointName.newBuilder() to construct. - private EndPointName(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EndPointName() { - deviceName_ = ""; - endpointName_ = ""; - endpointType_ = ""; - } + /** + * string ID = 10; + * @return The bytes for iD. + */ + public com.google.protobuf.ByteString getIDBytes() { + java.lang.Object ref = iD_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iD_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EndPointName(); - } + /** + * string ID = 10; + * @param value The iD to set. + * @return This builder for chaining. + */ + public Builder setID(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + iD_ = value; + onChanged(); + return this; + } - @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; - } + /** + * string ID = 10; + * @return This builder for chaining. + */ + public Builder clearID() { + iD_ = getDefaultInstance().getID(); + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointName_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointName.class, context.ContextOuterClass.EndPointName.Builder.class); - } + /** + * string ID = 10; + * @param value The bytes for iD to set. + * @return This builder for chaining. + */ + public Builder setIDBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + iD_ = value; + onChanged(); + return this; + } - public static final int ENDPOINT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.EndPointId endpointId_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - @java.lang.Override - public boolean hasEndpointId() { - return endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointId() { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); - } + private java.lang.Object srcPort_ = ""; + + /** + * string src_port = 1; + * @return The srcPort. + */ + public java.lang.String getSrcPort() { + java.lang.Object ref = srcPort_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcPort_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static final int DEVICE_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object deviceName_; - /** - * string device_name = 2; - * @return The deviceName. - */ - @java.lang.Override - public java.lang.String getDeviceName() { - java.lang.Object ref = deviceName_; - 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(); - deviceName_ = s; - return s; - } - } - /** - * string device_name = 2; - * @return The bytes for deviceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDeviceNameBytes() { - java.lang.Object ref = deviceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deviceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * string src_port = 1; + * @return The bytes for srcPort. + */ + public com.google.protobuf.ByteString getSrcPortBytes() { + java.lang.Object ref = srcPort_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static final int ENDPOINT_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object endpointName_; - /** - * string endpoint_name = 3; - * @return The endpointName. - */ - @java.lang.Override - public java.lang.String getEndpointName() { - java.lang.Object ref = endpointName_; - 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(); - endpointName_ = s; - return s; - } - } - /** - * string endpoint_name = 3; - * @return The bytes for endpointName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEndpointNameBytes() { - java.lang.Object ref = endpointName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * string src_port = 1; + * @param value The srcPort to set. + * @return This builder for chaining. + */ + public Builder setSrcPort(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + srcPort_ = value; + onChanged(); + return this; + } - public static final int ENDPOINT_TYPE_FIELD_NUMBER = 4; - private volatile java.lang.Object endpointType_; - /** - * string endpoint_type = 4; - * @return The endpointType. - */ - @java.lang.Override - public java.lang.String getEndpointType() { - java.lang.Object ref = endpointType_; - 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(); - endpointType_ = s; - return s; - } - } - /** - * string endpoint_type = 4; - * @return The bytes for endpointType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEndpointTypeBytes() { - java.lang.Object ref = endpointType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * string src_port = 1; + * @return This builder for chaining. + */ + public Builder clearSrcPort() { + srcPort_ = getDefaultInstance().getSrcPort(); + onChanged(); + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * string src_port = 1; + * @param value The bytes for srcPort to set. + * @return This builder for chaining. + */ + public Builder setSrcPortBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + srcPort_ = value; + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + private java.lang.Object dstPort_ = ""; + + /** + * string dst_port = 2; + * @return The dstPort. + */ + public java.lang.String getDstPort() { + java.lang.Object ref = dstPort_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dstPort_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (endpointId_ != null) { - output.writeMessage(1, getEndpointId()); - } - if (!getDeviceNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceName_); - } - if (!getEndpointNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointName_); - } - if (!getEndpointTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, endpointType_); - } - unknownFields.writeTo(output); - } + /** + * string dst_port = 2; + * @return The bytes for dstPort. + */ + public com.google.protobuf.ByteString getDstPortBytes() { + java.lang.Object ref = dstPort_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (endpointId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEndpointId()); - } - if (!getDeviceNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceName_); - } - if (!getEndpointNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointName_); - } - if (!getEndpointTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, endpointType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * string dst_port = 2; + * @param value The dstPort to set. + * @return This builder for chaining. + */ + public Builder setDstPort(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dstPort_ = value; + onChanged(); + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.EndPointName)) { - return super.equals(obj); - } - context.ContextOuterClass.EndPointName other = (context.ContextOuterClass.EndPointName) obj; - - if (hasEndpointId() != other.hasEndpointId()) return false; - if (hasEndpointId()) { - if (!getEndpointId() - .equals(other.getEndpointId())) return false; - } - if (!getDeviceName() - .equals(other.getDeviceName())) return false; - if (!getEndpointName() - .equals(other.getEndpointName())) return false; - if (!getEndpointType() - .equals(other.getEndpointType())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string dst_port = 2; + * @return This builder for chaining. + */ + public Builder clearDstPort() { + dstPort_ = getDefaultInstance().getDstPort(); + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEndpointId()) { - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - } - hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDeviceName().hashCode(); - hash = (37 * hash) + ENDPOINT_NAME_FIELD_NUMBER; - hash = (53 * hash) + getEndpointName().hashCode(); - hash = (37 * hash) + ENDPOINT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getEndpointType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * string dst_port = 2; + * @param value The bytes for dstPort to set. + * @return This builder for chaining. + */ + public Builder setDstPortBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dstPort_ = value; + onChanged(); + return this; + } - public static context.ContextOuterClass.EndPointName parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointName parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointName parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointName parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointName parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointName parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointName parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointName parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointName parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointName parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointName parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointName parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private java.lang.Object localPeerPort_ = ""; + + /** + * string local_peer_port = 3; + * @return The localPeerPort. + */ + public java.lang.String getLocalPeerPort() { + java.lang.Object ref = localPeerPort_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + localPeerPort_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.EndPointName prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * string local_peer_port = 3; + * @return The bytes for localPeerPort. + */ + public com.google.protobuf.ByteString getLocalPeerPortBytes() { + java.lang.Object ref = localPeerPort_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + localPeerPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.EndPointName} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.EndPointName) - context.ContextOuterClass.EndPointNameOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_EndPointName_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointName_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointName.class, context.ContextOuterClass.EndPointName.Builder.class); - } - - // 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; - endpointIdBuilder_ = null; - } - deviceName_ = ""; - - endpointName_ = ""; - - endpointType_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_EndPointName_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.EndPointName getDefaultInstanceForType() { - return context.ContextOuterClass.EndPointName.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.EndPointName build() { - context.ContextOuterClass.EndPointName result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.EndPointName) { - return mergeFrom((context.ContextOuterClass.EndPointName)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.EndPointName other) { - if (other == context.ContextOuterClass.EndPointName.getDefaultInstance()) return this; - if (other.hasEndpointId()) { - mergeEndpointId(other.getEndpointId()); - } - if (!other.getDeviceName().isEmpty()) { - deviceName_ = other.deviceName_; - onChanged(); - } - if (!other.getEndpointName().isEmpty()) { - endpointName_ = other.endpointName_; - onChanged(); - } - if (!other.getEndpointType().isEmpty()) { - endpointType_ = other.endpointType_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPointName) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.EndPointId endpointId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - public context.ContextOuterClass.EndPointId getEndpointId() { - if (endpointIdBuilder_ == null) { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } else { - return endpointIdBuilder_.getMessage(); - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - onChanged(); - } else { - endpointIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdBuilder_ == null) { - endpointId_ = builderForValue.build(); - onChanged(); - } else { - endpointIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = - context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); - } else { - endpointId_ = value; - } - onChanged(); - } else { - endpointIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { - - onChanged(); - return getEndpointIdFieldBuilder().getBuilder(); - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - if (endpointIdBuilder_ != null) { - return endpointIdBuilder_.getMessageOrBuilder(); - } else { - return endpointId_ == null ? - context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> - getEndpointIdFieldBuilder() { - if (endpointIdBuilder_ == null) { - endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>( - getEndpointId(), - getParentForChildren(), - isClean()); - endpointId_ = null; - } - return endpointIdBuilder_; - } - - private java.lang.Object deviceName_ = ""; - /** - * string device_name = 2; - * @return The deviceName. - */ - public java.lang.String getDeviceName() { - java.lang.Object ref = deviceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - deviceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string device_name = 2; - * @return The bytes for deviceName. - */ - public com.google.protobuf.ByteString - getDeviceNameBytes() { - java.lang.Object ref = deviceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deviceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string device_name = 2; - * @param value The deviceName to set. - * @return This builder for chaining. - */ - public Builder setDeviceName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - deviceName_ = value; - onChanged(); - return this; - } - /** - * string device_name = 2; - * @return This builder for chaining. - */ - public Builder clearDeviceName() { - - deviceName_ = getDefaultInstance().getDeviceName(); - onChanged(); - return this; - } - /** - * string device_name = 2; - * @param value The bytes for deviceName to set. - * @return This builder for chaining. - */ - public Builder setDeviceNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - deviceName_ = value; - onChanged(); - return this; - } - - private java.lang.Object endpointName_ = ""; - /** - * string endpoint_name = 3; - * @return The endpointName. - */ - public java.lang.String getEndpointName() { - java.lang.Object ref = endpointName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string endpoint_name = 3; - * @return The bytes for endpointName. - */ - public com.google.protobuf.ByteString - getEndpointNameBytes() { - java.lang.Object ref = endpointName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string endpoint_name = 3; - * @param value The endpointName to set. - * @return This builder for chaining. - */ - public Builder setEndpointName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - endpointName_ = value; - onChanged(); - return this; - } - /** - * string endpoint_name = 3; - * @return This builder for chaining. - */ - public Builder clearEndpointName() { - - endpointName_ = getDefaultInstance().getEndpointName(); - onChanged(); - return this; - } - /** - * string endpoint_name = 3; - * @param value The bytes for endpointName to set. - * @return This builder for chaining. - */ - public Builder setEndpointNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - endpointName_ = value; - onChanged(); - return this; - } - - private java.lang.Object endpointType_ = ""; - /** - * string endpoint_type = 4; - * @return The endpointType. - */ - public java.lang.String getEndpointType() { - java.lang.Object ref = endpointType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string endpoint_type = 4; - * @return The bytes for endpointType. - */ - public com.google.protobuf.ByteString - getEndpointTypeBytes() { - java.lang.Object ref = endpointType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string endpoint_type = 4; - * @param value The endpointType to set. - * @return This builder for chaining. - */ - public Builder setEndpointType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - endpointType_ = value; - onChanged(); - return this; - } - /** - * string endpoint_type = 4; - * @return This builder for chaining. - */ - public Builder clearEndpointType() { - - endpointType_ = getDefaultInstance().getEndpointType(); - onChanged(); - return this; - } - /** - * string endpoint_type = 4; - * @param value The bytes for endpointType to set. - * @return This builder for chaining. - */ - public Builder setEndpointTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - endpointType_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.EndPointName) - } + /** + * string local_peer_port = 3; + * @param value The localPeerPort to set. + * @return This builder for chaining. + */ + public Builder setLocalPeerPort(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + localPeerPort_ = value; + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:context.EndPointName) - private static final context.ContextOuterClass.EndPointName DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointName(); - } + /** + * string local_peer_port = 3; + * @return This builder for chaining. + */ + public Builder clearLocalPeerPort() { + localPeerPort_ = getDefaultInstance().getLocalPeerPort(); + onChanged(); + return this; + } - public static context.ContextOuterClass.EndPointName getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * string local_peer_port = 3; + * @param value The bytes for localPeerPort to set. + * @return This builder for chaining. + */ + public Builder setLocalPeerPortBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + localPeerPort_ = value; + onChanged(); + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private java.lang.Object remotePeerPort_ = ""; + + /** + * string remote_peer_port = 4; + * @return The remotePeerPort. + */ + public java.lang.String getRemotePeerPort() { + java.lang.Object ref = remotePeerPort_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remotePeerPort_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * string remote_peer_port = 4; + * @return The bytes for remotePeerPort. + */ + public com.google.protobuf.ByteString getRemotePeerPortBytes() { + java.lang.Object ref = remotePeerPort_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remotePeerPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public context.ContextOuterClass.EndPointName getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * string remote_peer_port = 4; + * @param value The remotePeerPort to set. + * @return This builder for chaining. + */ + public Builder setRemotePeerPort(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + remotePeerPort_ = value; + onChanged(); + return this; + } - } + /** + * string remote_peer_port = 4; + * @return This builder for chaining. + */ + public Builder clearRemotePeerPort() { + remotePeerPort_ = getDefaultInstance().getRemotePeerPort(); + onChanged(); + return this; + } - public interface EndPointIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.EndPointIdList) - com.google.protobuf.MessageOrBuilder { + /** + * string remote_peer_port = 4; + * @param value The bytes for remotePeerPort to set. + * @return This builder for chaining. + */ + public Builder setRemotePeerPortBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + remotePeerPort_ = value; + onChanged(); + return this; + } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - java.util.List - getEndpointIdsList(); - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - context.ContextOuterClass.EndPointId getEndpointIds(int index); - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - int getEndpointIdsCount(); - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - java.util.List - getEndpointIdsOrBuilderList(); - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.EndPointIdList} - */ - public static final class EndPointIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.EndPointIdList) - EndPointIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use EndPointIdList.newBuilder() to construct. - private EndPointIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EndPointIdList() { - endpointIds_ = java.util.Collections.emptyList(); - } + private com.google.protobuf.Internal.IntList cSlots_ = emptyIntList(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EndPointIdList(); - } + private void ensureCSlotsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cSlots_ = mutableCopy(cSlots_); + bitField0_ |= 0x00000001; + } + } - @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(); - 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; - } + /** + * repeated int32 c_slots = 5; + * @return A list containing the cSlots. + */ + public java.util.List getCSlotsList() { + return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(cSlots_) : cSlots_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointIdList.class, context.ContextOuterClass.EndPointIdList.Builder.class); - } + /** + * repeated int32 c_slots = 5; + * @return The count of cSlots. + */ + public int getCSlotsCount() { + return cSlots_.size(); + } - public static final int ENDPOINT_IDS_FIELD_NUMBER = 1; - private java.util.List endpointIds_; - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - @java.lang.Override - public java.util.List getEndpointIdsList() { - return endpointIds_; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - @java.lang.Override - public java.util.List - getEndpointIdsOrBuilderList() { - return endpointIds_; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - @java.lang.Override - public int getEndpointIdsCount() { - return endpointIds_.size(); - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointIds(int index) { - return endpointIds_.get(index); - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder( - int index) { - return endpointIds_.get(index); - } + /** + * repeated int32 c_slots = 5; + * @param index The index of the element to return. + * @return The cSlots at the given index. + */ + public int getCSlots(int index) { + return cSlots_.getInt(index); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated int32 c_slots = 5; + * @param index The index to set the value at. + * @param value The cSlots to set. + * @return This builder for chaining. + */ + public Builder setCSlots(int index, int value) { + ensureCSlotsIsMutable(); + cSlots_.setInt(index, value); + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated int32 c_slots = 5; + * @param value The cSlots to add. + * @return This builder for chaining. + */ + public Builder addCSlots(int value) { + ensureCSlotsIsMutable(); + cSlots_.addInt(value); + onChanged(); + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < endpointIds_.size(); i++) { - output.writeMessage(1, endpointIds_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * repeated int32 c_slots = 5; + * @param values The cSlots to add. + * @return This builder for chaining. + */ + public Builder addAllCSlots(java.lang.Iterable values) { + ensureCSlotsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cSlots_); + onChanged(); + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < endpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, endpointIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated int32 c_slots = 5; + * @return This builder for chaining. + */ + public Builder clearCSlots() { + cSlots_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.EndPointIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.EndPointIdList other = (context.ContextOuterClass.EndPointIdList) obj; - - if (!getEndpointIdsList() - .equals(other.getEndpointIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private com.google.protobuf.Internal.IntList lSlots_ = emptyIntList(); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getEndpointIdsCount() > 0) { - hash = (37 * hash) + ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getEndpointIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private void ensureLSlotsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + lSlots_ = mutableCopy(lSlots_); + bitField0_ |= 0x00000002; + } + } - public static context.ContextOuterClass.EndPointIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated int32 l_slots = 6; + * @return A list containing the lSlots. + */ + public java.util.List getLSlotsList() { + return ((bitField0_ & 0x00000002) != 0) ? java.util.Collections.unmodifiableList(lSlots_) : lSlots_; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.EndPointIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated int32 l_slots = 6; + * @return The count of lSlots. + */ + public int getLSlotsCount() { + return lSlots_.size(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.EndPointIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.EndPointIdList) - context.ContextOuterClass.EndPointIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_EndPointIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointIdList.class, context.ContextOuterClass.EndPointIdList.Builder.class); - } - - // 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(); - if (endpointIdsBuilder_ == null) { - endpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - endpointIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_EndPointIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.EndPointIdList getDefaultInstanceForType() { - return context.ContextOuterClass.EndPointIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.EndPointIdList build() { - context.ContextOuterClass.EndPointIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.EndPointIdList buildPartial() { - context.ContextOuterClass.EndPointIdList result = new context.ContextOuterClass.EndPointIdList(this); - int from_bitField0_ = bitField0_; - if (endpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.endpointIds_ = endpointIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.EndPointIdList) { - return mergeFrom((context.ContextOuterClass.EndPointIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.EndPointIdList other) { - if (other == context.ContextOuterClass.EndPointIdList.getDefaultInstance()) return this; - if (endpointIdsBuilder_ == null) { - if (!other.endpointIds_.isEmpty()) { - if (endpointIds_.isEmpty()) { - endpointIds_ = other.endpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureEndpointIdsIsMutable(); - endpointIds_.addAll(other.endpointIds_); - } - onChanged(); - } - } else { - if (!other.endpointIds_.isEmpty()) { - if (endpointIdsBuilder_.isEmpty()) { - endpointIdsBuilder_.dispose(); - endpointIdsBuilder_ = null; - endpointIds_ = other.endpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - endpointIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEndpointIdsFieldBuilder() : null; - } else { - endpointIdsBuilder_.addAllMessages(other.endpointIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPointIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List endpointIds_ = - java.util.Collections.emptyList(); - private void ensureEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - endpointIds_ = new java.util.ArrayList(endpointIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdsBuilder_; - - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public java.util.List getEndpointIdsList() { - if (endpointIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(endpointIds_); - } else { - return endpointIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public int getEndpointIdsCount() { - if (endpointIdsBuilder_ == null) { - return endpointIds_.size(); - } else { - return endpointIdsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public context.ContextOuterClass.EndPointId getEndpointIds(int index) { - if (endpointIdsBuilder_ == null) { - return endpointIds_.get(index); - } else { - return endpointIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder setEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (endpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointIdsIsMutable(); - endpointIds_.set(index, value); - onChanged(); - } else { - endpointIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder setEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.set(index, builderForValue.build()); - onChanged(); - } else { - endpointIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder addEndpointIds(context.ContextOuterClass.EndPointId value) { - if (endpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointIdsIsMutable(); - endpointIds_.add(value); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder addEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (endpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointIdsIsMutable(); - endpointIds_.add(index, value); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder addEndpointIds( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.add(builderForValue.build()); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder addEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.add(index, builderForValue.build()); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder addAllEndpointIds( - java.lang.Iterable values) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, endpointIds_); - onChanged(); - } else { - endpointIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder clearEndpointIds() { - if (endpointIdsBuilder_ == null) { - endpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - endpointIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder removeEndpointIds(int index) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.remove(index); - onChanged(); - } else { - endpointIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdsBuilder( - int index) { - return getEndpointIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder( - int index) { - if (endpointIdsBuilder_ == null) { - return endpointIds_.get(index); } else { - return endpointIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public java.util.List - getEndpointIdsOrBuilderList() { - if (endpointIdsBuilder_ != null) { - return endpointIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(endpointIds_); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder() { - return getEndpointIdsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder( - int index) { - return getEndpointIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public java.util.List - getEndpointIdsBuilderList() { - return getEndpointIdsFieldBuilder().getBuilderList(); - } - 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_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - endpointIds_ = null; - } - return endpointIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.EndPointIdList) - } + /** + * repeated int32 l_slots = 6; + * @param index The index of the element to return. + * @return The lSlots at the given index. + */ + public int getLSlots(int index) { + return lSlots_.getInt(index); + } - // @@protoc_insertion_point(class_scope:context.EndPointIdList) - private static final context.ContextOuterClass.EndPointIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointIdList(); - } + /** + * repeated int32 l_slots = 6; + * @param index The index to set the value at. + * @param value The lSlots to set. + * @return This builder for chaining. + */ + public Builder setLSlots(int index, int value) { + ensureLSlotsIsMutable(); + lSlots_.setInt(index, value); + onChanged(); + return this; + } - public static context.ContextOuterClass.EndPointIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated int32 l_slots = 6; + * @param value The lSlots to add. + * @return This builder for chaining. + */ + public Builder addLSlots(int value) { + ensureLSlotsIsMutable(); + lSlots_.addInt(value); + onChanged(); + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated int32 l_slots = 6; + * @param values The lSlots to add. + * @return This builder for chaining. + */ + public Builder addAllLSlots(java.lang.Iterable values) { + ensureLSlotsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, lSlots_); + onChanged(); + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated int32 l_slots = 6; + * @return This builder for chaining. + */ + public Builder clearLSlots() { + lSlots_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } - @java.lang.Override - public context.ContextOuterClass.EndPointIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.Internal.IntList sSlots_ = emptyIntList(); - } + private void ensureSSlotsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + sSlots_ = mutableCopy(sSlots_); + bitField0_ |= 0x00000004; + } + } - public interface EndPointNameListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.EndPointNameList) - com.google.protobuf.MessageOrBuilder { + /** + * repeated int32 s_slots = 7; + * @return A list containing the sSlots. + */ + public java.util.List getSSlotsList() { + return ((bitField0_ & 0x00000004) != 0) ? java.util.Collections.unmodifiableList(sSlots_) : sSlots_; + } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - java.util.List - getEndpointNamesList(); - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - context.ContextOuterClass.EndPointName getEndpointNames(int index); - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - int getEndpointNamesCount(); - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - java.util.List - getEndpointNamesOrBuilderList(); - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - context.ContextOuterClass.EndPointNameOrBuilder getEndpointNamesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.EndPointNameList} - */ - public static final class EndPointNameList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.EndPointNameList) - EndPointNameListOrBuilder { - private static final long serialVersionUID = 0L; - // Use EndPointNameList.newBuilder() to construct. - private EndPointNameList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EndPointNameList() { - endpointNames_ = java.util.Collections.emptyList(); - } + /** + * repeated int32 s_slots = 7; + * @return The count of sSlots. + */ + public int getSSlotsCount() { + return sSlots_.size(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EndPointNameList(); - } + /** + * repeated int32 s_slots = 7; + * @param index The index of the element to return. + * @return The sSlots at the given index. + */ + public int getSSlots(int index) { + return sSlots_.getInt(index); + } - @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(); - 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; - } + /** + * repeated int32 s_slots = 7; + * @param index The index to set the value at. + * @param value The sSlots to set. + * @return This builder for chaining. + */ + public Builder setSSlots(int index, int value) { + ensureSSlotsIsMutable(); + sSlots_.setInt(index, value); + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointNameList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointNameList.class, context.ContextOuterClass.EndPointNameList.Builder.class); - } + /** + * repeated int32 s_slots = 7; + * @param value The sSlots to add. + * @return This builder for chaining. + */ + public Builder addSSlots(int value) { + ensureSSlotsIsMutable(); + sSlots_.addInt(value); + onChanged(); + return this; + } - public static final int ENDPOINT_NAMES_FIELD_NUMBER = 1; - private java.util.List endpointNames_; - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - @java.lang.Override - public java.util.List getEndpointNamesList() { - return endpointNames_; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - @java.lang.Override - public java.util.List - getEndpointNamesOrBuilderList() { - return endpointNames_; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - @java.lang.Override - public int getEndpointNamesCount() { - return endpointNames_.size(); - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointName getEndpointNames(int index) { - return endpointNames_.get(index); - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointNameOrBuilder getEndpointNamesOrBuilder( - int index) { - return endpointNames_.get(index); - } + /** + * repeated int32 s_slots = 7; + * @param values The sSlots to add. + * @return This builder for chaining. + */ + public Builder addAllSSlots(java.lang.Iterable values) { + ensureSSlotsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sSlots_); + onChanged(); + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated int32 s_slots = 7; + * @return This builder for chaining. + */ + public Builder clearSSlots() { + sSlots_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + private float length_; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < endpointNames_.size(); i++) { - output.writeMessage(1, endpointNames_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * float length = 8; + * @return The length. + */ + @java.lang.Override + public float getLength() { + return length_; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < endpointNames_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, endpointNames_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * float length = 8; + * @param value The length to set. + * @return This builder for chaining. + */ + public Builder setLength(float value) { + length_ = value; + onChanged(); + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.EndPointNameList)) { - return super.equals(obj); - } - context.ContextOuterClass.EndPointNameList other = (context.ContextOuterClass.EndPointNameList) obj; - - if (!getEndpointNamesList() - .equals(other.getEndpointNamesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * float length = 8; + * @return This builder for chaining. + */ + public Builder clearLength() { + length_ = 0F; + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getEndpointNamesCount() > 0) { - hash = (37 * hash) + ENDPOINT_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getEndpointNamesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private boolean used_; - public static context.ContextOuterClass.EndPointNameList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointNameList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointNameList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointNameList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointNameList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * bool used = 9; + * @return The used. + */ + @java.lang.Override + public boolean getUsed() { + return used_; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.EndPointNameList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * bool used = 9; + * @param value The used to set. + * @return This builder for chaining. + */ + public Builder setUsed(boolean value) { + used_ = value; + onChanged(); + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.EndPointNameList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.EndPointNameList) - context.ContextOuterClass.EndPointNameListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_EndPointNameList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointNameList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointNameList.class, context.ContextOuterClass.EndPointNameList.Builder.class); - } - - // 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(); - if (endpointNamesBuilder_ == null) { - endpointNames_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - endpointNamesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_EndPointNameList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.EndPointNameList getDefaultInstanceForType() { - return context.ContextOuterClass.EndPointNameList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.EndPointNameList build() { - context.ContextOuterClass.EndPointNameList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.EndPointNameList buildPartial() { - context.ContextOuterClass.EndPointNameList result = new context.ContextOuterClass.EndPointNameList(this); - int from_bitField0_ = bitField0_; - if (endpointNamesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - endpointNames_ = java.util.Collections.unmodifiableList(endpointNames_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.endpointNames_ = endpointNames_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.EndPointNameList) { - return mergeFrom((context.ContextOuterClass.EndPointNameList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.EndPointNameList other) { - if (other == context.ContextOuterClass.EndPointNameList.getDefaultInstance()) return this; - if (endpointNamesBuilder_ == null) { - if (!other.endpointNames_.isEmpty()) { - if (endpointNames_.isEmpty()) { - endpointNames_ = other.endpointNames_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureEndpointNamesIsMutable(); - endpointNames_.addAll(other.endpointNames_); - } - onChanged(); - } - } else { - if (!other.endpointNames_.isEmpty()) { - if (endpointNamesBuilder_.isEmpty()) { - endpointNamesBuilder_.dispose(); - endpointNamesBuilder_ = null; - endpointNames_ = other.endpointNames_; - bitField0_ = (bitField0_ & ~0x00000001); - endpointNamesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEndpointNamesFieldBuilder() : null; - } else { - endpointNamesBuilder_.addAllMessages(other.endpointNames_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPointNameList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List endpointNames_ = - java.util.Collections.emptyList(); - private void ensureEndpointNamesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - endpointNames_ = new java.util.ArrayList(endpointNames_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointName, context.ContextOuterClass.EndPointName.Builder, context.ContextOuterClass.EndPointNameOrBuilder> endpointNamesBuilder_; - - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public java.util.List getEndpointNamesList() { - if (endpointNamesBuilder_ == null) { - return java.util.Collections.unmodifiableList(endpointNames_); - } else { - return endpointNamesBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public int getEndpointNamesCount() { - if (endpointNamesBuilder_ == null) { - return endpointNames_.size(); - } else { - return endpointNamesBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public context.ContextOuterClass.EndPointName getEndpointNames(int index) { - if (endpointNamesBuilder_ == null) { - return endpointNames_.get(index); - } else { - return endpointNamesBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder setEndpointNames( - int index, context.ContextOuterClass.EndPointName value) { - if (endpointNamesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointNamesIsMutable(); - endpointNames_.set(index, value); - onChanged(); - } else { - endpointNamesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder setEndpointNames( - int index, context.ContextOuterClass.EndPointName.Builder builderForValue) { - if (endpointNamesBuilder_ == null) { - ensureEndpointNamesIsMutable(); - endpointNames_.set(index, builderForValue.build()); - onChanged(); - } else { - endpointNamesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder addEndpointNames(context.ContextOuterClass.EndPointName value) { - if (endpointNamesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointNamesIsMutable(); - endpointNames_.add(value); - onChanged(); - } else { - endpointNamesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder addEndpointNames( - int index, context.ContextOuterClass.EndPointName value) { - if (endpointNamesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointNamesIsMutable(); - endpointNames_.add(index, value); - onChanged(); - } else { - endpointNamesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder addEndpointNames( - context.ContextOuterClass.EndPointName.Builder builderForValue) { - if (endpointNamesBuilder_ == null) { - ensureEndpointNamesIsMutable(); - endpointNames_.add(builderForValue.build()); - onChanged(); - } else { - endpointNamesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder addEndpointNames( - int index, context.ContextOuterClass.EndPointName.Builder builderForValue) { - if (endpointNamesBuilder_ == null) { - ensureEndpointNamesIsMutable(); - endpointNames_.add(index, builderForValue.build()); - onChanged(); - } else { - endpointNamesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder addAllEndpointNames( - java.lang.Iterable values) { - if (endpointNamesBuilder_ == null) { - ensureEndpointNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, endpointNames_); - onChanged(); - } else { - endpointNamesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder clearEndpointNames() { - if (endpointNamesBuilder_ == null) { - endpointNames_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - endpointNamesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder removeEndpointNames(int index) { - if (endpointNamesBuilder_ == null) { - ensureEndpointNamesIsMutable(); - endpointNames_.remove(index); - onChanged(); - } else { - endpointNamesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public context.ContextOuterClass.EndPointName.Builder getEndpointNamesBuilder( - int index) { - return getEndpointNamesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public context.ContextOuterClass.EndPointNameOrBuilder getEndpointNamesOrBuilder( - int index) { - if (endpointNamesBuilder_ == null) { - return endpointNames_.get(index); } else { - return endpointNamesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public java.util.List - getEndpointNamesOrBuilderList() { - if (endpointNamesBuilder_ != null) { - return endpointNamesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(endpointNames_); - } - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public context.ContextOuterClass.EndPointName.Builder addEndpointNamesBuilder() { - return getEndpointNamesFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointName.getDefaultInstance()); - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public context.ContextOuterClass.EndPointName.Builder addEndpointNamesBuilder( - int index) { - return getEndpointNamesFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointName.getDefaultInstance()); - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public java.util.List - getEndpointNamesBuilderList() { - return getEndpointNamesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointName, context.ContextOuterClass.EndPointName.Builder, context.ContextOuterClass.EndPointNameOrBuilder> - getEndpointNamesFieldBuilder() { - if (endpointNamesBuilder_ == null) { - endpointNamesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointName, context.ContextOuterClass.EndPointName.Builder, context.ContextOuterClass.EndPointNameOrBuilder>( - endpointNames_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - endpointNames_ = null; - } - return endpointNamesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.EndPointNameList) - } + /** + * bool used = 9; + * @return This builder for chaining. + */ + public Builder clearUsed() { + used_ = false; + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:context.EndPointNameList) - private static final context.ContextOuterClass.EndPointNameList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointNameList(); - } + private context.ContextOuterClass.FiberId fiberUuid_; - public static context.ContextOuterClass.EndPointNameList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3 fiberUuidBuilder_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.FiberId fiber_uuid = 11; + * @return Whether the fiberUuid field is set. + */ + public boolean hasFiberUuid() { + return fiberUuidBuilder_ != null || fiberUuid_ != null; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.FiberId fiber_uuid = 11; + * @return The fiberUuid. + */ + public context.ContextOuterClass.FiberId getFiberUuid() { + if (fiberUuidBuilder_ == null) { + return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; + } else { + return fiberUuidBuilder_.getMessage(); + } + } - @java.lang.Override - public context.ContextOuterClass.EndPointNameList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.FiberId fiber_uuid = 11; + */ + public Builder setFiberUuid(context.ContextOuterClass.FiberId value) { + if (fiberUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fiberUuid_ = value; + onChanged(); + } else { + fiberUuidBuilder_.setMessage(value); + } + return this; + } - } + /** + * .context.FiberId fiber_uuid = 11; + */ + public Builder setFiberUuid(context.ContextOuterClass.FiberId.Builder builderForValue) { + if (fiberUuidBuilder_ == null) { + fiberUuid_ = builderForValue.build(); + onChanged(); + } else { + fiberUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } - public interface ConfigRule_CustomOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConfigRule_Custom) - com.google.protobuf.MessageOrBuilder { + /** + * .context.FiberId fiber_uuid = 11; + */ + public Builder mergeFiberUuid(context.ContextOuterClass.FiberId value) { + if (fiberUuidBuilder_ == null) { + if (fiberUuid_ != null) { + fiberUuid_ = context.ContextOuterClass.FiberId.newBuilder(fiberUuid_).mergeFrom(value).buildPartial(); + } else { + fiberUuid_ = value; + } + onChanged(); + } else { + fiberUuidBuilder_.mergeFrom(value); + } + return this; + } - /** - * string resource_key = 1; - * @return The resourceKey. - */ - java.lang.String getResourceKey(); - /** - * string resource_key = 1; - * @return The bytes for resourceKey. - */ - com.google.protobuf.ByteString - getResourceKeyBytes(); + /** + * .context.FiberId fiber_uuid = 11; + */ + public Builder clearFiberUuid() { + if (fiberUuidBuilder_ == null) { + fiberUuid_ = null; + onChanged(); + } else { + fiberUuid_ = null; + fiberUuidBuilder_ = null; + } + return this; + } - /** - * string resource_value = 2; - * @return The resourceValue. - */ - java.lang.String getResourceValue(); - /** - * string resource_value = 2; - * @return The bytes for resourceValue. - */ - com.google.protobuf.ByteString - getResourceValueBytes(); - } - /** - * Protobuf type {@code context.ConfigRule_Custom} - */ - public static final class ConfigRule_Custom extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConfigRule_Custom) - ConfigRule_CustomOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfigRule_Custom.newBuilder() to construct. - private ConfigRule_Custom(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConfigRule_Custom() { - resourceKey_ = ""; - resourceValue_ = ""; - } + /** + * .context.FiberId fiber_uuid = 11; + */ + public context.ContextOuterClass.FiberId.Builder getFiberUuidBuilder() { + onChanged(); + return getFiberUuidFieldBuilder().getBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConfigRule_Custom(); - } + /** + * .context.FiberId fiber_uuid = 11; + */ + public context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder() { + if (fiberUuidBuilder_ != null) { + return fiberUuidBuilder_.getMessageOrBuilder(); + } else { + return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; + } + } - @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; - } + /** + * .context.FiberId fiber_uuid = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3 getFiberUuidFieldBuilder() { + if (fiberUuidBuilder_ == null) { + fiberUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getFiberUuid(), getParentForChildren(), isClean()); + fiberUuid_ = null; + } + return fiberUuidBuilder_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConfigRule_Custom.class, context.ContextOuterClass.ConfigRule_Custom.Builder.class); - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public static final int RESOURCE_KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object resourceKey_; - /** - * string resource_key = 1; - * @return The resourceKey. - */ - @java.lang.Override - public java.lang.String getResourceKey() { - java.lang.Object ref = resourceKey_; - 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(); - resourceKey_ = s; - return s; - } - } - /** - * string resource_key = 1; - * @return The bytes for resourceKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceKeyBytes() { - java.lang.Object ref = resourceKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Fiber) + } - public static final int RESOURCE_VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object resourceValue_; - /** - * string resource_value = 2; - * @return The resourceValue. - */ - @java.lang.Override - public java.lang.String getResourceValue() { - java.lang.Object ref = resourceValue_; - 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(); - resourceValue_ = s; - return s; - } - } - /** - * string resource_value = 2; - * @return The bytes for resourceValue. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceValueBytes() { - java.lang.Object ref = resourceValue_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + // @@protoc_insertion_point(class_scope:context.Fiber) + private static final context.ContextOuterClass.Fiber DEFAULT_INSTANCE; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Fiber(); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.Fiber getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getResourceKeyBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceKey_); - } - if (!getResourceValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceValue_); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getResourceKeyBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceKey_); - } - if (!getResourceValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceValue_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @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); + } + }; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConfigRule_Custom)) { - return super.equals(obj); - } - context.ContextOuterClass.ConfigRule_Custom other = (context.ContextOuterClass.ConfigRule_Custom) obj; - - if (!getResourceKey() - .equals(other.getResourceKey())) return false; - if (!getResourceValue() - .equals(other.getResourceValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_KEY_FIELD_NUMBER; - hash = (53 * hash) + getResourceKey().hashCode(); - hash = (37 * hash) + RESOURCE_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getResourceValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_Custom parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule_Custom parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + @java.lang.Override + public context.ContextOuterClass.Fiber getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConfigRule_Custom prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public interface OpticalLinkDetailsOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLinkDetails) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConfigRule_Custom} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConfigRule_Custom) - context.ContextOuterClass.ConfigRule_CustomOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConfigRule_Custom.class, context.ContextOuterClass.ConfigRule_Custom.Builder.class); - } - - // 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(); - resourceKey_ = ""; - - resourceValue_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConfigRule_Custom getDefaultInstanceForType() { - return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConfigRule_Custom build() { - context.ContextOuterClass.ConfigRule_Custom result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConfigRule_Custom) { - return mergeFrom((context.ContextOuterClass.ConfigRule_Custom)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConfigRule_Custom other) { - if (other == context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance()) return this; - if (!other.getResourceKey().isEmpty()) { - resourceKey_ = other.resourceKey_; - onChanged(); - } - if (!other.getResourceValue().isEmpty()) { - resourceValue_ = other.resourceValue_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConfigRule_Custom) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object resourceKey_ = ""; - /** - * string resource_key = 1; - * @return The resourceKey. - */ - public java.lang.String getResourceKey() { - java.lang.Object ref = resourceKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string resource_key = 1; - * @return The bytes for resourceKey. - */ - public com.google.protobuf.ByteString - getResourceKeyBytes() { - java.lang.Object ref = resourceKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string resource_key = 1; - * @param value The resourceKey to set. - * @return This builder for chaining. - */ - public Builder setResourceKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceKey_ = value; - onChanged(); - return this; - } - /** - * string resource_key = 1; - * @return This builder for chaining. - */ - public Builder clearResourceKey() { - - resourceKey_ = getDefaultInstance().getResourceKey(); - onChanged(); - return this; - } - /** - * string resource_key = 1; - * @param value The bytes for resourceKey to set. - * @return This builder for chaining. - */ - public Builder setResourceKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceKey_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceValue_ = ""; - /** - * string resource_value = 2; - * @return The resourceValue. - */ - public java.lang.String getResourceValue() { - java.lang.Object ref = resourceValue_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceValue_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string resource_value = 2; - * @return The bytes for resourceValue. - */ - public com.google.protobuf.ByteString - getResourceValueBytes() { - java.lang.Object ref = resourceValue_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string resource_value = 2; - * @param value The resourceValue to set. - * @return This builder for chaining. - */ - public Builder setResourceValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceValue_ = value; - onChanged(); - return this; - } - /** - * string resource_value = 2; - * @return This builder for chaining. - */ - public Builder clearResourceValue() { - - resourceValue_ = getDefaultInstance().getResourceValue(); - onChanged(); - return this; - } - /** - * string resource_value = 2; - * @param value The bytes for resourceValue to set. - * @return This builder for chaining. - */ - public Builder setResourceValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceValue_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConfigRule_Custom) - } + /** + * float length = 1; + * @return The length. + */ + float getLength(); - // @@protoc_insertion_point(class_scope:context.ConfigRule_Custom) - private static final context.ContextOuterClass.ConfigRule_Custom DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConfigRule_Custom(); - } + /** + * string source = 2; + * @return The source. + */ + java.lang.String getSource(); - public static context.ContextOuterClass.ConfigRule_Custom getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * string source = 2; + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * string target = 3; + * @return The target. + */ + java.lang.String getTarget(); - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * string target = 3; + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); - @java.lang.Override - public context.ContextOuterClass.ConfigRule_Custom getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.Fiber fibers = 4; + */ + java.util.List getFibersList(); - } + /** + * repeated .context.Fiber fibers = 4; + */ + context.ContextOuterClass.Fiber getFibers(int index); - public interface ConfigRule_ACLOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConfigRule_ACL) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.Fiber fibers = 4; + */ + int getFibersCount(); - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - boolean hasEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - context.ContextOuterClass.EndPointId getEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + /** + * repeated .context.Fiber fibers = 4; + */ + java.util.List getFibersOrBuilderList(); + + /** + * repeated .context.Fiber fibers = 4; + */ + context.ContextOuterClass.FiberOrBuilder getFibersOrBuilder(int index); + } /** - * .acl.AclRuleSet rule_set = 2; - * @return Whether the ruleSet field is set. - */ - boolean hasRuleSet(); - /** - * .acl.AclRuleSet rule_set = 2; - * @return The ruleSet. - */ - acl.Acl.AclRuleSet getRuleSet(); - /** - * .acl.AclRuleSet rule_set = 2; + * Protobuf type {@code context.OpticalLinkDetails} */ - acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder(); - } - /** - * Protobuf type {@code context.ConfigRule_ACL} - */ - public static final class ConfigRule_ACL extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConfigRule_ACL) - ConfigRule_ACLOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfigRule_ACL.newBuilder() to construct. - private ConfigRule_ACL(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConfigRule_ACL() { - } + public static final class OpticalLinkDetails extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLinkDetails) + OpticalLinkDetailsOrBuilder { - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConfigRule_ACL(); - } + private static final long serialVersionUID = 0L; - @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; - } + // Use OpticalLinkDetails.newBuilder() to construct. + private OpticalLinkDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConfigRule_ACL.class, context.ContextOuterClass.ConfigRule_ACL.Builder.class); - } + private OpticalLinkDetails() { + source_ = ""; + target_ = ""; + fibers_ = java.util.Collections.emptyList(); + } - public static final int ENDPOINT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.EndPointId endpointId_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - @java.lang.Override - public boolean hasEndpointId() { - return endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointId() { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpticalLinkDetails(); + } - public static final int RULE_SET_FIELD_NUMBER = 2; - private acl.Acl.AclRuleSet ruleSet_; - /** - * .acl.AclRuleSet rule_set = 2; - * @return Whether the ruleSet field is set. - */ - @java.lang.Override - public boolean hasRuleSet() { - return ruleSet_ != null; - } - /** - * .acl.AclRuleSet rule_set = 2; - * @return The ruleSet. - */ - @java.lang.Override - public acl.Acl.AclRuleSet getRuleSet() { - return ruleSet_ == null ? acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - @java.lang.Override - public acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder() { - return getRuleSet(); - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + 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(); + 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(); + } + } - memoizedIsInitialized = 1; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (endpointId_ != null) { - output.writeMessage(1, getEndpointId()); - } - if (ruleSet_ != null) { - output.writeMessage(2, getRuleSet()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkDetails.class, context.ContextOuterClass.OpticalLinkDetails.Builder.class); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (endpointId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEndpointId()); - } - if (ruleSet_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getRuleSet()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static final int LENGTH_FIELD_NUMBER = 1; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConfigRule_ACL)) { - return super.equals(obj); - } - context.ContextOuterClass.ConfigRule_ACL other = (context.ContextOuterClass.ConfigRule_ACL) obj; - - if (hasEndpointId() != other.hasEndpointId()) return false; - if (hasEndpointId()) { - if (!getEndpointId() - .equals(other.getEndpointId())) return false; - } - if (hasRuleSet() != other.hasRuleSet()) return false; - if (hasRuleSet()) { - if (!getRuleSet() - .equals(other.getRuleSet())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private float length_; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEndpointId()) { - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - } - if (hasRuleSet()) { - hash = (37 * hash) + RULE_SET_FIELD_NUMBER; - hash = (53 * hash) + getRuleSet().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * float length = 1; + * @return The length. + */ + @java.lang.Override + public float getLength() { + return length_; + } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_ACL parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule_ACL parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int SOURCE_FIELD_NUMBER = 2; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConfigRule_ACL prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private volatile java.lang.Object source_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConfigRule_ACL} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConfigRule_ACL) - context.ContextOuterClass.ConfigRule_ACLOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConfigRule_ACL.class, context.ContextOuterClass.ConfigRule_ACL.Builder.class); - } - - // 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; - endpointIdBuilder_ = null; - } - if (ruleSetBuilder_ == null) { - ruleSet_ = null; - } else { - ruleSet_ = null; - ruleSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACL getDefaultInstanceForType() { - return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACL build() { - context.ContextOuterClass.ConfigRule_ACL result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConfigRule_ACL) { - return mergeFrom((context.ContextOuterClass.ConfigRule_ACL)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConfigRule_ACL other) { - if (other == context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance()) return this; - if (other.hasEndpointId()) { - mergeEndpointId(other.getEndpointId()); - } - if (other.hasRuleSet()) { - mergeRuleSet(other.getRuleSet()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConfigRule_ACL) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.EndPointId endpointId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - public context.ContextOuterClass.EndPointId getEndpointId() { - if (endpointIdBuilder_ == null) { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } else { - return endpointIdBuilder_.getMessage(); - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - onChanged(); - } else { - endpointIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdBuilder_ == null) { - endpointId_ = builderForValue.build(); - onChanged(); - } else { - endpointIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = - context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); - } else { - endpointId_ = value; - } - onChanged(); - } else { - endpointIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { - - onChanged(); - return getEndpointIdFieldBuilder().getBuilder(); - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - if (endpointIdBuilder_ != null) { - return endpointIdBuilder_.getMessageOrBuilder(); - } else { - return endpointId_ == null ? - context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> - getEndpointIdFieldBuilder() { - if (endpointIdBuilder_ == null) { - endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>( - getEndpointId(), - getParentForChildren(), - isClean()); - endpointId_ = null; - } - return endpointIdBuilder_; - } - - private acl.Acl.AclRuleSet ruleSet_; - private com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclRuleSet, acl.Acl.AclRuleSet.Builder, acl.Acl.AclRuleSetOrBuilder> ruleSetBuilder_; - /** - * .acl.AclRuleSet rule_set = 2; - * @return Whether the ruleSet field is set. - */ - public boolean hasRuleSet() { - return ruleSetBuilder_ != null || ruleSet_ != null; - } - /** - * .acl.AclRuleSet rule_set = 2; - * @return The ruleSet. - */ - public acl.Acl.AclRuleSet getRuleSet() { - if (ruleSetBuilder_ == null) { - return ruleSet_ == null ? acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; - } else { - return ruleSetBuilder_.getMessage(); - } - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - public Builder setRuleSet(acl.Acl.AclRuleSet value) { - if (ruleSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ruleSet_ = value; - onChanged(); - } else { - ruleSetBuilder_.setMessage(value); - } - - return this; - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - public Builder setRuleSet( - acl.Acl.AclRuleSet.Builder builderForValue) { - if (ruleSetBuilder_ == null) { - ruleSet_ = builderForValue.build(); - onChanged(); - } else { - ruleSetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - public Builder mergeRuleSet(acl.Acl.AclRuleSet value) { - if (ruleSetBuilder_ == null) { - if (ruleSet_ != null) { - ruleSet_ = - acl.Acl.AclRuleSet.newBuilder(ruleSet_).mergeFrom(value).buildPartial(); - } else { - ruleSet_ = value; - } - onChanged(); - } else { - ruleSetBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - public Builder clearRuleSet() { - if (ruleSetBuilder_ == null) { - ruleSet_ = null; - onChanged(); - } else { - ruleSet_ = null; - ruleSetBuilder_ = null; - } - - return this; - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - public acl.Acl.AclRuleSet.Builder getRuleSetBuilder() { - - onChanged(); - return getRuleSetFieldBuilder().getBuilder(); - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - public acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder() { - if (ruleSetBuilder_ != null) { - return ruleSetBuilder_.getMessageOrBuilder(); - } else { - return ruleSet_ == null ? - acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; - } - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclRuleSet, acl.Acl.AclRuleSet.Builder, acl.Acl.AclRuleSetOrBuilder> - getRuleSetFieldBuilder() { - if (ruleSetBuilder_ == null) { - ruleSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclRuleSet, acl.Acl.AclRuleSet.Builder, acl.Acl.AclRuleSetOrBuilder>( - getRuleSet(), - getParentForChildren(), - isClean()); - ruleSet_ = null; - } - return ruleSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConfigRule_ACL) - } + /** + * string source = 2; + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + 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(); + source_ = s; + return s; + } + } - // @@protoc_insertion_point(class_scope:context.ConfigRule_ACL) - private static final context.ContextOuterClass.ConfigRule_ACL DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConfigRule_ACL(); - } + /** + * string source = 2; + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static context.ContextOuterClass.ConfigRule_ACL getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final int TARGET_FIELD_NUMBER = 3; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private volatile java.lang.Object target_; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * string target = 3; + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACL getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * string target = 3; + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - } + public static final int FIBERS_FIELD_NUMBER = 4; - public interface ConfigRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConfigRule) - com.google.protobuf.MessageOrBuilder { + private java.util.List fibers_; - /** - * .context.ConfigActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - int getActionValue(); - /** - * .context.ConfigActionEnum action = 1; - * @return The action. - */ - context.ContextOuterClass.ConfigActionEnum getAction(); + /** + * repeated .context.Fiber fibers = 4; + */ + @java.lang.Override + public java.util.List getFibersList() { + return fibers_; + } - /** - * .context.ConfigRule_Custom custom = 2; - * @return Whether the custom field is set. - */ - boolean hasCustom(); - /** - * .context.ConfigRule_Custom custom = 2; - * @return The custom. - */ - context.ContextOuterClass.ConfigRule_Custom getCustom(); - /** - * .context.ConfigRule_Custom custom = 2; - */ - context.ContextOuterClass.ConfigRule_CustomOrBuilder getCustomOrBuilder(); + /** + * repeated .context.Fiber fibers = 4; + */ + @java.lang.Override + public java.util.List getFibersOrBuilderList() { + return fibers_; + } - /** - * .context.ConfigRule_ACL acl = 3; - * @return Whether the acl field is set. - */ - boolean hasAcl(); - /** - * .context.ConfigRule_ACL acl = 3; - * @return The acl. - */ - context.ContextOuterClass.ConfigRule_ACL getAcl(); - /** - * .context.ConfigRule_ACL acl = 3; - */ - context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder(); - - public context.ContextOuterClass.ConfigRule.ConfigRuleCase getConfigRuleCase(); - } - /** - * Protobuf type {@code context.ConfigRule} - */ - public static final class ConfigRule extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConfigRule) - ConfigRuleOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfigRule.newBuilder() to construct. - private ConfigRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConfigRule() { - action_ = 0; - } + /** + * repeated .context.Fiber fibers = 4; + */ + @java.lang.Override + public int getFibersCount() { + return fibers_.size(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConfigRule(); - } + /** + * repeated .context.Fiber fibers = 4; + */ + @java.lang.Override + public context.ContextOuterClass.Fiber getFibers(int index) { + return fibers_.get(index); + } - @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; - } + /** + * repeated .context.Fiber fibers = 4; + */ + @java.lang.Override + public context.ContextOuterClass.FiberOrBuilder getFibersOrBuilder(int index) { + return fibers_.get(index); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConfigRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConfigRule.class, context.ContextOuterClass.ConfigRule.Builder.class); - } + private byte memoizedIsInitialized = -1; - private int configRuleCase_ = 0; - private java.lang.Object configRule_; - public enum ConfigRuleCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CUSTOM(2), - ACL(3), - CONFIGRULE_NOT_SET(0); - private final int value; - private ConfigRuleCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ConfigRuleCase valueOf(int value) { - return forNumber(value); - } - - public static ConfigRuleCase forNumber(int value) { - switch (value) { - case 2: return CUSTOM; - case 3: return ACL; - case 0: return CONFIGRULE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ConfigRuleCase - getConfigRuleCase() { - return ConfigRuleCase.forNumber( - configRuleCase_); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - public static final int ACTION_FIELD_NUMBER = 1; - private int action_; - /** - * .context.ConfigActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override public int getActionValue() { - return action_; - } - /** - * .context.ConfigActionEnum action = 1; - * @return The action. - */ - @java.lang.Override public context.ContextOuterClass.ConfigActionEnum getAction() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.valueOf(action_); - return result == null ? context.ContextOuterClass.ConfigActionEnum.UNRECOGNIZED : result; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (length_ != 0F) { + output.writeFloat(1, length_); + } + if (!getSourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); + } + if (!getTargetBytes().isEmpty()) { + 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); + } - public static final int CUSTOM_FIELD_NUMBER = 2; - /** - * .context.ConfigRule_Custom custom = 2; - * @return Whether the custom field is set. - */ - @java.lang.Override - public boolean hasCustom() { - return configRuleCase_ == 2; - } - /** - * .context.ConfigRule_Custom custom = 2; - * @return The custom. - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_Custom getCustom() { - if (configRuleCase_ == 2) { - return (context.ContextOuterClass.ConfigRule_Custom) configRule_; - } - return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_CustomOrBuilder getCustomOrBuilder() { - if (configRuleCase_ == 2) { - return (context.ContextOuterClass.ConfigRule_Custom) configRule_; - } - return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (length_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, length_); + } + if (!getSourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); + } + if (!getTargetBytes().isEmpty()) { + 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(); + memoizedSize = size; + return size; + } - public static final int ACL_FIELD_NUMBER = 3; - /** - * .context.ConfigRule_ACL acl = 3; - * @return Whether the acl field is set. - */ - @java.lang.Override - public boolean hasAcl() { - return configRuleCase_ == 3; - } - /** - * .context.ConfigRule_ACL acl = 3; - * @return The acl. - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACL getAcl() { - if (configRuleCase_ == 3) { - return (context.ContextOuterClass.ConfigRule_ACL) configRule_; - } - return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder() { - if (configRuleCase_ == 3) { - return (context.ContextOuterClass.ConfigRule_ACL) configRule_; - } - return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.OpticalLinkDetails)) { + return super.equals(obj); + } + context.ContextOuterClass.OpticalLinkDetails other = (context.ContextOuterClass.OpticalLinkDetails) obj; + if (java.lang.Float.floatToIntBits(getLength()) != java.lang.Float.floatToIntBits(other.getLength())) + return false; + if (!getSource().equals(other.getSource())) + return false; + if (!getTarget().equals(other.getTarget())) + return false; + if (!getFibersList().equals(other.getFibersList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LENGTH_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getLength()); + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + if (getFibersCount() > 0) { + hash = (37 * hash) + FIBERS_FIELD_NUMBER; + hash = (53 * hash) + getFibersList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (action_ != context.ContextOuterClass.ConfigActionEnum.CONFIGACTION_UNDEFINED.getNumber()) { - output.writeEnum(1, action_); - } - if (configRuleCase_ == 2) { - output.writeMessage(2, (context.ContextOuterClass.ConfigRule_Custom) configRule_); - } - if (configRuleCase_ == 3) { - output.writeMessage(3, (context.ContextOuterClass.ConfigRule_ACL) configRule_); - } - unknownFields.writeTo(output); - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (action_ != context.ContextOuterClass.ConfigActionEnum.CONFIGACTION_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, action_); - } - if (configRuleCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (context.ContextOuterClass.ConfigRule_Custom) configRule_); - } - if (configRuleCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (context.ContextOuterClass.ConfigRule_ACL) configRule_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConfigRule)) { - return super.equals(obj); - } - context.ContextOuterClass.ConfigRule other = (context.ContextOuterClass.ConfigRule) obj; - - if (action_ != other.action_) return false; - if (!getConfigRuleCase().equals(other.getConfigRuleCase())) return false; - switch (configRuleCase_) { - case 2: - if (!getCustom() - .equals(other.getCustom())) return false; - break; - case 3: - if (!getAcl() - .equals(other.getAcl())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + action_; - switch (configRuleCase_) { - case 2: - hash = (37 * hash) + CUSTOM_FIELD_NUMBER; - hash = (53 * hash) + getCustom().hashCode(); - break; - case 3: - hash = (37 * hash) + ACL_FIELD_NUMBER; - hash = (53 * hash) + getAcl().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.ConfigRule parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConfigRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.OpticalLinkDetails parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.OpticalLinkDetails parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConfigRule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConfigRule) - context.ContextOuterClass.ConfigRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConfigRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConfigRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConfigRule.class, context.ContextOuterClass.ConfigRule.Builder.class); - } - - // 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(); - action_ = 0; - - configRuleCase_ = 0; - configRule_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConfigRule_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConfigRule getDefaultInstanceForType() { - return context.ContextOuterClass.ConfigRule.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConfigRule build() { - context.ContextOuterClass.ConfigRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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 (configRuleCase_ == 3) { - if (aclBuilder_ == null) { - result.configRule_ = configRule_; - } else { - result.configRule_ = aclBuilder_.build(); - } - } - result.configRuleCase_ = configRuleCase_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConfigRule) { - return mergeFrom((context.ContextOuterClass.ConfigRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConfigRule other) { - if (other == context.ContextOuterClass.ConfigRule.getDefaultInstance()) return this; - if (other.action_ != 0) { - setActionValue(other.getActionValue()); - } - switch (other.getConfigRuleCase()) { - case CUSTOM: { - mergeCustom(other.getCustom()); - break; - } - case ACL: { - mergeAcl(other.getAcl()); - break; - } - case CONFIGRULE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConfigRule) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int configRuleCase_ = 0; - private java.lang.Object configRule_; - public ConfigRuleCase - getConfigRuleCase() { - return ConfigRuleCase.forNumber( - configRuleCase_); - } - - public Builder clearConfigRule() { - configRuleCase_ = 0; - configRule_ = null; - onChanged(); - return this; - } - - - private int action_ = 0; - /** - * .context.ConfigActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override public int getActionValue() { - return action_; - } - /** - * .context.ConfigActionEnum action = 1; - * @param value The enum numeric value on the wire for action to set. - * @return This builder for chaining. - */ - public Builder setActionValue(int value) { - - action_ = value; - onChanged(); - return this; - } - /** - * .context.ConfigActionEnum action = 1; - * @return The action. - */ - @java.lang.Override - public context.ContextOuterClass.ConfigActionEnum getAction() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.valueOf(action_); - return result == null ? context.ContextOuterClass.ConfigActionEnum.UNRECOGNIZED : result; - } - /** - * .context.ConfigActionEnum action = 1; - * @param value The action to set. - * @return This builder for chaining. - */ - public Builder setAction(context.ContextOuterClass.ConfigActionEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - action_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.ConfigActionEnum action = 1; - * @return This builder for chaining. - */ - public Builder clearAction() { - - action_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConfigRule_Custom, context.ContextOuterClass.ConfigRule_Custom.Builder, context.ContextOuterClass.ConfigRule_CustomOrBuilder> customBuilder_; - /** - * .context.ConfigRule_Custom custom = 2; - * @return Whether the custom field is set. - */ - @java.lang.Override - public boolean hasCustom() { - return configRuleCase_ == 2; - } - /** - * .context.ConfigRule_Custom custom = 2; - * @return The custom. - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_Custom getCustom() { - if (customBuilder_ == null) { - if (configRuleCase_ == 2) { - return (context.ContextOuterClass.ConfigRule_Custom) configRule_; - } - return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } else { - if (configRuleCase_ == 2) { - return customBuilder_.getMessage(); - } - return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - public Builder setCustom(context.ContextOuterClass.ConfigRule_Custom value) { - if (customBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - configRule_ = value; - onChanged(); - } else { - customBuilder_.setMessage(value); - } - configRuleCase_ = 2; - return this; - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - public Builder setCustom( - context.ContextOuterClass.ConfigRule_Custom.Builder builderForValue) { - if (customBuilder_ == null) { - configRule_ = builderForValue.build(); - onChanged(); - } else { - customBuilder_.setMessage(builderForValue.build()); - } - configRuleCase_ = 2; - return this; - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - public Builder mergeCustom(context.ContextOuterClass.ConfigRule_Custom value) { - if (customBuilder_ == null) { - if (configRuleCase_ == 2 && - configRule_ != context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance()) { - configRule_ = context.ContextOuterClass.ConfigRule_Custom.newBuilder((context.ContextOuterClass.ConfigRule_Custom) configRule_) - .mergeFrom(value).buildPartial(); - } else { - configRule_ = value; - } - onChanged(); - } else { - if (configRuleCase_ == 2) { - customBuilder_.mergeFrom(value); - } - customBuilder_.setMessage(value); - } - configRuleCase_ = 2; - return this; - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - public Builder clearCustom() { - if (customBuilder_ == null) { - if (configRuleCase_ == 2) { - configRuleCase_ = 0; - configRule_ = null; - onChanged(); - } - } else { - if (configRuleCase_ == 2) { - configRuleCase_ = 0; - configRule_ = null; - } - customBuilder_.clear(); - } - return this; - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - public context.ContextOuterClass.ConfigRule_Custom.Builder getCustomBuilder() { - return getCustomFieldBuilder().getBuilder(); - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_CustomOrBuilder getCustomOrBuilder() { - if ((configRuleCase_ == 2) && (customBuilder_ != null)) { - return customBuilder_.getMessageOrBuilder(); - } else { - if (configRuleCase_ == 2) { - return (context.ContextOuterClass.ConfigRule_Custom) configRule_; - } - return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConfigRule_Custom, context.ContextOuterClass.ConfigRule_Custom.Builder, context.ContextOuterClass.ConfigRule_CustomOrBuilder> - getCustomFieldBuilder() { - if (customBuilder_ == null) { - if (!(configRuleCase_ == 2)) { - configRule_ = context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } - customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConfigRule_Custom, context.ContextOuterClass.ConfigRule_Custom.Builder, context.ContextOuterClass.ConfigRule_CustomOrBuilder>( - (context.ContextOuterClass.ConfigRule_Custom) configRule_, - getParentForChildren(), - isClean()); - configRule_ = null; - } - configRuleCase_ = 2; - onChanged();; - return customBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConfigRule_ACL, context.ContextOuterClass.ConfigRule_ACL.Builder, context.ContextOuterClass.ConfigRule_ACLOrBuilder> aclBuilder_; - /** - * .context.ConfigRule_ACL acl = 3; - * @return Whether the acl field is set. - */ - @java.lang.Override - public boolean hasAcl() { - return configRuleCase_ == 3; - } - /** - * .context.ConfigRule_ACL acl = 3; - * @return The acl. - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACL getAcl() { - if (aclBuilder_ == null) { - if (configRuleCase_ == 3) { - return (context.ContextOuterClass.ConfigRule_ACL) configRule_; - } - return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } else { - if (configRuleCase_ == 3) { - return aclBuilder_.getMessage(); - } - return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - public Builder setAcl(context.ContextOuterClass.ConfigRule_ACL value) { - if (aclBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - configRule_ = value; - onChanged(); - } else { - aclBuilder_.setMessage(value); - } - configRuleCase_ = 3; - return this; - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - public Builder setAcl( - context.ContextOuterClass.ConfigRule_ACL.Builder builderForValue) { - if (aclBuilder_ == null) { - configRule_ = builderForValue.build(); - onChanged(); - } else { - aclBuilder_.setMessage(builderForValue.build()); - } - configRuleCase_ = 3; - return this; - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - public Builder mergeAcl(context.ContextOuterClass.ConfigRule_ACL value) { - if (aclBuilder_ == null) { - if (configRuleCase_ == 3 && - configRule_ != context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance()) { - configRule_ = context.ContextOuterClass.ConfigRule_ACL.newBuilder((context.ContextOuterClass.ConfigRule_ACL) configRule_) - .mergeFrom(value).buildPartial(); - } else { - configRule_ = value; - } - onChanged(); - } else { - if (configRuleCase_ == 3) { - aclBuilder_.mergeFrom(value); - } - aclBuilder_.setMessage(value); - } - configRuleCase_ = 3; - return this; - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - public Builder clearAcl() { - if (aclBuilder_ == null) { - if (configRuleCase_ == 3) { - configRuleCase_ = 0; - configRule_ = null; - onChanged(); - } - } else { - if (configRuleCase_ == 3) { - configRuleCase_ = 0; - configRule_ = null; - } - aclBuilder_.clear(); - } - return this; - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - public context.ContextOuterClass.ConfigRule_ACL.Builder getAclBuilder() { - return getAclFieldBuilder().getBuilder(); - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder() { - if ((configRuleCase_ == 3) && (aclBuilder_ != null)) { - return aclBuilder_.getMessageOrBuilder(); - } else { - if (configRuleCase_ == 3) { - return (context.ContextOuterClass.ConfigRule_ACL) configRule_; - } - return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConfigRule_ACL, context.ContextOuterClass.ConfigRule_ACL.Builder, context.ContextOuterClass.ConfigRule_ACLOrBuilder> - getAclFieldBuilder() { - if (aclBuilder_ == null) { - if (!(configRuleCase_ == 3)) { - configRule_ = context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } - aclBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConfigRule_ACL, context.ContextOuterClass.ConfigRule_ACL.Builder, context.ContextOuterClass.ConfigRule_ACLOrBuilder>( - (context.ContextOuterClass.ConfigRule_ACL) configRule_, - getParentForChildren(), - isClean()); - configRule_ = null; - } - configRuleCase_ = 3; - onChanged();; - return aclBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConfigRule) - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - // @@protoc_insertion_point(class_scope:context.ConfigRule) - private static final context.ContextOuterClass.ConfigRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConfigRule(); - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public static context.ContextOuterClass.ConfigRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static Builder newBuilder(context.ContextOuterClass.OpticalLinkDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public context.ContextOuterClass.ConfigRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public interface Constraint_CustomOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_Custom) - com.google.protobuf.MessageOrBuilder { + /** + * Protobuf type {@code context.OpticalLinkDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLinkDetails) + context.ContextOuterClass.OpticalLinkDetailsOrBuilder { - /** - * string constraint_type = 1; - * @return The constraintType. - */ - java.lang.String getConstraintType(); - /** - * string constraint_type = 1; - * @return The bytes for constraintType. - */ - com.google.protobuf.ByteString - getConstraintTypeBytes(); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + } - /** - * string constraint_value = 2; - * @return The constraintValue. - */ - java.lang.String getConstraintValue(); - /** - * string constraint_value = 2; - * @return The bytes for constraintValue. - */ - com.google.protobuf.ByteString - getConstraintValueBytes(); - } - /** - * Protobuf type {@code context.Constraint_Custom} - */ - public static final class Constraint_Custom extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_Custom) - Constraint_CustomOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_Custom.newBuilder() to construct. - private Constraint_Custom(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_Custom() { - constraintType_ = ""; - constraintValue_ = ""; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkDetails.class, context.ContextOuterClass.OpticalLinkDetails.Builder.class); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_Custom(); - } + // Construct using context.ContextOuterClass.OpticalLinkDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @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; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_Custom_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_Custom.class, context.ContextOuterClass.Constraint_Custom.Builder.class); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFibersFieldBuilder(); + } + } - public static final int CONSTRAINT_TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object constraintType_; - /** - * string constraint_type = 1; - * @return The constraintType. - */ - @java.lang.Override - public java.lang.String getConstraintType() { - java.lang.Object ref = constraintType_; - 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(); - constraintType_ = s; - return s; - } - } - /** - * string constraint_type = 1; - * @return The bytes for constraintType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getConstraintTypeBytes() { - java.lang.Object ref = constraintType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - constraintType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public Builder clear() { + super.clear(); + length_ = 0F; + source_ = ""; + target_ = ""; + if (fibersBuilder_ == null) { + fibers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fibersBuilder_.clear(); + } + return this; + } - public static final int CONSTRAINT_VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object constraintValue_; - /** - * string constraint_value = 2; - * @return The constraintValue. - */ - @java.lang.Override - public java.lang.String getConstraintValue() { - java.lang.Object ref = constraintValue_; - 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(); - constraintValue_ = s; - return s; - } - } - /** - * string constraint_value = 2; - * @return The bytes for constraintValue. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getConstraintValueBytes() { - java.lang.Object ref = constraintValue_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - constraintValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public context.ContextOuterClass.OpticalLinkDetails getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance(); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public context.ContextOuterClass.OpticalLinkDetails build() { + context.ContextOuterClass.OpticalLinkDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getConstraintTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, constraintType_); - } - if (!getConstraintValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, constraintValue_); - } - unknownFields.writeTo(output); - } + @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_; + if (fibersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fibers_ = java.util.Collections.unmodifiableList(fibers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fibers_ = fibers_; + } else { + result.fibers_ = fibersBuilder_.build(); + } + onBuilt(); + return result; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getConstraintTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, constraintType_); - } - if (!getConstraintValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, constraintValue_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_Custom)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint_Custom other = (context.ContextOuterClass.Constraint_Custom) obj; - - if (!getConstraintType() - .equals(other.getConstraintType())) return false; - if (!getConstraintValue() - .equals(other.getConstraintValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @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 int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONSTRAINT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getConstraintType().hashCode(); - hash = (37 * hash) + CONSTRAINT_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getConstraintValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Custom parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Custom parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_Custom prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @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 - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_Custom} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_Custom) - context.ContextOuterClass.Constraint_CustomOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_Custom_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_Custom_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_Custom.class, context.ContextOuterClass.Constraint_Custom.Builder.class); - } - - // 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(); - constraintType_ = ""; - - constraintValue_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_Custom_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_Custom getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_Custom build() { - context.ContextOuterClass.Constraint_Custom result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_Custom) { - return mergeFrom((context.ContextOuterClass.Constraint_Custom)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_Custom other) { - if (other == context.ContextOuterClass.Constraint_Custom.getDefaultInstance()) return this; - if (!other.getConstraintType().isEmpty()) { - constraintType_ = other.constraintType_; - onChanged(); - } - if (!other.getConstraintValue().isEmpty()) { - constraintValue_ = other.constraintValue_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_Custom) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object constraintType_ = ""; - /** - * string constraint_type = 1; - * @return The constraintType. - */ - public java.lang.String getConstraintType() { - java.lang.Object ref = constraintType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - constraintType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string constraint_type = 1; - * @return The bytes for constraintType. - */ - public com.google.protobuf.ByteString - getConstraintTypeBytes() { - java.lang.Object ref = constraintType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - constraintType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string constraint_type = 1; - * @param value The constraintType to set. - * @return This builder for chaining. - */ - public Builder setConstraintType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - constraintType_ = value; - onChanged(); - return this; - } - /** - * string constraint_type = 1; - * @return This builder for chaining. - */ - public Builder clearConstraintType() { - - constraintType_ = getDefaultInstance().getConstraintType(); - onChanged(); - return this; - } - /** - * string constraint_type = 1; - * @param value The bytes for constraintType to set. - * @return This builder for chaining. - */ - public Builder setConstraintTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - constraintType_ = value; - onChanged(); - return this; - } - - private java.lang.Object constraintValue_ = ""; - /** - * string constraint_value = 2; - * @return The constraintValue. - */ - public java.lang.String getConstraintValue() { - java.lang.Object ref = constraintValue_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - constraintValue_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string constraint_value = 2; - * @return The bytes for constraintValue. - */ - public com.google.protobuf.ByteString - getConstraintValueBytes() { - java.lang.Object ref = constraintValue_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - constraintValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string constraint_value = 2; - * @param value The constraintValue to set. - * @return This builder for chaining. - */ - public Builder setConstraintValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - constraintValue_ = value; - onChanged(); - return this; - } - /** - * string constraint_value = 2; - * @return This builder for chaining. - */ - public Builder clearConstraintValue() { - - constraintValue_ = getDefaultInstance().getConstraintValue(); - onChanged(); - return this; - } - /** - * string constraint_value = 2; - * @param value The bytes for constraintValue to set. - * @return This builder for chaining. - */ - public Builder setConstraintValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - constraintValue_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_Custom) - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - // @@protoc_insertion_point(class_scope:context.Constraint_Custom) - private static final context.ContextOuterClass.Constraint_Custom DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_Custom(); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalLinkDetails) { + return mergeFrom((context.ContextOuterClass.OpticalLinkDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static context.ContextOuterClass.Constraint_Custom getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public Builder mergeFrom(context.ContextOuterClass.OpticalLinkDetails other) { + if (other == context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance()) + return this; + if (other.getLength() != 0F) { + setLength(other.getLength()); + } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + onChanged(); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (fibersBuilder_ == null) { + if (!other.fibers_.isEmpty()) { + if (fibers_.isEmpty()) { + fibers_ = other.fibers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFibersIsMutable(); + fibers_.addAll(other.fibers_); + } + onChanged(); + } + } else { + if (!other.fibers_.isEmpty()) { + if (fibersBuilder_.isEmpty()) { + fibersBuilder_.dispose(); + fibersBuilder_ = null; + fibers_ = other.fibers_; + bitField0_ = (bitField0_ & ~0x00000001); + fibersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFibersFieldBuilder() : null; + } else { + fibersBuilder_.addAllMessages(other.fibers_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.OpticalLinkDetails) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public context.ContextOuterClass.Constraint_Custom getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private int bitField0_; - } + private float length_; - public interface Constraint_ScheduleOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_Schedule) - com.google.protobuf.MessageOrBuilder { + /** + * float length = 1; + * @return The length. + */ + @java.lang.Override + public float getLength() { + return length_; + } - /** - * float start_timestamp = 1; - * @return The startTimestamp. - */ - float getStartTimestamp(); + /** + * float length = 1; + * @param value The length to set. + * @return This builder for chaining. + */ + public Builder setLength(float value) { + length_ = value; + onChanged(); + return this; + } - /** - * float duration_days = 2; - * @return The durationDays. - */ - float getDurationDays(); - } - /** - * Protobuf type {@code context.Constraint_Schedule} - */ - public static final class Constraint_Schedule extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_Schedule) - Constraint_ScheduleOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_Schedule.newBuilder() to construct. - private Constraint_Schedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_Schedule() { - } + /** + * float length = 1; + * @return This builder for chaining. + */ + public Builder clearLength() { + length_ = 0F; + onChanged(); + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_Schedule(); - } + private java.lang.Object source_ = ""; + + /** + * string source = 2; + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @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; - } + /** + * string source = 2; + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_Schedule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_Schedule.class, context.ContextOuterClass.Constraint_Schedule.Builder.class); - } + /** + * string source = 2; + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + return this; + } - public static final int START_TIMESTAMP_FIELD_NUMBER = 1; - private float startTimestamp_; - /** - * float start_timestamp = 1; - * @return The startTimestamp. - */ - @java.lang.Override - public float getStartTimestamp() { - return startTimestamp_; - } + /** + * string source = 2; + * @return This builder for chaining. + */ + public Builder clearSource() { + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } - public static final int DURATION_DAYS_FIELD_NUMBER = 2; - private float durationDays_; - /** - * float duration_days = 2; - * @return The durationDays. - */ - @java.lang.Override - public float getDurationDays() { - return durationDays_; - } + /** + * string source = 2; + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + source_ = value; + onChanged(); + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private java.lang.Object target_ = ""; + + /** + * string target = 3; + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * string target = 3; + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (startTimestamp_ != 0F) { - output.writeFloat(1, startTimestamp_); - } - if (durationDays_ != 0F) { - output.writeFloat(2, durationDays_); - } - unknownFields.writeTo(output); - } + /** + * string target = 3; + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTimestamp_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, startTimestamp_); - } - if (durationDays_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, durationDays_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * string target = 3; + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_Schedule)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint_Schedule other = (context.ContextOuterClass.Constraint_Schedule) obj; - - if (java.lang.Float.floatToIntBits(getStartTimestamp()) - != java.lang.Float.floatToIntBits( - other.getStartTimestamp())) return false; - if (java.lang.Float.floatToIntBits(getDurationDays()) - != java.lang.Float.floatToIntBits( - other.getDurationDays())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string target = 3; + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + private java.util.List fibers_ = java.util.Collections.emptyList(); - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Schedule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Schedule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private void ensureFibersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fibers_ = new java.util.ArrayList(fibers_); + bitField0_ |= 0x00000001; + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_Schedule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private com.google.protobuf.RepeatedFieldBuilderV3 fibersBuilder_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_Schedule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_Schedule) - context.ContextOuterClass.Constraint_ScheduleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_Schedule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_Schedule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_Schedule.class, context.ContextOuterClass.Constraint_Schedule.Builder.class); - } - - // 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(); - startTimestamp_ = 0F; - - durationDays_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_Schedule_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_Schedule getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_Schedule build() { - context.ContextOuterClass.Constraint_Schedule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_Schedule) { - return mergeFrom((context.ContextOuterClass.Constraint_Schedule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_Schedule other) { - if (other == context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) return this; - if (other.getStartTimestamp() != 0F) { - setStartTimestamp(other.getStartTimestamp()); - } - if (other.getDurationDays() != 0F) { - setDurationDays(other.getDurationDays()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_Schedule) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float startTimestamp_ ; - /** - * float start_timestamp = 1; - * @return The startTimestamp. - */ - @java.lang.Override - public float getStartTimestamp() { - return startTimestamp_; - } - /** - * float start_timestamp = 1; - * @param value The startTimestamp to set. - * @return This builder for chaining. - */ - public Builder setStartTimestamp(float value) { - - startTimestamp_ = value; - onChanged(); - return this; - } - /** - * float start_timestamp = 1; - * @return This builder for chaining. - */ - public Builder clearStartTimestamp() { - - startTimestamp_ = 0F; - onChanged(); - return this; - } - - private float durationDays_ ; - /** - * float duration_days = 2; - * @return The durationDays. - */ - @java.lang.Override - public float getDurationDays() { - return durationDays_; - } - /** - * float duration_days = 2; - * @param value The durationDays to set. - * @return This builder for chaining. - */ - public Builder setDurationDays(float value) { - - durationDays_ = value; - onChanged(); - return this; - } - /** - * float duration_days = 2; - * @return This builder for chaining. - */ - public Builder clearDurationDays() { - - durationDays_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_Schedule) - } + /** + * repeated .context.Fiber fibers = 4; + */ + public java.util.List getFibersList() { + if (fibersBuilder_ == null) { + return java.util.Collections.unmodifiableList(fibers_); + } else { + return fibersBuilder_.getMessageList(); + } + } - // @@protoc_insertion_point(class_scope:context.Constraint_Schedule) - private static final context.ContextOuterClass.Constraint_Schedule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_Schedule(); - } + /** + * repeated .context.Fiber fibers = 4; + */ + public int getFibersCount() { + if (fibersBuilder_ == null) { + return fibers_.size(); + } else { + return fibersBuilder_.getCount(); + } + } - public static context.ContextOuterClass.Constraint_Schedule getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public context.ContextOuterClass.Fiber getFibers(int index) { + if (fibersBuilder_ == null) { + return fibers_.get(index); + } else { + return fibersBuilder_.getMessage(index); + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder setFibers(int index, context.ContextOuterClass.Fiber value) { + if (fibersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFibersIsMutable(); + fibers_.set(index, value); + onChanged(); + } else { + fibersBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder setFibers(int index, context.ContextOuterClass.Fiber.Builder builderForValue) { + if (fibersBuilder_ == null) { + ensureFibersIsMutable(); + fibers_.set(index, builderForValue.build()); + onChanged(); + } else { + fibersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - public context.ContextOuterClass.Constraint_Schedule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder addFibers(context.ContextOuterClass.Fiber value) { + if (fibersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFibersIsMutable(); + fibers_.add(value); + onChanged(); + } else { + fibersBuilder_.addMessage(value); + } + return this; + } - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder addFibers(int index, context.ContextOuterClass.Fiber value) { + if (fibersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFibersIsMutable(); + fibers_.add(index, value); + onChanged(); + } else { + fibersBuilder_.addMessage(index, value); + } + return this; + } - public interface GPS_PositionOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.GPS_Position) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder addFibers(context.ContextOuterClass.Fiber.Builder builderForValue) { + if (fibersBuilder_ == null) { + ensureFibersIsMutable(); + fibers_.add(builderForValue.build()); + onChanged(); + } else { + fibersBuilder_.addMessage(builderForValue.build()); + } + return this; + } - /** - * float latitude = 1; - * @return The latitude. - */ - float getLatitude(); + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder addFibers(int index, context.ContextOuterClass.Fiber.Builder builderForValue) { + if (fibersBuilder_ == null) { + ensureFibersIsMutable(); + fibers_.add(index, builderForValue.build()); + onChanged(); + } else { + fibersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - /** - * float longitude = 2; - * @return The longitude. - */ - float getLongitude(); - } - /** - * Protobuf type {@code context.GPS_Position} - */ - public static final class GPS_Position extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.GPS_Position) - GPS_PositionOrBuilder { - private static final long serialVersionUID = 0L; - // Use GPS_Position.newBuilder() to construct. - private GPS_Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GPS_Position() { - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder addAllFibers(java.lang.Iterable values) { + if (fibersBuilder_ == null) { + ensureFibersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fibers_); + onChanged(); + } else { + fibersBuilder_.addAllMessages(values); + } + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GPS_Position(); - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder clearFibers() { + if (fibersBuilder_ == null) { + fibers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fibersBuilder_.clear(); + } + return this; + } - @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; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder removeFibers(int index) { + if (fibersBuilder_ == null) { + ensureFibersIsMutable(); + fibers_.remove(index); + onChanged(); + } else { + fibersBuilder_.remove(index); + } + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_GPS_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.GPS_Position.class, context.ContextOuterClass.GPS_Position.Builder.class); - } + /** + * repeated .context.Fiber fibers = 4; + */ + public context.ContextOuterClass.Fiber.Builder getFibersBuilder(int index) { + return getFibersFieldBuilder().getBuilder(index); + } - public static final int LATITUDE_FIELD_NUMBER = 1; - private float latitude_; - /** - * float latitude = 1; - * @return The latitude. - */ - @java.lang.Override - public float getLatitude() { - return latitude_; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public context.ContextOuterClass.FiberOrBuilder getFibersOrBuilder(int index) { + if (fibersBuilder_ == null) { + return fibers_.get(index); + } else { + return fibersBuilder_.getMessageOrBuilder(index); + } + } - public static final int LONGITUDE_FIELD_NUMBER = 2; - private float longitude_; - /** - * float longitude = 2; - * @return The longitude. - */ - @java.lang.Override - public float getLongitude() { - return longitude_; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public java.util.List getFibersOrBuilderList() { + if (fibersBuilder_ != null) { + return fibersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fibers_); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .context.Fiber fibers = 4; + */ + public context.ContextOuterClass.Fiber.Builder addFibersBuilder() { + return getFibersFieldBuilder().addBuilder(context.ContextOuterClass.Fiber.getDefaultInstance()); + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public context.ContextOuterClass.Fiber.Builder addFibersBuilder(int index) { + return getFibersFieldBuilder().addBuilder(index, context.ContextOuterClass.Fiber.getDefaultInstance()); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latitude_ != 0F) { - output.writeFloat(1, latitude_); - } - if (longitude_ != 0F) { - output.writeFloat(2, longitude_); - } - unknownFields.writeTo(output); - } + /** + * repeated .context.Fiber fibers = 4; + */ + public java.util.List getFibersBuilderList() { + return getFibersFieldBuilder().getBuilderList(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latitude_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, latitude_); - } - if (longitude_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, longitude_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private com.google.protobuf.RepeatedFieldBuilderV3 getFibersFieldBuilder() { + if (fibersBuilder_ == null) { + fibersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(fibers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + fibers_ = null; + } + return fibersBuilder_; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.GPS_Position)) { - return super.equals(obj); - } - context.ContextOuterClass.GPS_Position other = (context.ContextOuterClass.GPS_Position) obj; - - if (java.lang.Float.floatToIntBits(getLatitude()) - != java.lang.Float.floatToIntBits( - other.getLatitude())) return false; - if (java.lang.Float.floatToIntBits(getLongitude()) - != java.lang.Float.floatToIntBits( - other.getLongitude())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LATITUDE_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.OpticalLinkDetails) + } - public static context.ContextOuterClass.GPS_Position parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.GPS_Position parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.GPS_Position parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.GPS_Position parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.GPS_Position parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + // @@protoc_insertion_point(class_scope:context.OpticalLinkDetails) + private static final context.ContextOuterClass.OpticalLinkDetails DEFAULT_INSTANCE; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.GPS_Position prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLinkDetails(); + } + + public static context.ContextOuterClass.OpticalLinkDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.GPS_Position} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.GPS_Position) - context.ContextOuterClass.GPS_PositionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_GPS_Position_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_GPS_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.GPS_Position.class, context.ContextOuterClass.GPS_Position.Builder.class); - } - - // 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(); - latitude_ = 0F; - - longitude_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_GPS_Position_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.GPS_Position getDefaultInstanceForType() { - return context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.GPS_Position build() { - context.ContextOuterClass.GPS_Position result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.GPS_Position) { - return mergeFrom((context.ContextOuterClass.GPS_Position)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.GPS_Position other) { - if (other == context.ContextOuterClass.GPS_Position.getDefaultInstance()) return this; - if (other.getLatitude() != 0F) { - setLatitude(other.getLatitude()); - } - if (other.getLongitude() != 0F) { - setLongitude(other.getLongitude()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.GPS_Position) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float latitude_ ; - /** - * float latitude = 1; - * @return The latitude. - */ - @java.lang.Override - public float getLatitude() { - return latitude_; - } - /** - * float latitude = 1; - * @param value The latitude to set. - * @return This builder for chaining. - */ - public Builder setLatitude(float value) { - - latitude_ = value; - onChanged(); - return this; - } - /** - * float latitude = 1; - * @return This builder for chaining. - */ - public Builder clearLatitude() { - - latitude_ = 0F; - onChanged(); - return this; - } - - private float longitude_ ; - /** - * float longitude = 2; - * @return The longitude. - */ - @java.lang.Override - public float getLongitude() { - return longitude_; - } - /** - * float longitude = 2; - * @param value The longitude to set. - * @return This builder for chaining. - */ - public Builder setLongitude(float value) { - - longitude_ = value; - onChanged(); - return this; - } - /** - * float longitude = 2; - * @return This builder for chaining. - */ - public Builder clearLongitude() { - - longitude_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.GPS_Position) - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - // @@protoc_insertion_point(class_scope:context.GPS_Position) - private static final context.ContextOuterClass.GPS_Position DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.GPS_Position(); - } + @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); + } + }; - public static context.ContextOuterClass.GPS_Position getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + @java.lang.Override + public context.ContextOuterClass.OpticalLinkDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public context.ContextOuterClass.GPS_Position getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public interface OpticalLinkOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLink) + com.google.protobuf.MessageOrBuilder { - } + /** + * string name = 1; + * @return The name. + */ + java.lang.String getName(); - public interface LocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Location) - com.google.protobuf.MessageOrBuilder { + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); - /** - * string region = 1; - * @return Whether the region field is set. - */ - boolean hasRegion(); - /** - * string region = 1; - * @return The region. - */ - java.lang.String getRegion(); - /** - * string region = 1; - * @return The bytes for region. - */ - com.google.protobuf.ByteString - getRegionBytes(); + /** + * .context.OpticalLinkDetails details = 2; + * @return Whether the details field is set. + */ + boolean hasDetails(); - /** - * .context.GPS_Position gps_position = 2; - * @return Whether the gpsPosition field is set. - */ - boolean hasGpsPosition(); - /** - * .context.GPS_Position gps_position = 2; - * @return The gpsPosition. - */ - context.ContextOuterClass.GPS_Position getGpsPosition(); - /** - * .context.GPS_Position gps_position = 2; - */ - context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder(); - - public context.ContextOuterClass.Location.LocationCase getLocationCase(); - } - /** - * Protobuf type {@code context.Location} - */ - public static final class Location extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Location) - LocationOrBuilder { - private static final long serialVersionUID = 0L; - // Use Location.newBuilder() to construct. - private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Location() { - } + /** + * .context.OpticalLinkDetails details = 2; + * @return The details. + */ + context.ContextOuterClass.OpticalLinkDetails getDetails(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Location(); - } + /** + * .context.OpticalLinkDetails details = 2; + */ + context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder(); - @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; - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + * @return Whether the opticalLinkUuid field is set. + */ + boolean hasOpticalLinkUuid(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Location_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Location.class, context.ContextOuterClass.Location.Builder.class); - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + * @return The opticalLinkUuid. + */ + context.ContextOuterClass.OpticalLinkId getOpticalLinkUuid(); - private int locationCase_ = 0; - private java.lang.Object location_; - public enum LocationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - REGION(1), - GPS_POSITION(2), - LOCATION_NOT_SET(0); - private final int value; - private LocationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LocationCase valueOf(int value) { - return forNumber(value); - } - - public static LocationCase forNumber(int value) { - switch (value) { - case 1: return REGION; - case 2: return GPS_POSITION; - case 0: return LOCATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LocationCase - getLocationCase() { - return LocationCase.forNumber( - locationCase_); + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder(); } - public static final int REGION_FIELD_NUMBER = 1; - /** - * string region = 1; - * @return Whether the region field is set. - */ - public boolean hasRegion() { - return locationCase_ == 1; - } - /** - * string region = 1; - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = ""; - if (locationCase_ == 1) { - ref = location_; - } - 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(); - if (locationCase_ == 1) { - location_ = s; - } - return s; - } - } /** - * string region = 1; - * @return The bytes for region. + * Protobuf type {@code context.OpticalLink} */ - public com.google.protobuf.ByteString - getRegionBytes() { - java.lang.Object ref = ""; - if (locationCase_ == 1) { - ref = location_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (locationCase_ == 1) { - location_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static final class OpticalLink extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLink) + OpticalLinkOrBuilder { - public static final int GPS_POSITION_FIELD_NUMBER = 2; - /** - * .context.GPS_Position gps_position = 2; - * @return Whether the gpsPosition field is set. - */ - @java.lang.Override - public boolean hasGpsPosition() { - return locationCase_ == 2; - } - /** - * .context.GPS_Position gps_position = 2; - * @return The gpsPosition. - */ - @java.lang.Override - public context.ContextOuterClass.GPS_Position getGpsPosition() { - if (locationCase_ == 2) { - return (context.ContextOuterClass.GPS_Position) location_; - } - return context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } - /** - * .context.GPS_Position gps_position = 2; - */ - @java.lang.Override - public context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder() { - if (locationCase_ == 2) { - return (context.ContextOuterClass.GPS_Position) location_; - } - return context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } + private static final long serialVersionUID = 0L; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + // Use OpticalLink.newBuilder() to construct. + private OpticalLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - memoizedIsInitialized = 1; - return true; - } + private OpticalLink() { + name_ = ""; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (locationCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); - } - if (locationCase_ == 2) { - output.writeMessage(2, (context.ContextOuterClass.GPS_Position) location_); - } - unknownFields.writeTo(output); - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpticalLink(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (locationCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); - } - if (locationCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (context.ContextOuterClass.GPS_Position) location_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Location)) { - return super.equals(obj); - } - context.ContextOuterClass.Location other = (context.ContextOuterClass.Location) obj; - - if (!getLocationCase().equals(other.getLocationCase())) return false; - switch (locationCase_) { - case 1: - if (!getRegion() - .equals(other.getRegion())) return false; - break; - case 2: - if (!getGpsPosition() - .equals(other.getGpsPosition())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + 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(); + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (locationCase_) { - case 1: - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - break; - case 2: - hash = (37 * hash) + GPS_POSITION_FIELD_NUMBER; - hash = (53 * hash) + getGpsPosition().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; + } - public static context.ContextOuterClass.Location parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Location parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Location parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Location parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Location parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Location parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Location parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Location parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Location parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Location parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Location parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Location parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLink_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLink.class, context.ContextOuterClass.OpticalLink.Builder.class); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Location prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static final int NAME_FIELD_NUMBER = 1; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Location} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Location) - context.ContextOuterClass.LocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Location_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Location_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Location.class, context.ContextOuterClass.Location.Builder.class); - } - - // 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(); - locationCase_ = 0; - location_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Location_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Location getDefaultInstanceForType() { - return context.ContextOuterClass.Location.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Location build() { - context.ContextOuterClass.Location result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - } - result.locationCase_ = locationCase_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Location) { - return mergeFrom((context.ContextOuterClass.Location)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Location other) { - if (other == context.ContextOuterClass.Location.getDefaultInstance()) return this; - switch (other.getLocationCase()) { - case REGION: { - locationCase_ = 1; - location_ = other.location_; - onChanged(); - break; - } - case GPS_POSITION: { - mergeGpsPosition(other.getGpsPosition()); - break; - } - case LOCATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Location) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int locationCase_ = 0; - private java.lang.Object location_; - public LocationCase - getLocationCase() { - return LocationCase.forNumber( - locationCase_); - } - - public Builder clearLocation() { - locationCase_ = 0; - location_ = null; - onChanged(); - return this; - } - - - /** - * string region = 1; - * @return Whether the region field is set. - */ - @java.lang.Override - public boolean hasRegion() { - return locationCase_ == 1; - } - /** - * string region = 1; - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = ""; - if (locationCase_ == 1) { - ref = location_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (locationCase_ == 1) { - location_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string region = 1; - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRegionBytes() { - java.lang.Object ref = ""; - if (locationCase_ == 1) { - ref = location_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (locationCase_ == 1) { - location_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string region = 1; - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - locationCase_ = 1; - location_ = value; - onChanged(); - return this; - } - /** - * string region = 1; - * @return This builder for chaining. - */ - public Builder clearRegion() { - if (locationCase_ == 1) { - locationCase_ = 0; - location_ = null; - onChanged(); - } - return this; - } - /** - * string region = 1; - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - locationCase_ = 1; - location_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.GPS_Position, context.ContextOuterClass.GPS_Position.Builder, context.ContextOuterClass.GPS_PositionOrBuilder> gpsPositionBuilder_; - /** - * .context.GPS_Position gps_position = 2; - * @return Whether the gpsPosition field is set. - */ - @java.lang.Override - public boolean hasGpsPosition() { - return locationCase_ == 2; - } - /** - * .context.GPS_Position gps_position = 2; - * @return The gpsPosition. - */ - @java.lang.Override - public context.ContextOuterClass.GPS_Position getGpsPosition() { - if (gpsPositionBuilder_ == null) { - if (locationCase_ == 2) { - return (context.ContextOuterClass.GPS_Position) location_; - } - return context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } else { - if (locationCase_ == 2) { - return gpsPositionBuilder_.getMessage(); - } - return context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } - } - /** - * .context.GPS_Position gps_position = 2; - */ - public Builder setGpsPosition(context.ContextOuterClass.GPS_Position value) { - if (gpsPositionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - location_ = value; - onChanged(); - } else { - gpsPositionBuilder_.setMessage(value); - } - locationCase_ = 2; - return this; - } - /** - * .context.GPS_Position gps_position = 2; - */ - public Builder setGpsPosition( - context.ContextOuterClass.GPS_Position.Builder builderForValue) { - if (gpsPositionBuilder_ == null) { - location_ = builderForValue.build(); - onChanged(); - } else { - gpsPositionBuilder_.setMessage(builderForValue.build()); - } - locationCase_ = 2; - return this; - } - /** - * .context.GPS_Position gps_position = 2; - */ - public Builder mergeGpsPosition(context.ContextOuterClass.GPS_Position value) { - if (gpsPositionBuilder_ == null) { - if (locationCase_ == 2 && - location_ != context.ContextOuterClass.GPS_Position.getDefaultInstance()) { - location_ = context.ContextOuterClass.GPS_Position.newBuilder((context.ContextOuterClass.GPS_Position) location_) - .mergeFrom(value).buildPartial(); - } else { - location_ = value; - } - onChanged(); - } else { - if (locationCase_ == 2) { - gpsPositionBuilder_.mergeFrom(value); - } - gpsPositionBuilder_.setMessage(value); - } - locationCase_ = 2; - return this; - } - /** - * .context.GPS_Position gps_position = 2; - */ - public Builder clearGpsPosition() { - if (gpsPositionBuilder_ == null) { - if (locationCase_ == 2) { - locationCase_ = 0; - location_ = null; - onChanged(); - } - } else { - if (locationCase_ == 2) { - locationCase_ = 0; - location_ = null; - } - gpsPositionBuilder_.clear(); - } - return this; - } - /** - * .context.GPS_Position gps_position = 2; - */ - public context.ContextOuterClass.GPS_Position.Builder getGpsPositionBuilder() { - return getGpsPositionFieldBuilder().getBuilder(); - } - /** - * .context.GPS_Position gps_position = 2; - */ - @java.lang.Override - public context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder() { - if ((locationCase_ == 2) && (gpsPositionBuilder_ != null)) { - return gpsPositionBuilder_.getMessageOrBuilder(); - } else { - if (locationCase_ == 2) { - return (context.ContextOuterClass.GPS_Position) location_; - } - return context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } - } - /** - * .context.GPS_Position gps_position = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.GPS_Position, context.ContextOuterClass.GPS_Position.Builder, context.ContextOuterClass.GPS_PositionOrBuilder> - getGpsPositionFieldBuilder() { - if (gpsPositionBuilder_ == null) { - if (!(locationCase_ == 2)) { - location_ = context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } - gpsPositionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.GPS_Position, context.ContextOuterClass.GPS_Position.Builder, context.ContextOuterClass.GPS_PositionOrBuilder>( - (context.ContextOuterClass.GPS_Position) location_, - getParentForChildren(), - isClean()); - location_ = null; - } - locationCase_ = 2; - onChanged();; - return gpsPositionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Location) - } + private volatile java.lang.Object name_; - // @@protoc_insertion_point(class_scope:context.Location) - private static final context.ContextOuterClass.Location DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Location(); - } + /** + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } - public static context.ContextOuterClass.Location getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static final int DETAILS_FIELD_NUMBER = 2; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private context.ContextOuterClass.OpticalLinkDetails details_; - @java.lang.Override - public context.ContextOuterClass.Location getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.OpticalLinkDetails details = 2; + * @return Whether the details field is set. + */ + @java.lang.Override + public boolean hasDetails() { + return details_ != null; + } - } + /** + * .context.OpticalLinkDetails details = 2; + * @return The details. + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLinkDetails getDetails() { + return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + } - public interface Constraint_EndPointLocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_EndPointLocation) - com.google.protobuf.MessageOrBuilder { + /** + * .context.OpticalLinkDetails details = 2; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder() { + return getDetails(); + } - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - boolean hasEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - context.ContextOuterClass.EndPointId getEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + public static final int OPTICAL_LINK_UUID_FIELD_NUMBER = 3; - /** - * .context.Location location = 2; - * @return Whether the location field is set. - */ - boolean hasLocation(); - /** - * .context.Location location = 2; - * @return The location. - */ - context.ContextOuterClass.Location getLocation(); - /** - * .context.Location location = 2; - */ - context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder(); - } - /** - * Protobuf type {@code context.Constraint_EndPointLocation} - */ - public static final class Constraint_EndPointLocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_EndPointLocation) - Constraint_EndPointLocationOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_EndPointLocation.newBuilder() to construct. - private Constraint_EndPointLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_EndPointLocation() { - } + private context.ContextOuterClass.OpticalLinkId opticalLinkUuid_; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_EndPointLocation(); - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + * @return Whether the opticalLinkUuid field is set. + */ + @java.lang.Override + public boolean hasOpticalLinkUuid() { + return opticalLinkUuid_ != null; + } - @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; - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + * @return The opticalLinkUuid. + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLinkId getOpticalLinkUuid() { + return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_EndPointLocation.class, context.ContextOuterClass.Constraint_EndPointLocation.Builder.class); - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder() { + return getOpticalLinkUuid(); + } - public static final int ENDPOINT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.EndPointId endpointId_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - @java.lang.Override - public boolean hasEndpointId() { - return endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointId() { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); - } + private byte memoizedIsInitialized = -1; - public static final int LOCATION_FIELD_NUMBER = 2; - private context.ContextOuterClass.Location location_; - /** - * .context.Location location = 2; - * @return Whether the location field is set. - */ - @java.lang.Override - public boolean hasLocation() { - return location_ != null; - } - /** - * .context.Location location = 2; - * @return The location. - */ - @java.lang.Override - public context.ContextOuterClass.Location getLocation() { - return location_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : location_; - } - /** - * .context.Location location = 2; - */ - @java.lang.Override - public context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder() { - return getLocation(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (details_ != null) { + output.writeMessage(2, getDetails()); + } + if (opticalLinkUuid_ != null) { + output.writeMessage(3, getOpticalLinkUuid()); + } + unknownFields.writeTo(output); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (details_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDetails()); + } + if (opticalLinkUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOpticalLinkUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (endpointId_ != null) { - output.writeMessage(1, getEndpointId()); - } - if (location_ != null) { - output.writeMessage(2, getLocation()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.OpticalLink)) { + return super.equals(obj); + } + context.ContextOuterClass.OpticalLink other = (context.ContextOuterClass.OpticalLink) obj; + if (!getName().equals(other.getName())) + return false; + if (hasDetails() != other.hasDetails()) + return false; + if (hasDetails()) { + if (!getDetails().equals(other.getDetails())) + return false; + } + if (hasOpticalLinkUuid() != other.hasOpticalLinkUuid()) + return false; + if (hasOpticalLinkUuid()) { + if (!getOpticalLinkUuid().equals(other.getOpticalLinkUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (endpointId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEndpointId()); - } - if (location_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getLocation()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasDetails()) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + } + if (hasOpticalLinkUuid()) { + hash = (37 * hash) + OPTICAL_LINK_UUID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalLinkUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_EndPointLocation)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint_EndPointLocation other = (context.ContextOuterClass.Constraint_EndPointLocation) obj; - - if (hasEndpointId() != other.hasEndpointId()) return false; - if (hasEndpointId()) { - if (!getEndpointId() - .equals(other.getEndpointId())) return false; - } - if (hasLocation() != other.hasLocation()) return false; - if (hasLocation()) { - if (!getLocation() - .equals(other.getLocation())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.OpticalLink parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEndpointId()) { - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - } - if (hasLocation()) { - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocation().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.OpticalLink parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_EndPointLocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_EndPointLocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_EndPointLocation) - context.ContextOuterClass.Constraint_EndPointLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_EndPointLocation.class, context.ContextOuterClass.Constraint_EndPointLocation.Builder.class); - } - - // 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; - endpointIdBuilder_ = null; - } - if (locationBuilder_ == null) { - location_ = null; - } else { - location_ = null; - locationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocation getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocation build() { - context.ContextOuterClass.Constraint_EndPointLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_EndPointLocation) { - return mergeFrom((context.ContextOuterClass.Constraint_EndPointLocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_EndPointLocation other) { - if (other == context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance()) return this; - if (other.hasEndpointId()) { - mergeEndpointId(other.getEndpointId()); - } - if (other.hasLocation()) { - mergeLocation(other.getLocation()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_EndPointLocation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.EndPointId endpointId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - public context.ContextOuterClass.EndPointId getEndpointId() { - if (endpointIdBuilder_ == null) { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } else { - return endpointIdBuilder_.getMessage(); - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - onChanged(); - } else { - endpointIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdBuilder_ == null) { - endpointId_ = builderForValue.build(); - onChanged(); - } else { - endpointIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = - context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); - } else { - endpointId_ = value; - } - onChanged(); - } else { - endpointIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { - - onChanged(); - return getEndpointIdFieldBuilder().getBuilder(); - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - if (endpointIdBuilder_ != null) { - return endpointIdBuilder_.getMessageOrBuilder(); - } else { - return endpointId_ == null ? - context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> - getEndpointIdFieldBuilder() { - if (endpointIdBuilder_ == null) { - endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>( - getEndpointId(), - getParentForChildren(), - isClean()); - endpointId_ = null; - } - return endpointIdBuilder_; - } - - private context.ContextOuterClass.Location location_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Location, context.ContextOuterClass.Location.Builder, context.ContextOuterClass.LocationOrBuilder> locationBuilder_; - /** - * .context.Location location = 2; - * @return Whether the location field is set. - */ - public boolean hasLocation() { - return locationBuilder_ != null || location_ != null; - } - /** - * .context.Location location = 2; - * @return The location. - */ - public context.ContextOuterClass.Location getLocation() { - if (locationBuilder_ == null) { - return location_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : location_; - } else { - return locationBuilder_.getMessage(); - } - } - /** - * .context.Location location = 2; - */ - public Builder setLocation(context.ContextOuterClass.Location value) { - if (locationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - location_ = value; - onChanged(); - } else { - locationBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Location location = 2; - */ - public Builder setLocation( - context.ContextOuterClass.Location.Builder builderForValue) { - if (locationBuilder_ == null) { - location_ = builderForValue.build(); - onChanged(); - } else { - locationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Location location = 2; - */ - public Builder mergeLocation(context.ContextOuterClass.Location value) { - if (locationBuilder_ == null) { - if (location_ != null) { - location_ = - context.ContextOuterClass.Location.newBuilder(location_).mergeFrom(value).buildPartial(); - } else { - location_ = value; - } - onChanged(); - } else { - locationBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Location location = 2; - */ - public Builder clearLocation() { - if (locationBuilder_ == null) { - location_ = null; - onChanged(); - } else { - location_ = null; - locationBuilder_ = null; - } - - return this; - } - /** - * .context.Location location = 2; - */ - public context.ContextOuterClass.Location.Builder getLocationBuilder() { - - onChanged(); - return getLocationFieldBuilder().getBuilder(); - } - /** - * .context.Location location = 2; - */ - public context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder() { - if (locationBuilder_ != null) { - return locationBuilder_.getMessageOrBuilder(); - } else { - return location_ == null ? - context.ContextOuterClass.Location.getDefaultInstance() : location_; - } - } - /** - * .context.Location location = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Location, context.ContextOuterClass.Location.Builder, context.ContextOuterClass.LocationOrBuilder> - getLocationFieldBuilder() { - if (locationBuilder_ == null) { - locationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Location, context.ContextOuterClass.Location.Builder, context.ContextOuterClass.LocationOrBuilder>( - getLocation(), - getParentForChildren(), - isClean()); - location_ = null; - } - return locationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_EndPointLocation) - } + public static context.ContextOuterClass.OpticalLink parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(class_scope:context.Constraint_EndPointLocation) - private static final context.ContextOuterClass.Constraint_EndPointLocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_EndPointLocation(); - } + public static context.ContextOuterClass.OpticalLink parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.Constraint_EndPointLocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.OpticalLink parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.OpticalLink parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.OpticalLink parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.OpticalLink parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - } + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public interface Constraint_EndPointPriorityOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_EndPointPriority) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - boolean hasEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - context.ContextOuterClass.EndPointId getEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - /** - * uint32 priority = 2; - * @return The priority. - */ - int getPriority(); - } - /** - * Protobuf type {@code context.Constraint_EndPointPriority} - */ - public static final class Constraint_EndPointPriority extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_EndPointPriority) - Constraint_EndPointPriorityOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_EndPointPriority.newBuilder() to construct. - private Constraint_EndPointPriority(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_EndPointPriority() { - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_EndPointPriority(); - } + public static Builder newBuilder(context.ContextOuterClass.OpticalLink prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @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; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_EndPointPriority.class, context.ContextOuterClass.Constraint_EndPointPriority.Builder.class); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public static final int ENDPOINT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.EndPointId endpointId_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - @java.lang.Override - public boolean hasEndpointId() { - return endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointId() { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); - } + /** + * Protobuf type {@code context.OpticalLink} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLink) + context.ContextOuterClass.OpticalLinkOrBuilder { - public static final int PRIORITY_FIELD_NUMBER = 2; - private int priority_; - /** - * uint32 priority = 2; - * @return The priority. - */ - @java.lang.Override - public int getPriority() { - return priority_; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLink_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLink.class, context.ContextOuterClass.OpticalLink.Builder.class); + } - memoizedIsInitialized = 1; - return true; - } + // Construct using context.ContextOuterClass.OpticalLink.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (endpointId_ != null) { - output.writeMessage(1, getEndpointId()); - } - if (priority_ != 0) { - output.writeUInt32(2, priority_); - } - unknownFields.writeTo(output); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (endpointId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEndpointId()); - } - if (priority_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, priority_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + if (detailsBuilder_ == null) { + details_ = null; + } else { + details_ = null; + detailsBuilder_ = null; + } + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuid_ = null; + } else { + opticalLinkUuid_ = null; + opticalLinkUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.OpticalLink getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalLink.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.OpticalLink build() { + context.ContextOuterClass.OpticalLink result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_EndPointPriority)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint_EndPointPriority other = (context.ContextOuterClass.Constraint_EndPointPriority) obj; - - if (hasEndpointId() != other.hasEndpointId()) return false; - if (hasEndpointId()) { - if (!getEndpointId() - .equals(other.getEndpointId())) return false; - } - if (getPriority() - != other.getPriority()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @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(); + } + onBuilt(); + return result; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEndpointId()) { - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - } - hash = (37 * hash) + PRIORITY_FIELD_NUMBER; - hash = (53 * hash) + getPriority(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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 newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_EndPointPriority prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_EndPointPriority} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_EndPointPriority) - context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_EndPointPriority.class, context.ContextOuterClass.Constraint_EndPointPriority.Builder.class); - } - - // 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; - endpointIdBuilder_ = null; - } - priority_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriority getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriority build() { - context.ContextOuterClass.Constraint_EndPointPriority result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_EndPointPriority) { - return mergeFrom((context.ContextOuterClass.Constraint_EndPointPriority)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_EndPointPriority other) { - if (other == context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance()) return this; - if (other.hasEndpointId()) { - mergeEndpointId(other.getEndpointId()); - } - if (other.getPriority() != 0) { - setPriority(other.getPriority()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_EndPointPriority) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.EndPointId endpointId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - public context.ContextOuterClass.EndPointId getEndpointId() { - if (endpointIdBuilder_ == null) { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } else { - return endpointIdBuilder_.getMessage(); - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - onChanged(); - } else { - endpointIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdBuilder_ == null) { - endpointId_ = builderForValue.build(); - onChanged(); - } else { - endpointIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = - context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); - } else { - endpointId_ = value; - } - onChanged(); - } else { - endpointIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { - - onChanged(); - return getEndpointIdFieldBuilder().getBuilder(); - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - if (endpointIdBuilder_ != null) { - return endpointIdBuilder_.getMessageOrBuilder(); - } else { - return endpointId_ == null ? - context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> - getEndpointIdFieldBuilder() { - if (endpointIdBuilder_ == null) { - endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>( - getEndpointId(), - getParentForChildren(), - isClean()); - endpointId_ = null; - } - return endpointIdBuilder_; - } - - private int priority_ ; - /** - * uint32 priority = 2; - * @return The priority. - */ - @java.lang.Override - public int getPriority() { - return priority_; - } - /** - * uint32 priority = 2; - * @param value The priority to set. - * @return This builder for chaining. - */ - public Builder setPriority(int value) { - - priority_ = value; - onChanged(); - return this; - } - /** - * uint32 priority = 2; - * @return This builder for chaining. - */ - public Builder clearPriority() { - - priority_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_EndPointPriority) - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - // @@protoc_insertion_point(class_scope:context.Constraint_EndPointPriority) - private static final context.ContextOuterClass.Constraint_EndPointPriority DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_EndPointPriority(); - } + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - public static context.ContextOuterClass.Constraint_EndPointPriority getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalLink) { + return mergeFrom((context.ContextOuterClass.OpticalLink) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public Builder mergeFrom(context.ContextOuterClass.OpticalLink other) { + if (other == context.ContextOuterClass.OpticalLink.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasDetails()) { + mergeDetails(other.getDetails()); + } + if (other.hasOpticalLinkUuid()) { + mergeOpticalLinkUuid(other.getOpticalLinkUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriority getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.OpticalLink) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - public interface Constraint_SLA_LatencyOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Latency) - com.google.protobuf.MessageOrBuilder { + private java.lang.Object name_ = ""; + + /** + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * float e2e_latency_ms = 1; - * @return The e2eLatencyMs. - */ - float getE2ELatencyMs(); - } - /** - * Protobuf type {@code context.Constraint_SLA_Latency} - */ - public static final class Constraint_SLA_Latency extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Latency) - Constraint_SLA_LatencyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_SLA_Latency.newBuilder() to construct. - private Constraint_SLA_Latency(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_SLA_Latency() { - } + /** + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_SLA_Latency(); - } + /** + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } - @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; - } + /** + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Latency.class, context.ContextOuterClass.Constraint_SLA_Latency.Builder.class); - } + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } - public static final int E2E_LATENCY_MS_FIELD_NUMBER = 1; - private float e2ELatencyMs_; - /** - * float e2e_latency_ms = 1; - * @return The e2eLatencyMs. - */ - @java.lang.Override - public float getE2ELatencyMs() { - return e2ELatencyMs_; - } + private context.ContextOuterClass.OpticalLinkDetails details_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private com.google.protobuf.SingleFieldBuilderV3 detailsBuilder_; - memoizedIsInitialized = 1; - return true; - } + /** + * .context.OpticalLinkDetails details = 2; + * @return Whether the details field is set. + */ + public boolean hasDetails() { + return detailsBuilder_ != null || details_ != null; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (e2ELatencyMs_ != 0F) { - output.writeFloat(1, e2ELatencyMs_); - } - unknownFields.writeTo(output); - } + /** + * .context.OpticalLinkDetails details = 2; + * @return The details. + */ + public context.ContextOuterClass.OpticalLinkDetails getDetails() { + if (detailsBuilder_ == null) { + return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + } else { + return detailsBuilder_.getMessage(); + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (e2ELatencyMs_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, e2ELatencyMs_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.OpticalLinkDetails details = 2; + */ + public Builder setDetails(context.ContextOuterClass.OpticalLinkDetails value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + detailsBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Latency)) { - return super.equals(obj); - } - 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)) return false; - return true; - } + /** + * .context.OpticalLinkDetails details = 2; + */ + public Builder setDetails(context.ContextOuterClass.OpticalLinkDetails.Builder builderForValue) { + if (detailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + detailsBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - 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(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.OpticalLinkDetails details = 2; + */ + public Builder mergeDetails(context.ContextOuterClass.OpticalLinkDetails value) { + if (detailsBuilder_ == null) { + if (details_ != null) { + details_ = context.ContextOuterClass.OpticalLinkDetails.newBuilder(details_).mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + detailsBuilder_.mergeFrom(value); + } + return this; + } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.OpticalLinkDetails details = 2; + */ + public Builder clearDetails() { + if (detailsBuilder_ == null) { + details_ = null; + onChanged(); + } else { + details_ = null; + detailsBuilder_ = null; + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Latency prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.OpticalLinkDetails details = 2; + */ + public context.ContextOuterClass.OpticalLinkDetails.Builder getDetailsBuilder() { + onChanged(); + return getDetailsFieldBuilder().getBuilder(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_SLA_Latency} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Latency) - context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Latency.class, context.ContextOuterClass.Constraint_SLA_Latency.Builder.class); - } - - // 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(); - e2ELatencyMs_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency build() { - context.ContextOuterClass.Constraint_SLA_Latency result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_SLA_Latency) { - return mergeFrom((context.ContextOuterClass.Constraint_SLA_Latency)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Latency other) { - if (other == context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance()) return this; - if (other.getE2ELatencyMs() != 0F) { - setE2ELatencyMs(other.getE2ELatencyMs()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_SLA_Latency) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float e2ELatencyMs_ ; - /** - * float e2e_latency_ms = 1; - * @return The e2eLatencyMs. - */ - @java.lang.Override - public float getE2ELatencyMs() { - return e2ELatencyMs_; - } - /** - * float e2e_latency_ms = 1; - * @param value The e2eLatencyMs to set. - * @return This builder for chaining. - */ - public Builder setE2ELatencyMs(float value) { - - e2ELatencyMs_ = value; - onChanged(); - return this; - } - /** - * float e2e_latency_ms = 1; - * @return This builder for chaining. - */ - public Builder clearE2ELatencyMs() { - - e2ELatencyMs_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Latency) - } + /** + * .context.OpticalLinkDetails details = 2; + */ + public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder() { + if (detailsBuilder_ != null) { + return detailsBuilder_.getMessageOrBuilder(); + } else { + return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + } + } - // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Latency) - private static final context.ContextOuterClass.Constraint_SLA_Latency DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Latency(); - } + /** + * .context.OpticalLinkDetails details = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDetailsFieldBuilder() { + if (detailsBuilder_ == null) { + detailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDetails(), getParentForChildren(), isClean()); + details_ = null; + } + return detailsBuilder_; + } - public static context.ContextOuterClass.Constraint_SLA_Latency getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private context.ContextOuterClass.OpticalLinkId opticalLinkUuid_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private com.google.protobuf.SingleFieldBuilderV3 opticalLinkUuidBuilder_; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + * @return Whether the opticalLinkUuid field is set. + */ + public boolean hasOpticalLinkUuid() { + return opticalLinkUuidBuilder_ != null || opticalLinkUuid_ != null; + } - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + * @return The opticalLinkUuid. + */ + public context.ContextOuterClass.OpticalLinkId getOpticalLinkUuid() { + if (opticalLinkUuidBuilder_ == null) { + return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + } else { + return opticalLinkUuidBuilder_.getMessage(); + } + } - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + public Builder setOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId value) { + if (opticalLinkUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + opticalLinkUuid_ = value; + onChanged(); + } else { + opticalLinkUuidBuilder_.setMessage(value); + } + return this; + } - public interface Constraint_SLA_CapacityOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Capacity) - com.google.protobuf.MessageOrBuilder { + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + public Builder setOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId.Builder builderForValue) { + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuid_ = builderForValue.build(); + onChanged(); + } else { + opticalLinkUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } - /** - * float capacity_gbps = 1; - * @return The capacityGbps. - */ - float getCapacityGbps(); - } - /** - * Protobuf type {@code context.Constraint_SLA_Capacity} - */ - public static final class Constraint_SLA_Capacity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Capacity) - Constraint_SLA_CapacityOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_SLA_Capacity.newBuilder() to construct. - private Constraint_SLA_Capacity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_SLA_Capacity() { - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + public Builder mergeOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId value) { + if (opticalLinkUuidBuilder_ == null) { + if (opticalLinkUuid_ != null) { + opticalLinkUuid_ = context.ContextOuterClass.OpticalLinkId.newBuilder(opticalLinkUuid_).mergeFrom(value).buildPartial(); + } else { + opticalLinkUuid_ = value; + } + onChanged(); + } else { + opticalLinkUuidBuilder_.mergeFrom(value); + } + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_SLA_Capacity(); - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + public Builder clearOpticalLinkUuid() { + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuid_ = null; + onChanged(); + } else { + opticalLinkUuid_ = null; + opticalLinkUuidBuilder_ = null; + } + return this; + } - @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; - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + public context.ContextOuterClass.OpticalLinkId.Builder getOpticalLinkUuidBuilder() { + onChanged(); + return getOpticalLinkUuidFieldBuilder().getBuilder(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Capacity.class, context.ContextOuterClass.Constraint_SLA_Capacity.Builder.class); - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + public context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder() { + if (opticalLinkUuidBuilder_ != null) { + return opticalLinkUuidBuilder_.getMessageOrBuilder(); + } else { + return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + } + } - public static final int CAPACITY_GBPS_FIELD_NUMBER = 1; - private float capacityGbps_; - /** - * float capacity_gbps = 1; - * @return The capacityGbps. - */ - @java.lang.Override - public float getCapacityGbps() { - return capacityGbps_; - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getOpticalLinkUuidFieldBuilder() { + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalLinkUuid(), getParentForChildren(), isClean()); + opticalLinkUuid_ = null; + } + return opticalLinkUuidBuilder_; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.OpticalLink) + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (capacityGbps_ != 0F) { - output.writeFloat(1, capacityGbps_); - } - unknownFields.writeTo(output); - } + // @@protoc_insertion_point(class_scope:context.OpticalLink) + private static final context.ContextOuterClass.OpticalLink DEFAULT_INSTANCE; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (capacityGbps_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, capacityGbps_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLink(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Capacity)) { - return super.equals(obj); - } - 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)) return false; - return true; - } + public static context.ContextOuterClass.OpticalLink getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - 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(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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); + } + }; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Capacity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_SLA_Capacity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Capacity) - context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Capacity.class, context.ContextOuterClass.Constraint_SLA_Capacity.Builder.class); - } - - // 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(); - capacityGbps_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Capacity getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Capacity build() { - context.ContextOuterClass.Constraint_SLA_Capacity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_SLA_Capacity) { - return mergeFrom((context.ContextOuterClass.Constraint_SLA_Capacity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Capacity other) { - if (other == context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance()) return this; - if (other.getCapacityGbps() != 0F) { - setCapacityGbps(other.getCapacityGbps()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_SLA_Capacity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float capacityGbps_ ; - /** - * float capacity_gbps = 1; - * @return The capacityGbps. - */ - @java.lang.Override - public float getCapacityGbps() { - return capacityGbps_; - } - /** - * float capacity_gbps = 1; - * @param value The capacityGbps to set. - * @return This builder for chaining. - */ - public Builder setCapacityGbps(float value) { - - capacityGbps_ = value; - onChanged(); - return this; - } - /** - * float capacity_gbps = 1; - * @return This builder for chaining. - */ - public Builder clearCapacityGbps() { - - capacityGbps_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Capacity) - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Capacity) - private static final context.ContextOuterClass.Constraint_SLA_Capacity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Capacity(); + @java.lang.Override + public context.ContextOuterClass.OpticalLink getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static context.ContextOuterClass.Constraint_SLA_Capacity getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Empty_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Empty_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Uuid_descriptor; - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Capacity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Uuid_fieldAccessorTable; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Timestamp_descriptor; - public interface Constraint_SLA_AvailabilityOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Availability) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Timestamp_fieldAccessorTable; - /** - * uint32 num_disjoint_paths = 1; - * @return The numDisjointPaths. - */ - int getNumDisjointPaths(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Event_descriptor; - /** - * bool all_active = 2; - * @return The allActive. - */ - boolean getAllActive(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Event_fieldAccessorTable; - /** - *
-     * 0.0 .. 100.0 percentage of availability
-     * 
- * - * float availability = 3; - * @return The availability. - */ - float getAvailability(); - } - /** - * Protobuf type {@code context.Constraint_SLA_Availability} - */ - public static final class Constraint_SLA_Availability extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Availability) - Constraint_SLA_AvailabilityOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_SLA_Availability.newBuilder() to construct. - private Constraint_SLA_Availability(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_SLA_Availability() { - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ContextId_descriptor; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_SLA_Availability(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ContextId_fieldAccessorTable; - @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; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Context_descriptor; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Availability.class, context.ContextOuterClass.Constraint_SLA_Availability.Builder.class); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Context_fieldAccessorTable; - public static final int NUM_DISJOINT_PATHS_FIELD_NUMBER = 1; - private int numDisjointPaths_; - /** - * uint32 num_disjoint_paths = 1; - * @return The numDisjointPaths. - */ - @java.lang.Override - public int getNumDisjointPaths() { - return numDisjointPaths_; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ContextIdList_descriptor; - public static final int ALL_ACTIVE_FIELD_NUMBER = 2; - private boolean allActive_; - /** - * bool all_active = 2; - * @return The allActive. - */ - @java.lang.Override - public boolean getAllActive() { - return allActive_; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ContextIdList_fieldAccessorTable; - public static final int AVAILABILITY_FIELD_NUMBER = 3; - private float availability_; - /** - *
-     * 0.0 .. 100.0 percentage of availability
-     * 
- * - * float availability = 3; - * @return The availability. - */ - @java.lang.Override - public float getAvailability() { - return availability_; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ContextList_descriptor; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ContextList_fieldAccessorTable; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ContextEvent_descriptor; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (numDisjointPaths_ != 0) { - output.writeUInt32(1, numDisjointPaths_); - } - if (allActive_ != false) { - output.writeBool(2, allActive_); - } - if (availability_ != 0F) { - output.writeFloat(3, availability_); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ContextEvent_fieldAccessorTable; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (numDisjointPaths_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, numDisjointPaths_); - } - if (allActive_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, allActive_); - } - if (availability_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, availability_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_TopologyId_descriptor; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Availability)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint_SLA_Availability other = (context.ContextOuterClass.Constraint_SLA_Availability) obj; - - if (getNumDisjointPaths() - != other.getNumDisjointPaths()) return false; - if (getAllActive() - != other.getAllActive()) return false; - if (java.lang.Float.floatToIntBits(getAvailability()) - != java.lang.Float.floatToIntBits( - other.getAvailability())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_TopologyId_fieldAccessorTable; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NUM_DISJOINT_PATHS_FIELD_NUMBER; - hash = (53 * hash) + getNumDisjointPaths(); - hash = (37 * hash) + ALL_ACTIVE_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Topology_descriptor; - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Topology_fieldAccessorTable; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Availability prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_TopologyDetails_descriptor; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_SLA_Availability} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Availability) - context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Availability.class, context.ContextOuterClass.Constraint_SLA_Availability.Builder.class); - } - - // 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(); - numDisjointPaths_ = 0; - - allActive_ = false; - - availability_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability build() { - context.ContextOuterClass.Constraint_SLA_Availability result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_SLA_Availability) { - return mergeFrom((context.ContextOuterClass.Constraint_SLA_Availability)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Availability other) { - if (other == context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance()) return this; - if (other.getNumDisjointPaths() != 0) { - setNumDisjointPaths(other.getNumDisjointPaths()); - } - if (other.getAllActive() != false) { - setAllActive(other.getAllActive()); - } - if (other.getAvailability() != 0F) { - setAvailability(other.getAvailability()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_SLA_Availability) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int numDisjointPaths_ ; - /** - * uint32 num_disjoint_paths = 1; - * @return The numDisjointPaths. - */ - @java.lang.Override - public int getNumDisjointPaths() { - return numDisjointPaths_; - } - /** - * uint32 num_disjoint_paths = 1; - * @param value The numDisjointPaths to set. - * @return This builder for chaining. - */ - public Builder setNumDisjointPaths(int value) { - - numDisjointPaths_ = value; - onChanged(); - return this; - } - /** - * uint32 num_disjoint_paths = 1; - * @return This builder for chaining. - */ - public Builder clearNumDisjointPaths() { - - numDisjointPaths_ = 0; - onChanged(); - return this; - } - - private boolean allActive_ ; - /** - * bool all_active = 2; - * @return The allActive. - */ - @java.lang.Override - public boolean getAllActive() { - return allActive_; - } - /** - * bool all_active = 2; - * @param value The allActive to set. - * @return This builder for chaining. - */ - public Builder setAllActive(boolean value) { - - allActive_ = value; - onChanged(); - return this; - } - /** - * bool all_active = 2; - * @return This builder for chaining. - */ - public Builder clearAllActive() { - - allActive_ = false; - onChanged(); - return this; - } - - private float availability_ ; - /** - *
-       * 0.0 .. 100.0 percentage of availability
-       * 
- * - * float availability = 3; - * @return The availability. - */ - @java.lang.Override - public float getAvailability() { - return availability_; - } - /** - *
-       * 0.0 .. 100.0 percentage of availability
-       * 
- * - * float availability = 3; - * @param value The availability to set. - * @return This builder for chaining. - */ - public Builder setAvailability(float value) { - - availability_ = value; - onChanged(); - return this; - } - /** - *
-       * 0.0 .. 100.0 percentage of availability
-       * 
- * - * float availability = 3; - * @return This builder for chaining. - */ - public Builder clearAvailability() { - - availability_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Availability) - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_TopologyDetails_fieldAccessorTable; - // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Availability) - private static final context.ContextOuterClass.Constraint_SLA_Availability DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Availability(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_TopologyIdList_descriptor; - public static context.ContextOuterClass.Constraint_SLA_Availability getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_TopologyIdList_fieldAccessorTable; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_TopologyList_descriptor; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_TopologyList_fieldAccessorTable; - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_TopologyEvent_descriptor; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_TopologyEvent_fieldAccessorTable; - public interface Constraint_SLA_Isolation_levelOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Isolation_level) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceId_descriptor; - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return A list containing the isolationLevel. - */ - java.util.List getIsolationLevelList(); - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return The count of isolationLevel. - */ - int getIsolationLevelCount(); - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the element to return. - * @return The isolationLevel at the given index. - */ - context.ContextOuterClass.IsolationLevelEnum getIsolationLevel(int index); - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return A list containing the enum numeric values on the wire for isolationLevel. - */ - java.util.List - getIsolationLevelValueList(); - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of isolationLevel at the given index. - */ - int getIsolationLevelValue(int index); - } - /** - * Protobuf type {@code context.Constraint_SLA_Isolation_level} - */ - public static final class Constraint_SLA_Isolation_level extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Isolation_level) - Constraint_SLA_Isolation_levelOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_SLA_Isolation_level.newBuilder() to construct. - private Constraint_SLA_Isolation_level(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_SLA_Isolation_level() { - isolationLevel_ = java.util.Collections.emptyList(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_DeviceId_fieldAccessorTable; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_SLA_Isolation_level(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Device_descriptor; - @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(); - 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(); - 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; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Device_fieldAccessorTable; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Isolation_level.class, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder.class); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Component_descriptor; - public static final int ISOLATION_LEVEL_FIELD_NUMBER = 1; - private java.util.List 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); - return result == null ? context.ContextOuterClass.IsolationLevelEnum.UNRECOGNIZED : result; - } - }; - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return A list containing the isolationLevel. - */ - @java.lang.Override - public java.util.List getIsolationLevelList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, context.ContextOuterClass.IsolationLevelEnum>(isolationLevel_, isolationLevel_converter_); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return The count of isolationLevel. - */ - @java.lang.Override - public int getIsolationLevelCount() { - return isolationLevel_.size(); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the element to return. - * @return The isolationLevel at the given index. - */ - @java.lang.Override - public context.ContextOuterClass.IsolationLevelEnum getIsolationLevel(int index) { - return isolationLevel_converter_.convert(isolationLevel_.get(index)); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return A list containing the enum numeric values on the wire for isolationLevel. - */ - @java.lang.Override - public java.util.List - getIsolationLevelValueList() { - return isolationLevel_; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of isolationLevel at the given index. - */ - @java.lang.Override - public int getIsolationLevelValue(int index) { - return isolationLevel_.get(index); - } - private int isolationLevelMemoizedSerializedSize; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Component_fieldAccessorTable; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Component_AttributesEntry_descriptor; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Component_AttributesEntry_fieldAccessorTable; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (getIsolationLevelList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(isolationLevelMemoizedSerializedSize); - } - for (int i = 0; i < isolationLevel_.size(); i++) { - output.writeEnumNoTag(isolationLevel_.get(i)); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceConfig_descriptor; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < isolationLevel_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(isolationLevel_.get(i)); - } - size += dataSize; - if (!getIsolationLevelList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }isolationLevelMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_DeviceConfig_fieldAccessorTable; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Isolation_level)) { - return super.equals(obj); - } - 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)) return false; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceIdList_descriptor; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getIsolationLevelCount() > 0) { - hash = (37 * hash) + ISOLATION_LEVEL_FIELD_NUMBER; - hash = (53 * hash) + isolationLevel_.hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_DeviceIdList_fieldAccessorTable; - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceList_descriptor; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Isolation_level prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_DeviceList_fieldAccessorTable; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_SLA_Isolation_level} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Isolation_level) - context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Isolation_level.class, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder.class); - } - - // 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(); - isolationLevel_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level build() { - context.ContextOuterClass.Constraint_SLA_Isolation_level result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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); - } - 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); - } - @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.Constraint_SLA_Isolation_level) { - return mergeFrom((context.ContextOuterClass.Constraint_SLA_Isolation_level)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Isolation_level other) { - if (other == context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance()) return this; - if (!other.isolationLevel_.isEmpty()) { - if (isolationLevel_.isEmpty()) { - isolationLevel_ = other.isolationLevel_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIsolationLevelIsMutable(); - isolationLevel_.addAll(other.isolationLevel_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_SLA_Isolation_level) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List isolationLevel_ = - java.util.Collections.emptyList(); - private void ensureIsolationLevelIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - isolationLevel_ = new java.util.ArrayList(isolationLevel_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return A list containing the isolationLevel. - */ - public java.util.List getIsolationLevelList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, context.ContextOuterClass.IsolationLevelEnum>(isolationLevel_, isolationLevel_converter_); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return The count of isolationLevel. - */ - public int getIsolationLevelCount() { - return isolationLevel_.size(); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the element to return. - * @return The isolationLevel at the given index. - */ - public context.ContextOuterClass.IsolationLevelEnum getIsolationLevel(int index) { - return isolationLevel_converter_.convert(isolationLevel_.get(index)); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index to set the value at. - * @param value The isolationLevel to set. - * @return This builder for chaining. - */ - public Builder setIsolationLevel( - int index, context.ContextOuterClass.IsolationLevelEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIsolationLevelIsMutable(); - isolationLevel_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param value The isolationLevel to add. - * @return This builder for chaining. - */ - public Builder addIsolationLevel(context.ContextOuterClass.IsolationLevelEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIsolationLevelIsMutable(); - isolationLevel_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param values The isolationLevel to add. - * @return This builder for chaining. - */ - public Builder addAllIsolationLevel( - java.lang.Iterable values) { - ensureIsolationLevelIsMutable(); - for (context.ContextOuterClass.IsolationLevelEnum value : values) { - isolationLevel_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return This builder for chaining. - */ - public Builder clearIsolationLevel() { - isolationLevel_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return A list containing the enum numeric values on the wire for isolationLevel. - */ - public java.util.List - getIsolationLevelValueList() { - return java.util.Collections.unmodifiableList(isolationLevel_); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of isolationLevel at the given index. - */ - public int getIsolationLevelValue(int index) { - return isolationLevel_.get(index); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of isolationLevel at the given index. - * @return This builder for chaining. - */ - public Builder setIsolationLevelValue( - int index, int value) { - ensureIsolationLevelIsMutable(); - isolationLevel_.set(index, value); - onChanged(); - return this; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param value The enum numeric value on the wire for isolationLevel to add. - * @return This builder for chaining. - */ - public Builder addIsolationLevelValue(int value) { - ensureIsolationLevelIsMutable(); - isolationLevel_.add(value); - onChanged(); - return this; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param values The enum numeric values on the wire for isolationLevel to add. - * @return This builder for chaining. - */ - public Builder addAllIsolationLevelValue( - java.lang.Iterable values) { - ensureIsolationLevelIsMutable(); - for (int value : values) { - isolationLevel_.add(value); - } - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Isolation_level) - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceFilter_descriptor; - // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Isolation_level) - private static final context.ContextOuterClass.Constraint_SLA_Isolation_level DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Isolation_level(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_DeviceFilter_fieldAccessorTable; - public static context.ContextOuterClass.Constraint_SLA_Isolation_level getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceEvent_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_DeviceEvent_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_LinkId_descriptor; - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_LinkId_fieldAccessorTable; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_LinkAttributes_descriptor; - public interface Constraint_ExclusionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_Exclusions) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_LinkAttributes_fieldAccessorTable; - /** - * bool is_permanent = 1; - * @return The isPermanent. - */ - boolean getIsPermanent(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Link_descriptor; - /** - * repeated .context.DeviceId device_ids = 2; - */ - java.util.List - getDeviceIdsList(); - /** - * repeated .context.DeviceId device_ids = 2; - */ - context.ContextOuterClass.DeviceId getDeviceIds(int index); - /** - * repeated .context.DeviceId device_ids = 2; - */ - int getDeviceIdsCount(); - /** - * repeated .context.DeviceId device_ids = 2; - */ - java.util.List - getDeviceIdsOrBuilderList(); - /** - * repeated .context.DeviceId device_ids = 2; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Link_fieldAccessorTable; - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - java.util.List - getEndpointIdsList(); - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointId getEndpointIds(int index); - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - int getEndpointIdsCount(); - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - java.util.List - getEndpointIdsOrBuilderList(); - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder( - int index); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_LinkIdList_descriptor; - /** - * repeated .context.LinkId link_ids = 4; - */ - java.util.List - getLinkIdsList(); - /** - * repeated .context.LinkId link_ids = 4; - */ - context.ContextOuterClass.LinkId getLinkIds(int index); - /** - * repeated .context.LinkId link_ids = 4; - */ - int getLinkIdsCount(); - /** - * repeated .context.LinkId link_ids = 4; - */ - java.util.List - getLinkIdsOrBuilderList(); - /** - * repeated .context.LinkId link_ids = 4; - */ - context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.Constraint_Exclusions} - */ - public static final class Constraint_Exclusions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_Exclusions) - Constraint_ExclusionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_Exclusions.newBuilder() to construct. - private Constraint_Exclusions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_Exclusions() { - deviceIds_ = java.util.Collections.emptyList(); - endpointIds_ = java.util.Collections.emptyList(); - linkIds_ = java.util.Collections.emptyList(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_LinkIdList_fieldAccessorTable; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_Exclusions(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_LinkList_descriptor; - @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(); - 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(); - 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(); - 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; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_LinkList_fieldAccessorTable; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_Exclusions.class, context.ContextOuterClass.Constraint_Exclusions.Builder.class); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_LinkEvent_descriptor; - public static final int IS_PERMANENT_FIELD_NUMBER = 1; - private boolean isPermanent_; - /** - * bool is_permanent = 1; - * @return The isPermanent. - */ - @java.lang.Override - public boolean getIsPermanent() { - return isPermanent_; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_LinkEvent_fieldAccessorTable; - public static final int DEVICE_IDS_FIELD_NUMBER = 2; - private java.util.List deviceIds_; - /** - * repeated .context.DeviceId device_ids = 2; - */ - @java.lang.Override - public java.util.List getDeviceIdsList() { - return deviceIds_; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - @java.lang.Override - public java.util.List - getDeviceIdsOrBuilderList() { - return deviceIds_; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - @java.lang.Override - public int getDeviceIdsCount() { - return deviceIds_.size(); - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceIds(int index) { - return deviceIds_.get(index); - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index) { - return deviceIds_.get(index); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceId_descriptor; - public static final int ENDPOINT_IDS_FIELD_NUMBER = 3; - private java.util.List endpointIds_; - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List getEndpointIdsList() { - return endpointIds_; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List - getEndpointIdsOrBuilderList() { - return endpointIds_; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - @java.lang.Override - public int getEndpointIdsCount() { - return endpointIds_.size(); - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointIds(int index) { - return endpointIds_.get(index); - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder( - int index) { - return endpointIds_.get(index); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceId_fieldAccessorTable; - public static final int LINK_IDS_FIELD_NUMBER = 4; - private java.util.List linkIds_; - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public java.util.List getLinkIdsList() { - return linkIds_; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public java.util.List - getLinkIdsOrBuilderList() { - return linkIds_; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public int getLinkIdsCount() { - return linkIds_.size(); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.LinkId getLinkIds(int index) { - return linkIds_.get(index); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index) { - return linkIds_.get(index); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Service_descriptor; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Service_fieldAccessorTable; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceStatus_descriptor; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (isPermanent_ != false) { - output.writeBool(1, isPermanent_); - } - for (int i = 0; i < deviceIds_.size(); i++) { - output.writeMessage(2, deviceIds_.get(i)); - } - for (int i = 0; i < endpointIds_.size(); i++) { - output.writeMessage(3, endpointIds_.get(i)); - } - for (int i = 0; i < linkIds_.size(); i++) { - output.writeMessage(4, linkIds_.get(i)); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceStatus_fieldAccessorTable; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (isPermanent_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, isPermanent_); - } - for (int i = 0; i < deviceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, deviceIds_.get(i)); - } - for (int i = 0; i < endpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, endpointIds_.get(i)); - } - for (int i = 0; i < linkIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, linkIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceConfig_descriptor; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_Exclusions)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint_Exclusions other = (context.ContextOuterClass.Constraint_Exclusions) obj; - - if (getIsPermanent() - != other.getIsPermanent()) return false; - if (!getDeviceIdsList() - .equals(other.getDeviceIdsList())) return false; - if (!getEndpointIdsList() - .equals(other.getEndpointIdsList())) return false; - if (!getLinkIdsList() - .equals(other.getLinkIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceConfig_fieldAccessorTable; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + IS_PERMANENT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsPermanent()); - if (getDeviceIdsCount() > 0) { - hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getDeviceIdsList().hashCode(); - } - if (getEndpointIdsCount() > 0) { - hash = (37 * hash) + ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getEndpointIdsList().hashCode(); - } - if (getLinkIdsCount() > 0) { - hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; - hash = (53 * hash) + getLinkIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceIdList_descriptor; - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Exclusions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Exclusions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceIdList_fieldAccessorTable; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_Exclusions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceList_descriptor; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_Exclusions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_Exclusions) - context.ContextOuterClass.Constraint_ExclusionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_Exclusions.class, context.ContextOuterClass.Constraint_Exclusions.Builder.class); - } - - // 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(); - isPermanent_ = false; - - if (deviceIdsBuilder_ == null) { - deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - deviceIdsBuilder_.clear(); - } - if (endpointIdsBuilder_ == null) { - endpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - endpointIdsBuilder_.clear(); - } - if (linkIdsBuilder_ == null) { - linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - linkIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions build() { - context.ContextOuterClass.Constraint_Exclusions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - if (deviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deviceIds_ = deviceIds_; - } else { - result.deviceIds_ = deviceIdsBuilder_.build(); - } - if (endpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.endpointIds_ = endpointIds_; - } else { - result.endpointIds_ = endpointIdsBuilder_.build(); - } - if (linkIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - bitField0_ = (bitField0_ & ~0x00000004); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_Exclusions) { - return mergeFrom((context.ContextOuterClass.Constraint_Exclusions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_Exclusions other) { - if (other == context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance()) return this; - if (other.getIsPermanent() != false) { - setIsPermanent(other.getIsPermanent()); - } - if (deviceIdsBuilder_ == null) { - if (!other.deviceIds_.isEmpty()) { - if (deviceIds_.isEmpty()) { - deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeviceIdsIsMutable(); - deviceIds_.addAll(other.deviceIds_); - } - onChanged(); - } - } else { - if (!other.deviceIds_.isEmpty()) { - if (deviceIdsBuilder_.isEmpty()) { - deviceIdsBuilder_.dispose(); - deviceIdsBuilder_ = null; - deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - deviceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDeviceIdsFieldBuilder() : null; - } else { - deviceIdsBuilder_.addAllMessages(other.deviceIds_); - } - } - } - if (endpointIdsBuilder_ == null) { - if (!other.endpointIds_.isEmpty()) { - if (endpointIds_.isEmpty()) { - endpointIds_ = other.endpointIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureEndpointIdsIsMutable(); - endpointIds_.addAll(other.endpointIds_); - } - onChanged(); - } - } else { - if (!other.endpointIds_.isEmpty()) { - if (endpointIdsBuilder_.isEmpty()) { - endpointIdsBuilder_.dispose(); - endpointIdsBuilder_ = null; - endpointIds_ = other.endpointIds_; - bitField0_ = (bitField0_ & ~0x00000002); - endpointIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEndpointIdsFieldBuilder() : null; - } else { - endpointIdsBuilder_.addAllMessages(other.endpointIds_); - } - } - } - if (linkIdsBuilder_ == null) { - if (!other.linkIds_.isEmpty()) { - if (linkIds_.isEmpty()) { - linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureLinkIdsIsMutable(); - linkIds_.addAll(other.linkIds_); - } - onChanged(); - } - } else { - if (!other.linkIds_.isEmpty()) { - if (linkIdsBuilder_.isEmpty()) { - linkIdsBuilder_.dispose(); - linkIdsBuilder_ = null; - linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000004); - linkIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLinkIdsFieldBuilder() : null; - } else { - linkIdsBuilder_.addAllMessages(other.linkIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_Exclusions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private boolean isPermanent_ ; - /** - * bool is_permanent = 1; - * @return The isPermanent. - */ - @java.lang.Override - public boolean getIsPermanent() { - return isPermanent_; - } - /** - * bool is_permanent = 1; - * @param value The isPermanent to set. - * @return This builder for chaining. - */ - public Builder setIsPermanent(boolean value) { - - isPermanent_ = value; - onChanged(); - return this; - } - /** - * bool is_permanent = 1; - * @return This builder for chaining. - */ - public Builder clearIsPermanent() { - - isPermanent_ = false; - onChanged(); - return this; - } - - private java.util.List deviceIds_ = - java.util.Collections.emptyList(); - private void ensureDeviceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deviceIds_ = new java.util.ArrayList(deviceIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdsBuilder_; - - /** - * repeated .context.DeviceId device_ids = 2; - */ - public java.util.List getDeviceIdsList() { - if (deviceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(deviceIds_); - } else { - return deviceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public int getDeviceIdsCount() { - if (deviceIdsBuilder_ == null) { - return deviceIds_.size(); - } else { - return deviceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public context.ContextOuterClass.DeviceId getDeviceIds(int index) { - if (deviceIdsBuilder_ == null) { - return deviceIds_.get(index); - } else { - return deviceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder setDeviceIds( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.set(index, value); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder setDeviceIds( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder addDeviceIds(context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.add(value); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder addDeviceIds( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.add(index, value); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder addDeviceIds( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.add(builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder addDeviceIds( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder addAllDeviceIds( - java.lang.Iterable values) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deviceIds_); - onChanged(); - } else { - deviceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder clearDeviceIds() { - if (deviceIdsBuilder_ == null) { - deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - deviceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder removeDeviceIds(int index) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.remove(index); - onChanged(); - } else { - deviceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdsBuilder( - int index) { - return getDeviceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index) { - if (deviceIdsBuilder_ == null) { - return deviceIds_.get(index); } else { - return deviceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public java.util.List - getDeviceIdsOrBuilderList() { - if (deviceIdsBuilder_ != null) { - return deviceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deviceIds_); - } - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder() { - return getDeviceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder( - int index) { - return getDeviceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public java.util.List - getDeviceIdsBuilderList() { - return getDeviceIdsFieldBuilder().getBuilderList(); - } - 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()); - deviceIds_ = null; - } - return deviceIdsBuilder_; - } - - private java.util.List endpointIds_ = - java.util.Collections.emptyList(); - private void ensureEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - endpointIds_ = new java.util.ArrayList(endpointIds_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdsBuilder_; - - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public java.util.List getEndpointIdsList() { - if (endpointIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(endpointIds_); - } else { - return endpointIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public int getEndpointIdsCount() { - if (endpointIdsBuilder_ == null) { - return endpointIds_.size(); - } else { - return endpointIdsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId getEndpointIds(int index) { - if (endpointIdsBuilder_ == null) { - return endpointIds_.get(index); - } else { - return endpointIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder setEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (endpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointIdsIsMutable(); - endpointIds_.set(index, value); - onChanged(); - } else { - endpointIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder setEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.set(index, builderForValue.build()); - onChanged(); - } else { - endpointIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder addEndpointIds(context.ContextOuterClass.EndPointId value) { - if (endpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointIdsIsMutable(); - endpointIds_.add(value); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder addEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (endpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointIdsIsMutable(); - endpointIds_.add(index, value); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder addEndpointIds( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.add(builderForValue.build()); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder addEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.add(index, builderForValue.build()); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder addAllEndpointIds( - java.lang.Iterable values) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, endpointIds_); - onChanged(); - } else { - endpointIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder clearEndpointIds() { - if (endpointIdsBuilder_ == null) { - endpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - endpointIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder removeEndpointIds(int index) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.remove(index); - onChanged(); - } else { - endpointIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdsBuilder( - int index) { - return getEndpointIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder( - int index) { - if (endpointIdsBuilder_ == null) { - return endpointIds_.get(index); } else { - return endpointIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public java.util.List - getEndpointIdsOrBuilderList() { - if (endpointIdsBuilder_ != null) { - return endpointIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(endpointIds_); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder() { - return getEndpointIdsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder( - int index) { - return getEndpointIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public java.util.List - getEndpointIdsBuilderList() { - return getEndpointIdsFieldBuilder().getBuilderList(); - } - 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()); - endpointIds_ = null; - } - return endpointIdsBuilder_; - } - - private java.util.List linkIds_ = - java.util.Collections.emptyList(); - private void ensureLinkIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - linkIds_ = new java.util.ArrayList(linkIds_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> linkIdsBuilder_; - - /** - * repeated .context.LinkId link_ids = 4; - */ - public java.util.List getLinkIdsList() { - if (linkIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(linkIds_); - } else { - return linkIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public int getLinkIdsCount() { - if (linkIdsBuilder_ == null) { - return linkIds_.size(); - } else { - return linkIdsBuilder_.getCount(); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId getLinkIds(int index) { - if (linkIdsBuilder_ == null) { - return linkIds_.get(index); - } else { - return linkIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder setLinkIds( - int index, context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.set(index, value); - onChanged(); - } else { - linkIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder setLinkIds( - int index, context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.set(index, builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds(context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.add(value); - onChanged(); - } else { - linkIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds( - int index, context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.add(index, value); - onChanged(); - } else { - linkIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds( - context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.add(builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds( - int index, context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.add(index, builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addAllLinkIds( - java.lang.Iterable values) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, linkIds_); - onChanged(); - } else { - linkIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder clearLinkIds() { - if (linkIdsBuilder_ == null) { - linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - linkIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder removeLinkIds(int index) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.remove(index); - onChanged(); - } else { - linkIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId.Builder getLinkIdsBuilder( - int index) { - return getLinkIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index) { - if (linkIdsBuilder_ == null) { - return linkIds_.get(index); } else { - return linkIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public java.util.List - getLinkIdsOrBuilderList() { - if (linkIdsBuilder_ != null) { - return linkIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(linkIds_); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder() { - return getLinkIdsFieldBuilder().addBuilder( - context.ContextOuterClass.LinkId.getDefaultInstance()); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder( - int index) { - return getLinkIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.LinkId.getDefaultInstance()); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public java.util.List - getLinkIdsBuilderList() { - return getLinkIdsFieldBuilder().getBuilderList(); - } - 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()); - linkIds_ = null; - } - return linkIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_Exclusions) - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceList_fieldAccessorTable; - // @@protoc_insertion_point(class_scope:context.Constraint_Exclusions) - private static final context.ContextOuterClass.Constraint_Exclusions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_Exclusions(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceFilter_descriptor; - public static context.ContextOuterClass.Constraint_Exclusions getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceFilter_fieldAccessorTable; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceEvent_descriptor; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceEvent_fieldAccessorTable; - @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceId_descriptor; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceId_fieldAccessorTable; - public interface ConstraintOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Slice_descriptor; - /** - * .context.ConstraintActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - int getActionValue(); - /** - * .context.ConstraintActionEnum action = 1; - * @return The action. - */ - context.ContextOuterClass.ConstraintActionEnum getAction(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Slice_fieldAccessorTable; - /** - * .context.Constraint_Custom custom = 2; - * @return Whether the custom field is set. - */ - boolean hasCustom(); - /** - * .context.Constraint_Custom custom = 2; - * @return The custom. - */ - context.ContextOuterClass.Constraint_Custom getCustom(); - /** - * .context.Constraint_Custom custom = 2; - */ - context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceOwner_descriptor; - /** - * .context.Constraint_Schedule schedule = 3; - * @return Whether the schedule field is set. - */ - boolean hasSchedule(); - /** - * .context.Constraint_Schedule schedule = 3; - * @return The schedule. - */ - context.ContextOuterClass.Constraint_Schedule getSchedule(); - /** - * .context.Constraint_Schedule schedule = 3; - */ - context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceOwner_fieldAccessorTable; - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return Whether the endpointLocation field is set. - */ - boolean hasEndpointLocation(); - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return The endpointLocation. - */ - context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation(); - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceStatus_descriptor; - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return Whether the endpointPriority field is set. - */ - boolean hasEndpointPriority(); - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return The endpointPriority. - */ - context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority(); - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceStatus_fieldAccessorTable; - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return Whether the slaCapacity field is set. - */ - boolean hasSlaCapacity(); - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return The slaCapacity. - */ - context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity(); - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceConfig_descriptor; - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return Whether the slaLatency field is set. - */ - boolean hasSlaLatency(); - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return The slaLatency. - */ - context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency(); - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceConfig_fieldAccessorTable; - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return Whether the slaAvailability field is set. - */ - boolean hasSlaAvailability(); - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return The slaAvailability. - */ - context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability(); - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceIdList_descriptor; - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return Whether the slaIsolation field is set. - */ - boolean hasSlaIsolation(); - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return The slaIsolation. - */ - context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation(); - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceIdList_fieldAccessorTable; - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return Whether the exclusions field is set. - */ - boolean hasExclusions(); - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return The exclusions. - */ - context.ContextOuterClass.Constraint_Exclusions getExclusions(); - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder(); - - public context.ContextOuterClass.Constraint.ConstraintCase getConstraintCase(); - } - /** - * Protobuf type {@code context.Constraint} - */ - public static final class Constraint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint) - ConstraintOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint.newBuilder() to construct. - private Constraint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint() { - action_ = 0; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceList_descriptor; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceList_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceFilter_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceFilter_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceEvent_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceEvent_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionId_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionId_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionSettings_L0_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionSettings_L0_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionSettings_L2_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionSettings_L2_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionSettings_L3_descriptor; - @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; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionSettings_L3_fieldAccessorTable; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionSettings_L4_descriptor; - private int constraintCase_ = 0; - private java.lang.Object constraint_; - public enum ConstraintCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CUSTOM(2), - SCHEDULE(3), - ENDPOINT_LOCATION(4), - ENDPOINT_PRIORITY(5), - SLA_CAPACITY(6), - SLA_LATENCY(7), - SLA_AVAILABILITY(8), - SLA_ISOLATION(9), - EXCLUSIONS(10), - CONSTRAINT_NOT_SET(0); - private final int value; - private ConstraintCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ConstraintCase valueOf(int value) { - return forNumber(value); - } - - public static ConstraintCase forNumber(int value) { - switch (value) { - case 2: return CUSTOM; - case 3: return SCHEDULE; - case 4: return ENDPOINT_LOCATION; - case 5: return ENDPOINT_PRIORITY; - case 6: return SLA_CAPACITY; - case 7: return SLA_LATENCY; - case 8: return SLA_AVAILABILITY; - case 9: return SLA_ISOLATION; - case 10: return EXCLUSIONS; - case 0: return CONSTRAINT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ConstraintCase - getConstraintCase() { - return ConstraintCase.forNumber( - constraintCase_); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionSettings_L4_fieldAccessorTable; - public static final int ACTION_FIELD_NUMBER = 1; - private int action_; - /** - * .context.ConstraintActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override public int getActionValue() { - return action_; - } - /** - * .context.ConstraintActionEnum action = 1; - * @return The action. - */ - @java.lang.Override public context.ContextOuterClass.ConstraintActionEnum getAction() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.valueOf(action_); - return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionSettings_descriptor; - public static final int CUSTOM_FIELD_NUMBER = 2; - /** - * .context.Constraint_Custom custom = 2; - * @return Whether the custom field is set. - */ - @java.lang.Override - public boolean hasCustom() { - return constraintCase_ == 2; - } - /** - * .context.Constraint_Custom custom = 2; - * @return The custom. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Custom getCustom() { - if (constraintCase_ == 2) { - return (context.ContextOuterClass.Constraint_Custom) constraint_; - } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } - /** - * .context.Constraint_Custom custom = 2; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() { - if (constraintCase_ == 2) { - return (context.ContextOuterClass.Constraint_Custom) constraint_; - } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionSettings_fieldAccessorTable; - public static final int SCHEDULE_FIELD_NUMBER = 3; - /** - * .context.Constraint_Schedule schedule = 3; - * @return Whether the schedule field is set. - */ - @java.lang.Override - public boolean hasSchedule() { - return constraintCase_ == 3; - } - /** - * .context.Constraint_Schedule schedule = 3; - * @return The schedule. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Schedule getSchedule() { - if (constraintCase_ == 3) { - return (context.ContextOuterClass.Constraint_Schedule) constraint_; - } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() { - if (constraintCase_ == 3) { - return (context.ContextOuterClass.Constraint_Schedule) constraint_; - } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Connection_descriptor; - public static final int ENDPOINT_LOCATION_FIELD_NUMBER = 4; - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return Whether the endpointLocation field is set. - */ - @java.lang.Override - public boolean hasEndpointLocation() { - return constraintCase_ == 4; - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return The endpointLocation. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() { - if (constraintCase_ == 4) { - return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() { - if (constraintCase_ == 4) { - return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Connection_fieldAccessorTable; - public static final int ENDPOINT_PRIORITY_FIELD_NUMBER = 5; - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return Whether the endpointPriority field is set. - */ - @java.lang.Override - public boolean hasEndpointPriority() { - return constraintCase_ == 5; - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return The endpointPriority. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() { - if (constraintCase_ == 5) { - return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() { - if (constraintCase_ == 5) { - return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionIdList_descriptor; - public static final int SLA_CAPACITY_FIELD_NUMBER = 6; - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return Whether the slaCapacity field is set. - */ - @java.lang.Override - public boolean hasSlaCapacity() { - return constraintCase_ == 6; - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return The slaCapacity. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() { - if (constraintCase_ == 6) { - return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() { - if (constraintCase_ == 6) { - return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionIdList_fieldAccessorTable; - public static final int SLA_LATENCY_FIELD_NUMBER = 7; - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return Whether the slaLatency field is set. - */ - @java.lang.Override - public boolean hasSlaLatency() { - return constraintCase_ == 7; - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return The slaLatency. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionList_descriptor; - public static final int SLA_AVAILABILITY_FIELD_NUMBER = 8; - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return Whether the slaAvailability field is set. - */ - @java.lang.Override - public boolean hasSlaAvailability() { - return constraintCase_ == 8; - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return The slaAvailability. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionList_fieldAccessorTable; - public static final int SLA_ISOLATION_FIELD_NUMBER = 9; - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return Whether the slaIsolation field is set. - */ - @java.lang.Override - public boolean hasSlaIsolation() { - return constraintCase_ == 9; - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return The slaIsolation. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionEvent_descriptor; - public static final int EXCLUSIONS_FIELD_NUMBER = 10; - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return Whether the exclusions field is set. - */ - @java.lang.Override - public boolean hasExclusions() { - return constraintCase_ == 10; - } - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return The exclusions. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions getExclusions() { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionEvent_fieldAccessorTable; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPointId_descriptor; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPointId_fieldAccessorTable; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) { - output.writeEnum(1, action_); - } - if (constraintCase_ == 2) { - output.writeMessage(2, (context.ContextOuterClass.Constraint_Custom) constraint_); - } - if (constraintCase_ == 3) { - output.writeMessage(3, (context.ContextOuterClass.Constraint_Schedule) constraint_); - } - if (constraintCase_ == 4) { - output.writeMessage(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_); - } - if (constraintCase_ == 5) { - output.writeMessage(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_); - } - if (constraintCase_ == 6) { - output.writeMessage(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); - } - if (constraintCase_ == 7) { - output.writeMessage(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_); - } - if (constraintCase_ == 8) { - output.writeMessage(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_); - } - if (constraintCase_ == 9) { - output.writeMessage(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); - } - if (constraintCase_ == 10) { - output.writeMessage(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPoint_descriptor; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, action_); - } - if (constraintCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (context.ContextOuterClass.Constraint_Custom) constraint_); - } - if (constraintCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (context.ContextOuterClass.Constraint_Schedule) constraint_); - } - if (constraintCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_); - } - if (constraintCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_); - } - if (constraintCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); - } - if (constraintCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_); - } - if (constraintCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_); - } - if (constraintCase_ == 9) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); - } - if (constraintCase_ == 10) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPoint_fieldAccessorTable; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint other = (context.ContextOuterClass.Constraint) obj; - - if (action_ != other.action_) return false; - if (!getConstraintCase().equals(other.getConstraintCase())) return false; - switch (constraintCase_) { - case 2: - if (!getCustom() - .equals(other.getCustom())) return false; - break; - case 3: - if (!getSchedule() - .equals(other.getSchedule())) return false; - break; - case 4: - if (!getEndpointLocation() - .equals(other.getEndpointLocation())) return false; - break; - case 5: - if (!getEndpointPriority() - .equals(other.getEndpointPriority())) return false; - break; - case 6: - if (!getSlaCapacity() - .equals(other.getSlaCapacity())) return false; - break; - case 7: - if (!getSlaLatency() - .equals(other.getSlaLatency())) return false; - break; - case 8: - if (!getSlaAvailability() - .equals(other.getSlaAvailability())) return false; - break; - case 9: - if (!getSlaIsolation() - .equals(other.getSlaIsolation())) return false; - break; - case 10: - if (!getExclusions() - .equals(other.getExclusions())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPointName_descriptor; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + action_; - switch (constraintCase_) { - case 2: - hash = (37 * hash) + CUSTOM_FIELD_NUMBER; - hash = (53 * hash) + getCustom().hashCode(); - break; - case 3: - hash = (37 * hash) + SCHEDULE_FIELD_NUMBER; - hash = (53 * hash) + getSchedule().hashCode(); - break; - case 4: - hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getEndpointLocation().hashCode(); - break; - case 5: - hash = (37 * hash) + ENDPOINT_PRIORITY_FIELD_NUMBER; - hash = (53 * hash) + getEndpointPriority().hashCode(); - break; - case 6: - hash = (37 * hash) + SLA_CAPACITY_FIELD_NUMBER; - hash = (53 * hash) + getSlaCapacity().hashCode(); - break; - case 7: - hash = (37 * hash) + SLA_LATENCY_FIELD_NUMBER; - hash = (53 * hash) + getSlaLatency().hashCode(); - break; - case 8: - hash = (37 * hash) + SLA_AVAILABILITY_FIELD_NUMBER; - hash = (53 * hash) + getSlaAvailability().hashCode(); - break; - case 9: - hash = (37 * hash) + SLA_ISOLATION_FIELD_NUMBER; - hash = (53 * hash) + getSlaIsolation().hashCode(); - break; - case 10: - hash = (37 * hash) + EXCLUSIONS_FIELD_NUMBER; - hash = (53 * hash) + getExclusions().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPointName_fieldAccessorTable; - public static context.ContextOuterClass.Constraint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPointIdList_descriptor; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPointIdList_fieldAccessorTable; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint) - context.ContextOuterClass.ConstraintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class); - } - - // 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(); - action_ = 0; - - constraintCase_ = 0; - constraint_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint build() { - context.ContextOuterClass.Constraint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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 (constraintCase_ == 3) { - if (scheduleBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = scheduleBuilder_.build(); - } - } - if (constraintCase_ == 4) { - if (endpointLocationBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = endpointLocationBuilder_.build(); - } - } - if (constraintCase_ == 5) { - if (endpointPriorityBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = endpointPriorityBuilder_.build(); - } - } - if (constraintCase_ == 6) { - if (slaCapacityBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = slaCapacityBuilder_.build(); - } - } - if (constraintCase_ == 7) { - if (slaLatencyBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = slaLatencyBuilder_.build(); - } - } - if (constraintCase_ == 8) { - if (slaAvailabilityBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = slaAvailabilityBuilder_.build(); - } - } - if (constraintCase_ == 9) { - if (slaIsolationBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = slaIsolationBuilder_.build(); - } - } - if (constraintCase_ == 10) { - if (exclusionsBuilder_ == null) { - result.constraint_ = constraint_; - } else { - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint) { - return mergeFrom((context.ContextOuterClass.Constraint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint other) { - if (other == context.ContextOuterClass.Constraint.getDefaultInstance()) return this; - if (other.action_ != 0) { - setActionValue(other.getActionValue()); - } - switch (other.getConstraintCase()) { - case CUSTOM: { - mergeCustom(other.getCustom()); - break; - } - case SCHEDULE: { - mergeSchedule(other.getSchedule()); - break; - } - case ENDPOINT_LOCATION: { - mergeEndpointLocation(other.getEndpointLocation()); - break; - } - case ENDPOINT_PRIORITY: { - mergeEndpointPriority(other.getEndpointPriority()); - break; - } - case SLA_CAPACITY: { - mergeSlaCapacity(other.getSlaCapacity()); - break; - } - case SLA_LATENCY: { - mergeSlaLatency(other.getSlaLatency()); - break; - } - case SLA_AVAILABILITY: { - mergeSlaAvailability(other.getSlaAvailability()); - break; - } - case SLA_ISOLATION: { - mergeSlaIsolation(other.getSlaIsolation()); - break; - } - case EXCLUSIONS: { - mergeExclusions(other.getExclusions()); - break; - } - case CONSTRAINT_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int constraintCase_ = 0; - private java.lang.Object constraint_; - public ConstraintCase - getConstraintCase() { - return ConstraintCase.forNumber( - constraintCase_); - } - - public Builder clearConstraint() { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - return this; - } - - - private int action_ = 0; - /** - * .context.ConstraintActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override public int getActionValue() { - return action_; - } - /** - * .context.ConstraintActionEnum action = 1; - * @param value The enum numeric value on the wire for action to set. - * @return This builder for chaining. - */ - public Builder setActionValue(int value) { - - action_ = value; - onChanged(); - return this; - } - /** - * .context.ConstraintActionEnum action = 1; - * @return The action. - */ - @java.lang.Override - public context.ContextOuterClass.ConstraintActionEnum getAction() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.valueOf(action_); - return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; - } - /** - * .context.ConstraintActionEnum action = 1; - * @param value The action to set. - * @return This builder for chaining. - */ - public Builder setAction(context.ContextOuterClass.ConstraintActionEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - action_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.ConstraintActionEnum action = 1; - * @return This builder for chaining. - */ - public Builder clearAction() { - - action_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Custom, context.ContextOuterClass.Constraint_Custom.Builder, context.ContextOuterClass.Constraint_CustomOrBuilder> customBuilder_; - /** - * .context.Constraint_Custom custom = 2; - * @return Whether the custom field is set. - */ - @java.lang.Override - public boolean hasCustom() { - return constraintCase_ == 2; - } - /** - * .context.Constraint_Custom custom = 2; - * @return The custom. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Custom getCustom() { - if (customBuilder_ == null) { - if (constraintCase_ == 2) { - return (context.ContextOuterClass.Constraint_Custom) constraint_; - } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } else { - if (constraintCase_ == 2) { - return customBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } - } - /** - * .context.Constraint_Custom custom = 2; - */ - public Builder setCustom(context.ContextOuterClass.Constraint_Custom value) { - if (customBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - customBuilder_.setMessage(value); - } - constraintCase_ = 2; - return this; - } - /** - * .context.Constraint_Custom custom = 2; - */ - public Builder setCustom( - context.ContextOuterClass.Constraint_Custom.Builder builderForValue) { - if (customBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - customBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 2; - return this; - } - /** - * .context.Constraint_Custom custom = 2; - */ - public Builder mergeCustom(context.ContextOuterClass.Constraint_Custom value) { - if (customBuilder_ == null) { - if (constraintCase_ == 2 && - constraint_ != context.ContextOuterClass.Constraint_Custom.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_Custom.newBuilder((context.ContextOuterClass.Constraint_Custom) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 2) { - customBuilder_.mergeFrom(value); - } - customBuilder_.setMessage(value); - } - constraintCase_ = 2; - return this; - } - /** - * .context.Constraint_Custom custom = 2; - */ - public Builder clearCustom() { - if (customBuilder_ == null) { - if (constraintCase_ == 2) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 2) { - constraintCase_ = 0; - constraint_ = null; - } - customBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_Custom custom = 2; - */ - public context.ContextOuterClass.Constraint_Custom.Builder getCustomBuilder() { - return getCustomFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_Custom custom = 2; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() { - if ((constraintCase_ == 2) && (customBuilder_ != null)) { - return customBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 2) { - return (context.ContextOuterClass.Constraint_Custom) constraint_; - } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } - } - /** - * .context.Constraint_Custom custom = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Custom, context.ContextOuterClass.Constraint_Custom.Builder, context.ContextOuterClass.Constraint_CustomOrBuilder> - getCustomFieldBuilder() { - if (customBuilder_ == null) { - if (!(constraintCase_ == 2)) { - constraint_ = context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } - customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Custom, context.ContextOuterClass.Constraint_Custom.Builder, context.ContextOuterClass.Constraint_CustomOrBuilder>( - (context.ContextOuterClass.Constraint_Custom) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 2; - onChanged();; - return customBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Schedule, context.ContextOuterClass.Constraint_Schedule.Builder, context.ContextOuterClass.Constraint_ScheduleOrBuilder> scheduleBuilder_; - /** - * .context.Constraint_Schedule schedule = 3; - * @return Whether the schedule field is set. - */ - @java.lang.Override - public boolean hasSchedule() { - return constraintCase_ == 3; - } - /** - * .context.Constraint_Schedule schedule = 3; - * @return The schedule. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Schedule getSchedule() { - if (scheduleBuilder_ == null) { - if (constraintCase_ == 3) { - return (context.ContextOuterClass.Constraint_Schedule) constraint_; - } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } else { - if (constraintCase_ == 3) { - return scheduleBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule value) { - if (scheduleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - scheduleBuilder_.setMessage(value); - } - constraintCase_ = 3; - return this; - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - public Builder setSchedule( - context.ContextOuterClass.Constraint_Schedule.Builder builderForValue) { - if (scheduleBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - scheduleBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 3; - return this; - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - public Builder mergeSchedule(context.ContextOuterClass.Constraint_Schedule value) { - if (scheduleBuilder_ == null) { - if (constraintCase_ == 3 && - constraint_ != context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_Schedule.newBuilder((context.ContextOuterClass.Constraint_Schedule) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 3) { - scheduleBuilder_.mergeFrom(value); - } - scheduleBuilder_.setMessage(value); - } - constraintCase_ = 3; - return this; - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - public Builder clearSchedule() { - if (scheduleBuilder_ == null) { - if (constraintCase_ == 3) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 3) { - constraintCase_ = 0; - constraint_ = null; - } - scheduleBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - public context.ContextOuterClass.Constraint_Schedule.Builder getScheduleBuilder() { - return getScheduleFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() { - if ((constraintCase_ == 3) && (scheduleBuilder_ != null)) { - return scheduleBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 3) { - return (context.ContextOuterClass.Constraint_Schedule) constraint_; - } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Schedule, context.ContextOuterClass.Constraint_Schedule.Builder, context.ContextOuterClass.Constraint_ScheduleOrBuilder> - getScheduleFieldBuilder() { - if (scheduleBuilder_ == null) { - if (!(constraintCase_ == 3)) { - constraint_ = context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } - scheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Schedule, context.ContextOuterClass.Constraint_Schedule.Builder, context.ContextOuterClass.Constraint_ScheduleOrBuilder>( - (context.ContextOuterClass.Constraint_Schedule) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 3; - onChanged();; - return scheduleBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_EndPointLocation, context.ContextOuterClass.Constraint_EndPointLocation.Builder, context.ContextOuterClass.Constraint_EndPointLocationOrBuilder> endpointLocationBuilder_; - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return Whether the endpointLocation field is set. - */ - @java.lang.Override - public boolean hasEndpointLocation() { - return constraintCase_ == 4; - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return The endpointLocation. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() { - if (endpointLocationBuilder_ == null) { - if (constraintCase_ == 4) { - return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } else { - if (constraintCase_ == 4) { - return endpointLocationBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) { - if (endpointLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - endpointLocationBuilder_.setMessage(value); - } - constraintCase_ = 4; - return this; - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - public Builder setEndpointLocation( - context.ContextOuterClass.Constraint_EndPointLocation.Builder builderForValue) { - if (endpointLocationBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - endpointLocationBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 4; - return this; - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - public Builder mergeEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) { - if (endpointLocationBuilder_ == null) { - if (constraintCase_ == 4 && - constraint_ != context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.newBuilder((context.ContextOuterClass.Constraint_EndPointLocation) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 4) { - endpointLocationBuilder_.mergeFrom(value); - } - endpointLocationBuilder_.setMessage(value); - } - constraintCase_ = 4; - return this; - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - public Builder clearEndpointLocation() { - if (endpointLocationBuilder_ == null) { - if (constraintCase_ == 4) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 4) { - constraintCase_ = 0; - constraint_ = null; - } - endpointLocationBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - public context.ContextOuterClass.Constraint_EndPointLocation.Builder getEndpointLocationBuilder() { - return getEndpointLocationFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() { - if ((constraintCase_ == 4) && (endpointLocationBuilder_ != null)) { - return endpointLocationBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 4) { - return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_EndPointLocation, context.ContextOuterClass.Constraint_EndPointLocation.Builder, context.ContextOuterClass.Constraint_EndPointLocationOrBuilder> - getEndpointLocationFieldBuilder() { - if (endpointLocationBuilder_ == null) { - if (!(constraintCase_ == 4)) { - constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } - endpointLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_EndPointLocation, context.ContextOuterClass.Constraint_EndPointLocation.Builder, context.ContextOuterClass.Constraint_EndPointLocationOrBuilder>( - (context.ContextOuterClass.Constraint_EndPointLocation) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 4; - onChanged();; - return endpointLocationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_EndPointPriority, context.ContextOuterClass.Constraint_EndPointPriority.Builder, context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder> endpointPriorityBuilder_; - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return Whether the endpointPriority field is set. - */ - @java.lang.Override - public boolean hasEndpointPriority() { - return constraintCase_ == 5; - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return The endpointPriority. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() { - if (endpointPriorityBuilder_ == null) { - if (constraintCase_ == 5) { - return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } else { - if (constraintCase_ == 5) { - return endpointPriorityBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) { - if (endpointPriorityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - endpointPriorityBuilder_.setMessage(value); - } - constraintCase_ = 5; - return this; - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - public Builder setEndpointPriority( - context.ContextOuterClass.Constraint_EndPointPriority.Builder builderForValue) { - if (endpointPriorityBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - endpointPriorityBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 5; - return this; - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - public Builder mergeEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) { - if (endpointPriorityBuilder_ == null) { - if (constraintCase_ == 5 && - constraint_ != context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.newBuilder((context.ContextOuterClass.Constraint_EndPointPriority) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 5) { - endpointPriorityBuilder_.mergeFrom(value); - } - endpointPriorityBuilder_.setMessage(value); - } - constraintCase_ = 5; - return this; - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - public Builder clearEndpointPriority() { - if (endpointPriorityBuilder_ == null) { - if (constraintCase_ == 5) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 5) { - constraintCase_ = 0; - constraint_ = null; - } - endpointPriorityBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - public context.ContextOuterClass.Constraint_EndPointPriority.Builder getEndpointPriorityBuilder() { - return getEndpointPriorityFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() { - if ((constraintCase_ == 5) && (endpointPriorityBuilder_ != null)) { - return endpointPriorityBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 5) { - return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_EndPointPriority, context.ContextOuterClass.Constraint_EndPointPriority.Builder, context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder> - getEndpointPriorityFieldBuilder() { - if (endpointPriorityBuilder_ == null) { - if (!(constraintCase_ == 5)) { - constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } - endpointPriorityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_EndPointPriority, context.ContextOuterClass.Constraint_EndPointPriority.Builder, context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder>( - (context.ContextOuterClass.Constraint_EndPointPriority) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 5; - onChanged();; - return endpointPriorityBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Capacity, context.ContextOuterClass.Constraint_SLA_Capacity.Builder, context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder> slaCapacityBuilder_; - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return Whether the slaCapacity field is set. - */ - @java.lang.Override - public boolean hasSlaCapacity() { - return constraintCase_ == 6; - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return The slaCapacity. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() { - if (slaCapacityBuilder_ == null) { - if (constraintCase_ == 6) { - return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } else { - if (constraintCase_ == 6) { - return slaCapacityBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) { - if (slaCapacityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - slaCapacityBuilder_.setMessage(value); - } - constraintCase_ = 6; - return this; - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - public Builder setSlaCapacity( - context.ContextOuterClass.Constraint_SLA_Capacity.Builder builderForValue) { - if (slaCapacityBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - slaCapacityBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 6; - return this; - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - public Builder mergeSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) { - if (slaCapacityBuilder_ == null) { - if (constraintCase_ == 6 && - constraint_ != context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.newBuilder((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 6) { - slaCapacityBuilder_.mergeFrom(value); - } - slaCapacityBuilder_.setMessage(value); - } - constraintCase_ = 6; - return this; - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - public Builder clearSlaCapacity() { - if (slaCapacityBuilder_ == null) { - if (constraintCase_ == 6) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 6) { - constraintCase_ = 0; - constraint_ = null; - } - slaCapacityBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - public context.ContextOuterClass.Constraint_SLA_Capacity.Builder getSlaCapacityBuilder() { - return getSlaCapacityFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() { - if ((constraintCase_ == 6) && (slaCapacityBuilder_ != null)) { - return slaCapacityBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 6) { - return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Capacity, context.ContextOuterClass.Constraint_SLA_Capacity.Builder, context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder> - getSlaCapacityFieldBuilder() { - if (slaCapacityBuilder_ == null) { - if (!(constraintCase_ == 6)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } - slaCapacityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Capacity, context.ContextOuterClass.Constraint_SLA_Capacity.Builder, context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder>( - (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 6; - onChanged();; - return slaCapacityBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Latency, context.ContextOuterClass.Constraint_SLA_Latency.Builder, context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder> slaLatencyBuilder_; - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return Whether the slaLatency field is set. - */ - @java.lang.Override - public boolean hasSlaLatency() { - return constraintCase_ == 7; - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return The slaLatency. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { - if (slaLatencyBuilder_ == null) { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } else { - if (constraintCase_ == 7) { - return slaLatencyBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { - if (slaLatencyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - slaLatencyBuilder_.setMessage(value); - } - constraintCase_ = 7; - return this; - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public Builder setSlaLatency( - context.ContextOuterClass.Constraint_SLA_Latency.Builder builderForValue) { - if (slaLatencyBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - slaLatencyBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 7; - return this; - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public Builder mergeSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { - if (slaLatencyBuilder_ == null) { - if (constraintCase_ == 7 && - constraint_ != context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.newBuilder((context.ContextOuterClass.Constraint_SLA_Latency) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 7) { - slaLatencyBuilder_.mergeFrom(value); - } - slaLatencyBuilder_.setMessage(value); - } - constraintCase_ = 7; - return this; - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public Builder clearSlaLatency() { - if (slaLatencyBuilder_ == null) { - if (constraintCase_ == 7) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 7) { - constraintCase_ = 0; - constraint_ = null; - } - slaLatencyBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public context.ContextOuterClass.Constraint_SLA_Latency.Builder getSlaLatencyBuilder() { - return getSlaLatencyFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { - if ((constraintCase_ == 7) && (slaLatencyBuilder_ != null)) { - return slaLatencyBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Latency, context.ContextOuterClass.Constraint_SLA_Latency.Builder, context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder> - getSlaLatencyFieldBuilder() { - if (slaLatencyBuilder_ == null) { - if (!(constraintCase_ == 7)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } - slaLatencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Latency, context.ContextOuterClass.Constraint_SLA_Latency.Builder, context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder>( - (context.ContextOuterClass.Constraint_SLA_Latency) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 7; - onChanged();; - return slaLatencyBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Availability, context.ContextOuterClass.Constraint_SLA_Availability.Builder, context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder> slaAvailabilityBuilder_; - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return Whether the slaAvailability field is set. - */ - @java.lang.Override - public boolean hasSlaAvailability() { - return constraintCase_ == 8; - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return The slaAvailability. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { - if (slaAvailabilityBuilder_ == null) { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } else { - if (constraintCase_ == 8) { - return slaAvailabilityBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { - if (slaAvailabilityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - slaAvailabilityBuilder_.setMessage(value); - } - constraintCase_ = 8; - return this; - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder setSlaAvailability( - context.ContextOuterClass.Constraint_SLA_Availability.Builder builderForValue) { - if (slaAvailabilityBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - slaAvailabilityBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 8; - return this; - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder mergeSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { - if (slaAvailabilityBuilder_ == null) { - if (constraintCase_ == 8 && - constraint_ != context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.newBuilder((context.ContextOuterClass.Constraint_SLA_Availability) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 8) { - slaAvailabilityBuilder_.mergeFrom(value); - } - slaAvailabilityBuilder_.setMessage(value); - } - constraintCase_ = 8; - return this; - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder clearSlaAvailability() { - if (slaAvailabilityBuilder_ == null) { - if (constraintCase_ == 8) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 8) { - constraintCase_ = 0; - constraint_ = null; - } - slaAvailabilityBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public context.ContextOuterClass.Constraint_SLA_Availability.Builder getSlaAvailabilityBuilder() { - return getSlaAvailabilityFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { - if ((constraintCase_ == 8) && (slaAvailabilityBuilder_ != null)) { - return slaAvailabilityBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Availability, context.ContextOuterClass.Constraint_SLA_Availability.Builder, context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder> - getSlaAvailabilityFieldBuilder() { - if (slaAvailabilityBuilder_ == null) { - if (!(constraintCase_ == 8)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } - slaAvailabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Availability, context.ContextOuterClass.Constraint_SLA_Availability.Builder, context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder>( - (context.ContextOuterClass.Constraint_SLA_Availability) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 8; - onChanged();; - return slaAvailabilityBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Isolation_level, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder, context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder> slaIsolationBuilder_; - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return Whether the slaIsolation field is set. - */ - @java.lang.Override - public boolean hasSlaIsolation() { - return constraintCase_ == 9; - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return The slaIsolation. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { - if (slaIsolationBuilder_ == null) { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } else { - if (constraintCase_ == 9) { - return slaIsolationBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { - if (slaIsolationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - slaIsolationBuilder_.setMessage(value); - } - constraintCase_ = 9; - return this; - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - public Builder setSlaIsolation( - context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder builderForValue) { - if (slaIsolationBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - slaIsolationBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 9; - return this; - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - public Builder mergeSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { - if (slaIsolationBuilder_ == null) { - if (constraintCase_ == 9 && - constraint_ != context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.newBuilder((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 9) { - slaIsolationBuilder_.mergeFrom(value); - } - slaIsolationBuilder_.setMessage(value); - } - constraintCase_ = 9; - return this; - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - public Builder clearSlaIsolation() { - if (slaIsolationBuilder_ == null) { - if (constraintCase_ == 9) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 9) { - constraintCase_ = 0; - constraint_ = null; - } - slaIsolationBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - public context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder getSlaIsolationBuilder() { - return getSlaIsolationFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { - if ((constraintCase_ == 9) && (slaIsolationBuilder_ != null)) { - return slaIsolationBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Isolation_level, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder, context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder> - getSlaIsolationFieldBuilder() { - if (slaIsolationBuilder_ == null) { - if (!(constraintCase_ == 9)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } - slaIsolationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Isolation_level, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder, context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder>( - (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 9; - onChanged();; - return slaIsolationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Exclusions, context.ContextOuterClass.Constraint_Exclusions.Builder, context.ContextOuterClass.Constraint_ExclusionsOrBuilder> exclusionsBuilder_; - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return Whether the exclusions field is set. - */ - @java.lang.Override - public boolean hasExclusions() { - return constraintCase_ == 10; - } - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return The exclusions. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions getExclusions() { - if (exclusionsBuilder_ == null) { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } else { - if (constraintCase_ == 10) { - return exclusionsBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions value) { - if (exclusionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - exclusionsBuilder_.setMessage(value); - } - constraintCase_ = 10; - return this; - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - public Builder setExclusions( - context.ContextOuterClass.Constraint_Exclusions.Builder builderForValue) { - if (exclusionsBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - exclusionsBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 10; - return this; - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - public Builder mergeExclusions(context.ContextOuterClass.Constraint_Exclusions value) { - if (exclusionsBuilder_ == null) { - if (constraintCase_ == 10 && - constraint_ != context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_Exclusions.newBuilder((context.ContextOuterClass.Constraint_Exclusions) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 10) { - exclusionsBuilder_.mergeFrom(value); - } - exclusionsBuilder_.setMessage(value); - } - constraintCase_ = 10; - return this; - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - public Builder clearExclusions() { - if (exclusionsBuilder_ == null) { - if (constraintCase_ == 10) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 10) { - constraintCase_ = 0; - constraint_ = null; - } - exclusionsBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - public context.ContextOuterClass.Constraint_Exclusions.Builder getExclusionsBuilder() { - return getExclusionsFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { - if ((constraintCase_ == 10) && (exclusionsBuilder_ != null)) { - return exclusionsBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Exclusions, context.ContextOuterClass.Constraint_Exclusions.Builder, context.ContextOuterClass.Constraint_ExclusionsOrBuilder> - getExclusionsFieldBuilder() { - if (exclusionsBuilder_ == null) { - if (!(constraintCase_ == 10)) { - constraint_ = context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } - exclusionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Exclusions, context.ContextOuterClass.Constraint_Exclusions.Builder, context.ContextOuterClass.Constraint_ExclusionsOrBuilder>( - (context.ContextOuterClass.Constraint_Exclusions) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 10; - onChanged();; - return exclusionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint) - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPointNameList_descriptor; - // @@protoc_insertion_point(class_scope:context.Constraint) - private static final context.ContextOuterClass.Constraint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPointNameList_fieldAccessorTable; - public static context.ContextOuterClass.Constraint getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConfigRule_Custom_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConfigRule_Custom_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConfigRule_ACL_descriptor; - @java.lang.Override - public context.ContextOuterClass.Constraint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConfigRule_ACL_fieldAccessorTable; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConfigRule_descriptor; - public interface TeraFlowControllerOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.TeraFlowController) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConfigRule_fieldAccessorTable; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_Custom_descriptor; - /** - * string ip_address = 2; - * @return The ipAddress. - */ - java.lang.String getIpAddress(); - /** - * string ip_address = 2; - * @return The bytes for ipAddress. - */ - com.google.protobuf.ByteString - getIpAddressBytes(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_Custom_fieldAccessorTable; - /** - * uint32 port = 3; - * @return The port. - */ - int getPort(); - } - /** - *
-   * ----- Miscellaneous -------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.TeraFlowController} - */ - public static final class TeraFlowController extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.TeraFlowController) - TeraFlowControllerOrBuilder { - private static final long serialVersionUID = 0L; - // Use TeraFlowController.newBuilder() to construct. - private TeraFlowController(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TeraFlowController() { - ipAddress_ = ""; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_Schedule_descriptor; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TeraFlowController(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_Schedule_fieldAccessorTable; - @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; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_GPS_Position_descriptor; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_GPS_Position_fieldAccessorTable; - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - /** - * .context.ContextId context_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Location_descriptor; - public static final int IP_ADDRESS_FIELD_NUMBER = 2; - private volatile java.lang.Object ipAddress_; - /** - * string ip_address = 2; - * @return The ipAddress. - */ - @java.lang.Override - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - 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(); - ipAddress_ = s; - return s; - } - } - /** - * string ip_address = 2; - * @return The bytes for ipAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Location_fieldAccessorTable; - public static final int PORT_FIELD_NUMBER = 3; - private int port_; - /** - * uint32 port = 3; - * @return The port. - */ - @java.lang.Override - public int getPort() { - return port_; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_EndPointLocation_descriptor; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_EndPointLocation_fieldAccessorTable; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_EndPointPriority_descriptor; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (!getIpAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_); - } - if (port_ != 0) { - output.writeUInt32(3, port_); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_EndPointPriority_fieldAccessorTable; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextId()); - } - if (!getIpAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_); - } - if (port_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, port_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_SLA_Latency_descriptor; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.TeraFlowController)) { - return super.equals(obj); - } - context.ContextOuterClass.TeraFlowController other = (context.ContextOuterClass.TeraFlowController) obj; - - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (!getIpAddress() - .equals(other.getIpAddress())) return false; - if (getPort() - != other.getPort()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_SLA_Latency_fieldAccessorTable; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getIpAddress().hashCode(); - hash = (37 * hash) + PORT_FIELD_NUMBER; - hash = (53 * hash) + getPort(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_SLA_Capacity_descriptor; - public static context.ContextOuterClass.TeraFlowController parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.TeraFlowController prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_SLA_Availability_descriptor; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Miscellaneous -------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.TeraFlowController} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.TeraFlowController) - context.ContextOuterClass.TeraFlowControllerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); - } - - // 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; - contextIdBuilder_ = null; - } - ipAddress_ = ""; - - port_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { - return context.ContextOuterClass.TeraFlowController.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.TeraFlowController build() { - context.ContextOuterClass.TeraFlowController result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TeraFlowController) { - return mergeFrom((context.ContextOuterClass.TeraFlowController)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.TeraFlowController other) { - if (other == context.ContextOuterClass.TeraFlowController.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (!other.getIpAddress().isEmpty()) { - ipAddress_ = other.ipAddress_; - onChanged(); - } - if (other.getPort() != 0) { - setPort(other.getPort()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TeraFlowController) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ContextId contextId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private java.lang.Object ipAddress_ = ""; - /** - * string ip_address = 2; - * @return The ipAddress. - */ - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ipAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string ip_address = 2; - * @return The bytes for ipAddress. - */ - public com.google.protobuf.ByteString - getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string ip_address = 2; - * @param value The ipAddress to set. - * @return This builder for chaining. - */ - public Builder setIpAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - ipAddress_ = value; - onChanged(); - return this; - } - /** - * string ip_address = 2; - * @return This builder for chaining. - */ - public Builder clearIpAddress() { - - ipAddress_ = getDefaultInstance().getIpAddress(); - onChanged(); - return this; - } - /** - * string ip_address = 2; - * @param value The bytes for ipAddress to set. - * @return This builder for chaining. - */ - public Builder setIpAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - ipAddress_ = value; - onChanged(); - return this; - } - - private int port_ ; - /** - * uint32 port = 3; - * @return The port. - */ - @java.lang.Override - public int getPort() { - return port_; - } - /** - * uint32 port = 3; - * @param value The port to set. - * @return This builder for chaining. - */ - public Builder setPort(int value) { - - port_ = value; - onChanged(); - return this; - } - /** - * uint32 port = 3; - * @return This builder for chaining. - */ - public Builder clearPort() { - - port_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.TeraFlowController) - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_SLA_Availability_fieldAccessorTable; - // @@protoc_insertion_point(class_scope:context.TeraFlowController) - private static final context.ContextOuterClass.TeraFlowController DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TeraFlowController(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_SLA_Isolation_level_descriptor; - public static context.ContextOuterClass.TeraFlowController getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_Exclusions_descriptor; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_Exclusions_fieldAccessorTable; - @java.lang.Override - public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_descriptor; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_fieldAccessorTable; - public interface AuthenticationResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.AuthenticationResult) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_TeraFlowController_descriptor; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_TeraFlowController_fieldAccessorTable; - /** - * bool authenticated = 2; - * @return The authenticated. - */ - boolean getAuthenticated(); - } - /** - * Protobuf type {@code context.AuthenticationResult} - */ - public static final class AuthenticationResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.AuthenticationResult) - AuthenticationResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuthenticationResult.newBuilder() to construct. - private AuthenticationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AuthenticationResult() { - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_AuthenticationResult_descriptor; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AuthenticationResult(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_AuthenticationResult_fieldAccessorTable; - @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; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalConfigId_descriptor; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalConfigId_fieldAccessorTable; - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - /** - * .context.ContextId context_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalConfig_descriptor; - public static final int AUTHENTICATED_FIELD_NUMBER = 2; - private boolean authenticated_; - /** - * bool authenticated = 2; - * @return The authenticated. - */ - @java.lang.Override - public boolean getAuthenticated() { - return authenticated_; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalConfig_fieldAccessorTable; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalConfigList_descriptor; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalConfigList_fieldAccessorTable; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (authenticated_ != false) { - output.writeBool(2, authenticated_); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkId_descriptor; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextId()); - } - if (authenticated_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, authenticated_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkId_fieldAccessorTable; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.AuthenticationResult)) { - return super.equals(obj); - } - context.ContextOuterClass.AuthenticationResult other = (context.ContextOuterClass.AuthenticationResult) obj; - - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (getAuthenticated() - != other.getAuthenticated()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_FiberId_descriptor; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - hash = (37 * hash) + AUTHENTICATED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getAuthenticated()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_FiberId_fieldAccessorTable; - public static context.ContextOuterClass.AuthenticationResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Fiber_descriptor; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.AuthenticationResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Fiber_fieldAccessorTable; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.AuthenticationResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.AuthenticationResult) - context.ContextOuterClass.AuthenticationResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); - } - - // 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; - contextIdBuilder_ = null; - } - authenticated_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { - return context.ContextOuterClass.AuthenticationResult.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.AuthenticationResult build() { - context.ContextOuterClass.AuthenticationResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.AuthenticationResult) { - return mergeFrom((context.ContextOuterClass.AuthenticationResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.AuthenticationResult other) { - if (other == context.ContextOuterClass.AuthenticationResult.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (other.getAuthenticated() != false) { - setAuthenticated(other.getAuthenticated()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.AuthenticationResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ContextId contextId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private boolean authenticated_ ; - /** - * bool authenticated = 2; - * @return The authenticated. - */ - @java.lang.Override - public boolean getAuthenticated() { - return authenticated_; - } - /** - * bool authenticated = 2; - * @param value The authenticated to set. - * @return This builder for chaining. - */ - public Builder setAuthenticated(boolean value) { - - authenticated_ = value; - onChanged(); - return this; - } - /** - * bool authenticated = 2; - * @return This builder for chaining. - */ - public Builder clearAuthenticated() { - - authenticated_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.AuthenticationResult) - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkDetails_descriptor; - // @@protoc_insertion_point(class_scope:context.AuthenticationResult) - private static final context.ContextOuterClass.AuthenticationResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.AuthenticationResult(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkDetails_fieldAccessorTable; - public static context.ContextOuterClass.AuthenticationResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLink_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLink_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - @java.lang.Override - public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Empty_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Empty_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Uuid_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Uuid_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Timestamp_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Timestamp_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Event_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Event_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ContextId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ContextId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Context_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Context_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ContextIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ContextIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ContextList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ContextList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ContextEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ContextEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_TopologyId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_TopologyId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Topology_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Topology_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_TopologyDetails_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_TopologyDetails_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_TopologyIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_TopologyIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_TopologyList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_TopologyList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_TopologyEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_TopologyEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_DeviceId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_DeviceId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Device_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Device_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Component_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Component_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Component_AttributesEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Component_AttributesEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_DeviceConfig_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_DeviceConfig_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_DeviceIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_DeviceIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_DeviceList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_DeviceList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_DeviceFilter_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_DeviceFilter_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_DeviceEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_DeviceEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_LinkId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_LinkId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Link_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Link_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_LinkIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_LinkIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_LinkList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_LinkList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_LinkEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_LinkEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Service_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Service_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceStatus_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceStatus_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceConfig_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceConfig_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceFilter_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceFilter_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Slice_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Slice_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceOwner_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceOwner_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceStatus_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceStatus_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceConfig_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceConfig_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceFilter_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceFilter_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionSettings_L0_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionSettings_L0_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionSettings_L2_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionSettings_L2_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionSettings_L3_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionSettings_L3_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionSettings_L4_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionSettings_L4_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionSettings_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionSettings_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Connection_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Connection_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_EndPointId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_EndPointId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_EndPoint_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_EndPoint_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_EndPointName_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_EndPointName_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_EndPointIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_EndPointIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_EndPointNameList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_EndPointNameList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConfigRule_Custom_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConfigRule_Custom_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConfigRule_ACL_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConfigRule_ACL_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConfigRule_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConfigRule_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_Custom_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_Custom_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_Schedule_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_Schedule_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_GPS_Position_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_GPS_Position_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Location_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Location_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_EndPointLocation_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_EndPointLocation_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_EndPointPriority_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_EndPointPriority_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_SLA_Latency_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_SLA_Latency_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_SLA_Capacity_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_SLA_Availability_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_SLA_Availability_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_SLA_Isolation_level_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_Exclusions_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_Exclusions_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_TeraFlowController_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_TeraFlowController_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_AuthenticationResult_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_AuthenticationResult_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - 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\"f\n\004Link" + - "\022 \n\007link_id\030\001 \001(\0132\017.context.LinkId\022\014\n\004na" + - "me\030\002 \001(\t\022.\n\021link_endpoint_ids\030\003 \003(\0132\023.co" + - "ntext.EndPointId\"/\n\nLinkIdList\022!\n\010link_i" + - "ds\030\001 \003(\0132\017.context.LinkId\"(\n\010LinkList\022\034\n" + - "\005links\030\001 \003(\0132\r.context.Link\"L\n\tLinkEvent" + - "\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\007" + - "Service\022&\n\nservice_id\030\001 \001(\0132\022.context.Se" + - "rviceId\022\014\n\004name\030\002 \001(\t\022.\n\014service_type\030\003 " + - "\001(\0162\030.context.ServiceTypeEnum\0221\n\024service" + - "_endpoint_ids\030\004 \003(\0132\023.context.EndPointId" + - "\0220\n\023service_constraints\030\005 \003(\0132\023.context." + - "Constraint\022.\n\016service_status\030\006 \001(\0132\026.con" + - "text.ServiceStatus\022.\n\016service_config\030\007 \001" + - "(\0132\026.context.ServiceConfig\022%\n\ttimestamp\030" + - "\010 \001(\0132\022.context.Timestamp\"C\n\rServiceStat" + - "us\0222\n\016service_status\030\001 \001(\0162\032.context.Ser" + - "viceStatusEnum\":\n\rServiceConfig\022)\n\014confi" + - "g_rules\030\001 \003(\0132\023.context.ConfigRule\"8\n\rSe" + - "rviceIdList\022\'\n\013service_ids\030\001 \003(\0132\022.conte" + - "xt.ServiceId\"1\n\013ServiceList\022\"\n\010services\030" + - "\001 \003(\0132\020.context.Service\"\225\001\n\rServiceFilte" + - "r\022+\n\013service_ids\030\001 \001(\0132\026.context.Service" + - "IdList\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n\023" + - "include_constraints\030\003 \001(\010\022\034\n\024include_con" + - "fig_rules\030\004 \001(\010\"U\n\014ServiceEvent\022\035\n\005event" + - "\030\001 \001(\0132\016.context.Event\022&\n\nservice_id\030\002 \001" + - "(\0132\022.context.ServiceId\"T\n\007SliceId\022&\n\ncon" + - "text_id\030\001 \001(\0132\022.context.ContextId\022!\n\nsli" + - "ce_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\004na" + - "me\030\002 \001(\t\022/\n\022slice_endpoint_ids\030\003 \003(\0132\023.c" + - "ontext.EndPointId\022.\n\021slice_constraints\030\004" + - " \003(\0132\023.context.Constraint\022-\n\021slice_servi" + - "ce_ids\030\005 \003(\0132\022.context.ServiceId\022,\n\022slic" + - "e_subslice_ids\030\006 \003(\0132\020.context.SliceId\022*" + - "\n\014slice_status\030\007 \001(\0132\024.context.SliceStat" + - "us\022*\n\014slice_config\030\010 \001(\0132\024.context.Slice" + - "Config\022(\n\013slice_owner\030\t \001(\0132\023.context.Sl" + - "iceOwner\022%\n\ttimestamp\030\n \001(\0132\022.context.Ti" + - "mestamp\"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.co" + - "ntext.SliceStatusEnum\"8\n\013SliceConfig\022)\n\014" + - "config_rules\030\001 \003(\0132\023.context.ConfigRule\"" + - "2\n\013SliceIdList\022#\n\tslice_ids\030\001 \003(\0132\020.cont" + - "ext.SliceId\"+\n\tSliceList\022\036\n\006slices\030\001 \003(\013" + - "2\016.context.Slice\"\312\001\n\013SliceFilter\022\'\n\tslic" + - "e_ids\030\001 \001(\0132\024.context.SliceIdList\022\034\n\024inc" + - "lude_endpoint_ids\030\002 \001(\010\022\033\n\023include_const" + - "raints\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\024inclu" + - "de_config_rules\030\006 \001(\010\"O\n\nSliceEvent\022\035\n\005e" + - "vent\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\017" + - "src_mac_address\030\001 \001(\t\022\027\n\017dst_mac_address" + - "\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\016" + - "src_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\003" + - "ttl\030\005 \001(\r\"[\n\025ConnectionSettings_L4\022\020\n\010sr" + - "c_port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(\r\022\021\n\ttcp_fl" + - "ags\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022ConnectionSet" + - "tings\022*\n\002l0\030\001 \001(\0132\036.context.ConnectionSe" + - "ttings_L0\022*\n\002l2\030\002 \001(\0132\036.context.Connecti" + - "onSettings_L2\022*\n\002l3\030\003 \001(\0132\036.context.Conn" + - "ectionSettings_L3\022*\n\002l4\030\004 \001(\0132\036.context." + - "ConnectionSettings_L4\"\363\001\n\nConnection\022,\n\r" + - "connection_id\030\001 \001(\0132\025.context.Connection" + - "Id\022&\n\nservice_id\030\002 \001(\0132\022.context.Service" + - "Id\0223\n\026path_hops_endpoint_ids\030\003 \003(\0132\023.con" + - "text.EndPointId\022+\n\017sub_service_ids\030\004 \003(\013" + - "2\022.context.ServiceId\022-\n\010settings\030\005 \001(\0132\033" + - ".context.ConnectionSettings\"A\n\020Connectio" + - "nIdList\022-\n\016connection_ids\030\001 \003(\0132\025.contex" + - "t.ConnectionId\":\n\016ConnectionList\022(\n\013conn" + - "ections\030\001 \003(\0132\023.context.Connection\"^\n\017Co" + - "nnectionEvent\022\035\n\005event\030\001 \001(\0132\016.context.E" + - "vent\022,\n\rconnection_id\030\002 \001(\0132\025.context.Co" + - "nnectionId\"\202\001\n\nEndPointId\022(\n\013topology_id" + - "\030\001 \001(\0132\023.context.TopologyId\022$\n\tdevice_id" + - "\030\002 \001(\0132\021.context.DeviceId\022$\n\rendpoint_uu" + - "id\030\003 \001(\0132\r.context.Uuid\"\302\001\n\010EndPoint\022(\n\013" + - "endpoint_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\020k" + - "pi_sample_types\030\004 \003(\0162\037.kpi_sample_types" + - ".KpiSampleType\022,\n\021endpoint_location\030\005 \001(" + - "\0132\021.context.Location\"{\n\014EndPointName\022(\n\013" + - "endpoint_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\016EndPointIdL" + - "ist\022)\n\014endpoint_ids\030\001 \003(\0132\023.context.EndP" + - "ointId\"A\n\020EndPointNameList\022-\n\016endpoint_n" + - "ames\030\001 \003(\0132\025.context.EndPointName\"A\n\021Con" + - "figRule_Custom\022\024\n\014resource_key\030\001 \001(\t\022\026\n\016" + - "resource_value\030\002 \001(\t\"]\n\016ConfigRule_ACL\022(" + - "\n\013endpoint_id\030\001 \001(\0132\023.context.EndPointId" + - "\022!\n\010rule_set\030\002 \001(\0132\017.acl.AclRuleSet\"\234\001\n\n" + - "ConfigRule\022)\n\006action\030\001 \001(\0162\031.context.Con" + - "figActionEnum\022,\n\006custom\030\002 \001(\0132\032.context." + - "ConfigRule_CustomH\000\022&\n\003acl\030\003 \001(\0132\027.conte" + - "xt.ConfigRule_ACLH\000B\r\n\013config_rule\"F\n\021Co" + - "nstraint_Custom\022\027\n\017constraint_type\030\001 \001(\t" + - "\022\030\n\020constraint_value\030\002 \001(\t\"E\n\023Constraint" + - "_Schedule\022\027\n\017start_timestamp\030\001 \001(\002\022\025\n\rdu" + - "ration_days\030\002 \001(\002\"3\n\014GPS_Position\022\020\n\010lat" + - "itude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(\002\"W\n\010Locati" + - "on\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\013endpoi" + - "nt_id\030\001 \001(\0132\023.context.EndPointId\022#\n\010loca" + - "tion\030\002 \001(\0132\021.context.Location\"Y\n\033Constra" + - "int_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_latenc" + - "y_ms\030\001 \001(\002\"0\n\027Constraint_SLA_Capacity\022\025\n" + - "\rcapacity_gbps\030\001 \001(\002\"c\n\033Constraint_SLA_A" + - "vailability\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\017i" + - "solation_level\030\001 \003(\0162\033.context.Isolation" + - "LevelEnum\"\242\001\n\025Constraint_Exclusions\022\024\n\014i" + - "s_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\006" + - "custom\030\002 \001(\0132\032.context.Constraint_Custom" + - "H\000\0220\n\010schedule\030\003 \001(\0132\034.context.Constrain" + - "t_ScheduleH\000\022A\n\021endpoint_location\030\004 \001(\0132" + - "$.context.Constraint_EndPointLocationH\000\022" + - "A\n\021endpoint_priority\030\005 \001(\0132$.context.Con" + - "straint_EndPointPriorityH\000\0228\n\014sla_capaci" + - "ty\030\006 \001(\0132 .context.Constraint_SLA_Capaci" + - "tyH\000\0226\n\013sla_latency\030\007 \001(\0132\037.context.Cons" + - "traint_SLA_LatencyH\000\022@\n\020sla_availability" + - "\030\010 \001(\0132$.context.Constraint_SLA_Availabi" + - "lityH\000\022@\n\rsla_isolation\030\t \001(\0132\'.context." + - "Constraint_SLA_Isolation_levelH\000\0224\n\nexcl" + - "usions\030\n \001(\0132\036.context.Constraint_Exclus" + - "ionsH\000B\014\n\nconstraint\"^\n\022TeraFlowControll" + - "er\022&\n\ncontext_id\030\001 \001(\0132\022.context.Context" + - "Id\022\022\n\nip_address\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n\024" + - "AuthenticationResult\022&\n\ncontext_id\030\001 \001(\013" + - "2\022.context.ContextId\022\025\n\rauthenticated\030\002 " + - "\001(\010*j\n\rEventTypeEnum\022\027\n\023EVENTTYPE_UNDEFI" + - "NED\020\000\022\024\n\020EVENTTYPE_CREATE\020\001\022\024\n\020EVENTTYPE" + - "_UPDATE\020\002\022\024\n\020EVENTTYPE_REMOVE\020\003*\231\002\n\020Devi" + - "ceDriverEnum\022\032\n\026DEVICEDRIVER_UNDEFINED\020\000" + - "\022\033\n\027DEVICEDRIVER_OPENCONFIG\020\001\022\036\n\032DEVICED" + - "RIVER_TRANSPORT_API\020\002\022\023\n\017DEVICEDRIVER_P4" + - "\020\003\022&\n\"DEVICEDRIVER_IETF_NETWORK_TOPOLOGY" + - "\020\004\022\033\n\027DEVICEDRIVER_ONF_TR_532\020\005\022\023\n\017DEVIC" + - "EDRIVER_XR\020\006\022\033\n\027DEVICEDRIVER_IETF_L2VPN\020" + - "\007\022 \n\034DEVICEDRIVER_GNMI_OPENCONFIG\020\010*\217\001\n\033" + - "DeviceOperationalStatusEnum\022%\n!DEVICEOPE" + - "RATIONALSTATUS_UNDEFINED\020\000\022$\n DEVICEOPER" + - "ATIONALSTATUS_DISABLED\020\001\022#\n\037DEVICEOPERAT" + - "IONALSTATUS_ENABLED\020\002*\225\001\n\017ServiceTypeEnu" + - "m\022\027\n\023SERVICETYPE_UNKNOWN\020\000\022\024\n\020SERVICETYP" + - "E_L3NM\020\001\022\024\n\020SERVICETYPE_L2NM\020\002\022)\n%SERVIC" + - "ETYPE_TAPI_CONNECTIVITY_SERVICE\020\003\022\022\n\016SER" + - "VICETYPE_TE\020\004*\304\001\n\021ServiceStatusEnum\022\033\n\027S" + - "ERVICESTATUS_UNDEFINED\020\000\022\031\n\025SERVICESTATU" + - "S_PLANNED\020\001\022\030\n\024SERVICESTATUS_ACTIVE\020\002\022\032\n" + - "\026SERVICESTATUS_UPDATING\020\003\022!\n\035SERVICESTAT" + - "US_PENDING_REMOVAL\020\004\022\036\n\032SERVICESTATUS_SL" + - "A_VIOLATED\020\005*\251\001\n\017SliceStatusEnum\022\031\n\025SLIC" + - "ESTATUS_UNDEFINED\020\000\022\027\n\023SLICESTATUS_PLANN" + - "ED\020\001\022\024\n\020SLICESTATUS_INIT\020\002\022\026\n\022SLICESTATU" + - "S_ACTIVE\020\003\022\026\n\022SLICESTATUS_DEINIT\020\004\022\034\n\030SL" + - "ICESTATUS_SLA_VIOLATED\020\005*]\n\020ConfigAction" + - "Enum\022\032\n\026CONFIGACTION_UNDEFINED\020\000\022\024\n\020CONF" + - "IGACTION_SET\020\001\022\027\n\023CONFIGACTION_DELETE\020\002*" + - "m\n\024ConstraintActionEnum\022\036\n\032CONSTRAINTACT" + - "ION_UNDEFINED\020\000\022\030\n\024CONSTRAINTACTION_SET\020" + - "\001\022\033\n\027CONSTRAINTACTION_DELETE\020\002*\203\002\n\022Isola" + - "tionLevelEnum\022\020\n\014NO_ISOLATION\020\000\022\026\n\022PHYSI" + - "CAL_ISOLATION\020\001\022\025\n\021LOGICAL_ISOLATION\020\002\022\025" + - "\n\021PROCESS_ISOLATION\020\003\022\035\n\031PHYSICAL_MEMORY" + - "_ISOLATION\020\004\022\036\n\032PHYSICAL_NETWORK_ISOLATI" + - "ON\020\005\022\036\n\032VIRTUAL_RESOURCE_ISOLATION\020\006\022\037\n\033" + - "NETWORK_FUNCTIONS_ISOLATION\020\007\022\025\n\021SERVICE" + - "_ISOLATION\020\0102\245\026\n\016ContextService\022:\n\016ListC" + - "ontextIds\022\016.context.Empty\032\026.context.Cont" + - "extIdList\"\000\0226\n\014ListContexts\022\016.context.Em" + - "pty\032\024.context.ContextList\"\000\0224\n\nGetContex" + - "t\022\022.context.ContextId\032\020.context.Context\"" + - "\000\0224\n\nSetContext\022\020.context.Context\032\022.cont" + - "ext.ContextId\"\000\0225\n\rRemoveContext\022\022.conte" + - "xt.ContextId\032\016.context.Empty\"\000\022=\n\020GetCon" + - "textEvents\022\016.context.Empty\032\025.context.Con" + - "textEvent\"\0000\001\022@\n\017ListTopologyIds\022\022.conte" + - "xt.ContextId\032\027.context.TopologyIdList\"\000\022" + - "=\n\016ListTopologies\022\022.context.ContextId\032\025." + - "context.TopologyList\"\000\0227\n\013GetTopology\022\023." + - "context.TopologyId\032\021.context.Topology\"\000\022" + - "E\n\022GetTopologyDetails\022\023.context.Topology" + - "Id\032\030.context.TopologyDetails\"\000\0227\n\013SetTop" + - "ology\022\021.context.Topology\032\023.context.Topol" + - "ogyId\"\000\0227\n\016RemoveTopology\022\023.context.Topo" + - "logyId\032\016.context.Empty\"\000\022?\n\021GetTopologyE" + - "vents\022\016.context.Empty\032\026.context.Topology" + - "Event\"\0000\001\0228\n\rListDeviceIds\022\016.context.Emp" + - "ty\032\025.context.DeviceIdList\"\000\0224\n\013ListDevic" + - "es\022\016.context.Empty\032\023.context.DeviceList\"" + - "\000\0221\n\tGetDevice\022\021.context.DeviceId\032\017.cont" + - "ext.Device\"\000\0221\n\tSetDevice\022\017.context.Devi" + - "ce\032\021.context.DeviceId\"\000\0223\n\014RemoveDevice\022" + - "\021.context.DeviceId\032\016.context.Empty\"\000\022;\n\017" + - "GetDeviceEvents\022\016.context.Empty\032\024.contex" + - "t.DeviceEvent\"\0000\001\022<\n\014SelectDevice\022\025.cont" + - "ext.DeviceFilter\032\023.context.DeviceList\"\000\022" + - "I\n\021ListEndPointNames\022\027.context.EndPointI" + - "dList\032\031.context.EndPointNameList\"\000\0224\n\013Li" + - "stLinkIds\022\016.context.Empty\032\023.context.Link" + - "IdList\"\000\0220\n\tListLinks\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.con" + - "text.Link\032\017.context.LinkId\"\000\022/\n\nRemoveLi" + - "nk\022\017.context.LinkId\032\016.context.Empty\"\000\0227\n" + - "\rGetLinkEvents\022\016.context.Empty\032\022.context" + - ".LinkEvent\"\0000\001\022>\n\016ListServiceIds\022\022.conte" + - "xt.ContextId\032\026.context.ServiceIdList\"\000\022:" + - "\n\014ListServices\022\022.context.ContextId\032\024.con" + - "text.ServiceList\"\000\0224\n\nGetService\022\022.conte" + - "xt.ServiceId\032\020.context.Service\"\000\0224\n\nSetS" + - "ervice\022\020.context.Service\032\022.context.Servi" + - "ceId\"\000\0226\n\014UnsetService\022\020.context.Service" + - "\032\022.context.ServiceId\"\000\0225\n\rRemoveService\022" + - "\022.context.ServiceId\032\016.context.Empty\"\000\022=\n" + - "\020GetServiceEvents\022\016.context.Empty\032\025.cont" + - "ext.ServiceEvent\"\0000\001\022?\n\rSelectService\022\026." + - "context.ServiceFilter\032\024.context.ServiceL" + - "ist\"\000\022:\n\014ListSliceIds\022\022.context.ContextI" + - "d\032\024.context.SliceIdList\"\000\0226\n\nListSlices\022" + - "\022.context.ContextId\032\022.context.SliceList\"" + - "\000\022.\n\010GetSlice\022\020.context.SliceId\032\016.contex" + - "t.Slice\"\000\022.\n\010SetSlice\022\016.context.Slice\032\020." + - "context.SliceId\"\000\0220\n\nUnsetSlice\022\016.contex" + - "t.Slice\032\020.context.SliceId\"\000\0221\n\013RemoveSli" + - "ce\022\020.context.SliceId\032\016.context.Empty\"\000\0229" + - "\n\016GetSliceEvents\022\016.context.Empty\032\023.conte" + - "xt.SliceEvent\"\0000\001\0229\n\013SelectSlice\022\024.conte" + - "xt.SliceFilter\032\022.context.SliceList\"\000\022D\n\021" + - "ListConnectionIds\022\022.context.ServiceId\032\031." + - "context.ConnectionIdList\"\000\022@\n\017ListConnec" + - "tions\022\022.context.ServiceId\032\027.context.Conn" + - "ectionList\"\000\022=\n\rGetConnection\022\025.context." + - "ConnectionId\032\023.context.Connection\"\000\022=\n\rS" + - "etConnection\022\023.context.Connection\032\025.cont" + - "ext.ConnectionId\"\000\022;\n\020RemoveConnection\022\025" + - ".context.ConnectionId\032\016.context.Empty\"\000\022" + - "C\n\023GetConnectionEvents\022\016.context.Empty\032\030" + - ".context.ConnectionEvent\"\0000\001b\006proto3" - }; - 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[] { }); - internal_static_context_Uuid_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_context_Uuid_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Uuid_descriptor, - new java.lang.String[] { "Uuid", }); - internal_static_context_Timestamp_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_context_Timestamp_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Timestamp_descriptor, - new java.lang.String[] { "Timestamp", }); - internal_static_context_Event_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_context_Event_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Event_descriptor, - new java.lang.String[] { "Timestamp", "EventType", }); - internal_static_context_ContextId_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_context_ContextId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ContextId_descriptor, - new java.lang.String[] { "ContextUuid", }); - internal_static_context_Context_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_context_Context_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Context_descriptor, - new java.lang.String[] { "ContextId", "Name", "TopologyIds", "ServiceIds", "SliceIds", "Controller", }); - internal_static_context_ContextIdList_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_context_ContextIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ContextIdList_descriptor, - new java.lang.String[] { "ContextIds", }); - internal_static_context_ContextList_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_context_ContextList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ContextList_descriptor, - new java.lang.String[] { "Contexts", }); - internal_static_context_ContextEvent_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_context_ContextEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ContextEvent_descriptor, - new java.lang.String[] { "Event", "ContextId", }); - internal_static_context_TopologyId_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_context_TopologyId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_TopologyId_descriptor, - new java.lang.String[] { "ContextId", "TopologyUuid", }); - internal_static_context_Topology_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_context_Topology_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Topology_descriptor, - new java.lang.String[] { "TopologyId", "Name", "DeviceIds", "LinkIds", }); - internal_static_context_TopologyDetails_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_context_TopologyDetails_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_TopologyDetails_descriptor, - new java.lang.String[] { "TopologyId", "Name", "Devices", "Links", }); - internal_static_context_TopologyIdList_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_context_TopologyIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_TopologyIdList_descriptor, - new java.lang.String[] { "TopologyIds", }); - internal_static_context_TopologyList_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_context_TopologyList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_TopologyList_descriptor, - new java.lang.String[] { "Topologies", }); - internal_static_context_TopologyEvent_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_context_TopologyEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_TopologyEvent_descriptor, - new java.lang.String[] { "Event", "TopologyId", }); - internal_static_context_DeviceId_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_context_DeviceId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_DeviceId_descriptor, - new java.lang.String[] { "DeviceUuid", }); - internal_static_context_Device_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_context_Device_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Device_descriptor, - new java.lang.String[] { "DeviceId", "Name", "DeviceType", "DeviceConfig", "DeviceOperationalStatus", "DeviceDrivers", "DeviceEndpoints", "Components", "ControllerId", }); - internal_static_context_Component_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_context_Component_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Component_descriptor, - new java.lang.String[] { "ComponentUuid", "Name", "Type", "Attributes", "Parent", }); - internal_static_context_Component_AttributesEntry_descriptor = - internal_static_context_Component_descriptor.getNestedTypes().get(0); - internal_static_context_Component_AttributesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Component_AttributesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_context_DeviceConfig_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_context_DeviceConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_DeviceConfig_descriptor, - new java.lang.String[] { "ConfigRules", }); - internal_static_context_DeviceIdList_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_context_DeviceIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_DeviceIdList_descriptor, - new java.lang.String[] { "DeviceIds", }); - internal_static_context_DeviceList_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_context_DeviceList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_DeviceList_descriptor, - new java.lang.String[] { "Devices", }); - internal_static_context_DeviceFilter_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_context_DeviceFilter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_DeviceFilter_descriptor, - new java.lang.String[] { "DeviceIds", "IncludeEndpoints", "IncludeConfigRules", "IncludeComponents", }); - internal_static_context_DeviceEvent_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_context_DeviceEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_DeviceEvent_descriptor, - new java.lang.String[] { "Event", "DeviceId", "DeviceConfig", }); - internal_static_context_LinkId_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_context_LinkId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_LinkId_descriptor, - new java.lang.String[] { "LinkUuid", }); - internal_static_context_Link_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_context_Link_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Link_descriptor, - new java.lang.String[] { "LinkId", "Name", "LinkEndpointIds", }); - internal_static_context_LinkIdList_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_context_LinkIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_LinkIdList_descriptor, - new java.lang.String[] { "LinkIds", }); - internal_static_context_LinkList_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_context_LinkList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_LinkList_descriptor, - new java.lang.String[] { "Links", }); - internal_static_context_LinkEvent_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_context_LinkEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_LinkEvent_descriptor, - new java.lang.String[] { "Event", "LinkId", }); - internal_static_context_ServiceId_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_context_ServiceId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceId_descriptor, - new java.lang.String[] { "ContextId", "ServiceUuid", }); - internal_static_context_Service_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_context_Service_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Service_descriptor, - new java.lang.String[] { "ServiceId", "Name", "ServiceType", "ServiceEndpointIds", "ServiceConstraints", "ServiceStatus", "ServiceConfig", "Timestamp", }); - internal_static_context_ServiceStatus_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_context_ServiceStatus_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceStatus_descriptor, - new java.lang.String[] { "ServiceStatus", }); - internal_static_context_ServiceConfig_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_context_ServiceConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceConfig_descriptor, - new java.lang.String[] { "ConfigRules", }); - internal_static_context_ServiceIdList_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_context_ServiceIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceIdList_descriptor, - new java.lang.String[] { "ServiceIds", }); - internal_static_context_ServiceList_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_context_ServiceList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceList_descriptor, - new java.lang.String[] { "Services", }); - internal_static_context_ServiceFilter_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_context_ServiceFilter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceFilter_descriptor, - new java.lang.String[] { "ServiceIds", "IncludeEndpointIds", "IncludeConstraints", "IncludeConfigRules", }); - internal_static_context_ServiceEvent_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_context_ServiceEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceEvent_descriptor, - new java.lang.String[] { "Event", "ServiceId", }); - internal_static_context_SliceId_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_context_SliceId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceId_descriptor, - new java.lang.String[] { "ContextId", "SliceUuid", }); - internal_static_context_Slice_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_context_Slice_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Slice_descriptor, - new java.lang.String[] { "SliceId", "Name", "SliceEndpointIds", "SliceConstraints", "SliceServiceIds", "SliceSubsliceIds", "SliceStatus", "SliceConfig", "SliceOwner", "Timestamp", }); - internal_static_context_SliceOwner_descriptor = - getDescriptor().getMessageTypes().get(38); - internal_static_context_SliceOwner_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceOwner_descriptor, - new java.lang.String[] { "OwnerUuid", "OwnerString", }); - internal_static_context_SliceStatus_descriptor = - getDescriptor().getMessageTypes().get(39); - internal_static_context_SliceStatus_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceStatus_descriptor, - new java.lang.String[] { "SliceStatus", }); - internal_static_context_SliceConfig_descriptor = - getDescriptor().getMessageTypes().get(40); - internal_static_context_SliceConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceConfig_descriptor, - new java.lang.String[] { "ConfigRules", }); - internal_static_context_SliceIdList_descriptor = - getDescriptor().getMessageTypes().get(41); - internal_static_context_SliceIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceIdList_descriptor, - new java.lang.String[] { "SliceIds", }); - internal_static_context_SliceList_descriptor = - getDescriptor().getMessageTypes().get(42); - internal_static_context_SliceList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceList_descriptor, - new java.lang.String[] { "Slices", }); - internal_static_context_SliceFilter_descriptor = - getDescriptor().getMessageTypes().get(43); - internal_static_context_SliceFilter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceFilter_descriptor, - new java.lang.String[] { "SliceIds", "IncludeEndpointIds", "IncludeConstraints", "IncludeServiceIds", "IncludeSubsliceIds", "IncludeConfigRules", }); - internal_static_context_SliceEvent_descriptor = - getDescriptor().getMessageTypes().get(44); - internal_static_context_SliceEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceEvent_descriptor, - new java.lang.String[] { "Event", "SliceId", }); - internal_static_context_ConnectionId_descriptor = - getDescriptor().getMessageTypes().get(45); - internal_static_context_ConnectionId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionId_descriptor, - new java.lang.String[] { "ConnectionUuid", }); - internal_static_context_ConnectionSettings_L0_descriptor = - getDescriptor().getMessageTypes().get(46); - internal_static_context_ConnectionSettings_L0_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionSettings_L0_descriptor, - new java.lang.String[] { "LspSymbolicName", }); - internal_static_context_ConnectionSettings_L2_descriptor = - getDescriptor().getMessageTypes().get(47); - internal_static_context_ConnectionSettings_L2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionSettings_L2_descriptor, - new java.lang.String[] { "SrcMacAddress", "DstMacAddress", "EtherType", "VlanId", "MplsLabel", "MplsTrafficClass", }); - internal_static_context_ConnectionSettings_L3_descriptor = - getDescriptor().getMessageTypes().get(48); - internal_static_context_ConnectionSettings_L3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionSettings_L3_descriptor, - new java.lang.String[] { "SrcIpAddress", "DstIpAddress", "Dscp", "Protocol", "Ttl", }); - internal_static_context_ConnectionSettings_L4_descriptor = - getDescriptor().getMessageTypes().get(49); - internal_static_context_ConnectionSettings_L4_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionSettings_L4_descriptor, - new java.lang.String[] { "SrcPort", "DstPort", "TcpFlags", "Ttl", }); - internal_static_context_ConnectionSettings_descriptor = - getDescriptor().getMessageTypes().get(50); - internal_static_context_ConnectionSettings_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionSettings_descriptor, - new java.lang.String[] { "L0", "L2", "L3", "L4", }); - internal_static_context_Connection_descriptor = - getDescriptor().getMessageTypes().get(51); - internal_static_context_Connection_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Connection_descriptor, - new java.lang.String[] { "ConnectionId", "ServiceId", "PathHopsEndpointIds", "SubServiceIds", "Settings", }); - internal_static_context_ConnectionIdList_descriptor = - getDescriptor().getMessageTypes().get(52); - internal_static_context_ConnectionIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionIdList_descriptor, - new java.lang.String[] { "ConnectionIds", }); - internal_static_context_ConnectionList_descriptor = - getDescriptor().getMessageTypes().get(53); - internal_static_context_ConnectionList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionList_descriptor, - new java.lang.String[] { "Connections", }); - internal_static_context_ConnectionEvent_descriptor = - getDescriptor().getMessageTypes().get(54); - internal_static_context_ConnectionEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionEvent_descriptor, - new java.lang.String[] { "Event", "ConnectionId", }); - internal_static_context_EndPointId_descriptor = - getDescriptor().getMessageTypes().get(55); - internal_static_context_EndPointId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_EndPointId_descriptor, - new java.lang.String[] { "TopologyId", "DeviceId", "EndpointUuid", }); - internal_static_context_EndPoint_descriptor = - getDescriptor().getMessageTypes().get(56); - internal_static_context_EndPoint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_EndPoint_descriptor, - new java.lang.String[] { "EndpointId", "Name", "EndpointType", "KpiSampleTypes", "EndpointLocation", }); - internal_static_context_EndPointName_descriptor = - getDescriptor().getMessageTypes().get(57); - internal_static_context_EndPointName_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_EndPointName_descriptor, - new java.lang.String[] { "EndpointId", "DeviceName", "EndpointName", "EndpointType", }); - internal_static_context_EndPointIdList_descriptor = - getDescriptor().getMessageTypes().get(58); - internal_static_context_EndPointIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_EndPointIdList_descriptor, - new java.lang.String[] { "EndpointIds", }); - internal_static_context_EndPointNameList_descriptor = - getDescriptor().getMessageTypes().get(59); - internal_static_context_EndPointNameList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_EndPointNameList_descriptor, - new java.lang.String[] { "EndpointNames", }); - internal_static_context_ConfigRule_Custom_descriptor = - getDescriptor().getMessageTypes().get(60); - internal_static_context_ConfigRule_Custom_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConfigRule_Custom_descriptor, - new java.lang.String[] { "ResourceKey", "ResourceValue", }); - internal_static_context_ConfigRule_ACL_descriptor = - getDescriptor().getMessageTypes().get(61); - internal_static_context_ConfigRule_ACL_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConfigRule_ACL_descriptor, - new java.lang.String[] { "EndpointId", "RuleSet", }); - internal_static_context_ConfigRule_descriptor = - getDescriptor().getMessageTypes().get(62); - internal_static_context_ConfigRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConfigRule_descriptor, - new java.lang.String[] { "Action", "Custom", "Acl", "ConfigRule", }); - internal_static_context_Constraint_Custom_descriptor = - getDescriptor().getMessageTypes().get(63); - internal_static_context_Constraint_Custom_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_Custom_descriptor, - new java.lang.String[] { "ConstraintType", "ConstraintValue", }); - internal_static_context_Constraint_Schedule_descriptor = - getDescriptor().getMessageTypes().get(64); - internal_static_context_Constraint_Schedule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_Schedule_descriptor, - new java.lang.String[] { "StartTimestamp", "DurationDays", }); - internal_static_context_GPS_Position_descriptor = - getDescriptor().getMessageTypes().get(65); - internal_static_context_GPS_Position_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_GPS_Position_descriptor, - new java.lang.String[] { "Latitude", "Longitude", }); - internal_static_context_Location_descriptor = - getDescriptor().getMessageTypes().get(66); - internal_static_context_Location_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Location_descriptor, - new java.lang.String[] { "Region", "GpsPosition", "Location", }); - internal_static_context_Constraint_EndPointLocation_descriptor = - getDescriptor().getMessageTypes().get(67); - internal_static_context_Constraint_EndPointLocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_EndPointLocation_descriptor, - new java.lang.String[] { "EndpointId", "Location", }); - internal_static_context_Constraint_EndPointPriority_descriptor = - getDescriptor().getMessageTypes().get(68); - internal_static_context_Constraint_EndPointPriority_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_EndPointPriority_descriptor, - new java.lang.String[] { "EndpointId", "Priority", }); - internal_static_context_Constraint_SLA_Latency_descriptor = - getDescriptor().getMessageTypes().get(69); - internal_static_context_Constraint_SLA_Latency_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_SLA_Latency_descriptor, - new java.lang.String[] { "E2ELatencyMs", }); - internal_static_context_Constraint_SLA_Capacity_descriptor = - getDescriptor().getMessageTypes().get(70); - internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_SLA_Capacity_descriptor, - new java.lang.String[] { "CapacityGbps", }); - internal_static_context_Constraint_SLA_Availability_descriptor = - getDescriptor().getMessageTypes().get(71); - internal_static_context_Constraint_SLA_Availability_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_SLA_Availability_descriptor, - new java.lang.String[] { "NumDisjointPaths", "AllActive", "Availability", }); - internal_static_context_Constraint_SLA_Isolation_level_descriptor = - getDescriptor().getMessageTypes().get(72); - internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_SLA_Isolation_level_descriptor, - new java.lang.String[] { "IsolationLevel", }); - internal_static_context_Constraint_Exclusions_descriptor = - getDescriptor().getMessageTypes().get(73); - internal_static_context_Constraint_Exclusions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_Exclusions_descriptor, - new java.lang.String[] { "IsPermanent", "DeviceIds", "EndpointIds", "LinkIds", }); - internal_static_context_Constraint_descriptor = - getDescriptor().getMessageTypes().get(74); - internal_static_context_Constraint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_descriptor, - new java.lang.String[] { "Action", "Custom", "Schedule", "EndpointLocation", "EndpointPriority", "SlaCapacity", "SlaLatency", "SlaAvailability", "SlaIsolation", "Exclusions", "Constraint", }); - internal_static_context_TeraFlowController_descriptor = - getDescriptor().getMessageTypes().get(75); - internal_static_context_TeraFlowController_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_TeraFlowController_descriptor, - new java.lang.String[] { "ContextId", "IpAddress", "Port", }); - internal_static_context_AuthenticationResult_descriptor = - getDescriptor().getMessageTypes().get(76); - internal_static_context_AuthenticationResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_AuthenticationResult_descriptor, - new java.lang.String[] { "ContextId", "Authenticated", }); - acl.Acl.getDescriptor(); - kpi_sample_types.KpiSampleTypes.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) + 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" }; + 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[] {}); + internal_static_context_Uuid_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_context_Uuid_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Uuid_descriptor, new java.lang.String[] { "Uuid" }); + internal_static_context_Timestamp_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_context_Timestamp_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Timestamp_descriptor, new java.lang.String[] { "Timestamp" }); + internal_static_context_Event_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_context_Event_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Event_descriptor, new java.lang.String[] { "Timestamp", "EventType" }); + internal_static_context_ContextId_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_context_ContextId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ContextId_descriptor, new java.lang.String[] { "ContextUuid" }); + internal_static_context_Context_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_context_Context_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Context_descriptor, new java.lang.String[] { "ContextId", "Name", "TopologyIds", "ServiceIds", "SliceIds", "Controller" }); + internal_static_context_ContextIdList_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_context_ContextIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ContextIdList_descriptor, new java.lang.String[] { "ContextIds" }); + internal_static_context_ContextList_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_context_ContextList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ContextList_descriptor, new java.lang.String[] { "Contexts" }); + internal_static_context_ContextEvent_descriptor = getDescriptor().getMessageTypes().get(8); + internal_static_context_ContextEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ContextEvent_descriptor, new java.lang.String[] { "Event", "ContextId" }); + internal_static_context_TopologyId_descriptor = getDescriptor().getMessageTypes().get(9); + internal_static_context_TopologyId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyId_descriptor, new java.lang.String[] { "ContextId", "TopologyUuid" }); + internal_static_context_Topology_descriptor = getDescriptor().getMessageTypes().get(10); + internal_static_context_Topology_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Topology_descriptor, new java.lang.String[] { "TopologyId", "Name", "DeviceIds", "LinkIds" }); + internal_static_context_TopologyDetails_descriptor = getDescriptor().getMessageTypes().get(11); + internal_static_context_TopologyDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyDetails_descriptor, new java.lang.String[] { "TopologyId", "Name", "Devices", "Links" }); + internal_static_context_TopologyIdList_descriptor = getDescriptor().getMessageTypes().get(12); + internal_static_context_TopologyIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyIdList_descriptor, new java.lang.String[] { "TopologyIds" }); + internal_static_context_TopologyList_descriptor = getDescriptor().getMessageTypes().get(13); + internal_static_context_TopologyList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyList_descriptor, new java.lang.String[] { "Topologies" }); + internal_static_context_TopologyEvent_descriptor = getDescriptor().getMessageTypes().get(14); + internal_static_context_TopologyEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyEvent_descriptor, new java.lang.String[] { "Event", "TopologyId" }); + internal_static_context_DeviceId_descriptor = getDescriptor().getMessageTypes().get(15); + internal_static_context_DeviceId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_DeviceId_descriptor, new java.lang.String[] { "DeviceUuid" }); + internal_static_context_Device_descriptor = getDescriptor().getMessageTypes().get(16); + internal_static_context_Device_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Device_descriptor, new java.lang.String[] { "DeviceId", "Name", "DeviceType", "DeviceConfig", "DeviceOperationalStatus", "DeviceDrivers", "DeviceEndpoints", "Components", "ControllerId" }); + internal_static_context_Component_descriptor = getDescriptor().getMessageTypes().get(17); + internal_static_context_Component_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Component_descriptor, new java.lang.String[] { "ComponentUuid", "Name", "Type", "Attributes", "Parent" }); + internal_static_context_Component_AttributesEntry_descriptor = internal_static_context_Component_descriptor.getNestedTypes().get(0); + internal_static_context_Component_AttributesEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Component_AttributesEntry_descriptor, new java.lang.String[] { "Key", "Value" }); + internal_static_context_DeviceConfig_descriptor = getDescriptor().getMessageTypes().get(18); + internal_static_context_DeviceConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_DeviceConfig_descriptor, new java.lang.String[] { "ConfigRules" }); + internal_static_context_DeviceIdList_descriptor = getDescriptor().getMessageTypes().get(19); + internal_static_context_DeviceIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_DeviceIdList_descriptor, new java.lang.String[] { "DeviceIds" }); + internal_static_context_DeviceList_descriptor = getDescriptor().getMessageTypes().get(20); + internal_static_context_DeviceList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_DeviceList_descriptor, new java.lang.String[] { "Devices" }); + internal_static_context_DeviceFilter_descriptor = getDescriptor().getMessageTypes().get(21); + internal_static_context_DeviceFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_DeviceFilter_descriptor, new java.lang.String[] { "DeviceIds", "IncludeEndpoints", "IncludeConfigRules", "IncludeComponents" }); + internal_static_context_DeviceEvent_descriptor = getDescriptor().getMessageTypes().get(22); + internal_static_context_DeviceEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_DeviceEvent_descriptor, new java.lang.String[] { "Event", "DeviceId", "DeviceConfig" }); + internal_static_context_LinkId_descriptor = getDescriptor().getMessageTypes().get(23); + internal_static_context_LinkId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkId_descriptor, new java.lang.String[] { "LinkUuid" }); + internal_static_context_LinkAttributes_descriptor = getDescriptor().getMessageTypes().get(24); + internal_static_context_LinkAttributes_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkAttributes_descriptor, new java.lang.String[] { "TotalCapacityGbps", "UsedCapacityGbps" }); + internal_static_context_Link_descriptor = getDescriptor().getMessageTypes().get(25); + internal_static_context_Link_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Link_descriptor, new java.lang.String[] { "LinkId", "Name", "LinkEndpointIds", "Attributes" }); + internal_static_context_LinkIdList_descriptor = getDescriptor().getMessageTypes().get(26); + internal_static_context_LinkIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkIdList_descriptor, new java.lang.String[] { "LinkIds" }); + internal_static_context_LinkList_descriptor = getDescriptor().getMessageTypes().get(27); + internal_static_context_LinkList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkList_descriptor, new java.lang.String[] { "Links" }); + internal_static_context_LinkEvent_descriptor = getDescriptor().getMessageTypes().get(28); + internal_static_context_LinkEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkEvent_descriptor, new java.lang.String[] { "Event", "LinkId" }); + internal_static_context_ServiceId_descriptor = getDescriptor().getMessageTypes().get(29); + internal_static_context_ServiceId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceId_descriptor, new java.lang.String[] { "ContextId", "ServiceUuid" }); + internal_static_context_Service_descriptor = getDescriptor().getMessageTypes().get(30); + internal_static_context_Service_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Service_descriptor, new java.lang.String[] { "ServiceId", "Name", "ServiceType", "ServiceEndpointIds", "ServiceConstraints", "ServiceStatus", "ServiceConfig", "Timestamp" }); + internal_static_context_ServiceStatus_descriptor = getDescriptor().getMessageTypes().get(31); + internal_static_context_ServiceStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceStatus_descriptor, new java.lang.String[] { "ServiceStatus" }); + internal_static_context_ServiceConfig_descriptor = getDescriptor().getMessageTypes().get(32); + internal_static_context_ServiceConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceConfig_descriptor, new java.lang.String[] { "ConfigRules" }); + internal_static_context_ServiceIdList_descriptor = getDescriptor().getMessageTypes().get(33); + internal_static_context_ServiceIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceIdList_descriptor, new java.lang.String[] { "ServiceIds" }); + internal_static_context_ServiceList_descriptor = getDescriptor().getMessageTypes().get(34); + internal_static_context_ServiceList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceList_descriptor, new java.lang.String[] { "Services" }); + internal_static_context_ServiceFilter_descriptor = getDescriptor().getMessageTypes().get(35); + internal_static_context_ServiceFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceFilter_descriptor, new java.lang.String[] { "ServiceIds", "IncludeEndpointIds", "IncludeConstraints", "IncludeConfigRules" }); + internal_static_context_ServiceEvent_descriptor = getDescriptor().getMessageTypes().get(36); + internal_static_context_ServiceEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceEvent_descriptor, new java.lang.String[] { "Event", "ServiceId" }); + internal_static_context_SliceId_descriptor = getDescriptor().getMessageTypes().get(37); + internal_static_context_SliceId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceId_descriptor, new java.lang.String[] { "ContextId", "SliceUuid" }); + internal_static_context_Slice_descriptor = getDescriptor().getMessageTypes().get(38); + internal_static_context_Slice_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Slice_descriptor, new java.lang.String[] { "SliceId", "Name", "SliceEndpointIds", "SliceConstraints", "SliceServiceIds", "SliceSubsliceIds", "SliceStatus", "SliceConfig", "SliceOwner", "Timestamp" }); + internal_static_context_SliceOwner_descriptor = getDescriptor().getMessageTypes().get(39); + internal_static_context_SliceOwner_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceOwner_descriptor, new java.lang.String[] { "OwnerUuid", "OwnerString" }); + internal_static_context_SliceStatus_descriptor = getDescriptor().getMessageTypes().get(40); + internal_static_context_SliceStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceStatus_descriptor, new java.lang.String[] { "SliceStatus" }); + internal_static_context_SliceConfig_descriptor = getDescriptor().getMessageTypes().get(41); + internal_static_context_SliceConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceConfig_descriptor, new java.lang.String[] { "ConfigRules" }); + internal_static_context_SliceIdList_descriptor = getDescriptor().getMessageTypes().get(42); + internal_static_context_SliceIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceIdList_descriptor, new java.lang.String[] { "SliceIds" }); + internal_static_context_SliceList_descriptor = getDescriptor().getMessageTypes().get(43); + internal_static_context_SliceList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceList_descriptor, new java.lang.String[] { "Slices" }); + internal_static_context_SliceFilter_descriptor = getDescriptor().getMessageTypes().get(44); + internal_static_context_SliceFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceFilter_descriptor, new java.lang.String[] { "SliceIds", "IncludeEndpointIds", "IncludeConstraints", "IncludeServiceIds", "IncludeSubsliceIds", "IncludeConfigRules" }); + internal_static_context_SliceEvent_descriptor = getDescriptor().getMessageTypes().get(45); + internal_static_context_SliceEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceEvent_descriptor, new java.lang.String[] { "Event", "SliceId" }); + internal_static_context_ConnectionId_descriptor = getDescriptor().getMessageTypes().get(46); + internal_static_context_ConnectionId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionId_descriptor, new java.lang.String[] { "ConnectionUuid" }); + internal_static_context_ConnectionSettings_L0_descriptor = getDescriptor().getMessageTypes().get(47); + internal_static_context_ConnectionSettings_L0_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionSettings_L0_descriptor, new java.lang.String[] { "LspSymbolicName" }); + internal_static_context_ConnectionSettings_L2_descriptor = getDescriptor().getMessageTypes().get(48); + internal_static_context_ConnectionSettings_L2_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionSettings_L2_descriptor, new java.lang.String[] { "SrcMacAddress", "DstMacAddress", "EtherType", "VlanId", "MplsLabel", "MplsTrafficClass" }); + internal_static_context_ConnectionSettings_L3_descriptor = getDescriptor().getMessageTypes().get(49); + internal_static_context_ConnectionSettings_L3_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionSettings_L3_descriptor, new java.lang.String[] { "SrcIpAddress", "DstIpAddress", "Dscp", "Protocol", "Ttl" }); + internal_static_context_ConnectionSettings_L4_descriptor = getDescriptor().getMessageTypes().get(50); + internal_static_context_ConnectionSettings_L4_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionSettings_L4_descriptor, new java.lang.String[] { "SrcPort", "DstPort", "TcpFlags", "Ttl" }); + internal_static_context_ConnectionSettings_descriptor = getDescriptor().getMessageTypes().get(51); + internal_static_context_ConnectionSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionSettings_descriptor, new java.lang.String[] { "L0", "L2", "L3", "L4" }); + internal_static_context_Connection_descriptor = getDescriptor().getMessageTypes().get(52); + internal_static_context_Connection_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Connection_descriptor, new java.lang.String[] { "ConnectionId", "ServiceId", "PathHopsEndpointIds", "SubServiceIds", "Settings" }); + internal_static_context_ConnectionIdList_descriptor = getDescriptor().getMessageTypes().get(53); + internal_static_context_ConnectionIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionIdList_descriptor, new java.lang.String[] { "ConnectionIds" }); + internal_static_context_ConnectionList_descriptor = getDescriptor().getMessageTypes().get(54); + internal_static_context_ConnectionList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionList_descriptor, new java.lang.String[] { "Connections" }); + internal_static_context_ConnectionEvent_descriptor = getDescriptor().getMessageTypes().get(55); + internal_static_context_ConnectionEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionEvent_descriptor, new java.lang.String[] { "Event", "ConnectionId" }); + internal_static_context_EndPointId_descriptor = getDescriptor().getMessageTypes().get(56); + internal_static_context_EndPointId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPointId_descriptor, new java.lang.String[] { "TopologyId", "DeviceId", "EndpointUuid" }); + internal_static_context_EndPoint_descriptor = getDescriptor().getMessageTypes().get(57); + internal_static_context_EndPoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPoint_descriptor, new java.lang.String[] { "EndpointId", "Name", "EndpointType", "KpiSampleTypes", "EndpointLocation" }); + internal_static_context_EndPointName_descriptor = getDescriptor().getMessageTypes().get(58); + internal_static_context_EndPointName_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPointName_descriptor, new java.lang.String[] { "EndpointId", "DeviceName", "EndpointName", "EndpointType" }); + internal_static_context_EndPointIdList_descriptor = getDescriptor().getMessageTypes().get(59); + internal_static_context_EndPointIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPointIdList_descriptor, new java.lang.String[] { "EndpointIds" }); + internal_static_context_EndPointNameList_descriptor = getDescriptor().getMessageTypes().get(60); + internal_static_context_EndPointNameList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPointNameList_descriptor, new java.lang.String[] { "EndpointNames" }); + internal_static_context_ConfigRule_Custom_descriptor = getDescriptor().getMessageTypes().get(61); + internal_static_context_ConfigRule_Custom_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConfigRule_Custom_descriptor, new java.lang.String[] { "ResourceKey", "ResourceValue" }); + internal_static_context_ConfigRule_ACL_descriptor = getDescriptor().getMessageTypes().get(62); + internal_static_context_ConfigRule_ACL_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConfigRule_ACL_descriptor, new java.lang.String[] { "EndpointId", "RuleSet" }); + internal_static_context_ConfigRule_descriptor = getDescriptor().getMessageTypes().get(63); + internal_static_context_ConfigRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConfigRule_descriptor, new java.lang.String[] { "Action", "Custom", "Acl", "ConfigRule" }); + internal_static_context_Constraint_Custom_descriptor = getDescriptor().getMessageTypes().get(64); + internal_static_context_Constraint_Custom_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_Custom_descriptor, new java.lang.String[] { "ConstraintType", "ConstraintValue" }); + internal_static_context_Constraint_Schedule_descriptor = getDescriptor().getMessageTypes().get(65); + internal_static_context_Constraint_Schedule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_Schedule_descriptor, new java.lang.String[] { "StartTimestamp", "DurationDays" }); + internal_static_context_GPS_Position_descriptor = getDescriptor().getMessageTypes().get(66); + internal_static_context_GPS_Position_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_GPS_Position_descriptor, new java.lang.String[] { "Latitude", "Longitude" }); + internal_static_context_Location_descriptor = getDescriptor().getMessageTypes().get(67); + internal_static_context_Location_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Location_descriptor, new java.lang.String[] { "Region", "GpsPosition", "Location" }); + internal_static_context_Constraint_EndPointLocation_descriptor = getDescriptor().getMessageTypes().get(68); + internal_static_context_Constraint_EndPointLocation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_EndPointLocation_descriptor, new java.lang.String[] { "EndpointId", "Location" }); + internal_static_context_Constraint_EndPointPriority_descriptor = getDescriptor().getMessageTypes().get(69); + internal_static_context_Constraint_EndPointPriority_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_EndPointPriority_descriptor, new java.lang.String[] { "EndpointId", "Priority" }); + internal_static_context_Constraint_SLA_Latency_descriptor = getDescriptor().getMessageTypes().get(70); + internal_static_context_Constraint_SLA_Latency_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_SLA_Latency_descriptor, new java.lang.String[] { "E2ELatencyMs" }); + internal_static_context_Constraint_SLA_Capacity_descriptor = getDescriptor().getMessageTypes().get(71); + internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_SLA_Capacity_descriptor, new java.lang.String[] { "CapacityGbps" }); + internal_static_context_Constraint_SLA_Availability_descriptor = getDescriptor().getMessageTypes().get(72); + internal_static_context_Constraint_SLA_Availability_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_SLA_Availability_descriptor, new java.lang.String[] { "NumDisjointPaths", "AllActive", "Availability" }); + internal_static_context_Constraint_SLA_Isolation_level_descriptor = getDescriptor().getMessageTypes().get(73); + internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_SLA_Isolation_level_descriptor, new java.lang.String[] { "IsolationLevel" }); + internal_static_context_Constraint_Exclusions_descriptor = getDescriptor().getMessageTypes().get(74); + internal_static_context_Constraint_Exclusions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_Exclusions_descriptor, new java.lang.String[] { "IsPermanent", "DeviceIds", "EndpointIds", "LinkIds" }); + internal_static_context_Constraint_descriptor = getDescriptor().getMessageTypes().get(75); + internal_static_context_Constraint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_descriptor, new java.lang.String[] { "Action", "Custom", "Schedule", "EndpointLocation", "EndpointPriority", "SlaCapacity", "SlaLatency", "SlaAvailability", "SlaIsolation", "Exclusions", "Constraint" }); + internal_static_context_TeraFlowController_descriptor = getDescriptor().getMessageTypes().get(76); + internal_static_context_TeraFlowController_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TeraFlowController_descriptor, new java.lang.String[] { "ContextId", "IpAddress", "Port" }); + internal_static_context_AuthenticationResult_descriptor = getDescriptor().getMessageTypes().get(77); + internal_static_context_AuthenticationResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_AuthenticationResult_descriptor, new java.lang.String[] { "ContextId", "Authenticated" }); + internal_static_context_OpticalConfigId_descriptor = getDescriptor().getMessageTypes().get(78); + internal_static_context_OpticalConfigId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfigId_descriptor, new java.lang.String[] { "OpticalconfigUuid" }); + internal_static_context_OpticalConfig_descriptor = getDescriptor().getMessageTypes().get(79); + internal_static_context_OpticalConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfig_descriptor, new java.lang.String[] { "OpticalconfigId", "Config" }); + internal_static_context_OpticalConfigList_descriptor = getDescriptor().getMessageTypes().get(80); + internal_static_context_OpticalConfigList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfigList_descriptor, new java.lang.String[] { "Opticalconfigs" }); + internal_static_context_OpticalLinkId_descriptor = getDescriptor().getMessageTypes().get(81); + internal_static_context_OpticalLinkId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkId_descriptor, new java.lang.String[] { "OpticalLinkUuid" }); + internal_static_context_FiberId_descriptor = getDescriptor().getMessageTypes().get(82); + internal_static_context_FiberId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_FiberId_descriptor, new java.lang.String[] { "FiberUuid" }); + internal_static_context_Fiber_descriptor = getDescriptor().getMessageTypes().get(83); + internal_static_context_Fiber_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Fiber_descriptor, new java.lang.String[] { "ID", "SrcPort", "DstPort", "LocalPeerPort", "RemotePeerPort", "CSlots", "LSlots", "SSlots", "Length", "Used", "FiberUuid" }); + internal_static_context_OpticalLinkDetails_descriptor = getDescriptor().getMessageTypes().get(84); + internal_static_context_OpticalLinkDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkDetails_descriptor, new java.lang.String[] { "Length", "Source", "Target", "Fibers" }); + internal_static_context_OpticalLink_descriptor = getDescriptor().getMessageTypes().get(85); + internal_static_context_OpticalLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLink_descriptor, new java.lang.String[] { "Name", "Details", "OpticalLinkUuid" }); + acl.Acl.getDescriptor(); + kpi_sample_types.KpiSampleTypes.getDescriptor(); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/policy/target/generated-sources/grpc/context/ContextService.java b/src/policy/target/generated-sources/grpc/context/ContextService.java index b356bac75e24f5f412c51de5450d284ea340ce12..32544e6beba009b31b06dcd583893933c15eb1fe 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextService.java +++ b/src/policy/target/generated-sources/grpc/context/ContextService.java @@ -1,112 +1,122 @@ package context; -import io.quarkus.grpc.runtime.MutinyService; +import io.quarkus.grpc.MutinyService; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: context.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: context.proto") public interface ContextService extends MutinyService { - io.smallrye.mutiny.Uni listContextIds(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni listContexts(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni getContext(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni setContext(context.ContextOuterClass.Context request); - + io.smallrye.mutiny.Uni removeContext(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni listTopologyIds(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni listTopologies(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni getTopology(context.ContextOuterClass.TopologyId request); - + io.smallrye.mutiny.Uni getTopologyDetails(context.ContextOuterClass.TopologyId request); - + io.smallrye.mutiny.Uni setTopology(context.ContextOuterClass.Topology request); - + io.smallrye.mutiny.Uni removeTopology(context.ContextOuterClass.TopologyId request); - + io.smallrye.mutiny.Uni listDeviceIds(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni listDevices(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni getDevice(context.ContextOuterClass.DeviceId request); - + io.smallrye.mutiny.Uni setDevice(context.ContextOuterClass.Device request); - + io.smallrye.mutiny.Uni removeDevice(context.ContextOuterClass.DeviceId request); - + io.smallrye.mutiny.Uni selectDevice(context.ContextOuterClass.DeviceFilter request); - + io.smallrye.mutiny.Uni listEndPointNames(context.ContextOuterClass.EndPointIdList request); - + io.smallrye.mutiny.Uni listLinkIds(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni listLinks(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni getLink(context.ContextOuterClass.LinkId request); - + io.smallrye.mutiny.Uni setLink(context.ContextOuterClass.Link request); - + io.smallrye.mutiny.Uni removeLink(context.ContextOuterClass.LinkId request); - + io.smallrye.mutiny.Uni listServiceIds(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni listServices(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni getService(context.ContextOuterClass.ServiceId request); - + io.smallrye.mutiny.Uni setService(context.ContextOuterClass.Service request); - + io.smallrye.mutiny.Uni unsetService(context.ContextOuterClass.Service request); - + io.smallrye.mutiny.Uni removeService(context.ContextOuterClass.ServiceId request); - + io.smallrye.mutiny.Uni selectService(context.ContextOuterClass.ServiceFilter request); - + io.smallrye.mutiny.Uni listSliceIds(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni listSlices(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni getSlice(context.ContextOuterClass.SliceId request); - + io.smallrye.mutiny.Uni setSlice(context.ContextOuterClass.Slice request); - + io.smallrye.mutiny.Uni unsetSlice(context.ContextOuterClass.Slice request); - + io.smallrye.mutiny.Uni removeSlice(context.ContextOuterClass.SliceId request); - + io.smallrye.mutiny.Uni selectSlice(context.ContextOuterClass.SliceFilter request); - + io.smallrye.mutiny.Uni listConnectionIds(context.ContextOuterClass.ServiceId request); - + io.smallrye.mutiny.Uni listConnections(context.ContextOuterClass.ServiceId request); - + io.smallrye.mutiny.Uni getConnection(context.ContextOuterClass.ConnectionId request); - + io.smallrye.mutiny.Uni setConnection(context.ContextOuterClass.Connection request); - + io.smallrye.mutiny.Uni removeConnection(context.ContextOuterClass.ConnectionId request); - - + + /** + *
+     *  ------------------------------ Experimental -----------------------------
+     * 
+ */ + io.smallrye.mutiny.Uni getOpticalConfig(context.ContextOuterClass.Empty request); + + io.smallrye.mutiny.Uni setOpticalConfig(context.ContextOuterClass.OpticalConfig request); + + io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request); + + io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request); + + io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request); + + io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request); + io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Multi getTopologyEvents(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Multi getDeviceEvents(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Multi getLinkEvents(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Multi getServiceEvents(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Multi getSliceEvents(context.ContextOuterClass.Empty request); - - io.smallrye.mutiny.Multi getConnectionEvents(context.ContextOuterClass.Empty request); - - -} \ No newline at end of file + io.smallrye.mutiny.Multi getConnectionEvents(context.ContextOuterClass.Empty request); +} diff --git a/src/policy/target/generated-sources/grpc/context/ContextServiceBean.java b/src/policy/target/generated-sources/grpc/context/ContextServiceBean.java index 45a7959c4425a981fcbdaba6b06c22cd2fe769ac..d3c1b628573bf328f51de68a68d21690c2ff7045 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextServiceBean.java +++ b/src/policy/target/generated-sources/grpc/context/ContextServiceBean.java @@ -2,417 +2,509 @@ package context; import io.grpc.BindableService; import io.quarkus.grpc.GrpcService; -import io.quarkus.grpc.runtime.MutinyBean; +import io.quarkus.grpc.MutinyBean; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: context.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: context.proto") public class ContextServiceBean extends MutinyContextServiceGrpc.ContextServiceImplBase implements BindableService, MutinyBean { private final ContextService delegate; ContextServiceBean(@GrpcService ContextService delegate) { - this.delegate = delegate; + this.delegate = delegate; } @Override public io.smallrye.mutiny.Uni listContextIds(context.ContextOuterClass.Empty request) { - try { - return delegate.listContextIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listContextIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listContexts(context.ContextOuterClass.Empty request) { - try { - return delegate.listContexts(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listContexts(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getContext(context.ContextOuterClass.ContextId request) { - try { - return delegate.getContext(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getContext(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setContext(context.ContextOuterClass.Context request) { - try { - return delegate.setContext(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setContext(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeContext(context.ContextOuterClass.ContextId request) { - try { - return delegate.removeContext(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeContext(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listTopologyIds(context.ContextOuterClass.ContextId request) { - try { - return delegate.listTopologyIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listTopologyIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listTopologies(context.ContextOuterClass.ContextId request) { - try { - return delegate.listTopologies(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listTopologies(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getTopology(context.ContextOuterClass.TopologyId request) { - try { - return delegate.getTopology(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getTopology(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getTopologyDetails(context.ContextOuterClass.TopologyId request) { - try { - return delegate.getTopologyDetails(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getTopologyDetails(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setTopology(context.ContextOuterClass.Topology request) { - try { - return delegate.setTopology(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setTopology(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeTopology(context.ContextOuterClass.TopologyId request) { - try { - return delegate.removeTopology(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeTopology(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listDeviceIds(context.ContextOuterClass.Empty request) { - try { - return delegate.listDeviceIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listDeviceIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listDevices(context.ContextOuterClass.Empty request) { - try { - return delegate.listDevices(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listDevices(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getDevice(context.ContextOuterClass.DeviceId request) { - try { - return delegate.getDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setDevice(context.ContextOuterClass.Device request) { - try { - return delegate.setDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeDevice(context.ContextOuterClass.DeviceId request) { - try { - return delegate.removeDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni selectDevice(context.ContextOuterClass.DeviceFilter request) { - try { - return delegate.selectDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.selectDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listEndPointNames(context.ContextOuterClass.EndPointIdList request) { - try { - return delegate.listEndPointNames(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listEndPointNames(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listLinkIds(context.ContextOuterClass.Empty request) { - try { - return delegate.listLinkIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listLinkIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listLinks(context.ContextOuterClass.Empty request) { - try { - return delegate.listLinks(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listLinks(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getLink(context.ContextOuterClass.LinkId request) { - try { - return delegate.getLink(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getLink(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setLink(context.ContextOuterClass.Link request) { - try { - return delegate.setLink(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setLink(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeLink(context.ContextOuterClass.LinkId request) { - try { - return delegate.removeLink(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeLink(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listServiceIds(context.ContextOuterClass.ContextId request) { - try { - return delegate.listServiceIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listServiceIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listServices(context.ContextOuterClass.ContextId request) { - try { - return delegate.listServices(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listServices(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getService(context.ContextOuterClass.ServiceId request) { - try { - return delegate.getService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setService(context.ContextOuterClass.Service request) { - try { - return delegate.setService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni unsetService(context.ContextOuterClass.Service request) { - try { - return delegate.unsetService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.unsetService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeService(context.ContextOuterClass.ServiceId request) { - try { - return delegate.removeService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni selectService(context.ContextOuterClass.ServiceFilter request) { - try { - return delegate.selectService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.selectService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listSliceIds(context.ContextOuterClass.ContextId request) { - try { - return delegate.listSliceIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listSliceIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listSlices(context.ContextOuterClass.ContextId request) { - try { - return delegate.listSlices(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listSlices(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getSlice(context.ContextOuterClass.SliceId request) { - try { - return delegate.getSlice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getSlice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setSlice(context.ContextOuterClass.Slice request) { - try { - return delegate.setSlice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setSlice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni unsetSlice(context.ContextOuterClass.Slice request) { - try { - return delegate.unsetSlice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.unsetSlice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeSlice(context.ContextOuterClass.SliceId request) { - try { - return delegate.removeSlice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeSlice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni selectSlice(context.ContextOuterClass.SliceFilter request) { - try { - return delegate.selectSlice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.selectSlice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listConnectionIds(context.ContextOuterClass.ServiceId request) { - try { - return delegate.listConnectionIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listConnectionIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listConnections(context.ContextOuterClass.ServiceId request) { - try { - return delegate.listConnections(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listConnections(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getConnection(context.ContextOuterClass.ConnectionId request) { - try { - return delegate.getConnection(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getConnection(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setConnection(context.ContextOuterClass.Connection request) { - try { - return delegate.setConnection(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setConnection(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeConnection(context.ContextOuterClass.ConnectionId request) { - try { - return delegate.removeConnection(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeConnection(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni getOpticalConfig(context.ContextOuterClass.Empty request) { + try { + return delegate.getOpticalConfig(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni setOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + try { + return delegate.setOpticalConfig(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + try { + return delegate.selectOpticalConfig(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { + try { + return delegate.setOpticalLink(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + try { + return delegate.getOpticalLink(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { + try { + return delegate.getFiber(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getContextEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getContextEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getTopologyEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getTopologyEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getTopologyEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getDeviceEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getDeviceEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getDeviceEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getLinkEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getLinkEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getLinkEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getServiceEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getServiceEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getServiceEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getSliceEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getSliceEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getSliceEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getConnectionEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getConnectionEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getConnectionEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/context/ContextServiceClient.java b/src/policy/target/generated-sources/grpc/context/ContextServiceClient.java index 0b0e9f83f74d1ce33ba6d609544dabb590024758..b1773578d3448de901839bf6e70e855ff58ad9e5 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextServiceClient.java +++ b/src/policy/target/generated-sources/grpc/context/ContextServiceClient.java @@ -1,227 +1,302 @@ package context; import java.util.function.BiFunction; +import io.quarkus.grpc.MutinyClient; -import io.quarkus.grpc.runtime.MutinyClient; - -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: context.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: context.proto") public class ContextServiceClient implements ContextService, MutinyClient { private final MutinyContextServiceGrpc.MutinyContextServiceStub stub; public ContextServiceClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) { - this.stub = stubConfigurator.apply(name,MutinyContextServiceGrpc.newMutinyStub(channel)); + this.stub = stubConfigurator.apply(name, MutinyContextServiceGrpc.newMutinyStub(channel)); + } + + private ContextServiceClient(MutinyContextServiceGrpc.MutinyContextServiceStub stub) { + this.stub = stub; + } + + public ContextServiceClient newInstanceWithStub(MutinyContextServiceGrpc.MutinyContextServiceStub stub) { + return new ContextServiceClient(stub); } @Override public MutinyContextServiceGrpc.MutinyContextServiceStub getStub() { - return stub; + return stub; } @Override public io.smallrye.mutiny.Uni listContextIds(context.ContextOuterClass.Empty request) { - return stub.listContextIds(request); + return stub.listContextIds(request); } + @Override public io.smallrye.mutiny.Uni listContexts(context.ContextOuterClass.Empty request) { - return stub.listContexts(request); + return stub.listContexts(request); } + @Override public io.smallrye.mutiny.Uni getContext(context.ContextOuterClass.ContextId request) { - return stub.getContext(request); + return stub.getContext(request); } + @Override public io.smallrye.mutiny.Uni setContext(context.ContextOuterClass.Context request) { - return stub.setContext(request); + return stub.setContext(request); } + @Override public io.smallrye.mutiny.Uni removeContext(context.ContextOuterClass.ContextId request) { - return stub.removeContext(request); + return stub.removeContext(request); } + @Override public io.smallrye.mutiny.Uni listTopologyIds(context.ContextOuterClass.ContextId request) { - return stub.listTopologyIds(request); + return stub.listTopologyIds(request); } + @Override public io.smallrye.mutiny.Uni listTopologies(context.ContextOuterClass.ContextId request) { - return stub.listTopologies(request); + return stub.listTopologies(request); } + @Override public io.smallrye.mutiny.Uni getTopology(context.ContextOuterClass.TopologyId request) { - return stub.getTopology(request); + return stub.getTopology(request); } + @Override public io.smallrye.mutiny.Uni getTopologyDetails(context.ContextOuterClass.TopologyId request) { - return stub.getTopologyDetails(request); + return stub.getTopologyDetails(request); } + @Override public io.smallrye.mutiny.Uni setTopology(context.ContextOuterClass.Topology request) { - return stub.setTopology(request); + return stub.setTopology(request); } + @Override public io.smallrye.mutiny.Uni removeTopology(context.ContextOuterClass.TopologyId request) { - return stub.removeTopology(request); + return stub.removeTopology(request); } + @Override public io.smallrye.mutiny.Uni listDeviceIds(context.ContextOuterClass.Empty request) { - return stub.listDeviceIds(request); + return stub.listDeviceIds(request); } + @Override public io.smallrye.mutiny.Uni listDevices(context.ContextOuterClass.Empty request) { - return stub.listDevices(request); + return stub.listDevices(request); } + @Override public io.smallrye.mutiny.Uni getDevice(context.ContextOuterClass.DeviceId request) { - return stub.getDevice(request); + return stub.getDevice(request); } + @Override public io.smallrye.mutiny.Uni setDevice(context.ContextOuterClass.Device request) { - return stub.setDevice(request); + return stub.setDevice(request); } + @Override public io.smallrye.mutiny.Uni removeDevice(context.ContextOuterClass.DeviceId request) { - return stub.removeDevice(request); + return stub.removeDevice(request); } + @Override public io.smallrye.mutiny.Uni selectDevice(context.ContextOuterClass.DeviceFilter request) { - return stub.selectDevice(request); + return stub.selectDevice(request); } + @Override public io.smallrye.mutiny.Uni listEndPointNames(context.ContextOuterClass.EndPointIdList request) { - return stub.listEndPointNames(request); + return stub.listEndPointNames(request); } + @Override public io.smallrye.mutiny.Uni listLinkIds(context.ContextOuterClass.Empty request) { - return stub.listLinkIds(request); + return stub.listLinkIds(request); } + @Override public io.smallrye.mutiny.Uni listLinks(context.ContextOuterClass.Empty request) { - return stub.listLinks(request); + return stub.listLinks(request); } + @Override public io.smallrye.mutiny.Uni getLink(context.ContextOuterClass.LinkId request) { - return stub.getLink(request); + return stub.getLink(request); } + @Override public io.smallrye.mutiny.Uni setLink(context.ContextOuterClass.Link request) { - return stub.setLink(request); + return stub.setLink(request); } + @Override public io.smallrye.mutiny.Uni removeLink(context.ContextOuterClass.LinkId request) { - return stub.removeLink(request); + return stub.removeLink(request); } + @Override public io.smallrye.mutiny.Uni listServiceIds(context.ContextOuterClass.ContextId request) { - return stub.listServiceIds(request); + return stub.listServiceIds(request); } + @Override public io.smallrye.mutiny.Uni listServices(context.ContextOuterClass.ContextId request) { - return stub.listServices(request); + return stub.listServices(request); } + @Override public io.smallrye.mutiny.Uni getService(context.ContextOuterClass.ServiceId request) { - return stub.getService(request); + return stub.getService(request); } + @Override public io.smallrye.mutiny.Uni setService(context.ContextOuterClass.Service request) { - return stub.setService(request); + return stub.setService(request); } + @Override public io.smallrye.mutiny.Uni unsetService(context.ContextOuterClass.Service request) { - return stub.unsetService(request); + return stub.unsetService(request); } + @Override public io.smallrye.mutiny.Uni removeService(context.ContextOuterClass.ServiceId request) { - return stub.removeService(request); + return stub.removeService(request); } + @Override public io.smallrye.mutiny.Uni selectService(context.ContextOuterClass.ServiceFilter request) { - return stub.selectService(request); + return stub.selectService(request); } + @Override public io.smallrye.mutiny.Uni listSliceIds(context.ContextOuterClass.ContextId request) { - return stub.listSliceIds(request); + return stub.listSliceIds(request); } + @Override public io.smallrye.mutiny.Uni listSlices(context.ContextOuterClass.ContextId request) { - return stub.listSlices(request); + return stub.listSlices(request); } + @Override public io.smallrye.mutiny.Uni getSlice(context.ContextOuterClass.SliceId request) { - return stub.getSlice(request); + return stub.getSlice(request); } + @Override public io.smallrye.mutiny.Uni setSlice(context.ContextOuterClass.Slice request) { - return stub.setSlice(request); + return stub.setSlice(request); } + @Override public io.smallrye.mutiny.Uni unsetSlice(context.ContextOuterClass.Slice request) { - return stub.unsetSlice(request); + return stub.unsetSlice(request); } + @Override public io.smallrye.mutiny.Uni removeSlice(context.ContextOuterClass.SliceId request) { - return stub.removeSlice(request); + return stub.removeSlice(request); } + @Override public io.smallrye.mutiny.Uni selectSlice(context.ContextOuterClass.SliceFilter request) { - return stub.selectSlice(request); + return stub.selectSlice(request); } + @Override public io.smallrye.mutiny.Uni listConnectionIds(context.ContextOuterClass.ServiceId request) { - return stub.listConnectionIds(request); + return stub.listConnectionIds(request); } + @Override public io.smallrye.mutiny.Uni listConnections(context.ContextOuterClass.ServiceId request) { - return stub.listConnections(request); + return stub.listConnections(request); } + @Override public io.smallrye.mutiny.Uni getConnection(context.ContextOuterClass.ConnectionId request) { - return stub.getConnection(request); + return stub.getConnection(request); } + @Override public io.smallrye.mutiny.Uni setConnection(context.ContextOuterClass.Connection request) { - return stub.setConnection(request); + return stub.setConnection(request); } + @Override public io.smallrye.mutiny.Uni removeConnection(context.ContextOuterClass.ConnectionId request) { - return stub.removeConnection(request); + return stub.removeConnection(request); + } + + @Override + public io.smallrye.mutiny.Uni getOpticalConfig(context.ContextOuterClass.Empty request) { + return stub.getOpticalConfig(request); + } + + @Override + public io.smallrye.mutiny.Uni setOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return stub.setOpticalConfig(request); + } + + @Override + public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return stub.selectOpticalConfig(request); + } + + @Override + public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { + return stub.setOpticalLink(request); + } + + @Override + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + return stub.getOpticalLink(request); + } + + @Override + public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { + return stub.getFiber(request); } @Override public io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request) { - return stub.getContextEvents(request); + return stub.getContextEvents(request); } @Override public io.smallrye.mutiny.Multi getTopologyEvents(context.ContextOuterClass.Empty request) { - return stub.getTopologyEvents(request); + return stub.getTopologyEvents(request); } @Override public io.smallrye.mutiny.Multi getDeviceEvents(context.ContextOuterClass.Empty request) { - return stub.getDeviceEvents(request); + return stub.getDeviceEvents(request); } @Override public io.smallrye.mutiny.Multi getLinkEvents(context.ContextOuterClass.Empty request) { - return stub.getLinkEvents(request); + return stub.getLinkEvents(request); } @Override public io.smallrye.mutiny.Multi getServiceEvents(context.ContextOuterClass.Empty request) { - return stub.getServiceEvents(request); + return stub.getServiceEvents(request); } @Override public io.smallrye.mutiny.Multi getSliceEvents(context.ContextOuterClass.Empty request) { - return stub.getSliceEvents(request); + return stub.getSliceEvents(request); } @Override public io.smallrye.mutiny.Multi getConnectionEvents(context.ContextOuterClass.Empty request) { - return stub.getConnectionEvents(request); + return stub.getConnectionEvents(request); } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/context/ContextServiceGrpc.java b/src/policy/target/generated-sources/grpc/context/ContextServiceGrpc.java index 27c73f5424bcf2d6739b5884f4946ced1515398c..a03f7e9491a695b715ef6bcadcf82150bdc3a231 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/context/ContextServiceGrpc.java @@ -4,3775 +4,2577 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@javax.annotation.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.38.1)", comments = "Source: context.proto") public final class ContextServiceGrpc { - private ContextServiceGrpc() {} + private ContextServiceGrpc() { + } - public static final String SERVICE_NAME = "context.ContextService"; + public static final String SERVICE_NAME = "context.ContextService"; - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getListContextIdsMethod; + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListContextIdsMethod; - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListContextIds", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.ContextIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListContextIdsMethod() { - io.grpc.MethodDescriptor getListContextIdsMethod; - if ((getListContextIdsMethod = ContextServiceGrpc.getListContextIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListContextIds", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.ContextIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListContextIdsMethod() { + io.grpc.MethodDescriptor getListContextIdsMethod; if ((getListContextIdsMethod = ContextServiceGrpc.getListContextIdsMethod) == null) { - ContextServiceGrpc.getListContextIdsMethod = getListContextIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListContextIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListContextIds")) - .build(); - } - } - } - return getListContextIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListContextsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListContexts", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.ContextList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListContextsMethod() { - io.grpc.MethodDescriptor getListContextsMethod; - if ((getListContextsMethod = ContextServiceGrpc.getListContextsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListContextIdsMethod = ContextServiceGrpc.getListContextIdsMethod) == null) { + ContextServiceGrpc.getListContextIdsMethod = getListContextIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListContextIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListContextIds")).build(); + } + } + } + return getListContextIdsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListContextsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListContexts", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.ContextList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListContextsMethod() { + io.grpc.MethodDescriptor getListContextsMethod; if ((getListContextsMethod = ContextServiceGrpc.getListContextsMethod) == null) { - ContextServiceGrpc.getListContextsMethod = getListContextsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListContexts")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListContexts")) - .build(); - } - } - } - return getListContextsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetContextMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetContext", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.Context.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetContextMethod() { - io.grpc.MethodDescriptor getGetContextMethod; - if ((getGetContextMethod = ContextServiceGrpc.getGetContextMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListContextsMethod = ContextServiceGrpc.getListContextsMethod) == null) { + ContextServiceGrpc.getListContextsMethod = getListContextsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListContexts")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListContexts")).build(); + } + } + } + return getListContextsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetContextMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetContext", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.Context.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetContextMethod() { + io.grpc.MethodDescriptor getGetContextMethod; if ((getGetContextMethod = ContextServiceGrpc.getGetContextMethod) == null) { - ContextServiceGrpc.getGetContextMethod = getGetContextMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetContext")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Context.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetContext")) - .build(); - } - } - } - return getGetContextMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetContextMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetContext", - requestType = context.ContextOuterClass.Context.class, - responseType = context.ContextOuterClass.ContextId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetContextMethod() { - io.grpc.MethodDescriptor getSetContextMethod; - if ((getSetContextMethod = ContextServiceGrpc.getSetContextMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetContextMethod = ContextServiceGrpc.getGetContextMethod) == null) { + ContextServiceGrpc.getGetContextMethod = getGetContextMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetContext")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Context.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetContext")).build(); + } + } + } + return getGetContextMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetContextMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetContext", requestType = context.ContextOuterClass.Context.class, responseType = context.ContextOuterClass.ContextId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetContextMethod() { + io.grpc.MethodDescriptor getSetContextMethod; if ((getSetContextMethod = ContextServiceGrpc.getSetContextMethod) == null) { - ContextServiceGrpc.getSetContextMethod = getSetContextMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetContext")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Context.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetContext")) - .build(); - } - } - } - return getSetContextMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveContextMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveContext", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveContextMethod() { - io.grpc.MethodDescriptor getRemoveContextMethod; - if ((getRemoveContextMethod = ContextServiceGrpc.getRemoveContextMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getSetContextMethod = ContextServiceGrpc.getSetContextMethod) == null) { + ContextServiceGrpc.getSetContextMethod = getSetContextMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetContext")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Context.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetContext")).build(); + } + } + } + return getSetContextMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveContextMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveContext", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveContextMethod() { + io.grpc.MethodDescriptor getRemoveContextMethod; if ((getRemoveContextMethod = ContextServiceGrpc.getRemoveContextMethod) == null) { - ContextServiceGrpc.getRemoveContextMethod = getRemoveContextMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveContext")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveContext")) - .build(); - } - } - } - return getRemoveContextMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetContextEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetContextEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.ContextEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetContextEventsMethod() { - io.grpc.MethodDescriptor getGetContextEventsMethod; - if ((getGetContextEventsMethod = ContextServiceGrpc.getGetContextEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getRemoveContextMethod = ContextServiceGrpc.getRemoveContextMethod) == null) { + ContextServiceGrpc.getRemoveContextMethod = getRemoveContextMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveContext")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveContext")).build(); + } + } + } + return getRemoveContextMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetContextEventsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetContextEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.ContextEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetContextEventsMethod() { + io.grpc.MethodDescriptor getGetContextEventsMethod; if ((getGetContextEventsMethod = ContextServiceGrpc.getGetContextEventsMethod) == null) { - ContextServiceGrpc.getGetContextEventsMethod = getGetContextEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetContextEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetContextEvents")) - .build(); - } - } - } - return getGetContextEventsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListTopologyIdsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListTopologyIds", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.TopologyIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListTopologyIdsMethod() { - io.grpc.MethodDescriptor getListTopologyIdsMethod; - if ((getListTopologyIdsMethod = ContextServiceGrpc.getListTopologyIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetContextEventsMethod = ContextServiceGrpc.getGetContextEventsMethod) == null) { + ContextServiceGrpc.getGetContextEventsMethod = getGetContextEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetContextEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetContextEvents")).build(); + } + } + } + return getGetContextEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListTopologyIdsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListTopologyIds", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.TopologyIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListTopologyIdsMethod() { + io.grpc.MethodDescriptor getListTopologyIdsMethod; if ((getListTopologyIdsMethod = ContextServiceGrpc.getListTopologyIdsMethod) == null) { - ContextServiceGrpc.getListTopologyIdsMethod = getListTopologyIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopologyIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListTopologyIds")) - .build(); - } - } - } - return getListTopologyIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListTopologiesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListTopologies", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.TopologyList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListTopologiesMethod() { - io.grpc.MethodDescriptor getListTopologiesMethod; - if ((getListTopologiesMethod = ContextServiceGrpc.getListTopologiesMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListTopologyIdsMethod = ContextServiceGrpc.getListTopologyIdsMethod) == null) { + ContextServiceGrpc.getListTopologyIdsMethod = getListTopologyIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopologyIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListTopologyIds")).build(); + } + } + } + return getListTopologyIdsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListTopologiesMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListTopologies", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.TopologyList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListTopologiesMethod() { + io.grpc.MethodDescriptor getListTopologiesMethod; if ((getListTopologiesMethod = ContextServiceGrpc.getListTopologiesMethod) == null) { - ContextServiceGrpc.getListTopologiesMethod = getListTopologiesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopologies")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListTopologies")) - .build(); - } - } - } - return getListTopologiesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetTopologyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetTopology", - requestType = context.ContextOuterClass.TopologyId.class, - responseType = context.ContextOuterClass.Topology.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetTopologyMethod() { - io.grpc.MethodDescriptor getGetTopologyMethod; - if ((getGetTopologyMethod = ContextServiceGrpc.getGetTopologyMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListTopologiesMethod = ContextServiceGrpc.getListTopologiesMethod) == null) { + ContextServiceGrpc.getListTopologiesMethod = getListTopologiesMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopologies")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListTopologies")).build(); + } + } + } + return getListTopologiesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTopologyMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetTopology", requestType = context.ContextOuterClass.TopologyId.class, responseType = context.ContextOuterClass.Topology.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTopologyMethod() { + io.grpc.MethodDescriptor getGetTopologyMethod; if ((getGetTopologyMethod = ContextServiceGrpc.getGetTopologyMethod) == null) { - ContextServiceGrpc.getGetTopologyMethod = getGetTopologyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopology")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Topology.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetTopology")) - .build(); - } - } - } - return getGetTopologyMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetTopologyDetailsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetTopologyDetails", - requestType = context.ContextOuterClass.TopologyId.class, - responseType = context.ContextOuterClass.TopologyDetails.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetTopologyDetailsMethod() { - io.grpc.MethodDescriptor getGetTopologyDetailsMethod; - if ((getGetTopologyDetailsMethod = ContextServiceGrpc.getGetTopologyDetailsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetTopologyMethod = ContextServiceGrpc.getGetTopologyMethod) == null) { + ContextServiceGrpc.getGetTopologyMethod = getGetTopologyMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopology")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Topology.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetTopology")).build(); + } + } + } + return getGetTopologyMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTopologyDetailsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetTopologyDetails", requestType = context.ContextOuterClass.TopologyId.class, responseType = context.ContextOuterClass.TopologyDetails.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTopologyDetailsMethod() { + io.grpc.MethodDescriptor getGetTopologyDetailsMethod; if ((getGetTopologyDetailsMethod = ContextServiceGrpc.getGetTopologyDetailsMethod) == null) { - ContextServiceGrpc.getGetTopologyDetailsMethod = getGetTopologyDetailsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopologyDetails")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyDetails.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetTopologyDetails")) - .build(); - } - } - } - return getGetTopologyDetailsMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetTopologyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetTopology", - requestType = context.ContextOuterClass.Topology.class, - responseType = context.ContextOuterClass.TopologyId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetTopologyMethod() { - io.grpc.MethodDescriptor getSetTopologyMethod; - if ((getSetTopologyMethod = ContextServiceGrpc.getSetTopologyMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetTopologyDetailsMethod = ContextServiceGrpc.getGetTopologyDetailsMethod) == null) { + ContextServiceGrpc.getGetTopologyDetailsMethod = getGetTopologyDetailsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopologyDetails")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyDetails.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetTopologyDetails")).build(); + } + } + } + return getGetTopologyDetailsMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetTopologyMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetTopology", requestType = context.ContextOuterClass.Topology.class, responseType = context.ContextOuterClass.TopologyId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetTopologyMethod() { + io.grpc.MethodDescriptor getSetTopologyMethod; if ((getSetTopologyMethod = ContextServiceGrpc.getSetTopologyMethod) == null) { - ContextServiceGrpc.getSetTopologyMethod = getSetTopologyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetTopology")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Topology.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetTopology")) - .build(); - } - } - } - return getSetTopologyMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveTopologyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveTopology", - requestType = context.ContextOuterClass.TopologyId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveTopologyMethod() { - io.grpc.MethodDescriptor getRemoveTopologyMethod; - if ((getRemoveTopologyMethod = ContextServiceGrpc.getRemoveTopologyMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getSetTopologyMethod = ContextServiceGrpc.getSetTopologyMethod) == null) { + ContextServiceGrpc.getSetTopologyMethod = getSetTopologyMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetTopology")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Topology.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetTopology")).build(); + } + } + } + return getSetTopologyMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveTopologyMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveTopology", requestType = context.ContextOuterClass.TopologyId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveTopologyMethod() { + io.grpc.MethodDescriptor getRemoveTopologyMethod; if ((getRemoveTopologyMethod = ContextServiceGrpc.getRemoveTopologyMethod) == null) { - ContextServiceGrpc.getRemoveTopologyMethod = getRemoveTopologyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveTopology")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveTopology")) - .build(); - } - } - } - return getRemoveTopologyMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetTopologyEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetTopologyEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.TopologyEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetTopologyEventsMethod() { - io.grpc.MethodDescriptor getGetTopologyEventsMethod; - if ((getGetTopologyEventsMethod = ContextServiceGrpc.getGetTopologyEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getRemoveTopologyMethod = ContextServiceGrpc.getRemoveTopologyMethod) == null) { + ContextServiceGrpc.getRemoveTopologyMethod = getRemoveTopologyMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveTopology")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveTopology")).build(); + } + } + } + return getRemoveTopologyMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTopologyEventsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetTopologyEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.TopologyEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetTopologyEventsMethod() { + io.grpc.MethodDescriptor getGetTopologyEventsMethod; if ((getGetTopologyEventsMethod = ContextServiceGrpc.getGetTopologyEventsMethod) == null) { - ContextServiceGrpc.getGetTopologyEventsMethod = getGetTopologyEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopologyEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetTopologyEvents")) - .build(); - } - } - } - return getGetTopologyEventsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListDeviceIdsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListDeviceIds", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.DeviceIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListDeviceIdsMethod() { - io.grpc.MethodDescriptor getListDeviceIdsMethod; - if ((getListDeviceIdsMethod = ContextServiceGrpc.getListDeviceIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetTopologyEventsMethod = ContextServiceGrpc.getGetTopologyEventsMethod) == null) { + ContextServiceGrpc.getGetTopologyEventsMethod = getGetTopologyEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopologyEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetTopologyEvents")).build(); + } + } + } + return getGetTopologyEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListDeviceIdsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListDeviceIds", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.DeviceIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListDeviceIdsMethod() { + io.grpc.MethodDescriptor getListDeviceIdsMethod; if ((getListDeviceIdsMethod = ContextServiceGrpc.getListDeviceIdsMethod) == null) { - ContextServiceGrpc.getListDeviceIdsMethod = getListDeviceIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDeviceIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListDeviceIds")) - .build(); - } - } - } - return getListDeviceIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListDevicesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListDevices", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.DeviceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListDevicesMethod() { - io.grpc.MethodDescriptor getListDevicesMethod; - if ((getListDevicesMethod = ContextServiceGrpc.getListDevicesMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListDeviceIdsMethod = ContextServiceGrpc.getListDeviceIdsMethod) == null) { + ContextServiceGrpc.getListDeviceIdsMethod = getListDeviceIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDeviceIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListDeviceIds")).build(); + } + } + } + return getListDeviceIdsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListDevicesMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListDevices", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.DeviceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListDevicesMethod() { + io.grpc.MethodDescriptor getListDevicesMethod; if ((getListDevicesMethod = ContextServiceGrpc.getListDevicesMethod) == null) { - ContextServiceGrpc.getListDevicesMethod = getListDevicesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDevices")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListDevices")) - .build(); - } - } - } - return getListDevicesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetDevice", - requestType = context.ContextOuterClass.DeviceId.class, - responseType = context.ContextOuterClass.Device.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetDeviceMethod() { - io.grpc.MethodDescriptor getGetDeviceMethod; - if ((getGetDeviceMethod = ContextServiceGrpc.getGetDeviceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListDevicesMethod = ContextServiceGrpc.getListDevicesMethod) == null) { + ContextServiceGrpc.getListDevicesMethod = getListDevicesMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDevices")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListDevices")).build(); + } + } + } + return getListDevicesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetDevice", requestType = context.ContextOuterClass.DeviceId.class, responseType = context.ContextOuterClass.Device.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetDeviceMethod() { + io.grpc.MethodDescriptor getGetDeviceMethod; if ((getGetDeviceMethod = ContextServiceGrpc.getGetDeviceMethod) == null) { - ContextServiceGrpc.getGetDeviceMethod = getGetDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Device.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetDevice")) - .build(); - } - } - } - return getGetDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetDevice", - requestType = context.ContextOuterClass.Device.class, - responseType = context.ContextOuterClass.DeviceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetDeviceMethod() { - io.grpc.MethodDescriptor getSetDeviceMethod; - if ((getSetDeviceMethod = ContextServiceGrpc.getSetDeviceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetDeviceMethod = ContextServiceGrpc.getGetDeviceMethod) == null) { + ContextServiceGrpc.getGetDeviceMethod = getGetDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Device.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetDevice")).build(); + } + } + } + return getGetDeviceMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetDevice", requestType = context.ContextOuterClass.Device.class, responseType = context.ContextOuterClass.DeviceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetDeviceMethod() { + io.grpc.MethodDescriptor getSetDeviceMethod; if ((getSetDeviceMethod = ContextServiceGrpc.getSetDeviceMethod) == null) { - ContextServiceGrpc.getSetDeviceMethod = getSetDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Device.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetDevice")) - .build(); - } - } - } - return getSetDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveDevice", - requestType = context.ContextOuterClass.DeviceId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveDeviceMethod() { - io.grpc.MethodDescriptor getRemoveDeviceMethod; - if ((getRemoveDeviceMethod = ContextServiceGrpc.getRemoveDeviceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getSetDeviceMethod = ContextServiceGrpc.getSetDeviceMethod) == null) { + ContextServiceGrpc.getSetDeviceMethod = getSetDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Device.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetDevice")).build(); + } + } + } + return getSetDeviceMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveDevice", requestType = context.ContextOuterClass.DeviceId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveDeviceMethod() { + io.grpc.MethodDescriptor getRemoveDeviceMethod; if ((getRemoveDeviceMethod = ContextServiceGrpc.getRemoveDeviceMethod) == null) { - ContextServiceGrpc.getRemoveDeviceMethod = getRemoveDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveDevice")) - .build(); - } - } - } - return getRemoveDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetDeviceEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetDeviceEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.DeviceEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetDeviceEventsMethod() { - io.grpc.MethodDescriptor getGetDeviceEventsMethod; - if ((getGetDeviceEventsMethod = ContextServiceGrpc.getGetDeviceEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getRemoveDeviceMethod = ContextServiceGrpc.getRemoveDeviceMethod) == null) { + ContextServiceGrpc.getRemoveDeviceMethod = getRemoveDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveDevice")).build(); + } + } + } + return getRemoveDeviceMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetDeviceEventsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetDeviceEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.DeviceEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetDeviceEventsMethod() { + io.grpc.MethodDescriptor getGetDeviceEventsMethod; if ((getGetDeviceEventsMethod = ContextServiceGrpc.getGetDeviceEventsMethod) == null) { - ContextServiceGrpc.getGetDeviceEventsMethod = getGetDeviceEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDeviceEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetDeviceEvents")) - .build(); - } - } - } - return getGetDeviceEventsMethod; - } - - private static volatile io.grpc.MethodDescriptor getSelectDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SelectDevice", - requestType = context.ContextOuterClass.DeviceFilter.class, - responseType = context.ContextOuterClass.DeviceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSelectDeviceMethod() { - io.grpc.MethodDescriptor getSelectDeviceMethod; - if ((getSelectDeviceMethod = ContextServiceGrpc.getSelectDeviceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetDeviceEventsMethod = ContextServiceGrpc.getGetDeviceEventsMethod) == null) { + ContextServiceGrpc.getGetDeviceEventsMethod = getGetDeviceEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDeviceEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetDeviceEvents")).build(); + } + } + } + return getGetDeviceEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor getSelectDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SelectDevice", requestType = context.ContextOuterClass.DeviceFilter.class, responseType = context.ContextOuterClass.DeviceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSelectDeviceMethod() { + io.grpc.MethodDescriptor getSelectDeviceMethod; if ((getSelectDeviceMethod = ContextServiceGrpc.getSelectDeviceMethod) == null) { - ContextServiceGrpc.getSelectDeviceMethod = getSelectDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceFilter.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectDevice")) - .build(); - } - } - } - return getSelectDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getListEndPointNamesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListEndPointNames", - requestType = context.ContextOuterClass.EndPointIdList.class, - responseType = context.ContextOuterClass.EndPointNameList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListEndPointNamesMethod() { - io.grpc.MethodDescriptor getListEndPointNamesMethod; - if ((getListEndPointNamesMethod = ContextServiceGrpc.getListEndPointNamesMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getSelectDeviceMethod = ContextServiceGrpc.getSelectDeviceMethod) == null) { + ContextServiceGrpc.getSelectDeviceMethod = getSelectDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceFilter.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectDevice")).build(); + } + } + } + return getSelectDeviceMethod; + } + + private static volatile io.grpc.MethodDescriptor getListEndPointNamesMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListEndPointNames", requestType = context.ContextOuterClass.EndPointIdList.class, responseType = context.ContextOuterClass.EndPointNameList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListEndPointNamesMethod() { + io.grpc.MethodDescriptor getListEndPointNamesMethod; if ((getListEndPointNamesMethod = ContextServiceGrpc.getListEndPointNamesMethod) == null) { - ContextServiceGrpc.getListEndPointNamesMethod = getListEndPointNamesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEndPointNames")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.EndPointIdList.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.EndPointNameList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListEndPointNames")) - .build(); - } - } - } - return getListEndPointNamesMethod; - } - - private static volatile io.grpc.MethodDescriptor getListLinkIdsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListLinkIds", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.LinkIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListLinkIdsMethod() { - io.grpc.MethodDescriptor getListLinkIdsMethod; - if ((getListLinkIdsMethod = ContextServiceGrpc.getListLinkIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListEndPointNamesMethod = ContextServiceGrpc.getListEndPointNamesMethod) == null) { + ContextServiceGrpc.getListEndPointNamesMethod = getListEndPointNamesMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEndPointNames")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.EndPointIdList.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.EndPointNameList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListEndPointNames")).build(); + } + } + } + return getListEndPointNamesMethod; + } + + private static volatile io.grpc.MethodDescriptor getListLinkIdsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListLinkIds", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.LinkIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListLinkIdsMethod() { + io.grpc.MethodDescriptor getListLinkIdsMethod; if ((getListLinkIdsMethod = ContextServiceGrpc.getListLinkIdsMethod) == null) { - ContextServiceGrpc.getListLinkIdsMethod = getListLinkIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLinkIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.LinkIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListLinkIds")) - .build(); - } - } - } - return getListLinkIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListLinksMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListLinks", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.LinkList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListLinksMethod() { - io.grpc.MethodDescriptor getListLinksMethod; - if ((getListLinksMethod = ContextServiceGrpc.getListLinksMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListLinkIdsMethod = ContextServiceGrpc.getListLinkIdsMethod) == null) { + ContextServiceGrpc.getListLinkIdsMethod = getListLinkIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLinkIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListLinkIds")).build(); + } + } + } + return getListLinkIdsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListLinksMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListLinks", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.LinkList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListLinksMethod() { + io.grpc.MethodDescriptor getListLinksMethod; if ((getListLinksMethod = ContextServiceGrpc.getListLinksMethod) == null) { - ContextServiceGrpc.getListLinksMethod = getListLinksMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLinks")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.LinkList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListLinks")) - .build(); - } - } - } - return getListLinksMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetLinkMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetLink", - requestType = context.ContextOuterClass.LinkId.class, - responseType = context.ContextOuterClass.Link.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetLinkMethod() { - io.grpc.MethodDescriptor getGetLinkMethod; - if ((getGetLinkMethod = ContextServiceGrpc.getGetLinkMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListLinksMethod = ContextServiceGrpc.getListLinksMethod) == null) { + ContextServiceGrpc.getListLinksMethod = getListLinksMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLinks")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListLinks")).build(); + } + } + } + return getListLinksMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetLinkMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetLink", requestType = context.ContextOuterClass.LinkId.class, responseType = context.ContextOuterClass.Link.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetLinkMethod() { + io.grpc.MethodDescriptor getGetLinkMethod; if ((getGetLinkMethod = ContextServiceGrpc.getGetLinkMethod) == null) { - ContextServiceGrpc.getGetLinkMethod = getGetLinkMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLink")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.LinkId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Link.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetLink")) - .build(); - } - } - } - return getGetLinkMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetLinkMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetLink", - requestType = context.ContextOuterClass.Link.class, - responseType = context.ContextOuterClass.LinkId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetLinkMethod() { - io.grpc.MethodDescriptor getSetLinkMethod; - if ((getSetLinkMethod = ContextServiceGrpc.getSetLinkMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetLinkMethod = ContextServiceGrpc.getGetLinkMethod) == null) { + ContextServiceGrpc.getGetLinkMethod = getGetLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Link.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetLink")).build(); + } + } + } + return getGetLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetLinkMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetLink", requestType = context.ContextOuterClass.Link.class, responseType = context.ContextOuterClass.LinkId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetLinkMethod() { + io.grpc.MethodDescriptor getSetLinkMethod; if ((getSetLinkMethod = ContextServiceGrpc.getSetLinkMethod) == null) { - ContextServiceGrpc.getSetLinkMethod = getSetLinkMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetLink")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Link.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.LinkId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetLink")) - .build(); - } - } - } - return getSetLinkMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveLinkMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveLink", - requestType = context.ContextOuterClass.LinkId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveLinkMethod() { - io.grpc.MethodDescriptor getRemoveLinkMethod; - if ((getRemoveLinkMethod = ContextServiceGrpc.getRemoveLinkMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getSetLinkMethod = ContextServiceGrpc.getSetLinkMethod) == null) { + ContextServiceGrpc.getSetLinkMethod = getSetLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Link.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetLink")).build(); + } + } + } + return getSetLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveLinkMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveLink", requestType = context.ContextOuterClass.LinkId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveLinkMethod() { + io.grpc.MethodDescriptor getRemoveLinkMethod; if ((getRemoveLinkMethod = ContextServiceGrpc.getRemoveLinkMethod) == null) { - ContextServiceGrpc.getRemoveLinkMethod = getRemoveLinkMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveLink")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.LinkId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveLink")) - .build(); - } - } - } - return getRemoveLinkMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetLinkEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetLinkEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.LinkEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetLinkEventsMethod() { - io.grpc.MethodDescriptor getGetLinkEventsMethod; - if ((getGetLinkEventsMethod = ContextServiceGrpc.getGetLinkEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getRemoveLinkMethod = ContextServiceGrpc.getRemoveLinkMethod) == null) { + ContextServiceGrpc.getRemoveLinkMethod = getRemoveLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveLink")).build(); + } + } + } + return getRemoveLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetLinkEventsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetLinkEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.LinkEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetLinkEventsMethod() { + io.grpc.MethodDescriptor getGetLinkEventsMethod; if ((getGetLinkEventsMethod = ContextServiceGrpc.getGetLinkEventsMethod) == null) { - ContextServiceGrpc.getGetLinkEventsMethod = getGetLinkEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLinkEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.LinkEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetLinkEvents")) - .build(); - } - } - } - return getGetLinkEventsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListServiceIdsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListServiceIds", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.ServiceIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListServiceIdsMethod() { - io.grpc.MethodDescriptor getListServiceIdsMethod; - if ((getListServiceIdsMethod = ContextServiceGrpc.getListServiceIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetLinkEventsMethod = ContextServiceGrpc.getGetLinkEventsMethod) == null) { + ContextServiceGrpc.getGetLinkEventsMethod = getGetLinkEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLinkEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetLinkEvents")).build(); + } + } + } + return getGetLinkEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListServiceIdsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListServiceIds", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.ServiceIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListServiceIdsMethod() { + io.grpc.MethodDescriptor getListServiceIdsMethod; if ((getListServiceIdsMethod = ContextServiceGrpc.getListServiceIdsMethod) == null) { - ContextServiceGrpc.getListServiceIdsMethod = getListServiceIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServiceIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListServiceIds")) - .build(); - } - } - } - return getListServiceIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListServicesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListServices", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.ServiceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListServicesMethod() { - io.grpc.MethodDescriptor getListServicesMethod; - if ((getListServicesMethod = ContextServiceGrpc.getListServicesMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListServiceIdsMethod = ContextServiceGrpc.getListServiceIdsMethod) == null) { + ContextServiceGrpc.getListServiceIdsMethod = getListServiceIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServiceIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListServiceIds")).build(); + } + } + } + return getListServiceIdsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListServicesMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListServices", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.ServiceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListServicesMethod() { + io.grpc.MethodDescriptor getListServicesMethod; if ((getListServicesMethod = ContextServiceGrpc.getListServicesMethod) == null) { - ContextServiceGrpc.getListServicesMethod = getListServicesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListServices")) - .build(); - } - } - } - return getListServicesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetService", - requestType = context.ContextOuterClass.ServiceId.class, - responseType = context.ContextOuterClass.Service.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetServiceMethod() { - io.grpc.MethodDescriptor getGetServiceMethod; - if ((getGetServiceMethod = ContextServiceGrpc.getGetServiceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListServicesMethod = ContextServiceGrpc.getListServicesMethod) == null) { + ContextServiceGrpc.getListServicesMethod = getListServicesMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListServices")).build(); + } + } + } + return getListServicesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetService", requestType = context.ContextOuterClass.ServiceId.class, responseType = context.ContextOuterClass.Service.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetServiceMethod() { + io.grpc.MethodDescriptor getGetServiceMethod; if ((getGetServiceMethod = ContextServiceGrpc.getGetServiceMethod) == null) { - ContextServiceGrpc.getGetServiceMethod = getGetServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Service.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetService")) - .build(); - } - } - } - return getGetServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetService", - requestType = context.ContextOuterClass.Service.class, - responseType = context.ContextOuterClass.ServiceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetServiceMethod() { - io.grpc.MethodDescriptor getSetServiceMethod; - if ((getSetServiceMethod = ContextServiceGrpc.getSetServiceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetServiceMethod = ContextServiceGrpc.getGetServiceMethod) == null) { + ContextServiceGrpc.getGetServiceMethod = getGetServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Service.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetService")).build(); + } + } + } + return getGetServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetService", requestType = context.ContextOuterClass.Service.class, responseType = context.ContextOuterClass.ServiceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetServiceMethod() { + io.grpc.MethodDescriptor getSetServiceMethod; if ((getSetServiceMethod = ContextServiceGrpc.getSetServiceMethod) == null) { - ContextServiceGrpc.getSetServiceMethod = getSetServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Service.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetService")) - .build(); - } - } - } - return getSetServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getUnsetServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UnsetService", - requestType = context.ContextOuterClass.Service.class, - responseType = context.ContextOuterClass.ServiceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUnsetServiceMethod() { - io.grpc.MethodDescriptor getUnsetServiceMethod; - if ((getUnsetServiceMethod = ContextServiceGrpc.getUnsetServiceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getSetServiceMethod = ContextServiceGrpc.getSetServiceMethod) == null) { + ContextServiceGrpc.getSetServiceMethod = getSetServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Service.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetService")).build(); + } + } + } + return getSetServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getUnsetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "UnsetService", requestType = context.ContextOuterClass.Service.class, responseType = context.ContextOuterClass.ServiceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnsetServiceMethod() { + io.grpc.MethodDescriptor getUnsetServiceMethod; if ((getUnsetServiceMethod = ContextServiceGrpc.getUnsetServiceMethod) == null) { - ContextServiceGrpc.getUnsetServiceMethod = getUnsetServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnsetService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Service.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("UnsetService")) - .build(); - } - } - } - return getUnsetServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveService", - requestType = context.ContextOuterClass.ServiceId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveServiceMethod() { - io.grpc.MethodDescriptor getRemoveServiceMethod; - if ((getRemoveServiceMethod = ContextServiceGrpc.getRemoveServiceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getUnsetServiceMethod = ContextServiceGrpc.getUnsetServiceMethod) == null) { + ContextServiceGrpc.getUnsetServiceMethod = getUnsetServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnsetService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Service.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("UnsetService")).build(); + } + } + } + return getUnsetServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveService", requestType = context.ContextOuterClass.ServiceId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveServiceMethod() { + io.grpc.MethodDescriptor getRemoveServiceMethod; if ((getRemoveServiceMethod = ContextServiceGrpc.getRemoveServiceMethod) == null) { - ContextServiceGrpc.getRemoveServiceMethod = getRemoveServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveService")) - .build(); - } - } - } - return getRemoveServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetServiceEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetServiceEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.ServiceEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetServiceEventsMethod() { - io.grpc.MethodDescriptor getGetServiceEventsMethod; - if ((getGetServiceEventsMethod = ContextServiceGrpc.getGetServiceEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getGetServiceEventsMethod = ContextServiceGrpc.getGetServiceEventsMethod) == null) { - ContextServiceGrpc.getGetServiceEventsMethod = getGetServiceEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetServiceEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetServiceEvents")) - .build(); - } - } - } - return getGetServiceEventsMethod; - } - - private static volatile io.grpc.MethodDescriptor getSelectServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SelectService", - requestType = context.ContextOuterClass.ServiceFilter.class, - responseType = context.ContextOuterClass.ServiceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSelectServiceMethod() { - io.grpc.MethodDescriptor getSelectServiceMethod; - if ((getSelectServiceMethod = ContextServiceGrpc.getSelectServiceMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getSelectServiceMethod = ContextServiceGrpc.getSelectServiceMethod) == null) { - ContextServiceGrpc.getSelectServiceMethod = getSelectServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceFilter.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectService")) - .build(); - } - } - } - return getSelectServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getListSliceIdsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListSliceIds", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.SliceIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListSliceIdsMethod() { - io.grpc.MethodDescriptor getListSliceIdsMethod; - if ((getListSliceIdsMethod = ContextServiceGrpc.getListSliceIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getListSliceIdsMethod = ContextServiceGrpc.getListSliceIdsMethod) == null) { - ContextServiceGrpc.getListSliceIdsMethod = getListSliceIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSliceIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListSliceIds")) - .build(); - } - } - } - return getListSliceIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListSlicesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListSlices", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.SliceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListSlicesMethod() { - io.grpc.MethodDescriptor getListSlicesMethod; - if ((getListSlicesMethod = ContextServiceGrpc.getListSlicesMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getListSlicesMethod = ContextServiceGrpc.getListSlicesMethod) == null) { - ContextServiceGrpc.getListSlicesMethod = getListSlicesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSlices")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListSlices")) - .build(); - } - } - } - return getListSlicesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetSliceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSlice", - requestType = context.ContextOuterClass.SliceId.class, - responseType = context.ContextOuterClass.Slice.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetSliceMethod() { - io.grpc.MethodDescriptor getGetSliceMethod; - if ((getGetSliceMethod = ContextServiceGrpc.getGetSliceMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getGetSliceMethod = ContextServiceGrpc.getGetSliceMethod) == null) { - ContextServiceGrpc.getGetSliceMethod = getGetSliceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSlice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Slice.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetSlice")) - .build(); - } - } - } - return getGetSliceMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetSliceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetSlice", - requestType = context.ContextOuterClass.Slice.class, - responseType = context.ContextOuterClass.SliceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetSliceMethod() { - io.grpc.MethodDescriptor getSetSliceMethod; - if ((getSetSliceMethod = ContextServiceGrpc.getSetSliceMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getSetSliceMethod = ContextServiceGrpc.getSetSliceMethod) == null) { - ContextServiceGrpc.getSetSliceMethod = getSetSliceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetSlice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Slice.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetSlice")) - .build(); - } - } - } - return getSetSliceMethod; - } - - private static volatile io.grpc.MethodDescriptor getUnsetSliceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UnsetSlice", - requestType = context.ContextOuterClass.Slice.class, - responseType = context.ContextOuterClass.SliceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUnsetSliceMethod() { - io.grpc.MethodDescriptor getUnsetSliceMethod; - if ((getUnsetSliceMethod = ContextServiceGrpc.getUnsetSliceMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getUnsetSliceMethod = ContextServiceGrpc.getUnsetSliceMethod) == null) { - ContextServiceGrpc.getUnsetSliceMethod = getUnsetSliceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnsetSlice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Slice.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("UnsetSlice")) - .build(); - } - } - } - return getUnsetSliceMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveSliceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveSlice", - requestType = context.ContextOuterClass.SliceId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveSliceMethod() { - io.grpc.MethodDescriptor getRemoveSliceMethod; - if ((getRemoveSliceMethod = ContextServiceGrpc.getRemoveSliceMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getRemoveSliceMethod = ContextServiceGrpc.getRemoveSliceMethod) == null) { - ContextServiceGrpc.getRemoveSliceMethod = getRemoveSliceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveSlice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveSlice")) - .build(); - } - } - } - return getRemoveSliceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetSliceEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSliceEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.SliceEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetSliceEventsMethod() { - io.grpc.MethodDescriptor getGetSliceEventsMethod; - if ((getGetSliceEventsMethod = ContextServiceGrpc.getGetSliceEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getGetSliceEventsMethod = ContextServiceGrpc.getGetSliceEventsMethod) == null) { - ContextServiceGrpc.getGetSliceEventsMethod = getGetSliceEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSliceEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetSliceEvents")) - .build(); - } - } - } - return getGetSliceEventsMethod; - } - - private static volatile io.grpc.MethodDescriptor getSelectSliceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SelectSlice", - requestType = context.ContextOuterClass.SliceFilter.class, - responseType = context.ContextOuterClass.SliceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSelectSliceMethod() { - io.grpc.MethodDescriptor getSelectSliceMethod; - if ((getSelectSliceMethod = ContextServiceGrpc.getSelectSliceMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getSelectSliceMethod = ContextServiceGrpc.getSelectSliceMethod) == null) { - ContextServiceGrpc.getSelectSliceMethod = getSelectSliceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectSlice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceFilter.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectSlice")) - .build(); - } - } - } - return getSelectSliceMethod; - } - - private static volatile io.grpc.MethodDescriptor getListConnectionIdsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListConnectionIds", - requestType = context.ContextOuterClass.ServiceId.class, - responseType = context.ContextOuterClass.ConnectionIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListConnectionIdsMethod() { - io.grpc.MethodDescriptor getListConnectionIdsMethod; - if ((getListConnectionIdsMethod = ContextServiceGrpc.getListConnectionIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getListConnectionIdsMethod = ContextServiceGrpc.getListConnectionIdsMethod) == null) { - ContextServiceGrpc.getListConnectionIdsMethod = getListConnectionIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListConnectionIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ConnectionIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListConnectionIds")) - .build(); - } - } - } - return getListConnectionIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListConnectionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListConnections", - requestType = context.ContextOuterClass.ServiceId.class, - responseType = context.ContextOuterClass.ConnectionList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListConnectionsMethod() { - io.grpc.MethodDescriptor getListConnectionsMethod; - if ((getListConnectionsMethod = ContextServiceGrpc.getListConnectionsMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getListConnectionsMethod = ContextServiceGrpc.getListConnectionsMethod) == null) { - ContextServiceGrpc.getListConnectionsMethod = getListConnectionsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListConnections")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ConnectionList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListConnections")) - .build(); - } - } - } - return getListConnectionsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetConnectionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetConnection", - requestType = context.ContextOuterClass.ConnectionId.class, - responseType = context.ContextOuterClass.Connection.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetConnectionMethod() { - io.grpc.MethodDescriptor getGetConnectionMethod; - if ((getGetConnectionMethod = ContextServiceGrpc.getGetConnectionMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getGetConnectionMethod = ContextServiceGrpc.getGetConnectionMethod) == null) { - ContextServiceGrpc.getGetConnectionMethod = getGetConnectionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConnection")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ConnectionId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Connection.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetConnection")) - .build(); - } - } - } - return getGetConnectionMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetConnectionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetConnection", - requestType = context.ContextOuterClass.Connection.class, - responseType = context.ContextOuterClass.ConnectionId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetConnectionMethod() { - io.grpc.MethodDescriptor getSetConnectionMethod; - if ((getSetConnectionMethod = ContextServiceGrpc.getSetConnectionMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getSetConnectionMethod = ContextServiceGrpc.getSetConnectionMethod) == null) { - ContextServiceGrpc.getSetConnectionMethod = getSetConnectionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetConnection")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Connection.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ConnectionId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetConnection")) - .build(); - } - } - } - return getSetConnectionMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveConnectionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveConnection", - requestType = context.ContextOuterClass.ConnectionId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveConnectionMethod() { - io.grpc.MethodDescriptor getRemoveConnectionMethod; - if ((getRemoveConnectionMethod = ContextServiceGrpc.getRemoveConnectionMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getRemoveConnectionMethod = ContextServiceGrpc.getRemoveConnectionMethod) == null) { - ContextServiceGrpc.getRemoveConnectionMethod = getRemoveConnectionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveConnection")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ConnectionId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveConnection")) - .build(); - } - } - } - return getRemoveConnectionMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetConnectionEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetConnectionEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.ConnectionEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetConnectionEventsMethod() { - io.grpc.MethodDescriptor getGetConnectionEventsMethod; - if ((getGetConnectionEventsMethod = ContextServiceGrpc.getGetConnectionEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getGetConnectionEventsMethod = ContextServiceGrpc.getGetConnectionEventsMethod) == null) { - ContextServiceGrpc.getGetConnectionEventsMethod = getGetConnectionEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConnectionEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ConnectionEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetConnectionEvents")) - .build(); - } - } - } - return getGetConnectionEventsMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ContextServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ContextServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextServiceStub(channel, callOptions); - } - }; - return ContextServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ContextServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ContextServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextServiceBlockingStub(channel, callOptions); - } - }; - return ContextServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ContextServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ContextServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextServiceFutureStub(channel, callOptions); + synchronized (ContextServiceGrpc.class) { + if ((getRemoveServiceMethod = ContextServiceGrpc.getRemoveServiceMethod) == null) { + ContextServiceGrpc.getRemoveServiceMethod = getRemoveServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveService")).build(); + } + } } - }; - return ContextServiceFutureStub.newStub(factory, channel); - } + return getRemoveServiceMethod; + } - /** - */ - public static abstract class ContextServiceImplBase implements io.grpc.BindableService { + private static volatile io.grpc.MethodDescriptor getGetServiceEventsMethod; - /** - */ - public void listContextIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListContextIdsMethod(), responseObserver); + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetServiceEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.ServiceEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetServiceEventsMethod() { + io.grpc.MethodDescriptor getGetServiceEventsMethod; + if ((getGetServiceEventsMethod = ContextServiceGrpc.getGetServiceEventsMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetServiceEventsMethod = ContextServiceGrpc.getGetServiceEventsMethod) == null) { + ContextServiceGrpc.getGetServiceEventsMethod = getGetServiceEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetServiceEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetServiceEvents")).build(); + } + } + } + return getGetServiceEventsMethod; } - /** - */ - public void listContexts(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListContextsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSelectServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SelectService", requestType = context.ContextOuterClass.ServiceFilter.class, responseType = context.ContextOuterClass.ServiceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSelectServiceMethod() { + io.grpc.MethodDescriptor getSelectServiceMethod; + if ((getSelectServiceMethod = ContextServiceGrpc.getSelectServiceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSelectServiceMethod = ContextServiceGrpc.getSelectServiceMethod) == null) { + ContextServiceGrpc.getSelectServiceMethod = getSelectServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceFilter.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectService")).build(); + } + } + } + return getSelectServiceMethod; } - /** - */ - public void getContext(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getListSliceIdsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListSliceIds", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.SliceIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListSliceIdsMethod() { + io.grpc.MethodDescriptor getListSliceIdsMethod; + if ((getListSliceIdsMethod = ContextServiceGrpc.getListSliceIdsMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getListSliceIdsMethod = ContextServiceGrpc.getListSliceIdsMethod) == null) { + ContextServiceGrpc.getListSliceIdsMethod = getListSliceIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSliceIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListSliceIds")).build(); + } + } + } + return getListSliceIdsMethod; } - /** - */ - public void setContext(context.ContextOuterClass.Context request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetContextMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getListSlicesMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListSlices", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.SliceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListSlicesMethod() { + io.grpc.MethodDescriptor getListSlicesMethod; + if ((getListSlicesMethod = ContextServiceGrpc.getListSlicesMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getListSlicesMethod = ContextServiceGrpc.getListSlicesMethod) == null) { + ContextServiceGrpc.getListSlicesMethod = getListSlicesMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSlices")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListSlices")).build(); + } + } + } + return getListSlicesMethod; } - /** - */ - public void removeContext(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveContextMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetSliceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetSlice", requestType = context.ContextOuterClass.SliceId.class, responseType = context.ContextOuterClass.Slice.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetSliceMethod() { + io.grpc.MethodDescriptor getGetSliceMethod; + if ((getGetSliceMethod = ContextServiceGrpc.getGetSliceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetSliceMethod = ContextServiceGrpc.getGetSliceMethod) == null) { + ContextServiceGrpc.getGetSliceMethod = getGetSliceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSlice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Slice.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetSlice")).build(); + } + } + } + return getGetSliceMethod; } - /** - */ - public void getContextEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextEventsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSetSliceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetSlice", requestType = context.ContextOuterClass.Slice.class, responseType = context.ContextOuterClass.SliceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetSliceMethod() { + io.grpc.MethodDescriptor getSetSliceMethod; + if ((getSetSliceMethod = ContextServiceGrpc.getSetSliceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSetSliceMethod = ContextServiceGrpc.getSetSliceMethod) == null) { + ContextServiceGrpc.getSetSliceMethod = getSetSliceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetSlice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Slice.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetSlice")).build(); + } + } + } + return getSetSliceMethod; } - /** - */ - public void listTopologyIds(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopologyIdsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getUnsetSliceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "UnsetSlice", requestType = context.ContextOuterClass.Slice.class, responseType = context.ContextOuterClass.SliceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnsetSliceMethod() { + io.grpc.MethodDescriptor getUnsetSliceMethod; + if ((getUnsetSliceMethod = ContextServiceGrpc.getUnsetSliceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getUnsetSliceMethod = ContextServiceGrpc.getUnsetSliceMethod) == null) { + ContextServiceGrpc.getUnsetSliceMethod = getUnsetSliceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnsetSlice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Slice.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("UnsetSlice")).build(); + } + } + } + return getUnsetSliceMethod; } - /** - */ - public void listTopologies(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopologiesMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getRemoveSliceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveSlice", requestType = context.ContextOuterClass.SliceId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveSliceMethod() { + io.grpc.MethodDescriptor getRemoveSliceMethod; + if ((getRemoveSliceMethod = ContextServiceGrpc.getRemoveSliceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getRemoveSliceMethod = ContextServiceGrpc.getRemoveSliceMethod) == null) { + ContextServiceGrpc.getRemoveSliceMethod = getRemoveSliceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveSlice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveSlice")).build(); + } + } + } + return getRemoveSliceMethod; } - /** - */ - public void getTopology(context.ContextOuterClass.TopologyId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetSliceEventsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetSliceEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.SliceEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetSliceEventsMethod() { + io.grpc.MethodDescriptor getGetSliceEventsMethod; + if ((getGetSliceEventsMethod = ContextServiceGrpc.getGetSliceEventsMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetSliceEventsMethod = ContextServiceGrpc.getGetSliceEventsMethod) == null) { + ContextServiceGrpc.getGetSliceEventsMethod = getGetSliceEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSliceEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetSliceEvents")).build(); + } + } + } + return getGetSliceEventsMethod; } - /** - */ - public void getTopologyDetails(context.ContextOuterClass.TopologyId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyDetailsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSelectSliceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SelectSlice", requestType = context.ContextOuterClass.SliceFilter.class, responseType = context.ContextOuterClass.SliceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSelectSliceMethod() { + io.grpc.MethodDescriptor getSelectSliceMethod; + if ((getSelectSliceMethod = ContextServiceGrpc.getSelectSliceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSelectSliceMethod = ContextServiceGrpc.getSelectSliceMethod) == null) { + ContextServiceGrpc.getSelectSliceMethod = getSelectSliceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectSlice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceFilter.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectSlice")).build(); + } + } + } + return getSelectSliceMethod; } - /** - */ - public void setTopology(context.ContextOuterClass.Topology request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetTopologyMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getListConnectionIdsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListConnectionIds", requestType = context.ContextOuterClass.ServiceId.class, responseType = context.ContextOuterClass.ConnectionIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListConnectionIdsMethod() { + io.grpc.MethodDescriptor getListConnectionIdsMethod; + if ((getListConnectionIdsMethod = ContextServiceGrpc.getListConnectionIdsMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getListConnectionIdsMethod = ContextServiceGrpc.getListConnectionIdsMethod) == null) { + ContextServiceGrpc.getListConnectionIdsMethod = getListConnectionIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListConnectionIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ConnectionIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListConnectionIds")).build(); + } + } + } + return getListConnectionIdsMethod; } - /** - */ - public void removeTopology(context.ContextOuterClass.TopologyId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveTopologyMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getListConnectionsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListConnections", requestType = context.ContextOuterClass.ServiceId.class, responseType = context.ContextOuterClass.ConnectionList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListConnectionsMethod() { + io.grpc.MethodDescriptor getListConnectionsMethod; + if ((getListConnectionsMethod = ContextServiceGrpc.getListConnectionsMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getListConnectionsMethod = ContextServiceGrpc.getListConnectionsMethod) == null) { + ContextServiceGrpc.getListConnectionsMethod = getListConnectionsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListConnections")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ConnectionList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListConnections")).build(); + } + } + } + return getListConnectionsMethod; } - /** - */ - public void getTopologyEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyEventsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetConnectionMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetConnection", requestType = context.ContextOuterClass.ConnectionId.class, responseType = context.ContextOuterClass.Connection.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetConnectionMethod() { + io.grpc.MethodDescriptor getGetConnectionMethod; + if ((getGetConnectionMethod = ContextServiceGrpc.getGetConnectionMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetConnectionMethod = ContextServiceGrpc.getGetConnectionMethod) == null) { + ContextServiceGrpc.getGetConnectionMethod = getGetConnectionMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConnection")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ConnectionId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Connection.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetConnection")).build(); + } + } + } + return getGetConnectionMethod; } - /** - */ - public void listDeviceIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDeviceIdsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSetConnectionMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetConnection", requestType = context.ContextOuterClass.Connection.class, responseType = context.ContextOuterClass.ConnectionId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetConnectionMethod() { + io.grpc.MethodDescriptor getSetConnectionMethod; + if ((getSetConnectionMethod = ContextServiceGrpc.getSetConnectionMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSetConnectionMethod = ContextServiceGrpc.getSetConnectionMethod) == null) { + ContextServiceGrpc.getSetConnectionMethod = getSetConnectionMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetConnection")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Connection.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ConnectionId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetConnection")).build(); + } + } + } + return getSetConnectionMethod; } - /** - */ - public void listDevices(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDevicesMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getRemoveConnectionMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveConnection", requestType = context.ContextOuterClass.ConnectionId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveConnectionMethod() { + io.grpc.MethodDescriptor getRemoveConnectionMethod; + if ((getRemoveConnectionMethod = ContextServiceGrpc.getRemoveConnectionMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getRemoveConnectionMethod = ContextServiceGrpc.getRemoveConnectionMethod) == null) { + ContextServiceGrpc.getRemoveConnectionMethod = getRemoveConnectionMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveConnection")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ConnectionId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveConnection")).build(); + } + } + } + return getRemoveConnectionMethod; } - /** - */ - public void getDevice(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeviceMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetConnectionEventsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetConnectionEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.ConnectionEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetConnectionEventsMethod() { + io.grpc.MethodDescriptor getGetConnectionEventsMethod; + if ((getGetConnectionEventsMethod = ContextServiceGrpc.getGetConnectionEventsMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetConnectionEventsMethod = ContextServiceGrpc.getGetConnectionEventsMethod) == null) { + ContextServiceGrpc.getGetConnectionEventsMethod = getGetConnectionEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConnectionEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ConnectionEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetConnectionEvents")).build(); + } + } + } + return getGetConnectionEventsMethod; } - /** - */ - public void setDevice(context.ContextOuterClass.Device request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetDeviceMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetOpticalConfigMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetOpticalConfig", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.OpticalConfigList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetOpticalConfigMethod() { + io.grpc.MethodDescriptor getGetOpticalConfigMethod; + if ((getGetOpticalConfigMethod = ContextServiceGrpc.getGetOpticalConfigMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetOpticalConfigMethod = ContextServiceGrpc.getGetOpticalConfigMethod) == null) { + ContextServiceGrpc.getGetOpticalConfigMethod = getGetOpticalConfigMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOpticalConfig")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfigList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetOpticalConfig")).build(); + } + } + } + return getGetOpticalConfigMethod; } - /** - */ - public void removeDevice(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveDeviceMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSetOpticalConfigMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetOpticalConfig", requestType = context.ContextOuterClass.OpticalConfig.class, responseType = context.ContextOuterClass.OpticalConfigId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetOpticalConfigMethod() { + io.grpc.MethodDescriptor getSetOpticalConfigMethod; + if ((getSetOpticalConfigMethod = ContextServiceGrpc.getSetOpticalConfigMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSetOpticalConfigMethod = ContextServiceGrpc.getSetOpticalConfigMethod) == null) { + ContextServiceGrpc.getSetOpticalConfigMethod = getSetOpticalConfigMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetOpticalConfig")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfig.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfigId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetOpticalConfig")).build(); + } + } + } + return getSetOpticalConfigMethod; } - /** - */ - public void getDeviceEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeviceEventsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSelectOpticalConfigMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SelectOpticalConfig", requestType = context.ContextOuterClass.OpticalConfigId.class, responseType = context.ContextOuterClass.OpticalConfig.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSelectOpticalConfigMethod() { + io.grpc.MethodDescriptor getSelectOpticalConfigMethod; + if ((getSelectOpticalConfigMethod = ContextServiceGrpc.getSelectOpticalConfigMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSelectOpticalConfigMethod = ContextServiceGrpc.getSelectOpticalConfigMethod) == null) { + ContextServiceGrpc.getSelectOpticalConfigMethod = getSelectOpticalConfigMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectOpticalConfig")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfigId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfig.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectOpticalConfig")).build(); + } + } + } + return getSelectOpticalConfigMethod; } - /** - */ - public void selectDevice(context.ContextOuterClass.DeviceFilter request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectDeviceMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSetOpticalLinkMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetOpticalLink", requestType = context.ContextOuterClass.OpticalLink.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetOpticalLinkMethod() { + io.grpc.MethodDescriptor getSetOpticalLinkMethod; + if ((getSetOpticalLinkMethod = ContextServiceGrpc.getSetOpticalLinkMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSetOpticalLinkMethod = ContextServiceGrpc.getSetOpticalLinkMethod) == null) { + ContextServiceGrpc.getSetOpticalLinkMethod = getSetOpticalLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetOpticalLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLink.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetOpticalLink")).build(); + } + } + } + return getSetOpticalLinkMethod; } - /** - */ - public void listEndPointNames(context.ContextOuterClass.EndPointIdList request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListEndPointNamesMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetOpticalLinkMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetOpticalLink", requestType = context.ContextOuterClass.OpticalLinkId.class, responseType = context.ContextOuterClass.OpticalLink.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetOpticalLinkMethod() { + io.grpc.MethodDescriptor getGetOpticalLinkMethod; + if ((getGetOpticalLinkMethod = ContextServiceGrpc.getGetOpticalLinkMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetOpticalLinkMethod = ContextServiceGrpc.getGetOpticalLinkMethod) == null) { + ContextServiceGrpc.getGetOpticalLinkMethod = getGetOpticalLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOpticalLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLinkId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLink.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetOpticalLink")).build(); + } + } + } + return getGetOpticalLinkMethod; } - /** - */ - public void listLinkIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinkIdsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetFiberMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetFiber", requestType = context.ContextOuterClass.FiberId.class, responseType = context.ContextOuterClass.Fiber.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetFiberMethod() { + io.grpc.MethodDescriptor getGetFiberMethod; + if ((getGetFiberMethod = ContextServiceGrpc.getGetFiberMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetFiberMethod = ContextServiceGrpc.getGetFiberMethod) == null) { + ContextServiceGrpc.getGetFiberMethod = getGetFiberMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFiber")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.FiberId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Fiber.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetFiber")).build(); + } + } + } + return getGetFiberMethod; } /** + * Creates a new async stub that supports all call types for the service */ - public void listLinks(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinksMethod(), responseObserver); + public static ContextServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ContextServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextServiceStub(channel, callOptions); + } + }; + return ContextServiceStub.newStub(factory, channel); } /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public void getLink(context.ContextOuterClass.LinkId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkMethod(), responseObserver); + public static ContextServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ContextServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextServiceBlockingStub(channel, callOptions); + } + }; + return ContextServiceBlockingStub.newStub(factory, channel); } /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public void setLink(context.ContextOuterClass.Link request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetLinkMethod(), responseObserver); + public static ContextServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ContextServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextServiceFutureStub(channel, callOptions); + } + }; + return ContextServiceFutureStub.newStub(factory, channel); } /** */ - public void removeLink(context.ContextOuterClass.LinkId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveLinkMethod(), responseObserver); - } + public static abstract class ContextServiceImplBase implements io.grpc.BindableService { - /** - */ - public void getLinkEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkEventsMethod(), responseObserver); - } + /** + */ + public void listContextIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListContextIdsMethod(), responseObserver); + } - /** - */ - public void listServiceIds(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServiceIdsMethod(), responseObserver); - } + /** + */ + public void listContexts(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListContextsMethod(), responseObserver); + } - /** - */ - public void listServices(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServicesMethod(), responseObserver); - } + /** + */ + public void getContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextMethod(), responseObserver); + } - /** - */ - public void getService(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); - } + /** + */ + public void setContext(context.ContextOuterClass.Context request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetContextMethod(), responseObserver); + } - /** - */ - public void setService(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetServiceMethod(), responseObserver); - } + /** + */ + public void removeContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveContextMethod(), responseObserver); + } - /** - */ - public void unsetService(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetServiceMethod(), responseObserver); - } + /** + */ + public void getContextEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextEventsMethod(), responseObserver); + } - /** - */ - public void removeService(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveServiceMethod(), responseObserver); - } + /** + */ + public void listTopologyIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopologyIdsMethod(), responseObserver); + } - /** - */ - public void getServiceEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceEventsMethod(), responseObserver); - } + /** + */ + public void listTopologies(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopologiesMethod(), responseObserver); + } - /** - */ - public void selectService(context.ContextOuterClass.ServiceFilter request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectServiceMethod(), responseObserver); - } + /** + */ + public void getTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyMethod(), responseObserver); + } - /** - */ - public void listSliceIds(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSliceIdsMethod(), responseObserver); - } + /** + */ + public void getTopologyDetails(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyDetailsMethod(), responseObserver); + } - /** - */ - public void listSlices(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSlicesMethod(), responseObserver); - } + /** + */ + public void setTopology(context.ContextOuterClass.Topology request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetTopologyMethod(), responseObserver); + } - /** - */ - public void getSlice(context.ContextOuterClass.SliceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSliceMethod(), responseObserver); - } + /** + */ + public void removeTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveTopologyMethod(), responseObserver); + } - /** - */ - public void setSlice(context.ContextOuterClass.Slice request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetSliceMethod(), responseObserver); - } + /** + */ + public void getTopologyEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyEventsMethod(), responseObserver); + } - /** - */ - public void unsetSlice(context.ContextOuterClass.Slice request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetSliceMethod(), responseObserver); - } + /** + */ + public void listDeviceIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDeviceIdsMethod(), responseObserver); + } - /** - */ - public void removeSlice(context.ContextOuterClass.SliceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveSliceMethod(), responseObserver); - } + /** + */ + public void listDevices(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDevicesMethod(), responseObserver); + } - /** - */ - public void getSliceEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSliceEventsMethod(), responseObserver); - } + /** + */ + public void getDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeviceMethod(), responseObserver); + } - /** - */ - public void selectSlice(context.ContextOuterClass.SliceFilter request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectSliceMethod(), responseObserver); - } + /** + */ + public void setDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetDeviceMethod(), responseObserver); + } - /** - */ - public void listConnectionIds(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListConnectionIdsMethod(), responseObserver); - } + /** + */ + public void removeDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveDeviceMethod(), responseObserver); + } - /** - */ - public void listConnections(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListConnectionsMethod(), responseObserver); + /** + */ + public void getDeviceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeviceEventsMethod(), responseObserver); + } + + /** + */ + public void selectDevice(context.ContextOuterClass.DeviceFilter request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectDeviceMethod(), responseObserver); + } + + /** + */ + public void listEndPointNames(context.ContextOuterClass.EndPointIdList request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListEndPointNamesMethod(), responseObserver); + } + + /** + */ + public void listLinkIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinkIdsMethod(), responseObserver); + } + + /** + */ + public void listLinks(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinksMethod(), responseObserver); + } + + /** + */ + public void getLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkMethod(), responseObserver); + } + + /** + */ + public void setLink(context.ContextOuterClass.Link request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetLinkMethod(), responseObserver); + } + + /** + */ + public void removeLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveLinkMethod(), responseObserver); + } + + /** + */ + public void getLinkEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkEventsMethod(), responseObserver); + } + + /** + */ + public void listServiceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServiceIdsMethod(), responseObserver); + } + + /** + */ + public void listServices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServicesMethod(), responseObserver); + } + + /** + */ + public void getService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); + } + + /** + */ + public void setService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetServiceMethod(), responseObserver); + } + + /** + */ + public void unsetService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetServiceMethod(), responseObserver); + } + + /** + */ + public void removeService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveServiceMethod(), responseObserver); + } + + /** + */ + public void getServiceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceEventsMethod(), responseObserver); + } + + /** + */ + public void selectService(context.ContextOuterClass.ServiceFilter request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectServiceMethod(), responseObserver); + } + + /** + */ + public void listSliceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSliceIdsMethod(), responseObserver); + } + + /** + */ + public void listSlices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSlicesMethod(), responseObserver); + } + + /** + */ + public void getSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSliceMethod(), responseObserver); + } + + /** + */ + public void setSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetSliceMethod(), responseObserver); + } + + /** + */ + public void unsetSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetSliceMethod(), responseObserver); + } + + /** + */ + public void removeSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveSliceMethod(), responseObserver); + } + + /** + */ + public void getSliceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSliceEventsMethod(), responseObserver); + } + + /** + */ + public void selectSlice(context.ContextOuterClass.SliceFilter request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectSliceMethod(), responseObserver); + } + + /** + */ + public void listConnectionIds(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListConnectionIdsMethod(), responseObserver); + } + + /** + */ + public void listConnections(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListConnectionsMethod(), responseObserver); + } + + /** + */ + public void getConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectionMethod(), responseObserver); + } + + /** + */ + public void setConnection(context.ContextOuterClass.Connection request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetConnectionMethod(), responseObserver); + } + + /** + */ + public void removeConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveConnectionMethod(), responseObserver); + } + + /** + */ + public void getConnectionEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectionEventsMethod(), responseObserver); + } + + /** + *
+         * ------------------------------ Experimental -----------------------------
+         * 
+ */ + public void getOpticalConfig(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOpticalConfigMethod(), responseObserver); + } + + /** + */ + public void setOpticalConfig(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetOpticalConfigMethod(), responseObserver); + } + + /** + */ + public void selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectOpticalConfigMethod(), responseObserver); + } + + /** + */ + public void setOpticalLink(context.ContextOuterClass.OpticalLink request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetOpticalLinkMethod(), responseObserver); + } + + /** + */ + public void getOpticalLink(context.ContextOuterClass.OpticalLinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOpticalLinkMethod(), responseObserver); + } + + /** + */ + public void getFiber(context.ContextOuterClass.FiberId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFiberMethod(), responseObserver); + } + + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getListContextIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXT_IDS))).addMethod(getListContextsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXTS))).addMethod(getGetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONTEXT))).addMethod(getSetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONTEXT))).addMethod(getRemoveContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONTEXT))).addMethod(getGetContextEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONTEXT_EVENTS))).addMethod(getListTopologyIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGY_IDS))).addMethod(getListTopologiesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGIES))).addMethod(getGetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY))).addMethod(getGetTopologyDetailsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_DETAILS))).addMethod(getSetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_TOPOLOGY))).addMethod(getRemoveTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_TOPOLOGY))).addMethod(getGetTopologyEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_EVENTS))).addMethod(getListDeviceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICE_IDS))).addMethod(getListDevicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICES))).addMethod(getGetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_DEVICE))).addMethod(getSetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_DEVICE))).addMethod(getRemoveDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_DEVICE))).addMethod(getGetDeviceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_DEVICE_EVENTS))).addMethod(getSelectDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_DEVICE))).addMethod(getListEndPointNamesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_END_POINT_NAMES))).addMethod(getListLinkIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINK_IDS))).addMethod(getListLinksMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINKS))).addMethod(getGetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_LINK))).addMethod(getSetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_LINK))).addMethod(getRemoveLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_LINK))).addMethod(getGetLinkEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_LINK_EVENTS))).addMethod(getListServiceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICE_IDS))).addMethod(getListServicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICES))).addMethod(getGetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SERVICE))).addMethod(getSetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SERVICE))).addMethod(getUnsetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SERVICE))).addMethod(getRemoveServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SERVICE))).addMethod(getGetServiceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SERVICE_EVENTS))).addMethod(getSelectServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SERVICE))).addMethod(getListSliceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICE_IDS))).addMethod(getListSlicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICES))).addMethod(getGetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SLICE))).addMethod(getSetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SLICE))).addMethod(getUnsetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SLICE))).addMethod(getRemoveSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SLICE))).addMethod(getGetSliceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SLICE_EVENTS))).addMethod(getSelectSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SLICE))).addMethod(getListConnectionIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTION_IDS))).addMethod(getListConnectionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTIONS))).addMethod(getGetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONNECTION))).addMethod(getSetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONNECTION))).addMethod(getRemoveConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONNECTION))).addMethod(getGetConnectionEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONNECTION_EVENTS))).addMethod(getGetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_CONFIG))).addMethod(getSetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_CONFIG))).addMethod(getSelectOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_OPTICAL_CONFIG))).addMethod(getSetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_LINK))).addMethod(getGetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_LINK))).addMethod(getGetFiberMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_FIBER))).build(); + } } /** */ - public void getConnection(context.ContextOuterClass.ConnectionId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectionMethod(), responseObserver); + public static class ContextServiceStub extends io.grpc.stub.AbstractAsyncStub { + + private ContextServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ContextServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextServiceStub(channel, callOptions); + } + + /** + */ + public void listContextIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListContextIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listContexts(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListContextsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetContextMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setContext(context.ContextOuterClass.Context request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetContextMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveContextMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getContextEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetContextEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listTopologyIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListTopologyIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listTopologies(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListTopologiesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetTopologyMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getTopologyDetails(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetTopologyDetailsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setTopology(context.ContextOuterClass.Topology request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetTopologyMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveTopologyMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getTopologyEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetTopologyEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listDeviceIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListDeviceIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listDevices(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListDevicesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetDeviceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetDeviceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveDeviceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getDeviceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetDeviceEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void selectDevice(context.ContextOuterClass.DeviceFilter request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSelectDeviceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listEndPointNames(context.ContextOuterClass.EndPointIdList request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListEndPointNamesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listLinkIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListLinkIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listLinks(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListLinksMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setLink(context.ContextOuterClass.Link request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getLinkEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetLinkEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listServiceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListServiceIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listServices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListServicesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void unsetService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getUnsetServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getServiceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetServiceEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void selectService(context.ContextOuterClass.ServiceFilter request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSelectServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listSliceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListSliceIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listSlices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListSlicesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetSliceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetSliceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void unsetSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getUnsetSliceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveSliceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getSliceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetSliceEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void selectSlice(context.ContextOuterClass.SliceFilter request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSelectSliceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listConnectionIds(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListConnectionIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listConnections(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListConnectionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetConnectionMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setConnection(context.ContextOuterClass.Connection request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetConnectionMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveConnectionMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getConnectionEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetConnectionEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+         * ------------------------------ Experimental -----------------------------
+         * 
+ */ + public void getOpticalConfig(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetOpticalConfigMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setOpticalConfig(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetOpticalConfigMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSelectOpticalConfigMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setOpticalLink(context.ContextOuterClass.OpticalLink request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetOpticalLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getOpticalLink(context.ContextOuterClass.OpticalLinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetOpticalLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getFiber(context.ContextOuterClass.FiberId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetFiberMethod(), getCallOptions()), request, responseObserver); + } } /** */ - public void setConnection(context.ContextOuterClass.Connection request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetConnectionMethod(), responseObserver); - } + public static class ContextServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { + + private ContextServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ContextServiceBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextServiceBlockingStub(channel, callOptions); + } + + /** + */ + public context.ContextOuterClass.ContextIdList listContextIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListContextIdsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ContextList listContexts(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListContextsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Context getContext(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetContextMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ContextId setContext(context.ContextOuterClass.Context request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetContextMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty removeContext(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveContextMethod(), getCallOptions(), request); + } + + /** + */ + public java.util.Iterator getContextEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetContextEventsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.TopologyIdList listTopologyIds(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListTopologyIdsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.TopologyList listTopologies(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListTopologiesMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Topology getTopology(context.ContextOuterClass.TopologyId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetTopologyMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.TopologyDetails getTopologyDetails(context.ContextOuterClass.TopologyId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetTopologyDetailsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.TopologyId setTopology(context.ContextOuterClass.Topology request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetTopologyMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty removeTopology(context.ContextOuterClass.TopologyId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveTopologyMethod(), getCallOptions(), request); + } + + /** + */ + public java.util.Iterator getTopologyEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetTopologyEventsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.DeviceIdList listDeviceIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListDeviceIdsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.DeviceList listDevices(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListDevicesMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Device getDevice(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.DeviceId setDevice(context.ContextOuterClass.Device request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty removeDevice(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public java.util.Iterator getDeviceEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetDeviceEventsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.DeviceList selectDevice(context.ContextOuterClass.DeviceFilter request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSelectDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.EndPointNameList listEndPointNames(context.ContextOuterClass.EndPointIdList request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListEndPointNamesMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.LinkIdList listLinkIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListLinkIdsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.LinkList listLinks(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListLinksMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Link getLink(context.ContextOuterClass.LinkId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetLinkMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.LinkId setLink(context.ContextOuterClass.Link request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetLinkMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty removeLink(context.ContextOuterClass.LinkId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveLinkMethod(), getCallOptions(), request); + } + + /** + */ + public java.util.Iterator getLinkEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetLinkEventsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ServiceIdList listServiceIds(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListServiceIdsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ServiceList listServices(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListServicesMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Service getService(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetServiceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ServiceId setService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetServiceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ServiceId unsetService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getUnsetServiceMethod(), getCallOptions(), request); + } - /** - */ - public void removeConnection(context.ContextOuterClass.ConnectionId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveConnectionMethod(), responseObserver); - } + /** + */ + public context.ContextOuterClass.Empty removeService(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveServiceMethod(), getCallOptions(), request); + } - /** - */ - public void getConnectionEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectionEventsMethod(), responseObserver); - } - - @java.lang.Override public final 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))) - .build(); - } - } - - /** - */ - public static final class ContextServiceStub extends io.grpc.stub.AbstractAsyncStub { - private ContextServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ContextServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextServiceStub(channel, callOptions); - } + /** + */ + public java.util.Iterator getServiceEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetServiceEventsMethod(), getCallOptions(), request); + } - /** - */ - public void listContextIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListContextIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.ServiceList selectService(context.ContextOuterClass.ServiceFilter request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSelectServiceMethod(), getCallOptions(), request); + } - /** - */ - public void listContexts(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListContextsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.SliceIdList listSliceIds(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListSliceIdsMethod(), getCallOptions(), request); + } - /** - */ - public void getContext(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetContextMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.SliceList listSlices(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListSlicesMethod(), getCallOptions(), request); + } - /** - */ - public void setContext(context.ContextOuterClass.Context request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetContextMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.Slice getSlice(context.ContextOuterClass.SliceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetSliceMethod(), getCallOptions(), request); + } - /** - */ - public void removeContext(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveContextMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.SliceId setSlice(context.ContextOuterClass.Slice request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetSliceMethod(), getCallOptions(), request); + } - /** - */ - public void getContextEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetContextEventsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.SliceId unsetSlice(context.ContextOuterClass.Slice request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getUnsetSliceMethod(), getCallOptions(), request); + } - /** - */ - public void listTopologyIds(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListTopologyIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.Empty removeSlice(context.ContextOuterClass.SliceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveSliceMethod(), getCallOptions(), request); + } - /** - */ - public void listTopologies(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListTopologiesMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public java.util.Iterator getSliceEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetSliceEventsMethod(), getCallOptions(), request); + } - /** - */ - public void getTopology(context.ContextOuterClass.TopologyId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetTopologyMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.SliceList selectSlice(context.ContextOuterClass.SliceFilter request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSelectSliceMethod(), getCallOptions(), request); + } - /** - */ - public void getTopologyDetails(context.ContextOuterClass.TopologyId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetTopologyDetailsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.ConnectionIdList listConnectionIds(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListConnectionIdsMethod(), getCallOptions(), request); + } - /** - */ - public void setTopology(context.ContextOuterClass.Topology request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetTopologyMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.ConnectionList listConnections(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListConnectionsMethod(), getCallOptions(), request); + } - /** - */ - public void removeTopology(context.ContextOuterClass.TopologyId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveTopologyMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.Connection getConnection(context.ContextOuterClass.ConnectionId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetConnectionMethod(), getCallOptions(), request); + } - /** - */ - public void getTopologyEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetTopologyEventsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.ConnectionId setConnection(context.ContextOuterClass.Connection request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetConnectionMethod(), getCallOptions(), request); + } - /** - */ - public void listDeviceIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListDeviceIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.Empty removeConnection(context.ContextOuterClass.ConnectionId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveConnectionMethod(), getCallOptions(), request); + } - /** - */ - public void listDevices(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListDevicesMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public java.util.Iterator getConnectionEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetConnectionEventsMethod(), getCallOptions(), request); + } - /** - */ - public void getDevice(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + *
+         * ------------------------------ Experimental -----------------------------
+         * 
+ */ + public context.ContextOuterClass.OpticalConfigList getOpticalConfig(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetOpticalConfigMethod(), getCallOptions(), request); + } - /** - */ - public void setDevice(context.ContextOuterClass.Device request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.OpticalConfigId setOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetOpticalConfigMethod(), getCallOptions(), request); + } - /** - */ - public void removeDevice(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.OpticalConfig selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSelectOpticalConfigMethod(), getCallOptions(), request); + } - /** - */ - public void getDeviceEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetDeviceEventsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.Empty setOpticalLink(context.ContextOuterClass.OpticalLink request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetOpticalLinkMethod(), getCallOptions(), request); + } - /** - */ - public void selectDevice(context.ContextOuterClass.DeviceFilter request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSelectDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.OpticalLink getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetOpticalLinkMethod(), getCallOptions(), request); + } - /** - */ - public void listEndPointNames(context.ContextOuterClass.EndPointIdList request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListEndPointNamesMethod(), getCallOptions()), request, responseObserver); + /** + */ + public context.ContextOuterClass.Fiber getFiber(context.ContextOuterClass.FiberId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetFiberMethod(), getCallOptions(), request); + } } /** */ - public void listLinkIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListLinkIdsMethod(), getCallOptions()), request, responseObserver); - } + public static class ContextServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - /** - */ - public void listLinks(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListLinksMethod(), getCallOptions()), request, responseObserver); - } + private ContextServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public void getLink(context.ContextOuterClass.LinkId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetLinkMethod(), getCallOptions()), request, responseObserver); - } + @java.lang.Override + protected ContextServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextServiceFutureStub(channel, callOptions); + } - /** - */ - public void setLink(context.ContextOuterClass.Link request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetLinkMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listContextIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListContextIdsMethod(), getCallOptions()), request); + } - /** - */ - public void removeLink(context.ContextOuterClass.LinkId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveLinkMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listContexts(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListContextsMethod(), getCallOptions()), request); + } - /** - */ - public void getLinkEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetLinkEventsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getContext(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetContextMethod(), getCallOptions()), request); + } - /** - */ - public void listServiceIds(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListServiceIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setContext(context.ContextOuterClass.Context request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetContextMethod(), getCallOptions()), request); + } - /** - */ - public void listServices(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListServicesMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeContext(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveContextMethod(), getCallOptions()), request); + } - /** - */ - public void getService(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listTopologyIds(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListTopologyIdsMethod(), getCallOptions()), request); + } - /** - */ - public void setService(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listTopologies(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListTopologiesMethod(), getCallOptions()), request); + } - /** - */ - public void unsetService(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUnsetServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getTopology(context.ContextOuterClass.TopologyId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetTopologyMethod(), getCallOptions()), request); + } - /** - */ - public void removeService(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getTopologyDetails(context.ContextOuterClass.TopologyId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetTopologyDetailsMethod(), getCallOptions()), request); + } - /** - */ - public void getServiceEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetServiceEventsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setTopology(context.ContextOuterClass.Topology request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetTopologyMethod(), getCallOptions()), request); + } - /** - */ - public void selectService(context.ContextOuterClass.ServiceFilter request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSelectServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeTopology(context.ContextOuterClass.TopologyId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveTopologyMethod(), getCallOptions()), request); + } - /** - */ - public void listSliceIds(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListSliceIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listDeviceIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListDeviceIdsMethod(), getCallOptions()), request); + } - /** - */ - public void listSlices(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListSlicesMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listDevices(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListDevicesMethod(), getCallOptions()), request); + } - /** - */ - public void getSlice(context.ContextOuterClass.SliceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSliceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getDevice(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetDeviceMethod(), getCallOptions()), request); + } - /** - */ - public void setSlice(context.ContextOuterClass.Slice request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetSliceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setDevice(context.ContextOuterClass.Device request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetDeviceMethod(), getCallOptions()), request); + } - /** - */ - public void unsetSlice(context.ContextOuterClass.Slice request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUnsetSliceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeDevice(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveDeviceMethod(), getCallOptions()), request); + } - /** - */ - public void removeSlice(context.ContextOuterClass.SliceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveSliceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture selectDevice(context.ContextOuterClass.DeviceFilter request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSelectDeviceMethod(), getCallOptions()), request); + } - /** - */ - public void getSliceEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetSliceEventsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listEndPointNames(context.ContextOuterClass.EndPointIdList request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListEndPointNamesMethod(), getCallOptions()), request); + } - /** - */ - public void selectSlice(context.ContextOuterClass.SliceFilter request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSelectSliceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listLinkIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListLinkIdsMethod(), getCallOptions()), request); + } - /** - */ - public void listConnectionIds(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListConnectionIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listLinks(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListLinksMethod(), getCallOptions()), request); + } - /** - */ - public void listConnections(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListConnectionsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getLink(context.ContextOuterClass.LinkId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetLinkMethod(), getCallOptions()), request); + } - /** - */ - public void getConnection(context.ContextOuterClass.ConnectionId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetConnectionMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setLink(context.ContextOuterClass.Link request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetLinkMethod(), getCallOptions()), request); + } - /** - */ - public void setConnection(context.ContextOuterClass.Connection request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetConnectionMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeLink(context.ContextOuterClass.LinkId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveLinkMethod(), getCallOptions()), request); + } - /** - */ - public void removeConnection(context.ContextOuterClass.ConnectionId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveConnectionMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listServiceIds(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListServiceIdsMethod(), getCallOptions()), request); + } - /** - */ - public void getConnectionEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetConnectionEventsMethod(), getCallOptions()), request, responseObserver); - } - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listServices(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListServicesMethod(), getCallOptions()), request); + } - /** - */ - public static final class ContextServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ContextServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getService(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); + } - @java.lang.Override - protected ContextServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextServiceBlockingStub(channel, callOptions); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetServiceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.ContextIdList listContextIds(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListContextIdsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture unsetService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getUnsetServiceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.ContextList listContexts(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListContextsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeService(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveServiceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.Context getContext(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetContextMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture selectService(context.ContextOuterClass.ServiceFilter request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSelectServiceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.ContextId setContext(context.ContextOuterClass.Context request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetContextMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listSliceIds(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListSliceIdsMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.Empty removeContext(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveContextMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listSlices(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListSlicesMethod(), getCallOptions()), request); + } - /** - */ - public java.util.Iterator getContextEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetContextEventsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getSlice(context.ContextOuterClass.SliceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetSliceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.TopologyIdList listTopologyIds(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListTopologyIdsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setSlice(context.ContextOuterClass.Slice request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetSliceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.TopologyList listTopologies(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListTopologiesMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture unsetSlice(context.ContextOuterClass.Slice request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getUnsetSliceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.Topology getTopology(context.ContextOuterClass.TopologyId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetTopologyMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeSlice(context.ContextOuterClass.SliceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveSliceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.TopologyDetails getTopologyDetails(context.ContextOuterClass.TopologyId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetTopologyDetailsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture selectSlice(context.ContextOuterClass.SliceFilter request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSelectSliceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.TopologyId setTopology(context.ContextOuterClass.Topology request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetTopologyMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listConnectionIds(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListConnectionIdsMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.Empty removeTopology(context.ContextOuterClass.TopologyId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveTopologyMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listConnections(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListConnectionsMethod(), getCallOptions()), request); + } - /** - */ - public java.util.Iterator getTopologyEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetTopologyEventsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getConnection(context.ContextOuterClass.ConnectionId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetConnectionMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.DeviceIdList listDeviceIds(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListDeviceIdsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setConnection(context.ContextOuterClass.Connection request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetConnectionMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.DeviceList listDevices(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListDevicesMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeConnection(context.ContextOuterClass.ConnectionId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveConnectionMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.Device getDevice(context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetDeviceMethod(), getCallOptions(), request); - } + /** + *
+         * ------------------------------ Experimental -----------------------------
+         * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getOpticalConfig(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetOpticalConfigMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.DeviceId setDevice(context.ContextOuterClass.Device request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetDeviceMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetOpticalConfigMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.Empty removeDevice(context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveDeviceMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSelectOpticalConfigMethod(), getCallOptions()), request); + } - /** - */ - public java.util.Iterator getDeviceEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetDeviceEventsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setOpticalLink(context.ContextOuterClass.OpticalLink request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetOpticalLinkMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.DeviceList selectDevice(context.ContextOuterClass.DeviceFilter request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSelectDeviceMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetOpticalLinkMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.EndPointNameList listEndPointNames(context.ContextOuterClass.EndPointIdList request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListEndPointNamesMethod(), getCallOptions(), request); + /** + */ + public com.google.common.util.concurrent.ListenableFuture getFiber(context.ContextOuterClass.FiberId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetFiberMethod(), getCallOptions()), request); + } } - /** - */ - public context.ContextOuterClass.LinkIdList listLinkIds(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListLinkIdsMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_CONTEXT_IDS = 0; - /** - */ - public context.ContextOuterClass.LinkList listLinks(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListLinksMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_CONTEXTS = 1; - /** - */ - public context.ContextOuterClass.Link getLink(context.ContextOuterClass.LinkId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetLinkMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_CONTEXT = 2; - /** - */ - public context.ContextOuterClass.LinkId setLink(context.ContextOuterClass.Link request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetLinkMethod(), getCallOptions(), request); - } + private static final int METHODID_SET_CONTEXT = 3; - /** - */ - public context.ContextOuterClass.Empty removeLink(context.ContextOuterClass.LinkId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveLinkMethod(), getCallOptions(), request); - } + private static final int METHODID_REMOVE_CONTEXT = 4; - /** - */ - public java.util.Iterator getLinkEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetLinkEventsMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_CONTEXT_EVENTS = 5; - /** - */ - public context.ContextOuterClass.ServiceIdList listServiceIds(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListServiceIdsMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_TOPOLOGY_IDS = 6; - /** - */ - public context.ContextOuterClass.ServiceList listServices(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListServicesMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_TOPOLOGIES = 7; - /** - */ - public context.ContextOuterClass.Service getService(context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetServiceMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_TOPOLOGY = 8; - /** - */ - public context.ContextOuterClass.ServiceId setService(context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetServiceMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_TOPOLOGY_DETAILS = 9; - /** - */ - public context.ContextOuterClass.ServiceId unsetService(context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUnsetServiceMethod(), getCallOptions(), request); - } + private static final int METHODID_SET_TOPOLOGY = 10; - /** - */ - public context.ContextOuterClass.Empty removeService(context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveServiceMethod(), getCallOptions(), request); - } + private static final int METHODID_REMOVE_TOPOLOGY = 11; - /** - */ - public java.util.Iterator getServiceEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetServiceEventsMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_TOPOLOGY_EVENTS = 12; - /** - */ - public context.ContextOuterClass.ServiceList selectService(context.ContextOuterClass.ServiceFilter request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSelectServiceMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_DEVICE_IDS = 13; - /** - */ - public context.ContextOuterClass.SliceIdList listSliceIds(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListSliceIdsMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_DEVICES = 14; - /** - */ - public context.ContextOuterClass.SliceList listSlices(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListSlicesMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_DEVICE = 15; - /** - */ - public context.ContextOuterClass.Slice getSlice(context.ContextOuterClass.SliceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSliceMethod(), getCallOptions(), request); - } + private static final int METHODID_SET_DEVICE = 16; - /** - */ - public context.ContextOuterClass.SliceId setSlice(context.ContextOuterClass.Slice request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetSliceMethod(), getCallOptions(), request); - } + private static final int METHODID_REMOVE_DEVICE = 17; - /** - */ - public context.ContextOuterClass.SliceId unsetSlice(context.ContextOuterClass.Slice request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUnsetSliceMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_DEVICE_EVENTS = 18; - /** - */ - public context.ContextOuterClass.Empty removeSlice(context.ContextOuterClass.SliceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveSliceMethod(), getCallOptions(), request); - } + private static final int METHODID_SELECT_DEVICE = 19; - /** - */ - public java.util.Iterator getSliceEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetSliceEventsMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_END_POINT_NAMES = 20; - /** - */ - public context.ContextOuterClass.SliceList selectSlice(context.ContextOuterClass.SliceFilter request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSelectSliceMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_LINK_IDS = 21; - /** - */ - public context.ContextOuterClass.ConnectionIdList listConnectionIds(context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListConnectionIdsMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_LINKS = 22; - /** - */ - public context.ContextOuterClass.ConnectionList listConnections(context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListConnectionsMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_LINK = 23; - /** - */ - public context.ContextOuterClass.Connection getConnection(context.ContextOuterClass.ConnectionId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetConnectionMethod(), getCallOptions(), request); - } + private static final int METHODID_SET_LINK = 24; - /** - */ - public context.ContextOuterClass.ConnectionId setConnection(context.ContextOuterClass.Connection request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetConnectionMethod(), getCallOptions(), request); - } + private static final int METHODID_REMOVE_LINK = 25; - /** - */ - public context.ContextOuterClass.Empty removeConnection(context.ContextOuterClass.ConnectionId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveConnectionMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_LINK_EVENTS = 26; - /** - */ - public java.util.Iterator getConnectionEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetConnectionEventsMethod(), getCallOptions(), request); - } - } + private static final int METHODID_LIST_SERVICE_IDS = 27; - /** - */ - public static final class ContextServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private ContextServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + private static final int METHODID_LIST_SERVICES = 28; - @java.lang.Override - protected ContextServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextServiceFutureStub(channel, callOptions); - } + private static final int METHODID_GET_SERVICE = 29; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listContextIds( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListContextIdsMethod(), getCallOptions()), request); - } + private static final int METHODID_SET_SERVICE = 30; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listContexts( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListContextsMethod(), getCallOptions()), request); - } + private static final int METHODID_UNSET_SERVICE = 31; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getContext( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetContextMethod(), getCallOptions()), request); - } + private static final int METHODID_REMOVE_SERVICE = 32; - /** - */ - public com.google.common.util.concurrent.ListenableFuture setContext( - context.ContextOuterClass.Context request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetContextMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_SERVICE_EVENTS = 33; - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeContext( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveContextMethod(), getCallOptions()), request); - } + private static final int METHODID_SELECT_SERVICE = 34; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listTopologyIds( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListTopologyIdsMethod(), getCallOptions()), request); - } + private static final int METHODID_LIST_SLICE_IDS = 35; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listTopologies( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListTopologiesMethod(), getCallOptions()), request); - } + private static final int METHODID_LIST_SLICES = 36; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getTopology( - context.ContextOuterClass.TopologyId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetTopologyMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_SLICE = 37; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getTopologyDetails( - context.ContextOuterClass.TopologyId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetTopologyDetailsMethod(), getCallOptions()), request); - } + private static final int METHODID_SET_SLICE = 38; - /** - */ - public com.google.common.util.concurrent.ListenableFuture setTopology( - context.ContextOuterClass.Topology request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetTopologyMethod(), getCallOptions()), request); - } + private static final int METHODID_UNSET_SLICE = 39; - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeTopology( - context.ContextOuterClass.TopologyId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveTopologyMethod(), getCallOptions()), request); - } + private static final int METHODID_REMOVE_SLICE = 40; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listDeviceIds( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListDeviceIdsMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_SLICE_EVENTS = 41; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listDevices( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListDevicesMethod(), getCallOptions()), request); - } + private static final int METHODID_SELECT_SLICE = 42; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getDevice( - context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetDeviceMethod(), getCallOptions()), request); - } + private static final int METHODID_LIST_CONNECTION_IDS = 43; - /** - */ - public com.google.common.util.concurrent.ListenableFuture setDevice( - context.ContextOuterClass.Device request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetDeviceMethod(), getCallOptions()), request); - } + private static final int METHODID_LIST_CONNECTIONS = 44; - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeDevice( - context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveDeviceMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_CONNECTION = 45; - /** - */ - public com.google.common.util.concurrent.ListenableFuture selectDevice( - context.ContextOuterClass.DeviceFilter request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSelectDeviceMethod(), getCallOptions()), request); - } + private static final int METHODID_SET_CONNECTION = 46; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listEndPointNames( - context.ContextOuterClass.EndPointIdList request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListEndPointNamesMethod(), getCallOptions()), request); - } + private static final int METHODID_REMOVE_CONNECTION = 47; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listLinkIds( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListLinkIdsMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_CONNECTION_EVENTS = 48; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listLinks( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListLinksMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_OPTICAL_CONFIG = 49; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getLink( - context.ContextOuterClass.LinkId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetLinkMethod(), getCallOptions()), request); - } + private static final int METHODID_SET_OPTICAL_CONFIG = 50; - /** - */ - public com.google.common.util.concurrent.ListenableFuture setLink( - context.ContextOuterClass.Link request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetLinkMethod(), getCallOptions()), request); - } + private static final int METHODID_SELECT_OPTICAL_CONFIG = 51; - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeLink( - context.ContextOuterClass.LinkId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveLinkMethod(), getCallOptions()), request); - } + private static final int METHODID_SET_OPTICAL_LINK = 52; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listServiceIds( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListServiceIdsMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_OPTICAL_LINK = 53; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listServices( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListServicesMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_FIBER = 54; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getService( - context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); - } + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - /** - */ - public com.google.common.util.concurrent.ListenableFuture setService( - context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetServiceMethod(), getCallOptions()), request); - } + private final ContextServiceImplBase serviceImpl; - /** - */ - public com.google.common.util.concurrent.ListenableFuture unsetService( - context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUnsetServiceMethod(), getCallOptions()), request); - } + private final int methodId; - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeService( - context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveServiceMethod(), getCallOptions()), request); - } + MethodHandlers(ContextServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture selectService( - context.ContextOuterClass.ServiceFilter request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSelectServiceMethod(), getCallOptions()), request); - } + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + case METHODID_LIST_CONTEXT_IDS: + serviceImpl.listContextIds((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CONTEXTS: + serviceImpl.listContexts((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CONTEXT: + serviceImpl.getContext((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_CONTEXT: + serviceImpl.setContext((context.ContextOuterClass.Context) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_CONTEXT: + serviceImpl.removeContext((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CONTEXT_EVENTS: + serviceImpl.getContextEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TOPOLOGY_IDS: + serviceImpl.listTopologyIds((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TOPOLOGIES: + serviceImpl.listTopologies((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TOPOLOGY: + serviceImpl.getTopology((context.ContextOuterClass.TopologyId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TOPOLOGY_DETAILS: + serviceImpl.getTopologyDetails((context.ContextOuterClass.TopologyId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_TOPOLOGY: + serviceImpl.setTopology((context.ContextOuterClass.Topology) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_TOPOLOGY: + serviceImpl.removeTopology((context.ContextOuterClass.TopologyId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TOPOLOGY_EVENTS: + serviceImpl.getTopologyEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DEVICE_IDS: + serviceImpl.listDeviceIds((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DEVICES: + serviceImpl.listDevices((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DEVICE: + serviceImpl.getDevice((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_DEVICE: + serviceImpl.setDevice((context.ContextOuterClass.Device) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_DEVICE: + serviceImpl.removeDevice((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DEVICE_EVENTS: + serviceImpl.getDeviceEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SELECT_DEVICE: + serviceImpl.selectDevice((context.ContextOuterClass.DeviceFilter) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_END_POINT_NAMES: + serviceImpl.listEndPointNames((context.ContextOuterClass.EndPointIdList) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_LINK_IDS: + serviceImpl.listLinkIds((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_LINKS: + serviceImpl.listLinks((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_LINK: + serviceImpl.getLink((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_LINK: + serviceImpl.setLink((context.ContextOuterClass.Link) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_LINK: + serviceImpl.removeLink((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_LINK_EVENTS: + serviceImpl.getLinkEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SERVICE_IDS: + serviceImpl.listServiceIds((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SERVICES: + serviceImpl.listServices((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SERVICE: + serviceImpl.getService((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_SERVICE: + serviceImpl.setService((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNSET_SERVICE: + serviceImpl.unsetService((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_SERVICE: + serviceImpl.removeService((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SERVICE_EVENTS: + serviceImpl.getServiceEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SELECT_SERVICE: + serviceImpl.selectService((context.ContextOuterClass.ServiceFilter) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SLICE_IDS: + serviceImpl.listSliceIds((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SLICES: + serviceImpl.listSlices((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SLICE: + serviceImpl.getSlice((context.ContextOuterClass.SliceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_SLICE: + serviceImpl.setSlice((context.ContextOuterClass.Slice) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNSET_SLICE: + serviceImpl.unsetSlice((context.ContextOuterClass.Slice) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_SLICE: + serviceImpl.removeSlice((context.ContextOuterClass.SliceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SLICE_EVENTS: + serviceImpl.getSliceEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SELECT_SLICE: + serviceImpl.selectSlice((context.ContextOuterClass.SliceFilter) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CONNECTION_IDS: + serviceImpl.listConnectionIds((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CONNECTIONS: + serviceImpl.listConnections((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CONNECTION: + serviceImpl.getConnection((context.ContextOuterClass.ConnectionId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_CONNECTION: + serviceImpl.setConnection((context.ContextOuterClass.Connection) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_CONNECTION: + serviceImpl.removeConnection((context.ContextOuterClass.ConnectionId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CONNECTION_EVENTS: + serviceImpl.getConnectionEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_OPTICAL_CONFIG: + serviceImpl.getOpticalConfig((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_OPTICAL_CONFIG: + serviceImpl.setOpticalConfig((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SELECT_OPTICAL_CONFIG: + serviceImpl.selectOpticalConfig((context.ContextOuterClass.OpticalConfigId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_OPTICAL_LINK: + serviceImpl.setOpticalLink((context.ContextOuterClass.OpticalLink) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_OPTICAL_LINK: + serviceImpl.getOpticalLink((context.ContextOuterClass.OpticalLinkId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_FIBER: + serviceImpl.getFiber((context.ContextOuterClass.FiberId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture listSliceIds( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListSliceIdsMethod(), getCallOptions()), request); + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + default: + throw new AssertionError(); + } + } } - /** - */ - public com.google.common.util.concurrent.ListenableFuture listSlices( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListSlicesMethod(), getCallOptions()), request); - } + private static abstract class ContextServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - /** - */ - public com.google.common.util.concurrent.ListenableFuture getSlice( - context.ContextOuterClass.SliceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSliceMethod(), getCallOptions()), request); - } + ContextServiceBaseDescriptorSupplier() { + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture setSlice( - context.ContextOuterClass.Slice request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetSliceMethod(), getCallOptions()), request); - } + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return context.ContextOuterClass.getDescriptor(); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture unsetSlice( - context.ContextOuterClass.Slice request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUnsetSliceMethod(), getCallOptions()), request); + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ContextService"); + } } - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeSlice( - context.ContextOuterClass.SliceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveSliceMethod(), getCallOptions()), request); - } + private static final class ContextServiceFileDescriptorSupplier extends ContextServiceBaseDescriptorSupplier { - /** - */ - public com.google.common.util.concurrent.ListenableFuture selectSlice( - context.ContextOuterClass.SliceFilter request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSelectSliceMethod(), getCallOptions()), request); + ContextServiceFileDescriptorSupplier() { + } } - /** - */ - public com.google.common.util.concurrent.ListenableFuture listConnectionIds( - context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListConnectionIdsMethod(), getCallOptions()), request); - } + private static final class ContextServiceMethodDescriptorSupplier extends ContextServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - /** - */ - public com.google.common.util.concurrent.ListenableFuture listConnections( - context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListConnectionsMethod(), getCallOptions()), request); - } + private final String methodName; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getConnection( - context.ContextOuterClass.ConnectionId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetConnectionMethod(), getCallOptions()), request); - } + ContextServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture setConnection( - context.ContextOuterClass.Connection request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetConnectionMethod(), getCallOptions()), request); + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } } - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeConnection( - context.ContextOuterClass.ConnectionId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveConnectionMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_CONTEXT_IDS = 0; - private static final int METHODID_LIST_CONTEXTS = 1; - private static final int METHODID_GET_CONTEXT = 2; - private static final int METHODID_SET_CONTEXT = 3; - private static final int METHODID_REMOVE_CONTEXT = 4; - private static final int METHODID_GET_CONTEXT_EVENTS = 5; - private static final int METHODID_LIST_TOPOLOGY_IDS = 6; - private static final int METHODID_LIST_TOPOLOGIES = 7; - private static final int METHODID_GET_TOPOLOGY = 8; - private static final int METHODID_GET_TOPOLOGY_DETAILS = 9; - private static final int METHODID_SET_TOPOLOGY = 10; - private static final int METHODID_REMOVE_TOPOLOGY = 11; - private static final int METHODID_GET_TOPOLOGY_EVENTS = 12; - private static final int METHODID_LIST_DEVICE_IDS = 13; - private static final int METHODID_LIST_DEVICES = 14; - private static final int METHODID_GET_DEVICE = 15; - private static final int METHODID_SET_DEVICE = 16; - private static final int METHODID_REMOVE_DEVICE = 17; - private static final int METHODID_GET_DEVICE_EVENTS = 18; - private static final int METHODID_SELECT_DEVICE = 19; - private static final int METHODID_LIST_END_POINT_NAMES = 20; - private static final int METHODID_LIST_LINK_IDS = 21; - private static final int METHODID_LIST_LINKS = 22; - private static final int METHODID_GET_LINK = 23; - private static final int METHODID_SET_LINK = 24; - private static final int METHODID_REMOVE_LINK = 25; - private static final int METHODID_GET_LINK_EVENTS = 26; - private static final int METHODID_LIST_SERVICE_IDS = 27; - private static final int METHODID_LIST_SERVICES = 28; - private static final int METHODID_GET_SERVICE = 29; - private static final int METHODID_SET_SERVICE = 30; - private static final int METHODID_UNSET_SERVICE = 31; - private static final int METHODID_REMOVE_SERVICE = 32; - private static final int METHODID_GET_SERVICE_EVENTS = 33; - private static final int METHODID_SELECT_SERVICE = 34; - private static final int METHODID_LIST_SLICE_IDS = 35; - private static final int METHODID_LIST_SLICES = 36; - private static final int METHODID_GET_SLICE = 37; - private static final int METHODID_SET_SLICE = 38; - private static final int METHODID_UNSET_SLICE = 39; - private static final int METHODID_REMOVE_SLICE = 40; - private static final int METHODID_GET_SLICE_EVENTS = 41; - private static final int METHODID_SELECT_SLICE = 42; - private static final int METHODID_LIST_CONNECTION_IDS = 43; - private static final int METHODID_LIST_CONNECTIONS = 44; - private static final int METHODID_GET_CONNECTION = 45; - private static final int METHODID_SET_CONNECTION = 46; - private static final int METHODID_REMOVE_CONNECTION = 47; - private static final int METHODID_GET_CONNECTION_EVENTS = 48; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ContextServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ContextServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_CONTEXT_IDS: - serviceImpl.listContextIds((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_CONTEXTS: - serviceImpl.listContexts((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_CONTEXT: - serviceImpl.getContext((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_CONTEXT: - serviceImpl.setContext((context.ContextOuterClass.Context) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_CONTEXT: - serviceImpl.removeContext((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_CONTEXT_EVENTS: - serviceImpl.getContextEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_TOPOLOGY_IDS: - serviceImpl.listTopologyIds((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_TOPOLOGIES: - serviceImpl.listTopologies((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_TOPOLOGY: - serviceImpl.getTopology((context.ContextOuterClass.TopologyId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_TOPOLOGY_DETAILS: - serviceImpl.getTopologyDetails((context.ContextOuterClass.TopologyId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_TOPOLOGY: - serviceImpl.setTopology((context.ContextOuterClass.Topology) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_TOPOLOGY: - serviceImpl.removeTopology((context.ContextOuterClass.TopologyId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_TOPOLOGY_EVENTS: - serviceImpl.getTopologyEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_DEVICE_IDS: - serviceImpl.listDeviceIds((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_DEVICES: - serviceImpl.listDevices((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_DEVICE: - serviceImpl.getDevice((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_DEVICE: - serviceImpl.setDevice((context.ContextOuterClass.Device) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_DEVICE: - serviceImpl.removeDevice((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_DEVICE_EVENTS: - serviceImpl.getDeviceEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SELECT_DEVICE: - serviceImpl.selectDevice((context.ContextOuterClass.DeviceFilter) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_END_POINT_NAMES: - serviceImpl.listEndPointNames((context.ContextOuterClass.EndPointIdList) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_LINK_IDS: - serviceImpl.listLinkIds((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_LINKS: - serviceImpl.listLinks((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_LINK: - serviceImpl.getLink((context.ContextOuterClass.LinkId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_LINK: - serviceImpl.setLink((context.ContextOuterClass.Link) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_LINK: - serviceImpl.removeLink((context.ContextOuterClass.LinkId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_LINK_EVENTS: - serviceImpl.getLinkEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_SERVICE_IDS: - serviceImpl.listServiceIds((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_SERVICES: - serviceImpl.listServices((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SERVICE: - serviceImpl.getService((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_SERVICE: - serviceImpl.setService((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UNSET_SERVICE: - serviceImpl.unsetService((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_SERVICE: - serviceImpl.removeService((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SERVICE_EVENTS: - serviceImpl.getServiceEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SELECT_SERVICE: - serviceImpl.selectService((context.ContextOuterClass.ServiceFilter) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_SLICE_IDS: - serviceImpl.listSliceIds((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_SLICES: - serviceImpl.listSlices((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SLICE: - serviceImpl.getSlice((context.ContextOuterClass.SliceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_SLICE: - serviceImpl.setSlice((context.ContextOuterClass.Slice) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UNSET_SLICE: - serviceImpl.unsetSlice((context.ContextOuterClass.Slice) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_SLICE: - serviceImpl.removeSlice((context.ContextOuterClass.SliceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SLICE_EVENTS: - serviceImpl.getSliceEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SELECT_SLICE: - serviceImpl.selectSlice((context.ContextOuterClass.SliceFilter) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_CONNECTION_IDS: - serviceImpl.listConnectionIds((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_CONNECTIONS: - serviceImpl.listConnections((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_CONNECTION: - serviceImpl.getConnection((context.ContextOuterClass.ConnectionId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_CONNECTION: - serviceImpl.setConnection((context.ContextOuterClass.Connection) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_CONNECTION: - serviceImpl.removeConnection((context.ContextOuterClass.ConnectionId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_CONNECTION_EVENTS: - serviceImpl.getConnectionEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class ContextServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ContextServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return context.ContextOuterClass.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ContextService"); - } - } - - private static final class ContextServiceFileDescriptorSupplier - extends ContextServiceBaseDescriptorSupplier { - ContextServiceFileDescriptorSupplier() {} - } - - private static final class ContextServiceMethodDescriptorSupplier - extends ContextServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ContextServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ContextServiceGrpc.class) { - result = serviceDescriptor; + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ContextServiceFileDescriptorSupplier()) - .addMethod(getListContextIdsMethod()) - .addMethod(getListContextsMethod()) - .addMethod(getGetContextMethod()) - .addMethod(getSetContextMethod()) - .addMethod(getRemoveContextMethod()) - .addMethod(getGetContextEventsMethod()) - .addMethod(getListTopologyIdsMethod()) - .addMethod(getListTopologiesMethod()) - .addMethod(getGetTopologyMethod()) - .addMethod(getGetTopologyDetailsMethod()) - .addMethod(getSetTopologyMethod()) - .addMethod(getRemoveTopologyMethod()) - .addMethod(getGetTopologyEventsMethod()) - .addMethod(getListDeviceIdsMethod()) - .addMethod(getListDevicesMethod()) - .addMethod(getGetDeviceMethod()) - .addMethod(getSetDeviceMethod()) - .addMethod(getRemoveDeviceMethod()) - .addMethod(getGetDeviceEventsMethod()) - .addMethod(getSelectDeviceMethod()) - .addMethod(getListEndPointNamesMethod()) - .addMethod(getListLinkIdsMethod()) - .addMethod(getListLinksMethod()) - .addMethod(getGetLinkMethod()) - .addMethod(getSetLinkMethod()) - .addMethod(getRemoveLinkMethod()) - .addMethod(getGetLinkEventsMethod()) - .addMethod(getListServiceIdsMethod()) - .addMethod(getListServicesMethod()) - .addMethod(getGetServiceMethod()) - .addMethod(getSetServiceMethod()) - .addMethod(getUnsetServiceMethod()) - .addMethod(getRemoveServiceMethod()) - .addMethod(getGetServiceEventsMethod()) - .addMethod(getSelectServiceMethod()) - .addMethod(getListSliceIdsMethod()) - .addMethod(getListSlicesMethod()) - .addMethod(getGetSliceMethod()) - .addMethod(getSetSliceMethod()) - .addMethod(getUnsetSliceMethod()) - .addMethod(getRemoveSliceMethod()) - .addMethod(getGetSliceEventsMethod()) - .addMethod(getSelectSliceMethod()) - .addMethod(getListConnectionIdsMethod()) - .addMethod(getListConnectionsMethod()) - .addMethod(getGetConnectionMethod()) - .addMethod(getSetConnectionMethod()) - .addMethod(getRemoveConnectionMethod()) - .addMethod(getGetConnectionEventsMethod()) - .build(); - } - } - } - return result; - } + synchronized (ContextServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new ContextServiceFileDescriptorSupplier()).addMethod(getListContextIdsMethod()).addMethod(getListContextsMethod()).addMethod(getGetContextMethod()).addMethod(getSetContextMethod()).addMethod(getRemoveContextMethod()).addMethod(getGetContextEventsMethod()).addMethod(getListTopologyIdsMethod()).addMethod(getListTopologiesMethod()).addMethod(getGetTopologyMethod()).addMethod(getGetTopologyDetailsMethod()).addMethod(getSetTopologyMethod()).addMethod(getRemoveTopologyMethod()).addMethod(getGetTopologyEventsMethod()).addMethod(getListDeviceIdsMethod()).addMethod(getListDevicesMethod()).addMethod(getGetDeviceMethod()).addMethod(getSetDeviceMethod()).addMethod(getRemoveDeviceMethod()).addMethod(getGetDeviceEventsMethod()).addMethod(getSelectDeviceMethod()).addMethod(getListEndPointNamesMethod()).addMethod(getListLinkIdsMethod()).addMethod(getListLinksMethod()).addMethod(getGetLinkMethod()).addMethod(getSetLinkMethod()).addMethod(getRemoveLinkMethod()).addMethod(getGetLinkEventsMethod()).addMethod(getListServiceIdsMethod()).addMethod(getListServicesMethod()).addMethod(getGetServiceMethod()).addMethod(getSetServiceMethod()).addMethod(getUnsetServiceMethod()).addMethod(getRemoveServiceMethod()).addMethod(getGetServiceEventsMethod()).addMethod(getSelectServiceMethod()).addMethod(getListSliceIdsMethod()).addMethod(getListSlicesMethod()).addMethod(getGetSliceMethod()).addMethod(getSetSliceMethod()).addMethod(getUnsetSliceMethod()).addMethod(getRemoveSliceMethod()).addMethod(getGetSliceEventsMethod()).addMethod(getSelectSliceMethod()).addMethod(getListConnectionIdsMethod()).addMethod(getListConnectionsMethod()).addMethod(getGetConnectionMethod()).addMethod(getSetConnectionMethod()).addMethod(getRemoveConnectionMethod()).addMethod(getGetConnectionEventsMethod()).addMethod(getGetOpticalConfigMethod()).addMethod(getSetOpticalConfigMethod()).addMethod(getSelectOpticalConfigMethod()).addMethod(getSetOpticalLinkMethod()).addMethod(getGetOpticalLinkMethod()).addMethod(getGetFiberMethod()).build(); + } + } + } + return result; + } } diff --git a/src/policy/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java b/src/policy/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java index 45d853aa7771c71679f1b7a67051a478b3f73be8..c6dbb1e92554dea8ee8d25b01bf87dd2cfa32551 100644 --- a/src/policy/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java @@ -6,18 +6,18 @@ import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: context.proto") -public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc { - private MutinyContextServiceGrpc() {} +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: context.proto") +public final class MutinyContextServiceGrpc implements io.quarkus.grpc.MutinyGrpc { + + private MutinyContextServiceGrpc() { + } public static MutinyContextServiceStub newMutinyStub(io.grpc.Channel channel) { return new MutinyContextServiceStub(channel); } - - public static final class MutinyContextServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub { + public static class MutinyContextServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.MutinyStub { + private ContextServiceGrpc.ContextServiceStub delegateStub; private MutinyContextServiceStub(io.grpc.Channel channel) { @@ -35,919 +35,593 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M return new MutinyContextServiceStub(channel, callOptions); } - public io.smallrye.mutiny.Uni listContextIds(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listContextIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listContextIds); } - public io.smallrye.mutiny.Uni listContexts(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listContexts); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listContexts); } - public io.smallrye.mutiny.Uni getContext(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getContext); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getContext); } - public io.smallrye.mutiny.Uni setContext(context.ContextOuterClass.Context request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setContext); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setContext); } - public io.smallrye.mutiny.Uni removeContext(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeContext); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeContext); } - public io.smallrye.mutiny.Uni listTopologyIds(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listTopologyIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listTopologyIds); } - public io.smallrye.mutiny.Uni listTopologies(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listTopologies); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listTopologies); } - public io.smallrye.mutiny.Uni getTopology(context.ContextOuterClass.TopologyId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getTopology); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getTopology); } - public io.smallrye.mutiny.Uni getTopologyDetails(context.ContextOuterClass.TopologyId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getTopologyDetails); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getTopologyDetails); } - public io.smallrye.mutiny.Uni setTopology(context.ContextOuterClass.Topology request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setTopology); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setTopology); } - public io.smallrye.mutiny.Uni removeTopology(context.ContextOuterClass.TopologyId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeTopology); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeTopology); } - public io.smallrye.mutiny.Uni listDeviceIds(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listDeviceIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listDeviceIds); } - public io.smallrye.mutiny.Uni listDevices(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listDevices); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listDevices); } - public io.smallrye.mutiny.Uni getDevice(context.ContextOuterClass.DeviceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getDevice); } - public io.smallrye.mutiny.Uni setDevice(context.ContextOuterClass.Device request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setDevice); } - public io.smallrye.mutiny.Uni removeDevice(context.ContextOuterClass.DeviceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeDevice); } - public io.smallrye.mutiny.Uni selectDevice(context.ContextOuterClass.DeviceFilter request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::selectDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::selectDevice); } - public io.smallrye.mutiny.Uni listEndPointNames(context.ContextOuterClass.EndPointIdList request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listEndPointNames); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listEndPointNames); } - public io.smallrye.mutiny.Uni listLinkIds(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listLinkIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listLinkIds); } - public io.smallrye.mutiny.Uni listLinks(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listLinks); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listLinks); } - public io.smallrye.mutiny.Uni getLink(context.ContextOuterClass.LinkId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getLink); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getLink); } - public io.smallrye.mutiny.Uni setLink(context.ContextOuterClass.Link request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setLink); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setLink); } - public io.smallrye.mutiny.Uni removeLink(context.ContextOuterClass.LinkId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeLink); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeLink); } - public io.smallrye.mutiny.Uni listServiceIds(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listServiceIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listServiceIds); } - public io.smallrye.mutiny.Uni listServices(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listServices); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listServices); } - public io.smallrye.mutiny.Uni getService(context.ContextOuterClass.ServiceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getService); } - public io.smallrye.mutiny.Uni setService(context.ContextOuterClass.Service request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setService); } - public io.smallrye.mutiny.Uni unsetService(context.ContextOuterClass.Service request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::unsetService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::unsetService); } - public io.smallrye.mutiny.Uni removeService(context.ContextOuterClass.ServiceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeService); } - public io.smallrye.mutiny.Uni selectService(context.ContextOuterClass.ServiceFilter request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::selectService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::selectService); } - public io.smallrye.mutiny.Uni listSliceIds(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listSliceIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listSliceIds); } - public io.smallrye.mutiny.Uni listSlices(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listSlices); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listSlices); } - public io.smallrye.mutiny.Uni getSlice(context.ContextOuterClass.SliceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getSlice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getSlice); } - public io.smallrye.mutiny.Uni setSlice(context.ContextOuterClass.Slice request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setSlice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setSlice); } - public io.smallrye.mutiny.Uni unsetSlice(context.ContextOuterClass.Slice request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::unsetSlice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::unsetSlice); } - public io.smallrye.mutiny.Uni removeSlice(context.ContextOuterClass.SliceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeSlice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeSlice); } - public io.smallrye.mutiny.Uni selectSlice(context.ContextOuterClass.SliceFilter request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::selectSlice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::selectSlice); } - public io.smallrye.mutiny.Uni listConnectionIds(context.ContextOuterClass.ServiceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listConnectionIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listConnectionIds); } - public io.smallrye.mutiny.Uni listConnections(context.ContextOuterClass.ServiceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listConnections); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listConnections); } - public io.smallrye.mutiny.Uni getConnection(context.ContextOuterClass.ConnectionId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getConnection); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getConnection); } - public io.smallrye.mutiny.Uni setConnection(context.ContextOuterClass.Connection request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setConnection); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setConnection); } - public io.smallrye.mutiny.Uni removeConnection(context.ContextOuterClass.ConnectionId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeConnection); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeConnection); + } + + /** + *
+         *  ------------------------------ Experimental -----------------------------
+         * 
+ */ + public io.smallrye.mutiny.Uni getOpticalConfig(context.ContextOuterClass.Empty request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getOpticalConfig); + } + + public io.smallrye.mutiny.Uni setOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setOpticalConfig); + } + + public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::selectOpticalConfig); + } + + public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setOpticalLink); + } + + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getOpticalLink); + } + + public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getFiber); } - public io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getContextEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getContextEvents); } - public io.smallrye.mutiny.Multi getTopologyEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getTopologyEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getTopologyEvents); } - public io.smallrye.mutiny.Multi getDeviceEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getDeviceEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getDeviceEvents); } - public io.smallrye.mutiny.Multi getLinkEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getLinkEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getLinkEvents); } - public io.smallrye.mutiny.Multi getServiceEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getServiceEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getServiceEvents); } - public io.smallrye.mutiny.Multi getSliceEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getSliceEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getSliceEvents); } - public io.smallrye.mutiny.Multi getConnectionEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getConnectionEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getConnectionEvents); } - } - public static abstract class ContextServiceImplBase implements io.grpc.BindableService { private String compression; + /** - * Set whether the server will try to use a compressed response. - * - * @param compression the compression, e.g {@code gzip} - */ + * Set whether the server will try to use a compressed response. + * + * @param compression the compression, e.g {@code gzip} + */ public ContextServiceImplBase withCompression(String compression) { - this.compression = compression; - return this; + this.compression = compression; + return this; } - - public io.smallrye.mutiny.Uni listContextIds(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listContexts(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getContext(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setContext(context.ContextOuterClass.Context request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeContext(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listTopologyIds(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listTopologies(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getTopology(context.ContextOuterClass.TopologyId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getTopologyDetails(context.ContextOuterClass.TopologyId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setTopology(context.ContextOuterClass.Topology request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeTopology(context.ContextOuterClass.TopologyId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listDeviceIds(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listDevices(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getDevice(context.ContextOuterClass.DeviceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setDevice(context.ContextOuterClass.Device request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeDevice(context.ContextOuterClass.DeviceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni selectDevice(context.ContextOuterClass.DeviceFilter request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listEndPointNames(context.ContextOuterClass.EndPointIdList request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listLinkIds(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listLinks(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getLink(context.ContextOuterClass.LinkId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setLink(context.ContextOuterClass.Link request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeLink(context.ContextOuterClass.LinkId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listServiceIds(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listServices(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getService(context.ContextOuterClass.ServiceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setService(context.ContextOuterClass.Service request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni unsetService(context.ContextOuterClass.Service request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeService(context.ContextOuterClass.ServiceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni selectService(context.ContextOuterClass.ServiceFilter request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listSliceIds(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listSlices(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getSlice(context.ContextOuterClass.SliceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setSlice(context.ContextOuterClass.Slice request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni unsetSlice(context.ContextOuterClass.Slice request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeSlice(context.ContextOuterClass.SliceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni selectSlice(context.ContextOuterClass.SliceFilter request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listConnectionIds(context.ContextOuterClass.ServiceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listConnections(context.ContextOuterClass.ServiceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getConnection(context.ContextOuterClass.ConnectionId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setConnection(context.ContextOuterClass.Connection request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeConnection(context.ContextOuterClass.ConnectionId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - + /** + *
+         *  ------------------------------ Experimental -----------------------------
+         * 
+ */ + public io.smallrye.mutiny.Uni getOpticalConfig(context.ContextOuterClass.Empty request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni setOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + public io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getTopologyEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getDeviceEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getLinkEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getServiceEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getSliceEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getConnectionEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - context.ContextServiceGrpc.getListContextIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.ContextIdList>( - this, METHODID_LIST_CONTEXT_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListContextsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.ContextList>( - this, METHODID_LIST_CONTEXTS, compression))) - .addMethod( - context.ContextServiceGrpc.getGetContextMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.Context>( - this, METHODID_GET_CONTEXT, compression))) - .addMethod( - context.ContextServiceGrpc.getSetContextMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Context, - context.ContextOuterClass.ContextId>( - this, METHODID_SET_CONTEXT, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveContextMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_CONTEXT, compression))) - .addMethod( - context.ContextServiceGrpc.getGetContextEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.ContextEvent>( - this, METHODID_GET_CONTEXT_EVENTS, compression))) - .addMethod( - context.ContextServiceGrpc.getListTopologyIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.TopologyIdList>( - this, METHODID_LIST_TOPOLOGY_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListTopologiesMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.TopologyList>( - this, METHODID_LIST_TOPOLOGIES, compression))) - .addMethod( - context.ContextServiceGrpc.getGetTopologyMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.TopologyId, - context.ContextOuterClass.Topology>( - this, METHODID_GET_TOPOLOGY, compression))) - .addMethod( - context.ContextServiceGrpc.getGetTopologyDetailsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.TopologyId, - context.ContextOuterClass.TopologyDetails>( - this, METHODID_GET_TOPOLOGY_DETAILS, compression))) - .addMethod( - context.ContextServiceGrpc.getSetTopologyMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Topology, - context.ContextOuterClass.TopologyId>( - this, METHODID_SET_TOPOLOGY, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveTopologyMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.TopologyId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_TOPOLOGY, compression))) - .addMethod( - context.ContextServiceGrpc.getGetTopologyEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.TopologyEvent>( - this, METHODID_GET_TOPOLOGY_EVENTS, compression))) - .addMethod( - context.ContextServiceGrpc.getListDeviceIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.DeviceIdList>( - this, METHODID_LIST_DEVICE_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListDevicesMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.DeviceList>( - this, METHODID_LIST_DEVICES, compression))) - .addMethod( - context.ContextServiceGrpc.getGetDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceId, - context.ContextOuterClass.Device>( - this, METHODID_GET_DEVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getSetDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Device, - context.ContextOuterClass.DeviceId>( - this, METHODID_SET_DEVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_DEVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getGetDeviceEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.DeviceEvent>( - this, METHODID_GET_DEVICE_EVENTS, compression))) - .addMethod( - context.ContextServiceGrpc.getSelectDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceFilter, - context.ContextOuterClass.DeviceList>( - this, METHODID_SELECT_DEVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getListEndPointNamesMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.EndPointIdList, - context.ContextOuterClass.EndPointNameList>( - this, METHODID_LIST_END_POINT_NAMES, compression))) - .addMethod( - context.ContextServiceGrpc.getListLinkIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.LinkIdList>( - this, METHODID_LIST_LINK_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListLinksMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.LinkList>( - this, METHODID_LIST_LINKS, compression))) - .addMethod( - context.ContextServiceGrpc.getGetLinkMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.LinkId, - context.ContextOuterClass.Link>( - this, METHODID_GET_LINK, compression))) - .addMethod( - context.ContextServiceGrpc.getSetLinkMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Link, - context.ContextOuterClass.LinkId>( - this, METHODID_SET_LINK, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveLinkMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.LinkId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_LINK, compression))) - .addMethod( - context.ContextServiceGrpc.getGetLinkEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.LinkEvent>( - this, METHODID_GET_LINK_EVENTS, compression))) - .addMethod( - context.ContextServiceGrpc.getListServiceIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.ServiceIdList>( - this, METHODID_LIST_SERVICE_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListServicesMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.ServiceList>( - this, METHODID_LIST_SERVICES, compression))) - .addMethod( - context.ContextServiceGrpc.getGetServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ServiceId, - context.ContextOuterClass.Service>( - this, METHODID_GET_SERVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getSetServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Service, - context.ContextOuterClass.ServiceId>( - this, METHODID_SET_SERVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getUnsetServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Service, - context.ContextOuterClass.ServiceId>( - this, METHODID_UNSET_SERVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ServiceId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_SERVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getGetServiceEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.ServiceEvent>( - this, METHODID_GET_SERVICE_EVENTS, compression))) - .addMethod( - context.ContextServiceGrpc.getSelectServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ServiceFilter, - context.ContextOuterClass.ServiceList>( - this, METHODID_SELECT_SERVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getListSliceIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.SliceIdList>( - this, METHODID_LIST_SLICE_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListSlicesMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.SliceList>( - this, METHODID_LIST_SLICES, compression))) - .addMethod( - context.ContextServiceGrpc.getGetSliceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.SliceId, - context.ContextOuterClass.Slice>( - this, METHODID_GET_SLICE, compression))) - .addMethod( - context.ContextServiceGrpc.getSetSliceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Slice, - context.ContextOuterClass.SliceId>( - this, METHODID_SET_SLICE, compression))) - .addMethod( - context.ContextServiceGrpc.getUnsetSliceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Slice, - context.ContextOuterClass.SliceId>( - this, METHODID_UNSET_SLICE, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveSliceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.SliceId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_SLICE, compression))) - .addMethod( - context.ContextServiceGrpc.getGetSliceEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.SliceEvent>( - this, METHODID_GET_SLICE_EVENTS, compression))) - .addMethod( - context.ContextServiceGrpc.getSelectSliceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.SliceFilter, - context.ContextOuterClass.SliceList>( - this, METHODID_SELECT_SLICE, compression))) - .addMethod( - context.ContextServiceGrpc.getListConnectionIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ServiceId, - context.ContextOuterClass.ConnectionIdList>( - this, METHODID_LIST_CONNECTION_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListConnectionsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ServiceId, - context.ContextOuterClass.ConnectionList>( - this, METHODID_LIST_CONNECTIONS, compression))) - .addMethod( - context.ContextServiceGrpc.getGetConnectionMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ConnectionId, - context.ContextOuterClass.Connection>( - this, METHODID_GET_CONNECTION, compression))) - .addMethod( - context.ContextServiceGrpc.getSetConnectionMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Connection, - context.ContextOuterClass.ConnectionId>( - this, METHODID_SET_CONNECTION, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveConnectionMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ConnectionId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_CONNECTION, compression))) - .addMethod( - context.ContextServiceGrpc.getGetConnectionEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.ConnectionEvent>( - this, METHODID_GET_CONNECTION_EVENTS, compression))) - .build(); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(context.ContextServiceGrpc.getListContextIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXT_IDS, compression))).addMethod(context.ContextServiceGrpc.getListContextsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXTS, compression))).addMethod(context.ContextServiceGrpc.getGetContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getSetContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getRemoveContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getGetContextEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONTEXT_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListTopologyIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGY_IDS, compression))).addMethod(context.ContextServiceGrpc.getListTopologiesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGIES, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyDetailsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_DETAILS, compression))).addMethod(context.ContextServiceGrpc.getSetTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getRemoveTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListDeviceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListDevicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICES, compression))).addMethod(context.ContextServiceGrpc.getGetDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getSetDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getGetDeviceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_DEVICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getListEndPointNamesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_END_POINT_NAMES, compression))).addMethod(context.ContextServiceGrpc.getListLinkIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINK_IDS, compression))).addMethod(context.ContextServiceGrpc.getListLinksMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINKS, compression))).addMethod(context.ContextServiceGrpc.getGetLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_LINK, compression))).addMethod(context.ContextServiceGrpc.getSetLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_LINK, compression))).addMethod(context.ContextServiceGrpc.getRemoveLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetLinkEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_LINK_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListServiceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListServicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICES, compression))).addMethod(context.ContextServiceGrpc.getGetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getSetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getUnsetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getGetServiceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SERVICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getListSliceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListSlicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICES, compression))).addMethod(context.ContextServiceGrpc.getGetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getSetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getUnsetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SLICE, compression))).addMethod(context.ContextServiceGrpc.getGetSliceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SLICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SLICE, compression))).addMethod(context.ContextServiceGrpc.getListConnectionIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTION_IDS, compression))).addMethod(context.ContextServiceGrpc.getListConnectionsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTIONS, compression))).addMethod(context.ContextServiceGrpc.getGetConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getSetConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getRemoveConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getGetConnectionEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONNECTION_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSetOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSelectOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSetOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetFiberMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_FIBER, compression))).build(); } } private static final int METHODID_LIST_CONTEXT_IDS = 0; + private static final int METHODID_LIST_CONTEXTS = 1; + private static final int METHODID_GET_CONTEXT = 2; + private static final int METHODID_SET_CONTEXT = 3; + private static final int METHODID_REMOVE_CONTEXT = 4; + private static final int METHODID_GET_CONTEXT_EVENTS = 5; + private static final int METHODID_LIST_TOPOLOGY_IDS = 6; + private static final int METHODID_LIST_TOPOLOGIES = 7; + private static final int METHODID_GET_TOPOLOGY = 8; + private static final int METHODID_GET_TOPOLOGY_DETAILS = 9; + private static final int METHODID_SET_TOPOLOGY = 10; + private static final int METHODID_REMOVE_TOPOLOGY = 11; + private static final int METHODID_GET_TOPOLOGY_EVENTS = 12; + private static final int METHODID_LIST_DEVICE_IDS = 13; + private static final int METHODID_LIST_DEVICES = 14; + private static final int METHODID_GET_DEVICE = 15; + private static final int METHODID_SET_DEVICE = 16; + private static final int METHODID_REMOVE_DEVICE = 17; + private static final int METHODID_GET_DEVICE_EVENTS = 18; + private static final int METHODID_SELECT_DEVICE = 19; + private static final int METHODID_LIST_END_POINT_NAMES = 20; + private static final int METHODID_LIST_LINK_IDS = 21; + private static final int METHODID_LIST_LINKS = 22; + private static final int METHODID_GET_LINK = 23; + private static final int METHODID_SET_LINK = 24; + private static final int METHODID_REMOVE_LINK = 25; + private static final int METHODID_GET_LINK_EVENTS = 26; + private static final int METHODID_LIST_SERVICE_IDS = 27; + private static final int METHODID_LIST_SERVICES = 28; + private static final int METHODID_GET_SERVICE = 29; + private static final int METHODID_SET_SERVICE = 30; + private static final int METHODID_UNSET_SERVICE = 31; + private static final int METHODID_REMOVE_SERVICE = 32; + private static final int METHODID_GET_SERVICE_EVENTS = 33; + private static final int METHODID_SELECT_SERVICE = 34; + private static final int METHODID_LIST_SLICE_IDS = 35; + private static final int METHODID_LIST_SLICES = 36; + private static final int METHODID_GET_SLICE = 37; + private static final int METHODID_SET_SLICE = 38; + private static final int METHODID_UNSET_SLICE = 39; + private static final int METHODID_REMOVE_SLICE = 40; + private static final int METHODID_GET_SLICE_EVENTS = 41; + private static final int METHODID_SELECT_SLICE = 42; + private static final int METHODID_LIST_CONNECTION_IDS = 43; + private static final int METHODID_LIST_CONNECTIONS = 44; + private static final int METHODID_GET_CONNECTION = 45; + private static final int METHODID_SET_CONNECTION = 46; + private static final int METHODID_REMOVE_CONNECTION = 47; + private static final int METHODID_GET_CONNECTION_EVENTS = 48; - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final int METHODID_GET_OPTICAL_CONFIG = 49; + + private static final int METHODID_SET_OPTICAL_CONFIG = 50; + + private static final int METHODID_SELECT_OPTICAL_CONFIG = 51; + + private static final int METHODID_SET_OPTICAL_LINK = 52; + + private static final int METHODID_GET_OPTICAL_LINK = 53; + + private static final int METHODID_GET_FIBER = 54; + + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ContextServiceImplBase serviceImpl; + private final int methodId; + private final String compression; MethodHandlers(ContextServiceImplBase serviceImpl, int methodId, String compression) { @@ -959,300 +633,171 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { case METHODID_LIST_CONTEXT_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listContextIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listContextIds); break; case METHODID_LIST_CONTEXTS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listContexts); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listContexts); break; case METHODID_GET_CONTEXT: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getContext); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getContext); break; case METHODID_SET_CONTEXT: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Context) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setContext); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Context) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setContext); break; case METHODID_REMOVE_CONTEXT: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeContext); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeContext); break; case METHODID_GET_CONTEXT_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getContextEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getContextEvents); break; case METHODID_LIST_TOPOLOGY_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listTopologyIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listTopologyIds); break; case METHODID_LIST_TOPOLOGIES: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listTopologies); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listTopologies); break; case METHODID_GET_TOPOLOGY: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.TopologyId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getTopology); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.TopologyId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getTopology); break; case METHODID_GET_TOPOLOGY_DETAILS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.TopologyId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getTopologyDetails); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.TopologyId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getTopologyDetails); break; case METHODID_SET_TOPOLOGY: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Topology) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setTopology); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Topology) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setTopology); break; case METHODID_REMOVE_TOPOLOGY: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.TopologyId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeTopology); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.TopologyId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeTopology); break; case METHODID_GET_TOPOLOGY_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getTopologyEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getTopologyEvents); break; case METHODID_LIST_DEVICE_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listDeviceIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listDeviceIds); break; case METHODID_LIST_DEVICES: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listDevices); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listDevices); break; case METHODID_GET_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getDevice); break; case METHODID_SET_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Device) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Device) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setDevice); break; case METHODID_REMOVE_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeDevice); break; case METHODID_GET_DEVICE_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getDeviceEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getDeviceEvents); break; case METHODID_SELECT_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceFilter) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::selectDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.DeviceFilter) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::selectDevice); break; case METHODID_LIST_END_POINT_NAMES: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.EndPointIdList) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listEndPointNames); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.EndPointIdList) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listEndPointNames); break; case METHODID_LIST_LINK_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listLinkIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listLinkIds); break; case METHODID_LIST_LINKS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listLinks); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listLinks); break; case METHODID_GET_LINK: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.LinkId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getLink); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getLink); break; case METHODID_SET_LINK: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Link) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setLink); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Link) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setLink); break; case METHODID_REMOVE_LINK: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.LinkId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeLink); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeLink); break; case METHODID_GET_LINK_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getLinkEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getLinkEvents); break; case METHODID_LIST_SERVICE_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listServiceIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listServiceIds); break; case METHODID_LIST_SERVICES: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listServices); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listServices); break; case METHODID_GET_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getService); break; case METHODID_SET_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setService); break; case METHODID_UNSET_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::unsetService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::unsetService); break; case METHODID_REMOVE_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeService); break; case METHODID_GET_SERVICE_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getServiceEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getServiceEvents); break; case METHODID_SELECT_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceFilter) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::selectService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceFilter) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::selectService); break; case METHODID_LIST_SLICE_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listSliceIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listSliceIds); break; case METHODID_LIST_SLICES: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listSlices); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listSlices); break; case METHODID_GET_SLICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.SliceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getSlice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.SliceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getSlice); break; case METHODID_SET_SLICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Slice) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setSlice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Slice) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setSlice); break; case METHODID_UNSET_SLICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Slice) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::unsetSlice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Slice) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::unsetSlice); break; case METHODID_REMOVE_SLICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.SliceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeSlice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.SliceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeSlice); break; case METHODID_GET_SLICE_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getSliceEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getSliceEvents); break; case METHODID_SELECT_SLICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.SliceFilter) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::selectSlice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.SliceFilter) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::selectSlice); break; case METHODID_LIST_CONNECTION_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listConnectionIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listConnectionIds); break; case METHODID_LIST_CONNECTIONS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listConnections); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listConnections); break; case METHODID_GET_CONNECTION: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ConnectionId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getConnection); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ConnectionId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getConnection); break; case METHODID_SET_CONNECTION: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Connection) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setConnection); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Connection) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setConnection); break; case METHODID_REMOVE_CONNECTION: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ConnectionId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeConnection); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ConnectionId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeConnection); break; case METHODID_GET_CONNECTION_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getConnectionEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getConnectionEvents); + break; + case METHODID_GET_OPTICAL_CONFIG: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getOpticalConfig); + break; + case METHODID_SET_OPTICAL_CONFIG: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setOpticalConfig); + break; + case METHODID_SELECT_OPTICAL_CONFIG: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfigId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::selectOpticalConfig); + break; + case METHODID_SET_OPTICAL_LINK: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalLink) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setOpticalLink); + break; + case METHODID_GET_OPTICAL_LINK: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalLinkId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getOpticalLink); + break; + case METHODID_GET_FIBER: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.FiberId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getFiber); break; default: throw new java.lang.AssertionError(); @@ -1262,11 +807,10 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { default: throw new java.lang.AssertionError(); } } } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/context_policy/ContextPolicy.java b/src/policy/target/generated-sources/grpc/context_policy/ContextPolicy.java index a9733c32dd5f7365d770227edff3bd2a784cd013..d835e97e6c6ca3fc7fecdbc9c05926d155e97ce9 100644 --- a/src/policy/target/generated-sources/grpc/context_policy/ContextPolicy.java +++ b/src/policy/target/generated-sources/grpc/context_policy/ContextPolicy.java @@ -1,49 +1,30 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: context_policy.proto - package context_policy; public final class ContextPolicy { - private ContextPolicy() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } + private ContextPolicy() { + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\024context_policy.proto\022\016context_policy\032\r" + - "context.proto\032\014policy.proto2\312\002\n\024ContextP" + - "olicyService\022?\n\021ListPolicyRuleIds\022\016.cont" + - "ext.Empty\032\030.policy.PolicyRuleIdList\"\000\022;\n" + - "\017ListPolicyRules\022\016.context.Empty\032\026.polic" + - "y.PolicyRuleList\"\000\022;\n\rGetPolicyRule\022\024.po" + - "licy.PolicyRuleId\032\022.policy.PolicyRule\"\000\022" + - ";\n\rSetPolicyRule\022\022.policy.PolicyRule\032\024.p" + - "olicy.PolicyRuleId\"\000\022:\n\020RemovePolicyRule" + - "\022\024.policy.PolicyRuleId\032\016.context.Empty\"\000" + - "b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - context.ContextOuterClass.getDescriptor(), - policy.Policy.getDescriptor(), - }); - context.ContextOuterClass.getDescriptor(); - policy.Policy.getDescriptor(); - } + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - // @@protoc_insertion_point(outer_class_scope) + static { + java.lang.String[] descriptorData = { "\n\024context_policy.proto\022\016context_policy\032\r" + "context.proto\032\014policy.proto2\312\002\n\024ContextP" + "olicyService\022?\n\021ListPolicyRuleIds\022\016.cont" + "ext.Empty\032\030.policy.PolicyRuleIdList\"\000\022;\n" + "\017ListPolicyRules\022\016.context.Empty\032\026.polic" + "y.PolicyRuleList\"\000\022;\n\rGetPolicyRule\022\024.po" + "licy.PolicyRuleId\032\022.policy.PolicyRule\"\000\022" + ";\n\rSetPolicyRule\022\022.policy.PolicyRule\032\024.p" + "olicy.PolicyRuleId\"\000\022:\n\020RemovePolicyRule" + "\022\024.policy.PolicyRuleId\032\016.context.Empty\"\000" + "b\006proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { context.ContextOuterClass.getDescriptor(), policy.Policy.getDescriptor() }); + context.ContextOuterClass.getDescriptor(); + policy.Policy.getDescriptor(); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyService.java b/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyService.java index 7db1a40535bcf32ff15700ebc30c12d6f5aced2d..4302b7b73fd81af97e04dc5ca6c381eeabab3695 100644 --- a/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyService.java +++ b/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyService.java @@ -1,24 +1,17 @@ package context_policy; -import io.quarkus.grpc.runtime.MutinyService; +import io.quarkus.grpc.MutinyService; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: context_policy.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: context_policy.proto") public interface ContextPolicyService extends MutinyService { - io.smallrye.mutiny.Uni listPolicyRuleIds(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni listPolicyRules(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni getPolicyRule(policy.Policy.PolicyRuleId request); - + io.smallrye.mutiny.Uni setPolicyRule(policy.Policy.PolicyRule request); - - io.smallrye.mutiny.Uni removePolicyRule(policy.Policy.PolicyRuleId request); - - - -} \ No newline at end of file + io.smallrye.mutiny.Uni removePolicyRule(policy.Policy.PolicyRuleId request); +} diff --git a/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceBean.java b/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceBean.java index 81b170e15600a2c9b79bcfc8e0d63027dccc1d94..eba313907a55fde9563e9df0d65c92a9aef4155b 100644 --- a/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceBean.java +++ b/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceBean.java @@ -2,58 +2,59 @@ package context_policy; import io.grpc.BindableService; import io.quarkus.grpc.GrpcService; -import io.quarkus.grpc.runtime.MutinyBean; +import io.quarkus.grpc.MutinyBean; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: context_policy.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: context_policy.proto") public class ContextPolicyServiceBean extends MutinyContextPolicyServiceGrpc.ContextPolicyServiceImplBase implements BindableService, MutinyBean { private final ContextPolicyService delegate; ContextPolicyServiceBean(@GrpcService ContextPolicyService delegate) { - this.delegate = delegate; + this.delegate = delegate; } @Override public io.smallrye.mutiny.Uni listPolicyRuleIds(context.ContextOuterClass.Empty request) { - try { - return delegate.listPolicyRuleIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listPolicyRuleIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listPolicyRules(context.ContextOuterClass.Empty request) { - try { - return delegate.listPolicyRules(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listPolicyRules(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getPolicyRule(policy.Policy.PolicyRuleId request) { - try { - return delegate.getPolicyRule(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getPolicyRule(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setPolicyRule(policy.Policy.PolicyRule request) { - try { - return delegate.setPolicyRule(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setPolicyRule(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removePolicyRule(policy.Policy.PolicyRuleId request) { - try { - return delegate.removePolicyRule(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removePolicyRule(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceClient.java b/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceClient.java index 4404d4ec7aa41d7339072efbe0c428b64b02d322..d03c816f2b7346ddad77d9e24d6ffb63528a6d1a 100644 --- a/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceClient.java +++ b/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceClient.java @@ -1,44 +1,52 @@ package context_policy; import java.util.function.BiFunction; +import io.quarkus.grpc.MutinyClient; -import io.quarkus.grpc.runtime.MutinyClient; - -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: context_policy.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: context_policy.proto") public class ContextPolicyServiceClient implements ContextPolicyService, MutinyClient { private final MutinyContextPolicyServiceGrpc.MutinyContextPolicyServiceStub stub; public ContextPolicyServiceClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) { - this.stub = stubConfigurator.apply(name,MutinyContextPolicyServiceGrpc.newMutinyStub(channel)); + this.stub = stubConfigurator.apply(name, MutinyContextPolicyServiceGrpc.newMutinyStub(channel)); + } + + private ContextPolicyServiceClient(MutinyContextPolicyServiceGrpc.MutinyContextPolicyServiceStub stub) { + this.stub = stub; + } + + public ContextPolicyServiceClient newInstanceWithStub(MutinyContextPolicyServiceGrpc.MutinyContextPolicyServiceStub stub) { + return new ContextPolicyServiceClient(stub); } @Override public MutinyContextPolicyServiceGrpc.MutinyContextPolicyServiceStub getStub() { - return stub; + return stub; } @Override public io.smallrye.mutiny.Uni listPolicyRuleIds(context.ContextOuterClass.Empty request) { - return stub.listPolicyRuleIds(request); + return stub.listPolicyRuleIds(request); } + @Override public io.smallrye.mutiny.Uni listPolicyRules(context.ContextOuterClass.Empty request) { - return stub.listPolicyRules(request); + return stub.listPolicyRules(request); } + @Override public io.smallrye.mutiny.Uni getPolicyRule(policy.Policy.PolicyRuleId request) { - return stub.getPolicyRule(request); + return stub.getPolicyRule(request); } + @Override public io.smallrye.mutiny.Uni setPolicyRule(policy.Policy.PolicyRule request) { - return stub.setPolicyRule(request); + return stub.setPolicyRule(request); } + @Override public io.smallrye.mutiny.Uni removePolicyRule(policy.Policy.PolicyRuleId request) { - return stub.removePolicyRule(request); + return stub.removePolicyRule(request); } - -} \ No newline at end of file +} 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 0f5619bde979307a95dcdc101bae513f48677dd8..f7123f88ff428fc2d67fc631e10d563dc9b224f8 100644 --- a/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceGrpc.java @@ -7,580 +7,419 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; * created as a separate service to prevent import-loops in context and policy * */ -@javax.annotation.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.38.1)", comments = "Source: context_policy.proto") public final class ContextPolicyServiceGrpc { - private ContextPolicyServiceGrpc() {} + private ContextPolicyServiceGrpc() { + } - public static final String SERVICE_NAME = "context_policy.ContextPolicyService"; + public static final String SERVICE_NAME = "context_policy.ContextPolicyService"; - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getListPolicyRuleIdsMethod; + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListPolicyRuleIdsMethod; - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListPolicyRuleIds", - requestType = context.ContextOuterClass.Empty.class, - responseType = policy.Policy.PolicyRuleIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListPolicyRuleIdsMethod() { - io.grpc.MethodDescriptor getListPolicyRuleIdsMethod; - if ((getListPolicyRuleIdsMethod = ContextPolicyServiceGrpc.getListPolicyRuleIdsMethod) == null) { - synchronized (ContextPolicyServiceGrpc.class) { + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListPolicyRuleIds", requestType = context.ContextOuterClass.Empty.class, responseType = policy.Policy.PolicyRuleIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListPolicyRuleIdsMethod() { + io.grpc.MethodDescriptor getListPolicyRuleIdsMethod; if ((getListPolicyRuleIdsMethod = ContextPolicyServiceGrpc.getListPolicyRuleIdsMethod) == null) { - ContextPolicyServiceGrpc.getListPolicyRuleIdsMethod = getListPolicyRuleIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPolicyRuleIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextPolicyServiceMethodDescriptorSupplier("ListPolicyRuleIds")) - .build(); - } - } + synchronized (ContextPolicyServiceGrpc.class) { + if ((getListPolicyRuleIdsMethod = ContextPolicyServiceGrpc.getListPolicyRuleIdsMethod) == null) { + ContextPolicyServiceGrpc.getListPolicyRuleIdsMethod = getListPolicyRuleIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPolicyRuleIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleIdList.getDefaultInstance())).setSchemaDescriptor(new ContextPolicyServiceMethodDescriptorSupplier("ListPolicyRuleIds")).build(); + } + } + } + return getListPolicyRuleIdsMethod; } - return getListPolicyRuleIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListPolicyRulesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListPolicyRules", - requestType = context.ContextOuterClass.Empty.class, - responseType = policy.Policy.PolicyRuleList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListPolicyRulesMethod() { - io.grpc.MethodDescriptor getListPolicyRulesMethod; - if ((getListPolicyRulesMethod = ContextPolicyServiceGrpc.getListPolicyRulesMethod) == null) { - synchronized (ContextPolicyServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getListPolicyRulesMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListPolicyRules", requestType = context.ContextOuterClass.Empty.class, responseType = policy.Policy.PolicyRuleList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListPolicyRulesMethod() { + io.grpc.MethodDescriptor getListPolicyRulesMethod; if ((getListPolicyRulesMethod = ContextPolicyServiceGrpc.getListPolicyRulesMethod) == null) { - ContextPolicyServiceGrpc.getListPolicyRulesMethod = getListPolicyRulesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPolicyRules")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleList.getDefaultInstance())) - .setSchemaDescriptor(new ContextPolicyServiceMethodDescriptorSupplier("ListPolicyRules")) - .build(); - } - } + synchronized (ContextPolicyServiceGrpc.class) { + if ((getListPolicyRulesMethod = ContextPolicyServiceGrpc.getListPolicyRulesMethod) == null) { + ContextPolicyServiceGrpc.getListPolicyRulesMethod = getListPolicyRulesMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPolicyRules")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleList.getDefaultInstance())).setSchemaDescriptor(new ContextPolicyServiceMethodDescriptorSupplier("ListPolicyRules")).build(); + } + } + } + return getListPolicyRulesMethod; } - return getListPolicyRulesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetPolicyRuleMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetPolicyRule", - requestType = policy.Policy.PolicyRuleId.class, - responseType = policy.Policy.PolicyRule.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetPolicyRuleMethod() { - io.grpc.MethodDescriptor getGetPolicyRuleMethod; - if ((getGetPolicyRuleMethod = ContextPolicyServiceGrpc.getGetPolicyRuleMethod) == null) { - synchronized (ContextPolicyServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetPolicyRuleMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetPolicyRule", requestType = policy.Policy.PolicyRuleId.class, responseType = policy.Policy.PolicyRule.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetPolicyRuleMethod() { + io.grpc.MethodDescriptor getGetPolicyRuleMethod; if ((getGetPolicyRuleMethod = ContextPolicyServiceGrpc.getGetPolicyRuleMethod) == null) { - ContextPolicyServiceGrpc.getGetPolicyRuleMethod = getGetPolicyRuleMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyRule")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRule.getDefaultInstance())) - .setSchemaDescriptor(new ContextPolicyServiceMethodDescriptorSupplier("GetPolicyRule")) - .build(); - } - } + synchronized (ContextPolicyServiceGrpc.class) { + if ((getGetPolicyRuleMethod = ContextPolicyServiceGrpc.getGetPolicyRuleMethod) == null) { + ContextPolicyServiceGrpc.getGetPolicyRuleMethod = getGetPolicyRuleMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyRule")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRule.getDefaultInstance())).setSchemaDescriptor(new ContextPolicyServiceMethodDescriptorSupplier("GetPolicyRule")).build(); + } + } + } + return getGetPolicyRuleMethod; } - return getGetPolicyRuleMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetPolicyRuleMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetPolicyRule", - requestType = policy.Policy.PolicyRule.class, - responseType = policy.Policy.PolicyRuleId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetPolicyRuleMethod() { - io.grpc.MethodDescriptor getSetPolicyRuleMethod; - if ((getSetPolicyRuleMethod = ContextPolicyServiceGrpc.getSetPolicyRuleMethod) == null) { - synchronized (ContextPolicyServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getSetPolicyRuleMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetPolicyRule", requestType = policy.Policy.PolicyRule.class, responseType = policy.Policy.PolicyRuleId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetPolicyRuleMethod() { + io.grpc.MethodDescriptor getSetPolicyRuleMethod; if ((getSetPolicyRuleMethod = ContextPolicyServiceGrpc.getSetPolicyRuleMethod) == null) { - ContextPolicyServiceGrpc.getSetPolicyRuleMethod = getSetPolicyRuleMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetPolicyRule")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRule.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleId.getDefaultInstance())) - .setSchemaDescriptor(new ContextPolicyServiceMethodDescriptorSupplier("SetPolicyRule")) - .build(); - } - } - } - return getSetPolicyRuleMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemovePolicyRuleMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemovePolicyRule", - requestType = policy.Policy.PolicyRuleId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemovePolicyRuleMethod() { - io.grpc.MethodDescriptor getRemovePolicyRuleMethod; - if ((getRemovePolicyRuleMethod = ContextPolicyServiceGrpc.getRemovePolicyRuleMethod) == null) { - synchronized (ContextPolicyServiceGrpc.class) { - if ((getRemovePolicyRuleMethod = ContextPolicyServiceGrpc.getRemovePolicyRuleMethod) == null) { - ContextPolicyServiceGrpc.getRemovePolicyRuleMethod = getRemovePolicyRuleMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemovePolicyRule")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextPolicyServiceMethodDescriptorSupplier("RemovePolicyRule")) - .build(); - } - } - } - return getRemovePolicyRuleMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ContextPolicyServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ContextPolicyServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextPolicyServiceStub(channel, callOptions); - } - }; - return ContextPolicyServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ContextPolicyServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ContextPolicyServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextPolicyServiceBlockingStub(channel, callOptions); - } - }; - return ContextPolicyServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ContextPolicyServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ContextPolicyServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextPolicyServiceFutureStub(channel, callOptions); + synchronized (ContextPolicyServiceGrpc.class) { + if ((getSetPolicyRuleMethod = ContextPolicyServiceGrpc.getSetPolicyRuleMethod) == null) { + ContextPolicyServiceGrpc.getSetPolicyRuleMethod = getSetPolicyRuleMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetPolicyRule")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRule.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleId.getDefaultInstance())).setSchemaDescriptor(new ContextPolicyServiceMethodDescriptorSupplier("SetPolicyRule")).build(); + } + } } - }; - return ContextPolicyServiceFutureStub.newStub(factory, channel); - } + return getSetPolicyRuleMethod; + } - /** - *
-   * created as a separate service to prevent import-loops in context and policy
-   * 
- */ - public static abstract class ContextPolicyServiceImplBase implements io.grpc.BindableService { + private static volatile io.grpc.MethodDescriptor getRemovePolicyRuleMethod; - /** - */ - public void listPolicyRuleIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListPolicyRuleIdsMethod(), responseObserver); + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemovePolicyRule", requestType = policy.Policy.PolicyRuleId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemovePolicyRuleMethod() { + io.grpc.MethodDescriptor getRemovePolicyRuleMethod; + if ((getRemovePolicyRuleMethod = ContextPolicyServiceGrpc.getRemovePolicyRuleMethod) == null) { + synchronized (ContextPolicyServiceGrpc.class) { + if ((getRemovePolicyRuleMethod = ContextPolicyServiceGrpc.getRemovePolicyRuleMethod) == null) { + ContextPolicyServiceGrpc.getRemovePolicyRuleMethod = getRemovePolicyRuleMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemovePolicyRule")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextPolicyServiceMethodDescriptorSupplier("RemovePolicyRule")).build(); + } + } + } + return getRemovePolicyRuleMethod; } /** + * Creates a new async stub that supports all call types for the service */ - public void listPolicyRules(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListPolicyRulesMethod(), responseObserver); + public static ContextPolicyServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ContextPolicyServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextPolicyServiceStub(channel, callOptions); + } + }; + return ContextPolicyServiceStub.newStub(factory, channel); } /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public void getPolicyRule(policy.Policy.PolicyRuleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyRuleMethod(), responseObserver); + public static ContextPolicyServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ContextPolicyServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextPolicyServiceBlockingStub(channel, callOptions); + } + }; + return ContextPolicyServiceBlockingStub.newStub(factory, channel); } /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public void setPolicyRule(policy.Policy.PolicyRule request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetPolicyRuleMethod(), responseObserver); + public static ContextPolicyServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ContextPolicyServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextPolicyServiceFutureStub(channel, callOptions); + } + }; + return ContextPolicyServiceFutureStub.newStub(factory, channel); } /** + *
+     * created as a separate service to prevent import-loops in context and policy
+     * 
*/ - public void removePolicyRule(policy.Policy.PolicyRuleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemovePolicyRuleMethod(), responseObserver); - } + public static abstract class ContextPolicyServiceImplBase implements io.grpc.BindableService { - @java.lang.Override public final 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(); - } - } - - /** - *
-   * created as a separate service to prevent import-loops in context and policy
-   * 
- */ - public static final class ContextPolicyServiceStub extends io.grpc.stub.AbstractAsyncStub { - private ContextPolicyServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void listPolicyRuleIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListPolicyRuleIdsMethod(), responseObserver); + } - @java.lang.Override - protected ContextPolicyServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextPolicyServiceStub(channel, callOptions); - } + /** + */ + public void listPolicyRules(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListPolicyRulesMethod(), responseObserver); + } - /** - */ - public void listPolicyRuleIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListPolicyRuleIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getPolicyRule(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyRuleMethod(), responseObserver); + } - /** - */ - public void listPolicyRules(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListPolicyRulesMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void setPolicyRule(policy.Policy.PolicyRule request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetPolicyRuleMethod(), responseObserver); + } - /** - */ - public void getPolicyRule(policy.Policy.PolicyRuleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetPolicyRuleMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void removePolicyRule(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemovePolicyRuleMethod(), responseObserver); + } - /** - */ - public void setPolicyRule(policy.Policy.PolicyRule request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetPolicyRuleMethod(), getCallOptions()), request, responseObserver); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getListPolicyRuleIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_POLICY_RULE_IDS))).addMethod(getListPolicyRulesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_POLICY_RULES))).addMethod(getGetPolicyRuleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_POLICY_RULE))).addMethod(getSetPolicyRuleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_POLICY_RULE))).addMethod(getRemovePolicyRuleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_POLICY_RULE))).build(); + } } /** + *
+     * created as a separate service to prevent import-loops in context and policy
+     * 
*/ - public void removePolicyRule(policy.Policy.PolicyRuleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemovePolicyRuleMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * created as a separate service to prevent import-loops in context and policy
-   * 
- */ - public static final class ContextPolicyServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ContextPolicyServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + public static class ContextPolicyServiceStub extends io.grpc.stub.AbstractAsyncStub { - @java.lang.Override - protected ContextPolicyServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextPolicyServiceBlockingStub(channel, callOptions); - } + private ContextPolicyServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public policy.Policy.PolicyRuleIdList listPolicyRuleIds(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListPolicyRuleIdsMethod(), getCallOptions(), request); - } + @java.lang.Override + protected ContextPolicyServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextPolicyServiceStub(channel, callOptions); + } - /** - */ - public policy.Policy.PolicyRuleList listPolicyRules(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListPolicyRulesMethod(), getCallOptions(), request); - } + /** + */ + public void listPolicyRuleIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListPolicyRuleIdsMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public policy.Policy.PolicyRule getPolicyRule(policy.Policy.PolicyRuleId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetPolicyRuleMethod(), getCallOptions(), request); - } + /** + */ + public void listPolicyRules(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListPolicyRulesMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public policy.Policy.PolicyRuleId setPolicyRule(policy.Policy.PolicyRule request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetPolicyRuleMethod(), getCallOptions(), request); - } + /** + */ + public void getPolicyRule(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetPolicyRuleMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty removePolicyRule(policy.Policy.PolicyRuleId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemovePolicyRuleMethod(), getCallOptions(), request); - } - } - - /** - *
-   * created as a separate service to prevent import-loops in context and policy
-   * 
- */ - public static final class ContextPolicyServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private ContextPolicyServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void setPolicyRule(policy.Policy.PolicyRule request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetPolicyRuleMethod(), getCallOptions()), request, responseObserver); + } - @java.lang.Override - protected ContextPolicyServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextPolicyServiceFutureStub(channel, callOptions); + /** + */ + public void removePolicyRule(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemovePolicyRuleMethod(), getCallOptions()), request, responseObserver); + } } /** + *
+     * created as a separate service to prevent import-loops in context and policy
+     * 
*/ - public com.google.common.util.concurrent.ListenableFuture listPolicyRuleIds( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListPolicyRuleIdsMethod(), getCallOptions()), request); - } + public static class ContextPolicyServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - /** - */ - public com.google.common.util.concurrent.ListenableFuture listPolicyRules( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListPolicyRulesMethod(), getCallOptions()), request); - } + private ContextPolicyServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getPolicyRule( - policy.Policy.PolicyRuleId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetPolicyRuleMethod(), getCallOptions()), request); - } + @java.lang.Override + protected ContextPolicyServiceBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextPolicyServiceBlockingStub(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture setPolicyRule( - policy.Policy.PolicyRule request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetPolicyRuleMethod(), getCallOptions()), request); + /** + */ + public policy.Policy.PolicyRuleIdList listPolicyRuleIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListPolicyRuleIdsMethod(), getCallOptions(), request); + } + + /** + */ + public policy.Policy.PolicyRuleList listPolicyRules(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListPolicyRulesMethod(), getCallOptions(), request); + } + + /** + */ + public policy.Policy.PolicyRule getPolicyRule(policy.Policy.PolicyRuleId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetPolicyRuleMethod(), getCallOptions(), request); + } + + /** + */ + public policy.Policy.PolicyRuleId setPolicyRule(policy.Policy.PolicyRule request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetPolicyRuleMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty removePolicyRule(policy.Policy.PolicyRuleId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemovePolicyRuleMethod(), getCallOptions(), request); + } } /** + *
+     * created as a separate service to prevent import-loops in context and policy
+     * 
*/ - public com.google.common.util.concurrent.ListenableFuture removePolicyRule( - policy.Policy.PolicyRuleId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemovePolicyRuleMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_POLICY_RULE_IDS = 0; - private static final int METHODID_LIST_POLICY_RULES = 1; - private static final int METHODID_GET_POLICY_RULE = 2; - private static final int METHODID_SET_POLICY_RULE = 3; - private static final int METHODID_REMOVE_POLICY_RULE = 4; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ContextPolicyServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ContextPolicyServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } + public static class ContextPolicyServiceFutureStub extends io.grpc.stub.AbstractFutureStub { + + private ContextPolicyServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ContextPolicyServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextPolicyServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture listPolicyRuleIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListPolicyRuleIdsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture listPolicyRules(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListPolicyRulesMethod(), getCallOptions()), request); + } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_POLICY_RULE_IDS: - serviceImpl.listPolicyRuleIds((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_POLICY_RULES: - serviceImpl.listPolicyRules((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_POLICY_RULE: - serviceImpl.getPolicyRule((policy.Policy.PolicyRuleId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_POLICY_RULE: - serviceImpl.setPolicyRule((policy.Policy.PolicyRule) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_POLICY_RULE: - serviceImpl.removePolicyRule((policy.Policy.PolicyRuleId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getPolicyRule(policy.Policy.PolicyRuleId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetPolicyRuleMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture setPolicyRule(policy.Policy.PolicyRule request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetPolicyRuleMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture removePolicyRule(policy.Policy.PolicyRuleId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemovePolicyRuleMethod(), getCallOptions()), request); + } } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } + private static final int METHODID_LIST_POLICY_RULE_IDS = 0; + + private static final int METHODID_LIST_POLICY_RULES = 1; + + private static final int METHODID_GET_POLICY_RULE = 2; + + private static final int METHODID_SET_POLICY_RULE = 3; + + private static final int METHODID_REMOVE_POLICY_RULE = 4; + + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + + private final ContextPolicyServiceImplBase serviceImpl; + + private final int methodId; + + MethodHandlers(ContextPolicyServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + case METHODID_LIST_POLICY_RULE_IDS: + serviceImpl.listPolicyRuleIds((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_POLICY_RULES: + serviceImpl.listPolicyRules((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_POLICY_RULE: + serviceImpl.getPolicyRule((policy.Policy.PolicyRuleId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_POLICY_RULE: + serviceImpl.setPolicyRule((policy.Policy.PolicyRule) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_POLICY_RULE: + serviceImpl.removePolicyRule((policy.Policy.PolicyRuleId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + default: + throw new AssertionError(); + } + } } - } - private static abstract class ContextPolicyServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ContextPolicyServiceBaseDescriptorSupplier() {} + private static abstract class ContextPolicyServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + + ContextPolicyServiceBaseDescriptorSupplier() { + } - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return context_policy.ContextPolicy.getDescriptor(); + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return context_policy.ContextPolicy.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ContextPolicyService"); + } } - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ContextPolicyService"); + private static final class ContextPolicyServiceFileDescriptorSupplier extends ContextPolicyServiceBaseDescriptorSupplier { + + ContextPolicyServiceFileDescriptorSupplier() { + } } - } - private static final class ContextPolicyServiceFileDescriptorSupplier - extends ContextPolicyServiceBaseDescriptorSupplier { - ContextPolicyServiceFileDescriptorSupplier() {} - } + private static final class ContextPolicyServiceMethodDescriptorSupplier extends ContextPolicyServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private static final class ContextPolicyServiceMethodDescriptorSupplier - extends ContextPolicyServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final String methodName; - ContextPolicyServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } + ContextPolicyServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } } - } - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ContextPolicyServiceGrpc.class) { - result = serviceDescriptor; + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ContextPolicyServiceFileDescriptorSupplier()) - .addMethod(getListPolicyRuleIdsMethod()) - .addMethod(getListPolicyRulesMethod()) - .addMethod(getGetPolicyRuleMethod()) - .addMethod(getSetPolicyRuleMethod()) - .addMethod(getRemovePolicyRuleMethod()) - .build(); - } - } + synchronized (ContextPolicyServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new ContextPolicyServiceFileDescriptorSupplier()).addMethod(getListPolicyRuleIdsMethod()).addMethod(getListPolicyRulesMethod()).addMethod(getGetPolicyRuleMethod()).addMethod(getSetPolicyRuleMethod()).addMethod(getRemovePolicyRuleMethod()).build(); + } + } + } + return result; } - return result; - } } diff --git a/src/policy/target/generated-sources/grpc/context_policy/MutinyContextPolicyServiceGrpc.java b/src/policy/target/generated-sources/grpc/context_policy/MutinyContextPolicyServiceGrpc.java index 5ead19433d4507abeedcbd7d16626f700d1daa1e..e9babb5a0c3243acd1de3cd10f90f7fe678d4330 100644 --- a/src/policy/target/generated-sources/grpc/context_policy/MutinyContextPolicyServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/context_policy/MutinyContextPolicyServiceGrpc.java @@ -6,11 +6,11 @@ import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: context_policy.proto") -public final class MutinyContextPolicyServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc { - private MutinyContextPolicyServiceGrpc() {} +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: context_policy.proto") +public final class MutinyContextPolicyServiceGrpc implements io.quarkus.grpc.MutinyGrpc { + + private MutinyContextPolicyServiceGrpc() { + } public static MutinyContextPolicyServiceStub newMutinyStub(io.grpc.Channel channel) { return new MutinyContextPolicyServiceStub(channel); @@ -21,7 +21,8 @@ public final class MutinyContextPolicyServiceGrpc implements io.quarkus.grpc.run * created as a separate service to prevent import-loops in context and policy * */ - public static final class MutinyContextPolicyServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub { + public static class MutinyContextPolicyServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.MutinyStub { + private ContextPolicyServiceGrpc.ContextPolicyServiceStub delegateStub; private MutinyContextPolicyServiceStub(io.grpc.Channel channel) { @@ -39,31 +40,25 @@ public final class MutinyContextPolicyServiceGrpc implements io.quarkus.grpc.run return new MutinyContextPolicyServiceStub(channel, callOptions); } - public io.smallrye.mutiny.Uni listPolicyRuleIds(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listPolicyRuleIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listPolicyRuleIds); } - public io.smallrye.mutiny.Uni listPolicyRules(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listPolicyRules); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listPolicyRules); } - public io.smallrye.mutiny.Uni getPolicyRule(policy.Policy.PolicyRuleId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getPolicyRule); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getPolicyRule); } - public io.smallrye.mutiny.Uni setPolicyRule(policy.Policy.PolicyRule request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setPolicyRule); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setPolicyRule); } - public io.smallrye.mutiny.Uni removePolicyRule(policy.Policy.PolicyRuleId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removePolicyRule); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removePolicyRule); } - } /** @@ -74,96 +69,59 @@ public final class MutinyContextPolicyServiceGrpc implements io.quarkus.grpc.run public static abstract class ContextPolicyServiceImplBase implements io.grpc.BindableService { private String compression; + /** - * Set whether the server will try to use a compressed response. - * - * @param compression the compression, e.g {@code gzip} - */ + * Set whether the server will try to use a compressed response. + * + * @param compression the compression, e.g {@code gzip} + */ public ContextPolicyServiceImplBase withCompression(String compression) { - this.compression = compression; - return this; + this.compression = compression; + return this; } - - public io.smallrye.mutiny.Uni listPolicyRuleIds(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listPolicyRules(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getPolicyRule(policy.Policy.PolicyRuleId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setPolicyRule(policy.Policy.PolicyRule request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removePolicyRule(policy.Policy.PolicyRuleId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - context_policy.ContextPolicyServiceGrpc.getListPolicyRuleIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - policy.Policy.PolicyRuleIdList>( - this, METHODID_LIST_POLICY_RULE_IDS, compression))) - .addMethod( - context_policy.ContextPolicyServiceGrpc.getListPolicyRulesMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - policy.Policy.PolicyRuleList>( - this, METHODID_LIST_POLICY_RULES, compression))) - .addMethod( - context_policy.ContextPolicyServiceGrpc.getGetPolicyRuleMethod(), - asyncUnaryCall( - new MethodHandlers< - policy.Policy.PolicyRuleId, - policy.Policy.PolicyRule>( - this, METHODID_GET_POLICY_RULE, compression))) - .addMethod( - context_policy.ContextPolicyServiceGrpc.getSetPolicyRuleMethod(), - asyncUnaryCall( - new MethodHandlers< - policy.Policy.PolicyRule, - policy.Policy.PolicyRuleId>( - this, METHODID_SET_POLICY_RULE, compression))) - .addMethod( - context_policy.ContextPolicyServiceGrpc.getRemovePolicyRuleMethod(), - asyncUnaryCall( - new MethodHandlers< - policy.Policy.PolicyRuleId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_POLICY_RULE, compression))) - .build(); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(context_policy.ContextPolicyServiceGrpc.getListPolicyRuleIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_POLICY_RULE_IDS, compression))).addMethod(context_policy.ContextPolicyServiceGrpc.getListPolicyRulesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_POLICY_RULES, compression))).addMethod(context_policy.ContextPolicyServiceGrpc.getGetPolicyRuleMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_POLICY_RULE, compression))).addMethod(context_policy.ContextPolicyServiceGrpc.getSetPolicyRuleMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_POLICY_RULE, compression))).addMethod(context_policy.ContextPolicyServiceGrpc.getRemovePolicyRuleMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_POLICY_RULE, compression))).build(); } } private static final int METHODID_LIST_POLICY_RULE_IDS = 0; + private static final int METHODID_LIST_POLICY_RULES = 1; + private static final int METHODID_GET_POLICY_RULE = 2; + private static final int METHODID_SET_POLICY_RULE = 3; + private static final int METHODID_REMOVE_POLICY_RULE = 4; - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ContextPolicyServiceImplBase serviceImpl; + private final int methodId; + private final String compression; MethodHandlers(ContextPolicyServiceImplBase serviceImpl, int methodId, String compression) { @@ -175,36 +133,21 @@ public final class MutinyContextPolicyServiceGrpc implements io.quarkus.grpc.run @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { case METHODID_LIST_POLICY_RULE_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listPolicyRuleIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listPolicyRuleIds); break; case METHODID_LIST_POLICY_RULES: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listPolicyRules); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listPolicyRules); break; case METHODID_GET_POLICY_RULE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getPolicyRule); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getPolicyRule); break; case METHODID_SET_POLICY_RULE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRule) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setPolicyRule); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((policy.Policy.PolicyRule) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setPolicyRule); break; case METHODID_REMOVE_POLICY_RULE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removePolicyRule); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removePolicyRule); break; default: throw new java.lang.AssertionError(); @@ -214,11 +157,10 @@ public final class MutinyContextPolicyServiceGrpc implements io.quarkus.grpc.run @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { default: throw new java.lang.AssertionError(); } } } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/device/Device.java b/src/policy/target/generated-sources/grpc/device/Device.java index bc57d19cae53bf0540a402e9771bc87c1ecf49c5..93bd490405da36c7ee2f26121e5abd94c3ec13a5 100644 --- a/src/policy/target/generated-sources/grpc/device/Device.java +++ b/src/policy/target/generated-sources/grpc/device/Device.java @@ -1,1031 +1,963 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: device.proto - package device; public final class Device { - private Device() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface MonitoringSettingsOrBuilder extends - // @@protoc_insertion_point(interface_extends:device.MonitoringSettings) - com.google.protobuf.MessageOrBuilder { - - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - * @return Whether the kpiDescriptor field is set. - */ - boolean hasKpiDescriptor(); - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - * @return The kpiDescriptor. - */ - monitoring.Monitoring.KpiDescriptor getKpiDescriptor(); - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder(); - - /** - * float sampling_duration_s = 3; - * @return The samplingDurationS. - */ - float getSamplingDurationS(); - - /** - * float sampling_interval_s = 4; - * @return The samplingIntervalS. - */ - float getSamplingIntervalS(); - } - /** - * Protobuf type {@code device.MonitoringSettings} - */ - public static final class MonitoringSettings extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:device.MonitoringSettings) - MonitoringSettingsOrBuilder { - private static final long serialVersionUID = 0L; - // Use MonitoringSettings.newBuilder() to construct. - private MonitoringSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MonitoringSettings() { + private Device() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MonitoringSettings(); + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { } - @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; + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return device.Device.internal_static_device_MonitoringSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - device.Device.MonitoringSettings.class, device.Device.MonitoringSettings.Builder.class); - } + public interface MonitoringSettingsOrBuilder extends // @@protoc_insertion_point(interface_extends:device.MonitoringSettings) + com.google.protobuf.MessageOrBuilder { - public static final int KPI_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); - public static final int KPI_DESCRIPTOR_FIELD_NUMBER = 2; - private monitoring.Monitoring.KpiDescriptor kpiDescriptor_; - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - * @return Whether the kpiDescriptor field is set. - */ - @java.lang.Override - public boolean hasKpiDescriptor() { - return kpiDescriptor_ != null; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - * @return The kpiDescriptor. - */ - @java.lang.Override - public monitoring.Monitoring.KpiDescriptor getKpiDescriptor() { - return kpiDescriptor_ == null ? monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - @java.lang.Override - public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder() { - return getKpiDescriptor(); - } + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); - public static final int SAMPLING_DURATION_S_FIELD_NUMBER = 3; - private float samplingDurationS_; - /** - * float sampling_duration_s = 3; - * @return The samplingDurationS. - */ - @java.lang.Override - public float getSamplingDurationS() { - return samplingDurationS_; + /** + * .monitoring.KpiId kpi_id = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + * @return Whether the kpiDescriptor field is set. + */ + boolean hasKpiDescriptor(); + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + * @return The kpiDescriptor. + */ + monitoring.Monitoring.KpiDescriptor getKpiDescriptor(); + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder(); + + /** + * float sampling_duration_s = 3; + * @return The samplingDurationS. + */ + float getSamplingDurationS(); + + /** + * float sampling_interval_s = 4; + * @return The samplingIntervalS. + */ + float getSamplingIntervalS(); } - public static final int SAMPLING_INTERVAL_S_FIELD_NUMBER = 4; - private float samplingIntervalS_; /** - * float sampling_interval_s = 4; - * @return The samplingIntervalS. + * Protobuf type {@code device.MonitoringSettings} */ - @java.lang.Override - public float getSamplingIntervalS() { - return samplingIntervalS_; - } + public static final class MonitoringSettings extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:device.MonitoringSettings) + MonitoringSettingsOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use MonitoringSettings.newBuilder() to construct. + private MonitoringSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - if (kpiDescriptor_ != null) { - output.writeMessage(2, getKpiDescriptor()); - } - if (samplingDurationS_ != 0F) { - output.writeFloat(3, samplingDurationS_); - } - if (samplingIntervalS_ != 0F) { - output.writeFloat(4, samplingIntervalS_); - } - unknownFields.writeTo(output); - } + private MonitoringSettings() { + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - if (kpiDescriptor_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getKpiDescriptor()); - } - if (samplingDurationS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, samplingDurationS_); - } - if (samplingIntervalS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, samplingIntervalS_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MonitoringSettings(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof device.Device.MonitoringSettings)) { - return super.equals(obj); - } - device.Device.MonitoringSettings other = (device.Device.MonitoringSettings) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (hasKpiDescriptor() != other.hasKpiDescriptor()) return false; - if (hasKpiDescriptor()) { - if (!getKpiDescriptor() - .equals(other.getKpiDescriptor())) return false; - } - if (java.lang.Float.floatToIntBits(getSamplingDurationS()) - != java.lang.Float.floatToIntBits( - other.getSamplingDurationS())) return false; - if (java.lang.Float.floatToIntBits(getSamplingIntervalS()) - != java.lang.Float.floatToIntBits( - other.getSamplingIntervalS())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - if (hasKpiDescriptor()) { - hash = (37 * hash) + KPI_DESCRIPTOR_FIELD_NUMBER; - hash = (53 * hash) + getKpiDescriptor().hashCode(); - } - hash = (37 * hash) + SAMPLING_DURATION_S_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + 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 device.Device.MonitoringSettings parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static device.Device.MonitoringSettings parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static device.Device.MonitoringSettings parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static device.Device.MonitoringSettings parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static device.Device.MonitoringSettings parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static device.Device.MonitoringSettings parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static device.Device.MonitoringSettings parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static device.Device.MonitoringSettings parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static device.Device.MonitoringSettings parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static device.Device.MonitoringSettings parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static device.Device.MonitoringSettings parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static device.Device.MonitoringSettings parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return device.Device.internal_static_device_MonitoringSettings_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(device.Device.MonitoringSettings prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return device.Device.internal_static_device_MonitoringSettings_fieldAccessorTable.ensureFieldAccessorsInitialized(device.Device.MonitoringSettings.class, device.Device.MonitoringSettings.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code device.MonitoringSettings} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:device.MonitoringSettings) - device.Device.MonitoringSettingsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return device.Device.internal_static_device_MonitoringSettings_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return device.Device.internal_static_device_MonitoringSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - device.Device.MonitoringSettings.class, device.Device.MonitoringSettings.Builder.class); - } - - // 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) { + public static final int KPI_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.KpiId kpiId_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int KPI_DESCRIPTOR_FIELD_NUMBER = 2; + + private monitoring.Monitoring.KpiDescriptor kpiDescriptor_; + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + * @return Whether the kpiDescriptor field is set. + */ + @java.lang.Override + public boolean hasKpiDescriptor() { + return kpiDescriptor_ != null; + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + * @return The kpiDescriptor. + */ + @java.lang.Override + public monitoring.Monitoring.KpiDescriptor getKpiDescriptor() { + return kpiDescriptor_ == null ? monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; - kpiIdBuilder_ = null; + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + @java.lang.Override + public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder() { + return getKpiDescriptor(); } - if (kpiDescriptorBuilder_ == null) { - kpiDescriptor_ = null; - } else { - kpiDescriptor_ = null; - kpiDescriptorBuilder_ = null; + + public static final int SAMPLING_DURATION_S_FIELD_NUMBER = 3; + + private float samplingDurationS_; + + /** + * float sampling_duration_s = 3; + * @return The samplingDurationS. + */ + @java.lang.Override + public float getSamplingDurationS() { + return samplingDurationS_; } - samplingDurationS_ = 0F; - samplingIntervalS_ = 0F; + public static final int SAMPLING_INTERVAL_S_FIELD_NUMBER = 4; - return this; - } + private float samplingIntervalS_; - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return device.Device.internal_static_device_MonitoringSettings_descriptor; - } + /** + * float sampling_interval_s = 4; + * @return The samplingIntervalS. + */ + @java.lang.Override + public float getSamplingIntervalS() { + return samplingIntervalS_; + } - @java.lang.Override - public device.Device.MonitoringSettings getDefaultInstanceForType() { - return device.Device.MonitoringSettings.getDefaultInstance(); - } + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public device.Device.MonitoringSettings build() { - device.Device.MonitoringSettings result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + if (kpiDescriptor_ != null) { + output.writeMessage(2, getKpiDescriptor()); + } + if (samplingDurationS_ != 0F) { + output.writeFloat(3, samplingDurationS_); + } + if (samplingIntervalS_ != 0F) { + output.writeFloat(4, samplingIntervalS_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + if (kpiDescriptor_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiDescriptor()); + } + if (samplingDurationS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, samplingDurationS_); + } + if (samplingIntervalS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, samplingIntervalS_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof device.Device.MonitoringSettings)) { + return super.equals(obj); + } + device.Device.MonitoringSettings other = (device.Device.MonitoringSettings) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (hasKpiDescriptor() != other.hasKpiDescriptor()) + return false; + if (hasKpiDescriptor()) { + if (!getKpiDescriptor().equals(other.getKpiDescriptor())) + return false; + } + if (java.lang.Float.floatToIntBits(getSamplingDurationS()) != java.lang.Float.floatToIntBits(other.getSamplingDurationS())) + return false; + if (java.lang.Float.floatToIntBits(getSamplingIntervalS()) != java.lang.Float.floatToIntBits(other.getSamplingIntervalS())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + if (hasKpiDescriptor()) { + hash = (37 * hash) + KPI_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getKpiDescriptor().hashCode(); + } + hash = (37 * hash) + SAMPLING_DURATION_S_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; } - return result; - } - - @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(); + + public static device.Device.MonitoringSettings parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - if (kpiDescriptorBuilder_ == null) { - result.kpiDescriptor_ = kpiDescriptor_; - } else { - result.kpiDescriptor_ = kpiDescriptorBuilder_.build(); + + public static device.Device.MonitoringSettings parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof device.Device.MonitoringSettings) { - return mergeFrom((device.Device.MonitoringSettings)other); - } else { - super.mergeFrom(other); - return this; + + public static device.Device.MonitoringSettings parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - } - public Builder mergeFrom(device.Device.MonitoringSettings other) { - if (other == device.Device.MonitoringSettings.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); + public static device.Device.MonitoringSettings parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - if (other.hasKpiDescriptor()) { - mergeKpiDescriptor(other.getKpiDescriptor()); + + public static device.Device.MonitoringSettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - if (other.getSamplingDurationS() != 0F) { - setSamplingDurationS(other.getSamplingDurationS()); + + public static device.Device.MonitoringSettings parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - if (other.getSamplingIntervalS() != 0F) { - setSamplingIntervalS(other.getSamplingIntervalS()); + + public static device.Device.MonitoringSettings parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (device.Device.MonitoringSettings) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + + public static device.Device.MonitoringSettings parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - return this; - } - - private monitoring.Monitoring.KpiId kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); + + public static device.Device.MonitoringSettings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); + + public static device.Device.MonitoringSettings parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); + public static device.Device.MonitoringSettings parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); + public static device.Device.MonitoringSettings parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; + + public static Builder newBuilder(device.Device.MonitoringSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - return kpiIdBuilder_; - } - - private monitoring.Monitoring.KpiDescriptor kpiDescriptor_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder> kpiDescriptorBuilder_; - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - * @return Whether the kpiDescriptor field is set. - */ - public boolean hasKpiDescriptor() { - return kpiDescriptorBuilder_ != null || kpiDescriptor_ != null; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - * @return The kpiDescriptor. - */ - public monitoring.Monitoring.KpiDescriptor getKpiDescriptor() { - if (kpiDescriptorBuilder_ == null) { - return kpiDescriptor_ == null ? monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; - } else { - return kpiDescriptorBuilder_.getMessage(); + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - public Builder setKpiDescriptor(monitoring.Monitoring.KpiDescriptor value) { - if (kpiDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiDescriptor_ = value; - onChanged(); - } else { - kpiDescriptorBuilder_.setMessage(value); + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - return this; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - public Builder setKpiDescriptor( - monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { - if (kpiDescriptorBuilder_ == null) { - kpiDescriptor_ = builderForValue.build(); - onChanged(); - } else { - kpiDescriptorBuilder_.setMessage(builderForValue.build()); + /** + * Protobuf type {@code device.MonitoringSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:device.MonitoringSettings) + device.Device.MonitoringSettingsOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return device.Device.internal_static_device_MonitoringSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return device.Device.internal_static_device_MonitoringSettings_fieldAccessorTable.ensureFieldAccessorsInitialized(device.Device.MonitoringSettings.class, device.Device.MonitoringSettings.Builder.class); + } + + // 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; + kpiIdBuilder_ = null; + } + if (kpiDescriptorBuilder_ == null) { + kpiDescriptor_ = null; + } else { + kpiDescriptor_ = null; + kpiDescriptorBuilder_ = null; + } + samplingDurationS_ = 0F; + samplingIntervalS_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return device.Device.internal_static_device_MonitoringSettings_descriptor; + } + + @java.lang.Override + public device.Device.MonitoringSettings getDefaultInstanceForType() { + return device.Device.MonitoringSettings.getDefaultInstance(); + } + + @java.lang.Override + public device.Device.MonitoringSettings build() { + device.Device.MonitoringSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof device.Device.MonitoringSettings) { + return mergeFrom((device.Device.MonitoringSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(device.Device.MonitoringSettings other) { + if (other == device.Device.MonitoringSettings.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (other.hasKpiDescriptor()) { + mergeKpiDescriptor(other.getKpiDescriptor()); + } + if (other.getSamplingDurationS() != 0F) { + setSamplingDurationS(other.getSamplingDurationS()); + } + if (other.getSamplingIntervalS() != 0F) { + setSamplingIntervalS(other.getSamplingIntervalS()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (device.Device.MonitoringSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private monitoring.Monitoring.KpiDescriptor kpiDescriptor_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiDescriptorBuilder_; + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + * @return Whether the kpiDescriptor field is set. + */ + public boolean hasKpiDescriptor() { + return kpiDescriptorBuilder_ != null || kpiDescriptor_ != null; + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + * @return The kpiDescriptor. + */ + public monitoring.Monitoring.KpiDescriptor getKpiDescriptor() { + if (kpiDescriptorBuilder_ == null) { + return kpiDescriptor_ == null ? monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; + } else { + return kpiDescriptorBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + public Builder setKpiDescriptor(monitoring.Monitoring.KpiDescriptor value) { + if (kpiDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiDescriptor_ = value; + onChanged(); + } else { + kpiDescriptorBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + public Builder setKpiDescriptor(monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { + if (kpiDescriptorBuilder_ == null) { + kpiDescriptor_ = builderForValue.build(); + onChanged(); + } else { + kpiDescriptorBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + public Builder mergeKpiDescriptor(monitoring.Monitoring.KpiDescriptor value) { + if (kpiDescriptorBuilder_ == null) { + if (kpiDescriptor_ != null) { + kpiDescriptor_ = monitoring.Monitoring.KpiDescriptor.newBuilder(kpiDescriptor_).mergeFrom(value).buildPartial(); + } else { + kpiDescriptor_ = value; + } + onChanged(); + } else { + kpiDescriptorBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + public Builder clearKpiDescriptor() { + if (kpiDescriptorBuilder_ == null) { + kpiDescriptor_ = null; + onChanged(); + } else { + kpiDescriptor_ = null; + kpiDescriptorBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + public monitoring.Monitoring.KpiDescriptor.Builder getKpiDescriptorBuilder() { + onChanged(); + return getKpiDescriptorFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder() { + if (kpiDescriptorBuilder_ != null) { + return kpiDescriptorBuilder_.getMessageOrBuilder(); + } else { + return kpiDescriptor_ == null ? monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; + } + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiDescriptorFieldBuilder() { + if (kpiDescriptorBuilder_ == null) { + kpiDescriptorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiDescriptor(), getParentForChildren(), isClean()); + kpiDescriptor_ = null; + } + return kpiDescriptorBuilder_; + } + + private float samplingDurationS_; + + /** + * float sampling_duration_s = 3; + * @return The samplingDurationS. + */ + @java.lang.Override + public float getSamplingDurationS() { + return samplingDurationS_; + } + + /** + * float sampling_duration_s = 3; + * @param value The samplingDurationS to set. + * @return This builder for chaining. + */ + public Builder setSamplingDurationS(float value) { + samplingDurationS_ = value; + onChanged(); + return this; + } + + /** + * float sampling_duration_s = 3; + * @return This builder for chaining. + */ + public Builder clearSamplingDurationS() { + samplingDurationS_ = 0F; + onChanged(); + return this; + } + + private float samplingIntervalS_; + + /** + * float sampling_interval_s = 4; + * @return The samplingIntervalS. + */ + @java.lang.Override + public float getSamplingIntervalS() { + return samplingIntervalS_; + } + + /** + * float sampling_interval_s = 4; + * @param value The samplingIntervalS to set. + * @return This builder for chaining. + */ + public Builder setSamplingIntervalS(float value) { + samplingIntervalS_ = value; + onChanged(); + return this; + } + + /** + * float sampling_interval_s = 4; + * @return This builder for chaining. + */ + public Builder clearSamplingIntervalS() { + samplingIntervalS_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:device.MonitoringSettings) } - return this; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - public Builder mergeKpiDescriptor(monitoring.Monitoring.KpiDescriptor value) { - if (kpiDescriptorBuilder_ == null) { - if (kpiDescriptor_ != null) { - kpiDescriptor_ = - monitoring.Monitoring.KpiDescriptor.newBuilder(kpiDescriptor_).mergeFrom(value).buildPartial(); - } else { - kpiDescriptor_ = value; - } - onChanged(); - } else { - kpiDescriptorBuilder_.mergeFrom(value); + // @@protoc_insertion_point(class_scope:device.MonitoringSettings) + private static final device.Device.MonitoringSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new device.Device.MonitoringSettings(); } - return this; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - public Builder clearKpiDescriptor() { - if (kpiDescriptorBuilder_ == null) { - kpiDescriptor_ = null; - onChanged(); - } else { - kpiDescriptor_ = null; - kpiDescriptorBuilder_ = null; + public static device.Device.MonitoringSettings getDefaultInstance() { + return DEFAULT_INSTANCE; } - return this; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - public monitoring.Monitoring.KpiDescriptor.Builder getKpiDescriptorBuilder() { - - onChanged(); - return getKpiDescriptorFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder() { - if (kpiDescriptorBuilder_ != null) { - return kpiDescriptorBuilder_.getMessageOrBuilder(); - } else { - return kpiDescriptor_ == null ? - monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; } - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder> - getKpiDescriptorFieldBuilder() { - if (kpiDescriptorBuilder_ == null) { - kpiDescriptorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder>( - getKpiDescriptor(), - getParentForChildren(), - isClean()); - kpiDescriptor_ = null; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - return kpiDescriptorBuilder_; - } - - private float samplingDurationS_ ; - /** - * float sampling_duration_s = 3; - * @return The samplingDurationS. - */ - @java.lang.Override - public float getSamplingDurationS() { - return samplingDurationS_; - } - /** - * float sampling_duration_s = 3; - * @param value The samplingDurationS to set. - * @return This builder for chaining. - */ - public Builder setSamplingDurationS(float value) { - - samplingDurationS_ = value; - onChanged(); - return this; - } - /** - * float sampling_duration_s = 3; - * @return This builder for chaining. - */ - public Builder clearSamplingDurationS() { - - samplingDurationS_ = 0F; - onChanged(); - return this; - } - - private float samplingIntervalS_ ; - /** - * float sampling_interval_s = 4; - * @return The samplingIntervalS. - */ - @java.lang.Override - public float getSamplingIntervalS() { - return samplingIntervalS_; - } - /** - * float sampling_interval_s = 4; - * @param value The samplingIntervalS to set. - * @return This builder for chaining. - */ - public Builder setSamplingIntervalS(float value) { - - samplingIntervalS_ = value; - onChanged(); - return this; - } - /** - * float sampling_interval_s = 4; - * @return This builder for chaining. - */ - public Builder clearSamplingIntervalS() { - - samplingIntervalS_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:device.MonitoringSettings) - } - // @@protoc_insertion_point(class_scope:device.MonitoringSettings) - private static final device.Device.MonitoringSettings DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new device.Device.MonitoringSettings(); + @java.lang.Override + public device.Device.MonitoringSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static device.Device.MonitoringSettings getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_device_MonitoringSettings_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_device_MonitoringSettings_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - @java.lang.Override - public device.Device.MonitoringSettings getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_device_MonitoringSettings_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_device_MonitoringSettings_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\014device.proto\022\006device\032\rcontext.proto\032\020m" + - "onitoring.proto\"\244\001\n\022MonitoringSettings\022!" + - "\n\006kpi_id\030\001 \001(\0132\021.monitoring.KpiId\0221\n\016kpi" + - "_descriptor\030\002 \001(\0132\031.monitoring.KpiDescri" + - "ptor\022\033\n\023sampling_duration_s\030\003 \001(\002\022\033\n\023sam" + - "pling_interval_s\030\004 \001(\0022\262\002\n\rDeviceService" + - "\0221\n\tAddDevice\022\017.context.Device\032\021.context" + - ".DeviceId\"\000\0227\n\017ConfigureDevice\022\017.context" + - ".Device\032\021.context.DeviceId\"\000\0223\n\014DeleteDe" + - "vice\022\021.context.DeviceId\032\016.context.Empty\"" + - "\000\022>\n\020GetInitialConfig\022\021.context.DeviceId" + - "\032\025.context.DeviceConfig\"\000\022@\n\020MonitorDevi" + - "ceKpi\022\032.device.MonitoringSettings\032\016.cont" + - "ext.Empty\"\000b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - context.ContextOuterClass.getDescriptor(), - monitoring.Monitoring.getDescriptor(), - }); - internal_static_device_MonitoringSettings_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_device_MonitoringSettings_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_device_MonitoringSettings_descriptor, - new java.lang.String[] { "KpiId", "KpiDescriptor", "SamplingDurationS", "SamplingIntervalS", }); - context.ContextOuterClass.getDescriptor(); - monitoring.Monitoring.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) + static { + java.lang.String[] descriptorData = { "\n\014device.proto\022\006device\032\rcontext.proto\032\020m" + "onitoring.proto\"\244\001\n\022MonitoringSettings\022!" + "\n\006kpi_id\030\001 \001(\0132\021.monitoring.KpiId\0221\n\016kpi" + "_descriptor\030\002 \001(\0132\031.monitoring.KpiDescri" + "ptor\022\033\n\023sampling_duration_s\030\003 \001(\002\022\033\n\023sam" + "pling_interval_s\030\004 \001(\0022\262\002\n\rDeviceService" + "\0221\n\tAddDevice\022\017.context.Device\032\021.context" + ".DeviceId\"\000\0227\n\017ConfigureDevice\022\017.context" + ".Device\032\021.context.DeviceId\"\000\0223\n\014DeleteDe" + "vice\022\021.context.DeviceId\032\016.context.Empty\"" + "\000\022>\n\020GetInitialConfig\022\021.context.DeviceId" + "\032\025.context.DeviceConfig\"\000\022@\n\020MonitorDevi" + "ceKpi\022\032.device.MonitoringSettings\032\016.cont" + "ext.Empty\"\000b\006proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { context.ContextOuterClass.getDescriptor(), monitoring.Monitoring.getDescriptor() }); + internal_static_device_MonitoringSettings_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_device_MonitoringSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_device_MonitoringSettings_descriptor, new java.lang.String[] { "KpiId", "KpiDescriptor", "SamplingDurationS", "SamplingIntervalS" }); + context.ContextOuterClass.getDescriptor(); + monitoring.Monitoring.getDescriptor(); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/policy/target/generated-sources/grpc/device/DeviceService.java b/src/policy/target/generated-sources/grpc/device/DeviceService.java index 1768f9911b9d05a7c61e70d8f75e397f9a3341a4..e68e59d1ce0f85cb3ba865e031221ad42a536f38 100644 --- a/src/policy/target/generated-sources/grpc/device/DeviceService.java +++ b/src/policy/target/generated-sources/grpc/device/DeviceService.java @@ -1,24 +1,17 @@ package device; -import io.quarkus.grpc.runtime.MutinyService; +import io.quarkus.grpc.MutinyService; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: device.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: device.proto") public interface DeviceService extends MutinyService { - io.smallrye.mutiny.Uni addDevice(context.ContextOuterClass.Device request); - + io.smallrye.mutiny.Uni configureDevice(context.ContextOuterClass.Device request); - + io.smallrye.mutiny.Uni deleteDevice(context.ContextOuterClass.DeviceId request); - + io.smallrye.mutiny.Uni getInitialConfig(context.ContextOuterClass.DeviceId request); - - io.smallrye.mutiny.Uni monitorDeviceKpi(device.Device.MonitoringSettings request); - - - -} \ No newline at end of file + io.smallrye.mutiny.Uni monitorDeviceKpi(device.Device.MonitoringSettings request); +} diff --git a/src/policy/target/generated-sources/grpc/device/DeviceServiceBean.java b/src/policy/target/generated-sources/grpc/device/DeviceServiceBean.java index c7e767237abc22ff273cc454f1433e5f811382fc..45df139991757cf6314ade0bb985605da95a4618 100644 --- a/src/policy/target/generated-sources/grpc/device/DeviceServiceBean.java +++ b/src/policy/target/generated-sources/grpc/device/DeviceServiceBean.java @@ -2,58 +2,59 @@ package device; import io.grpc.BindableService; import io.quarkus.grpc.GrpcService; -import io.quarkus.grpc.runtime.MutinyBean; +import io.quarkus.grpc.MutinyBean; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: device.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: device.proto") public class DeviceServiceBean extends MutinyDeviceServiceGrpc.DeviceServiceImplBase implements BindableService, MutinyBean { private final DeviceService delegate; DeviceServiceBean(@GrpcService DeviceService delegate) { - this.delegate = delegate; + this.delegate = delegate; } @Override public io.smallrye.mutiny.Uni addDevice(context.ContextOuterClass.Device request) { - try { - return delegate.addDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.addDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni configureDevice(context.ContextOuterClass.Device request) { - try { - return delegate.configureDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.configureDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni deleteDevice(context.ContextOuterClass.DeviceId request) { - try { - return delegate.deleteDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.deleteDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getInitialConfig(context.ContextOuterClass.DeviceId request) { - try { - return delegate.getInitialConfig(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getInitialConfig(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni monitorDeviceKpi(device.Device.MonitoringSettings request) { - try { - return delegate.monitorDeviceKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.monitorDeviceKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/device/DeviceServiceClient.java b/src/policy/target/generated-sources/grpc/device/DeviceServiceClient.java index 2445752a6392c3f6f9df0b0ef439d789e6a8d925..d832820b2fe861621cf0e0361e203c71be57485a 100644 --- a/src/policy/target/generated-sources/grpc/device/DeviceServiceClient.java +++ b/src/policy/target/generated-sources/grpc/device/DeviceServiceClient.java @@ -1,44 +1,52 @@ package device; import java.util.function.BiFunction; +import io.quarkus.grpc.MutinyClient; -import io.quarkus.grpc.runtime.MutinyClient; - -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: device.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: device.proto") public class DeviceServiceClient implements DeviceService, MutinyClient { private final MutinyDeviceServiceGrpc.MutinyDeviceServiceStub stub; public DeviceServiceClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) { - this.stub = stubConfigurator.apply(name,MutinyDeviceServiceGrpc.newMutinyStub(channel)); + this.stub = stubConfigurator.apply(name, MutinyDeviceServiceGrpc.newMutinyStub(channel)); + } + + private DeviceServiceClient(MutinyDeviceServiceGrpc.MutinyDeviceServiceStub stub) { + this.stub = stub; + } + + public DeviceServiceClient newInstanceWithStub(MutinyDeviceServiceGrpc.MutinyDeviceServiceStub stub) { + return new DeviceServiceClient(stub); } @Override public MutinyDeviceServiceGrpc.MutinyDeviceServiceStub getStub() { - return stub; + return stub; } @Override public io.smallrye.mutiny.Uni addDevice(context.ContextOuterClass.Device request) { - return stub.addDevice(request); + return stub.addDevice(request); } + @Override public io.smallrye.mutiny.Uni configureDevice(context.ContextOuterClass.Device request) { - return stub.configureDevice(request); + return stub.configureDevice(request); } + @Override public io.smallrye.mutiny.Uni deleteDevice(context.ContextOuterClass.DeviceId request) { - return stub.deleteDevice(request); + return stub.deleteDevice(request); } + @Override public io.smallrye.mutiny.Uni getInitialConfig(context.ContextOuterClass.DeviceId request) { - return stub.getInitialConfig(request); + return stub.getInitialConfig(request); } + @Override public io.smallrye.mutiny.Uni monitorDeviceKpi(device.Device.MonitoringSettings request) { - return stub.monitorDeviceKpi(request); + return stub.monitorDeviceKpi(request); } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/device/DeviceServiceGrpc.java b/src/policy/target/generated-sources/grpc/device/DeviceServiceGrpc.java index 9c2e379d311a58ca51c9208feba359120c086c0e..a6886d8d620182790146164fbfef36762cf4368b 100644 --- a/src/policy/target/generated-sources/grpc/device/DeviceServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/device/DeviceServiceGrpc.java @@ -4,568 +4,407 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@javax.annotation.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.38.1)", comments = "Source: device.proto") public final class DeviceServiceGrpc { - private DeviceServiceGrpc() {} + private DeviceServiceGrpc() { + } - public static final String SERVICE_NAME = "device.DeviceService"; + public static final String SERVICE_NAME = "device.DeviceService"; - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getAddDeviceMethod; + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getAddDeviceMethod; - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AddDevice", - requestType = context.ContextOuterClass.Device.class, - responseType = context.ContextOuterClass.DeviceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAddDeviceMethod() { - io.grpc.MethodDescriptor getAddDeviceMethod; - if ((getAddDeviceMethod = DeviceServiceGrpc.getAddDeviceMethod) == null) { - synchronized (DeviceServiceGrpc.class) { + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "AddDevice", requestType = context.ContextOuterClass.Device.class, responseType = context.ContextOuterClass.DeviceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAddDeviceMethod() { + io.grpc.MethodDescriptor getAddDeviceMethod; if ((getAddDeviceMethod = DeviceServiceGrpc.getAddDeviceMethod) == null) { - DeviceServiceGrpc.getAddDeviceMethod = getAddDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Device.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("AddDevice")) - .build(); - } - } + synchronized (DeviceServiceGrpc.class) { + if ((getAddDeviceMethod = DeviceServiceGrpc.getAddDeviceMethod) == null) { + DeviceServiceGrpc.getAddDeviceMethod = getAddDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Device.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("AddDevice")).build(); + } + } + } + return getAddDeviceMethod; } - return getAddDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getConfigureDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ConfigureDevice", - requestType = context.ContextOuterClass.Device.class, - responseType = context.ContextOuterClass.DeviceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getConfigureDeviceMethod() { - io.grpc.MethodDescriptor getConfigureDeviceMethod; - if ((getConfigureDeviceMethod = DeviceServiceGrpc.getConfigureDeviceMethod) == null) { - synchronized (DeviceServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getConfigureDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ConfigureDevice", requestType = context.ContextOuterClass.Device.class, responseType = context.ContextOuterClass.DeviceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getConfigureDeviceMethod() { + io.grpc.MethodDescriptor getConfigureDeviceMethod; if ((getConfigureDeviceMethod = DeviceServiceGrpc.getConfigureDeviceMethod) == null) { - DeviceServiceGrpc.getConfigureDeviceMethod = getConfigureDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ConfigureDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Device.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("ConfigureDevice")) - .build(); - } - } + synchronized (DeviceServiceGrpc.class) { + if ((getConfigureDeviceMethod = DeviceServiceGrpc.getConfigureDeviceMethod) == null) { + DeviceServiceGrpc.getConfigureDeviceMethod = getConfigureDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ConfigureDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Device.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("ConfigureDevice")).build(); + } + } + } + return getConfigureDeviceMethod; } - return getConfigureDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteDevice", - requestType = context.ContextOuterClass.DeviceId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteDeviceMethod() { - io.grpc.MethodDescriptor getDeleteDeviceMethod; - if ((getDeleteDeviceMethod = DeviceServiceGrpc.getDeleteDeviceMethod) == null) { - synchronized (DeviceServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getDeleteDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteDevice", requestType = context.ContextOuterClass.DeviceId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteDeviceMethod() { + io.grpc.MethodDescriptor getDeleteDeviceMethod; if ((getDeleteDeviceMethod = DeviceServiceGrpc.getDeleteDeviceMethod) == null) { - DeviceServiceGrpc.getDeleteDeviceMethod = getDeleteDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("DeleteDevice")) - .build(); - } - } + synchronized (DeviceServiceGrpc.class) { + if ((getDeleteDeviceMethod = DeviceServiceGrpc.getDeleteDeviceMethod) == null) { + DeviceServiceGrpc.getDeleteDeviceMethod = getDeleteDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("DeleteDevice")).build(); + } + } + } + return getDeleteDeviceMethod; } - return getDeleteDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetInitialConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetInitialConfig", - requestType = context.ContextOuterClass.DeviceId.class, - responseType = context.ContextOuterClass.DeviceConfig.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetInitialConfigMethod() { - io.grpc.MethodDescriptor getGetInitialConfigMethod; - if ((getGetInitialConfigMethod = DeviceServiceGrpc.getGetInitialConfigMethod) == null) { - synchronized (DeviceServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetInitialConfigMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetInitialConfig", requestType = context.ContextOuterClass.DeviceId.class, responseType = context.ContextOuterClass.DeviceConfig.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetInitialConfigMethod() { + io.grpc.MethodDescriptor getGetInitialConfigMethod; if ((getGetInitialConfigMethod = DeviceServiceGrpc.getGetInitialConfigMethod) == null) { - DeviceServiceGrpc.getGetInitialConfigMethod = getGetInitialConfigMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInitialConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceConfig.getDefaultInstance())) - .setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("GetInitialConfig")) - .build(); - } - } - } - return getGetInitialConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor getMonitorDeviceKpiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "MonitorDeviceKpi", - requestType = device.Device.MonitoringSettings.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getMonitorDeviceKpiMethod() { - io.grpc.MethodDescriptor getMonitorDeviceKpiMethod; - if ((getMonitorDeviceKpiMethod = DeviceServiceGrpc.getMonitorDeviceKpiMethod) == null) { - synchronized (DeviceServiceGrpc.class) { - if ((getMonitorDeviceKpiMethod = DeviceServiceGrpc.getMonitorDeviceKpiMethod) == null) { - DeviceServiceGrpc.getMonitorDeviceKpiMethod = getMonitorDeviceKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MonitorDeviceKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - device.Device.MonitoringSettings.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("MonitorDeviceKpi")) - .build(); - } - } - } - return getMonitorDeviceKpiMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static DeviceServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DeviceServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DeviceServiceStub(channel, callOptions); - } - }; - return DeviceServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static DeviceServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DeviceServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DeviceServiceBlockingStub(channel, callOptions); - } - }; - return DeviceServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static DeviceServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DeviceServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DeviceServiceFutureStub(channel, callOptions); + synchronized (DeviceServiceGrpc.class) { + if ((getGetInitialConfigMethod = DeviceServiceGrpc.getGetInitialConfigMethod) == null) { + DeviceServiceGrpc.getGetInitialConfigMethod = getGetInitialConfigMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInitialConfig")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceConfig.getDefaultInstance())).setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("GetInitialConfig")).build(); + } + } } - }; - return DeviceServiceFutureStub.newStub(factory, channel); - } + return getGetInitialConfigMethod; + } - /** - */ - public static abstract class DeviceServiceImplBase implements io.grpc.BindableService { + private static volatile io.grpc.MethodDescriptor getMonitorDeviceKpiMethod; - /** - */ - public void addDevice(context.ContextOuterClass.Device request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddDeviceMethod(), responseObserver); + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "MonitorDeviceKpi", requestType = device.Device.MonitoringSettings.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getMonitorDeviceKpiMethod() { + io.grpc.MethodDescriptor getMonitorDeviceKpiMethod; + if ((getMonitorDeviceKpiMethod = DeviceServiceGrpc.getMonitorDeviceKpiMethod) == null) { + synchronized (DeviceServiceGrpc.class) { + if ((getMonitorDeviceKpiMethod = DeviceServiceGrpc.getMonitorDeviceKpiMethod) == null) { + DeviceServiceGrpc.getMonitorDeviceKpiMethod = getMonitorDeviceKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "MonitorDeviceKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(device.Device.MonitoringSettings.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("MonitorDeviceKpi")).build(); + } + } + } + return getMonitorDeviceKpiMethod; } /** + * Creates a new async stub that supports all call types for the service */ - public void configureDevice(context.ContextOuterClass.Device request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getConfigureDeviceMethod(), responseObserver); + public static DeviceServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public DeviceServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeviceServiceStub(channel, callOptions); + } + }; + return DeviceServiceStub.newStub(factory, channel); } /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public void deleteDevice(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteDeviceMethod(), responseObserver); + public static DeviceServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public DeviceServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeviceServiceBlockingStub(channel, callOptions); + } + }; + return DeviceServiceBlockingStub.newStub(factory, channel); } /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public void getInitialConfig(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInitialConfigMethod(), responseObserver); + public static DeviceServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public DeviceServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeviceServiceFutureStub(channel, callOptions); + } + }; + return DeviceServiceFutureStub.newStub(factory, channel); } /** */ - public void monitorDeviceKpi(device.Device.MonitoringSettings request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorDeviceKpiMethod(), responseObserver); - } + public static abstract class DeviceServiceImplBase implements io.grpc.BindableService { - @java.lang.Override public final 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(); - } - } - - /** - */ - public static final class DeviceServiceStub extends io.grpc.stub.AbstractAsyncStub { - private DeviceServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void addDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddDeviceMethod(), responseObserver); + } - @java.lang.Override - protected DeviceServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DeviceServiceStub(channel, callOptions); - } + /** + */ + public void configureDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getConfigureDeviceMethod(), responseObserver); + } - /** - */ - public void addDevice(context.ContextOuterClass.Device request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAddDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void deleteDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteDeviceMethod(), responseObserver); + } - /** - */ - public void configureDevice(context.ContextOuterClass.Device request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getConfigureDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getInitialConfig(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInitialConfigMethod(), responseObserver); + } - /** - */ - public void deleteDevice(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void monitorDeviceKpi(device.Device.MonitoringSettings request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorDeviceKpiMethod(), responseObserver); + } - /** - */ - public void getInitialConfig(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetInitialConfigMethod(), getCallOptions()), request, responseObserver); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getAddDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ADD_DEVICE))).addMethod(getConfigureDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_CONFIGURE_DEVICE))).addMethod(getDeleteDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_DEVICE))).addMethod(getGetInitialConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_INITIAL_CONFIG))).addMethod(getMonitorDeviceKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_MONITOR_DEVICE_KPI))).build(); + } } /** */ - public void monitorDeviceKpi(device.Device.MonitoringSettings request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getMonitorDeviceKpiMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - */ - public static final class DeviceServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private DeviceServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + public static class DeviceServiceStub extends io.grpc.stub.AbstractAsyncStub { - @java.lang.Override - protected DeviceServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DeviceServiceBlockingStub(channel, callOptions); - } + private DeviceServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public context.ContextOuterClass.DeviceId addDevice(context.ContextOuterClass.Device request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAddDeviceMethod(), getCallOptions(), request); - } + @java.lang.Override + protected DeviceServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeviceServiceStub(channel, callOptions); + } - /** - */ - public context.ContextOuterClass.DeviceId configureDevice(context.ContextOuterClass.Device request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getConfigureDeviceMethod(), getCallOptions(), request); - } + /** + */ + public void addDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getAddDeviceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty deleteDevice(context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteDeviceMethod(), getCallOptions(), request); - } + /** + */ + public void configureDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getConfigureDeviceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.DeviceConfig getInitialConfig(context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetInitialConfigMethod(), getCallOptions(), request); - } + /** + */ + public void deleteDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteDeviceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty monitorDeviceKpi(device.Device.MonitoringSettings request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getMonitorDeviceKpiMethod(), getCallOptions(), request); - } - } - - /** - */ - public static final class DeviceServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private DeviceServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void getInitialConfig(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetInitialConfigMethod(), getCallOptions()), request, responseObserver); + } - @java.lang.Override - protected DeviceServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DeviceServiceFutureStub(channel, callOptions); + /** + */ + public void monitorDeviceKpi(device.Device.MonitoringSettings request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getMonitorDeviceKpiMethod(), getCallOptions()), request, responseObserver); + } } /** */ - public com.google.common.util.concurrent.ListenableFuture addDevice( - context.ContextOuterClass.Device request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAddDeviceMethod(), getCallOptions()), request); - } + public static class DeviceServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - /** - */ - public com.google.common.util.concurrent.ListenableFuture configureDevice( - context.ContextOuterClass.Device request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getConfigureDeviceMethod(), getCallOptions()), request); - } + private DeviceServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture deleteDevice( - context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteDeviceMethod(), getCallOptions()), request); - } + @java.lang.Override + protected DeviceServiceBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeviceServiceBlockingStub(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getInitialConfig( - context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetInitialConfigMethod(), getCallOptions()), request); + /** + */ + public context.ContextOuterClass.DeviceId addDevice(context.ContextOuterClass.Device request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getAddDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.DeviceId configureDevice(context.ContextOuterClass.Device request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getConfigureDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty deleteDevice(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.DeviceConfig getInitialConfig(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetInitialConfigMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty monitorDeviceKpi(device.Device.MonitoringSettings request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getMonitorDeviceKpiMethod(), getCallOptions(), request); + } } /** */ - public com.google.common.util.concurrent.ListenableFuture monitorDeviceKpi( - device.Device.MonitoringSettings request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getMonitorDeviceKpiMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_ADD_DEVICE = 0; - private static final int METHODID_CONFIGURE_DEVICE = 1; - private static final int METHODID_DELETE_DEVICE = 2; - private static final int METHODID_GET_INITIAL_CONFIG = 3; - private static final int METHODID_MONITOR_DEVICE_KPI = 4; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final DeviceServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(DeviceServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } + public static class DeviceServiceFutureStub extends io.grpc.stub.AbstractFutureStub { + + private DeviceServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeviceServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeviceServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture addDevice(context.ContextOuterClass.Device request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getAddDeviceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture configureDevice(context.ContextOuterClass.Device request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getConfigureDeviceMethod(), getCallOptions()), request); + } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_ADD_DEVICE: - serviceImpl.addDevice((context.ContextOuterClass.Device) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CONFIGURE_DEVICE: - serviceImpl.configureDevice((context.ContextOuterClass.Device) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_DEVICE: - serviceImpl.deleteDevice((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_INITIAL_CONFIG: - serviceImpl.getInitialConfig((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_MONITOR_DEVICE_KPI: - serviceImpl.monitorDeviceKpi((device.Device.MonitoringSettings) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteDevice(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteDeviceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getInitialConfig(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetInitialConfigMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture monitorDeviceKpi(device.Device.MonitoringSettings request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getMonitorDeviceKpiMethod(), getCallOptions()), request); + } } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } + private static final int METHODID_ADD_DEVICE = 0; + + private static final int METHODID_CONFIGURE_DEVICE = 1; + + private static final int METHODID_DELETE_DEVICE = 2; + + private static final int METHODID_GET_INITIAL_CONFIG = 3; + + private static final int METHODID_MONITOR_DEVICE_KPI = 4; + + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + + private final DeviceServiceImplBase serviceImpl; + + private final int methodId; + + MethodHandlers(DeviceServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + case METHODID_ADD_DEVICE: + serviceImpl.addDevice((context.ContextOuterClass.Device) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CONFIGURE_DEVICE: + serviceImpl.configureDevice((context.ContextOuterClass.Device) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DEVICE: + serviceImpl.deleteDevice((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_INITIAL_CONFIG: + serviceImpl.getInitialConfig((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_MONITOR_DEVICE_KPI: + serviceImpl.monitorDeviceKpi((device.Device.MonitoringSettings) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + default: + throw new AssertionError(); + } + } } - } - private static abstract class DeviceServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - DeviceServiceBaseDescriptorSupplier() {} + private static abstract class DeviceServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + + DeviceServiceBaseDescriptorSupplier() { + } - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return device.Device.getDescriptor(); + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return device.Device.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DeviceService"); + } } - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("DeviceService"); + private static final class DeviceServiceFileDescriptorSupplier extends DeviceServiceBaseDescriptorSupplier { + + DeviceServiceFileDescriptorSupplier() { + } } - } - private static final class DeviceServiceFileDescriptorSupplier - extends DeviceServiceBaseDescriptorSupplier { - DeviceServiceFileDescriptorSupplier() {} - } + private static final class DeviceServiceMethodDescriptorSupplier extends DeviceServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private static final class DeviceServiceMethodDescriptorSupplier - extends DeviceServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final String methodName; - DeviceServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } + DeviceServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } } - } - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (DeviceServiceGrpc.class) { - result = serviceDescriptor; + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new DeviceServiceFileDescriptorSupplier()) - .addMethod(getAddDeviceMethod()) - .addMethod(getConfigureDeviceMethod()) - .addMethod(getDeleteDeviceMethod()) - .addMethod(getGetInitialConfigMethod()) - .addMethod(getMonitorDeviceKpiMethod()) - .build(); - } - } + synchronized (DeviceServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new DeviceServiceFileDescriptorSupplier()).addMethod(getAddDeviceMethod()).addMethod(getConfigureDeviceMethod()).addMethod(getDeleteDeviceMethod()).addMethod(getGetInitialConfigMethod()).addMethod(getMonitorDeviceKpiMethod()).build(); + } + } + } + return result; } - return result; - } } diff --git a/src/policy/target/generated-sources/grpc/device/MutinyDeviceServiceGrpc.java b/src/policy/target/generated-sources/grpc/device/MutinyDeviceServiceGrpc.java index 096784b5a39fa66afbe2ff5402b8beec6c294730..e59fc5ae262a6bc85d6cdd64b981cce3a138fb63 100644 --- a/src/policy/target/generated-sources/grpc/device/MutinyDeviceServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/device/MutinyDeviceServiceGrpc.java @@ -6,18 +6,18 @@ import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: device.proto") -public final class MutinyDeviceServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc { - private MutinyDeviceServiceGrpc() {} +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: device.proto") +public final class MutinyDeviceServiceGrpc implements io.quarkus.grpc.MutinyGrpc { + + private MutinyDeviceServiceGrpc() { + } public static MutinyDeviceServiceStub newMutinyStub(io.grpc.Channel channel) { return new MutinyDeviceServiceStub(channel); } - - public static final class MutinyDeviceServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub { + public static class MutinyDeviceServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.MutinyStub { + private DeviceServiceGrpc.DeviceServiceStub delegateStub; private MutinyDeviceServiceStub(io.grpc.Channel channel) { @@ -35,127 +35,83 @@ public final class MutinyDeviceServiceGrpc implements io.quarkus.grpc.runtime.Mu return new MutinyDeviceServiceStub(channel, callOptions); } - public io.smallrye.mutiny.Uni addDevice(context.ContextOuterClass.Device request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::addDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::addDevice); } - public io.smallrye.mutiny.Uni configureDevice(context.ContextOuterClass.Device request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::configureDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::configureDevice); } - public io.smallrye.mutiny.Uni deleteDevice(context.ContextOuterClass.DeviceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::deleteDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteDevice); } - public io.smallrye.mutiny.Uni getInitialConfig(context.ContextOuterClass.DeviceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getInitialConfig); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getInitialConfig); } - public io.smallrye.mutiny.Uni monitorDeviceKpi(device.Device.MonitoringSettings request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::monitorDeviceKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::monitorDeviceKpi); } - } - public static abstract class DeviceServiceImplBase implements io.grpc.BindableService { private String compression; + /** - * Set whether the server will try to use a compressed response. - * - * @param compression the compression, e.g {@code gzip} - */ + * Set whether the server will try to use a compressed response. + * + * @param compression the compression, e.g {@code gzip} + */ public DeviceServiceImplBase withCompression(String compression) { - this.compression = compression; - return this; + this.compression = compression; + return this; } - - public io.smallrye.mutiny.Uni addDevice(context.ContextOuterClass.Device request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni configureDevice(context.ContextOuterClass.Device request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni deleteDevice(context.ContextOuterClass.DeviceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getInitialConfig(context.ContextOuterClass.DeviceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni monitorDeviceKpi(device.Device.MonitoringSettings request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - device.DeviceServiceGrpc.getAddDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Device, - context.ContextOuterClass.DeviceId>( - this, METHODID_ADD_DEVICE, compression))) - .addMethod( - device.DeviceServiceGrpc.getConfigureDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Device, - context.ContextOuterClass.DeviceId>( - this, METHODID_CONFIGURE_DEVICE, compression))) - .addMethod( - device.DeviceServiceGrpc.getDeleteDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceId, - context.ContextOuterClass.Empty>( - this, METHODID_DELETE_DEVICE, compression))) - .addMethod( - device.DeviceServiceGrpc.getGetInitialConfigMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceId, - context.ContextOuterClass.DeviceConfig>( - this, METHODID_GET_INITIAL_CONFIG, compression))) - .addMethod( - device.DeviceServiceGrpc.getMonitorDeviceKpiMethod(), - asyncUnaryCall( - new MethodHandlers< - device.Device.MonitoringSettings, - context.ContextOuterClass.Empty>( - this, METHODID_MONITOR_DEVICE_KPI, compression))) - .build(); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(device.DeviceServiceGrpc.getAddDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_ADD_DEVICE, compression))).addMethod(device.DeviceServiceGrpc.getConfigureDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_CONFIGURE_DEVICE, compression))).addMethod(device.DeviceServiceGrpc.getDeleteDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_DEVICE, compression))).addMethod(device.DeviceServiceGrpc.getGetInitialConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_INITIAL_CONFIG, compression))).addMethod(device.DeviceServiceGrpc.getMonitorDeviceKpiMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_MONITOR_DEVICE_KPI, compression))).build(); } } private static final int METHODID_ADD_DEVICE = 0; + private static final int METHODID_CONFIGURE_DEVICE = 1; + private static final int METHODID_DELETE_DEVICE = 2; + private static final int METHODID_GET_INITIAL_CONFIG = 3; + private static final int METHODID_MONITOR_DEVICE_KPI = 4; - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final DeviceServiceImplBase serviceImpl; + private final int methodId; + private final String compression; MethodHandlers(DeviceServiceImplBase serviceImpl, int methodId, String compression) { @@ -167,36 +123,21 @@ public final class MutinyDeviceServiceGrpc implements io.quarkus.grpc.runtime.Mu @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { case METHODID_ADD_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Device) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::addDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Device) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::addDevice); break; case METHODID_CONFIGURE_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Device) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::configureDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Device) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::configureDevice); break; case METHODID_DELETE_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::deleteDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteDevice); break; case METHODID_GET_INITIAL_CONFIG: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getInitialConfig); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getInitialConfig); break; case METHODID_MONITOR_DEVICE_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((device.Device.MonitoringSettings) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::monitorDeviceKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((device.Device.MonitoringSettings) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::monitorDeviceKpi); break; default: throw new java.lang.AssertionError(); @@ -206,11 +147,10 @@ public final class MutinyDeviceServiceGrpc implements io.quarkus.grpc.runtime.Mu @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { default: throw new java.lang.AssertionError(); } } } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java b/src/policy/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java index 98bdbbd2c364953df27694a839eff3e8f0e1c114..9621efb4beed8543be18a4bd369de73f52b2e076 100644 --- a/src/policy/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java +++ b/src/policy/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java @@ -1,310 +1,311 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: kpi_sample_types.proto - package kpi_sample_types; public final class KpiSampleTypes { - private KpiSampleTypes() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * Protobuf enum {@code kpi_sample_types.KpiSampleType} - */ - public enum KpiSampleType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * KPISAMPLETYPE_UNKNOWN = 0; - */ - KPISAMPLETYPE_UNKNOWN(0), - /** - * KPISAMPLETYPE_PACKETS_TRANSMITTED = 101; - */ - KPISAMPLETYPE_PACKETS_TRANSMITTED(101), - /** - * KPISAMPLETYPE_PACKETS_RECEIVED = 102; - */ - KPISAMPLETYPE_PACKETS_RECEIVED(102), - /** - * KPISAMPLETYPE_PACKETS_DROPPED = 103; - */ - KPISAMPLETYPE_PACKETS_DROPPED(103), - /** - * KPISAMPLETYPE_BYTES_TRANSMITTED = 201; - */ - KPISAMPLETYPE_BYTES_TRANSMITTED(201), - /** - * KPISAMPLETYPE_BYTES_RECEIVED = 202; - */ - KPISAMPLETYPE_BYTES_RECEIVED(202), - /** - * KPISAMPLETYPE_BYTES_DROPPED = 203; - */ - KPISAMPLETYPE_BYTES_DROPPED(203), - /** - * KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301; - */ - KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS(301), - /** - * KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302; - */ - KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS(302), - /** - *
-     *. can be used by both optical and L3 without any issue
-     * 
- * - * KPISAMPLETYPE_ML_CONFIDENCE = 401; - */ - KPISAMPLETYPE_ML_CONFIDENCE(401), - /** - *
-     *. can be used by both optical and L3 without any issue
-     * 
- * - * KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501; - */ - KPISAMPLETYPE_OPTICAL_SECURITY_STATUS(501), - /** - * KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601; - */ - KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS(601), - /** - * KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602; - */ - KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS(602), - /** - * KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603; - */ - KPISAMPLETYPE_L3_UNIQUE_ATTACKERS(603), - /** - * KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604; - */ - KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS(604), - /** - * KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; - */ - KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO(605), - /** - * KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; - */ - KPISAMPLETYPE_SERVICE_LATENCY_MS(701), - UNRECOGNIZED(-1), - ; - - /** - * KPISAMPLETYPE_UNKNOWN = 0; - */ - public static final int KPISAMPLETYPE_UNKNOWN_VALUE = 0; - /** - * KPISAMPLETYPE_PACKETS_TRANSMITTED = 101; - */ - public static final int KPISAMPLETYPE_PACKETS_TRANSMITTED_VALUE = 101; - /** - * KPISAMPLETYPE_PACKETS_RECEIVED = 102; - */ - public static final int KPISAMPLETYPE_PACKETS_RECEIVED_VALUE = 102; - /** - * KPISAMPLETYPE_PACKETS_DROPPED = 103; - */ - public static final int KPISAMPLETYPE_PACKETS_DROPPED_VALUE = 103; - /** - * KPISAMPLETYPE_BYTES_TRANSMITTED = 201; - */ - public static final int KPISAMPLETYPE_BYTES_TRANSMITTED_VALUE = 201; - /** - * KPISAMPLETYPE_BYTES_RECEIVED = 202; - */ - public static final int KPISAMPLETYPE_BYTES_RECEIVED_VALUE = 202; - /** - * KPISAMPLETYPE_BYTES_DROPPED = 203; - */ - public static final int KPISAMPLETYPE_BYTES_DROPPED_VALUE = 203; - /** - * KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301; - */ - public static final int KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS_VALUE = 301; - /** - * KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302; - */ - public static final int KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS_VALUE = 302; - /** - *
-     *. can be used by both optical and L3 without any issue
-     * 
- * - * KPISAMPLETYPE_ML_CONFIDENCE = 401; - */ - public static final int KPISAMPLETYPE_ML_CONFIDENCE_VALUE = 401; - /** - *
-     *. can be used by both optical and L3 without any issue
-     * 
- * - * KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501; - */ - public static final int KPISAMPLETYPE_OPTICAL_SECURITY_STATUS_VALUE = 501; - /** - * KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601; - */ - public static final int KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS_VALUE = 601; - /** - * KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602; - */ - public static final int KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS_VALUE = 602; - /** - * KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603; - */ - public static final int KPISAMPLETYPE_L3_UNIQUE_ATTACKERS_VALUE = 603; - /** - * KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604; - */ - public static final int KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS_VALUE = 604; - /** - * KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; - */ - public static final int KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO_VALUE = 605; - /** - * KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; - */ - public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_VALUE = 701; + private KpiSampleTypes() { + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static KpiSampleType valueOf(int value) { - return forNumber(value); + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code kpi_sample_types.KpiSampleType} */ - public static KpiSampleType forNumber(int value) { - switch (value) { - case 0: return KPISAMPLETYPE_UNKNOWN; - case 101: return KPISAMPLETYPE_PACKETS_TRANSMITTED; - case 102: return KPISAMPLETYPE_PACKETS_RECEIVED; - case 103: return KPISAMPLETYPE_PACKETS_DROPPED; - case 201: return KPISAMPLETYPE_BYTES_TRANSMITTED; - case 202: return KPISAMPLETYPE_BYTES_RECEIVED; - case 203: return KPISAMPLETYPE_BYTES_DROPPED; - case 301: return KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS; - case 302: return KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS; - case 401: return KPISAMPLETYPE_ML_CONFIDENCE; - case 501: return KPISAMPLETYPE_OPTICAL_SECURITY_STATUS; - case 601: return KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS; - case 602: return KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS; - case 603: return KPISAMPLETYPE_L3_UNIQUE_ATTACKERS; - case 604: return KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS; - case 605: return KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO; - case 701: return KPISAMPLETYPE_SERVICE_LATENCY_MS; - default: return null; - } - } + public enum KpiSampleType implements com.google.protobuf.ProtocolMessageEnum { + + /** + * KPISAMPLETYPE_UNKNOWN = 0; + */ + KPISAMPLETYPE_UNKNOWN(0), + /** + * KPISAMPLETYPE_PACKETS_TRANSMITTED = 101; + */ + KPISAMPLETYPE_PACKETS_TRANSMITTED(101), + /** + * KPISAMPLETYPE_PACKETS_RECEIVED = 102; + */ + KPISAMPLETYPE_PACKETS_RECEIVED(102), + /** + * KPISAMPLETYPE_PACKETS_DROPPED = 103; + */ + KPISAMPLETYPE_PACKETS_DROPPED(103), + /** + * KPISAMPLETYPE_BYTES_TRANSMITTED = 201; + */ + KPISAMPLETYPE_BYTES_TRANSMITTED(201), + /** + * KPISAMPLETYPE_BYTES_RECEIVED = 202; + */ + KPISAMPLETYPE_BYTES_RECEIVED(202), + /** + * KPISAMPLETYPE_BYTES_DROPPED = 203; + */ + KPISAMPLETYPE_BYTES_DROPPED(203), + /** + * KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301; + */ + KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS(301), + /** + * KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302; + */ + KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS(302), + /** + *
+         * . can be used by both optical and L3 without any issue
+         *  
+ * + * KPISAMPLETYPE_ML_CONFIDENCE = 401; + */ + KPISAMPLETYPE_ML_CONFIDENCE(401), + /** + *
+         * . can be used by both optical and L3 without any issue
+         *  
+ * + * KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501; + */ + KPISAMPLETYPE_OPTICAL_SECURITY_STATUS(501), + /** + * KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601; + */ + KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS(601), + /** + * KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602; + */ + KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS(602), + /** + * KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603; + */ + KPISAMPLETYPE_L3_UNIQUE_ATTACKERS(603), + /** + * KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604; + */ + KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS(604), + /** + * KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; + */ + KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO(605), + /** + * KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; + */ + KPISAMPLETYPE_SERVICE_LATENCY_MS(701), + UNRECOGNIZED(-1); + + /** + * KPISAMPLETYPE_UNKNOWN = 0; + */ + public static final int KPISAMPLETYPE_UNKNOWN_VALUE = 0; + + /** + * KPISAMPLETYPE_PACKETS_TRANSMITTED = 101; + */ + public static final int KPISAMPLETYPE_PACKETS_TRANSMITTED_VALUE = 101; + + /** + * KPISAMPLETYPE_PACKETS_RECEIVED = 102; + */ + public static final int KPISAMPLETYPE_PACKETS_RECEIVED_VALUE = 102; + + /** + * KPISAMPLETYPE_PACKETS_DROPPED = 103; + */ + public static final int KPISAMPLETYPE_PACKETS_DROPPED_VALUE = 103; + + /** + * KPISAMPLETYPE_BYTES_TRANSMITTED = 201; + */ + public static final int KPISAMPLETYPE_BYTES_TRANSMITTED_VALUE = 201; + + /** + * KPISAMPLETYPE_BYTES_RECEIVED = 202; + */ + public static final int KPISAMPLETYPE_BYTES_RECEIVED_VALUE = 202; + + /** + * KPISAMPLETYPE_BYTES_DROPPED = 203; + */ + public static final int KPISAMPLETYPE_BYTES_DROPPED_VALUE = 203; + + /** + * KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301; + */ + public static final int KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS_VALUE = 301; + + /** + * KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302; + */ + public static final int KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS_VALUE = 302; + + /** + *
+         * . can be used by both optical and L3 without any issue
+         *  
+ * + * KPISAMPLETYPE_ML_CONFIDENCE = 401; + */ + public static final int KPISAMPLETYPE_ML_CONFIDENCE_VALUE = 401; + + /** + *
+         * . can be used by both optical and L3 without any issue
+         *  
+ * + * KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501; + */ + public static final int KPISAMPLETYPE_OPTICAL_SECURITY_STATUS_VALUE = 501; + + /** + * KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601; + */ + public static final int KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS_VALUE = 601; + + /** + * KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602; + */ + public static final int KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS_VALUE = 602; + + /** + * KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603; + */ + public static final int KPISAMPLETYPE_L3_UNIQUE_ATTACKERS_VALUE = 603; + + /** + * KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604; + */ + public static final int KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS_VALUE = 604; + + /** + * KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; + */ + public static final int KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO_VALUE = 605; + + /** + * KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; + */ + public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_VALUE = 701; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KpiSampleType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static KpiSampleType forNumber(int value) { + switch(value) { + case 0: + return KPISAMPLETYPE_UNKNOWN; + case 101: + return KPISAMPLETYPE_PACKETS_TRANSMITTED; + case 102: + return KPISAMPLETYPE_PACKETS_RECEIVED; + case 103: + return KPISAMPLETYPE_PACKETS_DROPPED; + case 201: + return KPISAMPLETYPE_BYTES_TRANSMITTED; + case 202: + return KPISAMPLETYPE_BYTES_RECEIVED; + case 203: + return KPISAMPLETYPE_BYTES_DROPPED; + case 301: + return KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS; + case 302: + return KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS; + case 401: + return KPISAMPLETYPE_ML_CONFIDENCE; + case 501: + return KPISAMPLETYPE_OPTICAL_SECURITY_STATUS; + case 601: + return KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS; + case 602: + return KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS; + case 603: + return KPISAMPLETYPE_L3_UNIQUE_ATTACKERS; + case 604: + return KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS; + case 605: + return KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO; + case 701: + return KPISAMPLETYPE_SERVICE_LATENCY_MS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - KpiSampleType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { public KpiSampleType findValueByNumber(int number) { - return KpiSampleType.forNumber(number); + return KpiSampleType.forNumber(number); } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return kpi_sample_types.KpiSampleTypes.getDescriptor().getEnumTypes().get(0); + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return kpi_sample_types.KpiSampleTypes.getDescriptor().getEnumTypes().get(0); + } + + private static final KpiSampleType[] VALUES = values(); + + public static KpiSampleType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private KpiSampleType(int value) { + this.value = value; + } } - private static final KpiSampleType[] VALUES = values(); - - public static KpiSampleType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - private final int value; + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - private KpiSampleType(int value) { - this.value = value; + static { + java.lang.String[] descriptorData = { "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + "es*\260\005\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + "PLETYPE_BYTES_DROPPED\020\313\001\022+\n&KPISAMPLETYP" + "E_LINK_TOTAL_CAPACITY_GBPS\020\255\002\022*\n%KPISAMP" + "LETYPE_LINK_USED_CAPACITY_GBPS\020\256\002\022 \n\033KPI" + "SAMPLETYPE_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLE" + "TYPE_OPTICAL_SECURITY_STATUS\020\365\003\022)\n$KPISA" + "MPLETYPE_L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KP" + "ISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&" + "\n!KPISAMPLETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220" + "\n+KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CL" + "IENTS\020\334\004\022,\n\'KPISAMPLETYPE_L3_SECURITY_ST" + "ATUS_CRYPTO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_" + "LATENCY_MS\020\275\005b\006proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); } - - // @@protoc_insertion_point(enum_scope:kpi_sample_types.KpiSampleType) - } - - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + - "es*\327\004\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + - "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + - "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + - "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + - "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + - "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + - "PLETYPE_BYTES_DROPPED\020\313\001\022 \n\033KPISAMPLETYP" + - "E_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLETYPE_OPTI" + - "CAL_SECURITY_STATUS\020\365\003\022)\n$KPISAMPLETYPE_" + - "L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KPISAMPLETY" + - "PE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&\n!KPISAMP" + - "LETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220\n+KPISAMP" + - "LETYPE_L3_UNIQUE_COMPROMISED_CLIENTS\020\334\004\022" + - ",\n\'KPISAMPLETYPE_L3_SECURITY_STATUS_CRYP" + - "TO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_LATENCY_M" + - "S\020\275\005b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - } - - // @@protoc_insertion_point(outer_class_scope) + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/policy/target/generated-sources/grpc/monitoring/Monitoring.java b/src/policy/target/generated-sources/grpc/monitoring/Monitoring.java index 38f026eb1ac730e8f825e460916dc57469f0d312..4c80f4a06fe9c1d408fe41a05056c76612a9c61e 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/Monitoring.java +++ b/src/policy/target/generated-sources/grpc/monitoring/Monitoring.java @@ -1,21597 +1,20782 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: monitoring.proto - package monitoring; public final class Monitoring { - private Monitoring() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface KpiDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiDescriptor) - com.google.protobuf.MessageOrBuilder { - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + private Monitoring() { + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public interface KpiDescriptorOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * string kpi_description = 2; + * @return The kpiDescription. + */ + java.lang.String getKpiDescription(); + + /** + * string kpi_description = 2; + * @return The bytes for kpiDescription. + */ + com.google.protobuf.ByteString getKpiDescriptionBytes(); + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + java.util.List getKpiIdListList(); + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + monitoring.Monitoring.KpiId getKpiIdList(int index); + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + int getKpiIdListCount(); + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + java.util.List getKpiIdListOrBuilderList(); + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdListOrBuilder(int index); + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return The enum numeric value on the wire for kpiSampleType. + */ + int getKpiSampleTypeValue(); + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return The kpiSampleType. + */ + kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleType(); + + /** + * .context.DeviceId device_id = 5; + * @return Whether the deviceId field is set. + */ + boolean hasDeviceId(); + + /** + * .context.DeviceId device_id = 5; + * @return The deviceId. + */ + context.ContextOuterClass.DeviceId getDeviceId(); + + /** + * .context.DeviceId device_id = 5; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + + /** + * .context.EndPointId endpoint_id = 6; + * @return Whether the endpointId field is set. + */ + boolean hasEndpointId(); + + /** + * .context.EndPointId endpoint_id = 6; + * @return The endpointId. + */ + context.ContextOuterClass.EndPointId getEndpointId(); + + /** + * .context.EndPointId endpoint_id = 6; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + + /** + * .context.ServiceId service_id = 7; + * @return Whether the serviceId field is set. + */ + boolean hasServiceId(); + + /** + * .context.ServiceId service_id = 7; + * @return The serviceId. + */ + context.ContextOuterClass.ServiceId getServiceId(); + + /** + * .context.ServiceId service_id = 7; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + + /** + * .context.SliceId slice_id = 8; + * @return Whether the sliceId field is set. + */ + boolean hasSliceId(); + + /** + * .context.SliceId slice_id = 8; + * @return The sliceId. + */ + context.ContextOuterClass.SliceId getSliceId(); + + /** + * .context.SliceId slice_id = 8; + */ + context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); + + /** + * .context.ConnectionId connection_id = 9; + * @return Whether the connectionId field is set. + */ + boolean hasConnectionId(); + + /** + * .context.ConnectionId connection_id = 9; + * @return The connectionId. + */ + context.ContextOuterClass.ConnectionId getConnectionId(); + + /** + * .context.ConnectionId connection_id = 9; + */ + context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); + + /** + * .context.LinkId link_id = 10; + * @return Whether the linkId field is set. + */ + boolean hasLinkId(); + + /** + * .context.LinkId link_id = 10; + * @return The linkId. + */ + context.ContextOuterClass.LinkId getLinkId(); + + /** + * .context.LinkId link_id = 10; + */ + context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder(); + } /** - * string kpi_description = 2; - * @return The kpiDescription. - */ - java.lang.String getKpiDescription(); - /** - * string kpi_description = 2; - * @return The bytes for kpiDescription. + * Protobuf type {@code monitoring.KpiDescriptor} */ - com.google.protobuf.ByteString - getKpiDescriptionBytes(); + public static final class KpiDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiDescriptor) + KpiDescriptorOrBuilder { - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - java.util.List - getKpiIdListList(); - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - monitoring.Monitoring.KpiId getKpiIdList(int index); - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - int getKpiIdListCount(); - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - java.util.List - getKpiIdListOrBuilderList(); - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdListOrBuilder( - int index); + private static final long serialVersionUID = 0L; - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return The enum numeric value on the wire for kpiSampleType. - */ - int getKpiSampleTypeValue(); - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return The kpiSampleType. - */ - kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleType(); + // Use KpiDescriptor.newBuilder() to construct. + private KpiDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - /** - * .context.DeviceId device_id = 5; - * @return Whether the deviceId field is set. - */ - boolean hasDeviceId(); - /** - * .context.DeviceId device_id = 5; - * @return The deviceId. - */ - context.ContextOuterClass.DeviceId getDeviceId(); - /** - * .context.DeviceId device_id = 5; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + private KpiDescriptor() { + kpiDescription_ = ""; + kpiIdList_ = java.util.Collections.emptyList(); + kpiSampleType_ = 0; + } - /** - * .context.EndPointId endpoint_id = 6; - * @return Whether the endpointId field is set. - */ - boolean hasEndpointId(); - /** - * .context.EndPointId endpoint_id = 6; - * @return The endpointId. - */ - context.ContextOuterClass.EndPointId getEndpointId(); - /** - * .context.EndPointId endpoint_id = 6; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KpiDescriptor(); + } - /** - * .context.ServiceId service_id = 7; - * @return Whether the serviceId field is set. - */ - boolean hasServiceId(); - /** - * .context.ServiceId service_id = 7; - * @return The serviceId. - */ - context.ContextOuterClass.ServiceId getServiceId(); - /** - * .context.ServiceId service_id = 7; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - /** - * .context.SliceId slice_id = 8; - * @return Whether the sliceId field is set. - */ - boolean hasSliceId(); - /** - * .context.SliceId slice_id = 8; - * @return The sliceId. - */ - context.ContextOuterClass.SliceId getSliceId(); - /** - * .context.SliceId slice_id = 8; - */ - context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); + 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(); + 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(); + } + } - /** - * .context.ConnectionId connection_id = 9; - * @return Whether the connectionId field is set. - */ - boolean hasConnectionId(); - /** - * .context.ConnectionId connection_id = 9; - * @return The connectionId. - */ - context.ContextOuterClass.ConnectionId getConnectionId(); - /** - * .context.ConnectionId connection_id = 9; - */ - context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); - } - /** - * Protobuf type {@code monitoring.KpiDescriptor} - */ - public static final class KpiDescriptor extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiDescriptor) - KpiDescriptorOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiDescriptor.newBuilder() to construct. - private KpiDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiDescriptor() { - kpiDescription_ = ""; - kpiIdList_ = java.util.Collections.emptyList(); - kpiSampleType_ = 0; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_descriptor; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiDescriptor(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiDescriptor.class, monitoring.Monitoring.KpiDescriptor.Builder.class); + } - @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(); - 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; - } - 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; - } + public static final int KPI_ID_FIELD_NUMBER = 1; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiDescriptor.class, monitoring.Monitoring.KpiDescriptor.Builder.class); - } + private monitoring.Monitoring.KpiId kpiId_; - public static final int KPI_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } - public static final int KPI_DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object kpiDescription_; - /** - * string kpi_description = 2; - * @return The kpiDescription. - */ - @java.lang.Override - public java.lang.String getKpiDescription() { - java.lang.Object ref = kpiDescription_; - 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(); - kpiDescription_ = s; - return s; - } - } - /** - * string kpi_description = 2; - * @return The bytes for kpiDescription. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getKpiDescriptionBytes() { - java.lang.Object ref = kpiDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - kpiDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } - public static final int KPI_ID_LIST_FIELD_NUMBER = 3; - private java.util.List kpiIdList_; - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - @java.lang.Override - public java.util.List getKpiIdListList() { - return kpiIdList_; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - @java.lang.Override - public java.util.List - getKpiIdListOrBuilderList() { - return kpiIdList_; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - @java.lang.Override - public int getKpiIdListCount() { - return kpiIdList_.size(); - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiIdList(int index) { - return kpiIdList_.get(index); - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdListOrBuilder( - int index) { - return kpiIdList_.get(index); - } + /** + * .monitoring.KpiId kpi_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } - public static final int KPI_SAMPLE_TYPE_FIELD_NUMBER = 4; - private int kpiSampleType_; - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return The enum numeric value on the wire for kpiSampleType. - */ - @java.lang.Override public int getKpiSampleTypeValue() { - return kpiSampleType_; - } - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return The kpiSampleType. - */ - @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_); - return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; - } + public static final int KPI_DESCRIPTION_FIELD_NUMBER = 2; - public static final int DEVICE_ID_FIELD_NUMBER = 5; - private context.ContextOuterClass.DeviceId deviceId_; - /** - * .context.DeviceId device_id = 5; - * @return Whether the deviceId field is set. - */ - @java.lang.Override - public boolean hasDeviceId() { - return deviceId_ != null; - } - /** - * .context.DeviceId device_id = 5; - * @return The deviceId. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceId() { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - /** - * .context.DeviceId device_id = 5; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); - } + private volatile java.lang.Object kpiDescription_; - public static final int ENDPOINT_ID_FIELD_NUMBER = 6; - private context.ContextOuterClass.EndPointId endpointId_; - /** - * .context.EndPointId endpoint_id = 6; - * @return Whether the endpointId field is set. - */ - @java.lang.Override - public boolean hasEndpointId() { - return endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 6; - * @return The endpointId. - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointId() { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - /** - * .context.EndPointId endpoint_id = 6; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); - } + /** + * string kpi_description = 2; + * @return The kpiDescription. + */ + @java.lang.Override + public java.lang.String getKpiDescription() { + java.lang.Object ref = kpiDescription_; + 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(); + kpiDescription_ = s; + return s; + } + } - public static final int SERVICE_ID_FIELD_NUMBER = 7; - private context.ContextOuterClass.ServiceId serviceId_; - /** - * .context.ServiceId service_id = 7; - * @return Whether the serviceId field is set. - */ - @java.lang.Override - public boolean hasServiceId() { - return serviceId_ != null; - } - /** - * .context.ServiceId service_id = 7; - * @return The serviceId. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceId() { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - /** - * .context.ServiceId service_id = 7; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); - } + /** + * string kpi_description = 2; + * @return The bytes for kpiDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKpiDescriptionBytes() { + java.lang.Object ref = kpiDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kpiDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static final int SLICE_ID_FIELD_NUMBER = 8; - private context.ContextOuterClass.SliceId sliceId_; - /** - * .context.SliceId slice_id = 8; - * @return Whether the sliceId field is set. - */ - @java.lang.Override - public boolean hasSliceId() { - return sliceId_ != null; - } - /** - * .context.SliceId slice_id = 8; - * @return The sliceId. - */ - @java.lang.Override - public context.ContextOuterClass.SliceId getSliceId() { - return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } - /** - * .context.SliceId slice_id = 8; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - return getSliceId(); - } + public static final int KPI_ID_LIST_FIELD_NUMBER = 3; - public static final int CONNECTION_ID_FIELD_NUMBER = 9; - private context.ContextOuterClass.ConnectionId connectionId_; - /** - * .context.ConnectionId connection_id = 9; - * @return Whether the connectionId field is set. - */ - @java.lang.Override - public boolean hasConnectionId() { - return connectionId_ != null; - } - /** - * .context.ConnectionId connection_id = 9; - * @return The connectionId. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionId getConnectionId() { - return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } - /** - * .context.ConnectionId connection_id = 9; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - return getConnectionId(); - } + private java.util.List kpiIdList_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + @java.lang.Override + public java.util.List getKpiIdListList() { + return kpiIdList_; + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + @java.lang.Override + public java.util.List getKpiIdListOrBuilderList() { + return kpiIdList_; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - if (!getKpiDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kpiDescription_); - } - for (int i = 0; i < kpiIdList_.size(); i++) { - output.writeMessage(3, kpiIdList_.get(i)); - } - if (kpiSampleType_ != kpi_sample_types.KpiSampleTypes.KpiSampleType.KPISAMPLETYPE_UNKNOWN.getNumber()) { - output.writeEnum(4, kpiSampleType_); - } - if (deviceId_ != null) { - output.writeMessage(5, getDeviceId()); - } - if (endpointId_ != null) { - output.writeMessage(6, getEndpointId()); - } - if (serviceId_ != null) { - output.writeMessage(7, getServiceId()); - } - if (sliceId_ != null) { - output.writeMessage(8, getSliceId()); - } - if (connectionId_ != null) { - output.writeMessage(9, getConnectionId()); - } - unknownFields.writeTo(output); - } + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + @java.lang.Override + public int getKpiIdListCount() { + return kpiIdList_.size(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - if (!getKpiDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kpiDescription_); - } - for (int i = 0; i < kpiIdList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, kpiIdList_.get(i)); - } - if (kpiSampleType_ != kpi_sample_types.KpiSampleTypes.KpiSampleType.KPISAMPLETYPE_UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, kpiSampleType_); - } - if (deviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getDeviceId()); - } - if (endpointId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getEndpointId()); - } - if (serviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getServiceId()); - } - if (sliceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getSliceId()); - } - if (connectionId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getConnectionId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiIdList(int index) { + return kpiIdList_.get(index); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiDescriptor)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiDescriptor other = (monitoring.Monitoring.KpiDescriptor) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (!getKpiDescription() - .equals(other.getKpiDescription())) return false; - if (!getKpiIdListList() - .equals(other.getKpiIdListList())) return false; - if (kpiSampleType_ != other.kpiSampleType_) return false; - if (hasDeviceId() != other.hasDeviceId()) return false; - if (hasDeviceId()) { - if (!getDeviceId() - .equals(other.getDeviceId())) return false; - } - if (hasEndpointId() != other.hasEndpointId()) return false; - if (hasEndpointId()) { - if (!getEndpointId() - .equals(other.getEndpointId())) return false; - } - if (hasServiceId() != other.hasServiceId()) return false; - if (hasServiceId()) { - if (!getServiceId() - .equals(other.getServiceId())) return false; - } - if (hasSliceId() != other.hasSliceId()) return false; - if (hasSliceId()) { - if (!getSliceId() - .equals(other.getSliceId())) return false; - } - if (hasConnectionId() != other.hasConnectionId()) return false; - if (hasConnectionId()) { - if (!getConnectionId() - .equals(other.getConnectionId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdListOrBuilder(int index) { + return kpiIdList_.get(index); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - hash = (37 * hash) + KPI_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getKpiDescription().hashCode(); - if (getKpiIdListCount() > 0) { - hash = (37 * hash) + KPI_ID_LIST_FIELD_NUMBER; - hash = (53 * hash) + getKpiIdListList().hashCode(); - } - hash = (37 * hash) + KPI_SAMPLE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + kpiSampleType_; - if (hasDeviceId()) { - hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getDeviceId().hashCode(); - } - if (hasEndpointId()) { - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - } - if (hasServiceId()) { - hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); - } - if (hasSliceId()) { - hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getSliceId().hashCode(); - } - if (hasConnectionId()) { - hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; - hash = (53 * hash) + getConnectionId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static final int KPI_SAMPLE_TYPE_FIELD_NUMBER = 4; - public static monitoring.Monitoring.KpiDescriptor parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiDescriptor parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private int kpiSampleType_; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiDescriptor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return The enum numeric value on the wire for kpiSampleType. + */ + @java.lang.Override + public int getKpiSampleTypeValue() { + return kpiSampleType_; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiDescriptor} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiDescriptor) - monitoring.Monitoring.KpiDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiDescriptor.class, monitoring.Monitoring.KpiDescriptor.Builder.class); - } - - // 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; - kpiIdBuilder_ = null; - } - kpiDescription_ = ""; - - if (kpiIdListBuilder_ == null) { - kpiIdList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - kpiIdListBuilder_.clear(); - } - kpiSampleType_ = 0; - - if (deviceIdBuilder_ == null) { - deviceId_ = null; - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - if (endpointIdBuilder_ == null) { - endpointId_ = null; - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - if (sliceIdBuilder_ == null) { - sliceId_ = null; - } else { - sliceId_ = null; - sliceIdBuilder_ = null; - } - if (connectionIdBuilder_ == null) { - connectionId_ = null; - } else { - connectionId_ = null; - connectionIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiDescriptor getDefaultInstanceForType() { - return monitoring.Monitoring.KpiDescriptor.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiDescriptor build() { - monitoring.Monitoring.KpiDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.kpiDescription_ = kpiDescription_; - if (kpiIdListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpiIdList_ = java.util.Collections.unmodifiableList(kpiIdList_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.kpiIdList_ = kpiIdList_; - } else { - result.kpiIdList_ = kpiIdListBuilder_.build(); - } - result.kpiSampleType_ = kpiSampleType_; - if (deviceIdBuilder_ == null) { - result.deviceId_ = deviceId_; - } else { - result.deviceId_ = deviceIdBuilder_.build(); - } - if (endpointIdBuilder_ == null) { - result.endpointId_ = endpointId_; - } else { - result.endpointId_ = endpointIdBuilder_.build(); - } - if (serviceIdBuilder_ == null) { - result.serviceId_ = serviceId_; - } else { - result.serviceId_ = serviceIdBuilder_.build(); - } - if (sliceIdBuilder_ == null) { - result.sliceId_ = sliceId_; - } else { - result.sliceId_ = sliceIdBuilder_.build(); - } - if (connectionIdBuilder_ == null) { - result.connectionId_ = connectionId_; - } else { - result.connectionId_ = connectionIdBuilder_.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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiDescriptor) { - return mergeFrom((monitoring.Monitoring.KpiDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiDescriptor other) { - if (other == monitoring.Monitoring.KpiDescriptor.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - if (!other.getKpiDescription().isEmpty()) { - kpiDescription_ = other.kpiDescription_; - onChanged(); - } - if (kpiIdListBuilder_ == null) { - if (!other.kpiIdList_.isEmpty()) { - if (kpiIdList_.isEmpty()) { - kpiIdList_ = other.kpiIdList_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiIdListIsMutable(); - kpiIdList_.addAll(other.kpiIdList_); - } - onChanged(); - } - } else { - if (!other.kpiIdList_.isEmpty()) { - if (kpiIdListBuilder_.isEmpty()) { - kpiIdListBuilder_.dispose(); - kpiIdListBuilder_ = null; - kpiIdList_ = other.kpiIdList_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiIdListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiIdListFieldBuilder() : null; - } else { - kpiIdListBuilder_.addAllMessages(other.kpiIdList_); - } - } - } - if (other.kpiSampleType_ != 0) { - setKpiSampleTypeValue(other.getKpiSampleTypeValue()); - } - if (other.hasDeviceId()) { - mergeDeviceId(other.getDeviceId()); - } - if (other.hasEndpointId()) { - mergeEndpointId(other.getEndpointId()); - } - if (other.hasServiceId()) { - mergeServiceId(other.getServiceId()); - } - if (other.hasSliceId()) { - mergeSliceId(other.getSliceId()); - } - if (other.hasConnectionId()) { - mergeConnectionId(other.getConnectionId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiDescriptor) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - - private java.lang.Object kpiDescription_ = ""; - /** - * string kpi_description = 2; - * @return The kpiDescription. - */ - public java.lang.String getKpiDescription() { - java.lang.Object ref = kpiDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kpiDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string kpi_description = 2; - * @return The bytes for kpiDescription. - */ - public com.google.protobuf.ByteString - getKpiDescriptionBytes() { - java.lang.Object ref = kpiDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - kpiDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string kpi_description = 2; - * @param value The kpiDescription to set. - * @return This builder for chaining. - */ - public Builder setKpiDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - kpiDescription_ = value; - onChanged(); - return this; - } - /** - * string kpi_description = 2; - * @return This builder for chaining. - */ - public Builder clearKpiDescription() { - - kpiDescription_ = getDefaultInstance().getKpiDescription(); - onChanged(); - return this; - } - /** - * string kpi_description = 2; - * @param value The bytes for kpiDescription to set. - * @return This builder for chaining. - */ - public Builder setKpiDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - kpiDescription_ = value; - onChanged(); - return this; - } - - private java.util.List kpiIdList_ = - java.util.Collections.emptyList(); - private void ensureKpiIdListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiIdList_ = new java.util.ArrayList(kpiIdList_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdListBuilder_; - - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public java.util.List getKpiIdListList() { - if (kpiIdListBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiIdList_); - } else { - return kpiIdListBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public int getKpiIdListCount() { - if (kpiIdListBuilder_ == null) { - return kpiIdList_.size(); - } else { - return kpiIdListBuilder_.getCount(); - } - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public monitoring.Monitoring.KpiId getKpiIdList(int index) { - if (kpiIdListBuilder_ == null) { - return kpiIdList_.get(index); - } else { - return kpiIdListBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder setKpiIdList( - int index, monitoring.Monitoring.KpiId value) { - if (kpiIdListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdListIsMutable(); - kpiIdList_.set(index, value); - onChanged(); - } else { - kpiIdListBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder setKpiIdList( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdListBuilder_ == null) { - ensureKpiIdListIsMutable(); - kpiIdList_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiIdListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder addKpiIdList(monitoring.Monitoring.KpiId value) { - if (kpiIdListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdListIsMutable(); - kpiIdList_.add(value); - onChanged(); - } else { - kpiIdListBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder addKpiIdList( - int index, monitoring.Monitoring.KpiId value) { - if (kpiIdListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdListIsMutable(); - kpiIdList_.add(index, value); - onChanged(); - } else { - kpiIdListBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder addKpiIdList( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdListBuilder_ == null) { - ensureKpiIdListIsMutable(); - kpiIdList_.add(builderForValue.build()); - onChanged(); - } else { - kpiIdListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder addKpiIdList( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdListBuilder_ == null) { - ensureKpiIdListIsMutable(); - kpiIdList_.add(index, builderForValue.build()); - onChanged(); - } else { - kpiIdListBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder addAllKpiIdList( - java.lang.Iterable values) { - if (kpiIdListBuilder_ == null) { - ensureKpiIdListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiIdList_); - onChanged(); - } else { - kpiIdListBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder clearKpiIdList() { - if (kpiIdListBuilder_ == null) { - kpiIdList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiIdListBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder removeKpiIdList(int index) { - if (kpiIdListBuilder_ == null) { - ensureKpiIdListIsMutable(); - kpiIdList_.remove(index); - onChanged(); - } else { - kpiIdListBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdListBuilder( - int index) { - return getKpiIdListFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdListOrBuilder( - int index) { - if (kpiIdListBuilder_ == null) { - return kpiIdList_.get(index); } else { - return kpiIdListBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public java.util.List - getKpiIdListOrBuilderList() { - if (kpiIdListBuilder_ != null) { - return kpiIdListBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(kpiIdList_); - } - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdListBuilder() { - return getKpiIdListFieldBuilder().addBuilder( - monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdListBuilder( - int index) { - return getKpiIdListFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public java.util.List - getKpiIdListBuilderList() { - return getKpiIdListFieldBuilder().getBuilderList(); - } - 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()); - kpiIdList_ = null; - } - return kpiIdListBuilder_; - } - - private int kpiSampleType_ = 0; - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return The enum numeric value on the wire for kpiSampleType. - */ - @java.lang.Override public int getKpiSampleTypeValue() { - return kpiSampleType_; - } - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @param value The enum numeric value on the wire for kpiSampleType to set. - * @return This builder for chaining. - */ - public Builder setKpiSampleTypeValue(int value) { - - kpiSampleType_ = value; - onChanged(); - return this; - } - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return The kpiSampleType. - */ - @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_); - return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; - } - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @param value The kpiSampleType to set. - * @return This builder for chaining. - */ - public Builder setKpiSampleType(kpi_sample_types.KpiSampleTypes.KpiSampleType value) { - if (value == null) { - throw new NullPointerException(); - } - - kpiSampleType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return This builder for chaining. - */ - public Builder clearKpiSampleType() { - - kpiSampleType_ = 0; - onChanged(); - return this; - } - - private context.ContextOuterClass.DeviceId deviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdBuilder_; - /** - * .context.DeviceId device_id = 5; - * @return Whether the deviceId field is set. - */ - public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; - } - /** - * .context.DeviceId device_id = 5; - * @return The deviceId. - */ - public context.ContextOuterClass.DeviceId getDeviceId() { - if (deviceIdBuilder_ == null) { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } else { - return deviceIdBuilder_.getMessage(); - } - } - /** - * .context.DeviceId device_id = 5; - */ - public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceId_ = value; - onChanged(); - } else { - deviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 5; - */ - public Builder setDeviceId( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdBuilder_ == null) { - deviceId_ = builderForValue.build(); - onChanged(); - } else { - deviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceId device_id = 5; - */ - public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = - context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); - } else { - deviceId_ = value; - } - onChanged(); - } else { - deviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 5; - */ - public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceId device_id = 5; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { - - onChanged(); - return getDeviceIdFieldBuilder().getBuilder(); - } - /** - * .context.DeviceId device_id = 5; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - if (deviceIdBuilder_ != null) { - return deviceIdBuilder_.getMessageOrBuilder(); - } else { - return deviceId_ == null ? - context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - } - /** - * .context.DeviceId device_id = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> - getDeviceIdFieldBuilder() { - if (deviceIdBuilder_ == null) { - deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( - getDeviceId(), - getParentForChildren(), - isClean()); - deviceId_ = null; - } - return deviceIdBuilder_; - } - - private context.ContextOuterClass.EndPointId endpointId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; - /** - * .context.EndPointId endpoint_id = 6; - * @return Whether the endpointId field is set. - */ - public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 6; - * @return The endpointId. - */ - public context.ContextOuterClass.EndPointId getEndpointId() { - if (endpointIdBuilder_ == null) { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } else { - return endpointIdBuilder_.getMessage(); - } - } - /** - * .context.EndPointId endpoint_id = 6; - */ - public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - onChanged(); - } else { - endpointIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 6; - */ - public Builder setEndpointId( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdBuilder_ == null) { - endpointId_ = builderForValue.build(); - onChanged(); - } else { - endpointIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 6; - */ - public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = - context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); - } else { - endpointId_ = value; - } - onChanged(); - } else { - endpointIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 6; - */ - public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 6; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { - - onChanged(); - return getEndpointIdFieldBuilder().getBuilder(); - } - /** - * .context.EndPointId endpoint_id = 6; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - if (endpointIdBuilder_ != null) { - return endpointIdBuilder_.getMessageOrBuilder(); - } else { - return endpointId_ == null ? - context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - } - /** - * .context.EndPointId endpoint_id = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> - getEndpointIdFieldBuilder() { - if (endpointIdBuilder_ == null) { - endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>( - getEndpointId(), - getParentForChildren(), - isClean()); - endpointId_ = null; - } - return endpointIdBuilder_; - } - - private context.ContextOuterClass.ServiceId serviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdBuilder_; - /** - * .context.ServiceId service_id = 7; - * @return Whether the serviceId field is set. - */ - public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; - } - /** - * .context.ServiceId service_id = 7; - * @return The serviceId. - */ - public context.ContextOuterClass.ServiceId getServiceId() { - if (serviceIdBuilder_ == null) { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } else { - return serviceIdBuilder_.getMessage(); - } - } - /** - * .context.ServiceId service_id = 7; - */ - public Builder setServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - onChanged(); - } else { - serviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 7; - */ - public Builder setServiceId( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdBuilder_ == null) { - serviceId_ = builderForValue.build(); - onChanged(); - } else { - serviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceId service_id = 7; - */ - public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = - context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); - } else { - serviceId_ = value; - } - onChanged(); - } else { - serviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 7; - */ - public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceId service_id = 7; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { - - onChanged(); - return getServiceIdFieldBuilder().getBuilder(); - } - /** - * .context.ServiceId service_id = 7; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - if (serviceIdBuilder_ != null) { - return serviceIdBuilder_.getMessageOrBuilder(); - } else { - return serviceId_ == null ? - context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - } - /** - * .context.ServiceId service_id = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> - getServiceIdFieldBuilder() { - if (serviceIdBuilder_ == null) { - serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>( - getServiceId(), - getParentForChildren(), - isClean()); - serviceId_ = null; - } - return serviceIdBuilder_; - } - - private context.ContextOuterClass.SliceId sliceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> sliceIdBuilder_; - /** - * .context.SliceId slice_id = 8; - * @return Whether the sliceId field is set. - */ - public boolean hasSliceId() { - return sliceIdBuilder_ != null || sliceId_ != null; - } - /** - * .context.SliceId slice_id = 8; - * @return The sliceId. - */ - public context.ContextOuterClass.SliceId getSliceId() { - if (sliceIdBuilder_ == null) { - return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } else { - return sliceIdBuilder_.getMessage(); - } - } - /** - * .context.SliceId slice_id = 8; - */ - public Builder setSliceId(context.ContextOuterClass.SliceId value) { - if (sliceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceId_ = value; - onChanged(); - } else { - sliceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceId slice_id = 8; - */ - public Builder setSliceId( - context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdBuilder_ == null) { - sliceId_ = builderForValue.build(); - onChanged(); - } else { - sliceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceId slice_id = 8; - */ - public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { - if (sliceIdBuilder_ == null) { - if (sliceId_ != null) { - sliceId_ = - context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); - } else { - sliceId_ = value; - } - onChanged(); - } else { - sliceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceId slice_id = 8; - */ - public Builder clearSliceId() { - if (sliceIdBuilder_ == null) { - sliceId_ = null; - onChanged(); - } else { - sliceId_ = null; - sliceIdBuilder_ = null; - } - - return this; - } - /** - * .context.SliceId slice_id = 8; - */ - public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { - - onChanged(); - return getSliceIdFieldBuilder().getBuilder(); - } - /** - * .context.SliceId slice_id = 8; - */ - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - if (sliceIdBuilder_ != null) { - return sliceIdBuilder_.getMessageOrBuilder(); - } else { - return sliceId_ == null ? - context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } - } - /** - * .context.SliceId slice_id = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> - getSliceIdFieldBuilder() { - if (sliceIdBuilder_ == null) { - sliceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder>( - getSliceId(), - getParentForChildren(), - isClean()); - sliceId_ = null; - } - return sliceIdBuilder_; - } - - private context.ContextOuterClass.ConnectionId connectionId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> connectionIdBuilder_; - /** - * .context.ConnectionId connection_id = 9; - * @return Whether the connectionId field is set. - */ - public boolean hasConnectionId() { - return connectionIdBuilder_ != null || connectionId_ != null; - } - /** - * .context.ConnectionId connection_id = 9; - * @return The connectionId. - */ - public context.ContextOuterClass.ConnectionId getConnectionId() { - if (connectionIdBuilder_ == null) { - return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } else { - return connectionIdBuilder_.getMessage(); - } - } - /** - * .context.ConnectionId connection_id = 9; - */ - public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { - if (connectionIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - connectionId_ = value; - onChanged(); - } else { - connectionIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 9; - */ - public Builder setConnectionId( - context.ContextOuterClass.ConnectionId.Builder builderForValue) { - if (connectionIdBuilder_ == null) { - connectionId_ = builderForValue.build(); - onChanged(); - } else { - connectionIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 9; - */ - public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { - if (connectionIdBuilder_ == null) { - if (connectionId_ != null) { - connectionId_ = - context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); - } else { - connectionId_ = value; - } - onChanged(); - } else { - connectionIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 9; - */ - public Builder clearConnectionId() { - if (connectionIdBuilder_ == null) { - connectionId_ = null; - onChanged(); - } else { - connectionId_ = null; - connectionIdBuilder_ = null; - } - - return this; - } - /** - * .context.ConnectionId connection_id = 9; - */ - public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { - - onChanged(); - return getConnectionIdFieldBuilder().getBuilder(); - } - /** - * .context.ConnectionId connection_id = 9; - */ - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - if (connectionIdBuilder_ != null) { - return connectionIdBuilder_.getMessageOrBuilder(); - } else { - return connectionId_ == null ? - context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } - } - /** - * .context.ConnectionId connection_id = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> - getConnectionIdFieldBuilder() { - if (connectionIdBuilder_ == null) { - connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder>( - getConnectionId(), - getParentForChildren(), - isClean()); - connectionId_ = null; - } - return connectionIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiDescriptor) - } + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return The kpiSampleType. + */ + @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_); + return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; + } - // @@protoc_insertion_point(class_scope:monitoring.KpiDescriptor) - private static final monitoring.Monitoring.KpiDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiDescriptor(); - } + public static final int DEVICE_ID_FIELD_NUMBER = 5; - public static monitoring.Monitoring.KpiDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private context.ContextOuterClass.DeviceId deviceId_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.DeviceId device_id = 5; + * @return Whether the deviceId field is set. + */ + @java.lang.Override + public boolean hasDeviceId() { + return deviceId_ != null; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.DeviceId device_id = 5; + * @return The deviceId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceId() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } - @java.lang.Override - public monitoring.Monitoring.KpiDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.DeviceId device_id = 5; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + return getDeviceId(); + } - } + public static final int ENDPOINT_ID_FIELD_NUMBER = 6; - public interface MonitorKpiRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.MonitorKpiRequest) - com.google.protobuf.MessageOrBuilder { + private context.ContextOuterClass.EndPointId endpointId_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + /** + * .context.EndPointId endpoint_id = 6; + * @return Whether the endpointId field is set. + */ + @java.lang.Override + public boolean hasEndpointId() { + return endpointId_ != null; + } - /** - * float monitoring_window_s = 2; - * @return The monitoringWindowS. - */ - float getMonitoringWindowS(); + /** + * .context.EndPointId endpoint_id = 6; + * @return The endpointId. + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointId() { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } - /** - *
-     * Pending add field to reflect Available Device Protocols
-     * 
- * - * float sampling_rate_s = 3; - * @return The samplingRateS. - */ - float getSamplingRateS(); - } - /** - * Protobuf type {@code monitoring.MonitorKpiRequest} - */ - public static final class MonitorKpiRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.MonitorKpiRequest) - MonitorKpiRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use MonitorKpiRequest.newBuilder() to construct. - private MonitorKpiRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MonitorKpiRequest() { - } + /** + * .context.EndPointId endpoint_id = 6; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + return getEndpointId(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MonitorKpiRequest(); - } + public static final int SERVICE_ID_FIELD_NUMBER = 7; - @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; - } + private context.ContextOuterClass.ServiceId serviceId_; - @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); - } + /** + * .context.ServiceId service_id = 7; + * @return Whether the serviceId field is set. + */ + @java.lang.Override + public boolean hasServiceId() { + return serviceId_ != null; + } - public static final int KPI_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + /** + * .context.ServiceId service_id = 7; + * @return The serviceId. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceId() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } - public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; - private float monitoringWindowS_; - /** - * float monitoring_window_s = 2; - * @return The monitoringWindowS. - */ - @java.lang.Override - public float getMonitoringWindowS() { - return monitoringWindowS_; - } + /** + * .context.ServiceId service_id = 7; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + return getServiceId(); + } - public static final int SAMPLING_RATE_S_FIELD_NUMBER = 3; - private float samplingRateS_; - /** - *
-     * Pending add field to reflect Available Device Protocols
-     * 
- * - * float sampling_rate_s = 3; - * @return The samplingRateS. - */ - @java.lang.Override - public float getSamplingRateS() { - return samplingRateS_; - } + public static final int SLICE_ID_FIELD_NUMBER = 8; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private context.ContextOuterClass.SliceId sliceId_; - memoizedIsInitialized = 1; - return true; - } + /** + * .context.SliceId slice_id = 8; + * @return Whether the sliceId field is set. + */ + @java.lang.Override + public boolean hasSliceId() { + return sliceId_ != null; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - if (monitoringWindowS_ != 0F) { - output.writeFloat(2, monitoringWindowS_); - } - if (samplingRateS_ != 0F) { - output.writeFloat(3, samplingRateS_); - } - unknownFields.writeTo(output); - } + /** + * .context.SliceId slice_id = 8; + * @return The sliceId. + */ + @java.lang.Override + public context.ContextOuterClass.SliceId getSliceId() { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - if (monitoringWindowS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, monitoringWindowS_); - } - if (samplingRateS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, samplingRateS_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.SliceId slice_id = 8; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { + return getSliceId(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.MonitorKpiRequest)) { - return super.equals(obj); - } - monitoring.Monitoring.MonitorKpiRequest other = (monitoring.Monitoring.MonitorKpiRequest) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (java.lang.Float.floatToIntBits(getMonitoringWindowS()) - != java.lang.Float.floatToIntBits( - other.getMonitoringWindowS())) return false; - if (java.lang.Float.floatToIntBits(getSamplingRateS()) - != java.lang.Float.floatToIntBits( - other.getSamplingRateS())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static final int CONNECTION_ID_FIELD_NUMBER = 9; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - hash = (37 * hash) + MONITORING_WINDOW_S_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; + private context.ContextOuterClass.ConnectionId connectionId_; + + /** + * .context.ConnectionId connection_id = 9; + * @return Whether the connectionId field is set. + */ + @java.lang.Override + public boolean hasConnectionId() { + return connectionId_ != null; + } + + /** + * .context.ConnectionId connection_id = 9; + * @return The connectionId. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionId getConnectionId() { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + + /** + * .context.ConnectionId connection_id = 9; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + return getConnectionId(); + } + + public static final int LINK_ID_FIELD_NUMBER = 10; + + private context.ContextOuterClass.LinkId linkId_; + + /** + * .context.LinkId link_id = 10; + * @return Whether the linkId field is set. + */ + @java.lang.Override + public boolean hasLinkId() { + return linkId_ != null; + } + + /** + * .context.LinkId link_id = 10; + * @return The linkId. + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkId() { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + + /** + * .context.LinkId link_id = 10; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + return getLinkId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + if (!getKpiDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kpiDescription_); + } + for (int i = 0; i < kpiIdList_.size(); i++) { + output.writeMessage(3, kpiIdList_.get(i)); + } + if (kpiSampleType_ != kpi_sample_types.KpiSampleTypes.KpiSampleType.KPISAMPLETYPE_UNKNOWN.getNumber()) { + output.writeEnum(4, kpiSampleType_); + } + if (deviceId_ != null) { + output.writeMessage(5, getDeviceId()); + } + if (endpointId_ != null) { + output.writeMessage(6, getEndpointId()); + } + if (serviceId_ != null) { + output.writeMessage(7, getServiceId()); + } + if (sliceId_ != null) { + output.writeMessage(8, getSliceId()); + } + if (connectionId_ != null) { + output.writeMessage(9, getConnectionId()); + } + if (linkId_ != null) { + output.writeMessage(10, getLinkId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + if (!getKpiDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kpiDescription_); + } + for (int i = 0; i < kpiIdList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, kpiIdList_.get(i)); + } + if (kpiSampleType_ != kpi_sample_types.KpiSampleTypes.KpiSampleType.KPISAMPLETYPE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, kpiSampleType_); + } + if (deviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDeviceId()); + } + if (endpointId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndpointId()); + } + if (serviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getServiceId()); + } + if (sliceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSliceId()); + } + if (connectionId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getConnectionId()); + } + if (linkId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLinkId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiDescriptor)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiDescriptor other = (monitoring.Monitoring.KpiDescriptor) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (!getKpiDescription().equals(other.getKpiDescription())) + return false; + if (!getKpiIdListList().equals(other.getKpiIdListList())) + return false; + if (kpiSampleType_ != other.kpiSampleType_) + return false; + if (hasDeviceId() != other.hasDeviceId()) + return false; + if (hasDeviceId()) { + if (!getDeviceId().equals(other.getDeviceId())) + return false; + } + if (hasEndpointId() != other.hasEndpointId()) + return false; + if (hasEndpointId()) { + if (!getEndpointId().equals(other.getEndpointId())) + return false; + } + if (hasServiceId() != other.hasServiceId()) + return false; + if (hasServiceId()) { + if (!getServiceId().equals(other.getServiceId())) + return false; + } + if (hasSliceId() != other.hasSliceId()) + return false; + if (hasSliceId()) { + if (!getSliceId().equals(other.getSliceId())) + return false; + } + if (hasConnectionId() != other.hasConnectionId()) + return false; + if (hasConnectionId()) { + if (!getConnectionId().equals(other.getConnectionId())) + return false; + } + if (hasLinkId() != other.hasLinkId()) + return false; + if (hasLinkId()) { + if (!getLinkId().equals(other.getLinkId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + hash = (37 * hash) + KPI_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getKpiDescription().hashCode(); + if (getKpiIdListCount() > 0) { + hash = (37 * hash) + KPI_ID_LIST_FIELD_NUMBER; + hash = (53 * hash) + getKpiIdListList().hashCode(); + } + hash = (37 * hash) + KPI_SAMPLE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + kpiSampleType_; + if (hasDeviceId()) { + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + } + if (hasEndpointId()) { + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + } + if (hasServiceId()) { + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + } + if (hasSliceId()) { + hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSliceId().hashCode(); + } + if (hasConnectionId()) { + hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getConnectionId().hashCode(); + } + if (hasLinkId()) { + hash = (37 * hash) + LINK_ID_FIELD_NUMBER; + hash = (53 * hash) + getLinkId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiDescriptor parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiDescriptor prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiDescriptor) + monitoring.Monitoring.KpiDescriptorOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiDescriptor.class, monitoring.Monitoring.KpiDescriptor.Builder.class); + } + + // 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; + kpiIdBuilder_ = null; + } + kpiDescription_ = ""; + if (kpiIdListBuilder_ == null) { + kpiIdList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + kpiIdListBuilder_.clear(); + } + kpiSampleType_ = 0; + if (deviceIdBuilder_ == null) { + deviceId_ = null; + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + if (endpointIdBuilder_ == null) { + endpointId_ = null; + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + if (serviceIdBuilder_ == null) { + serviceId_ = null; + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + if (sliceIdBuilder_ == null) { + sliceId_ = null; + } else { + sliceId_ = null; + sliceIdBuilder_ = null; + } + if (connectionIdBuilder_ == null) { + connectionId_ = null; + } else { + connectionId_ = null; + connectionIdBuilder_ = null; + } + if (linkIdBuilder_ == null) { + linkId_ = null; + } else { + linkId_ = null; + linkIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptor getDefaultInstanceForType() { + return monitoring.Monitoring.KpiDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptor build() { + monitoring.Monitoring.KpiDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.kpiDescription_ = kpiDescription_; + if (kpiIdListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + kpiIdList_ = java.util.Collections.unmodifiableList(kpiIdList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.kpiIdList_ = kpiIdList_; + } else { + result.kpiIdList_ = kpiIdListBuilder_.build(); + } + result.kpiSampleType_ = kpiSampleType_; + if (deviceIdBuilder_ == null) { + result.deviceId_ = deviceId_; + } else { + result.deviceId_ = deviceIdBuilder_.build(); + } + if (endpointIdBuilder_ == null) { + result.endpointId_ = endpointId_; + } else { + result.endpointId_ = endpointIdBuilder_.build(); + } + if (serviceIdBuilder_ == null) { + result.serviceId_ = serviceId_; + } else { + result.serviceId_ = serviceIdBuilder_.build(); + } + if (sliceIdBuilder_ == null) { + result.sliceId_ = sliceId_; + } else { + result.sliceId_ = sliceIdBuilder_.build(); + } + if (connectionIdBuilder_ == null) { + result.connectionId_ = connectionId_; + } else { + result.connectionId_ = connectionIdBuilder_.build(); + } + if (linkIdBuilder_ == null) { + result.linkId_ = linkId_; + } else { + result.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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiDescriptor) { + return mergeFrom((monitoring.Monitoring.KpiDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiDescriptor other) { + if (other == monitoring.Monitoring.KpiDescriptor.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (!other.getKpiDescription().isEmpty()) { + kpiDescription_ = other.kpiDescription_; + onChanged(); + } + if (kpiIdListBuilder_ == null) { + if (!other.kpiIdList_.isEmpty()) { + if (kpiIdList_.isEmpty()) { + kpiIdList_ = other.kpiIdList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKpiIdListIsMutable(); + kpiIdList_.addAll(other.kpiIdList_); + } + onChanged(); + } + } else { + if (!other.kpiIdList_.isEmpty()) { + if (kpiIdListBuilder_.isEmpty()) { + kpiIdListBuilder_.dispose(); + kpiIdListBuilder_ = null; + kpiIdList_ = other.kpiIdList_; + bitField0_ = (bitField0_ & ~0x00000001); + kpiIdListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKpiIdListFieldBuilder() : null; + } else { + kpiIdListBuilder_.addAllMessages(other.kpiIdList_); + } + } + } + if (other.kpiSampleType_ != 0) { + setKpiSampleTypeValue(other.getKpiSampleTypeValue()); + } + if (other.hasDeviceId()) { + mergeDeviceId(other.getDeviceId()); + } + if (other.hasEndpointId()) { + mergeEndpointId(other.getEndpointId()); + } + if (other.hasServiceId()) { + mergeServiceId(other.getServiceId()); + } + if (other.hasSliceId()) { + mergeSliceId(other.getSliceId()); + } + if (other.hasConnectionId()) { + mergeConnectionId(other.getConnectionId()); + } + if (other.hasLinkId()) { + mergeLinkId(other.getLinkId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiDescriptor) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private java.lang.Object kpiDescription_ = ""; + + /** + * string kpi_description = 2; + * @return The kpiDescription. + */ + public java.lang.String getKpiDescription() { + java.lang.Object ref = kpiDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kpiDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string kpi_description = 2; + * @return The bytes for kpiDescription. + */ + public com.google.protobuf.ByteString getKpiDescriptionBytes() { + java.lang.Object ref = kpiDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kpiDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string kpi_description = 2; + * @param value The kpiDescription to set. + * @return This builder for chaining. + */ + public Builder setKpiDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kpiDescription_ = value; + onChanged(); + return this; + } + + /** + * string kpi_description = 2; + * @return This builder for chaining. + */ + public Builder clearKpiDescription() { + kpiDescription_ = getDefaultInstance().getKpiDescription(); + onChanged(); + return this; + } + + /** + * string kpi_description = 2; + * @param value The bytes for kpiDescription to set. + * @return This builder for chaining. + */ + public Builder setKpiDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kpiDescription_ = value; + onChanged(); + return this; + } + + private java.util.List kpiIdList_ = java.util.Collections.emptyList(); + + private void ensureKpiIdListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + kpiIdList_ = new java.util.ArrayList(kpiIdList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 kpiIdListBuilder_; + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public java.util.List getKpiIdListList() { + if (kpiIdListBuilder_ == null) { + return java.util.Collections.unmodifiableList(kpiIdList_); + } else { + return kpiIdListBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public int getKpiIdListCount() { + if (kpiIdListBuilder_ == null) { + return kpiIdList_.size(); + } else { + return kpiIdListBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public monitoring.Monitoring.KpiId getKpiIdList(int index) { + if (kpiIdListBuilder_ == null) { + return kpiIdList_.get(index); + } else { + return kpiIdListBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder setKpiIdList(int index, monitoring.Monitoring.KpiId value) { + if (kpiIdListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIdListIsMutable(); + kpiIdList_.set(index, value); + onChanged(); + } else { + kpiIdListBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder setKpiIdList(int index, monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdListBuilder_ == null) { + ensureKpiIdListIsMutable(); + kpiIdList_.set(index, builderForValue.build()); + onChanged(); + } else { + kpiIdListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder addKpiIdList(monitoring.Monitoring.KpiId value) { + if (kpiIdListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIdListIsMutable(); + kpiIdList_.add(value); + onChanged(); + } else { + kpiIdListBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder addKpiIdList(int index, monitoring.Monitoring.KpiId value) { + if (kpiIdListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIdListIsMutable(); + kpiIdList_.add(index, value); + onChanged(); + } else { + kpiIdListBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder addKpiIdList(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdListBuilder_ == null) { + ensureKpiIdListIsMutable(); + kpiIdList_.add(builderForValue.build()); + onChanged(); + } else { + kpiIdListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder addKpiIdList(int index, monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdListBuilder_ == null) { + ensureKpiIdListIsMutable(); + kpiIdList_.add(index, builderForValue.build()); + onChanged(); + } else { + kpiIdListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder addAllKpiIdList(java.lang.Iterable values) { + if (kpiIdListBuilder_ == null) { + ensureKpiIdListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kpiIdList_); + onChanged(); + } else { + kpiIdListBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder clearKpiIdList() { + if (kpiIdListBuilder_ == null) { + kpiIdList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + kpiIdListBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder removeKpiIdList(int index) { + if (kpiIdListBuilder_ == null) { + ensureKpiIdListIsMutable(); + kpiIdList_.remove(index); + onChanged(); + } else { + kpiIdListBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdListBuilder(int index) { + return getKpiIdListFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdListOrBuilder(int index) { + if (kpiIdListBuilder_ == null) { + return kpiIdList_.get(index); + } else { + return kpiIdListBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public java.util.List getKpiIdListOrBuilderList() { + if (kpiIdListBuilder_ != null) { + return kpiIdListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(kpiIdList_); + } + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public monitoring.Monitoring.KpiId.Builder addKpiIdListBuilder() { + return getKpiIdListFieldBuilder().addBuilder(monitoring.Monitoring.KpiId.getDefaultInstance()); + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public monitoring.Monitoring.KpiId.Builder addKpiIdListBuilder(int index) { + return getKpiIdListFieldBuilder().addBuilder(index, monitoring.Monitoring.KpiId.getDefaultInstance()); + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public java.util.List getKpiIdListBuilderList() { + return getKpiIdListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getKpiIdListFieldBuilder() { + if (kpiIdListBuilder_ == null) { + kpiIdListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(kpiIdList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + kpiIdList_ = null; + } + return kpiIdListBuilder_; + } + + private int kpiSampleType_ = 0; + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return The enum numeric value on the wire for kpiSampleType. + */ + @java.lang.Override + public int getKpiSampleTypeValue() { + return kpiSampleType_; + } + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @param value The enum numeric value on the wire for kpiSampleType to set. + * @return This builder for chaining. + */ + public Builder setKpiSampleTypeValue(int value) { + kpiSampleType_ = value; + onChanged(); + return this; + } + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return The kpiSampleType. + */ + @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_); + return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; + } + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @param value The kpiSampleType to set. + * @return This builder for chaining. + */ + public Builder setKpiSampleType(kpi_sample_types.KpiSampleTypes.KpiSampleType value) { + if (value == null) { + throw new NullPointerException(); + } + kpiSampleType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return This builder for chaining. + */ + public Builder clearKpiSampleType() { + kpiSampleType_ = 0; + onChanged(); + return this; + } + + private context.ContextOuterClass.DeviceId deviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceIdBuilder_; + + /** + * .context.DeviceId device_id = 5; + * @return Whether the deviceId field is set. + */ + public boolean hasDeviceId() { + return deviceIdBuilder_ != null || deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 5; + * @return The deviceId. + */ + public context.ContextOuterClass.DeviceId getDeviceId() { + if (deviceIdBuilder_ == null) { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } else { + return deviceIdBuilder_.getMessage(); + } + } + + /** + * .context.DeviceId device_id = 5; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceId_ = value; + onChanged(); + } else { + deviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 5; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdBuilder_ == null) { + deviceId_ = builderForValue.build(); + onChanged(); + } else { + deviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceId device_id = 5; + */ + public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (deviceId_ != null) { + deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + } else { + deviceId_ = value; + } + onChanged(); + } else { + deviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 5; + */ + public Builder clearDeviceId() { + if (deviceIdBuilder_ == null) { + deviceId_ = null; + onChanged(); + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceId device_id = 5; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + onChanged(); + return getDeviceIdFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceId device_id = 5; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + if (deviceIdBuilder_ != null) { + return deviceIdBuilder_.getMessageOrBuilder(); + } else { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + } + + /** + * .context.DeviceId device_id = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdFieldBuilder() { + if (deviceIdBuilder_ == null) { + deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceId(), getParentForChildren(), isClean()); + deviceId_ = null; + } + return deviceIdBuilder_; + } + + private context.ContextOuterClass.EndPointId endpointId_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_; + + /** + * .context.EndPointId endpoint_id = 6; + * @return Whether the endpointId field is set. + */ + public boolean hasEndpointId() { + return endpointIdBuilder_ != null || endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 6; + * @return The endpointId. + */ + public context.ContextOuterClass.EndPointId getEndpointId() { + if (endpointIdBuilder_ == null) { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } else { + return endpointIdBuilder_.getMessage(); + } + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + onChanged(); + } else { + endpointIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdBuilder_ == null) { + endpointId_ = builderForValue.build(); + onChanged(); + } else { + endpointIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (endpointId_ != null) { + endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + } else { + endpointId_ = value; + } + onChanged(); + } else { + endpointIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + public Builder clearEndpointId() { + if (endpointIdBuilder_ == null) { + endpointId_ = null; + onChanged(); + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + onChanged(); + return getEndpointIdFieldBuilder().getBuilder(); + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + if (endpointIdBuilder_ != null) { + return endpointIdBuilder_.getMessageOrBuilder(); + } else { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointIdFieldBuilder() { + if (endpointIdBuilder_ == null) { + endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointId(), getParentForChildren(), isClean()); + endpointId_ = null; + } + return endpointIdBuilder_; + } + + private context.ContextOuterClass.ServiceId serviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceIdBuilder_; + + /** + * .context.ServiceId service_id = 7; + * @return Whether the serviceId field is set. + */ + public boolean hasServiceId() { + return serviceIdBuilder_ != null || serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 7; + * @return The serviceId. + */ + public context.ContextOuterClass.ServiceId getServiceId() { + if (serviceIdBuilder_ == null) { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } else { + return serviceIdBuilder_.getMessage(); + } + } + + /** + * .context.ServiceId service_id = 7; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceId_ = value; + onChanged(); + } else { + serviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 7; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdBuilder_ == null) { + serviceId_ = builderForValue.build(); + onChanged(); + } else { + serviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceId service_id = 7; + */ + public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (serviceId_ != null) { + serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + } else { + serviceId_ = value; + } + onChanged(); + } else { + serviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 7; + */ + public Builder clearServiceId() { + if (serviceIdBuilder_ == null) { + serviceId_ = null; + onChanged(); + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceId service_id = 7; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + onChanged(); + return getServiceIdFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceId service_id = 7; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + if (serviceIdBuilder_ != null) { + return serviceIdBuilder_.getMessageOrBuilder(); + } else { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + } + + /** + * .context.ServiceId service_id = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdFieldBuilder() { + if (serviceIdBuilder_ == null) { + serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceId(), getParentForChildren(), isClean()); + serviceId_ = null; + } + return serviceIdBuilder_; + } + + private context.ContextOuterClass.SliceId sliceId_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceIdBuilder_; + + /** + * .context.SliceId slice_id = 8; + * @return Whether the sliceId field is set. + */ + public boolean hasSliceId() { + return sliceIdBuilder_ != null || sliceId_ != null; + } + + /** + * .context.SliceId slice_id = 8; + * @return The sliceId. + */ + public context.ContextOuterClass.SliceId getSliceId() { + if (sliceIdBuilder_ == null) { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } else { + return sliceIdBuilder_.getMessage(); + } + } + + /** + * .context.SliceId slice_id = 8; + */ + public Builder setSliceId(context.ContextOuterClass.SliceId value) { + if (sliceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceId_ = value; + onChanged(); + } else { + sliceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceId slice_id = 8; + */ + public Builder setSliceId(context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdBuilder_ == null) { + sliceId_ = builderForValue.build(); + onChanged(); + } else { + sliceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceId slice_id = 8; + */ + public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { + if (sliceIdBuilder_ == null) { + if (sliceId_ != null) { + sliceId_ = context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); + } else { + sliceId_ = value; + } + onChanged(); + } else { + sliceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceId slice_id = 8; + */ + public Builder clearSliceId() { + if (sliceIdBuilder_ == null) { + sliceId_ = null; + onChanged(); + } else { + sliceId_ = null; + sliceIdBuilder_ = null; + } + return this; + } + + /** + * .context.SliceId slice_id = 8; + */ + public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { + onChanged(); + return getSliceIdFieldBuilder().getBuilder(); + } + + /** + * .context.SliceId slice_id = 8; + */ + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { + if (sliceIdBuilder_ != null) { + return sliceIdBuilder_.getMessageOrBuilder(); + } else { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } + } + + /** + * .context.SliceId slice_id = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceIdFieldBuilder() { + if (sliceIdBuilder_ == null) { + sliceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceId(), getParentForChildren(), isClean()); + sliceId_ = null; + } + return sliceIdBuilder_; + } + + private context.ContextOuterClass.ConnectionId connectionId_; + + private com.google.protobuf.SingleFieldBuilderV3 connectionIdBuilder_; + + /** + * .context.ConnectionId connection_id = 9; + * @return Whether the connectionId field is set. + */ + public boolean hasConnectionId() { + return connectionIdBuilder_ != null || connectionId_ != null; + } + + /** + * .context.ConnectionId connection_id = 9; + * @return The connectionId. + */ + public context.ContextOuterClass.ConnectionId getConnectionId() { + if (connectionIdBuilder_ == null) { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } else { + return connectionIdBuilder_.getMessage(); + } + } + + /** + * .context.ConnectionId connection_id = 9; + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionId_ = value; + onChanged(); + } else { + connectionIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 9; + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdBuilder_ == null) { + connectionId_ = builderForValue.build(); + onChanged(); + } else { + connectionIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 9; + */ + public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (connectionId_ != null) { + connectionId_ = context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); + } else { + connectionId_ = value; + } + onChanged(); + } else { + connectionIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 9; + */ + public Builder clearConnectionId() { + if (connectionIdBuilder_ == null) { + connectionId_ = null; + onChanged(); + } else { + connectionId_ = null; + connectionIdBuilder_ = null; + } + return this; + } + + /** + * .context.ConnectionId connection_id = 9; + */ + public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { + onChanged(); + return getConnectionIdFieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionId connection_id = 9; + */ + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + if (connectionIdBuilder_ != null) { + return connectionIdBuilder_.getMessageOrBuilder(); + } else { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + } + + /** + * .context.ConnectionId connection_id = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3 getConnectionIdFieldBuilder() { + if (connectionIdBuilder_ == null) { + connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getConnectionId(), getParentForChildren(), isClean()); + connectionId_ = null; + } + return connectionIdBuilder_; + } + + private context.ContextOuterClass.LinkId linkId_; + + private com.google.protobuf.SingleFieldBuilderV3 linkIdBuilder_; + + /** + * .context.LinkId link_id = 10; + * @return Whether the linkId field is set. + */ + public boolean hasLinkId() { + return linkIdBuilder_ != null || linkId_ != null; + } + + /** + * .context.LinkId link_id = 10; + * @return The linkId. + */ + public context.ContextOuterClass.LinkId getLinkId() { + if (linkIdBuilder_ == null) { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } else { + return linkIdBuilder_.getMessage(); + } + } + + /** + * .context.LinkId link_id = 10; + */ + public Builder setLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkId_ = value; + onChanged(); + } else { + linkIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.LinkId link_id = 10; + */ + public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdBuilder_ == null) { + linkId_ = builderForValue.build(); + onChanged(); + } else { + linkIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.LinkId link_id = 10; + */ + public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (linkId_ != null) { + linkId_ = context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); + } else { + linkId_ = value; + } + onChanged(); + } else { + linkIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.LinkId link_id = 10; + */ + public Builder clearLinkId() { + if (linkIdBuilder_ == null) { + linkId_ = null; + onChanged(); + } else { + linkId_ = null; + linkIdBuilder_ = null; + } + return this; + } + + /** + * .context.LinkId link_id = 10; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { + onChanged(); + return getLinkIdFieldBuilder().getBuilder(); + } + + /** + * .context.LinkId link_id = 10; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + if (linkIdBuilder_ != null) { + return linkIdBuilder_.getMessageOrBuilder(); + } else { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + } + + /** + * .context.LinkId link_id = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3 getLinkIdFieldBuilder() { + if (linkIdBuilder_ == null) { + linkIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getLinkId(), getParentForChildren(), isClean()); + linkId_ = null; + } + return linkIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiDescriptor) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiDescriptor) + private static final monitoring.Monitoring.KpiDescriptor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiDescriptor(); + } + + public static monitoring.Monitoring.KpiDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MonitorKpiRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.MonitorKpiRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * float monitoring_window_s = 2; + * @return The monitoringWindowS. + */ + float getMonitoringWindowS(); + + /** + *
+         * Pending add field to reflect Available Device Protocols
+         * 
+ * + * float sampling_rate_s = 3; + * @return The samplingRateS. + */ + float getSamplingRateS(); + } + + /** + * Protobuf type {@code monitoring.MonitorKpiRequest} + */ + public static final class MonitorKpiRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.MonitorKpiRequest) + MonitorKpiRequestOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use MonitorKpiRequest.newBuilder() to construct. + private MonitorKpiRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MonitorKpiRequest() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MonitorKpiRequest(); + } + + @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); + } + + public static final int KPI_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.KpiId kpiId_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; + + private float monitoringWindowS_; + + /** + * float monitoring_window_s = 2; + * @return The monitoringWindowS. + */ + @java.lang.Override + public float getMonitoringWindowS() { + return monitoringWindowS_; + } + + public static final int SAMPLING_RATE_S_FIELD_NUMBER = 3; + + private float samplingRateS_; + + /** + *
+         * Pending add field to reflect Available Device Protocols
+         * 
+ * + * float sampling_rate_s = 3; + * @return The samplingRateS. + */ + @java.lang.Override + public float getSamplingRateS() { + return samplingRateS_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + if (monitoringWindowS_ != 0F) { + output.writeFloat(2, monitoringWindowS_); + } + if (samplingRateS_ != 0F) { + output.writeFloat(3, samplingRateS_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + if (monitoringWindowS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, monitoringWindowS_); + } + if (samplingRateS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, samplingRateS_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.MonitorKpiRequest)) { + return super.equals(obj); + } + monitoring.Monitoring.MonitorKpiRequest other = (monitoring.Monitoring.MonitorKpiRequest) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (java.lang.Float.floatToIntBits(getMonitoringWindowS()) != java.lang.Float.floatToIntBits(other.getMonitoringWindowS())) + return false; + if (java.lang.Float.floatToIntBits(getSamplingRateS()) != java.lang.Float.floatToIntBits(other.getSamplingRateS())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + hash = (37 * hash) + MONITORING_WINDOW_S_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.MonitorKpiRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.MonitorKpiRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.MonitorKpiRequest) + monitoring.Monitoring.MonitorKpiRequestOrBuilder { + + 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); + } + + // 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; + kpiIdBuilder_ = null; + } + monitoringWindowS_ = 0F; + samplingRateS_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_MonitorKpiRequest_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.MonitorKpiRequest getDefaultInstanceForType() { + return monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.MonitorKpiRequest build() { + monitoring.Monitoring.MonitorKpiRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.MonitorKpiRequest) { + return mergeFrom((monitoring.Monitoring.MonitorKpiRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.MonitorKpiRequest other) { + if (other == monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (other.getMonitoringWindowS() != 0F) { + setMonitoringWindowS(other.getMonitoringWindowS()); + } + if (other.getSamplingRateS() != 0F) { + setSamplingRateS(other.getSamplingRateS()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.MonitorKpiRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private float monitoringWindowS_; + + /** + * float monitoring_window_s = 2; + * @return The monitoringWindowS. + */ + @java.lang.Override + public float getMonitoringWindowS() { + return monitoringWindowS_; + } + + /** + * float monitoring_window_s = 2; + * @param value The monitoringWindowS to set. + * @return This builder for chaining. + */ + public Builder setMonitoringWindowS(float value) { + monitoringWindowS_ = value; + onChanged(); + return this; + } + + /** + * float monitoring_window_s = 2; + * @return This builder for chaining. + */ + public Builder clearMonitoringWindowS() { + monitoringWindowS_ = 0F; + onChanged(); + return this; + } + + private float samplingRateS_; + + /** + *
+             * Pending add field to reflect Available Device Protocols
+             * 
+ * + * float sampling_rate_s = 3; + * @return The samplingRateS. + */ + @java.lang.Override + public float getSamplingRateS() { + return samplingRateS_; + } + + /** + *
+             * Pending add field to reflect Available Device Protocols
+             * 
+ * + * float sampling_rate_s = 3; + * @param value The samplingRateS to set. + * @return This builder for chaining. + */ + public Builder setSamplingRateS(float value) { + samplingRateS_ = value; + onChanged(); + return this; + } + + /** + *
+             * Pending add field to reflect Available Device Protocols
+             * 
+ * + * float sampling_rate_s = 3; + * @return This builder for chaining. + */ + public Builder clearSamplingRateS() { + samplingRateS_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.MonitorKpiRequest) + } + + // @@protoc_insertion_point(class_scope:monitoring.MonitorKpiRequest) + private static final monitoring.Monitoring.MonitorKpiRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.MonitorKpiRequest(); + } + + public static monitoring.Monitoring.MonitorKpiRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.MonitorKpiRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiQueryOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + java.util.List getKpiIdsList(); + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + monitoring.Monitoring.KpiId getKpiIds(int index); + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + int getKpiIdsCount(); + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + java.util.List getKpiIdsOrBuilderList(); + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder(int index); + + /** + * float monitoring_window_s = 2; + * @return The monitoringWindowS. + */ + float getMonitoringWindowS(); + + /** + *
+         * used when you want something like "get the last N many samples
+         * 
+ * + * uint32 last_n_samples = 3; + * @return The lastNSamples. + */ + int getLastNSamples(); + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 4; + * @return Whether the startTimestamp field is set. + */ + boolean hasStartTimestamp(); + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 4; + * @return The startTimestamp. + */ + context.ContextOuterClass.Timestamp getStartTimestamp(); + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder(); + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 5; + * @return Whether the endTimestamp field is set. + */ + boolean hasEndTimestamp(); + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 5; + * @return The endTimestamp. + */ + context.ContextOuterClass.Timestamp getEndTimestamp(); + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder(); + } + + /** + * Protobuf type {@code monitoring.KpiQuery} + */ + public static final class KpiQuery extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiQuery) + KpiQueryOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use KpiQuery.newBuilder() to construct. + private KpiQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KpiQuery() { + kpiIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiQuery_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiQuery.class, monitoring.Monitoring.KpiQuery.Builder.class); + } + + public static final int KPI_IDS_FIELD_NUMBER = 1; + + private java.util.List kpiIds_; + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + @java.lang.Override + public java.util.List getKpiIdsList() { + return kpiIds_; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + @java.lang.Override + public java.util.List getKpiIdsOrBuilderList() { + return kpiIds_; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + @java.lang.Override + public int getKpiIdsCount() { + return kpiIds_.size(); + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiIds(int index) { + return kpiIds_.get(index); + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder(int index) { + return kpiIds_.get(index); + } + + public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; + + private float monitoringWindowS_; + + /** + * float monitoring_window_s = 2; + * @return The monitoringWindowS. + */ + @java.lang.Override + public float getMonitoringWindowS() { + return monitoringWindowS_; + } + + public static final int LAST_N_SAMPLES_FIELD_NUMBER = 3; + + private int lastNSamples_; + + /** + *
+         * used when you want something like "get the last N many samples
+         * 
+ * + * uint32 last_n_samples = 3; + * @return The lastNSamples. + */ + @java.lang.Override + public int getLastNSamples() { + return lastNSamples_; + } + + public static final int START_TIMESTAMP_FIELD_NUMBER = 4; + + private context.ContextOuterClass.Timestamp startTimestamp_; + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 4; + * @return Whether the startTimestamp field is set. + */ + @java.lang.Override + public boolean hasStartTimestamp() { + return startTimestamp_ != null; + } + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 4; + * @return The startTimestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getStartTimestamp() { + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; + } + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { + return getStartTimestamp(); + } + + public static final int END_TIMESTAMP_FIELD_NUMBER = 5; + + private context.ContextOuterClass.Timestamp endTimestamp_; + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 5; + * @return Whether the endTimestamp field is set. + */ + @java.lang.Override + public boolean hasEndTimestamp() { + return endTimestamp_ != null; + } + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 5; + * @return The endTimestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getEndTimestamp() { + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; + } + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { + return getEndTimestamp(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < kpiIds_.size(); i++) { + output.writeMessage(1, kpiIds_.get(i)); + } + if (monitoringWindowS_ != 0F) { + output.writeFloat(2, monitoringWindowS_); + } + if (lastNSamples_ != 0) { + output.writeUInt32(3, lastNSamples_); + } + if (startTimestamp_ != null) { + output.writeMessage(4, getStartTimestamp()); + } + if (endTimestamp_ != null) { + output.writeMessage(5, getEndTimestamp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < kpiIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, kpiIds_.get(i)); + } + if (monitoringWindowS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, monitoringWindowS_); + } + if (lastNSamples_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, lastNSamples_); + } + if (startTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStartTimestamp()); + } + if (endTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndTimestamp()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiQuery)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiQuery other = (monitoring.Monitoring.KpiQuery) obj; + if (!getKpiIdsList().equals(other.getKpiIdsList())) + return false; + if (java.lang.Float.floatToIntBits(getMonitoringWindowS()) != java.lang.Float.floatToIntBits(other.getMonitoringWindowS())) + return false; + if (getLastNSamples() != other.getLastNSamples()) + return false; + if (hasStartTimestamp() != other.hasStartTimestamp()) + return false; + if (hasStartTimestamp()) { + if (!getStartTimestamp().equals(other.getStartTimestamp())) + return false; + } + if (hasEndTimestamp() != other.hasEndTimestamp()) + return false; + if (hasEndTimestamp()) { + if (!getEndTimestamp().equals(other.getEndTimestamp())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getKpiIdsCount() > 0) { + hash = (37 * hash) + KPI_IDS_FIELD_NUMBER; + hash = (53 * hash) + getKpiIdsList().hashCode(); + } + hash = (37 * hash) + MONITORING_WINDOW_S_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getMonitoringWindowS()); + hash = (37 * hash) + LAST_N_SAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getLastNSamples(); + if (hasStartTimestamp()) { + hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getStartTimestamp().hashCode(); + } + if (hasEndTimestamp()) { + hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getEndTimestamp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiQuery parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiQuery parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiQuery parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiQuery prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiQuery) + monitoring.Monitoring.KpiQueryOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiQuery_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiQuery.class, monitoring.Monitoring.KpiQuery.Builder.class); + } + + // 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(); + if (kpiIdsBuilder_ == null) { + kpiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + kpiIdsBuilder_.clear(); + } + monitoringWindowS_ = 0F; + lastNSamples_ = 0; + if (startTimestampBuilder_ == null) { + startTimestamp_ = null; + } else { + startTimestamp_ = null; + startTimestampBuilder_ = null; + } + if (endTimestampBuilder_ == null) { + endTimestamp_ = null; + } else { + endTimestamp_ = null; + endTimestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiQuery_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiQuery getDefaultInstanceForType() { + return monitoring.Monitoring.KpiQuery.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiQuery build() { + monitoring.Monitoring.KpiQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.KpiQuery buildPartial() { + monitoring.Monitoring.KpiQuery result = new monitoring.Monitoring.KpiQuery(this); + int from_bitField0_ = bitField0_; + if (kpiIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + kpiIds_ = java.util.Collections.unmodifiableList(kpiIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.kpiIds_ = kpiIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiQuery) { + return mergeFrom((monitoring.Monitoring.KpiQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiQuery other) { + if (other == monitoring.Monitoring.KpiQuery.getDefaultInstance()) + return this; + if (kpiIdsBuilder_ == null) { + if (!other.kpiIds_.isEmpty()) { + if (kpiIds_.isEmpty()) { + kpiIds_ = other.kpiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKpiIdsIsMutable(); + kpiIds_.addAll(other.kpiIds_); + } + onChanged(); + } + } else { + if (!other.kpiIds_.isEmpty()) { + if (kpiIdsBuilder_.isEmpty()) { + kpiIdsBuilder_.dispose(); + kpiIdsBuilder_ = null; + kpiIds_ = other.kpiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + kpiIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKpiIdsFieldBuilder() : null; + } else { + kpiIdsBuilder_.addAllMessages(other.kpiIds_); + } + } + } + if (other.getMonitoringWindowS() != 0F) { + setMonitoringWindowS(other.getMonitoringWindowS()); + } + if (other.getLastNSamples() != 0) { + setLastNSamples(other.getLastNSamples()); + } + if (other.hasStartTimestamp()) { + mergeStartTimestamp(other.getStartTimestamp()); + } + if (other.hasEndTimestamp()) { + mergeEndTimestamp(other.getEndTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiQuery) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List kpiIds_ = java.util.Collections.emptyList(); + + private void ensureKpiIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + kpiIds_ = new java.util.ArrayList(kpiIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 kpiIdsBuilder_; + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public java.util.List getKpiIdsList() { + if (kpiIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(kpiIds_); + } else { + return kpiIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public int getKpiIdsCount() { + if (kpiIdsBuilder_ == null) { + return kpiIds_.size(); + } else { + return kpiIdsBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public monitoring.Monitoring.KpiId getKpiIds(int index) { + if (kpiIdsBuilder_ == null) { + return kpiIds_.get(index); + } else { + return kpiIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder setKpiIds(int index, monitoring.Monitoring.KpiId value) { + if (kpiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIdsIsMutable(); + kpiIds_.set(index, value); + onChanged(); + } else { + kpiIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder setKpiIds(int index, monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.set(index, builderForValue.build()); + onChanged(); + } else { + kpiIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder addKpiIds(monitoring.Monitoring.KpiId value) { + if (kpiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIdsIsMutable(); + kpiIds_.add(value); + onChanged(); + } else { + kpiIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder addKpiIds(int index, monitoring.Monitoring.KpiId value) { + if (kpiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIdsIsMutable(); + kpiIds_.add(index, value); + onChanged(); + } else { + kpiIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder addKpiIds(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.add(builderForValue.build()); + onChanged(); + } else { + kpiIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder addKpiIds(int index, monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.add(index, builderForValue.build()); + onChanged(); + } else { + kpiIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder addAllKpiIds(java.lang.Iterable values) { + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kpiIds_); + onChanged(); + } else { + kpiIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder clearKpiIds() { + if (kpiIdsBuilder_ == null) { + kpiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + kpiIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder removeKpiIds(int index) { + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.remove(index); + onChanged(); + } else { + kpiIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdsBuilder(int index) { + return getKpiIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder(int index) { + if (kpiIdsBuilder_ == null) { + return kpiIds_.get(index); + } else { + return kpiIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public java.util.List getKpiIdsOrBuilderList() { + if (kpiIdsBuilder_ != null) { + return kpiIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(kpiIds_); + } + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public monitoring.Monitoring.KpiId.Builder addKpiIdsBuilder() { + return getKpiIdsFieldBuilder().addBuilder(monitoring.Monitoring.KpiId.getDefaultInstance()); + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public monitoring.Monitoring.KpiId.Builder addKpiIdsBuilder(int index) { + return getKpiIdsFieldBuilder().addBuilder(index, monitoring.Monitoring.KpiId.getDefaultInstance()); + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public java.util.List getKpiIdsBuilderList() { + return getKpiIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getKpiIdsFieldBuilder() { + if (kpiIdsBuilder_ == null) { + kpiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(kpiIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + kpiIds_ = null; + } + return kpiIdsBuilder_; + } + + private float monitoringWindowS_; + + /** + * float monitoring_window_s = 2; + * @return The monitoringWindowS. + */ + @java.lang.Override + public float getMonitoringWindowS() { + return monitoringWindowS_; + } + + /** + * float monitoring_window_s = 2; + * @param value The monitoringWindowS to set. + * @return This builder for chaining. + */ + public Builder setMonitoringWindowS(float value) { + monitoringWindowS_ = value; + onChanged(); + return this; + } + + /** + * float monitoring_window_s = 2; + * @return This builder for chaining. + */ + public Builder clearMonitoringWindowS() { + monitoringWindowS_ = 0F; + onChanged(); + return this; + } + + private int lastNSamples_; + + /** + *
+             * used when you want something like "get the last N many samples
+             * 
+ * + * uint32 last_n_samples = 3; + * @return The lastNSamples. + */ + @java.lang.Override + public int getLastNSamples() { + return lastNSamples_; + } + + /** + *
+             * used when you want something like "get the last N many samples
+             * 
+ * + * uint32 last_n_samples = 3; + * @param value The lastNSamples to set. + * @return This builder for chaining. + */ + public Builder setLastNSamples(int value) { + lastNSamples_ = value; + onChanged(); + return this; + } + + /** + *
+             * used when you want something like "get the last N many samples
+             * 
+ * + * uint32 last_n_samples = 3; + * @return This builder for chaining. + */ + public Builder clearLastNSamples() { + lastNSamples_ = 0; + onChanged(); + return this; + } + + private context.ContextOuterClass.Timestamp startTimestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 startTimestampBuilder_; + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + * @return Whether the startTimestamp field is set. + */ + public boolean hasStartTimestamp() { + return startTimestampBuilder_ != null || startTimestamp_ != null; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + * @return The startTimestamp. + */ + public context.ContextOuterClass.Timestamp getStartTimestamp() { + if (startTimestampBuilder_ == null) { + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; + } else { + return startTimestampBuilder_.getMessage(); + } + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + public Builder setStartTimestamp(context.ContextOuterClass.Timestamp value) { + if (startTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTimestamp_ = value; + onChanged(); + } else { + startTimestampBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + public Builder setStartTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (startTimestampBuilder_ == null) { + startTimestamp_ = builderForValue.build(); + onChanged(); + } else { + startTimestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) { + if (startTimestampBuilder_ == null) { + if (startTimestamp_ != null) { + startTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(startTimestamp_).mergeFrom(value).buildPartial(); + } else { + startTimestamp_ = value; + } + onChanged(); + } else { + startTimestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + public Builder clearStartTimestamp() { + if (startTimestampBuilder_ == null) { + startTimestamp_ = null; + onChanged(); + } else { + startTimestamp_ = null; + startTimestampBuilder_ = null; + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() { + onChanged(); + return getStartTimestampFieldBuilder().getBuilder(); + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { + if (startTimestampBuilder_ != null) { + return startTimestampBuilder_.getMessageOrBuilder(); + } else { + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; + } + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getStartTimestampFieldBuilder() { + if (startTimestampBuilder_ == null) { + startTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getStartTimestamp(), getParentForChildren(), isClean()); + startTimestamp_ = null; + } + return startTimestampBuilder_; + } + + private context.ContextOuterClass.Timestamp endTimestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 endTimestampBuilder_; + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + * @return Whether the endTimestamp field is set. + */ + public boolean hasEndTimestamp() { + return endTimestampBuilder_ != null || endTimestamp_ != null; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + * @return The endTimestamp. + */ + public context.ContextOuterClass.Timestamp getEndTimestamp() { + if (endTimestampBuilder_ == null) { + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; + } else { + return endTimestampBuilder_.getMessage(); + } + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + public Builder setEndTimestamp(context.ContextOuterClass.Timestamp value) { + if (endTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTimestamp_ = value; + onChanged(); + } else { + endTimestampBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + public Builder setEndTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (endTimestampBuilder_ == null) { + endTimestamp_ = builderForValue.build(); + onChanged(); + } else { + endTimestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) { + if (endTimestampBuilder_ == null) { + if (endTimestamp_ != null) { + endTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(endTimestamp_).mergeFrom(value).buildPartial(); + } else { + endTimestamp_ = value; + } + onChanged(); + } else { + endTimestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + public Builder clearEndTimestamp() { + if (endTimestampBuilder_ == null) { + endTimestamp_ = null; + onChanged(); + } else { + endTimestamp_ = null; + endTimestampBuilder_ = null; + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() { + onChanged(); + return getEndTimestampFieldBuilder().getBuilder(); + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { + if (endTimestampBuilder_ != null) { + return endTimestampBuilder_.getMessageOrBuilder(); + } else { + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; + } + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndTimestampFieldBuilder() { + if (endTimestampBuilder_ == null) { + endTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndTimestamp(), getParentForChildren(), isClean()); + endTimestamp_ = null; + } + return endTimestampBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiQuery) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiQuery) + private static final monitoring.Monitoring.KpiQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiQuery(); + } + + public static monitoring.Monitoring.KpiQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RawKpiOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.RawKpi) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + + /** + * .context.Timestamp timestamp = 1; + * @return The timestamp. + */ + context.ContextOuterClass.Timestamp getTimestamp(); + + /** + * .context.Timestamp timestamp = 1; + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + + /** + * .monitoring.KpiValue kpi_value = 2; + * @return Whether the kpiValue field is set. + */ + boolean hasKpiValue(); + + /** + * .monitoring.KpiValue kpi_value = 2; + * @return The kpiValue. + */ + monitoring.Monitoring.KpiValue getKpiValue(); + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); + } + + /** + *
+     * cell
+     * 
+ * + * Protobuf type {@code monitoring.RawKpi} + */ + public static final class RawKpi extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.RawKpi) + RawKpiOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use RawKpi.newBuilder() to construct. + private RawKpi(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RawKpi() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.RawKpi.class, monitoring.Monitoring.RawKpi.Builder.class); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Timestamp timestamp_; + + /** + * .context.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + + /** + * .context.Timestamp timestamp = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + public static final int KPI_VALUE_FIELD_NUMBER = 2; + + private monitoring.Monitoring.KpiValue kpiValue_; + + /** + * .monitoring.KpiValue kpi_value = 2; + * @return Whether the kpiValue field is set. + */ + @java.lang.Override + public boolean hasKpiValue() { + return kpiValue_ != null; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + * @return The kpiValue. + */ + @java.lang.Override + public monitoring.Monitoring.KpiValue getKpiValue() { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { + return getKpiValue(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (timestamp_ != null) { + output.writeMessage(1, getTimestamp()); + } + if (kpiValue_ != null) { + output.writeMessage(2, getKpiValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimestamp()); + } + if (kpiValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.RawKpi)) { + return super.equals(obj); + } + monitoring.Monitoring.RawKpi other = (monitoring.Monitoring.RawKpi) obj; + if (hasTimestamp() != other.hasTimestamp()) + return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) + return false; + } + if (hasKpiValue() != other.hasKpiValue()) + return false; + if (hasKpiValue()) { + if (!getKpiValue().equals(other.getKpiValue())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + if (hasKpiValue()) { + hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getKpiValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.RawKpi parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpi parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpi parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpi parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpi parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpi parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpi parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpi parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpi parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpi parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpi parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpi parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.RawKpi prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * cell
+         * 
+ * + * Protobuf type {@code monitoring.RawKpi} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.RawKpi) + monitoring.Monitoring.RawKpiOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.RawKpi.class, monitoring.Monitoring.RawKpi.Builder.class); + } + + // 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; + timestampBuilder_ = null; + } + if (kpiValueBuilder_ == null) { + kpiValue_ = null; + } else { + kpiValue_ = null; + kpiValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpi getDefaultInstanceForType() { + return monitoring.Monitoring.RawKpi.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.RawKpi build() { + monitoring.Monitoring.RawKpi result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.RawKpi) { + return mergeFrom((monitoring.Monitoring.RawKpi) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.RawKpi other) { + if (other == monitoring.Monitoring.RawKpi.getDefaultInstance()) + return this; + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (other.hasKpiValue()) { + mergeKpiValue(other.getKpiValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + 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); + } + } + return this; + } + + private context.ContextOuterClass.Timestamp timestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; + + /** + * .context.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 1; + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * .context.Timestamp timestamp = 1; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 1; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Timestamp timestamp = 1; + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 1; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + /** + * .context.Timestamp timestamp = 1; + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + + /** + * .context.Timestamp timestamp = 1; + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } + + /** + * .context.Timestamp timestamp = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private monitoring.Monitoring.KpiValue kpiValue_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiValueBuilder_; + + /** + * .monitoring.KpiValue kpi_value = 2; + * @return Whether the kpiValue field is set. + */ + public boolean hasKpiValue() { + return kpiValueBuilder_ != null || kpiValue_ != null; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + * @return The kpiValue. + */ + public monitoring.Monitoring.KpiValue getKpiValue() { + if (kpiValueBuilder_ == null) { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } else { + return kpiValueBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { + if (kpiValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiValue_ = value; + onChanged(); + } else { + kpiValueBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + public Builder setKpiValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { + if (kpiValueBuilder_ == null) { + kpiValue_ = builderForValue.build(); + onChanged(); + } else { + kpiValueBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { + if (kpiValueBuilder_ == null) { + if (kpiValue_ != null) { + kpiValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); + } else { + kpiValue_ = value; + } + onChanged(); + } else { + kpiValueBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + public Builder clearKpiValue() { + if (kpiValueBuilder_ == null) { + kpiValue_ = null; + onChanged(); + } else { + kpiValue_ = null; + kpiValueBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { + onChanged(); + return getKpiValueFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { + if (kpiValueBuilder_ != null) { + return kpiValueBuilder_.getMessageOrBuilder(); + } else { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiValueFieldBuilder() { + if (kpiValueBuilder_ == null) { + kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiValue(), getParentForChildren(), isClean()); + kpiValue_ = null; + } + return kpiValueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.RawKpi) + } + + // @@protoc_insertion_point(class_scope:monitoring.RawKpi) + private static final monitoring.Monitoring.RawKpi DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpi(); + } + + public static monitoring.Monitoring.RawKpi getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpi getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RawKpiListOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.RawKpiList) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + java.util.List getRawKpisList(); + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + monitoring.Monitoring.RawKpi getRawKpis(int index); + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + int getRawKpisCount(); + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + java.util.List getRawKpisOrBuilderList(); + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder(int index); + } + + /** + *
+     * column
+     * 
+ * + * Protobuf type {@code monitoring.RawKpiList} + */ + public static final class RawKpiList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.RawKpiList) + RawKpiListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use RawKpiList.newBuilder() to construct. + private RawKpiList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RawKpiList() { + rawKpis_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.RawKpiList.class, monitoring.Monitoring.RawKpiList.Builder.class); + } + + public static final int KPI_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.KpiId kpiId_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int RAW_KPIS_FIELD_NUMBER = 2; + + private java.util.List rawKpis_; + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + @java.lang.Override + public java.util.List getRawKpisList() { + return rawKpis_; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + @java.lang.Override + public java.util.List getRawKpisOrBuilderList() { + return rawKpis_; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + @java.lang.Override + public int getRawKpisCount() { + return rawKpis_.size(); + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + @java.lang.Override + public monitoring.Monitoring.RawKpi getRawKpis(int index) { + return rawKpis_.get(index); + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + @java.lang.Override + public monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder(int index) { + return rawKpis_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + for (int i = 0; i < rawKpis_.size(); i++) { + output.writeMessage(2, rawKpis_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + for (int i = 0; i < rawKpis_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, rawKpis_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.RawKpiList)) { + return super.equals(obj); + } + monitoring.Monitoring.RawKpiList other = (monitoring.Monitoring.RawKpiList) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (!getRawKpisList().equals(other.getRawKpisList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + if (getRawKpisCount() > 0) { + hash = (37 * hash) + RAW_KPIS_FIELD_NUMBER; + hash = (53 * hash) + getRawKpisList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.RawKpiList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpiList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.RawKpiList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * column
+         * 
+ * + * Protobuf type {@code monitoring.RawKpiList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.RawKpiList) + monitoring.Monitoring.RawKpiListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.RawKpiList.class, monitoring.Monitoring.RawKpiList.Builder.class); + } + + // 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; + kpiIdBuilder_ = null; + } + if (rawKpisBuilder_ == null) { + rawKpis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rawKpisBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiList getDefaultInstanceForType() { + return monitoring.Monitoring.RawKpiList.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiList build() { + monitoring.Monitoring.RawKpiList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + if (rawKpisBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rawKpis_ = java.util.Collections.unmodifiableList(rawKpis_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.RawKpiList) { + return mergeFrom((monitoring.Monitoring.RawKpiList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.RawKpiList other) { + if (other == monitoring.Monitoring.RawKpiList.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (rawKpisBuilder_ == null) { + if (!other.rawKpis_.isEmpty()) { + if (rawKpis_.isEmpty()) { + rawKpis_ = other.rawKpis_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRawKpisIsMutable(); + rawKpis_.addAll(other.rawKpis_); + } + onChanged(); + } + } else { + if (!other.rawKpis_.isEmpty()) { + if (rawKpisBuilder_.isEmpty()) { + rawKpisBuilder_.dispose(); + rawKpisBuilder_ = null; + rawKpis_ = other.rawKpis_; + bitField0_ = (bitField0_ & ~0x00000001); + rawKpisBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRawKpisFieldBuilder() : null; + } else { + rawKpisBuilder_.addAllMessages(other.rawKpis_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.RawKpiList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private java.util.List rawKpis_ = java.util.Collections.emptyList(); + + private void ensureRawKpisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rawKpis_ = new java.util.ArrayList(rawKpis_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 rawKpisBuilder_; + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public java.util.List getRawKpisList() { + if (rawKpisBuilder_ == null) { + return java.util.Collections.unmodifiableList(rawKpis_); + } else { + return rawKpisBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public int getRawKpisCount() { + if (rawKpisBuilder_ == null) { + return rawKpis_.size(); + } else { + return rawKpisBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public monitoring.Monitoring.RawKpi getRawKpis(int index) { + if (rawKpisBuilder_ == null) { + return rawKpis_.get(index); + } else { + return rawKpisBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder setRawKpis(int index, monitoring.Monitoring.RawKpi value) { + if (rawKpisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpisIsMutable(); + rawKpis_.set(index, value); + onChanged(); + } else { + rawKpisBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder setRawKpis(int index, monitoring.Monitoring.RawKpi.Builder builderForValue) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.set(index, builderForValue.build()); + onChanged(); + } else { + rawKpisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder addRawKpis(monitoring.Monitoring.RawKpi value) { + if (rawKpisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpisIsMutable(); + rawKpis_.add(value); + onChanged(); + } else { + rawKpisBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder addRawKpis(int index, monitoring.Monitoring.RawKpi value) { + if (rawKpisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpisIsMutable(); + rawKpis_.add(index, value); + onChanged(); + } else { + rawKpisBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder addRawKpis(monitoring.Monitoring.RawKpi.Builder builderForValue) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.add(builderForValue.build()); + onChanged(); + } else { + rawKpisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder addRawKpis(int index, monitoring.Monitoring.RawKpi.Builder builderForValue) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.add(index, builderForValue.build()); + onChanged(); + } else { + rawKpisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder addAllRawKpis(java.lang.Iterable values) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rawKpis_); + onChanged(); + } else { + rawKpisBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder clearRawKpis() { + if (rawKpisBuilder_ == null) { + rawKpis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rawKpisBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder removeRawKpis(int index) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.remove(index); + onChanged(); + } else { + rawKpisBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public monitoring.Monitoring.RawKpi.Builder getRawKpisBuilder(int index) { + return getRawKpisFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder(int index) { + if (rawKpisBuilder_ == null) { + return rawKpis_.get(index); + } else { + return rawKpisBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public java.util.List getRawKpisOrBuilderList() { + if (rawKpisBuilder_ != null) { + return rawKpisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rawKpis_); + } + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public monitoring.Monitoring.RawKpi.Builder addRawKpisBuilder() { + return getRawKpisFieldBuilder().addBuilder(monitoring.Monitoring.RawKpi.getDefaultInstance()); + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public monitoring.Monitoring.RawKpi.Builder addRawKpisBuilder(int index) { + return getRawKpisFieldBuilder().addBuilder(index, monitoring.Monitoring.RawKpi.getDefaultInstance()); + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public java.util.List getRawKpisBuilderList() { + return getRawKpisFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getRawKpisFieldBuilder() { + if (rawKpisBuilder_ == null) { + rawKpisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(rawKpis_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rawKpis_ = null; + } + return rawKpisBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.RawKpiList) + } + + // @@protoc_insertion_point(class_scope:monitoring.RawKpiList) + private static final monitoring.Monitoring.RawKpiList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpiList(); + } + + public static monitoring.Monitoring.RawKpiList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RawKpiTableOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.RawKpiTable) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + java.util.List getRawKpiListsList(); + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + monitoring.Monitoring.RawKpiList getRawKpiLists(int index); + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + int getRawKpiListsCount(); + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + java.util.List getRawKpiListsOrBuilderList(); + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder(int index); + } + + /** + *
+     * table
+     * 
+ * + * Protobuf type {@code monitoring.RawKpiTable} + */ + public static final class RawKpiTable extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.RawKpiTable) + RawKpiTableOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use RawKpiTable.newBuilder() to construct. + private RawKpiTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RawKpiTable() { + rawKpiLists_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.RawKpiTable.class, monitoring.Monitoring.RawKpiTable.Builder.class); + } + + public static final int RAW_KPI_LISTS_FIELD_NUMBER = 1; + + private java.util.List rawKpiLists_; + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + @java.lang.Override + public java.util.List getRawKpiListsList() { + return rawKpiLists_; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + @java.lang.Override + public java.util.List getRawKpiListsOrBuilderList() { + return rawKpiLists_; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + @java.lang.Override + public int getRawKpiListsCount() { + return rawKpiLists_.size(); + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + @java.lang.Override + public monitoring.Monitoring.RawKpiList getRawKpiLists(int index) { + return rawKpiLists_.get(index); + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + @java.lang.Override + public monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder(int index) { + return rawKpiLists_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < rawKpiLists_.size(); i++) { + output.writeMessage(1, rawKpiLists_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < rawKpiLists_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rawKpiLists_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.RawKpiTable)) { + return super.equals(obj); + } + monitoring.Monitoring.RawKpiTable other = (monitoring.Monitoring.RawKpiTable) obj; + if (!getRawKpiListsList().equals(other.getRawKpiListsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRawKpiListsCount() > 0) { + hash = (37 * hash) + RAW_KPI_LISTS_FIELD_NUMBER; + hash = (53 * hash) + getRawKpiListsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiTable parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpiTable parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.RawKpiTable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * table
+         * 
+ * + * Protobuf type {@code monitoring.RawKpiTable} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.RawKpiTable) + monitoring.Monitoring.RawKpiTableOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.RawKpiTable.class, monitoring.Monitoring.RawKpiTable.Builder.class); + } + + // 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(); + if (rawKpiListsBuilder_ == null) { + rawKpiLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rawKpiListsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiTable getDefaultInstanceForType() { + return monitoring.Monitoring.RawKpiTable.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiTable build() { + monitoring.Monitoring.RawKpiTable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiTable buildPartial() { + monitoring.Monitoring.RawKpiTable result = new monitoring.Monitoring.RawKpiTable(this); + int from_bitField0_ = bitField0_; + if (rawKpiListsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rawKpiLists_ = java.util.Collections.unmodifiableList(rawKpiLists_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rawKpiLists_ = rawKpiLists_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.RawKpiTable) { + return mergeFrom((monitoring.Monitoring.RawKpiTable) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.RawKpiTable other) { + if (other == monitoring.Monitoring.RawKpiTable.getDefaultInstance()) + return this; + if (rawKpiListsBuilder_ == null) { + if (!other.rawKpiLists_.isEmpty()) { + if (rawKpiLists_.isEmpty()) { + rawKpiLists_ = other.rawKpiLists_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRawKpiListsIsMutable(); + rawKpiLists_.addAll(other.rawKpiLists_); + } + onChanged(); + } + } else { + if (!other.rawKpiLists_.isEmpty()) { + if (rawKpiListsBuilder_.isEmpty()) { + rawKpiListsBuilder_.dispose(); + rawKpiListsBuilder_ = null; + rawKpiLists_ = other.rawKpiLists_; + bitField0_ = (bitField0_ & ~0x00000001); + rawKpiListsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRawKpiListsFieldBuilder() : null; + } else { + rawKpiListsBuilder_.addAllMessages(other.rawKpiLists_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.RawKpiTable) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List rawKpiLists_ = java.util.Collections.emptyList(); + + private void ensureRawKpiListsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rawKpiLists_ = new java.util.ArrayList(rawKpiLists_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 rawKpiListsBuilder_; + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public java.util.List getRawKpiListsList() { + if (rawKpiListsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rawKpiLists_); + } else { + return rawKpiListsBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public int getRawKpiListsCount() { + if (rawKpiListsBuilder_ == null) { + return rawKpiLists_.size(); + } else { + return rawKpiListsBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public monitoring.Monitoring.RawKpiList getRawKpiLists(int index) { + if (rawKpiListsBuilder_ == null) { + return rawKpiLists_.get(index); + } else { + return rawKpiListsBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder setRawKpiLists(int index, monitoring.Monitoring.RawKpiList value) { + if (rawKpiListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpiListsIsMutable(); + rawKpiLists_.set(index, value); + onChanged(); + } else { + rawKpiListsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder setRawKpiLists(int index, monitoring.Monitoring.RawKpiList.Builder builderForValue) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.set(index, builderForValue.build()); + onChanged(); + } else { + rawKpiListsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder addRawKpiLists(monitoring.Monitoring.RawKpiList value) { + if (rawKpiListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(value); + onChanged(); + } else { + rawKpiListsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder addRawKpiLists(int index, monitoring.Monitoring.RawKpiList value) { + if (rawKpiListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(index, value); + onChanged(); + } else { + rawKpiListsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder addRawKpiLists(monitoring.Monitoring.RawKpiList.Builder builderForValue) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(builderForValue.build()); + onChanged(); + } else { + rawKpiListsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder addRawKpiLists(int index, monitoring.Monitoring.RawKpiList.Builder builderForValue) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(index, builderForValue.build()); + onChanged(); + } else { + rawKpiListsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder addAllRawKpiLists(java.lang.Iterable values) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rawKpiLists_); + onChanged(); + } else { + rawKpiListsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder clearRawKpiLists() { + if (rawKpiListsBuilder_ == null) { + rawKpiLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rawKpiListsBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder removeRawKpiLists(int index) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.remove(index); + onChanged(); + } else { + rawKpiListsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public monitoring.Monitoring.RawKpiList.Builder getRawKpiListsBuilder(int index) { + return getRawKpiListsFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder(int index) { + if (rawKpiListsBuilder_ == null) { + return rawKpiLists_.get(index); + } else { + return rawKpiListsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public java.util.List getRawKpiListsOrBuilderList() { + if (rawKpiListsBuilder_ != null) { + return rawKpiListsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rawKpiLists_); + } + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public monitoring.Monitoring.RawKpiList.Builder addRawKpiListsBuilder() { + return getRawKpiListsFieldBuilder().addBuilder(monitoring.Monitoring.RawKpiList.getDefaultInstance()); + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public monitoring.Monitoring.RawKpiList.Builder addRawKpiListsBuilder(int index) { + return getRawKpiListsFieldBuilder().addBuilder(index, monitoring.Monitoring.RawKpiList.getDefaultInstance()); + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public java.util.List getRawKpiListsBuilderList() { + return getRawKpiListsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getRawKpiListsFieldBuilder() { + if (rawKpiListsBuilder_ == null) { + rawKpiListsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(rawKpiLists_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rawKpiLists_ = null; + } + return rawKpiListsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.RawKpiTable) + } + + // @@protoc_insertion_point(class_scope:monitoring.RawKpiTable) + private static final monitoring.Monitoring.RawKpiTable DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpiTable(); + } + + public static monitoring.Monitoring.RawKpiTable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiTable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiIdOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid kpi_id = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .context.Uuid kpi_id = 1; + * @return The kpiId. + */ + context.ContextOuterClass.Uuid getKpiId(); + + /** + * .context.Uuid kpi_id = 1; + */ + context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder(); + } + + /** + * Protobuf type {@code monitoring.KpiId} + */ + public static final class KpiId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiId) + KpiIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use KpiId.newBuilder() to construct. + private KpiId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KpiId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiId_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiId.class, monitoring.Monitoring.KpiId.Builder.class); + } + + public static final int KPI_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid kpiId_; + + /** + * .context.Uuid kpi_id = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .context.Uuid kpi_id = 1; + * @return The kpiId. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getKpiId() { + return kpiId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; + } + + /** + * .context.Uuid kpi_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiId)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiId other = (monitoring.Monitoring.KpiId) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiId) + monitoring.Monitoring.KpiIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiId_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiId.class, monitoring.Monitoring.KpiId.Builder.class); + } + + // 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; + kpiIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiId_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiId getDefaultInstanceForType() { + return monitoring.Monitoring.KpiId.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiId build() { + monitoring.Monitoring.KpiId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiId) { + return mergeFrom((monitoring.Monitoring.KpiId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiId other) { + if (other == monitoring.Monitoring.KpiId.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .context.Uuid kpi_id = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .context.Uuid kpi_id = 1; + * @return The kpiId. + */ + public context.ContextOuterClass.Uuid getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .context.Uuid kpi_id = 1; + */ + public Builder setKpiId(context.ContextOuterClass.Uuid value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid kpi_id = 1; + */ + public Builder setKpiId(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid kpi_id = 1; + */ + public Builder mergeKpiId(context.ContextOuterClass.Uuid value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = context.ContextOuterClass.Uuid.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid kpi_id = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid kpi_id = 1; + */ + public context.ContextOuterClass.Uuid.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid kpi_id = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; + } + } + + /** + * .context.Uuid kpi_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiId) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiId) + private static final monitoring.Monitoring.KpiId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiId(); + } + + public static monitoring.Monitoring.KpiId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.Kpi) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * .context.Timestamp timestamp = 2; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + + /** + * .context.Timestamp timestamp = 2; + * @return The timestamp. + */ + context.ContextOuterClass.Timestamp getTimestamp(); + + /** + * .context.Timestamp timestamp = 2; + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + + /** + * .monitoring.KpiValue kpi_value = 3; + * @return Whether the kpiValue field is set. + */ + boolean hasKpiValue(); + + /** + * .monitoring.KpiValue kpi_value = 3; + * @return The kpiValue. + */ + monitoring.Monitoring.KpiValue getKpiValue(); + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); + } + + /** + * Protobuf type {@code monitoring.Kpi} + */ + public static final class Kpi extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.Kpi) + KpiOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Kpi.newBuilder() to construct. + private Kpi(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Kpi() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_Kpi_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.Kpi.class, monitoring.Monitoring.Kpi.Builder.class); + } + + public static final int KPI_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.KpiId kpiId_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 2; + + private context.ContextOuterClass.Timestamp timestamp_; + + /** + * .context.Timestamp timestamp = 2; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 2; + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + + /** + * .context.Timestamp timestamp = 2; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + public static final int KPI_VALUE_FIELD_NUMBER = 3; + + private monitoring.Monitoring.KpiValue kpiValue_; + + /** + * .monitoring.KpiValue kpi_value = 3; + * @return Whether the kpiValue field is set. + */ + @java.lang.Override + public boolean hasKpiValue() { + return kpiValue_ != null; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + * @return The kpiValue. + */ + @java.lang.Override + public monitoring.Monitoring.KpiValue getKpiValue() { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { + return getKpiValue(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + if (timestamp_ != null) { + output.writeMessage(2, getTimestamp()); + } + if (kpiValue_ != null) { + output.writeMessage(3, getKpiValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTimestamp()); + } + if (kpiValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKpiValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.Kpi)) { + return super.equals(obj); + } + monitoring.Monitoring.Kpi other = (monitoring.Monitoring.Kpi) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (hasTimestamp() != other.hasTimestamp()) + return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) + return false; + } + if (hasKpiValue() != other.hasKpiValue()) + return false; + if (hasKpiValue()) { + if (!getKpiValue().equals(other.getKpiValue())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + if (hasKpiValue()) { + hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getKpiValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.Kpi parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.Kpi parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.Kpi parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.Kpi parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.Kpi parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.Kpi parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.Kpi parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.Kpi parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.Kpi parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.Kpi parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.Kpi parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.Kpi parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.Kpi prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.Kpi} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.Kpi) + monitoring.Monitoring.KpiOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_Kpi_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_Kpi_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.Kpi.class, monitoring.Monitoring.Kpi.Builder.class); + } + + // 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; + kpiIdBuilder_ = null; + } + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + if (kpiValueBuilder_ == null) { + kpiValue_ = null; + } else { + kpiValue_ = null; + kpiValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_Kpi_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.Kpi getDefaultInstanceForType() { + return monitoring.Monitoring.Kpi.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.Kpi build() { + monitoring.Monitoring.Kpi result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.Kpi) { + return mergeFrom((monitoring.Monitoring.Kpi) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.Kpi other) { + if (other == monitoring.Monitoring.Kpi.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (other.hasKpiValue()) { + mergeKpiValue(other.getKpiValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.Kpi) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private context.ContextOuterClass.Timestamp timestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; + + /** + * .context.Timestamp timestamp = 2; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 2; + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * .context.Timestamp timestamp = 2; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 2; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Timestamp timestamp = 2; + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 2; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + /** + * .context.Timestamp timestamp = 2; + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + + /** + * .context.Timestamp timestamp = 2; + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } + + /** + * .context.Timestamp timestamp = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private monitoring.Monitoring.KpiValue kpiValue_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiValueBuilder_; + + /** + * .monitoring.KpiValue kpi_value = 3; + * @return Whether the kpiValue field is set. + */ + public boolean hasKpiValue() { + return kpiValueBuilder_ != null || kpiValue_ != null; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + * @return The kpiValue. + */ + public monitoring.Monitoring.KpiValue getKpiValue() { + if (kpiValueBuilder_ == null) { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } else { + return kpiValueBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { + if (kpiValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiValue_ = value; + onChanged(); + } else { + kpiValueBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + public Builder setKpiValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { + if (kpiValueBuilder_ == null) { + kpiValue_ = builderForValue.build(); + onChanged(); + } else { + kpiValueBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { + if (kpiValueBuilder_ == null) { + if (kpiValue_ != null) { + kpiValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); + } else { + kpiValue_ = value; + } + onChanged(); + } else { + kpiValueBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + public Builder clearKpiValue() { + if (kpiValueBuilder_ == null) { + kpiValue_ = null; + onChanged(); + } else { + kpiValue_ = null; + kpiValueBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { + onChanged(); + return getKpiValueFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { + if (kpiValueBuilder_ != null) { + return kpiValueBuilder_.getMessageOrBuilder(); + } else { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiValueFieldBuilder() { + if (kpiValueBuilder_ == null) { + kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiValue(), getParentForChildren(), isClean()); + kpiValue_ = null; + } + return kpiValueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.Kpi) + } + + // @@protoc_insertion_point(class_scope:monitoring.Kpi) + private static final monitoring.Monitoring.Kpi DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.Kpi(); + } + + public static monitoring.Monitoring.Kpi getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.Kpi getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiValueRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiValueRange) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.KpiValue kpiMinValue = 1; + * @return Whether the kpiMinValue field is set. + */ + boolean hasKpiMinValue(); + + /** + * .monitoring.KpiValue kpiMinValue = 1; + * @return The kpiMinValue. + */ + monitoring.Monitoring.KpiValue getKpiMinValue(); + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder(); + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + * @return Whether the kpiMaxValue field is set. + */ + boolean hasKpiMaxValue(); + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + * @return The kpiMaxValue. + */ + monitoring.Monitoring.KpiValue getKpiMaxValue(); + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder(); + + /** + *
+         * by default True
+         * 
+ * + * bool inRange = 3; + * @return The inRange. + */ + boolean getInRange(); + + /** + *
+         * False is outside the interval
+         * 
+ * + * bool includeMinValue = 4; + * @return The includeMinValue. + */ + boolean getIncludeMinValue(); + + /** + *
+         * False is outside the interval
+         * 
+ * + * bool includeMaxValue = 5; + * @return The includeMaxValue. + */ + boolean getIncludeMaxValue(); + } + + /** + * Protobuf type {@code monitoring.KpiValueRange} + */ + public static final class KpiValueRange extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiValueRange) + KpiValueRangeOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use KpiValueRange.newBuilder() to construct. + private KpiValueRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KpiValueRange() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiValueRange.class, monitoring.Monitoring.KpiValueRange.Builder.class); + } + + public static final int KPIMINVALUE_FIELD_NUMBER = 1; + + private monitoring.Monitoring.KpiValue kpiMinValue_; + + /** + * .monitoring.KpiValue kpiMinValue = 1; + * @return Whether the kpiMinValue field is set. + */ + @java.lang.Override + public boolean hasKpiMinValue() { + return kpiMinValue_ != null; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + * @return The kpiMinValue. + */ + @java.lang.Override + public monitoring.Monitoring.KpiValue getKpiMinValue() { + return kpiMinValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder() { + return getKpiMinValue(); + } + + public static final int KPIMAXVALUE_FIELD_NUMBER = 2; + + private monitoring.Monitoring.KpiValue kpiMaxValue_; + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + * @return Whether the kpiMaxValue field is set. + */ + @java.lang.Override + public boolean hasKpiMaxValue() { + return kpiMaxValue_ != null; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + * @return The kpiMaxValue. + */ + @java.lang.Override + public monitoring.Monitoring.KpiValue getKpiMaxValue() { + return kpiMaxValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder() { + return getKpiMaxValue(); + } + + public static final int INRANGE_FIELD_NUMBER = 3; + + private boolean inRange_; + + /** + *
+         * by default True
+         * 
+ * + * bool inRange = 3; + * @return The inRange. + */ + @java.lang.Override + public boolean getInRange() { + return inRange_; + } + + public static final int INCLUDEMINVALUE_FIELD_NUMBER = 4; + + private boolean includeMinValue_; + + /** + *
+         * False is outside the interval
+         * 
+ * + * bool includeMinValue = 4; + * @return The includeMinValue. + */ + @java.lang.Override + public boolean getIncludeMinValue() { + return includeMinValue_; + } + + public static final int INCLUDEMAXVALUE_FIELD_NUMBER = 5; + + private boolean includeMaxValue_; + + /** + *
+         * False is outside the interval
+         * 
+ * + * bool includeMaxValue = 5; + * @return The includeMaxValue. + */ + @java.lang.Override + public boolean getIncludeMaxValue() { + return includeMaxValue_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiMinValue_ != null) { + output.writeMessage(1, getKpiMinValue()); + } + if (kpiMaxValue_ != null) { + output.writeMessage(2, getKpiMaxValue()); + } + if (inRange_ != false) { + output.writeBool(3, inRange_); + } + if (includeMinValue_ != false) { + output.writeBool(4, includeMinValue_); + } + if (includeMaxValue_ != false) { + output.writeBool(5, includeMaxValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiMinValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiMinValue()); + } + if (kpiMaxValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiMaxValue()); + } + if (inRange_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, inRange_); + } + if (includeMinValue_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeMinValue_); + } + if (includeMaxValue_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, includeMaxValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiValueRange)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiValueRange other = (monitoring.Monitoring.KpiValueRange) obj; + if (hasKpiMinValue() != other.hasKpiMinValue()) + return false; + if (hasKpiMinValue()) { + if (!getKpiMinValue().equals(other.getKpiMinValue())) + return false; + } + if (hasKpiMaxValue() != other.hasKpiMaxValue()) + return false; + if (hasKpiMaxValue()) { + if (!getKpiMaxValue().equals(other.getKpiMaxValue())) + return false; + } + if (getInRange() != other.getInRange()) + return false; + if (getIncludeMinValue() != other.getIncludeMinValue()) + return false; + if (getIncludeMaxValue() != other.getIncludeMaxValue()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiMinValue()) { + hash = (37 * hash) + KPIMINVALUE_FIELD_NUMBER; + hash = (53 * hash) + getKpiMinValue().hashCode(); + } + if (hasKpiMaxValue()) { + hash = (37 * hash) + KPIMAXVALUE_FIELD_NUMBER; + hash = (53 * hash) + getKpiMaxValue().hashCode(); + } + hash = (37 * hash) + INRANGE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInRange()); + hash = (37 * hash) + INCLUDEMINVALUE_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValueRange parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiValueRange parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiValueRange prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiValueRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiValueRange) + monitoring.Monitoring.KpiValueRangeOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiValueRange.class, monitoring.Monitoring.KpiValueRange.Builder.class); + } + + // 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; + kpiMinValueBuilder_ = null; + } + if (kpiMaxValueBuilder_ == null) { + kpiMaxValue_ = null; + } else { + kpiMaxValue_ = null; + kpiMaxValueBuilder_ = null; + } + inRange_ = false; + includeMinValue_ = false; + includeMaxValue_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiValueRange getDefaultInstanceForType() { + return monitoring.Monitoring.KpiValueRange.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiValueRange build() { + monitoring.Monitoring.KpiValueRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiValueRange) { + return mergeFrom((monitoring.Monitoring.KpiValueRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiValueRange other) { + if (other == monitoring.Monitoring.KpiValueRange.getDefaultInstance()) + return this; + if (other.hasKpiMinValue()) { + mergeKpiMinValue(other.getKpiMinValue()); + } + if (other.hasKpiMaxValue()) { + mergeKpiMaxValue(other.getKpiMaxValue()); + } + if (other.getInRange() != false) { + setInRange(other.getInRange()); + } + if (other.getIncludeMinValue() != false) { + setIncludeMinValue(other.getIncludeMinValue()); + } + if (other.getIncludeMaxValue() != false) { + setIncludeMaxValue(other.getIncludeMaxValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiValueRange) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.KpiValue kpiMinValue_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiMinValueBuilder_; + + /** + * .monitoring.KpiValue kpiMinValue = 1; + * @return Whether the kpiMinValue field is set. + */ + public boolean hasKpiMinValue() { + return kpiMinValueBuilder_ != null || kpiMinValue_ != null; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + * @return The kpiMinValue. + */ + public monitoring.Monitoring.KpiValue getKpiMinValue() { + if (kpiMinValueBuilder_ == null) { + return kpiMinValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; + } else { + return kpiMinValueBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + public Builder setKpiMinValue(monitoring.Monitoring.KpiValue value) { + if (kpiMinValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiMinValue_ = value; + onChanged(); + } else { + kpiMinValueBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + public Builder setKpiMinValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { + if (kpiMinValueBuilder_ == null) { + kpiMinValue_ = builderForValue.build(); + onChanged(); + } else { + kpiMinValueBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + public Builder mergeKpiMinValue(monitoring.Monitoring.KpiValue value) { + if (kpiMinValueBuilder_ == null) { + if (kpiMinValue_ != null) { + kpiMinValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiMinValue_).mergeFrom(value).buildPartial(); + } else { + kpiMinValue_ = value; + } + onChanged(); + } else { + kpiMinValueBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + public Builder clearKpiMinValue() { + if (kpiMinValueBuilder_ == null) { + kpiMinValue_ = null; + onChanged(); + } else { + kpiMinValue_ = null; + kpiMinValueBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + public monitoring.Monitoring.KpiValue.Builder getKpiMinValueBuilder() { + onChanged(); + return getKpiMinValueFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + public monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder() { + if (kpiMinValueBuilder_ != null) { + return kpiMinValueBuilder_.getMessageOrBuilder(); + } else { + return kpiMinValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; + } + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiMinValueFieldBuilder() { + if (kpiMinValueBuilder_ == null) { + kpiMinValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiMinValue(), getParentForChildren(), isClean()); + kpiMinValue_ = null; + } + return kpiMinValueBuilder_; + } + + private monitoring.Monitoring.KpiValue kpiMaxValue_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiMaxValueBuilder_; + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + * @return Whether the kpiMaxValue field is set. + */ + public boolean hasKpiMaxValue() { + return kpiMaxValueBuilder_ != null || kpiMaxValue_ != null; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + * @return The kpiMaxValue. + */ + public monitoring.Monitoring.KpiValue getKpiMaxValue() { + if (kpiMaxValueBuilder_ == null) { + return kpiMaxValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; + } else { + return kpiMaxValueBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + public Builder setKpiMaxValue(monitoring.Monitoring.KpiValue value) { + if (kpiMaxValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiMaxValue_ = value; + onChanged(); + } else { + kpiMaxValueBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + public Builder setKpiMaxValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { + if (kpiMaxValueBuilder_ == null) { + kpiMaxValue_ = builderForValue.build(); + onChanged(); + } else { + kpiMaxValueBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + public Builder mergeKpiMaxValue(monitoring.Monitoring.KpiValue value) { + if (kpiMaxValueBuilder_ == null) { + if (kpiMaxValue_ != null) { + kpiMaxValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiMaxValue_).mergeFrom(value).buildPartial(); + } else { + kpiMaxValue_ = value; + } + onChanged(); + } else { + kpiMaxValueBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + public Builder clearKpiMaxValue() { + if (kpiMaxValueBuilder_ == null) { + kpiMaxValue_ = null; + onChanged(); + } else { + kpiMaxValue_ = null; + kpiMaxValueBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + public monitoring.Monitoring.KpiValue.Builder getKpiMaxValueBuilder() { + onChanged(); + return getKpiMaxValueFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + public monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder() { + if (kpiMaxValueBuilder_ != null) { + return kpiMaxValueBuilder_.getMessageOrBuilder(); + } else { + return kpiMaxValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; + } + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiMaxValueFieldBuilder() { + if (kpiMaxValueBuilder_ == null) { + kpiMaxValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiMaxValue(), getParentForChildren(), isClean()); + kpiMaxValue_ = null; + } + return kpiMaxValueBuilder_; + } + + private boolean inRange_; + + /** + *
+             * by default True
+             * 
+ * + * bool inRange = 3; + * @return The inRange. + */ + @java.lang.Override + public boolean getInRange() { + return inRange_; + } + + /** + *
+             * by default True
+             * 
+ * + * bool inRange = 3; + * @param value The inRange to set. + * @return This builder for chaining. + */ + public Builder setInRange(boolean value) { + inRange_ = value; + onChanged(); + return this; + } + + /** + *
+             * by default True
+             * 
+ * + * bool inRange = 3; + * @return This builder for chaining. + */ + public Builder clearInRange() { + inRange_ = false; + onChanged(); + return this; + } + + private boolean includeMinValue_; + + /** + *
+             * False is outside the interval
+             * 
+ * + * bool includeMinValue = 4; + * @return The includeMinValue. + */ + @java.lang.Override + public boolean getIncludeMinValue() { + return includeMinValue_; + } + + /** + *
+             * False is outside the interval
+             * 
+ * + * bool includeMinValue = 4; + * @param value The includeMinValue to set. + * @return This builder for chaining. + */ + public Builder setIncludeMinValue(boolean value) { + includeMinValue_ = value; + onChanged(); + return this; + } + + /** + *
+             * False is outside the interval
+             * 
+ * + * bool includeMinValue = 4; + * @return This builder for chaining. + */ + public Builder clearIncludeMinValue() { + includeMinValue_ = false; + onChanged(); + return this; + } + + private boolean includeMaxValue_; + + /** + *
+             * False is outside the interval
+             * 
+ * + * bool includeMaxValue = 5; + * @return The includeMaxValue. + */ + @java.lang.Override + public boolean getIncludeMaxValue() { + return includeMaxValue_; + } + + /** + *
+             * False is outside the interval
+             * 
+ * + * bool includeMaxValue = 5; + * @param value The includeMaxValue to set. + * @return This builder for chaining. + */ + public Builder setIncludeMaxValue(boolean value) { + includeMaxValue_ = value; + onChanged(); + return this; + } + + /** + *
+             * False is outside the interval
+             * 
+ * + * bool includeMaxValue = 5; + * @return This builder for chaining. + */ + public Builder clearIncludeMaxValue() { + includeMaxValue_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiValueRange) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiValueRange) + private static final monitoring.Monitoring.KpiValueRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiValueRange(); + } + + public static monitoring.Monitoring.KpiValueRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiValueRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiValueOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiValue) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 int32Val = 1; + * @return Whether the int32Val field is set. + */ + boolean hasInt32Val(); + + /** + * int32 int32Val = 1; + * @return The int32Val. + */ + int getInt32Val(); + + /** + * uint32 uint32Val = 2; + * @return Whether the uint32Val field is set. + */ + boolean hasUint32Val(); + + /** + * uint32 uint32Val = 2; + * @return The uint32Val. + */ + int getUint32Val(); + + /** + * int64 int64Val = 3; + * @return Whether the int64Val field is set. + */ + boolean hasInt64Val(); + + /** + * int64 int64Val = 3; + * @return The int64Val. + */ + long getInt64Val(); + + /** + * uint64 uint64Val = 4; + * @return Whether the uint64Val field is set. + */ + boolean hasUint64Val(); + + /** + * uint64 uint64Val = 4; + * @return The uint64Val. + */ + long getUint64Val(); + + /** + * float floatVal = 5; + * @return Whether the floatVal field is set. + */ + boolean hasFloatVal(); + + /** + * float floatVal = 5; + * @return The floatVal. + */ + float getFloatVal(); + + /** + * string stringVal = 6; + * @return Whether the stringVal field is set. + */ + boolean hasStringVal(); + + /** + * string stringVal = 6; + * @return The stringVal. + */ + java.lang.String getStringVal(); + + /** + * string stringVal = 6; + * @return The bytes for stringVal. + */ + com.google.protobuf.ByteString getStringValBytes(); + + /** + * bool boolVal = 7; + * @return Whether the boolVal field is set. + */ + boolean hasBoolVal(); + + /** + * bool boolVal = 7; + * @return The boolVal. + */ + boolean getBoolVal(); + + public monitoring.Monitoring.KpiValue.ValueCase getValueCase(); + } + + /** + * Protobuf type {@code monitoring.KpiValue} + */ + public static final class KpiValue extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiValue) + KpiValueOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use KpiValue.newBuilder() to construct. + private KpiValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KpiValue() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiValue_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiValue.class, monitoring.Monitoring.KpiValue.Builder.class); + } + + private int valueCase_ = 0; + + private java.lang.Object value_; + + public enum ValueCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { + + INT32VAL(1), + UINT32VAL(2), + INT64VAL(3), + UINT64VAL(4), + FLOATVAL(5), + STRINGVAL(6), + BOOLVAL(7), + VALUE_NOT_SET(0); + + private final int value; + + private ValueCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch(value) { + case 1: + return INT32VAL; + case 2: + return UINT32VAL; + case 3: + return INT64VAL; + case 4: + return UINT64VAL; + case 5: + return FLOATVAL; + case 6: + return STRINGVAL; + case 7: + return BOOLVAL; + case 0: + return VALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + } + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public static final int INT32VAL_FIELD_NUMBER = 1; + + /** + * int32 int32Val = 1; + * @return Whether the int32Val field is set. + */ + @java.lang.Override + public boolean hasInt32Val() { + return valueCase_ == 1; + } + + /** + * int32 int32Val = 1; + * @return The int32Val. + */ + @java.lang.Override + public int getInt32Val() { + if (valueCase_ == 1) { + return (java.lang.Integer) value_; + } + return 0; + } + + public static final int UINT32VAL_FIELD_NUMBER = 2; + + /** + * uint32 uint32Val = 2; + * @return Whether the uint32Val field is set. + */ + @java.lang.Override + public boolean hasUint32Val() { + return valueCase_ == 2; + } + + /** + * uint32 uint32Val = 2; + * @return The uint32Val. + */ + @java.lang.Override + public int getUint32Val() { + if (valueCase_ == 2) { + return (java.lang.Integer) value_; + } + return 0; + } + + public static final int INT64VAL_FIELD_NUMBER = 3; + + /** + * int64 int64Val = 3; + * @return Whether the int64Val field is set. + */ + @java.lang.Override + public boolean hasInt64Val() { + return valueCase_ == 3; + } + + /** + * int64 int64Val = 3; + * @return The int64Val. + */ + @java.lang.Override + public long getInt64Val() { + if (valueCase_ == 3) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int UINT64VAL_FIELD_NUMBER = 4; + + /** + * uint64 uint64Val = 4; + * @return Whether the uint64Val field is set. + */ + @java.lang.Override + public boolean hasUint64Val() { + return valueCase_ == 4; + } + + /** + * uint64 uint64Val = 4; + * @return The uint64Val. + */ + @java.lang.Override + public long getUint64Val() { + if (valueCase_ == 4) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int FLOATVAL_FIELD_NUMBER = 5; + + /** + * float floatVal = 5; + * @return Whether the floatVal field is set. + */ + @java.lang.Override + public boolean hasFloatVal() { + return valueCase_ == 5; + } + + /** + * float floatVal = 5; + * @return The floatVal. + */ + @java.lang.Override + public float getFloatVal() { + if (valueCase_ == 5) { + return (java.lang.Float) value_; + } + return 0F; + } + + public static final int STRINGVAL_FIELD_NUMBER = 6; + + /** + * string stringVal = 6; + * @return Whether the stringVal field is set. + */ + public boolean hasStringVal() { + return valueCase_ == 6; + } + + /** + * string stringVal = 6; + * @return The stringVal. + */ + public java.lang.String getStringVal() { + java.lang.Object ref = ""; + if (valueCase_ == 6) { + ref = value_; + } + 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(); + if (valueCase_ == 6) { + value_ = s; + } + return s; + } + } + + /** + * string stringVal = 6; + * @return The bytes for stringVal. + */ + public com.google.protobuf.ByteString getStringValBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 6) { + ref = value_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueCase_ == 6) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOLVAL_FIELD_NUMBER = 7; + + /** + * bool boolVal = 7; + * @return Whether the boolVal field is set. + */ + @java.lang.Override + public boolean hasBoolVal() { + return valueCase_ == 7; + } + + /** + * bool boolVal = 7; + * @return The boolVal. + */ + @java.lang.Override + public boolean getBoolVal() { + if (valueCase_ == 7) { + return (java.lang.Boolean) value_; + } + return false; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (valueCase_ == 1) { + output.writeInt32(1, (int) ((java.lang.Integer) value_)); + } + if (valueCase_ == 2) { + output.writeUInt32(2, (int) ((java.lang.Integer) value_)); + } + if (valueCase_ == 3) { + output.writeInt64(3, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 4) { + output.writeUInt64(4, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 5) { + output.writeFloat(5, (float) ((java.lang.Float) value_)); + } + if (valueCase_ == 6) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, value_); + } + if (valueCase_ == 7) { + output.writeBool(7, (boolean) ((java.lang.Boolean) value_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (valueCase_ == 1) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, (int) ((java.lang.Integer) value_)); + } + if (valueCase_ == 2) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, (int) ((java.lang.Integer) value_)); + } + if (valueCase_ == 3) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 4) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(4, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 5) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, (float) ((java.lang.Float) value_)); + } + if (valueCase_ == 6) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, value_); + } + if (valueCase_ == 7) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, (boolean) ((java.lang.Boolean) value_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiValue)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiValue other = (monitoring.Monitoring.KpiValue) obj; + if (!getValueCase().equals(other.getValueCase())) + return false; + switch(valueCase_) { + case 1: + if (getInt32Val() != other.getInt32Val()) + return false; + break; + case 2: + if (getUint32Val() != other.getUint32Val()) + return false; + break; + case 3: + if (getInt64Val() != other.getInt64Val()) + return false; + break; + case 4: + if (getUint64Val() != other.getUint64Val()) + return false; + break; + case 5: + if (java.lang.Float.floatToIntBits(getFloatVal()) != java.lang.Float.floatToIntBits(other.getFloatVal())) + return false; + break; + case 6: + if (!getStringVal().equals(other.getStringVal())) + return false; + break; + case 7: + if (getBoolVal() != other.getBoolVal()) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch(valueCase_) { + case 1: + hash = (37 * hash) + INT32VAL_FIELD_NUMBER; + hash = (53 * hash) + getInt32Val(); + break; + case 2: + hash = (37 * hash) + UINT32VAL_FIELD_NUMBER; + hash = (53 * hash) + getUint32Val(); + break; + case 3: + hash = (37 * hash) + INT64VAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getInt64Val()); + break; + case 4: + hash = (37 * hash) + UINT64VAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUint64Val()); + break; + case 5: + hash = (37 * hash) + FLOATVAL_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getFloatVal()); + break; + case 6: + hash = (37 * hash) + STRINGVAL_FIELD_NUMBER; + hash = (53 * hash) + getStringVal().hashCode(); + break; + case 7: + hash = (37 * hash) + BOOLVAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoolVal()); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiValue parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiValue parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValue parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiValue parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValue parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiValue parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValue parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiValue parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiValue parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValue parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiValue parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiValue) + monitoring.Monitoring.KpiValueOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiValue_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiValue.class, monitoring.Monitoring.KpiValue.Builder.class); + } + + // 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(); + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiValue_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiValue getDefaultInstanceForType() { + return monitoring.Monitoring.KpiValue.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiValue build() { + monitoring.Monitoring.KpiValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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 (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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiValue) { + return mergeFrom((monitoring.Monitoring.KpiValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiValue other) { + if (other == monitoring.Monitoring.KpiValue.getDefaultInstance()) + return this; + switch(other.getValueCase()) { + case INT32VAL: + { + setInt32Val(other.getInt32Val()); + break; + } + case UINT32VAL: + { + setUint32Val(other.getUint32Val()); + break; + } + case INT64VAL: + { + setInt64Val(other.getInt64Val()); + break; + } + case UINT64VAL: + { + setUint64Val(other.getUint64Val()); + break; + } + case FLOATVAL: + { + setFloatVal(other.getFloatVal()); + break; + } + case STRINGVAL: + { + valueCase_ = 6; + value_ = other.value_; + onChanged(); + break; + } + case BOOLVAL: + { + setBoolVal(other.getBoolVal()); + break; + } + case VALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int valueCase_ = 0; + + private java.lang.Object value_; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + /** + * int32 int32Val = 1; + * @return Whether the int32Val field is set. + */ + public boolean hasInt32Val() { + return valueCase_ == 1; + } + + /** + * int32 int32Val = 1; + * @return The int32Val. + */ + public int getInt32Val() { + if (valueCase_ == 1) { + return (java.lang.Integer) value_; + } + return 0; + } + + /** + * int32 int32Val = 1; + * @param value The int32Val to set. + * @return This builder for chaining. + */ + public Builder setInt32Val(int value) { + valueCase_ = 1; + value_ = value; + onChanged(); + return this; + } + + /** + * int32 int32Val = 1; + * @return This builder for chaining. + */ + public Builder clearInt32Val() { + if (valueCase_ == 1) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * uint32 uint32Val = 2; + * @return Whether the uint32Val field is set. + */ + public boolean hasUint32Val() { + return valueCase_ == 2; + } + + /** + * uint32 uint32Val = 2; + * @return The uint32Val. + */ + public int getUint32Val() { + if (valueCase_ == 2) { + return (java.lang.Integer) value_; + } + return 0; + } + + /** + * uint32 uint32Val = 2; + * @param value The uint32Val to set. + * @return This builder for chaining. + */ + public Builder setUint32Val(int value) { + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + + /** + * uint32 uint32Val = 2; + * @return This builder for chaining. + */ + public Builder clearUint32Val() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * int64 int64Val = 3; + * @return Whether the int64Val field is set. + */ + public boolean hasInt64Val() { + return valueCase_ == 3; + } + + /** + * int64 int64Val = 3; + * @return The int64Val. + */ + public long getInt64Val() { + if (valueCase_ == 3) { + return (java.lang.Long) value_; + } + return 0L; + } + + /** + * int64 int64Val = 3; + * @param value The int64Val to set. + * @return This builder for chaining. + */ + public Builder setInt64Val(long value) { + valueCase_ = 3; + value_ = value; + onChanged(); + return this; + } + + /** + * int64 int64Val = 3; + * @return This builder for chaining. + */ + public Builder clearInt64Val() { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * uint64 uint64Val = 4; + * @return Whether the uint64Val field is set. + */ + public boolean hasUint64Val() { + return valueCase_ == 4; + } + + /** + * uint64 uint64Val = 4; + * @return The uint64Val. + */ + public long getUint64Val() { + if (valueCase_ == 4) { + return (java.lang.Long) value_; + } + return 0L; + } + + /** + * uint64 uint64Val = 4; + * @param value The uint64Val to set. + * @return This builder for chaining. + */ + public Builder setUint64Val(long value) { + valueCase_ = 4; + value_ = value; + onChanged(); + return this; + } + + /** + * uint64 uint64Val = 4; + * @return This builder for chaining. + */ + public Builder clearUint64Val() { + if (valueCase_ == 4) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * float floatVal = 5; + * @return Whether the floatVal field is set. + */ + public boolean hasFloatVal() { + return valueCase_ == 5; + } + + /** + * float floatVal = 5; + * @return The floatVal. + */ + public float getFloatVal() { + if (valueCase_ == 5) { + return (java.lang.Float) value_; + } + return 0F; + } + + /** + * float floatVal = 5; + * @param value The floatVal to set. + * @return This builder for chaining. + */ + public Builder setFloatVal(float value) { + valueCase_ = 5; + value_ = value; + onChanged(); + return this; + } + + /** + * float floatVal = 5; + * @return This builder for chaining. + */ + public Builder clearFloatVal() { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * string stringVal = 6; + * @return Whether the stringVal field is set. + */ + @java.lang.Override + public boolean hasStringVal() { + return valueCase_ == 6; + } + + /** + * string stringVal = 6; + * @return The stringVal. + */ + @java.lang.Override + public java.lang.String getStringVal() { + java.lang.Object ref = ""; + if (valueCase_ == 6) { + ref = value_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 6) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string stringVal = 6; + * @return The bytes for stringVal. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStringValBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 6) { + ref = value_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueCase_ == 6) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string stringVal = 6; + * @param value The stringVal to set. + * @return This builder for chaining. + */ + public Builder setStringVal(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 6; + value_ = value; + onChanged(); + return this; + } + + /** + * string stringVal = 6; + * @return This builder for chaining. + */ + public Builder clearStringVal() { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * string stringVal = 6; + * @param value The bytes for stringVal to set. + * @return This builder for chaining. + */ + public Builder setStringValBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueCase_ = 6; + value_ = value; + onChanged(); + return this; + } + + /** + * bool boolVal = 7; + * @return Whether the boolVal field is set. + */ + public boolean hasBoolVal() { + return valueCase_ == 7; + } + + /** + * bool boolVal = 7; + * @return The boolVal. + */ + public boolean getBoolVal() { + if (valueCase_ == 7) { + return (java.lang.Boolean) value_; + } + return false; + } + + /** + * bool boolVal = 7; + * @param value The boolVal to set. + * @return This builder for chaining. + */ + public Builder setBoolVal(boolean value) { + valueCase_ = 7; + value_ = value; + onChanged(); + return this; + } + + /** + * bool boolVal = 7; + * @return This builder for chaining. + */ + public Builder clearBoolVal() { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiValue) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiValue) + private static final monitoring.Monitoring.KpiValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiValue(); + } + + public static monitoring.Monitoring.KpiValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiListOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + java.util.List getKpiList(); + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + monitoring.Monitoring.Kpi getKpi(int index); + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + int getKpiCount(); + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + java.util.List getKpiOrBuilderList(); + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder(int index); + } + + /** + * Protobuf type {@code monitoring.KpiList} + */ + public static final class KpiList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiList) + KpiListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use KpiList.newBuilder() to construct. + private KpiList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KpiList() { + kpi_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiList.class, monitoring.Monitoring.KpiList.Builder.class); + } + + public static final int KPI_FIELD_NUMBER = 1; + + private java.util.List kpi_; + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + @java.lang.Override + public java.util.List getKpiList() { + return kpi_; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + @java.lang.Override + public java.util.List getKpiOrBuilderList() { + return kpi_; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + @java.lang.Override + public int getKpiCount() { + return kpi_.size(); + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + @java.lang.Override + public monitoring.Monitoring.Kpi getKpi(int index) { + return kpi_.get(index); + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder(int index) { + return kpi_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < kpi_.size(); i++) { + output.writeMessage(1, kpi_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < kpi_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, kpi_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiList)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiList other = (monitoring.Monitoring.KpiList) obj; + if (!getKpiList().equals(other.getKpiList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getKpiCount() > 0) { + hash = (37 * hash) + KPI_FIELD_NUMBER; + hash = (53 * hash) + getKpiList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiList) + monitoring.Monitoring.KpiListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiList.class, monitoring.Monitoring.KpiList.Builder.class); + } + + // 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(); + if (kpiBuilder_ == null) { + kpi_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + kpiBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiList_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiList getDefaultInstanceForType() { + return monitoring.Monitoring.KpiList.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiList build() { + monitoring.Monitoring.KpiList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.KpiList buildPartial() { + monitoring.Monitoring.KpiList result = new monitoring.Monitoring.KpiList(this); + int from_bitField0_ = bitField0_; + if (kpiBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + kpi_ = java.util.Collections.unmodifiableList(kpi_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.kpi_ = kpi_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiList) { + return mergeFrom((monitoring.Monitoring.KpiList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiList other) { + if (other == monitoring.Monitoring.KpiList.getDefaultInstance()) + return this; + if (kpiBuilder_ == null) { + if (!other.kpi_.isEmpty()) { + if (kpi_.isEmpty()) { + kpi_ = other.kpi_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKpiIsMutable(); + kpi_.addAll(other.kpi_); + } + onChanged(); + } + } else { + if (!other.kpi_.isEmpty()) { + if (kpiBuilder_.isEmpty()) { + kpiBuilder_.dispose(); + kpiBuilder_ = null; + kpi_ = other.kpi_; + bitField0_ = (bitField0_ & ~0x00000001); + kpiBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKpiFieldBuilder() : null; + } else { + kpiBuilder_.addAllMessages(other.kpi_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List kpi_ = java.util.Collections.emptyList(); + + private void ensureKpiIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + kpi_ = new java.util.ArrayList(kpi_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 kpiBuilder_; + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public java.util.List getKpiList() { + if (kpiBuilder_ == null) { + return java.util.Collections.unmodifiableList(kpi_); + } else { + return kpiBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public int getKpiCount() { + if (kpiBuilder_ == null) { + return kpi_.size(); + } else { + return kpiBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public monitoring.Monitoring.Kpi getKpi(int index) { + if (kpiBuilder_ == null) { + return kpi_.get(index); + } else { + return kpiBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder setKpi(int index, monitoring.Monitoring.Kpi value) { + if (kpiBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIsMutable(); + kpi_.set(index, value); + onChanged(); + } else { + kpiBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder setKpi(int index, monitoring.Monitoring.Kpi.Builder builderForValue) { + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.set(index, builderForValue.build()); + onChanged(); + } else { + kpiBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder addKpi(monitoring.Monitoring.Kpi value) { + if (kpiBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIsMutable(); + kpi_.add(value); + onChanged(); + } else { + kpiBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder addKpi(int index, monitoring.Monitoring.Kpi value) { + if (kpiBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIsMutable(); + kpi_.add(index, value); + onChanged(); + } else { + kpiBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder addKpi(monitoring.Monitoring.Kpi.Builder builderForValue) { + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.add(builderForValue.build()); + onChanged(); + } else { + kpiBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder addKpi(int index, monitoring.Monitoring.Kpi.Builder builderForValue) { + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.add(index, builderForValue.build()); + onChanged(); + } else { + kpiBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder addAllKpi(java.lang.Iterable values) { + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kpi_); + onChanged(); + } else { + kpiBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder clearKpi() { + if (kpiBuilder_ == null) { + kpi_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + kpiBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder removeKpi(int index) { + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.remove(index); + onChanged(); + } else { + kpiBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public monitoring.Monitoring.Kpi.Builder getKpiBuilder(int index) { + return getKpiFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder(int index) { + if (kpiBuilder_ == null) { + return kpi_.get(index); + } else { + return kpiBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public java.util.List getKpiOrBuilderList() { + if (kpiBuilder_ != null) { + return kpiBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(kpi_); + } + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public monitoring.Monitoring.Kpi.Builder addKpiBuilder() { + return getKpiFieldBuilder().addBuilder(monitoring.Monitoring.Kpi.getDefaultInstance()); + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public monitoring.Monitoring.Kpi.Builder addKpiBuilder(int index) { + return getKpiFieldBuilder().addBuilder(index, monitoring.Monitoring.Kpi.getDefaultInstance()); + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public java.util.List getKpiBuilderList() { + return getKpiFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getKpiFieldBuilder() { + if (kpiBuilder_ == null) { + kpiBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(kpi_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + kpi_ = null; + } + return kpiBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiList) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiList) + private static final monitoring.Monitoring.KpiList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiList(); + } + + public static monitoring.Monitoring.KpiList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiDescriptorListOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiDescriptorList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + java.util.List getKpiDescriptorListList(); + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + monitoring.Monitoring.KpiDescriptor getKpiDescriptorList(int index); + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + int getKpiDescriptorListCount(); + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + java.util.List getKpiDescriptorListOrBuilderList(); + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorListOrBuilder(int index); + } + + /** + * Protobuf type {@code monitoring.KpiDescriptorList} + */ + public static final class KpiDescriptorList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiDescriptorList) + KpiDescriptorListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use KpiDescriptorList.newBuilder() to construct. + private KpiDescriptorList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KpiDescriptorList() { + kpiDescriptorList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiDescriptorList.class, monitoring.Monitoring.KpiDescriptorList.Builder.class); + } + + public static final int KPI_DESCRIPTOR_LIST_FIELD_NUMBER = 1; + + private java.util.List kpiDescriptorList_; + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + @java.lang.Override + public java.util.List getKpiDescriptorListList() { + return kpiDescriptorList_; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + @java.lang.Override + public java.util.List getKpiDescriptorListOrBuilderList() { + return kpiDescriptorList_; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + @java.lang.Override + public int getKpiDescriptorListCount() { + return kpiDescriptorList_.size(); + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiDescriptor getKpiDescriptorList(int index) { + return kpiDescriptorList_.get(index); + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorListOrBuilder(int index) { + return kpiDescriptorList_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < kpiDescriptorList_.size(); i++) { + output.writeMessage(1, kpiDescriptorList_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < kpiDescriptorList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, kpiDescriptorList_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiDescriptorList)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiDescriptorList other = (monitoring.Monitoring.KpiDescriptorList) obj; + if (!getKpiDescriptorListList().equals(other.getKpiDescriptorListList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getKpiDescriptorListCount() > 0) { + hash = (37 * hash) + KPI_DESCRIPTOR_LIST_FIELD_NUMBER; + hash = (53 * hash) + getKpiDescriptorListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptorList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiDescriptorList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiDescriptorList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiDescriptorList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiDescriptorList) + monitoring.Monitoring.KpiDescriptorListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiDescriptorList.class, monitoring.Monitoring.KpiDescriptorList.Builder.class); + } + + // 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(); + if (kpiDescriptorListBuilder_ == null) { + kpiDescriptorList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + kpiDescriptorListBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptorList getDefaultInstanceForType() { + return monitoring.Monitoring.KpiDescriptorList.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptorList build() { + monitoring.Monitoring.KpiDescriptorList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptorList buildPartial() { + monitoring.Monitoring.KpiDescriptorList result = new monitoring.Monitoring.KpiDescriptorList(this); + int from_bitField0_ = bitField0_; + if (kpiDescriptorListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + kpiDescriptorList_ = java.util.Collections.unmodifiableList(kpiDescriptorList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.kpiDescriptorList_ = kpiDescriptorList_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiDescriptorList) { + return mergeFrom((monitoring.Monitoring.KpiDescriptorList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiDescriptorList other) { + if (other == monitoring.Monitoring.KpiDescriptorList.getDefaultInstance()) + return this; + if (kpiDescriptorListBuilder_ == null) { + if (!other.kpiDescriptorList_.isEmpty()) { + if (kpiDescriptorList_.isEmpty()) { + kpiDescriptorList_ = other.kpiDescriptorList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.addAll(other.kpiDescriptorList_); + } + onChanged(); + } + } else { + if (!other.kpiDescriptorList_.isEmpty()) { + if (kpiDescriptorListBuilder_.isEmpty()) { + kpiDescriptorListBuilder_.dispose(); + kpiDescriptorListBuilder_ = null; + kpiDescriptorList_ = other.kpiDescriptorList_; + bitField0_ = (bitField0_ & ~0x00000001); + kpiDescriptorListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKpiDescriptorListFieldBuilder() : null; + } else { + kpiDescriptorListBuilder_.addAllMessages(other.kpiDescriptorList_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiDescriptorList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List kpiDescriptorList_ = java.util.Collections.emptyList(); + + private void ensureKpiDescriptorListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + kpiDescriptorList_ = new java.util.ArrayList(kpiDescriptorList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 kpiDescriptorListBuilder_; + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public java.util.List getKpiDescriptorListList() { + if (kpiDescriptorListBuilder_ == null) { + return java.util.Collections.unmodifiableList(kpiDescriptorList_); + } else { + return kpiDescriptorListBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public int getKpiDescriptorListCount() { + if (kpiDescriptorListBuilder_ == null) { + return kpiDescriptorList_.size(); + } else { + return kpiDescriptorListBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public monitoring.Monitoring.KpiDescriptor getKpiDescriptorList(int index) { + if (kpiDescriptorListBuilder_ == null) { + return kpiDescriptorList_.get(index); + } else { + return kpiDescriptorListBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder setKpiDescriptorList(int index, monitoring.Monitoring.KpiDescriptor value) { + if (kpiDescriptorListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.set(index, value); + onChanged(); + } else { + kpiDescriptorListBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder setKpiDescriptorList(int index, monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { + if (kpiDescriptorListBuilder_ == null) { + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.set(index, builderForValue.build()); + onChanged(); + } else { + kpiDescriptorListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder addKpiDescriptorList(monitoring.Monitoring.KpiDescriptor value) { + if (kpiDescriptorListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.add(value); + onChanged(); + } else { + kpiDescriptorListBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder addKpiDescriptorList(int index, monitoring.Monitoring.KpiDescriptor value) { + if (kpiDescriptorListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.add(index, value); + onChanged(); + } else { + kpiDescriptorListBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder addKpiDescriptorList(monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { + if (kpiDescriptorListBuilder_ == null) { + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.add(builderForValue.build()); + onChanged(); + } else { + kpiDescriptorListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder addKpiDescriptorList(int index, monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { + if (kpiDescriptorListBuilder_ == null) { + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.add(index, builderForValue.build()); + onChanged(); + } else { + kpiDescriptorListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder addAllKpiDescriptorList(java.lang.Iterable values) { + if (kpiDescriptorListBuilder_ == null) { + ensureKpiDescriptorListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kpiDescriptorList_); + onChanged(); + } else { + kpiDescriptorListBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder clearKpiDescriptorList() { + if (kpiDescriptorListBuilder_ == null) { + kpiDescriptorList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + kpiDescriptorListBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder removeKpiDescriptorList(int index) { + if (kpiDescriptorListBuilder_ == null) { + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.remove(index); + onChanged(); + } else { + kpiDescriptorListBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public monitoring.Monitoring.KpiDescriptor.Builder getKpiDescriptorListBuilder(int index) { + return getKpiDescriptorListFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorListOrBuilder(int index) { + if (kpiDescriptorListBuilder_ == null) { + return kpiDescriptorList_.get(index); + } else { + return kpiDescriptorListBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public java.util.List getKpiDescriptorListOrBuilderList() { + if (kpiDescriptorListBuilder_ != null) { + return kpiDescriptorListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(kpiDescriptorList_); + } + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public monitoring.Monitoring.KpiDescriptor.Builder addKpiDescriptorListBuilder() { + return getKpiDescriptorListFieldBuilder().addBuilder(monitoring.Monitoring.KpiDescriptor.getDefaultInstance()); + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public monitoring.Monitoring.KpiDescriptor.Builder addKpiDescriptorListBuilder(int index) { + return getKpiDescriptorListFieldBuilder().addBuilder(index, monitoring.Monitoring.KpiDescriptor.getDefaultInstance()); + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public java.util.List getKpiDescriptorListBuilderList() { + return getKpiDescriptorListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getKpiDescriptorListFieldBuilder() { + if (kpiDescriptorListBuilder_ == null) { + kpiDescriptorListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(kpiDescriptorList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + kpiDescriptorList_ = null; + } + return kpiDescriptorListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiDescriptorList) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiDescriptorList) + private static final monitoring.Monitoring.KpiDescriptorList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiDescriptorList(); + } + + public static monitoring.Monitoring.KpiDescriptorList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptorList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SubsDescriptorOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.SubsDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return Whether the subsId field is set. + */ + boolean hasSubsId(); + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return The subsId. + */ + monitoring.Monitoring.SubscriptionID getSubsId(); + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder(); + + /** + * .monitoring.KpiId kpi_id = 2; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpi_id = 2; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpi_id = 2; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * float sampling_duration_s = 3; + * @return The samplingDurationS. + */ + float getSamplingDurationS(); + + /** + * float sampling_interval_s = 4; + * @return The samplingIntervalS. + */ + float getSamplingIntervalS(); + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 5; + * @return Whether the startTimestamp field is set. + */ + boolean hasStartTimestamp(); + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 5; + * @return The startTimestamp. + */ + context.ContextOuterClass.Timestamp getStartTimestamp(); + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder(); + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 6; + * @return Whether the endTimestamp field is set. + */ + boolean hasEndTimestamp(); + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 6; + * @return The endTimestamp. + */ + context.ContextOuterClass.Timestamp getEndTimestamp(); + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder(); + } + + /** + * Protobuf type {@code monitoring.SubsDescriptor} + */ + public static final class SubsDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.SubsDescriptor) + SubsDescriptorOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SubsDescriptor.newBuilder() to construct. + private SubsDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubsDescriptor() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubsDescriptor.class, monitoring.Monitoring.SubsDescriptor.Builder.class); + } + + public static final int SUBS_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.SubscriptionID subsId_; + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return Whether the subsId field is set. + */ + @java.lang.Override + public boolean hasSubsId() { + return subsId_ != null; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return The subsId. + */ + @java.lang.Override + public monitoring.Monitoring.SubscriptionID getSubsId() { + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { + return getSubsId(); + } + + public static final int KPI_ID_FIELD_NUMBER = 2; + + private monitoring.Monitoring.KpiId kpiId_; + + /** + * .monitoring.KpiId kpi_id = 2; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 2; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int SAMPLING_DURATION_S_FIELD_NUMBER = 3; + + private float samplingDurationS_; + + /** + * float sampling_duration_s = 3; + * @return The samplingDurationS. + */ + @java.lang.Override + public float getSamplingDurationS() { + return samplingDurationS_; + } + + public static final int SAMPLING_INTERVAL_S_FIELD_NUMBER = 4; + + private float samplingIntervalS_; + + /** + * float sampling_interval_s = 4; + * @return The samplingIntervalS. + */ + @java.lang.Override + public float getSamplingIntervalS() { + return samplingIntervalS_; + } + + public static final int START_TIMESTAMP_FIELD_NUMBER = 5; + + private context.ContextOuterClass.Timestamp startTimestamp_; + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 5; + * @return Whether the startTimestamp field is set. + */ + @java.lang.Override + public boolean hasStartTimestamp() { + return startTimestamp_ != null; + } + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 5; + * @return The startTimestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getStartTimestamp() { + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; + } + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { + return getStartTimestamp(); + } + + public static final int END_TIMESTAMP_FIELD_NUMBER = 6; + + private context.ContextOuterClass.Timestamp endTimestamp_; + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 6; + * @return Whether the endTimestamp field is set. + */ + @java.lang.Override + public boolean hasEndTimestamp() { + return endTimestamp_ != null; + } + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 6; + * @return The endTimestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getEndTimestamp() { + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; + } + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { + return getEndTimestamp(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (subsId_ != null) { + output.writeMessage(1, getSubsId()); + } + if (kpiId_ != null) { + output.writeMessage(2, getKpiId()); + } + if (samplingDurationS_ != 0F) { + output.writeFloat(3, samplingDurationS_); + } + if (samplingIntervalS_ != 0F) { + output.writeFloat(4, samplingIntervalS_); + } + if (startTimestamp_ != null) { + output.writeMessage(5, getStartTimestamp()); + } + if (endTimestamp_ != null) { + output.writeMessage(6, getEndTimestamp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (subsId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubsId()); + } + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiId()); + } + if (samplingDurationS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, samplingDurationS_); + } + if (samplingIntervalS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, samplingIntervalS_); + } + if (startTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStartTimestamp()); + } + if (endTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndTimestamp()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.SubsDescriptor)) { + return super.equals(obj); + } + monitoring.Monitoring.SubsDescriptor other = (monitoring.Monitoring.SubsDescriptor) obj; + if (hasSubsId() != other.hasSubsId()) + return false; + if (hasSubsId()) { + if (!getSubsId().equals(other.getSubsId())) + return false; + } + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (java.lang.Float.floatToIntBits(getSamplingDurationS()) != java.lang.Float.floatToIntBits(other.getSamplingDurationS())) + return false; + if (java.lang.Float.floatToIntBits(getSamplingIntervalS()) != java.lang.Float.floatToIntBits(other.getSamplingIntervalS())) + return false; + if (hasStartTimestamp() != other.hasStartTimestamp()) + return false; + if (hasStartTimestamp()) { + if (!getStartTimestamp().equals(other.getStartTimestamp())) + return false; + } + if (hasEndTimestamp() != other.hasEndTimestamp()) + return false; + if (hasEndTimestamp()) { + if (!getEndTimestamp().equals(other.getEndTimestamp())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubsId()) { + hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubsId().hashCode(); + } + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + hash = (37 * hash) + SAMPLING_DURATION_S_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingDurationS()); + hash = (37 * hash) + SAMPLING_INTERVAL_S_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingIntervalS()); + if (hasStartTimestamp()) { + hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getStartTimestamp().hashCode(); + } + if (hasEndTimestamp()) { + hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getEndTimestamp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubsDescriptor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsDescriptor parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.SubsDescriptor prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.SubsDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.SubsDescriptor) + monitoring.Monitoring.SubsDescriptorOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubsDescriptor.class, monitoring.Monitoring.SubsDescriptor.Builder.class); + } + + // 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; + subsIdBuilder_ = null; + } + if (kpiIdBuilder_ == null) { + kpiId_ = null; + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + samplingDurationS_ = 0F; + samplingIntervalS_ = 0F; + if (startTimestampBuilder_ == null) { + startTimestamp_ = null; + } else { + startTimestamp_ = null; + startTimestampBuilder_ = null; + } + if (endTimestampBuilder_ == null) { + endTimestamp_ = null; + } else { + endTimestamp_ = null; + endTimestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.SubsDescriptor getDefaultInstanceForType() { + return monitoring.Monitoring.SubsDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.SubsDescriptor build() { + monitoring.Monitoring.SubsDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.SubsDescriptor) { + return mergeFrom((monitoring.Monitoring.SubsDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.SubsDescriptor other) { + if (other == monitoring.Monitoring.SubsDescriptor.getDefaultInstance()) + return this; + if (other.hasSubsId()) { + mergeSubsId(other.getSubsId()); + } + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (other.getSamplingDurationS() != 0F) { + setSamplingDurationS(other.getSamplingDurationS()); + } + if (other.getSamplingIntervalS() != 0F) { + setSamplingIntervalS(other.getSamplingIntervalS()); + } + if (other.hasStartTimestamp()) { + mergeStartTimestamp(other.getStartTimestamp()); + } + if (other.hasEndTimestamp()) { + mergeEndTimestamp(other.getEndTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.SubsDescriptor) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.SubscriptionID subsId_; + + private com.google.protobuf.SingleFieldBuilderV3 subsIdBuilder_; + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return Whether the subsId field is set. + */ + public boolean hasSubsId() { + return subsIdBuilder_ != null || subsId_ != null; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return The subsId. + */ + public monitoring.Monitoring.SubscriptionID getSubsId() { + if (subsIdBuilder_ == null) { + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; + } else { + return subsIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder setSubsId(monitoring.Monitoring.SubscriptionID value) { + if (subsIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subsId_ = value; + onChanged(); + } else { + subsIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder setSubsId(monitoring.Monitoring.SubscriptionID.Builder builderForValue) { + if (subsIdBuilder_ == null) { + subsId_ = builderForValue.build(); + onChanged(); + } else { + subsIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder mergeSubsId(monitoring.Monitoring.SubscriptionID value) { + if (subsIdBuilder_ == null) { + if (subsId_ != null) { + subsId_ = monitoring.Monitoring.SubscriptionID.newBuilder(subsId_).mergeFrom(value).buildPartial(); + } else { + subsId_ = value; + } + onChanged(); + } else { + subsIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder clearSubsId() { + if (subsIdBuilder_ == null) { + subsId_ = null; + onChanged(); + } else { + subsId_ = null; + subsIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public monitoring.Monitoring.SubscriptionID.Builder getSubsIdBuilder() { + onChanged(); + return getSubsIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { + if (subsIdBuilder_ != null) { + return subsIdBuilder_.getMessageOrBuilder(); + } else { + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; + } + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSubsIdFieldBuilder() { + if (subsIdBuilder_ == null) { + subsIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSubsId(), getParentForChildren(), isClean()); + subsId_ = null; + } + return subsIdBuilder_; + } + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpi_id = 2; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 2; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private float samplingDurationS_; + + /** + * float sampling_duration_s = 3; + * @return The samplingDurationS. + */ + @java.lang.Override + public float getSamplingDurationS() { + return samplingDurationS_; + } + + /** + * float sampling_duration_s = 3; + * @param value The samplingDurationS to set. + * @return This builder for chaining. + */ + public Builder setSamplingDurationS(float value) { + samplingDurationS_ = value; + onChanged(); + return this; + } + + /** + * float sampling_duration_s = 3; + * @return This builder for chaining. + */ + public Builder clearSamplingDurationS() { + samplingDurationS_ = 0F; + onChanged(); + return this; + } + + private float samplingIntervalS_; + + /** + * float sampling_interval_s = 4; + * @return The samplingIntervalS. + */ + @java.lang.Override + public float getSamplingIntervalS() { + return samplingIntervalS_; + } + + /** + * float sampling_interval_s = 4; + * @param value The samplingIntervalS to set. + * @return This builder for chaining. + */ + public Builder setSamplingIntervalS(float value) { + samplingIntervalS_ = value; + onChanged(); + return this; + } + + /** + * float sampling_interval_s = 4; + * @return This builder for chaining. + */ + public Builder clearSamplingIntervalS() { + samplingIntervalS_ = 0F; + onChanged(); + return this; + } + + private context.ContextOuterClass.Timestamp startTimestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 startTimestampBuilder_; + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + * @return Whether the startTimestamp field is set. + */ + public boolean hasStartTimestamp() { + return startTimestampBuilder_ != null || startTimestamp_ != null; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + * @return The startTimestamp. + */ + public context.ContextOuterClass.Timestamp getStartTimestamp() { + if (startTimestampBuilder_ == null) { + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; + } else { + return startTimestampBuilder_.getMessage(); + } + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + public Builder setStartTimestamp(context.ContextOuterClass.Timestamp value) { + if (startTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTimestamp_ = value; + onChanged(); + } else { + startTimestampBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + public Builder setStartTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (startTimestampBuilder_ == null) { + startTimestamp_ = builderForValue.build(); + onChanged(); + } else { + startTimestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) { + if (startTimestampBuilder_ == null) { + if (startTimestamp_ != null) { + startTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(startTimestamp_).mergeFrom(value).buildPartial(); + } else { + startTimestamp_ = value; + } + onChanged(); + } else { + startTimestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + public Builder clearStartTimestamp() { + if (startTimestampBuilder_ == null) { + startTimestamp_ = null; + onChanged(); + } else { + startTimestamp_ = null; + startTimestampBuilder_ = null; + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() { + onChanged(); + return getStartTimestampFieldBuilder().getBuilder(); + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { + if (startTimestampBuilder_ != null) { + return startTimestampBuilder_.getMessageOrBuilder(); + } else { + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; + } + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getStartTimestampFieldBuilder() { + if (startTimestampBuilder_ == null) { + startTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getStartTimestamp(), getParentForChildren(), isClean()); + startTimestamp_ = null; + } + return startTimestampBuilder_; + } + + private context.ContextOuterClass.Timestamp endTimestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 endTimestampBuilder_; + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + * @return Whether the endTimestamp field is set. + */ + public boolean hasEndTimestamp() { + return endTimestampBuilder_ != null || endTimestamp_ != null; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + * @return The endTimestamp. + */ + public context.ContextOuterClass.Timestamp getEndTimestamp() { + if (endTimestampBuilder_ == null) { + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; + } else { + return endTimestampBuilder_.getMessage(); + } + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + public Builder setEndTimestamp(context.ContextOuterClass.Timestamp value) { + if (endTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTimestamp_ = value; + onChanged(); + } else { + endTimestampBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + public Builder setEndTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (endTimestampBuilder_ == null) { + endTimestamp_ = builderForValue.build(); + onChanged(); + } else { + endTimestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) { + if (endTimestampBuilder_ == null) { + if (endTimestamp_ != null) { + endTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(endTimestamp_).mergeFrom(value).buildPartial(); + } else { + endTimestamp_ = value; + } + onChanged(); + } else { + endTimestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + public Builder clearEndTimestamp() { + if (endTimestampBuilder_ == null) { + endTimestamp_ = null; + onChanged(); + } else { + endTimestamp_ = null; + endTimestampBuilder_ = null; + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() { + onChanged(); + return getEndTimestampFieldBuilder().getBuilder(); + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { + if (endTimestampBuilder_ != null) { + return endTimestampBuilder_.getMessageOrBuilder(); + } else { + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; + } + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndTimestampFieldBuilder() { + if (endTimestampBuilder_ == null) { + endTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndTimestamp(), getParentForChildren(), isClean()); + endTimestamp_ = null; + } + return endTimestampBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.SubsDescriptor) + } + + // @@protoc_insertion_point(class_scope:monitoring.SubsDescriptor) + private static final monitoring.Monitoring.SubsDescriptor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.SubsDescriptor(); + } + + public static monitoring.Monitoring.SubsDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.SubsDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SubscriptionIDOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.SubscriptionID) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid subs_id = 1; + * @return Whether the subsId field is set. + */ + boolean hasSubsId(); + + /** + * .context.Uuid subs_id = 1; + * @return The subsId. + */ + context.ContextOuterClass.Uuid getSubsId(); + + /** + * .context.Uuid subs_id = 1; + */ + context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder(); + } + + /** + * Protobuf type {@code monitoring.SubscriptionID} + */ + public static final class SubscriptionID extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.SubscriptionID) + SubscriptionIDOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SubscriptionID.newBuilder() to construct. + private SubscriptionID(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubscriptionID() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubscriptionID.class, monitoring.Monitoring.SubscriptionID.Builder.class); + } + + public static final int SUBS_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid subsId_; + + /** + * .context.Uuid subs_id = 1; + * @return Whether the subsId field is set. + */ + @java.lang.Override + public boolean hasSubsId() { + return subsId_ != null; + } + + /** + * .context.Uuid subs_id = 1; + * @return The subsId. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getSubsId() { + return subsId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; + } + + /** + * .context.Uuid subs_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder() { + return getSubsId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (subsId_ != null) { + output.writeMessage(1, getSubsId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (subsId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubsId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.SubscriptionID)) { + return super.equals(obj); + } + monitoring.Monitoring.SubscriptionID other = (monitoring.Monitoring.SubscriptionID) obj; + if (hasSubsId() != other.hasSubsId()) + return false; + if (hasSubsId()) { + if (!getSubsId().equals(other.getSubsId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubsId()) { + hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubsId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubscriptionID parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubscriptionID parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.SubscriptionID prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.SubscriptionID} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.SubscriptionID) + monitoring.Monitoring.SubscriptionIDOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubscriptionID.class, monitoring.Monitoring.SubscriptionID.Builder.class); + } + + // 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; + subsIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.SubscriptionID getDefaultInstanceForType() { + return monitoring.Monitoring.SubscriptionID.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.SubscriptionID build() { + monitoring.Monitoring.SubscriptionID result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.SubscriptionID) { + return mergeFrom((monitoring.Monitoring.SubscriptionID) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.SubscriptionID other) { + if (other == monitoring.Monitoring.SubscriptionID.getDefaultInstance()) + return this; + if (other.hasSubsId()) { + mergeSubsId(other.getSubsId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.SubscriptionID) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid subsId_; + + private com.google.protobuf.SingleFieldBuilderV3 subsIdBuilder_; + + /** + * .context.Uuid subs_id = 1; + * @return Whether the subsId field is set. + */ + public boolean hasSubsId() { + return subsIdBuilder_ != null || subsId_ != null; + } + + /** + * .context.Uuid subs_id = 1; + * @return The subsId. + */ + public context.ContextOuterClass.Uuid getSubsId() { + if (subsIdBuilder_ == null) { + return subsId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; + } else { + return subsIdBuilder_.getMessage(); + } + } + + /** + * .context.Uuid subs_id = 1; + */ + public Builder setSubsId(context.ContextOuterClass.Uuid value) { + if (subsIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subsId_ = value; + onChanged(); + } else { + subsIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid subs_id = 1; + */ + public Builder setSubsId(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (subsIdBuilder_ == null) { + subsId_ = builderForValue.build(); + onChanged(); + } else { + subsIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid subs_id = 1; + */ + public Builder mergeSubsId(context.ContextOuterClass.Uuid value) { + if (subsIdBuilder_ == null) { + if (subsId_ != null) { + subsId_ = context.ContextOuterClass.Uuid.newBuilder(subsId_).mergeFrom(value).buildPartial(); + } else { + subsId_ = value; + } + onChanged(); + } else { + subsIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid subs_id = 1; + */ + public Builder clearSubsId() { + if (subsIdBuilder_ == null) { + subsId_ = null; + onChanged(); + } else { + subsId_ = null; + subsIdBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid subs_id = 1; + */ + public context.ContextOuterClass.Uuid.Builder getSubsIdBuilder() { + onChanged(); + return getSubsIdFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid subs_id = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder() { + if (subsIdBuilder_ != null) { + return subsIdBuilder_.getMessageOrBuilder(); + } else { + return subsId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; + } + } + + /** + * .context.Uuid subs_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSubsIdFieldBuilder() { + if (subsIdBuilder_ == null) { + subsIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSubsId(), getParentForChildren(), isClean()); + subsId_ = null; + } + return subsIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.SubscriptionID) + } + + // @@protoc_insertion_point(class_scope:monitoring.SubscriptionID) + private static final monitoring.Monitoring.SubscriptionID DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.SubscriptionID(); + } + + public static monitoring.Monitoring.SubscriptionID getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.SubscriptionID getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SubsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.SubsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return Whether the subsId field is set. + */ + boolean hasSubsId(); + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return The subsId. + */ + monitoring.Monitoring.SubscriptionID getSubsId(); + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder(); + + /** + * .monitoring.KpiList kpi_list = 2; + * @return Whether the kpiList field is set. + */ + boolean hasKpiList(); + + /** + * .monitoring.KpiList kpi_list = 2; + * @return The kpiList. + */ + monitoring.Monitoring.KpiList getKpiList(); + + /** + * .monitoring.KpiList kpi_list = 2; + */ + monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder(); + } + + /** + * Protobuf type {@code monitoring.SubsResponse} + */ + public static final class SubsResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.SubsResponse) + SubsResponseOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SubsResponse.newBuilder() to construct. + private SubsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubsResponse() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubsResponse_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubsResponse.class, monitoring.Monitoring.SubsResponse.Builder.class); + } + + public static final int SUBS_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.SubscriptionID subsId_; + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return Whether the subsId field is set. + */ + @java.lang.Override + public boolean hasSubsId() { + return subsId_ != null; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return The subsId. + */ + @java.lang.Override + public monitoring.Monitoring.SubscriptionID getSubsId() { + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { + return getSubsId(); + } + + public static final int KPI_LIST_FIELD_NUMBER = 2; + + private monitoring.Monitoring.KpiList kpiList_; + + /** + * .monitoring.KpiList kpi_list = 2; + * @return Whether the kpiList field is set. + */ + @java.lang.Override + public boolean hasKpiList() { + return kpiList_ != null; + } + + /** + * .monitoring.KpiList kpi_list = 2; + * @return The kpiList. + */ + @java.lang.Override + public monitoring.Monitoring.KpiList getKpiList() { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + @java.lang.Override + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + return getKpiList(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (subsId_ != null) { + output.writeMessage(1, getSubsId()); + } + if (kpiList_ != null) { + output.writeMessage(2, getKpiList()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (subsId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubsId()); + } + if (kpiList_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiList()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.SubsResponse)) { + return super.equals(obj); + } + monitoring.Monitoring.SubsResponse other = (monitoring.Monitoring.SubsResponse) obj; + if (hasSubsId() != other.hasSubsId()) + return false; + if (hasSubsId()) { + if (!getSubsId().equals(other.getSubsId())) + return false; + } + if (hasKpiList() != other.hasKpiList()) + return false; + if (hasKpiList()) { + if (!getKpiList().equals(other.getKpiList())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubsId()) { + hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubsId().hashCode(); + } + if (hasKpiList()) { + hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; + hash = (53 * hash) + getKpiList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.SubsResponse parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubsResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.SubsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.SubsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.SubsResponse) + monitoring.Monitoring.SubsResponseOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_SubsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubsResponse_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubsResponse.class, monitoring.Monitoring.SubsResponse.Builder.class); + } + + // 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; + subsIdBuilder_ = null; + } + if (kpiListBuilder_ == null) { + kpiList_ = null; + } else { + kpiList_ = null; + kpiListBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_SubsResponse_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.SubsResponse getDefaultInstanceForType() { + return monitoring.Monitoring.SubsResponse.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.SubsResponse build() { + monitoring.Monitoring.SubsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.SubsResponse) { + return mergeFrom((monitoring.Monitoring.SubsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.SubsResponse other) { + if (other == monitoring.Monitoring.SubsResponse.getDefaultInstance()) + return this; + if (other.hasSubsId()) { + mergeSubsId(other.getSubsId()); + } + if (other.hasKpiList()) { + mergeKpiList(other.getKpiList()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.SubsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.SubscriptionID subsId_; + + private com.google.protobuf.SingleFieldBuilderV3 subsIdBuilder_; + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return Whether the subsId field is set. + */ + public boolean hasSubsId() { + return subsIdBuilder_ != null || subsId_ != null; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return The subsId. + */ + public monitoring.Monitoring.SubscriptionID getSubsId() { + if (subsIdBuilder_ == null) { + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; + } else { + return subsIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder setSubsId(monitoring.Monitoring.SubscriptionID value) { + if (subsIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subsId_ = value; + onChanged(); + } else { + subsIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder setSubsId(monitoring.Monitoring.SubscriptionID.Builder builderForValue) { + if (subsIdBuilder_ == null) { + subsId_ = builderForValue.build(); + onChanged(); + } else { + subsIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder mergeSubsId(monitoring.Monitoring.SubscriptionID value) { + if (subsIdBuilder_ == null) { + if (subsId_ != null) { + subsId_ = monitoring.Monitoring.SubscriptionID.newBuilder(subsId_).mergeFrom(value).buildPartial(); + } else { + subsId_ = value; + } + onChanged(); + } else { + subsIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder clearSubsId() { + if (subsIdBuilder_ == null) { + subsId_ = null; + onChanged(); + } else { + subsId_ = null; + subsIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public monitoring.Monitoring.SubscriptionID.Builder getSubsIdBuilder() { + onChanged(); + return getSubsIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { + if (subsIdBuilder_ != null) { + return subsIdBuilder_.getMessageOrBuilder(); + } else { + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; + } + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSubsIdFieldBuilder() { + if (subsIdBuilder_ == null) { + subsIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSubsId(), getParentForChildren(), isClean()); + subsId_ = null; + } + return subsIdBuilder_; + } + + private monitoring.Monitoring.KpiList kpiList_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiListBuilder_; + + /** + * .monitoring.KpiList kpi_list = 2; + * @return Whether the kpiList field is set. + */ + public boolean hasKpiList() { + return kpiListBuilder_ != null || kpiList_ != null; + } + + /** + * .monitoring.KpiList kpi_list = 2; + * @return The kpiList. + */ + public monitoring.Monitoring.KpiList getKpiList() { + if (kpiListBuilder_ == null) { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; + } else { + return kpiListBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + public Builder setKpiList(monitoring.Monitoring.KpiList value) { + if (kpiListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiList_ = value; + onChanged(); + } else { + kpiListBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + public Builder setKpiList(monitoring.Monitoring.KpiList.Builder builderForValue) { + if (kpiListBuilder_ == null) { + kpiList_ = builderForValue.build(); + onChanged(); + } else { + kpiListBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { + if (kpiListBuilder_ == null) { + if (kpiList_ != null) { + kpiList_ = monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); + } else { + kpiList_ = value; + } + onChanged(); + } else { + kpiListBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + public Builder clearKpiList() { + if (kpiListBuilder_ == null) { + kpiList_ = null; + onChanged(); + } else { + kpiList_ = null; + kpiListBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { + onChanged(); + return getKpiListFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + if (kpiListBuilder_ != null) { + return kpiListBuilder_.getMessageOrBuilder(); + } else { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; + } + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiListFieldBuilder() { + if (kpiListBuilder_ == null) { + kpiListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiList(), getParentForChildren(), isClean()); + kpiList_ = null; + } + return kpiListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.SubsResponse) + } + + // @@protoc_insertion_point(class_scope:monitoring.SubsResponse) + private static final monitoring.Monitoring.SubsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.SubsResponse(); + } + + public static monitoring.Monitoring.SubsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.SubsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SubsListOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.SubsList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + java.util.List getSubsDescriptorList(); + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index); + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + int getSubsDescriptorCount(); + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + java.util.List getSubsDescriptorOrBuilderList(); + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder(int index); + } + + /** + * Protobuf type {@code monitoring.SubsList} + */ + public static final class SubsList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.SubsList) + SubsListOrBuilder { + + 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(); + 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(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubsList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubsList.class, monitoring.Monitoring.SubsList.Builder.class); + } + + public static final int SUBS_DESCRIPTOR_FIELD_NUMBER = 1; + + private java.util.List subsDescriptor_; + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + @java.lang.Override + public java.util.List getSubsDescriptorList() { + return subsDescriptor_; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + @java.lang.Override + public java.util.List getSubsDescriptorOrBuilderList() { + return subsDescriptor_; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + @java.lang.Override + public int getSubsDescriptorCount() { + return subsDescriptor_.size(); + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + @java.lang.Override + public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index) { + return subsDescriptor_.get(index); + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + @java.lang.Override + public monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder(int index) { + return subsDescriptor_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < subsDescriptor_.size(); i++) { + output.writeMessage(1, subsDescriptor_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < subsDescriptor_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, subsDescriptor_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.SubsList)) { + return super.equals(obj); + } + monitoring.Monitoring.SubsList other = (monitoring.Monitoring.SubsList) obj; + if (!getSubsDescriptorList().equals(other.getSubsDescriptorList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSubsDescriptorCount() > 0) { + hash = (37 * hash) + SUBS_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getSubsDescriptorList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.SubsList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubsList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubsList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.SubsList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.SubsList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.SubsList) + monitoring.Monitoring.SubsListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubsList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubsList.class, monitoring.Monitoring.SubsList.Builder.class); + } + + // 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(); + if (subsDescriptorBuilder_ == null) { + subsDescriptor_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + subsDescriptorBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.SubsList getDefaultInstanceForType() { + return monitoring.Monitoring.SubsList.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.SubsList build() { + monitoring.Monitoring.SubsList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.SubsList buildPartial() { + monitoring.Monitoring.SubsList result = new monitoring.Monitoring.SubsList(this); + int from_bitField0_ = bitField0_; + if (subsDescriptorBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subsDescriptor_ = java.util.Collections.unmodifiableList(subsDescriptor_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subsDescriptor_ = subsDescriptor_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.SubsList) { + return mergeFrom((monitoring.Monitoring.SubsList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.SubsList other) { + if (other == monitoring.Monitoring.SubsList.getDefaultInstance()) + return this; + if (subsDescriptorBuilder_ == null) { + if (!other.subsDescriptor_.isEmpty()) { + if (subsDescriptor_.isEmpty()) { + subsDescriptor_ = other.subsDescriptor_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.addAll(other.subsDescriptor_); + } + onChanged(); + } + } else { + if (!other.subsDescriptor_.isEmpty()) { + if (subsDescriptorBuilder_.isEmpty()) { + subsDescriptorBuilder_.dispose(); + subsDescriptorBuilder_ = null; + subsDescriptor_ = other.subsDescriptor_; + bitField0_ = (bitField0_ & ~0x00000001); + subsDescriptorBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSubsDescriptorFieldBuilder() : null; + } else { + subsDescriptorBuilder_.addAllMessages(other.subsDescriptor_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.SubsList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List subsDescriptor_ = java.util.Collections.emptyList(); + + private void ensureSubsDescriptorIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subsDescriptor_ = new java.util.ArrayList(subsDescriptor_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 subsDescriptorBuilder_; + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public java.util.List getSubsDescriptorList() { + if (subsDescriptorBuilder_ == null) { + return java.util.Collections.unmodifiableList(subsDescriptor_); + } else { + return subsDescriptorBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public int getSubsDescriptorCount() { + if (subsDescriptorBuilder_ == null) { + return subsDescriptor_.size(); + } else { + return subsDescriptorBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index) { + if (subsDescriptorBuilder_ == null) { + return subsDescriptor_.get(index); + } else { + return subsDescriptorBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder setSubsDescriptor(int index, monitoring.Monitoring.SubsDescriptor value) { + if (subsDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubsDescriptorIsMutable(); + subsDescriptor_.set(index, value); + onChanged(); + } else { + subsDescriptorBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder setSubsDescriptor(int index, monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.set(index, builderForValue.build()); + onChanged(); + } else { + subsDescriptorBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder addSubsDescriptor(monitoring.Monitoring.SubsDescriptor value) { + if (subsDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(value); + onChanged(); + } else { + subsDescriptorBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder addSubsDescriptor(int index, monitoring.Monitoring.SubsDescriptor value) { + if (subsDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(index, value); + onChanged(); + } else { + subsDescriptorBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder addSubsDescriptor(monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(builderForValue.build()); + onChanged(); + } else { + subsDescriptorBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder addSubsDescriptor(int index, monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(index, builderForValue.build()); + onChanged(); + } else { + subsDescriptorBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder addAllSubsDescriptor(java.lang.Iterable values) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subsDescriptor_); + onChanged(); + } else { + subsDescriptorBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder clearSubsDescriptor() { + if (subsDescriptorBuilder_ == null) { + subsDescriptor_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subsDescriptorBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder removeSubsDescriptor(int index) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.remove(index); + onChanged(); + } else { + subsDescriptorBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public monitoring.Monitoring.SubsDescriptor.Builder getSubsDescriptorBuilder(int index) { + return getSubsDescriptorFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder(int index) { + if (subsDescriptorBuilder_ == null) { + return subsDescriptor_.get(index); + } else { + return subsDescriptorBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public java.util.List getSubsDescriptorOrBuilderList() { + if (subsDescriptorBuilder_ != null) { + return subsDescriptorBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subsDescriptor_); + } + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public monitoring.Monitoring.SubsDescriptor.Builder addSubsDescriptorBuilder() { + return getSubsDescriptorFieldBuilder().addBuilder(monitoring.Monitoring.SubsDescriptor.getDefaultInstance()); + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public monitoring.Monitoring.SubsDescriptor.Builder addSubsDescriptorBuilder(int index) { + return getSubsDescriptorFieldBuilder().addBuilder(index, monitoring.Monitoring.SubsDescriptor.getDefaultInstance()); + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public java.util.List getSubsDescriptorBuilderList() { + return getSubsDescriptorFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSubsDescriptorFieldBuilder() { + if (subsDescriptorBuilder_ == null) { + subsDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(subsDescriptor_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + subsDescriptor_ = null; + } + return subsDescriptorBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.SubsList) + } + + // @@protoc_insertion_point(class_scope:monitoring.SubsList) + private static final monitoring.Monitoring.SubsList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.SubsList(); + } + + public static monitoring.Monitoring.SubsList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.SubsList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AlarmDescriptorOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.AlarmDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + boolean hasAlarmId(); + + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + monitoring.Monitoring.AlarmID getAlarmId(); + + /** + * .monitoring.AlarmID alarm_id = 1; + */ + monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); + + /** + * string alarm_description = 2; + * @return The alarmDescription. + */ + java.lang.String getAlarmDescription(); + + /** + * string alarm_description = 2; + * @return The bytes for alarmDescription. + */ + com.google.protobuf.ByteString getAlarmDescriptionBytes(); + + /** + * string name = 3; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 3; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * .monitoring.KpiId kpi_id = 4; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpi_id = 4; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpi_id = 4; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return Whether the kpiValueRange field is set. + */ + boolean hasKpiValueRange(); + + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return The kpiValueRange. + */ + monitoring.Monitoring.KpiValueRange getKpiValueRange(); + + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder(); + + /** + * .context.Timestamp timestamp = 6; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + + /** + * .context.Timestamp timestamp = 6; + * @return The timestamp. + */ + context.ContextOuterClass.Timestamp getTimestamp(); + + /** + * .context.Timestamp timestamp = 6; + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.MonitorKpiRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.MonitorKpiRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * Protobuf type {@code monitoring.AlarmDescriptor} + */ + public static final class AlarmDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.AlarmDescriptor) + AlarmDescriptorOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use AlarmDescriptor.newBuilder() to construct. + private AlarmDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AlarmDescriptor() { + alarmDescription_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmDescriptor.class, monitoring.Monitoring.AlarmDescriptor.Builder.class); + } + + public static final int ALARM_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.AlarmID alarmId_; + + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + @java.lang.Override + public boolean hasAlarmId() { + return alarmId_ != null; + } + + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + @java.lang.Override + public monitoring.Monitoring.AlarmID getAlarmId() { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } + + /** + * .monitoring.AlarmID alarm_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + return getAlarmId(); + } + + public static final int ALARM_DESCRIPTION_FIELD_NUMBER = 2; + + private volatile java.lang.Object alarmDescription_; + + /** + * string alarm_description = 2; + * @return The alarmDescription. + */ + @java.lang.Override + public java.lang.String getAlarmDescription() { + java.lang.Object ref = alarmDescription_; + 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(); + alarmDescription_ = s; + return s; + } + } + + /** + * string alarm_description = 2; + * @return The bytes for alarmDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAlarmDescriptionBytes() { + java.lang.Object ref = alarmDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + alarmDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + + private volatile java.lang.Object name_; + + /** + * string name = 3; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 3; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KPI_ID_FIELD_NUMBER = 4; + + private monitoring.Monitoring.KpiId kpiId_; + + /** + * .monitoring.KpiId kpi_id = 4; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 4; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + + /** + * .monitoring.KpiId kpi_id = 4; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int KPI_VALUE_RANGE_FIELD_NUMBER = 5; + + private monitoring.Monitoring.KpiValueRange kpiValueRange_; + + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return Whether the kpiValueRange field is set. + */ + @java.lang.Override + public boolean hasKpiValueRange() { + return kpiValueRange_ != null; + } + + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return The kpiValueRange. + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueRange getKpiValueRange() { + return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; + } + + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { + return getKpiValueRange(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 6; + + private context.ContextOuterClass.Timestamp timestamp_; + + /** + * .context.Timestamp timestamp = 6; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 6; + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + + /** + * .context.Timestamp timestamp = 6; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (alarmId_ != null) { + output.writeMessage(1, getAlarmId()); + } + if (!getAlarmDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, alarmDescription_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (kpiId_ != null) { + output.writeMessage(4, getKpiId()); + } + if (kpiValueRange_ != null) { + output.writeMessage(5, getKpiValueRange()); + } + if (timestamp_ != null) { + output.writeMessage(6, getTimestamp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (alarmId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId()); + } + if (!getAlarmDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, alarmDescription_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getKpiId()); + } + if (kpiValueRange_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getKpiValueRange()); + } + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTimestamp()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.AlarmDescriptor)) { + return super.equals(obj); + } + monitoring.Monitoring.AlarmDescriptor other = (monitoring.Monitoring.AlarmDescriptor) obj; + if (hasAlarmId() != other.hasAlarmId()) + return false; + if (hasAlarmId()) { + if (!getAlarmId().equals(other.getAlarmId())) + return false; + } + if (!getAlarmDescription().equals(other.getAlarmDescription())) + return false; + if (!getName().equals(other.getName())) + return false; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (hasKpiValueRange() != other.hasKpiValueRange()) + return false; + if (hasKpiValueRange()) { + if (!getKpiValueRange().equals(other.getKpiValueRange())) + return false; + } + if (hasTimestamp() != other.hasTimestamp()) + return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAlarmId()) { + hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; + hash = (53 * hash) + getAlarmId().hashCode(); + } + hash = (37 * hash) + ALARM_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getAlarmDescription().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + if (hasKpiValueRange()) { + hash = (37 * hash) + KPI_VALUE_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getKpiValueRange().hashCode(); + } + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.AlarmDescriptor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.AlarmDescriptor parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.AlarmDescriptor prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.AlarmDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.AlarmDescriptor) + monitoring.Monitoring.AlarmDescriptorOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmDescriptor.class, monitoring.Monitoring.AlarmDescriptor.Builder.class); + } + + // 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; + alarmIdBuilder_ = null; + } + alarmDescription_ = ""; + name_ = ""; + if (kpiIdBuilder_ == null) { + kpiId_ = null; + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + if (kpiValueRangeBuilder_ == null) { + kpiValueRange_ = null; + } else { + kpiValueRange_ = null; + kpiValueRangeBuilder_ = null; + } + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.AlarmDescriptor getDefaultInstanceForType() { + return monitoring.Monitoring.AlarmDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.AlarmDescriptor build() { + monitoring.Monitoring.AlarmDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.AlarmDescriptor) { + return mergeFrom((monitoring.Monitoring.AlarmDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.AlarmDescriptor other) { + if (other == monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()) + return this; + if (other.hasAlarmId()) { + mergeAlarmId(other.getAlarmId()); + } + if (!other.getAlarmDescription().isEmpty()) { + alarmDescription_ = other.alarmDescription_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (other.hasKpiValueRange()) { + mergeKpiValueRange(other.getKpiValueRange()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.AlarmDescriptor) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.AlarmID alarmId_; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.MonitorKpiRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private com.google.protobuf.SingleFieldBuilderV3 alarmIdBuilder_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.MonitorKpiRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.MonitorKpiRequest) - monitoring.Monitoring.MonitorKpiRequestOrBuilder { - 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); - } - - // 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; - kpiIdBuilder_ = null; - } - monitoringWindowS_ = 0F; - - samplingRateS_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_MonitorKpiRequest_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.MonitorKpiRequest getDefaultInstanceForType() { - return monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.MonitorKpiRequest build() { - monitoring.Monitoring.MonitorKpiRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.MonitorKpiRequest) { - return mergeFrom((monitoring.Monitoring.MonitorKpiRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.MonitorKpiRequest other) { - if (other == monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - if (other.getMonitoringWindowS() != 0F) { - setMonitoringWindowS(other.getMonitoringWindowS()); - } - if (other.getSamplingRateS() != 0F) { - setSamplingRateS(other.getSamplingRateS()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.MonitorKpiRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.KpiId kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - - private float monitoringWindowS_ ; - /** - * float monitoring_window_s = 2; - * @return The monitoringWindowS. - */ - @java.lang.Override - public float getMonitoringWindowS() { - return monitoringWindowS_; - } - /** - * float monitoring_window_s = 2; - * @param value The monitoringWindowS to set. - * @return This builder for chaining. - */ - public Builder setMonitoringWindowS(float value) { - - monitoringWindowS_ = value; - onChanged(); - return this; - } - /** - * float monitoring_window_s = 2; - * @return This builder for chaining. - */ - public Builder clearMonitoringWindowS() { - - monitoringWindowS_ = 0F; - onChanged(); - return this; - } - - private float samplingRateS_ ; - /** - *
-       * Pending add field to reflect Available Device Protocols
-       * 
- * - * float sampling_rate_s = 3; - * @return The samplingRateS. - */ - @java.lang.Override - public float getSamplingRateS() { - return samplingRateS_; - } - /** - *
-       * Pending add field to reflect Available Device Protocols
-       * 
- * - * float sampling_rate_s = 3; - * @param value The samplingRateS to set. - * @return This builder for chaining. - */ - public Builder setSamplingRateS(float value) { - - samplingRateS_ = value; - onChanged(); - return this; - } - /** - *
-       * Pending add field to reflect Available Device Protocols
-       * 
- * - * float sampling_rate_s = 3; - * @return This builder for chaining. - */ - public Builder clearSamplingRateS() { - - samplingRateS_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.MonitorKpiRequest) - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + public boolean hasAlarmId() { + return alarmIdBuilder_ != null || alarmId_ != null; + } - // @@protoc_insertion_point(class_scope:monitoring.MonitorKpiRequest) - private static final monitoring.Monitoring.MonitorKpiRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.MonitorKpiRequest(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + public monitoring.Monitoring.AlarmID getAlarmId() { + if (alarmIdBuilder_ == null) { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } else { + return alarmIdBuilder_.getMessage(); + } + } - public static monitoring.Monitoring.MonitorKpiRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + alarmId_ = value; + onChanged(); + } else { + alarmIdBuilder_.setMessage(value); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder setAlarmId(monitoring.Monitoring.AlarmID.Builder builderForValue) { + if (alarmIdBuilder_ == null) { + alarmId_ = builderForValue.build(); + onChanged(); + } else { + alarmIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (alarmId_ != null) { + alarmId_ = monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); + } else { + alarmId_ = value; + } + onChanged(); + } else { + alarmIdBuilder_.mergeFrom(value); + } + return this; + } - @java.lang.Override - public monitoring.Monitoring.MonitorKpiRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder clearAlarmId() { + if (alarmIdBuilder_ == null) { + alarmId_ = null; + onChanged(); + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + return this; + } - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { + onChanged(); + return getAlarmIdFieldBuilder().getBuilder(); + } - public interface KpiQueryOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiQuery) - com.google.protobuf.MessageOrBuilder { + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + if (alarmIdBuilder_ != null) { + return alarmIdBuilder_.getMessageOrBuilder(); + } else { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } + } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - java.util.List - getKpiIdsList(); - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - monitoring.Monitoring.KpiId getKpiIds(int index); - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - int getKpiIdsCount(); - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - java.util.List - getKpiIdsOrBuilderList(); - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder( - int index); + /** + * .monitoring.AlarmID alarm_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getAlarmIdFieldBuilder() { + if (alarmIdBuilder_ == null) { + alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getAlarmId(), getParentForChildren(), isClean()); + alarmId_ = null; + } + return alarmIdBuilder_; + } - /** - * float monitoring_window_s = 2; - * @return The monitoringWindowS. - */ - float getMonitoringWindowS(); + private java.lang.Object alarmDescription_ = ""; + + /** + * string alarm_description = 2; + * @return The alarmDescription. + */ + public java.lang.String getAlarmDescription() { + java.lang.Object ref = alarmDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alarmDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - *
-     * used when you want something like "get the last N many samples
-     * 
- * - * uint32 last_n_samples = 3; - * @return The lastNSamples. - */ - int getLastNSamples(); + /** + * string alarm_description = 2; + * @return The bytes for alarmDescription. + */ + public com.google.protobuf.ByteString getAlarmDescriptionBytes() { + java.lang.Object ref = alarmDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + alarmDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 4; - * @return Whether the startTimestamp field is set. - */ - boolean hasStartTimestamp(); - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 4; - * @return The startTimestamp. - */ - context.ContextOuterClass.Timestamp getStartTimestamp(); - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 4; - */ - context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder(); + /** + * string alarm_description = 2; + * @param value The alarmDescription to set. + * @return This builder for chaining. + */ + public Builder setAlarmDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + alarmDescription_ = value; + onChanged(); + return this; + } - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 5; - * @return Whether the endTimestamp field is set. - */ - boolean hasEndTimestamp(); - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 5; - * @return The endTimestamp. - */ - context.ContextOuterClass.Timestamp getEndTimestamp(); - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 5; - */ - context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder(); - } - /** - * Protobuf type {@code monitoring.KpiQuery} - */ - public static final class KpiQuery extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiQuery) - KpiQueryOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiQuery.newBuilder() to construct. - private KpiQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiQuery() { - kpiIds_ = java.util.Collections.emptyList(); - } + /** + * string alarm_description = 2; + * @return This builder for chaining. + */ + public Builder clearAlarmDescription() { + alarmDescription_ = getDefaultInstance().getAlarmDescription(); + onChanged(); + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiQuery(); - } + /** + * string alarm_description = 2; + * @param value The bytes for alarmDescription to set. + * @return This builder for chaining. + */ + public Builder setAlarmDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + alarmDescription_ = value; + onChanged(); + return this; + } - @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(); - 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; - } + private java.lang.Object name_ = ""; + + /** + * string name = 3; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiQuery_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiQuery.class, monitoring.Monitoring.KpiQuery.Builder.class); - } + /** + * string name = 3; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static final int KPI_IDS_FIELD_NUMBER = 1; - private java.util.List kpiIds_; - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - @java.lang.Override - public java.util.List getKpiIdsList() { - return kpiIds_; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - @java.lang.Override - public java.util.List - getKpiIdsOrBuilderList() { - return kpiIds_; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - @java.lang.Override - public int getKpiIdsCount() { - return kpiIds_.size(); - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiIds(int index) { - return kpiIds_.get(index); - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder( - int index) { - return kpiIds_.get(index); - } + /** + * string name = 3; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } - public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; - private float monitoringWindowS_; - /** - * float monitoring_window_s = 2; - * @return The monitoringWindowS. - */ - @java.lang.Override - public float getMonitoringWindowS() { - return monitoringWindowS_; - } + /** + * string name = 3; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } - public static final int LAST_N_SAMPLES_FIELD_NUMBER = 3; - private int lastNSamples_; - /** - *
-     * used when you want something like "get the last N many samples
-     * 
- * - * uint32 last_n_samples = 3; - * @return The lastNSamples. - */ - @java.lang.Override - public int getLastNSamples() { - return lastNSamples_; - } + /** + * string name = 3; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } - public static final int START_TIMESTAMP_FIELD_NUMBER = 4; - private context.ContextOuterClass.Timestamp startTimestamp_; - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 4; - * @return Whether the startTimestamp field is set. - */ - @java.lang.Override - public boolean hasStartTimestamp() { - return startTimestamp_ != null; - } - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 4; - * @return The startTimestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getStartTimestamp() { - return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; - } - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 4; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { - return getStartTimestamp(); - } + private monitoring.Monitoring.KpiId kpiId_; - public static final int END_TIMESTAMP_FIELD_NUMBER = 5; - private context.ContextOuterClass.Timestamp endTimestamp_; - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 5; - * @return Whether the endTimestamp field is set. - */ - @java.lang.Override - public boolean hasEndTimestamp() { - return endTimestamp_ != null; - } - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 5; - * @return The endTimestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getEndTimestamp() { - return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; - } - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 5; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { - return getEndTimestamp(); - } + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .monitoring.KpiId kpi_id = 4; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } - memoizedIsInitialized = 1; - return true; - } + /** + * .monitoring.KpiId kpi_id = 4; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < kpiIds_.size(); i++) { - output.writeMessage(1, kpiIds_.get(i)); - } - if (monitoringWindowS_ != 0F) { - output.writeFloat(2, monitoringWindowS_); - } - if (lastNSamples_ != 0) { - output.writeUInt32(3, lastNSamples_); - } - if (startTimestamp_ != null) { - output.writeMessage(4, getStartTimestamp()); - } - if (endTimestamp_ != null) { - output.writeMessage(5, getEndTimestamp()); - } - unknownFields.writeTo(output); - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < kpiIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, kpiIds_.get(i)); - } - if (monitoringWindowS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, monitoringWindowS_); - } - if (lastNSamples_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, lastNSamples_); - } - if (startTimestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getStartTimestamp()); - } - if (endTimestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getEndTimestamp()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiQuery)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiQuery other = (monitoring.Monitoring.KpiQuery) obj; - - if (!getKpiIdsList() - .equals(other.getKpiIdsList())) return false; - if (java.lang.Float.floatToIntBits(getMonitoringWindowS()) - != java.lang.Float.floatToIntBits( - other.getMonitoringWindowS())) return false; - if (getLastNSamples() - != other.getLastNSamples()) return false; - if (hasStartTimestamp() != other.hasStartTimestamp()) return false; - if (hasStartTimestamp()) { - if (!getStartTimestamp() - .equals(other.getStartTimestamp())) return false; - } - if (hasEndTimestamp() != other.hasEndTimestamp()) return false; - if (hasEndTimestamp()) { - if (!getEndTimestamp() - .equals(other.getEndTimestamp())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getKpiIdsCount() > 0) { - hash = (37 * hash) + KPI_IDS_FIELD_NUMBER; - hash = (53 * hash) + getKpiIdsList().hashCode(); - } - hash = (37 * hash) + MONITORING_WINDOW_S_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getMonitoringWindowS()); - hash = (37 * hash) + LAST_N_SAMPLES_FIELD_NUMBER; - hash = (53 * hash) + getLastNSamples(); - if (hasStartTimestamp()) { - hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getStartTimestamp().hashCode(); - } - if (hasEndTimestamp()) { - hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getEndTimestamp().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } - public static monitoring.Monitoring.KpiQuery parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiQuery parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiQuery parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiQuery parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiQuery parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiQuery prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiQuery} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiQuery) - monitoring.Monitoring.KpiQueryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiQuery_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiQuery_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiQuery.class, monitoring.Monitoring.KpiQuery.Builder.class); - } - - // 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(); - if (kpiIdsBuilder_ == null) { - kpiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - kpiIdsBuilder_.clear(); - } - monitoringWindowS_ = 0F; - - lastNSamples_ = 0; - - if (startTimestampBuilder_ == null) { - startTimestamp_ = null; - } else { - startTimestamp_ = null; - startTimestampBuilder_ = null; - } - if (endTimestampBuilder_ == null) { - endTimestamp_ = null; - } else { - endTimestamp_ = null; - endTimestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiQuery_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiQuery getDefaultInstanceForType() { - return monitoring.Monitoring.KpiQuery.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiQuery build() { - monitoring.Monitoring.KpiQuery result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public monitoring.Monitoring.KpiQuery buildPartial() { - monitoring.Monitoring.KpiQuery result = new monitoring.Monitoring.KpiQuery(this); - int from_bitField0_ = bitField0_; - if (kpiIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpiIds_ = java.util.Collections.unmodifiableList(kpiIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.kpiIds_ = kpiIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiQuery) { - return mergeFrom((monitoring.Monitoring.KpiQuery)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiQuery other) { - if (other == monitoring.Monitoring.KpiQuery.getDefaultInstance()) return this; - if (kpiIdsBuilder_ == null) { - if (!other.kpiIds_.isEmpty()) { - if (kpiIds_.isEmpty()) { - kpiIds_ = other.kpiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiIdsIsMutable(); - kpiIds_.addAll(other.kpiIds_); - } - onChanged(); - } - } else { - if (!other.kpiIds_.isEmpty()) { - if (kpiIdsBuilder_.isEmpty()) { - kpiIdsBuilder_.dispose(); - kpiIdsBuilder_ = null; - kpiIds_ = other.kpiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiIdsFieldBuilder() : null; - } else { - kpiIdsBuilder_.addAllMessages(other.kpiIds_); - } - } - } - if (other.getMonitoringWindowS() != 0F) { - setMonitoringWindowS(other.getMonitoringWindowS()); - } - if (other.getLastNSamples() != 0) { - setLastNSamples(other.getLastNSamples()); - } - if (other.hasStartTimestamp()) { - mergeStartTimestamp(other.getStartTimestamp()); - } - if (other.hasEndTimestamp()) { - mergeEndTimestamp(other.getEndTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiQuery) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List kpiIds_ = - java.util.Collections.emptyList(); - private void ensureKpiIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiIds_ = new java.util.ArrayList(kpiIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdsBuilder_; - - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public java.util.List getKpiIdsList() { - if (kpiIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiIds_); - } else { - return kpiIdsBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public int getKpiIdsCount() { - if (kpiIdsBuilder_ == null) { - return kpiIds_.size(); - } else { - return kpiIdsBuilder_.getCount(); - } - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public monitoring.Monitoring.KpiId getKpiIds(int index) { - if (kpiIdsBuilder_ == null) { - return kpiIds_.get(index); - } else { - return kpiIdsBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder setKpiIds( - int index, monitoring.Monitoring.KpiId value) { - if (kpiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdsIsMutable(); - kpiIds_.set(index, value); - onChanged(); - } else { - kpiIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder setKpiIds( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdsBuilder_ == null) { - ensureKpiIdsIsMutable(); - kpiIds_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder addKpiIds(monitoring.Monitoring.KpiId value) { - if (kpiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdsIsMutable(); - kpiIds_.add(value); - onChanged(); - } else { - kpiIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder addKpiIds( - int index, monitoring.Monitoring.KpiId value) { - if (kpiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdsIsMutable(); - kpiIds_.add(index, value); - onChanged(); - } else { - kpiIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder addKpiIds( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdsBuilder_ == null) { - ensureKpiIdsIsMutable(); - kpiIds_.add(builderForValue.build()); - onChanged(); - } else { - kpiIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder addKpiIds( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdsBuilder_ == null) { - ensureKpiIdsIsMutable(); - kpiIds_.add(index, builderForValue.build()); - onChanged(); - } else { - kpiIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder addAllKpiIds( - java.lang.Iterable values) { - if (kpiIdsBuilder_ == null) { - ensureKpiIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiIds_); - onChanged(); - } else { - kpiIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder clearKpiIds() { - if (kpiIdsBuilder_ == null) { - kpiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder removeKpiIds(int index) { - if (kpiIdsBuilder_ == null) { - ensureKpiIdsIsMutable(); - kpiIds_.remove(index); - onChanged(); - } else { - kpiIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdsBuilder( - int index) { - return getKpiIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder( - int index) { - if (kpiIdsBuilder_ == null) { - return kpiIds_.get(index); } else { - return kpiIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public java.util.List - getKpiIdsOrBuilderList() { - if (kpiIdsBuilder_ != null) { - return kpiIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(kpiIds_); - } - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdsBuilder() { - return getKpiIdsFieldBuilder().addBuilder( - monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdsBuilder( - int index) { - return getKpiIdsFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public java.util.List - getKpiIdsBuilderList() { - return getKpiIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdsFieldBuilder() { - if (kpiIdsBuilder_ == null) { - kpiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - kpiIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - kpiIds_ = null; - } - return kpiIdsBuilder_; - } - - private float monitoringWindowS_ ; - /** - * float monitoring_window_s = 2; - * @return The monitoringWindowS. - */ - @java.lang.Override - public float getMonitoringWindowS() { - return monitoringWindowS_; - } - /** - * float monitoring_window_s = 2; - * @param value The monitoringWindowS to set. - * @return This builder for chaining. - */ - public Builder setMonitoringWindowS(float value) { - - monitoringWindowS_ = value; - onChanged(); - return this; - } - /** - * float monitoring_window_s = 2; - * @return This builder for chaining. - */ - public Builder clearMonitoringWindowS() { - - monitoringWindowS_ = 0F; - onChanged(); - return this; - } - - private int lastNSamples_ ; - /** - *
-       * used when you want something like "get the last N many samples
-       * 
- * - * uint32 last_n_samples = 3; - * @return The lastNSamples. - */ - @java.lang.Override - public int getLastNSamples() { - return lastNSamples_; - } - /** - *
-       * used when you want something like "get the last N many samples
-       * 
- * - * uint32 last_n_samples = 3; - * @param value The lastNSamples to set. - * @return This builder for chaining. - */ - public Builder setLastNSamples(int value) { - - lastNSamples_ = value; - onChanged(); - return this; - } - /** - *
-       * used when you want something like "get the last N many samples
-       * 
- * - * uint32 last_n_samples = 3; - * @return This builder for chaining. - */ - public Builder clearLastNSamples() { - - lastNSamples_ = 0; - onChanged(); - return this; - } - - private context.ContextOuterClass.Timestamp startTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> startTimestampBuilder_; - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - * @return Whether the startTimestamp field is set. - */ - public boolean hasStartTimestamp() { - return startTimestampBuilder_ != null || startTimestamp_ != null; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - * @return The startTimestamp. - */ - public context.ContextOuterClass.Timestamp getStartTimestamp() { - if (startTimestampBuilder_ == null) { - return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; - } else { - return startTimestampBuilder_.getMessage(); - } - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - public Builder setStartTimestamp(context.ContextOuterClass.Timestamp value) { - if (startTimestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTimestamp_ = value; - onChanged(); - } else { - startTimestampBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - public Builder setStartTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (startTimestampBuilder_ == null) { - startTimestamp_ = builderForValue.build(); - onChanged(); - } else { - startTimestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) { - if (startTimestampBuilder_ == null) { - if (startTimestamp_ != null) { - startTimestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(startTimestamp_).mergeFrom(value).buildPartial(); - } else { - startTimestamp_ = value; - } - onChanged(); - } else { - startTimestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - public Builder clearStartTimestamp() { - if (startTimestampBuilder_ == null) { - startTimestamp_ = null; - onChanged(); - } else { - startTimestamp_ = null; - startTimestampBuilder_ = null; - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() { - - onChanged(); - return getStartTimestampFieldBuilder().getBuilder(); - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { - if (startTimestampBuilder_ != null) { - return startTimestampBuilder_.getMessageOrBuilder(); - } else { - return startTimestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; - } - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getStartTimestampFieldBuilder() { - if (startTimestampBuilder_ == null) { - startTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getStartTimestamp(), - getParentForChildren(), - isClean()); - startTimestamp_ = null; - } - return startTimestampBuilder_; - } - - private context.ContextOuterClass.Timestamp endTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> endTimestampBuilder_; - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - * @return Whether the endTimestamp field is set. - */ - public boolean hasEndTimestamp() { - return endTimestampBuilder_ != null || endTimestamp_ != null; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - * @return The endTimestamp. - */ - public context.ContextOuterClass.Timestamp getEndTimestamp() { - if (endTimestampBuilder_ == null) { - return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; - } else { - return endTimestampBuilder_.getMessage(); - } - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - public Builder setEndTimestamp(context.ContextOuterClass.Timestamp value) { - if (endTimestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTimestamp_ = value; - onChanged(); - } else { - endTimestampBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - public Builder setEndTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (endTimestampBuilder_ == null) { - endTimestamp_ = builderForValue.build(); - onChanged(); - } else { - endTimestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) { - if (endTimestampBuilder_ == null) { - if (endTimestamp_ != null) { - endTimestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(endTimestamp_).mergeFrom(value).buildPartial(); - } else { - endTimestamp_ = value; - } - onChanged(); - } else { - endTimestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - public Builder clearEndTimestamp() { - if (endTimestampBuilder_ == null) { - endTimestamp_ = null; - onChanged(); - } else { - endTimestamp_ = null; - endTimestampBuilder_ = null; - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() { - - onChanged(); - return getEndTimestampFieldBuilder().getBuilder(); - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { - if (endTimestampBuilder_ != null) { - return endTimestampBuilder_.getMessageOrBuilder(); - } else { - return endTimestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; - } - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getEndTimestampFieldBuilder() { - if (endTimestampBuilder_ == null) { - endTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getEndTimestamp(), - getParentForChildren(), - isClean()); - endTimestamp_ = null; - } - return endTimestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiQuery) - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } - // @@protoc_insertion_point(class_scope:monitoring.KpiQuery) - private static final monitoring.Monitoring.KpiQuery DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiQuery(); - } + private monitoring.Monitoring.KpiValueRange kpiValueRange_; - public static monitoring.Monitoring.KpiQuery getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3 kpiValueRangeBuilder_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return Whether the kpiValueRange field is set. + */ + public boolean hasKpiValueRange() { + return kpiValueRangeBuilder_ != null || kpiValueRange_ != null; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return The kpiValueRange. + */ + public monitoring.Monitoring.KpiValueRange getKpiValueRange() { + if (kpiValueRangeBuilder_ == null) { + return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; + } else { + return kpiValueRangeBuilder_.getMessage(); + } + } - @java.lang.Override - public monitoring.Monitoring.KpiQuery getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + public Builder setKpiValueRange(monitoring.Monitoring.KpiValueRange value) { + if (kpiValueRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiValueRange_ = value; + onChanged(); + } else { + kpiValueRangeBuilder_.setMessage(value); + } + return this; + } - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + public Builder setKpiValueRange(monitoring.Monitoring.KpiValueRange.Builder builderForValue) { + if (kpiValueRangeBuilder_ == null) { + kpiValueRange_ = builderForValue.build(); + onChanged(); + } else { + kpiValueRangeBuilder_.setMessage(builderForValue.build()); + } + return this; + } - public interface RawKpiOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.RawKpi) - com.google.protobuf.MessageOrBuilder { + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + public Builder mergeKpiValueRange(monitoring.Monitoring.KpiValueRange value) { + if (kpiValueRangeBuilder_ == null) { + if (kpiValueRange_ != null) { + kpiValueRange_ = monitoring.Monitoring.KpiValueRange.newBuilder(kpiValueRange_).mergeFrom(value).buildPartial(); + } else { + kpiValueRange_ = value; + } + onChanged(); + } else { + kpiValueRangeBuilder_.mergeFrom(value); + } + return this; + } - /** - * .context.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 1; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 1; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + public Builder clearKpiValueRange() { + if (kpiValueRangeBuilder_ == null) { + kpiValueRange_ = null; + onChanged(); + } else { + kpiValueRange_ = null; + kpiValueRangeBuilder_ = null; + } + return this; + } - /** - * .monitoring.KpiValue kpi_value = 2; - * @return Whether the kpiValue field is set. - */ - boolean hasKpiValue(); - /** - * .monitoring.KpiValue kpi_value = 2; - * @return The kpiValue. - */ - monitoring.Monitoring.KpiValue getKpiValue(); - /** - * .monitoring.KpiValue kpi_value = 2; - */ - monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); - } - /** - *
-   * cell
-   * 
- * - * Protobuf type {@code monitoring.RawKpi} - */ - public static final class RawKpi extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.RawKpi) - RawKpiOrBuilder { - private static final long serialVersionUID = 0L; - // Use RawKpi.newBuilder() to construct. - private RawKpi(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RawKpi() { - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + public monitoring.Monitoring.KpiValueRange.Builder getKpiValueRangeBuilder() { + onChanged(); + return getKpiValueRangeFieldBuilder().getBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RawKpi(); - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { + if (kpiValueRangeBuilder_ != null) { + return kpiValueRangeBuilder_.getMessageOrBuilder(); + } else { + return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; + } + } - @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; - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiValueRangeFieldBuilder() { + if (kpiValueRangeBuilder_ == null) { + kpiValueRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiValueRange(), getParentForChildren(), isClean()); + kpiValueRange_ = null; + } + return kpiValueRangeBuilder_; + } + + private context.ContextOuterClass.Timestamp timestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; + + /** + * .context.Timestamp timestamp = 6; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 6; + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * .context.Timestamp timestamp = 6; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 6; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Timestamp timestamp = 6; + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 6; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + /** + * .context.Timestamp timestamp = 6; + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + + /** + * .context.Timestamp timestamp = 6; + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } + + /** + * .context.Timestamp timestamp = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.AlarmDescriptor) + } + + // @@protoc_insertion_point(class_scope:monitoring.AlarmDescriptor) + private static final monitoring.Monitoring.AlarmDescriptor DEFAULT_INSTANCE; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_RawKpi_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.RawKpi.class, monitoring.Monitoring.RawKpi.Builder.class); - } + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmDescriptor(); + } - public static final int TIMESTAMP_FIELD_NUMBER = 1; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 1; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .context.Timestamp timestamp = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } + public static monitoring.Monitoring.AlarmDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static final int KPI_VALUE_FIELD_NUMBER = 2; - private monitoring.Monitoring.KpiValue kpiValue_; - /** - * .monitoring.KpiValue kpi_value = 2; - * @return Whether the kpiValue field is set. - */ - @java.lang.Override - public boolean hasKpiValue() { - return kpiValue_ != null; - } - /** - * .monitoring.KpiValue kpi_value = 2; - * @return The kpiValue. - */ - @java.lang.Override - public monitoring.Monitoring.KpiValue getKpiValue() { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - return getKpiValue(); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @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); + } + }; - memoizedIsInitialized = 1; - return true; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (timestamp_ != null) { - output.writeMessage(1, getTimestamp()); - } - if (kpiValue_ != null) { - output.writeMessage(2, getKpiValue()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTimestamp()); - } - if (kpiValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getKpiValue()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; + @java.lang.Override + public monitoring.Monitoring.AlarmDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.RawKpi)) { - return super.equals(obj); - } - monitoring.Monitoring.RawKpi other = (monitoring.Monitoring.RawKpi) obj; - - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (hasKpiValue() != other.hasKpiValue()) return false; - if (hasKpiValue()) { - if (!getKpiValue() - .equals(other.getKpiValue())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public interface AlarmIDOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.AlarmID) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - if (hasKpiValue()) { - hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getKpiValue().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Uuid alarm_id = 1; + * @return Whether the alarmId field is set. + */ + boolean hasAlarmId(); - public static monitoring.Monitoring.RawKpi parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpi parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpi parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpi parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpi parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpi parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpi parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpi parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.RawKpi parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpi parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.RawKpi parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpi parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Uuid alarm_id = 1; + * @return The alarmId. + */ + context.ContextOuterClass.Uuid getAlarmId(); - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.RawKpi prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * .context.Uuid alarm_id = 1; + */ + context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder(); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** - *
-     * cell
-     * 
- * - * Protobuf type {@code monitoring.RawKpi} + * Protobuf type {@code monitoring.AlarmID} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.RawKpi) - monitoring.Monitoring.RawKpiOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_RawKpi_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.RawKpi.class, monitoring.Monitoring.RawKpi.Builder.class); - } - - // 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; - timestampBuilder_ = null; - } - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.RawKpi getDefaultInstanceForType() { - return monitoring.Monitoring.RawKpi.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.RawKpi build() { - monitoring.Monitoring.RawKpi result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.RawKpi) { - return mergeFrom((monitoring.Monitoring.RawKpi)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.RawKpi other) { - if (other == monitoring.Monitoring.RawKpi.getDefaultInstance()) return this; - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - if (other.hasKpiValue()) { - mergeKpiValue(other.getKpiValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - 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); - } - } - return this; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; - /** - * .context.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 1; - * @return The timestamp. - */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .context.Timestamp timestamp = 1; - */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - * .context.Timestamp timestamp = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - - private monitoring.Monitoring.KpiValue kpiValue_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiValueBuilder_; - /** - * .monitoring.KpiValue kpi_value = 2; - * @return Whether the kpiValue field is set. - */ - public boolean hasKpiValue() { - return kpiValueBuilder_ != null || kpiValue_ != null; - } - /** - * .monitoring.KpiValue kpi_value = 2; - * @return The kpiValue. - */ - public monitoring.Monitoring.KpiValue getKpiValue() { - if (kpiValueBuilder_ == null) { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } else { - return kpiValueBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiValue_ = value; - onChanged(); - } else { - kpiValueBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - public Builder setKpiValue( - monitoring.Monitoring.KpiValue.Builder builderForValue) { - if (kpiValueBuilder_ == null) { - kpiValue_ = builderForValue.build(); - onChanged(); - } else { - kpiValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (kpiValue_ != null) { - kpiValue_ = - monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); - } else { - kpiValue_ = value; - } - onChanged(); - } else { - kpiValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - public Builder clearKpiValue() { - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - onChanged(); - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { - - onChanged(); - return getKpiValueFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - if (kpiValueBuilder_ != null) { - return kpiValueBuilder_.getMessageOrBuilder(); - } else { - return kpiValue_ == null ? - monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> - getKpiValueFieldBuilder() { - if (kpiValueBuilder_ == null) { - kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder>( - getKpiValue(), - getParentForChildren(), - isClean()); - kpiValue_ = null; - } - return kpiValueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.RawKpi) - } + public static final class AlarmID extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.AlarmID) + AlarmIDOrBuilder { - // @@protoc_insertion_point(class_scope:monitoring.RawKpi) - private static final monitoring.Monitoring.RawKpi DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpi(); - } + private static final long serialVersionUID = 0L; - public static monitoring.Monitoring.RawKpi getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Use AlarmID.newBuilder() to construct. + private AlarmID(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private AlarmID() { + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AlarmID(); + } - @java.lang.Override - public monitoring.Monitoring.RawKpi getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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 interface RawKpiListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.RawKpiList) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmID_descriptor; + } - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmID_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmID.class, monitoring.Monitoring.AlarmID.Builder.class); + } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - java.util.List - getRawKpisList(); - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - monitoring.Monitoring.RawKpi getRawKpis(int index); - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - int getRawKpisCount(); - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - java.util.List - getRawKpisOrBuilderList(); - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder( - int index); - } - /** - *
-   * column
-   * 
- * - * Protobuf type {@code monitoring.RawKpiList} - */ - public static final class RawKpiList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.RawKpiList) - RawKpiListOrBuilder { - private static final long serialVersionUID = 0L; - // Use RawKpiList.newBuilder() to construct. - private RawKpiList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RawKpiList() { - rawKpis_ = java.util.Collections.emptyList(); - } + public static final int ALARM_ID_FIELD_NUMBER = 1; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RawKpiList(); - } + private context.ContextOuterClass.Uuid alarmId_; - @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(); - 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; - } + /** + * .context.Uuid alarm_id = 1; + * @return Whether the alarmId field is set. + */ + @java.lang.Override + public boolean hasAlarmId() { + return alarmId_ != null; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.RawKpiList.class, monitoring.Monitoring.RawKpiList.Builder.class); - } + /** + * .context.Uuid alarm_id = 1; + * @return The alarmId. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getAlarmId() { + return alarmId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; + } - public static final int KPI_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + /** + * .context.Uuid alarm_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder() { + return getAlarmId(); + } - public static final int RAW_KPIS_FIELD_NUMBER = 2; - private java.util.List rawKpis_; - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - @java.lang.Override - public java.util.List getRawKpisList() { - return rawKpis_; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - @java.lang.Override - public java.util.List - getRawKpisOrBuilderList() { - return rawKpis_; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - @java.lang.Override - public int getRawKpisCount() { - return rawKpis_.size(); - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - @java.lang.Override - public monitoring.Monitoring.RawKpi getRawKpis(int index) { - return rawKpis_.get(index); - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - @java.lang.Override - public monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder( - int index) { - return rawKpis_.get(index); - } + private byte memoizedIsInitialized = -1; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (alarmId_ != null) { + output.writeMessage(1, getAlarmId()); + } + unknownFields.writeTo(output); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - for (int i = 0; i < rawKpis_.size(); i++) { - output.writeMessage(2, rawKpis_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (alarmId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - for (int i = 0; i < rawKpis_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, rawKpis_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.AlarmID)) { + return super.equals(obj); + } + monitoring.Monitoring.AlarmID other = (monitoring.Monitoring.AlarmID) obj; + if (hasAlarmId() != other.hasAlarmId()) + return false; + if (hasAlarmId()) { + if (!getAlarmId().equals(other.getAlarmId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.RawKpiList)) { - return super.equals(obj); - } - monitoring.Monitoring.RawKpiList other = (monitoring.Monitoring.RawKpiList) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (!getRawKpisList() - .equals(other.getRawKpisList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAlarmId()) { + hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; + hash = (53 * hash) + getAlarmId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - if (getRawKpisCount() > 0) { - hash = (37 * hash) + RAW_KPIS_FIELD_NUMBER; - hash = (53 * hash) + getRawKpisList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static monitoring.Monitoring.AlarmID parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static monitoring.Monitoring.RawKpiList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpiList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static monitoring.Monitoring.AlarmID parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.RawKpiList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static monitoring.Monitoring.AlarmID parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * column
-     * 
- * - * Protobuf type {@code monitoring.RawKpiList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.RawKpiList) - monitoring.Monitoring.RawKpiListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.RawKpiList.class, monitoring.Monitoring.RawKpiList.Builder.class); - } - - // 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; - kpiIdBuilder_ = null; - } - if (rawKpisBuilder_ == null) { - rawKpis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - rawKpisBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.RawKpiList getDefaultInstanceForType() { - return monitoring.Monitoring.RawKpiList.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.RawKpiList build() { - monitoring.Monitoring.RawKpiList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - if (rawKpisBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - rawKpis_ = java.util.Collections.unmodifiableList(rawKpis_); - bitField0_ = (bitField0_ & ~0x00000001); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.RawKpiList) { - return mergeFrom((monitoring.Monitoring.RawKpiList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.RawKpiList other) { - if (other == monitoring.Monitoring.RawKpiList.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - if (rawKpisBuilder_ == null) { - if (!other.rawKpis_.isEmpty()) { - if (rawKpis_.isEmpty()) { - rawKpis_ = other.rawKpis_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRawKpisIsMutable(); - rawKpis_.addAll(other.rawKpis_); - } - onChanged(); - } - } else { - if (!other.rawKpis_.isEmpty()) { - if (rawKpisBuilder_.isEmpty()) { - rawKpisBuilder_.dispose(); - rawKpisBuilder_ = null; - rawKpis_ = other.rawKpis_; - bitField0_ = (bitField0_ & ~0x00000001); - rawKpisBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRawKpisFieldBuilder() : null; - } else { - rawKpisBuilder_.addAllMessages(other.rawKpis_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.RawKpiList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - - private java.util.List rawKpis_ = - java.util.Collections.emptyList(); - private void ensureRawKpisIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - rawKpis_ = new java.util.ArrayList(rawKpis_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.RawKpi, monitoring.Monitoring.RawKpi.Builder, monitoring.Monitoring.RawKpiOrBuilder> rawKpisBuilder_; - - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public java.util.List getRawKpisList() { - if (rawKpisBuilder_ == null) { - return java.util.Collections.unmodifiableList(rawKpis_); - } else { - return rawKpisBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public int getRawKpisCount() { - if (rawKpisBuilder_ == null) { - return rawKpis_.size(); - } else { - return rawKpisBuilder_.getCount(); - } - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public monitoring.Monitoring.RawKpi getRawKpis(int index) { - if (rawKpisBuilder_ == null) { - return rawKpis_.get(index); - } else { - return rawKpisBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder setRawKpis( - int index, monitoring.Monitoring.RawKpi value) { - if (rawKpisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRawKpisIsMutable(); - rawKpis_.set(index, value); - onChanged(); - } else { - rawKpisBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder setRawKpis( - int index, monitoring.Monitoring.RawKpi.Builder builderForValue) { - if (rawKpisBuilder_ == null) { - ensureRawKpisIsMutable(); - rawKpis_.set(index, builderForValue.build()); - onChanged(); - } else { - rawKpisBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder addRawKpis(monitoring.Monitoring.RawKpi value) { - if (rawKpisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRawKpisIsMutable(); - rawKpis_.add(value); - onChanged(); - } else { - rawKpisBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder addRawKpis( - int index, monitoring.Monitoring.RawKpi value) { - if (rawKpisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRawKpisIsMutable(); - rawKpis_.add(index, value); - onChanged(); - } else { - rawKpisBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder addRawKpis( - monitoring.Monitoring.RawKpi.Builder builderForValue) { - if (rawKpisBuilder_ == null) { - ensureRawKpisIsMutable(); - rawKpis_.add(builderForValue.build()); - onChanged(); - } else { - rawKpisBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder addRawKpis( - int index, monitoring.Monitoring.RawKpi.Builder builderForValue) { - if (rawKpisBuilder_ == null) { - ensureRawKpisIsMutable(); - rawKpis_.add(index, builderForValue.build()); - onChanged(); - } else { - rawKpisBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder addAllRawKpis( - java.lang.Iterable values) { - if (rawKpisBuilder_ == null) { - ensureRawKpisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rawKpis_); - onChanged(); - } else { - rawKpisBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder clearRawKpis() { - if (rawKpisBuilder_ == null) { - rawKpis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - rawKpisBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder removeRawKpis(int index) { - if (rawKpisBuilder_ == null) { - ensureRawKpisIsMutable(); - rawKpis_.remove(index); - onChanged(); - } else { - rawKpisBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public monitoring.Monitoring.RawKpi.Builder getRawKpisBuilder( - int index) { - return getRawKpisFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder( - int index) { - if (rawKpisBuilder_ == null) { - return rawKpis_.get(index); } else { - return rawKpisBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public java.util.List - getRawKpisOrBuilderList() { - if (rawKpisBuilder_ != null) { - return rawKpisBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rawKpis_); - } - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public monitoring.Monitoring.RawKpi.Builder addRawKpisBuilder() { - return getRawKpisFieldBuilder().addBuilder( - monitoring.Monitoring.RawKpi.getDefaultInstance()); - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public monitoring.Monitoring.RawKpi.Builder addRawKpisBuilder( - int index) { - return getRawKpisFieldBuilder().addBuilder( - index, monitoring.Monitoring.RawKpi.getDefaultInstance()); - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public java.util.List - getRawKpisBuilderList() { - return getRawKpisFieldBuilder().getBuilderList(); - } - 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()); - rawKpis_ = null; - } - return rawKpisBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.RawKpiList) - } + public static monitoring.Monitoring.AlarmID parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:monitoring.RawKpiList) - private static final monitoring.Monitoring.RawKpiList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpiList(); - } + public static monitoring.Monitoring.AlarmID parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static monitoring.Monitoring.RawKpiList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static monitoring.Monitoring.AlarmID parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static monitoring.Monitoring.AlarmID parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static monitoring.Monitoring.AlarmID parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public monitoring.Monitoring.RawKpiList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static monitoring.Monitoring.AlarmID parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - } + public static monitoring.Monitoring.AlarmID parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - public interface RawKpiTableOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.RawKpiTable) - com.google.protobuf.MessageOrBuilder { + public static monitoring.Monitoring.AlarmID parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - java.util.List - getRawKpiListsList(); - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - monitoring.Monitoring.RawKpiList getRawKpiLists(int index); - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - int getRawKpiListsCount(); - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - java.util.List - getRawKpiListsOrBuilderList(); - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder( - int index); - } - /** - *
-   * table
-   * 
- * - * Protobuf type {@code monitoring.RawKpiTable} - */ - public static final class RawKpiTable extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.RawKpiTable) - RawKpiTableOrBuilder { - private static final long serialVersionUID = 0L; - // Use RawKpiTable.newBuilder() to construct. - private RawKpiTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RawKpiTable() { - rawKpiLists_ = java.util.Collections.emptyList(); - } + public static monitoring.Monitoring.AlarmID parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RawKpiTable(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @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(); - 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; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.RawKpiTable.class, monitoring.Monitoring.RawKpiTable.Builder.class); - } + public static Builder newBuilder(monitoring.Monitoring.AlarmID prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static final int RAW_KPI_LISTS_FIELD_NUMBER = 1; - private java.util.List rawKpiLists_; - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - @java.lang.Override - public java.util.List getRawKpiListsList() { - return rawKpiLists_; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - @java.lang.Override - public java.util.List - getRawKpiListsOrBuilderList() { - return rawKpiLists_; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - @java.lang.Override - public int getRawKpiListsCount() { - return rawKpiLists_.size(); - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - @java.lang.Override - public monitoring.Monitoring.RawKpiList getRawKpiLists(int index) { - return rawKpiLists_.get(index); - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - @java.lang.Override - public monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder( - int index) { - return rawKpiLists_.get(index); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - memoizedIsInitialized = 1; - return true; - } + /** + * Protobuf type {@code monitoring.AlarmID} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.AlarmID) + monitoring.Monitoring.AlarmIDOrBuilder { - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < rawKpiLists_.size(); i++) { - output.writeMessage(1, rawKpiLists_.get(i)); - } - unknownFields.writeTo(output); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmID_descriptor; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < rawKpiLists_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, rawKpiLists_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmID_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmID.class, monitoring.Monitoring.AlarmID.Builder.class); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.RawKpiTable)) { - return super.equals(obj); - } - monitoring.Monitoring.RawKpiTable other = (monitoring.Monitoring.RawKpiTable) obj; - - if (!getRawKpiListsList() - .equals(other.getRawKpiListsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + // Construct using monitoring.Monitoring.AlarmID.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRawKpiListsCount() > 0) { - hash = (37 * hash) + RAW_KPI_LISTS_FIELD_NUMBER; - hash = (53 * hash) + getRawKpiListsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public static monitoring.Monitoring.RawKpiTable parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiTable parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiTable parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiTable parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpiTable parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.RawKpiTable prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (alarmIdBuilder_ == null) { + alarmId_ = null; + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * table
-     * 
- * - * Protobuf type {@code monitoring.RawKpiTable} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.RawKpiTable) - monitoring.Monitoring.RawKpiTableOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.RawKpiTable.class, monitoring.Monitoring.RawKpiTable.Builder.class); - } - - // 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(); - if (rawKpiListsBuilder_ == null) { - rawKpiLists_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - rawKpiListsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.RawKpiTable getDefaultInstanceForType() { - return monitoring.Monitoring.RawKpiTable.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.RawKpiTable build() { - monitoring.Monitoring.RawKpiTable result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public monitoring.Monitoring.RawKpiTable buildPartial() { - monitoring.Monitoring.RawKpiTable result = new monitoring.Monitoring.RawKpiTable(this); - int from_bitField0_ = bitField0_; - if (rawKpiListsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - rawKpiLists_ = java.util.Collections.unmodifiableList(rawKpiLists_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.rawKpiLists_ = rawKpiLists_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.RawKpiTable) { - return mergeFrom((monitoring.Monitoring.RawKpiTable)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.RawKpiTable other) { - if (other == monitoring.Monitoring.RawKpiTable.getDefaultInstance()) return this; - if (rawKpiListsBuilder_ == null) { - if (!other.rawKpiLists_.isEmpty()) { - if (rawKpiLists_.isEmpty()) { - rawKpiLists_ = other.rawKpiLists_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRawKpiListsIsMutable(); - rawKpiLists_.addAll(other.rawKpiLists_); - } - onChanged(); - } - } else { - if (!other.rawKpiLists_.isEmpty()) { - if (rawKpiListsBuilder_.isEmpty()) { - rawKpiListsBuilder_.dispose(); - rawKpiListsBuilder_ = null; - rawKpiLists_ = other.rawKpiLists_; - bitField0_ = (bitField0_ & ~0x00000001); - rawKpiListsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRawKpiListsFieldBuilder() : null; - } else { - rawKpiListsBuilder_.addAllMessages(other.rawKpiLists_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.RawKpiTable) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List rawKpiLists_ = - java.util.Collections.emptyList(); - private void ensureRawKpiListsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - rawKpiLists_ = new java.util.ArrayList(rawKpiLists_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.RawKpiList, monitoring.Monitoring.RawKpiList.Builder, monitoring.Monitoring.RawKpiListOrBuilder> rawKpiListsBuilder_; - - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public java.util.List getRawKpiListsList() { - if (rawKpiListsBuilder_ == null) { - return java.util.Collections.unmodifiableList(rawKpiLists_); - } else { - return rawKpiListsBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public int getRawKpiListsCount() { - if (rawKpiListsBuilder_ == null) { - return rawKpiLists_.size(); - } else { - return rawKpiListsBuilder_.getCount(); - } - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public monitoring.Monitoring.RawKpiList getRawKpiLists(int index) { - if (rawKpiListsBuilder_ == null) { - return rawKpiLists_.get(index); - } else { - return rawKpiListsBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder setRawKpiLists( - int index, monitoring.Monitoring.RawKpiList value) { - if (rawKpiListsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRawKpiListsIsMutable(); - rawKpiLists_.set(index, value); - onChanged(); - } else { - rawKpiListsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder setRawKpiLists( - int index, monitoring.Monitoring.RawKpiList.Builder builderForValue) { - if (rawKpiListsBuilder_ == null) { - ensureRawKpiListsIsMutable(); - rawKpiLists_.set(index, builderForValue.build()); - onChanged(); - } else { - rawKpiListsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder addRawKpiLists(monitoring.Monitoring.RawKpiList value) { - if (rawKpiListsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRawKpiListsIsMutable(); - rawKpiLists_.add(value); - onChanged(); - } else { - rawKpiListsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder addRawKpiLists( - int index, monitoring.Monitoring.RawKpiList value) { - if (rawKpiListsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRawKpiListsIsMutable(); - rawKpiLists_.add(index, value); - onChanged(); - } else { - rawKpiListsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder addRawKpiLists( - monitoring.Monitoring.RawKpiList.Builder builderForValue) { - if (rawKpiListsBuilder_ == null) { - ensureRawKpiListsIsMutable(); - rawKpiLists_.add(builderForValue.build()); - onChanged(); - } else { - rawKpiListsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder addRawKpiLists( - int index, monitoring.Monitoring.RawKpiList.Builder builderForValue) { - if (rawKpiListsBuilder_ == null) { - ensureRawKpiListsIsMutable(); - rawKpiLists_.add(index, builderForValue.build()); - onChanged(); - } else { - rawKpiListsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder addAllRawKpiLists( - java.lang.Iterable values) { - if (rawKpiListsBuilder_ == null) { - ensureRawKpiListsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rawKpiLists_); - onChanged(); - } else { - rawKpiListsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder clearRawKpiLists() { - if (rawKpiListsBuilder_ == null) { - rawKpiLists_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - rawKpiListsBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder removeRawKpiLists(int index) { - if (rawKpiListsBuilder_ == null) { - ensureRawKpiListsIsMutable(); - rawKpiLists_.remove(index); - onChanged(); - } else { - rawKpiListsBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public monitoring.Monitoring.RawKpiList.Builder getRawKpiListsBuilder( - int index) { - return getRawKpiListsFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder( - int index) { - if (rawKpiListsBuilder_ == null) { - return rawKpiLists_.get(index); } else { - return rawKpiListsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public java.util.List - getRawKpiListsOrBuilderList() { - if (rawKpiListsBuilder_ != null) { - return rawKpiListsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rawKpiLists_); - } - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public monitoring.Monitoring.RawKpiList.Builder addRawKpiListsBuilder() { - return getRawKpiListsFieldBuilder().addBuilder( - monitoring.Monitoring.RawKpiList.getDefaultInstance()); - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public monitoring.Monitoring.RawKpiList.Builder addRawKpiListsBuilder( - int index) { - return getRawKpiListsFieldBuilder().addBuilder( - index, monitoring.Monitoring.RawKpiList.getDefaultInstance()); - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public java.util.List - getRawKpiListsBuilderList() { - return getRawKpiListsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.RawKpiList, monitoring.Monitoring.RawKpiList.Builder, monitoring.Monitoring.RawKpiListOrBuilder> - getRawKpiListsFieldBuilder() { - if (rawKpiListsBuilder_ == null) { - rawKpiListsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.RawKpiList, monitoring.Monitoring.RawKpiList.Builder, monitoring.Monitoring.RawKpiListOrBuilder>( - rawKpiLists_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - rawKpiLists_ = null; - } - return rawKpiListsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.RawKpiTable) - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_AlarmID_descriptor; + } - // @@protoc_insertion_point(class_scope:monitoring.RawKpiTable) - private static final monitoring.Monitoring.RawKpiTable DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpiTable(); - } + @java.lang.Override + public monitoring.Monitoring.AlarmID getDefaultInstanceForType() { + return monitoring.Monitoring.AlarmID.getDefaultInstance(); + } - public static monitoring.Monitoring.RawKpiTable getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public monitoring.Monitoring.AlarmID build() { + monitoring.Monitoring.AlarmID result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @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(); + } + onBuilt(); + return result; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public monitoring.Monitoring.RawKpiTable getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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); + } - public interface KpiIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiId) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - /** - * .context.Uuid kpi_id = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .context.Uuid kpi_id = 1; - * @return The kpiId. - */ - context.ContextOuterClass.Uuid getKpiId(); - /** - * .context.Uuid kpi_id = 1; - */ - context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder(); - } - /** - * Protobuf type {@code monitoring.KpiId} - */ - public static final class KpiId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiId) - KpiIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiId.newBuilder() to construct. - private KpiId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiId() { - } + @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 - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiId(); - } + @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 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; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.AlarmID) { + return mergeFrom((monitoring.Monitoring.AlarmID) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiId.class, monitoring.Monitoring.KpiId.Builder.class); - } + public Builder mergeFrom(monitoring.Monitoring.AlarmID other) { + if (other == monitoring.Monitoring.AlarmID.getDefaultInstance()) + return this; + if (other.hasAlarmId()) { + mergeAlarmId(other.getAlarmId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - public static final int KPI_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid kpiId_; - /** - * .context.Uuid kpi_id = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .context.Uuid kpi_id = 1; - * @return The kpiId. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getKpiId() { - return kpiId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; - } - /** - * .context.Uuid kpi_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.AlarmID) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - memoizedIsInitialized = 1; - return true; - } + private context.ContextOuterClass.Uuid alarmId_; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - unknownFields.writeTo(output); - } + private com.google.protobuf.SingleFieldBuilderV3 alarmIdBuilder_; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Uuid alarm_id = 1; + * @return Whether the alarmId field is set. + */ + public boolean hasAlarmId() { + return alarmIdBuilder_ != null || alarmId_ != null; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiId)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiId other = (monitoring.Monitoring.KpiId) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Uuid alarm_id = 1; + * @return The alarmId. + */ + public context.ContextOuterClass.Uuid getAlarmId() { + if (alarmIdBuilder_ == null) { + return alarmId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; + } else { + return alarmIdBuilder_.getMessage(); + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Uuid alarm_id = 1; + */ + public Builder setAlarmId(context.ContextOuterClass.Uuid value) { + if (alarmIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + alarmId_ = value; + onChanged(); + } else { + alarmIdBuilder_.setMessage(value); + } + return this; + } - public static monitoring.Monitoring.KpiId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Uuid alarm_id = 1; + */ + public Builder setAlarmId(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (alarmIdBuilder_ == null) { + alarmId_ = builderForValue.build(); + onChanged(); + } else { + alarmIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Uuid alarm_id = 1; + */ + public Builder mergeAlarmId(context.ContextOuterClass.Uuid value) { + if (alarmIdBuilder_ == null) { + if (alarmId_ != null) { + alarmId_ = context.ContextOuterClass.Uuid.newBuilder(alarmId_).mergeFrom(value).buildPartial(); + } else { + alarmId_ = value; + } + onChanged(); + } else { + alarmIdBuilder_.mergeFrom(value); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiId) - monitoring.Monitoring.KpiIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiId.class, monitoring.Monitoring.KpiId.Builder.class); - } - - // 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; - kpiIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiId_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiId getDefaultInstanceForType() { - return monitoring.Monitoring.KpiId.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiId build() { - monitoring.Monitoring.KpiId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiId) { - return mergeFrom((monitoring.Monitoring.KpiId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiId other) { - if (other == monitoring.Monitoring.KpiId.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> kpiIdBuilder_; - /** - * .context.Uuid kpi_id = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .context.Uuid kpi_id = 1; - * @return The kpiId. - */ - public context.ContextOuterClass.Uuid getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .context.Uuid kpi_id = 1; - */ - public Builder setKpiId(context.ContextOuterClass.Uuid value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid kpi_id = 1; - */ - public Builder setKpiId( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid kpi_id = 1; - */ - public Builder mergeKpiId(context.ContextOuterClass.Uuid value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - context.ContextOuterClass.Uuid.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid kpi_id = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid kpi_id = 1; - */ - public context.ContextOuterClass.Uuid.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .context.Uuid kpi_id = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; - } - } - /** - * .context.Uuid kpi_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiId) - } + /** + * .context.Uuid alarm_id = 1; + */ + public Builder clearAlarmId() { + if (alarmIdBuilder_ == null) { + alarmId_ = null; + onChanged(); + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + return this; + } - // @@protoc_insertion_point(class_scope:monitoring.KpiId) - private static final monitoring.Monitoring.KpiId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiId(); - } + /** + * .context.Uuid alarm_id = 1; + */ + public context.ContextOuterClass.Uuid.Builder getAlarmIdBuilder() { + onChanged(); + return getAlarmIdFieldBuilder().getBuilder(); + } - public static monitoring.Monitoring.KpiId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid alarm_id = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder() { + if (alarmIdBuilder_ != null) { + return alarmIdBuilder_.getMessageOrBuilder(); + } else { + return alarmId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Uuid alarm_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getAlarmIdFieldBuilder() { + if (alarmIdBuilder_ == null) { + alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getAlarmId(), getParentForChildren(), isClean()); + alarmId_ = null; + } + return alarmIdBuilder_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public monitoring.Monitoring.KpiId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.AlarmID) + } - } + // @@protoc_insertion_point(class_scope:monitoring.AlarmID) + private static final monitoring.Monitoring.AlarmID DEFAULT_INSTANCE; - public interface KpiOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.Kpi) - com.google.protobuf.MessageOrBuilder { + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmID(); + } - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + public static monitoring.Monitoring.AlarmID getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * .context.Timestamp timestamp = 2; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 2; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 2; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - /** - * .monitoring.KpiValue kpi_value = 3; - * @return Whether the kpiValue field is set. - */ - boolean hasKpiValue(); - /** - * .monitoring.KpiValue kpi_value = 3; - * @return The kpiValue. - */ - monitoring.Monitoring.KpiValue getKpiValue(); - /** - * .monitoring.KpiValue kpi_value = 3; - */ - monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); - } - /** - * Protobuf type {@code monitoring.Kpi} - */ - public static final class Kpi extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.Kpi) - KpiOrBuilder { - private static final long serialVersionUID = 0L; - // Use Kpi.newBuilder() to construct. - private Kpi(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Kpi() { - } + @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); + } + }; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Kpi(); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @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; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_Kpi_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.Kpi.class, monitoring.Monitoring.Kpi.Builder.class); + @java.lang.Override + public monitoring.Monitoring.AlarmID getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static final int KPI_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + public interface AlarmSubscriptionOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.AlarmSubscription) + com.google.protobuf.MessageOrBuilder { - public static final int TIMESTAMP_FIELD_NUMBER = 2; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 2; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 2; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .context.Timestamp timestamp = 2; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + boolean hasAlarmId(); - public static final int KPI_VALUE_FIELD_NUMBER = 3; - private monitoring.Monitoring.KpiValue kpiValue_; - /** - * .monitoring.KpiValue kpi_value = 3; - * @return Whether the kpiValue field is set. - */ - @java.lang.Override - public boolean hasKpiValue() { - return kpiValue_ != null; - } - /** - * .monitoring.KpiValue kpi_value = 3; - * @return The kpiValue. - */ - @java.lang.Override - public monitoring.Monitoring.KpiValue getKpiValue() { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - return getKpiValue(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + monitoring.Monitoring.AlarmID getAlarmId(); - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .monitoring.AlarmID alarm_id = 1; + */ + monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); - memoizedIsInitialized = 1; - return true; - } + /** + * float subscription_timeout_s = 2; + * @return The subscriptionTimeoutS. + */ + float getSubscriptionTimeoutS(); - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - if (timestamp_ != null) { - output.writeMessage(2, getTimestamp()); - } - if (kpiValue_ != null) { - output.writeMessage(3, getKpiValue()); - } - unknownFields.writeTo(output); + /** + * float subscription_frequency_ms = 3; + * @return The subscriptionFrequencyMs. + */ + float getSubscriptionFrequencyMs(); } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getTimestamp()); - } - if (kpiValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getKpiValue()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * Protobuf type {@code monitoring.AlarmSubscription} + */ + public static final class AlarmSubscription extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.AlarmSubscription) + AlarmSubscriptionOrBuilder { - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.Kpi)) { - return super.equals(obj); - } - monitoring.Monitoring.Kpi other = (monitoring.Monitoring.Kpi) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (hasKpiValue() != other.hasKpiValue()) return false; - if (hasKpiValue()) { - if (!getKpiValue() - .equals(other.getKpiValue())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final long serialVersionUID = 0L; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - if (hasKpiValue()) { - hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getKpiValue().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + // Use AlarmSubscription.newBuilder() to construct. + private AlarmSubscription(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - public static monitoring.Monitoring.Kpi parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.Kpi parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.Kpi parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.Kpi parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.Kpi parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.Kpi parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.Kpi parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.Kpi parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.Kpi parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.Kpi parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.Kpi parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.Kpi parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private AlarmSubscription() { + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.Kpi prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AlarmSubscription(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.Kpi} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.Kpi) - monitoring.Monitoring.KpiOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_Kpi_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_Kpi_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.Kpi.class, monitoring.Monitoring.Kpi.Builder.class); - } - - // 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; - kpiIdBuilder_ = null; - } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_Kpi_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.Kpi getDefaultInstanceForType() { - return monitoring.Monitoring.Kpi.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.Kpi build() { - monitoring.Monitoring.Kpi result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.Kpi) { - return mergeFrom((monitoring.Monitoring.Kpi)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.Kpi other) { - if (other == monitoring.Monitoring.Kpi.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - if (other.hasKpiValue()) { - mergeKpiValue(other.getKpiValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.Kpi) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.KpiId kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; - /** - * .context.Timestamp timestamp = 2; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 2; - * @return The timestamp. - */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - * .context.Timestamp timestamp = 2; - */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 2; - */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Timestamp timestamp = 2; - */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 2; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - * .context.Timestamp timestamp = 2; - */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .context.Timestamp timestamp = 2; - */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - * .context.Timestamp timestamp = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - - private monitoring.Monitoring.KpiValue kpiValue_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiValueBuilder_; - /** - * .monitoring.KpiValue kpi_value = 3; - * @return Whether the kpiValue field is set. - */ - public boolean hasKpiValue() { - return kpiValueBuilder_ != null || kpiValue_ != null; - } - /** - * .monitoring.KpiValue kpi_value = 3; - * @return The kpiValue. - */ - public monitoring.Monitoring.KpiValue getKpiValue() { - if (kpiValueBuilder_ == null) { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } else { - return kpiValueBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiValue_ = value; - onChanged(); - } else { - kpiValueBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public Builder setKpiValue( - monitoring.Monitoring.KpiValue.Builder builderForValue) { - if (kpiValueBuilder_ == null) { - kpiValue_ = builderForValue.build(); - onChanged(); - } else { - kpiValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (kpiValue_ != null) { - kpiValue_ = - monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); - } else { - kpiValue_ = value; - } - onChanged(); - } else { - kpiValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public Builder clearKpiValue() { - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - onChanged(); - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { - - onChanged(); - return getKpiValueFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - if (kpiValueBuilder_ != null) { - return kpiValueBuilder_.getMessageOrBuilder(); - } else { - return kpiValue_ == null ? - monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> - getKpiValueFieldBuilder() { - if (kpiValueBuilder_ == null) { - kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder>( - getKpiValue(), - getParentForChildren(), - isClean()); - kpiValue_ = null; - } - return kpiValueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.Kpi) - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - // @@protoc_insertion_point(class_scope:monitoring.Kpi) - private static final monitoring.Monitoring.Kpi DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.Kpi(); - } + 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 monitoring.Monitoring.Kpi getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_descriptor; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmSubscription.class, monitoring.Monitoring.AlarmSubscription.Builder.class); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static final int ALARM_ID_FIELD_NUMBER = 1; - @java.lang.Override - public monitoring.Monitoring.Kpi getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private monitoring.Monitoring.AlarmID alarmId_; - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + @java.lang.Override + public boolean hasAlarmId() { + return alarmId_ != null; + } - public interface KpiValueRangeOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiValueRange) - com.google.protobuf.MessageOrBuilder { + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + @java.lang.Override + public monitoring.Monitoring.AlarmID getAlarmId() { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } - /** - * .monitoring.KpiValue kpiMinValue = 1; - * @return Whether the kpiMinValue field is set. - */ - boolean hasKpiMinValue(); - /** - * .monitoring.KpiValue kpiMinValue = 1; - * @return The kpiMinValue. - */ - monitoring.Monitoring.KpiValue getKpiMinValue(); - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder(); + /** + * .monitoring.AlarmID alarm_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + return getAlarmId(); + } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - * @return Whether the kpiMaxValue field is set. - */ - boolean hasKpiMaxValue(); - /** - * .monitoring.KpiValue kpiMaxValue = 2; - * @return The kpiMaxValue. - */ - monitoring.Monitoring.KpiValue getKpiMaxValue(); - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder(); + public static final int SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER = 2; - /** - *
-     * by default True
-     * 
- * - * bool inRange = 3; - * @return The inRange. - */ - boolean getInRange(); + private float subscriptionTimeoutS_; - /** - *
-     * False is outside the interval
-     * 
- * - * bool includeMinValue = 4; - * @return The includeMinValue. - */ - boolean getIncludeMinValue(); + /** + * float subscription_timeout_s = 2; + * @return The subscriptionTimeoutS. + */ + @java.lang.Override + public float getSubscriptionTimeoutS() { + return subscriptionTimeoutS_; + } - /** - *
-     * False is outside the interval
-     * 
- * - * bool includeMaxValue = 5; - * @return The includeMaxValue. - */ - boolean getIncludeMaxValue(); - } - /** - * Protobuf type {@code monitoring.KpiValueRange} - */ - public static final class KpiValueRange extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiValueRange) - KpiValueRangeOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiValueRange.newBuilder() to construct. - private KpiValueRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiValueRange() { - } + public static final int SUBSCRIPTION_FREQUENCY_MS_FIELD_NUMBER = 3; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiValueRange(); - } + private float subscriptionFrequencyMs_; - @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; - } + /** + * float subscription_frequency_ms = 3; + * @return The subscriptionFrequencyMs. + */ + @java.lang.Override + public float getSubscriptionFrequencyMs() { + return subscriptionFrequencyMs_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiValueRange.class, monitoring.Monitoring.KpiValueRange.Builder.class); - } + private byte memoizedIsInitialized = -1; - public static final int KPIMINVALUE_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiValue kpiMinValue_; - /** - * .monitoring.KpiValue kpiMinValue = 1; - * @return Whether the kpiMinValue field is set. - */ - @java.lang.Override - public boolean hasKpiMinValue() { - return kpiMinValue_ != null; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - * @return The kpiMinValue. - */ - @java.lang.Override - public monitoring.Monitoring.KpiValue getKpiMinValue() { - return kpiMinValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder() { - return getKpiMinValue(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - public static final int KPIMAXVALUE_FIELD_NUMBER = 2; - private monitoring.Monitoring.KpiValue kpiMaxValue_; - /** - * .monitoring.KpiValue kpiMaxValue = 2; - * @return Whether the kpiMaxValue field is set. - */ - @java.lang.Override - public boolean hasKpiMaxValue() { - return kpiMaxValue_ != null; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - * @return The kpiMaxValue. - */ - @java.lang.Override - public monitoring.Monitoring.KpiValue getKpiMaxValue() { - return kpiMaxValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder() { - return getKpiMaxValue(); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (alarmId_ != null) { + output.writeMessage(1, getAlarmId()); + } + if (subscriptionTimeoutS_ != 0F) { + output.writeFloat(2, subscriptionTimeoutS_); + } + if (subscriptionFrequencyMs_ != 0F) { + output.writeFloat(3, subscriptionFrequencyMs_); + } + unknownFields.writeTo(output); + } - public static final int INRANGE_FIELD_NUMBER = 3; - private boolean inRange_; - /** - *
-     * by default True
-     * 
- * - * bool inRange = 3; - * @return The inRange. - */ - @java.lang.Override - public boolean getInRange() { - return inRange_; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (alarmId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId()); + } + if (subscriptionTimeoutS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, subscriptionTimeoutS_); + } + if (subscriptionFrequencyMs_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, subscriptionFrequencyMs_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static final int INCLUDEMINVALUE_FIELD_NUMBER = 4; - private boolean includeMinValue_; - /** - *
-     * False is outside the interval
-     * 
- * - * bool includeMinValue = 4; - * @return The includeMinValue. - */ - @java.lang.Override - public boolean getIncludeMinValue() { - return includeMinValue_; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.AlarmSubscription)) { + return super.equals(obj); + } + monitoring.Monitoring.AlarmSubscription other = (monitoring.Monitoring.AlarmSubscription) obj; + if (hasAlarmId() != other.hasAlarmId()) + return false; + if (hasAlarmId()) { + if (!getAlarmId().equals(other.getAlarmId())) + return false; + } + if (java.lang.Float.floatToIntBits(getSubscriptionTimeoutS()) != java.lang.Float.floatToIntBits(other.getSubscriptionTimeoutS())) + return false; + if (java.lang.Float.floatToIntBits(getSubscriptionFrequencyMs()) != java.lang.Float.floatToIntBits(other.getSubscriptionFrequencyMs())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAlarmId()) { + hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; + hash = (53 * hash) + getAlarmId().hashCode(); + } + hash = (37 * hash) + SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } - public static final int INCLUDEMAXVALUE_FIELD_NUMBER = 5; - private boolean includeMaxValue_; - /** - *
-     * False is outside the interval
-     * 
- * - * bool includeMaxValue = 5; - * @return The includeMaxValue. - */ - @java.lang.Override - public boolean getIncludeMaxValue() { - return includeMaxValue_; - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static monitoring.Monitoring.AlarmSubscription parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiMinValue_ != null) { - output.writeMessage(1, getKpiMinValue()); - } - if (kpiMaxValue_ != null) { - output.writeMessage(2, getKpiMaxValue()); - } - if (inRange_ != false) { - output.writeBool(3, inRange_); - } - if (includeMinValue_ != false) { - output.writeBool(4, includeMinValue_); - } - if (includeMaxValue_ != false) { - output.writeBool(5, includeMaxValue_); - } - unknownFields.writeTo(output); - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiMinValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiMinValue()); - } - if (kpiMaxValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getKpiMaxValue()); - } - if (inRange_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, inRange_); - } - if (includeMinValue_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, includeMinValue_); - } - if (includeMaxValue_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, includeMaxValue_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiValueRange)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiValueRange other = (monitoring.Monitoring.KpiValueRange) obj; - - if (hasKpiMinValue() != other.hasKpiMinValue()) return false; - if (hasKpiMinValue()) { - if (!getKpiMinValue() - .equals(other.getKpiMinValue())) return false; - } - if (hasKpiMaxValue() != other.hasKpiMaxValue()) return false; - if (hasKpiMaxValue()) { - if (!getKpiMaxValue() - .equals(other.getKpiMaxValue())) return false; - } - if (getInRange() - != other.getInRange()) return false; - if (getIncludeMinValue() - != other.getIncludeMinValue()) return false; - if (getIncludeMaxValue() - != other.getIncludeMaxValue()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiMinValue()) { - hash = (37 * hash) + KPIMINVALUE_FIELD_NUMBER; - hash = (53 * hash) + getKpiMinValue().hashCode(); - } - if (hasKpiMaxValue()) { - hash = (37 * hash) + KPIMAXVALUE_FIELD_NUMBER; - hash = (53 * hash) + getKpiMaxValue().hashCode(); - } - hash = (37 * hash) + INRANGE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getInRange()); - hash = (37 * hash) + INCLUDEMINVALUE_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static monitoring.Monitoring.KpiValueRange parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiValueRange parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiValueRange parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiValueRange parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiValueRange parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiValueRange prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static monitoring.Monitoring.AlarmSubscription parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiValueRange} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiValueRange) - monitoring.Monitoring.KpiValueRangeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiValueRange.class, monitoring.Monitoring.KpiValueRange.Builder.class); - } - - // 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; - kpiMinValueBuilder_ = null; - } - if (kpiMaxValueBuilder_ == null) { - kpiMaxValue_ = null; - } else { - kpiMaxValue_ = null; - kpiMaxValueBuilder_ = null; - } - inRange_ = false; - - includeMinValue_ = false; - - includeMaxValue_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiValueRange getDefaultInstanceForType() { - return monitoring.Monitoring.KpiValueRange.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiValueRange build() { - monitoring.Monitoring.KpiValueRange result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiValueRange) { - return mergeFrom((monitoring.Monitoring.KpiValueRange)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiValueRange other) { - if (other == monitoring.Monitoring.KpiValueRange.getDefaultInstance()) return this; - if (other.hasKpiMinValue()) { - mergeKpiMinValue(other.getKpiMinValue()); - } - if (other.hasKpiMaxValue()) { - mergeKpiMaxValue(other.getKpiMaxValue()); - } - if (other.getInRange() != false) { - setInRange(other.getInRange()); - } - if (other.getIncludeMinValue() != false) { - setIncludeMinValue(other.getIncludeMinValue()); - } - if (other.getIncludeMaxValue() != false) { - setIncludeMaxValue(other.getIncludeMaxValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiValueRange) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.KpiValue kpiMinValue_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiMinValueBuilder_; - /** - * .monitoring.KpiValue kpiMinValue = 1; - * @return Whether the kpiMinValue field is set. - */ - public boolean hasKpiMinValue() { - return kpiMinValueBuilder_ != null || kpiMinValue_ != null; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - * @return The kpiMinValue. - */ - public monitoring.Monitoring.KpiValue getKpiMinValue() { - if (kpiMinValueBuilder_ == null) { - return kpiMinValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; - } else { - return kpiMinValueBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - public Builder setKpiMinValue(monitoring.Monitoring.KpiValue value) { - if (kpiMinValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiMinValue_ = value; - onChanged(); - } else { - kpiMinValueBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - public Builder setKpiMinValue( - monitoring.Monitoring.KpiValue.Builder builderForValue) { - if (kpiMinValueBuilder_ == null) { - kpiMinValue_ = builderForValue.build(); - onChanged(); - } else { - kpiMinValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - public Builder mergeKpiMinValue(monitoring.Monitoring.KpiValue value) { - if (kpiMinValueBuilder_ == null) { - if (kpiMinValue_ != null) { - kpiMinValue_ = - monitoring.Monitoring.KpiValue.newBuilder(kpiMinValue_).mergeFrom(value).buildPartial(); - } else { - kpiMinValue_ = value; - } - onChanged(); - } else { - kpiMinValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - public Builder clearKpiMinValue() { - if (kpiMinValueBuilder_ == null) { - kpiMinValue_ = null; - onChanged(); - } else { - kpiMinValue_ = null; - kpiMinValueBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - public monitoring.Monitoring.KpiValue.Builder getKpiMinValueBuilder() { - - onChanged(); - return getKpiMinValueFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - public monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder() { - if (kpiMinValueBuilder_ != null) { - return kpiMinValueBuilder_.getMessageOrBuilder(); - } else { - return kpiMinValue_ == null ? - monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; - } - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> - getKpiMinValueFieldBuilder() { - if (kpiMinValueBuilder_ == null) { - kpiMinValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder>( - getKpiMinValue(), - getParentForChildren(), - isClean()); - kpiMinValue_ = null; - } - return kpiMinValueBuilder_; - } - - private monitoring.Monitoring.KpiValue kpiMaxValue_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiMaxValueBuilder_; - /** - * .monitoring.KpiValue kpiMaxValue = 2; - * @return Whether the kpiMaxValue field is set. - */ - public boolean hasKpiMaxValue() { - return kpiMaxValueBuilder_ != null || kpiMaxValue_ != null; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - * @return The kpiMaxValue. - */ - public monitoring.Monitoring.KpiValue getKpiMaxValue() { - if (kpiMaxValueBuilder_ == null) { - return kpiMaxValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; - } else { - return kpiMaxValueBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - public Builder setKpiMaxValue(monitoring.Monitoring.KpiValue value) { - if (kpiMaxValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiMaxValue_ = value; - onChanged(); - } else { - kpiMaxValueBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - public Builder setKpiMaxValue( - monitoring.Monitoring.KpiValue.Builder builderForValue) { - if (kpiMaxValueBuilder_ == null) { - kpiMaxValue_ = builderForValue.build(); - onChanged(); - } else { - kpiMaxValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - public Builder mergeKpiMaxValue(monitoring.Monitoring.KpiValue value) { - if (kpiMaxValueBuilder_ == null) { - if (kpiMaxValue_ != null) { - kpiMaxValue_ = - monitoring.Monitoring.KpiValue.newBuilder(kpiMaxValue_).mergeFrom(value).buildPartial(); - } else { - kpiMaxValue_ = value; - } - onChanged(); - } else { - kpiMaxValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - public Builder clearKpiMaxValue() { - if (kpiMaxValueBuilder_ == null) { - kpiMaxValue_ = null; - onChanged(); - } else { - kpiMaxValue_ = null; - kpiMaxValueBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - public monitoring.Monitoring.KpiValue.Builder getKpiMaxValueBuilder() { - - onChanged(); - return getKpiMaxValueFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - public monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder() { - if (kpiMaxValueBuilder_ != null) { - return kpiMaxValueBuilder_.getMessageOrBuilder(); - } else { - return kpiMaxValue_ == null ? - monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; - } - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> - getKpiMaxValueFieldBuilder() { - if (kpiMaxValueBuilder_ == null) { - kpiMaxValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder>( - getKpiMaxValue(), - getParentForChildren(), - isClean()); - kpiMaxValue_ = null; - } - return kpiMaxValueBuilder_; - } - - private boolean inRange_ ; - /** - *
-       * by default True
-       * 
- * - * bool inRange = 3; - * @return The inRange. - */ - @java.lang.Override - public boolean getInRange() { - return inRange_; - } - /** - *
-       * by default True
-       * 
- * - * bool inRange = 3; - * @param value The inRange to set. - * @return This builder for chaining. - */ - public Builder setInRange(boolean value) { - - inRange_ = value; - onChanged(); - return this; - } - /** - *
-       * by default True
-       * 
- * - * bool inRange = 3; - * @return This builder for chaining. - */ - public Builder clearInRange() { - - inRange_ = false; - onChanged(); - return this; - } - - private boolean includeMinValue_ ; - /** - *
-       * False is outside the interval
-       * 
- * - * bool includeMinValue = 4; - * @return The includeMinValue. - */ - @java.lang.Override - public boolean getIncludeMinValue() { - return includeMinValue_; - } - /** - *
-       * False is outside the interval
-       * 
- * - * bool includeMinValue = 4; - * @param value The includeMinValue to set. - * @return This builder for chaining. - */ - public Builder setIncludeMinValue(boolean value) { - - includeMinValue_ = value; - onChanged(); - return this; - } - /** - *
-       * False is outside the interval
-       * 
- * - * bool includeMinValue = 4; - * @return This builder for chaining. - */ - public Builder clearIncludeMinValue() { - - includeMinValue_ = false; - onChanged(); - return this; - } - - private boolean includeMaxValue_ ; - /** - *
-       * False is outside the interval
-       * 
- * - * bool includeMaxValue = 5; - * @return The includeMaxValue. - */ - @java.lang.Override - public boolean getIncludeMaxValue() { - return includeMaxValue_; - } - /** - *
-       * False is outside the interval
-       * 
- * - * bool includeMaxValue = 5; - * @param value The includeMaxValue to set. - * @return This builder for chaining. - */ - public Builder setIncludeMaxValue(boolean value) { - - includeMaxValue_ = value; - onChanged(); - return this; - } - /** - *
-       * False is outside the interval
-       * 
- * - * bool includeMaxValue = 5; - * @return This builder for chaining. - */ - public Builder clearIncludeMaxValue() { - - includeMaxValue_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiValueRange) - } + public static monitoring.Monitoring.AlarmSubscription parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:monitoring.KpiValueRange) - private static final monitoring.Monitoring.KpiValueRange DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiValueRange(); - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static monitoring.Monitoring.KpiValueRange getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public monitoring.Monitoring.KpiValueRange getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static Builder newBuilder(monitoring.Monitoring.AlarmSubscription prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public interface KpiValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiValue) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * int32 int32Val = 1; - * @return Whether the int32Val field is set. - */ - boolean hasInt32Val(); - /** - * int32 int32Val = 1; - * @return The int32Val. - */ - int getInt32Val(); + /** + * Protobuf type {@code monitoring.AlarmSubscription} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.AlarmSubscription) + monitoring.Monitoring.AlarmSubscriptionOrBuilder { - /** - * uint32 uint32Val = 2; - * @return Whether the uint32Val field is set. - */ - boolean hasUint32Val(); - /** - * uint32 uint32Val = 2; - * @return The uint32Val. - */ - int getUint32Val(); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_descriptor; + } - /** - * int64 int64Val = 3; - * @return Whether the int64Val field is set. - */ - boolean hasInt64Val(); - /** - * int64 int64Val = 3; - * @return The int64Val. - */ - long getInt64Val(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmSubscription.class, monitoring.Monitoring.AlarmSubscription.Builder.class); + } - /** - * uint64 uint64Val = 4; - * @return Whether the uint64Val field is set. - */ - boolean hasUint64Val(); - /** - * uint64 uint64Val = 4; - * @return The uint64Val. - */ - long getUint64Val(); + // Construct using monitoring.Monitoring.AlarmSubscription.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - /** - * float floatVal = 5; - * @return Whether the floatVal field is set. - */ - boolean hasFloatVal(); - /** - * float floatVal = 5; - * @return The floatVal. - */ - float getFloatVal(); + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - /** - * string stringVal = 6; - * @return Whether the stringVal field is set. - */ - boolean hasStringVal(); - /** - * string stringVal = 6; - * @return The stringVal. - */ - java.lang.String getStringVal(); - /** - * string stringVal = 6; - * @return The bytes for stringVal. - */ - com.google.protobuf.ByteString - getStringValBytes(); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - /** - * bool boolVal = 7; - * @return Whether the boolVal field is set. - */ - boolean hasBoolVal(); - /** - * bool boolVal = 7; - * @return The boolVal. - */ - boolean getBoolVal(); - - public monitoring.Monitoring.KpiValue.ValueCase getValueCase(); - } - /** - * Protobuf type {@code monitoring.KpiValue} - */ - public static final class KpiValue extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiValue) - KpiValueOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiValue.newBuilder() to construct. - private KpiValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiValue() { - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (alarmIdBuilder_ == null) { + alarmId_ = null; + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + subscriptionTimeoutS_ = 0F; + subscriptionFrequencyMs_ = 0F; + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiValue(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_descriptor; + } - @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; - } + @java.lang.Override + public monitoring.Monitoring.AlarmSubscription getDefaultInstanceForType() { + return monitoring.Monitoring.AlarmSubscription.getDefaultInstance(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiValue.class, monitoring.Monitoring.KpiValue.Builder.class); - } + @java.lang.Override + public monitoring.Monitoring.AlarmSubscription build() { + monitoring.Monitoring.AlarmSubscription result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private int valueCase_ = 0; - private java.lang.Object value_; - public enum ValueCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - INT32VAL(1), - UINT32VAL(2), - INT64VAL(3), - UINT64VAL(4), - FLOATVAL(5), - STRINGVAL(6), - BOOLVAL(7), - VALUE_NOT_SET(0); - private final int value; - private ValueCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValueCase valueOf(int value) { - return forNumber(value); - } - - public static ValueCase forNumber(int value) { - switch (value) { - case 1: return INT32VAL; - case 2: return UINT32VAL; - case 3: return INT64VAL; - case 4: return UINT64VAL; - case 5: return FLOATVAL; - case 6: return STRINGVAL; - case 7: return BOOLVAL; - case 0: return VALUE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ValueCase - getValueCase() { - return ValueCase.forNumber( - valueCase_); - } + @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(); + } + result.subscriptionTimeoutS_ = subscriptionTimeoutS_; + result.subscriptionFrequencyMs_ = subscriptionFrequencyMs_; + onBuilt(); + return result; + } - public static final int INT32VAL_FIELD_NUMBER = 1; - /** - * int32 int32Val = 1; - * @return Whether the int32Val field is set. - */ - @java.lang.Override - public boolean hasInt32Val() { - return valueCase_ == 1; - } - /** - * int32 int32Val = 1; - * @return The int32Val. - */ - @java.lang.Override - public int getInt32Val() { - if (valueCase_ == 1) { - return (java.lang.Integer) value_; - } - return 0; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public static final int UINT32VAL_FIELD_NUMBER = 2; - /** - * uint32 uint32Val = 2; - * @return Whether the uint32Val field is set. - */ - @java.lang.Override - public boolean hasUint32Val() { - return valueCase_ == 2; - } - /** - * uint32 uint32Val = 2; - * @return The uint32Val. - */ - @java.lang.Override - public int getUint32Val() { - if (valueCase_ == 2) { - return (java.lang.Integer) value_; - } - return 0; - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static final int INT64VAL_FIELD_NUMBER = 3; - /** - * int64 int64Val = 3; - * @return Whether the int64Val field is set. - */ - @java.lang.Override - public boolean hasInt64Val() { - return valueCase_ == 3; - } - /** - * int64 int64Val = 3; - * @return The int64Val. - */ - @java.lang.Override - public long getInt64Val() { - if (valueCase_ == 3) { - return (java.lang.Long) value_; - } - return 0L; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static final int UINT64VAL_FIELD_NUMBER = 4; - /** - * uint64 uint64Val = 4; - * @return Whether the uint64Val field is set. - */ - @java.lang.Override - public boolean hasUint64Val() { - return valueCase_ == 4; - } - /** - * uint64 uint64Val = 4; - * @return The uint64Val. - */ - @java.lang.Override - public long getUint64Val() { - if (valueCase_ == 4) { - return (java.lang.Long) value_; - } - return 0L; - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - public static final int FLOATVAL_FIELD_NUMBER = 5; - /** - * float floatVal = 5; - * @return Whether the floatVal field is set. - */ - @java.lang.Override - public boolean hasFloatVal() { - return valueCase_ == 5; - } - /** - * float floatVal = 5; - * @return The floatVal. - */ - @java.lang.Override - public float getFloatVal() { - if (valueCase_ == 5) { - return (java.lang.Float) value_; - } - return 0F; - } + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - public static final int STRINGVAL_FIELD_NUMBER = 6; - /** - * string stringVal = 6; - * @return Whether the stringVal field is set. - */ - public boolean hasStringVal() { - return valueCase_ == 6; - } - /** - * string stringVal = 6; - * @return The stringVal. - */ - public java.lang.String getStringVal() { - java.lang.Object ref = ""; - if (valueCase_ == 6) { - ref = value_; - } - 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(); - if (valueCase_ == 6) { - value_ = s; - } - return s; - } - } - /** - * string stringVal = 6; - * @return The bytes for stringVal. - */ - public com.google.protobuf.ByteString - getStringValBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 6) { - ref = value_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valueCase_ == 6) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - public static final int BOOLVAL_FIELD_NUMBER = 7; - /** - * bool boolVal = 7; - * @return Whether the boolVal field is set. - */ - @java.lang.Override - public boolean hasBoolVal() { - return valueCase_ == 7; - } - /** - * bool boolVal = 7; - * @return The boolVal. - */ - @java.lang.Override - public boolean getBoolVal() { - if (valueCase_ == 7) { - return (java.lang.Boolean) value_; - } - return false; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.AlarmSubscription) { + return mergeFrom((monitoring.Monitoring.AlarmSubscription) other); + } else { + super.mergeFrom(other); + return this; + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public Builder mergeFrom(monitoring.Monitoring.AlarmSubscription other) { + if (other == monitoring.Monitoring.AlarmSubscription.getDefaultInstance()) + return this; + if (other.hasAlarmId()) { + mergeAlarmId(other.getAlarmId()); + } + if (other.getSubscriptionTimeoutS() != 0F) { + setSubscriptionTimeoutS(other.getSubscriptionTimeoutS()); + } + if (other.getSubscriptionFrequencyMs() != 0F) { + setSubscriptionFrequencyMs(other.getSubscriptionFrequencyMs()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (valueCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) value_)); - } - if (valueCase_ == 2) { - output.writeUInt32( - 2, (int)((java.lang.Integer) value_)); - } - if (valueCase_ == 3) { - output.writeInt64( - 3, (long)((java.lang.Long) value_)); - } - if (valueCase_ == 4) { - output.writeUInt64( - 4, (long)((java.lang.Long) value_)); - } - if (valueCase_ == 5) { - output.writeFloat( - 5, (float)((java.lang.Float) value_)); - } - if (valueCase_ == 6) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, value_); - } - if (valueCase_ == 7) { - output.writeBool( - 7, (boolean)((java.lang.Boolean) value_)); - } - unknownFields.writeTo(output); - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.AlarmSubscription) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (valueCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) value_)); - } - if (valueCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size( - 2, (int)((java.lang.Integer) value_)); - } - if (valueCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size( - 3, (long)((java.lang.Long) value_)); - } - if (valueCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size( - 4, (long)((java.lang.Long) value_)); - } - if (valueCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize( - 5, (float)((java.lang.Float) value_)); - } - if (valueCase_ == 6) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, value_); - } - if (valueCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 7, (boolean)((java.lang.Boolean) value_)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private monitoring.Monitoring.AlarmID alarmId_; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiValue)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiValue other = (monitoring.Monitoring.KpiValue) obj; - - if (!getValueCase().equals(other.getValueCase())) return false; - switch (valueCase_) { - case 1: - if (getInt32Val() - != other.getInt32Val()) return false; - break; - case 2: - if (getUint32Val() - != other.getUint32Val()) return false; - break; - case 3: - if (getInt64Val() - != other.getInt64Val()) return false; - break; - case 4: - if (getUint64Val() - != other.getUint64Val()) return false; - break; - case 5: - if (java.lang.Float.floatToIntBits(getFloatVal()) - != java.lang.Float.floatToIntBits( - other.getFloatVal())) return false; - break; - case 6: - if (!getStringVal() - .equals(other.getStringVal())) return false; - break; - case 7: - if (getBoolVal() - != other.getBoolVal()) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private com.google.protobuf.SingleFieldBuilderV3 alarmIdBuilder_; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (valueCase_) { - case 1: - hash = (37 * hash) + INT32VAL_FIELD_NUMBER; - hash = (53 * hash) + getInt32Val(); - break; - case 2: - hash = (37 * hash) + UINT32VAL_FIELD_NUMBER; - hash = (53 * hash) + getUint32Val(); - break; - case 3: - hash = (37 * hash) + INT64VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getInt64Val()); - break; - case 4: - hash = (37 * hash) + UINT64VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getUint64Val()); - break; - case 5: - hash = (37 * hash) + FLOATVAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getFloatVal()); - break; - case 6: - hash = (37 * hash) + STRINGVAL_FIELD_NUMBER; - hash = (53 * hash) + getStringVal().hashCode(); - break; - case 7: - hash = (37 * hash) + BOOLVAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getBoolVal()); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + public boolean hasAlarmId() { + return alarmIdBuilder_ != null || alarmId_ != null; + } - public static monitoring.Monitoring.KpiValue parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiValue parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiValue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiValue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + public monitoring.Monitoring.AlarmID getAlarmId() { + if (alarmIdBuilder_ == null) { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } else { + return alarmIdBuilder_.getMessage(); + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiValue prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + alarmId_ = value; + onChanged(); + } else { + alarmIdBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiValue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiValue) - monitoring.Monitoring.KpiValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiValue.class, monitoring.Monitoring.KpiValue.Builder.class); - } - - // 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(); - valueCase_ = 0; - value_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiValue_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiValue getDefaultInstanceForType() { - return monitoring.Monitoring.KpiValue.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiValue build() { - monitoring.Monitoring.KpiValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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 (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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiValue) { - return mergeFrom((monitoring.Monitoring.KpiValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiValue other) { - if (other == monitoring.Monitoring.KpiValue.getDefaultInstance()) return this; - switch (other.getValueCase()) { - case INT32VAL: { - setInt32Val(other.getInt32Val()); - break; - } - case UINT32VAL: { - setUint32Val(other.getUint32Val()); - break; - } - case INT64VAL: { - setInt64Val(other.getInt64Val()); - break; - } - case UINT64VAL: { - setUint64Val(other.getUint64Val()); - break; - } - case FLOATVAL: { - setFloatVal(other.getFloatVal()); - break; - } - case STRINGVAL: { - valueCase_ = 6; - value_ = other.value_; - onChanged(); - break; - } - case BOOLVAL: { - setBoolVal(other.getBoolVal()); - break; - } - case VALUE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiValue) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int valueCase_ = 0; - private java.lang.Object value_; - public ValueCase - getValueCase() { - return ValueCase.forNumber( - valueCase_); - } - - public Builder clearValue() { - valueCase_ = 0; - value_ = null; - onChanged(); - return this; - } - - - /** - * int32 int32Val = 1; - * @return Whether the int32Val field is set. - */ - public boolean hasInt32Val() { - return valueCase_ == 1; - } - /** - * int32 int32Val = 1; - * @return The int32Val. - */ - public int getInt32Val() { - if (valueCase_ == 1) { - return (java.lang.Integer) value_; - } - return 0; - } - /** - * int32 int32Val = 1; - * @param value The int32Val to set. - * @return This builder for chaining. - */ - public Builder setInt32Val(int value) { - valueCase_ = 1; - value_ = value; - onChanged(); - return this; - } - /** - * int32 int32Val = 1; - * @return This builder for chaining. - */ - public Builder clearInt32Val() { - if (valueCase_ == 1) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * uint32 uint32Val = 2; - * @return Whether the uint32Val field is set. - */ - public boolean hasUint32Val() { - return valueCase_ == 2; - } - /** - * uint32 uint32Val = 2; - * @return The uint32Val. - */ - public int getUint32Val() { - if (valueCase_ == 2) { - return (java.lang.Integer) value_; - } - return 0; - } - /** - * uint32 uint32Val = 2; - * @param value The uint32Val to set. - * @return This builder for chaining. - */ - public Builder setUint32Val(int value) { - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - /** - * uint32 uint32Val = 2; - * @return This builder for chaining. - */ - public Builder clearUint32Val() { - if (valueCase_ == 2) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * int64 int64Val = 3; - * @return Whether the int64Val field is set. - */ - public boolean hasInt64Val() { - return valueCase_ == 3; - } - /** - * int64 int64Val = 3; - * @return The int64Val. - */ - public long getInt64Val() { - if (valueCase_ == 3) { - return (java.lang.Long) value_; - } - return 0L; - } - /** - * int64 int64Val = 3; - * @param value The int64Val to set. - * @return This builder for chaining. - */ - public Builder setInt64Val(long value) { - valueCase_ = 3; - value_ = value; - onChanged(); - return this; - } - /** - * int64 int64Val = 3; - * @return This builder for chaining. - */ - public Builder clearInt64Val() { - if (valueCase_ == 3) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * uint64 uint64Val = 4; - * @return Whether the uint64Val field is set. - */ - public boolean hasUint64Val() { - return valueCase_ == 4; - } - /** - * uint64 uint64Val = 4; - * @return The uint64Val. - */ - public long getUint64Val() { - if (valueCase_ == 4) { - return (java.lang.Long) value_; - } - return 0L; - } - /** - * uint64 uint64Val = 4; - * @param value The uint64Val to set. - * @return This builder for chaining. - */ - public Builder setUint64Val(long value) { - valueCase_ = 4; - value_ = value; - onChanged(); - return this; - } - /** - * uint64 uint64Val = 4; - * @return This builder for chaining. - */ - public Builder clearUint64Val() { - if (valueCase_ == 4) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * float floatVal = 5; - * @return Whether the floatVal field is set. - */ - public boolean hasFloatVal() { - return valueCase_ == 5; - } - /** - * float floatVal = 5; - * @return The floatVal. - */ - public float getFloatVal() { - if (valueCase_ == 5) { - return (java.lang.Float) value_; - } - return 0F; - } - /** - * float floatVal = 5; - * @param value The floatVal to set. - * @return This builder for chaining. - */ - public Builder setFloatVal(float value) { - valueCase_ = 5; - value_ = value; - onChanged(); - return this; - } - /** - * float floatVal = 5; - * @return This builder for chaining. - */ - public Builder clearFloatVal() { - if (valueCase_ == 5) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * string stringVal = 6; - * @return Whether the stringVal field is set. - */ - @java.lang.Override - public boolean hasStringVal() { - return valueCase_ == 6; - } - /** - * string stringVal = 6; - * @return The stringVal. - */ - @java.lang.Override - public java.lang.String getStringVal() { - java.lang.Object ref = ""; - if (valueCase_ == 6) { - ref = value_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valueCase_ == 6) { - value_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string stringVal = 6; - * @return The bytes for stringVal. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStringValBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 6) { - ref = value_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valueCase_ == 6) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string stringVal = 6; - * @param value The stringVal to set. - * @return This builder for chaining. - */ - public Builder setStringVal( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - valueCase_ = 6; - value_ = value; - onChanged(); - return this; - } - /** - * string stringVal = 6; - * @return This builder for chaining. - */ - public Builder clearStringVal() { - if (valueCase_ == 6) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - /** - * string stringVal = 6; - * @param value The bytes for stringVal to set. - * @return This builder for chaining. - */ - public Builder setStringValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - valueCase_ = 6; - value_ = value; - onChanged(); - return this; - } - - /** - * bool boolVal = 7; - * @return Whether the boolVal field is set. - */ - public boolean hasBoolVal() { - return valueCase_ == 7; - } - /** - * bool boolVal = 7; - * @return The boolVal. - */ - public boolean getBoolVal() { - if (valueCase_ == 7) { - return (java.lang.Boolean) value_; - } - return false; - } - /** - * bool boolVal = 7; - * @param value The boolVal to set. - * @return This builder for chaining. - */ - public Builder setBoolVal(boolean value) { - valueCase_ = 7; - value_ = value; - onChanged(); - return this; - } - /** - * bool boolVal = 7; - * @return This builder for chaining. - */ - public Builder clearBoolVal() { - if (valueCase_ == 7) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiValue) - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder setAlarmId(monitoring.Monitoring.AlarmID.Builder builderForValue) { + if (alarmIdBuilder_ == null) { + alarmId_ = builderForValue.build(); + onChanged(); + } else { + alarmIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - // @@protoc_insertion_point(class_scope:monitoring.KpiValue) - private static final monitoring.Monitoring.KpiValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiValue(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (alarmId_ != null) { + alarmId_ = monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); + } else { + alarmId_ = value; + } + onChanged(); + } else { + alarmIdBuilder_.mergeFrom(value); + } + return this; + } - public static monitoring.Monitoring.KpiValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder clearAlarmId() { + if (alarmIdBuilder_ == null) { + alarmId_ = null; + onChanged(); + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { + onChanged(); + return getAlarmIdFieldBuilder().getBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + if (alarmIdBuilder_ != null) { + return alarmIdBuilder_.getMessageOrBuilder(); + } else { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } + } - @java.lang.Override - public monitoring.Monitoring.KpiValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getAlarmIdFieldBuilder() { + if (alarmIdBuilder_ == null) { + alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getAlarmId(), getParentForChildren(), isClean()); + alarmId_ = null; + } + return alarmIdBuilder_; + } - } + private float subscriptionTimeoutS_; - public interface KpiListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiList) - com.google.protobuf.MessageOrBuilder { + /** + * float subscription_timeout_s = 2; + * @return The subscriptionTimeoutS. + */ + @java.lang.Override + public float getSubscriptionTimeoutS() { + return subscriptionTimeoutS_; + } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - java.util.List - getKpiList(); - /** - * repeated .monitoring.Kpi kpi = 1; - */ - monitoring.Monitoring.Kpi getKpi(int index); - /** - * repeated .monitoring.Kpi kpi = 1; - */ - int getKpiCount(); - /** - * repeated .monitoring.Kpi kpi = 1; - */ - java.util.List - getKpiOrBuilderList(); - /** - * repeated .monitoring.Kpi kpi = 1; - */ - monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder( - int index); - } - /** - * Protobuf type {@code monitoring.KpiList} - */ - public static final class KpiList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiList) - KpiListOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiList.newBuilder() to construct. - private KpiList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiList() { - kpi_ = java.util.Collections.emptyList(); - } + /** + * float subscription_timeout_s = 2; + * @param value The subscriptionTimeoutS to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionTimeoutS(float value) { + subscriptionTimeoutS_ = value; + onChanged(); + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiList(); - } + /** + * float subscription_timeout_s = 2; + * @return This builder for chaining. + */ + public Builder clearSubscriptionTimeoutS() { + subscriptionTimeoutS_ = 0F; + onChanged(); + return this; + } - @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(); - 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; - } + private float subscriptionFrequencyMs_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiList.class, monitoring.Monitoring.KpiList.Builder.class); - } + /** + * float subscription_frequency_ms = 3; + * @return The subscriptionFrequencyMs. + */ + @java.lang.Override + public float getSubscriptionFrequencyMs() { + return subscriptionFrequencyMs_; + } - public static final int KPI_FIELD_NUMBER = 1; - private java.util.List kpi_; - /** - * repeated .monitoring.Kpi kpi = 1; - */ - @java.lang.Override - public java.util.List getKpiList() { - return kpi_; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - @java.lang.Override - public java.util.List - getKpiOrBuilderList() { - return kpi_; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - @java.lang.Override - public int getKpiCount() { - return kpi_.size(); - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - @java.lang.Override - public monitoring.Monitoring.Kpi getKpi(int index) { - return kpi_.get(index); - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder( - int index) { - return kpi_.get(index); - } + /** + * float subscription_frequency_ms = 3; + * @param value The subscriptionFrequencyMs to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionFrequencyMs(float value) { + subscriptionFrequencyMs_ = value; + onChanged(); + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * float subscription_frequency_ms = 3; + * @return This builder for chaining. + */ + public Builder clearSubscriptionFrequencyMs() { + subscriptionFrequencyMs_ = 0F; + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < kpi_.size(); i++) { - output.writeMessage(1, kpi_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.AlarmSubscription) + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < kpi_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, kpi_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + // @@protoc_insertion_point(class_scope:monitoring.AlarmSubscription) + private static final monitoring.Monitoring.AlarmSubscription DEFAULT_INSTANCE; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiList)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiList other = (monitoring.Monitoring.KpiList) obj; - - if (!getKpiList() - .equals(other.getKpiList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmSubscription(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getKpiCount() > 0) { - hash = (37 * hash) + KPI_FIELD_NUMBER; - hash = (53 * hash) + getKpiList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static monitoring.Monitoring.AlarmSubscription getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static monitoring.Monitoring.KpiList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @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); + } + }; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiList) - monitoring.Monitoring.KpiListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiList.class, monitoring.Monitoring.KpiList.Builder.class); - } - - // 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(); - if (kpiBuilder_ == null) { - kpi_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - kpiBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiList_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiList getDefaultInstanceForType() { - return monitoring.Monitoring.KpiList.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiList build() { - monitoring.Monitoring.KpiList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public monitoring.Monitoring.KpiList buildPartial() { - monitoring.Monitoring.KpiList result = new monitoring.Monitoring.KpiList(this); - int from_bitField0_ = bitField0_; - if (kpiBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpi_ = java.util.Collections.unmodifiableList(kpi_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.kpi_ = kpi_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiList) { - return mergeFrom((monitoring.Monitoring.KpiList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiList other) { - if (other == monitoring.Monitoring.KpiList.getDefaultInstance()) return this; - if (kpiBuilder_ == null) { - if (!other.kpi_.isEmpty()) { - if (kpi_.isEmpty()) { - kpi_ = other.kpi_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiIsMutable(); - kpi_.addAll(other.kpi_); - } - onChanged(); - } - } else { - if (!other.kpi_.isEmpty()) { - if (kpiBuilder_.isEmpty()) { - kpiBuilder_.dispose(); - kpiBuilder_ = null; - kpi_ = other.kpi_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiFieldBuilder() : null; - } else { - kpiBuilder_.addAllMessages(other.kpi_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List kpi_ = - java.util.Collections.emptyList(); - private void ensureKpiIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpi_ = new java.util.ArrayList(kpi_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder> kpiBuilder_; - - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public java.util.List getKpiList() { - if (kpiBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpi_); - } else { - return kpiBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public int getKpiCount() { - if (kpiBuilder_ == null) { - return kpi_.size(); - } else { - return kpiBuilder_.getCount(); - } - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public monitoring.Monitoring.Kpi getKpi(int index) { - if (kpiBuilder_ == null) { - return kpi_.get(index); - } else { - return kpiBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder setKpi( - int index, monitoring.Monitoring.Kpi value) { - if (kpiBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIsMutable(); - kpi_.set(index, value); - onChanged(); - } else { - kpiBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder setKpi( - int index, monitoring.Monitoring.Kpi.Builder builderForValue) { - if (kpiBuilder_ == null) { - ensureKpiIsMutable(); - kpi_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder addKpi(monitoring.Monitoring.Kpi value) { - if (kpiBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIsMutable(); - kpi_.add(value); - onChanged(); - } else { - kpiBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder addKpi( - int index, monitoring.Monitoring.Kpi value) { - if (kpiBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIsMutable(); - kpi_.add(index, value); - onChanged(); - } else { - kpiBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder addKpi( - monitoring.Monitoring.Kpi.Builder builderForValue) { - if (kpiBuilder_ == null) { - ensureKpiIsMutable(); - kpi_.add(builderForValue.build()); - onChanged(); - } else { - kpiBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder addKpi( - int index, monitoring.Monitoring.Kpi.Builder builderForValue) { - if (kpiBuilder_ == null) { - ensureKpiIsMutable(); - kpi_.add(index, builderForValue.build()); - onChanged(); - } else { - kpiBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder addAllKpi( - java.lang.Iterable values) { - if (kpiBuilder_ == null) { - ensureKpiIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpi_); - onChanged(); - } else { - kpiBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder clearKpi() { - if (kpiBuilder_ == null) { - kpi_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder removeKpi(int index) { - if (kpiBuilder_ == null) { - ensureKpiIsMutable(); - kpi_.remove(index); - onChanged(); - } else { - kpiBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public monitoring.Monitoring.Kpi.Builder getKpiBuilder( - int index) { - return getKpiFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder( - int index) { - if (kpiBuilder_ == null) { - return kpi_.get(index); } else { - return kpiBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public java.util.List - getKpiOrBuilderList() { - if (kpiBuilder_ != null) { - return kpiBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(kpi_); - } - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public monitoring.Monitoring.Kpi.Builder addKpiBuilder() { - return getKpiFieldBuilder().addBuilder( - monitoring.Monitoring.Kpi.getDefaultInstance()); - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public monitoring.Monitoring.Kpi.Builder addKpiBuilder( - int index) { - return getKpiFieldBuilder().addBuilder( - index, monitoring.Monitoring.Kpi.getDefaultInstance()); - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public java.util.List - getKpiBuilderList() { - return getKpiFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder> - getKpiFieldBuilder() { - if (kpiBuilder_ == null) { - kpiBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder>( - kpi_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - kpi_ = null; - } - return kpiBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiList) - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - // @@protoc_insertion_point(class_scope:monitoring.KpiList) - private static final monitoring.Monitoring.KpiList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiList(); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static monitoring.Monitoring.KpiList getDefaultInstance() { - return DEFAULT_INSTANCE; + @java.lang.Override + public monitoring.Monitoring.AlarmSubscription getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public interface AlarmResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.AlarmResponse) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + boolean hasAlarmId(); - @java.lang.Override - public monitoring.Monitoring.KpiList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + monitoring.Monitoring.AlarmID getAlarmId(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); - public interface KpiDescriptorListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiDescriptorList) - com.google.protobuf.MessageOrBuilder { + /** + * string text = 2; + * @return The text. + */ + java.lang.String getText(); - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - java.util.List - getKpiDescriptorListList(); - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - monitoring.Monitoring.KpiDescriptor getKpiDescriptorList(int index); - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - int getKpiDescriptorListCount(); - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - java.util.List - getKpiDescriptorListOrBuilderList(); - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorListOrBuilder( - int index); - } - /** - * Protobuf type {@code monitoring.KpiDescriptorList} - */ - public static final class KpiDescriptorList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiDescriptorList) - KpiDescriptorListOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiDescriptorList.newBuilder() to construct. - private KpiDescriptorList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiDescriptorList() { - kpiDescriptorList_ = java.util.Collections.emptyList(); - } + /** + * string text = 2; + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiDescriptorList(); - } + /** + * .monitoring.KpiList kpi_list = 3; + * @return Whether the kpiList field is set. + */ + boolean hasKpiList(); - @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(); - 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; - } + /** + * .monitoring.KpiList kpi_list = 3; + * @return The kpiList. + */ + monitoring.Monitoring.KpiList getKpiList(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiDescriptorList.class, monitoring.Monitoring.KpiDescriptorList.Builder.class); + /** + * .monitoring.KpiList kpi_list = 3; + */ + monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder(); } - public static final int KPI_DESCRIPTOR_LIST_FIELD_NUMBER = 1; - private java.util.List kpiDescriptorList_; - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - @java.lang.Override - public java.util.List getKpiDescriptorListList() { - return kpiDescriptorList_; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - @java.lang.Override - public java.util.List - getKpiDescriptorListOrBuilderList() { - return kpiDescriptorList_; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - @java.lang.Override - public int getKpiDescriptorListCount() { - return kpiDescriptorList_.size(); - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiDescriptor getKpiDescriptorList(int index) { - return kpiDescriptorList_.get(index); - } /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + * Protobuf type {@code monitoring.AlarmResponse} */ - @java.lang.Override - public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorListOrBuilder( - int index) { - return kpiDescriptorList_.get(index); - } + public static final class AlarmResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.AlarmResponse) + AlarmResponseOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use AlarmResponse.newBuilder() to construct. + private AlarmResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < kpiDescriptorList_.size(); i++) { - output.writeMessage(1, kpiDescriptorList_.get(i)); - } - unknownFields.writeTo(output); - } + private AlarmResponse() { + text_ = ""; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < kpiDescriptorList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, kpiDescriptorList_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AlarmResponse(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiDescriptorList)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiDescriptorList other = (monitoring.Monitoring.KpiDescriptorList) obj; - - if (!getKpiDescriptorListList() - .equals(other.getKpiDescriptorListList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getKpiDescriptorListCount() > 0) { - hash = (37 * hash) + KPI_DESCRIPTOR_LIST_FIELD_NUMBER; - hash = (53 * hash) + getKpiDescriptorListList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + 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 monitoring.Monitoring.KpiDescriptorList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptorList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiDescriptorList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiDescriptorList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmResponse.class, monitoring.Monitoring.AlarmResponse.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiDescriptorList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiDescriptorList) - monitoring.Monitoring.KpiDescriptorListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiDescriptorList.class, monitoring.Monitoring.KpiDescriptorList.Builder.class); - } - - // 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(); - if (kpiDescriptorListBuilder_ == null) { - kpiDescriptorList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - kpiDescriptorListBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiDescriptorList getDefaultInstanceForType() { - return monitoring.Monitoring.KpiDescriptorList.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiDescriptorList build() { - monitoring.Monitoring.KpiDescriptorList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public monitoring.Monitoring.KpiDescriptorList buildPartial() { - monitoring.Monitoring.KpiDescriptorList result = new monitoring.Monitoring.KpiDescriptorList(this); - int from_bitField0_ = bitField0_; - if (kpiDescriptorListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpiDescriptorList_ = java.util.Collections.unmodifiableList(kpiDescriptorList_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.kpiDescriptorList_ = kpiDescriptorList_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiDescriptorList) { - return mergeFrom((monitoring.Monitoring.KpiDescriptorList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiDescriptorList other) { - if (other == monitoring.Monitoring.KpiDescriptorList.getDefaultInstance()) return this; - if (kpiDescriptorListBuilder_ == null) { - if (!other.kpiDescriptorList_.isEmpty()) { - if (kpiDescriptorList_.isEmpty()) { - kpiDescriptorList_ = other.kpiDescriptorList_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.addAll(other.kpiDescriptorList_); - } - onChanged(); - } - } else { - if (!other.kpiDescriptorList_.isEmpty()) { - if (kpiDescriptorListBuilder_.isEmpty()) { - kpiDescriptorListBuilder_.dispose(); - kpiDescriptorListBuilder_ = null; - kpiDescriptorList_ = other.kpiDescriptorList_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiDescriptorListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiDescriptorListFieldBuilder() : null; - } else { - kpiDescriptorListBuilder_.addAllMessages(other.kpiDescriptorList_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiDescriptorList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List kpiDescriptorList_ = - java.util.Collections.emptyList(); - private void ensureKpiDescriptorListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiDescriptorList_ = new java.util.ArrayList(kpiDescriptorList_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder> kpiDescriptorListBuilder_; - - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public java.util.List getKpiDescriptorListList() { - if (kpiDescriptorListBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiDescriptorList_); - } else { - return kpiDescriptorListBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public int getKpiDescriptorListCount() { - if (kpiDescriptorListBuilder_ == null) { - return kpiDescriptorList_.size(); - } else { - return kpiDescriptorListBuilder_.getCount(); - } - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public monitoring.Monitoring.KpiDescriptor getKpiDescriptorList(int index) { - if (kpiDescriptorListBuilder_ == null) { - return kpiDescriptorList_.get(index); - } else { - return kpiDescriptorListBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder setKpiDescriptorList( - int index, monitoring.Monitoring.KpiDescriptor value) { - if (kpiDescriptorListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.set(index, value); - onChanged(); - } else { - kpiDescriptorListBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder setKpiDescriptorList( - int index, monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { - if (kpiDescriptorListBuilder_ == null) { - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiDescriptorListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder addKpiDescriptorList(monitoring.Monitoring.KpiDescriptor value) { - if (kpiDescriptorListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.add(value); - onChanged(); - } else { - kpiDescriptorListBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder addKpiDescriptorList( - int index, monitoring.Monitoring.KpiDescriptor value) { - if (kpiDescriptorListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.add(index, value); - onChanged(); - } else { - kpiDescriptorListBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder addKpiDescriptorList( - monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { - if (kpiDescriptorListBuilder_ == null) { - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.add(builderForValue.build()); - onChanged(); - } else { - kpiDescriptorListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder addKpiDescriptorList( - int index, monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { - if (kpiDescriptorListBuilder_ == null) { - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.add(index, builderForValue.build()); - onChanged(); - } else { - kpiDescriptorListBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder addAllKpiDescriptorList( - java.lang.Iterable values) { - if (kpiDescriptorListBuilder_ == null) { - ensureKpiDescriptorListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiDescriptorList_); - onChanged(); - } else { - kpiDescriptorListBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder clearKpiDescriptorList() { - if (kpiDescriptorListBuilder_ == null) { - kpiDescriptorList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiDescriptorListBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder removeKpiDescriptorList(int index) { - if (kpiDescriptorListBuilder_ == null) { - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.remove(index); - onChanged(); - } else { - kpiDescriptorListBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public monitoring.Monitoring.KpiDescriptor.Builder getKpiDescriptorListBuilder( - int index) { - return getKpiDescriptorListFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorListOrBuilder( - int index) { - if (kpiDescriptorListBuilder_ == null) { - return kpiDescriptorList_.get(index); } else { - return kpiDescriptorListBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public java.util.List - getKpiDescriptorListOrBuilderList() { - if (kpiDescriptorListBuilder_ != null) { - return kpiDescriptorListBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(kpiDescriptorList_); - } - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public monitoring.Monitoring.KpiDescriptor.Builder addKpiDescriptorListBuilder() { - return getKpiDescriptorListFieldBuilder().addBuilder( - monitoring.Monitoring.KpiDescriptor.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public monitoring.Monitoring.KpiDescriptor.Builder addKpiDescriptorListBuilder( - int index) { - return getKpiDescriptorListFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiDescriptor.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public java.util.List - getKpiDescriptorListBuilderList() { - return getKpiDescriptorListFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder> - getKpiDescriptorListFieldBuilder() { - if (kpiDescriptorListBuilder_ == null) { - kpiDescriptorListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder>( - kpiDescriptorList_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - kpiDescriptorList_ = null; - } - return kpiDescriptorListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiDescriptorList) - } + public static final int ALARM_ID_FIELD_NUMBER = 1; - // @@protoc_insertion_point(class_scope:monitoring.KpiDescriptorList) - private static final monitoring.Monitoring.KpiDescriptorList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiDescriptorList(); - } + private monitoring.Monitoring.AlarmID alarmId_; - public static monitoring.Monitoring.KpiDescriptorList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + @java.lang.Override + public boolean hasAlarmId() { + return alarmId_ != null; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + @java.lang.Override + public monitoring.Monitoring.AlarmID getAlarmId() { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + return getAlarmId(); + } - @java.lang.Override - public monitoring.Monitoring.KpiDescriptorList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static final int TEXT_FIELD_NUMBER = 2; - } + private volatile java.lang.Object text_; - public interface SubsDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.SubsDescriptor) - com.google.protobuf.MessageOrBuilder { + /** + * string text = 2; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + 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(); + text_ = s; + return s; + } + } - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return Whether the subsId field is set. - */ - boolean hasSubsId(); - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return The subsId. - */ - monitoring.Monitoring.SubscriptionID getSubsId(); - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder(); + /** + * string text = 2; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * .monitoring.KpiId kpi_id = 2; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 2; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 2; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + public static final int KPI_LIST_FIELD_NUMBER = 3; - /** - * float sampling_duration_s = 3; - * @return The samplingDurationS. - */ - float getSamplingDurationS(); + private monitoring.Monitoring.KpiList kpiList_; - /** - * float sampling_interval_s = 4; - * @return The samplingIntervalS. - */ - float getSamplingIntervalS(); + /** + * .monitoring.KpiList kpi_list = 3; + * @return Whether the kpiList field is set. + */ + @java.lang.Override + public boolean hasKpiList() { + return kpiList_ != null; + } - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 5; - * @return Whether the startTimestamp field is set. - */ - boolean hasStartTimestamp(); - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 5; - * @return The startTimestamp. - */ - context.ContextOuterClass.Timestamp getStartTimestamp(); - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 5; - */ - context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder(); + /** + * .monitoring.KpiList kpi_list = 3; + * @return The kpiList. + */ + @java.lang.Override + public monitoring.Monitoring.KpiList getKpiList() { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; + } - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 6; - * @return Whether the endTimestamp field is set. - */ - boolean hasEndTimestamp(); - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 6; - * @return The endTimestamp. - */ - context.ContextOuterClass.Timestamp getEndTimestamp(); - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 6; - */ - context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder(); - } - /** - * Protobuf type {@code monitoring.SubsDescriptor} - */ - public static final class SubsDescriptor extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.SubsDescriptor) - SubsDescriptorOrBuilder { - private static final long serialVersionUID = 0L; - // Use SubsDescriptor.newBuilder() to construct. - private SubsDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubsDescriptor() { - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + @java.lang.Override + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + return getKpiList(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubsDescriptor(); - } + private byte memoizedIsInitialized = -1; - @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; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsDescriptor.class, monitoring.Monitoring.SubsDescriptor.Builder.class); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (alarmId_ != null) { + output.writeMessage(1, getAlarmId()); + } + if (!getTextBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); + } + if (kpiList_ != null) { + output.writeMessage(3, getKpiList()); + } + unknownFields.writeTo(output); + } - public static final int SUBS_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.SubscriptionID subsId_; - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return Whether the subsId field is set. - */ - @java.lang.Override - public boolean hasSubsId() { - return subsId_ != null; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return The subsId. - */ - @java.lang.Override - public monitoring.Monitoring.SubscriptionID getSubsId() { - return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { - return getSubsId(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (alarmId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId()); + } + if (!getTextBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); + } + if (kpiList_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKpiList()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static final int KPI_ID_FIELD_NUMBER = 2; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 2; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 2; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.AlarmResponse)) { + return super.equals(obj); + } + monitoring.Monitoring.AlarmResponse other = (monitoring.Monitoring.AlarmResponse) obj; + if (hasAlarmId() != other.hasAlarmId()) + return false; + if (hasAlarmId()) { + if (!getAlarmId().equals(other.getAlarmId())) + return false; + } + if (!getText().equals(other.getText())) + return false; + if (hasKpiList() != other.hasKpiList()) + return false; + if (hasKpiList()) { + if (!getKpiList().equals(other.getKpiList())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - public static final int SAMPLING_DURATION_S_FIELD_NUMBER = 3; - private float samplingDurationS_; - /** - * float sampling_duration_s = 3; - * @return The samplingDurationS. - */ - @java.lang.Override - public float getSamplingDurationS() { - return samplingDurationS_; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAlarmId()) { + hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; + hash = (53 * hash) + getAlarmId().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + if (hasKpiList()) { + hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; + hash = (53 * hash) + getKpiList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - public static final int SAMPLING_INTERVAL_S_FIELD_NUMBER = 4; - private float samplingIntervalS_; - /** - * float sampling_interval_s = 4; - * @return The samplingIntervalS. - */ - @java.lang.Override - public float getSamplingIntervalS() { - return samplingIntervalS_; - } + public static monitoring.Monitoring.AlarmResponse parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int START_TIMESTAMP_FIELD_NUMBER = 5; - private context.ContextOuterClass.Timestamp startTimestamp_; - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 5; - * @return Whether the startTimestamp field is set. - */ - @java.lang.Override - public boolean hasStartTimestamp() { - return startTimestamp_ != null; - } - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 5; - * @return The startTimestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getStartTimestamp() { - return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; - } - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 5; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { - return getStartTimestamp(); - } + public static monitoring.Monitoring.AlarmResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int END_TIMESTAMP_FIELD_NUMBER = 6; - private context.ContextOuterClass.Timestamp endTimestamp_; - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 6; - * @return Whether the endTimestamp field is set. - */ - @java.lang.Override - public boolean hasEndTimestamp() { - return endTimestamp_ != null; - } - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 6; - * @return The endTimestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getEndTimestamp() { - return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; - } - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 6; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { - return getEndTimestamp(); - } + public static monitoring.Monitoring.AlarmResponse parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static monitoring.Monitoring.AlarmResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static monitoring.Monitoring.AlarmResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (subsId_ != null) { - output.writeMessage(1, getSubsId()); - } - if (kpiId_ != null) { - output.writeMessage(2, getKpiId()); - } - if (samplingDurationS_ != 0F) { - output.writeFloat(3, samplingDurationS_); - } - if (samplingIntervalS_ != 0F) { - output.writeFloat(4, samplingIntervalS_); - } - if (startTimestamp_ != null) { - output.writeMessage(5, getStartTimestamp()); - } - if (endTimestamp_ != null) { - output.writeMessage(6, getEndTimestamp()); - } - unknownFields.writeTo(output); - } + public static monitoring.Monitoring.AlarmResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (subsId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubsId()); - } - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getKpiId()); - } - if (samplingDurationS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, samplingDurationS_); - } - if (samplingIntervalS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, samplingIntervalS_); - } - if (startTimestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getStartTimestamp()); - } - if (endTimestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getEndTimestamp()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static monitoring.Monitoring.AlarmResponse parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.SubsDescriptor)) { - return super.equals(obj); - } - monitoring.Monitoring.SubsDescriptor other = (monitoring.Monitoring.SubsDescriptor) obj; - - if (hasSubsId() != other.hasSubsId()) return false; - if (hasSubsId()) { - if (!getSubsId() - .equals(other.getSubsId())) return false; - } - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (java.lang.Float.floatToIntBits(getSamplingDurationS()) - != java.lang.Float.floatToIntBits( - other.getSamplingDurationS())) return false; - if (java.lang.Float.floatToIntBits(getSamplingIntervalS()) - != java.lang.Float.floatToIntBits( - other.getSamplingIntervalS())) return false; - if (hasStartTimestamp() != other.hasStartTimestamp()) return false; - if (hasStartTimestamp()) { - if (!getStartTimestamp() - .equals(other.getStartTimestamp())) return false; - } - if (hasEndTimestamp() != other.hasEndTimestamp()) return false; - if (hasEndTimestamp()) { - if (!getEndTimestamp() - .equals(other.getEndTimestamp())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static monitoring.Monitoring.AlarmResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubsId()) { - hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; - hash = (53 * hash) + getSubsId().hashCode(); - } - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - hash = (37 * hash) + SAMPLING_DURATION_S_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getSamplingDurationS()); - hash = (37 * hash) + SAMPLING_INTERVAL_S_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getSamplingIntervalS()); - if (hasStartTimestamp()) { - hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getStartTimestamp().hashCode(); - } - if (hasEndTimestamp()) { - hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getEndTimestamp().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static monitoring.Monitoring.AlarmResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubsDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsDescriptor parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static monitoring.Monitoring.AlarmResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.SubsDescriptor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static monitoring.Monitoring.AlarmResponse parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.SubsDescriptor} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.SubsDescriptor) - monitoring.Monitoring.SubsDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsDescriptor.class, monitoring.Monitoring.SubsDescriptor.Builder.class); - } - - // 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; - subsIdBuilder_ = null; - } - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - samplingDurationS_ = 0F; - - samplingIntervalS_ = 0F; - - if (startTimestampBuilder_ == null) { - startTimestamp_ = null; - } else { - startTimestamp_ = null; - startTimestampBuilder_ = null; - } - if (endTimestampBuilder_ == null) { - endTimestamp_ = null; - } else { - endTimestamp_ = null; - endTimestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.SubsDescriptor getDefaultInstanceForType() { - return monitoring.Monitoring.SubsDescriptor.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.SubsDescriptor build() { - monitoring.Monitoring.SubsDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.SubsDescriptor) { - return mergeFrom((monitoring.Monitoring.SubsDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.SubsDescriptor other) { - if (other == monitoring.Monitoring.SubsDescriptor.getDefaultInstance()) return this; - if (other.hasSubsId()) { - mergeSubsId(other.getSubsId()); - } - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - if (other.getSamplingDurationS() != 0F) { - setSamplingDurationS(other.getSamplingDurationS()); - } - if (other.getSamplingIntervalS() != 0F) { - setSamplingIntervalS(other.getSamplingIntervalS()); - } - if (other.hasStartTimestamp()) { - mergeStartTimestamp(other.getStartTimestamp()); - } - if (other.hasEndTimestamp()) { - mergeEndTimestamp(other.getEndTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubsDescriptor) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.SubscriptionID subsId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> subsIdBuilder_; - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return Whether the subsId field is set. - */ - public boolean hasSubsId() { - return subsIdBuilder_ != null || subsId_ != null; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return The subsId. - */ - public monitoring.Monitoring.SubscriptionID getSubsId() { - if (subsIdBuilder_ == null) { - return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; - } else { - return subsIdBuilder_.getMessage(); - } - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder setSubsId(monitoring.Monitoring.SubscriptionID value) { - if (subsIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subsId_ = value; - onChanged(); - } else { - subsIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder setSubsId( - monitoring.Monitoring.SubscriptionID.Builder builderForValue) { - if (subsIdBuilder_ == null) { - subsId_ = builderForValue.build(); - onChanged(); - } else { - subsIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder mergeSubsId(monitoring.Monitoring.SubscriptionID value) { - if (subsIdBuilder_ == null) { - if (subsId_ != null) { - subsId_ = - monitoring.Monitoring.SubscriptionID.newBuilder(subsId_).mergeFrom(value).buildPartial(); - } else { - subsId_ = value; - } - onChanged(); - } else { - subsIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder clearSubsId() { - if (subsIdBuilder_ == null) { - subsId_ = null; - onChanged(); - } else { - subsId_ = null; - subsIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public monitoring.Monitoring.SubscriptionID.Builder getSubsIdBuilder() { - - onChanged(); - return getSubsIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { - if (subsIdBuilder_ != null) { - return subsIdBuilder_.getMessageOrBuilder(); - } else { - return subsId_ == null ? - monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; - } - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> - getSubsIdFieldBuilder() { - if (subsIdBuilder_ == null) { - subsIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder>( - getSubsId(), - getParentForChildren(), - isClean()); - subsId_ = null; - } - return subsIdBuilder_; - } - - private monitoring.Monitoring.KpiId kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - /** - * .monitoring.KpiId kpi_id = 2; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 2; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - - private float samplingDurationS_ ; - /** - * float sampling_duration_s = 3; - * @return The samplingDurationS. - */ - @java.lang.Override - public float getSamplingDurationS() { - return samplingDurationS_; - } - /** - * float sampling_duration_s = 3; - * @param value The samplingDurationS to set. - * @return This builder for chaining. - */ - public Builder setSamplingDurationS(float value) { - - samplingDurationS_ = value; - onChanged(); - return this; - } - /** - * float sampling_duration_s = 3; - * @return This builder for chaining. - */ - public Builder clearSamplingDurationS() { - - samplingDurationS_ = 0F; - onChanged(); - return this; - } - - private float samplingIntervalS_ ; - /** - * float sampling_interval_s = 4; - * @return The samplingIntervalS. - */ - @java.lang.Override - public float getSamplingIntervalS() { - return samplingIntervalS_; - } - /** - * float sampling_interval_s = 4; - * @param value The samplingIntervalS to set. - * @return This builder for chaining. - */ - public Builder setSamplingIntervalS(float value) { - - samplingIntervalS_ = value; - onChanged(); - return this; - } - /** - * float sampling_interval_s = 4; - * @return This builder for chaining. - */ - public Builder clearSamplingIntervalS() { - - samplingIntervalS_ = 0F; - onChanged(); - return this; - } - - private context.ContextOuterClass.Timestamp startTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> startTimestampBuilder_; - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - * @return Whether the startTimestamp field is set. - */ - public boolean hasStartTimestamp() { - return startTimestampBuilder_ != null || startTimestamp_ != null; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - * @return The startTimestamp. - */ - public context.ContextOuterClass.Timestamp getStartTimestamp() { - if (startTimestampBuilder_ == null) { - return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; - } else { - return startTimestampBuilder_.getMessage(); - } - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - public Builder setStartTimestamp(context.ContextOuterClass.Timestamp value) { - if (startTimestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTimestamp_ = value; - onChanged(); - } else { - startTimestampBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - public Builder setStartTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (startTimestampBuilder_ == null) { - startTimestamp_ = builderForValue.build(); - onChanged(); - } else { - startTimestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) { - if (startTimestampBuilder_ == null) { - if (startTimestamp_ != null) { - startTimestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(startTimestamp_).mergeFrom(value).buildPartial(); - } else { - startTimestamp_ = value; - } - onChanged(); - } else { - startTimestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - public Builder clearStartTimestamp() { - if (startTimestampBuilder_ == null) { - startTimestamp_ = null; - onChanged(); - } else { - startTimestamp_ = null; - startTimestampBuilder_ = null; - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() { - - onChanged(); - return getStartTimestampFieldBuilder().getBuilder(); - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { - if (startTimestampBuilder_ != null) { - return startTimestampBuilder_.getMessageOrBuilder(); - } else { - return startTimestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; - } - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getStartTimestampFieldBuilder() { - if (startTimestampBuilder_ == null) { - startTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getStartTimestamp(), - getParentForChildren(), - isClean()); - startTimestamp_ = null; - } - return startTimestampBuilder_; - } - - private context.ContextOuterClass.Timestamp endTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> endTimestampBuilder_; - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - * @return Whether the endTimestamp field is set. - */ - public boolean hasEndTimestamp() { - return endTimestampBuilder_ != null || endTimestamp_ != null; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - * @return The endTimestamp. - */ - public context.ContextOuterClass.Timestamp getEndTimestamp() { - if (endTimestampBuilder_ == null) { - return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; - } else { - return endTimestampBuilder_.getMessage(); - } - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - public Builder setEndTimestamp(context.ContextOuterClass.Timestamp value) { - if (endTimestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTimestamp_ = value; - onChanged(); - } else { - endTimestampBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - public Builder setEndTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (endTimestampBuilder_ == null) { - endTimestamp_ = builderForValue.build(); - onChanged(); - } else { - endTimestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) { - if (endTimestampBuilder_ == null) { - if (endTimestamp_ != null) { - endTimestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(endTimestamp_).mergeFrom(value).buildPartial(); - } else { - endTimestamp_ = value; - } - onChanged(); - } else { - endTimestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - public Builder clearEndTimestamp() { - if (endTimestampBuilder_ == null) { - endTimestamp_ = null; - onChanged(); - } else { - endTimestamp_ = null; - endTimestampBuilder_ = null; - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() { - - onChanged(); - return getEndTimestampFieldBuilder().getBuilder(); - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { - if (endTimestampBuilder_ != null) { - return endTimestampBuilder_.getMessageOrBuilder(); - } else { - return endTimestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; - } - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getEndTimestampFieldBuilder() { - if (endTimestampBuilder_ == null) { - endTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getEndTimestamp(), - getParentForChildren(), - isClean()); - endTimestamp_ = null; - } - return endTimestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.SubsDescriptor) - } + public static monitoring.Monitoring.AlarmResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:monitoring.SubsDescriptor) - private static final monitoring.Monitoring.SubsDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.SubsDescriptor(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static monitoring.Monitoring.SubsDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static Builder newBuilder(monitoring.Monitoring.AlarmResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public monitoring.Monitoring.SubsDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - } + /** + * Protobuf type {@code monitoring.AlarmResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.AlarmResponse) + monitoring.Monitoring.AlarmResponseOrBuilder { - public interface SubscriptionIDOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.SubscriptionID) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_descriptor; + } - /** - * .context.Uuid subs_id = 1; - * @return Whether the subsId field is set. - */ - boolean hasSubsId(); - /** - * .context.Uuid subs_id = 1; - * @return The subsId. - */ - context.ContextOuterClass.Uuid getSubsId(); - /** - * .context.Uuid subs_id = 1; - */ - context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder(); - } - /** - * Protobuf type {@code monitoring.SubscriptionID} - */ - public static final class SubscriptionID extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.SubscriptionID) - SubscriptionIDOrBuilder { - private static final long serialVersionUID = 0L; - // Use SubscriptionID.newBuilder() to construct. - private SubscriptionID(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubscriptionID() { - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmResponse.class, monitoring.Monitoring.AlarmResponse.Builder.class); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubscriptionID(); - } + // Construct using monitoring.Monitoring.AlarmResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @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; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubscriptionID.class, monitoring.Monitoring.SubscriptionID.Builder.class); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - public static final int SUBS_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid subsId_; - /** - * .context.Uuid subs_id = 1; - * @return Whether the subsId field is set. - */ - @java.lang.Override - public boolean hasSubsId() { - return subsId_ != null; - } - /** - * .context.Uuid subs_id = 1; - * @return The subsId. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getSubsId() { - return subsId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; - } - /** - * .context.Uuid subs_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder() { - return getSubsId(); - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (alarmIdBuilder_ == null) { + alarmId_ = null; + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + text_ = ""; + if (kpiListBuilder_ == null) { + kpiList_ = null; + } else { + kpiList_ = null; + kpiListBuilder_ = null; + } + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_descriptor; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public monitoring.Monitoring.AlarmResponse getDefaultInstanceForType() { + return monitoring.Monitoring.AlarmResponse.getDefaultInstance(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (subsId_ != null) { - output.writeMessage(1, getSubsId()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public monitoring.Monitoring.AlarmResponse build() { + monitoring.Monitoring.AlarmResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (subsId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubsId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @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(); + } + onBuilt(); + return result; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.SubscriptionID)) { - return super.equals(obj); - } - monitoring.Monitoring.SubscriptionID other = (monitoring.Monitoring.SubscriptionID) obj; - - if (hasSubsId() != other.hasSubsId()) return false; - if (hasSubsId()) { - if (!getSubsId() - .equals(other.getSubsId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubsId()) { - hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; - hash = (53 * hash) + getSubsId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static monitoring.Monitoring.SubscriptionID parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubscriptionID parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubscriptionID parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubscriptionID parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubscriptionID parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.SubscriptionID prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.SubscriptionID} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.SubscriptionID) - monitoring.Monitoring.SubscriptionIDOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubscriptionID.class, monitoring.Monitoring.SubscriptionID.Builder.class); - } - - // 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; - subsIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.SubscriptionID getDefaultInstanceForType() { - return monitoring.Monitoring.SubscriptionID.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.SubscriptionID build() { - monitoring.Monitoring.SubscriptionID result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.SubscriptionID) { - return mergeFrom((monitoring.Monitoring.SubscriptionID)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.SubscriptionID other) { - if (other == monitoring.Monitoring.SubscriptionID.getDefaultInstance()) return this; - if (other.hasSubsId()) { - mergeSubsId(other.getSubsId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubscriptionID) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid subsId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> subsIdBuilder_; - /** - * .context.Uuid subs_id = 1; - * @return Whether the subsId field is set. - */ - public boolean hasSubsId() { - return subsIdBuilder_ != null || subsId_ != null; - } - /** - * .context.Uuid subs_id = 1; - * @return The subsId. - */ - public context.ContextOuterClass.Uuid getSubsId() { - if (subsIdBuilder_ == null) { - return subsId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; - } else { - return subsIdBuilder_.getMessage(); - } - } - /** - * .context.Uuid subs_id = 1; - */ - public Builder setSubsId(context.ContextOuterClass.Uuid value) { - if (subsIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subsId_ = value; - onChanged(); - } else { - subsIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid subs_id = 1; - */ - public Builder setSubsId( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (subsIdBuilder_ == null) { - subsId_ = builderForValue.build(); - onChanged(); - } else { - subsIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid subs_id = 1; - */ - public Builder mergeSubsId(context.ContextOuterClass.Uuid value) { - if (subsIdBuilder_ == null) { - if (subsId_ != null) { - subsId_ = - context.ContextOuterClass.Uuid.newBuilder(subsId_).mergeFrom(value).buildPartial(); - } else { - subsId_ = value; - } - onChanged(); - } else { - subsIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid subs_id = 1; - */ - public Builder clearSubsId() { - if (subsIdBuilder_ == null) { - subsId_ = null; - onChanged(); - } else { - subsId_ = null; - subsIdBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid subs_id = 1; - */ - public context.ContextOuterClass.Uuid.Builder getSubsIdBuilder() { - - onChanged(); - return getSubsIdFieldBuilder().getBuilder(); - } - /** - * .context.Uuid subs_id = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder() { - if (subsIdBuilder_ != null) { - return subsIdBuilder_.getMessageOrBuilder(); - } else { - return subsId_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; - } - } - /** - * .context.Uuid subs_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getSubsIdFieldBuilder() { - if (subsIdBuilder_ == null) { - subsIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getSubsId(), - getParentForChildren(), - isClean()); - subsId_ = null; - } - return subsIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.SubscriptionID) - } + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - // @@protoc_insertion_point(class_scope:monitoring.SubscriptionID) - private static final monitoring.Monitoring.SubscriptionID DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.SubscriptionID(); - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - public static monitoring.Monitoring.SubscriptionID getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.AlarmResponse) { + return mergeFrom((monitoring.Monitoring.AlarmResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public Builder mergeFrom(monitoring.Monitoring.AlarmResponse other) { + if (other == monitoring.Monitoring.AlarmResponse.getDefaultInstance()) + return this; + if (other.hasAlarmId()) { + mergeAlarmId(other.getAlarmId()); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + if (other.hasKpiList()) { + mergeKpiList(other.getKpiList()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public monitoring.Monitoring.SubscriptionID getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.AlarmResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - } + private monitoring.Monitoring.AlarmID alarmId_; - public interface SubsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.SubsResponse) - com.google.protobuf.MessageOrBuilder { + private com.google.protobuf.SingleFieldBuilderV3 alarmIdBuilder_; - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return Whether the subsId field is set. - */ - boolean hasSubsId(); - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return The subsId. - */ - monitoring.Monitoring.SubscriptionID getSubsId(); - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder(); + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + public boolean hasAlarmId() { + return alarmIdBuilder_ != null || alarmId_ != null; + } - /** - * .monitoring.KpiList kpi_list = 2; - * @return Whether the kpiList field is set. - */ - boolean hasKpiList(); - /** - * .monitoring.KpiList kpi_list = 2; - * @return The kpiList. - */ - monitoring.Monitoring.KpiList getKpiList(); - /** - * .monitoring.KpiList kpi_list = 2; - */ - monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder(); - } - /** - * Protobuf type {@code monitoring.SubsResponse} - */ - public static final class SubsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.SubsResponse) - SubsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use SubsResponse.newBuilder() to construct. - private SubsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubsResponse() { - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + public monitoring.Monitoring.AlarmID getAlarmId() { + if (alarmIdBuilder_ == null) { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } else { + return alarmIdBuilder_.getMessage(); + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubsResponse(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + alarmId_ = value; + onChanged(); + } else { + alarmIdBuilder_.setMessage(value); + } + return this; + } - @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; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder setAlarmId(monitoring.Monitoring.AlarmID.Builder builderForValue) { + if (alarmIdBuilder_ == null) { + alarmId_ = builderForValue.build(); + onChanged(); + } else { + alarmIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsResponse.class, monitoring.Monitoring.SubsResponse.Builder.class); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (alarmId_ != null) { + alarmId_ = monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); + } else { + alarmId_ = value; + } + onChanged(); + } else { + alarmIdBuilder_.mergeFrom(value); + } + return this; + } - public static final int SUBS_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.SubscriptionID subsId_; - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return Whether the subsId field is set. - */ - @java.lang.Override - public boolean hasSubsId() { - return subsId_ != null; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return The subsId. - */ - @java.lang.Override - public monitoring.Monitoring.SubscriptionID getSubsId() { - return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { - return getSubsId(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder clearAlarmId() { + if (alarmIdBuilder_ == null) { + alarmId_ = null; + onChanged(); + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + return this; + } - public static final int KPI_LIST_FIELD_NUMBER = 2; - private monitoring.Monitoring.KpiList kpiList_; - /** - * .monitoring.KpiList kpi_list = 2; - * @return Whether the kpiList field is set. - */ - @java.lang.Override - public boolean hasKpiList() { - return kpiList_ != null; - } - /** - * .monitoring.KpiList kpi_list = 2; - * @return The kpiList. - */ - @java.lang.Override - public monitoring.Monitoring.KpiList getKpiList() { - return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - @java.lang.Override - public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { - return getKpiList(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { + onChanged(); + return getAlarmIdFieldBuilder().getBuilder(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + if (alarmIdBuilder_ != null) { + return alarmIdBuilder_.getMessageOrBuilder(); + } else { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getAlarmIdFieldBuilder() { + if (alarmIdBuilder_ == null) { + alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getAlarmId(), getParentForChildren(), isClean()); + alarmId_ = null; + } + return alarmIdBuilder_; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (subsId_ != null) { - output.writeMessage(1, getSubsId()); - } - if (kpiList_ != null) { - output.writeMessage(2, getKpiList()); - } - unknownFields.writeTo(output); - } + private java.lang.Object text_ = ""; + + /** + * string text = 2; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (subsId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubsId()); - } - if (kpiList_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getKpiList()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * string text = 2; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.SubsResponse)) { - return super.equals(obj); - } - monitoring.Monitoring.SubsResponse other = (monitoring.Monitoring.SubsResponse) obj; - - if (hasSubsId() != other.hasSubsId()) return false; - if (hasSubsId()) { - if (!getSubsId() - .equals(other.getSubsId())) return false; - } - if (hasKpiList() != other.hasKpiList()) return false; - if (hasKpiList()) { - if (!getKpiList() - .equals(other.getKpiList())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string text = 2; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubsId()) { - hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; - hash = (53 * hash) + getSubsId().hashCode(); - } - if (hasKpiList()) { - hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; - hash = (53 * hash) + getKpiList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * string text = 2; + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } - public static monitoring.Monitoring.SubsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * string text = 2; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.SubsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private monitoring.Monitoring.KpiList kpiList_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.SubsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.SubsResponse) - monitoring.Monitoring.SubsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsResponse.class, monitoring.Monitoring.SubsResponse.Builder.class); - } - - // 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; - subsIdBuilder_ = null; - } - if (kpiListBuilder_ == null) { - kpiList_ = null; - } else { - kpiList_ = null; - kpiListBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_SubsResponse_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.SubsResponse getDefaultInstanceForType() { - return monitoring.Monitoring.SubsResponse.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.SubsResponse build() { - monitoring.Monitoring.SubsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.SubsResponse) { - return mergeFrom((monitoring.Monitoring.SubsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.SubsResponse other) { - if (other == monitoring.Monitoring.SubsResponse.getDefaultInstance()) return this; - if (other.hasSubsId()) { - mergeSubsId(other.getSubsId()); - } - if (other.hasKpiList()) { - mergeKpiList(other.getKpiList()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.SubscriptionID subsId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> subsIdBuilder_; - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return Whether the subsId field is set. - */ - public boolean hasSubsId() { - return subsIdBuilder_ != null || subsId_ != null; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return The subsId. - */ - public monitoring.Monitoring.SubscriptionID getSubsId() { - if (subsIdBuilder_ == null) { - return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; - } else { - return subsIdBuilder_.getMessage(); - } - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder setSubsId(monitoring.Monitoring.SubscriptionID value) { - if (subsIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subsId_ = value; - onChanged(); - } else { - subsIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder setSubsId( - monitoring.Monitoring.SubscriptionID.Builder builderForValue) { - if (subsIdBuilder_ == null) { - subsId_ = builderForValue.build(); - onChanged(); - } else { - subsIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder mergeSubsId(monitoring.Monitoring.SubscriptionID value) { - if (subsIdBuilder_ == null) { - if (subsId_ != null) { - subsId_ = - monitoring.Monitoring.SubscriptionID.newBuilder(subsId_).mergeFrom(value).buildPartial(); - } else { - subsId_ = value; - } - onChanged(); - } else { - subsIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder clearSubsId() { - if (subsIdBuilder_ == null) { - subsId_ = null; - onChanged(); - } else { - subsId_ = null; - subsIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public monitoring.Monitoring.SubscriptionID.Builder getSubsIdBuilder() { - - onChanged(); - return getSubsIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { - if (subsIdBuilder_ != null) { - return subsIdBuilder_.getMessageOrBuilder(); - } else { - return subsId_ == null ? - monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; - } - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> - getSubsIdFieldBuilder() { - if (subsIdBuilder_ == null) { - subsIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder>( - getSubsId(), - getParentForChildren(), - isClean()); - subsId_ = null; - } - return subsIdBuilder_; - } - - private monitoring.Monitoring.KpiList kpiList_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> kpiListBuilder_; - /** - * .monitoring.KpiList kpi_list = 2; - * @return Whether the kpiList field is set. - */ - public boolean hasKpiList() { - return kpiListBuilder_ != null || kpiList_ != null; - } - /** - * .monitoring.KpiList kpi_list = 2; - * @return The kpiList. - */ - public monitoring.Monitoring.KpiList getKpiList() { - if (kpiListBuilder_ == null) { - return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; - } else { - return kpiListBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - public Builder setKpiList(monitoring.Monitoring.KpiList value) { - if (kpiListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiList_ = value; - onChanged(); - } else { - kpiListBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - public Builder setKpiList( - monitoring.Monitoring.KpiList.Builder builderForValue) { - if (kpiListBuilder_ == null) { - kpiList_ = builderForValue.build(); - onChanged(); - } else { - kpiListBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { - if (kpiListBuilder_ == null) { - if (kpiList_ != null) { - kpiList_ = - monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); - } else { - kpiList_ = value; - } - onChanged(); - } else { - kpiListBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - public Builder clearKpiList() { - if (kpiListBuilder_ == null) { - kpiList_ = null; - onChanged(); - } else { - kpiList_ = null; - kpiListBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { - - onChanged(); - return getKpiListFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { - if (kpiListBuilder_ != null) { - return kpiListBuilder_.getMessageOrBuilder(); - } else { - return kpiList_ == null ? - monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; - } - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> - getKpiListFieldBuilder() { - if (kpiListBuilder_ == null) { - kpiListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder>( - getKpiList(), - getParentForChildren(), - isClean()); - kpiList_ = null; - } - return kpiListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.SubsResponse) - } + private com.google.protobuf.SingleFieldBuilderV3 kpiListBuilder_; - // @@protoc_insertion_point(class_scope:monitoring.SubsResponse) - private static final monitoring.Monitoring.SubsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.SubsResponse(); - } + /** + * .monitoring.KpiList kpi_list = 3; + * @return Whether the kpiList field is set. + */ + public boolean hasKpiList() { + return kpiListBuilder_ != null || kpiList_ != null; + } - public static monitoring.Monitoring.SubsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.KpiList kpi_list = 3; + * @return The kpiList. + */ + public monitoring.Monitoring.KpiList getKpiList() { + if (kpiListBuilder_ == null) { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; + } else { + return kpiListBuilder_.getMessage(); + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + public Builder setKpiList(monitoring.Monitoring.KpiList value) { + if (kpiListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiList_ = value; + onChanged(); + } else { + kpiListBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + public Builder setKpiList(monitoring.Monitoring.KpiList.Builder builderForValue) { + if (kpiListBuilder_ == null) { + kpiList_ = builderForValue.build(); + onChanged(); + } else { + kpiListBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public monitoring.Monitoring.SubsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { + if (kpiListBuilder_ == null) { + if (kpiList_ != null) { + kpiList_ = monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); + } else { + kpiList_ = value; + } + onChanged(); + } else { + kpiListBuilder_.mergeFrom(value); + } + return this; + } - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + public Builder clearKpiList() { + if (kpiListBuilder_ == null) { + kpiList_ = null; + onChanged(); + } else { + kpiList_ = null; + kpiListBuilder_ = null; + } + return this; + } - public interface SubsListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.SubsList) - com.google.protobuf.MessageOrBuilder { + /** + * .monitoring.KpiList kpi_list = 3; + */ + public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { + onChanged(); + return getKpiListFieldBuilder().getBuilder(); + } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - java.util.List - getSubsDescriptorList(); - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index); - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - int getSubsDescriptorCount(); - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - java.util.List - getSubsDescriptorOrBuilderList(); - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder( - int index); - } - /** - * Protobuf type {@code monitoring.SubsList} - */ - public static final class SubsList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.SubsList) - SubsListOrBuilder { - 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(); - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + if (kpiListBuilder_ != null) { + return kpiListBuilder_.getMessageOrBuilder(); + } else { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubsList(); - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiListFieldBuilder() { + if (kpiListBuilder_ == null) { + kpiListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiList(), getParentForChildren(), isClean()); + kpiList_ = null; + } + return kpiListBuilder_; + } - @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(); - 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(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsList.class, monitoring.Monitoring.SubsList.Builder.class); - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.AlarmResponse) + } - public static final int SUBS_DESCRIPTOR_FIELD_NUMBER = 1; - private java.util.List subsDescriptor_; - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - @java.lang.Override - public java.util.List getSubsDescriptorList() { - return subsDescriptor_; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - @java.lang.Override - public java.util.List - getSubsDescriptorOrBuilderList() { - return subsDescriptor_; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - @java.lang.Override - public int getSubsDescriptorCount() { - return subsDescriptor_.size(); - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - @java.lang.Override - public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index) { - return subsDescriptor_.get(index); - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - @java.lang.Override - public monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder( - int index) { - return subsDescriptor_.get(index); - } + // @@protoc_insertion_point(class_scope:monitoring.AlarmResponse) + private static final monitoring.Monitoring.AlarmResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmResponse(); + } + + public static monitoring.Monitoring.AlarmResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - memoizedIsInitialized = 1; - return true; + @java.lang.Override + public monitoring.Monitoring.AlarmResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < subsDescriptor_.size(); i++) { - output.writeMessage(1, subsDescriptor_.get(i)); - } - unknownFields.writeTo(output); - } + public interface AlarmListOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.AlarmList) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < subsDescriptor_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, subsDescriptor_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + java.util.List getAlarmDescriptorList(); - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.SubsList)) { - return super.equals(obj); - } - monitoring.Monitoring.SubsList other = (monitoring.Monitoring.SubsList) obj; - - if (!getSubsDescriptorList() - .equals(other.getSubsDescriptorList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSubsDescriptorCount() > 0) { - hash = (37 * hash) + SUBS_DESCRIPTOR_FIELD_NUMBER; - hash = (53 * hash) + getSubsDescriptorList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + int getAlarmDescriptorCount(); - public static monitoring.Monitoring.SubsList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubsList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubsList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + java.util.List getAlarmDescriptorOrBuilderList(); - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.SubsList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder(int index); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** - * Protobuf type {@code monitoring.SubsList} + * Protobuf type {@code monitoring.AlarmList} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.SubsList) - monitoring.Monitoring.SubsListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsList.class, monitoring.Monitoring.SubsList.Builder.class); - } - - // 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(); - if (subsDescriptorBuilder_ == null) { - subsDescriptor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - subsDescriptorBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.SubsList getDefaultInstanceForType() { - return monitoring.Monitoring.SubsList.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.SubsList build() { - monitoring.Monitoring.SubsList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public monitoring.Monitoring.SubsList buildPartial() { - monitoring.Monitoring.SubsList result = new monitoring.Monitoring.SubsList(this); - int from_bitField0_ = bitField0_; - if (subsDescriptorBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - subsDescriptor_ = java.util.Collections.unmodifiableList(subsDescriptor_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.subsDescriptor_ = subsDescriptor_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.SubsList) { - return mergeFrom((monitoring.Monitoring.SubsList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.SubsList other) { - if (other == monitoring.Monitoring.SubsList.getDefaultInstance()) return this; - if (subsDescriptorBuilder_ == null) { - if (!other.subsDescriptor_.isEmpty()) { - if (subsDescriptor_.isEmpty()) { - subsDescriptor_ = other.subsDescriptor_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSubsDescriptorIsMutable(); - subsDescriptor_.addAll(other.subsDescriptor_); - } - onChanged(); - } - } else { - if (!other.subsDescriptor_.isEmpty()) { - if (subsDescriptorBuilder_.isEmpty()) { - subsDescriptorBuilder_.dispose(); - subsDescriptorBuilder_ = null; - subsDescriptor_ = other.subsDescriptor_; - bitField0_ = (bitField0_ & ~0x00000001); - subsDescriptorBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubsDescriptorFieldBuilder() : null; - } else { - subsDescriptorBuilder_.addAllMessages(other.subsDescriptor_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubsList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List subsDescriptor_ = - java.util.Collections.emptyList(); - private void ensureSubsDescriptorIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - subsDescriptor_ = new java.util.ArrayList(subsDescriptor_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsDescriptor.Builder, monitoring.Monitoring.SubsDescriptorOrBuilder> subsDescriptorBuilder_; - - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public java.util.List getSubsDescriptorList() { - if (subsDescriptorBuilder_ == null) { - return java.util.Collections.unmodifiableList(subsDescriptor_); - } else { - return subsDescriptorBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public int getSubsDescriptorCount() { - if (subsDescriptorBuilder_ == null) { - return subsDescriptor_.size(); - } else { - return subsDescriptorBuilder_.getCount(); - } - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index) { - if (subsDescriptorBuilder_ == null) { - return subsDescriptor_.get(index); - } else { - return subsDescriptorBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder setSubsDescriptor( - int index, monitoring.Monitoring.SubsDescriptor value) { - if (subsDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubsDescriptorIsMutable(); - subsDescriptor_.set(index, value); - onChanged(); - } else { - subsDescriptorBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder setSubsDescriptor( - int index, monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { - if (subsDescriptorBuilder_ == null) { - ensureSubsDescriptorIsMutable(); - subsDescriptor_.set(index, builderForValue.build()); - onChanged(); - } else { - subsDescriptorBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder addSubsDescriptor(monitoring.Monitoring.SubsDescriptor value) { - if (subsDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubsDescriptorIsMutable(); - subsDescriptor_.add(value); - onChanged(); - } else { - subsDescriptorBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder addSubsDescriptor( - int index, monitoring.Monitoring.SubsDescriptor value) { - if (subsDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubsDescriptorIsMutable(); - subsDescriptor_.add(index, value); - onChanged(); - } else { - subsDescriptorBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder addSubsDescriptor( - monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { - if (subsDescriptorBuilder_ == null) { - ensureSubsDescriptorIsMutable(); - subsDescriptor_.add(builderForValue.build()); - onChanged(); - } else { - subsDescriptorBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder addSubsDescriptor( - int index, monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { - if (subsDescriptorBuilder_ == null) { - ensureSubsDescriptorIsMutable(); - subsDescriptor_.add(index, builderForValue.build()); - onChanged(); - } else { - subsDescriptorBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder addAllSubsDescriptor( - java.lang.Iterable values) { - if (subsDescriptorBuilder_ == null) { - ensureSubsDescriptorIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subsDescriptor_); - onChanged(); - } else { - subsDescriptorBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder clearSubsDescriptor() { - if (subsDescriptorBuilder_ == null) { - subsDescriptor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - subsDescriptorBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder removeSubsDescriptor(int index) { - if (subsDescriptorBuilder_ == null) { - ensureSubsDescriptorIsMutable(); - subsDescriptor_.remove(index); - onChanged(); - } else { - subsDescriptorBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public monitoring.Monitoring.SubsDescriptor.Builder getSubsDescriptorBuilder( - int index) { - return getSubsDescriptorFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder( - int index) { - if (subsDescriptorBuilder_ == null) { - return subsDescriptor_.get(index); } else { - return subsDescriptorBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public java.util.List - getSubsDescriptorOrBuilderList() { - if (subsDescriptorBuilder_ != null) { - return subsDescriptorBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subsDescriptor_); - } - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public monitoring.Monitoring.SubsDescriptor.Builder addSubsDescriptorBuilder() { - return getSubsDescriptorFieldBuilder().addBuilder( - monitoring.Monitoring.SubsDescriptor.getDefaultInstance()); - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public monitoring.Monitoring.SubsDescriptor.Builder addSubsDescriptorBuilder( - int index) { - return getSubsDescriptorFieldBuilder().addBuilder( - index, monitoring.Monitoring.SubsDescriptor.getDefaultInstance()); - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public java.util.List - getSubsDescriptorBuilderList() { - return getSubsDescriptorFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsDescriptor.Builder, monitoring.Monitoring.SubsDescriptorOrBuilder> - getSubsDescriptorFieldBuilder() { - if (subsDescriptorBuilder_ == null) { - subsDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsDescriptor.Builder, monitoring.Monitoring.SubsDescriptorOrBuilder>( - subsDescriptor_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - subsDescriptor_ = null; - } - return subsDescriptorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.SubsList) - } + public static final class AlarmList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.AlarmList) + AlarmListOrBuilder { - // @@protoc_insertion_point(class_scope:monitoring.SubsList) - private static final monitoring.Monitoring.SubsList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.SubsList(); - } + private static final long serialVersionUID = 0L; - public static monitoring.Monitoring.SubsList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Use AlarmList.newBuilder() to construct. + private AlarmList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private AlarmList() { + alarmDescriptor_ = java.util.Collections.emptyList(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AlarmList(); + } - @java.lang.Override - public monitoring.Monitoring.SubsList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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(); + 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 interface AlarmDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.AlarmDescriptor) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; + } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - boolean hasAlarmId(); - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - monitoring.Monitoring.AlarmID getAlarmId(); - /** - * .monitoring.AlarmID alarm_id = 1; - */ - monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmList.class, monitoring.Monitoring.AlarmList.Builder.class); + } - /** - * string alarm_description = 2; - * @return The alarmDescription. - */ - java.lang.String getAlarmDescription(); - /** - * string alarm_description = 2; - * @return The bytes for alarmDescription. - */ - com.google.protobuf.ByteString - getAlarmDescriptionBytes(); + public static final int ALARM_DESCRIPTOR_FIELD_NUMBER = 1; - /** - * string name = 3; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 3; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + private java.util.List alarmDescriptor_; - /** - * .monitoring.KpiId kpi_id = 4; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 4; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 4; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + @java.lang.Override + public java.util.List getAlarmDescriptorList() { + return alarmDescriptor_; + } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - * @return Whether the kpiValueRange field is set. - */ - boolean hasKpiValueRange(); - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - * @return The kpiValueRange. - */ - monitoring.Monitoring.KpiValueRange getKpiValueRange(); - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder(); + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + @java.lang.Override + public java.util.List getAlarmDescriptorOrBuilderList() { + return alarmDescriptor_; + } - /** - * .context.Timestamp timestamp = 6; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 6; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 6; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); - } - /** - * Protobuf type {@code monitoring.AlarmDescriptor} - */ - public static final class AlarmDescriptor extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.AlarmDescriptor) - AlarmDescriptorOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlarmDescriptor.newBuilder() to construct. - private AlarmDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AlarmDescriptor() { - alarmDescription_ = ""; - name_ = ""; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + @java.lang.Override + public int getAlarmDescriptorCount() { + return alarmDescriptor_.size(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AlarmDescriptor(); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + @java.lang.Override + public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index) { + return alarmDescriptor_.get(index); + } - @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; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + @java.lang.Override + public monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder(int index) { + return alarmDescriptor_.get(index); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmDescriptor.class, monitoring.Monitoring.AlarmDescriptor.Builder.class); - } + private byte memoizedIsInitialized = -1; - public static final int ALARM_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.AlarmID alarmId_; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - @java.lang.Override - public boolean hasAlarmId() { - return alarmId_ != null; - } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - @java.lang.Override - public monitoring.Monitoring.AlarmID getAlarmId() { - return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - return getAlarmId(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - public static final int ALARM_DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object alarmDescription_; - /** - * string alarm_description = 2; - * @return The alarmDescription. - */ - @java.lang.Override - public java.lang.String getAlarmDescription() { - java.lang.Object ref = alarmDescription_; - 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(); - alarmDescription_ = s; - return s; - } - } - /** - * string alarm_description = 2; - * @return The bytes for alarmDescription. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAlarmDescriptionBytes() { - java.lang.Object ref = alarmDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - alarmDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < alarmDescriptor_.size(); i++) { + output.writeMessage(1, alarmDescriptor_.get(i)); + } + unknownFields.writeTo(output); + } - public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; - /** - * string name = 3; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 3; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < alarmDescriptor_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, alarmDescriptor_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static final int KPI_ID_FIELD_NUMBER = 4; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 4; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 4; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.AlarmList)) { + return super.equals(obj); + } + monitoring.Monitoring.AlarmList other = (monitoring.Monitoring.AlarmList) obj; + if (!getAlarmDescriptorList().equals(other.getAlarmDescriptorList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAlarmDescriptorCount() > 0) { + hash = (37 * hash) + ALARM_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getAlarmDescriptorList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - public static final int KPI_VALUE_RANGE_FIELD_NUMBER = 5; - private monitoring.Monitoring.KpiValueRange kpiValueRange_; - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - * @return Whether the kpiValueRange field is set. - */ - @java.lang.Override - public boolean hasKpiValueRange() { - return kpiValueRange_ != null; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - * @return The kpiValueRange. - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueRange getKpiValueRange() { - return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { - return getKpiValueRange(); - } + public static monitoring.Monitoring.AlarmList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int TIMESTAMP_FIELD_NUMBER = 6; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 6; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 6; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .context.Timestamp timestamp = 6; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } + public static monitoring.Monitoring.AlarmList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static monitoring.Monitoring.AlarmList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - memoizedIsInitialized = 1; - return true; - } + public static monitoring.Monitoring.AlarmList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (alarmId_ != null) { - output.writeMessage(1, getAlarmId()); - } - if (!getAlarmDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, alarmDescription_); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - if (kpiId_ != null) { - output.writeMessage(4, getKpiId()); - } - if (kpiValueRange_ != null) { - output.writeMessage(5, getKpiValueRange()); - } - if (timestamp_ != null) { - output.writeMessage(6, getTimestamp()); - } - unknownFields.writeTo(output); - } + public static monitoring.Monitoring.AlarmList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (alarmId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAlarmId()); - } - if (!getAlarmDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, alarmDescription_); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getKpiId()); - } - if (kpiValueRange_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getKpiValueRange()); - } - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getTimestamp()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static monitoring.Monitoring.AlarmList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.AlarmDescriptor)) { - return super.equals(obj); - } - monitoring.Monitoring.AlarmDescriptor other = (monitoring.Monitoring.AlarmDescriptor) obj; - - if (hasAlarmId() != other.hasAlarmId()) return false; - if (hasAlarmId()) { - if (!getAlarmId() - .equals(other.getAlarmId())) return false; - } - if (!getAlarmDescription() - .equals(other.getAlarmDescription())) return false; - if (!getName() - .equals(other.getName())) return false; - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (hasKpiValueRange() != other.hasKpiValueRange()) return false; - if (hasKpiValueRange()) { - if (!getKpiValueRange() - .equals(other.getKpiValueRange())) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static monitoring.Monitoring.AlarmList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAlarmId()) { - hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; - hash = (53 * hash) + getAlarmId().hashCode(); - } - hash = (37 * hash) + ALARM_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getAlarmDescription().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - if (hasKpiValueRange()) { - hash = (37 * hash) + KPI_VALUE_RANGE_FIELD_NUMBER; - hash = (53 * hash) + getKpiValueRange().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static monitoring.Monitoring.AlarmList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmDescriptor parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static monitoring.Monitoring.AlarmList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.AlarmDescriptor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static monitoring.Monitoring.AlarmList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.AlarmDescriptor} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.AlarmDescriptor) - monitoring.Monitoring.AlarmDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmDescriptor.class, monitoring.Monitoring.AlarmDescriptor.Builder.class); - } - - // 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; - alarmIdBuilder_ = null; - } - alarmDescription_ = ""; - - name_ = ""; - - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - if (kpiValueRangeBuilder_ == null) { - kpiValueRange_ = null; - } else { - kpiValueRange_ = null; - kpiValueRangeBuilder_ = null; - } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.AlarmDescriptor getDefaultInstanceForType() { - return monitoring.Monitoring.AlarmDescriptor.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.AlarmDescriptor build() { - monitoring.Monitoring.AlarmDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.AlarmDescriptor) { - return mergeFrom((monitoring.Monitoring.AlarmDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.AlarmDescriptor other) { - if (other == monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()) return this; - if (other.hasAlarmId()) { - mergeAlarmId(other.getAlarmId()); - } - if (!other.getAlarmDescription().isEmpty()) { - alarmDescription_ = other.alarmDescription_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - if (other.hasKpiValueRange()) { - mergeKpiValueRange(other.getKpiValueRange()); - } - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmDescriptor) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.AlarmID alarmId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIdBuilder_; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - public boolean hasAlarmId() { - return alarmIdBuilder_ != null || alarmId_ != null; - } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - public monitoring.Monitoring.AlarmID getAlarmId() { - if (alarmIdBuilder_ == null) { - return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } else { - return alarmIdBuilder_.getMessage(); - } - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { - if (alarmIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - alarmId_ = value; - onChanged(); - } else { - alarmIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder setAlarmId( - monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmIdBuilder_ == null) { - alarmId_ = builderForValue.build(); - onChanged(); - } else { - alarmIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { - if (alarmIdBuilder_ == null) { - if (alarmId_ != null) { - alarmId_ = - monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); - } else { - alarmId_ = value; - } - onChanged(); - } else { - alarmIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder clearAlarmId() { - if (alarmIdBuilder_ == null) { - alarmId_ = null; - onChanged(); - } else { - alarmId_ = null; - alarmIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { - - onChanged(); - return getAlarmIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - if (alarmIdBuilder_ != null) { - return alarmIdBuilder_.getMessageOrBuilder(); - } else { - return alarmId_ == null ? - monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmIdFieldBuilder() { - if (alarmIdBuilder_ == null) { - alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder>( - getAlarmId(), - getParentForChildren(), - isClean()); - alarmId_ = null; - } - return alarmIdBuilder_; - } - - private java.lang.Object alarmDescription_ = ""; - /** - * string alarm_description = 2; - * @return The alarmDescription. - */ - public java.lang.String getAlarmDescription() { - java.lang.Object ref = alarmDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - alarmDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string alarm_description = 2; - * @return The bytes for alarmDescription. - */ - public com.google.protobuf.ByteString - getAlarmDescriptionBytes() { - java.lang.Object ref = alarmDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - alarmDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string alarm_description = 2; - * @param value The alarmDescription to set. - * @return This builder for chaining. - */ - public Builder setAlarmDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - alarmDescription_ = value; - onChanged(); - return this; - } - /** - * string alarm_description = 2; - * @return This builder for chaining. - */ - public Builder clearAlarmDescription() { - - alarmDescription_ = getDefaultInstance().getAlarmDescription(); - onChanged(); - return this; - } - /** - * string alarm_description = 2; - * @param value The bytes for alarmDescription to set. - * @return This builder for chaining. - */ - public Builder setAlarmDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - alarmDescription_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - * string name = 3; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 3; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 3; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 3; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 3; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private monitoring.Monitoring.KpiId kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - /** - * .monitoring.KpiId kpi_id = 4; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 4; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - - private monitoring.Monitoring.KpiValueRange kpiValueRange_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder> kpiValueRangeBuilder_; - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - * @return Whether the kpiValueRange field is set. - */ - public boolean hasKpiValueRange() { - return kpiValueRangeBuilder_ != null || kpiValueRange_ != null; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - * @return The kpiValueRange. - */ - public monitoring.Monitoring.KpiValueRange getKpiValueRange() { - if (kpiValueRangeBuilder_ == null) { - return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; - } else { - return kpiValueRangeBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder setKpiValueRange(monitoring.Monitoring.KpiValueRange value) { - if (kpiValueRangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiValueRange_ = value; - onChanged(); - } else { - kpiValueRangeBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder setKpiValueRange( - monitoring.Monitoring.KpiValueRange.Builder builderForValue) { - if (kpiValueRangeBuilder_ == null) { - kpiValueRange_ = builderForValue.build(); - onChanged(); - } else { - kpiValueRangeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder mergeKpiValueRange(monitoring.Monitoring.KpiValueRange value) { - if (kpiValueRangeBuilder_ == null) { - if (kpiValueRange_ != null) { - kpiValueRange_ = - monitoring.Monitoring.KpiValueRange.newBuilder(kpiValueRange_).mergeFrom(value).buildPartial(); - } else { - kpiValueRange_ = value; - } - onChanged(); - } else { - kpiValueRangeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder clearKpiValueRange() { - if (kpiValueRangeBuilder_ == null) { - kpiValueRange_ = null; - onChanged(); - } else { - kpiValueRange_ = null; - kpiValueRangeBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - public monitoring.Monitoring.KpiValueRange.Builder getKpiValueRangeBuilder() { - - onChanged(); - return getKpiValueRangeFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { - if (kpiValueRangeBuilder_ != null) { - return kpiValueRangeBuilder_.getMessageOrBuilder(); - } else { - return kpiValueRange_ == null ? - monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; - } - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder> - getKpiValueRangeFieldBuilder() { - if (kpiValueRangeBuilder_ == null) { - kpiValueRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder>( - getKpiValueRange(), - getParentForChildren(), - isClean()); - kpiValueRange_ = null; - } - return kpiValueRangeBuilder_; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; - /** - * .context.Timestamp timestamp = 6; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 6; - * @return The timestamp. - */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - * .context.Timestamp timestamp = 6; - */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 6; - */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Timestamp timestamp = 6; - */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 6; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - * .context.Timestamp timestamp = 6; - */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .context.Timestamp timestamp = 6; - */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - * .context.Timestamp timestamp = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.AlarmDescriptor) - } + public static monitoring.Monitoring.AlarmList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - // @@protoc_insertion_point(class_scope:monitoring.AlarmDescriptor) - private static final monitoring.Monitoring.AlarmDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmDescriptor(); - } + public static monitoring.Monitoring.AlarmList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public static monitoring.Monitoring.AlarmDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static Builder newBuilder(monitoring.Monitoring.AlarmList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public monitoring.Monitoring.AlarmDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public interface AlarmIDOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.AlarmID) - com.google.protobuf.MessageOrBuilder { + /** + * Protobuf type {@code monitoring.AlarmList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.AlarmList) + monitoring.Monitoring.AlarmListOrBuilder { - /** - * .context.Uuid alarm_id = 1; - * @return Whether the alarmId field is set. - */ - boolean hasAlarmId(); - /** - * .context.Uuid alarm_id = 1; - * @return The alarmId. - */ - context.ContextOuterClass.Uuid getAlarmId(); - /** - * .context.Uuid alarm_id = 1; - */ - context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder(); - } - /** - * Protobuf type {@code monitoring.AlarmID} - */ - public static final class AlarmID extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.AlarmID) - AlarmIDOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlarmID.newBuilder() to construct. - private AlarmID(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AlarmID() { - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AlarmID(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmList.class, monitoring.Monitoring.AlarmList.Builder.class); + } - @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; - } + // Construct using monitoring.Monitoring.AlarmList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmID.class, monitoring.Monitoring.AlarmID.Builder.class); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public static final int ALARM_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid alarmId_; - /** - * .context.Uuid alarm_id = 1; - * @return Whether the alarmId field is set. - */ - @java.lang.Override - public boolean hasAlarmId() { - return alarmId_ != null; - } - /** - * .context.Uuid alarm_id = 1; - * @return The alarmId. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getAlarmId() { - return alarmId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; - } - /** - * .context.Uuid alarm_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder() { - return getAlarmId(); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAlarmDescriptorFieldBuilder(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder clear() { + super.clear(); + if (alarmDescriptorBuilder_ == null) { + alarmDescriptor_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + alarmDescriptorBuilder_.clear(); + } + return this; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (alarmId_ != null) { - output.writeMessage(1, getAlarmId()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public monitoring.Monitoring.AlarmList getDefaultInstanceForType() { + return monitoring.Monitoring.AlarmList.getDefaultInstance(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (alarmId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAlarmId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public monitoring.Monitoring.AlarmList build() { + monitoring.Monitoring.AlarmList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.AlarmID)) { - return super.equals(obj); - } - monitoring.Monitoring.AlarmID other = (monitoring.Monitoring.AlarmID) obj; - - if (hasAlarmId() != other.hasAlarmId()) return false; - if (hasAlarmId()) { - if (!getAlarmId() - .equals(other.getAlarmId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public monitoring.Monitoring.AlarmList buildPartial() { + monitoring.Monitoring.AlarmList result = new monitoring.Monitoring.AlarmList(this); + int from_bitField0_ = bitField0_; + if (alarmDescriptorBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + alarmDescriptor_ = java.util.Collections.unmodifiableList(alarmDescriptor_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.alarmDescriptor_ = alarmDescriptor_; + } else { + result.alarmDescriptor_ = alarmDescriptorBuilder_.build(); + } + onBuilt(); + return result; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAlarmId()) { - hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; - hash = (53 * hash) + getAlarmId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public static monitoring.Monitoring.AlarmID parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmID parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmID parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmID parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmID parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmID parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmID parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmID parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmID parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmID parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmID parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmID parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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 newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.AlarmID prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @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 - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.AlarmID} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.AlarmID) - monitoring.Monitoring.AlarmIDOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmID_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmID.class, monitoring.Monitoring.AlarmID.Builder.class); - } - - // 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; - alarmIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_AlarmID_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.AlarmID getDefaultInstanceForType() { - return monitoring.Monitoring.AlarmID.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.AlarmID build() { - monitoring.Monitoring.AlarmID result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.AlarmID) { - return mergeFrom((monitoring.Monitoring.AlarmID)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.AlarmID other) { - if (other == monitoring.Monitoring.AlarmID.getDefaultInstance()) return this; - if (other.hasAlarmId()) { - mergeAlarmId(other.getAlarmId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmID) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid alarmId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> alarmIdBuilder_; - /** - * .context.Uuid alarm_id = 1; - * @return Whether the alarmId field is set. - */ - public boolean hasAlarmId() { - return alarmIdBuilder_ != null || alarmId_ != null; - } - /** - * .context.Uuid alarm_id = 1; - * @return The alarmId. - */ - public context.ContextOuterClass.Uuid getAlarmId() { - if (alarmIdBuilder_ == null) { - return alarmId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; - } else { - return alarmIdBuilder_.getMessage(); - } - } - /** - * .context.Uuid alarm_id = 1; - */ - public Builder setAlarmId(context.ContextOuterClass.Uuid value) { - if (alarmIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - alarmId_ = value; - onChanged(); - } else { - alarmIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid alarm_id = 1; - */ - public Builder setAlarmId( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (alarmIdBuilder_ == null) { - alarmId_ = builderForValue.build(); - onChanged(); - } else { - alarmIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid alarm_id = 1; - */ - public Builder mergeAlarmId(context.ContextOuterClass.Uuid value) { - if (alarmIdBuilder_ == null) { - if (alarmId_ != null) { - alarmId_ = - context.ContextOuterClass.Uuid.newBuilder(alarmId_).mergeFrom(value).buildPartial(); - } else { - alarmId_ = value; - } - onChanged(); - } else { - alarmIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid alarm_id = 1; - */ - public Builder clearAlarmId() { - if (alarmIdBuilder_ == null) { - alarmId_ = null; - onChanged(); - } else { - alarmId_ = null; - alarmIdBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid alarm_id = 1; - */ - public context.ContextOuterClass.Uuid.Builder getAlarmIdBuilder() { - - onChanged(); - return getAlarmIdFieldBuilder().getBuilder(); - } - /** - * .context.Uuid alarm_id = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder() { - if (alarmIdBuilder_ != null) { - return alarmIdBuilder_.getMessageOrBuilder(); - } else { - return alarmId_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; - } - } - /** - * .context.Uuid alarm_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getAlarmIdFieldBuilder() { - if (alarmIdBuilder_ == null) { - alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getAlarmId(), - getParentForChildren(), - isClean()); - alarmId_ = null; - } - return alarmIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.AlarmID) - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.AlarmList) { + return mergeFrom((monitoring.Monitoring.AlarmList) other); + } else { + super.mergeFrom(other); + return this; + } + } - // @@protoc_insertion_point(class_scope:monitoring.AlarmID) - private static final monitoring.Monitoring.AlarmID DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmID(); - } + public Builder mergeFrom(monitoring.Monitoring.AlarmList other) { + if (other == monitoring.Monitoring.AlarmList.getDefaultInstance()) + return this; + if (alarmDescriptorBuilder_ == null) { + if (!other.alarmDescriptor_.isEmpty()) { + if (alarmDescriptor_.isEmpty()) { + alarmDescriptor_ = other.alarmDescriptor_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.addAll(other.alarmDescriptor_); + } + onChanged(); + } + } else { + if (!other.alarmDescriptor_.isEmpty()) { + if (alarmDescriptorBuilder_.isEmpty()) { + alarmDescriptorBuilder_.dispose(); + alarmDescriptorBuilder_ = null; + alarmDescriptor_ = other.alarmDescriptor_; + bitField0_ = (bitField0_ & ~0x00000001); + alarmDescriptorBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getAlarmDescriptorFieldBuilder() : null; + } else { + alarmDescriptorBuilder_.addAllMessages(other.alarmDescriptor_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - public static monitoring.Monitoring.AlarmID getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.AlarmList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private int bitField0_; - @java.lang.Override - public monitoring.Monitoring.AlarmID getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private java.util.List alarmDescriptor_ = java.util.Collections.emptyList(); - } + private void ensureAlarmDescriptorIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + alarmDescriptor_ = new java.util.ArrayList(alarmDescriptor_); + bitField0_ |= 0x00000001; + } + } - public interface AlarmSubscriptionOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.AlarmSubscription) - com.google.protobuf.MessageOrBuilder { + private com.google.protobuf.RepeatedFieldBuilderV3 alarmDescriptorBuilder_; + + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public java.util.List getAlarmDescriptorList() { + if (alarmDescriptorBuilder_ == null) { + return java.util.Collections.unmodifiableList(alarmDescriptor_); + } else { + return alarmDescriptorBuilder_.getMessageList(); + } + } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - boolean hasAlarmId(); - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - monitoring.Monitoring.AlarmID getAlarmId(); - /** - * .monitoring.AlarmID alarm_id = 1; - */ - monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public int getAlarmDescriptorCount() { + if (alarmDescriptorBuilder_ == null) { + return alarmDescriptor_.size(); + } else { + return alarmDescriptorBuilder_.getCount(); + } + } - /** - * float subscription_timeout_s = 2; - * @return The subscriptionTimeoutS. - */ - float getSubscriptionTimeoutS(); + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index) { + if (alarmDescriptorBuilder_ == null) { + return alarmDescriptor_.get(index); + } else { + return alarmDescriptorBuilder_.getMessage(index); + } + } - /** - * float subscription_frequency_ms = 3; - * @return The subscriptionFrequencyMs. - */ - float getSubscriptionFrequencyMs(); - } - /** - * Protobuf type {@code monitoring.AlarmSubscription} - */ - public static final class AlarmSubscription extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.AlarmSubscription) - AlarmSubscriptionOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlarmSubscription.newBuilder() to construct. - private AlarmSubscription(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AlarmSubscription() { - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder setAlarmDescriptor(int index, monitoring.Monitoring.AlarmDescriptor value) { + if (alarmDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.set(index, value); + onChanged(); + } else { + alarmDescriptorBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AlarmSubscription(); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder setAlarmDescriptor(int index, monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.set(index, builderForValue.build()); + onChanged(); + } else { + alarmDescriptorBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - @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; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder addAlarmDescriptor(monitoring.Monitoring.AlarmDescriptor value) { + if (alarmDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(value); + onChanged(); + } else { + alarmDescriptorBuilder_.addMessage(value); + } + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmSubscription.class, monitoring.Monitoring.AlarmSubscription.Builder.class); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder addAlarmDescriptor(int index, monitoring.Monitoring.AlarmDescriptor value) { + if (alarmDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(index, value); + onChanged(); + } else { + alarmDescriptorBuilder_.addMessage(index, value); + } + return this; + } - public static final int ALARM_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.AlarmID alarmId_; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - @java.lang.Override - public boolean hasAlarmId() { - return alarmId_ != null; - } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - @java.lang.Override - public monitoring.Monitoring.AlarmID getAlarmId() { - return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - return getAlarmId(); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder addAlarmDescriptor(monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(builderForValue.build()); + onChanged(); + } else { + alarmDescriptorBuilder_.addMessage(builderForValue.build()); + } + return this; + } - public static final int SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER = 2; - private float subscriptionTimeoutS_; - /** - * float subscription_timeout_s = 2; - * @return The subscriptionTimeoutS. - */ - @java.lang.Override - public float getSubscriptionTimeoutS() { - return subscriptionTimeoutS_; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder addAlarmDescriptor(int index, monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(index, builderForValue.build()); + onChanged(); + } else { + alarmDescriptorBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - public static final int SUBSCRIPTION_FREQUENCY_MS_FIELD_NUMBER = 3; - private float subscriptionFrequencyMs_; - /** - * float subscription_frequency_ms = 3; - * @return The subscriptionFrequencyMs. - */ - @java.lang.Override - public float getSubscriptionFrequencyMs() { - return subscriptionFrequencyMs_; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder addAllAlarmDescriptor(java.lang.Iterable values) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, alarmDescriptor_); + onChanged(); + } else { + alarmDescriptorBuilder_.addAllMessages(values); + } + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder clearAlarmDescriptor() { + if (alarmDescriptorBuilder_ == null) { + alarmDescriptor_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + alarmDescriptorBuilder_.clear(); + } + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder removeAlarmDescriptor(int index) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.remove(index); + onChanged(); + } else { + alarmDescriptorBuilder_.remove(index); + } + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (alarmId_ != null) { - output.writeMessage(1, getAlarmId()); - } - if (subscriptionTimeoutS_ != 0F) { - output.writeFloat(2, subscriptionTimeoutS_); - } - if (subscriptionFrequencyMs_ != 0F) { - output.writeFloat(3, subscriptionFrequencyMs_); - } - unknownFields.writeTo(output); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public monitoring.Monitoring.AlarmDescriptor.Builder getAlarmDescriptorBuilder(int index) { + return getAlarmDescriptorFieldBuilder().getBuilder(index); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (alarmId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAlarmId()); - } - if (subscriptionTimeoutS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, subscriptionTimeoutS_); - } - if (subscriptionFrequencyMs_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, subscriptionFrequencyMs_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder(int index) { + if (alarmDescriptorBuilder_ == null) { + return alarmDescriptor_.get(index); + } else { + return alarmDescriptorBuilder_.getMessageOrBuilder(index); + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.AlarmSubscription)) { - return super.equals(obj); - } - monitoring.Monitoring.AlarmSubscription other = (monitoring.Monitoring.AlarmSubscription) obj; - - if (hasAlarmId() != other.hasAlarmId()) return false; - if (hasAlarmId()) { - if (!getAlarmId() - .equals(other.getAlarmId())) return false; - } - if (java.lang.Float.floatToIntBits(getSubscriptionTimeoutS()) - != java.lang.Float.floatToIntBits( - other.getSubscriptionTimeoutS())) return false; - if (java.lang.Float.floatToIntBits(getSubscriptionFrequencyMs()) - != java.lang.Float.floatToIntBits( - other.getSubscriptionFrequencyMs())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public java.util.List getAlarmDescriptorOrBuilderList() { + if (alarmDescriptorBuilder_ != null) { + return alarmDescriptorBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(alarmDescriptor_); + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAlarmId()) { - hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; - hash = (53 * hash) + getAlarmId().hashCode(); - } - hash = (37 * hash) + SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public monitoring.Monitoring.AlarmDescriptor.Builder addAlarmDescriptorBuilder() { + return getAlarmDescriptorFieldBuilder().addBuilder(monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()); + } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmSubscription parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmSubscription parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public monitoring.Monitoring.AlarmDescriptor.Builder addAlarmDescriptorBuilder(int index) { + return getAlarmDescriptorFieldBuilder().addBuilder(index, monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.AlarmSubscription prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public java.util.List getAlarmDescriptorBuilderList() { + return getAlarmDescriptorFieldBuilder().getBuilderList(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.AlarmSubscription} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.AlarmSubscription) - monitoring.Monitoring.AlarmSubscriptionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmSubscription.class, monitoring.Monitoring.AlarmSubscription.Builder.class); - } - - // 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; - alarmIdBuilder_ = null; - } - subscriptionTimeoutS_ = 0F; - - subscriptionFrequencyMs_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.AlarmSubscription getDefaultInstanceForType() { - return monitoring.Monitoring.AlarmSubscription.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.AlarmSubscription build() { - monitoring.Monitoring.AlarmSubscription result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.AlarmSubscription) { - return mergeFrom((monitoring.Monitoring.AlarmSubscription)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.AlarmSubscription other) { - if (other == monitoring.Monitoring.AlarmSubscription.getDefaultInstance()) return this; - if (other.hasAlarmId()) { - mergeAlarmId(other.getAlarmId()); - } - if (other.getSubscriptionTimeoutS() != 0F) { - setSubscriptionTimeoutS(other.getSubscriptionTimeoutS()); - } - if (other.getSubscriptionFrequencyMs() != 0F) { - setSubscriptionFrequencyMs(other.getSubscriptionFrequencyMs()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmSubscription) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.AlarmID alarmId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIdBuilder_; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - public boolean hasAlarmId() { - return alarmIdBuilder_ != null || alarmId_ != null; - } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - public monitoring.Monitoring.AlarmID getAlarmId() { - if (alarmIdBuilder_ == null) { - return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } else { - return alarmIdBuilder_.getMessage(); - } - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { - if (alarmIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - alarmId_ = value; - onChanged(); - } else { - alarmIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder setAlarmId( - monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmIdBuilder_ == null) { - alarmId_ = builderForValue.build(); - onChanged(); - } else { - alarmIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { - if (alarmIdBuilder_ == null) { - if (alarmId_ != null) { - alarmId_ = - monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); - } else { - alarmId_ = value; - } - onChanged(); - } else { - alarmIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder clearAlarmId() { - if (alarmIdBuilder_ == null) { - alarmId_ = null; - onChanged(); - } else { - alarmId_ = null; - alarmIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { - - onChanged(); - return getAlarmIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - if (alarmIdBuilder_ != null) { - return alarmIdBuilder_.getMessageOrBuilder(); - } else { - return alarmId_ == null ? - monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmIdFieldBuilder() { - if (alarmIdBuilder_ == null) { - alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder>( - getAlarmId(), - getParentForChildren(), - isClean()); - alarmId_ = null; - } - return alarmIdBuilder_; - } - - private float subscriptionTimeoutS_ ; - /** - * float subscription_timeout_s = 2; - * @return The subscriptionTimeoutS. - */ - @java.lang.Override - public float getSubscriptionTimeoutS() { - return subscriptionTimeoutS_; - } - /** - * float subscription_timeout_s = 2; - * @param value The subscriptionTimeoutS to set. - * @return This builder for chaining. - */ - public Builder setSubscriptionTimeoutS(float value) { - - subscriptionTimeoutS_ = value; - onChanged(); - return this; - } - /** - * float subscription_timeout_s = 2; - * @return This builder for chaining. - */ - public Builder clearSubscriptionTimeoutS() { - - subscriptionTimeoutS_ = 0F; - onChanged(); - return this; - } - - private float subscriptionFrequencyMs_ ; - /** - * float subscription_frequency_ms = 3; - * @return The subscriptionFrequencyMs. - */ - @java.lang.Override - public float getSubscriptionFrequencyMs() { - return subscriptionFrequencyMs_; - } - /** - * float subscription_frequency_ms = 3; - * @param value The subscriptionFrequencyMs to set. - * @return This builder for chaining. - */ - public Builder setSubscriptionFrequencyMs(float value) { - - subscriptionFrequencyMs_ = value; - onChanged(); - return this; - } - /** - * float subscription_frequency_ms = 3; - * @return This builder for chaining. - */ - public Builder clearSubscriptionFrequencyMs() { - - subscriptionFrequencyMs_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.AlarmSubscription) - } + private com.google.protobuf.RepeatedFieldBuilderV3 getAlarmDescriptorFieldBuilder() { + if (alarmDescriptorBuilder_ == null) { + alarmDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(alarmDescriptor_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + alarmDescriptor_ = null; + } + return alarmDescriptorBuilder_; + } - // @@protoc_insertion_point(class_scope:monitoring.AlarmSubscription) - private static final monitoring.Monitoring.AlarmSubscription DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmSubscription(); - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public static monitoring.Monitoring.AlarmSubscription getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.AlarmList) + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + // @@protoc_insertion_point(class_scope:monitoring.AlarmList) + private static final monitoring.Monitoring.AlarmList DEFAULT_INSTANCE; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmList(); + } - @java.lang.Override - public monitoring.Monitoring.AlarmSubscription getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static monitoring.Monitoring.AlarmList getDefaultInstance() { + return DEFAULT_INSTANCE; + } - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public interface AlarmResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.AlarmResponse) - com.google.protobuf.MessageOrBuilder { + @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); + } + }; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - boolean hasAlarmId(); - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - monitoring.Monitoring.AlarmID getAlarmId(); - /** - * .monitoring.AlarmID alarm_id = 1; - */ - monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * string text = 2; - * @return The text. - */ - java.lang.String getText(); - /** - * string text = 2; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * .monitoring.KpiList kpi_list = 3; - * @return Whether the kpiList field is set. - */ - boolean hasKpiList(); - /** - * .monitoring.KpiList kpi_list = 3; - * @return The kpiList. - */ - monitoring.Monitoring.KpiList getKpiList(); - /** - * .monitoring.KpiList kpi_list = 3; - */ - monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder(); - } - /** - * Protobuf type {@code monitoring.AlarmResponse} - */ - public static final class AlarmResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.AlarmResponse) - AlarmResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlarmResponse.newBuilder() to construct. - private AlarmResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AlarmResponse() { - text_ = ""; + @java.lang.Override + public monitoring.Monitoring.AlarmList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AlarmResponse(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiDescriptor_descriptor; - @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; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiDescriptor_fieldAccessorTable; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmResponse.class, monitoring.Monitoring.AlarmResponse.Builder.class); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_MonitorKpiRequest_descriptor; - public static final int ALARM_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.AlarmID alarmId_; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - @java.lang.Override - public boolean hasAlarmId() { - return alarmId_ != null; - } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - @java.lang.Override - public monitoring.Monitoring.AlarmID getAlarmId() { - return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - return getAlarmId(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable; - public static final int TEXT_FIELD_NUMBER = 2; - private volatile java.lang.Object text_; - /** - * string text = 2; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - 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(); - text_ = s; - return s; - } - } - /** - * string text = 2; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiQuery_descriptor; - public static final int KPI_LIST_FIELD_NUMBER = 3; - private monitoring.Monitoring.KpiList kpiList_; - /** - * .monitoring.KpiList kpi_list = 3; - * @return Whether the kpiList field is set. - */ - @java.lang.Override - public boolean hasKpiList() { - return kpiList_ != null; - } - /** - * .monitoring.KpiList kpi_list = 3; - * @return The kpiList. - */ - @java.lang.Override - public monitoring.Monitoring.KpiList getKpiList() { - return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - @java.lang.Override - public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { - return getKpiList(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiQuery_fieldAccessorTable; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_RawKpi_descriptor; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_RawKpi_fieldAccessorTable; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (alarmId_ != null) { - output.writeMessage(1, getAlarmId()); - } - if (!getTextBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); - } - if (kpiList_ != null) { - output.writeMessage(3, getKpiList()); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_RawKpiList_descriptor; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (alarmId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAlarmId()); - } - if (!getTextBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); - } - if (kpiList_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getKpiList()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_RawKpiList_fieldAccessorTable; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.AlarmResponse)) { - return super.equals(obj); - } - monitoring.Monitoring.AlarmResponse other = (monitoring.Monitoring.AlarmResponse) obj; - - if (hasAlarmId() != other.hasAlarmId()) return false; - if (hasAlarmId()) { - if (!getAlarmId() - .equals(other.getAlarmId())) return false; - } - if (!getText() - .equals(other.getText())) return false; - if (hasKpiList() != other.hasKpiList()) return false; - if (hasKpiList()) { - if (!getKpiList() - .equals(other.getKpiList())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_RawKpiTable_descriptor; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAlarmId()) { - hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; - hash = (53 * hash) + getAlarmId().hashCode(); - } - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - if (hasKpiList()) { - hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; - hash = (53 * hash) + getKpiList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_RawKpiTable_fieldAccessorTable; - public static monitoring.Monitoring.AlarmResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiId_descriptor; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.AlarmResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiId_fieldAccessorTable; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.AlarmResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.AlarmResponse) - monitoring.Monitoring.AlarmResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmResponse.class, monitoring.Monitoring.AlarmResponse.Builder.class); - } - - // 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; - alarmIdBuilder_ = null; - } - text_ = ""; - - if (kpiListBuilder_ == null) { - kpiList_ = null; - } else { - kpiList_ = null; - kpiListBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.AlarmResponse getDefaultInstanceForType() { - return monitoring.Monitoring.AlarmResponse.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.AlarmResponse build() { - monitoring.Monitoring.AlarmResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.AlarmResponse) { - return mergeFrom((monitoring.Monitoring.AlarmResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.AlarmResponse other) { - if (other == monitoring.Monitoring.AlarmResponse.getDefaultInstance()) return this; - if (other.hasAlarmId()) { - mergeAlarmId(other.getAlarmId()); - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - onChanged(); - } - if (other.hasKpiList()) { - mergeKpiList(other.getKpiList()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.AlarmID alarmId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIdBuilder_; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - public boolean hasAlarmId() { - return alarmIdBuilder_ != null || alarmId_ != null; - } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - public monitoring.Monitoring.AlarmID getAlarmId() { - if (alarmIdBuilder_ == null) { - return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } else { - return alarmIdBuilder_.getMessage(); - } - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { - if (alarmIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - alarmId_ = value; - onChanged(); - } else { - alarmIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder setAlarmId( - monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmIdBuilder_ == null) { - alarmId_ = builderForValue.build(); - onChanged(); - } else { - alarmIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { - if (alarmIdBuilder_ == null) { - if (alarmId_ != null) { - alarmId_ = - monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); - } else { - alarmId_ = value; - } - onChanged(); - } else { - alarmIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder clearAlarmId() { - if (alarmIdBuilder_ == null) { - alarmId_ = null; - onChanged(); - } else { - alarmId_ = null; - alarmIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { - - onChanged(); - return getAlarmIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - if (alarmIdBuilder_ != null) { - return alarmIdBuilder_.getMessageOrBuilder(); - } else { - return alarmId_ == null ? - monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmIdFieldBuilder() { - if (alarmIdBuilder_ == null) { - alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder>( - getAlarmId(), - getParentForChildren(), - isClean()); - alarmId_ = null; - } - return alarmIdBuilder_; - } - - private java.lang.Object text_ = ""; - /** - * string text = 2; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string text = 2; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string text = 2; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - text_ = value; - onChanged(); - return this; - } - /** - * string text = 2; - * @return This builder for chaining. - */ - public Builder clearText() { - - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - * string text = 2; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - text_ = value; - onChanged(); - return this; - } - - private monitoring.Monitoring.KpiList kpiList_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> kpiListBuilder_; - /** - * .monitoring.KpiList kpi_list = 3; - * @return Whether the kpiList field is set. - */ - public boolean hasKpiList() { - return kpiListBuilder_ != null || kpiList_ != null; - } - /** - * .monitoring.KpiList kpi_list = 3; - * @return The kpiList. - */ - public monitoring.Monitoring.KpiList getKpiList() { - if (kpiListBuilder_ == null) { - return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; - } else { - return kpiListBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - public Builder setKpiList(monitoring.Monitoring.KpiList value) { - if (kpiListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiList_ = value; - onChanged(); - } else { - kpiListBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - public Builder setKpiList( - monitoring.Monitoring.KpiList.Builder builderForValue) { - if (kpiListBuilder_ == null) { - kpiList_ = builderForValue.build(); - onChanged(); - } else { - kpiListBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { - if (kpiListBuilder_ == null) { - if (kpiList_ != null) { - kpiList_ = - monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); - } else { - kpiList_ = value; - } - onChanged(); - } else { - kpiListBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - public Builder clearKpiList() { - if (kpiListBuilder_ == null) { - kpiList_ = null; - onChanged(); - } else { - kpiList_ = null; - kpiListBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { - - onChanged(); - return getKpiListFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { - if (kpiListBuilder_ != null) { - return kpiListBuilder_.getMessageOrBuilder(); - } else { - return kpiList_ == null ? - monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; - } - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> - getKpiListFieldBuilder() { - if (kpiListBuilder_ == null) { - kpiListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder>( - getKpiList(), - getParentForChildren(), - isClean()); - kpiList_ = null; - } - return kpiListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.AlarmResponse) - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_Kpi_descriptor; - // @@protoc_insertion_point(class_scope:monitoring.AlarmResponse) - private static final monitoring.Monitoring.AlarmResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmResponse(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_Kpi_fieldAccessorTable; - public static monitoring.Monitoring.AlarmResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiValueRange_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiValueRange_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiValue_descriptor; - @java.lang.Override - public monitoring.Monitoring.AlarmResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiValue_fieldAccessorTable; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiList_descriptor; - public interface AlarmListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.AlarmList) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiList_fieldAccessorTable; - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - java.util.List - getAlarmDescriptorList(); - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index); - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - int getAlarmDescriptorCount(); - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - java.util.List - getAlarmDescriptorOrBuilderList(); - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder( - int index); - } - /** - * Protobuf type {@code monitoring.AlarmList} - */ - public static final class AlarmList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.AlarmList) - AlarmListOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlarmList.newBuilder() to construct. - private AlarmList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AlarmList() { - alarmDescriptor_ = java.util.Collections.emptyList(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiDescriptorList_descriptor; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AlarmList(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiDescriptorList_fieldAccessorTable; - @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(); - 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; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_SubsDescriptor_descriptor; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmList.class, monitoring.Monitoring.AlarmList.Builder.class); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_SubsDescriptor_fieldAccessorTable; - public static final int ALARM_DESCRIPTOR_FIELD_NUMBER = 1; - private java.util.List alarmDescriptor_; - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - @java.lang.Override - public java.util.List getAlarmDescriptorList() { - return alarmDescriptor_; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - @java.lang.Override - public java.util.List - getAlarmDescriptorOrBuilderList() { - return alarmDescriptor_; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - @java.lang.Override - public int getAlarmDescriptorCount() { - return alarmDescriptor_.size(); - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - @java.lang.Override - public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index) { - return alarmDescriptor_.get(index); - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - @java.lang.Override - public monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder( - int index) { - return alarmDescriptor_.get(index); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_SubscriptionID_descriptor; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_SubscriptionID_fieldAccessorTable; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_SubsResponse_descriptor; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < alarmDescriptor_.size(); i++) { - output.writeMessage(1, alarmDescriptor_.get(i)); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_SubsResponse_fieldAccessorTable; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < alarmDescriptor_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, alarmDescriptor_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_SubsList_descriptor; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.AlarmList)) { - return super.equals(obj); - } - monitoring.Monitoring.AlarmList other = (monitoring.Monitoring.AlarmList) obj; - - if (!getAlarmDescriptorList() - .equals(other.getAlarmDescriptorList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_SubsList_fieldAccessorTable; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAlarmDescriptorCount() > 0) { - hash = (37 * hash) + ALARM_DESCRIPTOR_FIELD_NUMBER; - hash = (53 * hash) + getAlarmDescriptorList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_AlarmDescriptor_descriptor; - public static monitoring.Monitoring.AlarmList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_AlarmDescriptor_fieldAccessorTable; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.AlarmList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_AlarmID_descriptor; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.AlarmList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.AlarmList) - monitoring.Monitoring.AlarmListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmList.class, monitoring.Monitoring.AlarmList.Builder.class); - } - - // 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(); - if (alarmDescriptorBuilder_ == null) { - alarmDescriptor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - alarmDescriptorBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.AlarmList getDefaultInstanceForType() { - return monitoring.Monitoring.AlarmList.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.AlarmList build() { - monitoring.Monitoring.AlarmList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public monitoring.Monitoring.AlarmList buildPartial() { - monitoring.Monitoring.AlarmList result = new monitoring.Monitoring.AlarmList(this); - int from_bitField0_ = bitField0_; - if (alarmDescriptorBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - alarmDescriptor_ = java.util.Collections.unmodifiableList(alarmDescriptor_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.alarmDescriptor_ = alarmDescriptor_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.AlarmList) { - return mergeFrom((monitoring.Monitoring.AlarmList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.AlarmList other) { - if (other == monitoring.Monitoring.AlarmList.getDefaultInstance()) return this; - if (alarmDescriptorBuilder_ == null) { - if (!other.alarmDescriptor_.isEmpty()) { - if (alarmDescriptor_.isEmpty()) { - alarmDescriptor_ = other.alarmDescriptor_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.addAll(other.alarmDescriptor_); - } - onChanged(); - } - } else { - if (!other.alarmDescriptor_.isEmpty()) { - if (alarmDescriptorBuilder_.isEmpty()) { - alarmDescriptorBuilder_.dispose(); - alarmDescriptorBuilder_ = null; - alarmDescriptor_ = other.alarmDescriptor_; - bitField0_ = (bitField0_ & ~0x00000001); - alarmDescriptorBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAlarmDescriptorFieldBuilder() : null; - } else { - alarmDescriptorBuilder_.addAllMessages(other.alarmDescriptor_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List alarmDescriptor_ = - java.util.Collections.emptyList(); - private void ensureAlarmDescriptorIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - alarmDescriptor_ = new java.util.ArrayList(alarmDescriptor_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmDescriptor.Builder, monitoring.Monitoring.AlarmDescriptorOrBuilder> alarmDescriptorBuilder_; - - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public java.util.List getAlarmDescriptorList() { - if (alarmDescriptorBuilder_ == null) { - return java.util.Collections.unmodifiableList(alarmDescriptor_); - } else { - return alarmDescriptorBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public int getAlarmDescriptorCount() { - if (alarmDescriptorBuilder_ == null) { - return alarmDescriptor_.size(); - } else { - return alarmDescriptorBuilder_.getCount(); - } - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index) { - if (alarmDescriptorBuilder_ == null) { - return alarmDescriptor_.get(index); - } else { - return alarmDescriptorBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder setAlarmDescriptor( - int index, monitoring.Monitoring.AlarmDescriptor value) { - if (alarmDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.set(index, value); - onChanged(); - } else { - alarmDescriptorBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder setAlarmDescriptor( - int index, monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { - if (alarmDescriptorBuilder_ == null) { - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.set(index, builderForValue.build()); - onChanged(); - } else { - alarmDescriptorBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder addAlarmDescriptor(monitoring.Monitoring.AlarmDescriptor value) { - if (alarmDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.add(value); - onChanged(); - } else { - alarmDescriptorBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder addAlarmDescriptor( - int index, monitoring.Monitoring.AlarmDescriptor value) { - if (alarmDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.add(index, value); - onChanged(); - } else { - alarmDescriptorBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder addAlarmDescriptor( - monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { - if (alarmDescriptorBuilder_ == null) { - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.add(builderForValue.build()); - onChanged(); - } else { - alarmDescriptorBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder addAlarmDescriptor( - int index, monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { - if (alarmDescriptorBuilder_ == null) { - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.add(index, builderForValue.build()); - onChanged(); - } else { - alarmDescriptorBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder addAllAlarmDescriptor( - java.lang.Iterable values) { - if (alarmDescriptorBuilder_ == null) { - ensureAlarmDescriptorIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, alarmDescriptor_); - onChanged(); - } else { - alarmDescriptorBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder clearAlarmDescriptor() { - if (alarmDescriptorBuilder_ == null) { - alarmDescriptor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - alarmDescriptorBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder removeAlarmDescriptor(int index) { - if (alarmDescriptorBuilder_ == null) { - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.remove(index); - onChanged(); - } else { - alarmDescriptorBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public monitoring.Monitoring.AlarmDescriptor.Builder getAlarmDescriptorBuilder( - int index) { - return getAlarmDescriptorFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder( - int index) { - if (alarmDescriptorBuilder_ == null) { - return alarmDescriptor_.get(index); } else { - return alarmDescriptorBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public java.util.List - getAlarmDescriptorOrBuilderList() { - if (alarmDescriptorBuilder_ != null) { - return alarmDescriptorBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(alarmDescriptor_); - } - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public monitoring.Monitoring.AlarmDescriptor.Builder addAlarmDescriptorBuilder() { - return getAlarmDescriptorFieldBuilder().addBuilder( - monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()); - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public monitoring.Monitoring.AlarmDescriptor.Builder addAlarmDescriptorBuilder( - int index) { - return getAlarmDescriptorFieldBuilder().addBuilder( - index, monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()); - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public java.util.List - getAlarmDescriptorBuilderList() { - return getAlarmDescriptorFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmDescriptor.Builder, monitoring.Monitoring.AlarmDescriptorOrBuilder> - getAlarmDescriptorFieldBuilder() { - if (alarmDescriptorBuilder_ == null) { - alarmDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmDescriptor.Builder, monitoring.Monitoring.AlarmDescriptorOrBuilder>( - alarmDescriptor_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - alarmDescriptor_ = null; - } - return alarmDescriptorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.AlarmList) - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_AlarmID_fieldAccessorTable; - // @@protoc_insertion_point(class_scope:monitoring.AlarmList) - private static final monitoring.Monitoring.AlarmList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmList(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_AlarmSubscription_descriptor; - public static monitoring.Monitoring.AlarmList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_AlarmSubscription_fieldAccessorTable; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_AlarmResponse_descriptor; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_AlarmResponse_fieldAccessorTable; - @java.lang.Override - public monitoring.Monitoring.AlarmList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_AlarmList_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_AlarmList_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiDescriptor_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiDescriptor_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_MonitorKpiRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiQuery_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiQuery_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_RawKpi_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_RawKpi_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_RawKpiList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_RawKpiList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_RawKpiTable_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_RawKpiTable_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_Kpi_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_Kpi_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiValueRange_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiValueRange_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiValue_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiValue_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiDescriptorList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiDescriptorList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_SubsDescriptor_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_SubsDescriptor_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_SubscriptionID_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_SubscriptionID_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_SubsResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_SubsResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_SubsList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_SubsList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_AlarmDescriptor_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_AlarmDescriptor_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_AlarmID_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_AlarmID_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_AlarmSubscription_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_AlarmSubscription_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_AlarmResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_AlarmResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_AlarmList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_AlarmList_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\020monitoring.proto\022\nmonitoring\032\rcontext." + - "proto\032\026kpi_sample_types.proto\"\367\002\n\rKpiDes" + - "criptor\022!\n\006kpi_id\030\001 \001(\0132\021.monitoring.Kpi" + - "Id\022\027\n\017kpi_description\030\002 \001(\t\022&\n\013kpi_id_li" + - "st\030\003 \003(\0132\021.monitoring.KpiId\0228\n\017kpi_sampl" + - "e_type\030\004 \001(\0162\037.kpi_sample_types.KpiSampl" + - "eType\022$\n\tdevice_id\030\005 \001(\0132\021.context.Devic" + - "eId\022(\n\013endpoint_id\030\006 \001(\0132\023.context.EndPo" + - "intId\022&\n\nservice_id\030\007 \001(\0132\022.context.Serv" + - "iceId\022\"\n\010slice_id\030\010 \001(\0132\020.context.SliceI" + - "d\022,\n\rconnection_id\030\t \001(\0132\025.context.Conne" + - "ctionId\"l\n\021MonitorKpiRequest\022!\n\006kpi_id\030\001" + - " \001(\0132\021.monitoring.KpiId\022\033\n\023monitoring_wi" + - "ndow_s\030\002 \001(\002\022\027\n\017sampling_rate_s\030\003 \001(\002\"\273\001" + - "\n\010KpiQuery\022\"\n\007kpi_ids\030\001 \003(\0132\021.monitoring" + - ".KpiId\022\033\n\023monitoring_window_s\030\002 \001(\002\022\026\n\016l" + - "ast_n_samples\030\003 \001(\r\022+\n\017start_timestamp\030\004" + - " \001(\0132\022.context.Timestamp\022)\n\rend_timestam" + - "p\030\005 \001(\0132\022.context.Timestamp\"X\n\006RawKpi\022%\n" + - "\ttimestamp\030\001 \001(\0132\022.context.Timestamp\022\'\n\t" + - "kpi_value\030\002 \001(\0132\024.monitoring.KpiValue\"U\n" + - "\nRawKpiList\022!\n\006kpi_id\030\001 \001(\0132\021.monitoring" + - ".KpiId\022$\n\010raw_kpis\030\002 \003(\0132\022.monitoring.Ra" + - "wKpi\"<\n\013RawKpiTable\022-\n\rraw_kpi_lists\030\001 \003" + - "(\0132\026.monitoring.RawKpiList\"&\n\005KpiId\022\035\n\006k" + - "pi_id\030\001 \001(\0132\r.context.Uuid\"x\n\003Kpi\022!\n\006kpi" + - "_id\030\001 \001(\0132\021.monitoring.KpiId\022%\n\ttimestam" + - "p\030\002 \001(\0132\022.context.Timestamp\022\'\n\tkpi_value" + - "\030\003 \001(\0132\024.monitoring.KpiValue\"\250\001\n\rKpiValu" + - "eRange\022)\n\013kpiMinValue\030\001 \001(\0132\024.monitoring" + - ".KpiValue\022)\n\013kpiMaxValue\030\002 \001(\0132\024.monitor" + - "ing.KpiValue\022\017\n\007inRange\030\003 \001(\010\022\027\n\017include" + - "MinValue\030\004 \001(\010\022\027\n\017includeMaxValue\030\005 \001(\010\"" + - "\241\001\n\010KpiValue\022\022\n\010int32Val\030\001 \001(\005H\000\022\023\n\tuint" + - "32Val\030\002 \001(\rH\000\022\022\n\010int64Val\030\003 \001(\003H\000\022\023\n\tuin" + - "t64Val\030\004 \001(\004H\000\022\022\n\010floatVal\030\005 \001(\002H\000\022\023\n\tst" + - "ringVal\030\006 \001(\tH\000\022\021\n\007boolVal\030\007 \001(\010H\000B\007\n\005va" + - "lue\"\'\n\007KpiList\022\034\n\003kpi\030\001 \003(\0132\017.monitoring" + - ".Kpi\"K\n\021KpiDescriptorList\0226\n\023kpi_descrip" + - "tor_list\030\001 \003(\0132\031.monitoring.KpiDescripto" + - "r\"\362\001\n\016SubsDescriptor\022+\n\007subs_id\030\001 \001(\0132\032." + - "monitoring.SubscriptionID\022!\n\006kpi_id\030\002 \001(" + - "\0132\021.monitoring.KpiId\022\033\n\023sampling_duratio" + - "n_s\030\003 \001(\002\022\033\n\023sampling_interval_s\030\004 \001(\002\022+" + - "\n\017start_timestamp\030\005 \001(\0132\022.context.Timest" + - "amp\022)\n\rend_timestamp\030\006 \001(\0132\022.context.Tim" + - "estamp\"0\n\016SubscriptionID\022\036\n\007subs_id\030\001 \001(" + - "\0132\r.context.Uuid\"b\n\014SubsResponse\022+\n\007subs" + - "_id\030\001 \001(\0132\032.monitoring.SubscriptionID\022%\n" + - "\010kpi_list\030\002 \001(\0132\023.monitoring.KpiList\"?\n\010" + - "SubsList\0223\n\017subs_descriptor\030\001 \003(\0132\032.moni" + - "toring.SubsDescriptor\"\337\001\n\017AlarmDescripto" + - "r\022%\n\010alarm_id\030\001 \001(\0132\023.monitoring.AlarmID" + - "\022\031\n\021alarm_description\030\002 \001(\t\022\014\n\004name\030\003 \001(" + - "\t\022!\n\006kpi_id\030\004 \001(\0132\021.monitoring.KpiId\0222\n\017" + - "kpi_value_range\030\005 \001(\0132\031.monitoring.KpiVa" + - "lueRange\022%\n\ttimestamp\030\006 \001(\0132\022.context.Ti" + - "mestamp\"*\n\007AlarmID\022\037\n\010alarm_id\030\001 \001(\0132\r.c" + - "ontext.Uuid\"}\n\021AlarmSubscription\022%\n\010alar" + - "m_id\030\001 \001(\0132\023.monitoring.AlarmID\022\036\n\026subsc" + - "ription_timeout_s\030\002 \001(\002\022!\n\031subscription_" + - "frequency_ms\030\003 \001(\002\"k\n\rAlarmResponse\022%\n\010a" + - "larm_id\030\001 \001(\0132\023.monitoring.AlarmID\022\014\n\004te" + - "xt\030\002 \001(\t\022%\n\010kpi_list\030\003 \001(\0132\023.monitoring." + - "KpiList\"B\n\tAlarmList\0225\n\020alarm_descriptor" + - "\030\001 \003(\0132\033.monitoring.AlarmDescriptor2\234\t\n\021" + - "MonitoringService\0228\n\006SetKpi\022\031.monitoring" + - ".KpiDescriptor\032\021.monitoring.KpiId\"\000\0220\n\tD" + - "eleteKpi\022\021.monitoring.KpiId\032\016.context.Em" + - "pty\"\000\022B\n\020GetKpiDescriptor\022\021.monitoring.K" + - "piId\032\031.monitoring.KpiDescriptor\"\000\022G\n\024Get" + - "KpiDescriptorList\022\016.context.Empty\032\035.moni" + - "toring.KpiDescriptorList\"\000\022/\n\nIncludeKpi" + - "\022\017.monitoring.Kpi\032\016.context.Empty\"\000\022=\n\nM" + - "onitorKpi\022\035.monitoring.MonitorKpiRequest" + - "\032\016.context.Empty\"\000\022?\n\014QueryKpiData\022\024.mon" + - "itoring.KpiQuery\032\027.monitoring.RawKpiTabl" + - "e\"\000\022N\n\022SetKpiSubscription\022\032.monitoring.S" + - "ubsDescriptor\032\030.monitoring.SubsResponse\"" + - "\0000\001\022M\n\021GetSubsDescriptor\022\032.monitoring.Su" + - "bscriptionID\032\032.monitoring.SubsDescriptor" + - "\"\000\022:\n\020GetSubscriptions\022\016.context.Empty\032\024" + - ".monitoring.SubsList\"\000\022B\n\022DeleteSubscrip" + - "tion\022\032.monitoring.SubscriptionID\032\016.conte" + - "xt.Empty\"\000\022A\n\013SetKpiAlarm\022\033.monitoring.A" + - "larmDescriptor\032\023.monitoring.AlarmID\"\000\0224\n" + - "\tGetAlarms\022\016.context.Empty\032\025.monitoring." + - "AlarmList\"\000\022H\n\022GetAlarmDescriptor\022\023.moni" + - "toring.AlarmID\032\033.monitoring.AlarmDescrip" + - "tor\"\000\022V\n\026GetAlarmResponseStream\022\035.monito" + - "ring.AlarmSubscription\032\031.monitoring.Alar" + - "mResponse\"\0000\001\0224\n\013DeleteAlarm\022\023.monitorin" + - "g.AlarmID\032\016.context.Empty\"\000\0226\n\014GetStream" + - "Kpi\022\021.monitoring.KpiId\032\017.monitoring.Kpi\"" + - "\0000\001\0225\n\rGetInstantKpi\022\021.monitoring.KpiId\032" + - "\017.monitoring.Kpi\"\000b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - context.ContextOuterClass.getDescriptor(), - kpi_sample_types.KpiSampleTypes.getDescriptor(), - }); - internal_static_monitoring_KpiDescriptor_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_monitoring_KpiDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiDescriptor_descriptor, - new java.lang.String[] { "KpiId", "KpiDescription", "KpiIdList", "KpiSampleType", "DeviceId", "EndpointId", "ServiceId", "SliceId", "ConnectionId", }); - internal_static_monitoring_MonitorKpiRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_MonitorKpiRequest_descriptor, - new java.lang.String[] { "KpiId", "MonitoringWindowS", "SamplingRateS", }); - internal_static_monitoring_KpiQuery_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_monitoring_KpiQuery_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiQuery_descriptor, - new java.lang.String[] { "KpiIds", "MonitoringWindowS", "LastNSamples", "StartTimestamp", "EndTimestamp", }); - internal_static_monitoring_RawKpi_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_monitoring_RawKpi_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_RawKpi_descriptor, - new java.lang.String[] { "Timestamp", "KpiValue", }); - internal_static_monitoring_RawKpiList_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_monitoring_RawKpiList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_RawKpiList_descriptor, - new java.lang.String[] { "KpiId", "RawKpis", }); - internal_static_monitoring_RawKpiTable_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_monitoring_RawKpiTable_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_RawKpiTable_descriptor, - new java.lang.String[] { "RawKpiLists", }); - internal_static_monitoring_KpiId_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_monitoring_KpiId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiId_descriptor, - new java.lang.String[] { "KpiId", }); - internal_static_monitoring_Kpi_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_monitoring_Kpi_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_Kpi_descriptor, - new java.lang.String[] { "KpiId", "Timestamp", "KpiValue", }); - internal_static_monitoring_KpiValueRange_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_monitoring_KpiValueRange_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiValueRange_descriptor, - new java.lang.String[] { "KpiMinValue", "KpiMaxValue", "InRange", "IncludeMinValue", "IncludeMaxValue", }); - internal_static_monitoring_KpiValue_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_monitoring_KpiValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiValue_descriptor, - new java.lang.String[] { "Int32Val", "Uint32Val", "Int64Val", "Uint64Val", "FloatVal", "StringVal", "BoolVal", "Value", }); - internal_static_monitoring_KpiList_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_monitoring_KpiList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiList_descriptor, - new java.lang.String[] { "Kpi", }); - internal_static_monitoring_KpiDescriptorList_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_monitoring_KpiDescriptorList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiDescriptorList_descriptor, - new java.lang.String[] { "KpiDescriptorList", }); - internal_static_monitoring_SubsDescriptor_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_monitoring_SubsDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_SubsDescriptor_descriptor, - new java.lang.String[] { "SubsId", "KpiId", "SamplingDurationS", "SamplingIntervalS", "StartTimestamp", "EndTimestamp", }); - internal_static_monitoring_SubscriptionID_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_monitoring_SubscriptionID_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_SubscriptionID_descriptor, - new java.lang.String[] { "SubsId", }); - internal_static_monitoring_SubsResponse_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_monitoring_SubsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_SubsResponse_descriptor, - new java.lang.String[] { "SubsId", "KpiList", }); - internal_static_monitoring_SubsList_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_monitoring_SubsList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_SubsList_descriptor, - new java.lang.String[] { "SubsDescriptor", }); - internal_static_monitoring_AlarmDescriptor_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_monitoring_AlarmDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_AlarmDescriptor_descriptor, - new java.lang.String[] { "AlarmId", "AlarmDescription", "Name", "KpiId", "KpiValueRange", "Timestamp", }); - internal_static_monitoring_AlarmID_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_monitoring_AlarmID_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_AlarmID_descriptor, - new java.lang.String[] { "AlarmId", }); - internal_static_monitoring_AlarmSubscription_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_monitoring_AlarmSubscription_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_AlarmSubscription_descriptor, - new java.lang.String[] { "AlarmId", "SubscriptionTimeoutS", "SubscriptionFrequencyMs", }); - internal_static_monitoring_AlarmResponse_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_monitoring_AlarmResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_AlarmResponse_descriptor, - new java.lang.String[] { "AlarmId", "Text", "KpiList", }); - internal_static_monitoring_AlarmList_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_monitoring_AlarmList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_AlarmList_descriptor, - new java.lang.String[] { "AlarmDescriptor", }); - context.ContextOuterClass.getDescriptor(); - kpi_sample_types.KpiSampleTypes.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { "\n\020monitoring.proto\022\nmonitoring\032\rcontext." + "proto\032\026kpi_sample_types.proto\"\231\003\n\rKpiDes" + "criptor\022!\n\006kpi_id\030\001 \001(\0132\021.monitoring.Kpi" + "Id\022\027\n\017kpi_description\030\002 \001(\t\022&\n\013kpi_id_li" + "st\030\003 \003(\0132\021.monitoring.KpiId\0228\n\017kpi_sampl" + "e_type\030\004 \001(\0162\037.kpi_sample_types.KpiSampl" + "eType\022$\n\tdevice_id\030\005 \001(\0132\021.context.Devic" + "eId\022(\n\013endpoint_id\030\006 \001(\0132\023.context.EndPo" + "intId\022&\n\nservice_id\030\007 \001(\0132\022.context.Serv" + "iceId\022\"\n\010slice_id\030\010 \001(\0132\020.context.SliceI" + "d\022,\n\rconnection_id\030\t \001(\0132\025.context.Conne" + "ctionId\022 \n\007link_id\030\n \001(\0132\017.context.LinkI" + "d\"l\n\021MonitorKpiRequest\022!\n\006kpi_id\030\001 \001(\0132\021" + ".monitoring.KpiId\022\033\n\023monitoring_window_s" + "\030\002 \001(\002\022\027\n\017sampling_rate_s\030\003 \001(\002\"\273\001\n\010KpiQ" + "uery\022\"\n\007kpi_ids\030\001 \003(\0132\021.monitoring.KpiId" + "\022\033\n\023monitoring_window_s\030\002 \001(\002\022\026\n\016last_n_" + "samples\030\003 \001(\r\022+\n\017start_timestamp\030\004 \001(\0132\022" + ".context.Timestamp\022)\n\rend_timestamp\030\005 \001(" + "\0132\022.context.Timestamp\"X\n\006RawKpi\022%\n\ttimes" + "tamp\030\001 \001(\0132\022.context.Timestamp\022\'\n\tkpi_va" + "lue\030\002 \001(\0132\024.monitoring.KpiValue\"U\n\nRawKp" + "iList\022!\n\006kpi_id\030\001 \001(\0132\021.monitoring.KpiId" + "\022$\n\010raw_kpis\030\002 \003(\0132\022.monitoring.RawKpi\"<" + "\n\013RawKpiTable\022-\n\rraw_kpi_lists\030\001 \003(\0132\026.m" + "onitoring.RawKpiList\"&\n\005KpiId\022\035\n\006kpi_id\030" + "\001 \001(\0132\r.context.Uuid\"x\n\003Kpi\022!\n\006kpi_id\030\001 " + "\001(\0132\021.monitoring.KpiId\022%\n\ttimestamp\030\002 \001(" + "\0132\022.context.Timestamp\022\'\n\tkpi_value\030\003 \001(\013" + "2\024.monitoring.KpiValue\"\250\001\n\rKpiValueRange" + "\022)\n\013kpiMinValue\030\001 \001(\0132\024.monitoring.KpiVa" + "lue\022)\n\013kpiMaxValue\030\002 \001(\0132\024.monitoring.Kp" + "iValue\022\017\n\007inRange\030\003 \001(\010\022\027\n\017includeMinVal" + "ue\030\004 \001(\010\022\027\n\017includeMaxValue\030\005 \001(\010\"\241\001\n\010Kp" + "iValue\022\022\n\010int32Val\030\001 \001(\005H\000\022\023\n\tuint32Val\030" + "\002 \001(\rH\000\022\022\n\010int64Val\030\003 \001(\003H\000\022\023\n\tuint64Val" + "\030\004 \001(\004H\000\022\022\n\010floatVal\030\005 \001(\002H\000\022\023\n\tstringVa" + "l\030\006 \001(\tH\000\022\021\n\007boolVal\030\007 \001(\010H\000B\007\n\005value\"\'\n" + "\007KpiList\022\034\n\003kpi\030\001 \003(\0132\017.monitoring.Kpi\"K" + "\n\021KpiDescriptorList\0226\n\023kpi_descriptor_li" + "st\030\001 \003(\0132\031.monitoring.KpiDescriptor\"\362\001\n\016" + "SubsDescriptor\022+\n\007subs_id\030\001 \001(\0132\032.monito" + "ring.SubscriptionID\022!\n\006kpi_id\030\002 \001(\0132\021.mo" + "nitoring.KpiId\022\033\n\023sampling_duration_s\030\003 " + "\001(\002\022\033\n\023sampling_interval_s\030\004 \001(\002\022+\n\017star" + "t_timestamp\030\005 \001(\0132\022.context.Timestamp\022)\n" + "\rend_timestamp\030\006 \001(\0132\022.context.Timestamp" + "\"0\n\016SubscriptionID\022\036\n\007subs_id\030\001 \001(\0132\r.co" + "ntext.Uuid\"b\n\014SubsResponse\022+\n\007subs_id\030\001 " + "\001(\0132\032.monitoring.SubscriptionID\022%\n\010kpi_l" + "ist\030\002 \001(\0132\023.monitoring.KpiList\"?\n\010SubsLi" + "st\0223\n\017subs_descriptor\030\001 \003(\0132\032.monitoring" + ".SubsDescriptor\"\337\001\n\017AlarmDescriptor\022%\n\010a" + "larm_id\030\001 \001(\0132\023.monitoring.AlarmID\022\031\n\021al" + "arm_description\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022!\n\006k" + "pi_id\030\004 \001(\0132\021.monitoring.KpiId\0222\n\017kpi_va" + "lue_range\030\005 \001(\0132\031.monitoring.KpiValueRan" + "ge\022%\n\ttimestamp\030\006 \001(\0132\022.context.Timestam" + "p\"*\n\007AlarmID\022\037\n\010alarm_id\030\001 \001(\0132\r.context" + ".Uuid\"}\n\021AlarmSubscription\022%\n\010alarm_id\030\001" + " \001(\0132\023.monitoring.AlarmID\022\036\n\026subscriptio" + "n_timeout_s\030\002 \001(\002\022!\n\031subscription_freque" + "ncy_ms\030\003 \001(\002\"k\n\rAlarmResponse\022%\n\010alarm_i" + "d\030\001 \001(\0132\023.monitoring.AlarmID\022\014\n\004text\030\002 \001" + "(\t\022%\n\010kpi_list\030\003 \001(\0132\023.monitoring.KpiLis" + "t\"B\n\tAlarmList\0225\n\020alarm_descriptor\030\001 \003(\013" + "2\033.monitoring.AlarmDescriptor2\234\t\n\021Monito" + "ringService\0228\n\006SetKpi\022\031.monitoring.KpiDe" + "scriptor\032\021.monitoring.KpiId\"\000\0220\n\tDeleteK" + "pi\022\021.monitoring.KpiId\032\016.context.Empty\"\000\022" + "B\n\020GetKpiDescriptor\022\021.monitoring.KpiId\032\031" + ".monitoring.KpiDescriptor\"\000\022G\n\024GetKpiDes" + "criptorList\022\016.context.Empty\032\035.monitoring" + ".KpiDescriptorList\"\000\022/\n\nIncludeKpi\022\017.mon" + "itoring.Kpi\032\016.context.Empty\"\000\022=\n\nMonitor" + "Kpi\022\035.monitoring.MonitorKpiRequest\032\016.con" + "text.Empty\"\000\022?\n\014QueryKpiData\022\024.monitorin" + "g.KpiQuery\032\027.monitoring.RawKpiTable\"\000\022N\n" + "\022SetKpiSubscription\022\032.monitoring.SubsDes" + "criptor\032\030.monitoring.SubsResponse\"\0000\001\022M\n" + "\021GetSubsDescriptor\022\032.monitoring.Subscrip" + "tionID\032\032.monitoring.SubsDescriptor\"\000\022:\n\020" + "GetSubscriptions\022\016.context.Empty\032\024.monit" + "oring.SubsList\"\000\022B\n\022DeleteSubscription\022\032" + ".monitoring.SubscriptionID\032\016.context.Emp" + "ty\"\000\022A\n\013SetKpiAlarm\022\033.monitoring.AlarmDe" + "scriptor\032\023.monitoring.AlarmID\"\000\0224\n\tGetAl" + "arms\022\016.context.Empty\032\025.monitoring.AlarmL" + "ist\"\000\022H\n\022GetAlarmDescriptor\022\023.monitoring" + ".AlarmID\032\033.monitoring.AlarmDescriptor\"\000\022" + "V\n\026GetAlarmResponseStream\022\035.monitoring.A" + "larmSubscription\032\031.monitoring.AlarmRespo" + "nse\"\0000\001\0224\n\013DeleteAlarm\022\023.monitoring.Alar" + "mID\032\016.context.Empty\"\000\0226\n\014GetStreamKpi\022\021." + "monitoring.KpiId\032\017.monitoring.Kpi\"\0000\001\0225\n" + "\rGetInstantKpi\022\021.monitoring.KpiId\032\017.moni" + "toring.Kpi\"\000b\006proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { context.ContextOuterClass.getDescriptor(), kpi_sample_types.KpiSampleTypes.getDescriptor() }); + internal_static_monitoring_KpiDescriptor_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_monitoring_KpiDescriptor_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiDescriptor_descriptor, new java.lang.String[] { "KpiId", "KpiDescription", "KpiIdList", "KpiSampleType", "DeviceId", "EndpointId", "ServiceId", "SliceId", "ConnectionId", "LinkId" }); + internal_static_monitoring_MonitorKpiRequest_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_MonitorKpiRequest_descriptor, new java.lang.String[] { "KpiId", "MonitoringWindowS", "SamplingRateS" }); + internal_static_monitoring_KpiQuery_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_monitoring_KpiQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiQuery_descriptor, new java.lang.String[] { "KpiIds", "MonitoringWindowS", "LastNSamples", "StartTimestamp", "EndTimestamp" }); + internal_static_monitoring_RawKpi_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_monitoring_RawKpi_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_RawKpi_descriptor, new java.lang.String[] { "Timestamp", "KpiValue" }); + internal_static_monitoring_RawKpiList_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_monitoring_RawKpiList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_RawKpiList_descriptor, new java.lang.String[] { "KpiId", "RawKpis" }); + internal_static_monitoring_RawKpiTable_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_monitoring_RawKpiTable_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_RawKpiTable_descriptor, new java.lang.String[] { "RawKpiLists" }); + internal_static_monitoring_KpiId_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_monitoring_KpiId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiId_descriptor, new java.lang.String[] { "KpiId" }); + internal_static_monitoring_Kpi_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_monitoring_Kpi_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_Kpi_descriptor, new java.lang.String[] { "KpiId", "Timestamp", "KpiValue" }); + internal_static_monitoring_KpiValueRange_descriptor = getDescriptor().getMessageTypes().get(8); + internal_static_monitoring_KpiValueRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiValueRange_descriptor, new java.lang.String[] { "KpiMinValue", "KpiMaxValue", "InRange", "IncludeMinValue", "IncludeMaxValue" }); + internal_static_monitoring_KpiValue_descriptor = getDescriptor().getMessageTypes().get(9); + internal_static_monitoring_KpiValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiValue_descriptor, new java.lang.String[] { "Int32Val", "Uint32Val", "Int64Val", "Uint64Val", "FloatVal", "StringVal", "BoolVal", "Value" }); + internal_static_monitoring_KpiList_descriptor = getDescriptor().getMessageTypes().get(10); + internal_static_monitoring_KpiList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiList_descriptor, new java.lang.String[] { "Kpi" }); + internal_static_monitoring_KpiDescriptorList_descriptor = getDescriptor().getMessageTypes().get(11); + internal_static_monitoring_KpiDescriptorList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiDescriptorList_descriptor, new java.lang.String[] { "KpiDescriptorList" }); + internal_static_monitoring_SubsDescriptor_descriptor = getDescriptor().getMessageTypes().get(12); + internal_static_monitoring_SubsDescriptor_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_SubsDescriptor_descriptor, new java.lang.String[] { "SubsId", "KpiId", "SamplingDurationS", "SamplingIntervalS", "StartTimestamp", "EndTimestamp" }); + internal_static_monitoring_SubscriptionID_descriptor = getDescriptor().getMessageTypes().get(13); + internal_static_monitoring_SubscriptionID_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_SubscriptionID_descriptor, new java.lang.String[] { "SubsId" }); + internal_static_monitoring_SubsResponse_descriptor = getDescriptor().getMessageTypes().get(14); + internal_static_monitoring_SubsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_SubsResponse_descriptor, new java.lang.String[] { "SubsId", "KpiList" }); + internal_static_monitoring_SubsList_descriptor = getDescriptor().getMessageTypes().get(15); + internal_static_monitoring_SubsList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_SubsList_descriptor, new java.lang.String[] { "SubsDescriptor" }); + internal_static_monitoring_AlarmDescriptor_descriptor = getDescriptor().getMessageTypes().get(16); + internal_static_monitoring_AlarmDescriptor_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_AlarmDescriptor_descriptor, new java.lang.String[] { "AlarmId", "AlarmDescription", "Name", "KpiId", "KpiValueRange", "Timestamp" }); + internal_static_monitoring_AlarmID_descriptor = getDescriptor().getMessageTypes().get(17); + internal_static_monitoring_AlarmID_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_AlarmID_descriptor, new java.lang.String[] { "AlarmId" }); + internal_static_monitoring_AlarmSubscription_descriptor = getDescriptor().getMessageTypes().get(18); + internal_static_monitoring_AlarmSubscription_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_AlarmSubscription_descriptor, new java.lang.String[] { "AlarmId", "SubscriptionTimeoutS", "SubscriptionFrequencyMs" }); + internal_static_monitoring_AlarmResponse_descriptor = getDescriptor().getMessageTypes().get(19); + internal_static_monitoring_AlarmResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_AlarmResponse_descriptor, new java.lang.String[] { "AlarmId", "Text", "KpiList" }); + internal_static_monitoring_AlarmList_descriptor = getDescriptor().getMessageTypes().get(20); + internal_static_monitoring_AlarmList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_AlarmList_descriptor, new java.lang.String[] { "AlarmDescriptor" }); + context.ContextOuterClass.getDescriptor(); + kpi_sample_types.KpiSampleTypes.getDescriptor(); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/policy/target/generated-sources/grpc/monitoring/MonitoringService.java b/src/policy/target/generated-sources/grpc/monitoring/MonitoringService.java index 0ce30559b2c0a1bb6236431482d6b99b82cf0842..69f4d6c684168616461957869134bc154c70a018 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/MonitoringService.java +++ b/src/policy/target/generated-sources/grpc/monitoring/MonitoringService.java @@ -1,50 +1,43 @@ package monitoring; -import io.quarkus.grpc.runtime.MutinyService; +import io.quarkus.grpc.MutinyService; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: monitoring.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: monitoring.proto") public interface MonitoringService extends MutinyService { - io.smallrye.mutiny.Uni setKpi(monitoring.Monitoring.KpiDescriptor request); - + io.smallrye.mutiny.Uni deleteKpi(monitoring.Monitoring.KpiId request); - + io.smallrye.mutiny.Uni getKpiDescriptor(monitoring.Monitoring.KpiId request); - + io.smallrye.mutiny.Uni getKpiDescriptorList(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni includeKpi(monitoring.Monitoring.Kpi request); - + io.smallrye.mutiny.Uni monitorKpi(monitoring.Monitoring.MonitorKpiRequest request); - + io.smallrye.mutiny.Uni queryKpiData(monitoring.Monitoring.KpiQuery request); - + io.smallrye.mutiny.Uni getSubsDescriptor(monitoring.Monitoring.SubscriptionID request); - + io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni deleteSubscription(monitoring.Monitoring.SubscriptionID request); - + io.smallrye.mutiny.Uni setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request); - + io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni getAlarmDescriptor(monitoring.Monitoring.AlarmID request); - + io.smallrye.mutiny.Uni deleteAlarm(monitoring.Monitoring.AlarmID request); - + io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request); - - + io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request); - + io.smallrye.mutiny.Multi getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request); - - io.smallrye.mutiny.Multi getStreamKpi(monitoring.Monitoring.KpiId request); - - -} \ No newline at end of file + io.smallrye.mutiny.Multi getStreamKpi(monitoring.Monitoring.KpiId request); +} diff --git a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java index cbc984e7132bdbf22c9b99a510106c5c6f4cbda7..d1278aa92d910fc83219363c19ee19546156b467 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java +++ b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java @@ -2,165 +2,176 @@ package monitoring; import io.grpc.BindableService; import io.quarkus.grpc.GrpcService; -import io.quarkus.grpc.runtime.MutinyBean; +import io.quarkus.grpc.MutinyBean; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: monitoring.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: monitoring.proto") public class MonitoringServiceBean extends MutinyMonitoringServiceGrpc.MonitoringServiceImplBase implements BindableService, MutinyBean { private final MonitoringService delegate; MonitoringServiceBean(@GrpcService MonitoringService delegate) { - this.delegate = delegate; + this.delegate = delegate; } @Override public io.smallrye.mutiny.Uni setKpi(monitoring.Monitoring.KpiDescriptor request) { - try { - return delegate.setKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni deleteKpi(monitoring.Monitoring.KpiId request) { - try { - return delegate.deleteKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.deleteKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getKpiDescriptor(monitoring.Monitoring.KpiId request) { - try { - return delegate.getKpiDescriptor(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getKpiDescriptor(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getKpiDescriptorList(context.ContextOuterClass.Empty request) { - try { - return delegate.getKpiDescriptorList(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getKpiDescriptorList(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni includeKpi(monitoring.Monitoring.Kpi request) { - try { - return delegate.includeKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.includeKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { - try { - return delegate.monitorKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.monitorKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni queryKpiData(monitoring.Monitoring.KpiQuery request) { - try { - return delegate.queryKpiData(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.queryKpiData(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { - try { - return delegate.getSubsDescriptor(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getSubsDescriptor(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { - try { - return delegate.getSubscriptions(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getSubscriptions(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni deleteSubscription(monitoring.Monitoring.SubscriptionID request) { - try { - return delegate.deleteSubscription(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.deleteSubscription(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { - try { - return delegate.setKpiAlarm(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setKpiAlarm(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { - try { - return delegate.getAlarms(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getAlarms(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { - try { - return delegate.getAlarmDescriptor(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getAlarmDescriptor(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni deleteAlarm(monitoring.Monitoring.AlarmID request) { - try { - return delegate.deleteAlarm(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.deleteAlarm(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { - try { - return delegate.getInstantKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getInstantKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { - try { - return delegate.setKpiSubscription(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setKpiSubscription(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request) { - try { - return delegate.getAlarmResponseStream(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getAlarmResponseStream(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getStreamKpi(monitoring.Monitoring.KpiId request) { - try { - return delegate.getStreamKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getStreamKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java index 0e8ff5d1b8929694b49548984cd7d53f9c8f68a4..3e7a9cc26a91fecbbce3aa3ceecb05dde89aaaa7 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java +++ b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java @@ -1,99 +1,117 @@ package monitoring; import java.util.function.BiFunction; +import io.quarkus.grpc.MutinyClient; -import io.quarkus.grpc.runtime.MutinyClient; - -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: monitoring.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: monitoring.proto") public class MonitoringServiceClient implements MonitoringService, MutinyClient { private final MutinyMonitoringServiceGrpc.MutinyMonitoringServiceStub stub; public MonitoringServiceClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) { - this.stub = stubConfigurator.apply(name,MutinyMonitoringServiceGrpc.newMutinyStub(channel)); + this.stub = stubConfigurator.apply(name, MutinyMonitoringServiceGrpc.newMutinyStub(channel)); + } + + private MonitoringServiceClient(MutinyMonitoringServiceGrpc.MutinyMonitoringServiceStub stub) { + this.stub = stub; + } + + public MonitoringServiceClient newInstanceWithStub(MutinyMonitoringServiceGrpc.MutinyMonitoringServiceStub stub) { + return new MonitoringServiceClient(stub); } @Override public MutinyMonitoringServiceGrpc.MutinyMonitoringServiceStub getStub() { - return stub; + return stub; } @Override public io.smallrye.mutiny.Uni setKpi(monitoring.Monitoring.KpiDescriptor request) { - return stub.setKpi(request); + return stub.setKpi(request); } + @Override public io.smallrye.mutiny.Uni deleteKpi(monitoring.Monitoring.KpiId request) { - return stub.deleteKpi(request); + return stub.deleteKpi(request); } + @Override public io.smallrye.mutiny.Uni getKpiDescriptor(monitoring.Monitoring.KpiId request) { - return stub.getKpiDescriptor(request); + return stub.getKpiDescriptor(request); } + @Override public io.smallrye.mutiny.Uni getKpiDescriptorList(context.ContextOuterClass.Empty request) { - return stub.getKpiDescriptorList(request); + return stub.getKpiDescriptorList(request); } + @Override public io.smallrye.mutiny.Uni includeKpi(monitoring.Monitoring.Kpi request) { - return stub.includeKpi(request); + return stub.includeKpi(request); } + @Override public io.smallrye.mutiny.Uni monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { - return stub.monitorKpi(request); + return stub.monitorKpi(request); } + @Override public io.smallrye.mutiny.Uni queryKpiData(monitoring.Monitoring.KpiQuery request) { - return stub.queryKpiData(request); + return stub.queryKpiData(request); } + @Override public io.smallrye.mutiny.Uni getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { - return stub.getSubsDescriptor(request); + return stub.getSubsDescriptor(request); } + @Override public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { - return stub.getSubscriptions(request); + return stub.getSubscriptions(request); } + @Override public io.smallrye.mutiny.Uni deleteSubscription(monitoring.Monitoring.SubscriptionID request) { - return stub.deleteSubscription(request); + return stub.deleteSubscription(request); } + @Override public io.smallrye.mutiny.Uni setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { - return stub.setKpiAlarm(request); + return stub.setKpiAlarm(request); } + @Override public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { - return stub.getAlarms(request); + return stub.getAlarms(request); } + @Override public io.smallrye.mutiny.Uni getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { - return stub.getAlarmDescriptor(request); + return stub.getAlarmDescriptor(request); } + @Override public io.smallrye.mutiny.Uni deleteAlarm(monitoring.Monitoring.AlarmID request) { - return stub.deleteAlarm(request); + return stub.deleteAlarm(request); } + @Override public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { - return stub.getInstantKpi(request); + return stub.getInstantKpi(request); } @Override public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { - return stub.setKpiSubscription(request); + return stub.setKpiSubscription(request); } @Override public io.smallrye.mutiny.Multi getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request) { - return stub.getAlarmResponseStream(request); + return stub.getAlarmResponseStream(request); } @Override public io.smallrye.mutiny.Multi getStreamKpi(monitoring.Monitoring.KpiId request) { - return stub.getStreamKpi(request); + return stub.getStreamKpi(request); } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java index c5f55b3b44c03ea8f5377ce11e3c3e547da5ef06..83dffd6257d5685ee7d49c45258bbf1d68d3a817 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java @@ -4,1509 +4,961 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@javax.annotation.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.38.1)", comments = "Source: monitoring.proto") public final class MonitoringServiceGrpc { - private MonitoringServiceGrpc() {} + private MonitoringServiceGrpc() { + } - public static final String SERVICE_NAME = "monitoring.MonitoringService"; + public static final String SERVICE_NAME = "monitoring.MonitoringService"; - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getSetKpiMethod; + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getSetKpiMethod; - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetKpi", - requestType = monitoring.Monitoring.KpiDescriptor.class, - responseType = monitoring.Monitoring.KpiId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetKpiMethod() { - io.grpc.MethodDescriptor getSetKpiMethod; - if ((getSetKpiMethod = MonitoringServiceGrpc.getSetKpiMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetKpi", requestType = monitoring.Monitoring.KpiDescriptor.class, responseType = monitoring.Monitoring.KpiId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetKpiMethod() { + io.grpc.MethodDescriptor getSetKpiMethod; if ((getSetKpiMethod = MonitoringServiceGrpc.getSetKpiMethod) == null) { - MonitoringServiceGrpc.getSetKpiMethod = getSetKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiDescriptor.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiId.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpi")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getSetKpiMethod = MonitoringServiceGrpc.getSetKpiMethod) == null) { + MonitoringServiceGrpc.getSetKpiMethod = getSetKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiDescriptor.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiId.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpi")).build(); + } + } + } + return getSetKpiMethod; } - return getSetKpiMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteKpiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteKpi", - requestType = monitoring.Monitoring.KpiId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteKpiMethod() { - io.grpc.MethodDescriptor getDeleteKpiMethod; - if ((getDeleteKpiMethod = MonitoringServiceGrpc.getDeleteKpiMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getDeleteKpiMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteKpi", requestType = monitoring.Monitoring.KpiId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteKpiMethod() { + io.grpc.MethodDescriptor getDeleteKpiMethod; if ((getDeleteKpiMethod = MonitoringServiceGrpc.getDeleteKpiMethod) == null) { - MonitoringServiceGrpc.getDeleteKpiMethod = getDeleteKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteKpi")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getDeleteKpiMethod = MonitoringServiceGrpc.getDeleteKpiMethod) == null) { + MonitoringServiceGrpc.getDeleteKpiMethod = getDeleteKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteKpi")).build(); + } + } + } + return getDeleteKpiMethod; } - return getDeleteKpiMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetKpiDescriptorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetKpiDescriptor", - requestType = monitoring.Monitoring.KpiId.class, - responseType = monitoring.Monitoring.KpiDescriptor.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetKpiDescriptorMethod() { - io.grpc.MethodDescriptor getGetKpiDescriptorMethod; - if ((getGetKpiDescriptorMethod = MonitoringServiceGrpc.getGetKpiDescriptorMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetKpiDescriptorMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetKpiDescriptor", requestType = monitoring.Monitoring.KpiId.class, responseType = monitoring.Monitoring.KpiDescriptor.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetKpiDescriptorMethod() { + io.grpc.MethodDescriptor getGetKpiDescriptorMethod; if ((getGetKpiDescriptorMethod = MonitoringServiceGrpc.getGetKpiDescriptorMethod) == null) { - MonitoringServiceGrpc.getGetKpiDescriptorMethod = getGetKpiDescriptorMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKpiDescriptor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiDescriptor.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetKpiDescriptor")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetKpiDescriptorMethod = MonitoringServiceGrpc.getGetKpiDescriptorMethod) == null) { + MonitoringServiceGrpc.getGetKpiDescriptorMethod = getGetKpiDescriptorMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKpiDescriptor")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiDescriptor.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetKpiDescriptor")).build(); + } + } + } + return getGetKpiDescriptorMethod; } - return getGetKpiDescriptorMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetKpiDescriptorListMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetKpiDescriptorList", - requestType = context.ContextOuterClass.Empty.class, - responseType = monitoring.Monitoring.KpiDescriptorList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetKpiDescriptorListMethod() { - io.grpc.MethodDescriptor getGetKpiDescriptorListMethod; - if ((getGetKpiDescriptorListMethod = MonitoringServiceGrpc.getGetKpiDescriptorListMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetKpiDescriptorListMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetKpiDescriptorList", requestType = context.ContextOuterClass.Empty.class, responseType = monitoring.Monitoring.KpiDescriptorList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetKpiDescriptorListMethod() { + io.grpc.MethodDescriptor getGetKpiDescriptorListMethod; if ((getGetKpiDescriptorListMethod = MonitoringServiceGrpc.getGetKpiDescriptorListMethod) == null) { - MonitoringServiceGrpc.getGetKpiDescriptorListMethod = getGetKpiDescriptorListMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKpiDescriptorList")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiDescriptorList.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetKpiDescriptorList")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetKpiDescriptorListMethod = MonitoringServiceGrpc.getGetKpiDescriptorListMethod) == null) { + MonitoringServiceGrpc.getGetKpiDescriptorListMethod = getGetKpiDescriptorListMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKpiDescriptorList")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiDescriptorList.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetKpiDescriptorList")).build(); + } + } + } + return getGetKpiDescriptorListMethod; } - return getGetKpiDescriptorListMethod; - } - - private static volatile io.grpc.MethodDescriptor getIncludeKpiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "IncludeKpi", - requestType = monitoring.Monitoring.Kpi.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getIncludeKpiMethod() { - io.grpc.MethodDescriptor getIncludeKpiMethod; - if ((getIncludeKpiMethod = MonitoringServiceGrpc.getIncludeKpiMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getIncludeKpiMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "IncludeKpi", requestType = monitoring.Monitoring.Kpi.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getIncludeKpiMethod() { + io.grpc.MethodDescriptor getIncludeKpiMethod; if ((getIncludeKpiMethod = MonitoringServiceGrpc.getIncludeKpiMethod) == null) { - MonitoringServiceGrpc.getIncludeKpiMethod = getIncludeKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "IncludeKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.Kpi.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("IncludeKpi")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getIncludeKpiMethod = MonitoringServiceGrpc.getIncludeKpiMethod) == null) { + MonitoringServiceGrpc.getIncludeKpiMethod = getIncludeKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "IncludeKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.Kpi.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("IncludeKpi")).build(); + } + } + } + return getIncludeKpiMethod; } - return getIncludeKpiMethod; - } - - private static volatile io.grpc.MethodDescriptor getMonitorKpiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "MonitorKpi", - requestType = monitoring.Monitoring.MonitorKpiRequest.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getMonitorKpiMethod() { - io.grpc.MethodDescriptor getMonitorKpiMethod; - if ((getMonitorKpiMethod = MonitoringServiceGrpc.getMonitorKpiMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getMonitorKpiMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "MonitorKpi", requestType = monitoring.Monitoring.MonitorKpiRequest.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getMonitorKpiMethod() { + io.grpc.MethodDescriptor getMonitorKpiMethod; if ((getMonitorKpiMethod = MonitoringServiceGrpc.getMonitorKpiMethod) == null) { - MonitoringServiceGrpc.getMonitorKpiMethod = getMonitorKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MonitorKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("MonitorKpi")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getMonitorKpiMethod = MonitoringServiceGrpc.getMonitorKpiMethod) == null) { + MonitoringServiceGrpc.getMonitorKpiMethod = getMonitorKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "MonitorKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("MonitorKpi")).build(); + } + } + } + return getMonitorKpiMethod; } - return getMonitorKpiMethod; - } - - private static volatile io.grpc.MethodDescriptor getQueryKpiDataMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "QueryKpiData", - requestType = monitoring.Monitoring.KpiQuery.class, - responseType = monitoring.Monitoring.RawKpiTable.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getQueryKpiDataMethod() { - io.grpc.MethodDescriptor getQueryKpiDataMethod; - if ((getQueryKpiDataMethod = MonitoringServiceGrpc.getQueryKpiDataMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getQueryKpiDataMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "QueryKpiData", requestType = monitoring.Monitoring.KpiQuery.class, responseType = monitoring.Monitoring.RawKpiTable.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getQueryKpiDataMethod() { + io.grpc.MethodDescriptor getQueryKpiDataMethod; if ((getQueryKpiDataMethod = MonitoringServiceGrpc.getQueryKpiDataMethod) == null) { - MonitoringServiceGrpc.getQueryKpiDataMethod = getQueryKpiDataMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryKpiData")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiQuery.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.RawKpiTable.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("QueryKpiData")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getQueryKpiDataMethod = MonitoringServiceGrpc.getQueryKpiDataMethod) == null) { + MonitoringServiceGrpc.getQueryKpiDataMethod = getQueryKpiDataMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryKpiData")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiQuery.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.RawKpiTable.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("QueryKpiData")).build(); + } + } + } + return getQueryKpiDataMethod; } - return getQueryKpiDataMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetKpiSubscriptionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetKpiSubscription", - requestType = monitoring.Monitoring.SubsDescriptor.class, - responseType = monitoring.Monitoring.SubsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getSetKpiSubscriptionMethod() { - io.grpc.MethodDescriptor getSetKpiSubscriptionMethod; - if ((getSetKpiSubscriptionMethod = MonitoringServiceGrpc.getSetKpiSubscriptionMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getSetKpiSubscriptionMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetKpiSubscription", requestType = monitoring.Monitoring.SubsDescriptor.class, responseType = monitoring.Monitoring.SubsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getSetKpiSubscriptionMethod() { + io.grpc.MethodDescriptor getSetKpiSubscriptionMethod; if ((getSetKpiSubscriptionMethod = MonitoringServiceGrpc.getSetKpiSubscriptionMethod) == null) { - MonitoringServiceGrpc.getSetKpiSubscriptionMethod = getSetKpiSubscriptionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpiSubscription")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubsDescriptor.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubsResponse.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpiSubscription")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getSetKpiSubscriptionMethod = MonitoringServiceGrpc.getSetKpiSubscriptionMethod) == null) { + MonitoringServiceGrpc.getSetKpiSubscriptionMethod = getSetKpiSubscriptionMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpiSubscription")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.SubsDescriptor.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.SubsResponse.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpiSubscription")).build(); + } + } + } + return getSetKpiSubscriptionMethod; } - return getSetKpiSubscriptionMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetSubsDescriptorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSubsDescriptor", - requestType = monitoring.Monitoring.SubscriptionID.class, - responseType = monitoring.Monitoring.SubsDescriptor.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetSubsDescriptorMethod() { - io.grpc.MethodDescriptor getGetSubsDescriptorMethod; - if ((getGetSubsDescriptorMethod = MonitoringServiceGrpc.getGetSubsDescriptorMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetSubsDescriptorMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetSubsDescriptor", requestType = monitoring.Monitoring.SubscriptionID.class, responseType = monitoring.Monitoring.SubsDescriptor.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetSubsDescriptorMethod() { + io.grpc.MethodDescriptor getGetSubsDescriptorMethod; if ((getGetSubsDescriptorMethod = MonitoringServiceGrpc.getGetSubsDescriptorMethod) == null) { - MonitoringServiceGrpc.getGetSubsDescriptorMethod = getGetSubsDescriptorMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubsDescriptor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubscriptionID.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubsDescriptor.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetSubsDescriptor")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetSubsDescriptorMethod = MonitoringServiceGrpc.getGetSubsDescriptorMethod) == null) { + MonitoringServiceGrpc.getGetSubsDescriptorMethod = getGetSubsDescriptorMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubsDescriptor")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.SubscriptionID.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.SubsDescriptor.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetSubsDescriptor")).build(); + } + } + } + return getGetSubsDescriptorMethod; } - return getGetSubsDescriptorMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetSubscriptionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSubscriptions", - requestType = context.ContextOuterClass.Empty.class, - responseType = monitoring.Monitoring.SubsList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetSubscriptionsMethod() { - io.grpc.MethodDescriptor getGetSubscriptionsMethod; - if ((getGetSubscriptionsMethod = MonitoringServiceGrpc.getGetSubscriptionsMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetSubscriptionsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetSubscriptions", requestType = context.ContextOuterClass.Empty.class, responseType = monitoring.Monitoring.SubsList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetSubscriptionsMethod() { + io.grpc.MethodDescriptor getGetSubscriptionsMethod; if ((getGetSubscriptionsMethod = MonitoringServiceGrpc.getGetSubscriptionsMethod) == null) { - MonitoringServiceGrpc.getGetSubscriptionsMethod = getGetSubscriptionsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubscriptions")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubsList.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetSubscriptions")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetSubscriptionsMethod = MonitoringServiceGrpc.getGetSubscriptionsMethod) == null) { + MonitoringServiceGrpc.getGetSubscriptionsMethod = getGetSubscriptionsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubscriptions")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.SubsList.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetSubscriptions")).build(); + } + } + } + return getGetSubscriptionsMethod; } - return getGetSubscriptionsMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteSubscriptionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteSubscription", - requestType = monitoring.Monitoring.SubscriptionID.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteSubscriptionMethod() { - io.grpc.MethodDescriptor getDeleteSubscriptionMethod; - if ((getDeleteSubscriptionMethod = MonitoringServiceGrpc.getDeleteSubscriptionMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getDeleteSubscriptionMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteSubscription", requestType = monitoring.Monitoring.SubscriptionID.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteSubscriptionMethod() { + io.grpc.MethodDescriptor getDeleteSubscriptionMethod; if ((getDeleteSubscriptionMethod = MonitoringServiceGrpc.getDeleteSubscriptionMethod) == null) { - MonitoringServiceGrpc.getDeleteSubscriptionMethod = getDeleteSubscriptionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSubscription")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubscriptionID.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteSubscription")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getDeleteSubscriptionMethod = MonitoringServiceGrpc.getDeleteSubscriptionMethod) == null) { + MonitoringServiceGrpc.getDeleteSubscriptionMethod = getDeleteSubscriptionMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSubscription")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.SubscriptionID.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteSubscription")).build(); + } + } + } + return getDeleteSubscriptionMethod; } - return getDeleteSubscriptionMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetKpiAlarmMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetKpiAlarm", - requestType = monitoring.Monitoring.AlarmDescriptor.class, - responseType = monitoring.Monitoring.AlarmID.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetKpiAlarmMethod() { - io.grpc.MethodDescriptor getSetKpiAlarmMethod; - if ((getSetKpiAlarmMethod = MonitoringServiceGrpc.getSetKpiAlarmMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getSetKpiAlarmMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetKpiAlarm", requestType = monitoring.Monitoring.AlarmDescriptor.class, responseType = monitoring.Monitoring.AlarmID.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetKpiAlarmMethod() { + io.grpc.MethodDescriptor getSetKpiAlarmMethod; if ((getSetKpiAlarmMethod = MonitoringServiceGrpc.getSetKpiAlarmMethod) == null) { - MonitoringServiceGrpc.getSetKpiAlarmMethod = getSetKpiAlarmMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpiAlarm")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmDescriptor.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmID.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpiAlarm")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getSetKpiAlarmMethod = MonitoringServiceGrpc.getSetKpiAlarmMethod) == null) { + MonitoringServiceGrpc.getSetKpiAlarmMethod = getSetKpiAlarmMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpiAlarm")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmDescriptor.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmID.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpiAlarm")).build(); + } + } + } + return getSetKpiAlarmMethod; } - return getSetKpiAlarmMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetAlarmsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAlarms", - requestType = context.ContextOuterClass.Empty.class, - responseType = monitoring.Monitoring.AlarmList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetAlarmsMethod() { - io.grpc.MethodDescriptor getGetAlarmsMethod; - if ((getGetAlarmsMethod = MonitoringServiceGrpc.getGetAlarmsMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetAlarmsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetAlarms", requestType = context.ContextOuterClass.Empty.class, responseType = monitoring.Monitoring.AlarmList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAlarmsMethod() { + io.grpc.MethodDescriptor getGetAlarmsMethod; if ((getGetAlarmsMethod = MonitoringServiceGrpc.getGetAlarmsMethod) == null) { - MonitoringServiceGrpc.getGetAlarmsMethod = getGetAlarmsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarms")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmList.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarms")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetAlarmsMethod = MonitoringServiceGrpc.getGetAlarmsMethod) == null) { + MonitoringServiceGrpc.getGetAlarmsMethod = getGetAlarmsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarms")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmList.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarms")).build(); + } + } + } + return getGetAlarmsMethod; } - return getGetAlarmsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetAlarmDescriptorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAlarmDescriptor", - requestType = monitoring.Monitoring.AlarmID.class, - responseType = monitoring.Monitoring.AlarmDescriptor.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetAlarmDescriptorMethod() { - io.grpc.MethodDescriptor getGetAlarmDescriptorMethod; - if ((getGetAlarmDescriptorMethod = MonitoringServiceGrpc.getGetAlarmDescriptorMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetAlarmDescriptorMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetAlarmDescriptor", requestType = monitoring.Monitoring.AlarmID.class, responseType = monitoring.Monitoring.AlarmDescriptor.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAlarmDescriptorMethod() { + io.grpc.MethodDescriptor getGetAlarmDescriptorMethod; if ((getGetAlarmDescriptorMethod = MonitoringServiceGrpc.getGetAlarmDescriptorMethod) == null) { - MonitoringServiceGrpc.getGetAlarmDescriptorMethod = getGetAlarmDescriptorMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarmDescriptor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmID.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmDescriptor.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarmDescriptor")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetAlarmDescriptorMethod = MonitoringServiceGrpc.getGetAlarmDescriptorMethod) == null) { + MonitoringServiceGrpc.getGetAlarmDescriptorMethod = getGetAlarmDescriptorMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarmDescriptor")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmID.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmDescriptor.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarmDescriptor")).build(); + } + } + } + return getGetAlarmDescriptorMethod; } - return getGetAlarmDescriptorMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetAlarmResponseStreamMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAlarmResponseStream", - requestType = monitoring.Monitoring.AlarmSubscription.class, - responseType = monitoring.Monitoring.AlarmResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetAlarmResponseStreamMethod() { - io.grpc.MethodDescriptor getGetAlarmResponseStreamMethod; - if ((getGetAlarmResponseStreamMethod = MonitoringServiceGrpc.getGetAlarmResponseStreamMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetAlarmResponseStreamMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetAlarmResponseStream", requestType = monitoring.Monitoring.AlarmSubscription.class, responseType = monitoring.Monitoring.AlarmResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetAlarmResponseStreamMethod() { + io.grpc.MethodDescriptor getGetAlarmResponseStreamMethod; if ((getGetAlarmResponseStreamMethod = MonitoringServiceGrpc.getGetAlarmResponseStreamMethod) == null) { - MonitoringServiceGrpc.getGetAlarmResponseStreamMethod = getGetAlarmResponseStreamMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarmResponseStream")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmSubscription.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmResponse.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarmResponseStream")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetAlarmResponseStreamMethod = MonitoringServiceGrpc.getGetAlarmResponseStreamMethod) == null) { + MonitoringServiceGrpc.getGetAlarmResponseStreamMethod = getGetAlarmResponseStreamMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarmResponseStream")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmSubscription.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmResponse.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarmResponseStream")).build(); + } + } + } + return getGetAlarmResponseStreamMethod; } - return getGetAlarmResponseStreamMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteAlarmMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteAlarm", - requestType = monitoring.Monitoring.AlarmID.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteAlarmMethod() { - io.grpc.MethodDescriptor getDeleteAlarmMethod; - if ((getDeleteAlarmMethod = MonitoringServiceGrpc.getDeleteAlarmMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getDeleteAlarmMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteAlarm", requestType = monitoring.Monitoring.AlarmID.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteAlarmMethod() { + io.grpc.MethodDescriptor getDeleteAlarmMethod; if ((getDeleteAlarmMethod = MonitoringServiceGrpc.getDeleteAlarmMethod) == null) { - MonitoringServiceGrpc.getDeleteAlarmMethod = getDeleteAlarmMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAlarm")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmID.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteAlarm")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getDeleteAlarmMethod = MonitoringServiceGrpc.getDeleteAlarmMethod) == null) { + MonitoringServiceGrpc.getDeleteAlarmMethod = getDeleteAlarmMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAlarm")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmID.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteAlarm")).build(); + } + } + } + return getDeleteAlarmMethod; } - return getDeleteAlarmMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetStreamKpiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetStreamKpi", - requestType = monitoring.Monitoring.KpiId.class, - responseType = monitoring.Monitoring.Kpi.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetStreamKpiMethod() { - io.grpc.MethodDescriptor getGetStreamKpiMethod; - if ((getGetStreamKpiMethod = MonitoringServiceGrpc.getGetStreamKpiMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetStreamKpiMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetStreamKpi", requestType = monitoring.Monitoring.KpiId.class, responseType = monitoring.Monitoring.Kpi.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetStreamKpiMethod() { + io.grpc.MethodDescriptor getGetStreamKpiMethod; if ((getGetStreamKpiMethod = MonitoringServiceGrpc.getGetStreamKpiMethod) == null) { - MonitoringServiceGrpc.getGetStreamKpiMethod = getGetStreamKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStreamKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.Kpi.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetStreamKpi")) - .build(); - } - } - } - return getGetStreamKpiMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetInstantKpiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetInstantKpi", - requestType = monitoring.Monitoring.KpiId.class, - responseType = monitoring.Monitoring.Kpi.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetInstantKpiMethod() { - io.grpc.MethodDescriptor getGetInstantKpiMethod; - if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { - if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) { - MonitoringServiceGrpc.getGetInstantKpiMethod = getGetInstantKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstantKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.Kpi.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetInstantKpi")) - .build(); - } - } - } - return getGetInstantKpiMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static MonitoringServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public MonitoringServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MonitoringServiceStub(channel, callOptions); - } - }; - return MonitoringServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static MonitoringServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public MonitoringServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MonitoringServiceBlockingStub(channel, callOptions); - } - }; - return MonitoringServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static MonitoringServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public MonitoringServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MonitoringServiceFutureStub(channel, callOptions); + synchronized (MonitoringServiceGrpc.class) { + if ((getGetStreamKpiMethod = MonitoringServiceGrpc.getGetStreamKpiMethod) == null) { + MonitoringServiceGrpc.getGetStreamKpiMethod = getGetStreamKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStreamKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.Kpi.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetStreamKpi")).build(); + } + } } - }; - return MonitoringServiceFutureStub.newStub(factory, channel); - } + return getGetStreamKpiMethod; + } - /** - */ - public static abstract class MonitoringServiceImplBase implements io.grpc.BindableService { + private static volatile io.grpc.MethodDescriptor getGetInstantKpiMethod; - /** - */ - public void setKpi(monitoring.Monitoring.KpiDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiMethod(), responseObserver); + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetInstantKpi", requestType = monitoring.Monitoring.KpiId.class, responseType = monitoring.Monitoring.Kpi.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetInstantKpiMethod() { + io.grpc.MethodDescriptor getGetInstantKpiMethod; + if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) { + synchronized (MonitoringServiceGrpc.class) { + if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) { + MonitoringServiceGrpc.getGetInstantKpiMethod = getGetInstantKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstantKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.Kpi.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetInstantKpi")).build(); + } + } + } + return getGetInstantKpiMethod; } /** + * Creates a new async stub that supports all call types for the service */ - public void deleteKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteKpiMethod(), responseObserver); - } + public static MonitoringServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { - /** - */ - public void getKpiDescriptor(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorMethod(), responseObserver); + @java.lang.Override + public MonitoringServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MonitoringServiceStub(channel, callOptions); + } + }; + return MonitoringServiceStub.newStub(factory, channel); } /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public void getKpiDescriptorList(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorListMethod(), responseObserver); - } + public static MonitoringServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { - /** - */ - public void includeKpi(monitoring.Monitoring.Kpi request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIncludeKpiMethod(), responseObserver); + @java.lang.Override + public MonitoringServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MonitoringServiceBlockingStub(channel, callOptions); + } + }; + return MonitoringServiceBlockingStub.newStub(factory, channel); } /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorKpiMethod(), responseObserver); - } + public static MonitoringServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { - /** - */ - public void queryKpiData(monitoring.Monitoring.KpiQuery request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryKpiDataMethod(), responseObserver); + @java.lang.Override + public MonitoringServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MonitoringServiceFutureStub(channel, callOptions); + } + }; + return MonitoringServiceFutureStub.newStub(factory, channel); } /** */ - public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiSubscriptionMethod(), responseObserver); - } + public static abstract class MonitoringServiceImplBase implements io.grpc.BindableService { - /** - */ - public void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubsDescriptorMethod(), responseObserver); - } + /** + */ + public void setKpi(monitoring.Monitoring.KpiDescriptor request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiMethod(), responseObserver); + } - /** - */ - public void getSubscriptions(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubscriptionsMethod(), responseObserver); - } + /** + */ + public void deleteKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteKpiMethod(), responseObserver); + } - /** - */ - public void deleteSubscription(monitoring.Monitoring.SubscriptionID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubscriptionMethod(), responseObserver); - } + /** + */ + public void getKpiDescriptor(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorMethod(), responseObserver); + } - /** - */ - public void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiAlarmMethod(), responseObserver); - } + /** + */ + public void getKpiDescriptorList(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorListMethod(), responseObserver); + } - /** - */ - public void getAlarms(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmsMethod(), responseObserver); - } + /** + */ + public void includeKpi(monitoring.Monitoring.Kpi request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIncludeKpiMethod(), responseObserver); + } - /** - */ - public void getAlarmDescriptor(monitoring.Monitoring.AlarmID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmDescriptorMethod(), responseObserver); - } + /** + */ + public void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorKpiMethod(), responseObserver); + } - /** - */ - public void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmResponseStreamMethod(), responseObserver); - } + /** + */ + public void queryKpiData(monitoring.Monitoring.KpiQuery request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryKpiDataMethod(), responseObserver); + } - /** - */ - public void deleteAlarm(monitoring.Monitoring.AlarmID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteAlarmMethod(), responseObserver); - } + /** + */ + public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiSubscriptionMethod(), responseObserver); + } - /** - */ - public void getStreamKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStreamKpiMethod(), responseObserver); - } + /** + */ + public void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubsDescriptorMethod(), responseObserver); + } - /** - */ - public void getInstantKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstantKpiMethod(), responseObserver); - } + /** + */ + public void getSubscriptions(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubscriptionsMethod(), responseObserver); + } - @java.lang.Override public final 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(); - } - } - - /** - */ - public static final class MonitoringServiceStub extends io.grpc.stub.AbstractAsyncStub { - private MonitoringServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void deleteSubscription(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubscriptionMethod(), responseObserver); + } - @java.lang.Override - protected MonitoringServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MonitoringServiceStub(channel, callOptions); - } + /** + */ + public void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiAlarmMethod(), responseObserver); + } - /** - */ - public void setKpi(monitoring.Monitoring.KpiDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetKpiMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getAlarms(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmsMethod(), responseObserver); + } - /** - */ - public void deleteKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteKpiMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getAlarmDescriptor(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmDescriptorMethod(), responseObserver); + } - /** - */ - public void getKpiDescriptor(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetKpiDescriptorMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmResponseStreamMethod(), responseObserver); + } - /** - */ - public void getKpiDescriptorList(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetKpiDescriptorListMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void deleteAlarm(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteAlarmMethod(), responseObserver); + } - /** - */ - public void includeKpi(monitoring.Monitoring.Kpi request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getIncludeKpiMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getStreamKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStreamKpiMethod(), responseObserver); + } - /** - */ - public void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getMonitorKpiMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getInstantKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstantKpiMethod(), responseObserver); + } - /** - */ - public void queryKpiData(monitoring.Monitoring.KpiQuery request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getQueryKpiDataMethod(), getCallOptions()), request, responseObserver); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getSetKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_KPI))).addMethod(getDeleteKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_KPI))).addMethod(getGetKpiDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_KPI_DESCRIPTOR))).addMethod(getGetKpiDescriptorListMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_KPI_DESCRIPTOR_LIST))).addMethod(getIncludeKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_INCLUDE_KPI))).addMethod(getMonitorKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_MONITOR_KPI))).addMethod(getQueryKpiDataMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_QUERY_KPI_DATA))).addMethod(getSetKpiSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_SET_KPI_SUBSCRIPTION))).addMethod(getGetSubsDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SUBS_DESCRIPTOR))).addMethod(getGetSubscriptionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SUBSCRIPTIONS))).addMethod(getDeleteSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_SUBSCRIPTION))).addMethod(getSetKpiAlarmMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_KPI_ALARM))).addMethod(getGetAlarmsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_ALARMS))).addMethod(getGetAlarmDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_ALARM_DESCRIPTOR))).addMethod(getGetAlarmResponseStreamMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_ALARM_RESPONSE_STREAM))).addMethod(getDeleteAlarmMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_ALARM))).addMethod(getGetStreamKpiMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_STREAM_KPI))).addMethod(getGetInstantKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_INSTANT_KPI))).build(); + } } /** */ - public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getSetKpiSubscriptionMethod(), getCallOptions()), request, responseObserver); - } + public static class MonitoringServiceStub extends io.grpc.stub.AbstractAsyncStub { - /** - */ - public void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSubsDescriptorMethod(), getCallOptions()), request, responseObserver); - } + private MonitoringServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public void getSubscriptions(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request, responseObserver); - } + @java.lang.Override + protected MonitoringServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MonitoringServiceStub(channel, callOptions); + } - /** - */ - public void deleteSubscription(monitoring.Monitoring.SubscriptionID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteSubscriptionMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void setKpi(monitoring.Monitoring.KpiDescriptor request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetKpiMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetKpiAlarmMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void deleteKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteKpiMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void getAlarms(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getKpiDescriptor(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetKpiDescriptorMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void getAlarmDescriptor(monitoring.Monitoring.AlarmID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAlarmDescriptorMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getKpiDescriptorList(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetKpiDescriptorListMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetAlarmResponseStreamMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void includeKpi(monitoring.Monitoring.Kpi request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getIncludeKpiMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void deleteAlarm(monitoring.Monitoring.AlarmID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteAlarmMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getMonitorKpiMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void getStreamKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetStreamKpiMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void queryKpiData(monitoring.Monitoring.KpiQuery request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getQueryKpiDataMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void getInstantKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - */ - public static final class MonitoringServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private MonitoringServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getSetKpiSubscriptionMethod(), getCallOptions()), request, responseObserver); + } - @java.lang.Override - protected MonitoringServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MonitoringServiceBlockingStub(channel, callOptions); - } + /** + */ + public void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetSubsDescriptorMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public monitoring.Monitoring.KpiId setKpi(monitoring.Monitoring.KpiDescriptor request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetKpiMethod(), getCallOptions(), request); - } + /** + */ + public void getSubscriptions(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty deleteKpi(monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteKpiMethod(), getCallOptions(), request); - } + /** + */ + public void deleteSubscription(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteSubscriptionMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public monitoring.Monitoring.KpiDescriptor getKpiDescriptor(monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetKpiDescriptorMethod(), getCallOptions(), request); - } + /** + */ + public void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetKpiAlarmMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public monitoring.Monitoring.KpiDescriptorList getKpiDescriptorList(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetKpiDescriptorListMethod(), getCallOptions(), request); - } + /** + */ + public void getAlarms(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty includeKpi(monitoring.Monitoring.Kpi request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getIncludeKpiMethod(), getCallOptions(), request); - } + /** + */ + public void getAlarmDescriptor(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetAlarmDescriptorMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getMonitorKpiMethod(), getCallOptions(), request); - } + /** + */ + public void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetAlarmResponseStreamMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public monitoring.Monitoring.RawKpiTable queryKpiData(monitoring.Monitoring.KpiQuery request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getQueryKpiDataMethod(), getCallOptions(), request); - } + /** + */ + public void deleteAlarm(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteAlarmMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public java.util.Iterator setKpiSubscription( - monitoring.Monitoring.SubsDescriptor request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getSetKpiSubscriptionMethod(), getCallOptions(), request); - } + /** + */ + public void getStreamKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetStreamKpiMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSubsDescriptorMethod(), getCallOptions(), request); + /** + */ + public void getInstantKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request, responseObserver); + } } /** */ - public monitoring.Monitoring.SubsList getSubscriptions(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSubscriptionsMethod(), getCallOptions(), request); - } + public static class MonitoringServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - /** - */ - public context.ContextOuterClass.Empty deleteSubscription(monitoring.Monitoring.SubscriptionID request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteSubscriptionMethod(), getCallOptions(), request); - } + private MonitoringServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public monitoring.Monitoring.AlarmID setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetKpiAlarmMethod(), getCallOptions(), request); - } + @java.lang.Override + protected MonitoringServiceBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MonitoringServiceBlockingStub(channel, callOptions); + } - /** - */ - public monitoring.Monitoring.AlarmList getAlarms(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAlarmsMethod(), getCallOptions(), request); - } + /** + */ + public monitoring.Monitoring.KpiId setKpi(monitoring.Monitoring.KpiDescriptor request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetKpiMethod(), getCallOptions(), request); + } - /** - */ - public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAlarmDescriptorMethod(), getCallOptions(), request); - } + /** + */ + public context.ContextOuterClass.Empty deleteKpi(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteKpiMethod(), getCallOptions(), request); + } - /** - */ - public java.util.Iterator getAlarmResponseStream( - monitoring.Monitoring.AlarmSubscription request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetAlarmResponseStreamMethod(), getCallOptions(), request); - } + /** + */ + public monitoring.Monitoring.KpiDescriptor getKpiDescriptor(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetKpiDescriptorMethod(), getCallOptions(), request); + } - /** - */ - public context.ContextOuterClass.Empty deleteAlarm(monitoring.Monitoring.AlarmID request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteAlarmMethod(), getCallOptions(), request); - } + /** + */ + public monitoring.Monitoring.KpiDescriptorList getKpiDescriptorList(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetKpiDescriptorListMethod(), getCallOptions(), request); + } - /** - */ - public java.util.Iterator getStreamKpi( - monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetStreamKpiMethod(), getCallOptions(), request); - } + /** + */ + public context.ContextOuterClass.Empty includeKpi(monitoring.Monitoring.Kpi request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getIncludeKpiMethod(), getCallOptions(), request); + } - /** - */ - public monitoring.Monitoring.Kpi getInstantKpi(monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetInstantKpiMethod(), getCallOptions(), request); - } - } - - /** - */ - public static final class MonitoringServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private MonitoringServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public context.ContextOuterClass.Empty monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getMonitorKpiMethod(), getCallOptions(), request); + } - @java.lang.Override - protected MonitoringServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MonitoringServiceFutureStub(channel, callOptions); - } + /** + */ + public monitoring.Monitoring.RawKpiTable queryKpiData(monitoring.Monitoring.KpiQuery request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getQueryKpiDataMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture setKpi( - monitoring.Monitoring.KpiDescriptor request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetKpiMethod(), getCallOptions()), request); - } + /** + */ + public java.util.Iterator setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getSetKpiSubscriptionMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture deleteKpi( - monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteKpiMethod(), getCallOptions()), request); - } + /** + */ + public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetSubsDescriptorMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getKpiDescriptor( - monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetKpiDescriptorMethod(), getCallOptions()), request); - } + /** + */ + public monitoring.Monitoring.SubsList getSubscriptions(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetSubscriptionsMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getKpiDescriptorList( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetKpiDescriptorListMethod(), getCallOptions()), request); - } + /** + */ + public context.ContextOuterClass.Empty deleteSubscription(monitoring.Monitoring.SubscriptionID request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteSubscriptionMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture includeKpi( - monitoring.Monitoring.Kpi request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getIncludeKpiMethod(), getCallOptions()), request); - } + /** + */ + public monitoring.Monitoring.AlarmID setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetKpiAlarmMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture monitorKpi( - monitoring.Monitoring.MonitorKpiRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getMonitorKpiMethod(), getCallOptions()), request); - } + /** + */ + public monitoring.Monitoring.AlarmList getAlarms(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetAlarmsMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture queryKpiData( - monitoring.Monitoring.KpiQuery request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getQueryKpiDataMethod(), getCallOptions()), request); - } + /** + */ + public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetAlarmDescriptorMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getSubsDescriptor( - monitoring.Monitoring.SubscriptionID request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSubsDescriptorMethod(), getCallOptions()), request); - } + /** + */ + public java.util.Iterator getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetAlarmResponseStreamMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getSubscriptions( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request); - } + /** + */ + public context.ContextOuterClass.Empty deleteAlarm(monitoring.Monitoring.AlarmID request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteAlarmMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture deleteSubscription( - monitoring.Monitoring.SubscriptionID request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteSubscriptionMethod(), getCallOptions()), request); - } + /** + */ + public java.util.Iterator getStreamKpi(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetStreamKpiMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture setKpiAlarm( - monitoring.Monitoring.AlarmDescriptor request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetKpiAlarmMethod(), getCallOptions()), request); + /** + */ + public monitoring.Monitoring.Kpi getInstantKpi(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetInstantKpiMethod(), getCallOptions(), request); + } } /** */ - public com.google.common.util.concurrent.ListenableFuture getAlarms( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request); - } + public static class MonitoringServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - /** - */ - public com.google.common.util.concurrent.ListenableFuture getAlarmDescriptor( - monitoring.Monitoring.AlarmID request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAlarmDescriptorMethod(), getCallOptions()), request); - } + private MonitoringServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture deleteAlarm( - monitoring.Monitoring.AlarmID request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteAlarmMethod(), getCallOptions()), request); - } + @java.lang.Override + protected MonitoringServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MonitoringServiceFutureStub(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getInstantKpi( - monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_SET_KPI = 0; - private static final int METHODID_DELETE_KPI = 1; - private static final int METHODID_GET_KPI_DESCRIPTOR = 2; - private static final int METHODID_GET_KPI_DESCRIPTOR_LIST = 3; - private static final int METHODID_INCLUDE_KPI = 4; - private static final int METHODID_MONITOR_KPI = 5; - private static final int METHODID_QUERY_KPI_DATA = 6; - private static final int METHODID_SET_KPI_SUBSCRIPTION = 7; - private static final int METHODID_GET_SUBS_DESCRIPTOR = 8; - private static final int METHODID_GET_SUBSCRIPTIONS = 9; - private static final int METHODID_DELETE_SUBSCRIPTION = 10; - private static final int METHODID_SET_KPI_ALARM = 11; - private static final int METHODID_GET_ALARMS = 12; - private static final int METHODID_GET_ALARM_DESCRIPTOR = 13; - private static final int METHODID_GET_ALARM_RESPONSE_STREAM = 14; - private static final int METHODID_DELETE_ALARM = 15; - private static final int METHODID_GET_STREAM_KPI = 16; - private static final int METHODID_GET_INSTANT_KPI = 17; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final MonitoringServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(MonitoringServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setKpi(monitoring.Monitoring.KpiDescriptor request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetKpiMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteKpi(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteKpiMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getKpiDescriptor(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetKpiDescriptorMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getKpiDescriptorList(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetKpiDescriptorListMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture includeKpi(monitoring.Monitoring.Kpi request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getIncludeKpiMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getMonitorKpiMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture queryKpiData(monitoring.Monitoring.KpiQuery request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getQueryKpiDataMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetSubsDescriptorMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getSubscriptions(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteSubscription(monitoring.Monitoring.SubscriptionID request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteSubscriptionMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetKpiAlarmMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getAlarms(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetAlarmDescriptorMethod(), getCallOptions()), request); + } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_SET_KPI: - serviceImpl.setKpi((monitoring.Monitoring.KpiDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_KPI: - serviceImpl.deleteKpi((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_KPI_DESCRIPTOR: - serviceImpl.getKpiDescriptor((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_KPI_DESCRIPTOR_LIST: - serviceImpl.getKpiDescriptorList((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_INCLUDE_KPI: - serviceImpl.includeKpi((monitoring.Monitoring.Kpi) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_MONITOR_KPI: - serviceImpl.monitorKpi((monitoring.Monitoring.MonitorKpiRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_QUERY_KPI_DATA: - serviceImpl.queryKpiData((monitoring.Monitoring.KpiQuery) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_KPI_SUBSCRIPTION: - serviceImpl.setKpiSubscription((monitoring.Monitoring.SubsDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SUBS_DESCRIPTOR: - serviceImpl.getSubsDescriptor((monitoring.Monitoring.SubscriptionID) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SUBSCRIPTIONS: - serviceImpl.getSubscriptions((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_SUBSCRIPTION: - serviceImpl.deleteSubscription((monitoring.Monitoring.SubscriptionID) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_KPI_ALARM: - serviceImpl.setKpiAlarm((monitoring.Monitoring.AlarmDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ALARMS: - serviceImpl.getAlarms((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ALARM_DESCRIPTOR: - serviceImpl.getAlarmDescriptor((monitoring.Monitoring.AlarmID) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ALARM_RESPONSE_STREAM: - serviceImpl.getAlarmResponseStream((monitoring.Monitoring.AlarmSubscription) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_ALARM: - serviceImpl.deleteAlarm((monitoring.Monitoring.AlarmID) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_STREAM_KPI: - serviceImpl.getStreamKpi((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_INSTANT_KPI: - serviceImpl.getInstantKpi((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteAlarm(monitoring.Monitoring.AlarmID request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteAlarmMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getInstantKpi(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request); + } } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } + private static final int METHODID_SET_KPI = 0; + + private static final int METHODID_DELETE_KPI = 1; + + private static final int METHODID_GET_KPI_DESCRIPTOR = 2; + + private static final int METHODID_GET_KPI_DESCRIPTOR_LIST = 3; + + private static final int METHODID_INCLUDE_KPI = 4; + + private static final int METHODID_MONITOR_KPI = 5; + + private static final int METHODID_QUERY_KPI_DATA = 6; + + private static final int METHODID_SET_KPI_SUBSCRIPTION = 7; + + private static final int METHODID_GET_SUBS_DESCRIPTOR = 8; + + private static final int METHODID_GET_SUBSCRIPTIONS = 9; + + private static final int METHODID_DELETE_SUBSCRIPTION = 10; + + private static final int METHODID_SET_KPI_ALARM = 11; + + private static final int METHODID_GET_ALARMS = 12; + + private static final int METHODID_GET_ALARM_DESCRIPTOR = 13; + + private static final int METHODID_GET_ALARM_RESPONSE_STREAM = 14; + + private static final int METHODID_DELETE_ALARM = 15; + + private static final int METHODID_GET_STREAM_KPI = 16; + + private static final int METHODID_GET_INSTANT_KPI = 17; + + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + + private final MonitoringServiceImplBase serviceImpl; + + private final int methodId; + + MethodHandlers(MonitoringServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + case METHODID_SET_KPI: + serviceImpl.setKpi((monitoring.Monitoring.KpiDescriptor) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_KPI: + serviceImpl.deleteKpi((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_KPI_DESCRIPTOR: + serviceImpl.getKpiDescriptor((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_KPI_DESCRIPTOR_LIST: + serviceImpl.getKpiDescriptorList((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_INCLUDE_KPI: + serviceImpl.includeKpi((monitoring.Monitoring.Kpi) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_MONITOR_KPI: + serviceImpl.monitorKpi((monitoring.Monitoring.MonitorKpiRequest) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_QUERY_KPI_DATA: + serviceImpl.queryKpiData((monitoring.Monitoring.KpiQuery) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_KPI_SUBSCRIPTION: + serviceImpl.setKpiSubscription((monitoring.Monitoring.SubsDescriptor) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SUBS_DESCRIPTOR: + serviceImpl.getSubsDescriptor((monitoring.Monitoring.SubscriptionID) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SUBSCRIPTIONS: + serviceImpl.getSubscriptions((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SUBSCRIPTION: + serviceImpl.deleteSubscription((monitoring.Monitoring.SubscriptionID) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_KPI_ALARM: + serviceImpl.setKpiAlarm((monitoring.Monitoring.AlarmDescriptor) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ALARMS: + serviceImpl.getAlarms((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ALARM_DESCRIPTOR: + serviceImpl.getAlarmDescriptor((monitoring.Monitoring.AlarmID) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ALARM_RESPONSE_STREAM: + serviceImpl.getAlarmResponseStream((monitoring.Monitoring.AlarmSubscription) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ALARM: + serviceImpl.deleteAlarm((monitoring.Monitoring.AlarmID) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_STREAM_KPI: + serviceImpl.getStreamKpi((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_INSTANT_KPI: + serviceImpl.getInstantKpi((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + default: + throw new AssertionError(); + } + } } - } - private static abstract class MonitoringServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - MonitoringServiceBaseDescriptorSupplier() {} + private static abstract class MonitoringServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + + MonitoringServiceBaseDescriptorSupplier() { + } + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return monitoring.Monitoring.getDescriptor(); + } - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return monitoring.Monitoring.getDescriptor(); + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("MonitoringService"); + } } - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("MonitoringService"); + private static final class MonitoringServiceFileDescriptorSupplier extends MonitoringServiceBaseDescriptorSupplier { + + MonitoringServiceFileDescriptorSupplier() { + } } - } - private static final class MonitoringServiceFileDescriptorSupplier - extends MonitoringServiceBaseDescriptorSupplier { - MonitoringServiceFileDescriptorSupplier() {} - } + private static final class MonitoringServiceMethodDescriptorSupplier extends MonitoringServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private static final class MonitoringServiceMethodDescriptorSupplier - extends MonitoringServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final String methodName; - MonitoringServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } + MonitoringServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } } - } - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (MonitoringServiceGrpc.class) { - result = serviceDescriptor; + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new MonitoringServiceFileDescriptorSupplier()) - .addMethod(getSetKpiMethod()) - .addMethod(getDeleteKpiMethod()) - .addMethod(getGetKpiDescriptorMethod()) - .addMethod(getGetKpiDescriptorListMethod()) - .addMethod(getIncludeKpiMethod()) - .addMethod(getMonitorKpiMethod()) - .addMethod(getQueryKpiDataMethod()) - .addMethod(getSetKpiSubscriptionMethod()) - .addMethod(getGetSubsDescriptorMethod()) - .addMethod(getGetSubscriptionsMethod()) - .addMethod(getDeleteSubscriptionMethod()) - .addMethod(getSetKpiAlarmMethod()) - .addMethod(getGetAlarmsMethod()) - .addMethod(getGetAlarmDescriptorMethod()) - .addMethod(getGetAlarmResponseStreamMethod()) - .addMethod(getDeleteAlarmMethod()) - .addMethod(getGetStreamKpiMethod()) - .addMethod(getGetInstantKpiMethod()) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new MonitoringServiceFileDescriptorSupplier()).addMethod(getSetKpiMethod()).addMethod(getDeleteKpiMethod()).addMethod(getGetKpiDescriptorMethod()).addMethod(getGetKpiDescriptorListMethod()).addMethod(getIncludeKpiMethod()).addMethod(getMonitorKpiMethod()).addMethod(getQueryKpiDataMethod()).addMethod(getSetKpiSubscriptionMethod()).addMethod(getGetSubsDescriptorMethod()).addMethod(getGetSubscriptionsMethod()).addMethod(getDeleteSubscriptionMethod()).addMethod(getSetKpiAlarmMethod()).addMethod(getGetAlarmsMethod()).addMethod(getGetAlarmDescriptorMethod()).addMethod(getGetAlarmResponseStreamMethod()).addMethod(getDeleteAlarmMethod()).addMethod(getGetStreamKpiMethod()).addMethod(getGetInstantKpiMethod()).build(); + } + } + } + return result; } - return result; - } } diff --git a/src/policy/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java b/src/policy/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java index f045ecc7ed434ba90bdfda065f18e0d839850a76..b4aaeb338610eee182a8132056f00ea99e180891 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java @@ -6,18 +6,18 @@ import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: monitoring.proto") -public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc { - private MutinyMonitoringServiceGrpc() {} +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: monitoring.proto") +public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.MutinyGrpc { + + private MutinyMonitoringServiceGrpc() { + } public static MutinyMonitoringServiceStub newMutinyStub(io.grpc.Channel channel) { return new MutinyMonitoringServiceStub(channel); } - - public static final class MutinyMonitoringServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub { + public static class MutinyMonitoringServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.MutinyStub { + private MonitoringServiceGrpc.MonitoringServiceStub delegateStub; private MutinyMonitoringServiceStub(io.grpc.Channel channel) { @@ -35,361 +35,213 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim return new MutinyMonitoringServiceStub(channel, callOptions); } - public io.smallrye.mutiny.Uni setKpi(monitoring.Monitoring.KpiDescriptor request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setKpi); } - public io.smallrye.mutiny.Uni deleteKpi(monitoring.Monitoring.KpiId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::deleteKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteKpi); } - public io.smallrye.mutiny.Uni getKpiDescriptor(monitoring.Monitoring.KpiId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getKpiDescriptor); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getKpiDescriptor); } - public io.smallrye.mutiny.Uni getKpiDescriptorList(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getKpiDescriptorList); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getKpiDescriptorList); } - public io.smallrye.mutiny.Uni includeKpi(monitoring.Monitoring.Kpi request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::includeKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::includeKpi); } - public io.smallrye.mutiny.Uni monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::monitorKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::monitorKpi); } - public io.smallrye.mutiny.Uni queryKpiData(monitoring.Monitoring.KpiQuery request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::queryKpiData); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::queryKpiData); } - public io.smallrye.mutiny.Uni getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getSubsDescriptor); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getSubsDescriptor); } - public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getSubscriptions); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getSubscriptions); } - public io.smallrye.mutiny.Uni deleteSubscription(monitoring.Monitoring.SubscriptionID request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::deleteSubscription); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteSubscription); } - public io.smallrye.mutiny.Uni setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setKpiAlarm); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setKpiAlarm); } - public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getAlarms); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getAlarms); } - public io.smallrye.mutiny.Uni getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getAlarmDescriptor); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getAlarmDescriptor); } - public io.smallrye.mutiny.Uni deleteAlarm(monitoring.Monitoring.AlarmID request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::deleteAlarm); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteAlarm); } - public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getInstantKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getInstantKpi); } - public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::setKpiSubscription); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::setKpiSubscription); } - public io.smallrye.mutiny.Multi getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getAlarmResponseStream); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getAlarmResponseStream); } - public io.smallrye.mutiny.Multi getStreamKpi(monitoring.Monitoring.KpiId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getStreamKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getStreamKpi); } - } - public static abstract class MonitoringServiceImplBase implements io.grpc.BindableService { private String compression; + /** - * Set whether the server will try to use a compressed response. - * - * @param compression the compression, e.g {@code gzip} - */ + * Set whether the server will try to use a compressed response. + * + * @param compression the compression, e.g {@code gzip} + */ public MonitoringServiceImplBase withCompression(String compression) { - this.compression = compression; - return this; + this.compression = compression; + return this; } - - public io.smallrye.mutiny.Uni setKpi(monitoring.Monitoring.KpiDescriptor request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni deleteKpi(monitoring.Monitoring.KpiId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getKpiDescriptor(monitoring.Monitoring.KpiId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getKpiDescriptorList(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni includeKpi(monitoring.Monitoring.Kpi request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni queryKpiData(monitoring.Monitoring.KpiQuery request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni deleteSubscription(monitoring.Monitoring.SubscriptionID request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni deleteAlarm(monitoring.Monitoring.AlarmID request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getStreamKpi(monitoring.Monitoring.KpiId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - monitoring.MonitoringServiceGrpc.getSetKpiMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.KpiDescriptor, - monitoring.Monitoring.KpiId>( - this, METHODID_SET_KPI, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getDeleteKpiMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.KpiId, - context.ContextOuterClass.Empty>( - this, METHODID_DELETE_KPI, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetKpiDescriptorMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.KpiId, - monitoring.Monitoring.KpiDescriptor>( - this, METHODID_GET_KPI_DESCRIPTOR, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetKpiDescriptorListMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - monitoring.Monitoring.KpiDescriptorList>( - this, METHODID_GET_KPI_DESCRIPTOR_LIST, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getIncludeKpiMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.Kpi, - context.ContextOuterClass.Empty>( - this, METHODID_INCLUDE_KPI, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getMonitorKpiMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.MonitorKpiRequest, - context.ContextOuterClass.Empty>( - this, METHODID_MONITOR_KPI, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getQueryKpiDataMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.KpiQuery, - monitoring.Monitoring.RawKpiTable>( - this, METHODID_QUERY_KPI_DATA, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getSetKpiSubscriptionMethod(), - asyncServerStreamingCall( - new MethodHandlers< - monitoring.Monitoring.SubsDescriptor, - monitoring.Monitoring.SubsResponse>( - this, METHODID_SET_KPI_SUBSCRIPTION, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetSubsDescriptorMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.SubscriptionID, - monitoring.Monitoring.SubsDescriptor>( - this, METHODID_GET_SUBS_DESCRIPTOR, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetSubscriptionsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - monitoring.Monitoring.SubsList>( - this, METHODID_GET_SUBSCRIPTIONS, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getDeleteSubscriptionMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.SubscriptionID, - context.ContextOuterClass.Empty>( - this, METHODID_DELETE_SUBSCRIPTION, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getSetKpiAlarmMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.AlarmDescriptor, - monitoring.Monitoring.AlarmID>( - this, METHODID_SET_KPI_ALARM, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetAlarmsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - monitoring.Monitoring.AlarmList>( - this, METHODID_GET_ALARMS, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetAlarmDescriptorMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.AlarmID, - monitoring.Monitoring.AlarmDescriptor>( - this, METHODID_GET_ALARM_DESCRIPTOR, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetAlarmResponseStreamMethod(), - asyncServerStreamingCall( - new MethodHandlers< - monitoring.Monitoring.AlarmSubscription, - monitoring.Monitoring.AlarmResponse>( - this, METHODID_GET_ALARM_RESPONSE_STREAM, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getDeleteAlarmMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.AlarmID, - context.ContextOuterClass.Empty>( - this, METHODID_DELETE_ALARM, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetStreamKpiMethod(), - asyncServerStreamingCall( - new MethodHandlers< - monitoring.Monitoring.KpiId, - monitoring.Monitoring.Kpi>( - this, METHODID_GET_STREAM_KPI, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetInstantKpiMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.KpiId, - monitoring.Monitoring.Kpi>( - this, METHODID_GET_INSTANT_KPI, compression))) - .build(); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(monitoring.MonitoringServiceGrpc.getSetKpiMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_KPI, compression))).addMethod(monitoring.MonitoringServiceGrpc.getDeleteKpiMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_KPI, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetKpiDescriptorMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_KPI_DESCRIPTOR, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetKpiDescriptorListMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_KPI_DESCRIPTOR_LIST, compression))).addMethod(monitoring.MonitoringServiceGrpc.getIncludeKpiMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_INCLUDE_KPI, compression))).addMethod(monitoring.MonitoringServiceGrpc.getMonitorKpiMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_MONITOR_KPI, compression))).addMethod(monitoring.MonitoringServiceGrpc.getQueryKpiDataMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_QUERY_KPI_DATA, compression))).addMethod(monitoring.MonitoringServiceGrpc.getSetKpiSubscriptionMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_SET_KPI_SUBSCRIPTION, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetSubsDescriptorMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SUBS_DESCRIPTOR, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetSubscriptionsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SUBSCRIPTIONS, compression))).addMethod(monitoring.MonitoringServiceGrpc.getDeleteSubscriptionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_SUBSCRIPTION, compression))).addMethod(monitoring.MonitoringServiceGrpc.getSetKpiAlarmMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_KPI_ALARM, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetAlarmsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_ALARMS, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetAlarmDescriptorMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_ALARM_DESCRIPTOR, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetAlarmResponseStreamMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_ALARM_RESPONSE_STREAM, compression))).addMethod(monitoring.MonitoringServiceGrpc.getDeleteAlarmMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_ALARM, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetStreamKpiMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_STREAM_KPI, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetInstantKpiMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_INSTANT_KPI, compression))).build(); } } private static final int METHODID_SET_KPI = 0; + private static final int METHODID_DELETE_KPI = 1; + private static final int METHODID_GET_KPI_DESCRIPTOR = 2; + private static final int METHODID_GET_KPI_DESCRIPTOR_LIST = 3; + private static final int METHODID_INCLUDE_KPI = 4; + private static final int METHODID_MONITOR_KPI = 5; + private static final int METHODID_QUERY_KPI_DATA = 6; + private static final int METHODID_SET_KPI_SUBSCRIPTION = 7; + private static final int METHODID_GET_SUBS_DESCRIPTOR = 8; + private static final int METHODID_GET_SUBSCRIPTIONS = 9; + private static final int METHODID_DELETE_SUBSCRIPTION = 10; + private static final int METHODID_SET_KPI_ALARM = 11; + private static final int METHODID_GET_ALARMS = 12; + private static final int METHODID_GET_ALARM_DESCRIPTOR = 13; + private static final int METHODID_GET_ALARM_RESPONSE_STREAM = 14; + private static final int METHODID_DELETE_ALARM = 15; + private static final int METHODID_GET_STREAM_KPI = 16; + private static final int METHODID_GET_INSTANT_KPI = 17; - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final MonitoringServiceImplBase serviceImpl; + private final int methodId; + private final String compression; MethodHandlers(MonitoringServiceImplBase serviceImpl, int methodId, String compression) { @@ -401,114 +253,60 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { case METHODID_SET_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.KpiDescriptor) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setKpi); break; case METHODID_DELETE_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::deleteKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteKpi); break; case METHODID_GET_KPI_DESCRIPTOR: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getKpiDescriptor); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getKpiDescriptor); break; case METHODID_GET_KPI_DESCRIPTOR_LIST: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getKpiDescriptorList); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getKpiDescriptorList); break; case METHODID_INCLUDE_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.Kpi) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::includeKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.Kpi) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::includeKpi); break; case METHODID_MONITOR_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.MonitorKpiRequest) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::monitorKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.MonitorKpiRequest) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::monitorKpi); break; case METHODID_QUERY_KPI_DATA: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiQuery) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::queryKpiData); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.KpiQuery) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::queryKpiData); break; case METHODID_SET_KPI_SUBSCRIPTION: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((monitoring.Monitoring.SubsDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setKpiSubscription); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((monitoring.Monitoring.SubsDescriptor) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setKpiSubscription); break; case METHODID_GET_SUBS_DESCRIPTOR: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.SubscriptionID) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getSubsDescriptor); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.SubscriptionID) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getSubsDescriptor); break; case METHODID_GET_SUBSCRIPTIONS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getSubscriptions); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getSubscriptions); break; case METHODID_DELETE_SUBSCRIPTION: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.SubscriptionID) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::deleteSubscription); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.SubscriptionID) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteSubscription); break; case METHODID_SET_KPI_ALARM: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.AlarmDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setKpiAlarm); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.AlarmDescriptor) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setKpiAlarm); break; case METHODID_GET_ALARMS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getAlarms); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getAlarms); break; case METHODID_GET_ALARM_DESCRIPTOR: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.AlarmID) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getAlarmDescriptor); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.AlarmID) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getAlarmDescriptor); break; case METHODID_GET_ALARM_RESPONSE_STREAM: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((monitoring.Monitoring.AlarmSubscription) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getAlarmResponseStream); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((monitoring.Monitoring.AlarmSubscription) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getAlarmResponseStream); break; case METHODID_DELETE_ALARM: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.AlarmID) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::deleteAlarm); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.AlarmID) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteAlarm); break; case METHODID_GET_STREAM_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getStreamKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getStreamKpi); break; case METHODID_GET_INSTANT_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getInstantKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getInstantKpi); break; default: throw new java.lang.AssertionError(); @@ -518,11 +316,10 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { default: throw new java.lang.AssertionError(); } } } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/policy/MutinyPolicyServiceGrpc.java b/src/policy/target/generated-sources/grpc/policy/MutinyPolicyServiceGrpc.java index b9d840730272b2d6185cb2eba0c93e8cf4d11e6c..ef8b82a1bc163232e9b9604cb8c174aabfed898e 100644 --- a/src/policy/target/generated-sources/grpc/policy/MutinyPolicyServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/policy/MutinyPolicyServiceGrpc.java @@ -6,18 +6,18 @@ import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: policy.proto") -public final class MutinyPolicyServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc { - private MutinyPolicyServiceGrpc() {} +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: policy.proto") +public final class MutinyPolicyServiceGrpc implements io.quarkus.grpc.MutinyGrpc { + + private MutinyPolicyServiceGrpc() { + } public static MutinyPolicyServiceStub newMutinyStub(io.grpc.Channel channel) { return new MutinyPolicyServiceStub(channel); } - - public static final class MutinyPolicyServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub { + public static class MutinyPolicyServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.MutinyStub { + private PolicyServiceGrpc.PolicyServiceStub delegateStub; private MutinyPolicyServiceStub(io.grpc.Channel channel) { @@ -35,181 +35,113 @@ public final class MutinyPolicyServiceGrpc implements io.quarkus.grpc.runtime.Mu return new MutinyPolicyServiceStub(channel, callOptions); } - public io.smallrye.mutiny.Uni policyAddService(policy.Policy.PolicyRuleService request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::policyAddService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::policyAddService); } - public io.smallrye.mutiny.Uni policyAddDevice(policy.Policy.PolicyRuleDevice request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::policyAddDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::policyAddDevice); } - public io.smallrye.mutiny.Uni policyUpdateService(policy.Policy.PolicyRuleService request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::policyUpdateService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::policyUpdateService); } - public io.smallrye.mutiny.Uni policyUpdateDevice(policy.Policy.PolicyRuleDevice request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::policyUpdateDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::policyUpdateDevice); } - public io.smallrye.mutiny.Uni policyDelete(policy.Policy.PolicyRuleId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::policyDelete); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::policyDelete); } - public io.smallrye.mutiny.Uni getPolicyService(policy.Policy.PolicyRuleId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getPolicyService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getPolicyService); } - public io.smallrye.mutiny.Uni getPolicyDevice(policy.Policy.PolicyRuleId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getPolicyDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getPolicyDevice); } - public io.smallrye.mutiny.Uni getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getPolicyByServiceId); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getPolicyByServiceId); } - } - public static abstract class PolicyServiceImplBase implements io.grpc.BindableService { private String compression; + /** - * Set whether the server will try to use a compressed response. - * - * @param compression the compression, e.g {@code gzip} - */ + * Set whether the server will try to use a compressed response. + * + * @param compression the compression, e.g {@code gzip} + */ public PolicyServiceImplBase withCompression(String compression) { - this.compression = compression; - return this; + this.compression = compression; + return this; } - - public io.smallrye.mutiny.Uni policyAddService(policy.Policy.PolicyRuleService request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni policyAddDevice(policy.Policy.PolicyRuleDevice request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni policyUpdateService(policy.Policy.PolicyRuleService request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni policyUpdateDevice(policy.Policy.PolicyRuleDevice request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni policyDelete(policy.Policy.PolicyRuleId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getPolicyService(policy.Policy.PolicyRuleId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getPolicyDevice(policy.Policy.PolicyRuleId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - policy.PolicyServiceGrpc.getPolicyAddServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - policy.Policy.PolicyRuleService, - policy.Policy.PolicyRuleState>( - this, METHODID_POLICY_ADD_SERVICE, compression))) - .addMethod( - policy.PolicyServiceGrpc.getPolicyAddDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - policy.Policy.PolicyRuleDevice, - policy.Policy.PolicyRuleState>( - this, METHODID_POLICY_ADD_DEVICE, compression))) - .addMethod( - policy.PolicyServiceGrpc.getPolicyUpdateServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - policy.Policy.PolicyRuleService, - policy.Policy.PolicyRuleState>( - this, METHODID_POLICY_UPDATE_SERVICE, compression))) - .addMethod( - policy.PolicyServiceGrpc.getPolicyUpdateDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - policy.Policy.PolicyRuleDevice, - policy.Policy.PolicyRuleState>( - this, METHODID_POLICY_UPDATE_DEVICE, compression))) - .addMethod( - policy.PolicyServiceGrpc.getPolicyDeleteMethod(), - asyncUnaryCall( - new MethodHandlers< - policy.Policy.PolicyRuleId, - policy.Policy.PolicyRuleState>( - this, METHODID_POLICY_DELETE, compression))) - .addMethod( - policy.PolicyServiceGrpc.getGetPolicyServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - policy.Policy.PolicyRuleId, - policy.Policy.PolicyRuleService>( - this, METHODID_GET_POLICY_SERVICE, compression))) - .addMethod( - policy.PolicyServiceGrpc.getGetPolicyDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - policy.Policy.PolicyRuleId, - policy.Policy.PolicyRuleDevice>( - this, METHODID_GET_POLICY_DEVICE, compression))) - .addMethod( - policy.PolicyServiceGrpc.getGetPolicyByServiceIdMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ServiceId, - policy.Policy.PolicyRuleServiceList>( - this, METHODID_GET_POLICY_BY_SERVICE_ID, compression))) - .build(); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(policy.PolicyServiceGrpc.getPolicyAddServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_POLICY_ADD_SERVICE, compression))).addMethod(policy.PolicyServiceGrpc.getPolicyAddDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_POLICY_ADD_DEVICE, compression))).addMethod(policy.PolicyServiceGrpc.getPolicyUpdateServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_POLICY_UPDATE_SERVICE, compression))).addMethod(policy.PolicyServiceGrpc.getPolicyUpdateDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_POLICY_UPDATE_DEVICE, compression))).addMethod(policy.PolicyServiceGrpc.getPolicyDeleteMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_POLICY_DELETE, compression))).addMethod(policy.PolicyServiceGrpc.getGetPolicyServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_POLICY_SERVICE, compression))).addMethod(policy.PolicyServiceGrpc.getGetPolicyDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_POLICY_DEVICE, compression))).addMethod(policy.PolicyServiceGrpc.getGetPolicyByServiceIdMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_POLICY_BY_SERVICE_ID, compression))).build(); } } private static final int METHODID_POLICY_ADD_SERVICE = 0; + private static final int METHODID_POLICY_ADD_DEVICE = 1; + private static final int METHODID_POLICY_UPDATE_SERVICE = 2; + private static final int METHODID_POLICY_UPDATE_DEVICE = 3; + private static final int METHODID_POLICY_DELETE = 4; + private static final int METHODID_GET_POLICY_SERVICE = 5; + private static final int METHODID_GET_POLICY_DEVICE = 6; + private static final int METHODID_GET_POLICY_BY_SERVICE_ID = 7; - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final PolicyServiceImplBase serviceImpl; + private final int methodId; + private final String compression; MethodHandlers(PolicyServiceImplBase serviceImpl, int methodId, String compression) { @@ -221,54 +153,30 @@ public final class MutinyPolicyServiceGrpc implements io.quarkus.grpc.runtime.Mu @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { case METHODID_POLICY_ADD_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleService) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::policyAddService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((policy.Policy.PolicyRuleService) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::policyAddService); break; case METHODID_POLICY_ADD_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleDevice) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::policyAddDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((policy.Policy.PolicyRuleDevice) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::policyAddDevice); break; case METHODID_POLICY_UPDATE_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleService) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::policyUpdateService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((policy.Policy.PolicyRuleService) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::policyUpdateService); break; case METHODID_POLICY_UPDATE_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleDevice) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::policyUpdateDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((policy.Policy.PolicyRuleDevice) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::policyUpdateDevice); break; case METHODID_POLICY_DELETE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::policyDelete); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::policyDelete); break; case METHODID_GET_POLICY_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getPolicyService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getPolicyService); break; case METHODID_GET_POLICY_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getPolicyDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((policy.Policy.PolicyRuleId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getPolicyDevice); break; case METHODID_GET_POLICY_BY_SERVICE_ID: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getPolicyByServiceId); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getPolicyByServiceId); break; default: throw new java.lang.AssertionError(); @@ -278,11 +186,10 @@ public final class MutinyPolicyServiceGrpc implements io.quarkus.grpc.runtime.Mu @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { default: throw new java.lang.AssertionError(); } } } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/policy/Policy.java b/src/policy/target/generated-sources/grpc/policy/Policy.java index 505c0d7ff98d573e67f8cf39b399ec8ab9b30b68..b57d9ae7577153c1623a34e2aea9c38e81e02a08 100644 --- a/src/policy/target/generated-sources/grpc/policy/Policy.java +++ b/src/policy/target/generated-sources/grpc/policy/Policy.java @@ -1,10625 +1,10149 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: policy.proto - package policy; public final class Policy { - private Policy() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * Protobuf enum {@code policy.PolicyRuleStateEnum} - */ - public enum PolicyRuleStateEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Undefined rule state
-     * 
- * - * POLICY_UNDEFINED = 0; - */ - POLICY_UNDEFINED(0), - /** - *
-     * Rule failed
-     * 
- * - * POLICY_FAILED = 1; - */ - POLICY_FAILED(1), - /** - *
-     * Rule is just inserted
-     * 
- * - * POLICY_INSERTED = 2; - */ - POLICY_INSERTED(2), - /** - *
-     * Rule content is correct
-     * 
- * - * POLICY_VALIDATED = 3; - */ - POLICY_VALIDATED(3), - /** - *
-     * Rule subscribed to Monitoring
-     * 
- * - * POLICY_PROVISIONED = 4; - */ - POLICY_PROVISIONED(4), - /** - *
-     * Rule is currently active (alarm is just thrown by Monitoring)
-     * 
- * - * POLICY_ACTIVE = 5; - */ - POLICY_ACTIVE(5), - /** - *
-     * Rule action is successfully enforced
-     * 
- * - * POLICY_ENFORCED = 6; - */ - POLICY_ENFORCED(6), - /** - *
-     * The applied rule action did not work as expected
-     * 
- * - * POLICY_INEFFECTIVE = 7; - */ - POLICY_INEFFECTIVE(7), - /** - *
-     * The applied rule action did work as expected
-     * 
- * - * POLICY_EFFECTIVE = 8; - */ - POLICY_EFFECTIVE(8), - /** - *
-     * Operator requires a policy to change
-     * 
- * - * POLICY_UPDATED = 9; - */ - POLICY_UPDATED(9), - /** - *
-     * Operator requires to remove a policy
-     * 
- * - * POLICY_REMOVED = 10; - */ - POLICY_REMOVED(10), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Undefined rule state
-     * 
- * - * POLICY_UNDEFINED = 0; - */ - public static final int POLICY_UNDEFINED_VALUE = 0; - /** - *
-     * Rule failed
-     * 
- * - * POLICY_FAILED = 1; - */ - public static final int POLICY_FAILED_VALUE = 1; - /** - *
-     * Rule is just inserted
-     * 
- * - * POLICY_INSERTED = 2; - */ - public static final int POLICY_INSERTED_VALUE = 2; - /** - *
-     * Rule content is correct
-     * 
- * - * POLICY_VALIDATED = 3; - */ - public static final int POLICY_VALIDATED_VALUE = 3; - /** - *
-     * Rule subscribed to Monitoring
-     * 
- * - * POLICY_PROVISIONED = 4; - */ - public static final int POLICY_PROVISIONED_VALUE = 4; - /** - *
-     * Rule is currently active (alarm is just thrown by Monitoring)
-     * 
- * - * POLICY_ACTIVE = 5; - */ - public static final int POLICY_ACTIVE_VALUE = 5; - /** - *
-     * Rule action is successfully enforced
-     * 
- * - * POLICY_ENFORCED = 6; - */ - public static final int POLICY_ENFORCED_VALUE = 6; - /** - *
-     * The applied rule action did not work as expected
-     * 
- * - * POLICY_INEFFECTIVE = 7; - */ - public static final int POLICY_INEFFECTIVE_VALUE = 7; - /** - *
-     * The applied rule action did work as expected
-     * 
- * - * POLICY_EFFECTIVE = 8; - */ - public static final int POLICY_EFFECTIVE_VALUE = 8; - /** - *
-     * Operator requires a policy to change
-     * 
- * - * POLICY_UPDATED = 9; - */ - public static final int POLICY_UPDATED_VALUE = 9; - /** - *
-     * Operator requires to remove a policy
-     * 
- * - * POLICY_REMOVED = 10; - */ - public static final int POLICY_REMOVED_VALUE = 10; + private Policy() { + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + /** + * Protobuf enum {@code policy.PolicyRuleStateEnum} + */ + public enum PolicyRuleStateEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + *
+         * Undefined rule state
+         * 
+ * + * POLICY_UNDEFINED = 0; + */ + POLICY_UNDEFINED(0), + /** + *
+         * Rule failed
+         * 
+ * + * POLICY_FAILED = 1; + */ + POLICY_FAILED(1), + /** + *
+         * Rule is just inserted
+         * 
+ * + * POLICY_INSERTED = 2; + */ + POLICY_INSERTED(2), + /** + *
+         * Rule content is correct
+         * 
+ * + * POLICY_VALIDATED = 3; + */ + POLICY_VALIDATED(3), + /** + *
+         * Rule subscribed to Monitoring
+         * 
+ * + * POLICY_PROVISIONED = 4; + */ + POLICY_PROVISIONED(4), + /** + *
+         * Rule is currently active (alarm is just thrown by Monitoring)
+         * 
+ * + * POLICY_ACTIVE = 5; + */ + POLICY_ACTIVE(5), + /** + *
+         * Rule action is successfully enforced
+         * 
+ * + * POLICY_ENFORCED = 6; + */ + POLICY_ENFORCED(6), + /** + *
+         * The applied rule action did not work as expected
+         * 
+ * + * POLICY_INEFFECTIVE = 7; + */ + POLICY_INEFFECTIVE(7), + /** + *
+         * The applied rule action did work as expected
+         * 
+ * + * POLICY_EFFECTIVE = 8; + */ + POLICY_EFFECTIVE(8), + /** + *
+         * Operator requires a policy to change
+         * 
+ * + * POLICY_UPDATED = 9; + */ + POLICY_UPDATED(9), + /** + *
+         * Operator requires to remove a policy
+         * 
+ * + * POLICY_REMOVED = 10; + */ + POLICY_REMOVED(10), + UNRECOGNIZED(-1); + + /** + *
+         * Undefined rule state
+         * 
+ * + * POLICY_UNDEFINED = 0; + */ + public static final int POLICY_UNDEFINED_VALUE = 0; + + /** + *
+         * Rule failed
+         * 
+ * + * POLICY_FAILED = 1; + */ + public static final int POLICY_FAILED_VALUE = 1; + + /** + *
+         * Rule is just inserted
+         * 
+ * + * POLICY_INSERTED = 2; + */ + public static final int POLICY_INSERTED_VALUE = 2; + + /** + *
+         * Rule content is correct
+         * 
+ * + * POLICY_VALIDATED = 3; + */ + public static final int POLICY_VALIDATED_VALUE = 3; + + /** + *
+         * Rule subscribed to Monitoring
+         * 
+ * + * POLICY_PROVISIONED = 4; + */ + public static final int POLICY_PROVISIONED_VALUE = 4; + + /** + *
+         * Rule is currently active (alarm is just thrown by Monitoring)
+         * 
+ * + * POLICY_ACTIVE = 5; + */ + public static final int POLICY_ACTIVE_VALUE = 5; + + /** + *
+         * Rule action is successfully enforced
+         * 
+ * + * POLICY_ENFORCED = 6; + */ + public static final int POLICY_ENFORCED_VALUE = 6; + + /** + *
+         * The applied rule action did not work as expected
+         * 
+ * + * POLICY_INEFFECTIVE = 7; + */ + public static final int POLICY_INEFFECTIVE_VALUE = 7; + + /** + *
+         * The applied rule action did work as expected
+         * 
+ * + * POLICY_EFFECTIVE = 8; + */ + public static final int POLICY_EFFECTIVE_VALUE = 8; + + /** + *
+         * Operator requires a policy to change
+         * 
+ * + * POLICY_UPDATED = 9; + */ + public static final int POLICY_UPDATED_VALUE = 9; + + /** + *
+         * Operator requires to remove a policy
+         * 
+ * + * POLICY_REMOVED = 10; + */ + public static final int POLICY_REMOVED_VALUE = 10; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PolicyRuleStateEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PolicyRuleStateEnum forNumber(int value) { + switch(value) { + case 0: + return POLICY_UNDEFINED; + case 1: + return POLICY_FAILED; + case 2: + return POLICY_INSERTED; + case 3: + return POLICY_VALIDATED; + case 4: + return POLICY_PROVISIONED; + case 5: + return POLICY_ACTIVE; + case 6: + return POLICY_ENFORCED; + case 7: + return POLICY_INEFFECTIVE; + case 8: + return POLICY_EFFECTIVE; + case 9: + return POLICY_UPDATED; + case 10: + return POLICY_REMOVED; + default: + return null; + } + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PolicyRuleStateEnum valueOf(int value) { - return forNumber(value); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static PolicyRuleStateEnum forNumber(int value) { - switch (value) { - case 0: return POLICY_UNDEFINED; - case 1: return POLICY_FAILED; - case 2: return POLICY_INSERTED; - case 3: return POLICY_VALIDATED; - case 4: return POLICY_PROVISIONED; - case 5: return POLICY_ACTIVE; - case 6: return POLICY_ENFORCED; - case 7: return POLICY_INEFFECTIVE; - case 8: return POLICY_EFFECTIVE; - case 9: return POLICY_UPDATED; - case 10: return POLICY_REMOVED; - default: return null; - } - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PolicyRuleStateEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { public PolicyRuleStateEnum findValueByNumber(int number) { - return PolicyRuleStateEnum.forNumber(number); + return PolicyRuleStateEnum.forNumber(number); } - }; + }; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return policy.Policy.getDescriptor().getEnumTypes().get(0); - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - private static final PolicyRuleStateEnum[] VALUES = values(); - - public static PolicyRuleStateEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - private final int value; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return policy.Policy.getDescriptor().getEnumTypes().get(0); + } - private PolicyRuleStateEnum(int value) { - this.value = value; - } + private static final PolicyRuleStateEnum[] VALUES = values(); - // @@protoc_insertion_point(enum_scope:policy.PolicyRuleStateEnum) - } + public static PolicyRuleStateEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public interface PolicyRuleIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleId) - com.google.protobuf.MessageOrBuilder { + private final int value; - /** - * .context.Uuid uuid = 1; - * @return Whether the uuid field is set. - */ - boolean hasUuid(); - /** - * .context.Uuid uuid = 1; - * @return The uuid. - */ - context.ContextOuterClass.Uuid getUuid(); - /** - * .context.Uuid uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getUuidOrBuilder(); - } - /** - * Protobuf type {@code policy.PolicyRuleId} - */ - public static final class PolicyRuleId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleId) - PolicyRuleIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRuleId.newBuilder() to construct. - private PolicyRuleId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRuleId() { + private PolicyRuleStateEnum(int value) { + this.value = value; + } } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRuleId(); - } + public interface PolicyRuleIdOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRuleId) + com.google.protobuf.MessageOrBuilder { - @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; - } + /** + * .context.Uuid uuid = 1; + * @return Whether the uuid field is set. + */ + boolean hasUuid(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleId.class, policy.Policy.PolicyRuleId.Builder.class); - } + /** + * .context.Uuid uuid = 1; + * @return The uuid. + */ + context.ContextOuterClass.Uuid getUuid(); - public static final int UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid uuid_; - /** - * .context.Uuid uuid = 1; - * @return Whether the uuid field is set. - */ - @java.lang.Override - public boolean hasUuid() { - return uuid_ != null; - } - /** - * .context.Uuid uuid = 1; - * @return The uuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getUuid() { - return uuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : uuid_; + /** + * .context.Uuid uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getUuidOrBuilder(); } + /** - * .context.Uuid uuid = 1; + * Protobuf type {@code policy.PolicyRuleId} */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getUuidOrBuilder() { - return getUuid(); - } + public static final class PolicyRuleId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRuleId) + PolicyRuleIdOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use PolicyRuleId.newBuilder() to construct. + private PolicyRuleId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (uuid_ != null) { - output.writeMessage(1, getUuid()); - } - unknownFields.writeTo(output); - } + private PolicyRuleId() { + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (uuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PolicyRuleId(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.Policy.PolicyRuleId)) { - return super.equals(obj); - } - policy.Policy.PolicyRuleId other = (policy.Policy.PolicyRuleId) obj; - - if (hasUuid() != other.hasUuid()) return false; - if (hasUuid()) { - if (!getUuid() - .equals(other.getUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUuid()) { - hash = (37 * hash) + UUID_FIELD_NUMBER; - hash = (53 * hash) + getUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + 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 policy.Policy.PolicyRuleId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleId_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.Policy.PolicyRuleId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleId_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleId.class, policy.Policy.PolicyRuleId.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.PolicyRuleId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleId) - policy.Policy.PolicyRuleIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleId.class, policy.Policy.PolicyRuleId.Builder.class); - } - - // 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; - uuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRuleId_descriptor; - } - - @java.lang.Override - public policy.Policy.PolicyRuleId getDefaultInstanceForType() { - return policy.Policy.PolicyRuleId.getDefaultInstance(); - } - - @java.lang.Override - public policy.Policy.PolicyRuleId build() { - policy.Policy.PolicyRuleId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.Policy.PolicyRuleId) { - return mergeFrom((policy.Policy.PolicyRuleId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(policy.Policy.PolicyRuleId other) { - if (other == policy.Policy.PolicyRuleId.getDefaultInstance()) return this; - if (other.hasUuid()) { - mergeUuid(other.getUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid uuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> uuidBuilder_; - /** - * .context.Uuid uuid = 1; - * @return Whether the uuid field is set. - */ - public boolean hasUuid() { - return uuidBuilder_ != null || uuid_ != null; - } - /** - * .context.Uuid uuid = 1; - * @return The uuid. - */ - public context.ContextOuterClass.Uuid getUuid() { - if (uuidBuilder_ == null) { - return uuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : uuid_; - } else { - return uuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid uuid = 1; - */ - public Builder setUuid(context.ContextOuterClass.Uuid value) { - if (uuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - uuid_ = value; - onChanged(); - } else { - uuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid uuid = 1; - */ - public Builder setUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (uuidBuilder_ == null) { - uuid_ = builderForValue.build(); - onChanged(); - } else { - uuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid uuid = 1; - */ - public Builder mergeUuid(context.ContextOuterClass.Uuid value) { - if (uuidBuilder_ == null) { - if (uuid_ != null) { - uuid_ = - context.ContextOuterClass.Uuid.newBuilder(uuid_).mergeFrom(value).buildPartial(); - } else { - uuid_ = value; - } - onChanged(); - } else { - uuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid uuid = 1; - */ - public Builder clearUuid() { - if (uuidBuilder_ == null) { - uuid_ = null; - onChanged(); - } else { - uuid_ = null; - uuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getUuidBuilder() { - - onChanged(); - return getUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getUuidOrBuilder() { - if (uuidBuilder_ != null) { - return uuidBuilder_.getMessageOrBuilder(); - } else { - return uuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : uuid_; - } - } - /** - * .context.Uuid uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getUuidFieldBuilder() { - if (uuidBuilder_ == null) { - uuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getUuid(), - getParentForChildren(), - isClean()); - uuid_ = null; - } - return uuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleId) - } + public static final int UUID_FIELD_NUMBER = 1; - // @@protoc_insertion_point(class_scope:policy.PolicyRuleId) - private static final policy.Policy.PolicyRuleId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRuleId(); - } + private context.ContextOuterClass.Uuid uuid_; - public static policy.Policy.PolicyRuleId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid uuid = 1; + * @return Whether the uuid field is set. + */ + @java.lang.Override + public boolean hasUuid() { + return uuid_ != null; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Uuid uuid = 1; + * @return The uuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getUuid() { + return uuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : uuid_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Uuid uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getUuidOrBuilder() { + return getUuid(); + } - @java.lang.Override - public policy.Policy.PolicyRuleId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private byte memoizedIsInitialized = -1; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - public interface PolicyRuleStateOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleState) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (uuid_ != null) { + output.writeMessage(1, getUuid()); + } + unknownFields.writeTo(output); + } - /** - * .policy.PolicyRuleStateEnum policyRuleState = 1; - * @return The enum numeric value on the wire for policyRuleState. - */ - int getPolicyRuleStateValue(); - /** - * .policy.PolicyRuleStateEnum policyRuleState = 1; - * @return The policyRuleState. - */ - policy.Policy.PolicyRuleStateEnum getPolicyRuleState(); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (uuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * string policyRuleStateMessage = 2; - * @return The policyRuleStateMessage. - */ - java.lang.String getPolicyRuleStateMessage(); - /** - * string policyRuleStateMessage = 2; - * @return The bytes for policyRuleStateMessage. - */ - com.google.protobuf.ByteString - getPolicyRuleStateMessageBytes(); - } - /** - * Protobuf type {@code policy.PolicyRuleState} - */ - public static final class PolicyRuleState extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleState) - PolicyRuleStateOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRuleState.newBuilder() to construct. - private PolicyRuleState(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRuleState() { - policyRuleState_ = 0; - policyRuleStateMessage_ = ""; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.Policy.PolicyRuleId)) { + return super.equals(obj); + } + policy.Policy.PolicyRuleId other = (policy.Policy.PolicyRuleId) obj; + if (hasUuid() != other.hasUuid()) + return false; + if (hasUuid()) { + if (!getUuid().equals(other.getUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRuleState(); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUuid()) { + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @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; - } + public static policy.Policy.PolicyRuleId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleState_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleState.class, policy.Policy.PolicyRuleState.Builder.class); - } + public static policy.Policy.PolicyRuleId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int POLICYRULESTATE_FIELD_NUMBER = 1; - private int policyRuleState_; - /** - * .policy.PolicyRuleStateEnum policyRuleState = 1; - * @return The enum numeric value on the wire for policyRuleState. - */ - @java.lang.Override public int getPolicyRuleStateValue() { - return policyRuleState_; - } - /** - * .policy.PolicyRuleStateEnum policyRuleState = 1; - * @return The policyRuleState. - */ - @java.lang.Override public policy.Policy.PolicyRuleStateEnum getPolicyRuleState() { - @SuppressWarnings("deprecation") - policy.Policy.PolicyRuleStateEnum result = policy.Policy.PolicyRuleStateEnum.valueOf(policyRuleState_); - return result == null ? policy.Policy.PolicyRuleStateEnum.UNRECOGNIZED : result; - } + public static policy.Policy.PolicyRuleId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int POLICYRULESTATEMESSAGE_FIELD_NUMBER = 2; - private volatile java.lang.Object policyRuleStateMessage_; - /** - * string policyRuleStateMessage = 2; - * @return The policyRuleStateMessage. - */ - @java.lang.Override - public java.lang.String getPolicyRuleStateMessage() { - java.lang.Object ref = policyRuleStateMessage_; - 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(); - policyRuleStateMessage_ = s; - return s; - } - } - /** - * string policyRuleStateMessage = 2; - * @return The bytes for policyRuleStateMessage. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPolicyRuleStateMessageBytes() { - java.lang.Object ref = policyRuleStateMessage_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - policyRuleStateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static policy.Policy.PolicyRuleId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static policy.Policy.PolicyRuleId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - memoizedIsInitialized = 1; - return true; - } + public static policy.Policy.PolicyRuleId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (policyRuleState_ != policy.Policy.PolicyRuleStateEnum.POLICY_UNDEFINED.getNumber()) { - output.writeEnum(1, policyRuleState_); - } - if (!getPolicyRuleStateMessageBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, policyRuleStateMessage_); - } - unknownFields.writeTo(output); - } + public static policy.Policy.PolicyRuleId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (policyRuleState_ != policy.Policy.PolicyRuleStateEnum.POLICY_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, policyRuleState_); - } - if (!getPolicyRuleStateMessageBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, policyRuleStateMessage_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static policy.Policy.PolicyRuleId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.Policy.PolicyRuleState)) { - return super.equals(obj); - } - policy.Policy.PolicyRuleState other = (policy.Policy.PolicyRuleState) obj; - - if (policyRuleState_ != other.policyRuleState_) return false; - if (!getPolicyRuleStateMessage() - .equals(other.getPolicyRuleStateMessage())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static policy.Policy.PolicyRuleId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + POLICYRULESTATE_FIELD_NUMBER; - hash = (53 * hash) + policyRuleState_; - hash = (37 * hash) + POLICYRULESTATEMESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getPolicyRuleStateMessage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static policy.Policy.PolicyRuleId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - public static policy.Policy.PolicyRuleState parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleState parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleState parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleState parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleState parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleState parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleState parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleState parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleState parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleState parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleState parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleState parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static policy.Policy.PolicyRuleId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.Policy.PolicyRuleState prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static policy.Policy.PolicyRuleId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.PolicyRuleState} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleState) - policy.Policy.PolicyRuleStateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleState_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleState_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleState.class, policy.Policy.PolicyRuleState.Builder.class); - } - - // 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(); - policyRuleState_ = 0; - - policyRuleStateMessage_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRuleState_descriptor; - } - - @java.lang.Override - public policy.Policy.PolicyRuleState getDefaultInstanceForType() { - return policy.Policy.PolicyRuleState.getDefaultInstance(); - } - - @java.lang.Override - public policy.Policy.PolicyRuleState build() { - policy.Policy.PolicyRuleState result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public policy.Policy.PolicyRuleState buildPartial() { - policy.Policy.PolicyRuleState result = new policy.Policy.PolicyRuleState(this); - result.policyRuleState_ = policyRuleState_; - result.policyRuleStateMessage_ = policyRuleStateMessage_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.Policy.PolicyRuleState) { - return mergeFrom((policy.Policy.PolicyRuleState)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(policy.Policy.PolicyRuleState other) { - if (other == policy.Policy.PolicyRuleState.getDefaultInstance()) return this; - if (other.policyRuleState_ != 0) { - setPolicyRuleStateValue(other.getPolicyRuleStateValue()); - } - if (!other.getPolicyRuleStateMessage().isEmpty()) { - policyRuleStateMessage_ = other.policyRuleStateMessage_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleState) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int policyRuleState_ = 0; - /** - * .policy.PolicyRuleStateEnum policyRuleState = 1; - * @return The enum numeric value on the wire for policyRuleState. - */ - @java.lang.Override public int getPolicyRuleStateValue() { - return policyRuleState_; - } - /** - * .policy.PolicyRuleStateEnum policyRuleState = 1; - * @param value The enum numeric value on the wire for policyRuleState to set. - * @return This builder for chaining. - */ - public Builder setPolicyRuleStateValue(int value) { - - policyRuleState_ = value; - onChanged(); - return this; - } - /** - * .policy.PolicyRuleStateEnum policyRuleState = 1; - * @return The policyRuleState. - */ - @java.lang.Override - public policy.Policy.PolicyRuleStateEnum getPolicyRuleState() { - @SuppressWarnings("deprecation") - policy.Policy.PolicyRuleStateEnum result = policy.Policy.PolicyRuleStateEnum.valueOf(policyRuleState_); - return result == null ? policy.Policy.PolicyRuleStateEnum.UNRECOGNIZED : result; - } - /** - * .policy.PolicyRuleStateEnum policyRuleState = 1; - * @param value The policyRuleState to set. - * @return This builder for chaining. - */ - public Builder setPolicyRuleState(policy.Policy.PolicyRuleStateEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - policyRuleState_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .policy.PolicyRuleStateEnum policyRuleState = 1; - * @return This builder for chaining. - */ - public Builder clearPolicyRuleState() { - - policyRuleState_ = 0; - onChanged(); - return this; - } - - private java.lang.Object policyRuleStateMessage_ = ""; - /** - * string policyRuleStateMessage = 2; - * @return The policyRuleStateMessage. - */ - public java.lang.String getPolicyRuleStateMessage() { - java.lang.Object ref = policyRuleStateMessage_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - policyRuleStateMessage_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string policyRuleStateMessage = 2; - * @return The bytes for policyRuleStateMessage. - */ - public com.google.protobuf.ByteString - getPolicyRuleStateMessageBytes() { - java.lang.Object ref = policyRuleStateMessage_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - policyRuleStateMessage_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string policyRuleStateMessage = 2; - * @param value The policyRuleStateMessage to set. - * @return This builder for chaining. - */ - public Builder setPolicyRuleStateMessage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - policyRuleStateMessage_ = value; - onChanged(); - return this; - } - /** - * string policyRuleStateMessage = 2; - * @return This builder for chaining. - */ - public Builder clearPolicyRuleStateMessage() { - - policyRuleStateMessage_ = getDefaultInstance().getPolicyRuleStateMessage(); - onChanged(); - return this; - } - /** - * string policyRuleStateMessage = 2; - * @param value The bytes for policyRuleStateMessage to set. - * @return This builder for chaining. - */ - public Builder setPolicyRuleStateMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - policyRuleStateMessage_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleState) - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - // @@protoc_insertion_point(class_scope:policy.PolicyRuleState) - private static final policy.Policy.PolicyRuleState DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRuleState(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public static policy.Policy.PolicyRuleState getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static Builder newBuilder(policy.Policy.PolicyRuleId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - public policy.Policy.PolicyRuleState getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * Protobuf type {@code policy.PolicyRuleId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRuleId) + policy.Policy.PolicyRuleIdOrBuilder { - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleId_descriptor; + } - public interface PolicyRuleBasicOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleBasic) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleId_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleId.class, policy.Policy.PolicyRuleId.Builder.class); + } - /** - * .policy.PolicyRuleId policyRuleId = 1; - * @return Whether the policyRuleId field is set. - */ - boolean hasPolicyRuleId(); - /** - * .policy.PolicyRuleId policyRuleId = 1; - * @return The policyRuleId. - */ - policy.Policy.PolicyRuleId getPolicyRuleId(); - /** - * .policy.PolicyRuleId policyRuleId = 1; - */ - policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder(); + // Construct using policy.Policy.PolicyRuleId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - /** - *
-     *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-     * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - * @return Whether the policyRuleState field is set. - */ - boolean hasPolicyRuleState(); - /** - *
-     *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-     * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - * @return The policyRuleState. - */ - policy.Policy.PolicyRuleState getPolicyRuleState(); - /** - *
-     *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-     * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - */ - policy.Policy.PolicyRuleStateOrBuilder getPolicyRuleStateOrBuilder(); + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - /** - * uint32 priority = 3; - * @return The priority. - */ - int getPriority(); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - /** - *
-     * Event-Condition-Action (ECA) model
-     * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - java.util.List - getConditionListList(); - /** - *
-     * Event-Condition-Action (ECA) model
-     * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - policy.PolicyCondition.PolicyRuleCondition getConditionList(int index); - /** - *
-     * Event-Condition-Action (ECA) model
-     * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - int getConditionListCount(); - /** - *
-     * Event-Condition-Action (ECA) model
-     * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - java.util.List - getConditionListOrBuilderList(); - /** - *
-     * Event-Condition-Action (ECA) model
-     * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - policy.PolicyCondition.PolicyRuleConditionOrBuilder getConditionListOrBuilder( - int index); + @java.lang.Override + public Builder clear() { + super.clear(); + if (uuidBuilder_ == null) { + uuid_ = null; + } else { + uuid_ = null; + uuidBuilder_ = null; + } + return this; + } - /** - *
-     * Evaluation operator to be used
-     * 
- * - * .policy.BooleanOperator booleanOperator = 5; - * @return The enum numeric value on the wire for booleanOperator. - */ - int getBooleanOperatorValue(); - /** - *
-     * Evaluation operator to be used
-     * 
- * - * .policy.BooleanOperator booleanOperator = 5; - * @return The booleanOperator. - */ - policy.PolicyCondition.BooleanOperator getBooleanOperator(); + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRuleId_descriptor; + } - /** - *
-     * One or more actions should be applied
-     * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - java.util.List - getActionListList(); - /** - *
-     * One or more actions should be applied
-     * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - policy.PolicyAction.PolicyRuleAction getActionList(int index); - /** - *
-     * One or more actions should be applied
-     * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - int getActionListCount(); - /** - *
-     * One or more actions should be applied
-     * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - java.util.List - getActionListOrBuilderList(); - /** - *
-     * One or more actions should be applied
-     * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - policy.PolicyAction.PolicyRuleActionOrBuilder getActionListOrBuilder( - int index); - } - /** - *
-   * Basic policy rule attributes
-   * 
- * - * Protobuf type {@code policy.PolicyRuleBasic} - */ - public static final class PolicyRuleBasic extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleBasic) - PolicyRuleBasicOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRuleBasic.newBuilder() to construct. - private PolicyRuleBasic(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRuleBasic() { - conditionList_ = java.util.Collections.emptyList(); - booleanOperator_ = 0; - actionList_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public policy.Policy.PolicyRuleId getDefaultInstanceForType() { + return policy.Policy.PolicyRuleId.getDefaultInstance(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRuleBasic(); - } + @java.lang.Override + public policy.Policy.PolicyRuleId build() { + policy.Policy.PolicyRuleId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @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(); - 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(); - 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; - } + @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(); + } + onBuilt(); + return result; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleBasic_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleBasic.class, policy.Policy.PolicyRuleBasic.Builder.class); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public static final int POLICYRULEID_FIELD_NUMBER = 1; - private policy.Policy.PolicyRuleId policyRuleId_; - /** - * .policy.PolicyRuleId policyRuleId = 1; - * @return Whether the policyRuleId field is set. - */ - @java.lang.Override - public boolean hasPolicyRuleId() { - return policyRuleId_ != null; - } - /** - * .policy.PolicyRuleId policyRuleId = 1; - * @return The policyRuleId. - */ - @java.lang.Override - public policy.Policy.PolicyRuleId getPolicyRuleId() { - return policyRuleId_ == null ? policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; - } - /** - * .policy.PolicyRuleId policyRuleId = 1; - */ - @java.lang.Override - public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder() { - return getPolicyRuleId(); - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static final int POLICYRULESTATE_FIELD_NUMBER = 2; - private policy.Policy.PolicyRuleState policyRuleState_; - /** - *
-     *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-     * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - * @return Whether the policyRuleState field is set. - */ - @java.lang.Override - public boolean hasPolicyRuleState() { - return policyRuleState_ != null; - } - /** - *
-     *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-     * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - * @return The policyRuleState. - */ - @java.lang.Override - public policy.Policy.PolicyRuleState getPolicyRuleState() { - return policyRuleState_ == null ? policy.Policy.PolicyRuleState.getDefaultInstance() : policyRuleState_; - } - /** - *
-     *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-     * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - */ - @java.lang.Override - public policy.Policy.PolicyRuleStateOrBuilder getPolicyRuleStateOrBuilder() { - return getPolicyRuleState(); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static final int PRIORITY_FIELD_NUMBER = 3; - private int priority_; - /** - * uint32 priority = 3; - * @return The priority. - */ - @java.lang.Override - public int getPriority() { - return priority_; - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - public static final int CONDITIONLIST_FIELD_NUMBER = 4; - private java.util.List conditionList_; - /** - *
-     * Event-Condition-Action (ECA) model
-     * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - @java.lang.Override - public java.util.List getConditionListList() { - return conditionList_; - } - /** - *
-     * Event-Condition-Action (ECA) model
-     * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - @java.lang.Override - public java.util.List - getConditionListOrBuilderList() { - return conditionList_; - } - /** - *
-     * Event-Condition-Action (ECA) model
-     * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - @java.lang.Override - public int getConditionListCount() { - return conditionList_.size(); - } - /** - *
-     * Event-Condition-Action (ECA) model
-     * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - @java.lang.Override - public policy.PolicyCondition.PolicyRuleCondition getConditionList(int index) { - return conditionList_.get(index); - } - /** - *
-     * Event-Condition-Action (ECA) model
-     * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - @java.lang.Override - public policy.PolicyCondition.PolicyRuleConditionOrBuilder getConditionListOrBuilder( - int index) { - return conditionList_.get(index); - } + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - public static final int BOOLEANOPERATOR_FIELD_NUMBER = 5; - private int booleanOperator_; - /** - *
-     * Evaluation operator to be used
-     * 
- * - * .policy.BooleanOperator booleanOperator = 5; - * @return The enum numeric value on the wire for booleanOperator. - */ - @java.lang.Override public int getBooleanOperatorValue() { - return booleanOperator_; - } - /** - *
-     * Evaluation operator to be used
-     * 
- * - * .policy.BooleanOperator booleanOperator = 5; - * @return The booleanOperator. - */ - @java.lang.Override public policy.PolicyCondition.BooleanOperator getBooleanOperator() { - @SuppressWarnings("deprecation") - policy.PolicyCondition.BooleanOperator result = policy.PolicyCondition.BooleanOperator.valueOf(booleanOperator_); - return result == null ? policy.PolicyCondition.BooleanOperator.UNRECOGNIZED : result; - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - public static final int ACTIONLIST_FIELD_NUMBER = 6; - private java.util.List actionList_; - /** - *
-     * One or more actions should be applied
-     * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - @java.lang.Override - public java.util.List getActionListList() { - return actionList_; - } - /** - *
-     * One or more actions should be applied
-     * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - @java.lang.Override - public java.util.List - getActionListOrBuilderList() { - return actionList_; - } - /** - *
-     * One or more actions should be applied
-     * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - @java.lang.Override - public int getActionListCount() { - return actionList_.size(); - } - /** - *
-     * One or more actions should be applied
-     * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - @java.lang.Override - public policy.PolicyAction.PolicyRuleAction getActionList(int index) { - return actionList_.get(index); - } - /** - *
-     * One or more actions should be applied
-     * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - @java.lang.Override - public policy.PolicyAction.PolicyRuleActionOrBuilder getActionListOrBuilder( - int index) { - return actionList_.get(index); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleId) { + return mergeFrom((policy.Policy.PolicyRuleId) other); + } else { + super.mergeFrom(other); + return this; + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public Builder mergeFrom(policy.Policy.PolicyRuleId other) { + if (other == policy.Policy.PolicyRuleId.getDefaultInstance()) + return this; + if (other.hasUuid()) { + mergeUuid(other.getUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (policyRuleId_ != null) { - output.writeMessage(1, getPolicyRuleId()); - } - if (policyRuleState_ != null) { - output.writeMessage(2, getPolicyRuleState()); - } - if (priority_ != 0) { - output.writeUInt32(3, priority_); - } - for (int i = 0; i < conditionList_.size(); i++) { - output.writeMessage(4, conditionList_.get(i)); - } - if (booleanOperator_ != policy.PolicyCondition.BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_UNDEFINED.getNumber()) { - output.writeEnum(5, booleanOperator_); - } - for (int i = 0; i < actionList_.size(); i++) { - output.writeMessage(6, actionList_.get(i)); - } - unknownFields.writeTo(output); - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRuleId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (policyRuleId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getPolicyRuleId()); - } - if (policyRuleState_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getPolicyRuleState()); - } - if (priority_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, priority_); - } - for (int i = 0; i < conditionList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, conditionList_.get(i)); - } - if (booleanOperator_ != policy.PolicyCondition.BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, booleanOperator_); - } - for (int i = 0; i < actionList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, actionList_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private context.ContextOuterClass.Uuid uuid_; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.Policy.PolicyRuleBasic)) { - return super.equals(obj); - } - policy.Policy.PolicyRuleBasic other = (policy.Policy.PolicyRuleBasic) obj; - - if (hasPolicyRuleId() != other.hasPolicyRuleId()) return false; - if (hasPolicyRuleId()) { - if (!getPolicyRuleId() - .equals(other.getPolicyRuleId())) return false; - } - if (hasPolicyRuleState() != other.hasPolicyRuleState()) return false; - if (hasPolicyRuleState()) { - if (!getPolicyRuleState() - .equals(other.getPolicyRuleState())) return false; - } - if (getPriority() - != other.getPriority()) return false; - if (!getConditionListList() - .equals(other.getConditionListList())) return false; - if (booleanOperator_ != other.booleanOperator_) return false; - if (!getActionListList() - .equals(other.getActionListList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private com.google.protobuf.SingleFieldBuilderV3 uuidBuilder_; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPolicyRuleId()) { - hash = (37 * hash) + POLICYRULEID_FIELD_NUMBER; - hash = (53 * hash) + getPolicyRuleId().hashCode(); - } - if (hasPolicyRuleState()) { - hash = (37 * hash) + POLICYRULESTATE_FIELD_NUMBER; - hash = (53 * hash) + getPolicyRuleState().hashCode(); - } - hash = (37 * hash) + PRIORITY_FIELD_NUMBER; - hash = (53 * hash) + getPriority(); - if (getConditionListCount() > 0) { - hash = (37 * hash) + CONDITIONLIST_FIELD_NUMBER; - hash = (53 * hash) + getConditionListList().hashCode(); - } - hash = (37 * hash) + BOOLEANOPERATOR_FIELD_NUMBER; - hash = (53 * hash) + booleanOperator_; - if (getActionListCount() > 0) { - hash = (37 * hash) + ACTIONLIST_FIELD_NUMBER; - hash = (53 * hash) + getActionListList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Uuid uuid = 1; + * @return Whether the uuid field is set. + */ + public boolean hasUuid() { + return uuidBuilder_ != null || uuid_ != null; + } - public static policy.Policy.PolicyRuleBasic parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleBasic parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleBasic parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleBasic parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleBasic parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleBasic parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleBasic parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleBasic parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleBasic parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleBasic parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleBasic parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleBasic parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Uuid uuid = 1; + * @return The uuid. + */ + public context.ContextOuterClass.Uuid getUuid() { + if (uuidBuilder_ == null) { + return uuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : uuid_; + } else { + return uuidBuilder_.getMessage(); + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.Policy.PolicyRuleBasic prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Uuid uuid = 1; + */ + public Builder setUuid(context.ContextOuterClass.Uuid value) { + if (uuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + uuid_ = value; + onChanged(); + } else { + uuidBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Basic policy rule attributes
-     * 
- * - * Protobuf type {@code policy.PolicyRuleBasic} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleBasic) - policy.Policy.PolicyRuleBasicOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleBasic_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleBasic_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleBasic.class, policy.Policy.PolicyRuleBasic.Builder.class); - } - - // 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; - policyRuleIdBuilder_ = null; - } - if (policyRuleStateBuilder_ == null) { - policyRuleState_ = null; - } else { - policyRuleState_ = null; - policyRuleStateBuilder_ = null; - } - priority_ = 0; - - if (conditionListBuilder_ == null) { - conditionList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - conditionListBuilder_.clear(); - } - booleanOperator_ = 0; - - if (actionListBuilder_ == null) { - actionList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - actionListBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRuleBasic_descriptor; - } - - @java.lang.Override - public policy.Policy.PolicyRuleBasic getDefaultInstanceForType() { - return policy.Policy.PolicyRuleBasic.getDefaultInstance(); - } - - @java.lang.Override - public policy.Policy.PolicyRuleBasic build() { - policy.Policy.PolicyRuleBasic result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.priority_ = priority_; - if (conditionListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - conditionList_ = java.util.Collections.unmodifiableList(conditionList_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.conditionList_ = conditionList_; - } else { - result.conditionList_ = conditionListBuilder_.build(); - } - result.booleanOperator_ = booleanOperator_; - if (actionListBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - actionList_ = java.util.Collections.unmodifiableList(actionList_); - bitField0_ = (bitField0_ & ~0x00000002); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.Policy.PolicyRuleBasic) { - return mergeFrom((policy.Policy.PolicyRuleBasic)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(policy.Policy.PolicyRuleBasic other) { - if (other == policy.Policy.PolicyRuleBasic.getDefaultInstance()) return this; - if (other.hasPolicyRuleId()) { - mergePolicyRuleId(other.getPolicyRuleId()); - } - if (other.hasPolicyRuleState()) { - mergePolicyRuleState(other.getPolicyRuleState()); - } - if (other.getPriority() != 0) { - setPriority(other.getPriority()); - } - if (conditionListBuilder_ == null) { - if (!other.conditionList_.isEmpty()) { - if (conditionList_.isEmpty()) { - conditionList_ = other.conditionList_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConditionListIsMutable(); - conditionList_.addAll(other.conditionList_); - } - onChanged(); - } - } else { - if (!other.conditionList_.isEmpty()) { - if (conditionListBuilder_.isEmpty()) { - conditionListBuilder_.dispose(); - conditionListBuilder_ = null; - conditionList_ = other.conditionList_; - bitField0_ = (bitField0_ & ~0x00000001); - conditionListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConditionListFieldBuilder() : null; - } else { - conditionListBuilder_.addAllMessages(other.conditionList_); + /** + * .context.Uuid uuid = 1; + */ + public Builder setUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (uuidBuilder_ == null) { + uuid_ = builderForValue.build(); + onChanged(); + } else { + uuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid uuid = 1; + */ + public Builder mergeUuid(context.ContextOuterClass.Uuid value) { + if (uuidBuilder_ == null) { + if (uuid_ != null) { + uuid_ = context.ContextOuterClass.Uuid.newBuilder(uuid_).mergeFrom(value).buildPartial(); + } else { + uuid_ = value; + } + onChanged(); + } else { + uuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid uuid = 1; + */ + public Builder clearUuid() { + if (uuidBuilder_ == null) { + uuid_ = null; + onChanged(); + } else { + uuid_ = null; + uuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getUuidBuilder() { + onChanged(); + return getUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getUuidOrBuilder() { + if (uuidBuilder_ != null) { + return uuidBuilder_.getMessageOrBuilder(); + } else { + return uuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : uuid_; + } + } + + /** + * .context.Uuid uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getUuidFieldBuilder() { + if (uuidBuilder_ == null) { + uuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getUuid(), getParentForChildren(), isClean()); + uuid_ = null; + } + return uuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - } + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleId) } - if (other.booleanOperator_ != 0) { - setBooleanOperatorValue(other.getBooleanOperatorValue()); + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleId) + private static final policy.Policy.PolicyRuleId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleId(); } - if (actionListBuilder_ == null) { - if (!other.actionList_.isEmpty()) { - if (actionList_.isEmpty()) { - actionList_ = other.actionList_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureActionListIsMutable(); - actionList_.addAll(other.actionList_); - } - onChanged(); - } - } else { - if (!other.actionList_.isEmpty()) { - if (actionListBuilder_.isEmpty()) { - actionListBuilder_.dispose(); - actionListBuilder_ = null; - actionList_ = other.actionList_; - bitField0_ = (bitField0_ & ~0x00000002); - actionListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getActionListFieldBuilder() : null; - } else { - actionListBuilder_.addAllMessages(other.actionList_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleBasic) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private policy.Policy.PolicyRuleId policyRuleId_; - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder> policyRuleIdBuilder_; - /** - * .policy.PolicyRuleId policyRuleId = 1; - * @return Whether the policyRuleId field is set. - */ - public boolean hasPolicyRuleId() { - return policyRuleIdBuilder_ != null || policyRuleId_ != null; - } - /** - * .policy.PolicyRuleId policyRuleId = 1; - * @return The policyRuleId. - */ - public policy.Policy.PolicyRuleId getPolicyRuleId() { - if (policyRuleIdBuilder_ == null) { - return policyRuleId_ == null ? policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; - } else { - return policyRuleIdBuilder_.getMessage(); - } - } - /** - * .policy.PolicyRuleId policyRuleId = 1; - */ - public Builder setPolicyRuleId(policy.Policy.PolicyRuleId value) { - if (policyRuleIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policyRuleId_ = value; - onChanged(); - } else { - policyRuleIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .policy.PolicyRuleId policyRuleId = 1; - */ - public Builder setPolicyRuleId( - policy.Policy.PolicyRuleId.Builder builderForValue) { - if (policyRuleIdBuilder_ == null) { - policyRuleId_ = builderForValue.build(); - onChanged(); - } else { - policyRuleIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .policy.PolicyRuleId policyRuleId = 1; - */ - public Builder mergePolicyRuleId(policy.Policy.PolicyRuleId value) { - if (policyRuleIdBuilder_ == null) { - if (policyRuleId_ != null) { - policyRuleId_ = - policy.Policy.PolicyRuleId.newBuilder(policyRuleId_).mergeFrom(value).buildPartial(); - } else { - policyRuleId_ = value; - } - onChanged(); - } else { - policyRuleIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .policy.PolicyRuleId policyRuleId = 1; - */ - public Builder clearPolicyRuleId() { - if (policyRuleIdBuilder_ == null) { - policyRuleId_ = null; - onChanged(); - } else { - policyRuleId_ = null; - policyRuleIdBuilder_ = null; - } - - return this; - } - /** - * .policy.PolicyRuleId policyRuleId = 1; - */ - public policy.Policy.PolicyRuleId.Builder getPolicyRuleIdBuilder() { - - onChanged(); - return getPolicyRuleIdFieldBuilder().getBuilder(); - } - /** - * .policy.PolicyRuleId policyRuleId = 1; - */ - public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder() { - if (policyRuleIdBuilder_ != null) { - return policyRuleIdBuilder_.getMessageOrBuilder(); - } else { - return policyRuleId_ == null ? - policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; - } - } - /** - * .policy.PolicyRuleId policyRuleId = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder> - getPolicyRuleIdFieldBuilder() { - if (policyRuleIdBuilder_ == null) { - policyRuleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder>( - getPolicyRuleId(), - getParentForChildren(), - isClean()); - policyRuleId_ = null; - } - return policyRuleIdBuilder_; - } - - private policy.Policy.PolicyRuleState policyRuleState_; - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleState, policy.Policy.PolicyRuleState.Builder, policy.Policy.PolicyRuleStateOrBuilder> policyRuleStateBuilder_; - /** - *
-       *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-       * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - * @return Whether the policyRuleState field is set. - */ - public boolean hasPolicyRuleState() { - return policyRuleStateBuilder_ != null || policyRuleState_ != null; - } - /** - *
-       *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-       * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - * @return The policyRuleState. - */ - public policy.Policy.PolicyRuleState getPolicyRuleState() { - if (policyRuleStateBuilder_ == null) { - return policyRuleState_ == null ? policy.Policy.PolicyRuleState.getDefaultInstance() : policyRuleState_; - } else { - return policyRuleStateBuilder_.getMessage(); - } - } - /** - *
-       *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-       * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - */ - public Builder setPolicyRuleState(policy.Policy.PolicyRuleState value) { - if (policyRuleStateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policyRuleState_ = value; - onChanged(); - } else { - policyRuleStateBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-       * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - */ - public Builder setPolicyRuleState( - policy.Policy.PolicyRuleState.Builder builderForValue) { - if (policyRuleStateBuilder_ == null) { - policyRuleState_ = builderForValue.build(); - onChanged(); - } else { - policyRuleStateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-       * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - */ - public Builder mergePolicyRuleState(policy.Policy.PolicyRuleState value) { - if (policyRuleStateBuilder_ == null) { - if (policyRuleState_ != null) { - policyRuleState_ = - policy.Policy.PolicyRuleState.newBuilder(policyRuleState_).mergeFrom(value).buildPartial(); - } else { - policyRuleState_ = value; - } - onChanged(); - } else { - policyRuleStateBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-       * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - */ - public Builder clearPolicyRuleState() { - if (policyRuleStateBuilder_ == null) { - policyRuleState_ = null; - onChanged(); - } else { - policyRuleState_ = null; - policyRuleStateBuilder_ = null; - } - - return this; - } - /** - *
-       *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-       * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - */ - public policy.Policy.PolicyRuleState.Builder getPolicyRuleStateBuilder() { - - onChanged(); - return getPolicyRuleStateFieldBuilder().getBuilder(); - } - /** - *
-       *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-       * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - */ - public policy.Policy.PolicyRuleStateOrBuilder getPolicyRuleStateOrBuilder() { - if (policyRuleStateBuilder_ != null) { - return policyRuleStateBuilder_.getMessageOrBuilder(); - } else { - return policyRuleState_ == null ? - policy.Policy.PolicyRuleState.getDefaultInstance() : policyRuleState_; - } - } - /** - *
-       *policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
-       * 
- * - * .policy.PolicyRuleState policyRuleState = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleState, policy.Policy.PolicyRuleState.Builder, policy.Policy.PolicyRuleStateOrBuilder> - getPolicyRuleStateFieldBuilder() { - if (policyRuleStateBuilder_ == null) { - policyRuleStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleState, policy.Policy.PolicyRuleState.Builder, policy.Policy.PolicyRuleStateOrBuilder>( - getPolicyRuleState(), - getParentForChildren(), - isClean()); - policyRuleState_ = null; - } - return policyRuleStateBuilder_; - } - - private int priority_ ; - /** - * uint32 priority = 3; - * @return The priority. - */ - @java.lang.Override - public int getPriority() { - return priority_; - } - /** - * uint32 priority = 3; - * @param value The priority to set. - * @return This builder for chaining. - */ - public Builder setPriority(int value) { - - priority_ = value; - onChanged(); - return this; - } - /** - * uint32 priority = 3; - * @return This builder for chaining. - */ - public Builder clearPriority() { - - priority_ = 0; - onChanged(); - return this; - } - - private java.util.List conditionList_ = - java.util.Collections.emptyList(); - private void ensureConditionListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - conditionList_ = new java.util.ArrayList(conditionList_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.PolicyCondition.PolicyRuleCondition, policy.PolicyCondition.PolicyRuleCondition.Builder, policy.PolicyCondition.PolicyRuleConditionOrBuilder> conditionListBuilder_; - - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public java.util.List getConditionListList() { - if (conditionListBuilder_ == null) { - return java.util.Collections.unmodifiableList(conditionList_); - } else { - return conditionListBuilder_.getMessageList(); - } - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public int getConditionListCount() { - if (conditionListBuilder_ == null) { - return conditionList_.size(); - } else { - return conditionListBuilder_.getCount(); - } - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public policy.PolicyCondition.PolicyRuleCondition getConditionList(int index) { - if (conditionListBuilder_ == null) { - return conditionList_.get(index); - } else { - return conditionListBuilder_.getMessage(index); - } - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public Builder setConditionList( - int index, policy.PolicyCondition.PolicyRuleCondition value) { - if (conditionListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionListIsMutable(); - conditionList_.set(index, value); - onChanged(); - } else { - conditionListBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public Builder setConditionList( - int index, policy.PolicyCondition.PolicyRuleCondition.Builder builderForValue) { - if (conditionListBuilder_ == null) { - ensureConditionListIsMutable(); - conditionList_.set(index, builderForValue.build()); - onChanged(); - } else { - conditionListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public Builder addConditionList(policy.PolicyCondition.PolicyRuleCondition value) { - if (conditionListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionListIsMutable(); - conditionList_.add(value); - onChanged(); - } else { - conditionListBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public Builder addConditionList( - int index, policy.PolicyCondition.PolicyRuleCondition value) { - if (conditionListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionListIsMutable(); - conditionList_.add(index, value); - onChanged(); - } else { - conditionListBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public Builder addConditionList( - policy.PolicyCondition.PolicyRuleCondition.Builder builderForValue) { - if (conditionListBuilder_ == null) { - ensureConditionListIsMutable(); - conditionList_.add(builderForValue.build()); - onChanged(); - } else { - conditionListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public Builder addConditionList( - int index, policy.PolicyCondition.PolicyRuleCondition.Builder builderForValue) { - if (conditionListBuilder_ == null) { - ensureConditionListIsMutable(); - conditionList_.add(index, builderForValue.build()); - onChanged(); - } else { - conditionListBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public Builder addAllConditionList( - java.lang.Iterable values) { - if (conditionListBuilder_ == null) { - ensureConditionListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, conditionList_); - onChanged(); - } else { - conditionListBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public Builder clearConditionList() { - if (conditionListBuilder_ == null) { - conditionList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - conditionListBuilder_.clear(); - } - return this; - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public Builder removeConditionList(int index) { - if (conditionListBuilder_ == null) { - ensureConditionListIsMutable(); - conditionList_.remove(index); - onChanged(); - } else { - conditionListBuilder_.remove(index); - } - return this; - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public policy.PolicyCondition.PolicyRuleCondition.Builder getConditionListBuilder( - int index) { - return getConditionListFieldBuilder().getBuilder(index); - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public policy.PolicyCondition.PolicyRuleConditionOrBuilder getConditionListOrBuilder( - int index) { - if (conditionListBuilder_ == null) { - return conditionList_.get(index); } else { - return conditionListBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public java.util.List - getConditionListOrBuilderList() { - if (conditionListBuilder_ != null) { - return conditionListBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(conditionList_); - } - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public policy.PolicyCondition.PolicyRuleCondition.Builder addConditionListBuilder() { - return getConditionListFieldBuilder().addBuilder( - policy.PolicyCondition.PolicyRuleCondition.getDefaultInstance()); - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public policy.PolicyCondition.PolicyRuleCondition.Builder addConditionListBuilder( - int index) { - return getConditionListFieldBuilder().addBuilder( - index, policy.PolicyCondition.PolicyRuleCondition.getDefaultInstance()); - } - /** - *
-       * Event-Condition-Action (ECA) model
-       * 
- * - * repeated .policy.PolicyRuleCondition conditionList = 4; - */ - public java.util.List - getConditionListBuilderList() { - return getConditionListFieldBuilder().getBuilderList(); - } - 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()); - conditionList_ = null; - } - return conditionListBuilder_; - } - - private int booleanOperator_ = 0; - /** - *
-       * Evaluation operator to be used
-       * 
- * - * .policy.BooleanOperator booleanOperator = 5; - * @return The enum numeric value on the wire for booleanOperator. - */ - @java.lang.Override public int getBooleanOperatorValue() { - return booleanOperator_; - } - /** - *
-       * Evaluation operator to be used
-       * 
- * - * .policy.BooleanOperator booleanOperator = 5; - * @param value The enum numeric value on the wire for booleanOperator to set. - * @return This builder for chaining. - */ - public Builder setBooleanOperatorValue(int value) { - - booleanOperator_ = value; - onChanged(); - return this; - } - /** - *
-       * Evaluation operator to be used
-       * 
- * - * .policy.BooleanOperator booleanOperator = 5; - * @return The booleanOperator. - */ - @java.lang.Override - public policy.PolicyCondition.BooleanOperator getBooleanOperator() { - @SuppressWarnings("deprecation") - policy.PolicyCondition.BooleanOperator result = policy.PolicyCondition.BooleanOperator.valueOf(booleanOperator_); - return result == null ? policy.PolicyCondition.BooleanOperator.UNRECOGNIZED : result; - } - /** - *
-       * Evaluation operator to be used
-       * 
- * - * .policy.BooleanOperator booleanOperator = 5; - * @param value The booleanOperator to set. - * @return This builder for chaining. - */ - public Builder setBooleanOperator(policy.PolicyCondition.BooleanOperator value) { - if (value == null) { - throw new NullPointerException(); - } - - booleanOperator_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Evaluation operator to be used
-       * 
- * - * .policy.BooleanOperator booleanOperator = 5; - * @return This builder for chaining. - */ - public Builder clearBooleanOperator() { - - booleanOperator_ = 0; - onChanged(); - return this; - } - - private java.util.List actionList_ = - java.util.Collections.emptyList(); - private void ensureActionListIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - actionList_ = new java.util.ArrayList(actionList_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.PolicyAction.PolicyRuleAction, policy.PolicyAction.PolicyRuleAction.Builder, policy.PolicyAction.PolicyRuleActionOrBuilder> actionListBuilder_; - - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public java.util.List getActionListList() { - if (actionListBuilder_ == null) { - return java.util.Collections.unmodifiableList(actionList_); - } else { - return actionListBuilder_.getMessageList(); - } - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public int getActionListCount() { - if (actionListBuilder_ == null) { - return actionList_.size(); - } else { - return actionListBuilder_.getCount(); - } - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public policy.PolicyAction.PolicyRuleAction getActionList(int index) { - if (actionListBuilder_ == null) { - return actionList_.get(index); - } else { - return actionListBuilder_.getMessage(index); - } - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public Builder setActionList( - int index, policy.PolicyAction.PolicyRuleAction value) { - if (actionListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionListIsMutable(); - actionList_.set(index, value); - onChanged(); - } else { - actionListBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public Builder setActionList( - int index, policy.PolicyAction.PolicyRuleAction.Builder builderForValue) { - if (actionListBuilder_ == null) { - ensureActionListIsMutable(); - actionList_.set(index, builderForValue.build()); - onChanged(); - } else { - actionListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public Builder addActionList(policy.PolicyAction.PolicyRuleAction value) { - if (actionListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionListIsMutable(); - actionList_.add(value); - onChanged(); - } else { - actionListBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public Builder addActionList( - int index, policy.PolicyAction.PolicyRuleAction value) { - if (actionListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionListIsMutable(); - actionList_.add(index, value); - onChanged(); - } else { - actionListBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public Builder addActionList( - policy.PolicyAction.PolicyRuleAction.Builder builderForValue) { - if (actionListBuilder_ == null) { - ensureActionListIsMutable(); - actionList_.add(builderForValue.build()); - onChanged(); - } else { - actionListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public Builder addActionList( - int index, policy.PolicyAction.PolicyRuleAction.Builder builderForValue) { - if (actionListBuilder_ == null) { - ensureActionListIsMutable(); - actionList_.add(index, builderForValue.build()); - onChanged(); - } else { - actionListBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public Builder addAllActionList( - java.lang.Iterable values) { - if (actionListBuilder_ == null) { - ensureActionListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, actionList_); - onChanged(); - } else { - actionListBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public Builder clearActionList() { - if (actionListBuilder_ == null) { - actionList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - actionListBuilder_.clear(); - } - return this; - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public Builder removeActionList(int index) { - if (actionListBuilder_ == null) { - ensureActionListIsMutable(); - actionList_.remove(index); - onChanged(); - } else { - actionListBuilder_.remove(index); - } - return this; - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public policy.PolicyAction.PolicyRuleAction.Builder getActionListBuilder( - int index) { - return getActionListFieldBuilder().getBuilder(index); - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public policy.PolicyAction.PolicyRuleActionOrBuilder getActionListOrBuilder( - int index) { - if (actionListBuilder_ == null) { - return actionList_.get(index); } else { - return actionListBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public java.util.List - getActionListOrBuilderList() { - if (actionListBuilder_ != null) { - return actionListBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(actionList_); - } - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public policy.PolicyAction.PolicyRuleAction.Builder addActionListBuilder() { - return getActionListFieldBuilder().addBuilder( - policy.PolicyAction.PolicyRuleAction.getDefaultInstance()); - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public policy.PolicyAction.PolicyRuleAction.Builder addActionListBuilder( - int index) { - return getActionListFieldBuilder().addBuilder( - index, policy.PolicyAction.PolicyRuleAction.getDefaultInstance()); - } - /** - *
-       * One or more actions should be applied
-       * 
- * - * repeated .policy.PolicyRuleAction actionList = 6; - */ - public java.util.List - getActionListBuilderList() { - return getActionListFieldBuilder().getBuilderList(); - } - 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()); - actionList_ = null; - } - return actionListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleBasic) - } - // @@protoc_insertion_point(class_scope:policy.PolicyRuleBasic) - private static final policy.Policy.PolicyRuleBasic DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRuleBasic(); - } + public static policy.Policy.PolicyRuleId getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static policy.Policy.PolicyRuleBasic getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @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); + } + }; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public policy.Policy.PolicyRuleBasic getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.Policy.PolicyRuleId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - } + public interface PolicyRuleStateOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRuleState) + com.google.protobuf.MessageOrBuilder { - public interface PolicyRuleServiceOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleService) - com.google.protobuf.MessageOrBuilder { + /** + * .policy.PolicyRuleStateEnum policyRuleState = 1; + * @return The enum numeric value on the wire for policyRuleState. + */ + int getPolicyRuleStateValue(); - /** - *
-     * Basic policy rule attributes
-     * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - * @return Whether the policyRuleBasic field is set. - */ - boolean hasPolicyRuleBasic(); - /** - *
-     * Basic policy rule attributes
-     * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - * @return The policyRuleBasic. - */ - policy.Policy.PolicyRuleBasic getPolicyRuleBasic(); - /** - *
-     * Basic policy rule attributes
-     * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder(); + /** + * .policy.PolicyRuleStateEnum policyRuleState = 1; + * @return The policyRuleState. + */ + policy.Policy.PolicyRuleStateEnum getPolicyRuleState(); - /** - *
-     * Affected service and (some of) its device(s)
-     * 
- * - * .context.ServiceId serviceId = 2; - * @return Whether the serviceId field is set. - */ - boolean hasServiceId(); - /** - *
-     * Affected service and (some of) its device(s)
-     * 
- * - * .context.ServiceId serviceId = 2; - * @return The serviceId. - */ - context.ContextOuterClass.ServiceId getServiceId(); - /** - *
-     * Affected service and (some of) its device(s)
-     * 
- * - * .context.ServiceId serviceId = 2; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + /** + * string policyRuleStateMessage = 2; + * @return The policyRuleStateMessage. + */ + java.lang.String getPolicyRuleStateMessage(); + + /** + * string policyRuleStateMessage = 2; + * @return The bytes for policyRuleStateMessage. + */ + com.google.protobuf.ByteString getPolicyRuleStateMessageBytes(); + } /** - *
-     * List of devices this service is traversing (not exhaustive)
-     * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - java.util.List - getDeviceListList(); - /** - *
-     * List of devices this service is traversing (not exhaustive)
-     * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - context.ContextOuterClass.DeviceId getDeviceList(int index); - /** - *
-     * List of devices this service is traversing (not exhaustive)
-     * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - int getDeviceListCount(); - /** - *
-     * List of devices this service is traversing (not exhaustive)
-     * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - java.util.List - getDeviceListOrBuilderList(); - /** - *
-     * List of devices this service is traversing (not exhaustive)
-     * 
- * - * repeated .context.DeviceId deviceList = 3; + * Protobuf type {@code policy.PolicyRuleState} */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( - int index); - } - /** - *
-   * Service-oriented policy rule
-   * 
- * - * Protobuf type {@code policy.PolicyRuleService} - */ - public static final class PolicyRuleService extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleService) - PolicyRuleServiceOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRuleService.newBuilder() to construct. - private PolicyRuleService(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRuleService() { - deviceList_ = java.util.Collections.emptyList(); - } + public static final class PolicyRuleState extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRuleState) + PolicyRuleStateOrBuilder { - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRuleService(); - } + private static final long serialVersionUID = 0L; - @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(); - 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; - } + // Use PolicyRuleState.newBuilder() to construct. + private PolicyRuleState(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleService_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleService.class, policy.Policy.PolicyRuleService.Builder.class); - } + private PolicyRuleState() { + policyRuleState_ = 0; + policyRuleStateMessage_ = ""; + } - public static final int POLICYRULEBASIC_FIELD_NUMBER = 1; - private policy.Policy.PolicyRuleBasic policyRuleBasic_; - /** - *
-     * Basic policy rule attributes
-     * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - * @return Whether the policyRuleBasic field is set. - */ - @java.lang.Override - public boolean hasPolicyRuleBasic() { - return policyRuleBasic_ != null; - } - /** - *
-     * Basic policy rule attributes
-     * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - * @return The policyRuleBasic. - */ - @java.lang.Override - public policy.Policy.PolicyRuleBasic getPolicyRuleBasic() { - return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; - } - /** - *
-     * Basic policy rule attributes
-     * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - @java.lang.Override - public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { - return getPolicyRuleBasic(); - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PolicyRuleState(); + } - public static final int SERVICEID_FIELD_NUMBER = 2; - private context.ContextOuterClass.ServiceId serviceId_; - /** - *
-     * Affected service and (some of) its device(s)
-     * 
- * - * .context.ServiceId serviceId = 2; - * @return Whether the serviceId field is set. - */ - @java.lang.Override - public boolean hasServiceId() { - return serviceId_ != null; - } - /** - *
-     * Affected service and (some of) its device(s)
-     * 
- * - * .context.ServiceId serviceId = 2; - * @return The serviceId. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceId() { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - /** - *
-     * Affected service and (some of) its device(s)
-     * 
- * - * .context.ServiceId serviceId = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - public static final int DEVICELIST_FIELD_NUMBER = 3; - private java.util.List deviceList_; - /** - *
-     * List of devices this service is traversing (not exhaustive)
-     * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - @java.lang.Override - public java.util.List getDeviceListList() { - return deviceList_; - } - /** - *
-     * List of devices this service is traversing (not exhaustive)
-     * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - @java.lang.Override - public java.util.List - getDeviceListOrBuilderList() { - return deviceList_; - } - /** - *
-     * List of devices this service is traversing (not exhaustive)
-     * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - @java.lang.Override - public int getDeviceListCount() { - return deviceList_.size(); - } - /** - *
-     * List of devices this service is traversing (not exhaustive)
-     * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceList(int index) { - return deviceList_.get(index); - } - /** - *
-     * List of devices this service is traversing (not exhaustive)
-     * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( - int index) { - return deviceList_.get(index); - } + 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(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleState_descriptor; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleState_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleState.class, policy.Policy.PolicyRuleState.Builder.class); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (policyRuleBasic_ != null) { - output.writeMessage(1, getPolicyRuleBasic()); - } - if (serviceId_ != null) { - output.writeMessage(2, getServiceId()); - } - for (int i = 0; i < deviceList_.size(); i++) { - output.writeMessage(3, deviceList_.get(i)); - } - unknownFields.writeTo(output); - } + public static final int POLICYRULESTATE_FIELD_NUMBER = 1; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (policyRuleBasic_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getPolicyRuleBasic()); - } - if (serviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getServiceId()); - } - for (int i = 0; i < deviceList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, deviceList_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private int policyRuleState_; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.Policy.PolicyRuleService)) { - return super.equals(obj); - } - policy.Policy.PolicyRuleService other = (policy.Policy.PolicyRuleService) obj; - - if (hasPolicyRuleBasic() != other.hasPolicyRuleBasic()) return false; - if (hasPolicyRuleBasic()) { - if (!getPolicyRuleBasic() - .equals(other.getPolicyRuleBasic())) return false; - } - if (hasServiceId() != other.hasServiceId()) return false; - if (hasServiceId()) { - if (!getServiceId() - .equals(other.getServiceId())) return false; - } - if (!getDeviceListList() - .equals(other.getDeviceListList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .policy.PolicyRuleStateEnum policyRuleState = 1; + * @return The enum numeric value on the wire for policyRuleState. + */ + @java.lang.Override + public int getPolicyRuleStateValue() { + return policyRuleState_; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPolicyRuleBasic()) { - hash = (37 * hash) + POLICYRULEBASIC_FIELD_NUMBER; - hash = (53 * hash) + getPolicyRuleBasic().hashCode(); - } - if (hasServiceId()) { - hash = (37 * hash) + SERVICEID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); - } - if (getDeviceListCount() > 0) { - hash = (37 * hash) + DEVICELIST_FIELD_NUMBER; - hash = (53 * hash) + getDeviceListList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .policy.PolicyRuleStateEnum policyRuleState = 1; + * @return The policyRuleState. + */ + @java.lang.Override + public policy.Policy.PolicyRuleStateEnum getPolicyRuleState() { + @SuppressWarnings("deprecation") + policy.Policy.PolicyRuleStateEnum result = policy.Policy.PolicyRuleStateEnum.valueOf(policyRuleState_); + return result == null ? policy.Policy.PolicyRuleStateEnum.UNRECOGNIZED : result; + } - public static policy.Policy.PolicyRuleService parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleService parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleService parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleService parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleService parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleService parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleService parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleService parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleService parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleService parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleService parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleService parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int POLICYRULESTATEMESSAGE_FIELD_NUMBER = 2; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.Policy.PolicyRuleService prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private volatile java.lang.Object policyRuleStateMessage_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Service-oriented policy rule
-     * 
- * - * Protobuf type {@code policy.PolicyRuleService} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleService) - policy.Policy.PolicyRuleServiceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleService_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleService_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleService.class, policy.Policy.PolicyRuleService.Builder.class); - } - - // 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; - policyRuleBasicBuilder_ = null; - } - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - if (deviceListBuilder_ == null) { - deviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - deviceListBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRuleService_descriptor; - } - - @java.lang.Override - public policy.Policy.PolicyRuleService getDefaultInstanceForType() { - return policy.Policy.PolicyRuleService.getDefaultInstance(); - } - - @java.lang.Override - public policy.Policy.PolicyRuleService build() { - policy.Policy.PolicyRuleService result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - if (deviceListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - deviceList_ = java.util.Collections.unmodifiableList(deviceList_); - bitField0_ = (bitField0_ & ~0x00000001); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.Policy.PolicyRuleService) { - return mergeFrom((policy.Policy.PolicyRuleService)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(policy.Policy.PolicyRuleService other) { - if (other == policy.Policy.PolicyRuleService.getDefaultInstance()) return this; - if (other.hasPolicyRuleBasic()) { - mergePolicyRuleBasic(other.getPolicyRuleBasic()); - } - if (other.hasServiceId()) { - mergeServiceId(other.getServiceId()); - } - if (deviceListBuilder_ == null) { - if (!other.deviceList_.isEmpty()) { - if (deviceList_.isEmpty()) { - deviceList_ = other.deviceList_; - bitField0_ = (bitField0_ & ~0x00000001); + /** + * string policyRuleStateMessage = 2; + * @return The policyRuleStateMessage. + */ + @java.lang.Override + public java.lang.String getPolicyRuleStateMessage() { + java.lang.Object ref = policyRuleStateMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - ensureDeviceListIsMutable(); - deviceList_.addAll(other.deviceList_); - } - onChanged(); - } - } else { - if (!other.deviceList_.isEmpty()) { - if (deviceListBuilder_.isEmpty()) { - deviceListBuilder_.dispose(); - deviceListBuilder_ = null; - deviceList_ = other.deviceList_; - bitField0_ = (bitField0_ & ~0x00000001); - deviceListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDeviceListFieldBuilder() : null; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyRuleStateMessage_ = s; + return s; + } + } + + /** + * string policyRuleStateMessage = 2; + * @return The bytes for policyRuleStateMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyRuleStateMessageBytes() { + java.lang.Object ref = policyRuleStateMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyRuleStateMessage_ = b; + return b; } else { - deviceListBuilder_.addAllMessages(other.deviceList_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleService) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private policy.Policy.PolicyRuleBasic policyRuleBasic_; - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleBasic, policy.Policy.PolicyRuleBasic.Builder, policy.Policy.PolicyRuleBasicOrBuilder> policyRuleBasicBuilder_; - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - * @return Whether the policyRuleBasic field is set. - */ - public boolean hasPolicyRuleBasic() { - return policyRuleBasicBuilder_ != null || policyRuleBasic_ != null; - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - * @return The policyRuleBasic. - */ - public policy.Policy.PolicyRuleBasic getPolicyRuleBasic() { - if (policyRuleBasicBuilder_ == null) { - return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; - } else { - return policyRuleBasicBuilder_.getMessage(); - } - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - public Builder setPolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { - if (policyRuleBasicBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policyRuleBasic_ = value; - onChanged(); - } else { - policyRuleBasicBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - public Builder setPolicyRuleBasic( - policy.Policy.PolicyRuleBasic.Builder builderForValue) { - if (policyRuleBasicBuilder_ == null) { - policyRuleBasic_ = builderForValue.build(); - onChanged(); - } else { - policyRuleBasicBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - public Builder mergePolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { - if (policyRuleBasicBuilder_ == null) { - if (policyRuleBasic_ != null) { - policyRuleBasic_ = - policy.Policy.PolicyRuleBasic.newBuilder(policyRuleBasic_).mergeFrom(value).buildPartial(); - } else { - policyRuleBasic_ = value; - } - onChanged(); - } else { - policyRuleBasicBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - public Builder clearPolicyRuleBasic() { - if (policyRuleBasicBuilder_ == null) { - policyRuleBasic_ = null; - onChanged(); - } else { - policyRuleBasic_ = null; - policyRuleBasicBuilder_ = null; - } - - return this; - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - public policy.Policy.PolicyRuleBasic.Builder getPolicyRuleBasicBuilder() { - - onChanged(); - return getPolicyRuleBasicFieldBuilder().getBuilder(); - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { - if (policyRuleBasicBuilder_ != null) { - return policyRuleBasicBuilder_.getMessageOrBuilder(); - } else { - return policyRuleBasic_ == null ? - policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; - } - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleBasic, policy.Policy.PolicyRuleBasic.Builder, policy.Policy.PolicyRuleBasicOrBuilder> - getPolicyRuleBasicFieldBuilder() { - if (policyRuleBasicBuilder_ == null) { - policyRuleBasicBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleBasic, policy.Policy.PolicyRuleBasic.Builder, policy.Policy.PolicyRuleBasicOrBuilder>( - getPolicyRuleBasic(), - getParentForChildren(), - isClean()); - policyRuleBasic_ = null; - } - return policyRuleBasicBuilder_; - } - - private context.ContextOuterClass.ServiceId serviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdBuilder_; - /** - *
-       * Affected service and (some of) its device(s)
-       * 
- * - * .context.ServiceId serviceId = 2; - * @return Whether the serviceId field is set. - */ - public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; - } - /** - *
-       * Affected service and (some of) its device(s)
-       * 
- * - * .context.ServiceId serviceId = 2; - * @return The serviceId. - */ - public context.ContextOuterClass.ServiceId getServiceId() { - if (serviceIdBuilder_ == null) { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } else { - return serviceIdBuilder_.getMessage(); - } - } - /** - *
-       * Affected service and (some of) its device(s)
-       * 
- * - * .context.ServiceId serviceId = 2; - */ - public Builder setServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - onChanged(); - } else { - serviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Affected service and (some of) its device(s)
-       * 
- * - * .context.ServiceId serviceId = 2; - */ - public Builder setServiceId( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdBuilder_ == null) { - serviceId_ = builderForValue.build(); - onChanged(); - } else { - serviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Affected service and (some of) its device(s)
-       * 
- * - * .context.ServiceId serviceId = 2; - */ - public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = - context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); - } else { - serviceId_ = value; - } - onChanged(); - } else { - serviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Affected service and (some of) its device(s)
-       * 
- * - * .context.ServiceId serviceId = 2; - */ - public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - - return this; - } - /** - *
-       * Affected service and (some of) its device(s)
-       * 
- * - * .context.ServiceId serviceId = 2; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { - - onChanged(); - return getServiceIdFieldBuilder().getBuilder(); - } - /** - *
-       * Affected service and (some of) its device(s)
-       * 
- * - * .context.ServiceId serviceId = 2; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - if (serviceIdBuilder_ != null) { - return serviceIdBuilder_.getMessageOrBuilder(); - } else { - return serviceId_ == null ? - context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - } - /** - *
-       * Affected service and (some of) its device(s)
-       * 
- * - * .context.ServiceId serviceId = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> - getServiceIdFieldBuilder() { - if (serviceIdBuilder_ == null) { - serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>( - getServiceId(), - getParentForChildren(), - isClean()); - serviceId_ = null; - } - return serviceIdBuilder_; - } - - private java.util.List deviceList_ = - java.util.Collections.emptyList(); - private void ensureDeviceListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deviceList_ = new java.util.ArrayList(deviceList_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceListBuilder_; - - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public java.util.List getDeviceListList() { - if (deviceListBuilder_ == null) { - return java.util.Collections.unmodifiableList(deviceList_); - } else { - return deviceListBuilder_.getMessageList(); - } - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public int getDeviceListCount() { - if (deviceListBuilder_ == null) { - return deviceList_.size(); - } else { - return deviceListBuilder_.getCount(); - } - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public context.ContextOuterClass.DeviceId getDeviceList(int index) { - if (deviceListBuilder_ == null) { - return deviceList_.get(index); - } else { - return deviceListBuilder_.getMessage(index); - } - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public Builder setDeviceList( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceListIsMutable(); - deviceList_.set(index, value); - onChanged(); - } else { - deviceListBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public Builder setDeviceList( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - deviceList_.set(index, builderForValue.build()); - onChanged(); - } else { - deviceListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public Builder addDeviceList(context.ContextOuterClass.DeviceId value) { - if (deviceListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceListIsMutable(); - deviceList_.add(value); - onChanged(); - } else { - deviceListBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public Builder addDeviceList( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceListIsMutable(); - deviceList_.add(index, value); - onChanged(); - } else { - deviceListBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public Builder addDeviceList( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - deviceList_.add(builderForValue.build()); - onChanged(); - } else { - deviceListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public Builder addDeviceList( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - deviceList_.add(index, builderForValue.build()); - onChanged(); - } else { - deviceListBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public Builder addAllDeviceList( - java.lang.Iterable values) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deviceList_); - onChanged(); - } else { - deviceListBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public Builder clearDeviceList() { - if (deviceListBuilder_ == null) { - deviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - deviceListBuilder_.clear(); - } - return this; - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public Builder removeDeviceList(int index) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - deviceList_.remove(index); - onChanged(); - } else { - deviceListBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceListBuilder( - int index) { - return getDeviceListFieldBuilder().getBuilder(index); - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( - int index) { - if (deviceListBuilder_ == null) { - return deviceList_.get(index); } else { - return deviceListBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public java.util.List - getDeviceListOrBuilderList() { - if (deviceListBuilder_ != null) { - return deviceListBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deviceList_); - } - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder() { - return getDeviceListFieldBuilder().addBuilder( - context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder( - int index) { - return getDeviceListFieldBuilder().addBuilder( - index, context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - *
-       * List of devices this service is traversing (not exhaustive)
-       * 
- * - * repeated .context.DeviceId deviceList = 3; - */ - public java.util.List - getDeviceListBuilderList() { - return getDeviceListFieldBuilder().getBuilderList(); - } - 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()); - deviceList_ = null; - } - return deviceListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleService) - } + return (com.google.protobuf.ByteString) ref; + } + } - // @@protoc_insertion_point(class_scope:policy.PolicyRuleService) - private static final policy.Policy.PolicyRuleService DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRuleService(); - } + private byte memoizedIsInitialized = -1; - public static policy.Policy.PolicyRuleService getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (policyRuleState_ != policy.Policy.PolicyRuleStateEnum.POLICY_UNDEFINED.getNumber()) { + output.writeEnum(1, policyRuleState_); + } + if (!getPolicyRuleStateMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, policyRuleStateMessage_); + } + unknownFields.writeTo(output); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (policyRuleState_ != policy.Policy.PolicyRuleStateEnum.POLICY_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, policyRuleState_); + } + if (!getPolicyRuleStateMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, policyRuleStateMessage_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public policy.Policy.PolicyRuleService getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.Policy.PolicyRuleState)) { + return super.equals(obj); + } + policy.Policy.PolicyRuleState other = (policy.Policy.PolicyRuleState) obj; + if (policyRuleState_ != other.policyRuleState_) + return false; + if (!getPolicyRuleStateMessage().equals(other.getPolicyRuleStateMessage())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + POLICYRULESTATE_FIELD_NUMBER; + hash = (53 * hash) + policyRuleState_; + hash = (37 * hash) + POLICYRULESTATEMESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleStateMessage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - } + public static policy.Policy.PolicyRuleState parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public interface PolicyRuleDeviceOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleDevice) - com.google.protobuf.MessageOrBuilder { + public static policy.Policy.PolicyRuleState parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleState parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleState parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleState parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleState parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleState parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleState parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleState parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleState parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleState parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleState parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(policy.Policy.PolicyRuleState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code policy.PolicyRuleState} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRuleState) + policy.Policy.PolicyRuleStateOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleState_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleState.class, policy.Policy.PolicyRuleState.Builder.class); + } + + // 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(); + policyRuleState_ = 0; + policyRuleStateMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRuleState_descriptor; + } + + @java.lang.Override + public policy.Policy.PolicyRuleState getDefaultInstanceForType() { + return policy.Policy.PolicyRuleState.getDefaultInstance(); + } + + @java.lang.Override + public policy.Policy.PolicyRuleState build() { + policy.Policy.PolicyRuleState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public policy.Policy.PolicyRuleState buildPartial() { + policy.Policy.PolicyRuleState result = new policy.Policy.PolicyRuleState(this); + result.policyRuleState_ = policyRuleState_; + result.policyRuleStateMessage_ = policyRuleStateMessage_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleState) { + return mergeFrom((policy.Policy.PolicyRuleState) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(policy.Policy.PolicyRuleState other) { + if (other == policy.Policy.PolicyRuleState.getDefaultInstance()) + return this; + if (other.policyRuleState_ != 0) { + setPolicyRuleStateValue(other.getPolicyRuleStateValue()); + } + if (!other.getPolicyRuleStateMessage().isEmpty()) { + policyRuleStateMessage_ = other.policyRuleStateMessage_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRuleState) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int policyRuleState_ = 0; + + /** + * .policy.PolicyRuleStateEnum policyRuleState = 1; + * @return The enum numeric value on the wire for policyRuleState. + */ + @java.lang.Override + public int getPolicyRuleStateValue() { + return policyRuleState_; + } + + /** + * .policy.PolicyRuleStateEnum policyRuleState = 1; + * @param value The enum numeric value on the wire for policyRuleState to set. + * @return This builder for chaining. + */ + public Builder setPolicyRuleStateValue(int value) { + policyRuleState_ = value; + onChanged(); + return this; + } + + /** + * .policy.PolicyRuleStateEnum policyRuleState = 1; + * @return The policyRuleState. + */ + @java.lang.Override + public policy.Policy.PolicyRuleStateEnum getPolicyRuleState() { + @SuppressWarnings("deprecation") + policy.Policy.PolicyRuleStateEnum result = policy.Policy.PolicyRuleStateEnum.valueOf(policyRuleState_); + return result == null ? policy.Policy.PolicyRuleStateEnum.UNRECOGNIZED : result; + } + + /** + * .policy.PolicyRuleStateEnum policyRuleState = 1; + * @param value The policyRuleState to set. + * @return This builder for chaining. + */ + public Builder setPolicyRuleState(policy.Policy.PolicyRuleStateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + policyRuleState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .policy.PolicyRuleStateEnum policyRuleState = 1; + * @return This builder for chaining. + */ + public Builder clearPolicyRuleState() { + policyRuleState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object policyRuleStateMessage_ = ""; + + /** + * string policyRuleStateMessage = 2; + * @return The policyRuleStateMessage. + */ + public java.lang.String getPolicyRuleStateMessage() { + java.lang.Object ref = policyRuleStateMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyRuleStateMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string policyRuleStateMessage = 2; + * @return The bytes for policyRuleStateMessage. + */ + public com.google.protobuf.ByteString getPolicyRuleStateMessageBytes() { + java.lang.Object ref = policyRuleStateMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyRuleStateMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string policyRuleStateMessage = 2; + * @param value The policyRuleStateMessage to set. + * @return This builder for chaining. + */ + public Builder setPolicyRuleStateMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policyRuleStateMessage_ = value; + onChanged(); + return this; + } + + /** + * string policyRuleStateMessage = 2; + * @return This builder for chaining. + */ + public Builder clearPolicyRuleStateMessage() { + policyRuleStateMessage_ = getDefaultInstance().getPolicyRuleStateMessage(); + onChanged(); + return this; + } + + /** + * string policyRuleStateMessage = 2; + * @param value The bytes for policyRuleStateMessage to set. + * @return This builder for chaining. + */ + public Builder setPolicyRuleStateMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policyRuleStateMessage_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleState) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleState) + private static final policy.Policy.PolicyRuleState DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleState(); + } + + public static policy.Policy.PolicyRuleState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.Policy.PolicyRuleState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PolicyRuleBasicOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRuleBasic) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.PolicyRuleId policyRuleId = 1; + * @return Whether the policyRuleId field is set. + */ + boolean hasPolicyRuleId(); + + /** + * .policy.PolicyRuleId policyRuleId = 1; + * @return The policyRuleId. + */ + policy.Policy.PolicyRuleId getPolicyRuleId(); + + /** + * .policy.PolicyRuleId policyRuleId = 1; + */ + policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder(); + + /** + *
+         * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+         *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + * @return Whether the policyRuleState field is set. + */ + boolean hasPolicyRuleState(); + + /** + *
+         * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+         *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + * @return The policyRuleState. + */ + policy.Policy.PolicyRuleState getPolicyRuleState(); + + /** + *
+         * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+         *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + */ + policy.Policy.PolicyRuleStateOrBuilder getPolicyRuleStateOrBuilder(); + + /** + * uint32 priority = 3; + * @return The priority. + */ + int getPriority(); + + /** + *
+         * Event-Condition-Action (ECA) model
+         * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + java.util.List getConditionListList(); + + /** + *
+         * Event-Condition-Action (ECA) model
+         * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + policy.PolicyCondition.PolicyRuleCondition getConditionList(int index); + + /** + *
+         * Event-Condition-Action (ECA) model
+         * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + int getConditionListCount(); + + /** + *
+         * Event-Condition-Action (ECA) model
+         * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + java.util.List getConditionListOrBuilderList(); + + /** + *
+         * Event-Condition-Action (ECA) model
+         * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + policy.PolicyCondition.PolicyRuleConditionOrBuilder getConditionListOrBuilder(int index); + + /** + *
+         * Evaluation operator to be used
+         * 
+ * + * .policy.BooleanOperator booleanOperator = 5; + * @return The enum numeric value on the wire for booleanOperator. + */ + int getBooleanOperatorValue(); + + /** + *
+         * Evaluation operator to be used
+         * 
+ * + * .policy.BooleanOperator booleanOperator = 5; + * @return The booleanOperator. + */ + policy.PolicyCondition.BooleanOperator getBooleanOperator(); + + /** + *
+         * One or more actions should be applied
+         * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + java.util.List getActionListList(); + + /** + *
+         * One or more actions should be applied
+         * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + policy.PolicyAction.PolicyRuleAction getActionList(int index); + + /** + *
+         * One or more actions should be applied
+         * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + int getActionListCount(); + + /** + *
+         * One or more actions should be applied
+         * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + java.util.List getActionListOrBuilderList(); + + /** + *
+         * One or more actions should be applied
+         * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + policy.PolicyAction.PolicyRuleActionOrBuilder getActionListOrBuilder(int index); + } /** *
      * Basic policy rule attributes
      * 
* - * .policy.PolicyRuleBasic policyRuleBasic = 1; - * @return Whether the policyRuleBasic field is set. - */ - boolean hasPolicyRuleBasic(); - /** - *
-     * Basic policy rule attributes
-     * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - * @return The policyRuleBasic. - */ - policy.Policy.PolicyRuleBasic getPolicyRuleBasic(); - /** - *
-     * Basic policy rule attributes
-     * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; + * Protobuf type {@code policy.PolicyRuleBasic} */ - policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder(); + public static final class PolicyRuleBasic extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRuleBasic) + PolicyRuleBasicOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use PolicyRuleBasic.newBuilder() to construct. + private PolicyRuleBasic(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PolicyRuleBasic() { + conditionList_ = java.util.Collections.emptyList(); + booleanOperator_ = 0; + actionList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleBasic_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleBasic.class, policy.Policy.PolicyRuleBasic.Builder.class); + } + + public static final int POLICYRULEID_FIELD_NUMBER = 1; + + private policy.Policy.PolicyRuleId policyRuleId_; + + /** + * .policy.PolicyRuleId policyRuleId = 1; + * @return Whether the policyRuleId field is set. + */ + @java.lang.Override + public boolean hasPolicyRuleId() { + return policyRuleId_ != null; + } + + /** + * .policy.PolicyRuleId policyRuleId = 1; + * @return The policyRuleId. + */ + @java.lang.Override + public policy.Policy.PolicyRuleId getPolicyRuleId() { + return policyRuleId_ == null ? policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; + } + + /** + * .policy.PolicyRuleId policyRuleId = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder() { + return getPolicyRuleId(); + } + + public static final int POLICYRULESTATE_FIELD_NUMBER = 2; + + private policy.Policy.PolicyRuleState policyRuleState_; + + /** + *
+         * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+         *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + * @return Whether the policyRuleState field is set. + */ + @java.lang.Override + public boolean hasPolicyRuleState() { + return policyRuleState_ != null; + } + + /** + *
+         * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+         *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + * @return The policyRuleState. + */ + @java.lang.Override + public policy.Policy.PolicyRuleState getPolicyRuleState() { + return policyRuleState_ == null ? policy.Policy.PolicyRuleState.getDefaultInstance() : policyRuleState_; + } + + /** + *
+         * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+         *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + */ + @java.lang.Override + public policy.Policy.PolicyRuleStateOrBuilder getPolicyRuleStateOrBuilder() { + return getPolicyRuleState(); + } + + public static final int PRIORITY_FIELD_NUMBER = 3; + + private int priority_; + + /** + * uint32 priority = 3; + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + public static final int CONDITIONLIST_FIELD_NUMBER = 4; + + private java.util.List conditionList_; + + /** + *
+         * Event-Condition-Action (ECA) model
+         * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + @java.lang.Override + public java.util.List getConditionListList() { + return conditionList_; + } + + /** + *
+         * Event-Condition-Action (ECA) model
+         * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + @java.lang.Override + public java.util.List getConditionListOrBuilderList() { + return conditionList_; + } + + /** + *
+         * Event-Condition-Action (ECA) model
+         * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + @java.lang.Override + public int getConditionListCount() { + return conditionList_.size(); + } + + /** + *
+         * Event-Condition-Action (ECA) model
+         * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + @java.lang.Override + public policy.PolicyCondition.PolicyRuleCondition getConditionList(int index) { + return conditionList_.get(index); + } + + /** + *
+         * Event-Condition-Action (ECA) model
+         * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + @java.lang.Override + public policy.PolicyCondition.PolicyRuleConditionOrBuilder getConditionListOrBuilder(int index) { + return conditionList_.get(index); + } + + public static final int BOOLEANOPERATOR_FIELD_NUMBER = 5; + + private int booleanOperator_; + + /** + *
+         * Evaluation operator to be used
+         * 
+ * + * .policy.BooleanOperator booleanOperator = 5; + * @return The enum numeric value on the wire for booleanOperator. + */ + @java.lang.Override + public int getBooleanOperatorValue() { + return booleanOperator_; + } + + /** + *
+         * Evaluation operator to be used
+         * 
+ * + * .policy.BooleanOperator booleanOperator = 5; + * @return The booleanOperator. + */ + @java.lang.Override + public policy.PolicyCondition.BooleanOperator getBooleanOperator() { + @SuppressWarnings("deprecation") + policy.PolicyCondition.BooleanOperator result = policy.PolicyCondition.BooleanOperator.valueOf(booleanOperator_); + return result == null ? policy.PolicyCondition.BooleanOperator.UNRECOGNIZED : result; + } + + public static final int ACTIONLIST_FIELD_NUMBER = 6; + + private java.util.List actionList_; + + /** + *
+         * One or more actions should be applied
+         * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + @java.lang.Override + public java.util.List getActionListList() { + return actionList_; + } + + /** + *
+         * One or more actions should be applied
+         * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + @java.lang.Override + public java.util.List getActionListOrBuilderList() { + return actionList_; + } + + /** + *
+         * One or more actions should be applied
+         * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + @java.lang.Override + public int getActionListCount() { + return actionList_.size(); + } + + /** + *
+         * One or more actions should be applied
+         * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + @java.lang.Override + public policy.PolicyAction.PolicyRuleAction getActionList(int index) { + return actionList_.get(index); + } + + /** + *
+         * One or more actions should be applied
+         * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + @java.lang.Override + public policy.PolicyAction.PolicyRuleActionOrBuilder getActionListOrBuilder(int index) { + return actionList_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (policyRuleId_ != null) { + output.writeMessage(1, getPolicyRuleId()); + } + if (policyRuleState_ != null) { + output.writeMessage(2, getPolicyRuleState()); + } + if (priority_ != 0) { + output.writeUInt32(3, priority_); + } + for (int i = 0; i < conditionList_.size(); i++) { + output.writeMessage(4, conditionList_.get(i)); + } + if (booleanOperator_ != policy.PolicyCondition.BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_UNDEFINED.getNumber()) { + output.writeEnum(5, booleanOperator_); + } + for (int i = 0; i < actionList_.size(); i++) { + output.writeMessage(6, actionList_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (policyRuleId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicyRuleId()); + } + if (policyRuleState_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPolicyRuleState()); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, priority_); + } + for (int i = 0; i < conditionList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, conditionList_.get(i)); + } + if (booleanOperator_ != policy.PolicyCondition.BooleanOperator.POLICYRULE_CONDITION_BOOLEAN_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, booleanOperator_); + } + for (int i = 0; i < actionList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, actionList_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.Policy.PolicyRuleBasic)) { + return super.equals(obj); + } + policy.Policy.PolicyRuleBasic other = (policy.Policy.PolicyRuleBasic) obj; + if (hasPolicyRuleId() != other.hasPolicyRuleId()) + return false; + if (hasPolicyRuleId()) { + if (!getPolicyRuleId().equals(other.getPolicyRuleId())) + return false; + } + if (hasPolicyRuleState() != other.hasPolicyRuleState()) + return false; + if (hasPolicyRuleState()) { + if (!getPolicyRuleState().equals(other.getPolicyRuleState())) + return false; + } + if (getPriority() != other.getPriority()) + return false; + if (!getConditionListList().equals(other.getConditionListList())) + return false; + if (booleanOperator_ != other.booleanOperator_) + return false; + if (!getActionListList().equals(other.getActionListList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPolicyRuleId()) { + hash = (37 * hash) + POLICYRULEID_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleId().hashCode(); + } + if (hasPolicyRuleState()) { + hash = (37 * hash) + POLICYRULESTATE_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleState().hashCode(); + } + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + if (getConditionListCount() > 0) { + hash = (37 * hash) + CONDITIONLIST_FIELD_NUMBER; + hash = (53 * hash) + getConditionListList().hashCode(); + } + hash = (37 * hash) + BOOLEANOPERATOR_FIELD_NUMBER; + hash = (53 * hash) + booleanOperator_; + if (getActionListCount() > 0) { + hash = (37 * hash) + ACTIONLIST_FIELD_NUMBER; + hash = (53 * hash) + getActionListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static policy.Policy.PolicyRuleBasic parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleBasic parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleBasic parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleBasic parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleBasic parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleBasic parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleBasic parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleBasic parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleBasic parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleBasic parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleBasic parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleBasic parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(policy.Policy.PolicyRuleBasic prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * Protobuf type {@code policy.PolicyRuleBasic} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRuleBasic) + policy.Policy.PolicyRuleBasicOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleBasic_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleBasic_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleBasic.class, policy.Policy.PolicyRuleBasic.Builder.class); + } + + // 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; + policyRuleIdBuilder_ = null; + } + if (policyRuleStateBuilder_ == null) { + policyRuleState_ = null; + } else { + policyRuleState_ = null; + policyRuleStateBuilder_ = null; + } + priority_ = 0; + if (conditionListBuilder_ == null) { + conditionList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + conditionListBuilder_.clear(); + } + booleanOperator_ = 0; + if (actionListBuilder_ == null) { + actionList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + actionListBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRuleBasic_descriptor; + } + + @java.lang.Override + public policy.Policy.PolicyRuleBasic getDefaultInstanceForType() { + return policy.Policy.PolicyRuleBasic.getDefaultInstance(); + } + + @java.lang.Override + public policy.Policy.PolicyRuleBasic build() { + policy.Policy.PolicyRuleBasic result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.priority_ = priority_; + if (conditionListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conditionList_ = java.util.Collections.unmodifiableList(conditionList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conditionList_ = conditionList_; + } else { + result.conditionList_ = conditionListBuilder_.build(); + } + result.booleanOperator_ = booleanOperator_; + if (actionListBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + actionList_ = java.util.Collections.unmodifiableList(actionList_); + bitField0_ = (bitField0_ & ~0x00000002); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleBasic) { + return mergeFrom((policy.Policy.PolicyRuleBasic) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(policy.Policy.PolicyRuleBasic other) { + if (other == policy.Policy.PolicyRuleBasic.getDefaultInstance()) + return this; + if (other.hasPolicyRuleId()) { + mergePolicyRuleId(other.getPolicyRuleId()); + } + if (other.hasPolicyRuleState()) { + mergePolicyRuleState(other.getPolicyRuleState()); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + if (conditionListBuilder_ == null) { + if (!other.conditionList_.isEmpty()) { + if (conditionList_.isEmpty()) { + conditionList_ = other.conditionList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConditionListIsMutable(); + conditionList_.addAll(other.conditionList_); + } + onChanged(); + } + } else { + if (!other.conditionList_.isEmpty()) { + if (conditionListBuilder_.isEmpty()) { + conditionListBuilder_.dispose(); + conditionListBuilder_ = null; + conditionList_ = other.conditionList_; + bitField0_ = (bitField0_ & ~0x00000001); + conditionListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConditionListFieldBuilder() : null; + } else { + conditionListBuilder_.addAllMessages(other.conditionList_); + } + } + } + if (other.booleanOperator_ != 0) { + setBooleanOperatorValue(other.getBooleanOperatorValue()); + } + if (actionListBuilder_ == null) { + if (!other.actionList_.isEmpty()) { + if (actionList_.isEmpty()) { + actionList_ = other.actionList_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureActionListIsMutable(); + actionList_.addAll(other.actionList_); + } + onChanged(); + } + } else { + if (!other.actionList_.isEmpty()) { + if (actionListBuilder_.isEmpty()) { + actionListBuilder_.dispose(); + actionListBuilder_ = null; + actionList_ = other.actionList_; + bitField0_ = (bitField0_ & ~0x00000002); + actionListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getActionListFieldBuilder() : null; + } else { + actionListBuilder_.addAllMessages(other.actionList_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRuleBasic) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private policy.Policy.PolicyRuleId policyRuleId_; + + private com.google.protobuf.SingleFieldBuilderV3 policyRuleIdBuilder_; + + /** + * .policy.PolicyRuleId policyRuleId = 1; + * @return Whether the policyRuleId field is set. + */ + public boolean hasPolicyRuleId() { + return policyRuleIdBuilder_ != null || policyRuleId_ != null; + } + + /** + * .policy.PolicyRuleId policyRuleId = 1; + * @return The policyRuleId. + */ + public policy.Policy.PolicyRuleId getPolicyRuleId() { + if (policyRuleIdBuilder_ == null) { + return policyRuleId_ == null ? policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; + } else { + return policyRuleIdBuilder_.getMessage(); + } + } + + /** + * .policy.PolicyRuleId policyRuleId = 1; + */ + public Builder setPolicyRuleId(policy.Policy.PolicyRuleId value) { + if (policyRuleIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyRuleId_ = value; + onChanged(); + } else { + policyRuleIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .policy.PolicyRuleId policyRuleId = 1; + */ + public Builder setPolicyRuleId(policy.Policy.PolicyRuleId.Builder builderForValue) { + if (policyRuleIdBuilder_ == null) { + policyRuleId_ = builderForValue.build(); + onChanged(); + } else { + policyRuleIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .policy.PolicyRuleId policyRuleId = 1; + */ + public Builder mergePolicyRuleId(policy.Policy.PolicyRuleId value) { + if (policyRuleIdBuilder_ == null) { + if (policyRuleId_ != null) { + policyRuleId_ = policy.Policy.PolicyRuleId.newBuilder(policyRuleId_).mergeFrom(value).buildPartial(); + } else { + policyRuleId_ = value; + } + onChanged(); + } else { + policyRuleIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .policy.PolicyRuleId policyRuleId = 1; + */ + public Builder clearPolicyRuleId() { + if (policyRuleIdBuilder_ == null) { + policyRuleId_ = null; + onChanged(); + } else { + policyRuleId_ = null; + policyRuleIdBuilder_ = null; + } + return this; + } + + /** + * .policy.PolicyRuleId policyRuleId = 1; + */ + public policy.Policy.PolicyRuleId.Builder getPolicyRuleIdBuilder() { + onChanged(); + return getPolicyRuleIdFieldBuilder().getBuilder(); + } + + /** + * .policy.PolicyRuleId policyRuleId = 1; + */ + public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder() { + if (policyRuleIdBuilder_ != null) { + return policyRuleIdBuilder_.getMessageOrBuilder(); + } else { + return policyRuleId_ == null ? policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; + } + } + + /** + * .policy.PolicyRuleId policyRuleId = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getPolicyRuleIdFieldBuilder() { + if (policyRuleIdBuilder_ == null) { + policyRuleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getPolicyRuleId(), getParentForChildren(), isClean()); + policyRuleId_ = null; + } + return policyRuleIdBuilder_; + } + + private policy.Policy.PolicyRuleState policyRuleState_; + + private com.google.protobuf.SingleFieldBuilderV3 policyRuleStateBuilder_; + + /** + *
+             * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+             *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + * @return Whether the policyRuleState field is set. + */ + public boolean hasPolicyRuleState() { + return policyRuleStateBuilder_ != null || policyRuleState_ != null; + } + + /** + *
+             * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+             *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + * @return The policyRuleState. + */ + public policy.Policy.PolicyRuleState getPolicyRuleState() { + if (policyRuleStateBuilder_ == null) { + return policyRuleState_ == null ? policy.Policy.PolicyRuleState.getDefaultInstance() : policyRuleState_; + } else { + return policyRuleStateBuilder_.getMessage(); + } + } + + /** + *
+             * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+             *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + */ + public Builder setPolicyRuleState(policy.Policy.PolicyRuleState value) { + if (policyRuleStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyRuleState_ = value; + onChanged(); + } else { + policyRuleStateBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+             *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + */ + public Builder setPolicyRuleState(policy.Policy.PolicyRuleState.Builder builderForValue) { + if (policyRuleStateBuilder_ == null) { + policyRuleState_ = builderForValue.build(); + onChanged(); + } else { + policyRuleStateBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+             *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + */ + public Builder mergePolicyRuleState(policy.Policy.PolicyRuleState value) { + if (policyRuleStateBuilder_ == null) { + if (policyRuleState_ != null) { + policyRuleState_ = policy.Policy.PolicyRuleState.newBuilder(policyRuleState_).mergeFrom(value).buildPartial(); + } else { + policyRuleState_ = value; + } + onChanged(); + } else { + policyRuleStateBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+             *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + */ + public Builder clearPolicyRuleState() { + if (policyRuleStateBuilder_ == null) { + policyRuleState_ = null; + onChanged(); + } else { + policyRuleState_ = null; + policyRuleStateBuilder_ = null; + } + return this; + } + + /** + *
+             * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+             *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + */ + public policy.Policy.PolicyRuleState.Builder getPolicyRuleStateBuilder() { + onChanged(); + return getPolicyRuleStateFieldBuilder().getBuilder(); + } + + /** + *
+             * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+             *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + */ + public policy.Policy.PolicyRuleStateOrBuilder getPolicyRuleStateOrBuilder() { + if (policyRuleStateBuilder_ != null) { + return policyRuleStateBuilder_.getMessageOrBuilder(); + } else { + return policyRuleState_ == null ? policy.Policy.PolicyRuleState.getDefaultInstance() : policyRuleState_; + } + } + + /** + *
+             * policy.proto:58:12: Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.
+             *  
+ * + * .policy.PolicyRuleState policyRuleState = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getPolicyRuleStateFieldBuilder() { + if (policyRuleStateBuilder_ == null) { + policyRuleStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getPolicyRuleState(), getParentForChildren(), isClean()); + policyRuleState_ = null; + } + return policyRuleStateBuilder_; + } + + private int priority_; + + /** + * uint32 priority = 3; + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + /** + * uint32 priority = 3; + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + priority_ = value; + onChanged(); + return this; + } + + /** + * uint32 priority = 3; + * @return This builder for chaining. + */ + public Builder clearPriority() { + priority_ = 0; + onChanged(); + return this; + } + + private java.util.List conditionList_ = java.util.Collections.emptyList(); + + private void ensureConditionListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conditionList_ = new java.util.ArrayList(conditionList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 conditionListBuilder_; + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public java.util.List getConditionListList() { + if (conditionListBuilder_ == null) { + return java.util.Collections.unmodifiableList(conditionList_); + } else { + return conditionListBuilder_.getMessageList(); + } + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public int getConditionListCount() { + if (conditionListBuilder_ == null) { + return conditionList_.size(); + } else { + return conditionListBuilder_.getCount(); + } + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public policy.PolicyCondition.PolicyRuleCondition getConditionList(int index) { + if (conditionListBuilder_ == null) { + return conditionList_.get(index); + } else { + return conditionListBuilder_.getMessage(index); + } + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public Builder setConditionList(int index, policy.PolicyCondition.PolicyRuleCondition value) { + if (conditionListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionListIsMutable(); + conditionList_.set(index, value); + onChanged(); + } else { + conditionListBuilder_.setMessage(index, value); + } + return this; + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public Builder setConditionList(int index, policy.PolicyCondition.PolicyRuleCondition.Builder builderForValue) { + if (conditionListBuilder_ == null) { + ensureConditionListIsMutable(); + conditionList_.set(index, builderForValue.build()); + onChanged(); + } else { + conditionListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public Builder addConditionList(policy.PolicyCondition.PolicyRuleCondition value) { + if (conditionListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionListIsMutable(); + conditionList_.add(value); + onChanged(); + } else { + conditionListBuilder_.addMessage(value); + } + return this; + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public Builder addConditionList(int index, policy.PolicyCondition.PolicyRuleCondition value) { + if (conditionListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionListIsMutable(); + conditionList_.add(index, value); + onChanged(); + } else { + conditionListBuilder_.addMessage(index, value); + } + return this; + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public Builder addConditionList(policy.PolicyCondition.PolicyRuleCondition.Builder builderForValue) { + if (conditionListBuilder_ == null) { + ensureConditionListIsMutable(); + conditionList_.add(builderForValue.build()); + onChanged(); + } else { + conditionListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public Builder addConditionList(int index, policy.PolicyCondition.PolicyRuleCondition.Builder builderForValue) { + if (conditionListBuilder_ == null) { + ensureConditionListIsMutable(); + conditionList_.add(index, builderForValue.build()); + onChanged(); + } else { + conditionListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public Builder addAllConditionList(java.lang.Iterable values) { + if (conditionListBuilder_ == null) { + ensureConditionListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, conditionList_); + onChanged(); + } else { + conditionListBuilder_.addAllMessages(values); + } + return this; + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public Builder clearConditionList() { + if (conditionListBuilder_ == null) { + conditionList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conditionListBuilder_.clear(); + } + return this; + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public Builder removeConditionList(int index) { + if (conditionListBuilder_ == null) { + ensureConditionListIsMutable(); + conditionList_.remove(index); + onChanged(); + } else { + conditionListBuilder_.remove(index); + } + return this; + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public policy.PolicyCondition.PolicyRuleCondition.Builder getConditionListBuilder(int index) { + return getConditionListFieldBuilder().getBuilder(index); + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public policy.PolicyCondition.PolicyRuleConditionOrBuilder getConditionListOrBuilder(int index) { + if (conditionListBuilder_ == null) { + return conditionList_.get(index); + } else { + return conditionListBuilder_.getMessageOrBuilder(index); + } + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public java.util.List getConditionListOrBuilderList() { + if (conditionListBuilder_ != null) { + return conditionListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conditionList_); + } + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public policy.PolicyCondition.PolicyRuleCondition.Builder addConditionListBuilder() { + return getConditionListFieldBuilder().addBuilder(policy.PolicyCondition.PolicyRuleCondition.getDefaultInstance()); + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public policy.PolicyCondition.PolicyRuleCondition.Builder addConditionListBuilder(int index) { + return getConditionListFieldBuilder().addBuilder(index, policy.PolicyCondition.PolicyRuleCondition.getDefaultInstance()); + } + + /** + *
+             * Event-Condition-Action (ECA) model
+             * 
+ * + * repeated .policy.PolicyRuleCondition conditionList = 4; + */ + public java.util.List getConditionListBuilderList() { + return getConditionListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getConditionListFieldBuilder() { + if (conditionListBuilder_ == null) { + conditionListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(conditionList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + conditionList_ = null; + } + return conditionListBuilder_; + } + + private int booleanOperator_ = 0; + + /** + *
+             * Evaluation operator to be used
+             * 
+ * + * .policy.BooleanOperator booleanOperator = 5; + * @return The enum numeric value on the wire for booleanOperator. + */ + @java.lang.Override + public int getBooleanOperatorValue() { + return booleanOperator_; + } + + /** + *
+             * Evaluation operator to be used
+             * 
+ * + * .policy.BooleanOperator booleanOperator = 5; + * @param value The enum numeric value on the wire for booleanOperator to set. + * @return This builder for chaining. + */ + public Builder setBooleanOperatorValue(int value) { + booleanOperator_ = value; + onChanged(); + return this; + } + + /** + *
+             * Evaluation operator to be used
+             * 
+ * + * .policy.BooleanOperator booleanOperator = 5; + * @return The booleanOperator. + */ + @java.lang.Override + public policy.PolicyCondition.BooleanOperator getBooleanOperator() { + @SuppressWarnings("deprecation") + policy.PolicyCondition.BooleanOperator result = policy.PolicyCondition.BooleanOperator.valueOf(booleanOperator_); + return result == null ? policy.PolicyCondition.BooleanOperator.UNRECOGNIZED : result; + } + + /** + *
+             * Evaluation operator to be used
+             * 
+ * + * .policy.BooleanOperator booleanOperator = 5; + * @param value The booleanOperator to set. + * @return This builder for chaining. + */ + public Builder setBooleanOperator(policy.PolicyCondition.BooleanOperator value) { + if (value == null) { + throw new NullPointerException(); + } + booleanOperator_ = value.getNumber(); + onChanged(); + return this; + } + + /** + *
+             * Evaluation operator to be used
+             * 
+ * + * .policy.BooleanOperator booleanOperator = 5; + * @return This builder for chaining. + */ + public Builder clearBooleanOperator() { + booleanOperator_ = 0; + onChanged(); + return this; + } + + private java.util.List actionList_ = java.util.Collections.emptyList(); + + private void ensureActionListIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + actionList_ = new java.util.ArrayList(actionList_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 actionListBuilder_; + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public java.util.List getActionListList() { + if (actionListBuilder_ == null) { + return java.util.Collections.unmodifiableList(actionList_); + } else { + return actionListBuilder_.getMessageList(); + } + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public int getActionListCount() { + if (actionListBuilder_ == null) { + return actionList_.size(); + } else { + return actionListBuilder_.getCount(); + } + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public policy.PolicyAction.PolicyRuleAction getActionList(int index) { + if (actionListBuilder_ == null) { + return actionList_.get(index); + } else { + return actionListBuilder_.getMessage(index); + } + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public Builder setActionList(int index, policy.PolicyAction.PolicyRuleAction value) { + if (actionListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionListIsMutable(); + actionList_.set(index, value); + onChanged(); + } else { + actionListBuilder_.setMessage(index, value); + } + return this; + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public Builder setActionList(int index, policy.PolicyAction.PolicyRuleAction.Builder builderForValue) { + if (actionListBuilder_ == null) { + ensureActionListIsMutable(); + actionList_.set(index, builderForValue.build()); + onChanged(); + } else { + actionListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public Builder addActionList(policy.PolicyAction.PolicyRuleAction value) { + if (actionListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionListIsMutable(); + actionList_.add(value); + onChanged(); + } else { + actionListBuilder_.addMessage(value); + } + return this; + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public Builder addActionList(int index, policy.PolicyAction.PolicyRuleAction value) { + if (actionListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionListIsMutable(); + actionList_.add(index, value); + onChanged(); + } else { + actionListBuilder_.addMessage(index, value); + } + return this; + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public Builder addActionList(policy.PolicyAction.PolicyRuleAction.Builder builderForValue) { + if (actionListBuilder_ == null) { + ensureActionListIsMutable(); + actionList_.add(builderForValue.build()); + onChanged(); + } else { + actionListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public Builder addActionList(int index, policy.PolicyAction.PolicyRuleAction.Builder builderForValue) { + if (actionListBuilder_ == null) { + ensureActionListIsMutable(); + actionList_.add(index, builderForValue.build()); + onChanged(); + } else { + actionListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public Builder addAllActionList(java.lang.Iterable values) { + if (actionListBuilder_ == null) { + ensureActionListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, actionList_); + onChanged(); + } else { + actionListBuilder_.addAllMessages(values); + } + return this; + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public Builder clearActionList() { + if (actionListBuilder_ == null) { + actionList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + actionListBuilder_.clear(); + } + return this; + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public Builder removeActionList(int index) { + if (actionListBuilder_ == null) { + ensureActionListIsMutable(); + actionList_.remove(index); + onChanged(); + } else { + actionListBuilder_.remove(index); + } + return this; + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public policy.PolicyAction.PolicyRuleAction.Builder getActionListBuilder(int index) { + return getActionListFieldBuilder().getBuilder(index); + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public policy.PolicyAction.PolicyRuleActionOrBuilder getActionListOrBuilder(int index) { + if (actionListBuilder_ == null) { + return actionList_.get(index); + } else { + return actionListBuilder_.getMessageOrBuilder(index); + } + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public java.util.List getActionListOrBuilderList() { + if (actionListBuilder_ != null) { + return actionListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actionList_); + } + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public policy.PolicyAction.PolicyRuleAction.Builder addActionListBuilder() { + return getActionListFieldBuilder().addBuilder(policy.PolicyAction.PolicyRuleAction.getDefaultInstance()); + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public policy.PolicyAction.PolicyRuleAction.Builder addActionListBuilder(int index) { + return getActionListFieldBuilder().addBuilder(index, policy.PolicyAction.PolicyRuleAction.getDefaultInstance()); + } + + /** + *
+             * One or more actions should be applied
+             * 
+ * + * repeated .policy.PolicyRuleAction actionList = 6; + */ + public java.util.List getActionListBuilderList() { + return getActionListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getActionListFieldBuilder() { + if (actionListBuilder_ == null) { + actionListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(actionList_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + actionList_ = null; + } + return actionListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleBasic) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleBasic) + private static final policy.Policy.PolicyRuleBasic DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleBasic(); + } + + public static policy.Policy.PolicyRuleBasic getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.Policy.PolicyRuleBasic getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PolicyRuleServiceOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRuleService) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + * @return Whether the policyRuleBasic field is set. + */ + boolean hasPolicyRuleBasic(); + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + * @return The policyRuleBasic. + */ + policy.Policy.PolicyRuleBasic getPolicyRuleBasic(); + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder(); + + /** + *
+         * Affected service and (some of) its device(s)
+         * 
+ * + * .context.ServiceId serviceId = 2; + * @return Whether the serviceId field is set. + */ + boolean hasServiceId(); + + /** + *
+         * Affected service and (some of) its device(s)
+         * 
+ * + * .context.ServiceId serviceId = 2; + * @return The serviceId. + */ + context.ContextOuterClass.ServiceId getServiceId(); + + /** + *
+         * Affected service and (some of) its device(s)
+         * 
+ * + * .context.ServiceId serviceId = 2; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + + /** + *
+         * List of devices this service is traversing (not exhaustive)
+         * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + java.util.List getDeviceListList(); + + /** + *
+         * List of devices this service is traversing (not exhaustive)
+         * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + context.ContextOuterClass.DeviceId getDeviceList(int index); + + /** + *
+         * List of devices this service is traversing (not exhaustive)
+         * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + int getDeviceListCount(); + + /** + *
+         * List of devices this service is traversing (not exhaustive)
+         * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + java.util.List getDeviceListOrBuilderList(); + + /** + *
+         * List of devices this service is traversing (not exhaustive)
+         * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder(int index); + } + + /** + *
+     * Service-oriented policy rule
+     * 
+ * + * Protobuf type {@code policy.PolicyRuleService} + */ + public static final class PolicyRuleService extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRuleService) + PolicyRuleServiceOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use PolicyRuleService.newBuilder() to construct. + private PolicyRuleService(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PolicyRuleService() { + deviceList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleService_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleService.class, policy.Policy.PolicyRuleService.Builder.class); + } + + public static final int POLICYRULEBASIC_FIELD_NUMBER = 1; + + private policy.Policy.PolicyRuleBasic policyRuleBasic_; + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + * @return Whether the policyRuleBasic field is set. + */ + @java.lang.Override + public boolean hasPolicyRuleBasic() { + return policyRuleBasic_ != null; + } + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + * @return The policyRuleBasic. + */ + @java.lang.Override + public policy.Policy.PolicyRuleBasic getPolicyRuleBasic() { + return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; + } + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { + return getPolicyRuleBasic(); + } + + public static final int SERVICEID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.ServiceId serviceId_; + + /** + *
+         * Affected service and (some of) its device(s)
+         * 
+ * + * .context.ServiceId serviceId = 2; + * @return Whether the serviceId field is set. + */ + @java.lang.Override + public boolean hasServiceId() { + return serviceId_ != null; + } + + /** + *
+         * Affected service and (some of) its device(s)
+         * 
+ * + * .context.ServiceId serviceId = 2; + * @return The serviceId. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceId() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + + /** + *
+         * Affected service and (some of) its device(s)
+         * 
+ * + * .context.ServiceId serviceId = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + return getServiceId(); + } + + public static final int DEVICELIST_FIELD_NUMBER = 3; + + private java.util.List deviceList_; + + /** + *
+         * List of devices this service is traversing (not exhaustive)
+         * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + @java.lang.Override + public java.util.List getDeviceListList() { + return deviceList_; + } + + /** + *
+         * List of devices this service is traversing (not exhaustive)
+         * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + @java.lang.Override + public java.util.List getDeviceListOrBuilderList() { + return deviceList_; + } + + /** + *
+         * List of devices this service is traversing (not exhaustive)
+         * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + @java.lang.Override + public int getDeviceListCount() { + return deviceList_.size(); + } + + /** + *
+         * List of devices this service is traversing (not exhaustive)
+         * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceList(int index) { + return deviceList_.get(index); + } + + /** + *
+         * List of devices this service is traversing (not exhaustive)
+         * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder(int index) { + return deviceList_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (policyRuleBasic_ != null) { + output.writeMessage(1, getPolicyRuleBasic()); + } + if (serviceId_ != null) { + output.writeMessage(2, getServiceId()); + } + for (int i = 0; i < deviceList_.size(); i++) { + output.writeMessage(3, deviceList_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (policyRuleBasic_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicyRuleBasic()); + } + if (serviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceId()); + } + for (int i = 0; i < deviceList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, deviceList_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.Policy.PolicyRuleService)) { + return super.equals(obj); + } + policy.Policy.PolicyRuleService other = (policy.Policy.PolicyRuleService) obj; + if (hasPolicyRuleBasic() != other.hasPolicyRuleBasic()) + return false; + if (hasPolicyRuleBasic()) { + if (!getPolicyRuleBasic().equals(other.getPolicyRuleBasic())) + return false; + } + if (hasServiceId() != other.hasServiceId()) + return false; + if (hasServiceId()) { + if (!getServiceId().equals(other.getServiceId())) + return false; + } + if (!getDeviceListList().equals(other.getDeviceListList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPolicyRuleBasic()) { + hash = (37 * hash) + POLICYRULEBASIC_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleBasic().hashCode(); + } + if (hasServiceId()) { + hash = (37 * hash) + SERVICEID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + } + if (getDeviceListCount() > 0) { + hash = (37 * hash) + DEVICELIST_FIELD_NUMBER; + hash = (53 * hash) + getDeviceListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static policy.Policy.PolicyRuleService parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleService parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleService parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleService parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleService parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleService parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleService parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleService parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleService parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleService parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleService parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleService parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(policy.Policy.PolicyRuleService prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * Service-oriented policy rule
+         * 
+ * + * Protobuf type {@code policy.PolicyRuleService} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRuleService) + policy.Policy.PolicyRuleServiceOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleService_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleService.class, policy.Policy.PolicyRuleService.Builder.class); + } + + // 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; + policyRuleBasicBuilder_ = null; + } + if (serviceIdBuilder_ == null) { + serviceId_ = null; + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + if (deviceListBuilder_ == null) { + deviceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deviceListBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRuleService_descriptor; + } + + @java.lang.Override + public policy.Policy.PolicyRuleService getDefaultInstanceForType() { + return policy.Policy.PolicyRuleService.getDefaultInstance(); + } + + @java.lang.Override + public policy.Policy.PolicyRuleService build() { + policy.Policy.PolicyRuleService result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + if (deviceListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deviceList_ = java.util.Collections.unmodifiableList(deviceList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleService) { + return mergeFrom((policy.Policy.PolicyRuleService) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(policy.Policy.PolicyRuleService other) { + if (other == policy.Policy.PolicyRuleService.getDefaultInstance()) + return this; + if (other.hasPolicyRuleBasic()) { + mergePolicyRuleBasic(other.getPolicyRuleBasic()); + } + if (other.hasServiceId()) { + mergeServiceId(other.getServiceId()); + } + if (deviceListBuilder_ == null) { + if (!other.deviceList_.isEmpty()) { + if (deviceList_.isEmpty()) { + deviceList_ = other.deviceList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeviceListIsMutable(); + deviceList_.addAll(other.deviceList_); + } + onChanged(); + } + } else { + if (!other.deviceList_.isEmpty()) { + if (deviceListBuilder_.isEmpty()) { + deviceListBuilder_.dispose(); + deviceListBuilder_ = null; + deviceList_ = other.deviceList_; + bitField0_ = (bitField0_ & ~0x00000001); + deviceListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceListFieldBuilder() : null; + } else { + deviceListBuilder_.addAllMessages(other.deviceList_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRuleService) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private policy.Policy.PolicyRuleBasic policyRuleBasic_; + + private com.google.protobuf.SingleFieldBuilderV3 policyRuleBasicBuilder_; + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + * @return Whether the policyRuleBasic field is set. + */ + public boolean hasPolicyRuleBasic() { + return policyRuleBasicBuilder_ != null || policyRuleBasic_ != null; + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + * @return The policyRuleBasic. + */ + public policy.Policy.PolicyRuleBasic getPolicyRuleBasic() { + if (policyRuleBasicBuilder_ == null) { + return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; + } else { + return policyRuleBasicBuilder_.getMessage(); + } + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + public Builder setPolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { + if (policyRuleBasicBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyRuleBasic_ = value; + onChanged(); + } else { + policyRuleBasicBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + public Builder setPolicyRuleBasic(policy.Policy.PolicyRuleBasic.Builder builderForValue) { + if (policyRuleBasicBuilder_ == null) { + policyRuleBasic_ = builderForValue.build(); + onChanged(); + } else { + policyRuleBasicBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + public Builder mergePolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { + if (policyRuleBasicBuilder_ == null) { + if (policyRuleBasic_ != null) { + policyRuleBasic_ = policy.Policy.PolicyRuleBasic.newBuilder(policyRuleBasic_).mergeFrom(value).buildPartial(); + } else { + policyRuleBasic_ = value; + } + onChanged(); + } else { + policyRuleBasicBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + public Builder clearPolicyRuleBasic() { + if (policyRuleBasicBuilder_ == null) { + policyRuleBasic_ = null; + onChanged(); + } else { + policyRuleBasic_ = null; + policyRuleBasicBuilder_ = null; + } + return this; + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + public policy.Policy.PolicyRuleBasic.Builder getPolicyRuleBasicBuilder() { + onChanged(); + return getPolicyRuleBasicFieldBuilder().getBuilder(); + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { + if (policyRuleBasicBuilder_ != null) { + return policyRuleBasicBuilder_.getMessageOrBuilder(); + } else { + return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; + } + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getPolicyRuleBasicFieldBuilder() { + if (policyRuleBasicBuilder_ == null) { + policyRuleBasicBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getPolicyRuleBasic(), getParentForChildren(), isClean()); + policyRuleBasic_ = null; + } + return policyRuleBasicBuilder_; + } + + private context.ContextOuterClass.ServiceId serviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceIdBuilder_; + + /** + *
+             * Affected service and (some of) its device(s)
+             * 
+ * + * .context.ServiceId serviceId = 2; + * @return Whether the serviceId field is set. + */ + public boolean hasServiceId() { + return serviceIdBuilder_ != null || serviceId_ != null; + } + + /** + *
+             * Affected service and (some of) its device(s)
+             * 
+ * + * .context.ServiceId serviceId = 2; + * @return The serviceId. + */ + public context.ContextOuterClass.ServiceId getServiceId() { + if (serviceIdBuilder_ == null) { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } else { + return serviceIdBuilder_.getMessage(); + } + } + + /** + *
+             * Affected service and (some of) its device(s)
+             * 
+ * + * .context.ServiceId serviceId = 2; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceId_ = value; + onChanged(); + } else { + serviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * Affected service and (some of) its device(s)
+             * 
+ * + * .context.ServiceId serviceId = 2; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdBuilder_ == null) { + serviceId_ = builderForValue.build(); + onChanged(); + } else { + serviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * Affected service and (some of) its device(s)
+             * 
+ * + * .context.ServiceId serviceId = 2; + */ + public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (serviceId_ != null) { + serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + } else { + serviceId_ = value; + } + onChanged(); + } else { + serviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * Affected service and (some of) its device(s)
+             * 
+ * + * .context.ServiceId serviceId = 2; + */ + public Builder clearServiceId() { + if (serviceIdBuilder_ == null) { + serviceId_ = null; + onChanged(); + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + return this; + } + + /** + *
+             * Affected service and (some of) its device(s)
+             * 
+ * + * .context.ServiceId serviceId = 2; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + onChanged(); + return getServiceIdFieldBuilder().getBuilder(); + } + + /** + *
+             * Affected service and (some of) its device(s)
+             * 
+ * + * .context.ServiceId serviceId = 2; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + if (serviceIdBuilder_ != null) { + return serviceIdBuilder_.getMessageOrBuilder(); + } else { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + } + + /** + *
+             * Affected service and (some of) its device(s)
+             * 
+ * + * .context.ServiceId serviceId = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdFieldBuilder() { + if (serviceIdBuilder_ == null) { + serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceId(), getParentForChildren(), isClean()); + serviceId_ = null; + } + return serviceIdBuilder_; + } + + private java.util.List deviceList_ = java.util.Collections.emptyList(); + + private void ensureDeviceListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceList_ = new java.util.ArrayList(deviceList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 deviceListBuilder_; + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public java.util.List getDeviceListList() { + if (deviceListBuilder_ == null) { + return java.util.Collections.unmodifiableList(deviceList_); + } else { + return deviceListBuilder_.getMessageList(); + } + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public int getDeviceListCount() { + if (deviceListBuilder_ == null) { + return deviceList_.size(); + } else { + return deviceListBuilder_.getCount(); + } + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public context.ContextOuterClass.DeviceId getDeviceList(int index) { + if (deviceListBuilder_ == null) { + return deviceList_.get(index); + } else { + return deviceListBuilder_.getMessage(index); + } + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public Builder setDeviceList(int index, context.ContextOuterClass.DeviceId value) { + if (deviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceListIsMutable(); + deviceList_.set(index, value); + onChanged(); + } else { + deviceListBuilder_.setMessage(index, value); + } + return this; + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public Builder setDeviceList(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.set(index, builderForValue.build()); + onChanged(); + } else { + deviceListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public Builder addDeviceList(context.ContextOuterClass.DeviceId value) { + if (deviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceListIsMutable(); + deviceList_.add(value); + onChanged(); + } else { + deviceListBuilder_.addMessage(value); + } + return this; + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public Builder addDeviceList(int index, context.ContextOuterClass.DeviceId value) { + if (deviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceListIsMutable(); + deviceList_.add(index, value); + onChanged(); + } else { + deviceListBuilder_.addMessage(index, value); + } + return this; + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public Builder addDeviceList(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.add(builderForValue.build()); + onChanged(); + } else { + deviceListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public Builder addDeviceList(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.add(index, builderForValue.build()); + onChanged(); + } else { + deviceListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public Builder addAllDeviceList(java.lang.Iterable values) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deviceList_); + onChanged(); + } else { + deviceListBuilder_.addAllMessages(values); + } + return this; + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public Builder clearDeviceList() { + if (deviceListBuilder_ == null) { + deviceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deviceListBuilder_.clear(); + } + return this; + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public Builder removeDeviceList(int index) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.remove(index); + onChanged(); + } else { + deviceListBuilder_.remove(index); + } + return this; + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceListBuilder(int index) { + return getDeviceListFieldBuilder().getBuilder(index); + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder(int index) { + if (deviceListBuilder_ == null) { + return deviceList_.get(index); + } else { + return deviceListBuilder_.getMessageOrBuilder(index); + } + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public java.util.List getDeviceListOrBuilderList() { + if (deviceListBuilder_ != null) { + return deviceListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deviceList_); + } + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder() { + return getDeviceListFieldBuilder().addBuilder(context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder(int index) { + return getDeviceListFieldBuilder().addBuilder(index, context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + + /** + *
+             * List of devices this service is traversing (not exhaustive)
+             * 
+ * + * repeated .context.DeviceId deviceList = 3; + */ + public java.util.List getDeviceListBuilderList() { + return getDeviceListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceListFieldBuilder() { + if (deviceListBuilder_ == null) { + deviceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceList_ = null; + } + return deviceListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleService) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleService) + private static final policy.Policy.PolicyRuleService DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleService(); + } + + public static policy.Policy.PolicyRuleService getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.Policy.PolicyRuleService getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PolicyRuleDeviceOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRuleDevice) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + * @return Whether the policyRuleBasic field is set. + */ + boolean hasPolicyRuleBasic(); + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + * @return The policyRuleBasic. + */ + policy.Policy.PolicyRuleBasic getPolicyRuleBasic(); + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder(); + + /** + *
+         * Affected device(s)
+         * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + java.util.List getDeviceListList(); + + /** + *
+         * Affected device(s)
+         * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + context.ContextOuterClass.DeviceId getDeviceList(int index); + + /** + *
+         * Affected device(s)
+         * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + int getDeviceListCount(); + + /** + *
+         * Affected device(s)
+         * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + java.util.List getDeviceListOrBuilderList(); + + /** + *
+         * Affected device(s)
+         * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder(int index); + } + + /** + *
+     * Device-oriented policy rule
+     * 
+ * + * Protobuf type {@code policy.PolicyRuleDevice} + */ + public static final class PolicyRuleDevice extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRuleDevice) + PolicyRuleDeviceOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use PolicyRuleDevice.newBuilder() to construct. + private PolicyRuleDevice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PolicyRuleDevice() { + deviceList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleDevice_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleDevice.class, policy.Policy.PolicyRuleDevice.Builder.class); + } + + public static final int POLICYRULEBASIC_FIELD_NUMBER = 1; + + private policy.Policy.PolicyRuleBasic policyRuleBasic_; + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + * @return Whether the policyRuleBasic field is set. + */ + @java.lang.Override + public boolean hasPolicyRuleBasic() { + return policyRuleBasic_ != null; + } + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + * @return The policyRuleBasic. + */ + @java.lang.Override + public policy.Policy.PolicyRuleBasic getPolicyRuleBasic() { + return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; + } + + /** + *
+         * Basic policy rule attributes
+         * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { + return getPolicyRuleBasic(); + } + + public static final int DEVICELIST_FIELD_NUMBER = 2; + + private java.util.List deviceList_; + + /** + *
+         * Affected device(s)
+         * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + @java.lang.Override + public java.util.List getDeviceListList() { + return deviceList_; + } + + /** + *
+         * Affected device(s)
+         * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + @java.lang.Override + public java.util.List getDeviceListOrBuilderList() { + return deviceList_; + } + + /** + *
+         * Affected device(s)
+         * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + @java.lang.Override + public int getDeviceListCount() { + return deviceList_.size(); + } + + /** + *
+         * Affected device(s)
+         * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceList(int index) { + return deviceList_.get(index); + } + + /** + *
+         * Affected device(s)
+         * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder(int index) { + return deviceList_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (policyRuleBasic_ != null) { + output.writeMessage(1, getPolicyRuleBasic()); + } + for (int i = 0; i < deviceList_.size(); i++) { + output.writeMessage(2, deviceList_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (policyRuleBasic_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicyRuleBasic()); + } + for (int i = 0; i < deviceList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, deviceList_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.Policy.PolicyRuleDevice)) { + return super.equals(obj); + } + policy.Policy.PolicyRuleDevice other = (policy.Policy.PolicyRuleDevice) obj; + if (hasPolicyRuleBasic() != other.hasPolicyRuleBasic()) + return false; + if (hasPolicyRuleBasic()) { + if (!getPolicyRuleBasic().equals(other.getPolicyRuleBasic())) + return false; + } + if (!getDeviceListList().equals(other.getDeviceListList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPolicyRuleBasic()) { + hash = (37 * hash) + POLICYRULEBASIC_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleBasic().hashCode(); + } + if (getDeviceListCount() > 0) { + hash = (37 * hash) + DEVICELIST_FIELD_NUMBER; + hash = (53 * hash) + getDeviceListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static policy.Policy.PolicyRuleDevice parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleDevice parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleDevice parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleDevice parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleDevice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleDevice parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleDevice parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleDevice parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleDevice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleDevice parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleDevice parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleDevice parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(policy.Policy.PolicyRuleDevice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * Device-oriented policy rule
+         * 
+ * + * Protobuf type {@code policy.PolicyRuleDevice} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRuleDevice) + policy.Policy.PolicyRuleDeviceOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleDevice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleDevice_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleDevice.class, policy.Policy.PolicyRuleDevice.Builder.class); + } + + // 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; + policyRuleBasicBuilder_ = null; + } + if (deviceListBuilder_ == null) { + deviceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deviceListBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRuleDevice_descriptor; + } + + @java.lang.Override + public policy.Policy.PolicyRuleDevice getDefaultInstanceForType() { + return policy.Policy.PolicyRuleDevice.getDefaultInstance(); + } + + @java.lang.Override + public policy.Policy.PolicyRuleDevice build() { + policy.Policy.PolicyRuleDevice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + if (deviceListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deviceList_ = java.util.Collections.unmodifiableList(deviceList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleDevice) { + return mergeFrom((policy.Policy.PolicyRuleDevice) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(policy.Policy.PolicyRuleDevice other) { + if (other == policy.Policy.PolicyRuleDevice.getDefaultInstance()) + return this; + if (other.hasPolicyRuleBasic()) { + mergePolicyRuleBasic(other.getPolicyRuleBasic()); + } + if (deviceListBuilder_ == null) { + if (!other.deviceList_.isEmpty()) { + if (deviceList_.isEmpty()) { + deviceList_ = other.deviceList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeviceListIsMutable(); + deviceList_.addAll(other.deviceList_); + } + onChanged(); + } + } else { + if (!other.deviceList_.isEmpty()) { + if (deviceListBuilder_.isEmpty()) { + deviceListBuilder_.dispose(); + deviceListBuilder_ = null; + deviceList_ = other.deviceList_; + bitField0_ = (bitField0_ & ~0x00000001); + deviceListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceListFieldBuilder() : null; + } else { + deviceListBuilder_.addAllMessages(other.deviceList_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRuleDevice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private policy.Policy.PolicyRuleBasic policyRuleBasic_; + + private com.google.protobuf.SingleFieldBuilderV3 policyRuleBasicBuilder_; + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + * @return Whether the policyRuleBasic field is set. + */ + public boolean hasPolicyRuleBasic() { + return policyRuleBasicBuilder_ != null || policyRuleBasic_ != null; + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + * @return The policyRuleBasic. + */ + public policy.Policy.PolicyRuleBasic getPolicyRuleBasic() { + if (policyRuleBasicBuilder_ == null) { + return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; + } else { + return policyRuleBasicBuilder_.getMessage(); + } + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + public Builder setPolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { + if (policyRuleBasicBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyRuleBasic_ = value; + onChanged(); + } else { + policyRuleBasicBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + public Builder setPolicyRuleBasic(policy.Policy.PolicyRuleBasic.Builder builderForValue) { + if (policyRuleBasicBuilder_ == null) { + policyRuleBasic_ = builderForValue.build(); + onChanged(); + } else { + policyRuleBasicBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + public Builder mergePolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { + if (policyRuleBasicBuilder_ == null) { + if (policyRuleBasic_ != null) { + policyRuleBasic_ = policy.Policy.PolicyRuleBasic.newBuilder(policyRuleBasic_).mergeFrom(value).buildPartial(); + } else { + policyRuleBasic_ = value; + } + onChanged(); + } else { + policyRuleBasicBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + public Builder clearPolicyRuleBasic() { + if (policyRuleBasicBuilder_ == null) { + policyRuleBasic_ = null; + onChanged(); + } else { + policyRuleBasic_ = null; + policyRuleBasicBuilder_ = null; + } + return this; + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + public policy.Policy.PolicyRuleBasic.Builder getPolicyRuleBasicBuilder() { + onChanged(); + return getPolicyRuleBasicFieldBuilder().getBuilder(); + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { + if (policyRuleBasicBuilder_ != null) { + return policyRuleBasicBuilder_.getMessageOrBuilder(); + } else { + return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; + } + } + + /** + *
+             * Basic policy rule attributes
+             * 
+ * + * .policy.PolicyRuleBasic policyRuleBasic = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getPolicyRuleBasicFieldBuilder() { + if (policyRuleBasicBuilder_ == null) { + policyRuleBasicBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getPolicyRuleBasic(), getParentForChildren(), isClean()); + policyRuleBasic_ = null; + } + return policyRuleBasicBuilder_; + } + + private java.util.List deviceList_ = java.util.Collections.emptyList(); + + private void ensureDeviceListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceList_ = new java.util.ArrayList(deviceList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 deviceListBuilder_; + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public java.util.List getDeviceListList() { + if (deviceListBuilder_ == null) { + return java.util.Collections.unmodifiableList(deviceList_); + } else { + return deviceListBuilder_.getMessageList(); + } + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public int getDeviceListCount() { + if (deviceListBuilder_ == null) { + return deviceList_.size(); + } else { + return deviceListBuilder_.getCount(); + } + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public context.ContextOuterClass.DeviceId getDeviceList(int index) { + if (deviceListBuilder_ == null) { + return deviceList_.get(index); + } else { + return deviceListBuilder_.getMessage(index); + } + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public Builder setDeviceList(int index, context.ContextOuterClass.DeviceId value) { + if (deviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceListIsMutable(); + deviceList_.set(index, value); + onChanged(); + } else { + deviceListBuilder_.setMessage(index, value); + } + return this; + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public Builder setDeviceList(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.set(index, builderForValue.build()); + onChanged(); + } else { + deviceListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public Builder addDeviceList(context.ContextOuterClass.DeviceId value) { + if (deviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceListIsMutable(); + deviceList_.add(value); + onChanged(); + } else { + deviceListBuilder_.addMessage(value); + } + return this; + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public Builder addDeviceList(int index, context.ContextOuterClass.DeviceId value) { + if (deviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceListIsMutable(); + deviceList_.add(index, value); + onChanged(); + } else { + deviceListBuilder_.addMessage(index, value); + } + return this; + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public Builder addDeviceList(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.add(builderForValue.build()); + onChanged(); + } else { + deviceListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public Builder addDeviceList(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.add(index, builderForValue.build()); + onChanged(); + } else { + deviceListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public Builder addAllDeviceList(java.lang.Iterable values) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deviceList_); + onChanged(); + } else { + deviceListBuilder_.addAllMessages(values); + } + return this; + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public Builder clearDeviceList() { + if (deviceListBuilder_ == null) { + deviceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deviceListBuilder_.clear(); + } + return this; + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public Builder removeDeviceList(int index) { + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.remove(index); + onChanged(); + } else { + deviceListBuilder_.remove(index); + } + return this; + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceListBuilder(int index) { + return getDeviceListFieldBuilder().getBuilder(index); + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder(int index) { + if (deviceListBuilder_ == null) { + return deviceList_.get(index); + } else { + return deviceListBuilder_.getMessageOrBuilder(index); + } + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public java.util.List getDeviceListOrBuilderList() { + if (deviceListBuilder_ != null) { + return deviceListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deviceList_); + } + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder() { + return getDeviceListFieldBuilder().addBuilder(context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder(int index) { + return getDeviceListFieldBuilder().addBuilder(index, context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + + /** + *
+             * Affected device(s)
+             * 
+ * + * repeated .context.DeviceId deviceList = 2; + */ + public java.util.List getDeviceListBuilderList() { + return getDeviceListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceListFieldBuilder() { + if (deviceListBuilder_ == null) { + deviceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceList_ = null; + } + return deviceListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleDevice) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleDevice) + private static final policy.Policy.PolicyRuleDevice DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleDevice(); + } + + public static policy.Policy.PolicyRuleDevice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.Policy.PolicyRuleDevice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PolicyRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRule) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.PolicyRuleService service = 1; + * @return Whether the service field is set. + */ + boolean hasService(); + + /** + * .policy.PolicyRuleService service = 1; + * @return The service. + */ + policy.Policy.PolicyRuleService getService(); + + /** + * .policy.PolicyRuleService service = 1; + */ + policy.Policy.PolicyRuleServiceOrBuilder getServiceOrBuilder(); + + /** + * .policy.PolicyRuleDevice device = 2; + * @return Whether the device field is set. + */ + boolean hasDevice(); + + /** + * .policy.PolicyRuleDevice device = 2; + * @return The device. + */ + policy.Policy.PolicyRuleDevice getDevice(); + + /** + * .policy.PolicyRuleDevice device = 2; + */ + policy.Policy.PolicyRuleDeviceOrBuilder getDeviceOrBuilder(); + + public policy.Policy.PolicyRule.PolicyRuleCase getPolicyRuleCase(); + } + + /** + *
+     * Wrapper policy rule object
+     * 
+ * + * Protobuf type {@code policy.PolicyRule} + */ + public static final class PolicyRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRule) + PolicyRuleOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use PolicyRule.newBuilder() to construct. + private PolicyRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PolicyRule() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRule_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRule.class, policy.Policy.PolicyRule.Builder.class); + } + + private int policyRuleCase_ = 0; + + private java.lang.Object policyRule_; + + public enum PolicyRuleCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { + + SERVICE(1), DEVICE(2), POLICYRULE_NOT_SET(0); + + private final int value; + + private PolicyRuleCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PolicyRuleCase valueOf(int value) { + return forNumber(value); + } + + public static PolicyRuleCase forNumber(int value) { + switch(value) { + case 1: + return SERVICE; + case 2: + return DEVICE; + case 0: + return POLICYRULE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + } + + public PolicyRuleCase getPolicyRuleCase() { + return PolicyRuleCase.forNumber(policyRuleCase_); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + + /** + * .policy.PolicyRuleService service = 1; + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return policyRuleCase_ == 1; + } + + /** + * .policy.PolicyRuleService service = 1; + * @return The service. + */ + @java.lang.Override + public policy.Policy.PolicyRuleService getService() { + if (policyRuleCase_ == 1) { + return (policy.Policy.PolicyRuleService) policyRule_; + } + return policy.Policy.PolicyRuleService.getDefaultInstance(); + } + + /** + * .policy.PolicyRuleService service = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRuleServiceOrBuilder getServiceOrBuilder() { + if (policyRuleCase_ == 1) { + return (policy.Policy.PolicyRuleService) policyRule_; + } + return policy.Policy.PolicyRuleService.getDefaultInstance(); + } + + public static final int DEVICE_FIELD_NUMBER = 2; + + /** + * .policy.PolicyRuleDevice device = 2; + * @return Whether the device field is set. + */ + @java.lang.Override + public boolean hasDevice() { + return policyRuleCase_ == 2; + } + + /** + * .policy.PolicyRuleDevice device = 2; + * @return The device. + */ + @java.lang.Override + public policy.Policy.PolicyRuleDevice getDevice() { + if (policyRuleCase_ == 2) { + return (policy.Policy.PolicyRuleDevice) policyRule_; + } + return policy.Policy.PolicyRuleDevice.getDefaultInstance(); + } + + /** + * .policy.PolicyRuleDevice device = 2; + */ + @java.lang.Override + public policy.Policy.PolicyRuleDeviceOrBuilder getDeviceOrBuilder() { + if (policyRuleCase_ == 2) { + return (policy.Policy.PolicyRuleDevice) policyRule_; + } + return policy.Policy.PolicyRuleDevice.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (policyRuleCase_ == 1) { + output.writeMessage(1, (policy.Policy.PolicyRuleService) policyRule_); + } + if (policyRuleCase_ == 2) { + output.writeMessage(2, (policy.Policy.PolicyRuleDevice) policyRule_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (policyRuleCase_ == 1) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, (policy.Policy.PolicyRuleService) policyRule_); + } + if (policyRuleCase_ == 2) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (policy.Policy.PolicyRuleDevice) policyRule_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.Policy.PolicyRule)) { + return super.equals(obj); + } + policy.Policy.PolicyRule other = (policy.Policy.PolicyRule) obj; + if (!getPolicyRuleCase().equals(other.getPolicyRuleCase())) + return false; + switch(policyRuleCase_) { + case 1: + if (!getService().equals(other.getService())) + return false; + break; + case 2: + if (!getDevice().equals(other.getDevice())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch(policyRuleCase_) { + case 1: + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + break; + case 2: + hash = (37 * hash) + DEVICE_FIELD_NUMBER; + hash = (53 * hash) + getDevice().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static policy.Policy.PolicyRule parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRule parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRule parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRule parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRule parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRule parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRule parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRule parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRule parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRule parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(policy.Policy.PolicyRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * Wrapper policy rule object
+         * 
+ * + * Protobuf type {@code policy.PolicyRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRule) + policy.Policy.PolicyRuleOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRule_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRule.class, policy.Policy.PolicyRule.Builder.class); + } + + // 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(); + policyRuleCase_ = 0; + policyRule_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRule_descriptor; + } + + @java.lang.Override + public policy.Policy.PolicyRule getDefaultInstanceForType() { + return policy.Policy.PolicyRule.getDefaultInstance(); + } + + @java.lang.Override + 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); + } + + @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 policy.Policy.PolicyRule) { + return mergeFrom((policy.Policy.PolicyRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(policy.Policy.PolicyRule other) { + if (other == policy.Policy.PolicyRule.getDefaultInstance()) + return this; + switch(other.getPolicyRuleCase()) { + case SERVICE: + { + mergeService(other.getService()); + break; + } + case DEVICE: + { + mergeDevice(other.getDevice()); + break; + } + case POLICYRULE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int policyRuleCase_ = 0; + + private java.lang.Object policyRule_; + + public PolicyRuleCase getPolicyRuleCase() { + return PolicyRuleCase.forNumber(policyRuleCase_); + } + + public Builder clearPolicyRule() { + policyRuleCase_ = 0; + policyRule_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3 serviceBuilder_; + + /** + * .policy.PolicyRuleService service = 1; + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return policyRuleCase_ == 1; + } + + /** + * .policy.PolicyRuleService service = 1; + * @return The service. + */ + @java.lang.Override + public policy.Policy.PolicyRuleService getService() { + if (serviceBuilder_ == null) { + if (policyRuleCase_ == 1) { + return (policy.Policy.PolicyRuleService) policyRule_; + } + return policy.Policy.PolicyRuleService.getDefaultInstance(); + } else { + if (policyRuleCase_ == 1) { + return serviceBuilder_.getMessage(); + } + return policy.Policy.PolicyRuleService.getDefaultInstance(); + } + } + + /** + * .policy.PolicyRuleService service = 1; + */ + public Builder setService(policy.Policy.PolicyRuleService value) { + if (serviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyRule_ = value; + onChanged(); + } else { + serviceBuilder_.setMessage(value); + } + policyRuleCase_ = 1; + return this; + } + + /** + * .policy.PolicyRuleService service = 1; + */ + public Builder setService(policy.Policy.PolicyRuleService.Builder builderForValue) { + if (serviceBuilder_ == null) { + policyRule_ = builderForValue.build(); + onChanged(); + } else { + serviceBuilder_.setMessage(builderForValue.build()); + } + policyRuleCase_ = 1; + return this; + } + + /** + * .policy.PolicyRuleService service = 1; + */ + public Builder mergeService(policy.Policy.PolicyRuleService value) { + if (serviceBuilder_ == null) { + if (policyRuleCase_ == 1 && policyRule_ != policy.Policy.PolicyRuleService.getDefaultInstance()) { + policyRule_ = policy.Policy.PolicyRuleService.newBuilder((policy.Policy.PolicyRuleService) policyRule_).mergeFrom(value).buildPartial(); + } else { + policyRule_ = value; + } + onChanged(); + } else { + if (policyRuleCase_ == 1) { + serviceBuilder_.mergeFrom(value); + } + serviceBuilder_.setMessage(value); + } + policyRuleCase_ = 1; + return this; + } + + /** + * .policy.PolicyRuleService service = 1; + */ + public Builder clearService() { + if (serviceBuilder_ == null) { + if (policyRuleCase_ == 1) { + policyRuleCase_ = 0; + policyRule_ = null; + onChanged(); + } + } else { + if (policyRuleCase_ == 1) { + policyRuleCase_ = 0; + policyRule_ = null; + } + serviceBuilder_.clear(); + } + return this; + } + + /** + * .policy.PolicyRuleService service = 1; + */ + public policy.Policy.PolicyRuleService.Builder getServiceBuilder() { + return getServiceFieldBuilder().getBuilder(); + } + + /** + * .policy.PolicyRuleService service = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRuleServiceOrBuilder getServiceOrBuilder() { + if ((policyRuleCase_ == 1) && (serviceBuilder_ != null)) { + return serviceBuilder_.getMessageOrBuilder(); + } else { + if (policyRuleCase_ == 1) { + return (policy.Policy.PolicyRuleService) policyRule_; + } + return policy.Policy.PolicyRuleService.getDefaultInstance(); + } + } + + /** + * .policy.PolicyRuleService service = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceFieldBuilder() { + if (serviceBuilder_ == null) { + if (!(policyRuleCase_ == 1)) { + policyRule_ = policy.Policy.PolicyRuleService.getDefaultInstance(); + } + serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((policy.Policy.PolicyRuleService) policyRule_, getParentForChildren(), isClean()); + policyRule_ = null; + } + policyRuleCase_ = 1; + onChanged(); + ; + return serviceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3 deviceBuilder_; + + /** + * .policy.PolicyRuleDevice device = 2; + * @return Whether the device field is set. + */ + @java.lang.Override + public boolean hasDevice() { + return policyRuleCase_ == 2; + } + + /** + * .policy.PolicyRuleDevice device = 2; + * @return The device. + */ + @java.lang.Override + public policy.Policy.PolicyRuleDevice getDevice() { + if (deviceBuilder_ == null) { + if (policyRuleCase_ == 2) { + return (policy.Policy.PolicyRuleDevice) policyRule_; + } + return policy.Policy.PolicyRuleDevice.getDefaultInstance(); + } else { + if (policyRuleCase_ == 2) { + return deviceBuilder_.getMessage(); + } + return policy.Policy.PolicyRuleDevice.getDefaultInstance(); + } + } + + /** + * .policy.PolicyRuleDevice device = 2; + */ + public Builder setDevice(policy.Policy.PolicyRuleDevice value) { + if (deviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyRule_ = value; + onChanged(); + } else { + deviceBuilder_.setMessage(value); + } + policyRuleCase_ = 2; + return this; + } + + /** + * .policy.PolicyRuleDevice device = 2; + */ + public Builder setDevice(policy.Policy.PolicyRuleDevice.Builder builderForValue) { + if (deviceBuilder_ == null) { + policyRule_ = builderForValue.build(); + onChanged(); + } else { + deviceBuilder_.setMessage(builderForValue.build()); + } + policyRuleCase_ = 2; + return this; + } + + /** + * .policy.PolicyRuleDevice device = 2; + */ + public Builder mergeDevice(policy.Policy.PolicyRuleDevice value) { + if (deviceBuilder_ == null) { + if (policyRuleCase_ == 2 && policyRule_ != policy.Policy.PolicyRuleDevice.getDefaultInstance()) { + policyRule_ = policy.Policy.PolicyRuleDevice.newBuilder((policy.Policy.PolicyRuleDevice) policyRule_).mergeFrom(value).buildPartial(); + } else { + policyRule_ = value; + } + onChanged(); + } else { + if (policyRuleCase_ == 2) { + deviceBuilder_.mergeFrom(value); + } + deviceBuilder_.setMessage(value); + } + policyRuleCase_ = 2; + return this; + } + + /** + * .policy.PolicyRuleDevice device = 2; + */ + public Builder clearDevice() { + if (deviceBuilder_ == null) { + if (policyRuleCase_ == 2) { + policyRuleCase_ = 0; + policyRule_ = null; + onChanged(); + } + } else { + if (policyRuleCase_ == 2) { + policyRuleCase_ = 0; + policyRule_ = null; + } + deviceBuilder_.clear(); + } + return this; + } + + /** + * .policy.PolicyRuleDevice device = 2; + */ + public policy.Policy.PolicyRuleDevice.Builder getDeviceBuilder() { + return getDeviceFieldBuilder().getBuilder(); + } + + /** + * .policy.PolicyRuleDevice device = 2; + */ + @java.lang.Override + public policy.Policy.PolicyRuleDeviceOrBuilder getDeviceOrBuilder() { + if ((policyRuleCase_ == 2) && (deviceBuilder_ != null)) { + return deviceBuilder_.getMessageOrBuilder(); + } else { + if (policyRuleCase_ == 2) { + return (policy.Policy.PolicyRuleDevice) policyRule_; + } + return policy.Policy.PolicyRuleDevice.getDefaultInstance(); + } + } + + /** + * .policy.PolicyRuleDevice device = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceFieldBuilder() { + if (deviceBuilder_ == null) { + if (!(policyRuleCase_ == 2)) { + policyRule_ = policy.Policy.PolicyRuleDevice.getDefaultInstance(); + } + deviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((policy.Policy.PolicyRuleDevice) policyRule_, getParentForChildren(), isClean()); + policyRule_ = null; + } + policyRuleCase_ = 2; + onChanged(); + ; + return deviceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:policy.PolicyRule) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRule) + private static final policy.Policy.PolicyRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRule(); + } + + public static policy.Policy.PolicyRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.Policy.PolicyRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PolicyRuleIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRuleIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + java.util.List getPolicyRuleIdListList(); + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + policy.Policy.PolicyRuleId getPolicyRuleIdList(int index); + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + int getPolicyRuleIdListCount(); + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + java.util.List getPolicyRuleIdListOrBuilderList(); + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdListOrBuilder(int index); + } + + /** + *
+     * A list of policy rule IDs
+     * 
+ * + * Protobuf type {@code policy.PolicyRuleIdList} + */ + public static final class PolicyRuleIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRuleIdList) + PolicyRuleIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use PolicyRuleIdList.newBuilder() to construct. + private PolicyRuleIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PolicyRuleIdList() { + policyRuleIdList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleIdList.class, policy.Policy.PolicyRuleIdList.Builder.class); + } + + public static final int POLICYRULEIDLIST_FIELD_NUMBER = 1; + + private java.util.List policyRuleIdList_; + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + @java.lang.Override + public java.util.List getPolicyRuleIdListList() { + return policyRuleIdList_; + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + @java.lang.Override + public java.util.List getPolicyRuleIdListOrBuilderList() { + return policyRuleIdList_; + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + @java.lang.Override + public int getPolicyRuleIdListCount() { + return policyRuleIdList_.size(); + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRuleId getPolicyRuleIdList(int index) { + return policyRuleIdList_.get(index); + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdListOrBuilder(int index) { + return policyRuleIdList_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policyRuleIdList_.size(); i++) { + output.writeMessage(1, policyRuleIdList_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < policyRuleIdList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyRuleIdList_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.Policy.PolicyRuleIdList)) { + return super.equals(obj); + } + policy.Policy.PolicyRuleIdList other = (policy.Policy.PolicyRuleIdList) obj; + if (!getPolicyRuleIdListList().equals(other.getPolicyRuleIdListList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyRuleIdListCount() > 0) { + hash = (37 * hash) + POLICYRULEIDLIST_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleIdListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static policy.Policy.PolicyRuleIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(policy.Policy.PolicyRuleIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * A list of policy rule IDs
+         * 
+ * + * Protobuf type {@code policy.PolicyRuleIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRuleIdList) + policy.Policy.PolicyRuleIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleIdList.class, policy.Policy.PolicyRuleIdList.Builder.class); + } + + // 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(); + if (policyRuleIdListBuilder_ == null) { + policyRuleIdList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + policyRuleIdListBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRuleIdList_descriptor; + } + + @java.lang.Override + public policy.Policy.PolicyRuleIdList getDefaultInstanceForType() { + return policy.Policy.PolicyRuleIdList.getDefaultInstance(); + } + + @java.lang.Override + public policy.Policy.PolicyRuleIdList build() { + policy.Policy.PolicyRuleIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public policy.Policy.PolicyRuleIdList buildPartial() { + policy.Policy.PolicyRuleIdList result = new policy.Policy.PolicyRuleIdList(this); + int from_bitField0_ = bitField0_; + if (policyRuleIdListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyRuleIdList_ = java.util.Collections.unmodifiableList(policyRuleIdList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyRuleIdList_ = policyRuleIdList_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleIdList) { + return mergeFrom((policy.Policy.PolicyRuleIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(policy.Policy.PolicyRuleIdList other) { + if (other == policy.Policy.PolicyRuleIdList.getDefaultInstance()) + return this; + if (policyRuleIdListBuilder_ == null) { + if (!other.policyRuleIdList_.isEmpty()) { + if (policyRuleIdList_.isEmpty()) { + policyRuleIdList_ = other.policyRuleIdList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.addAll(other.policyRuleIdList_); + } + onChanged(); + } + } else { + if (!other.policyRuleIdList_.isEmpty()) { + if (policyRuleIdListBuilder_.isEmpty()) { + policyRuleIdListBuilder_.dispose(); + policyRuleIdListBuilder_ = null; + policyRuleIdList_ = other.policyRuleIdList_; + bitField0_ = (bitField0_ & ~0x00000001); + policyRuleIdListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPolicyRuleIdListFieldBuilder() : null; + } else { + policyRuleIdListBuilder_.addAllMessages(other.policyRuleIdList_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRuleIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List policyRuleIdList_ = java.util.Collections.emptyList(); + + private void ensurePolicyRuleIdListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyRuleIdList_ = new java.util.ArrayList(policyRuleIdList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 policyRuleIdListBuilder_; + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public java.util.List getPolicyRuleIdListList() { + if (policyRuleIdListBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyRuleIdList_); + } else { + return policyRuleIdListBuilder_.getMessageList(); + } + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public int getPolicyRuleIdListCount() { + if (policyRuleIdListBuilder_ == null) { + return policyRuleIdList_.size(); + } else { + return policyRuleIdListBuilder_.getCount(); + } + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public policy.Policy.PolicyRuleId getPolicyRuleIdList(int index) { + if (policyRuleIdListBuilder_ == null) { + return policyRuleIdList_.get(index); + } else { + return policyRuleIdListBuilder_.getMessage(index); + } + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public Builder setPolicyRuleIdList(int index, policy.Policy.PolicyRuleId value) { + if (policyRuleIdListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.set(index, value); + onChanged(); + } else { + policyRuleIdListBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public Builder setPolicyRuleIdList(int index, policy.Policy.PolicyRuleId.Builder builderForValue) { + if (policyRuleIdListBuilder_ == null) { + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.set(index, builderForValue.build()); + onChanged(); + } else { + policyRuleIdListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public Builder addPolicyRuleIdList(policy.Policy.PolicyRuleId value) { + if (policyRuleIdListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.add(value); + onChanged(); + } else { + policyRuleIdListBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public Builder addPolicyRuleIdList(int index, policy.Policy.PolicyRuleId value) { + if (policyRuleIdListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.add(index, value); + onChanged(); + } else { + policyRuleIdListBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public Builder addPolicyRuleIdList(policy.Policy.PolicyRuleId.Builder builderForValue) { + if (policyRuleIdListBuilder_ == null) { + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.add(builderForValue.build()); + onChanged(); + } else { + policyRuleIdListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public Builder addPolicyRuleIdList(int index, policy.Policy.PolicyRuleId.Builder builderForValue) { + if (policyRuleIdListBuilder_ == null) { + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.add(index, builderForValue.build()); + onChanged(); + } else { + policyRuleIdListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public Builder addAllPolicyRuleIdList(java.lang.Iterable values) { + if (policyRuleIdListBuilder_ == null) { + ensurePolicyRuleIdListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyRuleIdList_); + onChanged(); + } else { + policyRuleIdListBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public Builder clearPolicyRuleIdList() { + if (policyRuleIdListBuilder_ == null) { + policyRuleIdList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyRuleIdListBuilder_.clear(); + } + return this; + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public Builder removePolicyRuleIdList(int index) { + if (policyRuleIdListBuilder_ == null) { + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.remove(index); + onChanged(); + } else { + policyRuleIdListBuilder_.remove(index); + } + return this; + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public policy.Policy.PolicyRuleId.Builder getPolicyRuleIdListBuilder(int index) { + return getPolicyRuleIdListFieldBuilder().getBuilder(index); + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdListOrBuilder(int index) { + if (policyRuleIdListBuilder_ == null) { + return policyRuleIdList_.get(index); + } else { + return policyRuleIdListBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public java.util.List getPolicyRuleIdListOrBuilderList() { + if (policyRuleIdListBuilder_ != null) { + return policyRuleIdListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyRuleIdList_); + } + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public policy.Policy.PolicyRuleId.Builder addPolicyRuleIdListBuilder() { + return getPolicyRuleIdListFieldBuilder().addBuilder(policy.Policy.PolicyRuleId.getDefaultInstance()); + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public policy.Policy.PolicyRuleId.Builder addPolicyRuleIdListBuilder(int index) { + return getPolicyRuleIdListFieldBuilder().addBuilder(index, policy.Policy.PolicyRuleId.getDefaultInstance()); + } + + /** + * repeated .policy.PolicyRuleId policyRuleIdList = 1; + */ + public java.util.List getPolicyRuleIdListBuilderList() { + return getPolicyRuleIdListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getPolicyRuleIdListFieldBuilder() { + if (policyRuleIdListBuilder_ == null) { + policyRuleIdListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(policyRuleIdList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + policyRuleIdList_ = null; + } + return policyRuleIdListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleIdList) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleIdList) + private static final policy.Policy.PolicyRuleIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleIdList(); + } + + public static policy.Policy.PolicyRuleIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.Policy.PolicyRuleIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PolicyRuleServiceListOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRuleServiceList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + java.util.List getPolicyRuleServiceListList(); + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + policy.Policy.PolicyRuleService getPolicyRuleServiceList(int index); + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + int getPolicyRuleServiceListCount(); + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + java.util.List getPolicyRuleServiceListOrBuilderList(); + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + policy.Policy.PolicyRuleServiceOrBuilder getPolicyRuleServiceListOrBuilder(int index); + } + + /** + *
+     * A list of service-oriented policy rules
+     * 
+ * + * Protobuf type {@code policy.PolicyRuleServiceList} + */ + public static final class PolicyRuleServiceList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRuleServiceList) + PolicyRuleServiceListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use PolicyRuleServiceList.newBuilder() to construct. + private PolicyRuleServiceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PolicyRuleServiceList() { + policyRuleServiceList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleServiceList_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleServiceList.class, policy.Policy.PolicyRuleServiceList.Builder.class); + } + + public static final int POLICYRULESERVICELIST_FIELD_NUMBER = 1; + + private java.util.List policyRuleServiceList_; + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + @java.lang.Override + public java.util.List getPolicyRuleServiceListList() { + return policyRuleServiceList_; + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + @java.lang.Override + public java.util.List getPolicyRuleServiceListOrBuilderList() { + return policyRuleServiceList_; + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + @java.lang.Override + public int getPolicyRuleServiceListCount() { + return policyRuleServiceList_.size(); + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRuleService getPolicyRuleServiceList(int index) { + return policyRuleServiceList_.get(index); + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRuleServiceOrBuilder getPolicyRuleServiceListOrBuilder(int index) { + return policyRuleServiceList_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policyRuleServiceList_.size(); i++) { + output.writeMessage(1, policyRuleServiceList_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < policyRuleServiceList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyRuleServiceList_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.Policy.PolicyRuleServiceList)) { + return super.equals(obj); + } + policy.Policy.PolicyRuleServiceList other = (policy.Policy.PolicyRuleServiceList) obj; + if (!getPolicyRuleServiceListList().equals(other.getPolicyRuleServiceListList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyRuleServiceListCount() > 0) { + hash = (37 * hash) + POLICYRULESERVICELIST_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleServiceListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static policy.Policy.PolicyRuleServiceList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleServiceList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleServiceList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleServiceList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleServiceList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleServiceList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleServiceList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleServiceList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleServiceList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleServiceList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleServiceList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleServiceList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(policy.Policy.PolicyRuleServiceList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * A list of service-oriented policy rules
+         * 
+ * + * Protobuf type {@code policy.PolicyRuleServiceList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRuleServiceList) + policy.Policy.PolicyRuleServiceListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleServiceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleServiceList_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleServiceList.class, policy.Policy.PolicyRuleServiceList.Builder.class); + } + + // 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(); + if (policyRuleServiceListBuilder_ == null) { + policyRuleServiceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + policyRuleServiceListBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRuleServiceList_descriptor; + } + + @java.lang.Override + public policy.Policy.PolicyRuleServiceList getDefaultInstanceForType() { + return policy.Policy.PolicyRuleServiceList.getDefaultInstance(); + } + + @java.lang.Override + public policy.Policy.PolicyRuleServiceList build() { + policy.Policy.PolicyRuleServiceList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public policy.Policy.PolicyRuleServiceList buildPartial() { + policy.Policy.PolicyRuleServiceList result = new policy.Policy.PolicyRuleServiceList(this); + int from_bitField0_ = bitField0_; + if (policyRuleServiceListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyRuleServiceList_ = java.util.Collections.unmodifiableList(policyRuleServiceList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyRuleServiceList_ = policyRuleServiceList_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleServiceList) { + return mergeFrom((policy.Policy.PolicyRuleServiceList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(policy.Policy.PolicyRuleServiceList other) { + if (other == policy.Policy.PolicyRuleServiceList.getDefaultInstance()) + return this; + if (policyRuleServiceListBuilder_ == null) { + if (!other.policyRuleServiceList_.isEmpty()) { + if (policyRuleServiceList_.isEmpty()) { + policyRuleServiceList_ = other.policyRuleServiceList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.addAll(other.policyRuleServiceList_); + } + onChanged(); + } + } else { + if (!other.policyRuleServiceList_.isEmpty()) { + if (policyRuleServiceListBuilder_.isEmpty()) { + policyRuleServiceListBuilder_.dispose(); + policyRuleServiceListBuilder_ = null; + policyRuleServiceList_ = other.policyRuleServiceList_; + bitField0_ = (bitField0_ & ~0x00000001); + policyRuleServiceListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPolicyRuleServiceListFieldBuilder() : null; + } else { + policyRuleServiceListBuilder_.addAllMessages(other.policyRuleServiceList_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRuleServiceList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List policyRuleServiceList_ = java.util.Collections.emptyList(); + + private void ensurePolicyRuleServiceListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyRuleServiceList_ = new java.util.ArrayList(policyRuleServiceList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 policyRuleServiceListBuilder_; + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public java.util.List getPolicyRuleServiceListList() { + if (policyRuleServiceListBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyRuleServiceList_); + } else { + return policyRuleServiceListBuilder_.getMessageList(); + } + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public int getPolicyRuleServiceListCount() { + if (policyRuleServiceListBuilder_ == null) { + return policyRuleServiceList_.size(); + } else { + return policyRuleServiceListBuilder_.getCount(); + } + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public policy.Policy.PolicyRuleService getPolicyRuleServiceList(int index) { + if (policyRuleServiceListBuilder_ == null) { + return policyRuleServiceList_.get(index); + } else { + return policyRuleServiceListBuilder_.getMessage(index); + } + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public Builder setPolicyRuleServiceList(int index, policy.Policy.PolicyRuleService value) { + if (policyRuleServiceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.set(index, value); + onChanged(); + } else { + policyRuleServiceListBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public Builder setPolicyRuleServiceList(int index, policy.Policy.PolicyRuleService.Builder builderForValue) { + if (policyRuleServiceListBuilder_ == null) { + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.set(index, builderForValue.build()); + onChanged(); + } else { + policyRuleServiceListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public Builder addPolicyRuleServiceList(policy.Policy.PolicyRuleService value) { + if (policyRuleServiceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.add(value); + onChanged(); + } else { + policyRuleServiceListBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public Builder addPolicyRuleServiceList(int index, policy.Policy.PolicyRuleService value) { + if (policyRuleServiceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.add(index, value); + onChanged(); + } else { + policyRuleServiceListBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public Builder addPolicyRuleServiceList(policy.Policy.PolicyRuleService.Builder builderForValue) { + if (policyRuleServiceListBuilder_ == null) { + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.add(builderForValue.build()); + onChanged(); + } else { + policyRuleServiceListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public Builder addPolicyRuleServiceList(int index, policy.Policy.PolicyRuleService.Builder builderForValue) { + if (policyRuleServiceListBuilder_ == null) { + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.add(index, builderForValue.build()); + onChanged(); + } else { + policyRuleServiceListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public Builder addAllPolicyRuleServiceList(java.lang.Iterable values) { + if (policyRuleServiceListBuilder_ == null) { + ensurePolicyRuleServiceListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyRuleServiceList_); + onChanged(); + } else { + policyRuleServiceListBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public Builder clearPolicyRuleServiceList() { + if (policyRuleServiceListBuilder_ == null) { + policyRuleServiceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyRuleServiceListBuilder_.clear(); + } + return this; + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public Builder removePolicyRuleServiceList(int index) { + if (policyRuleServiceListBuilder_ == null) { + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.remove(index); + onChanged(); + } else { + policyRuleServiceListBuilder_.remove(index); + } + return this; + } + + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public policy.Policy.PolicyRuleService.Builder getPolicyRuleServiceListBuilder(int index) { + return getPolicyRuleServiceListFieldBuilder().getBuilder(index); + } - /** - *
-     * Affected device(s)
-     * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - java.util.List - getDeviceListList(); - /** - *
-     * Affected device(s)
-     * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - context.ContextOuterClass.DeviceId getDeviceList(int index); - /** - *
-     * Affected device(s)
-     * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - int getDeviceListCount(); - /** - *
-     * Affected device(s)
-     * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - java.util.List - getDeviceListOrBuilderList(); - /** - *
-     * Affected device(s)
-     * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( - int index); - } - /** - *
-   * Device-oriented policy rule
-   * 
- * - * Protobuf type {@code policy.PolicyRuleDevice} - */ - public static final class PolicyRuleDevice extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleDevice) - PolicyRuleDeviceOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRuleDevice.newBuilder() to construct. - private PolicyRuleDevice(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRuleDevice() { - deviceList_ = java.util.Collections.emptyList(); - } + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public policy.Policy.PolicyRuleServiceOrBuilder getPolicyRuleServiceListOrBuilder(int index) { + if (policyRuleServiceListBuilder_ == null) { + return policyRuleServiceList_.get(index); + } else { + return policyRuleServiceListBuilder_.getMessageOrBuilder(index); + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRuleDevice(); - } + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public java.util.List getPolicyRuleServiceListOrBuilderList() { + if (policyRuleServiceListBuilder_ != null) { + return policyRuleServiceListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyRuleServiceList_); + } + } - @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(); - 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; - } + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public policy.Policy.PolicyRuleService.Builder addPolicyRuleServiceListBuilder() { + return getPolicyRuleServiceListFieldBuilder().addBuilder(policy.Policy.PolicyRuleService.getDefaultInstance()); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleDevice_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleDevice.class, policy.Policy.PolicyRuleDevice.Builder.class); - } + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public policy.Policy.PolicyRuleService.Builder addPolicyRuleServiceListBuilder(int index) { + return getPolicyRuleServiceListFieldBuilder().addBuilder(index, policy.Policy.PolicyRuleService.getDefaultInstance()); + } - public static final int POLICYRULEBASIC_FIELD_NUMBER = 1; - private policy.Policy.PolicyRuleBasic policyRuleBasic_; - /** - *
-     * Basic policy rule attributes
-     * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - * @return Whether the policyRuleBasic field is set. - */ - @java.lang.Override - public boolean hasPolicyRuleBasic() { - return policyRuleBasic_ != null; + /** + * repeated .policy.PolicyRuleService policyRuleServiceList = 1; + */ + public java.util.List getPolicyRuleServiceListBuilderList() { + return getPolicyRuleServiceListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getPolicyRuleServiceListFieldBuilder() { + if (policyRuleServiceListBuilder_ == null) { + policyRuleServiceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(policyRuleServiceList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + policyRuleServiceList_ = null; + } + return policyRuleServiceListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleServiceList) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleServiceList) + private static final policy.Policy.PolicyRuleServiceList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleServiceList(); + } + + public static policy.Policy.PolicyRuleServiceList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.Policy.PolicyRuleServiceList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - /** - *
-     * Basic policy rule attributes
-     * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - * @return The policyRuleBasic. - */ - @java.lang.Override - public policy.Policy.PolicyRuleBasic getPolicyRuleBasic() { - return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; + + public interface PolicyRuleDeviceListOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRuleDeviceList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + java.util.List getPolicyRuleDeviceListList(); + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + policy.Policy.PolicyRuleDevice getPolicyRuleDeviceList(int index); + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + int getPolicyRuleDeviceListCount(); + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + java.util.List getPolicyRuleDeviceListOrBuilderList(); + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + policy.Policy.PolicyRuleDeviceOrBuilder getPolicyRuleDeviceListOrBuilder(int index); } + /** *
-     * Basic policy rule attributes
+     * A list of device-oriented policy rules
      * 
* - * .policy.PolicyRuleBasic policyRuleBasic = 1; + * Protobuf type {@code policy.PolicyRuleDeviceList} */ - @java.lang.Override - public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { - return getPolicyRuleBasic(); - } + public static final class PolicyRuleDeviceList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRuleDeviceList) + PolicyRuleDeviceListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use PolicyRuleDeviceList.newBuilder() to construct. + private PolicyRuleDeviceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PolicyRuleDeviceList() { + policyRuleDeviceList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleDeviceList_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleDeviceList.class, policy.Policy.PolicyRuleDeviceList.Builder.class); + } + + public static final int POLICYRULEDEVICELIST_FIELD_NUMBER = 1; + + private java.util.List policyRuleDeviceList_; + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + @java.lang.Override + public java.util.List getPolicyRuleDeviceListList() { + return policyRuleDeviceList_; + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + @java.lang.Override + public java.util.List getPolicyRuleDeviceListOrBuilderList() { + return policyRuleDeviceList_; + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + @java.lang.Override + public int getPolicyRuleDeviceListCount() { + return policyRuleDeviceList_.size(); + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRuleDevice getPolicyRuleDeviceList(int index) { + return policyRuleDeviceList_.get(index); + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRuleDeviceOrBuilder getPolicyRuleDeviceListOrBuilder(int index) { + return policyRuleDeviceList_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policyRuleDeviceList_.size(); i++) { + output.writeMessage(1, policyRuleDeviceList_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < policyRuleDeviceList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyRuleDeviceList_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.Policy.PolicyRuleDeviceList)) { + return super.equals(obj); + } + policy.Policy.PolicyRuleDeviceList other = (policy.Policy.PolicyRuleDeviceList) obj; + if (!getPolicyRuleDeviceListList().equals(other.getPolicyRuleDeviceListList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyRuleDeviceListCount() > 0) { + hash = (37 * hash) + POLICYRULEDEVICELIST_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRuleDeviceListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static policy.Policy.PolicyRuleDeviceList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleDeviceList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleDeviceList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleDeviceList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleDeviceList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.Policy.PolicyRuleDeviceList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.Policy.PolicyRuleDeviceList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleDeviceList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleDeviceList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleDeviceList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.Policy.PolicyRuleDeviceList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.Policy.PolicyRuleDeviceList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(policy.Policy.PolicyRuleDeviceList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * A list of device-oriented policy rules
+         * 
+ * + * Protobuf type {@code policy.PolicyRuleDeviceList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRuleDeviceList) + policy.Policy.PolicyRuleDeviceListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleDeviceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleDeviceList_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleDeviceList.class, policy.Policy.PolicyRuleDeviceList.Builder.class); + } + + // 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(); + if (policyRuleDeviceListBuilder_ == null) { + policyRuleDeviceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + policyRuleDeviceListBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRuleDeviceList_descriptor; + } + + @java.lang.Override + public policy.Policy.PolicyRuleDeviceList getDefaultInstanceForType() { + return policy.Policy.PolicyRuleDeviceList.getDefaultInstance(); + } + + @java.lang.Override + public policy.Policy.PolicyRuleDeviceList build() { + policy.Policy.PolicyRuleDeviceList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public policy.Policy.PolicyRuleDeviceList buildPartial() { + policy.Policy.PolicyRuleDeviceList result = new policy.Policy.PolicyRuleDeviceList(this); + int from_bitField0_ = bitField0_; + if (policyRuleDeviceListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyRuleDeviceList_ = java.util.Collections.unmodifiableList(policyRuleDeviceList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyRuleDeviceList_ = policyRuleDeviceList_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleDeviceList) { + return mergeFrom((policy.Policy.PolicyRuleDeviceList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(policy.Policy.PolicyRuleDeviceList other) { + if (other == policy.Policy.PolicyRuleDeviceList.getDefaultInstance()) + return this; + if (policyRuleDeviceListBuilder_ == null) { + if (!other.policyRuleDeviceList_.isEmpty()) { + if (policyRuleDeviceList_.isEmpty()) { + policyRuleDeviceList_ = other.policyRuleDeviceList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.addAll(other.policyRuleDeviceList_); + } + onChanged(); + } + } else { + if (!other.policyRuleDeviceList_.isEmpty()) { + if (policyRuleDeviceListBuilder_.isEmpty()) { + policyRuleDeviceListBuilder_.dispose(); + policyRuleDeviceListBuilder_ = null; + policyRuleDeviceList_ = other.policyRuleDeviceList_; + bitField0_ = (bitField0_ & ~0x00000001); + policyRuleDeviceListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPolicyRuleDeviceListFieldBuilder() : null; + } else { + policyRuleDeviceListBuilder_.addAllMessages(other.policyRuleDeviceList_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRuleDeviceList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List policyRuleDeviceList_ = java.util.Collections.emptyList(); + + private void ensurePolicyRuleDeviceListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyRuleDeviceList_ = new java.util.ArrayList(policyRuleDeviceList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 policyRuleDeviceListBuilder_; + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public java.util.List getPolicyRuleDeviceListList() { + if (policyRuleDeviceListBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyRuleDeviceList_); + } else { + return policyRuleDeviceListBuilder_.getMessageList(); + } + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public int getPolicyRuleDeviceListCount() { + if (policyRuleDeviceListBuilder_ == null) { + return policyRuleDeviceList_.size(); + } else { + return policyRuleDeviceListBuilder_.getCount(); + } + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public policy.Policy.PolicyRuleDevice getPolicyRuleDeviceList(int index) { + if (policyRuleDeviceListBuilder_ == null) { + return policyRuleDeviceList_.get(index); + } else { + return policyRuleDeviceListBuilder_.getMessage(index); + } + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public Builder setPolicyRuleDeviceList(int index, policy.Policy.PolicyRuleDevice value) { + if (policyRuleDeviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.set(index, value); + onChanged(); + } else { + policyRuleDeviceListBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public Builder setPolicyRuleDeviceList(int index, policy.Policy.PolicyRuleDevice.Builder builderForValue) { + if (policyRuleDeviceListBuilder_ == null) { + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.set(index, builderForValue.build()); + onChanged(); + } else { + policyRuleDeviceListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public Builder addPolicyRuleDeviceList(policy.Policy.PolicyRuleDevice value) { + if (policyRuleDeviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.add(value); + onChanged(); + } else { + policyRuleDeviceListBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public Builder addPolicyRuleDeviceList(int index, policy.Policy.PolicyRuleDevice value) { + if (policyRuleDeviceListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.add(index, value); + onChanged(); + } else { + policyRuleDeviceListBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public Builder addPolicyRuleDeviceList(policy.Policy.PolicyRuleDevice.Builder builderForValue) { + if (policyRuleDeviceListBuilder_ == null) { + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.add(builderForValue.build()); + onChanged(); + } else { + policyRuleDeviceListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public Builder addPolicyRuleDeviceList(int index, policy.Policy.PolicyRuleDevice.Builder builderForValue) { + if (policyRuleDeviceListBuilder_ == null) { + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.add(index, builderForValue.build()); + onChanged(); + } else { + policyRuleDeviceListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public Builder addAllPolicyRuleDeviceList(java.lang.Iterable values) { + if (policyRuleDeviceListBuilder_ == null) { + ensurePolicyRuleDeviceListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyRuleDeviceList_); + onChanged(); + } else { + policyRuleDeviceListBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public Builder clearPolicyRuleDeviceList() { + if (policyRuleDeviceListBuilder_ == null) { + policyRuleDeviceList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyRuleDeviceListBuilder_.clear(); + } + return this; + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public Builder removePolicyRuleDeviceList(int index) { + if (policyRuleDeviceListBuilder_ == null) { + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.remove(index); + onChanged(); + } else { + policyRuleDeviceListBuilder_.remove(index); + } + return this; + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public policy.Policy.PolicyRuleDevice.Builder getPolicyRuleDeviceListBuilder(int index) { + return getPolicyRuleDeviceListFieldBuilder().getBuilder(index); + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public policy.Policy.PolicyRuleDeviceOrBuilder getPolicyRuleDeviceListOrBuilder(int index) { + if (policyRuleDeviceListBuilder_ == null) { + return policyRuleDeviceList_.get(index); + } else { + return policyRuleDeviceListBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public java.util.List getPolicyRuleDeviceListOrBuilderList() { + if (policyRuleDeviceListBuilder_ != null) { + return policyRuleDeviceListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyRuleDeviceList_); + } + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public policy.Policy.PolicyRuleDevice.Builder addPolicyRuleDeviceListBuilder() { + return getPolicyRuleDeviceListFieldBuilder().addBuilder(policy.Policy.PolicyRuleDevice.getDefaultInstance()); + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public policy.Policy.PolicyRuleDevice.Builder addPolicyRuleDeviceListBuilder(int index) { + return getPolicyRuleDeviceListFieldBuilder().addBuilder(index, policy.Policy.PolicyRuleDevice.getDefaultInstance()); + } + + /** + * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; + */ + public java.util.List getPolicyRuleDeviceListBuilderList() { + return getPolicyRuleDeviceListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getPolicyRuleDeviceListFieldBuilder() { + if (policyRuleDeviceListBuilder_ == null) { + policyRuleDeviceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(policyRuleDeviceList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + policyRuleDeviceList_ = null; + } + return policyRuleDeviceListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleDeviceList) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleDeviceList) + private static final policy.Policy.PolicyRuleDeviceList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleDeviceList(); + } + + public static policy.Policy.PolicyRuleDeviceList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; - public static final int DEVICELIST_FIELD_NUMBER = 2; - private java.util.List deviceList_; - /** - *
-     * Affected device(s)
-     * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - @java.lang.Override - public java.util.List getDeviceListList() { - return deviceList_; - } - /** - *
-     * Affected device(s)
-     * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - @java.lang.Override - public java.util.List - getDeviceListOrBuilderList() { - return deviceList_; - } - /** - *
-     * Affected device(s)
-     * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - @java.lang.Override - public int getDeviceListCount() { - return deviceList_.size(); - } - /** - *
-     * Affected device(s)
-     * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceList(int index) { - return deviceList_.get(index); - } - /** - *
-     * Affected device(s)
-     * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( - int index) { - return deviceList_.get(index); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - memoizedIsInitialized = 1; - return true; + @java.lang.Override + public policy.Policy.PolicyRuleDeviceList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (policyRuleBasic_ != null) { - output.writeMessage(1, getPolicyRuleBasic()); - } - for (int i = 0; i < deviceList_.size(); i++) { - output.writeMessage(2, deviceList_.get(i)); - } - unknownFields.writeTo(output); - } + public interface PolicyRuleListOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRuleList) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (policyRuleBasic_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getPolicyRuleBasic()); - } - for (int i = 0; i < deviceList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, deviceList_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + java.util.List getPolicyRulesList(); - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.Policy.PolicyRuleDevice)) { - return super.equals(obj); - } - policy.Policy.PolicyRuleDevice other = (policy.Policy.PolicyRuleDevice) obj; - - if (hasPolicyRuleBasic() != other.hasPolicyRuleBasic()) return false; - if (hasPolicyRuleBasic()) { - if (!getPolicyRuleBasic() - .equals(other.getPolicyRuleBasic())) return false; - } - if (!getDeviceListList() - .equals(other.getDeviceListList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + policy.Policy.PolicyRule getPolicyRules(int index); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPolicyRuleBasic()) { - hash = (37 * hash) + POLICYRULEBASIC_FIELD_NUMBER; - hash = (53 * hash) + getPolicyRuleBasic().hashCode(); - } - if (getDeviceListCount() > 0) { - hash = (37 * hash) + DEVICELIST_FIELD_NUMBER; - hash = (53 * hash) + getDeviceListList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + int getPolicyRulesCount(); - public static policy.Policy.PolicyRuleDevice parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleDevice parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleDevice parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleDevice parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleDevice parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleDevice parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleDevice parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleDevice parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleDevice parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleDevice parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleDevice parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleDevice parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + java.util.List getPolicyRulesOrBuilderList(); - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.Policy.PolicyRuleDevice prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + policy.Policy.PolicyRuleOrBuilder getPolicyRulesOrBuilder(int index); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** *
-     * Device-oriented policy rule
+     * A list of policy rules
      * 
* - * Protobuf type {@code policy.PolicyRuleDevice} + * Protobuf type {@code policy.PolicyRuleList} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleDevice) - policy.Policy.PolicyRuleDeviceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleDevice_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleDevice_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleDevice.class, policy.Policy.PolicyRuleDevice.Builder.class); - } - - // 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; - policyRuleBasicBuilder_ = null; - } - if (deviceListBuilder_ == null) { - deviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - deviceListBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRuleDevice_descriptor; - } - - @java.lang.Override - public policy.Policy.PolicyRuleDevice getDefaultInstanceForType() { - return policy.Policy.PolicyRuleDevice.getDefaultInstance(); - } - - @java.lang.Override - public policy.Policy.PolicyRuleDevice build() { - policy.Policy.PolicyRuleDevice result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - if (deviceListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - deviceList_ = java.util.Collections.unmodifiableList(deviceList_); - bitField0_ = (bitField0_ & ~0x00000001); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.Policy.PolicyRuleDevice) { - return mergeFrom((policy.Policy.PolicyRuleDevice)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(policy.Policy.PolicyRuleDevice other) { - if (other == policy.Policy.PolicyRuleDevice.getDefaultInstance()) return this; - if (other.hasPolicyRuleBasic()) { - mergePolicyRuleBasic(other.getPolicyRuleBasic()); - } - if (deviceListBuilder_ == null) { - if (!other.deviceList_.isEmpty()) { - if (deviceList_.isEmpty()) { - deviceList_ = other.deviceList_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeviceListIsMutable(); - deviceList_.addAll(other.deviceList_); - } - onChanged(); - } - } else { - if (!other.deviceList_.isEmpty()) { - if (deviceListBuilder_.isEmpty()) { - deviceListBuilder_.dispose(); - deviceListBuilder_ = null; - deviceList_ = other.deviceList_; - bitField0_ = (bitField0_ & ~0x00000001); - deviceListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDeviceListFieldBuilder() : null; - } else { - deviceListBuilder_.addAllMessages(other.deviceList_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleDevice) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private policy.Policy.PolicyRuleBasic policyRuleBasic_; - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleBasic, policy.Policy.PolicyRuleBasic.Builder, policy.Policy.PolicyRuleBasicOrBuilder> policyRuleBasicBuilder_; - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - * @return Whether the policyRuleBasic field is set. - */ - public boolean hasPolicyRuleBasic() { - return policyRuleBasicBuilder_ != null || policyRuleBasic_ != null; - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - * @return The policyRuleBasic. - */ - public policy.Policy.PolicyRuleBasic getPolicyRuleBasic() { - if (policyRuleBasicBuilder_ == null) { - return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; - } else { - return policyRuleBasicBuilder_.getMessage(); - } - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - public Builder setPolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { - if (policyRuleBasicBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policyRuleBasic_ = value; - onChanged(); - } else { - policyRuleBasicBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - public Builder setPolicyRuleBasic( - policy.Policy.PolicyRuleBasic.Builder builderForValue) { - if (policyRuleBasicBuilder_ == null) { - policyRuleBasic_ = builderForValue.build(); - onChanged(); - } else { - policyRuleBasicBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - public Builder mergePolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { - if (policyRuleBasicBuilder_ == null) { - if (policyRuleBasic_ != null) { - policyRuleBasic_ = - policy.Policy.PolicyRuleBasic.newBuilder(policyRuleBasic_).mergeFrom(value).buildPartial(); - } else { - policyRuleBasic_ = value; - } - onChanged(); - } else { - policyRuleBasicBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - public Builder clearPolicyRuleBasic() { - if (policyRuleBasicBuilder_ == null) { - policyRuleBasic_ = null; - onChanged(); - } else { - policyRuleBasic_ = null; - policyRuleBasicBuilder_ = null; - } - - return this; - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - public policy.Policy.PolicyRuleBasic.Builder getPolicyRuleBasicBuilder() { - - onChanged(); - return getPolicyRuleBasicFieldBuilder().getBuilder(); - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { - if (policyRuleBasicBuilder_ != null) { - return policyRuleBasicBuilder_.getMessageOrBuilder(); - } else { - return policyRuleBasic_ == null ? - policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; - } - } - /** - *
-       * Basic policy rule attributes
-       * 
- * - * .policy.PolicyRuleBasic policyRuleBasic = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleBasic, policy.Policy.PolicyRuleBasic.Builder, policy.Policy.PolicyRuleBasicOrBuilder> - getPolicyRuleBasicFieldBuilder() { - if (policyRuleBasicBuilder_ == null) { - policyRuleBasicBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleBasic, policy.Policy.PolicyRuleBasic.Builder, policy.Policy.PolicyRuleBasicOrBuilder>( - getPolicyRuleBasic(), - getParentForChildren(), - isClean()); - policyRuleBasic_ = null; - } - return policyRuleBasicBuilder_; - } - - private java.util.List deviceList_ = - java.util.Collections.emptyList(); - private void ensureDeviceListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deviceList_ = new java.util.ArrayList(deviceList_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceListBuilder_; - - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public java.util.List getDeviceListList() { - if (deviceListBuilder_ == null) { - return java.util.Collections.unmodifiableList(deviceList_); - } else { - return deviceListBuilder_.getMessageList(); - } - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public int getDeviceListCount() { - if (deviceListBuilder_ == null) { - return deviceList_.size(); - } else { - return deviceListBuilder_.getCount(); - } - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public context.ContextOuterClass.DeviceId getDeviceList(int index) { - if (deviceListBuilder_ == null) { - return deviceList_.get(index); - } else { - return deviceListBuilder_.getMessage(index); - } - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public Builder setDeviceList( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceListIsMutable(); - deviceList_.set(index, value); - onChanged(); - } else { - deviceListBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public Builder setDeviceList( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - deviceList_.set(index, builderForValue.build()); - onChanged(); - } else { - deviceListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public Builder addDeviceList(context.ContextOuterClass.DeviceId value) { - if (deviceListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceListIsMutable(); - deviceList_.add(value); - onChanged(); - } else { - deviceListBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public Builder addDeviceList( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceListIsMutable(); - deviceList_.add(index, value); - onChanged(); - } else { - deviceListBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public Builder addDeviceList( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - deviceList_.add(builderForValue.build()); - onChanged(); - } else { - deviceListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public Builder addDeviceList( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - deviceList_.add(index, builderForValue.build()); - onChanged(); - } else { - deviceListBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public Builder addAllDeviceList( - java.lang.Iterable values) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deviceList_); - onChanged(); - } else { - deviceListBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public Builder clearDeviceList() { - if (deviceListBuilder_ == null) { - deviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - deviceListBuilder_.clear(); - } - return this; - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public Builder removeDeviceList(int index) { - if (deviceListBuilder_ == null) { - ensureDeviceListIsMutable(); - deviceList_.remove(index); - onChanged(); - } else { - deviceListBuilder_.remove(index); - } - return this; - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceListBuilder( - int index) { - return getDeviceListFieldBuilder().getBuilder(index); - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceListOrBuilder( - int index) { - if (deviceListBuilder_ == null) { - return deviceList_.get(index); } else { - return deviceListBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public java.util.List - getDeviceListOrBuilderList() { - if (deviceListBuilder_ != null) { - return deviceListBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deviceList_); - } - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder() { - return getDeviceListFieldBuilder().addBuilder( - context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceListBuilder( - int index) { - return getDeviceListFieldBuilder().addBuilder( - index, context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - *
-       * Affected device(s)
-       * 
- * - * repeated .context.DeviceId deviceList = 2; - */ - public java.util.List - getDeviceListBuilderList() { - return getDeviceListFieldBuilder().getBuilderList(); - } - 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()); - deviceList_ = null; - } - return deviceListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleDevice) - } - - // @@protoc_insertion_point(class_scope:policy.PolicyRuleDevice) - private static final policy.Policy.PolicyRuleDevice DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRuleDevice(); - } + public static final class PolicyRuleList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRuleList) + PolicyRuleListOrBuilder { - public static policy.Policy.PolicyRuleDevice getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final long serialVersionUID = 0L; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + // Use PolicyRuleList.newBuilder() to construct. + private PolicyRuleList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private PolicyRuleList() { + policyRules_ = java.util.Collections.emptyList(); + } - @java.lang.Override - public policy.Policy.PolicyRuleDevice getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PolicyRuleList(); + } - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - public interface PolicyRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRule) - com.google.protobuf.MessageOrBuilder { + 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(); + 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(); + } + } - /** - * .policy.PolicyRuleService service = 1; - * @return Whether the service field is set. - */ - boolean hasService(); - /** - * .policy.PolicyRuleService service = 1; - * @return The service. - */ - policy.Policy.PolicyRuleService getService(); - /** - * .policy.PolicyRuleService service = 1; - */ - policy.Policy.PolicyRuleServiceOrBuilder getServiceOrBuilder(); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleList_descriptor; + } - /** - * .policy.PolicyRuleDevice device = 2; - * @return Whether the device field is set. - */ - boolean hasDevice(); - /** - * .policy.PolicyRuleDevice device = 2; - * @return The device. - */ - policy.Policy.PolicyRuleDevice getDevice(); - /** - * .policy.PolicyRuleDevice device = 2; - */ - policy.Policy.PolicyRuleDeviceOrBuilder getDeviceOrBuilder(); - - public policy.Policy.PolicyRule.PolicyRuleCase getPolicyRuleCase(); - } - /** - *
-   * Wrapper policy rule object
-   * 
- * - * Protobuf type {@code policy.PolicyRule} - */ - public static final class PolicyRule extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRule) - PolicyRuleOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRule.newBuilder() to construct. - private PolicyRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRule() { - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleList_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleList.class, policy.Policy.PolicyRuleList.Builder.class); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRule(); - } + public static final int POLICYRULES_FIELD_NUMBER = 1; - @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; - } + private java.util.List policyRules_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRule.class, policy.Policy.PolicyRule.Builder.class); - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + @java.lang.Override + public java.util.List getPolicyRulesList() { + return policyRules_; + } - private int policyRuleCase_ = 0; - private java.lang.Object policyRule_; - public enum PolicyRuleCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SERVICE(1), - DEVICE(2), - POLICYRULE_NOT_SET(0); - private final int value; - private PolicyRuleCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PolicyRuleCase valueOf(int value) { - return forNumber(value); - } - - public static PolicyRuleCase forNumber(int value) { - switch (value) { - case 1: return SERVICE; - case 2: return DEVICE; - case 0: return POLICYRULE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public PolicyRuleCase - getPolicyRuleCase() { - return PolicyRuleCase.forNumber( - policyRuleCase_); - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + @java.lang.Override + public java.util.List getPolicyRulesOrBuilderList() { + return policyRules_; + } - public static final int SERVICE_FIELD_NUMBER = 1; - /** - * .policy.PolicyRuleService service = 1; - * @return Whether the service field is set. - */ - @java.lang.Override - public boolean hasService() { - return policyRuleCase_ == 1; - } - /** - * .policy.PolicyRuleService service = 1; - * @return The service. - */ - @java.lang.Override - public policy.Policy.PolicyRuleService getService() { - if (policyRuleCase_ == 1) { - return (policy.Policy.PolicyRuleService) policyRule_; - } - return policy.Policy.PolicyRuleService.getDefaultInstance(); - } - /** - * .policy.PolicyRuleService service = 1; - */ - @java.lang.Override - public policy.Policy.PolicyRuleServiceOrBuilder getServiceOrBuilder() { - if (policyRuleCase_ == 1) { - return (policy.Policy.PolicyRuleService) policyRule_; - } - return policy.Policy.PolicyRuleService.getDefaultInstance(); - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + @java.lang.Override + public int getPolicyRulesCount() { + return policyRules_.size(); + } - public static final int DEVICE_FIELD_NUMBER = 2; - /** - * .policy.PolicyRuleDevice device = 2; - * @return Whether the device field is set. - */ - @java.lang.Override - public boolean hasDevice() { - return policyRuleCase_ == 2; - } - /** - * .policy.PolicyRuleDevice device = 2; - * @return The device. - */ - @java.lang.Override - public policy.Policy.PolicyRuleDevice getDevice() { - if (policyRuleCase_ == 2) { - return (policy.Policy.PolicyRuleDevice) policyRule_; - } - return policy.Policy.PolicyRuleDevice.getDefaultInstance(); - } - /** - * .policy.PolicyRuleDevice device = 2; - */ - @java.lang.Override - public policy.Policy.PolicyRuleDeviceOrBuilder getDeviceOrBuilder() { - if (policyRuleCase_ == 2) { - return (policy.Policy.PolicyRuleDevice) policyRule_; - } - return policy.Policy.PolicyRuleDevice.getDefaultInstance(); - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRule getPolicyRules(int index) { + return policyRules_.get(index); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + @java.lang.Override + public policy.Policy.PolicyRuleOrBuilder getPolicyRulesOrBuilder(int index) { + return policyRules_.get(index); + } - memoizedIsInitialized = 1; - return true; - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (policyRuleCase_ == 1) { - output.writeMessage(1, (policy.Policy.PolicyRuleService) policyRule_); - } - if (policyRuleCase_ == 2) { - output.writeMessage(2, (policy.Policy.PolicyRuleDevice) policyRule_); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (policyRuleCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (policy.Policy.PolicyRuleService) policyRule_); - } - if (policyRuleCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (policy.Policy.PolicyRuleDevice) policyRule_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < policyRules_.size(); i++) { + output.writeMessage(1, policyRules_.get(i)); + } + unknownFields.writeTo(output); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.Policy.PolicyRule)) { - return super.equals(obj); - } - policy.Policy.PolicyRule other = (policy.Policy.PolicyRule) obj; - - if (!getPolicyRuleCase().equals(other.getPolicyRuleCase())) return false; - switch (policyRuleCase_) { - case 1: - if (!getService() - .equals(other.getService())) return false; - break; - case 2: - if (!getDevice() - .equals(other.getDevice())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < policyRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyRules_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (policyRuleCase_) { - case 1: - hash = (37 * hash) + SERVICE_FIELD_NUMBER; - hash = (53 * hash) + getService().hashCode(); - break; - case 2: - hash = (37 * hash) + DEVICE_FIELD_NUMBER; - hash = (53 * hash) + getDevice().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.Policy.PolicyRuleList)) { + return super.equals(obj); + } + policy.Policy.PolicyRuleList other = (policy.Policy.PolicyRuleList) obj; + if (!getPolicyRulesList().equals(other.getPolicyRulesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyRulesCount() > 0) { + hash = (37 * hash) + POLICYRULES_FIELD_NUMBER; + hash = (53 * hash) + getPolicyRulesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - public static policy.Policy.PolicyRule parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRule parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static policy.Policy.PolicyRuleList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.Policy.PolicyRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static policy.Policy.PolicyRuleList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Wrapper policy rule object
-     * 
- * - * Protobuf type {@code policy.PolicyRule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRule) - policy.Policy.PolicyRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRule.class, policy.Policy.PolicyRule.Builder.class); - } - - // 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(); - policyRuleCase_ = 0; - policyRule_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRule_descriptor; - } - - @java.lang.Override - public policy.Policy.PolicyRule getDefaultInstanceForType() { - return policy.Policy.PolicyRule.getDefaultInstance(); - } - - @java.lang.Override - 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); - } - @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 policy.Policy.PolicyRule) { - return mergeFrom((policy.Policy.PolicyRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(policy.Policy.PolicyRule other) { - if (other == policy.Policy.PolicyRule.getDefaultInstance()) return this; - switch (other.getPolicyRuleCase()) { - case SERVICE: { - mergeService(other.getService()); - break; - } - case DEVICE: { - mergeDevice(other.getDevice()); - break; - } - case POLICYRULE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRule) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int policyRuleCase_ = 0; - private java.lang.Object policyRule_; - public PolicyRuleCase - getPolicyRuleCase() { - return PolicyRuleCase.forNumber( - policyRuleCase_); - } - - public Builder clearPolicyRule() { - policyRuleCase_ = 0; - policyRule_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleService.Builder, policy.Policy.PolicyRuleServiceOrBuilder> serviceBuilder_; - /** - * .policy.PolicyRuleService service = 1; - * @return Whether the service field is set. - */ - @java.lang.Override - public boolean hasService() { - return policyRuleCase_ == 1; - } - /** - * .policy.PolicyRuleService service = 1; - * @return The service. - */ - @java.lang.Override - public policy.Policy.PolicyRuleService getService() { - if (serviceBuilder_ == null) { - if (policyRuleCase_ == 1) { - return (policy.Policy.PolicyRuleService) policyRule_; - } - return policy.Policy.PolicyRuleService.getDefaultInstance(); - } else { - if (policyRuleCase_ == 1) { - return serviceBuilder_.getMessage(); - } - return policy.Policy.PolicyRuleService.getDefaultInstance(); - } - } - /** - * .policy.PolicyRuleService service = 1; - */ - public Builder setService(policy.Policy.PolicyRuleService value) { - if (serviceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policyRule_ = value; - onChanged(); - } else { - serviceBuilder_.setMessage(value); - } - policyRuleCase_ = 1; - return this; - } - /** - * .policy.PolicyRuleService service = 1; - */ - public Builder setService( - policy.Policy.PolicyRuleService.Builder builderForValue) { - if (serviceBuilder_ == null) { - policyRule_ = builderForValue.build(); - onChanged(); - } else { - serviceBuilder_.setMessage(builderForValue.build()); - } - policyRuleCase_ = 1; - return this; - } - /** - * .policy.PolicyRuleService service = 1; - */ - public Builder mergeService(policy.Policy.PolicyRuleService value) { - if (serviceBuilder_ == null) { - if (policyRuleCase_ == 1 && - policyRule_ != policy.Policy.PolicyRuleService.getDefaultInstance()) { - policyRule_ = policy.Policy.PolicyRuleService.newBuilder((policy.Policy.PolicyRuleService) policyRule_) - .mergeFrom(value).buildPartial(); - } else { - policyRule_ = value; - } - onChanged(); - } else { - if (policyRuleCase_ == 1) { - serviceBuilder_.mergeFrom(value); - } - serviceBuilder_.setMessage(value); - } - policyRuleCase_ = 1; - return this; - } - /** - * .policy.PolicyRuleService service = 1; - */ - public Builder clearService() { - if (serviceBuilder_ == null) { - if (policyRuleCase_ == 1) { - policyRuleCase_ = 0; - policyRule_ = null; - onChanged(); - } - } else { - if (policyRuleCase_ == 1) { - policyRuleCase_ = 0; - policyRule_ = null; - } - serviceBuilder_.clear(); - } - return this; - } - /** - * .policy.PolicyRuleService service = 1; - */ - public policy.Policy.PolicyRuleService.Builder getServiceBuilder() { - return getServiceFieldBuilder().getBuilder(); - } - /** - * .policy.PolicyRuleService service = 1; - */ - @java.lang.Override - public policy.Policy.PolicyRuleServiceOrBuilder getServiceOrBuilder() { - if ((policyRuleCase_ == 1) && (serviceBuilder_ != null)) { - return serviceBuilder_.getMessageOrBuilder(); - } else { - if (policyRuleCase_ == 1) { - return (policy.Policy.PolicyRuleService) policyRule_; - } - return policy.Policy.PolicyRuleService.getDefaultInstance(); - } - } - /** - * .policy.PolicyRuleService service = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleService.Builder, policy.Policy.PolicyRuleServiceOrBuilder> - getServiceFieldBuilder() { - if (serviceBuilder_ == null) { - if (!(policyRuleCase_ == 1)) { - policyRule_ = policy.Policy.PolicyRuleService.getDefaultInstance(); - } - serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleService.Builder, policy.Policy.PolicyRuleServiceOrBuilder>( - (policy.Policy.PolicyRuleService) policyRule_, - getParentForChildren(), - isClean()); - policyRule_ = null; - } - policyRuleCase_ = 1; - onChanged();; - return serviceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleDevice.Builder, policy.Policy.PolicyRuleDeviceOrBuilder> deviceBuilder_; - /** - * .policy.PolicyRuleDevice device = 2; - * @return Whether the device field is set. - */ - @java.lang.Override - public boolean hasDevice() { - return policyRuleCase_ == 2; - } - /** - * .policy.PolicyRuleDevice device = 2; - * @return The device. - */ - @java.lang.Override - public policy.Policy.PolicyRuleDevice getDevice() { - if (deviceBuilder_ == null) { - if (policyRuleCase_ == 2) { - return (policy.Policy.PolicyRuleDevice) policyRule_; - } - return policy.Policy.PolicyRuleDevice.getDefaultInstance(); - } else { - if (policyRuleCase_ == 2) { - return deviceBuilder_.getMessage(); - } - return policy.Policy.PolicyRuleDevice.getDefaultInstance(); - } - } - /** - * .policy.PolicyRuleDevice device = 2; - */ - public Builder setDevice(policy.Policy.PolicyRuleDevice value) { - if (deviceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policyRule_ = value; - onChanged(); - } else { - deviceBuilder_.setMessage(value); - } - policyRuleCase_ = 2; - return this; - } - /** - * .policy.PolicyRuleDevice device = 2; - */ - public Builder setDevice( - policy.Policy.PolicyRuleDevice.Builder builderForValue) { - if (deviceBuilder_ == null) { - policyRule_ = builderForValue.build(); - onChanged(); - } else { - deviceBuilder_.setMessage(builderForValue.build()); - } - policyRuleCase_ = 2; - return this; - } - /** - * .policy.PolicyRuleDevice device = 2; - */ - public Builder mergeDevice(policy.Policy.PolicyRuleDevice value) { - if (deviceBuilder_ == null) { - if (policyRuleCase_ == 2 && - policyRule_ != policy.Policy.PolicyRuleDevice.getDefaultInstance()) { - policyRule_ = policy.Policy.PolicyRuleDevice.newBuilder((policy.Policy.PolicyRuleDevice) policyRule_) - .mergeFrom(value).buildPartial(); - } else { - policyRule_ = value; - } - onChanged(); - } else { - if (policyRuleCase_ == 2) { - deviceBuilder_.mergeFrom(value); - } - deviceBuilder_.setMessage(value); - } - policyRuleCase_ = 2; - return this; - } - /** - * .policy.PolicyRuleDevice device = 2; - */ - public Builder clearDevice() { - if (deviceBuilder_ == null) { - if (policyRuleCase_ == 2) { - policyRuleCase_ = 0; - policyRule_ = null; - onChanged(); - } - } else { - if (policyRuleCase_ == 2) { - policyRuleCase_ = 0; - policyRule_ = null; - } - deviceBuilder_.clear(); - } - return this; - } - /** - * .policy.PolicyRuleDevice device = 2; - */ - public policy.Policy.PolicyRuleDevice.Builder getDeviceBuilder() { - return getDeviceFieldBuilder().getBuilder(); - } - /** - * .policy.PolicyRuleDevice device = 2; - */ - @java.lang.Override - public policy.Policy.PolicyRuleDeviceOrBuilder getDeviceOrBuilder() { - if ((policyRuleCase_ == 2) && (deviceBuilder_ != null)) { - return deviceBuilder_.getMessageOrBuilder(); - } else { - if (policyRuleCase_ == 2) { - return (policy.Policy.PolicyRuleDevice) policyRule_; - } - return policy.Policy.PolicyRuleDevice.getDefaultInstance(); - } - } - /** - * .policy.PolicyRuleDevice device = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleDevice.Builder, policy.Policy.PolicyRuleDeviceOrBuilder> - getDeviceFieldBuilder() { - if (deviceBuilder_ == null) { - if (!(policyRuleCase_ == 2)) { - policyRule_ = policy.Policy.PolicyRuleDevice.getDefaultInstance(); - } - deviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleDevice.Builder, policy.Policy.PolicyRuleDeviceOrBuilder>( - (policy.Policy.PolicyRuleDevice) policyRule_, - getParentForChildren(), - isClean()); - policyRule_ = null; - } - policyRuleCase_ = 2; - onChanged();; - return deviceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.PolicyRule) - } + public static policy.Policy.PolicyRuleList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(class_scope:policy.PolicyRule) - private static final policy.Policy.PolicyRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRule(); - } + public static policy.Policy.PolicyRuleList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static policy.Policy.PolicyRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static policy.Policy.PolicyRuleList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static policy.Policy.PolicyRuleList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static policy.Policy.PolicyRuleList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public policy.Policy.PolicyRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static policy.Policy.PolicyRuleList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - } + public static policy.Policy.PolicyRuleList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - public interface PolicyRuleIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleIdList) - com.google.protobuf.MessageOrBuilder { + public static policy.Policy.PolicyRuleList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - java.util.List - getPolicyRuleIdListList(); - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - policy.Policy.PolicyRuleId getPolicyRuleIdList(int index); - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - int getPolicyRuleIdListCount(); - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - java.util.List - getPolicyRuleIdListOrBuilderList(); - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdListOrBuilder( - int index); - } - /** - *
-   * A list of policy rule IDs
-   * 
- * - * Protobuf type {@code policy.PolicyRuleIdList} - */ - public static final class PolicyRuleIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleIdList) - PolicyRuleIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRuleIdList.newBuilder() to construct. - private PolicyRuleIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRuleIdList() { - policyRuleIdList_ = java.util.Collections.emptyList(); - } + public static policy.Policy.PolicyRuleList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRuleIdList(); - } + public static policy.Policy.PolicyRuleList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @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(); - 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; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleIdList.class, policy.Policy.PolicyRuleIdList.Builder.class); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public static final int POLICYRULEIDLIST_FIELD_NUMBER = 1; - private java.util.List policyRuleIdList_; - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - @java.lang.Override - public java.util.List getPolicyRuleIdListList() { - return policyRuleIdList_; - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - @java.lang.Override - public java.util.List - getPolicyRuleIdListOrBuilderList() { - return policyRuleIdList_; - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - @java.lang.Override - public int getPolicyRuleIdListCount() { - return policyRuleIdList_.size(); - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - @java.lang.Override - public policy.Policy.PolicyRuleId getPolicyRuleIdList(int index) { - return policyRuleIdList_.get(index); - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - @java.lang.Override - public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdListOrBuilder( - int index) { - return policyRuleIdList_.get(index); - } + public static Builder newBuilder(policy.Policy.PolicyRuleList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < policyRuleIdList_.size(); i++) { - output.writeMessage(1, policyRuleIdList_.get(i)); - } - unknownFields.writeTo(output); - } + /** + *
+         * A list of policy rules
+         * 
+ * + * Protobuf type {@code policy.PolicyRuleList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRuleList) + policy.Policy.PolicyRuleListOrBuilder { - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < policyRuleIdList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, policyRuleIdList_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.Policy.internal_static_policy_PolicyRuleList_descriptor; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.Policy.PolicyRuleIdList)) { - return super.equals(obj); - } - policy.Policy.PolicyRuleIdList other = (policy.Policy.PolicyRuleIdList) obj; - - if (!getPolicyRuleIdListList() - .equals(other.getPolicyRuleIdListList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.Policy.internal_static_policy_PolicyRuleList_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.Policy.PolicyRuleList.class, policy.Policy.PolicyRuleList.Builder.class); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPolicyRuleIdListCount() > 0) { - hash = (37 * hash) + POLICYRULEIDLIST_FIELD_NUMBER; - hash = (53 * hash) + getPolicyRuleIdListList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + // Construct using policy.Policy.PolicyRuleList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - public static policy.Policy.PolicyRuleIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.Policy.PolicyRuleIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPolicyRulesFieldBuilder(); + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A list of policy rule IDs
-     * 
- * - * Protobuf type {@code policy.PolicyRuleIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleIdList) - policy.Policy.PolicyRuleIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleIdList.class, policy.Policy.PolicyRuleIdList.Builder.class); - } - - // 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(); - if (policyRuleIdListBuilder_ == null) { - policyRuleIdList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - policyRuleIdListBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRuleIdList_descriptor; - } - - @java.lang.Override - public policy.Policy.PolicyRuleIdList getDefaultInstanceForType() { - return policy.Policy.PolicyRuleIdList.getDefaultInstance(); - } - - @java.lang.Override - public policy.Policy.PolicyRuleIdList build() { - policy.Policy.PolicyRuleIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public policy.Policy.PolicyRuleIdList buildPartial() { - policy.Policy.PolicyRuleIdList result = new policy.Policy.PolicyRuleIdList(this); - int from_bitField0_ = bitField0_; - if (policyRuleIdListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - policyRuleIdList_ = java.util.Collections.unmodifiableList(policyRuleIdList_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.policyRuleIdList_ = policyRuleIdList_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.Policy.PolicyRuleIdList) { - return mergeFrom((policy.Policy.PolicyRuleIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(policy.Policy.PolicyRuleIdList other) { - if (other == policy.Policy.PolicyRuleIdList.getDefaultInstance()) return this; - if (policyRuleIdListBuilder_ == null) { - if (!other.policyRuleIdList_.isEmpty()) { - if (policyRuleIdList_.isEmpty()) { - policyRuleIdList_ = other.policyRuleIdList_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePolicyRuleIdListIsMutable(); - policyRuleIdList_.addAll(other.policyRuleIdList_); - } - onChanged(); - } - } else { - if (!other.policyRuleIdList_.isEmpty()) { - if (policyRuleIdListBuilder_.isEmpty()) { - policyRuleIdListBuilder_.dispose(); - policyRuleIdListBuilder_ = null; - policyRuleIdList_ = other.policyRuleIdList_; - bitField0_ = (bitField0_ & ~0x00000001); - policyRuleIdListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPolicyRuleIdListFieldBuilder() : null; - } else { - policyRuleIdListBuilder_.addAllMessages(other.policyRuleIdList_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List policyRuleIdList_ = - java.util.Collections.emptyList(); - private void ensurePolicyRuleIdListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - policyRuleIdList_ = new java.util.ArrayList(policyRuleIdList_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder> policyRuleIdListBuilder_; - - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public java.util.List getPolicyRuleIdListList() { - if (policyRuleIdListBuilder_ == null) { - return java.util.Collections.unmodifiableList(policyRuleIdList_); - } else { - return policyRuleIdListBuilder_.getMessageList(); - } - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public int getPolicyRuleIdListCount() { - if (policyRuleIdListBuilder_ == null) { - return policyRuleIdList_.size(); - } else { - return policyRuleIdListBuilder_.getCount(); - } - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public policy.Policy.PolicyRuleId getPolicyRuleIdList(int index) { - if (policyRuleIdListBuilder_ == null) { - return policyRuleIdList_.get(index); - } else { - return policyRuleIdListBuilder_.getMessage(index); - } - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public Builder setPolicyRuleIdList( - int index, policy.Policy.PolicyRuleId value) { - if (policyRuleIdListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyRuleIdListIsMutable(); - policyRuleIdList_.set(index, value); - onChanged(); - } else { - policyRuleIdListBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public Builder setPolicyRuleIdList( - int index, policy.Policy.PolicyRuleId.Builder builderForValue) { - if (policyRuleIdListBuilder_ == null) { - ensurePolicyRuleIdListIsMutable(); - policyRuleIdList_.set(index, builderForValue.build()); - onChanged(); - } else { - policyRuleIdListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public Builder addPolicyRuleIdList(policy.Policy.PolicyRuleId value) { - if (policyRuleIdListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyRuleIdListIsMutable(); - policyRuleIdList_.add(value); - onChanged(); - } else { - policyRuleIdListBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public Builder addPolicyRuleIdList( - int index, policy.Policy.PolicyRuleId value) { - if (policyRuleIdListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyRuleIdListIsMutable(); - policyRuleIdList_.add(index, value); - onChanged(); - } else { - policyRuleIdListBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public Builder addPolicyRuleIdList( - policy.Policy.PolicyRuleId.Builder builderForValue) { - if (policyRuleIdListBuilder_ == null) { - ensurePolicyRuleIdListIsMutable(); - policyRuleIdList_.add(builderForValue.build()); - onChanged(); - } else { - policyRuleIdListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public Builder addPolicyRuleIdList( - int index, policy.Policy.PolicyRuleId.Builder builderForValue) { - if (policyRuleIdListBuilder_ == null) { - ensurePolicyRuleIdListIsMutable(); - policyRuleIdList_.add(index, builderForValue.build()); - onChanged(); - } else { - policyRuleIdListBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public Builder addAllPolicyRuleIdList( - java.lang.Iterable values) { - if (policyRuleIdListBuilder_ == null) { - ensurePolicyRuleIdListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, policyRuleIdList_); - onChanged(); - } else { - policyRuleIdListBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public Builder clearPolicyRuleIdList() { - if (policyRuleIdListBuilder_ == null) { - policyRuleIdList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - policyRuleIdListBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public Builder removePolicyRuleIdList(int index) { - if (policyRuleIdListBuilder_ == null) { - ensurePolicyRuleIdListIsMutable(); - policyRuleIdList_.remove(index); - onChanged(); - } else { - policyRuleIdListBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public policy.Policy.PolicyRuleId.Builder getPolicyRuleIdListBuilder( - int index) { - return getPolicyRuleIdListFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdListOrBuilder( - int index) { - if (policyRuleIdListBuilder_ == null) { - return policyRuleIdList_.get(index); } else { - return policyRuleIdListBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public java.util.List - getPolicyRuleIdListOrBuilderList() { - if (policyRuleIdListBuilder_ != null) { - return policyRuleIdListBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(policyRuleIdList_); - } - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public policy.Policy.PolicyRuleId.Builder addPolicyRuleIdListBuilder() { - return getPolicyRuleIdListFieldBuilder().addBuilder( - policy.Policy.PolicyRuleId.getDefaultInstance()); - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public policy.Policy.PolicyRuleId.Builder addPolicyRuleIdListBuilder( - int index) { - return getPolicyRuleIdListFieldBuilder().addBuilder( - index, policy.Policy.PolicyRuleId.getDefaultInstance()); - } - /** - * repeated .policy.PolicyRuleId policyRuleIdList = 1; - */ - public java.util.List - getPolicyRuleIdListBuilderList() { - return getPolicyRuleIdListFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder> - getPolicyRuleIdListFieldBuilder() { - if (policyRuleIdListBuilder_ == null) { - policyRuleIdListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleId.Builder, policy.Policy.PolicyRuleIdOrBuilder>( - policyRuleIdList_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - policyRuleIdList_ = null; - } - return policyRuleIdListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleIdList) - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (policyRulesBuilder_ == null) { + policyRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + policyRulesBuilder_.clear(); + } + return this; + } - // @@protoc_insertion_point(class_scope:policy.PolicyRuleIdList) - private static final policy.Policy.PolicyRuleIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRuleIdList(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.Policy.internal_static_policy_PolicyRuleList_descriptor; + } - public static policy.Policy.PolicyRuleIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public policy.Policy.PolicyRuleList getDefaultInstanceForType() { + return policy.Policy.PolicyRuleList.getDefaultInstance(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public policy.Policy.PolicyRuleList build() { + policy.Policy.PolicyRuleList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public policy.Policy.PolicyRuleList buildPartial() { + policy.Policy.PolicyRuleList result = new policy.Policy.PolicyRuleList(this); + int from_bitField0_ = bitField0_; + if (policyRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyRules_ = java.util.Collections.unmodifiableList(policyRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyRules_ = policyRules_; + } else { + result.policyRules_ = policyRulesBuilder_.build(); + } + onBuilt(); + return result; + } - @java.lang.Override - public policy.Policy.PolicyRuleIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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); + } - public interface PolicyRuleServiceListOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleServiceList) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - java.util.List - getPolicyRuleServiceListList(); - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - policy.Policy.PolicyRuleService getPolicyRuleServiceList(int index); - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - int getPolicyRuleServiceListCount(); - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - java.util.List - getPolicyRuleServiceListOrBuilderList(); - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - policy.Policy.PolicyRuleServiceOrBuilder getPolicyRuleServiceListOrBuilder( - int index); - } - /** - *
-   * A list of service-oriented policy rules
-   * 
- * - * Protobuf type {@code policy.PolicyRuleServiceList} - */ - public static final class PolicyRuleServiceList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleServiceList) - PolicyRuleServiceListOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRuleServiceList.newBuilder() to construct. - private PolicyRuleServiceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRuleServiceList() { - policyRuleServiceList_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRuleServiceList(); - } + @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 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(); - 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; - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleServiceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleServiceList.class, policy.Policy.PolicyRuleServiceList.Builder.class); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.Policy.PolicyRuleList) { + return mergeFrom((policy.Policy.PolicyRuleList) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static final int POLICYRULESERVICELIST_FIELD_NUMBER = 1; - private java.util.List policyRuleServiceList_; - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - @java.lang.Override - public java.util.List getPolicyRuleServiceListList() { - return policyRuleServiceList_; - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - @java.lang.Override - public java.util.List - getPolicyRuleServiceListOrBuilderList() { - return policyRuleServiceList_; - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - @java.lang.Override - public int getPolicyRuleServiceListCount() { - return policyRuleServiceList_.size(); - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - @java.lang.Override - public policy.Policy.PolicyRuleService getPolicyRuleServiceList(int index) { - return policyRuleServiceList_.get(index); - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - @java.lang.Override - public policy.Policy.PolicyRuleServiceOrBuilder getPolicyRuleServiceListOrBuilder( - int index) { - return policyRuleServiceList_.get(index); - } + public Builder mergeFrom(policy.Policy.PolicyRuleList other) { + if (other == policy.Policy.PolicyRuleList.getDefaultInstance()) + return this; + if (policyRulesBuilder_ == null) { + if (!other.policyRules_.isEmpty()) { + if (policyRules_.isEmpty()) { + policyRules_ = other.policyRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyRulesIsMutable(); + policyRules_.addAll(other.policyRules_); + } + onChanged(); + } + } else { + if (!other.policyRules_.isEmpty()) { + if (policyRulesBuilder_.isEmpty()) { + policyRulesBuilder_.dispose(); + policyRulesBuilder_ = null; + policyRules_ = other.policyRules_; + bitField0_ = (bitField0_ & ~0x00000001); + policyRulesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPolicyRulesFieldBuilder() : null; + } else { + policyRulesBuilder_.addAllMessages(other.policyRules_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final boolean isInitialized() { + return true; + } - memoizedIsInitialized = 1; - return true; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.Policy.PolicyRuleList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < policyRuleServiceList_.size(); i++) { - output.writeMessage(1, policyRuleServiceList_.get(i)); - } - unknownFields.writeTo(output); - } + private int bitField0_; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < policyRuleServiceList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, policyRuleServiceList_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private java.util.List policyRules_ = java.util.Collections.emptyList(); - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.Policy.PolicyRuleServiceList)) { - return super.equals(obj); - } - policy.Policy.PolicyRuleServiceList other = (policy.Policy.PolicyRuleServiceList) obj; - - if (!getPolicyRuleServiceListList() - .equals(other.getPolicyRuleServiceListList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private void ensurePolicyRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyRules_ = new java.util.ArrayList(policyRules_); + bitField0_ |= 0x00000001; + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPolicyRuleServiceListCount() > 0) { - hash = (37 * hash) + POLICYRULESERVICELIST_FIELD_NUMBER; - hash = (53 * hash) + getPolicyRuleServiceListList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private com.google.protobuf.RepeatedFieldBuilderV3 policyRulesBuilder_; + + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public java.util.List getPolicyRulesList() { + if (policyRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyRules_); + } else { + return policyRulesBuilder_.getMessageList(); + } + } - public static policy.Policy.PolicyRuleServiceList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleServiceList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleServiceList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleServiceList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleServiceList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleServiceList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleServiceList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleServiceList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleServiceList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleServiceList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleServiceList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleServiceList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public int getPolicyRulesCount() { + if (policyRulesBuilder_ == null) { + return policyRules_.size(); + } else { + return policyRulesBuilder_.getCount(); + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.Policy.PolicyRuleServiceList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public policy.Policy.PolicyRule getPolicyRules(int index) { + if (policyRulesBuilder_ == null) { + return policyRules_.get(index); + } else { + return policyRulesBuilder_.getMessage(index); + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A list of service-oriented policy rules
-     * 
- * - * Protobuf type {@code policy.PolicyRuleServiceList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleServiceList) - policy.Policy.PolicyRuleServiceListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleServiceList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleServiceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleServiceList.class, policy.Policy.PolicyRuleServiceList.Builder.class); - } - - // 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(); - if (policyRuleServiceListBuilder_ == null) { - policyRuleServiceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - policyRuleServiceListBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRuleServiceList_descriptor; - } - - @java.lang.Override - public policy.Policy.PolicyRuleServiceList getDefaultInstanceForType() { - return policy.Policy.PolicyRuleServiceList.getDefaultInstance(); - } - - @java.lang.Override - public policy.Policy.PolicyRuleServiceList build() { - policy.Policy.PolicyRuleServiceList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public policy.Policy.PolicyRuleServiceList buildPartial() { - policy.Policy.PolicyRuleServiceList result = new policy.Policy.PolicyRuleServiceList(this); - int from_bitField0_ = bitField0_; - if (policyRuleServiceListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - policyRuleServiceList_ = java.util.Collections.unmodifiableList(policyRuleServiceList_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.policyRuleServiceList_ = policyRuleServiceList_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.Policy.PolicyRuleServiceList) { - return mergeFrom((policy.Policy.PolicyRuleServiceList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(policy.Policy.PolicyRuleServiceList other) { - if (other == policy.Policy.PolicyRuleServiceList.getDefaultInstance()) return this; - if (policyRuleServiceListBuilder_ == null) { - if (!other.policyRuleServiceList_.isEmpty()) { - if (policyRuleServiceList_.isEmpty()) { - policyRuleServiceList_ = other.policyRuleServiceList_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePolicyRuleServiceListIsMutable(); - policyRuleServiceList_.addAll(other.policyRuleServiceList_); - } - onChanged(); - } - } else { - if (!other.policyRuleServiceList_.isEmpty()) { - if (policyRuleServiceListBuilder_.isEmpty()) { - policyRuleServiceListBuilder_.dispose(); - policyRuleServiceListBuilder_ = null; - policyRuleServiceList_ = other.policyRuleServiceList_; - bitField0_ = (bitField0_ & ~0x00000001); - policyRuleServiceListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPolicyRuleServiceListFieldBuilder() : null; - } else { - policyRuleServiceListBuilder_.addAllMessages(other.policyRuleServiceList_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleServiceList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List policyRuleServiceList_ = - java.util.Collections.emptyList(); - private void ensurePolicyRuleServiceListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - policyRuleServiceList_ = new java.util.ArrayList(policyRuleServiceList_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleService.Builder, policy.Policy.PolicyRuleServiceOrBuilder> policyRuleServiceListBuilder_; - - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public java.util.List getPolicyRuleServiceListList() { - if (policyRuleServiceListBuilder_ == null) { - return java.util.Collections.unmodifiableList(policyRuleServiceList_); - } else { - return policyRuleServiceListBuilder_.getMessageList(); - } - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public int getPolicyRuleServiceListCount() { - if (policyRuleServiceListBuilder_ == null) { - return policyRuleServiceList_.size(); - } else { - return policyRuleServiceListBuilder_.getCount(); - } - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public policy.Policy.PolicyRuleService getPolicyRuleServiceList(int index) { - if (policyRuleServiceListBuilder_ == null) { - return policyRuleServiceList_.get(index); - } else { - return policyRuleServiceListBuilder_.getMessage(index); - } - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public Builder setPolicyRuleServiceList( - int index, policy.Policy.PolicyRuleService value) { - if (policyRuleServiceListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyRuleServiceListIsMutable(); - policyRuleServiceList_.set(index, value); - onChanged(); - } else { - policyRuleServiceListBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public Builder setPolicyRuleServiceList( - int index, policy.Policy.PolicyRuleService.Builder builderForValue) { - if (policyRuleServiceListBuilder_ == null) { - ensurePolicyRuleServiceListIsMutable(); - policyRuleServiceList_.set(index, builderForValue.build()); - onChanged(); - } else { - policyRuleServiceListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public Builder addPolicyRuleServiceList(policy.Policy.PolicyRuleService value) { - if (policyRuleServiceListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyRuleServiceListIsMutable(); - policyRuleServiceList_.add(value); - onChanged(); - } else { - policyRuleServiceListBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public Builder addPolicyRuleServiceList( - int index, policy.Policy.PolicyRuleService value) { - if (policyRuleServiceListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyRuleServiceListIsMutable(); - policyRuleServiceList_.add(index, value); - onChanged(); - } else { - policyRuleServiceListBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public Builder addPolicyRuleServiceList( - policy.Policy.PolicyRuleService.Builder builderForValue) { - if (policyRuleServiceListBuilder_ == null) { - ensurePolicyRuleServiceListIsMutable(); - policyRuleServiceList_.add(builderForValue.build()); - onChanged(); - } else { - policyRuleServiceListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public Builder addPolicyRuleServiceList( - int index, policy.Policy.PolicyRuleService.Builder builderForValue) { - if (policyRuleServiceListBuilder_ == null) { - ensurePolicyRuleServiceListIsMutable(); - policyRuleServiceList_.add(index, builderForValue.build()); - onChanged(); - } else { - policyRuleServiceListBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public Builder addAllPolicyRuleServiceList( - java.lang.Iterable values) { - if (policyRuleServiceListBuilder_ == null) { - ensurePolicyRuleServiceListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, policyRuleServiceList_); - onChanged(); - } else { - policyRuleServiceListBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public Builder clearPolicyRuleServiceList() { - if (policyRuleServiceListBuilder_ == null) { - policyRuleServiceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - policyRuleServiceListBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public Builder removePolicyRuleServiceList(int index) { - if (policyRuleServiceListBuilder_ == null) { - ensurePolicyRuleServiceListIsMutable(); - policyRuleServiceList_.remove(index); - onChanged(); - } else { - policyRuleServiceListBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public policy.Policy.PolicyRuleService.Builder getPolicyRuleServiceListBuilder( - int index) { - return getPolicyRuleServiceListFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public policy.Policy.PolicyRuleServiceOrBuilder getPolicyRuleServiceListOrBuilder( - int index) { - if (policyRuleServiceListBuilder_ == null) { - return policyRuleServiceList_.get(index); } else { - return policyRuleServiceListBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public java.util.List - getPolicyRuleServiceListOrBuilderList() { - if (policyRuleServiceListBuilder_ != null) { - return policyRuleServiceListBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(policyRuleServiceList_); - } - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public policy.Policy.PolicyRuleService.Builder addPolicyRuleServiceListBuilder() { - return getPolicyRuleServiceListFieldBuilder().addBuilder( - policy.Policy.PolicyRuleService.getDefaultInstance()); - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public policy.Policy.PolicyRuleService.Builder addPolicyRuleServiceListBuilder( - int index) { - return getPolicyRuleServiceListFieldBuilder().addBuilder( - index, policy.Policy.PolicyRuleService.getDefaultInstance()); - } - /** - * repeated .policy.PolicyRuleService policyRuleServiceList = 1; - */ - public java.util.List - getPolicyRuleServiceListBuilderList() { - return getPolicyRuleServiceListFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleService.Builder, policy.Policy.PolicyRuleServiceOrBuilder> - getPolicyRuleServiceListFieldBuilder() { - if (policyRuleServiceListBuilder_ == null) { - policyRuleServiceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleService.Builder, policy.Policy.PolicyRuleServiceOrBuilder>( - policyRuleServiceList_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - policyRuleServiceList_ = null; - } - return policyRuleServiceListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleServiceList) - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public Builder setPolicyRules(int index, policy.Policy.PolicyRule value) { + if (policyRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyRulesIsMutable(); + policyRules_.set(index, value); + onChanged(); + } else { + policyRulesBuilder_.setMessage(index, value); + } + return this; + } - // @@protoc_insertion_point(class_scope:policy.PolicyRuleServiceList) - private static final policy.Policy.PolicyRuleServiceList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRuleServiceList(); - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public Builder setPolicyRules(int index, policy.Policy.PolicyRule.Builder builderForValue) { + if (policyRulesBuilder_ == null) { + ensurePolicyRulesIsMutable(); + policyRules_.set(index, builderForValue.build()); + onChanged(); + } else { + policyRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - public static policy.Policy.PolicyRuleServiceList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public Builder addPolicyRules(policy.Policy.PolicyRule value) { + if (policyRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyRulesIsMutable(); + policyRules_.add(value); + onChanged(); + } else { + policyRulesBuilder_.addMessage(value); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public Builder addPolicyRules(int index, policy.Policy.PolicyRule value) { + if (policyRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyRulesIsMutable(); + policyRules_.add(index, value); + onChanged(); + } else { + policyRulesBuilder_.addMessage(index, value); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public Builder addPolicyRules(policy.Policy.PolicyRule.Builder builderForValue) { + if (policyRulesBuilder_ == null) { + ensurePolicyRulesIsMutable(); + policyRules_.add(builderForValue.build()); + onChanged(); + } else { + policyRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public policy.Policy.PolicyRuleServiceList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public Builder addPolicyRules(int index, policy.Policy.PolicyRule.Builder builderForValue) { + if (policyRulesBuilder_ == null) { + ensurePolicyRulesIsMutable(); + policyRules_.add(index, builderForValue.build()); + onChanged(); + } else { + policyRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public Builder addAllPolicyRules(java.lang.Iterable values) { + if (policyRulesBuilder_ == null) { + ensurePolicyRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyRules_); + onChanged(); + } else { + policyRulesBuilder_.addAllMessages(values); + } + return this; + } - public interface PolicyRuleDeviceListOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleDeviceList) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public Builder clearPolicyRules() { + if (policyRulesBuilder_ == null) { + policyRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyRulesBuilder_.clear(); + } + return this; + } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - java.util.List - getPolicyRuleDeviceListList(); - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - policy.Policy.PolicyRuleDevice getPolicyRuleDeviceList(int index); - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - int getPolicyRuleDeviceListCount(); - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - java.util.List - getPolicyRuleDeviceListOrBuilderList(); - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - policy.Policy.PolicyRuleDeviceOrBuilder getPolicyRuleDeviceListOrBuilder( - int index); - } - /** - *
-   * A list of device-oriented policy rules
-   * 
- * - * Protobuf type {@code policy.PolicyRuleDeviceList} - */ - public static final class PolicyRuleDeviceList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleDeviceList) - PolicyRuleDeviceListOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRuleDeviceList.newBuilder() to construct. - private PolicyRuleDeviceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRuleDeviceList() { - policyRuleDeviceList_ = java.util.Collections.emptyList(); - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public Builder removePolicyRules(int index) { + if (policyRulesBuilder_ == null) { + ensurePolicyRulesIsMutable(); + policyRules_.remove(index); + onChanged(); + } else { + policyRulesBuilder_.remove(index); + } + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRuleDeviceList(); - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public policy.Policy.PolicyRule.Builder getPolicyRulesBuilder(int index) { + return getPolicyRulesFieldBuilder().getBuilder(index); + } - @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(); - 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; - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public policy.Policy.PolicyRuleOrBuilder getPolicyRulesOrBuilder(int index) { + if (policyRulesBuilder_ == null) { + return policyRules_.get(index); + } else { + return policyRulesBuilder_.getMessageOrBuilder(index); + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleDeviceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleDeviceList.class, policy.Policy.PolicyRuleDeviceList.Builder.class); - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public java.util.List getPolicyRulesOrBuilderList() { + if (policyRulesBuilder_ != null) { + return policyRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyRules_); + } + } - public static final int POLICYRULEDEVICELIST_FIELD_NUMBER = 1; - private java.util.List policyRuleDeviceList_; - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - @java.lang.Override - public java.util.List getPolicyRuleDeviceListList() { - return policyRuleDeviceList_; - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - @java.lang.Override - public java.util.List - getPolicyRuleDeviceListOrBuilderList() { - return policyRuleDeviceList_; - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - @java.lang.Override - public int getPolicyRuleDeviceListCount() { - return policyRuleDeviceList_.size(); - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - @java.lang.Override - public policy.Policy.PolicyRuleDevice getPolicyRuleDeviceList(int index) { - return policyRuleDeviceList_.get(index); - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - @java.lang.Override - public policy.Policy.PolicyRuleDeviceOrBuilder getPolicyRuleDeviceListOrBuilder( - int index) { - return policyRuleDeviceList_.get(index); - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public policy.Policy.PolicyRule.Builder addPolicyRulesBuilder() { + return getPolicyRulesFieldBuilder().addBuilder(policy.Policy.PolicyRule.getDefaultInstance()); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public policy.Policy.PolicyRule.Builder addPolicyRulesBuilder(int index) { + return getPolicyRulesFieldBuilder().addBuilder(index, policy.Policy.PolicyRule.getDefaultInstance()); + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .policy.PolicyRule policyRules = 1; + */ + public java.util.List getPolicyRulesBuilderList() { + return getPolicyRulesFieldBuilder().getBuilderList(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < policyRuleDeviceList_.size(); i++) { - output.writeMessage(1, policyRuleDeviceList_.get(i)); - } - unknownFields.writeTo(output); - } + private com.google.protobuf.RepeatedFieldBuilderV3 getPolicyRulesFieldBuilder() { + if (policyRulesBuilder_ == null) { + policyRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(policyRules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + policyRules_ = null; + } + return policyRulesBuilder_; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < policyRuleDeviceList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, policyRuleDeviceList_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.Policy.PolicyRuleDeviceList)) { - return super.equals(obj); - } - policy.Policy.PolicyRuleDeviceList other = (policy.Policy.PolicyRuleDeviceList) obj; - - if (!getPolicyRuleDeviceListList() - .equals(other.getPolicyRuleDeviceListList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleList) + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPolicyRuleDeviceListCount() > 0) { - hash = (37 * hash) + POLICYRULEDEVICELIST_FIELD_NUMBER; - hash = (53 * hash) + getPolicyRuleDeviceListList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + // @@protoc_insertion_point(class_scope:policy.PolicyRuleList) + private static final policy.Policy.PolicyRuleList DEFAULT_INSTANCE; - public static policy.Policy.PolicyRuleDeviceList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleDeviceList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleDeviceList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleDeviceList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleDeviceList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleDeviceList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleDeviceList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleDeviceList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleDeviceList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleDeviceList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleDeviceList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleDeviceList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + static { + DEFAULT_INSTANCE = new policy.Policy.PolicyRuleList(); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.Policy.PolicyRuleDeviceList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static policy.Policy.PolicyRuleList getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A list of device-oriented policy rules
-     * 
- * - * Protobuf type {@code policy.PolicyRuleDeviceList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleDeviceList) - policy.Policy.PolicyRuleDeviceListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleDeviceList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleDeviceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleDeviceList.class, policy.Policy.PolicyRuleDeviceList.Builder.class); - } - - // 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(); - if (policyRuleDeviceListBuilder_ == null) { - policyRuleDeviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - policyRuleDeviceListBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRuleDeviceList_descriptor; - } - - @java.lang.Override - public policy.Policy.PolicyRuleDeviceList getDefaultInstanceForType() { - return policy.Policy.PolicyRuleDeviceList.getDefaultInstance(); - } - - @java.lang.Override - public policy.Policy.PolicyRuleDeviceList build() { - policy.Policy.PolicyRuleDeviceList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public policy.Policy.PolicyRuleDeviceList buildPartial() { - policy.Policy.PolicyRuleDeviceList result = new policy.Policy.PolicyRuleDeviceList(this); - int from_bitField0_ = bitField0_; - if (policyRuleDeviceListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - policyRuleDeviceList_ = java.util.Collections.unmodifiableList(policyRuleDeviceList_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.policyRuleDeviceList_ = policyRuleDeviceList_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.Policy.PolicyRuleDeviceList) { - return mergeFrom((policy.Policy.PolicyRuleDeviceList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(policy.Policy.PolicyRuleDeviceList other) { - if (other == policy.Policy.PolicyRuleDeviceList.getDefaultInstance()) return this; - if (policyRuleDeviceListBuilder_ == null) { - if (!other.policyRuleDeviceList_.isEmpty()) { - if (policyRuleDeviceList_.isEmpty()) { - policyRuleDeviceList_ = other.policyRuleDeviceList_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePolicyRuleDeviceListIsMutable(); - policyRuleDeviceList_.addAll(other.policyRuleDeviceList_); - } - onChanged(); - } - } else { - if (!other.policyRuleDeviceList_.isEmpty()) { - if (policyRuleDeviceListBuilder_.isEmpty()) { - policyRuleDeviceListBuilder_.dispose(); - policyRuleDeviceListBuilder_ = null; - policyRuleDeviceList_ = other.policyRuleDeviceList_; - bitField0_ = (bitField0_ & ~0x00000001); - policyRuleDeviceListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPolicyRuleDeviceListFieldBuilder() : null; - } else { - policyRuleDeviceListBuilder_.addAllMessages(other.policyRuleDeviceList_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleDeviceList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List policyRuleDeviceList_ = - java.util.Collections.emptyList(); - private void ensurePolicyRuleDeviceListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - policyRuleDeviceList_ = new java.util.ArrayList(policyRuleDeviceList_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleDevice.Builder, policy.Policy.PolicyRuleDeviceOrBuilder> policyRuleDeviceListBuilder_; - - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public java.util.List getPolicyRuleDeviceListList() { - if (policyRuleDeviceListBuilder_ == null) { - return java.util.Collections.unmodifiableList(policyRuleDeviceList_); - } else { - return policyRuleDeviceListBuilder_.getMessageList(); - } - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public int getPolicyRuleDeviceListCount() { - if (policyRuleDeviceListBuilder_ == null) { - return policyRuleDeviceList_.size(); - } else { - return policyRuleDeviceListBuilder_.getCount(); - } - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public policy.Policy.PolicyRuleDevice getPolicyRuleDeviceList(int index) { - if (policyRuleDeviceListBuilder_ == null) { - return policyRuleDeviceList_.get(index); - } else { - return policyRuleDeviceListBuilder_.getMessage(index); - } - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public Builder setPolicyRuleDeviceList( - int index, policy.Policy.PolicyRuleDevice value) { - if (policyRuleDeviceListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyRuleDeviceListIsMutable(); - policyRuleDeviceList_.set(index, value); - onChanged(); - } else { - policyRuleDeviceListBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public Builder setPolicyRuleDeviceList( - int index, policy.Policy.PolicyRuleDevice.Builder builderForValue) { - if (policyRuleDeviceListBuilder_ == null) { - ensurePolicyRuleDeviceListIsMutable(); - policyRuleDeviceList_.set(index, builderForValue.build()); - onChanged(); - } else { - policyRuleDeviceListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public Builder addPolicyRuleDeviceList(policy.Policy.PolicyRuleDevice value) { - if (policyRuleDeviceListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyRuleDeviceListIsMutable(); - policyRuleDeviceList_.add(value); - onChanged(); - } else { - policyRuleDeviceListBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public Builder addPolicyRuleDeviceList( - int index, policy.Policy.PolicyRuleDevice value) { - if (policyRuleDeviceListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyRuleDeviceListIsMutable(); - policyRuleDeviceList_.add(index, value); - onChanged(); - } else { - policyRuleDeviceListBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public Builder addPolicyRuleDeviceList( - policy.Policy.PolicyRuleDevice.Builder builderForValue) { - if (policyRuleDeviceListBuilder_ == null) { - ensurePolicyRuleDeviceListIsMutable(); - policyRuleDeviceList_.add(builderForValue.build()); - onChanged(); - } else { - policyRuleDeviceListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public Builder addPolicyRuleDeviceList( - int index, policy.Policy.PolicyRuleDevice.Builder builderForValue) { - if (policyRuleDeviceListBuilder_ == null) { - ensurePolicyRuleDeviceListIsMutable(); - policyRuleDeviceList_.add(index, builderForValue.build()); - onChanged(); - } else { - policyRuleDeviceListBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public Builder addAllPolicyRuleDeviceList( - java.lang.Iterable values) { - if (policyRuleDeviceListBuilder_ == null) { - ensurePolicyRuleDeviceListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, policyRuleDeviceList_); - onChanged(); - } else { - policyRuleDeviceListBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public Builder clearPolicyRuleDeviceList() { - if (policyRuleDeviceListBuilder_ == null) { - policyRuleDeviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - policyRuleDeviceListBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public Builder removePolicyRuleDeviceList(int index) { - if (policyRuleDeviceListBuilder_ == null) { - ensurePolicyRuleDeviceListIsMutable(); - policyRuleDeviceList_.remove(index); - onChanged(); - } else { - policyRuleDeviceListBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public policy.Policy.PolicyRuleDevice.Builder getPolicyRuleDeviceListBuilder( - int index) { - return getPolicyRuleDeviceListFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public policy.Policy.PolicyRuleDeviceOrBuilder getPolicyRuleDeviceListOrBuilder( - int index) { - if (policyRuleDeviceListBuilder_ == null) { - return policyRuleDeviceList_.get(index); } else { - return policyRuleDeviceListBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public java.util.List - getPolicyRuleDeviceListOrBuilderList() { - if (policyRuleDeviceListBuilder_ != null) { - return policyRuleDeviceListBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(policyRuleDeviceList_); - } - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public policy.Policy.PolicyRuleDevice.Builder addPolicyRuleDeviceListBuilder() { - return getPolicyRuleDeviceListFieldBuilder().addBuilder( - policy.Policy.PolicyRuleDevice.getDefaultInstance()); - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public policy.Policy.PolicyRuleDevice.Builder addPolicyRuleDeviceListBuilder( - int index) { - return getPolicyRuleDeviceListFieldBuilder().addBuilder( - index, policy.Policy.PolicyRuleDevice.getDefaultInstance()); - } - /** - * repeated .policy.PolicyRuleDevice policyRuleDeviceList = 1; - */ - public java.util.List - getPolicyRuleDeviceListBuilderList() { - return getPolicyRuleDeviceListFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleDevice.Builder, policy.Policy.PolicyRuleDeviceOrBuilder> - getPolicyRuleDeviceListFieldBuilder() { - if (policyRuleDeviceListBuilder_ == null) { - policyRuleDeviceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleDevice.Builder, policy.Policy.PolicyRuleDeviceOrBuilder>( - policyRuleDeviceList_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - policyRuleDeviceList_ = null; - } - return policyRuleDeviceListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleDeviceList) - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - // @@protoc_insertion_point(class_scope:policy.PolicyRuleDeviceList) - private static final policy.Policy.PolicyRuleDeviceList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRuleDeviceList(); - } + @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); + } + }; - public static policy.Policy.PolicyRuleDeviceList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + @java.lang.Override + public policy.Policy.PolicyRuleList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public policy.Policy.PolicyRuleDeviceList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRuleId_descriptor; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleId_fieldAccessorTable; - public interface PolicyRuleListOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleList) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRuleState_descriptor; - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - java.util.List - getPolicyRulesList(); - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - policy.Policy.PolicyRule getPolicyRules(int index); - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - int getPolicyRulesCount(); - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - java.util.List - getPolicyRulesOrBuilderList(); - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - policy.Policy.PolicyRuleOrBuilder getPolicyRulesOrBuilder( - int index); - } - /** - *
-   * A list of policy rules
-   * 
- * - * Protobuf type {@code policy.PolicyRuleList} - */ - public static final class PolicyRuleList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleList) - PolicyRuleListOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRuleList.newBuilder() to construct. - private PolicyRuleList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRuleList() { - policyRules_ = java.util.Collections.emptyList(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleState_fieldAccessorTable; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRuleList(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRuleBasic_descriptor; - @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(); - 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; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleBasic_fieldAccessorTable; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleList.class, policy.Policy.PolicyRuleList.Builder.class); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRuleService_descriptor; - public static final int POLICYRULES_FIELD_NUMBER = 1; - private java.util.List policyRules_; - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - @java.lang.Override - public java.util.List getPolicyRulesList() { - return policyRules_; - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - @java.lang.Override - public java.util.List - getPolicyRulesOrBuilderList() { - return policyRules_; - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - @java.lang.Override - public int getPolicyRulesCount() { - return policyRules_.size(); - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - @java.lang.Override - public policy.Policy.PolicyRule getPolicyRules(int index) { - return policyRules_.get(index); - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - @java.lang.Override - public policy.Policy.PolicyRuleOrBuilder getPolicyRulesOrBuilder( - int index) { - return policyRules_.get(index); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleService_fieldAccessorTable; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRuleDevice_descriptor; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleDevice_fieldAccessorTable; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < policyRules_.size(); i++) { - output.writeMessage(1, policyRules_.get(i)); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRule_descriptor; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < policyRules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, policyRules_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRule_fieldAccessorTable; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.Policy.PolicyRuleList)) { - return super.equals(obj); - } - policy.Policy.PolicyRuleList other = (policy.Policy.PolicyRuleList) obj; - - if (!getPolicyRulesList() - .equals(other.getPolicyRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRuleIdList_descriptor; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPolicyRulesCount() > 0) { - hash = (37 * hash) + POLICYRULES_FIELD_NUMBER; - hash = (53 * hash) + getPolicyRulesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleIdList_fieldAccessorTable; - public static policy.Policy.PolicyRuleList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.Policy.PolicyRuleList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.Policy.PolicyRuleList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.Policy.PolicyRuleList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.Policy.PolicyRuleList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRuleServiceList_descriptor; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.Policy.PolicyRuleList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleServiceList_fieldAccessorTable; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A list of policy rules
-     * 
- * - * Protobuf type {@code policy.PolicyRuleList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleList) - policy.Policy.PolicyRuleListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.Policy.internal_static_policy_PolicyRuleList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.Policy.internal_static_policy_PolicyRuleList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.Policy.PolicyRuleList.class, policy.Policy.PolicyRuleList.Builder.class); - } - - // 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(); - if (policyRulesBuilder_ == null) { - policyRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - policyRulesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return policy.Policy.internal_static_policy_PolicyRuleList_descriptor; - } - - @java.lang.Override - public policy.Policy.PolicyRuleList getDefaultInstanceForType() { - return policy.Policy.PolicyRuleList.getDefaultInstance(); - } - - @java.lang.Override - public policy.Policy.PolicyRuleList build() { - policy.Policy.PolicyRuleList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public policy.Policy.PolicyRuleList buildPartial() { - policy.Policy.PolicyRuleList result = new policy.Policy.PolicyRuleList(this); - int from_bitField0_ = bitField0_; - if (policyRulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - policyRules_ = java.util.Collections.unmodifiableList(policyRules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.policyRules_ = policyRules_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.Policy.PolicyRuleList) { - return mergeFrom((policy.Policy.PolicyRuleList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(policy.Policy.PolicyRuleList other) { - if (other == policy.Policy.PolicyRuleList.getDefaultInstance()) return this; - if (policyRulesBuilder_ == null) { - if (!other.policyRules_.isEmpty()) { - if (policyRules_.isEmpty()) { - policyRules_ = other.policyRules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePolicyRulesIsMutable(); - policyRules_.addAll(other.policyRules_); - } - onChanged(); - } - } else { - if (!other.policyRules_.isEmpty()) { - if (policyRulesBuilder_.isEmpty()) { - policyRulesBuilder_.dispose(); - policyRulesBuilder_ = null; - policyRules_ = other.policyRules_; - bitField0_ = (bitField0_ & ~0x00000001); - policyRulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPolicyRulesFieldBuilder() : null; - } else { - policyRulesBuilder_.addAllMessages(other.policyRules_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List policyRules_ = - java.util.Collections.emptyList(); - private void ensurePolicyRulesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - policyRules_ = new java.util.ArrayList(policyRules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRule, policy.Policy.PolicyRule.Builder, policy.Policy.PolicyRuleOrBuilder> policyRulesBuilder_; - - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public java.util.List getPolicyRulesList() { - if (policyRulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(policyRules_); - } else { - return policyRulesBuilder_.getMessageList(); - } - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public int getPolicyRulesCount() { - if (policyRulesBuilder_ == null) { - return policyRules_.size(); - } else { - return policyRulesBuilder_.getCount(); - } - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public policy.Policy.PolicyRule getPolicyRules(int index) { - if (policyRulesBuilder_ == null) { - return policyRules_.get(index); - } else { - return policyRulesBuilder_.getMessage(index); - } - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public Builder setPolicyRules( - int index, policy.Policy.PolicyRule value) { - if (policyRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyRulesIsMutable(); - policyRules_.set(index, value); - onChanged(); - } else { - policyRulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public Builder setPolicyRules( - int index, policy.Policy.PolicyRule.Builder builderForValue) { - if (policyRulesBuilder_ == null) { - ensurePolicyRulesIsMutable(); - policyRules_.set(index, builderForValue.build()); - onChanged(); - } else { - policyRulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public Builder addPolicyRules(policy.Policy.PolicyRule value) { - if (policyRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyRulesIsMutable(); - policyRules_.add(value); - onChanged(); - } else { - policyRulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public Builder addPolicyRules( - int index, policy.Policy.PolicyRule value) { - if (policyRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyRulesIsMutable(); - policyRules_.add(index, value); - onChanged(); - } else { - policyRulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public Builder addPolicyRules( - policy.Policy.PolicyRule.Builder builderForValue) { - if (policyRulesBuilder_ == null) { - ensurePolicyRulesIsMutable(); - policyRules_.add(builderForValue.build()); - onChanged(); - } else { - policyRulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public Builder addPolicyRules( - int index, policy.Policy.PolicyRule.Builder builderForValue) { - if (policyRulesBuilder_ == null) { - ensurePolicyRulesIsMutable(); - policyRules_.add(index, builderForValue.build()); - onChanged(); - } else { - policyRulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public Builder addAllPolicyRules( - java.lang.Iterable values) { - if (policyRulesBuilder_ == null) { - ensurePolicyRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, policyRules_); - onChanged(); - } else { - policyRulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public Builder clearPolicyRules() { - if (policyRulesBuilder_ == null) { - policyRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - policyRulesBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public Builder removePolicyRules(int index) { - if (policyRulesBuilder_ == null) { - ensurePolicyRulesIsMutable(); - policyRules_.remove(index); - onChanged(); - } else { - policyRulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public policy.Policy.PolicyRule.Builder getPolicyRulesBuilder( - int index) { - return getPolicyRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public policy.Policy.PolicyRuleOrBuilder getPolicyRulesOrBuilder( - int index) { - if (policyRulesBuilder_ == null) { - return policyRules_.get(index); } else { - return policyRulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public java.util.List - getPolicyRulesOrBuilderList() { - if (policyRulesBuilder_ != null) { - return policyRulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(policyRules_); - } - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public policy.Policy.PolicyRule.Builder addPolicyRulesBuilder() { - return getPolicyRulesFieldBuilder().addBuilder( - policy.Policy.PolicyRule.getDefaultInstance()); - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public policy.Policy.PolicyRule.Builder addPolicyRulesBuilder( - int index) { - return getPolicyRulesFieldBuilder().addBuilder( - index, policy.Policy.PolicyRule.getDefaultInstance()); - } - /** - * repeated .policy.PolicyRule policyRules = 1; - */ - public java.util.List - getPolicyRulesBuilderList() { - return getPolicyRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRule, policy.Policy.PolicyRule.Builder, policy.Policy.PolicyRuleOrBuilder> - getPolicyRulesFieldBuilder() { - if (policyRulesBuilder_ == null) { - policyRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - policy.Policy.PolicyRule, policy.Policy.PolicyRule.Builder, policy.Policy.PolicyRuleOrBuilder>( - policyRules_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - policyRules_ = null; - } - return policyRulesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleList) - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRuleDeviceList_descriptor; - // @@protoc_insertion_point(class_scope:policy.PolicyRuleList) - private static final policy.Policy.PolicyRuleList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.Policy.PolicyRuleList(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleDeviceList_fieldAccessorTable; - public static policy.Policy.PolicyRuleList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRuleList_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleList_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - @java.lang.Override - public policy.Policy.PolicyRuleList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleState_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleState_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleBasic_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleBasic_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleService_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleService_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleDevice_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleDevice_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRule_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRule_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleServiceList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleServiceList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleDeviceList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleDeviceList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleList_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\014policy.proto\022\006policy\032\rcontext.proto\032\026p" + - "olicy_condition.proto\032\023policy_action.pro" + - "to\"+\n\014PolicyRuleId\022\033\n\004uuid\030\001 \001(\0132\r.conte" + - "xt.Uuid\"g\n\017PolicyRuleState\0224\n\017policyRule" + - "State\030\001 \001(\0162\033.policy.PolicyRuleStateEnum" + - "\022\036\n\026policyRuleStateMessage\030\002 \001(\t\"\225\002\n\017Pol" + - "icyRuleBasic\022*\n\014policyRuleId\030\001 \001(\0132\024.pol" + - "icy.PolicyRuleId\0220\n\017policyRuleState\030\002 \001(" + - "\0132\027.policy.PolicyRuleState\022\020\n\010priority\030\003" + - " \001(\r\0222\n\rconditionList\030\004 \003(\0132\033.policy.Pol" + - "icyRuleCondition\0220\n\017booleanOperator\030\005 \001(" + - "\0162\027.policy.BooleanOperator\022,\n\nactionList" + - "\030\006 \003(\0132\030.policy.PolicyRuleAction\"\223\001\n\021Pol" + - "icyRuleService\0220\n\017policyRuleBasic\030\001 \001(\0132" + - "\027.policy.PolicyRuleBasic\022%\n\tserviceId\030\002 " + - "\001(\0132\022.context.ServiceId\022%\n\ndeviceList\030\003 " + - "\003(\0132\021.context.DeviceId\"k\n\020PolicyRuleDevi" + - "ce\0220\n\017policyRuleBasic\030\001 \001(\0132\027.policy.Pol" + - "icyRuleBasic\022%\n\ndeviceList\030\002 \003(\0132\021.conte" + - "xt.DeviceId\"u\n\nPolicyRule\022,\n\007service\030\001 \001" + - "(\0132\031.policy.PolicyRuleServiceH\000\022*\n\006devic" + - "e\030\002 \001(\0132\030.policy.PolicyRuleDeviceH\000B\r\n\013p" + - "olicy_rule\"B\n\020PolicyRuleIdList\022.\n\020policy" + - "RuleIdList\030\001 \003(\0132\024.policy.PolicyRuleId\"Q" + - "\n\025PolicyRuleServiceList\0228\n\025policyRuleSer" + - "viceList\030\001 \003(\0132\031.policy.PolicyRuleServic" + - "e\"N\n\024PolicyRuleDeviceList\0226\n\024policyRuleD" + - "eviceList\030\001 \003(\0132\030.policy.PolicyRuleDevic" + - "e\"9\n\016PolicyRuleList\022\'\n\013policyRules\030\001 \003(\013" + - "2\022.policy.PolicyRule*\377\001\n\023PolicyRuleState" + - "Enum\022\024\n\020POLICY_UNDEFINED\020\000\022\021\n\rPOLICY_FAI" + - "LED\020\001\022\023\n\017POLICY_INSERTED\020\002\022\024\n\020POLICY_VAL" + - "IDATED\020\003\022\026\n\022POLICY_PROVISIONED\020\004\022\021\n\rPOLI" + - "CY_ACTIVE\020\005\022\023\n\017POLICY_ENFORCED\020\006\022\026\n\022POLI" + - "CY_INEFFECTIVE\020\007\022\024\n\020POLICY_EFFECTIVE\020\010\022\022" + - "\n\016POLICY_UPDATED\020\t\022\022\n\016POLICY_REMOVED\020\n2\323" + - "\004\n\rPolicyService\022H\n\020PolicyAddService\022\031.p" + - "olicy.PolicyRuleService\032\027.policy.PolicyR" + - "uleState\"\000\022F\n\017PolicyAddDevice\022\030.policy.P" + - "olicyRuleDevice\032\027.policy.PolicyRuleState" + - "\"\000\022K\n\023PolicyUpdateService\022\031.policy.Polic" + - "yRuleService\032\027.policy.PolicyRuleState\"\000\022" + - "I\n\022PolicyUpdateDevice\022\030.policy.PolicyRul" + - "eDevice\032\027.policy.PolicyRuleState\"\000\022?\n\014Po" + - "licyDelete\022\024.policy.PolicyRuleId\032\027.polic" + - "y.PolicyRuleState\"\000\022E\n\020GetPolicyService\022" + - "\024.policy.PolicyRuleId\032\031.policy.PolicyRul" + - "eService\"\000\022C\n\017GetPolicyDevice\022\024.policy.P" + - "olicyRuleId\032\030.policy.PolicyRuleDevice\"\000\022" + - "K\n\024GetPolicyByServiceId\022\022.context.Servic" + - "eId\032\035.policy.PolicyRuleServiceList\"\000b\006pr" + - "oto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - context.ContextOuterClass.getDescriptor(), - policy.PolicyCondition.getDescriptor(), - policy.PolicyAction.getDescriptor(), - }); - internal_static_policy_PolicyRuleId_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_policy_PolicyRuleId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleId_descriptor, - new java.lang.String[] { "Uuid", }); - internal_static_policy_PolicyRuleState_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_policy_PolicyRuleState_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleState_descriptor, - new java.lang.String[] { "PolicyRuleState", "PolicyRuleStateMessage", }); - internal_static_policy_PolicyRuleBasic_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_policy_PolicyRuleBasic_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleBasic_descriptor, - new java.lang.String[] { "PolicyRuleId", "PolicyRuleState", "Priority", "ConditionList", "BooleanOperator", "ActionList", }); - internal_static_policy_PolicyRuleService_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_policy_PolicyRuleService_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleService_descriptor, - new java.lang.String[] { "PolicyRuleBasic", "ServiceId", "DeviceList", }); - internal_static_policy_PolicyRuleDevice_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_policy_PolicyRuleDevice_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleDevice_descriptor, - new java.lang.String[] { "PolicyRuleBasic", "DeviceList", }); - internal_static_policy_PolicyRule_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_policy_PolicyRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRule_descriptor, - new java.lang.String[] { "Service", "Device", "PolicyRule", }); - internal_static_policy_PolicyRuleIdList_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_policy_PolicyRuleIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleIdList_descriptor, - new java.lang.String[] { "PolicyRuleIdList", }); - internal_static_policy_PolicyRuleServiceList_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_policy_PolicyRuleServiceList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleServiceList_descriptor, - new java.lang.String[] { "PolicyRuleServiceList", }); - internal_static_policy_PolicyRuleDeviceList_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_policy_PolicyRuleDeviceList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleDeviceList_descriptor, - new java.lang.String[] { "PolicyRuleDeviceList", }); - internal_static_policy_PolicyRuleList_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_policy_PolicyRuleList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleList_descriptor, - new java.lang.String[] { "PolicyRules", }); - context.ContextOuterClass.getDescriptor(); - policy.PolicyCondition.getDescriptor(); - policy.PolicyAction.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) + static { + java.lang.String[] descriptorData = { "\n\014policy.proto\022\006policy\032\rcontext.proto\032\026p" + "olicy_condition.proto\032\023policy_action.pro" + "to\"+\n\014PolicyRuleId\022\033\n\004uuid\030\001 \001(\0132\r.conte" + "xt.Uuid\"g\n\017PolicyRuleState\0224\n\017policyRule" + "State\030\001 \001(\0162\033.policy.PolicyRuleStateEnum" + "\022\036\n\026policyRuleStateMessage\030\002 \001(\t\"\225\002\n\017Pol" + "icyRuleBasic\022*\n\014policyRuleId\030\001 \001(\0132\024.pol" + "icy.PolicyRuleId\0220\n\017policyRuleState\030\002 \001(" + "\0132\027.policy.PolicyRuleState\022\020\n\010priority\030\003" + " \001(\r\0222\n\rconditionList\030\004 \003(\0132\033.policy.Pol" + "icyRuleCondition\0220\n\017booleanOperator\030\005 \001(" + "\0162\027.policy.BooleanOperator\022,\n\nactionList" + "\030\006 \003(\0132\030.policy.PolicyRuleAction\"\223\001\n\021Pol" + "icyRuleService\0220\n\017policyRuleBasic\030\001 \001(\0132" + "\027.policy.PolicyRuleBasic\022%\n\tserviceId\030\002 " + "\001(\0132\022.context.ServiceId\022%\n\ndeviceList\030\003 " + "\003(\0132\021.context.DeviceId\"k\n\020PolicyRuleDevi" + "ce\0220\n\017policyRuleBasic\030\001 \001(\0132\027.policy.Pol" + "icyRuleBasic\022%\n\ndeviceList\030\002 \003(\0132\021.conte" + "xt.DeviceId\"u\n\nPolicyRule\022,\n\007service\030\001 \001" + "(\0132\031.policy.PolicyRuleServiceH\000\022*\n\006devic" + "e\030\002 \001(\0132\030.policy.PolicyRuleDeviceH\000B\r\n\013p" + "olicy_rule\"B\n\020PolicyRuleIdList\022.\n\020policy" + "RuleIdList\030\001 \003(\0132\024.policy.PolicyRuleId\"Q" + "\n\025PolicyRuleServiceList\0228\n\025policyRuleSer" + "viceList\030\001 \003(\0132\031.policy.PolicyRuleServic" + "e\"N\n\024PolicyRuleDeviceList\0226\n\024policyRuleD" + "eviceList\030\001 \003(\0132\030.policy.PolicyRuleDevic" + "e\"9\n\016PolicyRuleList\022\'\n\013policyRules\030\001 \003(\013" + "2\022.policy.PolicyRule*\377\001\n\023PolicyRuleState" + "Enum\022\024\n\020POLICY_UNDEFINED\020\000\022\021\n\rPOLICY_FAI" + "LED\020\001\022\023\n\017POLICY_INSERTED\020\002\022\024\n\020POLICY_VAL" + "IDATED\020\003\022\026\n\022POLICY_PROVISIONED\020\004\022\021\n\rPOLI" + "CY_ACTIVE\020\005\022\023\n\017POLICY_ENFORCED\020\006\022\026\n\022POLI" + "CY_INEFFECTIVE\020\007\022\024\n\020POLICY_EFFECTIVE\020\010\022\022" + "\n\016POLICY_UPDATED\020\t\022\022\n\016POLICY_REMOVED\020\n2\323" + "\004\n\rPolicyService\022H\n\020PolicyAddService\022\031.p" + "olicy.PolicyRuleService\032\027.policy.PolicyR" + "uleState\"\000\022F\n\017PolicyAddDevice\022\030.policy.P" + "olicyRuleDevice\032\027.policy.PolicyRuleState" + "\"\000\022K\n\023PolicyUpdateService\022\031.policy.Polic" + "yRuleService\032\027.policy.PolicyRuleState\"\000\022" + "I\n\022PolicyUpdateDevice\022\030.policy.PolicyRul" + "eDevice\032\027.policy.PolicyRuleState\"\000\022?\n\014Po" + "licyDelete\022\024.policy.PolicyRuleId\032\027.polic" + "y.PolicyRuleState\"\000\022E\n\020GetPolicyService\022" + "\024.policy.PolicyRuleId\032\031.policy.PolicyRul" + "eService\"\000\022C\n\017GetPolicyDevice\022\024.policy.P" + "olicyRuleId\032\030.policy.PolicyRuleDevice\"\000\022" + "K\n\024GetPolicyByServiceId\022\022.context.Servic" + "eId\032\035.policy.PolicyRuleServiceList\"\000b\006pr" + "oto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { context.ContextOuterClass.getDescriptor(), policy.PolicyCondition.getDescriptor(), policy.PolicyAction.getDescriptor() }); + internal_static_policy_PolicyRuleId_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_policy_PolicyRuleId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRuleId_descriptor, new java.lang.String[] { "Uuid" }); + internal_static_policy_PolicyRuleState_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_policy_PolicyRuleState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRuleState_descriptor, new java.lang.String[] { "PolicyRuleState", "PolicyRuleStateMessage" }); + internal_static_policy_PolicyRuleBasic_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_policy_PolicyRuleBasic_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRuleBasic_descriptor, new java.lang.String[] { "PolicyRuleId", "PolicyRuleState", "Priority", "ConditionList", "BooleanOperator", "ActionList" }); + internal_static_policy_PolicyRuleService_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_policy_PolicyRuleService_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRuleService_descriptor, new java.lang.String[] { "PolicyRuleBasic", "ServiceId", "DeviceList" }); + internal_static_policy_PolicyRuleDevice_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_policy_PolicyRuleDevice_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRuleDevice_descriptor, new java.lang.String[] { "PolicyRuleBasic", "DeviceList" }); + internal_static_policy_PolicyRule_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_policy_PolicyRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRule_descriptor, new java.lang.String[] { "Service", "Device", "PolicyRule" }); + internal_static_policy_PolicyRuleIdList_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_policy_PolicyRuleIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRuleIdList_descriptor, new java.lang.String[] { "PolicyRuleIdList" }); + internal_static_policy_PolicyRuleServiceList_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_policy_PolicyRuleServiceList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRuleServiceList_descriptor, new java.lang.String[] { "PolicyRuleServiceList" }); + internal_static_policy_PolicyRuleDeviceList_descriptor = getDescriptor().getMessageTypes().get(8); + internal_static_policy_PolicyRuleDeviceList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRuleDeviceList_descriptor, new java.lang.String[] { "PolicyRuleDeviceList" }); + internal_static_policy_PolicyRuleList_descriptor = getDescriptor().getMessageTypes().get(9); + internal_static_policy_PolicyRuleList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRuleList_descriptor, new java.lang.String[] { "PolicyRules" }); + context.ContextOuterClass.getDescriptor(); + policy.PolicyCondition.getDescriptor(); + policy.PolicyAction.getDescriptor(); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyAction.java b/src/policy/target/generated-sources/grpc/policy/PolicyAction.java index c79a3487bb3a6d9c9cffab185da605a15366f0d4..8e84a0a847d93bd2dd863244ef7acf3888f6e6c5 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyAction.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyAction.java @@ -1,530 +1,206 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: policy_action.proto - package policy; public final class PolicyAction { - private PolicyAction() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * Protobuf enum {@code policy.PolicyRuleActionEnum} - */ - public enum PolicyRuleActionEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * POLICYRULE_ACTION_NO_ACTION = 0; - */ - POLICYRULE_ACTION_NO_ACTION(0), - /** - * POLICYRULE_ACTION_SET_DEVICE_STATUS = 1; - */ - POLICYRULE_ACTION_SET_DEVICE_STATUS(1), - /** - * POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE = 2; - */ - POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE(2), - /** - * POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT = 3; - */ - POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT(3), - /** - * POLICY_RULE_ACTION_CALL_SERVICE_RPC = 4; - */ - POLICY_RULE_ACTION_CALL_SERVICE_RPC(4), - /** - * POLICY_RULE_ACTION_RECALCULATE_PATH = 5; - */ - POLICY_RULE_ACTION_RECALCULATE_PATH(5), - UNRECOGNIZED(-1), - ; - - /** - * POLICYRULE_ACTION_NO_ACTION = 0; - */ - public static final int POLICYRULE_ACTION_NO_ACTION_VALUE = 0; - /** - * POLICYRULE_ACTION_SET_DEVICE_STATUS = 1; - */ - public static final int POLICYRULE_ACTION_SET_DEVICE_STATUS_VALUE = 1; - /** - * POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE = 2; - */ - public static final int POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE_VALUE = 2; - /** - * POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT = 3; - */ - public static final int POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT_VALUE = 3; - /** - * POLICY_RULE_ACTION_CALL_SERVICE_RPC = 4; - */ - public static final int POLICY_RULE_ACTION_CALL_SERVICE_RPC_VALUE = 4; - /** - * POLICY_RULE_ACTION_RECALCULATE_PATH = 5; - */ - public static final int POLICY_RULE_ACTION_RECALCULATE_PATH_VALUE = 5; + private PolicyAction() { + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PolicyRuleActionEnum valueOf(int value) { - return forNumber(value); + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code policy.PolicyRuleActionEnum} */ - public static PolicyRuleActionEnum forNumber(int value) { - switch (value) { - case 0: return POLICYRULE_ACTION_NO_ACTION; - case 1: return POLICYRULE_ACTION_SET_DEVICE_STATUS; - case 2: return POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE; - case 3: return POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT; - case 4: return POLICY_RULE_ACTION_CALL_SERVICE_RPC; - case 5: return POLICY_RULE_ACTION_RECALCULATE_PATH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PolicyRuleActionEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PolicyRuleActionEnum findValueByNumber(int number) { - return PolicyRuleActionEnum.forNumber(number); + public enum PolicyRuleActionEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * POLICYRULE_ACTION_NO_ACTION = 0; + */ + POLICYRULE_ACTION_NO_ACTION(0), + /** + * POLICYRULE_ACTION_SET_DEVICE_STATUS = 1; + */ + POLICYRULE_ACTION_SET_DEVICE_STATUS(1), + /** + * POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE = 2; + */ + POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE(2), + /** + * POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT = 3; + */ + POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT(3), + /** + * POLICY_RULE_ACTION_CALL_SERVICE_RPC = 4; + */ + POLICY_RULE_ACTION_CALL_SERVICE_RPC(4), + /** + * POLICY_RULE_ACTION_RECALCULATE_PATH = 5; + */ + POLICY_RULE_ACTION_RECALCULATE_PATH(5), + UNRECOGNIZED(-1); + + /** + * POLICYRULE_ACTION_NO_ACTION = 0; + */ + public static final int POLICYRULE_ACTION_NO_ACTION_VALUE = 0; + + /** + * POLICYRULE_ACTION_SET_DEVICE_STATUS = 1; + */ + public static final int POLICYRULE_ACTION_SET_DEVICE_STATUS_VALUE = 1; + + /** + * POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE = 2; + */ + public static final int POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE_VALUE = 2; + + /** + * POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT = 3; + */ + public static final int POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT_VALUE = 3; + + /** + * POLICY_RULE_ACTION_CALL_SERVICE_RPC = 4; + */ + public static final int POLICY_RULE_ACTION_CALL_SERVICE_RPC_VALUE = 4; + + /** + * POLICY_RULE_ACTION_RECALCULATE_PATH = 5; + */ + public static final int POLICY_RULE_ACTION_RECALCULATE_PATH_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return policy.PolicyAction.getDescriptor().getEnumTypes().get(0); - } + return value; + } - private static final PolicyRuleActionEnum[] VALUES = values(); - - public static PolicyRuleActionEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PolicyRuleActionEnum valueOf(int value) { + return forNumber(value); + } - private final int value; + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PolicyRuleActionEnum forNumber(int value) { + switch(value) { + case 0: + return POLICYRULE_ACTION_NO_ACTION; + case 1: + return POLICYRULE_ACTION_SET_DEVICE_STATUS; + case 2: + return POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE; + case 3: + return POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT; + case 4: + return POLICY_RULE_ACTION_CALL_SERVICE_RPC; + case 5: + return POLICY_RULE_ACTION_RECALCULATE_PATH; + default: + return null; + } + } - private PolicyRuleActionEnum(int value) { - this.value = value; - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - // @@protoc_insertion_point(enum_scope:policy.PolicyRuleActionEnum) - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - public interface PolicyRuleActionOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleAction) - com.google.protobuf.MessageOrBuilder { + public PolicyRuleActionEnum findValueByNumber(int number) { + return PolicyRuleActionEnum.forNumber(number); + } + }; - /** - * .policy.PolicyRuleActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - int getActionValue(); - /** - * .policy.PolicyRuleActionEnum action = 1; - * @return The action. - */ - policy.PolicyAction.PolicyRuleActionEnum getAction(); + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - /** - * repeated .policy.PolicyRuleActionConfig action_config = 2; - */ - java.util.List - getActionConfigList(); - /** - * repeated .policy.PolicyRuleActionConfig action_config = 2; - */ - policy.PolicyAction.PolicyRuleActionConfig getActionConfig(int index); - /** - * repeated .policy.PolicyRuleActionConfig action_config = 2; - */ - int getActionConfigCount(); - /** - * repeated .policy.PolicyRuleActionConfig action_config = 2; - */ - java.util.List - getActionConfigOrBuilderList(); - /** - * repeated .policy.PolicyRuleActionConfig action_config = 2; - */ - policy.PolicyAction.PolicyRuleActionConfigOrBuilder getActionConfigOrBuilder( - int index); - } - /** - *
-   * Action
-   * 
- * - * Protobuf type {@code policy.PolicyRuleAction} - */ - public static final class PolicyRuleAction extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleAction) - PolicyRuleActionOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRuleAction.newBuilder() to construct. - private PolicyRuleAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRuleAction() { - action_ = 0; - actionConfig_ = java.util.Collections.emptyList(); - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRuleAction(); - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return policy.PolicyAction.getDescriptor().getEnumTypes().get(0); + } - @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(); - 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; - } + private static final PolicyRuleActionEnum[] VALUES = values(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.PolicyAction.internal_static_policy_PolicyRuleAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.PolicyAction.PolicyRuleAction.class, policy.PolicyAction.PolicyRuleAction.Builder.class); - } + public static PolicyRuleActionEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public static final int ACTION_FIELD_NUMBER = 1; - private int action_; - /** - * .policy.PolicyRuleActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override public int getActionValue() { - return action_; - } - /** - * .policy.PolicyRuleActionEnum action = 1; - * @return The action. - */ - @java.lang.Override public policy.PolicyAction.PolicyRuleActionEnum getAction() { - @SuppressWarnings("deprecation") - policy.PolicyAction.PolicyRuleActionEnum result = policy.PolicyAction.PolicyRuleActionEnum.valueOf(action_); - return result == null ? policy.PolicyAction.PolicyRuleActionEnum.UNRECOGNIZED : result; - } + private final int value; - public static final int ACTION_CONFIG_FIELD_NUMBER = 2; - private java.util.List actionConfig_; - /** - * repeated .policy.PolicyRuleActionConfig action_config = 2; - */ - @java.lang.Override - public java.util.List getActionConfigList() { - return actionConfig_; - } - /** - * repeated .policy.PolicyRuleActionConfig action_config = 2; - */ - @java.lang.Override - public java.util.List - getActionConfigOrBuilderList() { - return actionConfig_; - } - /** - * repeated .policy.PolicyRuleActionConfig action_config = 2; - */ - @java.lang.Override - public int getActionConfigCount() { - return actionConfig_.size(); - } - /** - * repeated .policy.PolicyRuleActionConfig action_config = 2; - */ - @java.lang.Override - public policy.PolicyAction.PolicyRuleActionConfig getActionConfig(int index) { - return actionConfig_.get(index); - } - /** - * repeated .policy.PolicyRuleActionConfig action_config = 2; - */ - @java.lang.Override - public policy.PolicyAction.PolicyRuleActionConfigOrBuilder getActionConfigOrBuilder( - int index) { - return actionConfig_.get(index); + private PolicyRuleActionEnum(int value) { + this.value = value; + } } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public interface PolicyRuleActionOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRuleAction) + com.google.protobuf.MessageOrBuilder { - memoizedIsInitialized = 1; - return true; - } + /** + * .policy.PolicyRuleActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (action_ != policy.PolicyAction.PolicyRuleActionEnum.POLICYRULE_ACTION_NO_ACTION.getNumber()) { - output.writeEnum(1, action_); - } - for (int i = 0; i < actionConfig_.size(); i++) { - output.writeMessage(2, actionConfig_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * .policy.PolicyRuleActionEnum action = 1; + * @return The action. + */ + policy.PolicyAction.PolicyRuleActionEnum getAction(); - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (action_ != policy.PolicyAction.PolicyRuleActionEnum.POLICYRULE_ACTION_NO_ACTION.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, action_); - } - for (int i = 0; i < actionConfig_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, actionConfig_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + java.util.List getActionConfigList(); - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.PolicyAction.PolicyRuleAction)) { - return super.equals(obj); - } - policy.PolicyAction.PolicyRuleAction other = (policy.PolicyAction.PolicyRuleAction) obj; - - if (action_ != other.action_) return false; - if (!getActionConfigList() - .equals(other.getActionConfigList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + policy.PolicyAction.PolicyRuleActionConfig getActionConfig(int index); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + action_; - if (getActionConfigCount() > 0) { - hash = (37 * hash) + ACTION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getActionConfigList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + int getActionConfigCount(); - public static policy.PolicyAction.PolicyRuleAction parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.PolicyAction.PolicyRuleAction parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.PolicyAction.PolicyRuleAction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.PolicyAction.PolicyRuleAction parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.PolicyAction.PolicyRuleAction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.PolicyAction.PolicyRuleAction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.PolicyAction.PolicyRuleAction parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.PolicyAction.PolicyRuleAction parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.PolicyAction.PolicyRuleAction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.PolicyAction.PolicyRuleAction parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.PolicyAction.PolicyRuleAction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.PolicyAction.PolicyRuleAction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + java.util.List getActionConfigOrBuilderList(); - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.PolicyAction.PolicyRuleAction prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + policy.PolicyAction.PolicyRuleActionConfigOrBuilder getActionConfigOrBuilder(int index); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** *
      * Action
@@ -532,1316 +208,1527 @@ public final class PolicyAction {
      *
      * Protobuf type {@code policy.PolicyRuleAction}
      */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
-        // @@protoc_insertion_point(builder_implements:policy.PolicyRuleAction)
-        policy.PolicyAction.PolicyRuleActionOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return policy.PolicyAction.internal_static_policy_PolicyRuleAction_descriptor;
-      }
-
-      @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return policy.PolicyAction.internal_static_policy_PolicyRuleAction_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                policy.PolicyAction.PolicyRuleAction.class, policy.PolicyAction.PolicyRuleAction.Builder.class);
-      }
-
-      // 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();
-        action_ = 0;
-
-        if (actionConfigBuilder_ == null) {
-          actionConfig_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000001);
-        } else {
-          actionConfigBuilder_.clear();
-        }
-        return this;
-      }
-
-      @java.lang.Override
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return policy.PolicyAction.internal_static_policy_PolicyRuleAction_descriptor;
-      }
-
-      @java.lang.Override
-      public policy.PolicyAction.PolicyRuleAction getDefaultInstanceForType() {
-        return policy.PolicyAction.PolicyRuleAction.getDefaultInstance();
-      }
-
-      @java.lang.Override
-      public policy.PolicyAction.PolicyRuleAction build() {
-        policy.PolicyAction.PolicyRuleAction result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      @java.lang.Override
-      public policy.PolicyAction.PolicyRuleAction buildPartial() {
-        policy.PolicyAction.PolicyRuleAction result = new policy.PolicyAction.PolicyRuleAction(this);
-        int from_bitField0_ = bitField0_;
-        result.action_ = action_;
-        if (actionConfigBuilder_ == null) {
-          if (((bitField0_ & 0x00000001) != 0)) {
-            actionConfig_ = java.util.Collections.unmodifiableList(actionConfig_);
-            bitField0_ = (bitField0_ & ~0x00000001);
-          }
-          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);
-      }
-      @java.lang.Override
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof policy.PolicyAction.PolicyRuleAction) {
-          return mergeFrom((policy.PolicyAction.PolicyRuleAction)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(policy.PolicyAction.PolicyRuleAction other) {
-        if (other == policy.PolicyAction.PolicyRuleAction.getDefaultInstance()) return this;
-        if (other.action_ != 0) {
-          setActionValue(other.getActionValue());
-        }
-        if (actionConfigBuilder_ == null) {
-          if (!other.actionConfig_.isEmpty()) {
-            if (actionConfig_.isEmpty()) {
-              actionConfig_ = other.actionConfig_;
-              bitField0_ = (bitField0_ & ~0x00000001);
-            } else {
-              ensureActionConfigIsMutable();
-              actionConfig_.addAll(other.actionConfig_);
-            }
-            onChanged();
-          }
-        } else {
-          if (!other.actionConfig_.isEmpty()) {
-            if (actionConfigBuilder_.isEmpty()) {
-              actionConfigBuilder_.dispose();
-              actionConfigBuilder_ = null;
-              actionConfig_ = other.actionConfig_;
-              bitField0_ = (bitField0_ & ~0x00000001);
-              actionConfigBuilder_ = 
-                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
-                   getActionConfigFieldBuilder() : null;
-            } else {
-              actionConfigBuilder_.addAllMessages(other.actionConfig_);
-            }
-          }
-        }
-        this.mergeUnknownFields(other.unknownFields);
-        onChanged();
-        return this;
-      }
-
-      @java.lang.Override
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      @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;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (policy.PolicyAction.PolicyRuleAction) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-      private int bitField0_;
-
-      private int action_ = 0;
-      /**
-       * .policy.PolicyRuleActionEnum action = 1;
-       * @return The enum numeric value on the wire for action.
-       */
-      @java.lang.Override public int getActionValue() {
-        return action_;
-      }
-      /**
-       * .policy.PolicyRuleActionEnum action = 1;
-       * @param value The enum numeric value on the wire for action to set.
-       * @return This builder for chaining.
-       */
-      public Builder setActionValue(int value) {
-        
-        action_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * .policy.PolicyRuleActionEnum action = 1;
-       * @return The action.
-       */
-      @java.lang.Override
-      public policy.PolicyAction.PolicyRuleActionEnum getAction() {
-        @SuppressWarnings("deprecation")
-        policy.PolicyAction.PolicyRuleActionEnum result = policy.PolicyAction.PolicyRuleActionEnum.valueOf(action_);
-        return result == null ? policy.PolicyAction.PolicyRuleActionEnum.UNRECOGNIZED : result;
-      }
-      /**
-       * .policy.PolicyRuleActionEnum action = 1;
-       * @param value The action to set.
-       * @return This builder for chaining.
-       */
-      public Builder setAction(policy.PolicyAction.PolicyRuleActionEnum value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        
-        action_ = value.getNumber();
-        onChanged();
-        return this;
-      }
-      /**
-       * .policy.PolicyRuleActionEnum action = 1;
-       * @return This builder for chaining.
-       */
-      public Builder clearAction() {
-        
-        action_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private java.util.List actionConfig_ =
-        java.util.Collections.emptyList();
-      private void ensureActionConfigIsMutable() {
-        if (!((bitField0_ & 0x00000001) != 0)) {
-          actionConfig_ = new java.util.ArrayList(actionConfig_);
-          bitField0_ |= 0x00000001;
-         }
-      }
-
-      private com.google.protobuf.RepeatedFieldBuilderV3<
-          policy.PolicyAction.PolicyRuleActionConfig, policy.PolicyAction.PolicyRuleActionConfig.Builder, policy.PolicyAction.PolicyRuleActionConfigOrBuilder> actionConfigBuilder_;
-
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public java.util.List getActionConfigList() {
-        if (actionConfigBuilder_ == null) {
-          return java.util.Collections.unmodifiableList(actionConfig_);
-        } else {
-          return actionConfigBuilder_.getMessageList();
-        }
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public int getActionConfigCount() {
-        if (actionConfigBuilder_ == null) {
-          return actionConfig_.size();
-        } else {
-          return actionConfigBuilder_.getCount();
-        }
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public policy.PolicyAction.PolicyRuleActionConfig getActionConfig(int index) {
-        if (actionConfigBuilder_ == null) {
-          return actionConfig_.get(index);
-        } else {
-          return actionConfigBuilder_.getMessage(index);
-        }
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public Builder setActionConfig(
-          int index, policy.PolicyAction.PolicyRuleActionConfig value) {
-        if (actionConfigBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          ensureActionConfigIsMutable();
-          actionConfig_.set(index, value);
-          onChanged();
-        } else {
-          actionConfigBuilder_.setMessage(index, value);
-        }
-        return this;
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public Builder setActionConfig(
-          int index, policy.PolicyAction.PolicyRuleActionConfig.Builder builderForValue) {
-        if (actionConfigBuilder_ == null) {
-          ensureActionConfigIsMutable();
-          actionConfig_.set(index, builderForValue.build());
-          onChanged();
-        } else {
-          actionConfigBuilder_.setMessage(index, builderForValue.build());
-        }
-        return this;
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public Builder addActionConfig(policy.PolicyAction.PolicyRuleActionConfig value) {
-        if (actionConfigBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          ensureActionConfigIsMutable();
-          actionConfig_.add(value);
-          onChanged();
-        } else {
-          actionConfigBuilder_.addMessage(value);
-        }
-        return this;
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public Builder addActionConfig(
-          int index, policy.PolicyAction.PolicyRuleActionConfig value) {
-        if (actionConfigBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          ensureActionConfigIsMutable();
-          actionConfig_.add(index, value);
-          onChanged();
-        } else {
-          actionConfigBuilder_.addMessage(index, value);
-        }
-        return this;
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public Builder addActionConfig(
-          policy.PolicyAction.PolicyRuleActionConfig.Builder builderForValue) {
-        if (actionConfigBuilder_ == null) {
-          ensureActionConfigIsMutable();
-          actionConfig_.add(builderForValue.build());
-          onChanged();
-        } else {
-          actionConfigBuilder_.addMessage(builderForValue.build());
-        }
-        return this;
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public Builder addActionConfig(
-          int index, policy.PolicyAction.PolicyRuleActionConfig.Builder builderForValue) {
-        if (actionConfigBuilder_ == null) {
-          ensureActionConfigIsMutable();
-          actionConfig_.add(index, builderForValue.build());
-          onChanged();
-        } else {
-          actionConfigBuilder_.addMessage(index, builderForValue.build());
-        }
-        return this;
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public Builder addAllActionConfig(
-          java.lang.Iterable values) {
-        if (actionConfigBuilder_ == null) {
-          ensureActionConfigIsMutable();
-          com.google.protobuf.AbstractMessageLite.Builder.addAll(
-              values, actionConfig_);
-          onChanged();
-        } else {
-          actionConfigBuilder_.addAllMessages(values);
-        }
-        return this;
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public Builder clearActionConfig() {
-        if (actionConfigBuilder_ == null) {
-          actionConfig_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000001);
-          onChanged();
-        } else {
-          actionConfigBuilder_.clear();
-        }
-        return this;
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public Builder removeActionConfig(int index) {
-        if (actionConfigBuilder_ == null) {
-          ensureActionConfigIsMutable();
-          actionConfig_.remove(index);
-          onChanged();
-        } else {
-          actionConfigBuilder_.remove(index);
-        }
-        return this;
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public policy.PolicyAction.PolicyRuleActionConfig.Builder getActionConfigBuilder(
-          int index) {
-        return getActionConfigFieldBuilder().getBuilder(index);
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public policy.PolicyAction.PolicyRuleActionConfigOrBuilder getActionConfigOrBuilder(
-          int index) {
-        if (actionConfigBuilder_ == null) {
-          return actionConfig_.get(index);  } else {
-          return actionConfigBuilder_.getMessageOrBuilder(index);
-        }
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public java.util.List 
-           getActionConfigOrBuilderList() {
-        if (actionConfigBuilder_ != null) {
-          return actionConfigBuilder_.getMessageOrBuilderList();
-        } else {
-          return java.util.Collections.unmodifiableList(actionConfig_);
-        }
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public policy.PolicyAction.PolicyRuleActionConfig.Builder addActionConfigBuilder() {
-        return getActionConfigFieldBuilder().addBuilder(
-            policy.PolicyAction.PolicyRuleActionConfig.getDefaultInstance());
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public policy.PolicyAction.PolicyRuleActionConfig.Builder addActionConfigBuilder(
-          int index) {
-        return getActionConfigFieldBuilder().addBuilder(
-            index, policy.PolicyAction.PolicyRuleActionConfig.getDefaultInstance());
-      }
-      /**
-       * repeated .policy.PolicyRuleActionConfig action_config = 2;
-       */
-      public java.util.List 
-           getActionConfigBuilderList() {
-        return getActionConfigFieldBuilder().getBuilderList();
-      }
-      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());
-          actionConfig_ = null;
-        }
-        return actionConfigBuilder_;
-      }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:policy.PolicyRuleAction)
-    }
+    public static final class PolicyRuleAction extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRuleAction)
+    PolicyRuleActionOrBuilder {
 
-    // @@protoc_insertion_point(class_scope:policy.PolicyRuleAction)
-    private static final policy.PolicyAction.PolicyRuleAction DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new policy.PolicyAction.PolicyRuleAction();
-    }
+        private static final long serialVersionUID = 0L;
 
-    public static policy.PolicyAction.PolicyRuleAction getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
+        // Use PolicyRuleAction.newBuilder() to construct.
+        private PolicyRuleAction(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+            super(builder);
+        }
 
-    private static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @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);
-      }
-    };
-
-    public static com.google.protobuf.Parser parser() {
-      return PARSER;
-    }
+        private PolicyRuleAction() {
+            action_ = 0;
+            actionConfig_ = java.util.Collections.emptyList();
+        }
 
-    @java.lang.Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
+        @java.lang.Override
+        @SuppressWarnings({ "unused" })
+        protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+            return new PolicyRuleAction();
+        }
 
-    @java.lang.Override
-    public policy.PolicyAction.PolicyRuleAction getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
+        @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();
+                                    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 interface PolicyRuleActionConfigOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:policy.PolicyRuleActionConfig)
-      com.google.protobuf.MessageOrBuilder {
+        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+            return policy.PolicyAction.internal_static_policy_PolicyRuleAction_descriptor;
+        }
 
-    /**
-     * string action_key = 1;
-     * @return The actionKey.
-     */
-    java.lang.String getActionKey();
-    /**
-     * string action_key = 1;
-     * @return The bytes for actionKey.
-     */
-    com.google.protobuf.ByteString
-        getActionKeyBytes();
+        @java.lang.Override
+        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
+            return policy.PolicyAction.internal_static_policy_PolicyRuleAction_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.PolicyAction.PolicyRuleAction.class, policy.PolicyAction.PolicyRuleAction.Builder.class);
+        }
 
-    /**
-     * string action_value = 2;
-     * @return The actionValue.
-     */
-    java.lang.String getActionValue();
-    /**
-     * string action_value = 2;
-     * @return The bytes for actionValue.
-     */
-    com.google.protobuf.ByteString
-        getActionValueBytes();
-  }
-  /**
-   * 
-   * Action configuration
-   * 
- * - * Protobuf type {@code policy.PolicyRuleActionConfig} - */ - public static final class PolicyRuleActionConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleActionConfig) - PolicyRuleActionConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRuleActionConfig.newBuilder() to construct. - private PolicyRuleActionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRuleActionConfig() { - actionKey_ = ""; - actionValue_ = ""; - } + public static final int ACTION_FIELD_NUMBER = 1; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRuleActionConfig(); - } + private int action_; - @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; - } + /** + * .policy.PolicyRuleActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.PolicyAction.internal_static_policy_PolicyRuleActionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.PolicyAction.PolicyRuleActionConfig.class, policy.PolicyAction.PolicyRuleActionConfig.Builder.class); - } + /** + * .policy.PolicyRuleActionEnum action = 1; + * @return The action. + */ + @java.lang.Override + public policy.PolicyAction.PolicyRuleActionEnum getAction() { + @SuppressWarnings("deprecation") + policy.PolicyAction.PolicyRuleActionEnum result = policy.PolicyAction.PolicyRuleActionEnum.valueOf(action_); + return result == null ? policy.PolicyAction.PolicyRuleActionEnum.UNRECOGNIZED : result; + } - public static final int ACTION_KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object actionKey_; - /** - * string action_key = 1; - * @return The actionKey. - */ - @java.lang.Override - public java.lang.String getActionKey() { - java.lang.Object ref = actionKey_; - 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(); - actionKey_ = s; - return s; - } - } - /** - * string action_key = 1; - * @return The bytes for actionKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getActionKeyBytes() { - java.lang.Object ref = actionKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - actionKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static final int ACTION_CONFIG_FIELD_NUMBER = 2; - public static final int ACTION_VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object actionValue_; - /** - * string action_value = 2; - * @return The actionValue. - */ - @java.lang.Override - public java.lang.String getActionValue() { - java.lang.Object ref = actionValue_; - 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(); - actionValue_ = s; - return s; - } - } - /** - * string action_value = 2; - * @return The bytes for actionValue. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getActionValueBytes() { - java.lang.Object ref = actionValue_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - actionValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private java.util.List actionConfig_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + @java.lang.Override + public java.util.List getActionConfigList() { + return actionConfig_; + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + @java.lang.Override + public java.util.List getActionConfigOrBuilderList() { + return actionConfig_; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getActionKeyBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, actionKey_); - } - if (!getActionValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, actionValue_); - } - unknownFields.writeTo(output); - } + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + @java.lang.Override + public int getActionConfigCount() { + return actionConfig_.size(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getActionKeyBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, actionKey_); - } - if (!getActionValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, actionValue_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + @java.lang.Override + public policy.PolicyAction.PolicyRuleActionConfig getActionConfig(int index) { + return actionConfig_.get(index); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.PolicyAction.PolicyRuleActionConfig)) { - return super.equals(obj); - } - policy.PolicyAction.PolicyRuleActionConfig other = (policy.PolicyAction.PolicyRuleActionConfig) obj; - - if (!getActionKey() - .equals(other.getActionKey())) return false; - if (!getActionValue() - .equals(other.getActionValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + @java.lang.Override + public policy.PolicyAction.PolicyRuleActionConfigOrBuilder getActionConfigOrBuilder(int index) { + return actionConfig_.get(index); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ACTION_KEY_FIELD_NUMBER; - hash = (53 * hash) + getActionKey().hashCode(); - hash = (37 * hash) + ACTION_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getActionValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - public static policy.PolicyAction.PolicyRuleActionConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.PolicyAction.PolicyRuleActionConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.PolicyAction.PolicyRuleActionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.PolicyAction.PolicyRuleActionConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.PolicyAction.PolicyRuleActionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.PolicyAction.PolicyRuleActionConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.PolicyAction.PolicyRuleActionConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.PolicyAction.PolicyRuleActionConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.PolicyAction.PolicyRuleActionConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.PolicyAction.PolicyRuleActionConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.PolicyAction.PolicyRuleActionConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.PolicyAction.PolicyRuleActionConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (action_ != policy.PolicyAction.PolicyRuleActionEnum.POLICYRULE_ACTION_NO_ACTION.getNumber()) { + output.writeEnum(1, action_); + } + for (int i = 0; i < actionConfig_.size(); i++) { + output.writeMessage(2, actionConfig_.get(i)); + } + unknownFields.writeTo(output); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.PolicyAction.PolicyRuleActionConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (action_ != policy.PolicyAction.PolicyRuleActionEnum.POLICYRULE_ACTION_NO_ACTION.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_); + } + for (int i = 0; i < actionConfig_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, actionConfig_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Action configuration
-     * 
- * - * Protobuf type {@code policy.PolicyRuleActionConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleActionConfig) - policy.PolicyAction.PolicyRuleActionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.PolicyAction.internal_static_policy_PolicyRuleActionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.PolicyAction.internal_static_policy_PolicyRuleActionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.PolicyAction.PolicyRuleActionConfig.class, policy.PolicyAction.PolicyRuleActionConfig.Builder.class); - } - - // 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(); - actionKey_ = ""; - - actionValue_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return policy.PolicyAction.internal_static_policy_PolicyRuleActionConfig_descriptor; - } - - @java.lang.Override - public policy.PolicyAction.PolicyRuleActionConfig getDefaultInstanceForType() { - return policy.PolicyAction.PolicyRuleActionConfig.getDefaultInstance(); - } - - @java.lang.Override - public policy.PolicyAction.PolicyRuleActionConfig build() { - policy.PolicyAction.PolicyRuleActionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public policy.PolicyAction.PolicyRuleActionConfig buildPartial() { - policy.PolicyAction.PolicyRuleActionConfig result = new policy.PolicyAction.PolicyRuleActionConfig(this); - result.actionKey_ = actionKey_; - result.actionValue_ = actionValue_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.PolicyAction.PolicyRuleActionConfig) { - return mergeFrom((policy.PolicyAction.PolicyRuleActionConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(policy.PolicyAction.PolicyRuleActionConfig other) { - if (other == policy.PolicyAction.PolicyRuleActionConfig.getDefaultInstance()) return this; - if (!other.getActionKey().isEmpty()) { - actionKey_ = other.actionKey_; - onChanged(); - } - if (!other.getActionValue().isEmpty()) { - actionValue_ = other.actionValue_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.PolicyAction.PolicyRuleActionConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object actionKey_ = ""; - /** - * string action_key = 1; - * @return The actionKey. - */ - public java.lang.String getActionKey() { - java.lang.Object ref = actionKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - actionKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string action_key = 1; - * @return The bytes for actionKey. - */ - public com.google.protobuf.ByteString - getActionKeyBytes() { - java.lang.Object ref = actionKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - actionKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string action_key = 1; - * @param value The actionKey to set. - * @return This builder for chaining. - */ - public Builder setActionKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - actionKey_ = value; - onChanged(); - return this; - } - /** - * string action_key = 1; - * @return This builder for chaining. - */ - public Builder clearActionKey() { - - actionKey_ = getDefaultInstance().getActionKey(); - onChanged(); - return this; - } - /** - * string action_key = 1; - * @param value The bytes for actionKey to set. - * @return This builder for chaining. - */ - public Builder setActionKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - actionKey_ = value; - onChanged(); - return this; - } - - private java.lang.Object actionValue_ = ""; - /** - * string action_value = 2; - * @return The actionValue. - */ - public java.lang.String getActionValue() { - java.lang.Object ref = actionValue_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - actionValue_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string action_value = 2; - * @return The bytes for actionValue. - */ - public com.google.protobuf.ByteString - getActionValueBytes() { - java.lang.Object ref = actionValue_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - actionValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string action_value = 2; - * @param value The actionValue to set. - * @return This builder for chaining. - */ - public Builder setActionValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - actionValue_ = value; - onChanged(); - return this; - } - /** - * string action_value = 2; - * @return This builder for chaining. - */ - public Builder clearActionValue() { - - actionValue_ = getDefaultInstance().getActionValue(); - onChanged(); - return this; - } - /** - * string action_value = 2; - * @param value The bytes for actionValue to set. - * @return This builder for chaining. - */ - public Builder setActionValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - actionValue_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleActionConfig) - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.PolicyAction.PolicyRuleAction)) { + return super.equals(obj); + } + policy.PolicyAction.PolicyRuleAction other = (policy.PolicyAction.PolicyRuleAction) obj; + if (action_ != other.action_) + return false; + if (!getActionConfigList().equals(other.getActionConfigList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - // @@protoc_insertion_point(class_scope:policy.PolicyRuleActionConfig) - private static final policy.PolicyAction.PolicyRuleActionConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.PolicyAction.PolicyRuleActionConfig(); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + if (getActionConfigCount() > 0) { + hash = (37 * hash) + ACTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getActionConfigList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - public static policy.PolicyAction.PolicyRuleActionConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static policy.PolicyAction.PolicyRuleAction parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static policy.PolicyAction.PolicyRuleAction parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static policy.PolicyAction.PolicyRuleAction parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public policy.PolicyAction.PolicyRuleActionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static policy.PolicyAction.PolicyRuleAction parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.PolicyAction.PolicyRuleAction parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.PolicyAction.PolicyRuleAction parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.PolicyAction.PolicyRuleAction parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.PolicyAction.PolicyRuleAction parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.PolicyAction.PolicyRuleAction parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static policy.PolicyAction.PolicyRuleAction parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.PolicyAction.PolicyRuleAction parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.PolicyAction.PolicyRuleAction parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(policy.PolicyAction.PolicyRuleAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * Action
+         * 
+ * + * Protobuf type {@code policy.PolicyRuleAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRuleAction) + policy.PolicyAction.PolicyRuleActionOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.PolicyAction.internal_static_policy_PolicyRuleAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.PolicyAction.internal_static_policy_PolicyRuleAction_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.PolicyAction.PolicyRuleAction.class, policy.PolicyAction.PolicyRuleAction.Builder.class); + } + + // Construct using policy.PolicyAction.PolicyRuleAction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleAction_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleAction_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleActionConfig_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleActionConfig_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\023policy_action.proto\022\006policy\"w\n\020PolicyR" + - "uleAction\022,\n\006action\030\001 \001(\0162\034.policy.Polic" + - "yRuleActionEnum\0225\n\raction_config\030\002 \003(\0132\036" + - ".policy.PolicyRuleActionConfig\"B\n\026Policy" + - "RuleActionConfig\022\022\n\naction_key\030\001 \001(\t\022\024\n\014" + - "action_value\030\002 \001(\t*\216\002\n\024PolicyRuleActionE" + - "num\022\037\n\033POLICYRULE_ACTION_NO_ACTION\020\000\022\'\n#" + - "POLICYRULE_ACTION_SET_DEVICE_STATUS\020\001\022,\n" + - "(POLICYRULE_ACTION_ADD_SERVICE_CONFIGRUL" + - "E\020\002\022,\n(POLICYRULE_ACTION_ADD_SERVICE_CON" + - "STRAINT\020\003\022\'\n#POLICY_RULE_ACTION_CALL_SER" + - "VICE_RPC\020\004\022\'\n#POLICY_RULE_ACTION_RECALCU" + - "LATE_PATH\020\005b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_policy_PolicyRuleAction_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_policy_PolicyRuleAction_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleAction_descriptor, - new java.lang.String[] { "Action", "ActionConfig", }); - internal_static_policy_PolicyRuleActionConfig_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_policy_PolicyRuleActionConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleActionConfig_descriptor, - new java.lang.String[] { "ActionKey", "ActionValue", }); - } - - // @@protoc_insertion_point(outer_class_scope) + 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(); + action_ = 0; + if (actionConfigBuilder_ == null) { + actionConfig_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + actionConfigBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.PolicyAction.internal_static_policy_PolicyRuleAction_descriptor; + } + + @java.lang.Override + public policy.PolicyAction.PolicyRuleAction getDefaultInstanceForType() { + return policy.PolicyAction.PolicyRuleAction.getDefaultInstance(); + } + + @java.lang.Override + public policy.PolicyAction.PolicyRuleAction build() { + policy.PolicyAction.PolicyRuleAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public policy.PolicyAction.PolicyRuleAction buildPartial() { + policy.PolicyAction.PolicyRuleAction result = new policy.PolicyAction.PolicyRuleAction(this); + int from_bitField0_ = bitField0_; + result.action_ = action_; + if (actionConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + actionConfig_ = java.util.Collections.unmodifiableList(actionConfig_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.PolicyAction.PolicyRuleAction) { + return mergeFrom((policy.PolicyAction.PolicyRuleAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(policy.PolicyAction.PolicyRuleAction other) { + if (other == policy.PolicyAction.PolicyRuleAction.getDefaultInstance()) + return this; + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + if (actionConfigBuilder_ == null) { + if (!other.actionConfig_.isEmpty()) { + if (actionConfig_.isEmpty()) { + actionConfig_ = other.actionConfig_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureActionConfigIsMutable(); + actionConfig_.addAll(other.actionConfig_); + } + onChanged(); + } + } else { + if (!other.actionConfig_.isEmpty()) { + if (actionConfigBuilder_.isEmpty()) { + actionConfigBuilder_.dispose(); + actionConfigBuilder_ = null; + actionConfig_ = other.actionConfig_; + bitField0_ = (bitField0_ & ~0x00000001); + actionConfigBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getActionConfigFieldBuilder() : null; + } else { + actionConfigBuilder_.addAllMessages(other.actionConfig_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.PolicyAction.PolicyRuleAction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int action_ = 0; + + /** + * .policy.PolicyRuleActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + + /** + * .policy.PolicyRuleActionEnum action = 1; + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + action_ = value; + onChanged(); + return this; + } + + /** + * .policy.PolicyRuleActionEnum action = 1; + * @return The action. + */ + @java.lang.Override + public policy.PolicyAction.PolicyRuleActionEnum getAction() { + @SuppressWarnings("deprecation") + policy.PolicyAction.PolicyRuleActionEnum result = policy.PolicyAction.PolicyRuleActionEnum.valueOf(action_); + return result == null ? policy.PolicyAction.PolicyRuleActionEnum.UNRECOGNIZED : result; + } + + /** + * .policy.PolicyRuleActionEnum action = 1; + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(policy.PolicyAction.PolicyRuleActionEnum value) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .policy.PolicyRuleActionEnum action = 1; + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = 0; + onChanged(); + return this; + } + + private java.util.List actionConfig_ = java.util.Collections.emptyList(); + + private void ensureActionConfigIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + actionConfig_ = new java.util.ArrayList(actionConfig_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 actionConfigBuilder_; + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public java.util.List getActionConfigList() { + if (actionConfigBuilder_ == null) { + return java.util.Collections.unmodifiableList(actionConfig_); + } else { + return actionConfigBuilder_.getMessageList(); + } + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public int getActionConfigCount() { + if (actionConfigBuilder_ == null) { + return actionConfig_.size(); + } else { + return actionConfigBuilder_.getCount(); + } + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public policy.PolicyAction.PolicyRuleActionConfig getActionConfig(int index) { + if (actionConfigBuilder_ == null) { + return actionConfig_.get(index); + } else { + return actionConfigBuilder_.getMessage(index); + } + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public Builder setActionConfig(int index, policy.PolicyAction.PolicyRuleActionConfig value) { + if (actionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionConfigIsMutable(); + actionConfig_.set(index, value); + onChanged(); + } else { + actionConfigBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public Builder setActionConfig(int index, policy.PolicyAction.PolicyRuleActionConfig.Builder builderForValue) { + if (actionConfigBuilder_ == null) { + ensureActionConfigIsMutable(); + actionConfig_.set(index, builderForValue.build()); + onChanged(); + } else { + actionConfigBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public Builder addActionConfig(policy.PolicyAction.PolicyRuleActionConfig value) { + if (actionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionConfigIsMutable(); + actionConfig_.add(value); + onChanged(); + } else { + actionConfigBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public Builder addActionConfig(int index, policy.PolicyAction.PolicyRuleActionConfig value) { + if (actionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionConfigIsMutable(); + actionConfig_.add(index, value); + onChanged(); + } else { + actionConfigBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public Builder addActionConfig(policy.PolicyAction.PolicyRuleActionConfig.Builder builderForValue) { + if (actionConfigBuilder_ == null) { + ensureActionConfigIsMutable(); + actionConfig_.add(builderForValue.build()); + onChanged(); + } else { + actionConfigBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public Builder addActionConfig(int index, policy.PolicyAction.PolicyRuleActionConfig.Builder builderForValue) { + if (actionConfigBuilder_ == null) { + ensureActionConfigIsMutable(); + actionConfig_.add(index, builderForValue.build()); + onChanged(); + } else { + actionConfigBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public Builder addAllActionConfig(java.lang.Iterable values) { + if (actionConfigBuilder_ == null) { + ensureActionConfigIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, actionConfig_); + onChanged(); + } else { + actionConfigBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public Builder clearActionConfig() { + if (actionConfigBuilder_ == null) { + actionConfig_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + actionConfigBuilder_.clear(); + } + return this; + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public Builder removeActionConfig(int index) { + if (actionConfigBuilder_ == null) { + ensureActionConfigIsMutable(); + actionConfig_.remove(index); + onChanged(); + } else { + actionConfigBuilder_.remove(index); + } + return this; + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public policy.PolicyAction.PolicyRuleActionConfig.Builder getActionConfigBuilder(int index) { + return getActionConfigFieldBuilder().getBuilder(index); + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public policy.PolicyAction.PolicyRuleActionConfigOrBuilder getActionConfigOrBuilder(int index) { + if (actionConfigBuilder_ == null) { + return actionConfig_.get(index); + } else { + return actionConfigBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public java.util.List getActionConfigOrBuilderList() { + if (actionConfigBuilder_ != null) { + return actionConfigBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actionConfig_); + } + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public policy.PolicyAction.PolicyRuleActionConfig.Builder addActionConfigBuilder() { + return getActionConfigFieldBuilder().addBuilder(policy.PolicyAction.PolicyRuleActionConfig.getDefaultInstance()); + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public policy.PolicyAction.PolicyRuleActionConfig.Builder addActionConfigBuilder(int index) { + return getActionConfigFieldBuilder().addBuilder(index, policy.PolicyAction.PolicyRuleActionConfig.getDefaultInstance()); + } + + /** + * repeated .policy.PolicyRuleActionConfig action_config = 2; + */ + public java.util.List getActionConfigBuilderList() { + return getActionConfigFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getActionConfigFieldBuilder() { + if (actionConfigBuilder_ == null) { + actionConfigBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(actionConfig_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + actionConfig_ = null; + } + return actionConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleAction) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleAction) + private static final policy.PolicyAction.PolicyRuleAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new policy.PolicyAction.PolicyRuleAction(); + } + + public static policy.PolicyAction.PolicyRuleAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.PolicyAction.PolicyRuleAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PolicyRuleActionConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRuleActionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * string action_key = 1; + * @return The actionKey. + */ + java.lang.String getActionKey(); + + /** + * string action_key = 1; + * @return The bytes for actionKey. + */ + com.google.protobuf.ByteString getActionKeyBytes(); + + /** + * string action_value = 2; + * @return The actionValue. + */ + java.lang.String getActionValue(); + + /** + * string action_value = 2; + * @return The bytes for actionValue. + */ + com.google.protobuf.ByteString getActionValueBytes(); + } + + /** + *
+     * Action configuration
+     * 
+ * + * Protobuf type {@code policy.PolicyRuleActionConfig} + */ + public static final class PolicyRuleActionConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRuleActionConfig) + PolicyRuleActionConfigOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use PolicyRuleActionConfig.newBuilder() to construct. + private PolicyRuleActionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PolicyRuleActionConfig() { + actionKey_ = ""; + actionValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.PolicyAction.internal_static_policy_PolicyRuleActionConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.PolicyAction.PolicyRuleActionConfig.class, policy.PolicyAction.PolicyRuleActionConfig.Builder.class); + } + + public static final int ACTION_KEY_FIELD_NUMBER = 1; + + private volatile java.lang.Object actionKey_; + + /** + * string action_key = 1; + * @return The actionKey. + */ + @java.lang.Override + public java.lang.String getActionKey() { + java.lang.Object ref = actionKey_; + 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(); + actionKey_ = s; + return s; + } + } + + /** + * string action_key = 1; + * @return The bytes for actionKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionKeyBytes() { + java.lang.Object ref = actionKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + actionKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_VALUE_FIELD_NUMBER = 2; + + private volatile java.lang.Object actionValue_; + + /** + * string action_value = 2; + * @return The actionValue. + */ + @java.lang.Override + public java.lang.String getActionValue() { + java.lang.Object ref = actionValue_; + 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(); + actionValue_ = s; + return s; + } + } + + /** + * string action_value = 2; + * @return The bytes for actionValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionValueBytes() { + java.lang.Object ref = actionValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + actionValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getActionKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, actionKey_); + } + if (!getActionValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, actionValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getActionKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, actionKey_); + } + if (!getActionValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, actionValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.PolicyAction.PolicyRuleActionConfig)) { + return super.equals(obj); + } + policy.PolicyAction.PolicyRuleActionConfig other = (policy.PolicyAction.PolicyRuleActionConfig) obj; + if (!getActionKey().equals(other.getActionKey())) + return false; + if (!getActionValue().equals(other.getActionValue())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTION_KEY_FIELD_NUMBER; + hash = (53 * hash) + getActionKey().hashCode(); + hash = (37 * hash) + ACTION_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getActionValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static policy.PolicyAction.PolicyRuleActionConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.PolicyAction.PolicyRuleActionConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.PolicyAction.PolicyRuleActionConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.PolicyAction.PolicyRuleActionConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.PolicyAction.PolicyRuleActionConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static policy.PolicyAction.PolicyRuleActionConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static policy.PolicyAction.PolicyRuleActionConfig parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.PolicyAction.PolicyRuleActionConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.PolicyAction.PolicyRuleActionConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static policy.PolicyAction.PolicyRuleActionConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static policy.PolicyAction.PolicyRuleActionConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static policy.PolicyAction.PolicyRuleActionConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(policy.PolicyAction.PolicyRuleActionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * Action configuration
+         * 
+ * + * Protobuf type {@code policy.PolicyRuleActionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRuleActionConfig) + policy.PolicyAction.PolicyRuleActionConfigOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.PolicyAction.internal_static_policy_PolicyRuleActionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.PolicyAction.internal_static_policy_PolicyRuleActionConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.PolicyAction.PolicyRuleActionConfig.class, policy.PolicyAction.PolicyRuleActionConfig.Builder.class); + } + + // 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(); + actionKey_ = ""; + actionValue_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.PolicyAction.internal_static_policy_PolicyRuleActionConfig_descriptor; + } + + @java.lang.Override + public policy.PolicyAction.PolicyRuleActionConfig getDefaultInstanceForType() { + return policy.PolicyAction.PolicyRuleActionConfig.getDefaultInstance(); + } + + @java.lang.Override + public policy.PolicyAction.PolicyRuleActionConfig build() { + policy.PolicyAction.PolicyRuleActionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public policy.PolicyAction.PolicyRuleActionConfig buildPartial() { + policy.PolicyAction.PolicyRuleActionConfig result = new policy.PolicyAction.PolicyRuleActionConfig(this); + result.actionKey_ = actionKey_; + result.actionValue_ = actionValue_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.PolicyAction.PolicyRuleActionConfig) { + return mergeFrom((policy.PolicyAction.PolicyRuleActionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(policy.PolicyAction.PolicyRuleActionConfig other) { + if (other == policy.PolicyAction.PolicyRuleActionConfig.getDefaultInstance()) + return this; + if (!other.getActionKey().isEmpty()) { + actionKey_ = other.actionKey_; + onChanged(); + } + if (!other.getActionValue().isEmpty()) { + actionValue_ = other.actionValue_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.PolicyAction.PolicyRuleActionConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object actionKey_ = ""; + + /** + * string action_key = 1; + * @return The actionKey. + */ + public java.lang.String getActionKey() { + java.lang.Object ref = actionKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string action_key = 1; + * @return The bytes for actionKey. + */ + public com.google.protobuf.ByteString getActionKeyBytes() { + java.lang.Object ref = actionKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + actionKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string action_key = 1; + * @param value The actionKey to set. + * @return This builder for chaining. + */ + public Builder setActionKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + actionKey_ = value; + onChanged(); + return this; + } + + /** + * string action_key = 1; + * @return This builder for chaining. + */ + public Builder clearActionKey() { + actionKey_ = getDefaultInstance().getActionKey(); + onChanged(); + return this; + } + + /** + * string action_key = 1; + * @param value The bytes for actionKey to set. + * @return This builder for chaining. + */ + public Builder setActionKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + actionKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object actionValue_ = ""; + + /** + * string action_value = 2; + * @return The actionValue. + */ + public java.lang.String getActionValue() { + java.lang.Object ref = actionValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string action_value = 2; + * @return The bytes for actionValue. + */ + public com.google.protobuf.ByteString getActionValueBytes() { + java.lang.Object ref = actionValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + actionValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string action_value = 2; + * @param value The actionValue to set. + * @return This builder for chaining. + */ + public Builder setActionValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + actionValue_ = value; + onChanged(); + return this; + } + + /** + * string action_value = 2; + * @return This builder for chaining. + */ + public Builder clearActionValue() { + actionValue_ = getDefaultInstance().getActionValue(); + onChanged(); + return this; + } + + /** + * string action_value = 2; + * @param value The bytes for actionValue to set. + * @return This builder for chaining. + */ + public Builder setActionValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + actionValue_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleActionConfig) + } + + // @@protoc_insertion_point(class_scope:policy.PolicyRuleActionConfig) + private static final policy.PolicyAction.PolicyRuleActionConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new policy.PolicyAction.PolicyRuleActionConfig(); + } + + public static policy.PolicyAction.PolicyRuleActionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public policy.PolicyAction.PolicyRuleActionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRuleAction_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleAction_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRuleActionConfig_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleActionConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { "\n\023policy_action.proto\022\006policy\"w\n\020PolicyR" + "uleAction\022,\n\006action\030\001 \001(\0162\034.policy.Polic" + "yRuleActionEnum\0225\n\raction_config\030\002 \003(\0132\036" + ".policy.PolicyRuleActionConfig\"B\n\026Policy" + "RuleActionConfig\022\022\n\naction_key\030\001 \001(\t\022\024\n\014" + "action_value\030\002 \001(\t*\216\002\n\024PolicyRuleActionE" + "num\022\037\n\033POLICYRULE_ACTION_NO_ACTION\020\000\022\'\n#" + "POLICYRULE_ACTION_SET_DEVICE_STATUS\020\001\022,\n" + "(POLICYRULE_ACTION_ADD_SERVICE_CONFIGRUL" + "E\020\002\022,\n(POLICYRULE_ACTION_ADD_SERVICE_CON" + "STRAINT\020\003\022\'\n#POLICY_RULE_ACTION_CALL_SER" + "VICE_RPC\020\004\022\'\n#POLICY_RULE_ACTION_RECALCU" + "LATE_PATH\020\005b\006proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_policy_PolicyRuleAction_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_policy_PolicyRuleAction_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRuleAction_descriptor, new java.lang.String[] { "Action", "ActionConfig" }); + internal_static_policy_PolicyRuleActionConfig_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_policy_PolicyRuleActionConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRuleActionConfig_descriptor, new java.lang.String[] { "ActionKey", "ActionValue" }); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyCondition.java b/src/policy/target/generated-sources/grpc/policy/PolicyCondition.java index ecd7192778b6f5e7d0f7ee8f189565c828860c21..269c8b4380fd8f764ab61c6b77c289268a72d7bb 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyCondition.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyCondition.java @@ -1,1362 +1,1301 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: policy_condition.proto - package policy; public final class PolicyCondition { - private PolicyCondition() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - *
-   * Operator to be used when comparing Kpis with condition values
-   * 
- * - * Protobuf enum {@code policy.NumericalOperator} - */ - public enum NumericalOperator - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Kpi numerical operator undefined
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_UNDEFINED = 0; - */ - POLICYRULE_CONDITION_NUMERICAL_UNDEFINED(0), - /** - *
-     * Kpi is equal with value
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_EQUAL = 1; - */ - POLICYRULE_CONDITION_NUMERICAL_EQUAL(1), - /** - *
-     * Kpi is not equal with value
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL = 2; - */ - POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL(2), - /** - *
-     * Kpi is less than value
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_LESS_THAN = 3; - */ - POLICYRULE_CONDITION_NUMERICAL_LESS_THAN(3), - /** - *
-     * Kpi is less than or equal with value
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL = 4; - */ - POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL(4), - /** - *
-     * Kpi is greater than value
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN = 5; - */ - POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN(5), - /** - *
-     * Kpi is less than or equal with value
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL = 6; - */ - POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL(6), - UNRECOGNIZED(-1), - ; + + private PolicyCondition() { + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } /** *
-     * Kpi numerical operator undefined
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_UNDEFINED = 0; - */ - public static final int POLICYRULE_CONDITION_NUMERICAL_UNDEFINED_VALUE = 0; - /** - *
-     * Kpi is equal with value
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_EQUAL = 1; - */ - public static final int POLICYRULE_CONDITION_NUMERICAL_EQUAL_VALUE = 1; - /** - *
-     * Kpi is not equal with value
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL = 2; - */ - public static final int POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL_VALUE = 2; - /** - *
-     * Kpi is less than value
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_LESS_THAN = 3; - */ - public static final int POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_VALUE = 3; - /** - *
-     * Kpi is less than or equal with value
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL = 4; - */ - public static final int POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL_VALUE = 4; - /** - *
-     * Kpi is greater than value
-     * 
- * - * POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN = 5; - */ - public static final int POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_VALUE = 5; - /** - *
-     * Kpi is less than or equal with value
+     * Operator to be used when comparing Kpis with condition values
      * 
* - * POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL = 6; + * Protobuf enum {@code policy.NumericalOperator} */ - public static final int POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL_VALUE = 6; + public enum NumericalOperator implements com.google.protobuf.ProtocolMessageEnum { + + /** + *
+         * Kpi numerical operator undefined
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_UNDEFINED = 0; + */ + POLICYRULE_CONDITION_NUMERICAL_UNDEFINED(0), + /** + *
+         * Kpi is equal with value
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_EQUAL = 1; + */ + POLICYRULE_CONDITION_NUMERICAL_EQUAL(1), + /** + *
+         * Kpi is not equal with value
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL = 2; + */ + POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL(2), + /** + *
+         * Kpi is less than value
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_LESS_THAN = 3; + */ + POLICYRULE_CONDITION_NUMERICAL_LESS_THAN(3), + /** + *
+         * Kpi is less than or equal with value
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL = 4; + */ + POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL(4), + /** + *
+         * Kpi is greater than value
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN = 5; + */ + POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN(5), + /** + *
+         * Kpi is less than or equal with value
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL = 6; + */ + POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL(6), + UNRECOGNIZED(-1); + + /** + *
+         * Kpi numerical operator undefined
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_UNDEFINED = 0; + */ + public static final int POLICYRULE_CONDITION_NUMERICAL_UNDEFINED_VALUE = 0; + + /** + *
+         * Kpi is equal with value
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_EQUAL = 1; + */ + public static final int POLICYRULE_CONDITION_NUMERICAL_EQUAL_VALUE = 1; + + /** + *
+         * Kpi is not equal with value
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL = 2; + */ + public static final int POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL_VALUE = 2; + + /** + *
+         * Kpi is less than value
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_LESS_THAN = 3; + */ + public static final int POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_VALUE = 3; + + /** + *
+         * Kpi is less than or equal with value
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL = 4; + */ + public static final int POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL_VALUE = 4; + + /** + *
+         * Kpi is greater than value
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN = 5; + */ + public static final int POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_VALUE = 5; + + /** + *
+         * Kpi is less than or equal with value
+         * 
+ * + * POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL = 6; + */ + public static final int POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NumericalOperator valueOf(int value) { + return forNumber(value); + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NumericalOperator forNumber(int value) { + switch(value) { + case 0: + return POLICYRULE_CONDITION_NUMERICAL_UNDEFINED; + case 1: + return POLICYRULE_CONDITION_NUMERICAL_EQUAL; + case 2: + return POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL; + case 3: + return POLICYRULE_CONDITION_NUMERICAL_LESS_THAN; + case 4: + return POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL; + case 5: + return POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN; + case 6: + return POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL; + default: + return null; + } + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static NumericalOperator valueOf(int value) { - return forNumber(value); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static NumericalOperator forNumber(int value) { - switch (value) { - case 0: return POLICYRULE_CONDITION_NUMERICAL_UNDEFINED; - case 1: return POLICYRULE_CONDITION_NUMERICAL_EQUAL; - case 2: return POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL; - case 3: return POLICYRULE_CONDITION_NUMERICAL_LESS_THAN; - case 4: return POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL; - case 5: return POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN; - case 6: return POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL; - default: return null; - } - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - NumericalOperator> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { public NumericalOperator findValueByNumber(int number) { - return NumericalOperator.forNumber(number); + return NumericalOperator.forNumber(number); } - }; + }; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return policy.PolicyCondition.getDescriptor().getEnumTypes().get(0); - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - private static final NumericalOperator[] VALUES = values(); - - public static NumericalOperator valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return policy.PolicyCondition.getDescriptor().getEnumTypes().get(0); + } + + private static final NumericalOperator[] VALUES = values(); + + public static NumericalOperator valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - private final int value; + private final int value; - private NumericalOperator(int value) { - this.value = value; + private NumericalOperator(int value) { + this.value = value; + } } - // @@protoc_insertion_point(enum_scope:policy.NumericalOperator) - } - - /** - *
-   * Operator to be used when evaluating each condition
-   * 
- * - * Protobuf enum {@code policy.BooleanOperator} - */ - public enum BooleanOperator - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Boolean operator undefined
-     * 
- * - * POLICYRULE_CONDITION_BOOLEAN_UNDEFINED = 0; - */ - POLICYRULE_CONDITION_BOOLEAN_UNDEFINED(0), /** *
-     * Boolean AND operator
+     * Operator to be used when evaluating each condition
      * 
* - * POLICYRULE_CONDITION_BOOLEAN_AND = 1; + * Protobuf enum {@code policy.BooleanOperator} */ - POLICYRULE_CONDITION_BOOLEAN_AND(1), - /** - *
-     * Boolean OR operator
-     * 
- * - * POLICYRULE_CONDITION_BOOLEAN_OR = 2; - */ - POLICYRULE_CONDITION_BOOLEAN_OR(2), - UNRECOGNIZED(-1), - ; + public enum BooleanOperator implements com.google.protobuf.ProtocolMessageEnum { + + /** + *
+         * Boolean operator undefined
+         * 
+ * + * POLICYRULE_CONDITION_BOOLEAN_UNDEFINED = 0; + */ + POLICYRULE_CONDITION_BOOLEAN_UNDEFINED(0), + /** + *
+         * Boolean AND operator
+         * 
+ * + * POLICYRULE_CONDITION_BOOLEAN_AND = 1; + */ + POLICYRULE_CONDITION_BOOLEAN_AND(1), + /** + *
+         * Boolean OR operator
+         * 
+ * + * POLICYRULE_CONDITION_BOOLEAN_OR = 2; + */ + POLICYRULE_CONDITION_BOOLEAN_OR(2), + UNRECOGNIZED(-1); + + /** + *
+         * Boolean operator undefined
+         * 
+ * + * POLICYRULE_CONDITION_BOOLEAN_UNDEFINED = 0; + */ + public static final int POLICYRULE_CONDITION_BOOLEAN_UNDEFINED_VALUE = 0; + + /** + *
+         * Boolean AND operator
+         * 
+ * + * POLICYRULE_CONDITION_BOOLEAN_AND = 1; + */ + public static final int POLICYRULE_CONDITION_BOOLEAN_AND_VALUE = 1; + + /** + *
+         * Boolean OR operator
+         * 
+ * + * POLICYRULE_CONDITION_BOOLEAN_OR = 2; + */ + public static final int POLICYRULE_CONDITION_BOOLEAN_OR_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } - /** - *
-     * Boolean operator undefined
-     * 
- * - * POLICYRULE_CONDITION_BOOLEAN_UNDEFINED = 0; - */ - public static final int POLICYRULE_CONDITION_BOOLEAN_UNDEFINED_VALUE = 0; - /** - *
-     * Boolean AND operator
-     * 
- * - * POLICYRULE_CONDITION_BOOLEAN_AND = 1; - */ - public static final int POLICYRULE_CONDITION_BOOLEAN_AND_VALUE = 1; - /** - *
-     * Boolean OR operator
-     * 
- * - * POLICYRULE_CONDITION_BOOLEAN_OR = 2; - */ - public static final int POLICYRULE_CONDITION_BOOLEAN_OR_VALUE = 2; + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BooleanOperator valueOf(int value) { + return forNumber(value); + } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BooleanOperator forNumber(int value) { + switch(value) { + case 0: + return POLICYRULE_CONDITION_BOOLEAN_UNDEFINED; + case 1: + return POLICYRULE_CONDITION_BOOLEAN_AND; + case 2: + return POLICYRULE_CONDITION_BOOLEAN_OR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { + + public BooleanOperator findValueByNumber(int number) { + return BooleanOperator.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return policy.PolicyCondition.getDescriptor().getEnumTypes().get(1); + } + + private static final BooleanOperator[] VALUES = values(); + + public static BooleanOperator valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; + private final int value; + + private BooleanOperator(int value) { + this.value = value; + } } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BooleanOperator valueOf(int value) { - return forNumber(value); + public interface PolicyRuleConditionOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.PolicyRuleCondition) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.KpiId kpiId = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpiId = 1; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpiId = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * .policy.NumericalOperator numericalOperator = 2; + * @return The enum numeric value on the wire for numericalOperator. + */ + int getNumericalOperatorValue(); + + /** + * .policy.NumericalOperator numericalOperator = 2; + * @return The numericalOperator. + */ + policy.PolicyCondition.NumericalOperator getNumericalOperator(); + + /** + * .monitoring.KpiValue kpiValue = 3; + * @return Whether the kpiValue field is set. + */ + boolean hasKpiValue(); + + /** + * .monitoring.KpiValue kpiValue = 3; + * @return The kpiValue. + */ + monitoring.Monitoring.KpiValue getKpiValue(); + + /** + * .monitoring.KpiValue kpiValue = 3; + */ + monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + *
+     * Condition
+     * 
+ * + * Protobuf type {@code policy.PolicyRuleCondition} */ - public static BooleanOperator forNumber(int value) { - switch (value) { - case 0: return POLICYRULE_CONDITION_BOOLEAN_UNDEFINED; - case 1: return POLICYRULE_CONDITION_BOOLEAN_AND; - case 2: return POLICYRULE_CONDITION_BOOLEAN_OR; - default: return null; - } - } + public static final class PolicyRuleCondition extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:policy.PolicyRuleCondition) + PolicyRuleConditionOrBuilder { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BooleanOperator> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BooleanOperator findValueByNumber(int number) { - return BooleanOperator.forNumber(number); - } - }; + private static final long serialVersionUID = 0L; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return policy.PolicyCondition.getDescriptor().getEnumTypes().get(1); - } + // Use PolicyRuleCondition.newBuilder() to construct. + private PolicyRuleCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final BooleanOperator[] VALUES = values(); - - public static BooleanOperator valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private PolicyRuleCondition() { + numericalOperator_ = 0; + } - private final int value; + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PolicyRuleCondition(); + } - private BooleanOperator(int value) { - this.value = value; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - // @@protoc_insertion_point(enum_scope:policy.BooleanOperator) - } + 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 interface PolicyRuleConditionOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.PolicyRuleCondition) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.PolicyCondition.internal_static_policy_PolicyRuleCondition_descriptor; + } - /** - * .monitoring.KpiId kpiId = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpiId = 1; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpiId = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.PolicyCondition.internal_static_policy_PolicyRuleCondition_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.PolicyCondition.PolicyRuleCondition.class, policy.PolicyCondition.PolicyRuleCondition.Builder.class); + } - /** - * .policy.NumericalOperator numericalOperator = 2; - * @return The enum numeric value on the wire for numericalOperator. - */ - int getNumericalOperatorValue(); - /** - * .policy.NumericalOperator numericalOperator = 2; - * @return The numericalOperator. - */ - policy.PolicyCondition.NumericalOperator getNumericalOperator(); + public static final int KPIID_FIELD_NUMBER = 1; - /** - * .monitoring.KpiValue kpiValue = 3; - * @return Whether the kpiValue field is set. - */ - boolean hasKpiValue(); - /** - * .monitoring.KpiValue kpiValue = 3; - * @return The kpiValue. - */ - monitoring.Monitoring.KpiValue getKpiValue(); - /** - * .monitoring.KpiValue kpiValue = 3; - */ - monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); - } - /** - *
-   * Condition
-   * 
- * - * Protobuf type {@code policy.PolicyRuleCondition} - */ - public static final class PolicyRuleCondition extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.PolicyRuleCondition) - PolicyRuleConditionOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyRuleCondition.newBuilder() to construct. - private PolicyRuleCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyRuleCondition() { - numericalOperator_ = 0; - } + private monitoring.Monitoring.KpiId kpiId_; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyRuleCondition(); - } + /** + * .monitoring.KpiId kpiId = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } - @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; - } - } + /** + * .monitoring.KpiId kpiId = 1; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } - } 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; - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.PolicyCondition.internal_static_policy_PolicyRuleCondition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.PolicyCondition.PolicyRuleCondition.class, policy.PolicyCondition.PolicyRuleCondition.Builder.class); - } + /** + * .monitoring.KpiId kpiId = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } - public static final int KPIID_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpiId = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpiId = 1; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpiId = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + public static final int NUMERICALOPERATOR_FIELD_NUMBER = 2; - public static final int NUMERICALOPERATOR_FIELD_NUMBER = 2; - private int numericalOperator_; - /** - * .policy.NumericalOperator numericalOperator = 2; - * @return The enum numeric value on the wire for numericalOperator. - */ - @java.lang.Override public int getNumericalOperatorValue() { - return numericalOperator_; - } - /** - * .policy.NumericalOperator numericalOperator = 2; - * @return The numericalOperator. - */ - @java.lang.Override public policy.PolicyCondition.NumericalOperator getNumericalOperator() { - @SuppressWarnings("deprecation") - policy.PolicyCondition.NumericalOperator result = policy.PolicyCondition.NumericalOperator.valueOf(numericalOperator_); - return result == null ? policy.PolicyCondition.NumericalOperator.UNRECOGNIZED : result; - } + private int numericalOperator_; - public static final int KPIVALUE_FIELD_NUMBER = 3; - private monitoring.Monitoring.KpiValue kpiValue_; - /** - * .monitoring.KpiValue kpiValue = 3; - * @return Whether the kpiValue field is set. - */ - @java.lang.Override - public boolean hasKpiValue() { - return kpiValue_ != null; - } - /** - * .monitoring.KpiValue kpiValue = 3; - * @return The kpiValue. - */ - @java.lang.Override - public monitoring.Monitoring.KpiValue getKpiValue() { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } - /** - * .monitoring.KpiValue kpiValue = 3; - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - return getKpiValue(); - } + /** + * .policy.NumericalOperator numericalOperator = 2; + * @return The enum numeric value on the wire for numericalOperator. + */ + @java.lang.Override + public int getNumericalOperatorValue() { + return numericalOperator_; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .policy.NumericalOperator numericalOperator = 2; + * @return The numericalOperator. + */ + @java.lang.Override + public policy.PolicyCondition.NumericalOperator getNumericalOperator() { + @SuppressWarnings("deprecation") + policy.PolicyCondition.NumericalOperator result = policy.PolicyCondition.NumericalOperator.valueOf(numericalOperator_); + return result == null ? policy.PolicyCondition.NumericalOperator.UNRECOGNIZED : result; + } - memoizedIsInitialized = 1; - return true; - } + public static final int KPIVALUE_FIELD_NUMBER = 3; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - if (numericalOperator_ != policy.PolicyCondition.NumericalOperator.POLICYRULE_CONDITION_NUMERICAL_UNDEFINED.getNumber()) { - output.writeEnum(2, numericalOperator_); - } - if (kpiValue_ != null) { - output.writeMessage(3, getKpiValue()); - } - unknownFields.writeTo(output); - } + private monitoring.Monitoring.KpiValue kpiValue_; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - if (numericalOperator_ != policy.PolicyCondition.NumericalOperator.POLICYRULE_CONDITION_NUMERICAL_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, numericalOperator_); - } - if (kpiValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getKpiValue()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .monitoring.KpiValue kpiValue = 3; + * @return Whether the kpiValue field is set. + */ + @java.lang.Override + public boolean hasKpiValue() { + return kpiValue_ != null; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof policy.PolicyCondition.PolicyRuleCondition)) { - return super.equals(obj); - } - policy.PolicyCondition.PolicyRuleCondition other = (policy.PolicyCondition.PolicyRuleCondition) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (numericalOperator_ != other.numericalOperator_) return false; - if (hasKpiValue() != other.hasKpiValue()) return false; - if (hasKpiValue()) { - if (!getKpiValue() - .equals(other.getKpiValue())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .monitoring.KpiValue kpiValue = 3; + * @return The kpiValue. + */ + @java.lang.Override + public monitoring.Monitoring.KpiValue getKpiValue() { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPIID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - hash = (37 * hash) + NUMERICALOPERATOR_FIELD_NUMBER; - hash = (53 * hash) + numericalOperator_; - if (hasKpiValue()) { - hash = (37 * hash) + KPIVALUE_FIELD_NUMBER; - hash = (53 * hash) + getKpiValue().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .monitoring.KpiValue kpiValue = 3; + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { + return getKpiValue(); + } - public static policy.PolicyCondition.PolicyRuleCondition parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.PolicyCondition.PolicyRuleCondition parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.PolicyCondition.PolicyRuleCondition parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.PolicyCondition.PolicyRuleCondition parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.PolicyCondition.PolicyRuleCondition parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static policy.PolicyCondition.PolicyRuleCondition parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static policy.PolicyCondition.PolicyRuleCondition parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.PolicyCondition.PolicyRuleCondition parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static policy.PolicyCondition.PolicyRuleCondition parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static policy.PolicyCondition.PolicyRuleCondition parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static policy.PolicyCondition.PolicyRuleCondition parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static policy.PolicyCondition.PolicyRuleCondition parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(policy.PolicyCondition.PolicyRuleCondition prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + if (numericalOperator_ != policy.PolicyCondition.NumericalOperator.POLICYRULE_CONDITION_NUMERICAL_UNDEFINED.getNumber()) { + output.writeEnum(2, numericalOperator_); + } + if (kpiValue_ != null) { + output.writeMessage(3, getKpiValue()); + } + unknownFields.writeTo(output); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Condition
-     * 
- * - * Protobuf type {@code policy.PolicyRuleCondition} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.PolicyRuleCondition) - policy.PolicyCondition.PolicyRuleConditionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return policy.PolicyCondition.internal_static_policy_PolicyRuleCondition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return policy.PolicyCondition.internal_static_policy_PolicyRuleCondition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - policy.PolicyCondition.PolicyRuleCondition.class, policy.PolicyCondition.PolicyRuleCondition.Builder.class); - } - - // 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 int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + if (numericalOperator_ != policy.PolicyCondition.NumericalOperator.POLICYRULE_CONDITION_NUMERICAL_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, numericalOperator_); + } + if (kpiValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKpiValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; - kpiIdBuilder_ = null; + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof policy.PolicyCondition.PolicyRuleCondition)) { + return super.equals(obj); + } + policy.PolicyCondition.PolicyRuleCondition other = (policy.PolicyCondition.PolicyRuleCondition) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (numericalOperator_ != other.numericalOperator_) + return false; + if (hasKpiValue() != other.hasKpiValue()) + return false; + if (hasKpiValue()) { + if (!getKpiValue().equals(other.getKpiValue())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; } - numericalOperator_ = 0; - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPIID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + hash = (37 * hash) + NUMERICALOPERATOR_FIELD_NUMBER; + hash = (53 * hash) + numericalOperator_; + if (hasKpiValue()) { + hash = (37 * hash) + KPIVALUE_FIELD_NUMBER; + hash = (53 * hash) + getKpiValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return policy.PolicyCondition.internal_static_policy_PolicyRuleCondition_descriptor; - } - - @java.lang.Override - public policy.PolicyCondition.PolicyRuleCondition getDefaultInstanceForType() { - return policy.PolicyCondition.PolicyRuleCondition.getDefaultInstance(); - } - - @java.lang.Override - public policy.PolicyCondition.PolicyRuleCondition build() { - policy.PolicyCondition.PolicyRuleCondition result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + + public static policy.PolicyCondition.PolicyRuleCondition parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - return result; - } - - @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(); + + public static policy.PolicyCondition.PolicyRuleCondition parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - result.numericalOperator_ = numericalOperator_; - if (kpiValueBuilder_ == null) { - result.kpiValue_ = kpiValue_; - } else { - result.kpiValue_ = kpiValueBuilder_.build(); + + public static policy.PolicyCondition.PolicyRuleCondition parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof policy.PolicyCondition.PolicyRuleCondition) { - return mergeFrom((policy.PolicyCondition.PolicyRuleCondition)other); - } else { - super.mergeFrom(other); - return this; + + public static policy.PolicyCondition.PolicyRuleCondition parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - } - public Builder mergeFrom(policy.PolicyCondition.PolicyRuleCondition other) { - if (other == policy.PolicyCondition.PolicyRuleCondition.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); + public static policy.PolicyCondition.PolicyRuleCondition parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - if (other.numericalOperator_ != 0) { - setNumericalOperatorValue(other.getNumericalOperatorValue()); + + public static policy.PolicyCondition.PolicyRuleCondition parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - if (other.hasKpiValue()) { - mergeKpiValue(other.getKpiValue()); + + public static policy.PolicyCondition.PolicyRuleCondition parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.PolicyCondition.PolicyRuleCondition) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + + public static policy.PolicyCondition.PolicyRuleCondition parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - return this; - } - - private monitoring.Monitoring.KpiId kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - /** - * .monitoring.KpiId kpiId = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpiId = 1; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); + + public static policy.PolicyCondition.PolicyRuleCondition parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - } - /** - * .monitoring.KpiId kpiId = 1; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); + + public static policy.PolicyCondition.PolicyRuleCondition parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - return this; - } - /** - * .monitoring.KpiId kpiId = 1; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); + public static policy.PolicyCondition.PolicyRuleCondition parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - return this; - } - /** - * .monitoring.KpiId kpiId = 1; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); + public static policy.PolicyCondition.PolicyRuleCondition parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - return this; - } - /** - * .monitoring.KpiId kpiId = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - return this; - } - /** - * .monitoring.KpiId kpiId = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpiId = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - } - /** - * .monitoring.KpiId kpiId = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; + + public static Builder newBuilder(policy.PolicyCondition.PolicyRuleCondition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - return kpiIdBuilder_; - } - - private int numericalOperator_ = 0; - /** - * .policy.NumericalOperator numericalOperator = 2; - * @return The enum numeric value on the wire for numericalOperator. - */ - @java.lang.Override public int getNumericalOperatorValue() { - return numericalOperator_; - } - /** - * .policy.NumericalOperator numericalOperator = 2; - * @param value The enum numeric value on the wire for numericalOperator to set. - * @return This builder for chaining. - */ - public Builder setNumericalOperatorValue(int value) { - - numericalOperator_ = value; - onChanged(); - return this; - } - /** - * .policy.NumericalOperator numericalOperator = 2; - * @return The numericalOperator. - */ - @java.lang.Override - public policy.PolicyCondition.NumericalOperator getNumericalOperator() { - @SuppressWarnings("deprecation") - policy.PolicyCondition.NumericalOperator result = policy.PolicyCondition.NumericalOperator.valueOf(numericalOperator_); - return result == null ? policy.PolicyCondition.NumericalOperator.UNRECOGNIZED : result; - } - /** - * .policy.NumericalOperator numericalOperator = 2; - * @param value The numericalOperator to set. - * @return This builder for chaining. - */ - public Builder setNumericalOperator(policy.PolicyCondition.NumericalOperator value) { - if (value == null) { - throw new NullPointerException(); + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - - numericalOperator_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .policy.NumericalOperator numericalOperator = 2; - * @return This builder for chaining. - */ - public Builder clearNumericalOperator() { - - numericalOperator_ = 0; - onChanged(); - return this; - } - - private monitoring.Monitoring.KpiValue kpiValue_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiValueBuilder_; - /** - * .monitoring.KpiValue kpiValue = 3; - * @return Whether the kpiValue field is set. - */ - public boolean hasKpiValue() { - return kpiValueBuilder_ != null || kpiValue_ != null; - } - /** - * .monitoring.KpiValue kpiValue = 3; - * @return The kpiValue. - */ - public monitoring.Monitoring.KpiValue getKpiValue() { - if (kpiValueBuilder_ == null) { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } else { - return kpiValueBuilder_.getMessage(); + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - } - /** - * .monitoring.KpiValue kpiValue = 3; - */ - public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiValue_ = value; - onChanged(); - } else { - kpiValueBuilder_.setMessage(value); + + /** + *
+         * Condition
+         * 
+ * + * Protobuf type {@code policy.PolicyRuleCondition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:policy.PolicyRuleCondition) + policy.PolicyCondition.PolicyRuleConditionOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return policy.PolicyCondition.internal_static_policy_PolicyRuleCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return policy.PolicyCondition.internal_static_policy_PolicyRuleCondition_fieldAccessorTable.ensureFieldAccessorsInitialized(policy.PolicyCondition.PolicyRuleCondition.class, policy.PolicyCondition.PolicyRuleCondition.Builder.class); + } + + // 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; + kpiIdBuilder_ = null; + } + numericalOperator_ = 0; + if (kpiValueBuilder_ == null) { + kpiValue_ = null; + } else { + kpiValue_ = null; + kpiValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return policy.PolicyCondition.internal_static_policy_PolicyRuleCondition_descriptor; + } + + @java.lang.Override + public policy.PolicyCondition.PolicyRuleCondition getDefaultInstanceForType() { + return policy.PolicyCondition.PolicyRuleCondition.getDefaultInstance(); + } + + @java.lang.Override + public policy.PolicyCondition.PolicyRuleCondition build() { + policy.PolicyCondition.PolicyRuleCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof policy.PolicyCondition.PolicyRuleCondition) { + return mergeFrom((policy.PolicyCondition.PolicyRuleCondition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(policy.PolicyCondition.PolicyRuleCondition other) { + if (other == policy.PolicyCondition.PolicyRuleCondition.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (other.numericalOperator_ != 0) { + setNumericalOperatorValue(other.getNumericalOperatorValue()); + } + if (other.hasKpiValue()) { + mergeKpiValue(other.getKpiValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (policy.PolicyCondition.PolicyRuleCondition) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpiId = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpiId = 1; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpiId = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpiId = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpiId = 1; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpiId = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpiId = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpiId = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpiId = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private int numericalOperator_ = 0; + + /** + * .policy.NumericalOperator numericalOperator = 2; + * @return The enum numeric value on the wire for numericalOperator. + */ + @java.lang.Override + public int getNumericalOperatorValue() { + return numericalOperator_; + } + + /** + * .policy.NumericalOperator numericalOperator = 2; + * @param value The enum numeric value on the wire for numericalOperator to set. + * @return This builder for chaining. + */ + public Builder setNumericalOperatorValue(int value) { + numericalOperator_ = value; + onChanged(); + return this; + } + + /** + * .policy.NumericalOperator numericalOperator = 2; + * @return The numericalOperator. + */ + @java.lang.Override + public policy.PolicyCondition.NumericalOperator getNumericalOperator() { + @SuppressWarnings("deprecation") + policy.PolicyCondition.NumericalOperator result = policy.PolicyCondition.NumericalOperator.valueOf(numericalOperator_); + return result == null ? policy.PolicyCondition.NumericalOperator.UNRECOGNIZED : result; + } + + /** + * .policy.NumericalOperator numericalOperator = 2; + * @param value The numericalOperator to set. + * @return This builder for chaining. + */ + public Builder setNumericalOperator(policy.PolicyCondition.NumericalOperator value) { + if (value == null) { + throw new NullPointerException(); + } + numericalOperator_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .policy.NumericalOperator numericalOperator = 2; + * @return This builder for chaining. + */ + public Builder clearNumericalOperator() { + numericalOperator_ = 0; + onChanged(); + return this; + } + + private monitoring.Monitoring.KpiValue kpiValue_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiValueBuilder_; + + /** + * .monitoring.KpiValue kpiValue = 3; + * @return Whether the kpiValue field is set. + */ + public boolean hasKpiValue() { + return kpiValueBuilder_ != null || kpiValue_ != null; + } + + /** + * .monitoring.KpiValue kpiValue = 3; + * @return The kpiValue. + */ + public monitoring.Monitoring.KpiValue getKpiValue() { + if (kpiValueBuilder_ == null) { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } else { + return kpiValueBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiValue kpiValue = 3; + */ + public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { + if (kpiValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiValue_ = value; + onChanged(); + } else { + kpiValueBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpiValue = 3; + */ + public Builder setKpiValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { + if (kpiValueBuilder_ == null) { + kpiValue_ = builderForValue.build(); + onChanged(); + } else { + kpiValueBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiValue kpiValue = 3; + */ + public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { + if (kpiValueBuilder_ == null) { + if (kpiValue_ != null) { + kpiValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); + } else { + kpiValue_ = value; + } + onChanged(); + } else { + kpiValueBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpiValue = 3; + */ + public Builder clearKpiValue() { + if (kpiValueBuilder_ == null) { + kpiValue_ = null; + onChanged(); + } else { + kpiValue_ = null; + kpiValueBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiValue kpiValue = 3; + */ + public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { + onChanged(); + return getKpiValueFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiValue kpiValue = 3; + */ + public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { + if (kpiValueBuilder_ != null) { + return kpiValueBuilder_.getMessageOrBuilder(); + } else { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } + } + + /** + * .monitoring.KpiValue kpiValue = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiValueFieldBuilder() { + if (kpiValueBuilder_ == null) { + kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiValue(), getParentForChildren(), isClean()); + kpiValue_ = null; + } + return kpiValueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:policy.PolicyRuleCondition) } - return this; - } - /** - * .monitoring.KpiValue kpiValue = 3; - */ - public Builder setKpiValue( - monitoring.Monitoring.KpiValue.Builder builderForValue) { - if (kpiValueBuilder_ == null) { - kpiValue_ = builderForValue.build(); - onChanged(); - } else { - kpiValueBuilder_.setMessage(builderForValue.build()); + // @@protoc_insertion_point(class_scope:policy.PolicyRuleCondition) + private static final policy.PolicyCondition.PolicyRuleCondition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new policy.PolicyCondition.PolicyRuleCondition(); } - return this; - } - /** - * .monitoring.KpiValue kpiValue = 3; - */ - public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (kpiValue_ != null) { - kpiValue_ = - monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); - } else { - kpiValue_ = value; - } - onChanged(); - } else { - kpiValueBuilder_.mergeFrom(value); + public static policy.PolicyCondition.PolicyRuleCondition getDefaultInstance() { + return DEFAULT_INSTANCE; } - return this; - } - /** - * .monitoring.KpiValue kpiValue = 3; - */ - public Builder clearKpiValue() { - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - onChanged(); - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; } - return this; - } - /** - * .monitoring.KpiValue kpiValue = 3; - */ - public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { - - onChanged(); - return getKpiValueFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiValue kpiValue = 3; - */ - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - if (kpiValueBuilder_ != null) { - return kpiValueBuilder_.getMessageOrBuilder(); - } else { - return kpiValue_ == null ? - monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - } - /** - * .monitoring.KpiValue kpiValue = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> - getKpiValueFieldBuilder() { - if (kpiValueBuilder_ == null) { - kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder>( - getKpiValue(), - getParentForChildren(), - isClean()); - kpiValue_ = null; + + @java.lang.Override + public policy.PolicyCondition.PolicyRuleCondition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - return kpiValueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.PolicyRuleCondition) } - // @@protoc_insertion_point(class_scope:policy.PolicyRuleCondition) - private static final policy.PolicyCondition.PolicyRuleCondition DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new policy.PolicyCondition.PolicyRuleCondition(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_PolicyRuleCondition_descriptor; - public static policy.PolicyCondition.PolicyRuleCondition getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_PolicyRuleCondition_fieldAccessorTable; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - @java.lang.Override - public policy.PolicyCondition.PolicyRuleCondition getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + static { + java.lang.String[] descriptorData = { "\n\026policy_condition.proto\022\006policy\032\020monito" + "ring.proto\"\225\001\n\023PolicyRuleCondition\022 \n\005kp" + "iId\030\001 \001(\0132\021.monitoring.KpiId\0224\n\021numerica" + "lOperator\030\002 \001(\0162\031.policy.NumericalOperat" + "or\022&\n\010kpiValue\030\003 \001(\0132\024.monitoring.KpiVal" + "ue*\343\002\n\021NumericalOperator\022,\n(POLICYRULE_C" + "ONDITION_NUMERICAL_UNDEFINED\020\000\022(\n$POLICY" + "RULE_CONDITION_NUMERICAL_EQUAL\020\001\022,\n(POLI" + "CYRULE_CONDITION_NUMERICAL_NOT_EQUAL\020\002\022," + "\n(POLICYRULE_CONDITION_NUMERICAL_LESS_TH" + "AN\020\003\0222\n.POLICYRULE_CONDITION_NUMERICAL_L" + "ESS_THAN_EQUAL\020\004\022/\n+POLICYRULE_CONDITION" + "_NUMERICAL_GREATER_THAN\020\005\0225\n1POLICYRULE_" + "CONDITION_NUMERICAL_GREATER_THAN_EQUAL\020\006" + "*\210\001\n\017BooleanOperator\022*\n&POLICYRULE_CONDI" + "TION_BOOLEAN_UNDEFINED\020\000\022$\n POLICYRULE_C" + "ONDITION_BOOLEAN_AND\020\001\022#\n\037POLICYRULE_CON" + "DITION_BOOLEAN_OR\020\002b\006proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { monitoring.Monitoring.getDescriptor() }); + internal_static_policy_PolicyRuleCondition_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_policy_PolicyRuleCondition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_policy_PolicyRuleCondition_descriptor, new java.lang.String[] { "KpiId", "NumericalOperator", "KpiValue" }); + monitoring.Monitoring.getDescriptor(); } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_PolicyRuleCondition_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_PolicyRuleCondition_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\026policy_condition.proto\022\006policy\032\020monito" + - "ring.proto\"\225\001\n\023PolicyRuleCondition\022 \n\005kp" + - "iId\030\001 \001(\0132\021.monitoring.KpiId\0224\n\021numerica" + - "lOperator\030\002 \001(\0162\031.policy.NumericalOperat" + - "or\022&\n\010kpiValue\030\003 \001(\0132\024.monitoring.KpiVal" + - "ue*\343\002\n\021NumericalOperator\022,\n(POLICYRULE_C" + - "ONDITION_NUMERICAL_UNDEFINED\020\000\022(\n$POLICY" + - "RULE_CONDITION_NUMERICAL_EQUAL\020\001\022,\n(POLI" + - "CYRULE_CONDITION_NUMERICAL_NOT_EQUAL\020\002\022," + - "\n(POLICYRULE_CONDITION_NUMERICAL_LESS_TH" + - "AN\020\003\0222\n.POLICYRULE_CONDITION_NUMERICAL_L" + - "ESS_THAN_EQUAL\020\004\022/\n+POLICYRULE_CONDITION" + - "_NUMERICAL_GREATER_THAN\020\005\0225\n1POLICYRULE_" + - "CONDITION_NUMERICAL_GREATER_THAN_EQUAL\020\006" + - "*\210\001\n\017BooleanOperator\022*\n&POLICYRULE_CONDI" + - "TION_BOOLEAN_UNDEFINED\020\000\022$\n POLICYRULE_C" + - "ONDITION_BOOLEAN_AND\020\001\022#\n\037POLICYRULE_CON" + - "DITION_BOOLEAN_OR\020\002b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - monitoring.Monitoring.getDescriptor(), - }); - internal_static_policy_PolicyRuleCondition_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_policy_PolicyRuleCondition_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_PolicyRuleCondition_descriptor, - new java.lang.String[] { "KpiId", "NumericalOperator", "KpiValue", }); - monitoring.Monitoring.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyService.java b/src/policy/target/generated-sources/grpc/policy/PolicyService.java index 277fbbfc5012570bf43a81fbb1da5e3e9211a49e..246e7ac7e4e323c924d1a92feb41cf0ed4cde100 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyService.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyService.java @@ -1,30 +1,23 @@ package policy; -import io.quarkus.grpc.runtime.MutinyService; +import io.quarkus.grpc.MutinyService; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: policy.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: policy.proto") public interface PolicyService extends MutinyService { - io.smallrye.mutiny.Uni policyAddService(policy.Policy.PolicyRuleService request); - + io.smallrye.mutiny.Uni policyAddDevice(policy.Policy.PolicyRuleDevice request); - + io.smallrye.mutiny.Uni policyUpdateService(policy.Policy.PolicyRuleService request); - + io.smallrye.mutiny.Uni policyUpdateDevice(policy.Policy.PolicyRuleDevice request); - + io.smallrye.mutiny.Uni policyDelete(policy.Policy.PolicyRuleId request); - + io.smallrye.mutiny.Uni getPolicyService(policy.Policy.PolicyRuleId request); - + io.smallrye.mutiny.Uni getPolicyDevice(policy.Policy.PolicyRuleId request); - - io.smallrye.mutiny.Uni getPolicyByServiceId(context.ContextOuterClass.ServiceId request); - - - -} \ No newline at end of file + io.smallrye.mutiny.Uni getPolicyByServiceId(context.ContextOuterClass.ServiceId request); +} diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyServiceBean.java b/src/policy/target/generated-sources/grpc/policy/PolicyServiceBean.java index ada3eeaec2f779759a0b6ff7cb5724098fc9c186..eb93cdd177b3921b7783b06403a566088546578a 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyServiceBean.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyServiceBean.java @@ -2,82 +2,86 @@ package policy; import io.grpc.BindableService; import io.quarkus.grpc.GrpcService; -import io.quarkus.grpc.runtime.MutinyBean; +import io.quarkus.grpc.MutinyBean; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: policy.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: policy.proto") public class PolicyServiceBean extends MutinyPolicyServiceGrpc.PolicyServiceImplBase implements BindableService, MutinyBean { private final PolicyService delegate; PolicyServiceBean(@GrpcService PolicyService delegate) { - this.delegate = delegate; + this.delegate = delegate; } @Override public io.smallrye.mutiny.Uni policyAddService(policy.Policy.PolicyRuleService request) { - try { - return delegate.policyAddService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.policyAddService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni policyAddDevice(policy.Policy.PolicyRuleDevice request) { - try { - return delegate.policyAddDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.policyAddDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni policyUpdateService(policy.Policy.PolicyRuleService request) { - try { - return delegate.policyUpdateService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.policyUpdateService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni policyUpdateDevice(policy.Policy.PolicyRuleDevice request) { - try { - return delegate.policyUpdateDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.policyUpdateDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni policyDelete(policy.Policy.PolicyRuleId request) { - try { - return delegate.policyDelete(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.policyDelete(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getPolicyService(policy.Policy.PolicyRuleId request) { - try { - return delegate.getPolicyService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getPolicyService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getPolicyDevice(policy.Policy.PolicyRuleId request) { - try { - return delegate.getPolicyDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getPolicyDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { - try { - return delegate.getPolicyByServiceId(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getPolicyByServiceId(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyServiceClient.java b/src/policy/target/generated-sources/grpc/policy/PolicyServiceClient.java index 5f5af2002955123b646ebba86f013d79326f5b8b..a8c119f6d4a7f663f45d5e4a907877a49cb8be59 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyServiceClient.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyServiceClient.java @@ -1,56 +1,67 @@ package policy; import java.util.function.BiFunction; +import io.quarkus.grpc.MutinyClient; -import io.quarkus.grpc.runtime.MutinyClient; - -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: policy.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: policy.proto") public class PolicyServiceClient implements PolicyService, MutinyClient { private final MutinyPolicyServiceGrpc.MutinyPolicyServiceStub stub; public PolicyServiceClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) { - this.stub = stubConfigurator.apply(name,MutinyPolicyServiceGrpc.newMutinyStub(channel)); + this.stub = stubConfigurator.apply(name, MutinyPolicyServiceGrpc.newMutinyStub(channel)); + } + + private PolicyServiceClient(MutinyPolicyServiceGrpc.MutinyPolicyServiceStub stub) { + this.stub = stub; + } + + public PolicyServiceClient newInstanceWithStub(MutinyPolicyServiceGrpc.MutinyPolicyServiceStub stub) { + return new PolicyServiceClient(stub); } @Override public MutinyPolicyServiceGrpc.MutinyPolicyServiceStub getStub() { - return stub; + return stub; } @Override public io.smallrye.mutiny.Uni policyAddService(policy.Policy.PolicyRuleService request) { - return stub.policyAddService(request); + return stub.policyAddService(request); } + @Override public io.smallrye.mutiny.Uni policyAddDevice(policy.Policy.PolicyRuleDevice request) { - return stub.policyAddDevice(request); + return stub.policyAddDevice(request); } + @Override public io.smallrye.mutiny.Uni policyUpdateService(policy.Policy.PolicyRuleService request) { - return stub.policyUpdateService(request); + return stub.policyUpdateService(request); } + @Override public io.smallrye.mutiny.Uni policyUpdateDevice(policy.Policy.PolicyRuleDevice request) { - return stub.policyUpdateDevice(request); + return stub.policyUpdateDevice(request); } + @Override public io.smallrye.mutiny.Uni policyDelete(policy.Policy.PolicyRuleId request) { - return stub.policyDelete(request); + return stub.policyDelete(request); } + @Override public io.smallrye.mutiny.Uni getPolicyService(policy.Policy.PolicyRuleId request) { - return stub.getPolicyService(request); + return stub.getPolicyService(request); } + @Override public io.smallrye.mutiny.Uni getPolicyDevice(policy.Policy.PolicyRuleId request) { - return stub.getPolicyDevice(request); + return stub.getPolicyDevice(request); } + @Override public io.smallrye.mutiny.Uni getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { - return stub.getPolicyByServiceId(request); + return stub.getPolicyByServiceId(request); } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyServiceGrpc.java b/src/policy/target/generated-sources/grpc/policy/PolicyServiceGrpc.java index af57ac56746c2d1943a455a53b9ce6fc02228692..e701a2256eb6800137ae4cd00c8887a97ba1cf43 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyServiceGrpc.java @@ -4,790 +4,539 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@javax.annotation.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.38.1)", comments = "Source: policy.proto") public final class PolicyServiceGrpc { - private PolicyServiceGrpc() {} + private PolicyServiceGrpc() { + } - public static final String SERVICE_NAME = "policy.PolicyService"; + public static final String SERVICE_NAME = "policy.PolicyService"; - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getPolicyAddServiceMethod; + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getPolicyAddServiceMethod; - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "PolicyAddService", - requestType = policy.Policy.PolicyRuleService.class, - responseType = policy.Policy.PolicyRuleState.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getPolicyAddServiceMethod() { - io.grpc.MethodDescriptor getPolicyAddServiceMethod; - if ((getPolicyAddServiceMethod = PolicyServiceGrpc.getPolicyAddServiceMethod) == null) { - synchronized (PolicyServiceGrpc.class) { + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "PolicyAddService", requestType = policy.Policy.PolicyRuleService.class, responseType = policy.Policy.PolicyRuleState.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getPolicyAddServiceMethod() { + io.grpc.MethodDescriptor getPolicyAddServiceMethod; if ((getPolicyAddServiceMethod = PolicyServiceGrpc.getPolicyAddServiceMethod) == null) { - PolicyServiceGrpc.getPolicyAddServiceMethod = getPolicyAddServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyAddService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleService.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleState.getDefaultInstance())) - .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyAddService")) - .build(); - } - } + synchronized (PolicyServiceGrpc.class) { + if ((getPolicyAddServiceMethod = PolicyServiceGrpc.getPolicyAddServiceMethod) == null) { + PolicyServiceGrpc.getPolicyAddServiceMethod = getPolicyAddServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyAddService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleService.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleState.getDefaultInstance())).setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyAddService")).build(); + } + } + } + return getPolicyAddServiceMethod; } - return getPolicyAddServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getPolicyAddDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "PolicyAddDevice", - requestType = policy.Policy.PolicyRuleDevice.class, - responseType = policy.Policy.PolicyRuleState.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getPolicyAddDeviceMethod() { - io.grpc.MethodDescriptor getPolicyAddDeviceMethod; - if ((getPolicyAddDeviceMethod = PolicyServiceGrpc.getPolicyAddDeviceMethod) == null) { - synchronized (PolicyServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getPolicyAddDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "PolicyAddDevice", requestType = policy.Policy.PolicyRuleDevice.class, responseType = policy.Policy.PolicyRuleState.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getPolicyAddDeviceMethod() { + io.grpc.MethodDescriptor getPolicyAddDeviceMethod; if ((getPolicyAddDeviceMethod = PolicyServiceGrpc.getPolicyAddDeviceMethod) == null) { - PolicyServiceGrpc.getPolicyAddDeviceMethod = getPolicyAddDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyAddDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleDevice.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleState.getDefaultInstance())) - .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyAddDevice")) - .build(); - } - } + synchronized (PolicyServiceGrpc.class) { + if ((getPolicyAddDeviceMethod = PolicyServiceGrpc.getPolicyAddDeviceMethod) == null) { + PolicyServiceGrpc.getPolicyAddDeviceMethod = getPolicyAddDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyAddDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleDevice.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleState.getDefaultInstance())).setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyAddDevice")).build(); + } + } + } + return getPolicyAddDeviceMethod; } - return getPolicyAddDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getPolicyUpdateServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "PolicyUpdateService", - requestType = policy.Policy.PolicyRuleService.class, - responseType = policy.Policy.PolicyRuleState.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getPolicyUpdateServiceMethod() { - io.grpc.MethodDescriptor getPolicyUpdateServiceMethod; - if ((getPolicyUpdateServiceMethod = PolicyServiceGrpc.getPolicyUpdateServiceMethod) == null) { - synchronized (PolicyServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getPolicyUpdateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "PolicyUpdateService", requestType = policy.Policy.PolicyRuleService.class, responseType = policy.Policy.PolicyRuleState.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getPolicyUpdateServiceMethod() { + io.grpc.MethodDescriptor getPolicyUpdateServiceMethod; if ((getPolicyUpdateServiceMethod = PolicyServiceGrpc.getPolicyUpdateServiceMethod) == null) { - PolicyServiceGrpc.getPolicyUpdateServiceMethod = getPolicyUpdateServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyUpdateService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleService.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleState.getDefaultInstance())) - .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyUpdateService")) - .build(); - } - } + synchronized (PolicyServiceGrpc.class) { + if ((getPolicyUpdateServiceMethod = PolicyServiceGrpc.getPolicyUpdateServiceMethod) == null) { + PolicyServiceGrpc.getPolicyUpdateServiceMethod = getPolicyUpdateServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyUpdateService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleService.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleState.getDefaultInstance())).setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyUpdateService")).build(); + } + } + } + return getPolicyUpdateServiceMethod; } - return getPolicyUpdateServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getPolicyUpdateDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "PolicyUpdateDevice", - requestType = policy.Policy.PolicyRuleDevice.class, - responseType = policy.Policy.PolicyRuleState.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getPolicyUpdateDeviceMethod() { - io.grpc.MethodDescriptor getPolicyUpdateDeviceMethod; - if ((getPolicyUpdateDeviceMethod = PolicyServiceGrpc.getPolicyUpdateDeviceMethod) == null) { - synchronized (PolicyServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getPolicyUpdateDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "PolicyUpdateDevice", requestType = policy.Policy.PolicyRuleDevice.class, responseType = policy.Policy.PolicyRuleState.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getPolicyUpdateDeviceMethod() { + io.grpc.MethodDescriptor getPolicyUpdateDeviceMethod; if ((getPolicyUpdateDeviceMethod = PolicyServiceGrpc.getPolicyUpdateDeviceMethod) == null) { - PolicyServiceGrpc.getPolicyUpdateDeviceMethod = getPolicyUpdateDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyUpdateDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleDevice.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleState.getDefaultInstance())) - .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyUpdateDevice")) - .build(); - } - } + synchronized (PolicyServiceGrpc.class) { + if ((getPolicyUpdateDeviceMethod = PolicyServiceGrpc.getPolicyUpdateDeviceMethod) == null) { + PolicyServiceGrpc.getPolicyUpdateDeviceMethod = getPolicyUpdateDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyUpdateDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleDevice.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleState.getDefaultInstance())).setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyUpdateDevice")).build(); + } + } + } + return getPolicyUpdateDeviceMethod; } - return getPolicyUpdateDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getPolicyDeleteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "PolicyDelete", - requestType = policy.Policy.PolicyRuleId.class, - responseType = policy.Policy.PolicyRuleState.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getPolicyDeleteMethod() { - io.grpc.MethodDescriptor getPolicyDeleteMethod; - if ((getPolicyDeleteMethod = PolicyServiceGrpc.getPolicyDeleteMethod) == null) { - synchronized (PolicyServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getPolicyDeleteMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "PolicyDelete", requestType = policy.Policy.PolicyRuleId.class, responseType = policy.Policy.PolicyRuleState.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getPolicyDeleteMethod() { + io.grpc.MethodDescriptor getPolicyDeleteMethod; if ((getPolicyDeleteMethod = PolicyServiceGrpc.getPolicyDeleteMethod) == null) { - PolicyServiceGrpc.getPolicyDeleteMethod = getPolicyDeleteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyDelete")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleState.getDefaultInstance())) - .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyDelete")) - .build(); - } - } + synchronized (PolicyServiceGrpc.class) { + if ((getPolicyDeleteMethod = PolicyServiceGrpc.getPolicyDeleteMethod) == null) { + PolicyServiceGrpc.getPolicyDeleteMethod = getPolicyDeleteMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "PolicyDelete")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleState.getDefaultInstance())).setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("PolicyDelete")).build(); + } + } + } + return getPolicyDeleteMethod; } - return getPolicyDeleteMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetPolicyServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetPolicyService", - requestType = policy.Policy.PolicyRuleId.class, - responseType = policy.Policy.PolicyRuleService.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetPolicyServiceMethod() { - io.grpc.MethodDescriptor getGetPolicyServiceMethod; - if ((getGetPolicyServiceMethod = PolicyServiceGrpc.getGetPolicyServiceMethod) == null) { - synchronized (PolicyServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetPolicyServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetPolicyService", requestType = policy.Policy.PolicyRuleId.class, responseType = policy.Policy.PolicyRuleService.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetPolicyServiceMethod() { + io.grpc.MethodDescriptor getGetPolicyServiceMethod; if ((getGetPolicyServiceMethod = PolicyServiceGrpc.getGetPolicyServiceMethod) == null) { - PolicyServiceGrpc.getGetPolicyServiceMethod = getGetPolicyServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleService.getDefaultInstance())) - .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("GetPolicyService")) - .build(); - } - } + synchronized (PolicyServiceGrpc.class) { + if ((getGetPolicyServiceMethod = PolicyServiceGrpc.getGetPolicyServiceMethod) == null) { + PolicyServiceGrpc.getGetPolicyServiceMethod = getGetPolicyServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleService.getDefaultInstance())).setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("GetPolicyService")).build(); + } + } + } + return getGetPolicyServiceMethod; } - return getGetPolicyServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetPolicyDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetPolicyDevice", - requestType = policy.Policy.PolicyRuleId.class, - responseType = policy.Policy.PolicyRuleDevice.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetPolicyDeviceMethod() { - io.grpc.MethodDescriptor getGetPolicyDeviceMethod; - if ((getGetPolicyDeviceMethod = PolicyServiceGrpc.getGetPolicyDeviceMethod) == null) { - synchronized (PolicyServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetPolicyDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetPolicyDevice", requestType = policy.Policy.PolicyRuleId.class, responseType = policy.Policy.PolicyRuleDevice.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetPolicyDeviceMethod() { + io.grpc.MethodDescriptor getGetPolicyDeviceMethod; if ((getGetPolicyDeviceMethod = PolicyServiceGrpc.getGetPolicyDeviceMethod) == null) { - PolicyServiceGrpc.getGetPolicyDeviceMethod = getGetPolicyDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleDevice.getDefaultInstance())) - .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("GetPolicyDevice")) - .build(); - } - } - } - return getGetPolicyDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetPolicyByServiceIdMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetPolicyByServiceId", - requestType = context.ContextOuterClass.ServiceId.class, - responseType = policy.Policy.PolicyRuleServiceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetPolicyByServiceIdMethod() { - io.grpc.MethodDescriptor getGetPolicyByServiceIdMethod; - if ((getGetPolicyByServiceIdMethod = PolicyServiceGrpc.getGetPolicyByServiceIdMethod) == null) { - synchronized (PolicyServiceGrpc.class) { - if ((getGetPolicyByServiceIdMethod = PolicyServiceGrpc.getGetPolicyByServiceIdMethod) == null) { - PolicyServiceGrpc.getGetPolicyByServiceIdMethod = getGetPolicyByServiceIdMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyByServiceId")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - policy.Policy.PolicyRuleServiceList.getDefaultInstance())) - .setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("GetPolicyByServiceId")) - .build(); - } - } - } - return getGetPolicyByServiceIdMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static PolicyServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PolicyServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PolicyServiceStub(channel, callOptions); - } - }; - return PolicyServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static PolicyServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PolicyServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PolicyServiceBlockingStub(channel, callOptions); - } - }; - return PolicyServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static PolicyServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PolicyServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PolicyServiceFutureStub(channel, callOptions); + synchronized (PolicyServiceGrpc.class) { + if ((getGetPolicyDeviceMethod = PolicyServiceGrpc.getGetPolicyDeviceMethod) == null) { + PolicyServiceGrpc.getGetPolicyDeviceMethod = getGetPolicyDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleDevice.getDefaultInstance())).setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("GetPolicyDevice")).build(); + } + } } - }; - return PolicyServiceFutureStub.newStub(factory, channel); - } + return getGetPolicyDeviceMethod; + } - /** - */ - public static abstract class PolicyServiceImplBase implements io.grpc.BindableService { + private static volatile io.grpc.MethodDescriptor getGetPolicyByServiceIdMethod; - /** - */ - public void policyAddService(policy.Policy.PolicyRuleService request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyAddServiceMethod(), responseObserver); + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetPolicyByServiceId", requestType = context.ContextOuterClass.ServiceId.class, responseType = policy.Policy.PolicyRuleServiceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetPolicyByServiceIdMethod() { + io.grpc.MethodDescriptor getGetPolicyByServiceIdMethod; + if ((getGetPolicyByServiceIdMethod = PolicyServiceGrpc.getGetPolicyByServiceIdMethod) == null) { + synchronized (PolicyServiceGrpc.class) { + if ((getGetPolicyByServiceIdMethod = PolicyServiceGrpc.getGetPolicyByServiceIdMethod) == null) { + PolicyServiceGrpc.getGetPolicyByServiceIdMethod = getGetPolicyByServiceIdMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicyByServiceId")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(policy.Policy.PolicyRuleServiceList.getDefaultInstance())).setSchemaDescriptor(new PolicyServiceMethodDescriptorSupplier("GetPolicyByServiceId")).build(); + } + } + } + return getGetPolicyByServiceIdMethod; } /** + * Creates a new async stub that supports all call types for the service */ - public void policyAddDevice(policy.Policy.PolicyRuleDevice request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyAddDeviceMethod(), responseObserver); - } + public static PolicyServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { - /** - */ - public void policyUpdateService(policy.Policy.PolicyRuleService request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyUpdateServiceMethod(), responseObserver); + @java.lang.Override + public PolicyServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyServiceStub(channel, callOptions); + } + }; + return PolicyServiceStub.newStub(factory, channel); } /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public void policyUpdateDevice(policy.Policy.PolicyRuleDevice request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyUpdateDeviceMethod(), responseObserver); - } + public static PolicyServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { - /** - */ - public void policyDelete(policy.Policy.PolicyRuleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyDeleteMethod(), responseObserver); + @java.lang.Override + public PolicyServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyServiceBlockingStub(channel, callOptions); + } + }; + return PolicyServiceBlockingStub.newStub(factory, channel); } /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public void getPolicyService(policy.Policy.PolicyRuleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyServiceMethod(), responseObserver); - } + public static PolicyServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { - /** - */ - public void getPolicyDevice(policy.Policy.PolicyRuleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyDeviceMethod(), responseObserver); + @java.lang.Override + public PolicyServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyServiceFutureStub(channel, callOptions); + } + }; + return PolicyServiceFutureStub.newStub(factory, channel); } /** */ - public void getPolicyByServiceId(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyByServiceIdMethod(), responseObserver); - } + public static abstract class PolicyServiceImplBase implements io.grpc.BindableService { - @java.lang.Override public final 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(); - } - } - - /** - */ - public static final class PolicyServiceStub extends io.grpc.stub.AbstractAsyncStub { - private PolicyServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void policyAddService(policy.Policy.PolicyRuleService request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyAddServiceMethod(), responseObserver); + } - @java.lang.Override - protected PolicyServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PolicyServiceStub(channel, callOptions); - } + /** + */ + public void policyAddDevice(policy.Policy.PolicyRuleDevice request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyAddDeviceMethod(), responseObserver); + } - /** - */ - public void policyAddService(policy.Policy.PolicyRuleService request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPolicyAddServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void policyUpdateService(policy.Policy.PolicyRuleService request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyUpdateServiceMethod(), responseObserver); + } - /** - */ - public void policyAddDevice(policy.Policy.PolicyRuleDevice request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPolicyAddDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void policyUpdateDevice(policy.Policy.PolicyRuleDevice request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyUpdateDeviceMethod(), responseObserver); + } - /** - */ - public void policyUpdateService(policy.Policy.PolicyRuleService request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPolicyUpdateServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void policyDelete(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyDeleteMethod(), responseObserver); + } - /** - */ - public void policyUpdateDevice(policy.Policy.PolicyRuleDevice request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPolicyUpdateDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getPolicyService(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyServiceMethod(), responseObserver); + } - /** - */ - public void policyDelete(policy.Policy.PolicyRuleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPolicyDeleteMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getPolicyDevice(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyDeviceMethod(), responseObserver); + } - /** - */ - public void getPolicyService(policy.Policy.PolicyRuleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetPolicyServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getPolicyByServiceId(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyByServiceIdMethod(), responseObserver); + } - /** - */ - public void getPolicyDevice(policy.Policy.PolicyRuleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetPolicyDeviceMethod(), getCallOptions()), request, responseObserver); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getPolicyAddServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_POLICY_ADD_SERVICE))).addMethod(getPolicyAddDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_POLICY_ADD_DEVICE))).addMethod(getPolicyUpdateServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_POLICY_UPDATE_SERVICE))).addMethod(getPolicyUpdateDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_POLICY_UPDATE_DEVICE))).addMethod(getPolicyDeleteMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_POLICY_DELETE))).addMethod(getGetPolicyServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_POLICY_SERVICE))).addMethod(getGetPolicyDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_POLICY_DEVICE))).addMethod(getGetPolicyByServiceIdMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_POLICY_BY_SERVICE_ID))).build(); + } } /** */ - public void getPolicyByServiceId(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetPolicyByServiceIdMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - */ - public static final class PolicyServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private PolicyServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + public static class PolicyServiceStub extends io.grpc.stub.AbstractAsyncStub { - @java.lang.Override - protected PolicyServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PolicyServiceBlockingStub(channel, callOptions); - } + private PolicyServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public policy.Policy.PolicyRuleState policyAddService(policy.Policy.PolicyRuleService request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPolicyAddServiceMethod(), getCallOptions(), request); - } + @java.lang.Override + protected PolicyServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyServiceStub(channel, callOptions); + } - /** - */ - public policy.Policy.PolicyRuleState policyAddDevice(policy.Policy.PolicyRuleDevice request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPolicyAddDeviceMethod(), getCallOptions(), request); - } + /** + */ + public void policyAddService(policy.Policy.PolicyRuleService request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getPolicyAddServiceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public policy.Policy.PolicyRuleState policyUpdateService(policy.Policy.PolicyRuleService request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPolicyUpdateServiceMethod(), getCallOptions(), request); - } + /** + */ + public void policyAddDevice(policy.Policy.PolicyRuleDevice request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getPolicyAddDeviceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public policy.Policy.PolicyRuleState policyUpdateDevice(policy.Policy.PolicyRuleDevice request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPolicyUpdateDeviceMethod(), getCallOptions(), request); - } + /** + */ + public void policyUpdateService(policy.Policy.PolicyRuleService request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getPolicyUpdateServiceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public policy.Policy.PolicyRuleState policyDelete(policy.Policy.PolicyRuleId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPolicyDeleteMethod(), getCallOptions(), request); - } + /** + */ + public void policyUpdateDevice(policy.Policy.PolicyRuleDevice request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getPolicyUpdateDeviceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public policy.Policy.PolicyRuleService getPolicyService(policy.Policy.PolicyRuleId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetPolicyServiceMethod(), getCallOptions(), request); - } + /** + */ + public void policyDelete(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getPolicyDeleteMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public policy.Policy.PolicyRuleDevice getPolicyDevice(policy.Policy.PolicyRuleId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetPolicyDeviceMethod(), getCallOptions(), request); - } + /** + */ + public void getPolicyService(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetPolicyServiceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public policy.Policy.PolicyRuleServiceList getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetPolicyByServiceIdMethod(), getCallOptions(), request); - } - } - - /** - */ - public static final class PolicyServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private PolicyServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void getPolicyDevice(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetPolicyDeviceMethod(), getCallOptions()), request, responseObserver); + } - @java.lang.Override - protected PolicyServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PolicyServiceFutureStub(channel, callOptions); + /** + */ + public void getPolicyByServiceId(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetPolicyByServiceIdMethod(), getCallOptions()), request, responseObserver); + } } /** */ - public com.google.common.util.concurrent.ListenableFuture policyAddService( - policy.Policy.PolicyRuleService request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPolicyAddServiceMethod(), getCallOptions()), request); - } + public static class PolicyServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - /** - */ - public com.google.common.util.concurrent.ListenableFuture policyAddDevice( - policy.Policy.PolicyRuleDevice request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPolicyAddDeviceMethod(), getCallOptions()), request); - } + private PolicyServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture policyUpdateService( - policy.Policy.PolicyRuleService request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPolicyUpdateServiceMethod(), getCallOptions()), request); - } + @java.lang.Override + protected PolicyServiceBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyServiceBlockingStub(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture policyUpdateDevice( - policy.Policy.PolicyRuleDevice request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPolicyUpdateDeviceMethod(), getCallOptions()), request); - } + /** + */ + public policy.Policy.PolicyRuleState policyAddService(policy.Policy.PolicyRuleService request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getPolicyAddServiceMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture policyDelete( - policy.Policy.PolicyRuleId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPolicyDeleteMethod(), getCallOptions()), request); - } + /** + */ + public policy.Policy.PolicyRuleState policyAddDevice(policy.Policy.PolicyRuleDevice request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getPolicyAddDeviceMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getPolicyService( - policy.Policy.PolicyRuleId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetPolicyServiceMethod(), getCallOptions()), request); - } + /** + */ + public policy.Policy.PolicyRuleState policyUpdateService(policy.Policy.PolicyRuleService request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getPolicyUpdateServiceMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getPolicyDevice( - policy.Policy.PolicyRuleId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetPolicyDeviceMethod(), getCallOptions()), request); + /** + */ + public policy.Policy.PolicyRuleState policyUpdateDevice(policy.Policy.PolicyRuleDevice request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getPolicyUpdateDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public policy.Policy.PolicyRuleState policyDelete(policy.Policy.PolicyRuleId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getPolicyDeleteMethod(), getCallOptions(), request); + } + + /** + */ + public policy.Policy.PolicyRuleService getPolicyService(policy.Policy.PolicyRuleId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetPolicyServiceMethod(), getCallOptions(), request); + } + + /** + */ + public policy.Policy.PolicyRuleDevice getPolicyDevice(policy.Policy.PolicyRuleId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetPolicyDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public policy.Policy.PolicyRuleServiceList getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetPolicyByServiceIdMethod(), getCallOptions(), request); + } } /** */ - public com.google.common.util.concurrent.ListenableFuture getPolicyByServiceId( - context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetPolicyByServiceIdMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_POLICY_ADD_SERVICE = 0; - private static final int METHODID_POLICY_ADD_DEVICE = 1; - private static final int METHODID_POLICY_UPDATE_SERVICE = 2; - private static final int METHODID_POLICY_UPDATE_DEVICE = 3; - private static final int METHODID_POLICY_DELETE = 4; - private static final int METHODID_GET_POLICY_SERVICE = 5; - private static final int METHODID_GET_POLICY_DEVICE = 6; - private static final int METHODID_GET_POLICY_BY_SERVICE_ID = 7; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final PolicyServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(PolicyServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } + public static class PolicyServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_POLICY_ADD_SERVICE: - serviceImpl.policyAddService((policy.Policy.PolicyRuleService) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_POLICY_ADD_DEVICE: - serviceImpl.policyAddDevice((policy.Policy.PolicyRuleDevice) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_POLICY_UPDATE_SERVICE: - serviceImpl.policyUpdateService((policy.Policy.PolicyRuleService) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_POLICY_UPDATE_DEVICE: - serviceImpl.policyUpdateDevice((policy.Policy.PolicyRuleDevice) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_POLICY_DELETE: - serviceImpl.policyDelete((policy.Policy.PolicyRuleId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_POLICY_SERVICE: - serviceImpl.getPolicyService((policy.Policy.PolicyRuleId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_POLICY_DEVICE: - serviceImpl.getPolicyDevice((policy.Policy.PolicyRuleId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_POLICY_BY_SERVICE_ID: - serviceImpl.getPolicyByServiceId((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } + private PolicyServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture policyAddService(policy.Policy.PolicyRuleService request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getPolicyAddServiceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture policyAddDevice(policy.Policy.PolicyRuleDevice request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getPolicyAddDeviceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture policyUpdateService(policy.Policy.PolicyRuleService request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getPolicyUpdateServiceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture policyUpdateDevice(policy.Policy.PolicyRuleDevice request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getPolicyUpdateDeviceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture policyDelete(policy.Policy.PolicyRuleId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getPolicyDeleteMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getPolicyService(policy.Policy.PolicyRuleId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetPolicyServiceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getPolicyDevice(policy.Policy.PolicyRuleId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetPolicyDeviceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getPolicyByServiceId(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetPolicyByServiceIdMethod(), getCallOptions()), request); + } } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } + private static final int METHODID_POLICY_ADD_SERVICE = 0; + + private static final int METHODID_POLICY_ADD_DEVICE = 1; + + private static final int METHODID_POLICY_UPDATE_SERVICE = 2; + + private static final int METHODID_POLICY_UPDATE_DEVICE = 3; + + private static final int METHODID_POLICY_DELETE = 4; + + private static final int METHODID_GET_POLICY_SERVICE = 5; + + private static final int METHODID_GET_POLICY_DEVICE = 6; + + private static final int METHODID_GET_POLICY_BY_SERVICE_ID = 7; + + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + + private final PolicyServiceImplBase serviceImpl; + + private final int methodId; + + MethodHandlers(PolicyServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + case METHODID_POLICY_ADD_SERVICE: + serviceImpl.policyAddService((policy.Policy.PolicyRuleService) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_POLICY_ADD_DEVICE: + serviceImpl.policyAddDevice((policy.Policy.PolicyRuleDevice) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_POLICY_UPDATE_SERVICE: + serviceImpl.policyUpdateService((policy.Policy.PolicyRuleService) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_POLICY_UPDATE_DEVICE: + serviceImpl.policyUpdateDevice((policy.Policy.PolicyRuleDevice) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_POLICY_DELETE: + serviceImpl.policyDelete((policy.Policy.PolicyRuleId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_POLICY_SERVICE: + serviceImpl.getPolicyService((policy.Policy.PolicyRuleId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_POLICY_DEVICE: + serviceImpl.getPolicyDevice((policy.Policy.PolicyRuleId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_POLICY_BY_SERVICE_ID: + serviceImpl.getPolicyByServiceId((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + default: + throw new AssertionError(); + } + } } - } - private static abstract class PolicyServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - PolicyServiceBaseDescriptorSupplier() {} + private static abstract class PolicyServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + + PolicyServiceBaseDescriptorSupplier() { + } + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return policy.Policy.getDescriptor(); + } - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return policy.Policy.getDescriptor(); + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PolicyService"); + } } - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("PolicyService"); + private static final class PolicyServiceFileDescriptorSupplier extends PolicyServiceBaseDescriptorSupplier { + + PolicyServiceFileDescriptorSupplier() { + } } - } - private static final class PolicyServiceFileDescriptorSupplier - extends PolicyServiceBaseDescriptorSupplier { - PolicyServiceFileDescriptorSupplier() {} - } + private static final class PolicyServiceMethodDescriptorSupplier extends PolicyServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private static final class PolicyServiceMethodDescriptorSupplier - extends PolicyServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final String methodName; - PolicyServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } + PolicyServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } } - } - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (PolicyServiceGrpc.class) { - result = serviceDescriptor; + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new PolicyServiceFileDescriptorSupplier()) - .addMethod(getPolicyAddServiceMethod()) - .addMethod(getPolicyAddDeviceMethod()) - .addMethod(getPolicyUpdateServiceMethod()) - .addMethod(getPolicyUpdateDeviceMethod()) - .addMethod(getPolicyDeleteMethod()) - .addMethod(getGetPolicyServiceMethod()) - .addMethod(getGetPolicyDeviceMethod()) - .addMethod(getGetPolicyByServiceIdMethod()) - .build(); - } - } + synchronized (PolicyServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new PolicyServiceFileDescriptorSupplier()).addMethod(getPolicyAddServiceMethod()).addMethod(getPolicyAddDeviceMethod()).addMethod(getPolicyUpdateServiceMethod()).addMethod(getPolicyUpdateDeviceMethod()).addMethod(getPolicyDeleteMethod()).addMethod(getGetPolicyServiceMethod()).addMethod(getGetPolicyDeviceMethod()).addMethod(getGetPolicyByServiceIdMethod()).build(); + } + } + } + return result; } - return result; - } } diff --git a/src/policy/target/generated-sources/grpc/service/MutinyServiceServiceGrpc.java b/src/policy/target/generated-sources/grpc/service/MutinyServiceServiceGrpc.java index cc94512929b34d0f3ddf427be5cb5655d774479b..5cfe83287651969fb0c25fee2958a1e60346f27c 100644 --- a/src/policy/target/generated-sources/grpc/service/MutinyServiceServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/service/MutinyServiceServiceGrpc.java @@ -6,18 +6,18 @@ import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: service.proto") -public final class MutinyServiceServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc { - private MutinyServiceServiceGrpc() {} +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: service.proto") +public final class MutinyServiceServiceGrpc implements io.quarkus.grpc.MutinyGrpc { + + private MutinyServiceServiceGrpc() { + } public static MutinyServiceServiceStub newMutinyStub(io.grpc.Channel channel) { return new MutinyServiceServiceStub(channel); } - - public static final class MutinyServiceServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub { + public static class MutinyServiceServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.MutinyStub { + private ServiceServiceGrpc.ServiceServiceStub delegateStub; private MutinyServiceServiceStub(io.grpc.Channel channel) { @@ -35,109 +35,73 @@ public final class MutinyServiceServiceGrpc implements io.quarkus.grpc.runtime.M return new MutinyServiceServiceStub(channel, callOptions); } - public io.smallrye.mutiny.Uni createService(context.ContextOuterClass.Service request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::createService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::createService); } - public io.smallrye.mutiny.Uni updateService(context.ContextOuterClass.Service request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::updateService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::updateService); } - public io.smallrye.mutiny.Uni deleteService(context.ContextOuterClass.ServiceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::deleteService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteService); } - public io.smallrye.mutiny.Uni recomputeConnections(context.ContextOuterClass.Service request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::recomputeConnections); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::recomputeConnections); } - } - public static abstract class ServiceServiceImplBase implements io.grpc.BindableService { private String compression; + /** - * Set whether the server will try to use a compressed response. - * - * @param compression the compression, e.g {@code gzip} - */ + * Set whether the server will try to use a compressed response. + * + * @param compression the compression, e.g {@code gzip} + */ public ServiceServiceImplBase withCompression(String compression) { - this.compression = compression; - return this; + this.compression = compression; + return this; } - - public io.smallrye.mutiny.Uni createService(context.ContextOuterClass.Service request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni updateService(context.ContextOuterClass.Service request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni deleteService(context.ContextOuterClass.ServiceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni recomputeConnections(context.ContextOuterClass.Service request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - service.ServiceServiceGrpc.getCreateServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Service, - context.ContextOuterClass.ServiceId>( - this, METHODID_CREATE_SERVICE, compression))) - .addMethod( - service.ServiceServiceGrpc.getUpdateServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Service, - context.ContextOuterClass.ServiceId>( - this, METHODID_UPDATE_SERVICE, compression))) - .addMethod( - service.ServiceServiceGrpc.getDeleteServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ServiceId, - context.ContextOuterClass.Empty>( - this, METHODID_DELETE_SERVICE, compression))) - .addMethod( - service.ServiceServiceGrpc.getRecomputeConnectionsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Service, - context.ContextOuterClass.Empty>( - this, METHODID_RECOMPUTE_CONNECTIONS, compression))) - .build(); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(service.ServiceServiceGrpc.getCreateServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_CREATE_SERVICE, compression))).addMethod(service.ServiceServiceGrpc.getUpdateServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UPDATE_SERVICE, compression))).addMethod(service.ServiceServiceGrpc.getDeleteServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_SERVICE, compression))).addMethod(service.ServiceServiceGrpc.getRecomputeConnectionsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_RECOMPUTE_CONNECTIONS, compression))).build(); } } private static final int METHODID_CREATE_SERVICE = 0; + private static final int METHODID_UPDATE_SERVICE = 1; + private static final int METHODID_DELETE_SERVICE = 2; + private static final int METHODID_RECOMPUTE_CONNECTIONS = 3; - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ServiceServiceImplBase serviceImpl; + private final int methodId; + private final String compression; MethodHandlers(ServiceServiceImplBase serviceImpl, int methodId, String compression) { @@ -149,30 +113,18 @@ public final class MutinyServiceServiceGrpc implements io.quarkus.grpc.runtime.M @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { case METHODID_CREATE_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::createService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::createService); break; case METHODID_UPDATE_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::updateService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::updateService); break; case METHODID_DELETE_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::deleteService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteService); break; case METHODID_RECOMPUTE_CONNECTIONS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::recomputeConnections); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::recomputeConnections); break; default: throw new java.lang.AssertionError(); @@ -182,11 +134,10 @@ public final class MutinyServiceServiceGrpc implements io.quarkus.grpc.runtime.M @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { default: throw new java.lang.AssertionError(); } } } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/service/Service.java b/src/policy/target/generated-sources/grpc/service/Service.java index aa9280357d820220c97d0baa18e1fb4f74a00804..99b0096cf58f550b0a8b95333c3305b1bcf26ded 100644 --- a/src/policy/target/generated-sources/grpc/service/Service.java +++ b/src/policy/target/generated-sources/grpc/service/Service.java @@ -1,44 +1,29 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: service.proto - package service; public final class Service { - private Service() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } + private Service() { + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\rservice.proto\022\007service\032\rcontext.proto2" + - "\365\001\n\016ServiceService\0227\n\rCreateService\022\020.co" + - "ntext.Service\032\022.context.ServiceId\"\000\0227\n\rU" + - "pdateService\022\020.context.Service\032\022.context" + - ".ServiceId\"\000\0225\n\rDeleteService\022\022.context." + - "ServiceId\032\016.context.Empty\"\000\022:\n\024Recompute" + - "Connections\022\020.context.Service\032\016.context." + - "Empty\"\000b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - context.ContextOuterClass.getDescriptor(), - }); - context.ContextOuterClass.getDescriptor(); - } + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - // @@protoc_insertion_point(outer_class_scope) + static { + java.lang.String[] descriptorData = { "\n\rservice.proto\022\007service\032\rcontext.proto2" + "\365\001\n\016ServiceService\0227\n\rCreateService\022\020.co" + "ntext.Service\032\022.context.ServiceId\"\000\0227\n\rU" + "pdateService\022\020.context.Service\032\022.context" + ".ServiceId\"\000\0225\n\rDeleteService\022\022.context." + "ServiceId\032\016.context.Empty\"\000\022:\n\024Recompute" + "Connections\022\020.context.Service\032\016.context." + "Empty\"\000b\006proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { context.ContextOuterClass.getDescriptor() }); + context.ContextOuterClass.getDescriptor(); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/policy/target/generated-sources/grpc/service/ServiceService.java b/src/policy/target/generated-sources/grpc/service/ServiceService.java index 531c92ce66bd4084e9db441bef0660acb0461d98..270faa212b6647211acc17b2351e1773cfb6e210 100644 --- a/src/policy/target/generated-sources/grpc/service/ServiceService.java +++ b/src/policy/target/generated-sources/grpc/service/ServiceService.java @@ -1,22 +1,15 @@ package service; -import io.quarkus.grpc.runtime.MutinyService; +import io.quarkus.grpc.MutinyService; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: service.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: service.proto") public interface ServiceService extends MutinyService { - io.smallrye.mutiny.Uni createService(context.ContextOuterClass.Service request); - + io.smallrye.mutiny.Uni updateService(context.ContextOuterClass.Service request); - + io.smallrye.mutiny.Uni deleteService(context.ContextOuterClass.ServiceId request); - - io.smallrye.mutiny.Uni recomputeConnections(context.ContextOuterClass.Service request); - - - -} \ No newline at end of file + io.smallrye.mutiny.Uni recomputeConnections(context.ContextOuterClass.Service request); +} diff --git a/src/policy/target/generated-sources/grpc/service/ServiceServiceBean.java b/src/policy/target/generated-sources/grpc/service/ServiceServiceBean.java index 433a8149b102dd72c1cbf61e2fe6dca9fb3bc838..8888e8877b2f952bf61f3c794660c58615dafe58 100644 --- a/src/policy/target/generated-sources/grpc/service/ServiceServiceBean.java +++ b/src/policy/target/generated-sources/grpc/service/ServiceServiceBean.java @@ -2,50 +2,50 @@ package service; import io.grpc.BindableService; import io.quarkus.grpc.GrpcService; -import io.quarkus.grpc.runtime.MutinyBean; +import io.quarkus.grpc.MutinyBean; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: service.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: service.proto") public class ServiceServiceBean extends MutinyServiceServiceGrpc.ServiceServiceImplBase implements BindableService, MutinyBean { private final ServiceService delegate; ServiceServiceBean(@GrpcService ServiceService delegate) { - this.delegate = delegate; + this.delegate = delegate; } @Override public io.smallrye.mutiny.Uni createService(context.ContextOuterClass.Service request) { - try { - return delegate.createService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.createService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni updateService(context.ContextOuterClass.Service request) { - try { - return delegate.updateService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.updateService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni deleteService(context.ContextOuterClass.ServiceId request) { - try { - return delegate.deleteService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.deleteService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni recomputeConnections(context.ContextOuterClass.Service request) { - try { - return delegate.recomputeConnections(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.recomputeConnections(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/service/ServiceServiceClient.java b/src/policy/target/generated-sources/grpc/service/ServiceServiceClient.java index 50063b344e4f87a0dd3966af60a5c945639c57d3..3eb4b038bbd9990fcdaad52aeae074935c78dfdf 100644 --- a/src/policy/target/generated-sources/grpc/service/ServiceServiceClient.java +++ b/src/policy/target/generated-sources/grpc/service/ServiceServiceClient.java @@ -1,40 +1,47 @@ package service; import java.util.function.BiFunction; +import io.quarkus.grpc.MutinyClient; -import io.quarkus.grpc.runtime.MutinyClient; - -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: service.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: service.proto") public class ServiceServiceClient implements ServiceService, MutinyClient { private final MutinyServiceServiceGrpc.MutinyServiceServiceStub stub; public ServiceServiceClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) { - this.stub = stubConfigurator.apply(name,MutinyServiceServiceGrpc.newMutinyStub(channel)); + this.stub = stubConfigurator.apply(name, MutinyServiceServiceGrpc.newMutinyStub(channel)); + } + + private ServiceServiceClient(MutinyServiceServiceGrpc.MutinyServiceServiceStub stub) { + this.stub = stub; + } + + public ServiceServiceClient newInstanceWithStub(MutinyServiceServiceGrpc.MutinyServiceServiceStub stub) { + return new ServiceServiceClient(stub); } @Override public MutinyServiceServiceGrpc.MutinyServiceServiceStub getStub() { - return stub; + return stub; } @Override public io.smallrye.mutiny.Uni createService(context.ContextOuterClass.Service request) { - return stub.createService(request); + return stub.createService(request); } + @Override public io.smallrye.mutiny.Uni updateService(context.ContextOuterClass.Service request) { - return stub.updateService(request); + return stub.updateService(request); } + @Override public io.smallrye.mutiny.Uni deleteService(context.ContextOuterClass.ServiceId request) { - return stub.deleteService(request); + return stub.deleteService(request); } + @Override public io.smallrye.mutiny.Uni recomputeConnections(context.ContextOuterClass.Service request) { - return stub.recomputeConnections(request); + return stub.recomputeConnections(request); } - -} \ No newline at end of file +} diff --git a/src/policy/target/generated-sources/grpc/service/ServiceServiceGrpc.java b/src/policy/target/generated-sources/grpc/service/ServiceServiceGrpc.java index 5b926a2af71c4d2e7e83d4ef3c2723b8ca7e3a8f..4cd98546277145a8c1f277ef143fe46ac5f58dc0 100644 --- a/src/policy/target/generated-sources/grpc/service/ServiceServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/service/ServiceServiceGrpc.java @@ -4,494 +4,363 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@javax.annotation.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.38.1)", comments = "Source: service.proto") public final class ServiceServiceGrpc { - private ServiceServiceGrpc() {} + private ServiceServiceGrpc() { + } - public static final String SERVICE_NAME = "service.ServiceService"; + public static final String SERVICE_NAME = "service.ServiceService"; - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getCreateServiceMethod; + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getCreateServiceMethod; - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateService", - requestType = context.ContextOuterClass.Service.class, - responseType = context.ContextOuterClass.ServiceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateServiceMethod() { - io.grpc.MethodDescriptor getCreateServiceMethod; - if ((getCreateServiceMethod = ServiceServiceGrpc.getCreateServiceMethod) == null) { - synchronized (ServiceServiceGrpc.class) { + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "CreateService", requestType = context.ContextOuterClass.Service.class, responseType = context.ContextOuterClass.ServiceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateServiceMethod() { + io.grpc.MethodDescriptor getCreateServiceMethod; if ((getCreateServiceMethod = ServiceServiceGrpc.getCreateServiceMethod) == null) { - ServiceServiceGrpc.getCreateServiceMethod = getCreateServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Service.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setSchemaDescriptor(new ServiceServiceMethodDescriptorSupplier("CreateService")) - .build(); - } - } + synchronized (ServiceServiceGrpc.class) { + if ((getCreateServiceMethod = ServiceServiceGrpc.getCreateServiceMethod) == null) { + ServiceServiceGrpc.getCreateServiceMethod = getCreateServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Service.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setSchemaDescriptor(new ServiceServiceMethodDescriptorSupplier("CreateService")).build(); + } + } + } + return getCreateServiceMethod; } - return getCreateServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateService", - requestType = context.ContextOuterClass.Service.class, - responseType = context.ContextOuterClass.ServiceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateServiceMethod() { - io.grpc.MethodDescriptor getUpdateServiceMethod; - if ((getUpdateServiceMethod = ServiceServiceGrpc.getUpdateServiceMethod) == null) { - synchronized (ServiceServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getUpdateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "UpdateService", requestType = context.ContextOuterClass.Service.class, responseType = context.ContextOuterClass.ServiceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateServiceMethod() { + io.grpc.MethodDescriptor getUpdateServiceMethod; if ((getUpdateServiceMethod = ServiceServiceGrpc.getUpdateServiceMethod) == null) { - ServiceServiceGrpc.getUpdateServiceMethod = getUpdateServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Service.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setSchemaDescriptor(new ServiceServiceMethodDescriptorSupplier("UpdateService")) - .build(); - } - } + synchronized (ServiceServiceGrpc.class) { + if ((getUpdateServiceMethod = ServiceServiceGrpc.getUpdateServiceMethod) == null) { + ServiceServiceGrpc.getUpdateServiceMethod = getUpdateServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Service.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setSchemaDescriptor(new ServiceServiceMethodDescriptorSupplier("UpdateService")).build(); + } + } + } + return getUpdateServiceMethod; } - return getUpdateServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteService", - requestType = context.ContextOuterClass.ServiceId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteServiceMethod() { - io.grpc.MethodDescriptor getDeleteServiceMethod; - if ((getDeleteServiceMethod = ServiceServiceGrpc.getDeleteServiceMethod) == null) { - synchronized (ServiceServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getDeleteServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteService", requestType = context.ContextOuterClass.ServiceId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteServiceMethod() { + io.grpc.MethodDescriptor getDeleteServiceMethod; if ((getDeleteServiceMethod = ServiceServiceGrpc.getDeleteServiceMethod) == null) { - ServiceServiceGrpc.getDeleteServiceMethod = getDeleteServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ServiceServiceMethodDescriptorSupplier("DeleteService")) - .build(); - } - } + synchronized (ServiceServiceGrpc.class) { + if ((getDeleteServiceMethod = ServiceServiceGrpc.getDeleteServiceMethod) == null) { + ServiceServiceGrpc.getDeleteServiceMethod = getDeleteServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ServiceServiceMethodDescriptorSupplier("DeleteService")).build(); + } + } + } + return getDeleteServiceMethod; } - return getDeleteServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getRecomputeConnectionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RecomputeConnections", - requestType = context.ContextOuterClass.Service.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRecomputeConnectionsMethod() { - io.grpc.MethodDescriptor getRecomputeConnectionsMethod; - if ((getRecomputeConnectionsMethod = ServiceServiceGrpc.getRecomputeConnectionsMethod) == null) { - synchronized (ServiceServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getRecomputeConnectionsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RecomputeConnections", requestType = context.ContextOuterClass.Service.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRecomputeConnectionsMethod() { + io.grpc.MethodDescriptor getRecomputeConnectionsMethod; if ((getRecomputeConnectionsMethod = ServiceServiceGrpc.getRecomputeConnectionsMethod) == null) { - ServiceServiceGrpc.getRecomputeConnectionsMethod = getRecomputeConnectionsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RecomputeConnections")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Service.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ServiceServiceMethodDescriptorSupplier("RecomputeConnections")) - .build(); - } - } - } - return getRecomputeConnectionsMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ServiceServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ServiceServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ServiceServiceStub(channel, callOptions); - } - }; - return ServiceServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ServiceServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ServiceServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ServiceServiceBlockingStub(channel, callOptions); - } - }; - return ServiceServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ServiceServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ServiceServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ServiceServiceFutureStub(channel, callOptions); + synchronized (ServiceServiceGrpc.class) { + if ((getRecomputeConnectionsMethod = ServiceServiceGrpc.getRecomputeConnectionsMethod) == null) { + ServiceServiceGrpc.getRecomputeConnectionsMethod = getRecomputeConnectionsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RecomputeConnections")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Service.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ServiceServiceMethodDescriptorSupplier("RecomputeConnections")).build(); + } + } } - }; - return ServiceServiceFutureStub.newStub(factory, channel); - } - - /** - */ - public static abstract class ServiceServiceImplBase implements io.grpc.BindableService { + return getRecomputeConnectionsMethod; + } /** + * Creates a new async stub that supports all call types for the service */ - public void createService(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateServiceMethod(), responseObserver); + public static ServiceServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ServiceServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServiceServiceStub(channel, callOptions); + } + }; + return ServiceServiceStub.newStub(factory, channel); } /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public void updateService(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateServiceMethod(), responseObserver); + public static ServiceServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ServiceServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServiceServiceBlockingStub(channel, callOptions); + } + }; + return ServiceServiceBlockingStub.newStub(factory, channel); } /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public void deleteService(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteServiceMethod(), responseObserver); + public static ServiceServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ServiceServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServiceServiceFutureStub(channel, callOptions); + } + }; + return ServiceServiceFutureStub.newStub(factory, channel); } /** */ - public void recomputeConnections(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRecomputeConnectionsMethod(), responseObserver); - } + public static abstract class ServiceServiceImplBase implements io.grpc.BindableService { - @java.lang.Override public final 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(); - } - } - - /** - */ - public static final class ServiceServiceStub extends io.grpc.stub.AbstractAsyncStub { - private ServiceServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void createService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateServiceMethod(), responseObserver); + } - @java.lang.Override - protected ServiceServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ServiceServiceStub(channel, callOptions); - } + /** + */ + public void updateService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateServiceMethod(), responseObserver); + } - /** - */ - public void createService(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void deleteService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteServiceMethod(), responseObserver); + } - /** - */ - public void updateService(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void recomputeConnections(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRecomputeConnectionsMethod(), responseObserver); + } - /** - */ - public void deleteService(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request, responseObserver); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getCreateServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_CREATE_SERVICE))).addMethod(getUpdateServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_UPDATE_SERVICE))).addMethod(getDeleteServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_SERVICE))).addMethod(getRecomputeConnectionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_RECOMPUTE_CONNECTIONS))).build(); + } } /** */ - public void recomputeConnections(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRecomputeConnectionsMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - */ - public static final class ServiceServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ServiceServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + public static class ServiceServiceStub extends io.grpc.stub.AbstractAsyncStub { - @java.lang.Override - protected ServiceServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ServiceServiceBlockingStub(channel, callOptions); - } + private ServiceServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public context.ContextOuterClass.ServiceId createService(context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateServiceMethod(), getCallOptions(), request); - } + @java.lang.Override + protected ServiceServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServiceServiceStub(channel, callOptions); + } - /** - */ - public context.ContextOuterClass.ServiceId updateService(context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateServiceMethod(), getCallOptions(), request); - } + /** + */ + public void createService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty deleteService(context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteServiceMethod(), getCallOptions(), request); - } + /** + */ + public void updateService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty recomputeConnections(context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRecomputeConnectionsMethod(), getCallOptions(), request); - } - } - - /** - */ - public static final class ServiceServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private ServiceServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void deleteService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request, responseObserver); + } - @java.lang.Override - protected ServiceServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ServiceServiceFutureStub(channel, callOptions); + /** + */ + public void recomputeConnections(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRecomputeConnectionsMethod(), getCallOptions()), request, responseObserver); + } } /** */ - public com.google.common.util.concurrent.ListenableFuture createService( - context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request); - } + public static class ServiceServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - /** - */ - public com.google.common.util.concurrent.ListenableFuture updateService( - context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request); - } + private ServiceServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture deleteService( - context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request); + @java.lang.Override + protected ServiceServiceBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServiceServiceBlockingStub(channel, callOptions); + } + + /** + */ + public context.ContextOuterClass.ServiceId createService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getCreateServiceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ServiceId updateService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getUpdateServiceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty deleteService(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteServiceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty recomputeConnections(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRecomputeConnectionsMethod(), getCallOptions(), request); + } } /** */ - public com.google.common.util.concurrent.ListenableFuture recomputeConnections( - context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRecomputeConnectionsMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_SERVICE = 0; - private static final int METHODID_UPDATE_SERVICE = 1; - private static final int METHODID_DELETE_SERVICE = 2; - private static final int METHODID_RECOMPUTE_CONNECTIONS = 3; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ServiceServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ServiceServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } + public static class ServiceServiceFutureStub extends io.grpc.stub.AbstractFutureStub { + + private ServiceServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ServiceServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServiceServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture createService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture updateService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getUpdateServiceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteService(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request); + } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_CREATE_SERVICE: - serviceImpl.createService((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_SERVICE: - serviceImpl.updateService((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_SERVICE: - serviceImpl.deleteService((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_RECOMPUTE_CONNECTIONS: - serviceImpl.recomputeConnections((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture recomputeConnections(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRecomputeConnectionsMethod(), getCallOptions()), request); + } } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } + private static final int METHODID_CREATE_SERVICE = 0; + + private static final int METHODID_UPDATE_SERVICE = 1; + + private static final int METHODID_DELETE_SERVICE = 2; + + private static final int METHODID_RECOMPUTE_CONNECTIONS = 3; + + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + + private final ServiceServiceImplBase serviceImpl; + + private final int methodId; + + MethodHandlers(ServiceServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + case METHODID_CREATE_SERVICE: + serviceImpl.createService((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SERVICE: + serviceImpl.updateService((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SERVICE: + serviceImpl.deleteService((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RECOMPUTE_CONNECTIONS: + serviceImpl.recomputeConnections((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + default: + throw new AssertionError(); + } + } } - } - private static abstract class ServiceServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ServiceServiceBaseDescriptorSupplier() {} + private static abstract class ServiceServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return service.Service.getDescriptor(); + ServiceServiceBaseDescriptorSupplier() { + } + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return service.Service.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ServiceService"); + } } - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ServiceService"); + private static final class ServiceServiceFileDescriptorSupplier extends ServiceServiceBaseDescriptorSupplier { + + ServiceServiceFileDescriptorSupplier() { + } } - } - private static final class ServiceServiceFileDescriptorSupplier - extends ServiceServiceBaseDescriptorSupplier { - ServiceServiceFileDescriptorSupplier() {} - } + private static final class ServiceServiceMethodDescriptorSupplier extends ServiceServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private static final class ServiceServiceMethodDescriptorSupplier - extends ServiceServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final String methodName; - ServiceServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } + ServiceServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } } - } - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ServiceServiceGrpc.class) { - result = serviceDescriptor; + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ServiceServiceFileDescriptorSupplier()) - .addMethod(getCreateServiceMethod()) - .addMethod(getUpdateServiceMethod()) - .addMethod(getDeleteServiceMethod()) - .addMethod(getRecomputeConnectionsMethod()) - .build(); - } - } + synchronized (ServiceServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new ServiceServiceFileDescriptorSupplier()).addMethod(getCreateServiceMethod()).addMethod(getUpdateServiceMethod()).addMethod(getDeleteServiceMethod()).addMethod(getRecomputeConnectionsMethod()).build(); + } + } + } + return result; } - return result; - } } diff --git a/src/policy/target/kubernetes/kubernetes.yml b/src/policy/target/kubernetes/kubernetes.yml index 5a576268f7423bb6b628ead856b0899c959abce1..4f581f0c9225dd8772dd476b133ba04880683851 100644 --- a/src/policy/target/kubernetes/kubernetes.yml +++ b/src/policy/target/kubernetes/kubernetes.yml @@ -1,39 +1,34 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT 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: v1 kind: Service metadata: annotations: - app.quarkus.io/commit-id: 447bcf0c8224e0b15715f54d82a0936dd93f5542 - app.quarkus.io/build-timestamp: 2023-11-07 - 12:10:37 +0000 + 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 - - name: grpc-server - port: 6060 - targetPort: 6060 selector: app.kubernetes.io/name: policyservice type: ClusterIP @@ -42,15 +37,17 @@ apiVersion: apps/v1 kind: Deployment metadata: annotations: - app.quarkus.io/commit-id: 447bcf0c8224e0b15715f54d82a0936dd93f5542 - app.quarkus.io/build-timestamp: 2023-11-07 - 12:10:37 +0000 + 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 @@ -60,15 +57,17 @@ spec: template: metadata: annotations: - app.quarkus.io/commit-id: 447bcf0c8224e0b15715f54d82a0936dd93f5542 - app.quarkus.io/build-timestamp: 2023-11-07 - 12:10:37 +0000 + 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: @@ -76,12 +75,12 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: CONTEXT_SERVICE_HOST - value: contextservice - 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: @@ -96,11 +95,14 @@ spec: timeoutSeconds: 10 name: policyservice ports: - - containerPort: 8080 - name: http + - containerPort: 8443 + name: https protocol: TCP - containerPort: 6060 - name: grpc-server + name: grpc + protocol: TCP + - containerPort: 8080 + name: http protocol: TCP readinessProbe: failureThreshold: 3 @@ -119,3 +121,13 @@ spec: 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/policy/util/set_version.sh b/src/policy/util/set_version.sh index d0b5a26c99d4245183def711eef918f26d42be53..7c5171eb0785001ad4af4aecabc4b0d660e543d3 100755 --- a/src/policy/util/set_version.sh +++ b/src/policy/util/set_version.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/.gitlab-ci.yml b/src/service/.gitlab-ci.yml index c9ff94ac915386ac05d91661fc2cb1a53bb0e65d..8eda9d2be00bae67299b56e6f48ec21d33969c55 100644 --- a/src/service/.gitlab-ci.yml +++ b/src/service/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build service: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: diff --git a/src/service/Config.py b/src/service/Config.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/Config.py +++ b/src/service/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/Dockerfile b/src/service/Dockerfile index fc431decabe2e1c90b6dcd0dfcfcc72090571751..a847ae762d1303dda852d7f3d8200d3db3ef53f7 100644 --- a/src/service/Dockerfile +++ b/src/service/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -62,9 +62,14 @@ RUN python3 -m pip install -r requirements.txt # Add component files into working directory WORKDIR /var/teraflow -COPY src/context/. context/ -COPY src/device/. device/ -COPY src/pathcomp/frontend/. pathcomp/frontend/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +COPY src/pathcomp/frontend/__init__.py pathcomp/frontend/__init__.py +COPY src/pathcomp/frontend/client/. pathcomp/frontend/client/ +COPY src/e2e_orchestrator/__init__.py e2e_orchestrator/__init__.py +COPY src/e2e_orchestrator/client/. e2e_orchestrator/client/ COPY src/service/. service/ # Start the service diff --git a/src/service/__init__.py b/src/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/__init__.py +++ b/src/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/client/ServiceClient.py b/src/service/client/ServiceClient.py index e8ea478a3109d3e006120db9f22966724773b78b..3fb66e680c7df402e21f4bff31f055a296064236 100644 --- a/src/service/client/ServiceClient.py +++ b/src/service/client/ServiceClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/client/TEServiceClient.py b/src/service/client/TEServiceClient.py index 19ca95bceb285c03df635859728ecf15640d8438..d71621b37c95fd74b9cc90e548d8a7e8424d7838 100644 --- a/src/service/client/TEServiceClient.py +++ b/src/service/client/TEServiceClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/client/__init__.py b/src/service/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/client/__init__.py +++ b/src/service/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/requirements.in b/src/service/requirements.in index 48fd76485d6bbaf53c3867147882614fc0cf1b04..a3a4b9147478cbf172e7493184e40a06bc33ed2e 100644 --- a/src/service/requirements.in +++ b/src/service/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ anytree==2.8.0 geopy==2.3.0 +netaddr==0.9.0 networkx==2.6.3 pydot==1.4.2 redis==4.1.2 +requests==2.27.1 diff --git a/src/service/service/ServiceService.py b/src/service/service/ServiceService.py index d0afcff03576f7bf256c5ba8b81463868f6a76e8..e1b0c93ffdfc4a7e8c12cff2ce8389d907cf7413 100644 --- a/src/service/service/ServiceService.py +++ b/src/service/service/ServiceService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py index f79e3e5f3aa983aacda3163682737cdf0ff6be03..eb821972a6447a85990261586e656f2f365dda0d 100644 --- a/src/service/service/ServiceServiceServicerImpl.py +++ b/src/service/service/ServiceServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,25 +12,36 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy, grpc, json, logging, random, uuid +import grpc, json, logging, random, uuid from typing import Optional from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.method_wrappers.ServiceExceptions import ( AlreadyExistsException, InvalidArgumentException, NotFoundException, NotImplementedException, OperationFailedException) from common.proto.context_pb2 import ( - Connection, Empty, Service, ServiceId, ServiceStatusEnum, ServiceTypeEnum, ConstraintActionEnum) + Connection, ConstraintActionEnum, Empty, Service, ServiceId, ServiceStatusEnum, + ServiceTypeEnum, TopologyId +) from common.proto.pathcomp_pb2 import PathCompRequest +from common.proto.e2eorchestrator_pb2 import E2EOrchestratorRequest from common.proto.service_pb2_grpc import ServiceServiceServicer from common.tools.context_queries.Service import get_service_by_id from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Topology import json_topology_id +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME from context.client.ContextClient import ContextClient +from e2e_orchestrator.client.E2EOrchestratorClient import E2EOrchestratorClient from pathcomp.frontend.client.PathCompClient import PathCompClient from service.service.tools.ConnectionToString import connection_to_string from service.client.TEServiceClient import TEServiceClient from .service_handler_api.ServiceHandlerFactory import ServiceHandlerFactory from .task_scheduler.TaskScheduler import TasksScheduler from .tools.GeodesicDistance import gps_distance +from .tools.OpticalTools import ( + add_lightpath, delete_lightpath, adapt_reply, get_device_name_from_uuid, get_optical_band +) + LOGGER = logging.getLogger(__name__) @@ -153,6 +164,32 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): str_service_status = ServiceStatusEnum.Name(service_status.service_status) raise Exception(MSG.format(service_key, str_service_status)) + if service.service_type == ServiceTypeEnum.SERVICETYPE_E2E: + # End-to-End service: + service_id_with_uuids = context_client.SetService(request) + + service_with_uuids = get_service_by_id( + context_client, service_id_with_uuids, rw_copy=False, + include_config_rules=True, include_constraints=True, include_endpoint_ids=True) + + e2e_orch_request = E2EOrchestratorRequest() + e2e_orch_request.service.CopyFrom(service_with_uuids) + + e2e_orch_client = E2EOrchestratorClient() + e2e_orch_reply = e2e_orch_client.Compute(e2e_orch_request) + + # Feed TaskScheduler with this end-to-end orchestrator reply. TaskScheduler identifies + # inter-dependencies among the services and connections retrieved and produces a + # schedule of tasks (an ordered list of tasks to be executed) to implement the + # requested create/update operation. + tasks_scheduler = TasksScheduler(self.service_handler_factory) + # e2e_orch_reply should be compatible with pathcomp_reply + # TODO: if we extend e2e_orch_reply, implement method TasksScheduler::compose_from_e2eorchreply() + tasks_scheduler.compose_from_pathcompreply(e2e_orch_reply, is_delete=False) + tasks_scheduler.execute_all() + return service_with_uuids.service_id + + # Normal service del service.service_endpoint_ids[:] # pylint: disable=no-member for endpoint_id in request.service_endpoint_ids: @@ -210,25 +247,84 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): num_expected_endpoints = num_disjoint_paths * 2 tasks_scheduler = TasksScheduler(self.service_handler_factory) - if len(service_with_uuids.service_endpoint_ids) >= num_expected_endpoints: - pathcomp_request = PathCompRequest() - pathcomp_request.services.append(service_with_uuids) # pylint: disable=no-member - if num_disjoint_paths is None or num_disjoint_paths in {0, 1}: - pathcomp_request.shortest_path.Clear() # pylint: disable=no-member + if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + context_id_x = json_context_id(DEFAULT_CONTEXT_NAME) + topology_id_x = json_topology_id( + DEFAULT_TOPOLOGY_NAME, context_id_x) + topology_details = context_client.GetTopologyDetails( + TopologyId(**topology_id_x)) + # devices = get_devices_in_topology(context_client, TopologyId(**topology_id_x), ContextId(**context_id_x)) + devices = topology_details.devices + context_uuid_x = topology_details.topology_id.context_id.context_uuid.uuid + topology_uuid_x = topology_details.topology_id.topology_uuid.uuid + devs = [] + ports = [] + for endpoint_id in service.service_endpoint_ids: + devs.append(endpoint_id.device_id.device_uuid.uuid) + ports.append(endpoint_id.endpoint_uuid.uuid) + src = devs[0] + dst = devs[1] + bidir = None + ob_band = None + bitrate = 100 + for constraint in service.service_constraints: + if "bandwidth" in constraint.custom.constraint_type: + bitrate = int(float(constraint.custom.constraint_value)) + elif "bidirectionality" in constraint.custom.constraint_type: + bidir = int(constraint.custom.constraint_value) + elif "optical-band-width" in constraint.custom.constraint_type: + ob_band = int(constraint.custom.constraint_value) + + # to get the reply form the optical module + reply_txt = add_lightpath(src, dst, bitrate, bidir, ob_band) + + # reply with 2 transponders and 2 roadms + reply_json = json.loads(reply_txt) + optical_band_txt = "" + if "new_optical_band" in reply_json.keys(): + if reply_json["new_optical_band"] == 1: + if reply_json["parent_opt_band"]: + if "parent_opt_band" in reply_json.keys(): + parent_ob = reply_json["parent_opt_band"] + LOGGER.debug('Parent optical-band={}'.format(parent_ob)) + optical_band_txt = get_optical_band(parent_ob) + LOGGER.info('optical-band details={}'.format(optical_band_txt)) + else: + LOGGER.debug('expected optical band not found') + else: + LOGGER.debug('expected optical band not found') + else: + LOGGER.debug('Using existing optical band') else: - pathcomp_request.k_disjoint_path.num_disjoint = num_disjoint_paths # pylint: disable=no-member - - LOGGER.debug('pathcomp_request={:s}'.format(grpc_message_to_json_string(pathcomp_request))) - pathcomp = PathCompClient() - pathcomp_reply = pathcomp.Compute(pathcomp_request) - pathcomp.close() - LOGGER.debug('pathcomp_reply={:s}'.format(grpc_message_to_json_string(pathcomp_reply))) - - # Feed TaskScheduler with this path computation reply. TaskScheduler identifies inter-dependencies among - # the services and connections retrieved and produces a schedule of tasks (an ordered list of tasks to be - # executed) to implement the requested create/update operation. - tasks_scheduler.compose_from_pathcompreply(pathcomp_reply, is_delete=False) + LOGGER.debug('Using existing optical band') + if reply_txt is not None: + optical_reply = adapt_reply( + devices, _service, reply_json, context_uuid_x, topology_uuid_x, optical_band_txt + ) + LOGGER.info('optical_reply={:s}'.format( + grpc_message_to_json_string(optical_reply))) + + tasks_scheduler.compose_from_pathcompreply( + optical_reply, is_delete=False) + else: + if len(service_with_uuids.service_endpoint_ids) >= num_expected_endpoints: + pathcomp_request = PathCompRequest() + pathcomp_request.services.append(service_with_uuids) # pylint: disable=no-member + + if num_disjoint_paths is None or num_disjoint_paths in {0, 1} : + pathcomp_request.shortest_path.Clear() # pylint: disable=no-member + else: + pathcomp_request.k_disjoint_path.num_disjoint = num_disjoint_paths # pylint: disable=no-member + + pathcomp = PathCompClient() + pathcomp_reply = pathcomp.Compute(pathcomp_request) + pathcomp.close() + + # Feed TaskScheduler with this path computation reply. TaskScheduler identifies inter-dependencies among + # the services and connections retrieved and produces a schedule of tasks (an ordered list of tasks to be + # executed) to implement the requested create/update operation. + tasks_scheduler.compose_from_pathcompreply(pathcomp_reply, is_delete=False) tasks_scheduler.execute_all() return service_with_uuids.service_id @@ -252,6 +348,29 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): context_client.RemoveService(request) return Empty() + if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + devs = [] + + context_id_x = json_context_id(DEFAULT_CONTEXT_NAME) + topology_id_x = json_topology_id( + DEFAULT_TOPOLOGY_NAME, context_id_x) + topology_details = context_client.GetTopologyDetails( + TopologyId(**topology_id_x)) + devices = topology_details.devices + for endpoint_id in service.service_endpoint_ids: + devs.append(endpoint_id.device_id.device_uuid.uuid) + src = get_device_name_from_uuid(devices, devs[0]) + dst = get_device_name_from_uuid(devices, devs[1]) + + bitrate = int( + float(service.service_constraints[0].custom.constraint_value)) + if len(service.service_config.config_rules) > 0: + c_rules_dict = json.loads( + service.service_config.config_rules[0].custom.resource_value) + if ("flow_id" in c_rules_dict): + flow_id = c_rules_dict["flow_id"] + reply = delete_lightpath(flow_id, src, dst, bitrate) + # Normal service # Feed TaskScheduler with this service and the sub-services and sub-connections related to this service. # TaskScheduler identifies inter-dependencies among them and produces a schedule of tasks (an ordered list of diff --git a/src/service/service/__init__.py b/src/service/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/__init__.py +++ b/src/service/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/__main__.py b/src/service/service/__main__.py index f2b6e38d6181a0c56b4f1dfca3116717d1400ced..ae8a9e960cf6a0d720b508fe3ea5592632420c18 100644 --- a/src/service/service/__main__.py +++ b/src/service/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,7 +17,8 @@ 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) + wait_for_environment_variables +) from .ServiceService import ServiceService from .service_handler_api.ServiceHandlerFactory import ServiceHandlerFactory from .service_handlers import SERVICE_HANDLERS diff --git a/src/service/service/service_handler_api/AnyTreeTools.py b/src/service/service/service_handler_api/AnyTreeTools.py index 5757fc9639b4015d9856d30b6ac566984165f64a..670da212374dcdf72d2d24cda674c6ee0dea39cb 100644 --- a/src/service/service/service_handler_api/AnyTreeTools.py +++ b/src/service/service/service_handler_api/AnyTreeTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handler_api/Exceptions.py b/src/service/service/service_handler_api/Exceptions.py index 91802d6a001e5da79d70284e4ebe9dd9f1d94f2a..7ea65b9a1db6c06adff62d2ad5120b071d81e2ce 100644 --- a/src/service/service/service_handler_api/Exceptions.py +++ b/src/service/service/service_handler_api/Exceptions.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handler_api/FilterFields.py b/src/service/service/service_handler_api/FilterFields.py index 430e25938601d522187046b0ebd4cad6971261bb..ca70fa9386e356e7e49397365701013e1d3a1697 100644 --- a/src/service/service/service_handler_api/FilterFields.py +++ b/src/service/service/service_handler_api/FilterFields.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,6 +25,8 @@ SERVICE_TYPE_VALUES = { ServiceTypeEnum.SERVICETYPE_L2NM, ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, ServiceTypeEnum.SERVICETYPE_TE, + ServiceTypeEnum.SERVICETYPE_E2E, + ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY } DEVICE_DRIVER_VALUES = { @@ -37,6 +39,9 @@ DEVICE_DRIVER_VALUES = { DeviceDriverEnum.DEVICEDRIVER_XR, DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN, DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG, + DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS, + DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN, + DeviceDriverEnum.DEVICEDRIVER_OC } # Map allowed filter fields to allowed values per Filter field. If no restriction (free text) None is specified diff --git a/src/service/service/service_handler_api/ServiceHandlerFactory.py b/src/service/service/service_handler_api/ServiceHandlerFactory.py index 64ea204a2600a71b08c8c373a15640f5e2134787..b05af2c7620fe3ac7d80c29a162eed644dd122e7 100644 --- a/src/service/service/service_handler_api/ServiceHandlerFactory.py +++ b/src/service/service/service_handler_api/ServiceHandlerFactory.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handler_api/SettingsHandler.py b/src/service/service/service_handler_api/SettingsHandler.py index b8daec7d7b5fc857aef9aa5e46bb04d33a02b47c..293de54aa84be11f3c31bc1b47fce852df19a16a 100644 --- a/src/service/service/service_handler_api/SettingsHandler.py +++ b/src/service/service/service_handler_api/SettingsHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handler_api/Tools.py b/src/service/service/service_handler_api/Tools.py index b06d128d94328b0d664e8928e1701ee327aa6d03..7faa95312a9923c924f1a42661f87380cc731352 100644 --- a/src/service/service/service_handler_api/Tools.py +++ b/src/service/service/service_handler_api/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handler_api/_ServiceHandler.py b/src/service/service/service_handler_api/_ServiceHandler.py index 8c5ede37d0427187ff56e4f525973befa059c0bf..f266bc1b157bed03457fb9e7f234369c2cfca580 100644 --- a/src/service/service/service_handler_api/_ServiceHandler.py +++ b/src/service/service/service_handler_api/_ServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handler_api/__init__.py b/src/service/service/service_handler_api/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/service_handler_api/__init__.py +++ b/src/service/service/service_handler_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index cb926e5b767ae56ea2024aad7cb9afa632f9d6bb..8b5e2b2834f37dc3d616907e46cf1fa5b2f1274f 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,10 +20,13 @@ from .l2nm_openconfig.L2NMOpenConfigServiceHandler import L2NMOpenConfigServiceH from .l3nm_emulated.L3NMEmulatedServiceHandler import L3NMEmulatedServiceHandler from .l3nm_openconfig.L3NMOpenConfigServiceHandler import L3NMOpenConfigServiceHandler from .l3nm_gnmi_openconfig.L3NMGnmiOpenConfigServiceHandler import L3NMGnmiOpenConfigServiceHandler +from .l3nm_ietf_actn.L3NMIetfActnServiceHandler import L3NMIetfActnServiceHandler from .microwave.MicrowaveServiceHandler import MicrowaveServiceHandler from .p4.p4_service_handler import P4ServiceHandler from .tapi_tapi.TapiServiceHandler import TapiServiceHandler from .tapi_xr.TapiXrServiceHandler import TapiXrServiceHandler +from .e2e_orch.E2EOrchestratorServiceHandler import E2EOrchestratorServiceHandler +from .oc.OCServiceHandler import OCServiceHandler SERVICE_HANDLERS = [ (L2NMEmulatedServiceHandler, [ @@ -56,6 +59,12 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG, } ]), + (L3NMIetfActnServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_L3NM, + FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN, + } + ]), (TapiServiceHandler, [ { FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, @@ -86,4 +95,16 @@ SERVICE_HANDLERS = [ FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN], } ]), + (E2EOrchestratorServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_E2E, + FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS], + } + ]), + (OCServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, + FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_OC, + } + ]) ] diff --git a/src/service/service/service_handlers/e2e_orch/E2EOrchestratorServiceHandler.py b/src/service/service/service_handlers/e2e_orch/E2EOrchestratorServiceHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..6559436a434c8d0453492f5b8d391cf15e81a29d --- /dev/null +++ b/src/service/service/service_handlers/e2e_orch/E2EOrchestratorServiceHandler.py @@ -0,0 +1,176 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 +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.tools.object_factory.ConfigRule import json_config_rule_set +from common.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_type +from service.service.service_handler_api.Tools import get_device_endpoint_uuids +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.task_scheduler.TaskExecutor import TaskExecutor + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'e2e_orch'}) + +class E2EOrchestratorServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings + ) -> None: + self.__service = service + self.__task_executor = task_executor + self.__settings_handler = SettingsHandler(service.service_config, **settings) + + @metered_subclass_method(METRICS_POOL) + def SetEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + + chk_type('endpoints', endpoints, list) + if len(endpoints) < 2: return [] + + service_uuid = self.__service.service_id.service_uuid.uuid + settings = self.__settings_handler.get('/settings') + json_settings : Dict = {} if settings is None else settings.value + bitrate = json_settings.get('bitrate', 1000) + + results = [] + try: + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + src_device = self.__task_executor.get_device(DeviceId(**json_device_id(src_device_uuid))) + src_controller = self.__task_executor.get_device_controller(src_device) + if src_controller is None: src_controller = src_device + + dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids(endpoints[-1]) + dst_device = self.__task_executor.get_device(DeviceId(**json_device_id(dst_device_uuid))) + dst_controller = self.__task_executor.get_device_controller(dst_device) + if dst_controller is None: dst_controller = dst_device + + controller = src_controller + + json_config_rule = json_config_rule_set('/services/service[{:s}]'.format(service_uuid), { + 'uuid' : service_uuid, + 'src_node' : src_endpoint_uuid, + 'dst_node' : dst_endpoint_uuid, + 'bitrate' : bitrate + }) + del controller.device_config.config_rules[:] + controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(controller) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetEndpoint for Service({:s})'.format(str(service_uuid))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + + chk_type('endpoints', endpoints, list) + if len(endpoints) < 2: return [] + + service_uuid = self.__service.service_id.service_uuid.uuid + settings = self.__settings_handler.get('/settings') + json_settings : Dict = {} if settings is None else settings.value + flow_id = json_settings.get('flow_id', 100) + bitrate = json_settings.get('bitrate', 1000) + + results = [] + try: + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + src_device = self.__task_executor.get_device(DeviceId(**json_device_id(src_device_uuid))) + src_controller = self.__task_executor.get_device_controller(src_device) + if src_controller is None: src_controller = src_device + + dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids(endpoints[1]) + dst_device = self.__task_executor.get_device(DeviceId(**json_device_id(dst_device_uuid))) + dst_controller = self.__task_executor.get_device_controller(dst_device) + if dst_controller is None: dst_controller = dst_device + + controller = src_controller + + json_config_rule = json_config_rule_set('/services/service[{:s}]'.format(service_uuid), { + 'uuid' : service_uuid, + 'flow_id' : flow_id, + 'src_node' : src_endpoint_uuid, + 'dst_node' : dst_endpoint_uuid, + 'bitrate' : bitrate + }) + + del controller.device_config.config_rules[:] + controller.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(controller) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteEndpoint for Service({:s})'.format(str(service_uuid))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def SetConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[SetConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + @metered_subclass_method(METRICS_POOL) + def DeleteConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[DeleteConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + resource_value = json.loads(resource[1]) + self.__settings_handler.set(resource[0], resource_value) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetConfig({:s})'.format(str(resource))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + self.__settings_handler.delete(resource[0]) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteConfig({:s})'.format(str(resource))) + results.append(e) + + return results diff --git a/src/service/service/service_handlers/e2e_orch/__init__.py b/src/service/service/service_handlers/e2e_orch/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/service/service/service_handlers/e2e_orch/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/service/service/service_handlers/l2nm_emulated/ConfigRules.py b/src/service/service/service_handlers/l2nm_emulated/ConfigRules.py index e68a62030fba242d40e6b1c9bf0c2c65e66639f2..d099bdec0126e83be68c3150a864d2330f8cc40a 100644 --- a/src/service/service/service_handlers/l2nm_emulated/ConfigRules.py +++ b/src/service/service/service_handlers/l2nm_emulated/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py b/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py index 7bd227f43fc52cf63266faea30c2a492f392b3ae..af865d2b877946bd21c6ba2795fb27966562d995 100644 --- a/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py +++ b/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l2nm_emulated/__init__.py b/src/service/service/service_handlers/l2nm_emulated/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/service_handlers/l2nm_emulated/__init__.py +++ b/src/service/service/service_handlers/l2nm_emulated/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l2nm_ietfl2vpn/L2NM_IETFL2VPN_ServiceHandler.py b/src/service/service/service_handlers/l2nm_ietfl2vpn/L2NM_IETFL2VPN_ServiceHandler.py index 2e832516b4e8c12028dcf82681406940b248e0f4..8ce66c2f3ac58b6d8654019b2908e6d1a10f2991 100644 --- a/src/service/service/service_handlers/l2nm_ietfl2vpn/L2NM_IETFL2VPN_ServiceHandler.py +++ b/src/service/service/service_handlers/l2nm_ietfl2vpn/L2NM_IETFL2VPN_ServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l2nm_ietfl2vpn/__init__.py b/src/service/service/service_handlers/l2nm_ietfl2vpn/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/service_handlers/l2nm_ietfl2vpn/__init__.py +++ b/src/service/service/service_handlers/l2nm_ietfl2vpn/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py b/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py index cedb39ebf151ef229d374150619ef4486c03a240..9e37611cbcef8396d692882b58a4f9e1fec044a1 100644 --- a/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py +++ b/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py b/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py index 6f7f05db5ceed0a2b9146f9275e1619131d77278..fd58a365988bb856060a82f4985134c178a46e96 100644 --- a/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py +++ b/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l2nm_openconfig/__init__.py b/src/service/service/service_handlers/l2nm_openconfig/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/service_handlers/l2nm_openconfig/__init__.py +++ b/src/service/service/service_handlers/l2nm_openconfig/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py b/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py index f4a46112e778bd01aa76322384d8adee942aaa5b..44245705ecdb48d33c9152328a352d736cc3dd27 100644 --- a/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py b/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py index de02a43caffd91ae047bd73d319e969af6265c5c..35ad6222d315c53b7e1686b75b2db34aba02570f 100644 --- a/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l3nm_emulated/__init__.py b/src/service/service/service_handlers/l3nm_emulated/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/service_handlers/l3nm_emulated/__init__.py +++ b/src/service/service/service_handlers/l3nm_emulated/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py index 7f3593df39f88e2e3ee806dcc33f67f9e85a6b69..be314a8c1ee5112dd9d321dd2c1ee1dc6173aca4 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/L3NMGnmiOpenConfigServiceHandler.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/L3NMGnmiOpenConfigServiceHandler.py index a9cec3f42cf75a27451e953f85342e299b642685..5856b5f61893174a92ce02a303ae9ad30be16005 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/L3NMGnmiOpenConfigServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/L3NMGnmiOpenConfigServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/__init__.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/__init__.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/l3nm_ietf_actn/Constants.py b/src/service/service/service_handlers/l3nm_ietf_actn/Constants.py new file mode 100644 index 0000000000000000000000000000000000000000..35d396f4f8abcfb0bba617ecd302362a257f97fa --- /dev/null +++ b/src/service/service/service_handlers/l3nm_ietf_actn/Constants.py @@ -0,0 +1,52 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# These hardcoded values will be updated with proper logic in second phase of the PoC + +VPN_VLAN_TAGS_TO_SERVICE_NAME = { + (21, 101): ('osu_tunnel_1', 'etht_service_1'), + (31, 201): ('osu_tunnel_2', 'etht_service_2'), +} + +OSU_TUNNEL_SETTINGS = { + 'osu_tunnel_1': { + 'odu_type': 'osuflex', + 'osuflex_number': 40, + 'bidirectional': True, + 'delay': 20, + 'ttp_channel_names': { + ('10.0.10.1', '200'): 'och:1-odu2:1-oduflex:1-osuflex:2', + ('10.0.30.1', '200'): 'och:1-odu2:1-oduflex:3-osuflex:1', + } + }, + 'osu_tunnel_2': { + 'odu_type': 'osuflex', + 'osuflex_number': 40, + 'bidirectional': True, + 'delay': 20, + 'ttp_channel_names': { + ('10.0.10.1', '200'): 'och:1-odu2:1-oduflex:1-osuflex:2', + ('10.0.30.1', '200'): 'och:1-odu2:1-oduflex:3-osuflex:1', + } + }, +} + +ETHT_SERVICE_SETTINGS = { + 'etht_service_1': { + 'service_type': 'op-mp2mp-svc', + }, + 'etht_service_2': { + 'service_type': 'op-mp2mp-svc', + }, +} diff --git a/src/service/service/service_handlers/l3nm_ietf_actn/L3NMIetfActnServiceHandler.py b/src/service/service/service_handlers/l3nm_ietf_actn/L3NMIetfActnServiceHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..bf447464555469f558a8408ba8c7788936233434 --- /dev/null +++ b/src/service/service/service_handlers/l3nm_ietf_actn/L3NMIetfActnServiceHandler.py @@ -0,0 +1,318 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, netaddr +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, Device, DeviceId, EndPoint, Service +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set +from common.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_type +from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.task_scheduler.TaskExecutor import TaskExecutor +from .Constants import ETHT_SERVICE_SETTINGS, OSU_TUNNEL_SETTINGS, VPN_VLAN_TAGS_TO_SERVICE_NAME + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'l3nm_ietf_actn'}) + +class L3NMIetfActnServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings + ) -> None: + self.__service = service + self.__task_executor = task_executor + self.__settings_handler = SettingsHandler(service.service_config, **settings) + + def _get_endpoint_details( + self, endpoint : Tuple[str, str, Optional[str]] + ) -> Tuple[Device, EndPoint, Dict]: + device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) + device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + endpoint_obj = get_endpoint_matching(device_obj, endpoint_uuid) + endpoint_settings = self.__settings_handler.get_endpoint_settings(device_obj, endpoint_obj) + device_name = device_obj.name + endpoint_name = endpoint_obj.name + if endpoint_settings is None: + MSG = 'Settings not found for Endpoint(device=[uuid={:s}, name={:s}], endpoint=[uuid={:s}, name={:s}])' + raise Exception(MSG.format(device_uuid, device_name, endpoint_uuid, endpoint_name)) + endpoint_settings_dict : Dict = endpoint_settings.value + return device_obj, endpoint_obj, endpoint_settings_dict + + def _get_service_names( + self, + src_endpoint_details : Tuple[Device, EndPoint, Dict], + dst_endpoint_details : Tuple[Device, EndPoint, Dict] + ) -> Tuple[str, str]: + _, _, src_endpoint_settings_dict = src_endpoint_details + src_vlan_tag = src_endpoint_settings_dict['vlan_tag'] + + _, _, dst_endpoint_settings_dict = dst_endpoint_details + dst_vlan_tag = dst_endpoint_settings_dict['vlan_tag'] + + service_names = VPN_VLAN_TAGS_TO_SERVICE_NAME.get((src_vlan_tag, dst_vlan_tag)) + if service_names is None: + MSG = 'Unable to find service names from VLAN tags(src={:s}, dst={:s})' + raise Exception(MSG.format(str(src_vlan_tag), str(dst_vlan_tag))) + return service_names + + def _compose_osu_tunnel( + self, osu_tunnel_name : str, + src_endpoint_details : Tuple[Device, EndPoint, Dict], + dst_endpoint_details : Tuple[Device, EndPoint, Dict], + is_delete : bool = False + ) -> ConfigRule: + osu_tunnel_resource_key = '/osu_tunnels/osu_tunnel[{:s}]'.format(osu_tunnel_name) + osu_tunnel_resource_value = {'name' : osu_tunnel_name} + if is_delete: + osu_tunnel_config_rule = json_config_rule_delete(osu_tunnel_resource_key, osu_tunnel_resource_value) + else: + src_device_obj, src_endpoint_obj, _ = src_endpoint_details + dst_device_obj, dst_endpoint_obj, _ = dst_endpoint_details + + osu_tunnel_settings = OSU_TUNNEL_SETTINGS[osu_tunnel_name] + ttp_channel_names = osu_tunnel_settings['ttp_channel_names'] + src_ttp_channel_name = ttp_channel_names[(src_device_obj.name, src_endpoint_obj.name)] + dst_ttp_channel_name = ttp_channel_names[(dst_device_obj.name, dst_endpoint_obj.name)] + + osu_tunnel_resource_value.update({ + 'odu_type' : osu_tunnel_settings['odu_type'], + 'osuflex_number' : osu_tunnel_settings['osuflex_number'], + 'bidirectional' : osu_tunnel_settings['bidirectional'], + 'delay' : osu_tunnel_settings['delay'], + 'src_node_id' : src_device_obj.name, + 'src_tp_id' : src_endpoint_obj.name, + 'src_ttp_channel_name': src_ttp_channel_name, + 'dst_node_id' : dst_device_obj.name, + 'dst_tp_id' : dst_endpoint_obj.name, + 'dst_ttp_channel_name': dst_ttp_channel_name, + }) + osu_tunnel_config_rule = json_config_rule_set(osu_tunnel_resource_key, osu_tunnel_resource_value) + LOGGER.debug('osu_tunnel_config_rule = {:s}'.format(str(osu_tunnel_config_rule))) + return ConfigRule(**osu_tunnel_config_rule) + + def _compose_static_routing( + self, src_vlan_tag : int, dst_vlan_tag : int + ) -> Tuple[List[Dict], List[Dict]]: + static_routing = self.__settings_handler.get('/static_routing') + if static_routing is None: raise Exception('static_routing not found') + static_routing_dict : Dict = static_routing.value + src_static_routes = list() + dst_static_routes = list() + for _, static_route in static_routing_dict.items(): + vlan_id = static_route['vlan-id'] + ipn_cidr = netaddr.IPNetwork(static_route['ip-network']) + ipn_network = str(ipn_cidr.network) + ipn_preflen = int(ipn_cidr.prefixlen) + next_hop = static_route['next-hop'] + if vlan_id == src_vlan_tag: + src_static_routes.append([ipn_network, ipn_preflen, next_hop]) + elif vlan_id == dst_vlan_tag: + dst_static_routes.append([ipn_network, ipn_preflen, next_hop]) + return src_static_routes, dst_static_routes + + def _compose_etht_service( + self, etht_service_name : str, osu_tunnel_name : str, + src_endpoint_details : Tuple[Device, EndPoint, Dict], + dst_endpoint_details : Tuple[Device, EndPoint, Dict], + is_delete : bool = False + ) -> ConfigRule: + etht_service_resource_key = '/etht_services/etht_service[{:s}]'.format(etht_service_name) + etht_service_resource_value = {'name' : etht_service_name} + if is_delete: + etht_service_config_rule = json_config_rule_delete(etht_service_resource_key, etht_service_resource_value) + else: + src_device_obj, src_endpoint_obj, src_endpoint_details = src_endpoint_details + src_vlan_tag = src_endpoint_details['vlan_tag'] + dst_device_obj, dst_endpoint_obj, dst_endpoint_details = dst_endpoint_details + dst_vlan_tag = dst_endpoint_details['vlan_tag'] + src_static_routes, dst_static_routes = self._compose_static_routing(src_vlan_tag, dst_vlan_tag) + etht_service_resource_value.update({ + 'osu_tunnel_name' : osu_tunnel_name, + 'service_type' : ETHT_SERVICE_SETTINGS[etht_service_name]['service_type'], + 'src_node_id' : src_device_obj.name, + 'src_tp_id' : src_endpoint_obj.name, + 'src_vlan_tag' : src_vlan_tag, + 'src_static_routes': src_static_routes, + 'dst_node_id' : dst_device_obj.name, + 'dst_tp_id' : dst_endpoint_obj.name, + 'dst_vlan_tag' : dst_vlan_tag, + 'dst_static_routes': dst_static_routes, + }) + etht_service_config_rule = json_config_rule_set(etht_service_resource_key, etht_service_resource_value) + LOGGER.debug('etht_service_config_rule = {:s}'.format(str(etht_service_config_rule))) + return ConfigRule(**etht_service_config_rule) + + @metered_subclass_method(METRICS_POOL) + def SetEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + LOGGER.debug('endpoints = {:s}'.format(str(endpoints))) + chk_type('endpoints', endpoints, list) + if len(endpoints) < 2: + LOGGER.warning('nothing done: not enough endpoints') + return [] + service_uuid = self.__service.service_id.service_uuid.uuid + LOGGER.debug('service_uuid = {:s}'.format(str(service_uuid))) + LOGGER.debug('self.__settings_handler = {:s}'.format(str(self.__settings_handler.dump_config_rules()))) + + results = [] + try: + src_endpoint_details = self._get_endpoint_details(endpoints[0]) + src_device_obj, _, _ = src_endpoint_details + src_controller = self.__task_executor.get_device_controller(src_device_obj) + if src_controller is None: src_controller = src_device_obj + + dst_endpoint_details = self._get_endpoint_details(endpoints[-1]) + dst_device_obj, _, _ = dst_endpoint_details + dst_controller = self.__task_executor.get_device_controller(dst_device_obj) + if dst_controller is None: dst_controller = dst_device_obj + + if src_controller.device_id.device_uuid.uuid != dst_controller.device_id.device_uuid.uuid: + raise Exception('Different Src-Dst devices not supported by now') + controller = src_controller + + osu_tunnel_name, etht_service_name = self._get_service_names( + src_endpoint_details, dst_endpoint_details + ) + + osu_tunnel_config_rule = self._compose_osu_tunnel( + osu_tunnel_name, src_endpoint_details, dst_endpoint_details, + is_delete=False + ) + + etht_service_config_rule = self._compose_etht_service( + etht_service_name, osu_tunnel_name, src_endpoint_details, + dst_endpoint_details, is_delete=False + ) + + del controller.device_config.config_rules[:] + controller.device_config.config_rules.append(osu_tunnel_config_rule) + controller.device_config.config_rules.append(etht_service_config_rule) + self.__task_executor.configure_device(controller) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetEndpoint for Service({:s})'.format(str(service_uuid))) + results.append(e) + + LOGGER.debug('results = {:s}'.format(str(results))) + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + LOGGER.debug('endpoints = {:s}'.format(str(endpoints))) + chk_type('endpoints', endpoints, list) + if len(endpoints) < 2: + LOGGER.warning('nothing done: not enough endpoints') + return [] + service_uuid = self.__service.service_id.service_uuid.uuid + LOGGER.debug('service_uuid = {:s}'.format(str(service_uuid))) + LOGGER.debug('self.__settings_handler = {:s}'.format(str(self.__settings_handler.dump_config_rules()))) + + results = [] + try: + src_endpoint_details = self._get_endpoint_details(endpoints[0]) + src_device_obj, _, _ = src_endpoint_details + src_controller = self.__task_executor.get_device_controller(src_device_obj) + if src_controller is None: src_controller = src_device_obj + + dst_endpoint_details = self._get_endpoint_details(endpoints[-1]) + dst_device_obj, _, _ = dst_endpoint_details + dst_controller = self.__task_executor.get_device_controller(dst_device_obj) + if dst_controller is None: dst_controller = dst_device_obj + + if src_controller.device_id.device_uuid.uuid != dst_controller.device_id.device_uuid.uuid: + raise Exception('Different Src-Dst devices not supported by now') + controller = src_controller + + osu_tunnel_name, etht_service_name = self._get_service_names( + src_endpoint_details, dst_endpoint_details + ) + + osu_tunnel_config_rule = self._compose_osu_tunnel( + osu_tunnel_name, src_endpoint_details, dst_endpoint_details, + is_delete=True + ) + + etht_service_config_rule = self._compose_etht_service( + etht_service_name, osu_tunnel_name, src_endpoint_details, + dst_endpoint_details, is_delete=True + ) + + del controller.device_config.config_rules[:] + controller.device_config.config_rules.append(osu_tunnel_config_rule) + controller.device_config.config_rules.append(etht_service_config_rule) + self.__task_executor.configure_device(controller) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteEndpoint for Service({:s})'.format(str(service_uuid))) + results.append(e) + + LOGGER.debug('results = {:s}'.format(str(results))) + return results + + @metered_subclass_method(METRICS_POOL) + def SetConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[SetConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + @metered_subclass_method(METRICS_POOL) + def DeleteConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[DeleteConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + resource_value = json.loads(resource[1]) + self.__settings_handler.set(resource[0], resource_value) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetConfig({:s})'.format(str(resource))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + self.__settings_handler.delete(resource[0]) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteConfig({:s})'.format(str(resource))) + results.append(e) + + return results diff --git a/src/service/service/service_handlers/l3nm_ietf_actn/__init__.py b/src/service/service/service_handlers/l3nm_ietf_actn/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/service/service/service_handlers/l3nm_ietf_actn/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py index 1e4425cdbcaa6ac1f423f2c3c65889e0e8017789..7527932877f47a092a35f286defb3744e05db109 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,24 +12,35 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Dict, List, Tuple +from typing import Any, Dict, List, Optional, Tuple from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set from service.service.service_handler_api.AnyTreeTools import TreeNode +def get_value(field_name : str, *containers, default=None) -> Optional[Any]: + if len(containers) == 0: raise Exception('No containers specified') + for container in containers: + if field_name not in container: continue + return container[field_name] + return default + def setup_config_rules( service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, endpoint_name : str, - service_settings : TreeNode, endpoint_settings : TreeNode, endpoint_acls : List [Tuple] + service_settings : TreeNode, device_settings : TreeNode, endpoint_settings : TreeNode, endpoint_acls : List [Tuple] ) -> List[Dict]: if service_settings is None: return [] + if device_settings is None: return [] if endpoint_settings is None: return [] json_settings : Dict = service_settings.value + json_device_settings : Dict = device_settings.value json_endpoint_settings : Dict = endpoint_settings.value - mtu = json_settings.get('mtu', 1450 ) # 1512 + settings = (json_settings, json_endpoint_settings, json_device_settings) + + mtu = get_value('mtu', *settings, default=1450) # 1512 #address_families = json_settings.get('address_families', [] ) # ['IPV4'] - bgp_as = json_settings.get('bgp_as', 65000 ) # 65000 + bgp_as = get_value('bgp_as', *settings, default=65000) # 65000 router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' route_distinguisher = json_settings.get('route_distinguisher', '65000:101' ) # '60001:801' @@ -76,6 +87,7 @@ def setup_config_rules( 'name': network_instance_name, 'protocol_name': 'BGP', 'identifier': 'BGP', + 'type': 'L3VRF', 'as': bgp_as, 'router_id': router_id, }), @@ -88,7 +100,6 @@ def setup_config_rules( 'protocol_name': 'DIRECTLY_CONNECTED', }), - #Add STATIC protocol to network instance json_config_rule_set( '/network_instance[{:s}]/protocols[STATIC]'.format(network_instance_name), { @@ -114,6 +125,7 @@ def setup_config_rules( json_config_rule_set( '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_subif_name), { 'name' : network_instance_name, + 'type' : 'L3VRF', 'id' : if_subif_name, 'interface' : if_subif_name, 'subinterface': sub_interface_index, @@ -183,6 +195,7 @@ def setup_config_rules( }), ] + for res_key, res_value in endpoint_acls: json_config_rules.append( {'action': 1, 'acl': res_value} @@ -191,23 +204,27 @@ def setup_config_rules( def teardown_config_rules( service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, endpoint_name : str, - service_settings : TreeNode, endpoint_settings : TreeNode + service_settings : TreeNode, device_settings : TreeNode, endpoint_settings : TreeNode ) -> List[Dict]: if service_settings is None: return [] + if device_settings is None: return [] if endpoint_settings is None: return [] json_settings : Dict = service_settings.value + json_device_settings : Dict = device_settings.value json_endpoint_settings : Dict = endpoint_settings.value + settings = (json_settings, json_endpoint_settings, json_device_settings) + service_short_uuid = service_uuid.split('-')[-1] network_instance_name = '{:s}-NetInst'.format(service_short_uuid) #network_interface_desc = '{:s}-NetIf'.format(service_uuid) #network_subinterface_desc = '{:s}-NetSubIf'.format(service_uuid) - #mtu = json_settings.get('mtu', 1450 ) # 1512 + #mtu = get_value('mtu', *settings, default=1450) # 1512 #address_families = json_settings.get('address_families', [] ) # ['IPV4'] - #bgp_as = json_settings.get('bgp_as', 65000 ) # 65000 + #bgp_as = get_value('bgp_as', *settings, default=65000) # 65000 route_distinguisher = json_settings.get('route_distinguisher', '0:0' ) # '60001:801' #sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 #router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' diff --git a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules_test_ocnos.py b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules_test_ocnos.py new file mode 100644 index 0000000000000000000000000000000000000000..5fa1d0b5b6931902b4ac50847c90bf67738032ba --- /dev/null +++ b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules_test_ocnos.py @@ -0,0 +1,337 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 Dict, List, Tuple +from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set +from service.service.service_handler_api.AnyTreeTools import TreeNode + +def setup_config_rules( + service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, endpoint_name : str, + service_settings : TreeNode, device_settings : TreeNode, endpoint_settings : TreeNode, endpoint_acls : List [Tuple] +) -> List[Dict]: + + if service_settings is None: return [] + if device_settings is None: return [] + if endpoint_settings is None: return [] + + json_settings : Dict = service_settings.value + json_device_settings : Dict = device_settings.value + json_endpoint_settings : Dict = endpoint_settings.value + + mtu = json_settings.get('mtu', 1450 ) # 1512 + #address_families = json_settings.get('address_families', [] ) # ['IPV4'] + bgp_as = json_device_settings.get('bgp_as', 65000 ) # 65000 + + router_id = json_device_settings.get('router_id', '0.0.0.0') # '10.95.0.10' + route_distinguisher = json_device_settings.get('route_distinguisher', '65000:101' ) # '60001:801' + sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 + vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 + address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1' + address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30 + + policy_import = json_device_settings.get('policy_AZ', '2' ) # 2 + policy_export = json_device_settings.get('policy_ZA', '7' ) # 30 + #network_interface_desc = '{:s}-NetIf'.format(service_uuid) + network_interface_desc = json_endpoint_settings.get('ni_description','') + #network_subinterface_desc = '{:s}-NetSubIf'.format(service_uuid) + network_subinterface_desc = json_endpoint_settings.get('subif_description','') + #service_short_uuid = service_uuid.split('-')[-1] + #network_instance_name = '{:s}-NetInst'.format(service_short_uuid) + network_instance_name = json_endpoint_settings.get('ni_name', service_uuid.split('-')[-1]) #ELAN-AC:1 + + self_bgp_if_name = json_device_settings.get('self_bgp_interface_name', '') + self_bgp_address_ip = json_device_settings.get('self_bgp_interface_address_ip', '') + bgp_address_prefix = json_device_settings.get('bgp_interface_address_prefix', '') + bgp_sub_interface_index = json_device_settings.get('self_bgp_sub_interface_index', 0) + neighbor_bgp_if_address_ip= json_device_settings.get('neighbor_bgp_interface_address_ip', '0.0.0.0') # '2.2.2.1' + + # if_subif_name = '{:s}.{:d}'.format(endpoint_name, 0) + if_subif_name = '{:s}'.format(endpoint_name[5:]) + + json_config_rules = [ + # Configure Interface (not used) + #json_config_rule_set( + # '/interface[{:s}]'.format(endpoint_name), { + # 'name': endpoint_name, + # 'description': network_interface_desc, + # 'mtu': mtu, + #}), + + #Create network instance + json_config_rule_set( + '/network_instance[{:s}]'.format(network_instance_name), { + 'name': network_instance_name, + 'description': network_interface_desc, + 'type': 'L3VRF', + 'route_distinguisher': route_distinguisher, + 'router_id': router_id, + #'address_families': address_families, + }), + + #Add BGP protocol to network instance + json_config_rule_set( + '/network_instance[{:s}]/protocols[BGP]'.format(network_instance_name), { + 'name': network_instance_name, + 'protocol_name': bgp_as, + 'identifier': 'BGP', + 'type': 'L3VRF', + 'as': bgp_as, + 'router_id': router_id, + 'neighbors': [{'ip_address': neighbor_bgp_if_address_ip, 'remote_as': bgp_as}] + }), + + #Add DIRECTLY CONNECTED protocol to network instance + json_config_rule_set( + '/network_instance[{:s}]/protocols[DIRECTLY_CONNECTED]'.format(network_instance_name), { + 'name': network_instance_name, + 'identifier': 'DIRECTLY_CONNECTED', + 'protocol_name': 'DIRECTLY_CONNECTED', + }), + + #Add STATIC protocol to network instance + json_config_rule_set( + '/network_instance[{:s}]/protocols[STATIC]'.format(network_instance_name), { + 'name': network_instance_name, + 'identifier': 'STATIC', + 'protocol_name': 'STATIC', + }), + + #Create interface with subinterface (without IP address) + json_config_rule_set( + '/interface[{:s}]/subinterface[{:d}]'.format(if_subif_name, sub_interface_index), { + 'name' : if_subif_name, + 'type' :'ethernetCsmacd', + 'mtu' : mtu, + 'index' : sub_interface_index, + 'description': network_subinterface_desc, + 'vlan_id' : vlan_id, + }), + + #Associate interface to network instance + json_config_rule_set( + '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_subif_name), { + 'name' : network_instance_name, + 'type' : 'L3VRF', + 'id' : if_subif_name, + 'interface' : if_subif_name, + 'subinterface' : sub_interface_index, + 'address_ip' : address_ip, + 'address_prefix': address_prefix, + }), + + #Create interface with subinterface (with IP address) + json_config_rule_set( + '/interface[{:s}]/subinterface[{:d}]'.format(if_subif_name, sub_interface_index), { + 'name' : if_subif_name, + 'type' :'ethernetCsmacd', + 'mtu' : mtu, + 'index' : sub_interface_index, + 'description' : network_subinterface_desc, + 'vlan_id' : vlan_id, + 'address_ip' : address_ip, + 'address_prefix': address_prefix, + }), + + json_config_rule_set( + '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, self_bgp_if_name), { + 'name' : network_instance_name, + 'type' : 'L3VRF', + 'id' : self_bgp_if_name, + 'interface' : self_bgp_if_name, + 'subinterface': bgp_sub_interface_index, + 'address_ip' : self_bgp_address_ip, + 'address_prefix': bgp_address_prefix, + }), + + #Create routing policy + json_config_rule_set( + '/routing_policy/bgp_defined_set[{:s}_rt_import][{:s}]'.format(policy_import,route_distinguisher), { + 'ext_community_set_name': 'set_{:s}'.format(policy_import), + 'ext_community_member' : route_distinguisher, + }), + json_config_rule_set( + # pylint: disable=duplicate-string-formatting-argument + '/routing_policy/policy_definition[{:s}_import]/statement[{:s}]'.format(policy_import, policy_import), { + 'policy_name' : policy_import, + 'statement_name' : 'stm_{:s}'.format(policy_import), # OCNOS: '10', + 'ext_community_set_name': 'set_{:s}'.format(policy_import), + 'policy_result' : 'ACCEPT_ROUTE', + }), + + #Associate routing policy to network instance + json_config_rule_set( + '/network_instance[{:s}]/inter_instance_policies[{:s}]'.format(network_instance_name, policy_import), { + 'name' : network_instance_name, + 'import_policy': policy_import, + }), + + #Create routing policy + json_config_rule_set( + '/routing_policy/bgp_defined_set[{:s}_rt_export][{:s}]'.format(policy_export, route_distinguisher), { + 'ext_community_set_name': 'set_{:s}'.format(policy_export), + 'ext_community_member' : route_distinguisher, + }), + json_config_rule_set( + # pylint: disable=duplicate-string-formatting-argument + '/routing_policy/policy_definition[{:s}_export]/statement[{:s}]'.format(policy_export, policy_export), { + 'policy_name' : policy_export, + 'statement_name' : 'stm_{:s}'.format(policy_export), # OCNOS: '10', + 'ext_community_set_name': 'set_{:s}'.format(policy_export), + 'policy_result' : 'ACCEPT_ROUTE', + }), + + #Associate routing policy to network instance + json_config_rule_set( + '/network_instance[{:s}]/inter_instance_policies[{:s}]'.format(network_instance_name, policy_export),{ + 'name' : network_instance_name, + 'export_policy': policy_export, + }), + + #Create table connections + json_config_rule_set( + '/network_instance[{:s}]/table_connections[DIRECTLY_CONNECTED][BGP][IPV4]'.format(network_instance_name), { + 'name' : network_instance_name, + 'src_protocol' : 'DIRECTLY_CONNECTED', + 'dst_protocol' : 'BGP', + 'address_family' : 'IPV4', + 'default_import_policy': 'ACCEPT_ROUTE', + 'as' : bgp_as, + }), + + json_config_rule_set( + '/network_instance[{:s}]/table_connections[STATIC][BGP][IPV4]'.format(network_instance_name), { + 'name' : network_instance_name, + 'src_protocol' : 'STATIC', + 'dst_protocol' : 'BGP', + 'address_family' : 'IPV4', + 'default_import_policy': 'ACCEPT_ROUTE', + 'as' : bgp_as, + }), + + ] + + for res_key, res_value in endpoint_acls: + json_config_rules.append( + {'action': 1, 'acl': res_value} + ) + return json_config_rules + +def teardown_config_rules( + service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, endpoint_name : str, + service_settings : TreeNode, device_settings : TreeNode, endpoint_settings : TreeNode +) -> List[Dict]: + + if service_settings is None: return [] + if device_settings is None: return [] + if endpoint_settings is None: return [] + + json_settings : Dict = service_settings.value + json_device_settings : Dict = device_settings.value + json_endpoint_settings : Dict = endpoint_settings.value + + service_short_uuid = service_uuid.split('-')[-1] + # network_instance_name = '{:s}-NetInst'.format(service_short_uuid) + network_instance_name = json_endpoint_settings.get('ni_name', service_short_uuid) #ELAN-AC:1 + #network_interface_desc = '{:s}-NetIf'.format(service_uuid) + # network_subinterface_desc = '{:s}-NetSubIf'.format(service_uuid) + network_subinterface_desc = '' + + mtu = json_settings.get('mtu', 1450 ) # 1512 + #address_families = json_settings.get('address_families', [] ) # ['IPV4'] + #bgp_as = json_device_settings.get('bgp_as', 65000 ) # 65000 + route_distinguisher = json_device_settings.get('route_distinguisher', '0:0' ) # '60001:801' + sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 + #router_id = json_device_settings.get('router_id', '0.0.0.0') # '10.95.0.10' + vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 + address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1' + address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30 + policy_import = json_device_settings.get('policy_AZ', '2' ) # 2 + policy_export = json_device_settings.get('policy_ZA', '7' ) # 30 + + self_bgp_if_name = json_device_settings.get('self_bgp_interface_name', '') + self_bgp_address_ip = json_device_settings.get('self_bgp_interface_address_ip', '') + bgp_address_prefix = json_device_settings.get('bgp_interface_address_prefix', '') + bgp_sub_interface_index = json_device_settings.get('self_bgp_sub_interface_index', 0) + + # if_subif_name = '{:s}.{:d}'.format(endpoint_name, vlan_id) + if_subif_name = '{:s}'.format(endpoint_name[5:]) + + json_config_rules = [ + #Delete export routing policy + json_config_rule_delete( + # pylint: disable=duplicate-string-formatting-argument + '/routing_policy/policy_definition[{:s}_export]/statement[{:s}]'.format(policy_export, policy_export), { + 'policy_name' : policy_export, + 'statement_name' : 'stm_{:s}'.format(policy_export), # OCNOS: '10', + 'ext_community_set_name': 'set_{:s}'.format(policy_export), + 'policy_result' : 'ACCEPT_ROUTE', + }), + json_config_rule_delete( + '/routing_policy/bgp_defined_set[{:s}_rt_export][{:s}]'.format(policy_export, route_distinguisher), { + 'ext_community_set_name': 'set_{:s}'.format(policy_export), + 'ext_community_member' : route_distinguisher, + }), + + #Delete import routing policy + json_config_rule_delete( + # pylint: disable=duplicate-string-formatting-argument + '/routing_policy/policy_definition[{:s}_import]/statement[{:s}]'.format(policy_import, policy_import), { + 'policy_name' : policy_import, + 'statement_name' : 'stm_{:s}'.format(policy_import), # OCNOS: '10', + 'ext_community_set_name': 'set_{:s}'.format(policy_import), + 'policy_result' : 'ACCEPT_ROUTE', + }), + json_config_rule_delete( + '/routing_policy/bgp_defined_set[{:s}_rt_import][{:s}]'.format(policy_import, route_distinguisher), { + 'ext_community_set_name': 'set_{:s}'.format(policy_import), + 'ext_community_member' : route_distinguisher, + }), + + #Delete interface; automatically deletes: + # - /interface[]/subinterface[] + # json_config_rule_delete('/interface[{:s}]/subinterface[0]'.format(if_subif_name), + # { + # 'name': if_subif_name, + # }), + + #Delete network instance; automatically deletes: + # - /network_instance[]/interface[] + # - /network_instance[]/protocols[] + # - /network_instance[]/inter_instance_policies[] + + #Associate interface to network instance + json_config_rule_set( + '/network_instance[{:s}]/interface[{:s}]'.format('default', if_subif_name), { + 'name' : 'default', + 'id' : if_subif_name, + 'interface' : if_subif_name, + 'subinterface': sub_interface_index, + 'address_ip' : address_ip, + 'address_prefix': address_prefix, + }), + json_config_rule_set( + '/network_instance[{:s}]/interface[{:s}]'.format('default', self_bgp_if_name), { + 'name' : 'default', + 'id' : self_bgp_if_name, + 'interface' : self_bgp_if_name, + 'subinterface': bgp_sub_interface_index, + 'address_ip' : self_bgp_address_ip, + 'address_prefix': bgp_address_prefix, + }), + json_config_rule_delete('/network_instance[{:s}]'.format(network_instance_name), + { + 'name': network_instance_name + }), + ] + return json_config_rules diff --git a/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py b/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py index 3f8a6d9dd445fb4e5b9f051ac117ca71655446e3..2c944bfe4772b2f55ff16d1a3c726af3ee4c6e8f 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -52,6 +52,7 @@ class L3NMOpenConfigServiceHandler(_ServiceHandler): device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + device_settings = self.__settings_handler.get_device_settings(device_obj) endpoint_obj = get_endpoint_matching(device_obj, endpoint_uuid) endpoint_settings = self.__settings_handler.get_endpoint_settings(device_obj, endpoint_obj) endpoint_acls = self.__settings_handler.get_endpoint_acls(device_obj, endpoint_obj) @@ -59,7 +60,7 @@ class L3NMOpenConfigServiceHandler(_ServiceHandler): json_config_rules = setup_config_rules( service_uuid, connection_uuid, device_uuid, endpoint_uuid, endpoint_name, - settings, endpoint_settings, endpoint_acls) + settings, device_settings, endpoint_settings, endpoint_acls) if len(json_config_rules) > 0: del device_obj.device_config.config_rules[:] @@ -90,13 +91,14 @@ class L3NMOpenConfigServiceHandler(_ServiceHandler): device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + device_settings = self.__settings_handler.get_device_settings(device_obj) endpoint_obj = get_endpoint_matching(device_obj, endpoint_uuid) endpoint_settings = self.__settings_handler.get_endpoint_settings(device_obj, endpoint_obj) endpoint_name = endpoint_obj.name json_config_rules = teardown_config_rules( service_uuid, connection_uuid, device_uuid, endpoint_uuid, endpoint_name, - settings, endpoint_settings) + settings, device_settings, endpoint_settings) if len(json_config_rules) > 0: del device_obj.device_config.config_rules[:] diff --git a/src/service/service/service_handlers/l3nm_openconfig/__init__.py b/src/service/service/service_handlers/l3nm_openconfig/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/__init__.py +++ b/src/service/service/service_handlers/l3nm_openconfig/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py b/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py index 40c87eeee2c8dd1ddd5a39162f8ff7f117344e3b..340e64b5c3d0a1b1f2c1ce17fbaac2366605f21e 100644 --- a/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py +++ b/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/microwave/__init__.py b/src/service/service/service_handlers/microwave/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/service_handlers/microwave/__init__.py +++ b/src/service/service/service_handlers/microwave/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/oc/ConfigRules.py b/src/service/service/service_handlers/oc/ConfigRules.py new file mode 100644 index 0000000000000000000000000000000000000000..44245705ecdb48d33c9152328a352d736cc3dd27 --- /dev/null +++ b/src/service/service/service_handlers/oc/ConfigRules.py @@ -0,0 +1,255 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 Dict, List +from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set +from service.service.service_handler_api.AnyTreeTools import TreeNode + +def setup_config_rules( + service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, endpoint_name : str, + service_settings : TreeNode, endpoint_settings : TreeNode +) -> List[Dict]: + + if service_settings is None: return [] + if endpoint_settings is None: return [] + + json_settings : Dict = service_settings.value + json_endpoint_settings : Dict = endpoint_settings.value + + service_short_uuid = service_uuid.split('-')[-1] + network_instance_name = '{:s}-NetInst'.format(service_short_uuid) + network_interface_desc = '{:s}-NetIf'.format(service_uuid) + network_subinterface_desc = '{:s}-NetSubIf'.format(service_uuid) + + mtu = json_settings.get('mtu', 1450 ) # 1512 + #address_families = json_settings.get('address_families', [] ) # ['IPV4'] + bgp_as = json_settings.get('bgp_as', 0 ) # 65000 + bgp_route_target = json_settings.get('bgp_route_target', '0:0') # 65000:333 + + #router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' + route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801' + sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 + vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 + address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1' + address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30 + if_subif_name = '{:s}.{:d}'.format(endpoint_name, vlan_id) + + json_config_rules = [ + json_config_rule_set( + '/network_instance[{:s}]'.format(network_instance_name), { + 'name': network_instance_name, 'description': network_interface_desc, 'type': 'L3VRF', + 'route_distinguisher': route_distinguisher, + #'router_id': router_id, 'address_families': address_families, + }), + json_config_rule_set( + '/interface[{:s}]'.format(endpoint_name), { + 'name': endpoint_name, 'description': network_interface_desc, 'mtu': mtu, + }), + json_config_rule_set( + '/interface[{:s}]/subinterface[{:d}]'.format(endpoint_name, sub_interface_index), { + 'name': endpoint_name, 'index': sub_interface_index, + 'description': network_subinterface_desc, 'vlan_id': vlan_id, + 'address_ip': address_ip, 'address_prefix': address_prefix, + }), + json_config_rule_set( + '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_subif_name), { + 'name': network_instance_name, 'id': if_subif_name, 'interface': endpoint_name, + 'subinterface': sub_interface_index, + }), + json_config_rule_set( + '/network_instance[{:s}]/protocols[BGP]'.format(network_instance_name), { + 'name': network_instance_name, 'identifier': 'BGP', 'protocol_name': 'BGP', 'as': bgp_as, + }), + json_config_rule_set( + '/network_instance[{:s}]/table_connections[STATIC][BGP][IPV4]'.format(network_instance_name), { + 'name': network_instance_name, 'src_protocol': 'STATIC', 'dst_protocol': 'BGP', + 'address_family': 'IPV4', #'default_import_policy': 'REJECT_ROUTE', + }), + json_config_rule_set( + '/network_instance[{:s}]/table_connections[DIRECTLY_CONNECTED][BGP][IPV4]'.format( + network_instance_name), { + 'name': network_instance_name, 'src_protocol': 'DIRECTLY_CONNECTED', 'dst_protocol': 'BGP', + 'address_family': 'IPV4', #'default_import_policy': 'REJECT_ROUTE', + }), + json_config_rule_set( + '/routing_policy/bgp_defined_set[{:s}_rt_import]'.format(network_instance_name), { + 'ext_community_set_name': '{:s}_rt_import'.format(network_instance_name), + }), + json_config_rule_set( + '/routing_policy/bgp_defined_set[{:s}_rt_import][route-target:{:s}]'.format( + network_instance_name, bgp_route_target), { + 'ext_community_set_name': '{:s}_rt_import'.format(network_instance_name), + 'ext_community_member' : 'route-target:{:s}'.format(bgp_route_target), + }), + json_config_rule_set( + '/routing_policy/policy_definition[{:s}_import]'.format(network_instance_name), { + 'policy_name': '{:s}_import'.format(network_instance_name), + }), + json_config_rule_set( + '/routing_policy/policy_definition[{:s}_import]/statement[{:s}]'.format( + network_instance_name, '3'), { + 'policy_name': '{:s}_import'.format(network_instance_name), 'statement_name': '3', + 'ext_community_set_name': '{:s}_rt_import'.format(network_instance_name), + 'match_set_options': 'ANY', 'policy_result': 'ACCEPT_ROUTE', + }), + json_config_rule_set( + # pylint: disable=duplicate-string-formatting-argument + '/network_instance[{:s}]/inter_instance_policies[{:s}_import]'.format( + network_instance_name, network_instance_name), { + 'name': network_instance_name, 'import_policy': '{:s}_import'.format(network_instance_name), + }), + json_config_rule_set( + '/routing_policy/bgp_defined_set[{:s}_rt_export]'.format(network_instance_name), { + 'ext_community_set_name': '{:s}_rt_export'.format(network_instance_name), + }), + json_config_rule_set( + '/routing_policy/bgp_defined_set[{:s}_rt_export][route-target:{:s}]'.format( + network_instance_name, bgp_route_target), { + 'ext_community_set_name': '{:s}_rt_export'.format(network_instance_name), + 'ext_community_member' : 'route-target:{:s}'.format(bgp_route_target), + }), + json_config_rule_set( + '/routing_policy/policy_definition[{:s}_export]'.format(network_instance_name), { + 'policy_name': '{:s}_export'.format(network_instance_name), + }), + json_config_rule_set( + '/routing_policy/policy_definition[{:s}_export]/statement[{:s}]'.format( + network_instance_name, '3'), { + 'policy_name': '{:s}_export'.format(network_instance_name), 'statement_name': '3', + 'ext_community_set_name': '{:s}_rt_export'.format(network_instance_name), + 'match_set_options': 'ANY', 'policy_result': 'ACCEPT_ROUTE', + }), + json_config_rule_set( + # pylint: disable=duplicate-string-formatting-argument + '/network_instance[{:s}]/inter_instance_policies[{:s}_export]'.format( + network_instance_name, network_instance_name), { + 'name': network_instance_name, 'export_policy': '{:s}_export'.format(network_instance_name), + }), + ] + + return json_config_rules + +def teardown_config_rules( + service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, endpoint_name : str, + service_settings : TreeNode, endpoint_settings : TreeNode +) -> List[Dict]: + + if service_settings is None: return [] + if endpoint_settings is None: return [] + + json_settings : Dict = service_settings.value + json_endpoint_settings : Dict = endpoint_settings.value + + #mtu = json_settings.get('mtu', 1450 ) # 1512 + #address_families = json_settings.get('address_families', [] ) # ['IPV4'] + #bgp_as = json_settings.get('bgp_as', 0 ) # 65000 + bgp_route_target = json_settings.get('bgp_route_target', '0:0') # 65000:333 + + #router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' + #route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801' + sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 + vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 + #address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1' + #address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30 + + if_subif_name = '{:s}.{:d}'.format(endpoint_name, vlan_id) + service_short_uuid = service_uuid.split('-')[-1] + network_instance_name = '{:s}-NetInst'.format(service_short_uuid) + #network_interface_desc = '{:s}-NetIf'.format(service_uuid) + #network_subinterface_desc = '{:s}-NetSubIf'.format(service_uuid) + + json_config_rules = [ + json_config_rule_delete( + '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_subif_name), { + 'name': network_instance_name, 'id': if_subif_name, + }), + json_config_rule_delete( + '/interface[{:s}]/subinterface[{:d}]'.format(endpoint_name, sub_interface_index), { + 'name': endpoint_name, 'index': sub_interface_index, + }), + json_config_rule_delete( + '/interface[{:s}]'.format(endpoint_name), { + 'name': endpoint_name, + }), + json_config_rule_delete( + '/network_instance[{:s}]/table_connections[DIRECTLY_CONNECTED][BGP][IPV4]'.format( + network_instance_name), { + 'name': network_instance_name, 'src_protocol': 'DIRECTLY_CONNECTED', 'dst_protocol': 'BGP', + 'address_family': 'IPV4', + }), + json_config_rule_delete( + '/network_instance[{:s}]/table_connections[STATIC][BGP][IPV4]'.format(network_instance_name), { + 'name': network_instance_name, 'src_protocol': 'STATIC', 'dst_protocol': 'BGP', + 'address_family': 'IPV4', + }), + json_config_rule_delete( + '/network_instance[{:s}]/protocols[BGP]'.format(network_instance_name), { + 'name': network_instance_name, 'identifier': 'BGP', 'protocol_name': 'BGP', + }), + json_config_rule_delete( + # pylint: disable=duplicate-string-formatting-argument + '/network_instance[{:s}]/inter_instance_policies[{:s}_import]'.format( + network_instance_name, network_instance_name), { + 'name': network_instance_name, + }), + json_config_rule_delete( + '/routing_policy/policy_definition[{:s}_import]/statement[{:s}]'.format( + network_instance_name, '3'), { + 'policy_name': '{:s}_import'.format(network_instance_name), 'statement_name': '3', + }), + json_config_rule_delete( + '/routing_policy/policy_definition[{:s}_import]'.format(network_instance_name), { + 'policy_name': '{:s}_import'.format(network_instance_name), + }), + json_config_rule_delete( + '/routing_policy/bgp_defined_set[{:s}_rt_import][route-target:{:s}]'.format( + network_instance_name, bgp_route_target), { + 'ext_community_set_name': '{:s}_rt_import'.format(network_instance_name), + 'ext_community_member' : 'route-target:{:s}'.format(bgp_route_target), + }), + json_config_rule_delete( + '/routing_policy/bgp_defined_set[{:s}_rt_import]'.format(network_instance_name), { + 'ext_community_set_name': '{:s}_rt_import'.format(network_instance_name), + }), + json_config_rule_delete( + # pylint: disable=duplicate-string-formatting-argument + '/network_instance[{:s}]/inter_instance_policies[{:s}_export]'.format( + network_instance_name, network_instance_name), { + 'name': network_instance_name, + }), + json_config_rule_delete( + '/routing_policy/policy_definition[{:s}_export]/statement[{:s}]'.format( + network_instance_name, '3'), { + 'policy_name': '{:s}_export'.format(network_instance_name), 'statement_name': '3', + }), + json_config_rule_delete( + '/routing_policy/policy_definition[{:s}_export]'.format(network_instance_name), { + 'policy_name': '{:s}_export'.format(network_instance_name), + }), + json_config_rule_delete( + '/routing_policy/bgp_defined_set[{:s}_rt_export][route-target:{:s}]'.format( + network_instance_name, bgp_route_target), { + 'ext_community_set_name': '{:s}_rt_export'.format(network_instance_name), + 'ext_community_member' : 'route-target:{:s}'.format(bgp_route_target), + }), + json_config_rule_delete( + '/routing_policy/bgp_defined_set[{:s}_rt_export]'.format(network_instance_name), { + 'ext_community_set_name': '{:s}_rt_export'.format(network_instance_name), + }), + json_config_rule_delete( + '/network_instance[{:s}]'.format(network_instance_name), { + 'name': network_instance_name + }), + ] + return json_config_rules diff --git a/src/service/service/service_handlers/oc/OCServiceHandler.py b/src/service/service/service_handlers/oc/OCServiceHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..73ff3b89dea808d7a857cd52d5b4d4e581d218cc --- /dev/null +++ b/src/service/service/service_handlers/oc/OCServiceHandler.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 +from typing import Any, 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.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_type +from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.task_scheduler.TaskExecutor import TaskExecutor +from .ConfigRules import setup_config_rules, teardown_config_rules +from .OCTools import convert_endpoints_to_flows, handle_flows_names + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('Service', 'Handler', labels={'handler': 'oc'}) + +class OCServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings + ) -> None: + self.__service = service + self.__task_executor = task_executor + self.__settings_handler = SettingsHandler(service.service_config, **settings) + + @metered_subclass_method(METRICS_POOL) + def SetEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + is_opticalband =False + #service_uuid = self.__service.service_id.service_uuid.uuid + settings=None + if self.__settings_handler.get('/settings-ob_{}'.format(connection_uuid)): + is_opticalband=True + settings = self.__settings_handler.get('/settings-ob_{}'.format(connection_uuid)) + else: + settings = self.__settings_handler.get('/settings') + + + # settings = self.__settings_handler.get('/settings') + + #flow is the new variable that stores input-output relationship + + flows = convert_endpoints_to_flows(endpoints) + #handled_flows=handle_flows_names(flows=flows,task_executor=self.__task_executor) + + #LOGGER.info("Handled Flows %s",handled_flows) + + results = [] + #new cycle for setting optical devices + for device_uuid in flows.keys(): + try: + dev_flows = flows[device_uuid] + device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + + + if (settings): + + self.__task_executor.configure_optical_device(device_obj, settings, dev_flows, is_opticalband) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to configure Device({:s})'.format(str(device_uuid))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + + service_uuid = self.__service.service_id.service_uuid.uuid + settings = self.__settings_handler.get('/settings') + + results = [] + for endpoint in endpoints: + try: + device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) + + device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + endpoint_obj = get_endpoint_matching(device_obj, endpoint_uuid) + endpoint_settings = self.__settings_handler.get_endpoint_settings(device_obj, endpoint_obj) + endpoint_name = endpoint_obj.name + + json_config_rules = teardown_config_rules( + service_uuid, connection_uuid, device_uuid, endpoint_uuid, endpoint_name, + settings, endpoint_settings) + + if len(json_config_rules) > 0: + del device_obj.device_config.config_rules[:] + for json_config_rule in json_config_rules: + device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(device_obj) + + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteEndpoint({:s})'.format(str(endpoint))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def SetConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[SetConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + @metered_subclass_method(METRICS_POOL) + def DeleteConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[DeleteConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + resource_value = json.loads(resource[1]) + self.__settings_handler.set(resource[0], resource_value) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetConfig({:s})'.format(str(resource))) + results.append(e) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + self.__settings_handler.delete(resource[0]) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteConfig({:s})'.format(str(resource))) + results.append(e) + + return results diff --git a/src/service/service/service_handlers/oc/OCTools.py b/src/service/service/service_handlers/oc/OCTools.py new file mode 100644 index 0000000000000000000000000000000000000000..7b6c344ede5512f32098fd019076ae57fe87028e --- /dev/null +++ b/src/service/service/service_handlers/oc/OCTools.py @@ -0,0 +1,142 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching +from typing import Dict, Any, List, Optional, Tuple +import logging +from common.proto.context_pb2 import ConfigRule, DeviceId, Service +from common.tools.object_factory.Device import json_device_id + +log = logging.getLogger(__name__) + +#def convert_endpoints_to_flows(endpoints : List[Tuple[str, str, Optional[str]]])->Dict[str: List[Tuple[str, str]]]: + +def convert_endpoints_to_flows(endpoints : List[Tuple[str, str, Optional[str]]])->Dict: + #entries = List[Tuple[str, str, str, Optional[str]]] + #entries = Dict[str: List[Tuple[str, str]]] + entries = {} + #tuple is in, out + #end = len(endpoints) if isinstance(endpoints,list) else 0 + end = len(endpoints) + i = 0 + bidir = 0 + log.debug("end={}".format(end)) + while(i < end): + endpoint = endpoints[i] + device_uuid, endpoint_uuid = endpoint[0:2] + log.debug("current OCTools step {}, {}, {}".format(i, device_uuid, endpoint_uuid)) + if device_uuid not in entries.keys(): + entries[device_uuid] = [] + if i == 0: + entry_tuple = "0", endpoint_uuid + entries[device_uuid].append(entry_tuple) + next_endpoint = endpoints[i+1] + next_device_uuid, next_endpoint_uuid = next_endpoint[0:2] + if next_device_uuid == device_uuid: + bidir = 1 + log.debug("connection is bidirectional") + entry_tuple = next_endpoint_uuid, "0" + entries[device_uuid].append(entry_tuple) + i = i + 1 + else: + log.debug("connection is unidirectional") + else: + if not bidir: + if i == end-1: + #is the last node + entry_tuple = endpoint_uuid, "0" + entries[device_uuid].append(entry_tuple) + else: + #it is a transit node + next_endpoint = endpoints[i+1] + next_device_uuid, next_endpoint_uuid = next_endpoint[0:2] + if next_device_uuid == device_uuid: + entry_tuple = endpoint_uuid, next_endpoint_uuid + entries[device_uuid].append(entry_tuple) + i = i + 1 + log.debug("current OCTools step {}, {}, {}".format(i, next_device_uuid, device_uuid)) + else: + log.debug("ERROR in unidirectional connection 4") + return {} + if bidir: + log.debug("Ocheck i {}, {}, {}".format(i, i+1, end-1)) + if i + 1 == end-1: + log.debug("current OCTools step {}, {}, {}".format(i, device_uuid, endpoint_uuid)) + #is the last node + entry_tuple = endpoint_uuid, "0" + entries[device_uuid].append(entry_tuple) + next_endpoint = endpoints[i+1] + log.debug("OCTools i+1 step {}, {}, {}".format(i+1, next_device_uuid, device_uuid)) + + next_device_uuid, next_endpoint_uuid = next_endpoint[0:2] + if next_device_uuid == device_uuid: + entry_tuple = "0", next_endpoint_uuid + entries[device_uuid].append(entry_tuple) + i = i + 1 + else: + log.debug("ERROR in bidirectional connection 2") + return entries + else: + log.debug("OCTools i+1+2+3 step {}, {}, {}".format(i+1, next_device_uuid, device_uuid)) + #i+1 + next_endpoint = endpoints[i+1] + next_device_uuid, next_endpoint_uuid = next_endpoint[0:2] + if next_device_uuid == device_uuid: + entry_tuple = endpoint_uuid, next_endpoint_uuid + entries[device_uuid].append(entry_tuple) + else: + log.debug("ERROR in bidirectional connection 3") + log.debug("{}, {}, {}".format(i, next_device_uuid, device_uuid)) + return entries + #i+2 + next_2_endpoint = endpoints[i+2] + next_2_device_uuid, next_2_endpoint_uuid = next_2_endpoint[0:2] + #i+3 + next_3_endpoint = endpoints[i+3] + next_3_device_uuid, next_3_endpoint_uuid = next_3_endpoint[0:2] + if next_2_device_uuid == next_3_device_uuid and next_3_device_uuid == device_uuid: + entry_tuple = next_2_endpoint_uuid, next_3_endpoint_uuid + entries[device_uuid].append(entry_tuple) + i = i + 3 + else: + log.debug("ERROR in bidirection connection 4") + return {} + i = i + 1 + return entries + + +def get_device_endpint_name (endpoint_uuid:str,device_uuid:str,task_executor)->Tuple: + device_obj = task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + endpoint_obj = get_endpoint_matching(device_obj, endpoint_uuid) + endpoint_name = endpoint_obj.name + return (device_obj.name, endpoint_name) + +def handle_flows_names (task_executor,flows:dict)->Dict : + new_flows={} + for index,( device_uuid_key , device_endpoints_list) in enumerate(flows.items()): + for endpoint_tupple in device_endpoints_list: + source_port=None + destination_port=None + device_name="" + source_endpoint,destination_endpoint =endpoint_tupple + if (source_endpoint !='0'): + if get_device_endpint_name(source_endpoint,device_uuid_key,task_executor) is not None: + device_name,source_port=get_device_endpint_name(source_endpoint,device_uuid_key,task_executor) + if (destination_endpoint !='0'): + if get_device_endpint_name(destination_endpoint,device_uuid_key,task_executor) is not None: + device_name,destination_port=get_device_endpint_name(destination_endpoint,device_uuid_key,task_executor) + if (device_name not in new_flows): + new_flows[device_name]=[] + new_flows[device_name].append((source_port,destination_port)) + return new_flows diff --git a/src/service/service/service_handlers/oc/__init__.py b/src/service/service/service_handlers/oc/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/service/service/service_handlers/oc/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/service/service/service_handlers/p4/__init__.py b/src/service/service/service_handlers/p4/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/service/service/service_handlers/p4/__init__.py +++ b/src/service/service/service_handlers/p4/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/p4/p4_service_handler.py b/src/service/service/service_handlers/p4/p4_service_handler.py index 41cfcc5952601a16a13cd691f2e424017936aaa3..9347f2058f39b5f615ac409acb10f4cf90595171 100644 --- a/src/service/service/service_handlers/p4/p4_service_handler.py +++ b/src/service/service/service_handlers/p4/p4_service_handler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py b/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py index af7d4bc949fc98f057ade66b58d8b9b38e0707ed..8c2739ebc810dac97af5a8bd49f82a13d57ae098 100644 --- a/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py +++ b/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/tapi_tapi/__init__.py b/src/service/service/service_handlers/tapi_tapi/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/service_handlers/tapi_tapi/__init__.py +++ b/src/service/service/service_handlers/tapi_tapi/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/tapi_xr/TapiXrServiceHandler.py b/src/service/service/service_handlers/tapi_xr/TapiXrServiceHandler.py index a79ebb82d6cb57967e96b70e0144fd410f8666b0..343033c3900fed198a99ce0d0a4dad439ca937d8 100644 --- a/src/service/service/service_handlers/tapi_xr/TapiXrServiceHandler.py +++ b/src/service/service/service_handlers/tapi_xr/TapiXrServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/service_handlers/tapi_xr/__init__.py b/src/service/service/service_handlers/tapi_xr/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/service_handlers/tapi_xr/__init__.py +++ b/src/service/service/service_handlers/tapi_xr/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/task_scheduler/ConnectionExpander.py b/src/service/service/task_scheduler/ConnectionExpander.py index fa51c36ce4bf9dd9f1dd465e07e804b068ebae57..332007233e16aeab3c3493be4263f57b7cee9073 100644 --- a/src/service/service/task_scheduler/ConnectionExpander.py +++ b/src/service/service/task_scheduler/ConnectionExpander.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/task_scheduler/TaskExecutor.py b/src/service/service/task_scheduler/TaskExecutor.py index ae0f1be7da291a5dc025641cb606f7a7706059ca..cd20faad23a06678be39dbacc476a0ea25d4d540 100644 --- a/src/service/service/task_scheduler/TaskExecutor.py +++ b/src/service/service/task_scheduler/TaskExecutor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,11 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging #, json +import json, logging from enum import Enum from typing import TYPE_CHECKING, Any, Dict, Optional, Union from common.method_wrappers.ServiceExceptions import NotFoundException -from common.proto.context_pb2 import Connection, ConnectionId, Device, DeviceDriverEnum, DeviceId, Service, ServiceId +from common.proto.context_pb2 import ( + Connection, ConnectionId, Device, DeviceDriverEnum, DeviceId, Service, ServiceId, + OpticalConfig, OpticalConfigId +) 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 @@ -25,7 +28,8 @@ from common.tools.object_factory.Device import json_device_id from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from service.service.service_handler_api.Exceptions import ( - UnsatisfiedFilterException, UnsupportedFilterFieldException, UnsupportedFilterFieldValueException) + 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 @@ -111,6 +115,28 @@ class TaskExecutor: device_key = get_device_key(device.device_id) self._device_client.ConfigureDevice(device) self._store_grpc_object(CacheableObjectType.DEVICE, device_key, device) + + # New function Andrea for Optical Devices + def configure_optical_device(self, device : Device, settings : str, flows : list, is_opticalband : bool): + device_key = get_device_key(device.device_id) + optical_config_id = OpticalConfigId() + optical_config_id.opticalconfig_uuid = device.device_id.device_uuid.uuid + optical_config = OpticalConfig() + setting = settings.value if settings else '' + + try: + result = self._context_client.SelectOpticalConfig(optical_config_id) + if result is not None: + new_config = json.loads(result.config) + new_config["new_config"] = setting + new_config["is_opticalband"] = is_opticalband + new_config["flow"] = flows + result.config = json.dumps(new_config) + optical_config.CopyFrom(result) + self._device_client.ConfigureOpticalDevice(optical_config) + self._store_grpc_object(CacheableObjectType.DEVICE, device_key, device) + except Exception as e: + LOGGER.info("error in config my config %s",e) def get_device_controller(self, device : Device) -> Optional[Device]: #json_controller = None diff --git a/src/service/service/task_scheduler/TaskScheduler.py b/src/service/service/task_scheduler/TaskScheduler.py index fceed36e92771394dff9e9f45ef928a0175b8d32..b492b4581b05cb34bed624efd9be2d4f62da5856 100644 --- a/src/service/service/task_scheduler/TaskScheduler.py +++ b/src/service/service/task_scheduler/TaskScheduler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/task_scheduler/__init__.py b/src/service/service/task_scheduler/__init__.py index 9d49eb5e732045445c7e63944bf79229da3c3bcd..25bef274026ede05ad28f4f65a113dd9c0abfcb6 100644 --- a/src/service/service/task_scheduler/__init__.py +++ b/src/service/service/task_scheduler/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py b/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py index 4367ffdee4d6d5b9edfc9fd30d0d6b6f48da8a75..f6c543c1ccb947eb01c3d5f5fb93c0504a77ca95 100644 --- a/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py +++ b/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py b/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py index 70f41566ef5e69605a527cc0392b77acb866ec2c..7b6b7951befbd6abd4d052ce5eec39d3398aa6e7 100644 --- a/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py +++ b/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/task_scheduler/tasks/Task_ServiceDelete.py b/src/service/service/task_scheduler/tasks/Task_ServiceDelete.py index 0f021b6ca65da1c6b5e44d8577bf9dd6875eb17a..20928f1771d26f810f59ef84a9d1e5471512542b 100644 --- a/src/service/service/task_scheduler/tasks/Task_ServiceDelete.py +++ b/src/service/service/task_scheduler/tasks/Task_ServiceDelete.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/task_scheduler/tasks/Task_ServiceSetStatus.py b/src/service/service/task_scheduler/tasks/Task_ServiceSetStatus.py index d5360fe85eae68085298406fc0ed19dd105f187e..7da277b2f0bb1af6acb062017f9d3b7a0d9d1f76 100644 --- a/src/service/service/task_scheduler/tasks/Task_ServiceSetStatus.py +++ b/src/service/service/task_scheduler/tasks/Task_ServiceSetStatus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/task_scheduler/tasks/_Task.py b/src/service/service/task_scheduler/tasks/_Task.py index c2dbcdf659b05ab082eb76aa1fe8f4b46394ed83..2a7738f5acad1c9bb69df06a268ea23d1ee09a53 100644 --- a/src/service/service/task_scheduler/tasks/_Task.py +++ b/src/service/service/task_scheduler/tasks/_Task.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/task_scheduler/tasks/__init__.py b/src/service/service/task_scheduler/tasks/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/task_scheduler/tasks/__init__.py +++ b/src/service/service/task_scheduler/tasks/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/tools/ConnectionToString.py b/src/service/service/tools/ConnectionToString.py index 1c189e00ff9004dc0929f58a02560e8bea69fa91..edc20b12035ac95779e6f4628b4dbe32a95b806d 100644 --- a/src/service/service/tools/ConnectionToString.py +++ b/src/service/service/tools/ConnectionToString.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/tools/EndpointIdFormatters.py b/src/service/service/tools/EndpointIdFormatters.py index ff1d5081671109d6c09cd46166d50585317789ec..88608377b4dd80f771974bb883165bffc595e882 100644 --- a/src/service/service/tools/EndpointIdFormatters.py +++ b/src/service/service/tools/EndpointIdFormatters.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/tools/GeodesicDistance.py b/src/service/service/tools/GeodesicDistance.py index b66d336f0f617aa834905785e2e49f95073a2df9..e337673d399d36f6703d173e3c262927a6d38bce 100644 --- a/src/service/service/tools/GeodesicDistance.py +++ b/src/service/service/tools/GeodesicDistance.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/tools/ObjectKeys.py b/src/service/service/tools/ObjectKeys.py index 14c4cdf3ad661df0aa8f22599a294fe50db4a1a9..f45126e07df6a74a20e507fd51d08f1a32de7f98 100644 --- a/src/service/service/tools/ObjectKeys.py +++ b/src/service/service/tools/ObjectKeys.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/tools/OpticalTools.py b/src/service/service/tools/OpticalTools.py new file mode 100644 index 0000000000000000000000000000000000000000..ca73dce480a46369b47ce4c6baed516168b24817 --- /dev/null +++ b/src/service/service/tools/OpticalTools.py @@ -0,0 +1,324 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 functools, json, logging, requests, uuid +from typing import List +from common.Constants import ServiceNameEnum +from common.proto.context_pb2 import( + Device, DeviceId, Service, Connection, EndPointId, TopologyId, ContextId, Uuid, + ConfigRule, ConfigActionEnum, ConfigRule_Custom +) +from common.proto.pathcomp_pb2 import PathCompReply +from common.Settings import ( + ENVVAR_SUFIX_SERVICE_BASEURL_HTTP, ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, + find_environment_variables, get_env_var_name +) +from service.service.tools.replies import ( + reply_uni_txt, optical_band_uni_txt, reply_bid_txt, optical_band_bid_txt +) + +log = logging.getLogger(__name__) + +TESTING = False + +get_optical_controller_setting = functools.partial(get_env_var_name, ServiceNameEnum.OPTICALCONTROLLER) +VAR_NAME_OPTICAL_CTRL_BASEURL_HTTP = get_optical_controller_setting(ENVVAR_SUFIX_SERVICE_BASEURL_HTTP) +VAR_NAME_OPTICAL_CTRL_SCHEMA = get_optical_controller_setting('SCHEMA') +VAR_NAME_OPTICAL_CTRL_HOST = get_optical_controller_setting(ENVVAR_SUFIX_SERVICE_HOST) +VAR_NAME_OPTICAL_CTRL_PORT = get_optical_controller_setting(ENVVAR_SUFIX_SERVICE_PORT_GRPC) + +OPTICAL_CTRL_BASE_URL = '{:s}://{:s}:{:d}/OpticalTFS' + +def get_optical_controller_base_url() -> str: + settings = find_environment_variables([ + VAR_NAME_OPTICAL_CTRL_BASEURL_HTTP, + VAR_NAME_OPTICAL_CTRL_SCHEMA, + VAR_NAME_OPTICAL_CTRL_HOST, + VAR_NAME_OPTICAL_CTRL_PORT, + ]) + base_url = settings.get(VAR_NAME_OPTICAL_CTRL_BASEURL_HTTP) + if base_url is not None: + log.debug('Optical Controller: base_url={:s}'.format(str(base_url))) + return base_url + + host = settings.get(VAR_NAME_OPTICAL_CTRL_HOST) + port = int(settings.get(VAR_NAME_OPTICAL_CTRL_PORT, 80)) + + MSG = 'Optical Controller not found: settings={:s}' + if host is None: raise Exception(MSG.format(str(settings))) + if port is None: raise Exception(MSG.format(str(settings))) + + schema = settings.get(VAR_NAME_OPTICAL_CTRL_SCHEMA, 'http') + base_url = OPTICAL_CTRL_BASE_URL.format(schema, host, port) + log.debug('Optical Controller: base_url={:s}'.format(str(base_url))) + return base_url + + +def get_uuids_from_names(devices: List[Device], device_name: str, port_name: str): + device_uuid = "" + port_uuid = "" + for device in devices: + if device.name == device_name: + device_uuid = device.device_id.device_uuid.uuid + for ep in device.device_endpoints: + if ep.name == port_name: + port_uuid = ep.endpoint_id.endpoint_uuid.uuid + return device_uuid, port_uuid + return "", "" + + +def get_names_from_uuids(devices: List[Device], device_uuid: str, port_uuid: str): + device_name = "" + port_name = "" + for device in devices: + if device.device_id.device_uuid.uuid == device_uuid: + device_name = device.name + for ep in device.device_endpoints: + if ep.endpoint_id.endpoint_uuid.uuid == port_uuid: + port_name = ep.name + return device_name, port_name + return "", "" + +def get_device_name_from_uuid(devices: List[Device], device_uuid: str): + device_name = "" + + for device in devices: + if device.device_id.device_uuid.uuid == device_uuid: + device_name = device.name + return device_name + return "" + + +def add_lightpath(src, dst, bitrate, bidir, ob_band) -> str: + if not TESTING: + urlx = "" + headers = {"Content-Type": "application/json"} + base_url = get_optical_controller_base_url() + if ob_band is None: + if bidir is None: + bidir = 1 + urlx = "{:s}/AddFlexLightpath/{:s}/{:s}/{:s}/{:s}".format(base_url, src, dst, str(bitrate), str(bidir)) + else: + if bidir is None: + bidir = 1 + urlx = "{:s}/AddFlexLightpath/{:s}/{:s}/{:s}/{:s}/{:s}".format(base_url, src, dst, str(bitrate), str(bidir), str(ob_band)) + r = requests.put(urlx, headers=headers) + reply = r.text + return reply + else: + if bidir is not None: + if bidir == 0: + return reply_uni_txt + return reply_bid_txt + + +def get_optical_band(idx) -> str: + if not TESTING: + base_url = get_optical_controller_base_url() + urlx = "{:s}/GetOpticalBand/{:s}".format(base_url, str(idx)) + headers = {"Content-Type": "application/json"} + r = requests.get(urlx, headers=headers) + reply = r.text + return reply + else: + if str(idx) == "1": + return optical_band_bid_txt + else: + return optical_band_uni_txt + + +def delete_lightpath(flow_id, src, dst, bitrate) -> str: + reply = "200" + if not TESTING: + base_url = get_optical_controller_base_url() + urlx = "{:s}/DelLightpath/{:s}/{:s}/{:s}/{:s}".format(base_url, str(flow_id), src, dst, str(bitrate)) + + headers = {"Content-Type": "application/json"} + r = requests.delete(urlx, headers=headers) + reply = r.text + return reply + + +def get_lightpaths() -> str: + base_url = get_optical_controller_base_url() + urlx = "{:s}/GetLightpaths".format(base_url) + + headers = {"Content-Type": "application/json"} + r = requests.get(urlx, headers=headers) + reply = r.text + return reply + + +def adapt_reply(devices, service, reply_json, context_id, topology_id, optical_band_txt) -> PathCompReply: + opt_reply = PathCompReply() + topo = TopologyId(context_id=ContextId(context_uuid=Uuid(uuid=context_id)),topology_uuid=Uuid(uuid=topology_id)) + #add optical band connection first + rules_ob= [] + ob_id = 0 + connection_ob=None + if optical_band_txt != "": + ob_json = json.loads(optical_band_txt) + ob = ob_json + connection_ob = add_connection_to_reply(opt_reply) + uuuid_x = str(uuid.uuid4()) + connection_ob.connection_id.connection_uuid.uuid = uuuid_x + connection_ob.service_id.CopyFrom(service.service_id) + + ob_id = ob["optical_band_id"] + obt = ob["band_type"] + if obt == "l_slots": + band_type = "L_BAND" + elif obt == "s_slots": + band_type = "S_BAND" + else: + band_type = "C_BAND" + + freq = ob["freq"] + bx = ob["band"] + lf = int(int(freq)-int(bx/2)) + uf = int(int(freq)+int(bx/2)) + val_ob = {"band_type": band_type, "low-freq": lf, "up-freq": uf, "frequency": freq, "band": bx, "ob_id": ob_id} + rules_ob.append(ConfigRule_Custom(resource_key="/settings-ob_{}".format(uuuid_x), resource_value=json.dumps(val_ob))) + bidir_ob = ob["bidir"] + for devxb in ob["flows"].keys(): + log.debug("optical-band device {}".format(devxb)) + in_end_point_b = "0" + out_end_point_b = "0" + in_end_point_f = ob["flows"][devxb]["f"]["in"] + out_end_point_f = ob["flows"][devxb]["f"]["out"] + log.debug("optical-band ports {}, {}".format(in_end_point_f, out_end_point_f)) + if bidir_ob: + in_end_point_b = ob["flows"][devxb]["b"]["in"] + out_end_point_b = ob["flows"][devxb]["b"]["out"] + log.debug("optical-band ports {}, {}".format(in_end_point_b, out_end_point_b)) + #if (in_end_point_f == "0" or out_end_point_f == "0") and (in_end_point_b == "0" or out_end_point_b == "0"): + if in_end_point_f != "0": + d_ob, p_ob = get_uuids_from_names(devices, devxb, in_end_point_f) + if d_ob != "" and p_ob != "": + end_point_b = EndPointId(topology_id=topo, device_id=DeviceId(device_uuid=Uuid(uuid=d_ob)), endpoint_uuid=Uuid(uuid=p_ob)) + connection_ob.path_hops_endpoint_ids.add().CopyFrom(end_point_b) + else: + log.info("no map device port for device {} port {}".format(devxb, in_end_point_f)) + + if out_end_point_f != "0": + d_ob, p_ob = get_uuids_from_names(devices, devxb, out_end_point_f) + if d_ob != "" and p_ob != "": + end_point_b = EndPointId(topology_id=topo, device_id=DeviceId(device_uuid=Uuid(uuid=d_ob)), endpoint_uuid=Uuid(uuid=p_ob)) + connection_ob.path_hops_endpoint_ids.add().CopyFrom(end_point_b) + else: + log.info("no map device port for device {} port {}".format(devxb, out_end_point_f)) + if in_end_point_b != "0": + d_ob, p_ob = get_uuids_from_names(devices, devxb, in_end_point_b) + if d_ob != "" and p_ob != "": + end_point_b = EndPointId(topology_id=topo, device_id=DeviceId(device_uuid=Uuid(uuid=d_ob)), endpoint_uuid=Uuid(uuid=p_ob)) + connection_ob.path_hops_endpoint_ids.add().CopyFrom(end_point_b) + else: + log.info("no map device port for device {} port {}".format(devxb, in_end_point_b)) + if out_end_point_b != "0": + d_ob, p_ob = get_uuids_from_names(devices, devxb, out_end_point_b) + if d_ob != "" and p_ob != "": + end_point_b = EndPointId(topology_id=topo, device_id=DeviceId(device_uuid=Uuid(uuid=d_ob)), endpoint_uuid=Uuid(uuid=p_ob)) + connection_ob.path_hops_endpoint_ids.add().CopyFrom(end_point_b) + else: + log.info("no map device port for device {} port {}".format(devxb, out_end_point_b)) + log.debug("optical-band connection {}".format(connection_ob)) + r = reply_json + bidir_f = r["bidir"] + connection_f = add_connection_to_reply(opt_reply) + connection_f.connection_id.connection_uuid.uuid = str(uuid.uuid4()) + connection_f.service_id.CopyFrom(service.service_id) + for devx in r["flows"].keys(): + log.debug("lightpath device {}".format(devx)) + in_end_point_b = "0" + out_end_point_b = "0" + + in_end_point_f = r["flows"][devx]["f"]["in"] + out_end_point_f = r["flows"][devx]["f"]["out"] + log.debug("lightpath ports {}, {}".format(in_end_point_f, out_end_point_f)) + if bidir_f: + in_end_point_b = r["flows"][devx]["b"]["in"] + out_end_point_b = r["flows"][devx]["b"]["out"] + log.debug("lightpath ports {}, {}".format(in_end_point_b, out_end_point_b)) + if in_end_point_f != "0": + d, p = get_uuids_from_names(devices, devx, in_end_point_f) + if d != "" and p != "": + end_point = EndPointId(topology_id=topo, device_id=DeviceId(device_uuid=Uuid(uuid=d)), endpoint_uuid=Uuid(uuid=p)) + connection_f.path_hops_endpoint_ids.add().CopyFrom(end_point) + else: + log.info("no map device port for device {} port {}".format(devx, in_end_point_f)) + if out_end_point_f != "0": + d, p = get_uuids_from_names(devices, devx, out_end_point_f) + if d != "" and p != "": + end_point = EndPointId(topology_id=topo, device_id=DeviceId(device_uuid=Uuid(uuid=d)), endpoint_uuid=Uuid(uuid=p)) + connection_f.path_hops_endpoint_ids.add().CopyFrom(end_point) + else: + log.info("no map device port for device {} port {}".format(devx, out_end_point_f)) + if in_end_point_b != "0": + d, p = get_uuids_from_names(devices, devx, in_end_point_b) + if d != "" and p != "": + end_point = EndPointId(topology_id=topo, device_id=DeviceId(device_uuid=Uuid(uuid=d)), endpoint_uuid=Uuid(uuid=p)) + connection_f.path_hops_endpoint_ids.add().CopyFrom(end_point) + else: + log.info("no map device port for device {} port {}".format(devx, in_end_point_b)) + if out_end_point_b != "0": + d, p = get_uuids_from_names(devices, devx, out_end_point_b) + if d != "" and p != "": + end_point = EndPointId(topology_id=topo, device_id=DeviceId(device_uuid=Uuid(uuid=d)), endpoint_uuid=Uuid(uuid=p)) + connection_f.path_hops_endpoint_ids.add().CopyFrom(end_point) + else: + log.info("no map device port for device {} port {}".format(devx, out_end_point_b)) + #check that list of endpoints is not empty + if connection_ob is not None and len(connection_ob.path_hops_endpoint_ids) == 0: + log.debug("deleting empty optical-band connection") + opt_reply.connections.remove(connection_ob) + + #inizialize custom optical parameters + band = r["band"] if "band" in r else None + op_mode = r["op-mode"] if "op-mode" in r else None + frequency = r["freq"] if "freq" in r else None + flow_id = r["flow_id"] if "flow_id" in r else None + r_type = r["band_type"] if "band_type" in r else None + if r_type == "l_slots": + band_type = "L_BAND" + elif r_type == "s_slots": + band_type = "S_BAND" + else: + band_type = "C_BAND" + + if ob_id != 0: + val = {"frequency": frequency, "operational-mode": op_mode, "band": band, "flow_id": flow_id, "ob_id": ob_id, "band_type": band_type,} + else: + val = {"frequency": frequency, "operational-mode": op_mode, "band": band, "flow_id": flow_id, "band_type": band_type,} + custom_rule = ConfigRule_Custom(resource_key="/settings", resource_value=json.dumps(val)) + rule = ConfigRule(action=ConfigActionEnum.CONFIGACTION_SET, custom=custom_rule) + service.service_config.config_rules.add().CopyFrom(rule) + + if len(rules_ob) > 0: + for rulex in rules_ob: + rule_ob = ConfigRule(action=ConfigActionEnum.CONFIGACTION_SET, custom=rulex) + service.service_config.config_rules.add().CopyFrom(rule_ob) + + opt_reply.services.add().CopyFrom(service) + + return opt_reply + +def add_service_to_reply(reply : PathCompReply, service : Service)-> Service: + service_x = reply.services.add() + service_x.CopyFrom(service) + return service_x + +def add_connection_to_reply(reply : PathCompReply)-> Connection: + conn = reply.connections.add() + return conn diff --git a/src/service/service/tools/__init__.py b/src/service/service/tools/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/service/tools/__init__.py +++ b/src/service/service/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/service/tools/replies.py b/src/service/service/tools/replies.py new file mode 100644 index 0000000000000000000000000000000000000000..ccaaa221f56103552c6f2114841b846497006529 --- /dev/null +++ b/src/service/service/tools/replies.py @@ -0,0 +1,321 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +reply_bid_txt = """ +{ + "flow_id": 1, + "src": "T1", + "dst": "T2", + "bitrate": 100, + "bidir": 1, + "flows": { + "T1": { + "f": { + "in": "0", + "out": "1" + }, + "b": { + "in": "1", + "out": "0" + } + }, + "R1": { + "f": { + "in": "12", + "out": "3" + }, + "b": { + "in": "13", + "out": "2" + } + }, + "R2": { + "f": { + "in": "14", + "out": "5" + }, + "b": { + "in": "15", + "out": "4" + } + }, + "T2": { + "f": { + "in": "6", + "out": "0" + }, + "b": { + "in": "0", + "out": "6" + } + } + }, + "band_type": "c_slots", + "slots": [ + 1, + 2, + 3, + 4 + ], + "fiber_forward": { + "T1-R1": "M1", + "R2-T2": "S1" + }, + "fiber_backward": { + "R1-T1": "S1", + "T2-R2": "M1" + }, + "op-mode": 1, + "n_slots": 4, + "links": [ + "T1-R1", + "R2-T2" + ], + "path": [ + "R1", + "R2" + ], + "band": 50000, + "freq": 192031250, + "is_active": true, + "parent_opt_band": 1, + "new_optical_band": 1 +} + """ + +optical_band_bid_txt = """ +{ + "optical_band_id": 1, + "bidir": 1, + "src": "R1", + "dst": "R2", + "flows": { + "R1": { + "f": { + "in": "0", + "out": "3" + }, + "b": { + "in": "13", + "out": "0" + } + }, + "R2": { + "f": { + "in": "14", + "out": "0" + }, + "b": { + "in": "0", + "out": "4" + } + } + }, + "band_type": "c_slots", + "fiber_forward": { + "R1-R2": "d1-1" + }, + "fiber_backward": { + "R2-R1": "d1-1" + }, + "op-mode": 0, + "n_slots": 16, + "links": [ + "R1-R2" + ], + "path": [ + "R1", + "R2" + ], + "band": 200000, + "freq": 192106250, + "is_active": true, + "src_port": "101", + "dst_port": "201", + "rev_dst_port": "201", + "rev_src_port": "101", + "c_slots": [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 + ], + "served_lightpaths": [ + 1 + ] +} + """ + +reply_uni_txt = """ +{ + "flow_id": 2, + "src": "T1", + "dst": "T2", + "bitrate": 100, + "bidir": 0, + "flows": { + "T1": { + "f": { + "in": "0", + "out": "1" + }, + "b": { + "in": "1", + "out": "0" + } + }, + "R1": { + "f": { + "in": "12", + "out": "3" + }, + "b": { + "in": "13", + "out": "2" + } + }, + "R2": { + "f": { + "in": "14", + "out": "5" + }, + "b": { + "in": "15", + "out": "4" + } + }, + "T2": { + "f": { + "in": "6", + "out": "0" + }, + "b": { + "in": "0", + "out": "6" + } + } + }, + "band_type": "c_slots", + "slots": [ + 1, + 2, + 3, + 4 + ], + "fiber_forward": { + "T1-R1": "M1", + "R2-T2": "S1" + }, + "fiber_backward": { + "R1-T1": "S1", + "T2-R2": "M1" + }, + "op-mode": 1, + "n_slots": 4, + "links": [ + "T1-R1", + "R2-T2" + ], + "path": [ + "R1", + "R2" + ], + "band": 50000, + "freq": 192031250, + "is_active": true, + "parent_opt_band": 2, + "new_optical_band": 1 +} + """ + +optical_band_uni_txt = """ +{ + "optical_band_id": 2, + "bidir": 0, + "src": "R1", + "dst": "R2", + "flows": { + "R1": { + "f": { + "in": "0", + "out": "3" + }, + "b": { + "in": "13", + "out": "0" + } + }, + "R2": { + "f": { + "in": "14", + "out": "0" + }, + "b": { + "in": "0", + "out": "4" + } + } + }, + "band_type": "c_slots", + "fiber_forward": { + "R1-R2": "d1-1" + }, + "fiber_backward": { + "R2-R1": "d1-1" + }, + "op-mode": 0, + "n_slots": 16, + "links": [ + "R1-R2" + ], + "path": [ + "R1", + "R2" + ], + "band": 200000, + "freq": 192106250, + "is_active": true, + "src_port": "101", + "dst_port": "201", + "rev_dst_port": "201", + "rev_src_port": "101", + "c_slots": [ + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 + ], + "served_lightpaths": [ + 2 + ] +} + """ + diff --git a/src/service/tests/CommonObjects.py b/src/service/tests/CommonObjects.py index 4cd233349ae4f0e7b39b5597fdbd6ff9d00e5189..8de29010fa1af652eacf2737241ad55cbd74f1cc 100644 --- a/src/service/tests/CommonObjects.py +++ b/src/service/tests/CommonObjects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/tests/MockService_Dependencies.py b/src/service/tests/MockService_Dependencies.py index eb3059d5a28f3686861a1fad3de03f97d502545f..7563e61771a5fbdbb057b3c56750ed9204d7608b 100644 --- a/src/service/tests/MockService_Dependencies.py +++ b/src/service/tests/MockService_Dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/tests/PrepareTestScenario.py b/src/service/tests/PrepareTestScenario.py index 6397d95495d4e06cbb6fa2d055a293cfac0bf48f..680d368d7dd8bc873f7b41484e1533bb40bcf607 100644 --- a/src/service/tests/PrepareTestScenario.py +++ b/src/service/tests/PrepareTestScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/tests/ServiceHandler_L3NM_EMU.py b/src/service/tests/ServiceHandler_L3NM_EMU.py index 2f58aabd987eb391c195fb1f170959178ba40be6..65981b07c831281b30717d42e2f4f1b1a226759b 100644 --- a/src/service/tests/ServiceHandler_L3NM_EMU.py +++ b/src/service/tests/ServiceHandler_L3NM_EMU.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/tests/ServiceHandler_L3NM_OC.py b/src/service/tests/ServiceHandler_L3NM_OC.py index 2dcf089e0263d77203adfc45e5d06dbe54727347..3003c6c2a82009c772b89e783341993524e3f0e6 100644 --- a/src/service/tests/ServiceHandler_L3NM_OC.py +++ b/src/service/tests/ServiceHandler_L3NM_OC.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/tests/ServiceHandlersToTest.py b/src/service/tests/ServiceHandlersToTest.py index 9b45cad7b9def99a5285f4a249af5cd608a91770..729a7308d93fcbd07a4e1dc8d0842bf87c0732e3 100644 --- a/src/service/tests/ServiceHandlersToTest.py +++ b/src/service/tests/ServiceHandlersToTest.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/tests/__init__.py b/src/service/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/service/tests/__init__.py +++ b/src/service/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/tests/test_service_recompute_cons.sh b/src/service/tests/test_service_recompute_cons.sh index e5bc18895b2968ba99b7262458ed988e57ee920c..db3f74a9afb1b85a7cedb4d7163b2c80aa67c291 100644 --- a/src/service/tests/test_service_recompute_cons.sh +++ b/src/service/tests/test_service_recompute_cons.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/tests/test_unitary.py b/src/service/tests/test_unitary.py index 366add517994c255abd29056f2ab523de3752a37..c4155751023b13039ce06a7c23f58987c253b183 100644 --- a/src/service/tests/test_unitary.py +++ b/src/service/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/tests/test_unitary_recompute_conns.py b/src/service/tests/test_unitary_recompute_conns.py index 717e3af73b0d21d1dfeeab1e388c5df663417337..5b15fe7fe00470008906aeb484d05f5b72163d3e 100644 --- a/src/service/tests/test_unitary_recompute_conns.py +++ b/src/service/tests/test_unitary_recompute_conns.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/service/tests/test_unitary_task_scheduler.py b/src/service/tests/test_unitary_task_scheduler.py index cd77934f6681b0e50c2ddba4b529e4a662b1b63f..90cdbd15e32f2760fcced0cf9818d56ea442ef12 100644 --- a/src/service/tests/test_unitary_task_scheduler.py +++ b/src/service/tests/test_unitary_task_scheduler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/.gitlab-ci.yml b/src/slice/.gitlab-ci.yml index 39edd20b325c60c40dafddd4dd220b2615042f60..7420ed31e37c6cd4ae2c232ea7364cd91b6c3794 100644 --- a/src/slice/.gitlab-ci.yml +++ b/src/slice/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build slice: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: @@ -38,47 +38,46 @@ build slice: - manifests/${IMAGE_NAME}service.yaml - .gitlab-ci.yml -# Apply unit test to the component -unit_test slice: - variables: - IMAGE_NAME: 'slice' # name of the microservice - IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) - stage: unit_test - needs: - - build slice - - unit_test service - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create -d bridge teraflowbridge; fi - - if docker container ls | grep $IMAGE_NAME; then docker rm -f $IMAGE_NAME; else echo "$IMAGE_NAME image is not in the system"; fi - script: - - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" - - docker run --name $IMAGE_NAME -d -p 4040:4040 -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - - sleep 5 - - docker ps -a - - docker logs $IMAGE_NAME - - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/opt/results/${IMAGE_NAME}_report.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" - coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' - after_script: - - docker rm -f $IMAGE_NAME - - docker network rm teraflowbridge - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' - - changes: - - src/common/**/*.py - - proto/*.proto - - src/$IMAGE_NAME/**/*.{py,in,yml} - - src/$IMAGE_NAME/Dockerfile - - src/$IMAGE_NAME/tests/*.py - - src/$IMAGE_NAME/tests/Dockerfile - - manifests/${IMAGE_NAME}service.yaml - - .gitlab-ci.yml - artifacts: - when: always - reports: - junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml +## Apply unit test to the component +#unit_test slice: +# variables: +# IMAGE_NAME: 'slice' # name of the microservice +# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) +# stage: unit_test +# needs: +# - build slice +# 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 4040:4040 -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG +# - sleep 5 +# - docker ps -a +# - docker logs $IMAGE_NAME +# - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/opt/results/${IMAGE_NAME}_report.xml" +# - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" +# coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' +# after_script: +# - docker rm -f $IMAGE_NAME +# - docker network rm teraflowbridge +# rules: +# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' +# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' +# - changes: +# - src/common/**/*.py +# - proto/*.proto +# - src/$IMAGE_NAME/**/*.{py,in,yml} +# - src/$IMAGE_NAME/Dockerfile +# - src/$IMAGE_NAME/tests/*.py +# - src/$IMAGE_NAME/tests/Dockerfile +# - manifests/${IMAGE_NAME}service.yaml +# - .gitlab-ci.yml +# artifacts: +# when: always +# reports: +# junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml ## Deployment of the service in Kubernetes Cluster #deploy slice: diff --git a/src/slice/Config.py b/src/slice/Config.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/slice/Config.py +++ b/src/slice/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/Dockerfile b/src/slice/Dockerfile index 94d5fc040dff083407cae514ed0363b5d2ea9bb1..0107bd369b577f7e98dccc967212efcff76a7701 100644 --- a/src/slice/Dockerfile +++ b/src/slice/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -62,10 +62,15 @@ RUN python3 -m pip install -r requirements.txt # Add component files into working directory WORKDIR /var/teraflow -COPY src/context/. context/ -COPY src/interdomain/. interdomain/ -COPY src/pathcomp/. pathcomp/ -COPY src/service/. service/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/interdomain/__init__.py interdomain/__init__.py +COPY src/interdomain/client/. interdomain/client/ +COPY src/pathcomp/__init__.py pathcomp/__init__.py +COPY src/pathcomp/frontend/__init__.py pathcomp/frontend/__init__.py +COPY src/pathcomp/frontend/client/. pathcomp/frontend/client/ +COPY src/service/__init__.py service/__init__.py +COPY src/service/client/. service/client/ COPY src/slice/. slice/ # Start the service diff --git a/src/slice/__init__.py b/src/slice/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/slice/__init__.py +++ b/src/slice/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/client/SliceClient.py b/src/slice/client/SliceClient.py index 792a2037f0a7cb47d6f0c2e7969708425b57b3a6..0752501a4012cd0a2a85005376b791150a389feb 100644 --- a/src/slice/client/SliceClient.py +++ b/src/slice/client/SliceClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/client/__init__.py b/src/slice/client/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/slice/client/__init__.py +++ b/src/slice/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/old_code/ConstraintsChecker.py b/src/slice/old_code/ConstraintsChecker.py index a9e244f76a65dbf68f499096f315944db3272b33..5ca88635edd09a485fc9d2d26891564f37e4f737 100644 --- a/src/slice/old_code/ConstraintsChecker.py +++ b/src/slice/old_code/ConstraintsChecker.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/old_code/SliceCheckers.py b/src/slice/old_code/SliceCheckers.py index a4412065fad758dc8ca3bdfc19f7b12effde6d67..2cc4788b194e486068f6a808bc8c0a5232ed548a 100644 --- a/src/slice/old_code/SliceCheckers.py +++ b/src/slice/old_code/SliceCheckers.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/old_code/SliceStatus.py b/src/slice/old_code/SliceStatus.py index 2104c4dbe8d7a60f5c1ff7489566cd0263949fb9..37c69ca843e5440fe0277c573eb9b37e303aa1d2 100644 --- a/src/slice/old_code/SliceStatus.py +++ b/src/slice/old_code/SliceStatus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/old_code/Tools.py b/src/slice/old_code/Tools.py index 8260a817711b699b2a0515e360a27ff724960e40..497dd2b93680fc07e887347ae2a29917dd5dc3de 100644 --- a/src/slice/old_code/Tools.py +++ b/src/slice/old_code/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/old_code/Tools_2.py b/src/slice/old_code/Tools_2.py index fffc9eed3eadc19df361f8fe1521164034b3e140..950c8848f5af2a8f83b94ead36a20e75b76e27e8 100644 --- a/src/slice/old_code/Tools_2.py +++ b/src/slice/old_code/Tools_2.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/requirements.in b/src/slice/requirements.in index 854c71a5948e91077fba4561f961083ed90b0861..f2e7219e38a9b76bee5c1ae9e95544d1bc38065a 100644 --- a/src/slice/requirements.in +++ b/src/slice/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/service/SliceService.py b/src/slice/service/SliceService.py index 4289e5e81a2b0ded58a69368402adfeef6a2e1c0..8d6f04aadb2a81ef3abffb1ac6bb36bc88d39104 100644 --- a/src/slice/service/SliceService.py +++ b/src/slice/service/SliceService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/service/SliceServiceServicerImpl.py b/src/slice/service/SliceServiceServicerImpl.py index cbe2dd5c715da21e0e8bbdead6fa60af746cd58f..c3adb9f31ef30d0cc7cae9a233cca07e48591fa6 100644 --- a/src/slice/service/SliceServiceServicerImpl.py +++ b/src/slice/service/SliceServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/service/__init__.py b/src/slice/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/slice/service/__init__.py +++ b/src/slice/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/service/__main__.py b/src/slice/service/__main__.py index 4d581530a40c16cd130dbf12dd0aa2936902c272..424b8db84267782a2b4f6ab71cd46b862317f4f0 100644 --- a/src/slice/service/__main__.py +++ b/src/slice/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/service/slice_grouper/Constants.py b/src/slice/service/slice_grouper/Constants.py index 2edd853a2202fc64f107ea8c6688d19d6ab2692e..d44e6afd0fc232addb6e5372dd6960640ed67815 100644 --- a/src/slice/service/slice_grouper/Constants.py +++ b/src/slice/service/slice_grouper/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/service/slice_grouper/MetricsExporter.py b/src/slice/service/slice_grouper/MetricsExporter.py index 3708641eef64e100fae18e875a4fbc4896357057..71b7535993bcdaeed45d78ef08299dac049cf840 100644 --- a/src/slice/service/slice_grouper/MetricsExporter.py +++ b/src/slice/service/slice_grouper/MetricsExporter.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -29,8 +29,8 @@ MSG_REST_FAILED = '[rest_request] Query({:s}) failed, retry={:d}/{:d}...' MSG_ERROR_MAX_RETRIES = 'Maximum number of retries achieved: {:d}' METRICSDB_HOSTNAME = os.environ.get('METRICSDB_HOSTNAME') -METRICSDB_ILP_PORT = int(os.environ.get('METRICSDB_ILP_PORT')) -METRICSDB_REST_PORT = int(os.environ.get('METRICSDB_REST_PORT')) +METRICSDB_ILP_PORT = int(os.environ.get('METRICSDB_ILP_PORT', 0)) +METRICSDB_REST_PORT = int(os.environ.get('METRICSDB_REST_PORT', 0)) METRICSDB_TABLE_SLICE_GROUPS = os.environ.get('METRICSDB_TABLE_SLICE_GROUPS') COLORS = { diff --git a/src/slice/service/slice_grouper/SliceGrouper.py b/src/slice/service/slice_grouper/SliceGrouper.py index 2f1a791819f6a8d0951e9e93ca22d071ea66c1f7..d2c58b778c4b5758731809006771dc5d35853421 100644 --- a/src/slice/service/slice_grouper/SliceGrouper.py +++ b/src/slice/service/slice_grouper/SliceGrouper.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/service/slice_grouper/Tools.py b/src/slice/service/slice_grouper/Tools.py index c815a19d5477ec82c2c2702ba58bb5b092144692..8a46088e97c5387d49b1a08acd57e1715287e994 100644 --- a/src/slice/service/slice_grouper/Tools.py +++ b/src/slice/service/slice_grouper/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/service/slice_grouper/__init__.py b/src/slice/service/slice_grouper/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/slice/service/slice_grouper/__init__.py +++ b/src/slice/service/slice_grouper/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/tests/__init__.py b/src/slice/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/slice/tests/__init__.py +++ b/src/slice/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/tests/old/Main.py b/src/slice/tests/old/Main.py index 0924f1c646e9722bf23354d0787786375663e85f..bd964025110e4e986ada237816d3f5f4d79279d3 100644 --- a/src/slice/tests/old/Main.py +++ b/src/slice/tests/old/Main.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/tests/old/MetricsExporter.py b/src/slice/tests/old/MetricsExporter.py index 3c04cb9fcb1c7ab05c5274fb8e2a934a39b4cfdd..16a7f00ead896757317b1a8232951d53238ac187 100644 --- a/src/slice/tests/old/MetricsExporter.py +++ b/src/slice/tests/old/MetricsExporter.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/tests/old/test_kmeans.py b/src/slice/tests/old/test_kmeans.py index 3f54621c57c3bfcc1741591e5d0a87781e640420..b8fa2ec036edd0494a621933d32e23f16ca08d70 100644 --- a/src/slice/tests/old/test_kmeans.py +++ b/src/slice/tests/old/test_kmeans.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/tests/old/test_subslices.py b/src/slice/tests/old/test_subslices.py index 39ee235df0e9d263244fa14436f609397bcea84f..d1bf119a18b0436d2e60c0b22da63da085d90622 100644 --- a/src/slice/tests/old/test_subslices.py +++ b/src/slice/tests/old/test_subslices.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/slice/tests/test_unitary.py b/src/slice/tests/test_unitary.py index a61ccbcd603cc69025b98051d5480570bd4018ff..5af87502a798d1f94c2de80a485967eecfd62bd3 100644 --- a/src/slice/tests/test_unitary.py +++ b/src/slice/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,34 +12,34 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, os, pytest -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 slice.client.SliceClient import SliceClient -from slice.service.SliceService import SliceService +#import logging, os, pytest +#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 slice.client.SliceClient import SliceClient +#from slice.service.SliceService import SliceService -LOCAL_HOST = '127.0.0.1' -MOCKSERVICE_PORT = 10000 -SLICE_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_grpc(ServiceNameEnum.SLICE) # avoid privileged ports -os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) -os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(SLICE_SERVICE_PORT) +#LOCAL_HOST = '127.0.0.1' +#MOCKSERVICE_PORT = 10000 +#SLICE_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_grpc(ServiceNameEnum.SLICE) # avoid privileged ports +#os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +#os.environ[get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(SLICE_SERVICE_PORT) -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) +#LOGGER = logging.getLogger(__name__) +#LOGGER.setLevel(logging.DEBUG) -@pytest.fixture(scope='session') -def slice_service(): - _service = SliceService() - _service.start() - yield _service - _service.stop() +#@pytest.fixture(scope='session') +#def slice_service(): +# _service = SliceService() +# _service.start() +# yield _service +# _service.stop() -@pytest.fixture(scope='session') -def slice_client(slice_service : SliceService): # pylint: disable=redefined-outer-name - _client = SliceClient() - yield _client - _client.close() +#@pytest.fixture(scope='session') +#def slice_client(slice_service : SliceService): # pylint: disable=redefined-outer-name +# _client = SliceClient() +# yield _client +# _client.close() #def test_add_device_wrong_attributes(slice_client : SliceClient): # # should fail with slice uuid is empty diff --git a/src/te/Dockerfile b/src/te/Dockerfile index aaca9fe87ad330c2d43406d5b5df2a585617d937..a7d2a73b1263d8a101cd0edff26341e5bdf084ad 100644 --- a/src/te/Dockerfile +++ b/src/te/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/te/apps/epce/src/epce.app.src b/src/te/apps/epce/src/epce.app.src index 13324fd2fd68567623543b16affdd5b4a0241ad4..fc1f5e88d8978a4869befdb60923ef957174665f 100644 --- a/src/te/apps/epce/src/epce.app.src +++ b/src/te/apps/epce/src/epce.app.src @@ -1,4 +1,4 @@ -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/epce/src/epce_app.erl b/src/te/apps/epce/src/epce_app.erl index 19f574f38eb93080beca9b3cc7c47a78994fce57..91b891f528adaf47a84773eed2e44beb10891d2e 100644 --- a/src/te/apps/epce/src/epce_app.erl +++ b/src/te/apps/epce/src/epce_app.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/epce/src/epce_pcep_server_handler.erl b/src/te/apps/epce/src/epce_pcep_server_handler.erl index dea88b5d0b253573b956aabcf240ffed0caf15be..fb8e07331164398c5f0045b8e12004e1a57be25a 100644 --- a/src/te/apps/epce/src/epce_pcep_server_handler.erl +++ b/src/te/apps/epce/src/epce_pcep_server_handler.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/epce/src/epce_server.erl b/src/te/apps/epce/src/epce_server.erl index d1d86b5766a3f8d8fe31b873dddbf7c8076ca0f5..336fd3d518c1a3df938e3781d506a443d61d0ffa 100644 --- a/src/te/apps/epce/src/epce_server.erl +++ b/src/te/apps/epce/src/epce_server.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/epce/src/epce_sup.erl b/src/te/apps/epce/src/epce_sup.erl index 79c17c9a869a5bdba078e225a7187c0ebcdbcd92..59a3e3d020965d119c7047e088c180cdafa47b7a 100644 --- a/src/te/apps/epce/src/epce_sup.erl +++ b/src/te/apps/epce/src/epce_sup.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/epce/src/epce_ted.erl b/src/te/apps/epce/src/epce_ted.erl index 8313bec1ca6b3b75e374dfef7b8fd23d29690d68..84a11e70b149ed66d678ff2c5133c9dc1341da43 100644 --- a/src/te/apps/epce/src/epce_ted.erl +++ b/src/te/apps/epce/src/epce_ted.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/tfte/src/tfte.app.src b/src/te/apps/tfte/src/tfte.app.src index abebf116975d5a820d2da462c319f67fdbf93118..0793ab801ff795bcaa89122662cd0f1b20d59746 100644 --- a/src/te/apps/tfte/src/tfte.app.src +++ b/src/te/apps/tfte/src/tfte.app.src @@ -1,4 +1,4 @@ -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/tfte/src/tfte_app.erl b/src/te/apps/tfte/src/tfte_app.erl index a629a1b139d4d2a2965ff724676f23b6734ddd11..39565ba82aec8cdb3a4b7e461f042dc4a8be9a56 100644 --- a/src/te/apps/tfte/src/tfte_app.erl +++ b/src/te/apps/tfte/src/tfte_app.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/tfte/src/tfte_context.erl b/src/te/apps/tfte/src/tfte_context.erl index 453852f34dd5210b8c7d407d967a3da36f635349..49d6710b9b661f4a5219f0b0898270c44e7c2b3f 100644 --- a/src/te/apps/tfte/src/tfte_context.erl +++ b/src/te/apps/tfte/src/tfte_context.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/tfte/src/tfte_server.erl b/src/te/apps/tfte/src/tfte_server.erl index 002bda810e901debddd72a3cfa7ec50bab8e3f97..47a851d554c658d2a49faa13c0aaf43ffbab27df 100644 --- a/src/te/apps/tfte/src/tfte_server.erl +++ b/src/te/apps/tfte/src/tfte_server.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/tfte/src/tfte_service_sup.erl b/src/te/apps/tfte/src/tfte_service_sup.erl index 6ec5d09b069ca856f6298fdc8effa2bb01cf115a..cd80f5cf2cfd993ddf2ed3c3733e8da4fd60fab8 100644 --- a/src/te/apps/tfte/src/tfte_service_sup.erl +++ b/src/te/apps/tfte/src/tfte_service_sup.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/tfte/src/tfte_sup.erl b/src/te/apps/tfte/src/tfte_sup.erl index 4630511d6fec909b002acd57bec61790e54f7e94..14deadc768c5ad4c3b0e144c82478fad91aaf960 100644 --- a/src/te/apps/tfte/src/tfte_sup.erl +++ b/src/te/apps/tfte/src/tfte_sup.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/tfte/src/tfte_te_service.erl b/src/te/apps/tfte/src/tfte_te_service.erl index b9911ee37a5719c838baca7f86dd326b810f9bc8..94d0f2ead0a5f78869f68e5cc9719d5e925daaa6 100644 --- a/src/te/apps/tfte/src/tfte_te_service.erl +++ b/src/te/apps/tfte/src/tfte_te_service.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/tfte/src/tfte_topology.erl b/src/te/apps/tfte/src/tfte_topology.erl index 39897caa800ebed291d34d91b4a6b154c90f0f2e..b7720cb49b91d03e7c86a9a539549b63b3a3a039 100644 --- a/src/te/apps/tfte/src/tfte_topology.erl +++ b/src/te/apps/tfte/src/tfte_topology.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/apps/tfte/src/tfte_util.erl b/src/te/apps/tfte/src/tfte_util.erl index fb058c7cf6b247c13bd95f2f0c5696eec30da8bf..737daa2e05285c7d4f952b46af5bdb32c1acb94d 100644 --- a/src/te/apps/tfte/src/tfte_util.erl +++ b/src/te/apps/tfte/src/tfte_util.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. diff --git a/src/te/config/dev.config.template b/src/te/config/dev.config.template index 6e21dc0d2d021447cf5eb84869d97b7a3662f58c..d6d67341a179090ff3a19c8c145dea08dc4f9252 100644 --- a/src/te/config/dev.config.template +++ b/src/te/config/dev.config.template @@ -1,4 +1,4 @@ -% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) % % Licensed under the Apache License, Version 2.0 (the "License"); % you may not use this file except in compliance with the License. diff --git a/src/te/config/sys.config.src b/src/te/config/sys.config.src index 22e9e2565f8d7541df47e4df3214d52abf99967a..6efa8c15d8259779aaa5edea9b682ebccd4d30e2 100644 --- a/src/te/config/sys.config.src +++ b/src/te/config/sys.config.src @@ -1,4 +1,4 @@ -% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) % % Licensed under the Apache License, Version 2.0 (the "License"); % you may not use this file except in compliance with the License. diff --git a/src/te/rebar.config b/src/te/rebar.config index 01f7a899ee6fb69970bd38d6b75c47450887f313..def36790397d3d207562413f285759bd1d7e61ee 100644 --- a/src/te/rebar.config +++ b/src/te/rebar.config @@ -1,4 +1,4 @@ -% Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) % % Licensed under the Apache License, Version 2.0 (the "License"); % you may not use this file except in compliance with the License. diff --git a/src/te/tests/deploy_specs.sh b/src/te/tests/deploy_specs.sh index fbe4af71065aaef00e111b6909f28d80858a64e3..1562021e77a7a4ea5f08a0ad66e4e89f31e5e2e5 100644 --- a/src/te/tests/deploy_specs.sh +++ b/src/te/tests/deploy_specs.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/te/tests/netgen-config.yml b/src/te/tests/netgen-config.yml index d037088ce6cafdf95110ce5eadd31e8fb7a302ed..3dee8cc105f32ed68e161c4e4827e541f3156c5e 100644 --- a/src/te/tests/netgen-config.yml +++ b/src/te/tests/netgen-config.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/te/tests/netgen-topology.yml.template b/src/te/tests/netgen-topology.yml.template index fd21c436324f03e59e37b7cb5cd829245782e133..8021d433bd6aa113e043c44b79c3451678534581 100644 --- a/src/te/tests/netgen-topology.yml.template +++ b/src/te/tests/netgen-topology.yml.template @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/te/tests/start-testbed.sh b/src/te/tests/start-testbed.sh index 07a30e091252f753ff3c89c65378c6bbcde8bae3..f66275c0e63960863740eea69946c233adf8e217 100755 --- a/src/te/tests/start-testbed.sh +++ b/src/te/tests/start-testbed.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/te/tests/test_te_service.py b/src/te/tests/test_te_service.py index 6237049d4ed7c69f2a6f12efc1ce0365fca7133b..b7b3cbfc35d56fd8e9604e0e0ab477dbffa7cbd1 100644 --- a/src/te/tests/test_te_service.py +++ b/src/te/tests/test_te_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index db44b9e4a8d29475a0b6cd620ffd9a6961f8cdc5..c64db5d8fef7661e37f271429cd4c1c5ff328b7a 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -# include the individual .gitlab-ci.yml of each integration test +# include the individual .gitlab-ci.yml of each end-to-end integration test include: - local: '/src/tests/ofc22/.gitlab-ci.yml' - - local: '/src/tests/oeccpsc22/.gitlab-ci.yml' + #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' + - local: '/src/tests/ecoc22/.gitlab-ci.yml' + #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' + #- local: '/src/tests/ofc23/.gitlab-ci.yml' + - local: '/src/tests/ofc24/.gitlab-ci.yml' diff --git a/src/tests/Fixtures.py b/src/tests/Fixtures.py index ecb44a7588d62e14f4295141adb3acc7bbe89532..0d075822712adab1ba1adfabae27c4ecf115e597 100644 --- a/src/tests/Fixtures.py +++ b/src/tests/Fixtures.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,6 +16,15 @@ import pytest from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from monitoring.client.MonitoringClient import MonitoringClient +from e2e_orchestrator.client.E2EOrchestratorClient import E2EOrchestratorClient +from service.client.ServiceClient import ServiceClient + + +@pytest.fixture(scope='session') +def service_client(): + _client = ServiceClient() + yield _client + _client.close() @pytest.fixture(scope='session') def context_client(): @@ -34,3 +43,9 @@ def monitoring_client(): _client = MonitoringClient() yield _client _client.close() + +@pytest.fixture(scope='session') +def e2eorchestrator_client(): + _client = E2EOrchestratorClient() + yield _client + _client.close() diff --git a/src/tests/__init__.py b/src/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/__init__.py +++ b/src/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/PolicyAddService.js b/src/tests/benchmark/policy/PolicyAddService.js index d765709975d8ed14cb7696b14cdf1a07a2707b3d..18e4f230ccd27f5ae9b6257af662073285294e17 100644 --- a/src/tests/benchmark/policy/PolicyAddService.js +++ b/src/tests/benchmark/policy/PolicyAddService.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/PolicyDelete.js b/src/tests/benchmark/policy/PolicyDelete.js index 6ec85a6a3c30b7b8af258918a49cb8e8e7adeb67..d363dfe4528ba7c4610fb750f76b2ef310f360bb 100644 --- a/src/tests/benchmark/policy/PolicyDelete.js +++ b/src/tests/benchmark/policy/PolicyDelete.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/PolicyUpdateService.js b/src/tests/benchmark/policy/PolicyUpdateService.js index ddf7836b595b7021a8ca7b2c7b37c89b653c1999..07e85d627a07a619e0d0c606944a3682597bd273 100644 --- a/src/tests/benchmark/policy/PolicyUpdateService.js +++ b/src/tests/benchmark/policy/PolicyUpdateService.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/__init__.py b/src/tests/benchmark/policy/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/benchmark/policy/__init__.py +++ b/src/tests/benchmark/policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/deploy_specs.sh b/src/tests/benchmark/policy/deploy_specs.sh index 78b6fa72554b193c9cc107682bdf031c3a8b35c0..fbff2ad7d79dbe295d4fa7ccd7cce9b7e94615ed 100644 --- a/src/tests/benchmark/policy/deploy_specs.sh +++ b/src/tests/benchmark/policy/deploy_specs.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/run_test_01_bootstrap.sh b/src/tests/benchmark/policy/run_test_01_bootstrap.sh index a60f962c8ae14c89cccb53ac2fd27f6ffe5c98ea..f47704a0b8be6e9873519a895c01644eaf74e448 100755 --- a/src/tests/benchmark/policy/run_test_01_bootstrap.sh +++ b/src/tests/benchmark/policy/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/run_test_02_create_service.sh b/src/tests/benchmark/policy/run_test_02_create_service.sh index d899a1455cba2fa92418746373a825a383d3e25c..26ad37b4a4bff42f5a915fd8a79b0a8dab6cc41b 100755 --- a/src/tests/benchmark/policy/run_test_02_create_service.sh +++ b/src/tests/benchmark/policy/run_test_02_create_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/run_test_03_delete_service.sh b/src/tests/benchmark/policy/run_test_03_delete_service.sh index 2cfe25effbaa5dd64a1b445fa2063d91f6348440..a4e919f6af5a4b4d2fb6817606c2b94cce280bc8 100755 --- a/src/tests/benchmark/policy/run_test_03_delete_service.sh +++ b/src/tests/benchmark/policy/run_test_03_delete_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/run_test_04_cleanup.sh b/src/tests/benchmark/policy/run_test_04_cleanup.sh index d93f798cb24f59e06dc9445e373f74d2dad01c74..792844664e44104108e75232b961d5c7448be62a 100755 --- a/src/tests/benchmark/policy/run_test_04_cleanup.sh +++ b/src/tests/benchmark/policy/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/tests/Fixtures.py b/src/tests/benchmark/policy/tests/Fixtures.py index 7ef60fb194aa7f0fb13fba01be2c16d9ef350ba9..e2752dce9927cce1217c1e4316f2b07e50731c2a 100644 --- a/src/tests/benchmark/policy/tests/Fixtures.py +++ b/src/tests/benchmark/policy/tests/Fixtures.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/tests/Objects.py b/src/tests/benchmark/policy/tests/Objects.py index 887407bf4a472d183002856716a65bf23ea0e586..a2ec63adc5876ba9fc92f2d6a6517c1a1a5d79fb 100644 --- a/src/tests/benchmark/policy/tests/Objects.py +++ b/src/tests/benchmark/policy/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/tests/__init__.py b/src/tests/benchmark/policy/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/benchmark/policy/tests/__init__.py +++ b/src/tests/benchmark/policy/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/tests/test_functional_bootstrap.py b/src/tests/benchmark/policy/tests/test_functional_bootstrap.py index ca1882aaa22ff1ac20d0b1927199a6594a6c441a..f31e576cf1d00355081408c455d925c5ac7d41e8 100644 --- a/src/tests/benchmark/policy/tests/test_functional_bootstrap.py +++ b/src/tests/benchmark/policy/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/tests/test_functional_cleanup.py b/src/tests/benchmark/policy/tests/test_functional_cleanup.py index 122526840796310519f8fe0feb8921e51467b21f..fdbeb3c1461047defc3bec393a9c49396cd463ee 100644 --- a/src/tests/benchmark/policy/tests/test_functional_cleanup.py +++ b/src/tests/benchmark/policy/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/tests/test_functional_create_service.py b/src/tests/benchmark/policy/tests/test_functional_create_service.py index dd7761f3871db48752f313dc53e8b7d2e2c38489..e4e196678bd8b7dedcfffb2ddb065adf237d0e52 100644 --- a/src/tests/benchmark/policy/tests/test_functional_create_service.py +++ b/src/tests/benchmark/policy/tests/test_functional_create_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/policy/tests/test_functional_delete_service.py b/src/tests/benchmark/policy/tests/test_functional_delete_service.py index 4fffc115e6c0ea881dea637dd741f99715d28c6a..524a5b09ae4e713287c48b8b38f276a7f678ca4f 100644 --- a/src/tests/benchmark/policy/tests/test_functional_delete_service.py +++ b/src/tests/benchmark/policy/tests/test_functional_delete_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/ztp/ZtpAdd.js b/src/tests/benchmark/ztp/ZtpAdd.js index 3d7a7831a0cd9dfc73eab8133681ecd20d2f81ef..3aaad035f4aecb729ca0fd8113795d6cb3029241 100644 --- a/src/tests/benchmark/ztp/ZtpAdd.js +++ b/src/tests/benchmark/ztp/ZtpAdd.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/ztp/ZtpDelete.js b/src/tests/benchmark/ztp/ZtpDelete.js index 4b5d41340a9ac4d42899a996380a3bc5203bc1fd..3a21aeb89f64de53caeb2a53787d6e49caf81bda 100644 --- a/src/tests/benchmark/ztp/ZtpDelete.js +++ b/src/tests/benchmark/ztp/ZtpDelete.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/ztp/ZtpUpdate.js b/src/tests/benchmark/ztp/ZtpUpdate.js index 61d38bc993d7ceeda9c8c7ce29e1b9804e6825f4..13749d234bc2cfe4b440431f5a72f0f08c4899ff 100644 --- a/src/tests/benchmark/ztp/ZtpUpdate.js +++ b/src/tests/benchmark/ztp/ZtpUpdate.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/ztp/__init__.py b/src/tests/benchmark/ztp/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/benchmark/ztp/__init__.py +++ b/src/tests/benchmark/ztp/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/ztp/run_test_01_bootstrap.sh b/src/tests/benchmark/ztp/run_test_01_bootstrap.sh index bbd0b5111ab3ddb05513396b253fe4c7e630d3a5..fc1c6ce18387f93e29b7ff59a305fc087be545d4 100755 --- a/src/tests/benchmark/ztp/run_test_01_bootstrap.sh +++ b/src/tests/benchmark/ztp/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/ztp/run_test_02_cleanup.sh b/src/tests/benchmark/ztp/run_test_02_cleanup.sh index 6b98bca0097b17c96793c9168c0976bd1e48fe3a..728033e3c9224e37d9c2af223bec55e46b76bdd8 100755 --- a/src/tests/benchmark/ztp/run_test_02_cleanup.sh +++ b/src/tests/benchmark/ztp/run_test_02_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/ztp/tests/Fixtures.py b/src/tests/benchmark/ztp/tests/Fixtures.py index 7ef60fb194aa7f0fb13fba01be2c16d9ef350ba9..e2752dce9927cce1217c1e4316f2b07e50731c2a 100644 --- a/src/tests/benchmark/ztp/tests/Fixtures.py +++ b/src/tests/benchmark/ztp/tests/Fixtures.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/ztp/tests/Objects.py b/src/tests/benchmark/ztp/tests/Objects.py index a364abdc9d5dadec25e44e497f36db0c90e98e0b..afaf8e5ac6c62ee6ff9abdeac2cd8f3bc7968f2b 100644 --- a/src/tests/benchmark/ztp/tests/Objects.py +++ b/src/tests/benchmark/ztp/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/ztp/tests/__init__.py b/src/tests/benchmark/ztp/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/benchmark/ztp/tests/__init__.py +++ b/src/tests/benchmark/ztp/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/ztp/tests/test_functional_bootstrap.py b/src/tests/benchmark/ztp/tests/test_functional_bootstrap.py index f61125a8c2bbb9e96785d176b14eabf08e9419a1..f586bb4ed0bc0db978572b1739ccd1e9577cd5ab 100644 --- a/src/tests/benchmark/ztp/tests/test_functional_bootstrap.py +++ b/src/tests/benchmark/ztp/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/benchmark/ztp/tests/test_functional_cleanup.py b/src/tests/benchmark/ztp/tests/test_functional_cleanup.py index 4b0c52dd4aea4ec7e4adb576c9557d53713ba332..f3cbdff0aad3c4d2de57dd1b2a445aadb224daf3 100644 --- a/src/tests/benchmark/ztp/tests/test_functional_cleanup.py +++ b/src/tests/benchmark/ztp/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/ecoc22/.gitlab-ci.yml b/src/tests/ecoc22/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..e17194cfc94b9fb2f3a5fca4a92661baa349be9b --- /dev/null +++ b/src/tests/ecoc22/.gitlab-ci.yml @@ -0,0 +1,106 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 ecoc22: + variables: + TEST_NAME: 'ecoc22' + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . + - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + 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/tests/${TEST_NAME}/**/*.{py,in,sh,yml} + - src/tests/${TEST_NAME}/Dockerfile + - .gitlab-ci.yml + +# Deploy TeraFlowSDN and Execute end-2-end test +end2end_test ecoc22: + variables: + TEST_NAME: 'ecoc22' + stage: end2end_test + # Disable to force running it after all other tasks + #needs: + # - build ecoc22 + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + # Download Docker image to run the test + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}:latest" + + # Check MicroK8s is ready + - microk8s status --wait-ready + - kubectl get pods --all-namespaces + + # Configure TeraFlowSDN deployment + # Uncomment if DEBUG log level is needed for the components + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/sliceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml + - source src/tests/${TEST_NAME}/deploy_specs.sh + #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" + #- export TFS_SKIP_BUILD="YES" + #- export TFS_IMAGE_TAG="latest" + #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" + + # Deploy TeraFlowSDN + - ./deploy/crdb.sh + - ./deploy/nats.sh + - ./deploy/qdb.sh + - ./deploy/expose_dashboard.sh + - ./deploy/tfs.sh + - ./deploy/show.sh + + # Wait for Context to be subscribed to NATS + #- while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done + #- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + + # Run end-to-end tests + - if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi + - > + docker run -t --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest + after_script: + - source src/tests/${TEST_NAME}/deploy_specs.sh + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/deviceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/pathcompservice -c frontend + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/serviceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/sliceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/nbiservice -c server + - if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + #coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + 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"' + artifacts: + when: always + reports: + junit: ./src/tests/${TEST_NAME}/report_*.xml diff --git a/src/tests/ecoc22/Dockerfile b/src/tests/ecoc22/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..bc02bc08c7c07dee17b3c58ced4b53e529b01ffa --- /dev/null +++ b/src/tests/ecoc22/Dockerfile @@ -0,0 +1,99 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/tests/ecoc22 +WORKDIR /var/teraflow/tests/ecoc22 +COPY src/tests/ecoc22/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/__init__.py ./__init__.py +COPY src/common/*.py ./common/ +COPY src/common/tests/. ./common/tests/ +COPY src/common/tools/. ./common/tools/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +COPY src/monitoring/__init__.py monitoring/__init__.py +COPY src/monitoring/client/. monitoring/client/ +COPY src/e2e_orchestrator/__init__.py e2e_orchestrator/__init__.py +COPY src/e2e_orchestrator/client/. e2e_orchestrator/client/ +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/tests/*.py ./tests/ +COPY src/tests/ecoc22/__init__.py ./tests/ecoc22/__init__.py +COPY src/tests/ecoc22/descriptors_emulated.json ./tests/ecoc22/descriptors_emulated.json +COPY src/tests/ecoc22/tests/. ./tests/ecoc22/tests/ +COPY src/tests/tools/. ./tests/tools/ + +RUN tee ./run_tests.sh < None: + """ + This test validates that the devices are enabled. + """ + DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + num_devices = -1 + num_devices_enabled, num_retry = 0, 0 + while (num_devices != num_devices_enabled) and (num_retry < 10): + time.sleep(1.0) + response = context_client.ListDevices(Empty()) + num_devices = len(response.devices) + num_devices_enabled = 0 + for device in response.devices: + if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue + num_devices_enabled += 1 + LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) + num_retry += 1 + assert num_devices_enabled == num_devices diff --git a/src/tests/ecoc22/tests/test_functional_cleanup.py b/src/tests/ecoc22/tests/test_functional_cleanup.py index 088c19799615169bf8c60ae5a9226fe02ec0e4ff..0e2580a9969ac6d4f7fbcf7375ab0a96197d07cc 100644 --- a/src/tests/ecoc22/tests/test_functional_cleanup.py +++ b/src/tests/ecoc22/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging +import logging, os from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import ContextId from common.tools.descriptor.Loader import DescriptorLoader, validate_empty_scenario @@ -24,7 +24,7 @@ from tests.Fixtures import context_client, device_client # pylint: disable=un LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) -DESCRIPTOR_FILE = 'ecoc22/descriptors_emulated.json' +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors_emulated.json') ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_scenario_cleanup( diff --git a/src/tests/ecoc22/tests/test_functional_create_service.py b/src/tests/ecoc22/tests/test_functional_create_service.py index dab9c7eb131434a16dad01be4fb8cd6b6b322515..2e6f693bf9c9c83b3378b2a33c99f429897d7a88 100644 --- a/src/tests/ecoc22/tests/test_functional_create_service.py +++ b/src/tests/ecoc22/tests/test_functional_create_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging +import logging, os from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import ContextId, ServiceTypeEnum from common.tools.descriptor.Loader import DescriptorLoader @@ -27,7 +27,7 @@ from .Objects import WIM_SERVICE_CONNECTION_POINTS, WIM_SERVICE_TYPE LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) -DESCRIPTOR_FILE = 'ecoc22/descriptors_emulated.json' +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors_emulated.json') ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_service_creation(context_client : ContextClient, osm_wim : MockOSM): # pylint: disable=redefined-outer-name diff --git a/src/tests/ecoc22/tests/test_functional_delete_service.py b/src/tests/ecoc22/tests/test_functional_delete_service.py index 710e1a817f00f0b1664439d1c816195202a69a9d..b1e46702f00f7bfb31327e54a7879d2bc0363e22 100644 --- a/src/tests/ecoc22/tests/test_functional_delete_service.py +++ b/src/tests/ecoc22/tests/test_functional_delete_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging +import logging, os from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import ContextId, ServiceTypeEnum from common.tools.descriptor.Loader import DescriptorLoader @@ -26,7 +26,7 @@ from .Fixtures import osm_wim LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) -DESCRIPTOR_FILE = 'ecoc22/descriptors_emulated.json' +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors_emulated.json') ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_service_removal(context_client : ContextClient, osm_wim : MockOSM): # pylint: disable=redefined-outer-name diff --git a/src/tests/f5g-poc-camara/POC-CAMARA-Guide.md b/src/tests/f5g-poc-camara/POC-CAMARA-Guide.md new file mode 100644 index 0000000000000000000000000000000000000000..85ec44cb6df77089194b9c8d7a7f5309a8513677 --- /dev/null +++ b/src/tests/f5g-poc-camara/POC-CAMARA-Guide.md @@ -0,0 +1,162 @@ +# TeraFlowSDN - ETSI F5G PoC CAMARA Guide + +This guide describes how to: +1. Configure and Deploy TeraFlowSDN for the ETSI F5G PoC CAMARA +2. Start Mock IETF ACTN SDN Controller (for testing and debugging) +3. Onboard the network topology descriptor +4. Expose the topology through the RESTConf IETF Network endpoint +5. Create Services through RESTConf IETF L3VPN endpoint +6. Get State of Services through RESTConf IETF L3VPN endpoint +7. Check configurations done in the Mock IETF ACTN SDN Controller (for testing and debugging) +8. Destroy Services through RESTConf IETF L3VPN endpoint + + +## 1. Configure and Deploy TeraFlowSDN for the ETSI F5G PoC CAMARA + +This guide assumes the user pre-configured a physical/virtual machine based on the steps described in +the official +[ETSI TeraFlowSDN - Deployment Guide](https://labs.etsi.org/rep/tfs/controller/-/wikis/1.-Deployment-Guide). + +__NOTE__: When you perform step _1.3. Deploy TeraFlowSDN_, configure the `my_deploy.sh` script modifying +the following settings: +```bash +# ... +export TFS_COMPONENTS="context device pathcomp service slice nbi webui" +# ... +export CRDB_DROP_DATABASE_IF_EXISTS="YES" +# ... +export QDB_DROP_TABLES_IF_EXIST="YES" +# ... +``` + +After modifying the file, deploy the TeraFlowSDN using the regular script `./deploy/all.sh`. +The script might take a while to run, especially the first time, since it needs to build the TeraFlowSDN +microservices. + + +## 2. Start Mock IETF ACTN SDN Controller (for testing and debugging) + +__NOTE__: This step is not needed when using the real NCE-T controller. + +Start the Mock IETF ACTN SDN Controller. This controller is a simple Python script that accepts requests +based on agreed F5G PoC CAMARA and stores it in memory, mimicking the NCE-T controller. + +Run the Mock IETF ACTN SDN Controller as follows: +```bash +python src/tests/tools/mock_ietf_actn_sdn_ctrl/MockIetfActnSdnCtrl.py +``` + + +## 3. Onboard the network topology descriptor + +The network topology descriptor is a TeraFlowSDN configuration file describing the different elements to be +managed by the SDN controller, such as devices, links, networks, etc. A preliminary descriptor has been +prepared for the PoC CAMARA. The file is named as `topology-real.json`. + +**NOTE**: Before onboarding file `topology-real.json`, update settings of device `nce-t` to match the IP +address, port, username, password, HTTP scheme, etc. of the real NCE-T. + +To onboard the descriptor file, navigate to the [TeraFlowSDN WebUI](http://127.0.0.1/webui) > Home. +Browse the file through the _Descriptors_ field, and click the _Submit_ button that is next to the field. +The onboarding should take few seconds and the WebUI should report that 1 context, 1 topology, 1 controller, +10 devices, and 24 links were added. Also, it should report that 1 topology was updated. + +Next, select in the field _Ctx/Topo_ the entry named as `Context(admin):Topology(admin)`, and click the +_Submit_ button that is next to the field. The topology should be displayed just below. + +Then, navigate to the WebUI > Devices and WebUI > Links sections to familiarize with the details provided +for each entity. You can check the details of each entity by clicking the eye-shaped icon on the right +side of each row. + +The underlying devices are configured as EMULATED entities while the NCE-T controller is configured as an +IP SDN controller. Auto-discovery of devices is not implemented as this will fall in PoC phase two. + + +## 4. Expose the topology through the RESTConf IETF Network endpoint + +The TeraFlowSDN controller features an NBI component that exposes RESTConf-based endpoints. To retrieve the +topology following the IETF Network data model, use the following `curl` (or similar) command: + +```bash +curl -u admin:admin http://127.0.0.1/restconf/data/ietf-network:networks/ +``` + +__NOTE__: The command requires to interrogate the complete database and might take few seconds to complete. + + +## 5. Create Services through RESTConf IETF L3VPN endpoint + +The TeraFlowSDN controller's NBI component also exposes the IETF L3VPN endpoints to +create/check_status/delete services. To try them, use the following `curl` (or similar) commands: + +```bash +curl -u admin:admin -X POST -H "Content-Type: application/json" -d @src/nbi/tests/data/ietf_l3vpn_req_svc1.json http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services +curl -u admin:admin -X POST -H "Content-Type: application/json" -d @src/nbi/tests/data/ietf_l3vpn_req_svc2.json http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services +``` + +__NOTE 1__: This command uses the provided descriptors for creating the VPN services with some adaptations +to adjust to the official data model. + +__NOTE 2__: This command retrieves no data if everything succeeds, in case of error, it will be reported. + +This step will create the services in TeraFlowSDN and create the appropriate configuration rules in the +NCE-T controller through the appropriate service handlers and SBI drivers. + +When the services are created, navigate to the WebUI > Services section to familiarize with the details +provided for each service. You can check the details of the service by clicking the eye-shaped icon on +the right side of each row. + +Note that two services are created per requested VPN. The reason for that is because those services named +as "vpnX" (the name provided in the request) correspond to end-to-end services, while the others with a UUID +as a name are generated by TeraFlowSDN to represent the transport segment managed through the NCE-T. +TeraFlowSDN gathers the settings from the upper-layer end-to-end service and contructs the NCE-T-bound +services. + +Also, you can navigate to the WebUI > Devices section, click on the eye-shaped icon next to the `nce-t` +device and check the configuration rules (defined using an internal data model, not IETF ACTN) that are +later converted into the IETF ACTN configuration instructions sent to the NCE-T. + +You should see in configuration rules of the `nce-t` device rules with a resource key formatted as +`/osu_tunnels/osu_tunnel[{osu-tunnel-name}]` for each OSU tunnel, and others with resource key like +`/etht_services/etht_service[{etht-service-name}]` for each EthT service. + + +## 6. Get State of Services through RESTConf IETF L3VPN endpoint + +To get the status of the services, use the following `curl` (or similar) commands: + +```bash +curl -u admin:admin http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=vpn1 +curl -u admin:admin http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=vpn2 +``` + +__NOTE__: This command retrieves an empty dictionary with no error if the service is ready and ACTIVE. + + +## 7. Check configurations done in the Mock IETF ACTN SDN Controller (for testing and debugging) + +__NOTE__: This step is not needed when using the real NCE-T controller. + +While running the Mock IETF ACTN SDN Controller, you can interrogate the OSU tunnels and EthT Services +created using the following commands: + +```bash +curl --insecure https://127.0.0.1:8443/restconf/v2/data/ietf-te:te/tunnels +curl --insecure https://127.0.0.1:8443/restconf/v2/data/ietf-eth-tran-service:etht-svc +``` + + +## 8. Destroy Services through RESTConf IETF L3VPN endpoint + +To destroy the services, use the following `curl` (or similar) commands: + +```bash +curl -u admin:admin -X DELETE http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=vpn1 +curl -u admin:admin -X DELETE http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=vpn2 +``` + +__NOTE__: This command retrieves no data when it succeeds. + +When the services are deleted, navigate to the WebUI > Services section verify that no service is present. +Besides, navigate to the WebUI > Devices section, and inspect the NCE-T device to verify that the OSU +tunnel and ETHT service configuration rules disapeared. diff --git a/src/tests/f5g-poc-camara/data/topology-real.json b/src/tests/f5g-poc-camara/data/topology-real.json new file mode 100644 index 0000000000000000000000000000000000000000..c8c146ce28101cb727ceb526ef8fcd3aeefb4e53 --- /dev/null +++ b/src/tests/f5g-poc-camara/data/topology-real.json @@ -0,0 +1,260 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + + "devices": [ + {"device_id": {"device_uuid": {"uuid": "nce-t"}}, "name": "nce-t", "device_type": "ip-sdn-controller", + "device_operational_status": 1, "device_drivers": [10], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8443"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "https", "username": "admin", "password": "admin", "base_url": "/restconf/v2/data", + "timeout": 120, "verify": false + }}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "name": "10.0.10.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "200", "name": "200", "type": "copper" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "name": "10.0.20.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "name": "10.0.30.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "200", "name": "200", "type": "copper" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "name": "10.0.40.1", "device_type": "emu-packet-router", + "controller_id": {"device_uuid": {"uuid": "nce-t"}}, + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "mgmt", "name": "mgmt", "type": "mgmt" }, + {"uuid": "500", "name": "500", "type": "optical"}, + {"uuid": "501", "name": "501", "type": "optical"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "name": "128.32.10.5", "device_type": "emu-client", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "name": "eth1", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "name": "128.32.10.1", "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "name": "128.32.20.5", "device_type": "emu-client", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "name": "eth1", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "name": "128.32.20.1", "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "name": "128.32.33.5", "device_type": "emu-packet-router", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "201", "name": "201", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}}, + + {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "name": "172.10.33.5", "device_type": "emu-datacenter", + "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "200", "name": "200", "type": "copper"}, + {"uuid": "201", "name": "201", "type": "copper"}, + {"uuid": "500", "name": "500", "type": "copper"} + ]}}} + ]}} + ], + + "links": [ + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.10.1/mgmt"}}, "name": "nce-t/mgmt==10.0.10.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.20.1/mgmt"}}, "name": "nce-t/mgmt==10.0.20.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.30.1/mgmt"}}, "name": "nce-t/mgmt==10.0.30.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "nce-t/mgmt==10.0.40.1/mgmt"}}, "name": "nce-t/mgmt==10.0.40.1/mgmt", "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "nce-t" }}, "endpoint_uuid": {"uuid": "mgmt"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "mgmt"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.10.1-501"}}, "name": "10.0.10.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.20.1-501"}}, "name": "10.0.20.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.10.1-500"}}, "name": "10.0.10.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.40.1-500"}}, "name": "10.0.40.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.20.1-500"}}, "name": "10.0.20.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.30.1-500"}}, "name": "10.0.30.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.20.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "10.0.40.1-501"}}, "name": "10.0.40.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.30.1-501"}}, "name": "10.0.30.1-501", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "501"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.40.1"}}, "endpoint_uuid": {"uuid": "501"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.10.5-eth1"}}, "name": "128.32.10.5-eth1", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "200" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.10.1-200"}}, "name": "128.32.10.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "200" }}, + {"device_id": {"device_uuid": {"uuid": "128.32.10.5"}}, "endpoint_uuid": {"uuid": "eth1"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.10.1-500"}}, "name": "128.32.10.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "200"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.33.5-200"}}, "name": "128.32.33.5-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "200"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.10.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.20.5-eth1"}}, "name": "128.32.20.5-eth1", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "200" }} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.20.1-200"}}, "name": "128.32.20.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "200" }}, + {"device_id": {"device_uuid": {"uuid": "128.32.20.5"}}, "endpoint_uuid": {"uuid": "eth1"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.20.1-500"}}, "name": "128.32.20.1-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "201"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "128.32.33.5-201"}}, "name": "128.32.33.5-201", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "201"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.20.1"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "128.32.33.5-500"}}, "name": "128.32.33.5-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "200"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.10.1-200"}}, "name": "10.0.10.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.10.1"}}, "endpoint_uuid": {"uuid": "200"}}, + {"device_id": {"device_uuid": {"uuid": "128.32.33.5"}}, "endpoint_uuid": {"uuid": "500"}} + ]}, + + {"link_id": {"link_uuid": {"uuid": "172.10.33.5-500"}}, "name": "172.10.33.5-500", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "endpoint_uuid": {"uuid": "500"}}, + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "200"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "10.0.30.1-200"}}, "name": "10.0.30.1-200", + "attributes": {"total_capacity_gbps": 10, "used_capacity_gbps": 0}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "10.0.30.1"}}, "endpoint_uuid": {"uuid": "200"}}, + {"device_id": {"device_uuid": {"uuid": "172.10.33.5"}}, "endpoint_uuid": {"uuid": "500"}} + ]} + ] +} diff --git a/src/tests/hackfest3/__init__.py b/src/tests/hackfest3/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/hackfest3/__init__.py +++ b/src/tests/hackfest3/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/deploy_specs.sh b/src/tests/hackfest3/deploy_specs.sh index 9d185035a0ab043d60972178a8aec71861fb9b16..9f492cde22a04abcc5c162602dff30393d664689 100755 --- a/src/tests/hackfest3/deploy_specs.sh +++ b/src/tests/hackfest3/deploy_specs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/grpc/addPolicy.sh b/src/tests/hackfest3/grpc/addPolicy.sh index 71300d3ac00ff99786947cdc56b3776f858fcd3e..84dd09cac4fdaf68caebc2f607955493a7f63f4c 100755 --- a/src/tests/hackfest3/grpc/addPolicy.sh +++ b/src/tests/hackfest3/grpc/addPolicy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/grpc/removePolicy.sh b/src/tests/hackfest3/grpc/removePolicy.sh index fc6103f41224915abdae1c6688b1284d3e5f21ae..694177eb4a28838c4b7fbc822f822dfdadf64d38 100755 --- a/src/tests/hackfest3/grpc/removePolicy.sh +++ b/src/tests/hackfest3/grpc/removePolicy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/int/build_p4.sh b/src/tests/hackfest3/int/build_p4.sh index 184fe17ec6271ef689f2aa2b280c8e9b1b8c6ee2..1bab41f692f85c7cd9071996c75f2c31a841d1d8 100755 --- a/src/tests/hackfest3/int/build_p4.sh +++ b/src/tests/hackfest3/int/build_p4.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/int/connect_to_mininet.sh b/src/tests/hackfest3/int/connect_to_mininet.sh index a82d3767fc2669e7627bee0b5ca60e5626c920f2..ab748e65ac591a93a924afb8b2a0ef3fbbc31935 100755 --- a/src/tests/hackfest3/int/connect_to_mininet.sh +++ b/src/tests/hackfest3/int/connect_to_mininet.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/int/copy_int_helpers.sh b/src/tests/hackfest3/int/copy_int_helpers.sh index 726ff55dfb512a34819063bd0bddddb5ad076ce3..ae9ca7b61cfc0e61ded604a51a178edb6b79851d 100755 --- a/src/tests/hackfest3/int/copy_int_helpers.sh +++ b/src/tests/hackfest3/int/copy_int_helpers.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/int/install-scapy.sh b/src/tests/hackfest3/int/install-scapy.sh index 9cfa948f682400032af18d1595a3a79009dc3c49..6db0ff45ce82ce0072786c9ff2781853cfa1e9e3 100755 --- a/src/tests/hackfest3/int/install-scapy.sh +++ b/src/tests/hackfest3/int/install-scapy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/int/receive.py b/src/tests/hackfest3/int/receive.py index fb1aac1ca2527e7df5981d2a747f2ebc4a6e8775..3734e8ed7d2933ff497cca3f3803962a078d417c 100644 --- a/src/tests/hackfest3/int/receive.py +++ b/src/tests/hackfest3/int/receive.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/int/send.py b/src/tests/hackfest3/int/send.py index 38b4b4d6274922e5917206681e9502c9d8ac3576..907865d7b30a685cf26a03d9677f580f4124e554 100644 --- a/src/tests/hackfest3/int/send.py +++ b/src/tests/hackfest3/int/send.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/int/solution/p4_service_handler.py b/src/tests/hackfest3/int/solution/p4_service_handler.py index 558f6a590620ec96e4dd3db88599acd037041268..bcbe3c1d4a9b9002d540be4ac82d412a8ce0387d 100644 --- a/src/tests/hackfest3/int/solution/p4_service_handler.py +++ b/src/tests/hackfest3/int/solution/p4_service_handler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/int/solution/timestamp/receive2.py b/src/tests/hackfest3/int/solution/timestamp/receive2.py index 0c749f9a48316e7826df409ff8852d40af0fb89e..3f32dd68049b5b5d5a8086a49f7906625dbd8112 100644 --- a/src/tests/hackfest3/int/solution/timestamp/receive2.py +++ b/src/tests/hackfest3/int/solution/timestamp/receive2.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/new-probe/agent.py b/src/tests/hackfest3/new-probe/agent.py index 3a89f0f1eb69168e188bdcc0881cf3fe97442d2c..2a91d2cad755ccfab33e973b3efd7d141eb78afd 100644 --- a/src/tests/hackfest3/new-probe/agent.py +++ b/src/tests/hackfest3/new-probe/agent.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/new-probe/connect_to_mininet.sh b/src/tests/hackfest3/new-probe/connect_to_mininet.sh index a82d3767fc2669e7627bee0b5ca60e5626c920f2..ab748e65ac591a93a924afb8b2a0ef3fbbc31935 100755 --- a/src/tests/hackfest3/new-probe/connect_to_mininet.sh +++ b/src/tests/hackfest3/new-probe/connect_to_mininet.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/new-probe/copy.sh b/src/tests/hackfest3/new-probe/copy.sh index a01bc3235ddb62b2daaf8e6f3c1b09e8a28fac9f..d1f54edb180e820f8a544932244ac687f0bbf425 100755 --- a/src/tests/hackfest3/new-probe/copy.sh +++ b/src/tests/hackfest3/new-probe/copy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/new-probe/ping2.py b/src/tests/hackfest3/new-probe/ping2.py index a58c68c91bf50dfe0bea6fc81b4709d006a21351..4934578e58bc03d9595efe1189efdce2cab4e4d8 100644 --- a/src/tests/hackfest3/new-probe/ping2.py +++ b/src/tests/hackfest3/new-probe/ping2.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/new-probe/solution/agent.py b/src/tests/hackfest3/new-probe/solution/agent.py index 058caa7fb8b56e13ed8d4d532515c71f1d3934cd..999e20060f3b6bfc31fb1e11273af7789cf0f367 100644 --- a/src/tests/hackfest3/new-probe/solution/agent.py +++ b/src/tests/hackfest3/new-probe/solution/agent.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/new-probe/solution/connect_to_mininet.sh b/src/tests/hackfest3/new-probe/solution/connect_to_mininet.sh index a82d3767fc2669e7627bee0b5ca60e5626c920f2..ab748e65ac591a93a924afb8b2a0ef3fbbc31935 100755 --- a/src/tests/hackfest3/new-probe/solution/connect_to_mininet.sh +++ b/src/tests/hackfest3/new-probe/solution/connect_to_mininet.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/new-probe/solution/copy.sh b/src/tests/hackfest3/new-probe/solution/copy.sh index a01bc3235ddb62b2daaf8e6f3c1b09e8a28fac9f..d1f54edb180e820f8a544932244ac687f0bbf425 100755 --- a/src/tests/hackfest3/new-probe/solution/copy.sh +++ b/src/tests/hackfest3/new-probe/solution/copy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/new-probe/solution/ping2.py b/src/tests/hackfest3/new-probe/solution/ping2.py index 7f3a97c83bd0734e60874f90873e58bfad4e5ae7..87b8323a4e29c531885597ed6685332c804b5552 100644 --- a/src/tests/hackfest3/new-probe/solution/ping2.py +++ b/src/tests/hackfest3/new-probe/solution/ping2.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/probe/monitoring_kpis.py b/src/tests/hackfest3/probe/monitoring_kpis.py index 880977a2f62069586efdb398b8b3b5d3ac20dac0..25a1eab66bc4bc2b9567879a395d33ae3eea6689 100644 --- a/src/tests/hackfest3/probe/monitoring_kpis.py +++ b/src/tests/hackfest3/probe/monitoring_kpis.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/probe/probe-tfs/Cargo.toml b/src/tests/hackfest3/probe/probe-tfs/Cargo.toml index fb5db98bf5233e905d83b7f9fe06d44a71c3a0fd..5ee07d7844ea4a2b42970f9ff09c6dc5db22207c 100644 --- a/src/tests/hackfest3/probe/probe-tfs/Cargo.toml +++ b/src/tests/hackfest3/probe/probe-tfs/Cargo.toml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/probe/probe-tfs/build.rs b/src/tests/hackfest3/probe/probe-tfs/build.rs index 1dda249d16b3c571676a254f2178f772fb765c81..0d9af6c48a1017e99976948f4824041a2d54f25d 100644 --- a/src/tests/hackfest3/probe/probe-tfs/build.rs +++ b/src/tests/hackfest3/probe/probe-tfs/build.rs @@ -1,5 +1,5 @@ /** - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/probe/probe-tfs/connect_to_mininet.sh b/src/tests/hackfest3/probe/probe-tfs/connect_to_mininet.sh index bba3eaa9a985f3e546f9df2681879faef0a9b83e..2a71cbb151d4f4c2249d801773341289aedc32dc 100755 --- a/src/tests/hackfest3/probe/probe-tfs/connect_to_mininet.sh +++ b/src/tests/hackfest3/probe/probe-tfs/connect_to_mininet.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/probe/probe-tfs/deploy.sh b/src/tests/hackfest3/probe/probe-tfs/deploy.sh index 733f02d11ecd4a9de90898b210b2fe9b579447f2..c18e96559d8d90f9328fe7c77fa66c2ca374665f 100755 --- a/src/tests/hackfest3/probe/probe-tfs/deploy.sh +++ b/src/tests/hackfest3/probe/probe-tfs/deploy.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/probe/probe-tfs/src/agent.rs b/src/tests/hackfest3/probe/probe-tfs/src/agent.rs index 4221cbe28ba75021d2b7c2de6dbef46a043cc2bb..749e42a6c81ce0523ae2cf52a29e9c90c43f48e7 100644 --- a/src/tests/hackfest3/probe/probe-tfs/src/agent.rs +++ b/src/tests/hackfest3/probe/probe-tfs/src/agent.rs @@ -1,5 +1,5 @@ /** - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/probe/probe-tfs/src/ping.rs b/src/tests/hackfest3/probe/probe-tfs/src/ping.rs index 3c118c98782a4cb5def9a654edbe55186bbf3df7..bec984b66cb24ee6e6f3dc707fe9cd392b5ebb28 100644 --- a/src/tests/hackfest3/probe/probe-tfs/src/ping.rs +++ b/src/tests/hackfest3/probe/probe-tfs/src/ping.rs @@ -1,5 +1,5 @@ /** - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/run_test_01_bootstrap.sh b/src/tests/hackfest3/run_test_01_bootstrap.sh index 8eb7e75dc8d2d964b447bb4eb78b15c79a7634d7..fc80fa48f8284f6561a113c67c4081c9143b69c4 100755 --- a/src/tests/hackfest3/run_test_01_bootstrap.sh +++ b/src/tests/hackfest3/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/run_test_02_create_service.sh b/src/tests/hackfest3/run_test_02_create_service.sh index 50eb0732b364d0f560aafceae79b73662279cf05..86ddf10a25969fd4388bb1cb22d0a889a1366c3f 100755 --- a/src/tests/hackfest3/run_test_02_create_service.sh +++ b/src/tests/hackfest3/run_test_02_create_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/run_test_03_delete_service.sh b/src/tests/hackfest3/run_test_03_delete_service.sh index 15f6e02c76ffccb70c01d35433133e36e896905c..92a058c50cb2b65cff4dd5a07e66e3c159aed1dd 100755 --- a/src/tests/hackfest3/run_test_03_delete_service.sh +++ b/src/tests/hackfest3/run_test_03_delete_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/run_test_04_cleanup.sh b/src/tests/hackfest3/run_test_04_cleanup.sh index db02155a80b002c01e896b580ee07caa65cb9db6..248e1b22d128c64ea97215971b1e717137a9add3 100755 --- a/src/tests/hackfest3/run_test_04_cleanup.sh +++ b/src/tests/hackfest3/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/setup.sh b/src/tests/hackfest3/setup.sh index 0454f4b10286d05eeacc33c73c855906d0ab2c4f..cc05ea6c6df29d29cfcadcd0ae3010f13d3ac12c 100755 --- a/src/tests/hackfest3/setup.sh +++ b/src/tests/hackfest3/setup.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/tests/BuildDescriptors.py b/src/tests/hackfest3/tests/BuildDescriptors.py index 98b78863318a7ad682fc5f970d44d02240b45a26..cfd29eea0cb80306f402ef71530016599b570eb1 100644 --- a/src/tests/hackfest3/tests/BuildDescriptors.py +++ b/src/tests/hackfest3/tests/BuildDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/tests/LoadDescriptors.py b/src/tests/hackfest3/tests/LoadDescriptors.py index b232935f4675d718d55e67fe3a76012a39398dda..407d5b6dc6b46ba7dd920cb1f60be391f839bda7 100644 --- a/src/tests/hackfest3/tests/LoadDescriptors.py +++ b/src/tests/hackfest3/tests/LoadDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/tests/Objects.py b/src/tests/hackfest3/tests/Objects.py index 942e1f4b12a9f4163d371ddbe5f87ac9f90055a9..0d49747b89647997d9f2aafbccc8aacc137793a4 100644 --- a/src/tests/hackfest3/tests/Objects.py +++ b/src/tests/hackfest3/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/tests/__init__.py b/src/tests/hackfest3/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/hackfest3/tests/__init__.py +++ b/src/tests/hackfest3/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/tests/test_functional_bootstrap.py b/src/tests/hackfest3/tests/test_functional_bootstrap.py index 97269217336986a6a143a4a7ef94bd8b0710e9b0..0f4ea07a370593bf38c8c602311296bc5fb4f2c6 100644 --- a/src/tests/hackfest3/tests/test_functional_bootstrap.py +++ b/src/tests/hackfest3/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/tests/test_functional_cleanup.py b/src/tests/hackfest3/tests/test_functional_cleanup.py index 0a87649a0355256bd6b82163a33e84147bfe8438..59835696445c9f55f179a7cda14152ec0b0f30cd 100644 --- a/src/tests/hackfest3/tests/test_functional_cleanup.py +++ b/src/tests/hackfest3/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/tests/test_functional_create_service.py b/src/tests/hackfest3/tests/test_functional_create_service.py index 6c0a5049e0cf76e937512388ea1a9eb36b126e36..fdd006eb71a359fa7a3b43bb86be713ab5b2b2dd 100644 --- a/src/tests/hackfest3/tests/test_functional_create_service.py +++ b/src/tests/hackfest3/tests/test_functional_create_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/hackfest3/tests/test_functional_delete_service.py b/src/tests/hackfest3/tests/test_functional_delete_service.py index c5821df4ccc1caa2a1d72ed98dbfcb82e9db21b1..8542e671a85511821835a79574d8431c2a3c109e 100644 --- a/src/tests/hackfest3/tests/test_functional_delete_service.py +++ b/src/tests/hackfest3/tests/test_functional_delete_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/__init__.py b/src/tests/oeccpsc22/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/oeccpsc22/__init__.py +++ b/src/tests/oeccpsc22/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/delete_all.sh b/src/tests/oeccpsc22/delete_all.sh index c0d39fa8bd690ebfe13bea321f94f769d5817079..3c3cd7d1277f521aa34b7165a349fed66b8bbaa5 100755 --- a/src/tests/oeccpsc22/delete_all.sh +++ b/src/tests/oeccpsc22/delete_all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/deploy_all.sh b/src/tests/oeccpsc22/deploy_all.sh index 737230346593bff3840cf7097fcf726242f84ce4..7620bd8b4c50c8236c005dccc0443a4d52999b4e 100755 --- a/src/tests/oeccpsc22/deploy_all.sh +++ b/src/tests/oeccpsc22/deploy_all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/deploy_dom1.sh b/src/tests/oeccpsc22/deploy_dom1.sh index 81fb9984450461f46e9011c7ef49dfe3070fc371..cf7ccf82007557b80e03b8efcde97ab1af537745 100755 --- a/src/tests/oeccpsc22/deploy_dom1.sh +++ b/src/tests/oeccpsc22/deploy_dom1.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/deploy_dom2.sh b/src/tests/oeccpsc22/deploy_dom2.sh index 93fff1d15a56ceb20a6d625643453244eb71124e..4fd62edabee2abe455e5723b4931f52accc1cd83 100755 --- a/src/tests/oeccpsc22/deploy_dom2.sh +++ b/src/tests/oeccpsc22/deploy_dom2.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/deploy_specs_dom1.sh b/src/tests/oeccpsc22/deploy_specs_dom1.sh index 2467907771e11e8fd9fa5428f478398644e082cf..759fd07d2463b302d6a5dee6cfce93a04643fa71 100755 --- a/src/tests/oeccpsc22/deploy_specs_dom1.sh +++ b/src/tests/oeccpsc22/deploy_specs_dom1.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/deploy_specs_dom2.sh b/src/tests/oeccpsc22/deploy_specs_dom2.sh index 55be0397beea836782ad3ba26a3765111170b9d4..ca0046ba97db9b8a5125b28ee61fe22802efcd17 100755 --- a/src/tests/oeccpsc22/deploy_specs_dom2.sh +++ b/src/tests/oeccpsc22/deploy_specs_dom2.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/dump_logs.sh b/src/tests/oeccpsc22/dump_logs.sh index db96640b24d1e311b229fd86290ad0732b568b42..d652a240b3351e60cc05d010825f88c7a0affe36 100755 --- a/src/tests/oeccpsc22/dump_logs.sh +++ b/src/tests/oeccpsc22/dump_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/expose_interdomain_dom2.sh b/src/tests/oeccpsc22/expose_interdomain_dom2.sh index c4ab728fe9c1de32e12578fde4e3ce3329409f6b..09c707ce222a0b429056dd9a9595435625dfba79 100755 --- a/src/tests/oeccpsc22/expose_interdomain_dom2.sh +++ b/src/tests/oeccpsc22/expose_interdomain_dom2.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/fast_redeploy.sh b/src/tests/oeccpsc22/fast_redeploy.sh index f4e909eef106a4720d184415d1ec584adb98e1b0..3ee1a2ca93d4345b9d22aa9800a22444691b7a6f 100755 --- a/src/tests/oeccpsc22/fast_redeploy.sh +++ b/src/tests/oeccpsc22/fast_redeploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/nginx-ingress-controller-dom1.yaml b/src/tests/oeccpsc22/nginx-ingress-controller-dom1.yaml index 1815bfbaa481ef269c513f8b55d949127f10bc30..70a0f45f4091a4e6ba94fe7e0fb2012bfe63528c 100644 --- a/src/tests/oeccpsc22/nginx-ingress-controller-dom1.yaml +++ b/src/tests/oeccpsc22/nginx-ingress-controller-dom1.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/nginx-ingress-controller-dom2.yaml b/src/tests/oeccpsc22/nginx-ingress-controller-dom2.yaml index dede032850092733aa9b3136f20ecf078b2ce05a..11e4ccf254d7cb938cd777ce35e77e05eefd604f 100644 --- a/src/tests/oeccpsc22/nginx-ingress-controller-dom2.yaml +++ b/src/tests/oeccpsc22/nginx-ingress-controller-dom2.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/nginx-ingress-http-dom1.yaml b/src/tests/oeccpsc22/nginx-ingress-http-dom1.yaml index 28a16b426e76fb412f0085e7f3a52b710ab0c829..39502bb20df16c4ceadeff0f3fe8fd219d81e640 100644 --- a/src/tests/oeccpsc22/nginx-ingress-http-dom1.yaml +++ b/src/tests/oeccpsc22/nginx-ingress-http-dom1.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,26 +21,40 @@ metadata: spec: ingressClassName: tfs-ingress-class-dom1 rules: - - http: - paths: - - path: /webui(/|$)(.*) - pathType: Prefix - backend: - service: - name: webuiservice - port: - number: 8004 - - path: /grafana(/|$)(.*) - pathType: Prefix - backend: - service: - name: webuiservice - port: - number: 3000 - - path: /()(restconf/.*) - pathType: Prefix - backend: - service: - name: nbiservice - port: - number: 8080 + - http: + paths: + - path: /webui(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 8004 + - path: /grafana(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 3000 + - path: /()(restconf/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 + - path: /()(tfs-api/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 + - path: /()(bmw/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 diff --git a/src/tests/oeccpsc22/nginx-ingress-http-dom2.yaml b/src/tests/oeccpsc22/nginx-ingress-http-dom2.yaml index f6a08de12c4720f0bc75a76215b2a3cdc40eddfe..1c0ff6de94e1cdc208880823e70b7817c36fe97c 100644 --- a/src/tests/oeccpsc22/nginx-ingress-http-dom2.yaml +++ b/src/tests/oeccpsc22/nginx-ingress-http-dom2.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,33 +21,40 @@ metadata: spec: ingressClassName: tfs-ingress-class-dom2 rules: - - http: - paths: - - path: /webui(/|$)(.*) - pathType: Prefix - backend: - service: - name: webuiservice - port: - number: 8004 - - path: /grafana(/|$)(.*) - pathType: Prefix - backend: - service: - name: webuiservice - port: - number: 3000 - - path: /context(/|$)(.*) - pathType: Prefix - backend: - service: - name: contextservice - port: - number: 8080 - - path: /()(restconf/.*) - pathType: Prefix - backend: - service: - name: nbiservice - port: - number: 8080 + - http: + paths: + - path: /webui(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 8004 + - path: /grafana(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 3000 + - path: /()(restconf/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 + - path: /()(tfs-api/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 + - path: /()(bmw/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 diff --git a/src/tests/oeccpsc22/old/deploy_in_kubernetes.sh b/src/tests/oeccpsc22/old/deploy_in_kubernetes.sh index 25b78366f0834d4486b0f2d0d0c3c698bf25ffb7..9786ac913c93a4c580ca402aa28161e2cd2606cb 100755 --- a/src/tests/oeccpsc22/old/deploy_in_kubernetes.sh +++ b/src/tests/oeccpsc22/old/deploy_in_kubernetes.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/old/expose-services-dom1.yaml b/src/tests/oeccpsc22/old/expose-services-dom1.yaml index f6038c388517787e4b9b661b549ec3f988972bd7..8188e49704559cf0026309159405814715900fdf 100644 --- a/src/tests/oeccpsc22/old/expose-services-dom1.yaml +++ b/src/tests/oeccpsc22/old/expose-services-dom1.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/old/expose-services-dom2.yaml b/src/tests/oeccpsc22/old/expose-services-dom2.yaml index ad7dafaa5277b618d795c2a6eafc67699f8e8d6d..181c1d569bdc4e77b0883982c3d28635c99a8690 100644 --- a/src/tests/oeccpsc22/old/expose-services-dom2.yaml +++ b/src/tests/oeccpsc22/old/expose-services-dom2.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/run_test_01_bootstrap.sh b/src/tests/oeccpsc22/run_test_01_bootstrap.sh index 86988ad336566196ad5bb62eb99c8d41255c40f9..1e92bbba32108e3dbad811f06ccd0ad1024da003 100755 --- a/src/tests/oeccpsc22/run_test_01_bootstrap.sh +++ b/src/tests/oeccpsc22/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/run_test_02_create_interdomain_slice.sh b/src/tests/oeccpsc22/run_test_02_create_interdomain_slice.sh index 5c27e9f647c474d258845b6f1daf2cb72f34a9ec..e37b7e40323c18170b962b10dbcb96f3cca62759 100755 --- a/src/tests/oeccpsc22/run_test_02_create_interdomain_slice.sh +++ b/src/tests/oeccpsc22/run_test_02_create_interdomain_slice.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/run_test_03_delete_interdomain_slice.sh b/src/tests/oeccpsc22/run_test_03_delete_interdomain_slice.sh index c3dba775fae1f20d20160c1be180b8b86aff1655..88aec3ce52a1cabd644d1292205ac4a9d8245846 100755 --- a/src/tests/oeccpsc22/run_test_03_delete_interdomain_slice.sh +++ b/src/tests/oeccpsc22/run_test_03_delete_interdomain_slice.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/run_test_04_cleanup.sh b/src/tests/oeccpsc22/run_test_04_cleanup.sh index 2b44f00d09c4eb33ba9f9e3bbd2615feeda02bcc..3ab2df2c03d5cd08c66af26f291fba04e8e4fa41 100755 --- a/src/tests/oeccpsc22/run_test_04_cleanup.sh +++ b/src/tests/oeccpsc22/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/show_deploy.sh b/src/tests/oeccpsc22/show_deploy.sh index 77a8b8781701d660ad517c1714b3ec367b31dd1d..c54d7eface6e79464a93a74f2c1f0db485db1887 100755 --- a/src/tests/oeccpsc22/show_deploy.sh +++ b/src/tests/oeccpsc22/show_deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/tests/Objects_Domain_1.py b/src/tests/oeccpsc22/tests/Objects_Domain_1.py index 19c9324d232ef927ec7ab6ce8419eb5cfa9743d4..e3f8e7fcc41dfd6bc636dac739a9b1efd0cc48d5 100644 --- a/src/tests/oeccpsc22/tests/Objects_Domain_1.py +++ b/src/tests/oeccpsc22/tests/Objects_Domain_1.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/tests/Objects_Domain_2.py b/src/tests/oeccpsc22/tests/Objects_Domain_2.py index 7235290b3823eb6f99b7e8246071623381612a40..b5964b8800d59f466f10aafc22cfbeb4faa45f3c 100644 --- a/src/tests/oeccpsc22/tests/Objects_Domain_2.py +++ b/src/tests/oeccpsc22/tests/Objects_Domain_2.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/tests/Objects_Service.py b/src/tests/oeccpsc22/tests/Objects_Service.py index 3cbe7725cf12e8b7535a048465646441269cec00..1a37592c4e225b543186316cc7fdb837fe759694 100644 --- a/src/tests/oeccpsc22/tests/Objects_Service.py +++ b/src/tests/oeccpsc22/tests/Objects_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/tests/Tools.py b/src/tests/oeccpsc22/tests/Tools.py index 483090f8b8c0e1524bbdf98a5f3208b485c9ddaa..9b61d43fe0da9197ad70ad9b81c54952125e4e50 100644 --- a/src/tests/oeccpsc22/tests/Tools.py +++ b/src/tests/oeccpsc22/tests/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/tests/__init__.py b/src/tests/oeccpsc22/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/oeccpsc22/tests/__init__.py +++ b/src/tests/oeccpsc22/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/tests/test_functional_bootstrap.py b/src/tests/oeccpsc22/tests/test_functional_bootstrap.py index 921b4a4e99389fae126bc91517981217fd7d0017..44427f916328a291748eb0d1d7c2a6429b1278f6 100644 --- a/src/tests/oeccpsc22/tests/test_functional_bootstrap.py +++ b/src/tests/oeccpsc22/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/tests/test_functional_cleanup.py b/src/tests/oeccpsc22/tests/test_functional_cleanup.py index 7d2c37779c899ab25a8d9954ed94df572432d402..862db8e2931526b18b6d60a8e4a6269e111d539e 100644 --- a/src/tests/oeccpsc22/tests/test_functional_cleanup.py +++ b/src/tests/oeccpsc22/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/tests/test_functional_create_interdomain_slice.py b/src/tests/oeccpsc22/tests/test_functional_create_interdomain_slice.py index 760614c400cf408d80d06caa0dfc72a092204876..7e2491dae482238a3ce4dc35508b8e39882c7dbb 100644 --- a/src/tests/oeccpsc22/tests/test_functional_create_interdomain_slice.py +++ b/src/tests/oeccpsc22/tests/test_functional_create_interdomain_slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/oeccpsc22/tests/test_functional_delete_interdomain_slice.py b/src/tests/oeccpsc22/tests/test_functional_delete_interdomain_slice.py index 9bb934d9f61861e17cff9b8da8653a96ced8fb07..0327de366b9cd838ad53a36240bbadb7852cc59a 100644 --- a/src/tests/oeccpsc22/tests/test_functional_delete_interdomain_slice.py +++ b/src/tests/oeccpsc22/tests/test_functional_delete_interdomain_slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/ofc22/.gitlab-ci.yml b/src/tests/ofc22/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..836d70791604bfd6e5b924f60eae77d83fa8b09a --- /dev/null +++ b/src/tests/ofc22/.gitlab-ci.yml @@ -0,0 +1,109 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 ofc22: + variables: + TEST_NAME: 'ofc22' + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . + - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + 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/tests/${TEST_NAME}/**/*.{py,in,sh,yml} + - src/tests/${TEST_NAME}/Dockerfile + - .gitlab-ci.yml + +# Deploy TeraFlowSDN and Execute end-2-end test +end2end_test ofc22: + variables: + TEST_NAME: 'ofc22' + stage: end2end_test + # Disable to force running it after all other tasks + #needs: + # - build ofc22 + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + # Download Docker image to run the test + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}:latest" + + # Check MicroK8s is ready + - microk8s status --wait-ready + - kubectl get pods --all-namespaces + + # Configure TeraFlowSDN deployment + # Uncomment if DEBUG log level is needed for the components + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/sliceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml + - source src/tests/${TEST_NAME}/deploy_specs.sh + #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" + #- export TFS_SKIP_BUILD="YES" + #- export TFS_IMAGE_TAG="latest" + #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" + + # Deploy TeraFlowSDN + - ./deploy/crdb.sh + - ./deploy/nats.sh + - ./deploy/qdb.sh + - ./deploy/expose_dashboard.sh + - ./deploy/tfs.sh + - ./deploy/show.sh + + # Wait for Context to be subscribed to NATS + - while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + + # Run end-to-end tests + - if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi + - > + docker run -t --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest + after_script: + - source src/tests/${TEST_NAME}/deploy_specs.sh + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/deviceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/pathcompservice -c frontend + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/serviceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/sliceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/nbiservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/monitoringservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/ztpservice -c ztpservice + - if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + #coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + 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"' + artifacts: + when: always + reports: + junit: ./src/tests/${TEST_NAME}/report_*.xml diff --git a/src/tests/ofc22/Dockerfile b/src/tests/ofc22/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..b1749469a2a22e4b4da7af0645a53643c649bcae --- /dev/null +++ b/src/tests/ofc22/Dockerfile @@ -0,0 +1,99 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/tests/ofc22 +WORKDIR /var/teraflow/tests/ofc22 +COPY src/tests/ofc22/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/__init__.py ./__init__.py +COPY src/common/*.py ./common/ +COPY src/common/tests/. ./common/tests/ +COPY src/common/tools/. ./common/tools/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +COPY src/monitoring/__init__.py monitoring/__init__.py +COPY src/monitoring/client/. monitoring/client/ +COPY src/e2e_orchestrator/__init__.py e2e_orchestrator/__init__.py +COPY src/e2e_orchestrator/client/. e2e_orchestrator/client/ +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/tests/*.py ./tests/ +COPY src/tests/ofc22/__init__.py ./tests/ofc22/__init__.py +COPY src/tests/ofc22/descriptors_emulated.json ./tests/ofc22/descriptors_emulated.json +COPY src/tests/ofc22/tests/. ./tests/ofc22/tests/ +COPY src/tests/tools/. ./tests/tools/ + +RUN tee ./run_tests.sh < + docker network create -d bridge --subnet=172.254.253.0/24 --gateway=172.254.253.254 + --ip-range=172.254.253.0/24 na-br + - > + docker run -dit --init --name na-t1 --network=na-br --ip 172.254.253.101 + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/startNetconfAgent-tp.sh:/confd/examples.confd/OC23/startNetconfAgent.sh" + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/platform_t1.xml:/confd/examples.confd/OC23/platform.xml" + asgamb1/oc23bgp.img:latest /confd/examples.confd/OC23/startNetconfAgent.sh + - > + docker run -dit --init --name na-t2 --network=na-br --ip 172.254.253.102 + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/startNetconfAgent-tp.sh:/confd/examples.confd/OC23/startNetconfAgent.sh" + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/platform_t2.xml:/confd/examples.confd/OC23/platform.xml" + asgamb1/oc23bgp.img:latest /confd/examples.confd/OC23/startNetconfAgent.sh + - > + docker run -dit --init --name na-r1 --network=na-br --ip 172.254.253.201 + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/startNetconfAgent-mg-on.sh:/confd/examples.confd/OC23/startNetconfAgent.sh" + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/platform_r1.xml:/confd/examples.confd/OC23/platform.xml" + asgamb1/flexscale-node.img:latest /confd/examples.confd/OC23/startNetconfAgent.sh + - > + docker run -dit --init --name na-r2 --network=na-br --ip 172.254.253.202 + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/startNetconfAgent-mg-on.sh:/confd/examples.confd/OC23/startNetconfAgent.sh" + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/platform_r2.xml:/confd/examples.confd/OC23/platform.xml" + asgamb1/flexscale-node.img:latest /confd/examples.confd/OC23/startNetconfAgent.sh + + + # Wait for initialization of Optical Device Node Agents + - sleep 3 + - docker ps -a + - while ! docker logs na-t1 2>&1 | grep -q '*** ConfD OpenConfig NETCONF agent ***'; do sleep 1; done + - while ! docker logs na-t2 2>&1 | grep -q '*** ConfD OpenConfig NETCONF agent ***'; do sleep 1; done + - while ! docker logs na-r1 2>&1 | grep -q '*** ConfD OpenConfig NETCONF agent ***'; do sleep 1; done + - while ! docker logs na-r2 2>&1 | grep -q '*** ConfD OpenConfig NETCONF agent ***'; do sleep 1; done + - sleep 3 + - docker ps -a + + + # Configure TeraFlowSDN deployment + # Uncomment if DEBUG log level is needed for the components + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/sliceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml + - source src/tests/${TEST_NAME}/deploy_specs.sh + #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" + #- export TFS_SKIP_BUILD="YES" + #- export TFS_IMAGE_TAG="latest" + #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" + + # Deploy TeraFlowSDN + - ./deploy/crdb.sh + - ./deploy/nats.sh + - ./deploy/qdb.sh + - ./deploy/expose_dashboard.sh + - ./deploy/tfs.sh + - ./deploy/show.sh + + # Wait for Context to be subscribed to NATS + #- while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do sleep 1; done + #- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + + # Run end-to-end tests + - if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi + - > + docker run -t --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest + + after_script: + # Dump TeraFlowSDN component logs + - source src/tests/${TEST_NAME}/deploy_specs.sh + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/deviceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/pathcompservice -c frontend + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/serviceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/sliceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/nbiservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/opticalcontrollerservice -c server + - if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi + + # Dump Optical Device Node Agents container status and logs + - docker ps -a + - docker logs na-t1 + - docker logs na-t2 + - docker logs na-r1 + - docker logs na-r2 + + # Destroy Optical Device Node Agents + - docker rm -f na-t1 na-t2 na-r1 na-r2 + - docker network rm -f na-br + + # Clean old docker images + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + + #coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + 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"' + artifacts: + when: always + reports: + junit: ./src/tests/${TEST_NAME}/report_*.xml diff --git a/src/tests/ofc24/Dockerfile b/src/tests/ofc24/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..734cf6233e3f9e6b3839c5a054143de57c0a0e92 --- /dev/null +++ b/src/tests/ofc24/Dockerfile @@ -0,0 +1,102 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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/tests/ofc24 +WORKDIR /var/teraflow/tests/ofc24 +COPY src/tests/ofc24/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/__init__.py ./__init__.py +COPY src/common/*.py ./common/ +COPY src/common/tests/. ./common/tests/ +COPY src/common/tools/. ./common/tools/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +COPY src/monitoring/__init__.py monitoring/__init__.py +COPY src/monitoring/client/. monitoring/client/ +COPY src/e2e_orchestrator/__init__.py e2e_orchestrator/__init__.py +COPY src/e2e_orchestrator/client/. e2e_orchestrator/client/ +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/tests/*.py ./tests/ +COPY src/tests/ofc24/__init__.py ./tests/ofc24/__init__.py +COPY src/tests/ofc24/descriptors/topology.json ./tests/ofc24/descriptors/topology.json +COPY src/tests/ofc24/descriptors/service-unidir.json ./tests/ofc24/descriptors/service-unidir.json +COPY src/tests/ofc24/descriptors/service-bidir.json ./tests/ofc24/descriptors/service-bidir.json +COPY src/tests/ofc24/tests/. ./tests/ofc24/tests/ + +RUN tee ./run_tests.sh <&1 | grep -q '*** ConfD OpenConfig NETCONF agent ***'; do sleep 1; done +while ! docker logs na-t2 2>&1 | grep -q '*** ConfD OpenConfig NETCONF agent ***'; do sleep 1; done +while ! docker logs na-r1 2>&1 | grep -q '*** ConfD OpenConfig NETCONF agent ***'; do sleep 1; done +while ! docker logs na-r2 2>&1 | grep -q '*** ConfD OpenConfig NETCONF agent ***'; do sleep 1; done +sleep 3 +docker ps -a + + +echo +echo "Dump Node Agent status:" +echo "-----------------------" +docker ps -a +docker logs na-t1 +docker logs na-t2 +docker logs na-r1 +docker logs na-r2 + + +echo "Done!" diff --git a/src/tests/ofc24/deploy_specs.sh b/src/tests/ofc24/deploy_specs.sh new file mode 100755 index 0000000000000000000000000000000000000000..4cd0e7fa0c1d64ff965bcf4b66042fe3fc8fd557 --- /dev/null +++ b/src/tests/ofc24/deploy_specs.sh @@ -0,0 +1,170 @@ +#!/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. + + +# ----- TeraFlowSDN ------------------------------------------------------------ + +# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to. +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 service slice nbi webui load_generator" +export TFS_COMPONENTS="context device pathcomp service slice nbi webui" + +# Uncomment to activate Monitoring +#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" + +# Uncomment to activate BGP-LS Speaker +#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker" + +# Uncomment to activate Optical Controller +# To manage optical connections, "service" requires "opticalcontroller" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "opticalcontroller" only if "service" is already in TFS_COMPONENTS, and re-export it. +if [[ "$TFS_COMPONENTS" == *"service"* ]]; then + BEFORE="${TFS_COMPONENTS% service*}" + AFTER="${TFS_COMPONENTS#* service}" + export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}" +fi + +# Uncomment to activate ZTP +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" + +# Uncomment to activate Optical CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" + +# Uncomment to activate L3 CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector" + +# Uncomment to activate TE +#export TFS_COMPONENTS="${TFS_COMPONENTS} te" + +# Uncomment to activate Forecaster +#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster" + +# Uncomment to activate E2E Orchestrator +#export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator" + +# Set the tag you want to use for your images. +export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy TFS to. +export TFS_K8S_NAMESPACE="tfs" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Uncomment to monitor performance of components +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" + +# Uncomment when deploying Optical CyberSecurity +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.yaml" + +# Set the new Grafana admin password +export TFS_GRAFANA_PASSWORD="admin123+" + +# Disable skip-build flag to rebuild the Docker images. +export TFS_SKIP_BUILD="" + + +# ----- CockroachDB ------------------------------------------------------------ + +# Set the namespace where CockroackDB will be deployed. +export CRDB_NAMESPACE="crdb" + +# Set the external port CockroackDB Postgre SQL interface will be exposed to. +export CRDB_EXT_PORT_SQL="26257" + +# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to. +export CRDB_EXT_PORT_HTTP="8081" + +# Set the database username to be used by Context. +export CRDB_USERNAME="tfs" + +# Set the database user's password to be used by Context. +export CRDB_PASSWORD="tfs123" + +# Set the database name to be used by Context. +export CRDB_DATABASE="tfs" + +# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/crdb.sh for additional details +export CRDB_DEPLOY_MODE="single" + +# Disable flag for dropping database, if it exists. +export CRDB_DROP_DATABASE_IF_EXISTS="YES" + +# Disable flag for re-deploying CockroachDB from scratch. +export CRDB_REDEPLOY="" + + +# ----- NATS ------------------------------------------------------------------- + +# Set the namespace where NATS will be deployed. +export NATS_NAMESPACE="nats" + +# Set the external port NATS Client interface will be exposed to. +export NATS_EXT_PORT_CLIENT="4222" + +# Set the external port NATS HTTP Mgmt GUI interface will be exposed to. +export NATS_EXT_PORT_HTTP="8222" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb" + +# Set the external port QuestDB Postgre SQL interface will be exposed to. +export QDB_EXT_PORT_SQL="8812" + +# Set the external port QuestDB Influx Line Protocol interface will be exposed to. +export QDB_EXT_PORT_ILP="9009" + +# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to. +export QDB_EXT_PORT_HTTP="9000" + +# Set the database username to be used for QuestDB. +export QDB_USERNAME="admin" + +# Set the database user's password to be used for QuestDB. +export QDB_PASSWORD="quest" + +# Set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis" + +# Set the table name to be used by Slice for plotting groups. +export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups" + +# Disable flag for dropping tables if they exist. +export QDB_DROP_TABLES_IF_EXIST="YES" + +# Disable flag for re-deploying QuestDB from scratch. +export QDB_REDEPLOY="" + + +# ----- K8s Observability ------------------------------------------------------ + +# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to. +export PROM_EXT_PORT_HTTP="9090" + +# Set the external port Grafana HTTP Dashboards will be exposed to. +export GRAF_EXT_PORT_HTTP="3000" diff --git a/src/tests/ofc24/descriptors/old/1.context.json b/src/tests/ofc24/descriptors/old/1.context.json new file mode 100755 index 0000000000000000000000000000000000000000..36b3c44fd61fdec9d208a82a11d5a16c3671d004 --- /dev/null +++ b/src/tests/ofc24/descriptors/old/1.context.json @@ -0,0 +1,19 @@ +{ + "contexts": [ + { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_ids": [], + "service_ids": [] + } + ], + "topologies": [ + { + "topology_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_uuid": {"uuid": "admin"} + }, + "device_ids": [], + "link_ids": [] + } + ] +} diff --git a/src/tests/ofc24/descriptors/old/2.device1.json b/src/tests/ofc24/descriptors/old/2.device1.json new file mode 100755 index 0000000000000000000000000000000000000000..c5a189e3165f4d170fb1c9e8b13314a202a84630 --- /dev/null +++ b/src/tests/ofc24/descriptors/old/2.device1.json @@ -0,0 +1,91 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "T1" + } + }, + "device_type": "optical-transponder", + "device_drivers": [ + 11 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "T1" + } + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + } + } + ], + "device_operational_status": 1, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "10.0.2.4" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "2023" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "username": "admin", + "password": "admin", + "force_running": false, + "hostkey_verify": false, + "look_for_keys": false, + "allow_agent": false, + "commit_per_rule": false, + "device_params": { + "name": "default" + }, + "manager_params": { + "timeout": 120 + }, + "endpoints": [ + { + "sample_types": [ + 101, + 102, + 201, + 202 + ], + "type": "optical", + "uuid": "1" + } + ] + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/tests/ofc24/descriptors/old/3.device2.json b/src/tests/ofc24/descriptors/old/3.device2.json new file mode 100755 index 0000000000000000000000000000000000000000..a38fc290508788637a1ebc1cef7ddc54514a46fe --- /dev/null +++ b/src/tests/ofc24/descriptors/old/3.device2.json @@ -0,0 +1,91 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "T2" + } + }, + "device_type": "optical-transponder", + "device_drivers": [ + 11 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "T2" + } + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + }, + "endpoint_uuid": { + "uuid": "6" + } + } + } + ], + "device_operational_status": 1, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "10.0.2.4" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "2024" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "username": "admin", + "password": "admin", + "force_running": false, + "hostkey_verify": false, + "look_for_keys": false, + "allow_agent": false, + "commit_per_rule": false, + "device_params": { + "name": "default" + }, + "manager_params": { + "timeout": 120 + }, + "endpoints": [ + { + "sample_types": [ + 101, + 102, + 201, + 202 + ], + "type": "optical", + "uuid": "6" + } + ] + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/tests/ofc24/descriptors/old/4.device3_R1.json b/src/tests/ofc24/descriptors/old/4.device3_R1.json new file mode 100755 index 0000000000000000000000000000000000000000..1c110f20ecb6c2d5081044c961dbf50e3d4c816d --- /dev/null +++ b/src/tests/ofc24/descriptors/old/4.device3_R1.json @@ -0,0 +1,188 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "device_type": "optical-roadm", + "device_drivers": [ + 11 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + }, + "endpoint_uuid": { + "uuid": "2" + } + } + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + }, + "endpoint_uuid": { + "uuid": "3" + } + } + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + }, + "endpoint_uuid": { + "uuid": "12" + } + } + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + }, + "endpoint_uuid": { + "uuid": "13" + } + } + } + ], + "device_operational_status": 1, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "10.0.2.4" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "2025" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "username": "admin", + "password": "admin", + "force_running": false, + "hostkey_verify": false, + "look_for_keys": false, + "allow_agent": false, + "commit_per_rule": false, + "device_params": { + "name": "default" + }, + "manager_params": { + "timeout": 120 + }, + "endpoints": [ + { + "sample_types": [ + 101, + 102, + 201, + 202 + ], + "type": "optical", + "uuid": "2" + }, + { + "sample_types": [ + 101, + 102, + 201, + 202 + ], + "type": "optical", + "uuid": "3" + }, + { + "sample_types": [ + 101, + 102, + 201, + 202 + ], + "type": "optical", + "uuid": "12" + }, + { + "sample_types": [ + 101, + 102, + 201, + 202 + ], + "type": "optical", + "uuid": "13" + } + + ] + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/tests/ofc24/descriptors/old/5.device4_R2.json b/src/tests/ofc24/descriptors/old/5.device4_R2.json new file mode 100755 index 0000000000000000000000000000000000000000..43ebda5c6c139b4f2d8b2a51e7f42a257a38b4d4 --- /dev/null +++ b/src/tests/ofc24/descriptors/old/5.device4_R2.json @@ -0,0 +1,189 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "device_type": "optical-roadm", + "device_drivers": [ + 11 + ], + "device_endpoints": [ + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + }, + "endpoint_uuid": { + "uuid": "4" + } + } + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + }, + "endpoint_uuid": { + "uuid": "5" + } + } + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + }, + "endpoint_uuid": { + "uuid": "14" + } + } + }, + { + "endpoint_id": { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + }, + "endpoint_uuid": { + "uuid": "15" + } + } + } + + ], + "device_operational_status": 1, + "device_config": { + "config_rules": [ + { + "action": 1, + "custom": { + "resource_key": "_connect/address", + "resource_value": "10.0.2.4" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/port", + "resource_value": "2026" + } + }, + { + "action": 1, + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "username": "admin", + "password": "admin", + "force_running": false, + "hostkey_verify": false, + "look_for_keys": false, + "allow_agent": false, + "commit_per_rule": false, + "device_params": { + "name": "default" + }, + "manager_params": { + "timeout": 120 + }, + "endpoints": [ + { + "sample_types": [ + 101, + 102, + 201, + 202 + ], + "type": "optical", + "uuid": "4" + }, + { + "sample_types": [ + 101, + 102, + 201, + 202 + ], + "type": "optical", + "uuid": "5" + }, + { + "sample_types": [ + 101, + 102, + 201, + 202 + ], + "type": "optical", + "uuid": "14" + }, + { + "sample_types": [ + 101, + 102, + 201, + 202 + ], + "type": "optical", + "uuid": "15" + } + + ] + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/tests/ofc24/descriptors/old/6.links.json b/src/tests/ofc24/descriptors/old/6.links.json new file mode 100755 index 0000000000000000000000000000000000000000..eb2d004fc8e5484c5ae9eaafa6ec86efb49eb729 --- /dev/null +++ b/src/tests/ofc24/descriptors/old/6.links.json @@ -0,0 +1,28 @@ +{ "links": [ + {"link_id": {"link_uuid": {"uuid": "T1->R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "12"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1->T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2"}}, + {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1->R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "3"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "14"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2->R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "4"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "13"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T2->R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "15"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2->T2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "5"}}, + {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}} + ]} +] + +} diff --git a/src/tests/ofc24/descriptors/service-bidir.json b/src/tests/ofc24/descriptors/service-bidir.json new file mode 100755 index 0000000000000000000000000000000000000000..05547a19d2d375d2a8202266b1a1a5ffcfe46eb6 --- /dev/null +++ b/src/tests/ofc24/descriptors/service-bidir.json @@ -0,0 +1,22 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "service_uuid": {"uuid": "optical-connection"} + }, + "service_type": 6, + "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}}, + {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}} + ], + "service_constraints": [ + {"custom": {"constraint_type": "bandwidth[gbps]", "constraint_value": "100.0"}}, + {"custom": {"constraint_type": "bidirectionality", "constraint_value": "1"}}, + {"custom": {"constraint_type": "optical-band-width[GHz]", "constraint_value": "200"}} + ], + "service_config": {"config_rules": []} + } + ] +} diff --git a/src/tests/ofc24/descriptors/service-unidir.json b/src/tests/ofc24/descriptors/service-unidir.json new file mode 100755 index 0000000000000000000000000000000000000000..d9b4e88479c17aaf03f65d08b8d4b0ca22121e74 --- /dev/null +++ b/src/tests/ofc24/descriptors/service-unidir.json @@ -0,0 +1,22 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "service_uuid": {"uuid": "optical-connection"} + }, + "service_type": 6, + "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}}, + {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}} + ], + "service_constraints": [ + {"custom": {"constraint_type": "bandwidth[gbps]", "constraint_value": "100.0"}}, + {"custom": {"constraint_type": "bidirectionality", "constraint_value": "0"}}, + {"custom": {"constraint_type": "optical-band-width[GHz]", "constraint_value": "200"}} + ], + "service_config": {"config_rules": []} + } + ] +} diff --git a/src/tests/ofc24/descriptors/topology.json b/src/tests/ofc24/descriptors/topology.json new file mode 100644 index 0000000000000000000000000000000000000000..85bbad55eb8608d2d2a7abad7fffab8fffdae682 --- /dev/null +++ b/src/tests/ofc24/descriptors/topology.json @@ -0,0 +1,150 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "T1"}}, "device_type": "optical-transponder", "device_drivers": [11], + "device_operational_status": 1, + "device_endpoints": [ + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.101"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, + "device_params": {"name": "default"}, "manager_params": {"timeout": 120}, + "endpoints": [{"uuid": "1", "type": "optical", "sample_types": [101, 102, 201, 202]}] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "T2"}}, "device_type": "optical-transponder", "device_drivers": [11], + "device_operational_status": 1, + "device_endpoints": [ + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.102"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, + "device_params": {"name": "default"}, "manager_params": {"timeout": 120}, + "endpoints": [{"uuid": "6", "type": "optical", "sample_types": [101, 102, 201, 202]}] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "device_type": "optical-roadm", "device_drivers": [11], + "device_operational_status": 1, + "device_endpoints": [ + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "3"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "12"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "13"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.201"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, + "device_params": {"name": "default"}, "manager_params": {"timeout": 120}, + "endpoints": [ + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "2"}, + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "3"}, + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "12"}, + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "13"} + ]} + }}] + } + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "optical-roadm", "device_drivers": [11], + "device_operational_status": 1, + "device_endpoints": [ + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "4"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "5"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "14"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "15"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.202"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, + "device_params": {"name": "default"}, "manager_params": {"timeout": 120}, + "endpoints": [ + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "4"}, + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "5"}, + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "14"}, + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "15"} + ] + }}} + ]} + } + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "T1->R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "12"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1->T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2"}}, + {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1->R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "3"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "14"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2->R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "4"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "13"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T2->R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "15"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2->T2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "5"}}, + {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}} + ]} + ] +} diff --git a/src/tests/ofc24/destroy-node-agents.sh b/src/tests/ofc24/destroy-node-agents.sh new file mode 100755 index 0000000000000000000000000000000000000000..bda864727e1cd6dcbb2ee60fb52a754f21476afb --- /dev/null +++ b/src/tests/ofc24/destroy-node-agents.sh @@ -0,0 +1,22 @@ +#!/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. + +echo +echo "Clean-up:" +echo "---------" +docker rm -f na-t1 na-t2 na-r1 na-r2 +docker network rm na-br + +echo "Done!" diff --git a/src/tests/ofc24/node-agents-config/platform_r1.xml b/src/tests/ofc24/node-agents-config/platform_r1.xml new file mode 100644 index 0000000000000000000000000000000000000000..b9412d1bda3e5eafc17fc6d3233d2bcc1dffec04 --- /dev/null +++ b/src/tests/ofc24/node-agents-config/platform_r1.xml @@ -0,0 +1,136 @@ + + + + + + 2 + + 2 + + + + MG_ON_PORT_TYPE + + MG_ON_PORT_TYPE + MG_ON_OPTICAL_PORT_WAVEBAND + + + + MG_ON_PORT_DIRECTION + + MG_ON_PORT_DIRECTION + OUTPUT + + + + MG_ON_PORT_DEGREE + + MG_ON_PORT_DEGREE + D1 + + + + + + 12 + + 12 + + + + MG_ON_PORT_TYPE + + MG_ON_PORT_TYPE + MG_ON_OPTICAL_PORT_WAVEBAND + + + + MG_ON_PORT_DIRECTION + + MG_ON_PORT_DIRECTION + INPUT + + + + MG_ON_PORT_DEGREE + + MG_ON_PORT_DEGREE + D1 + + + + + + 3 + + 3 + + + + MG_ON_PORT_TYPE + + MG_ON_PORT_TYPE + MG_ON_OPTICAL_PORT_WAVEBAND + + + + MG_ON_PORT_DIRECTION + + MG_ON_PORT_DIRECTION + OUTPUT + + + + MG_ON_PORT_DEGREE + + MG_ON_PORT_DEGREE + D2 + + + + + + 13 + + 13 + + + + MG_ON_PORT_TYPE + + MG_ON_PORT_TYPE + MG_ON_OPTICAL_PORT_WAVEBAND + + + + MG_ON_PORT_DIRECTION + + MG_ON_PORT_DIRECTION + INPUT + + + + MG_ON_PORT_DEGREE + + MG_ON_PORT_DEGREE + D2 + + + + + + diff --git a/src/tests/ofc24/node-agents-config/platform_r2.xml b/src/tests/ofc24/node-agents-config/platform_r2.xml new file mode 100644 index 0000000000000000000000000000000000000000..317203483a89348c51e354a6c7973239b494f42d --- /dev/null +++ b/src/tests/ofc24/node-agents-config/platform_r2.xml @@ -0,0 +1,136 @@ + + + + + + 4 + + 4 + + + + MG_ON_PORT_TYPE + + MG_ON_PORT_TYPE + MG_ON_OPTICAL_PORT_WAVEBAND + + + + MG_ON_PORT_DIRECTION + + MG_ON_PORT_DIRECTION + OUTPUT + + + + MG_ON_PORT_DEGREE + + MG_ON_PORT_DEGREE + D1 + + + + + + 14 + + 14 + + + + MG_ON_PORT_TYPE + + MG_ON_PORT_TYPE + MG_ON_OPTICAL_PORT_WAVEBAND + + + + MG_ON_PORT_DIRECTION + + MG_ON_PORT_DIRECTION + INPUT + + + + MG_ON_PORT_DEGREE + + MG_ON_PORT_DEGREE + D1 + + + + + + 5 + + 5 + + + + MG_ON_PORT_TYPE + + MG_ON_PORT_TYPE + MG_ON_OPTICAL_PORT_WAVEBAND + + + + MG_ON_PORT_DIRECTION + + MG_ON_PORT_DIRECTION + OUTPUT + + + + MG_ON_PORT_DEGREE + + MG_ON_PORT_DEGREE + D2 + + + + + + 15 + + 15 + + + + MG_ON_PORT_TYPE + + MG_ON_PORT_TYPE + MG_ON_OPTICAL_PORT_WAVEBAND + + + + MG_ON_PORT_DIRECTION + + MG_ON_PORT_DIRECTION + INPUT + + + + MG_ON_PORT_DEGREE + + MG_ON_PORT_DEGREE + D2 + + + + + + diff --git a/src/tests/ofc24/node-agents-config/platform_t1.xml b/src/tests/ofc24/node-agents-config/platform_t1.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ef7a1a4e51cc69986277d1d30ffe1452227d065 --- /dev/null +++ b/src/tests/ofc24/node-agents-config/platform_t1.xml @@ -0,0 +1,311 @@ + + + + + + device + + device + + + MellanoxSwitch + SSSA-CNIT + 1.0.0 + 1.0.0 + 1.0.0 + 610610 + typex:OPERATING_SYSTEM + + + + channel-1 + + channel-1 + + + channel-1 + typex:OPTICAL_CHANNEL + + + + 191600000 + 100 + 0 + transceiver-1 + + + 191600000 + 0 + 0 + transceiver-1 + 1 + + 0 + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + 0 + + + + + + transceiver-1 + + transceiver-1 + + + transceiver-1 + typex:TRANSCEIVER + + + + true + typex:QSFP56_DD_TYPE1 + typex:ETH_400GBASE_ZR + typex:FEC_AUTO + typex:TYPE_DIGITAL_COHERENT_OPTIC + + + true + typex:QSFP56_DD_TYPE1 + typex:ETH_400GBASE_ZR + typex:FEC_AUTO + typex:TYPE_DIGITAL_COHERENT_OPTIC + Cisco + 400zr-QSFP-DD + 01 + 1567321 + + + + 1 + + 1 + channel-1 + + + + + + + + port-1 + + port-1 + + + port-1 + typex:PORT + + + + channel-1 + + channel-1 + + + channel-1 + + + + + + onos-index + + onos-index + 4 + + + onos-index + 4 + + + + odtn-port-type + + odtn-port-type + line + + + odtn-port-type + line + + + + + + + + + + + + 1 + + 1 + Logical channel 1 + DISABLED + type:PROT_OTN + NONE + + + 1 + Logical channel 1 + DISABLED + type:PROT_OTN + NONE + UP + + + + transceiver-1 + + + transceiver-1 + + + + + test1 + test1 + + + test1 + test1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0 + + + + + + 1 + + 1 + Optical channel assigned 100 + 100 + OPTICAL_CHANNEL + channel-1 + + + 1 + Optical channel assigned 100 + 100 + OPTICAL_CHANNEL + channel-1 + + + + + + + + 1 + + 1 + FEC1 + Ericsson + + + + 2 + + 2 + FEC2 + Ericsson + + + + + diff --git a/src/tests/ofc24/node-agents-config/platform_t2.xml b/src/tests/ofc24/node-agents-config/platform_t2.xml new file mode 100644 index 0000000000000000000000000000000000000000..f071badaa963e3b5affc4912798c01051887a056 --- /dev/null +++ b/src/tests/ofc24/node-agents-config/platform_t2.xml @@ -0,0 +1,311 @@ + + + + + + device + + device + + + MellanoxSwitch + SSSA-CNIT + 1.0.0 + 1.0.0 + 1.0.0 + 610610 + typex:OPERATING_SYSTEM + + + + channel-6 + + channel-6 + + + channel-6 + typex:OPTICAL_CHANNEL + + + + 191600000 + 100 + 0 + transceiver-6 + + + 191600000 + 0 + 0 + transceiver-6 + 1 + + 0 + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + 0 + + + + + + transceiver-6 + + transceiver-6 + + + transceiver-6 + typex:TRANSCEIVER + + + + true + typex:QSFP56_DD_TYPE1 + typex:ETH_400GBASE_ZR + typex:FEC_AUTO + typex:TYPE_DIGITAL_COHERENT_OPTIC + + + true + typex:QSFP56_DD_TYPE1 + typex:ETH_400GBASE_ZR + typex:FEC_AUTO + typex:TYPE_DIGITAL_COHERENT_OPTIC + Cisco + 400zr-QSFP-DD + 01 + 1567321 + + + + 1 + + 1 + channel-6 + + + + + + + + port-6 + + port-6 + + + port-6 + typex:PORT + + + + channel-6 + + channel-6 + + + channel-6 + + + + + + onos-index + + onos-index + 4 + + + onos-index + 4 + + + + odtn-port-type + + odtn-port-type + line + + + odtn-port-type + line + + + + + + + + + + + + 4 + + 4 + Logical channel 4 + DISABLED + type:PROT_OTN + NONE + + + 4 + Logical channel 4 + DISABLED + type:PROT_OTN + NONE + UP + + + + transceiver-6 + + + transceiver-6 + + + + + test1 + test1 + + + test1 + test1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0 + + + + + + 1 + + 1 + Optical channel assigned 100 + 100 + OPTICAL_CHANNEL + channel-6 + + + 1 + Optical channel assigned 100 + 100 + OPTICAL_CHANNEL + channel-6 + + + + + + + + 1 + + 1 + FEC1 + Ericsson + + + + 2 + + 2 + FEC2 + Ericsson + + + + + diff --git a/src/tests/ofc24/node-agents-config/startNetconfAgent-mg-on.sh b/src/tests/ofc24/node-agents-config/startNetconfAgent-mg-on.sh new file mode 100755 index 0000000000000000000000000000000000000000..3c34298d9fa9318fcf00b66d44414dde70052689 --- /dev/null +++ b/src/tests/ofc24/node-agents-config/startNetconfAgent-mg-on.sh @@ -0,0 +1,28 @@ +#!/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. + +echo 'Cleaning...' +make clean + +echo 'Rebuilding...' +make all + +echo 'Initializing database...' +cp platform.xml confd-cdb/ + +echo 'Starting ConfD...' +make start2 + +echo 'ConfD Ready!!' diff --git a/src/tests/ofc24/node-agents-config/startNetconfAgent-tp.sh b/src/tests/ofc24/node-agents-config/startNetconfAgent-tp.sh new file mode 100755 index 0000000000000000000000000000000000000000..c6479a9aa3f5510f0ad00953b2d9aff9c922cee1 --- /dev/null +++ b/src/tests/ofc24/node-agents-config/startNetconfAgent-tp.sh @@ -0,0 +1,30 @@ +#!/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. + +echo 'Cleaning...' +make clean + +echo 'Rebuilding...' +make all + +echo 'Initializing database...' +cp platform.xml confd-cdb/ +cp interfaces.xml confd-cdb/ +cp bgp.xml confd-cdb/ + +echo 'Starting ConfD...' +make start2 + +echo 'ConfD Ready!!' diff --git a/src/tests/ofc24/requirements.in b/src/tests/ofc24/requirements.in new file mode 100644 index 0000000000000000000000000000000000000000..468af1a17931d6e545647e3e7a057433d74826b3 --- /dev/null +++ b/src/tests/ofc24/requirements.in @@ -0,0 +1,15 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +requests==2.27.* diff --git a/src/tests/ofc24/run-tests-locally.sh b/src/tests/ofc24/run-tests-locally.sh new file mode 100755 index 0000000000000000000000000000000000000000..3a273e70674e76f77067851c78fe6b05507611d1 --- /dev/null +++ b/src/tests/ofc24/run-tests-locally.sh @@ -0,0 +1,22 @@ +#!/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. + +source ~/tfs-ctrl/tfs_runtime_env_vars.sh +pytest --verbose --log-level=INFO ~/tfs-ctrl/ofc24/tests/test_functional_bootstrap.py +pytest --verbose --log-level=INFO ~/tfs-ctrl/ofc24/tests/test_functional_create_service_unidir.py +pytest --verbose --log-level=INFO ~/tfs-ctrl/ofc24/tests/test_functional_delete_service_unidir.py +pytest --verbose --log-level=INFO ~/tfs-ctrl/ofc24/tests/test_functional_create_service_bidir.py +pytest --verbose --log-level=INFO ~/tfs-ctrl/ofc24/tests/test_functional_delete_service_bidir.py +pytest --verbose --log-level=INFO ~/tfs-ctrl/ofc24/tests/test_functional_cleanup.py diff --git a/src/tests/ofc24/tests/__init__.py b/src/tests/ofc24/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/tests/ofc24/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/tests/ofc24/tests/test_functional_bootstrap.py b/src/tests/ofc24/tests/test_functional_bootstrap.py new file mode 100644 index 0000000000000000000000000000000000000000..c82e751f9a956f92ff5892aaa4d7bb2deff7d8f3 --- /dev/null +++ b/src/tests/ofc24/tests/test_functional_bootstrap.py @@ -0,0 +1,67 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os, time +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum, Empty +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 device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'topology.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_scenario_bootstrap( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + validate_empty_scenario(context_client) + + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + +def test_scenario_devices_enabled( + context_client : ContextClient, # pylint: disable=redefined-outer-name +) -> None: + """ + This test validates that the devices are enabled. + """ + DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + num_devices = -1 + num_devices_enabled, num_retry = 0, 0 + while (num_devices != num_devices_enabled) and (num_retry < 10): + time.sleep(1.0) + response = context_client.ListDevices(Empty()) + num_devices = len(response.devices) + num_devices_enabled = 0 + for device in response.devices: + if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue + num_devices_enabled += 1 + LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) + num_retry += 1 + assert num_devices_enabled == num_devices diff --git a/src/tests/ofc24/tests/test_functional_cleanup.py b/src/tests/ofc24/tests/test_functional_cleanup.py new file mode 100644 index 0000000000000000000000000000000000000000..3d08409b4e43b2de1f1265b4f78356fef5766aa0 --- /dev/null +++ b/src/tests/ofc24/tests/test_functional_cleanup.py @@ -0,0 +1,44 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import DescriptorLoader, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'topology.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_scenario_cleanup( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/tests/ofc24/tests/test_functional_create_service_bidir.py b/src/tests/ofc24/tests/test_functional_create_service_bidir.py new file mode 100644 index 0000000000000000000000000000000000000000..c81f423d45a356b76ac2aff1b7e80c576a58760e --- /dev/null +++ b/src/tests/ofc24/tests/test_functional_create_service_bidir.py @@ -0,0 +1,72 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +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 tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'service-bidir.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_service_creation_bidir( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient, # pylint: disable=redefined-outer-name +): + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client, + service_client=service_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + + # Verify the scenario has 1 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 1 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 1 + + for service in response.services: + service_id = service.service_id + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + + response = context_client.ListConnections(service_id) + LOGGER.warning(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response))) + + if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + assert len(response.connections) == 2 + else: + str_service = grpc_message_to_json_string(service) + raise Exception('Unexpected ServiceType: {:s}'.format(str_service)) diff --git a/src/tests/ofc24/tests/test_functional_create_service_unidir.py b/src/tests/ofc24/tests/test_functional_create_service_unidir.py new file mode 100644 index 0000000000000000000000000000000000000000..a52af6d1f94d42600fa6e6ac0d6dfa9314292f91 --- /dev/null +++ b/src/tests/ofc24/tests/test_functional_create_service_unidir.py @@ -0,0 +1,72 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +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 tests.Fixtures import context_client, device_client, service_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'descriptors', 'service-bidir.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_service_creation_unidir( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient, # pylint: disable=redefined-outer-name +): + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client, + service_client=service_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + + # Verify the scenario has 1 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 1 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 1 + + for service in response.services: + service_id = service.service_id + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + + response = context_client.ListConnections(service_id) + LOGGER.warning(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response))) + + if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + assert len(response.connections) == 2 + else: + str_service = grpc_message_to_json_string(service) + raise Exception('Unexpected ServiceType: {:s}'.format(str_service)) diff --git a/src/tests/ofc24/tests/test_functional_delete_service_bidir.py b/src/tests/ofc24/tests/test_functional_delete_service_bidir.py new file mode 100644 index 0000000000000000000000000000000000000000..3aa1926c08d654c17dc980bd99fc47df965211be --- /dev/null +++ b/src/tests/ofc24/tests/test_functional_delete_service_bidir.py @@ -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. + +import logging +from typing import Set, Tuple +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, ServiceId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Service import json_service_id +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, service_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_service_removal_bidir( + context_client : ContextClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient, # pylint: disable=redefined-outer-name +): + # Verify the scenario has 1 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 1 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 1 + + context_service_uuids : Set[Tuple[str, str]] = set() + for service in response.services: + service_id = service.service_id + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + + response = context_client.ListConnections(service_id) + LOGGER.warning(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response))) + + if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + assert len(response.connections) == 2 + context_uuid = service_id.context_id.context_uuid.uuid + service_uuid = service_id.service_uuid.uuid + context_service_uuids.add((context_uuid, service_uuid)) + else: + str_service = grpc_message_to_json_string(service) + raise Exception('Unexpected ServiceType: {:s}'.format(str_service)) + + # Identify service to delete + assert len(context_service_uuids) == 1 + context_uuid, service_uuid = set(context_service_uuids).pop() + + # Delete Service + service_client.DeleteService(ServiceId(**json_service_id(service_uuid, json_context_id(context_uuid)))) + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 diff --git a/src/tests/ofc24/tests/test_functional_delete_service_unidir.py b/src/tests/ofc24/tests/test_functional_delete_service_unidir.py new file mode 100644 index 0000000000000000000000000000000000000000..fdfcdec29498b6c7ca92dff3505afec2c9089ec2 --- /dev/null +++ b/src/tests/ofc24/tests/test_functional_delete_service_unidir.py @@ -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. + +import logging +from typing import Set, Tuple +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, ServiceId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Service import json_service_id +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from tests.Fixtures import context_client, service_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_service_removal_unidir( + context_client : ContextClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient, # pylint: disable=redefined-outer-name +): + # Verify the scenario has 1 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 1 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 1 + + context_service_uuids : Set[Tuple[str, str]] = set() + for service in response.services: + service_id = service.service_id + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + + response = context_client.ListConnections(service_id) + LOGGER.warning(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response))) + + if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + assert len(response.connections) == 2 + context_uuid = service_id.context_id.context_uuid.uuid + service_uuid = service_id.service_uuid.uuid + context_service_uuids.add((context_uuid, service_uuid)) + else: + str_service = grpc_message_to_json_string(service) + raise Exception('Unexpected ServiceType: {:s}'.format(str_service)) + + # Identify service to delete + assert len(context_service_uuids) == 1 + context_uuid, service_uuid = set(context_service_uuids).pop() + + # Delete Service + service_client.DeleteService(ServiceId(**json_service_id(service_uuid, json_context_id(context_uuid)))) + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 diff --git a/src/tests/p4/__init__.py b/src/tests/p4/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/p4/__init__.py +++ b/src/tests/p4/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/deploy_specs.sh b/src/tests/p4/deploy_specs.sh index fd3ac89efb33d8b719c73c33a89a416ada3398fd..5a3097610d2ac386f80541b8628c841479c44226 100755 --- a/src/tests/p4/deploy_specs.sh +++ b/src/tests/p4/deploy_specs.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/mininet/8switch3path.py b/src/tests/p4/mininet/8switch3path.py index 9a41e53fb60514412d8cd1cecf451b132663d8f3..20322fac9ce364cd21ea6a8eb1d68ee736dcd524 100755 --- a/src/tests/p4/mininet/8switch3path.py +++ b/src/tests/p4/mininet/8switch3path.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # Copyright 2019-present Open Networking Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/tests/p4/probe/monitoring_kpis.py b/src/tests/p4/probe/monitoring_kpis.py index 880977a2f62069586efdb398b8b3b5d3ac20dac0..25a1eab66bc4bc2b9567879a395d33ae3eea6689 100644 --- a/src/tests/p4/probe/monitoring_kpis.py +++ b/src/tests/p4/probe/monitoring_kpis.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/probe/probe-tfs/Cargo.toml b/src/tests/p4/probe/probe-tfs/Cargo.toml index fb5db98bf5233e905d83b7f9fe06d44a71c3a0fd..5ee07d7844ea4a2b42970f9ff09c6dc5db22207c 100644 --- a/src/tests/p4/probe/probe-tfs/Cargo.toml +++ b/src/tests/p4/probe/probe-tfs/Cargo.toml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/probe/probe-tfs/build.rs b/src/tests/p4/probe/probe-tfs/build.rs index 1dda249d16b3c571676a254f2178f772fb765c81..0d9af6c48a1017e99976948f4824041a2d54f25d 100644 --- a/src/tests/p4/probe/probe-tfs/build.rs +++ b/src/tests/p4/probe/probe-tfs/build.rs @@ -1,5 +1,5 @@ /** - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/tests/p4/probe/probe-tfs/connect_to_mininet.sh b/src/tests/p4/probe/probe-tfs/connect_to_mininet.sh index bba3eaa9a985f3e546f9df2681879faef0a9b83e..2a71cbb151d4f4c2249d801773341289aedc32dc 100755 --- a/src/tests/p4/probe/probe-tfs/connect_to_mininet.sh +++ b/src/tests/p4/probe/probe-tfs/connect_to_mininet.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/probe/probe-tfs/deploy.sh b/src/tests/p4/probe/probe-tfs/deploy.sh index 733f02d11ecd4a9de90898b210b2fe9b579447f2..c18e96559d8d90f9328fe7c77fa66c2ca374665f 100755 --- a/src/tests/p4/probe/probe-tfs/deploy.sh +++ b/src/tests/p4/probe/probe-tfs/deploy.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/probe/probe-tfs/src/agent.rs b/src/tests/p4/probe/probe-tfs/src/agent.rs index 4221cbe28ba75021d2b7c2de6dbef46a043cc2bb..749e42a6c81ce0523ae2cf52a29e9c90c43f48e7 100644 --- a/src/tests/p4/probe/probe-tfs/src/agent.rs +++ b/src/tests/p4/probe/probe-tfs/src/agent.rs @@ -1,5 +1,5 @@ /** - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/tests/p4/probe/probe-tfs/src/ping.rs b/src/tests/p4/probe/probe-tfs/src/ping.rs index 3c118c98782a4cb5def9a654edbe55186bbf3df7..bec984b66cb24ee6e6f3dc707fe9cd392b5ebb28 100644 --- a/src/tests/p4/probe/probe-tfs/src/ping.rs +++ b/src/tests/p4/probe/probe-tfs/src/ping.rs @@ -1,5 +1,5 @@ /** - * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/tests/p4/run_test_01_bootstrap.sh b/src/tests/p4/run_test_01_bootstrap.sh index c08b95b7e3e0fd9237e3a61a461099c323ae728f..60bb20d0d64a41936b58df4e6726d051497216d6 100755 --- a/src/tests/p4/run_test_01_bootstrap.sh +++ b/src/tests/p4/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/run_test_02_create_service.sh b/src/tests/p4/run_test_02_create_service.sh index a972b66c0e1ea3190c71feef930c1043a5dcb281..8246262340f3d2029d8e0a0f41ec9821518cd5bf 100755 --- a/src/tests/p4/run_test_02_create_service.sh +++ b/src/tests/p4/run_test_02_create_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/run_test_03_delete_service.sh b/src/tests/p4/run_test_03_delete_service.sh index 4b4dfbfaa538a23c1d49448147da0025c7608bc4..c4337daea207269586c5f1f698683c37ae98406e 100755 --- a/src/tests/p4/run_test_03_delete_service.sh +++ b/src/tests/p4/run_test_03_delete_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/run_test_04_cleanup.sh b/src/tests/p4/run_test_04_cleanup.sh index b1f2735c2e024dfa23a1b311415ad74aea2f7b37..f2ebec08b2dbead7fb27522456fb853845578ed8 100755 --- a/src/tests/p4/run_test_04_cleanup.sh +++ b/src/tests/p4/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/setup.sh b/src/tests/p4/setup.sh index a98ad31ab159217c209d5077b258fd398d5113cd..1e6b63c544c5029613f8d9084b61e5fab9e83043 100755 --- a/src/tests/p4/setup.sh +++ b/src/tests/p4/setup.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/tests/BuildDescriptors.py b/src/tests/p4/tests/BuildDescriptors.py index 98b78863318a7ad682fc5f970d44d02240b45a26..cfd29eea0cb80306f402ef71530016599b570eb1 100644 --- a/src/tests/p4/tests/BuildDescriptors.py +++ b/src/tests/p4/tests/BuildDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/tests/LoadDescriptors.py b/src/tests/p4/tests/LoadDescriptors.py index b232935f4675d718d55e67fe3a76012a39398dda..407d5b6dc6b46ba7dd920cb1f60be391f839bda7 100644 --- a/src/tests/p4/tests/LoadDescriptors.py +++ b/src/tests/p4/tests/LoadDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/tests/Objects.py b/src/tests/p4/tests/Objects.py index fcf618308a1e56a6e9e68205bdc0566408e26b65..6004ea413ec6af3412780bb7b49f03edb0481b7e 100644 --- a/src/tests/p4/tests/Objects.py +++ b/src/tests/p4/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/tests/__init__.py b/src/tests/p4/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/p4/tests/__init__.py +++ b/src/tests/p4/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/tests/test_functional_bootstrap.py b/src/tests/p4/tests/test_functional_bootstrap.py index 97269217336986a6a143a4a7ef94bd8b0710e9b0..0f4ea07a370593bf38c8c602311296bc5fb4f2c6 100644 --- a/src/tests/p4/tests/test_functional_bootstrap.py +++ b/src/tests/p4/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/tests/test_functional_cleanup.py b/src/tests/p4/tests/test_functional_cleanup.py index aad56a2104797ed7238241c4d3eda8eab3c1a907..df279cc2a2736cbb47c5eeb330eccf4ada382c1b 100644 --- a/src/tests/p4/tests/test_functional_cleanup.py +++ b/src/tests/p4/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/tests/test_functional_create_service.py b/src/tests/p4/tests/test_functional_create_service.py index 76a681eeaff30434663a2391509c3f266e89ecb0..516ed8b1c8b9cfb138353167841e0dd80503ca30 100644 --- a/src/tests/p4/tests/test_functional_create_service.py +++ b/src/tests/p4/tests/test_functional_create_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/tests/test_functional_delete_service.py b/src/tests/p4/tests/test_functional_delete_service.py index c5821df4ccc1caa2a1d72ed98dbfcb82e9db21b1..8542e671a85511821835a79574d8431c2a3c109e 100644 --- a/src/tests/p4/tests/test_functional_delete_service.py +++ b/src/tests/p4/tests/test_functional_delete_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/p4/tests/topologies/6switchObjects.py b/src/tests/p4/tests/topologies/6switchObjects.py index c5e4b616cdf3cfe0757514ac78f958837591a36c..395fe58030e29a28029be241f87afa93f5c506cd 100644 --- a/src/tests/p4/tests/topologies/6switchObjects.py +++ b/src/tests/p4/tests/topologies/6switchObjects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/__init__.py b/src/tests/scenario2/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/scenario2/__init__.py +++ b/src/tests/scenario2/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/delete_all.sh b/src/tests/scenario2/delete_all.sh index 6a838d98553870242985ed6858145a2d998dfbdc..a11d668c38f9ca8608170e220fa21555d01f20a0 100755 --- a/src/tests/scenario2/delete_all.sh +++ b/src/tests/scenario2/delete_all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/deploy_all.sh b/src/tests/scenario2/deploy_all.sh index 1eac2e4da701d2f2c60f8690c4784b59522a8b72..1c52068d3fb1aa1afd2cf040734fa381d4fb0207 100755 --- a/src/tests/scenario2/deploy_all.sh +++ b/src/tests/scenario2/deploy_all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/deploy_specs_dom1.sh b/src/tests/scenario2/deploy_specs_dom1.sh index 5615339ba9579a511cf9773d4fcb7eed2105c752..d7557a464608a4741393e6d2d65edaf23a1c0ff2 100755 --- a/src/tests/scenario2/deploy_specs_dom1.sh +++ b/src/tests/scenario2/deploy_specs_dom1.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/deploy_specs_dom2.sh b/src/tests/scenario2/deploy_specs_dom2.sh index b97e5396646c1877b38626fec65860aeabfa853d..d601b2b9bf47274ebd1bc8d1693a67b0693d50b6 100755 --- a/src/tests/scenario2/deploy_specs_dom2.sh +++ b/src/tests/scenario2/deploy_specs_dom2.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/deploy_specs_dom3.sh b/src/tests/scenario2/deploy_specs_dom3.sh index 10192da237bec729e04b30e26eb11a8ae6b2980a..869b4050a62e87315131875f44a947ad036fde03 100755 --- a/src/tests/scenario2/deploy_specs_dom3.sh +++ b/src/tests/scenario2/deploy_specs_dom3.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/deploy_specs_dom4.sh b/src/tests/scenario2/deploy_specs_dom4.sh index d422c22478d7378352ca3426eff436e1c0a6b080..5e119c1a9fc9c632ed2ab74dff80e2f1ddd62d7c 100755 --- a/src/tests/scenario2/deploy_specs_dom4.sh +++ b/src/tests/scenario2/deploy_specs_dom4.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/dump_logs.sh b/src/tests/scenario2/dump_logs.sh index c7acedbf613b66f3ec08bd1628e8e1ab76b9bc5e..567617420037a0650b2f5b353a6cb5255a578352 100755 --- a/src/tests/scenario2/dump_logs.sh +++ b/src/tests/scenario2/dump_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/fast_redeploy.sh b/src/tests/scenario2/fast_redeploy.sh index 87eef3651e2be7a31068c7f418dd7bf815c2e471..2e1e8a1926bdf8aaec308751d4bf61907210135c 100755 --- a/src/tests/scenario2/fast_redeploy.sh +++ b/src/tests/scenario2/fast_redeploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/nginx-ingress-controller-dom1.yaml b/src/tests/scenario2/nginx-ingress-controller-dom1.yaml index 1815bfbaa481ef269c513f8b55d949127f10bc30..70a0f45f4091a4e6ba94fe7e0fb2012bfe63528c 100644 --- a/src/tests/scenario2/nginx-ingress-controller-dom1.yaml +++ b/src/tests/scenario2/nginx-ingress-controller-dom1.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/nginx-ingress-controller-dom2.yaml b/src/tests/scenario2/nginx-ingress-controller-dom2.yaml index dede032850092733aa9b3136f20ecf078b2ce05a..11e4ccf254d7cb938cd777ce35e77e05eefd604f 100644 --- a/src/tests/scenario2/nginx-ingress-controller-dom2.yaml +++ b/src/tests/scenario2/nginx-ingress-controller-dom2.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/nginx-ingress-controller-dom3.yaml b/src/tests/scenario2/nginx-ingress-controller-dom3.yaml index 10896ddd0aa335db947a9b072b722e57729253b0..d6ae8b1c287a59cf19ba4336aba1e02aefeb1ded 100644 --- a/src/tests/scenario2/nginx-ingress-controller-dom3.yaml +++ b/src/tests/scenario2/nginx-ingress-controller-dom3.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/nginx-ingress-controller-dom4.yaml b/src/tests/scenario2/nginx-ingress-controller-dom4.yaml index 07df5b1638803f0ec2bb23758c14d4fc6fdf6103..6600d83c7c0be9ac58cec2ecf32155b4b804481f 100644 --- a/src/tests/scenario2/nginx-ingress-controller-dom4.yaml +++ b/src/tests/scenario2/nginx-ingress-controller-dom4.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/run_test_01_bootstrap.sh b/src/tests/scenario2/old_tests/run_test_01_bootstrap.sh index a7465a8ac3c6a6fea25e82225124b39e15643243..bdd93ca27b6f61adc131258cc9e52b9d2e10d23d 100755 --- a/src/tests/scenario2/old_tests/run_test_01_bootstrap.sh +++ b/src/tests/scenario2/old_tests/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/run_test_02_create_service.sh b/src/tests/scenario2/old_tests/run_test_02_create_service.sh index 18e0d4ab8427034bc55edc2c152eaf7f10fc3d75..a9c5e7bd8167e27200545acd19397a44d3b6f911 100755 --- a/src/tests/scenario2/old_tests/run_test_02_create_service.sh +++ b/src/tests/scenario2/old_tests/run_test_02_create_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/run_test_03_delete_service.sh b/src/tests/scenario2/old_tests/run_test_03_delete_service.sh index c8ee69c3e6e1be4d6123c28b4f01437815b9c621..776c9050e74275d6a559338279c641901ecb4a6b 100755 --- a/src/tests/scenario2/old_tests/run_test_03_delete_service.sh +++ b/src/tests/scenario2/old_tests/run_test_03_delete_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/run_test_04_cleanup.sh b/src/tests/scenario2/old_tests/run_test_04_cleanup.sh index b66605fde8cacb77f12900d25015c922e6bf34e9..5ab9f70d49effbe80d6a5df32cf4a703a3c8589a 100755 --- a/src/tests/scenario2/old_tests/run_test_04_cleanup.sh +++ b/src/tests/scenario2/old_tests/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/run_tests_and_coverage.sh b/src/tests/scenario2/old_tests/run_tests_and_coverage.sh index c25c4a92190468fb1c69850870eae29392336afd..6d7351bb5f8c6a8af67b9cc9c38a0b926c6a8fa0 100755 --- a/src/tests/scenario2/old_tests/run_tests_and_coverage.sh +++ b/src/tests/scenario2/old_tests/run_tests_and_coverage.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/tests/BuildDescriptors.py b/src/tests/scenario2/old_tests/tests/BuildDescriptors.py index 98b78863318a7ad682fc5f970d44d02240b45a26..cfd29eea0cb80306f402ef71530016599b570eb1 100644 --- a/src/tests/scenario2/old_tests/tests/BuildDescriptors.py +++ b/src/tests/scenario2/old_tests/tests/BuildDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/tests/Fixtures.py b/src/tests/scenario2/old_tests/tests/Fixtures.py index b56fd442a2776e51b9c18b18dc52403d8d6e68c5..dceec235ab6d4fd757e14f2d5dd00c2f38bdc963 100644 --- a/src/tests/scenario2/old_tests/tests/Fixtures.py +++ b/src/tests/scenario2/old_tests/tests/Fixtures.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/tests/LoadDescriptors.py b/src/tests/scenario2/old_tests/tests/LoadDescriptors.py index b232935f4675d718d55e67fe3a76012a39398dda..407d5b6dc6b46ba7dd920cb1f60be391f839bda7 100644 --- a/src/tests/scenario2/old_tests/tests/LoadDescriptors.py +++ b/src/tests/scenario2/old_tests/tests/LoadDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/tests/Objects.py b/src/tests/scenario2/old_tests/tests/Objects.py index 43df127495d16b8494ff74cdf7dea64e44b072e1..1ecb2eca1f0f43c6b9ddbfc949b533662ed37ba5 100644 --- a/src/tests/scenario2/old_tests/tests/Objects.py +++ b/src/tests/scenario2/old_tests/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/tests/__init__.py b/src/tests/scenario2/old_tests/tests/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/scenario2/old_tests/tests/__init__.py +++ b/src/tests/scenario2/old_tests/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/tests/test_functional_bootstrap.py b/src/tests/scenario2/old_tests/tests/test_functional_bootstrap.py index cb1d8318da37725b5adf66b5dc06e454c48f4e53..2c4743f08eca82c88aaaf901b60f5894059e07f3 100644 --- a/src/tests/scenario2/old_tests/tests/test_functional_bootstrap.py +++ b/src/tests/scenario2/old_tests/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/tests/test_functional_cleanup.py b/src/tests/scenario2/old_tests/tests/test_functional_cleanup.py index 3a9843af69db4c0369b88c87985a0293b6aae605..259ce831498a8b8a566e53fafba72d109299832b 100644 --- a/src/tests/scenario2/old_tests/tests/test_functional_cleanup.py +++ b/src/tests/scenario2/old_tests/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/tests/test_functional_create_service.py b/src/tests/scenario2/old_tests/tests/test_functional_create_service.py index 550994c2c123cc84695240c8fd3fbb3e2c9e6480..a286c1e79056e14d5f397c99b62265ffa3f7b43e 100644 --- a/src/tests/scenario2/old_tests/tests/test_functional_create_service.py +++ b/src/tests/scenario2/old_tests/tests/test_functional_create_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/old_tests/tests/test_functional_delete_service.py b/src/tests/scenario2/old_tests/tests/test_functional_delete_service.py index 12a032e02bb8efbb8a000e498e77300231e4f246..b799e467ceba1e43c7dd0a443294168dd18f09a5 100644 --- a/src/tests/scenario2/old_tests/tests/test_functional_delete_service.py +++ b/src/tests/scenario2/old_tests/tests/test_functional_delete_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/reset.sh b/src/tests/scenario2/reset.sh index f9e7ecab2d4693ef161ae9349e13a3ad0200c97c..5b1d1ee0cd96edd5ee046b362c4d1541da841582 100755 --- a/src/tests/scenario2/reset.sh +++ b/src/tests/scenario2/reset.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/show_deploy.sh b/src/tests/scenario2/show_deploy.sh index 20bbfaacef39b7b9b9c18facc3e20382e526377a..dfceb6fee9ef5b819d02c8c1e752c4511c02ec1d 100755 --- a/src/tests/scenario2/show_deploy.sh +++ b/src/tests/scenario2/show_deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario2/tfs-ingress-dom1.yaml b/src/tests/scenario2/tfs-ingress-dom1.yaml index 7cacee1d1f7f1d6c3f36f71ecb5fea32fdcf89b6..39502bb20df16c4ceadeff0f3fe8fd219d81e640 100644 --- a/src/tests/scenario2/tfs-ingress-dom1.yaml +++ b/src/tests/scenario2/tfs-ingress-dom1.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,33 +21,40 @@ metadata: spec: ingressClassName: tfs-ingress-class-dom1 rules: - - http: - paths: - - path: /webui(/|$)(.*) - pathType: Prefix - backend: - service: - name: webuiservice - port: - number: 8004 - - path: /grafana(/|$)(.*) - pathType: Prefix - backend: - service: - name: webuiservice - port: - number: 3000 - - path: /context(/|$)(.*) - pathType: Prefix - backend: - service: - name: contextservice - port: - number: 8080 - - path: /()(restconf/.*) - pathType: Prefix - backend: - service: - name: nbiservice - port: - number: 8080 + - http: + paths: + - path: /webui(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 8004 + - path: /grafana(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 3000 + - path: /()(restconf/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 + - path: /()(tfs-api/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 + - path: /()(bmw/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 diff --git a/src/tests/scenario2/tfs-ingress-dom2.yaml b/src/tests/scenario2/tfs-ingress-dom2.yaml index f6a08de12c4720f0bc75a76215b2a3cdc40eddfe..1c0ff6de94e1cdc208880823e70b7817c36fe97c 100644 --- a/src/tests/scenario2/tfs-ingress-dom2.yaml +++ b/src/tests/scenario2/tfs-ingress-dom2.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,33 +21,40 @@ metadata: spec: ingressClassName: tfs-ingress-class-dom2 rules: - - http: - paths: - - path: /webui(/|$)(.*) - pathType: Prefix - backend: - service: - name: webuiservice - port: - number: 8004 - - path: /grafana(/|$)(.*) - pathType: Prefix - backend: - service: - name: webuiservice - port: - number: 3000 - - path: /context(/|$)(.*) - pathType: Prefix - backend: - service: - name: contextservice - port: - number: 8080 - - path: /()(restconf/.*) - pathType: Prefix - backend: - service: - name: nbiservice - port: - number: 8080 + - http: + paths: + - path: /webui(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 8004 + - path: /grafana(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 3000 + - path: /()(restconf/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 + - path: /()(tfs-api/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 + - path: /()(bmw/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 diff --git a/src/tests/scenario2/tfs-ingress-dom3.yaml b/src/tests/scenario2/tfs-ingress-dom3.yaml index f27a183f023aa2ca505dac74c8ea385b8acd2520..80957e657b8bdcbe50e2a9e00d8a2769b6f6c591 100644 --- a/src/tests/scenario2/tfs-ingress-dom3.yaml +++ b/src/tests/scenario2/tfs-ingress-dom3.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,33 +21,40 @@ metadata: spec: ingressClassName: tfs-ingress-class-dom3 rules: - - http: - paths: - - path: /webui(/|$)(.*) - pathType: Prefix - backend: - service: - name: webuiservice - port: - number: 8004 - - path: /grafana(/|$)(.*) - pathType: Prefix - backend: - service: - name: webuiservice - port: - number: 3000 - - path: /context(/|$)(.*) - pathType: Prefix - backend: - service: - name: contextservice - port: - number: 8080 - - path: /()(restconf/.*) - pathType: Prefix - backend: - service: - name: nbiservice - port: - number: 8080 + - http: + paths: + - path: /webui(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 8004 + - path: /grafana(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 3000 + - path: /()(restconf/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 + - path: /()(tfs-api/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 + - path: /()(bmw/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 diff --git a/src/tests/scenario2/tfs-ingress-dom4.yaml b/src/tests/scenario2/tfs-ingress-dom4.yaml index dfbe81d06bdc47d482f64c8a09c4916c0d5ad64a..6b384eed7ddeff0b9f7c9ed94535479e8adb378c 100644 --- a/src/tests/scenario2/tfs-ingress-dom4.yaml +++ b/src/tests/scenario2/tfs-ingress-dom4.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,33 +21,40 @@ metadata: spec: ingressClassName: tfs-ingress-class-dom4 rules: - - http: - paths: - - path: /webui(/|$)(.*) - pathType: Prefix - backend: - service: - name: webuiservice - port: - number: 8004 - - path: /grafana(/|$)(.*) - pathType: Prefix - backend: - service: - name: webuiservice - port: - number: 3000 - - path: /context(/|$)(.*) - pathType: Prefix - backend: - service: - name: contextservice - port: - number: 8080 - - path: /()(restconf/.*) - pathType: Prefix - backend: - service: - name: nbiservice - port: - number: 8080 + - http: + paths: + - path: /webui(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 8004 + - path: /grafana(/|$)(.*) + pathType: Prefix + backend: + service: + name: webuiservice + port: + number: 3000 + - path: /()(restconf/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 + - path: /()(tfs-api/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 + - path: /()(bmw/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 diff --git a/src/tests/scenario3/l3/deploy.sh b/src/tests/scenario3/l3/deploy.sh index 4f4f8baed2c29b290142f30960f8432926cef6a8..97224bd2c86b999acaf734adb304af6aa76956cc 100755 --- a/src/tests/scenario3/l3/deploy.sh +++ b/src/tests/scenario3/l3/deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario3/l3/deploy_specs.sh b/src/tests/scenario3/l3/deploy_specs.sh index 72cc56303585fe0222d020c765e86c68944f2951..b3dd07b7ab025e5f325d0c26e75fff5271980316 100644 --- a/src/tests/scenario3/l3/deploy_specs.sh +++ b/src/tests/scenario3/l3/deploy_specs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario3/l3/run.sh b/src/tests/scenario3/l3/run.sh index c62ea89ea7e9bfd15e387af56ec19f23206df945..109350ad07de38a40703ea095a7d47d1636ffea1 100644 --- a/src/tests/scenario3/l3/run.sh +++ b/src/tests/scenario3/l3/run.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario3/optical/deploy_specs.sh b/src/tests/scenario3/optical/deploy_specs.sh index 30434341e3fd8f3d4ee62e290521ef04b6f9f25d..b02e5f22a42614d0beb2a2c6a97babbf1fabd34a 100644 --- a/src/tests/scenario3/optical/deploy_specs.sh +++ b/src/tests/scenario3/optical/deploy_specs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario3/optical/jocn/run_experiment.py b/src/tests/scenario3/optical/jocn/run_experiment.py index d9cfb9e4b4d7daa55f2b399c90c52a35715d279c..6e7d0c1c1b1b0de42a48ff29d3d75f21fc23e3ff 100644 --- a/src/tests/scenario3/optical/jocn/run_experiment.py +++ b/src/tests/scenario3/optical/jocn/run_experiment.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/scenario3/optical/ofc23/run_experiment_demo.py b/src/tests/scenario3/optical/ofc23/run_experiment_demo.py index 2f09f8d5aba38c865a20a2e57d22630d380a2b1b..4af9550db4fc168b47e9a31ebc4016583c8b6a72 100644 --- a/src/tests/scenario3/optical/ofc23/run_experiment_demo.py +++ b/src/tests/scenario3/optical/ofc23/run_experiment_demo.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/__init__.py b/src/tests/tools/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/tools/__init__.py +++ b/src/tests/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/load_scenario/__init__.py b/src/tests/tools/load_scenario/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/tools/load_scenario/__init__.py +++ b/src/tests/tools/load_scenario/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/load_scenario/__main__.py b/src/tests/tools/load_scenario/__main__.py index df1d5d8bf3d729a459ab6570e81e6ea05f47c981..0e225cc46d104885d065addec867ce9f5841ee65 100644 --- a/src/tests/tools/load_scenario/__main__.py +++ b/src/tests/tools/load_scenario/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/load_scenario/run.sh b/src/tests/tools/load_scenario/run.sh index 98ebc6c1790ae256c592408ff731e347ec8ebb0e..b4c58bcb60b4ca5363d431a6ed800fe50a2d6af4 100755 --- a/src/tests/tools/load_scenario/run.sh +++ b/src/tests/tools/load_scenario/run.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/Dockerfile b/src/tests/tools/mock_ietf_actn_sdn_ctrl/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..02af91b62e5ff4110890fc7d19dae020fd5bdb39 --- /dev/null +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/Dockerfile @@ -0,0 +1,37 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM python:3.9-slim + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 + +# 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 + +# Create component sub-folders, and copy content +RUN mkdir -p /var/teraflow/mock_ietf_actn_sdn_ctrl +WORKDIR /var/teraflow/mock_ietf_actn_sdn_ctrl +COPY . . + +# Get specific Python packages +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +RUN python3 -m pip list + +# Start the service +ENTRYPOINT ["python", "MockIetfActnSdnCtrl.py"] diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/MockIetfActnSdnCtrl.py b/src/tests/tools/mock_ietf_actn_sdn_ctrl/MockIetfActnSdnCtrl.py new file mode 100644 index 0000000000000000000000000000000000000000..7bc79e55870d52667afc7d608a48a3df168cccf3 --- /dev/null +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/MockIetfActnSdnCtrl.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. + +# Mock IETF ACTN SDN controller +# ----------------------------- +# REST server implementing minimal support for: +# - IETF YANG Data Model for Transport Network Client Signals +# Ref: https://www.ietf.org/archive/id/draft-ietf-ccamp-client-signal-yang-10.html +# - IETF YANG Data Model for Traffic Engineering Tunnels, Label Switched Paths and Interfaces +# Ref: https://www.ietf.org/archive/id/draft-ietf-teas-yang-te-34.html + + +import functools, logging, sys, time +from flask import Flask, jsonify, make_response, request +from flask_restful import Api, Resource +from ResourceEthServices import EthService, EthServices +from ResourceOsuTunnels import OsuTunnel, OsuTunnels + +BIND_ADDRESS = '0.0.0.0' +BIND_PORT = 8443 +BASE_URL = '/restconf/v2/data' +STR_ENDPOINT = 'https://{:s}:{:s}{:s}'.format(str(BIND_ADDRESS), str(BIND_PORT), str(BASE_URL)) +LOG_LEVEL = logging.DEBUG + +logging.basicConfig(level=LOG_LEVEL, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") +LOGGER = logging.getLogger(__name__) + +logging.getLogger('werkzeug').setLevel(logging.WARNING) + +def log_request(logger : logging.Logger, response): + timestamp = time.strftime('[%Y-%b-%d %H:%M]') + logger.info('%s %s %s %s %s', timestamp, request.remote_addr, request.method, request.full_path, response.status) + return response + +class Health(Resource): + def get(self): + return make_response(jsonify({}), 200) + +def main(): + LOGGER.info('Starting...') + + app = Flask(__name__) + app.after_request(functools.partial(log_request, LOGGER)) + + api = Api(app, prefix=BASE_URL) + api.add_resource( + Health, '/' + ) + api.add_resource( + OsuTunnels, '/ietf-te:te/tunnels' + ) + api.add_resource( + OsuTunnel, '/ietf-te:te/tunnels/tunnel=""' + ) + api.add_resource( + EthServices, '/ietf-eth-tran-service:etht-svc' + ) + api.add_resource( + EthService, '/ietf-eth-tran-service:etht-svc/etht-svc-instances=""' + ) + + LOGGER.info('Listening on {:s}...'.format(str(STR_ENDPOINT))) + app.run(debug=True, host=BIND_ADDRESS, port=BIND_PORT, ssl_context='adhoc') + + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/README.md b/src/tests/tools/mock_ietf_actn_sdn_ctrl/README.md new file mode 100644 index 0000000000000000000000000000000000000000..52aa2922d0699b1d286319e11cc25f8707fda686 --- /dev/null +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/README.md @@ -0,0 +1,33 @@ +# Mock IETF ACTN SDN Controller + +This REST server implements very basic support for the following YANG data models: +- IETF YANG Data Model for Transport Network Client Signals (draft-ietf-ccamp-client-signal-yang-10) + - Ref: https://datatracker.ietf.org/doc/draft-ietf-ccamp-client-signal-yang/ +- IETF YANG Data Model for Traffic Engineering Tunnels, Label Switched Paths and Interfaces (draft-ietf-teas-yang-te-34) + - Ref: https://datatracker.ietf.org/doc/draft-ietf-teas-yang-te/ + +The aim of this server is to enable testing the IetfActnDeviceDriver and the IetfActnServiceHandler. + + +## 1. Install requirements for the Mock IETF ACTN SDN controller +__NOTE__: if you run the Mock IETF ACTN SDN controller from the PyEnv used for developing on the TeraFlowSDN +framework and you followed the official steps in +[Development Guide > Configure Environment > Python](https://labs.etsi.org/rep/tfs/controller/-/wikis/2.-Development-Guide/2.1.-Configure-Environment/2.1.1.-Python), +all the requirements are already in place. Install them only if you execute it in a separate/standalone environment. + +Install the required dependencies as follows: +```bash +pip install -r src/tests/tools/mock_ietf_actn_sdn_ctrl/requirements.in +``` + +Run the Mock IETF ACTN SDN Controller as follows: +```bash +python src/tests/tools/mock_ietf_actn_sdn_ctrl/MockIetfActnSdnCtrl.py +``` + + +## 2. Run the Mock IETF ACTN SDN controller +Run the Mock IETF ACTN SDN Controller as follows: +```bash +python src/tests/tools/mock_ietf_actn_sdn_ctrl/MockIetfActnSdnCtrl.py +``` diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceEthServices.py b/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceEthServices.py new file mode 100644 index 0000000000000000000000000000000000000000..64e47b27317f673fc62e0803c3b6726798d10c61 --- /dev/null +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceEthServices.py @@ -0,0 +1,53 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# REST-API resource implementing minimal support for "IETF YANG Data Model for Transport Network Client Signals". +# Ref: https://www.ietf.org/archive/id/draft-ietf-ccamp-client-signal-yang-10.html + +from flask import abort, jsonify, make_response, request +from flask_restful import Resource + +ETHT_SERVICES = {} + +class EthServices(Resource): + def get(self): + etht_services = [etht_service for etht_service in ETHT_SERVICES.values()] + data = {'ietf-eth-tran-service:etht-svc': {'etht-svc-instances': etht_services}} + return make_response(jsonify(data), 200) + + def post(self): + json_request = request.get_json() + if not json_request: abort(400) + if not isinstance(json_request, dict): abort(400) + if 'ietf-eth-tran-service:etht-svc' not in json_request: abort(400) + json_request = json_request['ietf-eth-tran-service:etht-svc'] + if 'etht-svc-instances' not in json_request: abort(400) + etht_services = json_request['etht-svc-instances'] + if not isinstance(etht_services, list): abort(400) + if len(etht_services) != 1: abort(400) + etht_service = etht_services[0] + etht_service_name = etht_service['etht-svc-name'] + ETHT_SERVICES[etht_service_name] = etht_service + return make_response(jsonify({}), 201) + +class EthService(Resource): + def get(self, etht_service_name : str): + etht_service = ETHT_SERVICES.get(etht_service_name, None) + data,status = ({}, 404) if etht_service is None else (etht_service, 200) + return make_response(jsonify(data), status) + + def delete(self, etht_service_name : str): + etht_service = ETHT_SERVICES.pop(etht_service_name, None) + data,status = ({}, 404) if etht_service is None else (etht_service, 204) + return make_response(jsonify(data), status) diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceOsuTunnels.py b/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceOsuTunnels.py new file mode 100644 index 0000000000000000000000000000000000000000..85950dfe99e9380459ac9b1d8f5099cf5226b66b --- /dev/null +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceOsuTunnels.py @@ -0,0 +1,53 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# REST-API resource implementing minimal support for "IETF YANG Data Model for Traffic Engineering Tunnels, +# Label Switched Paths and Interfaces". +# Ref: https://www.ietf.org/archive/id/draft-ietf-teas-yang-te-34.html + + +from flask import abort, jsonify, make_response, request +from flask_restful import Resource + +OSU_TUNNELS = {} + +class OsuTunnels(Resource): + def get(self): + osu_tunnels = [osu_tunnel for osu_tunnel in OSU_TUNNELS.values()] + data = {'ietf-te:tunnel': osu_tunnels} + return make_response(jsonify(data), 200) + + def post(self): + json_request = request.get_json() + if not json_request: abort(400) + if not isinstance(json_request, dict): abort(400) + if 'ietf-te:tunnel' not in json_request: abort(400) + osu_tunnels = json_request['ietf-te:tunnel'] + if not isinstance(osu_tunnels, list): abort(400) + if len(osu_tunnels) != 1: abort(400) + osu_tunnel = osu_tunnels[0] + osu_tunnel_name = osu_tunnel['name'] + OSU_TUNNELS[osu_tunnel_name] = osu_tunnel + return make_response(jsonify({}), 201) + +class OsuTunnel(Resource): + def get(self, osu_tunnel_name : str): + osu_tunnel = OSU_TUNNELS.get(osu_tunnel_name, None) + data,status = ({}, 404) if osu_tunnel is None else (osu_tunnel, 200) + return make_response(jsonify(data), status) + + def delete(self, osu_tunnel_name : str): + osu_tunnel = OSU_TUNNELS.pop(osu_tunnel_name, None) + data,status = ({}, 404) if osu_tunnel is None else (osu_tunnel, 204) + return make_response(jsonify(data), status) diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/__init__.py b/src/tests/tools/mock_ietf_actn_sdn_ctrl/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/__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/build.sh b/src/tests/tools/mock_ietf_actn_sdn_ctrl/build.sh similarity index 58% rename from src/build.sh rename to src/tests/tools/mock_ietf_actn_sdn_ctrl/build.sh index b1a7d299e546e4607a494dde3ec435f093da0c8d..06184bed6b64e3d8fdde08a60b3bdafc01afcd06 100755 --- a/src/build.sh +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/build.sh @@ -1,5 +1,5 @@ -#!/usr/bin/env bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +#!/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. @@ -13,21 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. - # Make folder containing the script the root folder for its execution cd $(dirname $0) -echo "BUILD context" -context/genproto.sh -docker build -t "context:develop" -f context/Dockerfile --quiet . -docker build -t "context:test" -f context/tests/Dockerfile --quiet . - -cd monitoring -./genproto.sh -cd .. - -echo "BUILD monitoring" -docker build -t "monitoring:dockerfile" -f monitoring/Dockerfile . - -echo "Prune unused images" -docker image prune --force +docker build -t mock-ietf-actn-sdn-ctrl:test -f Dockerfile . +docker tag mock-ietf-actn-sdn-ctrl:test localhost:32000/tfs/mock-ietf-actn-sdn-ctrl:test +docker push localhost:32000/tfs/mock-ietf-actn-sdn-ctrl:test diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/deploy.sh b/src/tests/tools/mock_ietf_actn_sdn_ctrl/deploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..02c32797105e4751fc614fb371f38c76ce4b79b5 --- /dev/null +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/deploy.sh @@ -0,0 +1,17 @@ +#!/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. + +kubectl delete namespace mocks +kubectl --namespace mocks apply -f mock-ietf-actn-sdn-ctrl.yaml diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/mock-ietf-actn-sdn-ctrl.yaml b/src/tests/tools/mock_ietf_actn_sdn_ctrl/mock-ietf-actn-sdn-ctrl.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f59249e8e4c38ce10bd0e3a4800f7f2dff33c601 --- /dev/null +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/mock-ietf-actn-sdn-ctrl.yaml @@ -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. + +kind: Namespace +apiVersion: v1 +metadata: + name: mocks +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mock-ietf-actn-sdn-ctrl +spec: + selector: + matchLabels: + app: mock-ietf-actn-sdn-ctrl + replicas: 1 + template: + metadata: + annotations: + config.linkerd.io/skip-inbound-ports: "8443" + labels: + app: mock-ietf-actn-sdn-ctrl + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: localhost:32000/tfs/mock-ietf-actn-sdn-ctrl:test + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8443 + resources: + requests: + cpu: 250m + memory: 512Mi + limits: + cpu: 700m + memory: 1024Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: mock-ietf-actn-sdn-ctrl + labels: + app: mock-ietf-actn-sdn-ctrl +spec: + type: ClusterIP + selector: + app: mock-ietf-actn-sdn-ctrl + ports: + - name: https + port: 8443 + targetPort: 8443 diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/requirements.in b/src/tests/tools/mock_ietf_actn_sdn_ctrl/requirements.in new file mode 100644 index 0000000000000000000000000000000000000000..fc3bee8f04fe9dc21793e7d522d53c732fdd4b3f --- /dev/null +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/requirements.in @@ -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. + +cryptography==39.0.1 +pyopenssl==23.0.0 +Flask==2.1.3 +Flask-HTTPAuth==4.5.0 +Flask-RESTful==0.3.9 +jsonschema==4.4.0 +requests==2.27.1 +werkzeug==2.3.7 diff --git a/src/start.sh b/src/tests/tools/mock_ietf_actn_sdn_ctrl/run.sh similarity index 72% rename from src/start.sh rename to src/tests/tools/mock_ietf_actn_sdn_ctrl/run.sh index 32a016cc07d2602d5e00b7540b03355f539ed61d..f6edea6e7171fd14ae0dc35ce6eae1a7d0b9f50f 100755 --- a/src/start.sh +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/run.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -docker network create -d bridge teraflowbridge +# Make folder containing the script the root folder for its execution +cd $(dirname $0) -docker run -d -p 7070:7070 --name monitoring --network=teraflowbridge monitoring:dockerfile +python MockIetfActnSdnCtrl.py diff --git a/src/tests/tools/mock_ipm_sdn_ctrl/MockIPMSdnCtrl.py b/src/tests/tools/mock_ipm_sdn_ctrl/MockIPMSdnCtrl.py index ecac81be7e3bdff1dcbac458142ea15bf367a1a1..cf8deb1a82d122f4194cf8f2b7b1d9bb6f21b2c8 100644 --- a/src/tests/tools/mock_ipm_sdn_ctrl/MockIPMSdnCtrl.py +++ b/src/tests/tools/mock_ipm_sdn_ctrl/MockIPMSdnCtrl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/mock_ipm_sdn_ctrl/run.sh b/src/tests/tools/mock_ipm_sdn_ctrl/run.sh index 2aa78712c58d8cc255b60202d1576de683798d2e..f51a627be085d373c0381b1393180d6e36533373 100755 --- a/src/tests/tools/mock_ipm_sdn_ctrl/run.sh +++ b/src/tests/tools/mock_ipm_sdn_ctrl/run.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py b/src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py index c20dde1b9958fb92e4c6f026fbfe55f9ba348ba1..d67e65db49e507b15236d64b7ba276314b288928 100644 --- a/src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py +++ b/src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/run.sh b/src/tests/tools/mock_mw_sdn_ctrl/run.sh index 415fc1751f132478889fba2e0ec1f5da742e23f1..632e481a9f5a570af0973ea1e3faa1dfaae71b02 100755 --- a/src/tests/tools/mock_mw_sdn_ctrl/run.sh +++ b/src/tests/tools/mock_mw_sdn_ctrl/run.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh b/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh index 665d337c94b0d4ec1378b1c3fffaa637fe26cd8a..5e6af0e77c89cb23f4c29097ca059bc68d131f7d 100755 --- a/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh +++ b/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/Dockerfile b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/Dockerfile index 70fc81e5408d49ae332132612d0f86c1d5901e38..097844a4148da5500c86de31c0f7e3adfa85ad6c 100644 --- a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/Dockerfile +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/build.sh b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/build.sh index 4df315cec178cef13eaa059a739bc22efc011d4d..bea3f9bdf69e2b5136db4c851b5844982299c159 100755 --- a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/build.sh +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/build.sh @@ -1,4 +1,17 @@ #!/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. docker build -t mock-mw-sdn-ctrl:test -f Dockerfile . docker tag mock-mw-sdn-ctrl:test localhost:32000/tfs/mock-mw-sdn-ctrl:test diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/deploy.sh b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/deploy.sh index ded232e5c50f8cd5ed448ec0193f58c43626f4ad..e1d2168dfd9512f6f5ba6a56502dec87f1097861 100755 --- a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/deploy.sh +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/deploy.sh @@ -1,4 +1,17 @@ #!/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. kubectl delete namespace mocks kubectl --namespace mocks apply -f mock-mw-sdn-ctrl.yaml diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/mock-mw-sdn-ctrl.yaml b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/mock-mw-sdn-ctrl.yaml index 05b89f949e940ae55ad592b9cc0e82a6eea2e343..bccbfc987872b702c3a77f8d7b2e75ff97e5c6bd 100644 --- a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/mock-mw-sdn-ctrl.yaml +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/mock-mw-sdn-ctrl.yaml @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + kind: Namespace apiVersion: v1 metadata: diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/requirements.in b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/requirements.in index f4bc191062c8385b2eeb003832b284313305c795..74e09dfaa621c6d82875b19e5b737effae1c0545 100644 --- a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/requirements.in +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/test_mw.py b/src/tests/tools/mock_mw_sdn_ctrl/test_mw.py index 0329d30ad234398200c0fe29aac46f72f5a2e924..3165662b18996cf8c6ff486af40e8cf6e90d7d52 100644 --- a/src/tests/tools/mock_mw_sdn_ctrl/test_mw.py +++ b/src/tests/tools/mock_mw_sdn_ctrl/test_mw.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import json, logging, requests from requests.auth import HTTPBasicAuth from typing import Optional diff --git a/src/tests/tools/mock_osm/Constants.py b/src/tests/tools/mock_osm/Constants.py index 8d4145e89274927069a56830c2ed7bef92ced08c..fb59ef2c7f42736572c175fb02eb08d877523b14 100644 --- a/src/tests/tools/mock_osm/Constants.py +++ b/src/tests/tools/mock_osm/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/mock_osm/MockOSM.py b/src/tests/tools/mock_osm/MockOSM.py index 338db0e19becc8a9dd277beec7f3b4ceb2e765a3..7ced57d3efa64038d09f5cea21fb7098b8ceb2ba 100644 --- a/src/tests/tools/mock_osm/MockOSM.py +++ b/src/tests/tools/mock_osm/MockOSM.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/mock_osm/Tools.py b/src/tests/tools/mock_osm/Tools.py index 45dfa23c984e175c01efa77371e94454b98ea94e..3b0ab84875486370d72b4156e19547f5407d2d1a 100644 --- a/src/tests/tools/mock_osm/Tools.py +++ b/src/tests/tools/mock_osm/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/mock_osm/__init__.py b/src/tests/tools/mock_osm/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/tools/mock_osm/__init__.py +++ b/src/tests/tools/mock_osm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/mock_tfs_optical_sdn_ctrl/MockTfsOpticalSdnCtrl.py b/src/tests/tools/mock_tfs_optical_sdn_ctrl/MockTfsOpticalSdnCtrl.py new file mode 100644 index 0000000000000000000000000000000000000000..3316e6ad564f9037deb82f2a3c89a278f5aa7eda --- /dev/null +++ b/src/tests/tools/mock_tfs_optical_sdn_ctrl/MockTfsOpticalSdnCtrl.py @@ -0,0 +1,73 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 functools, logging, sys, time +from flask import Flask, jsonify, make_response, request +from flask_restful import Api, Resource +from data import ADDLIGHTPATH_REPLY + +BIND_ADDRESS = '0.0.0.0' +BIND_PORT = 8443 +BASE_URL = '/OpticalTFS' +STR_ENDPOINT = 'https://{:s}:{:s}{:s}'.format(str(BIND_ADDRESS), str(BIND_PORT), str(BASE_URL)) +LOG_LEVEL = logging.DEBUG + + +logging.basicConfig(level=LOG_LEVEL, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") +LOGGER = logging.getLogger(__name__) +logging.getLogger('werkzeug').setLevel(logging.WARNING) + +def log_request(logger : logging.Logger, response): + timestamp = time.strftime('[%Y-%b-%d %H:%M]') + logger.info('%s %s %s %s %s', timestamp, request.remote_addr, request.method, request.full_path, response.status) + return response + +class AddLightpath(Resource): + def put(self, src_node: str, dst_node: str, bitrate: int): + return make_response(jsonify(ADDLIGHTPATH_REPLY), 200) + +class DelLightpath(Resource): + def delete(self, flow_id: str, src_node: str, dst_node: str, bitrate: int): + return make_response(jsonify({}), 200) + +class GetLightpaths(Resource): + def get(self): + return make_response(jsonify({}), 200) + +class GetLinks(Resource): + def get(self): + return make_response(jsonify({}), 200) + + +def main(): + LOGGER.info('Starting...') + + app = Flask(__name__) + app.after_request(functools.partial(log_request, LOGGER)) + + api = Api(app, prefix=BASE_URL) + api.add_resource(AddLightpath, '/AddLightpath///') + api.add_resource(DelLightpath, '/DelLightpath////') + api.add_resource(GetLightpaths, '/GetLightpaths') + api.add_resource(GetLinks, '/GetLinks') + + LOGGER.info('Listening on {:s}...'.format(str(STR_ENDPOINT))) + app.run(debug=True, host=BIND_ADDRESS, port=BIND_PORT) + + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/tests/tools/mock_tfs_optical_sdn_ctrl/data.py b/src/tests/tools/mock_tfs_optical_sdn_ctrl/data.py new file mode 100644 index 0000000000000000000000000000000000000000..91635e6e9682693e72b0d841a8a73f1dbd7d3cf1 --- /dev/null +++ b/src/tests/tools/mock_tfs_optical_sdn_ctrl/data.py @@ -0,0 +1,98 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +ADDLIGHTPATH_REPLY = { + "flow_id": 1, + "src": "t1", + "dst": "t2", + "bitrate": 100, + "bidir": 1, + "flows": { + "t1": [ + { + "in": 0, + "out": "1" + }, + { + "in": "1", + "out": 0 + } + ], + "r1": [ + { + "in": "101R", + "out": "1T" + }, + { + "in": "1R", + "out": "101T" + } + ], + "r2": [ + { + "in": "1R", + "out": "101T" + }, + { + "in": "101R", + "out": "1T" + } + ], + "t2": [ + { + "in": "1", + "out": 0 + }, + { + "in": 0, + "out": "1" + } + ] + }, + "band_type": "c_slots", + "slots": [ + 1, + 2, + 3, + 4 + ], + "fiber_forward": { + "t1-r1": "M1", + "r1-r2": "d1-1", + "r2-t2": "S1" + }, + "fiber_backward": { + "r1-t1": "S1", + "r2-r1": "d1-1", + "t2-r2": "M1" + }, + "op-mode": 1, + "n_slots": 4, + "links": [ + "t1-r1", + "r1-r2", + "r2-t2" + ], + "path": [ + "t1", + "r1", + "r2", + "t2" + ], + "band": 50, + "freq": 192031.25, + "is_active": True +} + diff --git a/src/clean.sh b/src/tests/tools/mock_tfs_optical_sdn_ctrl/run.sh similarity index 80% rename from src/clean.sh rename to src/tests/tools/mock_tfs_optical_sdn_ctrl/run.sh index 21e887190e095062032965337cc8165d982746f8..f89ecbf5c33cbc81893b5cd21b1d71680a50ca9f 100755 --- a/src/clean.sh +++ b/src/tests/tools/mock_tfs_optical_sdn_ctrl/run.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. - -docker rm --force monitoring -docker network remove teraflowbridge - +python MockTfsOpticalSdnCtrl.py diff --git a/src/tests/tools/perf_plots/Component_RPC_Methods.py b/src/tests/tools/perf_plots/Component_RPC_Methods.py index f0cd014737fa04f9047badbcf60790c042bb602d..fe94e5b8b19d188e1cf170bf1dbe74533c838c76 100644 --- a/src/tests/tools/perf_plots/Component_RPC_Methods.py +++ b/src/tests/tools/perf_plots/Component_RPC_Methods.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/Device_Driver_Details.py b/src/tests/tools/perf_plots/Device_Driver_Details.py index daeba87be92ea051854b336c4b26a150bafe8818..26a2d711e5a872c46ce39a308d46d7117f2c9cdd 100644 --- a/src/tests/tools/perf_plots/Device_Driver_Details.py +++ b/src/tests/tools/perf_plots/Device_Driver_Details.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/Device_Driver_Methods.py b/src/tests/tools/perf_plots/Device_Driver_Methods.py index 4287dde5ab0263f2d804125f661914b77f101a05..b4f70c4fd86d62e9b11abad4ce86e9facc0f8089 100644 --- a/src/tests/tools/perf_plots/Device_Driver_Methods.py +++ b/src/tests/tools/perf_plots/Device_Driver_Methods.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/LoadGen_Requests.py b/src/tests/tools/perf_plots/LoadGen_Requests.py index d3194d82d18f03aeeec395049108a2e3fc214923..3ed4861a8c8d3b5022c6b320b796c249ff75da63 100644 --- a/src/tests/tools/perf_plots/LoadGen_Requests.py +++ b/src/tests/tools/perf_plots/LoadGen_Requests.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/Service_Handler_Methods.py b/src/tests/tools/perf_plots/Service_Handler_Methods.py index 4cd56432a268ae356b363a4fcaa6ce13458bfc79..1e6c197f53c585469d19c760c3bf47c55b1e4b6f 100644 --- a/src/tests/tools/perf_plots/Service_Handler_Methods.py +++ b/src/tests/tools/perf_plots/Service_Handler_Methods.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/__init__.py b/src/tests/tools/perf_plots/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/tools/perf_plots/__init__.py +++ b/src/tests/tools/perf_plots/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/collect.sh b/src/tests/tools/perf_plots/collect.sh index 08d14fe21d86c4b5588f4f659baf6d2b55b28c66..6b8d16e59274b308f116bb381ddbcc034ffc8e5f 100755 --- a/src/tests/tools/perf_plots/collect.sh +++ b/src/tests/tools/perf_plots/collect.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/Experiment.py b/src/tests/tools/perf_plots/experiments/Experiment.py index 3585153ab5a81184e07e510524d60a525446fb5c..2fc03f89a58ee51a9c6954ac8d269d6f61b693dd 100644 --- a/src/tests/tools/perf_plots/experiments/Experiment.py +++ b/src/tests/tools/perf_plots/experiments/Experiment.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/__init__.py b/src/tests/tools/perf_plots/experiments/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/tools/perf_plots/experiments/__init__.py +++ b/src/tests/tools/perf_plots/experiments/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_1/Emu_Onboard.py b/src/tests/tools/perf_plots/experiments/scenario_1/Emu_Onboard.py index 95056c97dffdceb6a880cf3aa0d6b1fd93cbaddd..d96c0c7d44c98005addc0b6c262625d351371708 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_1/Emu_Onboard.py +++ b/src/tests/tools/perf_plots/experiments/scenario_1/Emu_Onboard.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_1/L2NM_EMU_Service.py b/src/tests/tools/perf_plots/experiments/scenario_1/L2NM_EMU_Service.py index 46048473d38c6a84fe8da827758ddbf874fd4c36..f2fd2a69826eec1a59ddfcb365b98b42da7e97a6 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_1/L2NM_EMU_Service.py +++ b/src/tests/tools/perf_plots/experiments/scenario_1/L2NM_EMU_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_1/L3NM_EMU_Service.py b/src/tests/tools/perf_plots/experiments/scenario_1/L3NM_EMU_Service.py index 9b50db405f3d1caf953ac8526760d022bc1d22a5..949f070964ffb7e56eb5d00c2d3b00abf109b52b 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_1/L3NM_EMU_Service.py +++ b/src/tests/tools/perf_plots/experiments/scenario_1/L3NM_EMU_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_1/__init__.py b/src/tests/tools/perf_plots/experiments/scenario_1/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_1/__init__.py +++ b/src/tests/tools/perf_plots/experiments/scenario_1/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_001tnt_005erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_001tnt_005erl.py index 8ab69bccace4481879aa3aa35990bdf06bc7f70d..e09c36c18c00aa3f99c2463933d112d5b71c2953 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_001tnt_005erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_001tnt_005erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_005tnt_025erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_005tnt_025erl.py index 0a52df5b2589abaaee3601aba2152a84ac71b8c6..fd9207b7f91f9c36dc844ff4e8a80064207d0d55 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_005tnt_025erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_005tnt_025erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_010tnt_050erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_010tnt_050erl.py index 6bc87ba8ff38f261b8d669d7525bc4918becbec8..02df1a0dd6ceaa31849911732098e9fa83c9da4d 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_010tnt_050erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_010tnt_050erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_020tnt_100erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_020tnt_100erl.py index e9aa239c6fcdb230a4c246d1b4973258a861a309..c69f4bb9ea6116cee562dc14bd71b004c550e845 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_020tnt_100erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_020tnt_100erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_040tnt_200erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_040tnt_200erl.py index 155ad589533eeb41ac23ce0b0c2e83d0935f8616..910752cf5680896f906792bd4b64fb611726a24b 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_040tnt_200erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_040tnt_200erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_060tnt_300erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_060tnt_300erl.py index 67167c82f9114b12ab6ef91743f900b12fc5e916..a45ef712b27eadee053fb4a3f0861f50fe052eab 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_060tnt_300erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_060tnt_300erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_080tnt_400erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_080tnt_400erl.py index acc1f50384d835c1fda7e420f01dd8e12186e0f6..75c567e258f23248fe1a389008a1cddc9ca212cc 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_080tnt_400erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_080tnt_400erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_100tnt_500erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_100tnt_500erl.py index 9f0a18c1d24f8171fc0c944c71ed6b367ae02025..330c2e6c7e417b2d305353c3d27693c836202500 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_100tnt_500erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_100tnt_500erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_120tnt_600erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_120tnt_600erl.py index 81e9916cdeca8d22632f8c6da0dccc6e3fa6d1af..f28ec3fba00053fbc66da2f5a818094fc94af5c2 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_120tnt_600erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_120tnt_600erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/__init__.py b/src/tests/tools/perf_plots/experiments/scenario_2/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/__init__.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/tools/FileSystem.py b/src/tests/tools/perf_plots/tools/FileSystem.py index 3af5dbc910be35b548a11d7a00ee79e604aa0927..32493639acf861328fe710aca653c7a3912525f8 100644 --- a/src/tests/tools/perf_plots/tools/FileSystem.py +++ b/src/tests/tools/perf_plots/tools/FileSystem.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/tools/Histogram.py b/src/tests/tools/perf_plots/tools/Histogram.py index 0380b5bd21804cfc468a1f9bd19565337f76f741..811b48eaad0e6d6c48eb624e90b52e0026d6d951 100644 --- a/src/tests/tools/perf_plots/tools/Histogram.py +++ b/src/tests/tools/perf_plots/tools/Histogram.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/tools/HistogramData.py b/src/tests/tools/perf_plots/tools/HistogramData.py index 7469853c636b089b9dff8473b34fb7ee6913d1aa..73b5ccc460fd196840f9f6b2ab9bf5e649411748 100644 --- a/src/tests/tools/perf_plots/tools/HistogramData.py +++ b/src/tests/tools/perf_plots/tools/HistogramData.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/tools/Plotter.py b/src/tests/tools/perf_plots/tools/Plotter.py index c0ce92a7f91198bcac9692a55f3c122792b16b84..afb440d48b89dae3afc273c02bce48f37a2354be 100644 --- a/src/tests/tools/perf_plots/tools/Plotter.py +++ b/src/tests/tools/perf_plots/tools/Plotter.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/tools/Prometheus.py b/src/tests/tools/perf_plots/tools/Prometheus.py index 60a06b202e5b9710bb814974360fd6d8e4580cc4..f6702889d29f9b872263a9d68c66f15b6747abcf 100644 --- a/src/tests/tools/perf_plots/tools/Prometheus.py +++ b/src/tests/tools/perf_plots/tools/Prometheus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/tests/tools/perf_plots/tools/__init__.py b/src/tests/tools/perf_plots/tools/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/tests/tools/perf_plots/tools/__init__.py +++ b/src/tests/tools/perf_plots/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/.gitlab-ci.yml b/src/webui/.gitlab-ci.yml index 26af10f4e5b3ab23fcd0802ba6df9d2ad3bf7a19..48f41744a706c05c97293245fa05c8c798cc005e 100644 --- a/src/webui/.gitlab-ci.yml +++ b/src/webui/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ build webui: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker 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: @@ -39,7 +39,7 @@ build webui: - .gitlab-ci.yml # Apply unit test to the component -unit test webui: +unit_test webui: variables: IMAGE_NAME: 'webui' # name of the microservice IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) @@ -79,28 +79,28 @@ unit test webui: reports: junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml -# Deployment of the service in Kubernetes Cluster -deploy webui: - variables: - IMAGE_NAME: 'webui' # name of the microservice - IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) - stage: deploy - needs: - - unit test webui - # - 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 +## Deployment of the service in Kubernetes Cluster +#deploy webui: +# variables: +# IMAGE_NAME: 'webui' # name of the microservice +# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) +# stage: deploy +# needs: +# - unit test webui +# # - 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/webui/Config.py b/src/webui/Config.py index 9f104e8d3e6d943dc0fec7f7791d9f30c6407ded..fc7fa1e57290fb7c5fae2028bc1ab4b91f2029ff 100644 --- a/src/webui/Config.py +++ b/src/webui/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/Dockerfile b/src/webui/Dockerfile index ab0b2c4418dab4004792d4d8932d635cb42f734b..55e67b670f36812a55cf60e411cf137bc5b8a2ee 100644 --- a/src/webui/Dockerfile +++ b/src/webui/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -85,6 +85,8 @@ COPY --chown=webui:webui src/service/client/. service/client/ COPY --chown=webui:webui src/slice/__init__.py slice/__init__.py COPY --chown=webui:webui src/slice/client/. slice/client/ COPY --chown=webui:webui src/webui/. webui/ +COPY --chown=webui:webui src/bgpls_speaker/__init__.py bgpls_speaker/__init__.py +COPY --chown=webui:webui src/bgpls_speaker/client/. bgpls_speaker/client/ # Start the service ENTRYPOINT ["python", "-m", "webui.service"] diff --git a/src/webui/__init__.py b/src/webui/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/webui/__init__.py +++ b/src/webui/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/requirements.in b/src/webui/requirements.in index 9facefbbae3c20b90304803e9ccfa4ebf4011fbb..ab512dedb16d95c21d8807732f4ef386475aa32e 100644 --- a/src/webui/requirements.in +++ b/src/webui/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -Flask==2.1.3 -Flask-WTF==1.0.0 -flask-healthz==0.0.3 -flask-unittest==0.1.2 +Flask<3 +Flask-WTF<2 +flask-healthz<2 +flask-unittest==0.1.3 lorem-text==2.1 -werkzeug==2.3.7 \ No newline at end of file +werkzeug==2.3.7 diff --git a/src/webui/service/__init__.py b/src/webui/service/__init__.py index 3c64f45c90457e1b6a9553e60634879a28910a31..b864d3549e051b54e888c80547724da14fec5f67 100644 --- a/src/webui/service/__init__.py +++ b/src/webui/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ import json from typing import List, Tuple, Union from flask import Flask, request, session from flask_healthz import healthz, HealthError +from common.tools.grpc.Tools import grpc_message_to_json from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient @@ -48,7 +49,10 @@ def json_to_list(json_str : str) -> List[Union[str, Tuple[str, str]]]: if isinstance(data, dict): return [('kv', (key, value)) for key, value in data.items()] elif isinstance(data, list): - return [('item', ', '.join(data))] + if len(data) == 1 and isinstance(data[0], dict): + return [('kv', (key, value)) for key, value in data[0].items()] + else: + return [('item', ', '.join([str(d) for d in data]))] else: return [('item', str(data))] @@ -91,6 +95,9 @@ def create_app(use_config=None, web_app_root=None): from webui.service.device.routes import device # pylint: disable=import-outside-toplevel app.register_blueprint(device) + + from webui.service.bgpls.routes import bgpls # pylint: disable=import-outside-toplevel + app.register_blueprint(bgpls) from webui.service.link.routes import link # pylint: disable=import-outside-toplevel app.register_blueprint(link) @@ -100,6 +107,7 @@ def create_app(use_config=None, web_app_root=None): app.jinja_env.globals.update({ # pylint: disable=no-member 'enumerate' : enumerate, + 'grpc_message_to_json': grpc_message_to_json, 'json_to_list' : json_to_list, 'round' : round, 'get_working_context' : get_working_context, diff --git a/src/webui/service/__main__.py b/src/webui/service/__main__.py index f07056d509552f0d2db92468f9785446f56ce421..e9a906e8a431e287911547abc4065d9d9364ccb4 100644 --- a/src/webui/service/__main__.py +++ b/src/webui/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/bgpls/__init__.py b/src/webui/service/bgpls/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfc943b68af13a11e562abbc8680ade71db8f02 --- /dev/null +++ b/src/webui/service/bgpls/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/webui/service/bgpls/forms.py b/src/webui/service/bgpls/forms.py new file mode 100644 index 0000000000000000000000000000000000000000..46e89e748b1d2a77639acaf5231751a20e073106 --- /dev/null +++ b/src/webui/service/bgpls/forms.py @@ -0,0 +1,86 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# external imports +from flask_wtf import FlaskForm +from flask_wtf.file import FileAllowed +from wtforms import SelectField, FileField, SubmitField + +from wtforms import StringField, SelectField, TextAreaField, SubmitField, BooleanField, Form +from wtforms.validators import DataRequired, Length, NumberRange, Regexp, ValidationError +from common.proto.context_pb2 import DeviceOperationalStatusEnum +from webui.utils.form_validators import key_value_validator + +class AddDeviceForm(FlaskForm): + device_id = StringField('ID', + validators=[DataRequired(), Length(min=5)]) + device_type = SelectField('Type', choices = []) + operational_status = SelectField('Operational Status', + # choices=[(-1, 'Select...'), (0, 'Undefined'), (1, 'Disabled'), (2, 'Enabled')], + coerce=int, + validators=[NumberRange(min=0)]) + device_drivers_undefined = BooleanField('UNDEFINED / EMULATED') + device_drivers_openconfig = BooleanField('OPENCONFIG') + device_drivers_transport_api = BooleanField('TRANSPORT_API') + device_drivers_p4 = BooleanField('P4') + device_drivers_ietf_network_topology = BooleanField('IETF_NETWORK_TOPOLOGY') + device_drivers_onf_tr_532 = BooleanField('ONF_TR_352') + device_drivers_xr = BooleanField('XR') + device_config_address = StringField('connect/address',default='127.0.0.1',validators=[DataRequired(), Length(min=5)]) + device_config_port = StringField('connect/port',default='0',validators=[DataRequired(), Length(min=1)]) + device_config_settings = TextAreaField('connect/settings',default='{}',validators=[DataRequired(), Length(min=2)]) + submit = SubmitField('Add') + + def validate_operational_status(form, field): + if field.data not in DeviceOperationalStatusEnum.DESCRIPTOR.values_by_number: + raise ValidationError('The operational status value selected is incorrect!') + +class ConfigForm(FlaskForm): + device_key_config = StringField('Key configuration') + device_value_config = StringField('Value configuration') + submit = SubmitField('Add') + + +class UpdateDeviceForm(FlaskForm): + update_operational_status = SelectField('Operational Status', + choices=[(-1, 'Select...'), (0, 'Undefined'), (1, 'Disabled'), (2, 'Enabled')], + coerce=int, + validators=[NumberRange(min=0)]) + + submit = SubmitField('Update') + +class ContextTopologyForm(FlaskForm): + context_topology = SelectField( + 'Ctx/Topo', + choices=[], + validators=[ + DataRequired(), + Length(min=1) + ]) + submit = SubmitField('Submit') + +class DescriptorForm(FlaskForm): + descriptors = FileField( + 'Descriptors', + validators=[ + FileAllowed(['json'], 'JSON Descriptors only!') + ]) + submit = SubmitField('Submit') + +class SpeakerForm(FlaskForm): + + speaker_address = StringField('ip',default='127.0.0.1',validators=[DataRequired(), Length(min=5)]) + speaker_port = StringField('port',default='179',validators=[DataRequired(), Length(min=1)]) + speaker_as = StringField('as',default='65000',validators=[DataRequired(), Length(min=1)]) + submit = SubmitField('Submit') \ No newline at end of file diff --git a/src/webui/service/bgpls/routes.py b/src/webui/service/bgpls/routes.py new file mode 100644 index 0000000000000000000000000000000000000000..4148b1cd233e3b2b3dd6d91eb51d103bc8ea7c51 --- /dev/null +++ b/src/webui/service/bgpls/routes.py @@ -0,0 +1,244 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 +from flask import current_app, render_template, Blueprint, flash, session, redirect, url_for, request +from common.proto.context_pb2 import ( + ConfigActionEnum, ConfigRule, ConfigRule_Custom, Device, DeviceConfig, DeviceDriverEnum, DeviceId, DeviceList, DeviceOperationalStatusEnum, + Empty, EndPoint, EndPointId, TopologyId, Uuid) +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from webui.service.device.forms import AddDeviceForm +from common.DeviceTypes import DeviceTypeEnum +from webui.service.bgpls.forms import ConfigForm, SpeakerForm, UpdateDeviceForm + +from bgpls_speaker.client.BgplsClient import BgplsClient +from common.proto.bgpls_pb2 import (BgplsSpeaker, DiscoveredDeviceList,DiscoveredDevice,DiscoveredLinkList,DiscoveredLink, NodeDescriptors) + +bgpls = Blueprint('bgpls', __name__, url_prefix='/bgpls') +context_client = ContextClient() +device_client = DeviceClient() +bgpls_client = BgplsClient() +logger = logging.getLogger(__name__) + +@bgpls.get('/') +def home(): + if 'context_uuid' not in session or 'topology_uuid' not in session: + flash("Please select a context!", "warning") + return redirect(url_for("main.home")) + + context_uuid = session['context_uuid'] + topology_uuid = session['topology_uuid'] + + context_client.connect() + json_topo_id = json_topology_id(topology_uuid, context_id=json_context_id(context_uuid)) + grpc_topology = context_client.GetTopology(TopologyId(**json_topo_id)) + topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} + + if grpc_topology is None: + flash('Context({:s})/Topology({:s}) not found'.format(str(context_uuid), str(topology_uuid)), 'danger') + devices = [] + else: + topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} + grpc_devices: DeviceList = context_client.ListDevices(Empty()) + devices = [ + device for device in grpc_devices.devices + if device.device_id.device_uuid.uuid in topo_device_uuids + ] + + # ListNewDevices discovered from bgpls + logger.info('bgpls/home') + bgpls_client.connect() + logger.info('bgpls_client.connect %s',bgpls_client) + discovered_device_list = bgpls_client.ListDiscoveredDevices(Empty()) + logger.info('discoveredDeviceList %s',discovered_device_list) + # List Links discovered from bgpls + discovered_link_list = bgpls_client.ListDiscoveredLinks(Empty()) + logger.info('discoveredLinkList %s',discovered_link_list) + # List current open speaker connections + speaker_list=bgpls_client.ListBgplsSpeakers(Empty()) + + + context_client.close() + bgpls_client.close() + + return render_template( + 'bgpls/home.html', devices=devices, dde=DeviceDriverEnum, + dose=DeviceOperationalStatusEnum,disdev=discovered_device_list.discovereddevices, + dislink=discovered_link_list.discoveredlinks,speakers=speaker_list.speakers) + +@bgpls.route('add/', methods=['GET', 'POST']) +def add(device_name): + """" + Add a discovered device from bgpls protocol. Populate form from + existent info in bgpls. + """ + # TODO: Conect to device and get necessary info + form = AddDeviceForm() + + logger.info('bgpls/add') + + # listing enum values + form.operational_status.choices = [] + for key, _ in DeviceOperationalStatusEnum.DESCRIPTOR.values_by_name.items(): + form.operational_status.choices.append( + (DeviceOperationalStatusEnum.Value(key), key.replace('DEVICEOPERATIONALSTATUS_', ''))) + + form.device_type.choices = [] + # items for Device Type field + for device_type in DeviceTypeEnum: + form.device_type.choices.append((device_type.value,device_type.value)) + + if form.validate_on_submit(): + device_obj = Device() + # Device UUID: + device_obj.device_id.device_uuid.uuid = form.device_id.data # pylint: disable=no-member + + # Device type: + device_obj.device_type = str(form.device_type.data) + + # Device configurations: + config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member + config_rule.action = ConfigActionEnum.CONFIGACTION_SET + config_rule.custom.resource_key = '_connect/address' + config_rule.custom.resource_value = form.device_config_address.data + + config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member + config_rule.action = ConfigActionEnum.CONFIGACTION_SET + config_rule.custom.resource_key = '_connect/port' + config_rule.custom.resource_value = form.device_config_port.data + + config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member + config_rule.action = ConfigActionEnum.CONFIGACTION_SET + config_rule.custom.resource_key = '_connect/settings' + + try: + device_config_settings = json.loads(form.device_config_settings.data) + except: # pylint: disable=bare-except + device_config_settings = form.device_config_settings.data + logger.info('(bgpls/add) config settings %s', form.device_config_settings.data) + if isinstance(device_config_settings, dict): + config_rule.custom.resource_value = json.dumps(device_config_settings) + logger.info('(bgpls/add) config settings is instance to json') + else: + config_rule.custom.resource_value = str(device_config_settings) + + # Device status: + device_obj.device_operational_status = form.operational_status.data + + # Device drivers: + if form.device_drivers_undefined.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_UNDEFINED) + if form.device_drivers_openconfig.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_OPENCONFIG) + if form.device_drivers_transport_api.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_TRANSPORT_API) + if form.device_drivers_p4.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_P4) + if form.device_drivers_ietf_network_topology.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY) + if form.device_drivers_onf_tr_532.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532) + if form.device_drivers_xr.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_XR) + + try: + device_client.connect() + logger.info('add device from speaker:%s',device_obj) + response: DeviceId = device_client.AddDevice(device_obj) + device_client.close() + flash(f'New device was created with ID "{response.device_uuid.uuid}".', 'success') + bgpls_client.connect() + bgpls_client.NotifyAddNodeToContext(NodeDescriptors(nodeName=device_obj.device_id.device_uuid.uuid)) + bgpls_client.close() + return redirect(url_for('device.home')) + except Exception as e: + flash(f'Problem adding the device. {e.details()}', 'danger') + + # Prefill data with discovered info from speaker + # Device Name from bgpls + form.device_name=device_name + device=device_name + form.device_id.data=device_name + # Default values (TODO: NOT WORKING) + form.device_type.data=DeviceTypeEnum.EMULATED_PACKET_ROUTER + form.device_config_settings.data=str('{"username": "admin", "password": "admin"}') + + return render_template('bgpls/add.html', form=form, device=device, + submit_text='Add New Device') + +@bgpls.route('detail/', methods=['GET', 'POST']) +def detail(device_uuid: str): + request = DeviceId() + request.device_uuid.uuid = device_uuid + context_client.connect() + response = context_client.GetDevice(request) + context_client.close() + return render_template('bgpls/detail.html', device=response, + dde=DeviceDriverEnum, + dose=DeviceOperationalStatusEnum) + +@bgpls.route('addSpeaker', methods=['GET', 'POST']) +def addSpeaker(): + # Conectar con bgplsÂż + bgpls_client.connect() + form = SpeakerForm() + if form.validate_on_submit(): + logger.info('addSpeaker ip:%s',form.speaker_address.data) + bgpls_client.AddBgplsSpeaker(BgplsSpeaker(address=form.speaker_address.data,port=form.speaker_port.data,asNumber=form.speaker_as.data)) + flash(f'Speaker "{form.speaker_address.data}:{form.speaker_port.data}" added successfully!', 'success') + bgpls_client.close() + return render_template('bgpls/addSpeaker.html',form=form) + +@bgpls.route('formSpeaker', methods=['GET','POST']) +def formSpeaker(): + # Conectar con bgplsÂż + form = SpeakerForm() + if request.method=="POST": + address = form.speaker_address.data + port = form.speaker_port.data + as_ = form.speaker_as.data + logger.info("FORM formSpeaker: %s %s %s", address,port,as_) + + flash(f'Speaker "{address}:{port}" added successfully!', 'success') + + return redirect(url_for('bgpls.home')) + # return 'Form submitted' + + +@bgpls.route('editSpeakers', methods=['GET','POST']) +def editSpeakers(): + + speakers=[] + bgpls_client.connect() + speaker_list=bgpls_client.ListBgplsSpeakers(Empty()) + speakers_ids=[speaker for speaker in speaker_list.speakers if speaker.id] + speakers=[bgpls_client.GetSpeakerInfoFromId(ids) for ids in speakers_ids] + + bgpls_client.close() + return render_template('bgpls/editSpeakers.html',speakers=speakers) + + +@bgpls.route('disconnectSpeaker/', methods=['GET','POST']) +def disconnectSpeaker(speaker_address): + + bgpls_client.connect() + current_speaker=BgplsSpeaker(address=speaker_address) + logger.info('Disconnecting speaker: %s...',speaker_address) + bgpls_client.DisconnectFromSpeaker(current_speaker) + bgpls_client.close() + + return redirect(url_for('bgpls.editSpeakers')) \ No newline at end of file diff --git a/src/webui/service/context/__init__.py b/src/webui/service/context/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/webui/service/context/__init__.py +++ b/src/webui/service/context/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/context/routes.py b/src/webui/service/context/routes.py index 7c45f136db195c1581c7de7e92d4a0df907ad869..7462126a9b4f0aac1592a9430894e2a04bfd594e 100644 --- a/src/webui/service/context/routes.py +++ b/src/webui/service/context/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/device/__init__.py b/src/webui/service/device/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/webui/service/device/__init__.py +++ b/src/webui/service/device/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/device/forms.py b/src/webui/service/device/forms.py index bcd5804d32927763344d08371320fdde5f2fcab7..e4c71d92170dc9fe46996a1c93978647800aa300 100644 --- a/src/webui/service/device/forms.py +++ b/src/webui/service/device/forms.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,6 +31,8 @@ class AddDeviceForm(FlaskForm): device_drivers_xr = BooleanField('XR') device_drivers_ietf_l2vpn = BooleanField('IETF L2VPN') device_drivers_gnmi_openconfig = BooleanField('GNMI OPENCONFIG') + device_drivers_optical_tfs = BooleanField('OPTICAL TFS') + device_drivers_ietf_actn = BooleanField('IETF ACTN') device_config_address = StringField('connect/address',default='127.0.0.1',validators=[DataRequired(), Length(min=5)]) device_config_port = StringField('connect/port',default='0',validators=[DataRequired(), Length(min=1)]) diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index ce15c7abaa527191e87dcaeee5b91599014c1e72..fb930024d9fc3ff0b70b77345041e33dcb0d28c2 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -65,8 +65,9 @@ def add(): (DeviceOperationalStatusEnum.Value(key), key.replace('DEVICEOPERATIONALSTATUS_', ''))) # items for Device Type field + form.device_type.choices = [] for device_type in DeviceTypeEnum: - form.device_type.choices.append((device_type.value,device_type.value)) + form.device_type.choices.append((device_type.value,device_type.value)) if form.validate_on_submit(): device_obj = Device() @@ -124,6 +125,10 @@ def add(): device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN) if form.device_drivers_gnmi_openconfig.data: device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG) + if form.device_drivers_optical_tfs.data: + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS) + if form.device_drivers_ietf_actn.data: + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN) device_obj.device_drivers.extend(device_drivers) # pylint: disable=no-member try: diff --git a/src/webui/service/js/__init__.py b/src/webui/service/js/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/webui/service/js/__init__.py +++ b/src/webui/service/js/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/js/routes.py b/src/webui/service/js/routes.py index 68e0af893a9f82197d18ee4d6632c934ff17ef35..a6180825f7e1294d5ca571e9672d3b4a4b6715d4 100644 --- a/src/webui/service/js/routes.py +++ b/src/webui/service/js/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/link/__init__.py b/src/webui/service/link/__init__.py index 355dcdb04bdddd352966a9567a7a63117666e619..7c7568fdb6e3b1446aa9412ad32a0a5948ba949b 100644 --- a/src/webui/service/link/__init__.py +++ b/src/webui/service/link/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/link/routes.py b/src/webui/service/link/routes.py index 3ab320d8b13d037e195f00ced9eb63bd14ecc0dd..973414fb35cde2bd667fcc74e4841f434824e038 100644 --- a/src/webui/service/link/routes.py +++ b/src/webui/service/link/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/load_gen/__init__.py b/src/webui/service/load_gen/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/webui/service/load_gen/__init__.py +++ b/src/webui/service/load_gen/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/load_gen/forms.py b/src/webui/service/load_gen/forms.py index 4c5c095cd0ca7b0549a14be394e517694d9b3268..ede779681eed4c7709d1c91620ce2302ea6981c0 100644 --- a/src/webui/service/load_gen/forms.py +++ b/src/webui/service/load_gen/forms.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/load_gen/routes.py b/src/webui/service/load_gen/routes.py index 3483c2a65d08f3da18b2f630dbf7a59ac0f22ecb..24f2a078d2ed70f9ba9c86431336c7018f6d4d8d 100644 --- a/src/webui/service/load_gen/routes.py +++ b/src/webui/service/load_gen/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/main/__init__.py b/src/webui/service/main/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/webui/service/main/__init__.py +++ b/src/webui/service/main/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/main/forms.py b/src/webui/service/main/forms.py index 9d628e072fe271b11c79df9845fa18c532a81407..dd55fb5640eb7003a0be16d11031460f92027ca0 100644 --- a/src/webui/service/main/forms.py +++ b/src/webui/service/main/forms.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/main/routes.py b/src/webui/service/main/routes.py index 75f036befd4bed3bb3bd743b9f423bf21c014e55..52944a31c439472055d65e9e75249465dcbca7f7 100644 --- a/src/webui/service/main/routes.py +++ b/src/webui/service/main/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/policy_rule/__init__.py b/src/webui/service/policy_rule/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/webui/service/policy_rule/__init__.py +++ b/src/webui/service/policy_rule/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/policy_rule/routes.py b/src/webui/service/policy_rule/routes.py index 5a99cf8b2f6ce71c571c9d31a2118a5390ee7d15..4fbecabe6a3ba40303f8b42f4887ac6935efab5f 100644 --- a/src/webui/service/policy_rule/routes.py +++ b/src/webui/service/policy_rule/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/service/__init__.py b/src/webui/service/service/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/webui/service/service/__init__.py +++ b/src/webui/service/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/service/forms.py b/src/webui/service/service/forms.py new file mode 100644 index 0000000000000000000000000000000000000000..f07acf54365b79245583e7f9567b8bc4a5cfd89d --- /dev/null +++ b/src/webui/service/service/forms.py @@ -0,0 +1,261 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 ipaddress, re +from flask_wtf import FlaskForm +from wtforms import StringField, SelectField, IntegerField, DecimalField +from wtforms.validators import InputRequired, Optional, NumberRange, ValidationError, StopValidation + +# Custom IPv4 address validator +def validate_ipv4_address(form, field): + try: + ipaddress.IPv4Address(field.data) + except ipaddress.AddressValueError: + raise ValidationError('Invalid IPv4 address format') + +# Custom IPv6 address validator +def validate_ipv6_address(form, field): + try: + ipaddress.IPv6Address(field.data) + except ipaddress.AddressValueError: + raise ValidationError('Invalid IPv6 address format') + +# Custom Mac address validator +def validate_mac_address(form, field): + if not re.match(r'^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$', field.data): + raise ValidationError('Invalid MAC address format') + +# Custom route distinguisher validator +def validate_route_distinguisher(form,field): + pattern = r'^([0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]):([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])$' + if not re.match(pattern, field.data): + raise ValidationError('Invalid Route Distinguisher') + +# Custom integer validator +def validate_uint32(form, field): + if not 0 <= field.data <= 2**32-1: + raise ValidationError('Value must be a positive integer within the range of uint32') + +# Custom BGP AS validator +def validate_NI_as(form, field): + if form.NI_protocol.data == 'BGP' and field.data == None: + raise StopValidation('AS field is required if the BGP protocol is selected.') + +class CustomInputRequired(): + def __init__(self, message=None): + self.message = message or "This field is required." + def __call__(self, form, field): + if field.data is None or field.data == '': + raise StopValidation(self.message) + +class AddServiceForm_1(FlaskForm): + service_type = SelectField('Type of service', choices=[('', 'Select a type of service to add'), ('ACL_L2', 'ACL_L2'), ('ACL_IPV4', 'ACL_IPV4'), ('ACL_IPV6', 'ACL_IPV6'), ('L2VPN', 'L2VPN'), ('L3VPN', 'L3VPN')], validators=[InputRequired()]) + +class AddServiceForm_ACL_L2(FlaskForm): + #GENERIC SERVICE PARAMETERS (COMMON & MANDATORY) + service_name = StringField('Service Name', validators=[CustomInputRequired()]) + service_type = SelectField('Service Type', choices=[(2, '2 (L2NM)')], validators=[CustomInputRequired()]) + service_device_1 = SelectField('Device_1', choices=[('', 'Select a device (Mandatory)')], validators=[CustomInputRequired()]) + service_device_2 = SelectField('Device_2', choices=[('', 'Select a device (Mandatory)')], validators=[CustomInputRequired()]) + service_endpoint_1 = StringField('Device_1 Endpoint', validators=[CustomInputRequired()]) + service_endpoint_2 = StringField('Device_2 Endpoint', validators=[CustomInputRequired()]) + + #GENERIC SERVICE CONSTRAINT PARAMETERS (ALL OPTIONAL) + service_capacity = DecimalField('Service Capacity', places=2, default=10.00, validators=[Optional(), NumberRange(min=0)]) + service_latency = DecimalField('Service Latency', places=2, default=15.20, validators=[Optional(), NumberRange(min=0)]) + service_availability= DecimalField('Service Availability', places=2, validators=[Optional(), NumberRange(min=0)]) + service_isolation = SelectField('Service Isolation', choices=[('', 'Select (Optional)'), ('NO_ISOLATION', 'NO_ISOLATION'), ('PHYSICAL_ISOLATION', 'PHYSICAL_ISOLATION'), + ('LOGICAL_ISOLATION', 'LOGICAL_ISOLATION'), ('PROCESS_ISOLATION', 'PROCESS_ISOLATION'), ('PHYSICAL_MEMORY_ISOLATION', 'PHYSICAL_MEMORY_ISOLATION'), + ('PHYSICAL_NETWORK_ISOLATION', 'PHYSICAL_NETWORK_ISOLATION'), ('VIRTUAL_RESOURCE_ISOLATION', 'VIRTUAL_RESOURCE_ISOLATION'), + ('NETWORK_FUNCTIONS_ISOLATION', 'NETWORK_FUNCTIONS_ISOLATION'), ('SERVICE_ISOLATION', 'SERVICE_ISOLATION')], validators=[Optional()]) + + #MANDATORY_PARAMETERS + name = StringField('ACL Name', validators=[CustomInputRequired("The name of the ACL is a mandatory parameter")]) + type = SelectField('ACL Type', choices=[('ACL_L2', 'ACL_L2')], validators=[CustomInputRequired("The type of the ACL is a mandatory parameter")]) + sequence_id = IntegerField('ACL Sequence ID', validators=[CustomInputRequired("The name of the Sequence ID of the ACL is a mandatory parameter"), validate_uint32]) + forwarding_action = SelectField('ACL Fowarding Action', choices=[('', 'Select an action (Mandatory)'), ('ACCEPT', 'Accept'), ('DROP','Drop'),('REJECT','Reject')], validators=[CustomInputRequired("The Forwarding Action of the ACL is a mandatory parameter")]) + log_action = SelectField('ACL Log Action', choices=[(None, 'Select a log action (Optional)'), ('LOG_SYSLOG', 'Syslog'), ('LOG_NONE','None')], validators=[Optional()]) + + #PARAMETERS FOR Associating ACL to IF + interface = StringField('Interface Name', validators=[CustomInputRequired("The name of the Interface is a mandatory parameter")]) + subinterface = StringField('Subinterface Index', validators=[Optional()]) + traffic_flow = SelectField('ACL Traffic Flow Direction', choices=[('', 'Select a direction (Mandatory)'), ('Ingress', 'Ingress'), ('Egress','Egress')], validators=[CustomInputRequired("The direction of the traffic flow is a mandatory parameter")]) + + #SPECIFIC PARAMETERS - Creating ACL Entry [ACL_L2] + source_mac = StringField('Source MAC Address', validators=[Optional(), validate_mac_address]) + destination_mac = StringField('Destination MAC Address', validators=[Optional(), validate_mac_address]) + +class AddServiceForm_ACL_IPV4(FlaskForm): + #GENERIC SERVICE PARAMETERS (COMMON & MANDATORY) + service_name = StringField('Service Name', validators=[CustomInputRequired()]) + service_type = SelectField('Service Type', choices=[(1, '1 (L3NM)')], validators=[CustomInputRequired()]) + service_device_1 = SelectField('Device_1', choices=[('', 'Select a device (Mandatory)')], validators=[CustomInputRequired()]) + service_device_2 = SelectField('Device_2', choices=[('', 'Select a device (Mandatory)')], validators=[CustomInputRequired()]) + service_endpoint_1 = StringField('Device_1 Endpoint', validators=[CustomInputRequired()]) + service_endpoint_2 = StringField('Device_2 Endpoint', validators=[CustomInputRequired()]) + + #GENERIC SERVICE CONSTRAINT PARAMETERS (ALL OPTIONAL) + service_capacity = DecimalField('Service Capacity', places=2, default=10.00, validators=[Optional(), NumberRange(min=0)]) + service_latency = DecimalField('Service Latency', places=2, default=15.20, validators=[Optional(), NumberRange(min=0)]) + service_availability= DecimalField('Service Availability', places=2, validators=[Optional(), NumberRange(min=0)]) + service_isolation = SelectField('Service Isolation', choices=[('', 'Select (Optional)'), ('NO_ISOLATION', 'NO_ISOLATION'), ('PHYSICAL_ISOLATION', 'PHYSICAL_ISOLATION'), + ('LOGICAL_ISOLATION', 'LOGICAL_ISOLATION'), ('PROCESS_ISOLATION', 'PROCESS_ISOLATION'), ('PHYSICAL_MEMORY_ISOLATION', 'PHYSICAL_MEMORY_ISOLATION'), + ('PHYSICAL_NETWORK_ISOLATION', 'PHYSICAL_NETWORK_ISOLATION'), ('VIRTUAL_RESOURCE_ISOLATION', 'VIRTUAL_RESOURCE_ISOLATION'), + ('NETWORK_FUNCTIONS_ISOLATION', 'NETWORK_FUNCTIONS_ISOLATION'), ('SERVICE_ISOLATION', 'SERVICE_ISOLATION')], validators=[Optional()]) + + #MANDATORY_PARAMETERS + name = StringField('ACL Name', validators=[CustomInputRequired("The name of the ACL is a mandatory parameter")]) + type = SelectField('ACL Type', choices=[('ACL_IPV4', 'ACL_IPV4')], validators=[CustomInputRequired("The type of the ACL is a mandatory parameter")]) + sequence_id = IntegerField('ACL Sequence ID', validators=[InputRequired(), NumberRange(min=1, message="Sequence ID must be greater than 0")]) + forwarding_action = SelectField('ACL Fowarding Action', choices=[(None, 'Select an action (Mandatory)'), ('ACCEPT', 'Accept'), ('DROP','Drop'),('REJECT','Reject')], validators=[InputRequired()]) + log_action = SelectField('ACL Log Action', choices=[(None, 'Select a log action (Optional)'), ('LOG_SYSLOG', 'Syslog'), ('LOG_NONE','None')], validators=[Optional()]) + + #PARAMETERS FOR Associating ACL to IF + interface = StringField('Interface Name', validators=[InputRequired()]) + subinterface = StringField('Subinterface Index', validators=[Optional()]) + traffic_flow = SelectField('ACL Traffic Flow Direction', choices=[('', 'Select a direction (Mandatory)'), ('Ingress', 'Ingress'), ('Egress','Egress')], validators=[InputRequired()]) + + #OPTIONAL_PARAMETERS - Creating ACL Entry [ACL_IPV4] + source_address = StringField('Source Address', validators=[Optional(), validate_ipv4_address]) + destination_address = StringField('Destination Address', validators=[Optional(), validate_ipv4_address]) + protocol = IntegerField('Protocol', validators=[Optional(),NumberRange(min=1, max=255, message="Protocol number is between 1 and 255 as defined by IANA")]) + hop_limit = IntegerField('Hop Limit', validators=[Optional(),NumberRange(min=1, max=255, message="The Hop limit value has to be between 0 and 255")]) + dscp = IntegerField('DSCP', validators=[Optional(),NumberRange(min=1, max=255, message="The DSCP value has to be between 0 and 63")]) + source_port = IntegerField('Source Port', validators=[Optional(),NumberRange(min=0, max=65535, message="The Port value has to be between 0 and 655535")]) + destination_port = IntegerField('Destination Port', validators=[Optional(),NumberRange(min=0, max=65535, message="The Port value has to be between 0 and 655535")]) + tcp_flags = SelectField('TCP Flags', choices=[(None, 'Select a TCP Flag (Optional)'),('TCP_SYN', 'TCP_SYN'),('TCP_ACK', 'TCP_ACK'),('TCP_RST', 'TCP_RST'),('TCP_FIN', 'TCP_FIN'), + ('TCP_PSH', 'TCP_PSH'),('TCP_URG', 'TCP_URG') ,('TCP_ECE', 'TCP_ECE'),('TCP_CWR', 'TCP_CWR')], validators=[Optional()]) + +class AddServiceForm_ACL_IPV6(FlaskForm): + #GENERIC SERVICE PARAMETERS (COMMON & MANDATORY) + service_name = StringField('Service Name', validators=[CustomInputRequired()]) + service_type = SelectField('Service Type', choices=[(1, '1 (L3NM)')], validators=[CustomInputRequired()]) + service_device_1 = SelectField('Device_1', choices=[('', 'Select a device (Mandatory)')], validators=[CustomInputRequired()]) + service_device_2 = SelectField('Device_2', choices=[('', 'Select a device (Mandatory)')], validators=[CustomInputRequired()]) + service_endpoint_1 = StringField('Device_1 Endpoint', validators=[CustomInputRequired()]) + service_endpoint_2 = StringField('Device_2 Endpoint', validators=[CustomInputRequired()]) + + #GENERIC SERVICE CONSTRAINT PARAMETERS (ALL OPTIONAL) + service_capacity = DecimalField('Service Capacity', places=2, default=10.00, validators=[Optional(), NumberRange(min=0)]) + service_latency = DecimalField('Service Latency', places=2, default=15.20, validators=[Optional(), NumberRange(min=0)]) + service_availability= DecimalField('Service Availability', places=2, validators=[Optional(), NumberRange(min=0)]) + service_isolation = SelectField('Service Isolation', choices=[('', 'Select (Optional)'), ('NO_ISOLATION', 'NO_ISOLATION'), ('PHYSICAL_ISOLATION', 'PHYSICAL_ISOLATION'), + ('LOGICAL_ISOLATION', 'LOGICAL_ISOLATION'), ('PROCESS_ISOLATION', 'PROCESS_ISOLATION'), ('PHYSICAL_MEMORY_ISOLATION', 'PHYSICAL_MEMORY_ISOLATION'), + ('PHYSICAL_NETWORK_ISOLATION', 'PHYSICAL_NETWORK_ISOLATION'), ('VIRTUAL_RESOURCE_ISOLATION', 'VIRTUAL_RESOURCE_ISOLATION'), + ('NETWORK_FUNCTIONS_ISOLATION', 'NETWORK_FUNCTIONS_ISOLATION'), ('SERVICE_ISOLATION', 'SERVICE_ISOLATION')], validators=[Optional()]) + + #MANDATORY_PARAMETERS + name = StringField('ACL Name', validators=[InputRequired()]) + type = SelectField('ACL Type', choices=[('ACL_IPV6', 'ACL_IPV6')], validators=[InputRequired()]) + sequence_id = IntegerField('ACL Sequence ID', validators=[InputRequired(), NumberRange(min=1, message="Sequence ID must be greater than 0")]) + forwarding_action = SelectField('ACL Fowarding Action', choices=[(None, 'Select an action (Mandatory)'), ('ACCEPT', 'Accept'), ('DROP','Drop'),('REJECT','Reject')], validators=[InputRequired()]) + log_action = SelectField('ACL Log Action', choices=[(None, 'Select a log action (Optional)'), ('LOG_SYSLOG', 'Syslog'), ('LOG_NONE','None')], validators=[Optional()]) + + #PARAMETERS FOR Associating ACL to IF + interface = StringField('Interface Name', validators=[InputRequired()]) + subinterface = StringField('Subinterface Index', validators=[Optional()]) + traffic_flow = SelectField('ACL Traffic Flow Direction', choices=[('', 'Select a direction (Mandatory)'), ('Ingress', 'Ingress'), ('Egress','Egress')], validators=[InputRequired()]) + + #SPECIFIC PARAMETERS - Creating ACL Entry [ACL_IPV6] + source_address = StringField('Source Address', validators=[Optional(), validate_ipv6_address]) + destination_address = StringField('Destination Address', validators=[Optional(), validate_ipv6_address]) + protocol = IntegerField('Protocol', validators=[Optional(),NumberRange(min=1, max=255, message="Protocol number is between 1 and 255 as defined by IANA")]) + hop_limit = IntegerField('Hop Limit', validators=[Optional(),NumberRange(min=1, max=255, message="The Hop limit value has to be between 0 and 255")]) + dscp = IntegerField('DSCP', validators=[Optional(),NumberRange(min=1, max=255, message="The DSCP value has to be between 0 and 63")]) + +class AddServiceForm_L2VPN(FlaskForm): + #GENERIC SERVICE PARAMETERS (COMMON & MANDATORY) + service_name = StringField('Service Name', validators=[CustomInputRequired()]) + service_type = SelectField('Service Type', choices=[(2, '2 (L2NM)')], validators=[CustomInputRequired()]) + service_device_1 = SelectField('Device_1', choices=[('', 'Select a device (Mandatory)')], validators=[CustomInputRequired()]) + service_device_2 = SelectField('Device_2', choices=[('', 'Select a device (Mandatory)')], validators=[CustomInputRequired()]) + service_endpoint_1 = StringField('Device_1 Endpoint', validators=[CustomInputRequired()]) + service_endpoint_2 = StringField('Device_2 Endpoint', validators=[CustomInputRequired()]) + + #GENERIC SERVICE CONSTRAINT PARAMETERS (ALL OPTIONAL) + service_capacity = DecimalField('Service Capacity', places=2, default=10.00, validators=[Optional(), NumberRange(min=0)]) + service_latency = DecimalField('Service Latency', places=2, default=15.20, validators=[Optional(), NumberRange(min=0)]) + service_availability= DecimalField('Service Availability', places=2, validators=[Optional(), NumberRange(min=0)]) + service_isolation = SelectField('Service Isolation', choices=[('', 'Select (Optional)'), ('NO_ISOLATION', 'NO_ISOLATION'), ('PHYSICAL_ISOLATION', 'PHYSICAL_ISOLATION'), + ('LOGICAL_ISOLATION', 'LOGICAL_ISOLATION'), ('PROCESS_ISOLATION', 'PROCESS_ISOLATION'), ('PHYSICAL_MEMORY_ISOLATION', 'PHYSICAL_MEMORY_ISOLATION'), + ('PHYSICAL_NETWORK_ISOLATION', 'PHYSICAL_NETWORK_ISOLATION'), ('VIRTUAL_RESOURCE_ISOLATION', 'VIRTUAL_RESOURCE_ISOLATION'), + ('NETWORK_FUNCTIONS_ISOLATION', 'NETWORK_FUNCTIONS_ISOLATION'), ('SERVICE_ISOLATION', 'SERVICE_ISOLATION')], validators=[Optional()]) + + + NI_name = StringField('NI Name', validators=[CustomInputRequired()]) + NI_mtu = IntegerField('NI MTU', default=1500, validators=[CustomInputRequired(), NumberRange(min=0, message="MTU value can't be negative")]) + NI_description = StringField('NI Description', validators=[Optional()]) + #Device_1 specific + Device_1_NI_remote_system = StringField('Device_1 NI Remote System', validators=[CustomInputRequired(),validate_ipv4_address]) + Device_1_NI_VC_ID = IntegerField('Device_1 NI VC ID', validators=[CustomInputRequired(), NumberRange(min=0, message="VC can't be negative")]) + Device_1_NI_connection_point = StringField('Device_1 NI Conection Point', validators=[CustomInputRequired()]) + #Device_2 specific + Device_2_NI_remote_system = StringField ('Device_2 NI Remote System', validators=[CustomInputRequired(),validate_ipv4_address]) + Device_2_NI_VC_ID = IntegerField('Device_2 NI VC ID', validators=[CustomInputRequired(), NumberRange(min=0, message="VC can't be negative")]) + Device_2_NI_connection_point = StringField ('Device_2 NI Conection Point', validators=[CustomInputRequired()]) + + #Interface parameters (DEVICE SPECIFIC) + Device_1_IF_index = IntegerField('Device_1 SubIF Index', validators=[CustomInputRequired(), NumberRange(min=0, message="SubIf index can't be negative")]) + Device_1_IF_vlan_id = IntegerField('Device_1 VLAN ID', validators=[CustomInputRequired(), NumberRange(min=0, message="VlanID can't be negative")]) + Device_1_IF_mtu = IntegerField('Device_1 Interface MTU', validators=[Optional(), NumberRange(min=0, message="MTU value can't be negative")]) + Device_1_IF_description = StringField ('Device_1 SubIF Description', validators=[Optional()]) + + Device_2_IF_index = IntegerField('Device_2 SubIF Index', validators=[CustomInputRequired(), NumberRange(min=0, message="SubIf index can't be negative")]) + Device_2_IF_vlan_id = IntegerField('Device_2 VLAN ID', validators=[CustomInputRequired(), NumberRange(min=0, message="VlanID can't be negative")]) + Device_2_IF_mtu = IntegerField('Device_2 Interface MTU', validators=[Optional(), NumberRange(min=0, message="MTU value can't be negative")]) + Device_2_IF_description = StringField ('Device_2 SubIF Description', validators=[Optional()]) + +class AddServiceForm_L3VPN(FlaskForm): + #GENERIC SERVICE PARAMETERS (COMMON & MANDATORY) + service_name = StringField('Service Name', validators=[CustomInputRequired()]) + service_type = SelectField('Service Type', choices=[(1, '1 (L3NM)')], validators=[CustomInputRequired()]) + service_device_1 = SelectField('Device_1', choices=[('', 'Select a device (Mandatory)')], validators=[CustomInputRequired()]) + service_device_2 = SelectField('Device_2', choices=[('', 'Select a device (Mandatory)')], validators=[CustomInputRequired()]) + service_endpoint_1 = StringField('Device_1 Endpoint', validators=[CustomInputRequired()]) + service_endpoint_2 = StringField('Device_2 Endpoint', validators=[CustomInputRequired()]) + + #GENERIC SERVICE CONSTRAINT PARAMETERS (ALL OPTIONAL) + service_capacity = DecimalField('Service Capacity', places=2, default=10.00, validators=[Optional(), NumberRange(min=0)]) + service_latency = DecimalField('Service Latency', places=2, default=15.20, validators=[Optional(), NumberRange(min=0)]) + service_availability= DecimalField('Service Availability', places=2, validators=[Optional(), NumberRange(min=0)]) + service_isolation = SelectField('Service Isolation', choices=[('', 'Select (Optional)'), ('NO_ISOLATION', 'NO_ISOLATION'), ('PHYSICAL_ISOLATION', 'PHYSICAL_ISOLATION'), + ('LOGICAL_ISOLATION', 'LOGICAL_ISOLATION'), ('PROCESS_ISOLATION', 'PROCESS_ISOLATION'), ('PHYSICAL_MEMORY_ISOLATION', 'PHYSICAL_MEMORY_ISOLATION'), + ('PHYSICAL_NETWORK_ISOLATION', 'PHYSICAL_NETWORK_ISOLATION'), ('VIRTUAL_RESOURCE_ISOLATION', 'VIRTUAL_RESOURCE_ISOLATION'), + ('NETWORK_FUNCTIONS_ISOLATION', 'NETWORK_FUNCTIONS_ISOLATION'), ('SERVICE_ISOLATION', 'SERVICE_ISOLATION')], validators=[Optional()]) + + NI_name = StringField('Name', validators=[InputRequired()]) + NI_route_distinguisher = StringField('Route Distinguisher', validators=[InputRequired(),validate_route_distinguisher]) + NI_router_id = StringField('Router ID', validators=[Optional(), validate_ipv4_address]) + NI_description = StringField('Description', validators=[Optional()]) + NI_protocol = SelectField('Protocol', choices=[('', 'Select a type (Mandatory)'),('STATIC', 'STATIC'),('DIRECTLY_CONNECTED', 'DIRECTLY_CONNECTED'),('BGP', 'BGP')], validators=[InputRequired()]) + NI_as = IntegerField('AS', default=None, validators=[validate_NI_as, Optional(), validate_uint32]) + NI_address_family = SelectField('Protocol Address Family', choices=[('', 'Select a type (Mandatory)'),('IPV4', 'IPV4'),('IPV6', 'IPV6')], validators=[InputRequired()]) + NI_default_import_policy = SelectField('Default Network Instance Import Policy', choices=[('', 'Select a policy (Mandatory)'),('ACCEPT_ROUTE', 'ACCEPT_ROUTE'),('REJECT_ROUTE', 'REJECT_ROUTE')], validators=[Optional()]) + NI_import_policy = StringField('Name of the Network Instance Import Policy', validators=[Optional()]) + NI_export_policy = StringField('Name of the Network Instance Export Policy', validators=[Optional()]) + + ## Interface (IF) PARAMS + Device_1_IF_index = IntegerField('Device_1 SubIF Index', validators=[CustomInputRequired(), NumberRange(min=0, message="SubIf index can't be negative")]) + Device_1_IF_vlan_id = IntegerField('Device_1 VLAN ID', validators=[CustomInputRequired(), NumberRange(min=0, message="VlanID can't be negative")]) + Device_1_IF_mtu = IntegerField('Device_1 Interface MTU', validators=[Optional(), NumberRange(min=0, message="MTU value can't be negative")]) + Device_1_IF_address_ip = StringField('Device_1 IP Address', validators=[CustomInputRequired(), validate_ipv4_address]) + Device_1_IF_address_prefix = IntegerField('Device_1 IP Prefix length', validators=[CustomInputRequired(), validate_uint32]) + Device_1_IF_description = StringField ('Device_1 SubIF Description', validators=[Optional()]) + + Device_2_IF_index = IntegerField('Device_2 SubIF Index', validators=[CustomInputRequired(), NumberRange(min=0, message="SubIf index can't be negative")]) + Device_2_IF_vlan_id = IntegerField('Device_2 VLAN ID', validators=[CustomInputRequired(), NumberRange(min=0, message="VlanID can't be negative")]) + Device_2_IF_mtu = IntegerField('Device_2 Interface MTU', validators=[Optional(), NumberRange(min=0, message="MTU value can't be negative")]) + Device_2_IF_address_ip = StringField('Device_2 IP Address', validators=[CustomInputRequired(), validate_ipv4_address]) + Device_2_IF_address_prefix = IntegerField('Device_2 IP Prefix length', validators=[CustomInputRequired(), validate_uint32]) + Device_2_IF_description = StringField ('Device_2 SubIF Description', validators=[Optional()]) diff --git a/src/webui/service/service/routes.py b/src/webui/service/service/routes.py index 08312e5257d13c4b55b83733ded689c7565c4790..92025b2bec4f7c70b446a8c422e2cdb166c95466 100644 --- a/src/webui/service/service/routes.py +++ b/src/webui/service/service/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,39 +12,50 @@ # See the License for the specific language governing permissions and # limitations under the License. -from contextlib import contextmanager -import json -import grpc +import grpc, json, logging #, re from collections import defaultdict from flask import current_app, redirect, render_template, Blueprint, flash, session, url_for, request +from typing import Optional, Set +from wtforms.validators import ValidationError + from common.proto.context_pb2 import ( - IsolationLevelEnum, Service, ServiceId, ServiceTypeEnum, ServiceStatusEnum, Connection, Empty, DeviceDriverEnum, - ConfigActionEnum, Device, DeviceList) + ContextId, IsolationLevelEnum, Service, ServiceId, ServiceTypeEnum, ServiceStatusEnum, Connection, + Empty, DeviceDriverEnum, ConfigActionEnum, Device, DeviceList +) from common.tools.context_queries.Context import get_context -from common.tools.context_queries.Topology import get_topology from common.tools.context_queries.EndPoint import get_endpoint_names from common.tools.context_queries.Service import get_service_by_uuid +from common.tools.context_queries.Topology import get_topology +from common.tools.descriptor.Loader import DescriptorLoader, compose_notifications from common.tools.object_factory.ConfigRule import json_config_rule_set +from common.tools.object_factory.Constraint import ( + json_constraint_sla_availability, json_constraint_sla_capacity, json_constraint_sla_isolation, + json_constraint_sla_latency +) from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Device import json_device_id +from common.tools.object_factory.EndPoint import json_endpoint_id +from common.tools.object_factory.Service import json_service_l2nm_planned, json_service_l3nm_planned from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient -from typing import Optional, Set +from webui.service.service.forms import ( + AddServiceForm_1, AddServiceForm_ACL_L2, AddServiceForm_ACL_IPV4, AddServiceForm_ACL_IPV6, + AddServiceForm_L2VPN, AddServiceForm_L3VPN +) +LOGGER = logging.getLogger(__name__) service = Blueprint('service', __name__, url_prefix='/service') context_client = ContextClient() service_client = ServiceClient() +device_client = DeviceClient() -@contextmanager -def connected_client(c): - try: - c.connect() - yield c - finally: - c.close() +ACL_TYPE = ["ACL_UNDEFINED", "ACL_IPV4","ACL_IPV6","ACL_L2","ACL_MPLS","ACL_MIXED"] +f_action = ["UNDEFINED", "DROP","ACCEPT","REJECT"] +l_action = ["UNDEFINED", "LOG_NONE","LOG_SYSLOG"] -# Context client must be in connected state when calling this function def get_device_drivers_in_use(topology_uuid: str, context_uuid: str) -> Set[str]: active_drivers = set() grpc_topology = get_topology(context_client, topology_uuid, context_uuid=context_uuid, rw_copy=False) @@ -91,23 +102,22 @@ def home(): 'service/home.html', services=services, device_names=device_names, endpoints_data=endpoints_data, ste=ServiceTypeEnum, sse=ServiceStatusEnum, active_drivers=active_drivers) - @service.route('add', methods=['GET', 'POST']) def add(): flash('Add service route called', 'danger') raise NotImplementedError() - #return render_template('service/home.html') - def get_hub_module_name(dev: Device) -> Optional[str]: for cr in dev.device_config.config_rules: - if cr.action == ConfigActionEnum.CONFIGACTION_SET and cr.custom and cr.custom.resource_key == "_connect/settings": - try: - cr_dict = json.loads(cr.custom.resource_value) - if "hub_module_name" in cr_dict: - return cr_dict["hub_module_name"] - except json.JSONDecodeError: - pass + if cr.action != ConfigActionEnum.CONFIGACTION_SET: continue + if not cr.custom: continue + if cr.custom.resource_key != "_connect/settings": continue + try: + cr_dict = json.loads(cr.custom.resource_value) + if "hub_module_name" in cr_dict: + return cr_dict["hub_module_name"] + except json.JSONDecodeError: + pass return None @service.route('add-xr', methods=['GET', 'POST']) @@ -125,124 +135,137 @@ def add_xr(): if grpc_topology is None: flash('Context({:s})/Topology({:s}) not found'.format(str(context_uuid), str(topology_uuid)), 'danger') return redirect(url_for("main.home")) - else: - topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} - grpc_devices= context_client.ListDevices(Empty()) - devices = [ - device for device in grpc_devices.devices - if device.device_id.device_uuid.uuid in topo_device_uuids and DeviceDriverEnum.DEVICEDRIVER_XR in device.device_drivers - ] - devices.sort(key=lambda dev: dev.name) - - hub_interfaces_by_device = defaultdict(list) - leaf_interfaces_by_device = defaultdict(list) - constellation_name_to_uuid = {} - dev_ep_to_uuid = {} - ep_uuid_to_name = {} - for d in devices: - constellation_name_to_uuid[d.name] = d.device_id.device_uuid.uuid - hm_name = get_hub_module_name(d) - if hm_name is not None: - hm_if_prefix= hm_name + "|" - for ep in d.device_endpoints: - dev_ep_to_uuid[(d.name, ep.name)] = ep.endpoint_id.endpoint_uuid.uuid - if ep.name.startswith(hm_if_prefix): - hub_interfaces_by_device[d.name].append(ep.name) - else: - leaf_interfaces_by_device[d.name].append(ep.name) - ep_uuid_to_name[ep.endpoint_id.endpoint_uuid.uuid] = (d.name, ep.name) - hub_interfaces_by_device[d.name].sort() - leaf_interfaces_by_device[d.name].sort() - - # Find out what endpoints are already used so that they can be disabled - # in the create screen - 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') - return redirect(request.url) - - services = context_client.ListServices(context_obj.context_id) - ep_used_by={} - for service in services.services: - if service.service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE: - for ep in service.service_endpoint_ids: - ep_uuid = ep.endpoint_uuid.uuid - if ep_uuid in ep_uuid_to_name: - dev_name, ep_name = ep_uuid_to_name[ep_uuid] - ep_used_by[f"{ep_name}@{dev_name}"] = service.name + + topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} + grpc_devices= context_client.ListDevices(Empty()) + devices = [ + device for device in grpc_devices.devices + if device.device_id.device_uuid.uuid in topo_device_uuids and DeviceDriverEnum.DEVICEDRIVER_XR in device.device_drivers + ] + devices.sort(key=lambda dev: dev.name) + + hub_interfaces_by_device = defaultdict(list) + leaf_interfaces_by_device = defaultdict(list) + constellation_name_to_uuid = {} + dev_ep_to_uuid = {} + ep_uuid_to_name = {} + for d in devices: + constellation_name_to_uuid[d.name] = d.device_id.device_uuid.uuid + hm_name = get_hub_module_name(d) + if hm_name is not None: + hm_if_prefix= hm_name + "|" + for ep in d.device_endpoints: + dev_ep_to_uuid[(d.name, ep.name)] = ep.endpoint_id.endpoint_uuid.uuid + if ep.name.startswith(hm_if_prefix): + hub_interfaces_by_device[d.name].append(ep.name) + else: + leaf_interfaces_by_device[d.name].append(ep.name) + ep_uuid_to_name[ep.endpoint_id.endpoint_uuid.uuid] = (d.name, ep.name) + hub_interfaces_by_device[d.name].sort() + leaf_interfaces_by_device[d.name].sort() + + 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') + return redirect(request.url) + + services = context_client.ListServices(context_obj.context_id) + ep_used_by={} + for service in services.services: + if service.service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE: + for ep in service.service_endpoint_ids: + ep_uuid = ep.endpoint_uuid.uuid + if ep_uuid in ep_uuid_to_name: + dev_name, ep_name = ep_uuid_to_name[ep_uuid] + ep_used_by[f"{ep_name}@{dev_name}"] = service.name context_client.close() if request.method != 'POST': - return render_template('service/add-xr.html', devices=devices, hub_if=hub_interfaces_by_device, leaf_if=leaf_interfaces_by_device, ep_used_by=ep_used_by) - else: - service_name = request.form["service_name"] - if service_name == "": - flash(f"Service name must be specified", 'danger') - - constellation = request.form["constellation"] - constellation_uuid = constellation_name_to_uuid.get(constellation, None) - if constellation_uuid is None: - flash(f"Invalid constellation \"{constellation}\"", 'danger') - - hub_if = request.form["hubif"] - hub_if_uuid = dev_ep_to_uuid.get((constellation, hub_if), None) - if hub_if_uuid is None: - flash(f"Invalid hub interface \"{hub_if}\"", 'danger') - - leaf_if = request.form["leafif"] - leaf_if_uuid = dev_ep_to_uuid.get((constellation, leaf_if), None) - if leaf_if_uuid is None: - flash(f"Invalid leaf interface \"{leaf_if}\"", 'danger') - - if service_name == "" or constellation_uuid is None or hub_if_uuid is None or leaf_if_uuid is None: + return render_template( + 'service/add-xr.html', devices=devices, hub_if=hub_interfaces_by_device, + leaf_if=leaf_interfaces_by_device, ep_used_by=ep_used_by + ) + + service_name = request.form["service_name"] + if service_name == "": + flash(f"Service name must be specified", 'danger') + + constellation = request.form["constellation"] + constellation_uuid = constellation_name_to_uuid.get(constellation, None) + if constellation_uuid is None: + flash(f"Invalid constellation \"{constellation}\"", 'danger') + + hub_if = request.form["hubif"] + hub_if_uuid = dev_ep_to_uuid.get((constellation, hub_if), None) + if hub_if_uuid is None: + flash(f"Invalid hub interface \"{hub_if}\"", 'danger') + + leaf_if = request.form["leafif"] + leaf_if_uuid = dev_ep_to_uuid.get((constellation, leaf_if), None) + if leaf_if_uuid is None: + flash(f"Invalid leaf interface \"{leaf_if}\"", 'danger') + + if service_name == "" or constellation_uuid is None or hub_if_uuid is None or leaf_if_uuid is None: + return redirect(request.url) + + + json_context_uuid=json_context_id(context_uuid) + sr = { + "name": service_name, + "service_id": { + "context_id": {"context_uuid": {"uuid": context_uuid}}, + "service_uuid": {"uuid": service_name} + }, + 'service_type' : ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, + "service_endpoint_ids": [ + { + 'device_id': {'device_uuid': {'uuid': constellation_uuid}}, + 'endpoint_uuid': {'uuid': hub_if_uuid}, + 'topology_id': json_topology_id("admin", context_id=json_context_uuid) + }, + { + 'device_id': {'device_uuid': {'uuid': constellation_uuid}}, + 'endpoint_uuid': {'uuid': leaf_if_uuid}, + 'topology_id': json_topology_id("admin", context_id=json_context_uuid) + } + ], + 'service_status' : {'service_status': ServiceStatusEnum.SERVICESTATUS_PLANNED}, + 'service_constraints' : [], + } + + json_tapi_settings = { + 'capacity_value' : 50.0, + 'capacity_unit' : 'GHz', + 'layer_proto_name': 'PHOTONIC_MEDIA', + 'layer_proto_qual': 'tapi-photonic-media:PHOTONIC_LAYER_QUALIFIER_NMC', + 'direction' : 'UNIDIRECTIONAL', + } + config_rule = json_config_rule_set('/settings', json_tapi_settings) + + try: + service_client.connect() + + endpoints, sr['service_endpoint_ids'] = sr['service_endpoint_ids'], [] + try: + create_response = service_client.CreateService(Service(**sr)) + except Exception as e: + flash(f'Failure to update service name {service_name} with endpoints and configuration, exception {str(e)}', 'danger') return redirect(request.url) - - json_context_uuid=json_context_id(context_uuid) - sr = { - "name": service_name, - "service_id": { - "context_id": {"context_uuid": {"uuid": context_uuid}}, - "service_uuid": {"uuid": service_name} - }, - 'service_type' : ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, - "service_endpoint_ids": [ - {'device_id': {'device_uuid': {'uuid': constellation_uuid}}, 'endpoint_uuid': {'uuid': hub_if_uuid}, 'topology_id': json_topology_id("admin", context_id=json_context_uuid)}, - {'device_id': {'device_uuid': {'uuid': constellation_uuid}}, 'endpoint_uuid': {'uuid': leaf_if_uuid}, 'topology_id': json_topology_id("admin", context_id=json_context_uuid)} - ], - 'service_status' : {'service_status': ServiceStatusEnum.SERVICESTATUS_PLANNED}, - 'service_constraints' : [], - } + sr['service_endpoint_ids'] = endpoints + sr['service_config'] = {'config_rules': [config_rule]} - json_tapi_settings = { - 'capacity_value' : 50.0, - 'capacity_unit' : 'GHz', - 'layer_proto_name': 'PHOTONIC_MEDIA', - 'layer_proto_qual': 'tapi-photonic-media:PHOTONIC_LAYER_QUALIFIER_NMC', - 'direction' : 'UNIDIRECTIONAL', - } - config_rule = json_config_rule_set('/settings', json_tapi_settings) - - with connected_client(service_client) as sc: - endpoints, sr['service_endpoint_ids'] = sr['service_endpoint_ids'], [] - try: - create_response = sc.CreateService(Service(**sr)) - except Exception as e: - flash(f'Failure to update service name {service_name} with endpoints and configuration, exception {str(e)}', 'danger') - return redirect(request.url) - - sr['service_endpoint_ids'] = endpoints - sr['service_config'] = {'config_rules': [config_rule]} - - try: - update_response = sc.UpdateService(Service(**sr)) - flash(f'Created service {update_response.service_uuid.uuid}', 'success') - except Exception as e: - flash(f'Failure to update service {create_response.service_uuid.uuid} with endpoints and configuration, exception {str(e)}', 'danger') - return redirect(request.url) + try: + update_response = service_client.UpdateService(Service(**sr)) + flash(f'Created service {update_response.service_uuid.uuid}', 'success') + except Exception as e: + flash(f'Failure to update service {create_response.service_uuid.uuid} with endpoints and configuration, exception {str(e)}', 'danger') + return redirect(request.url) - return redirect(url_for('service.home')) + return redirect(url_for('service.home')) + finally: + service_client.close() @service.get('/detail') def detail(service_uuid: str): @@ -253,7 +276,6 @@ def detail(service_uuid: str): try: context_client.connect() - endpoint_ids = list() service_obj = get_service_by_uuid(context_client, service_uuid, rw_copy=False) if service_obj is None: @@ -271,16 +293,16 @@ def detail(service_uuid: str): device_names, endpoints_data = dict(), dict() context_client.close() - return render_template( 'service/detail.html', service=service_obj, connections=connections, device_names=device_names, - endpoints_data=endpoints_data, ste=ServiceTypeEnum, sse=ServiceStatusEnum, ile=IsolationLevelEnum) + endpoints_data=endpoints_data, ste=ServiceTypeEnum, sse=ServiceStatusEnum, ile=IsolationLevelEnum, + type=ACL_TYPE, f_action=f_action, l_action=l_action + ) except Exception as e: flash('The system encountered an error and cannot show the details of this service.', 'warning') current_app.logger.exception(e) return redirect(url_for('service.home')) - @service.get('/delete') def delete(service_uuid: str): if 'context_uuid' not in session or 'topology_uuid' not in session: @@ -301,3 +323,351 @@ def delete(service_uuid: str): flash('Problem deleting service "{:s}": {:s}'.format(service_uuid, str(e.details())), 'danger') current_app.logger.exception(e) return redirect(url_for('service.home')) + +@service.route('add/configure', methods=['GET', 'POST']) +def add_configure(): + form_1 = AddServiceForm_1() + if form_1.validate_on_submit(): + service_type = str(form_1.service_type.data) + if service_type in {'ACL_L2', 'ACL_IPV4', 'ACL_IPV6', 'L2VPN', 'L3VPN'}: + return redirect(url_for('service.add_configure_{:s}'.format(service_type))) + return render_template('service/add.html', form_1=form_1, submit_text='Continue to configuraton') + +@service.route('add/configure/ACL_L2', methods=['GET', 'POST']) +def add_configure_ACL_L2(): + form_acl = AddServiceForm_ACL_L2() + service_obj = Service() + + context_uuid, topology_uuid = get_context_and_topology_uuids() + if context_uuid and topology_uuid: + context_client.connect() + grpc_topology = get_topology(context_client, topology_uuid, context_uuid=context_uuid, rw_copy=False) + if grpc_topology: + topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} + 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') + return redirect(request.url) + services = context_client.ListServices(context_obj.context_id) + devices = [] + for service in services.services: + devices_services = [] + if service.service_type == ServiceTypeEnum.SERVICETYPE_L2NM: + LOGGER.warning('L2NM service') + for ep in service.service_endpoint_ids: + device_uuid = ep.device_id.device_uuid.uuid + devices_services.append(device_uuid, service.service_name) + LOGGER.warning('device_uuid') + LOGGER.warning(device_uuid) + + grpc_devices = context_client.ListDevices(Empty()) + for device in grpc_devices.devices: + if device.device_id.device_uuid.uuid in devices_services: + devices.append(device) + + choices = get_device_choices(devices) + add_device_choices_to_form(choices, form_acl.service_device_1) + add_device_choices_to_form(choices, form_acl.service_device_2) + else: + flash('Context({:s})/Topology({:s}) not found'.format(str(context_uuid), str(topology_uuid)), 'danger') + else: + flash('Missing context or topology UUID', 'danger') + if form_acl.validate_on_submit(): + flash(f'New configuration was created', 'success') + return redirect(url_for('service.home')) + + return render_template('service/configure_ACL_L2.html', form_acl=form_acl, submit_text='Add New Service') + +@service.route('add/configure/ACL_IPV4', methods=['GET', 'POST']) +def add_configure_ACL_IPV4(): + form_acl = AddServiceForm_ACL_IPV4() + if form_acl.validate_on_submit(): + flash(f'New configuration was created', 'success') + return redirect(url_for('service.home')) + print(form_acl.errors) + return render_template('service/configure_ACL_IPV4.html', form_acl=form_acl, submit_text='Add New Service') + +@service.route('add/configure/ACL_IPV6', methods=['GET', 'POST']) +def add_configure_ACL_IPV6(): + form_acl = AddServiceForm_ACL_IPV6() + if form_acl.validate_on_submit(): + flash(f'New configuration was created', 'success') + return redirect(url_for('service.home')) + print(form_acl.errors) + return render_template('service/configure_ACL_IPV6.html', form_acl=form_acl, submit_text='Add New Service') + +@service.route('add/configure/L2VPN', methods=['GET', 'POST']) +def add_configure_L2VPN(): + form_l2vpn = AddServiceForm_L2VPN() + service_obj = Service() + + context_uuid, topology_uuid = get_context_and_topology_uuids() + if context_uuid and topology_uuid: + context_client.connect() + grpc_topology = get_topology(context_client, topology_uuid, context_uuid=context_uuid, rw_copy=False) + if grpc_topology: + topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} + devices = get_filtered_devices(context_client, topo_device_uuids) + choices = get_device_choices(devices) + add_device_choices_to_form(choices, form_l2vpn.service_device_1) + add_device_choices_to_form(choices, form_l2vpn.service_device_2) + else: + flash('Context({:s})/Topology({:s}) not found'.format(str(context_uuid), str(topology_uuid)), 'danger') + else: + flash('Missing context or topology UUID', 'danger') + + if form_l2vpn.validate_on_submit(): + try: + [selected_device_1, selected_device_2, selected_endpoint_1, selected_endpoint_2] = validate_selected_devices_and_endpoints(form_l2vpn, devices) + except Exception as e: + flash('{:s}'.format(str(e.args[0])), 'danger') + current_app.logger.exception(e) + return render_template('service/configure_L2VPN.html', form_l2vpn=form_l2vpn, submit_text='Add New Service') + + [vendor_1, vendor_2] = get_device_vendor(form_l2vpn, devices) + try: + validate_params_vendor(form_l2vpn, vendor_1, 1) + validate_params_vendor(form_l2vpn, vendor_2, 2) + except Exception as e: + flash('{:s}'.format(str(e.args[0])), 'danger') + current_app.logger.exception(e) + return render_template('service/configure_L2VPN.html', form_l2vpn=form_l2vpn, submit_text='Add New Service') + + service_uuid, service_type, endpoint_ids = set_service_parameters(service_obj, form_l2vpn, selected_device_1, selected_device_2, selected_endpoint_1, selected_endpoint_2) + constraints = add_constraints(form_l2vpn) + params_device_1_with_data = get_device_params(form_l2vpn, 1, service_type) + params_device_2_with_data = get_device_params(form_l2vpn, 2, service_type) + print(params_device_1_with_data) + print(params_device_2_with_data) + params_settings = {} + config_rules = [ + json_config_rule_set( + '/settings', params_settings + ), + json_config_rule_set( + '/device[{:s}]/endpoint[{:s}]/settings'.format(str(selected_device_1.name), str(selected_endpoint_1)), params_device_1_with_data + ), + json_config_rule_set( + '/device[{:s}]/endpoint[{:s}]/settings'.format(str(selected_device_2.name), str(selected_endpoint_2)), params_device_2_with_data + ) + ] + service_client.connect() + context_client.connect() + device_client.connect() + descriptor_json = json_service_l2nm_planned(service_uuid = service_uuid, endpoint_ids = endpoint_ids, constraints = constraints, config_rules = config_rules, context_uuid= context_uuid) + descriptor_json = {"services": [descriptor_json]} + try: + process_descriptors(descriptor_json) + flash('Service "{:s}" added successfully!'.format(service_obj.service_id.service_uuid.uuid), 'success') + return redirect(url_for('service.home', service_uuid=service_obj.service_id.service_uuid.uuid)) + except Exception as e: + flash('Problem adding service: {:s}'.format((str(e.args[0]))), 'danger') + current_app.logger.exception(e) + finally: + context_client.close() + device_client.close() + service_client.close() + return render_template('service/configure_L2VPN.html', form_l2vpn=form_l2vpn, submit_text='Add New Service') + +@service.route('add/configure/L3VPN', methods=['GET', 'POST']) +def add_configure_L3VPN(): + form_l3vpn = AddServiceForm_L3VPN() + service_obj = Service() + + context_uuid, topology_uuid = get_context_and_topology_uuids() + if context_uuid and topology_uuid: + context_client.connect() + grpc_topology = get_topology(context_client, topology_uuid, context_uuid=context_uuid, rw_copy=False) + if grpc_topology: + topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} + devices = get_filtered_devices(context_client, topo_device_uuids) + choices = get_device_choices(devices) + add_device_choices_to_form(choices, form_l3vpn.service_device_1) + add_device_choices_to_form(choices, form_l3vpn.service_device_2) + else: + flash('Context({:s})/Topology({:s}) not found'.format(str(context_uuid), str(topology_uuid)), 'danger') + else: + flash('Missing context or topology UUID', 'danger') + + if form_l3vpn.validate_on_submit(): + try: + [selected_device_1, selected_device_2, selected_endpoint_1, selected_endpoint_2] = validate_selected_devices_and_endpoints(form_l3vpn, devices) + except Exception as e: + flash('{:s}'.format(str(e.args[0])), 'danger') + current_app.logger.exception(e) + return render_template('service/configure_L3VPN.html', form_l3vpn=form_l3vpn, submit_text='Add New Service') + + service_uuid, service_type, endpoint_ids = set_service_parameters(service_obj, form_l3vpn, selected_device_1, selected_device_2, selected_endpoint_1, selected_endpoint_2) + constraints = add_constraints(form_l3vpn) + params_device_1_with_data = get_device_params(form_l3vpn, 1, service_type) + params_device_2_with_data = get_device_params(form_l3vpn, 2, service_type) + params_settings = {} + config_rules = [ + json_config_rule_set( + '/settings', params_settings + ), + json_config_rule_set( + '/device[{:s}]/endpoint[{:s}]/settings'.format(str(selected_device_1.name), str(selected_endpoint_1)), params_device_1_with_data + ), + json_config_rule_set( + '/device[{:s}]/endpoint[{:s}]/settings'.format(str(selected_device_2.name), str(selected_endpoint_2)), params_device_2_with_data + ) + ] + service_client.connect() + context_client.connect() + device_client.connect() + descriptor_json = json_service_l3nm_planned(service_uuid = service_uuid, endpoint_ids = endpoint_ids, constraints = constraints, config_rules = config_rules, context_uuid= context_uuid) + descriptor_json = {"services": [descriptor_json]} + try: + process_descriptors(descriptor_json) + flash('Service "{:s}" added successfully!'.format(service_obj.service_id.service_uuid.uuid), 'success') + return redirect(url_for('service.home', service_uuid=service_obj.service_id.service_uuid.uuid)) + except Exception as e: + flash('Problem adding service: {:s}'.format((str(e.args[0]))), 'danger') + current_app.logger.exception(e) + finally: + context_client.close() + device_client.close() + service_client.close() + return render_template('service/configure_L3VPN.html', form_l3vpn=form_l3vpn, submit_text='Add New Service') + + +DESCRIPTOR_LOADER_NUM_WORKERS = 10 + +def process_descriptors(descriptors): + descriptor_loader = DescriptorLoader(descriptors, num_workers=DESCRIPTOR_LOADER_NUM_WORKERS) + results = descriptor_loader.process() + for message,level in compose_notifications(results): + if level == 'error': + LOGGER.warning('ERROR message={:s}'.format(str(message))) + flash(message, level) + + +def get_context_and_topology_uuids(): + context_uuid = session.get('context_uuid') + topology_uuid = session.get('topology_uuid') + return context_uuid, topology_uuid + +def get_filtered_devices(context_client, topo_device_uuids): + grpc_devices = context_client.ListDevices(Empty()) + return [device for device in grpc_devices.devices if device.device_id.device_uuid.uuid in topo_device_uuids] + +def get_device_choices(devices): + return [(i, str(device.name)) for i, device in enumerate(devices)] + +def add_device_choices_to_form(choices, form): + form.choices += choices + +def validate_selected_devices_and_endpoints(form, devices): + selected_device_1 = devices[int(form.service_device_1.data)] + selected_device_2 = devices[int(form.service_device_2.data)] + if selected_device_1 == selected_device_2: + raise ValidationError('The devices must be different!. Please select two valid and different devices') + elif form.service_endpoint_1.data not in [endpoint.name for endpoint in selected_device_1.device_endpoints]: + raise ValidationError('The selected endpoint: ' + form.service_endpoint_1.data + ' is not a valid endpoint for: '+ selected_device_1.name + '. Please select an endpoint that is available for this device') + elif form.service_endpoint_2.data not in [endpoint.name for endpoint in selected_device_2.device_endpoints]: + raise ValidationError('The selected endpoint: ' + form.service_endpoint_2.data + ' is not a valid endpoint for: '+ selected_device_2.name + '. Please select an endpoint that is available for this device') + else: + selected_endpoint_1 = form.service_endpoint_1.data + selected_endpoint_2 = form.service_endpoint_2.data + return selected_device_1, selected_device_2, selected_endpoint_1, selected_endpoint_2 + +def get_device_vendor(form, devices): + selected_device_1 = devices[int(form.service_device_1.data)] + selected_device_2 = devices[int(form.service_device_2.data)] + + vendor_value_1 = None + vendor_value_2 = None + + for config_rule in selected_device_1.device_config.config_rules: + if "vendor" in config_rule.custom.resource_value: + vendor_config_rule_1 = config_rule.custom.resource_value + config_rule_dict_1 = json.loads(vendor_config_rule_1) + if "vendor" in config_rule_dict_1: + vendor_value_1 = config_rule_dict_1["vendor"] + break + + for config_rule in selected_device_2.device_config.config_rules: + if "vendor" in config_rule.custom.resource_value: + vendor_config_rule_2 = config_rule.custom.resource_value + config_rule_dict_2 = json.loads(vendor_config_rule_2) + if "vendor" in config_rule_dict_2: + vendor_value_2 = config_rule_dict_2["vendor"] + break + + return vendor_value_1, vendor_value_2 + +def validate_params_vendor(form, vendor, device_num): + if vendor != "ADVA": return + + if form.NI_name.data != f"ELAN-AC:{getattr(form, f'Device_{device_num}_IF_vlan_id').data}": + raise ValidationError('For an ADVA device, the name of the Network Instance should have this name: "ELAN-AC:vlanID"') + + elif getattr(form, f'Device_{device_num}_NI_VC_ID').data != getattr(form, f'Device_{device_num}_IF_vlan_id').data: + raise ValidationError('For an ADVA device, the value of the VlanID and the value of the VC_ID must be the same') + +def set_service_parameters(service_obj, form, selected_device_1, selected_device_2, selected_endpoint_1, selected_endpoint_2): + service_obj.service_id.service_uuid.uuid = str(form.service_name.data) + service_uuid = service_obj.service_id.service_uuid.uuid + service_obj.service_type = int(form.service_type.data) + service_type = service_obj.service_type + + endpoint_ids = [ + json_endpoint_id(json_device_id(selected_device_1.name), str(selected_endpoint_1)), + json_endpoint_id(json_device_id(selected_device_2.name), str(selected_endpoint_2)) + ] + return service_uuid, service_type, endpoint_ids + +def add_constraints(form): + constraints = [] + if form.service_capacity.data: + constraints.append(json_constraint_sla_capacity(float(form.service_capacity.data))) + if form.service_latency.data: + constraints.append(json_constraint_sla_latency(float(form.service_latency.data))) + if form.service_availability.data: + constraints.append(json_constraint_sla_availability(1, True, float(form.service_availability.data))) + if form.service_isolation.data is not None and form.service_isolation.data != '': + constraints.append(json_constraint_sla_isolation([getattr(IsolationLevelEnum, str(form.service_isolation.data))])) + + return constraints + +def get_device_params(form, device_num, form_type): + if form_type == 2: + device_params = { + 'ni_name': str(getattr(form, 'NI_name').data), + 'sub_interface_index': str(getattr(form, f'Device_{device_num}_IF_index').data), + 'vlan_id': str(getattr(form, f'Device_{device_num}_IF_vlan_id').data), + 'remote_router': str(getattr(form, f'Device_{device_num}_NI_remote_system').data), + 'vc_id': str(getattr(form, f'Device_{device_num}_NI_VC_ID').data), + 'conn_point': str(getattr(form, f'Device_{device_num}_NI_connection_point').data), + 'mtu': str(getattr(form, f'Device_{device_num}_IF_mtu').data), + 'ni_description': str(getattr(form, 'NI_description').data), + 'subif_description': str(getattr(form, f'Device_{device_num}_IF_description').data), + } + elif form_type == 1: + if device_num == 1: + policy_az_field = 'NI_import_policy' + policy_za_field = 'NI_export_policy' + elif device_num == 2: + policy_az_field = 'NI_export_policy' + policy_za_field = 'NI_import_policy' + device_params = { + 'ni_name': str(getattr(form, 'NI_name').data), + 'bgp_as':str(getattr(form, 'NI_as').data), + 'route_distinguisher': str(getattr(form, 'NI_route_distinguisher').data), + 'sub_interface_index': str(getattr(form, f'Device_{device_num}_IF_index').data), + 'router_id': str(getattr(form, 'NI_router_id').data), + 'vlan_id': str(getattr(form, f'Device_{device_num}_IF_vlan_id').data), + 'address_ip': str(getattr(form, f'Device_{device_num}_IF_address_ip').data), + 'address_prefix': str(getattr(form, f'Device_{device_num}_IF_address_prefix').data), + 'policy_AZ': str(getattr(form, policy_az_field).data), + 'policy_ZA': str(getattr(form, policy_za_field).data), + 'mtu': str(getattr(form, f'Device_{device_num}_IF_mtu').data), + 'ni_description': str(getattr(form, 'NI_description').data), + 'subif_description': str(getattr(form, f'Device_{device_num}_IF_description').data), + } + else: + raise ValueError(f'Unsupported form type: {form_type}') + + params_with_data = {k: v for k, v in device_params.items() if v is not None and str(v) != 'None' and v != ''} + return params_with_data diff --git a/src/webui/service/slice/__init__.py b/src/webui/service/slice/__init__.py index 1549d9811aa5d1c193a44ad45d0d7773236c0612..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 100644 --- a/src/webui/service/slice/__init__.py +++ b/src/webui/service/slice/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/slice/routes.py b/src/webui/service/slice/routes.py index a66b316b8f1e2e3266ce37fa8f55f4f8a1042ca1..588b0a57116268a2571da870bae3fc6470b8e54e 100644 --- a/src/webui/service/slice/routes.py +++ b/src/webui/service/slice/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/service/static/topology_icons/Acknowledgements.txt b/src/webui/service/static/topology_icons/Acknowledgements.txt index de69c89cee25dc93856761ac2dd08d9988a35095..6398f34a7c7d6a632c954bd7b9f5bffb690aa83b 100644 --- a/src/webui/service/static/topology_icons/Acknowledgements.txt +++ b/src/webui/service/static/topology_icons/Acknowledgements.txt @@ -28,6 +28,13 @@ https://symbols.getvecta.com/stencil_241/289_wae.216d930c17.png => emu-optical-t https://symbols.getvecta.com/stencil_240/128_localdirector.c1e561769f.png => optical-splitter.png https://symbols.getvecta.com/stencil_241/158_local-director.6b38eab9e4.png => emu-optical-splitter.png - https://symbols.getvecta.com/stencil_240/197_radio-tower.b6138c8c29.png => radio-router.png -https://symbols.getvecta.com/stencil_241/216_radio-tower.5159339bc0.png => emu-radio-router.png \ No newline at end of file +https://symbols.getvecta.com/stencil_241/216_radio-tower.5159339bc0.png => emu-radio-router.png + +https://symbols.getvecta.com/stencil_240/124_laptop.be264ceb77.png => client.png +https://symbols.getvecta.com/stencil_241/154_laptop.c01910b6c8.png => emu-client.png + +https://symbols.getvecta.com/stencil_240/16_atm-tag-switch-router.3149d7e933.png => ip-sdn-controller.png +https://symbols.getvecta.com/stencil_241/46_atm-tag-sw-rtr.776719c0b0.png => emu-ip-sdn-controller.png + +https://onfstaging1.opennetworking.org/wp-content/uploads/2020/02/p4-transparent-logo.png => p4-switch.png diff --git a/src/webui/service/static/topology_icons/client.png b/src/webui/service/static/topology_icons/client.png new file mode 100644 index 0000000000000000000000000000000000000000..e017c59aea31de5a9112ec89e5cb4d6cbc009ba6 Binary files /dev/null and b/src/webui/service/static/topology_icons/client.png differ diff --git a/src/webui/service/static/topology_icons/emu-client.png b/src/webui/service/static/topology_icons/emu-client.png new file mode 100644 index 0000000000000000000000000000000000000000..0c75b47e062c9dae0d3dee74c89ac22a97c93077 Binary files /dev/null and b/src/webui/service/static/topology_icons/emu-client.png differ diff --git a/src/webui/service/static/topology_icons/emu-ip-sdn-controller.png b/src/webui/service/static/topology_icons/emu-ip-sdn-controller.png new file mode 100644 index 0000000000000000000000000000000000000000..ff4c69120e28b434df3d5a8db46fe304dbdd03e7 Binary files /dev/null and b/src/webui/service/static/topology_icons/emu-ip-sdn-controller.png differ diff --git a/src/webui/service/static/topology_icons/ip-sdn-controller.png b/src/webui/service/static/topology_icons/ip-sdn-controller.png new file mode 100644 index 0000000000000000000000000000000000000000..d0b1abe8738b7e34faaa34d286157a778069fdbb Binary files /dev/null and b/src/webui/service/static/topology_icons/ip-sdn-controller.png differ diff --git a/src/webui/service/static/topology_icons/p4-switch.png b/src/webui/service/static/topology_icons/p4-switch.png new file mode 100644 index 0000000000000000000000000000000000000000..9afcda1c0e38cb5757574024f1a3f96001b03943 Binary files /dev/null and b/src/webui/service/static/topology_icons/p4-switch.png differ diff --git a/src/webui/service/templates/base.html b/src/webui/service/templates/base.html index e75461885c5eb60c61f3ff58592db1b778293b42..66e188465994a47f173dcca93237b46cd86adb16 100644 --- a/src/webui/service/templates/base.html +++ b/src/webui/service/templates/base.html @@ -1,7 +1,7 @@ + +{% extends 'base.html' %} + +{% block content %} +

Add New Device

+

Node name: {{form.device_name}}

+
+
+ {{ form.hidden_tag() }} +
+
+ {{ form.device_id.label(class="col-sm-2 col-form-label") }} +
+ {% if form.device_id.errors %} + {{ form.device_id(class="form-control is-invalid") }} +
+ {% for error in form.device_id.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.device_id(class="form-control") }} + {% endif %} +
+
+
+
+ {{ form.device_type.label(class="col-sm-2 col-form-label") }} +
+ {% if form.device_type.errors %} + {{ form.device_type(class="form-control is-invalid") }} +
+ {% for error in form.device_type.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.device_type(class="form-select")}} + {% endif %} +
+
+
+
+ {{ form.operational_status.label(class="col-sm-2 col-form-label") }} +
+ {% if form.operational_status.errors %} + {{ form.operational_status(class="form-control is-invalid") }} +
+ {% for error in form.operational_status.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.operational_status(class="form-select") }} + {% endif %} +
+
+
+
+
Drivers
+
+ {% if form.device_drivers_undefined.errors %} + {{ form.device_drivers_undefined(class="form-control is-invalid") }} +
+ {% for error in form.device_drivers_undefined.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.device_drivers_undefined }} {{ form.device_drivers_undefined.label(class="col-sm-3 + col-form-label") }} + {{ form.device_drivers_openconfig }} {{ form.device_drivers_openconfig.label(class="col-sm-3 + col-form-label") }} + {{ form.device_drivers_transport_api }} {{ form.device_drivers_transport_api.label(class="col-sm-3 + col-form-label") }} +
{{ form.device_drivers_p4 }} {{ form.device_drivers_p4.label(class="col-sm-3 col-form-label") }} + {{ form.device_drivers_ietf_network_topology }} {{ + form.device_drivers_ietf_network_topology.label(class="col-sm-3 + col-form-label") }} + {{ form.device_drivers_onf_tr_532 }} {{ form.device_drivers_onf_tr_532.label(class="col-sm-3 + col-form-label") }}
+ {{ form.device_drivers_xr }} {{ form.device_drivers_xr.label(class="col-sm-3 + col-form-label") }} + {% endif %} +
+
+
+ Configuration Rules
+
+ {{ form.device_config_address.label(class="col-sm-2 col-form-label") }} +
+ {% if form.device_config_address.errors %} + {{ form.device_config_address(class="form-control is-invalid", rows=5) }} +
+ {% for error in form.device_config_address.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.device_config_address(class="form-control", rows=5) }} + {% endif %} +
+
+
+ {{ form.device_config_port.label(class="col-sm-2 col-form-label") }} +
+ {% if form.device_config_port.errors %} + {{ form.device_config_port(class="form-control is-invalid", rows=5) }} +
+ {% for error in form.device_config_port.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.device_config_port(class="form-control", rows=5) }} + {% endif %} +
+
+
+ {{ form.device_config_settings.label(class="col-sm-2 col-form-label") }} +
+ {% if form.device_config_settings.errors %} + {{ form.device_config_settings(class="form-control is-invalid", rows=5) }} +
+ {% for error in form.device_config_settings.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.device_config_settings(class="form-control", rows=5) }} + {% endif %} +
+
+
+
+ + +
+
+
+{% endblock %} \ No newline at end of file diff --git a/src/webui/service/templates/bgpls/addSpeaker.html b/src/webui/service/templates/bgpls/addSpeaker.html new file mode 100644 index 0000000000000000000000000000000000000000..18a87e7654f1a9e2a8d62ad6206a8259bac89c40 --- /dev/null +++ b/src/webui/service/templates/bgpls/addSpeaker.html @@ -0,0 +1,88 @@ + + +{% extends 'base.html' %} + +{% block content %} +

Add Device

+ +
New bglps speaker
+ +
+
+
+ {{ form.hidden_tag() }} +
+
+ {{ form.speaker_address.label(class="col-sm-2 col-form-label") }} +
+ {% if form.speaker_address.errors %} + {{ form.speaker_address(class="form-control is-invalid") }} +
+ {% for error in form.speaker_address.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.speaker_address(class="form-control") }} + {% endif %} +
+
+
+ {{ form.speaker_port.label(class="col-sm-2 col-form-label") }} +
+ {% if form.speaker_port.errors %} + {{ form.speaker_port(class="form-control is-invalid") }} +
+ {% for error in form.speaker_port.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.speaker_port(class="form-control") }} + {% endif %} +
+
+
+ {{ form.speaker_as.label(class="col-sm-2 col-form-label") }} +
+ {% if form.speaker_as.errors %} + {{ form.speaker_as(class="form-control is-invalid") }} +
+ {% for error in form.speaker_as.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.speaker_as(class="form-control") }} + {% endif %} +
+
+
+ +
+
+ + + +
+ + +{% endblock %} + \ No newline at end of file diff --git a/src/webui/service/templates/bgpls/editSpeakers.html b/src/webui/service/templates/bgpls/editSpeakers.html new file mode 100644 index 0000000000000000000000000000000000000000..82ae365b3c928e54c6bf36a998c099315eec5887 --- /dev/null +++ b/src/webui/service/templates/bgpls/editSpeakers.html @@ -0,0 +1,70 @@ + + + +{% extends 'base.html' %} +{% block content %} +

Topology

+ +
+ +
+ {{ speakers | length }} speakers found in context {{ session['context_uuid'] }} +
+
+ +
+ + + + + + + + + + + {% if speakers %} + {% for speaker in speakers %} + + + + + + {% endfor %} + {% else %} + + + + {% endif %} + +
Speaker IP AddressSpeaker As Number
{{ speaker.address }}{{ speaker.asNumber }} + + + + +
No devices found
+ + +
+ + +{% endblock %} \ No newline at end of file diff --git a/src/webui/service/templates/bgpls/home.html b/src/webui/service/templates/bgpls/home.html new file mode 100644 index 0000000000000000000000000000000000000000..557c5939d67aa6d7dbbfa97a8726a6c5e947c1b9 --- /dev/null +++ b/src/webui/service/templates/bgpls/home.html @@ -0,0 +1,110 @@ + + +{% extends 'base.html' %} + +{% block content %} +

BGPLS Topology

+ +
+ +
+ {{ speakers | length }} speakers found in context {{ session['context_uuid'] }} +
+
+ + + + + + + + + + + + + + {% if disdev %} + {% for device in disdev %} + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} + + +
Node nameLocal IGP IdRemote IGP IdLearnt from
{{ device.nodeName }}{{ device.igpID }}{{ device.learntFrom }} + + + +
No devices found
+ + +
+ + +{% endblock %} \ No newline at end of file diff --git a/src/webui/service/templates/context/home.html b/src/webui/service/templates/context/home.html index ca02588e92ae350a56d0c5fa07f2ef12ddcb0de0..c1822ff2741c149dafc40a40d6de490e82a297c9 100644 --- a/src/webui/service/templates/context/home.html +++ b/src/webui/service/templates/context/home.html @@ -1,5 +1,5 @@ +{% extends 'base.html' %} + +{% block content %} +

Add New Service

+
+
+ +
+ {{ form_1.hidden_tag() }} +
+
+ {{ form_1.service_type.label(class="col-sm-2 col-form-label") }} +
+ {% if form_1.service_type.errors %} + {{ form_1.service_type(class="form-control is-invalid") }} +
+ {% for error in form_1.service_type.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_1.service_type(class="form-control") }} + {% endif %} +
+
+ + + +
+
+{% endblock %} + diff --git a/src/webui/service/templates/service/configure_ACL_IPV4.html b/src/webui/service/templates/service/configure_ACL_IPV4.html new file mode 100644 index 0000000000000000000000000000000000000000..0fc59faf042a50e264a1d6099972e13c25db40dc --- /dev/null +++ b/src/webui/service/templates/service/configure_ACL_IPV4.html @@ -0,0 +1,433 @@ + + +{% extends 'base.html' %} + +{% block content %} +

Add New Service [ACL-IPV4]

+
+
+
+ {{ form_acl.hidden_tag() }} +
+

Generic Service Parameters

+ {% if form_acl.acl_params is not none %} +
+ {{ form_acl.service_name.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_name.errors %} + {{ form_acl.service_name(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_name.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_name(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.service_type.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_type.errors %} + {{ form_acl.service_type(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_type.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_type(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.service_device_1.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_device_1.errors %} + {{ form_acl.service_device_1(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_device_1.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_device_1(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_acl.service_device_2.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_device_2.errors %} + {{ form_acl.service_device_2(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_device_2.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_device_2(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.service_endpoint_1.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_endpoint_1.errors %} + {{ form_acl.service_endpoint_1(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_endpoint_1.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_endpoint_1(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_acl.service_endpoint_2.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_endpoint_2.errors %} + {{ form_acl.service_endpoint_2(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_endpoint_2.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_endpoint_2(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+

Generic Service Constraints

+
+ {{ form_acl.service_capacity.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_capacity.errors %} + {{ form_acl.service_capacity(class="form-control is-invalid") }} +
+ {% for error in form_acl.service_capacity.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_capacity(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.service_latency.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_latency.errors %} + {{ form_acl.service_latency(class="form-control is-invalid") }} +
+ {% for error in form_acl.service_latency.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_latency(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.service_availability.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_availability.errors %} + {{ form_acl.service_availability(class="form-control is-invalid") }} +
+ {% for error in form_acl.service_availability.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_availability(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.service_isolation.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_isolation.errors %} + {{ form_acl.service_isolation(class="form-control is-invalid") }} +
+ {% for error in form_acl.service_isolation.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_isolation(class="form-control") }} + {% endif %} +
+
+
+

Specific Service Parameters

+
+

Generic ACL Parameters

+
+ {{ form_acl.name.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.name.errors %} + {{ form_acl.name(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.name.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.name(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.type.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.type.errors %} + {{ form_acl.type(class="form-control is-invalid") }} +
+ {% for error in form_acl.type.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.type(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.sequence_id.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.sequence_id.errors %} + {{ form_acl.sequence_id(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.sequence_id.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.sequence_id(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.forwarding_action.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.forwarding_action.errors %} + {{ form_acl.forwarding_action(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.forwarding_action.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.forwarding_action(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.log_action.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.log_action.errors %} + {{ form_acl.log_action(class="form-control is-invalid") }} +
+ {% for error in form_acl.log_action.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.log_action(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.traffic_flow.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.traffic_flow.errors %} + {{ form_acl.traffic_flow(class="form-control is-invalid") }} +
+ {% for error in form_acl.traffic_flow.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.traffic_flow(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.interface.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.interface.errors %} + {{ form_acl.interface(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.interface.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.interface(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.subinterface.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.subinterface.errors %} + {{ form_acl.subinterface(class="form-control is-invalid") }} +
+ {% for error in form_acl.subinterface.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.subinterface(class="form-control") }} + {% endif %} +
+
+
+

Specific ACL_IPV4 Parameters

+
+ {{ form_acl.source_address.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.source_address.errors %} + {{ form_acl.source_address(class="form-control is-invalid") }} +
+ {% for error in form_acl.source_address.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.source_address(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.destination_address.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.destination_address.errors %} + {{ form_acl.destination_address(class="form-control is-invalid") }} +
+ {% for error in form_acl.destination_address.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.destination_address(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.protocol.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.protocol.errors %} + {{ form_acl.protocol(class="form-control is-invalid") }} +
+ {% for error in form_acl.protocol.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.protocol(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.hop_limit.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.hop_limit.errors %} + {{ form_acl.hop_limit(class="form-control is-invalid") }} +
+ {% for error in form_acl.hop_limit.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.hop_limit(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.dscp.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.dscp.errors %} + {{ form_acl.dscp(class="form-control is-invalid") }} +
+ {% for error in form_acl.dscp.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.dscp(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.source_port.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.source_port.errors %} + {{ form_acl.source_port(class="form-control is-invalid") }} +
+ {% for error in form_acl.source_port.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.source_port(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.destination_port.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.destination_port.errors %} + {{ form_acl.destination_port(class="form-control is-invalid") }} +
+ {% for error in form_acl.destination_port.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.destination_port(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.tcp_flags.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.tcp_flags.errors %} + {{ form_acl.tcp_flags(class="form-control is-invalid") }} +
+ {% for error in form_acl.tcp_flags.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.tcp_flags(class="form-control") }} + {% endif %} +
+
+ {% endif %} + + +
+
+ {% endblock %} diff --git a/src/webui/service/templates/service/configure_ACL_IPV6.html b/src/webui/service/templates/service/configure_ACL_IPV6.html new file mode 100644 index 0000000000000000000000000000000000000000..aa5d268e1df0524829bf944004b59aced65582ef --- /dev/null +++ b/src/webui/service/templates/service/configure_ACL_IPV6.html @@ -0,0 +1,388 @@ + + +{% extends 'base.html' %} + +{% block content %} +

Add New Service [ACL-IPV6]

+
+
+
+ {{ form_acl.hidden_tag() }} +
+

Generic Service Parameters

+ {% if form_acl.acl_params is not none %} +
+ {{ form_acl.service_name.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_name.errors %} + {{ form_acl.service_name(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_name.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_name(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.service_type.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_type.errors %} + {{ form_acl.service_type(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_type.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_type(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.service_device_1.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_device_1.errors %} + {{ form_acl.service_device_1(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_device_1.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_device_1(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_acl.service_device_2.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_device_2.errors %} + {{ form_acl.service_device_2(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_device_2.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_device_2(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.service_endpoint_1.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_endpoint_1.errors %} + {{ form_acl.service_endpoint_1(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_endpoint_1.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_endpoint_1(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_acl.service_endpoint_2.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_endpoint_2.errors %} + {{ form_acl.service_endpoint_2(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_endpoint_2.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_endpoint_2(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+

Generic Service Constraints

+
+ {{ form_acl.service_capacity.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_capacity.errors %} + {{ form_acl.service_capacity(class="form-control is-invalid") }} +
+ {% for error in form_acl.service_capacity.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_capacity(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.service_latency.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_latency.errors %} + {{ form_acl.service_latency(class="form-control is-invalid") }} +
+ {% for error in form_acl.service_latency.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_latency(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.service_availability.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_availability.errors %} + {{ form_acl.service_availability(class="form-control is-invalid") }} +
+ {% for error in form_acl.service_availability.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_availability(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.service_isolation.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_isolation.errors %} + {{ form_acl.service_isolation(class="form-control is-invalid") }} +
+ {% for error in form_acl.service_isolation.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_isolation(class="form-control") }} + {% endif %} +
+
+
+

Specific Service Parameters

+
+

Generic ACL Parameters

+
+ {{ form_acl.name.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.name.errors %} + {{ form_acl.name(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.name.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.name(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.type.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.type.errors %} + {{ form_acl.type(class="form-control is-invalid") }} +
+ {% for error in form_acl.type.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.type(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.sequence_id.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.sequence_id.errors %} + {{ form_acl.sequence_id(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.sequence_id.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.sequence_id(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.forwarding_action.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.forwarding_action.errors %} + {{ form_acl.forwarding_action(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.forwarding_action.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.forwarding_action(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.log_action.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.log_action.errors %} + {{ form_acl.log_action(class="form-control is-invalid") }} +
+ {% for error in form_acl.log_action.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.log_action(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.traffic_flow.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.traffic_flow.errors %} + {{ form_acl.traffic_flow(class="form-control is-invalid") }} +
+ {% for error in form_acl.traffic_flow.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.traffic_flow(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.interface.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.interface.errors %} + {{ form_acl.interface(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.interface.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.interface(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.subinterface.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.subinterface.errors %} + {{ form_acl.subinterface(class="form-control is-invalid") }} +
+ {% for error in form_acl.subinterface.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.subinterface(class="form-control") }} + {% endif %} +
+
+
+

Specific ACL_IPV6 Parameters

+
+ {{ form_acl.source_address.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.source_address.errors %} + {{ form_acl.source_address(class="form-control is-invalid") }} +
+ {% for error in form_acl.source_address.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.source_address(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.destination_address.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.destination_address.errors %} + {{ form_acl.destination_address(class="form-control is-invalid") }} +
+ {% for error in form_acl.destination_address.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.destination_address(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.protocol.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.protocol.errors %} + {{ form_acl.protocol(class="form-control is-invalid") }} +
+ {% for error in form_acl.protocol.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.protocol(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.hop_limit.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.hop_limit.errors %} + {{ form_acl.hop_limit(class="form-control is-invalid") }} +
+ {% for error in form_acl.hop_limit.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.hop_limit(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.dscp.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.dscp.errors %} + {{ form_acl.dscp(class="form-control is-invalid") }} +
+ {% for error in form_acl.dscp.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.dscp(class="form-control") }} + {% endif %} +
+
+ {% endif %} + + +
+
+ {% endblock %} diff --git a/src/webui/service/templates/service/configure_ACL_L2.html b/src/webui/service/templates/service/configure_ACL_L2.html new file mode 100644 index 0000000000000000000000000000000000000000..f292bfd20d42a0829d3758acb9ea5d0633f66507 --- /dev/null +++ b/src/webui/service/templates/service/configure_ACL_L2.html @@ -0,0 +1,343 @@ + + +{% extends 'base.html' %} + +{% block content %} +

Add New Service [ACL-L2]

+
+
+
+ {{ form_acl.hidden_tag() }} +
+

Generic Service Parameters

+ {% if form_acl.acl_params is not none %} +
+ {{ form_acl.service_name.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_name.errors %} + {{ form_acl.service_name(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_name.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_name(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.service_type.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_type.errors %} + {{ form_acl.service_type(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_type.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_type(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.service_device_1.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_device_1.errors %} + {{ form_acl.service_device_1(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_device_1.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_device_1(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_acl.service_device_2.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_device_2.errors %} + {{ form_acl.service_device_2(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_device_2.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_device_2(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.service_endpoint_1.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_endpoint_1.errors %} + {{ form_acl.service_endpoint_1(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_endpoint_1.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_endpoint_1(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_acl.service_endpoint_2.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_endpoint_2.errors %} + {{ form_acl.service_endpoint_2(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.service_endpoint_2.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_endpoint_2(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+

Generic Service Constraints

+
+ {{ form_acl.service_capacity.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_capacity.errors %} + {{ form_acl.service_capacity(class="form-control is-invalid") }} +
+ {% for error in form_acl.service_capacity.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_capacity(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.service_latency.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_latency.errors %} + {{ form_acl.service_latency(class="form-control is-invalid") }} +
+ {% for error in form_acl.service_latency.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_latency(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.service_availability.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_availability.errors %} + {{ form_acl.service_availability(class="form-control is-invalid") }} +
+ {% for error in form_acl.service_availability.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_availability(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.service_isolation.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.service_isolation.errors %} + {{ form_acl.service_isolation(class="form-control is-invalid") }} +
+ {% for error in form_acl.service_isolation.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.service_isolation(class="form-control") }} + {% endif %} +
+
+
+

Specific Service Parameters

+
+

Generic ACL Parameters

+
+ {{ form_acl.name.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.name.errors %} + {{ form_acl.name(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.name.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.name(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.type.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.type.errors %} + {{ form_acl.type(class="form-control is-invalid") }} +
+ {% for error in form_acl.type.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.type(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.sequence_id.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.sequence_id.errors %} + {{ form_acl.sequence_id(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.sequence_id.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.sequence_id(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.forwarding_action.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.forwarding_action.errors %} + {{ form_acl.forwarding_action(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.forwarding_action.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.forwarding_action(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.log_action.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.log_action.errors %} + {{ form_acl.log_action(class="form-control is-invalid") }} +
+ {% for error in form_acl.log_action.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.log_action(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.traffic_flow.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.traffic_flow.errors %} + {{ form_acl.traffic_flow(class="form-control is-invalid") }} +
+ {% for error in form_acl.traffic_flow.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.traffic_flow(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.interface.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.interface.errors %} + {{ form_acl.interface(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_acl.interface.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.interface(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_acl.subinterface.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.subinterface.errors %} + {{ form_acl.subinterface(class="form-control is-invalid") }} +
+ {% for error in form_acl.subinterface.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.subinterface(class="form-control") }} + {% endif %} +
+
+
+

Specific ACL_L2 Parameters

+
+ {{ form_acl.source_mac.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.source_mac.errors %} + {{ form_acl.source_mac(class="form-control is-invalid") }} +
+ {% for error in form_acl.source_mac.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.source_mac(class="form-control") }} + {% endif %} +
+
+
+ {{ form_acl.destination_mac.label(class="col-sm-2 col-form-label") }} +
+ {% if form_acl.destination_mac.errors %} + {{ form_acl.destination_mac(class="form-control is-invalid") }} +
+ {% for error in form_acl.destination_mac.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_acl.destination_mac(class="form-control") }} + {% endif %} +
+
+ {% endif %} + + +
+
+ {% endblock %} diff --git a/src/webui/service/templates/service/configure_L2VPN.html b/src/webui/service/templates/service/configure_L2VPN.html new file mode 100644 index 0000000000000000000000000000000000000000..54b1258471f423b02a81272c200815ab268c08d6 --- /dev/null +++ b/src/webui/service/templates/service/configure_L2VPN.html @@ -0,0 +1,434 @@ + + +{% extends 'base.html' %} + +{% block content %} +

Add New Service [L2VPN]

+
+
+
+ {{ form_l2vpn.hidden_tag() }} +
+ {% if form_l2vpn.l2vpn_params is not none %} +

Generic Service Parameters

+
+ {{ form_l2vpn.service_name.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.service_name.errors %} + {{ form_l2vpn.service_name(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.service_name.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.service_name(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l2vpn.service_type.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.service_type.errors %} + {{ form_l2vpn.service_type(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.service_type.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.service_type(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l2vpn.service_device_1.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.service_device_1.errors %} + {{ form_l2vpn.service_device_1(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.service_device_1.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.service_device_1(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l2vpn.service_device_2.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.service_device_2.errors %} + {{ form_l2vpn.service_device_2(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.service_device_2.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.service_device_2(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l2vpn.service_endpoint_1.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.service_endpoint_1.errors %} + {{ form_l2vpn.service_endpoint_1(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.service_endpoint_1.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.service_endpoint_1(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l2vpn.service_endpoint_2.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.service_endpoint_2.errors %} + {{ form_l2vpn.service_endpoint_2(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.service_endpoint_2.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.service_endpoint_2(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+

Generic Service Constraints

+
+ {{ form_l2vpn.service_capacity.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.service_capacity.errors %} + {{ form_l2vpn.service_capacity(class="form-control is-invalid") }} +
+ {% for error in form_l2vpn.service_capacity.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.service_capacity(class="form-control") }} + {% endif %} +
+
+
+ {{ form_l2vpn.service_latency.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.service_latency.errors %} + {{ form_l2vpn.service_latency(class="form-control is-invalid") }} +
+ {% for error in form_l2vpn.service_latency.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.service_latency(class="form-control") }} + {% endif %} +
+
+
+ {{ form_l2vpn.service_availability.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.service_availability.errors %} + {{ form_l2vpn.service_availability(class="form-control is-invalid") }} +
+ {% for error in form_l2vpn.service_availability.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.service_availability(class="form-control") }} + {% endif %} +
+
+
+ {{ form_l2vpn.service_isolation.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.service_isolation.errors %} + {{ form_l2vpn.service_isolation(class="form-control is-invalid") }} +
+ {% for error in form_l2vpn.service_isolation.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.service_isolation(class="form-control") }} + {% endif %} +
+
+
+

Specific Service Parameters

+
+

Network Instance (NI) Parameters

+
+ {{ form_l2vpn.NI_name.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.NI_name.errors %} + {{ form_l2vpn.NI_name(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.NI_name.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.NI_name(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l2vpn.NI_mtu.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.NI_mtu.errors %} + {{ form_l2vpn.NI_mtu(class="form-control is-invalid") }} +
+ {% for error in form_l2vpn.NI_mtu.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.NI_mtu(class="form-control") }} + {% endif %} +
+
+
+ {{ form_l2vpn.NI_description.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.NI_description.errors %} + {{ form_l2vpn.NI_description(class="form-control is-invalid") }} +
+ {% for error in form_l2vpn.NI_description.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.NI_description(class="form-control") }} + {% endif %} +
+
+
+ {{ form_l2vpn.Device_1_NI_remote_system.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_1_NI_remote_system.errors %} + {{ form_l2vpn.Device_1_NI_remote_system(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.Device_1_NI_remote_system.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_1_NI_remote_system(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l2vpn.Device_2_NI_remote_system.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_2_NI_remote_system.errors %} + {{ form_l2vpn.Device_2_NI_remote_system(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.Device_2_NI_remote_system.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_2_NI_remote_system(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l2vpn.Device_1_NI_VC_ID.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_1_NI_VC_ID.errors %} + {{ form_l2vpn.Device_1_NI_VC_ID(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.Device_1_NI_VC_ID.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_1_NI_VC_ID(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l2vpn.Device_2_NI_VC_ID.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_2_NI_VC_ID.errors %} + {{ form_l2vpn.Device_2_NI_VC_ID(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.Device_2_NI_VC_ID.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_2_NI_VC_ID(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l2vpn.Device_1_NI_connection_point.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_1_NI_connection_point.errors %} + {{ form_l2vpn.Device_1_NI_connection_point(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.Device_1_NI_connection_point.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_1_NI_connection_point(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l2vpn.Device_2_NI_connection_point.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_2_NI_connection_point.errors %} + {{ form_l2vpn.Device_2_NI_connection_point(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.Device_2_NI_connection_point.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_2_NI_connection_point(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+ +

Interface Parameters

+
+ {{ form_l2vpn.Device_1_IF_index.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_1_IF_index.errors %} + {{ form_l2vpn.Device_1_IF_index(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.Device_1_IF_index.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_1_IF_index(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l2vpn.Device_2_IF_index.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_2_IF_index.errors %} + {{ form_l2vpn.Device_2_IF_index(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.Device_2_IF_index.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_2_IF_index(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l2vpn.Device_1_IF_vlan_id.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_1_IF_vlan_id.errors %} + {{ form_l2vpn.Device_1_IF_vlan_id(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.Device_1_IF_vlan_id.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_1_IF_vlan_id(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l2vpn.Device_2_IF_vlan_id.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_2_IF_vlan_id.errors %} + {{ form_l2vpn.Device_2_IF_vlan_id(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l2vpn.Device_2_IF_vlan_id.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_2_IF_vlan_id(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l2vpn.Device_1_IF_mtu.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_1_IF_mtu.errors %} + {{ form_l2vpn.Device_1_IF_mtu(class="form-control is-invalid") }} +
+ {% for error in form_l2vpn.Device_1_IF_mtu.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_1_IF_mtu(class="form-control") }} + {% endif %} +
+ {{ form_l2vpn.Device_2_IF_mtu.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_2_IF_mtu.errors %} + {{ form_l2vpn.Device_2_IF_mtu(class="form-control is-invalid") }} +
+ {% for error in form_l2vpn.Device_2_IF_mtu.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_2_IF_mtu(class="form-control") }} + {% endif %} +
+
+
+ {{ form_l2vpn.Device_1_IF_description.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_1_IF_description.errors %} + {{ form_l2vpn.Device_1_IF_description(class="form-control is-invalid") }} +
+ {% for error in form_l2vpn.Device_1_IF_description.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_1_IF_description(class="form-control") }} + {% endif %} +
+ {{ form_l2vpn.Device_2_IF_description.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l2vpn.Device_2_IF_description.errors %} + {{ form_l2vpn.Device_2_IF_description(class="form-control is-invalid") }} +
+ {% for error in form_l2vpn.Device_2_IF_description.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l2vpn.Device_2_IF_description(class="form-control") }} + {% endif %} +
+
+ {% endif %} + + + +
+
+{% endblock %} \ No newline at end of file diff --git a/src/webui/service/templates/service/configure_L3VPN.html b/src/webui/service/templates/service/configure_L3VPN.html new file mode 100644 index 0000000000000000000000000000000000000000..439ea315584aba327bc71e419792a0a397f7a352 --- /dev/null +++ b/src/webui/service/templates/service/configure_L3VPN.html @@ -0,0 +1,510 @@ + + +{% extends 'base.html' %} + +{% block content %} +

Add New Service [L3VPN]

+
+
+
+ {{ form_l3vpn.hidden_tag() }} +
+ {% if form_l3vpn.l3vpn_params is not none %} +

Generic Service Parameters

+
+ {{ form_l3vpn.service_name.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.service_name.errors %} + {{ form_l3vpn.service_name(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.service_name.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.service_name(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.service_type.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.service_type.errors %} + {{ form_l3vpn.service_type(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.service_type.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.service_type(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.service_device_1.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.service_device_1.errors %} + {{ form_l3vpn.service_device_1(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.service_device_1.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.service_device_1(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l3vpn.service_device_2.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.service_device_2.errors %} + {{ form_l3vpn.service_device_2(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.service_device_2.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.service_device_2(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.service_endpoint_1.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.service_endpoint_1.errors %} + {{ form_l3vpn.service_endpoint_1(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.service_endpoint_1.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.service_endpoint_1(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l3vpn.service_endpoint_2.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.service_endpoint_2.errors %} + {{ form_l3vpn.service_endpoint_2(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.service_endpoint_2.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.service_endpoint_2(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+

Generic Service Constraints

+
+ {{ form_l3vpn.service_capacity.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.service_capacity.errors %} + {{ form_l3vpn.service_capacity(class="form-control is-invalid") }} +
+ {% for error in form_l3vpn.service_capacity.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.service_capacity(class="form-control") }} + {% endif %} +
+
+
+ {{ form_l3vpn.service_latency.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.service_latency.errors %} + {{ form_l3vpn.service_latency(class="form-control is-invalid") }} +
+ {% for error in form_l3vpn.service_latency.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.service_latency(class="form-control") }} + {% endif %} +
+
+
+ {{ form_l3vpn.service_availability.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.service_availability.errors %} + {{ form_l3vpn.service_availability(class="form-control is-invalid") }} +
+ {% for error in form_l3vpn.service_availability.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.service_availability(class="form-control") }} + {% endif %} +
+
+
+ {{ form_l3vpn.service_isolation.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.service_isolation.errors %} + {{ form_l3vpn.service_isolation(class="form-control is-invalid") }} +
+ {% for error in form_l3vpn.service_isolation.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.service_isolation(class="form-control") }} + {% endif %} +
+
+
+

Specific Service Parameters

+
+

Network Instance Parameters

+
+ {{ form_l3vpn.NI_name.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.NI_name.errors %} + {{ form_l3vpn.NI_name(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.NI_name.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.NI_name(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.NI_route_distinguisher.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.NI_route_distinguisher.errors %} + {{ form_l3vpn.NI_route_distinguisher(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.NI_route_distinguisher.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.NI_route_distinguisher(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.NI_protocol.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.NI_protocol.errors %} + {{ form_l3vpn.NI_protocol(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.NI_protocol.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.NI_protocol(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.NI_as.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.NI_as.errors %} + {{ form_l3vpn.NI_as(class="form-control is-invalid", placeholder="Mandatory if BGP protocol is selected") }} +
+ {% for error in form_l3vpn.NI_as.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.NI_as(class="form-control", placeholder="Mandatory if BGP protocol is selected") }} + {% endif %} +
+
+
+ {{ form_l3vpn.NI_address_family.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.NI_address_family.errors %} + {{ form_l3vpn.NI_address_family(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.NI_address_family.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.NI_address_family(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.NI_default_import_policy.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.NI_default_import_policy.errors %} + {{ form_l3vpn.NI_default_import_policy(class="form-control is-invalid") }} +
+ {% for error in form_l3vpn.NI_default_import_policy.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.NI_default_import_policy(class="form-control") }} + {% endif %} +
+
+
+ {{ form_l3vpn.NI_import_policy.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.NI_import_policy.errors %} + {{ form_l3vpn.NI_import_policy(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.NI_import_policy.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.NI_import_policy(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.NI_export_policy.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.NI_export_policy.errors %} + {{ form_l3vpn.NI_export_policy(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.NI_export_policy.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.NI_export_policy(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.NI_router_id.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.NI_router_id.errors %} + {{ form_l3vpn.NI_router_id(class="form-control is-invalid") }} +
+ {% for error in form_l3vpn.NI_router_id.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.NI_router_id(class="form-control") }} + {% endif %} +
+
+
+ {{ form_l3vpn.NI_description.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.NI_description.errors %} + {{ form_l3vpn.NI_description(class="form-control is-invalid") }} +
+ {% for error in form_l3vpn.NI_description.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.NI_description(class="form-control") }} + {% endif %} +
+
+

Interface Parameters

+
+ {{ form_l3vpn.Device_1_IF_index.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.Device_1_IF_index.errors %} + {{ form_l3vpn.Device_1_IF_index(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.Device_1_IF_index.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.Device_1_IF_index(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l3vpn.Device_2_IF_index.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.Device_2_IF_index.errors %} + {{ form_l3vpn.Device_2_IF_index(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.Device_2_IF_index.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.Device_2_IF_index(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.Device_1_IF_vlan_id.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.Device_1_IF_vlan_id.errors %} + {{ form_l3vpn.Device_1_IF_vlan_id(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.Device_1_IF_vlan_id.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.Device_1_IF_vlan_id(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l3vpn.Device_2_IF_vlan_id.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.Device_2_IF_vlan_id.errors %} + {{ form_l3vpn.Device_2_IF_vlan_id(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.Device_2_IF_vlan_id.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.Device_2_IF_vlan_id(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.Device_1_IF_address_ip.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.Device_1_IF_address_ip.errors %} + {{ form_l3vpn.Device_1_IF_address_ip(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.Device_1_IF_address_ip.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.Device_1_IF_address_ip(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l3vpn.Device_2_IF_address_ip.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.Device_2_IF_address_ip.errors %} + {{ form_l3vpn.Device_2_IF_address_ip(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.Device_2_IF_address_ip.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.Device_2_IF_address_ip(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.Device_1_IF_address_prefix.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.Device_1_IF_address_prefix.errors %} + {{ form_l3vpn.Device_1_IF_address_prefix(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.Device_1_IF_address_prefix.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.Device_1_IF_address_prefix(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+ {{ form_l3vpn.Device_2_IF_address_prefix.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.Device_2_IF_address_prefix.errors %} + {{ form_l3vpn.Device_2_IF_address_prefix(class="form-control is-invalid", placeholder="Mandatory") }} +
+ {% for error in form_l3vpn.Device_2_IF_address_prefix.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.Device_2_IF_address_prefix(class="form-control", placeholder="Mandatory") }} + {% endif %} +
+
+
+ {{ form_l3vpn.Device_1_IF_mtu.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.Device_1_IF_mtu.errors %} + {{ form_l3vpn.Device_1_IF_mtu(class="form-control is-invalid") }} +
+ {% for error in form_l3vpn.Device_1_IF_mtu.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.Device_1_IF_mtu(class="form-control") }} + {% endif %} +
+ {{ form_l3vpn.Device_2_IF_mtu.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.Device_2_IF_mtu.errors %} + {{ form_l3vpn.Device_2_IF_mtu(class="form-control is-invalid") }} +
+ {% for error in form_l3vpn.Device_2_IF_mtu.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.Device_2_IF_mtu(class="form-control") }} + {% endif %} +
+
+
+ {{ form_l3vpn.Device_1_IF_description.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.Device_1_IF_description.errors %} + {{ form_l3vpn.Device_1_IF_description(class="form-control is-invalid") }} +
+ {% for error in form_l3vpn.Device_1_IF_description.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.Device_1_IF_description(class="form-control") }} + {% endif %} +
+ {{ form_l3vpn.Device_2_IF_description.label(class="col-sm-2 col-form-label") }} +
+ {% if form_l3vpn.Device_2_IF_description.errors %} + {{ form_l3vpn.Device_2_IF_description(class="form-control is-invalid") }} +
+ {% for error in form_l3vpn.Device_2_IF_description.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form_l3vpn.Device_2_IF_description(class="form-control") }} + {% endif %} +
+
+ {% endif %} + + + +
+
+{% endblock %} \ No newline at end of file diff --git a/src/webui/service/templates/service/detail.html b/src/webui/service/templates/service/detail.html index 9c27bc99a106c96c352b4623d4c5bd91839c6726..d97c26db95e975e579a003e9bbd593cc46074fcc 100644 --- a/src/webui/service/templates/service/detail.html +++ b/src/webui/service/templates/service/detail.html @@ -1,5 +1,5 @@ -
-
- {% if "DEVICEDRIVER_XR" in active_drivers %} - @@ -68,9 +57,7 @@ {% for service in services %}
- {{ service.service_id.service_uuid.uuid }} - {{ service.name }} diff --git a/src/webui/service/templates/slice/detail.html b/src/webui/service/templates/slice/detail.html index bbca18ecc8b91d99dbb6960e547b1ed7c47fe038..9e2898c29071f8017e3f849cddbadb6e44c79f70 100644 --- a/src/webui/service/templates/slice/detail.html +++ b/src/webui/service/templates/slice/detail.html @@ -1,5 +1,5 @@ + +{% extends 'base.html' %} + +{% block content %} +

Add New Device

+

Node name: {{form.device_name}}

+
+
+ {{ form.hidden_tag() }} +
+
+ {{ form.device_id.label(class="col-sm-2 col-form-label") }} +
+ {% if form.device_id.errors %} + {{ form.device_id(class="form-control is-invalid") }} +
+ {% for error in form.device_id.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.device_id(class="form-control") }} + {% endif %} +
+
+
+
+ {{ form.device_type.label(class="col-sm-2 col-form-label") }} +
+ {% if form.device_type.errors %} + {{ form.device_type(class="form-control is-invalid") }} +
+ {% for error in form.device_type.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.device_type(class="form-select")}} + {% endif %} +
+
+
+
+ {{ form.operational_status.label(class="col-sm-2 col-form-label") }} +
+ {% if form.operational_status.errors %} + {{ form.operational_status(class="form-control is-invalid") }} +
+ {% for error in form.operational_status.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.operational_status(class="form-select") }} + {% endif %} +
+
+
+
+
Drivers
+
+ {% if form.device_drivers_undefined.errors %} + {{ form.device_drivers_undefined(class="form-control is-invalid") }} +
+ {% for error in form.device_drivers_undefined.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.device_drivers_undefined }} {{ form.device_drivers_undefined.label(class="col-sm-3 + col-form-label") }} + {{ form.device_drivers_openconfig }} {{ form.device_drivers_openconfig.label(class="col-sm-3 + col-form-label") }} + {{ form.device_drivers_transport_api }} {{ form.device_drivers_transport_api.label(class="col-sm-3 + col-form-label") }} +
{{ form.device_drivers_p4 }} {{ form.device_drivers_p4.label(class="col-sm-3 col-form-label") }} + {{ form.device_drivers_ietf_network_topology }} {{ + form.device_drivers_ietf_network_topology.label(class="col-sm-3 + col-form-label") }} + {{ form.device_drivers_onf_tr_352 }} {{ form.device_drivers_onf_tr_352.label(class="col-sm-3 + col-form-label") }}
+ {{ form.device_drivers_xr }} {{ form.device_drivers_xr.label(class="col-sm-3 + col-form-label") }} + {% endif %} +
+
+
+ Configuration Rules
+
+ {{ form.device_config_address.label(class="col-sm-2 col-form-label") }} +
+ {% if form.device_config_address.errors %} + {{ form.device_config_address(class="form-control is-invalid", rows=5) }} +
+ {% for error in form.device_config_address.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.device_config_address(class="form-control", rows=5) }} + {% endif %} +
+
+
+ {{ form.device_config_port.label(class="col-sm-2 col-form-label") }} +
+ {% if form.device_config_port.errors %} + {{ form.device_config_port(class="form-control is-invalid", rows=5) }} +
+ {% for error in form.device_config_port.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.device_config_port(class="form-control", rows=5) }} + {% endif %} +
+
+
+ {{ form.device_config_settings.label(class="col-sm-2 col-form-label") }} +
+ {% if form.device_config_settings.errors %} + {{ form.device_config_settings(class="form-control is-invalid", rows=5) }} +
+ {% for error in form.device_config_settings.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.device_config_settings(class="form-control", rows=5) }} + {% endif %} +
+
+
+
+ + +
+
+
+{% endblock %} \ No newline at end of file diff --git a/src/webui/service/templates/topology/addSpeaker.html b/src/webui/service/templates/topology/addSpeaker.html new file mode 100644 index 0000000000000000000000000000000000000000..87968ce9a6ae40031d438ad1768b7e37834bbdac --- /dev/null +++ b/src/webui/service/templates/topology/addSpeaker.html @@ -0,0 +1,88 @@ + + +{% extends 'base.html' %} + +{% block content %} +

Add Device

+ +
New bglps speaker
+ +
+
+
+ {{ form.hidden_tag() }} +
+
+ {{ form.speaker_address.label(class="col-sm-2 col-form-label") }} +
+ {% if form.speaker_address.errors %} + {{ form.speaker_address(class="form-control is-invalid") }} +
+ {% for error in form.speaker_address.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.speaker_address(class="form-control") }} + {% endif %} +
+
+
+ {{ form.speaker_port.label(class="col-sm-2 col-form-label") }} +
+ {% if form.speaker_port.errors %} + {{ form.speaker_port(class="form-control is-invalid") }} +
+ {% for error in form.speaker_port.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.speaker_port(class="form-control") }} + {% endif %} +
+
+
+ {{ form.speaker_as.label(class="col-sm-2 col-form-label") }} +
+ {% if form.speaker_as.errors %} + {{ form.speaker_as(class="form-control is-invalid") }} +
+ {% for error in form.speaker_as.errors %} + {{ error }} + {% endfor %} +
+ {% else %} + {{ form.speaker_as(class="form-control") }} + {% endif %} +
+
+
+ +
+
+ + + +
+ + +{% endblock %} + \ No newline at end of file diff --git a/src/webui/service/templates/topology/editSpeakers.html b/src/webui/service/templates/topology/editSpeakers.html new file mode 100644 index 0000000000000000000000000000000000000000..ccdfaa57cf8a072a235abf3cdcd6cd9a0d86c20d --- /dev/null +++ b/src/webui/service/templates/topology/editSpeakers.html @@ -0,0 +1,70 @@ + + + +{% extends 'base.html' %} +{% block content %} +

Topology

+ +
+ +
+ {{ speakers | length }} speakers found in context {{ session['context_uuid'] }} +
+
+ + + + + + + + + + + + + {% if speakers %} + {% for speaker in speakers %} + + + + + + {% endfor %} + {% else %} + + + + {% endif %} + +
Speaker IP AddressSpeaker As Number
{{ speaker.address }}{{ speaker.asNumber }} + + + + +
No devices found
+ + +
+ + +{% endblock %} \ No newline at end of file diff --git a/src/webui/service/templates/topology/home.html b/src/webui/service/templates/topology/home.html new file mode 100644 index 0000000000000000000000000000000000000000..6bcaffd30360ec05a9f28f255fcc5564ac7ab29d --- /dev/null +++ b/src/webui/service/templates/topology/home.html @@ -0,0 +1,112 @@ + + +{% extends 'base.html' %} + +{% block content %} +

Topology

+ +
+ +
+ {{ speakers | length }} speakers found in context {{ session['context_uuid'] }} +
+
+ + + + + + + + + + + + + + {% if disdev %} + {% for device in disdev %} + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} + + + {% if dislink %} + {% for link in dislink %} + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} + +
Node nameLocal IGP IdRemote IGP IdLearnt from
{{ device.nodeName }}{{ device.igpID }}{{ device.learntFrom }} + + + +
No devices found
{{ link.local.nodeName }}{{ link.remote.nodeName }}{{ link.learntFrom }} + + + +
No devices found
+ + +
+ + +{% endblock %} \ No newline at end of file diff --git a/src/webui/service/topology/__init__.py b/src/webui/service/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/webui/service/topology/__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/webui/service/topology/forms.py b/src/webui/service/topology/forms.py new file mode 100644 index 0000000000000000000000000000000000000000..1de38e20a3df8d14eac7f07d77770c029761779d --- /dev/null +++ b/src/webui/service/topology/forms.py @@ -0,0 +1,86 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# external imports +from flask_wtf import FlaskForm +from flask_wtf.file import FileAllowed +from wtforms import SelectField, FileField, SubmitField + +from wtforms import StringField, SelectField, TextAreaField, SubmitField, BooleanField, Form +from wtforms.validators import DataRequired, Length, NumberRange, Regexp, ValidationError +from common.proto.context_pb2 import DeviceOperationalStatusEnum +from webui.utils.form_validators import key_value_validator + +class AddDeviceForm(FlaskForm): + device_id = StringField('ID', + validators=[DataRequired(), Length(min=5)]) + device_type = SelectField('Type', choices = []) + operational_status = SelectField('Operational Status', + # choices=[(-1, 'Select...'), (0, 'Undefined'), (1, 'Disabled'), (2, 'Enabled')], + coerce=int, + validators=[NumberRange(min=0)]) + device_drivers_undefined = BooleanField('UNDEFINED / EMULATED') + device_drivers_openconfig = BooleanField('OPENCONFIG') + device_drivers_transport_api = BooleanField('TRANSPORT_API') + device_drivers_p4 = BooleanField('P4') + device_drivers_ietf_network_topology = BooleanField('IETF_NETWORK_TOPOLOGY') + device_drivers_onf_tr_352 = BooleanField('ONF_TR_352') + device_drivers_xr = BooleanField('XR') + device_config_address = StringField('connect/address',default='127.0.0.1',validators=[DataRequired(), Length(min=5)]) + device_config_port = StringField('connect/port',default='0',validators=[DataRequired(), Length(min=1)]) + device_config_settings = TextAreaField('connect/settings',default='{}',validators=[DataRequired(), Length(min=2)]) + submit = SubmitField('Add') + + def validate_operational_status(form, field): + if field.data not in DeviceOperationalStatusEnum.DESCRIPTOR.values_by_number: + raise ValidationError('The operational status value selected is incorrect!') + +class ConfigForm(FlaskForm): + device_key_config = StringField('Key configuration') + device_value_config = StringField('Value configuration') + submit = SubmitField('Add') + + +class UpdateDeviceForm(FlaskForm): + update_operational_status = SelectField('Operational Status', + choices=[(-1, 'Select...'), (0, 'Undefined'), (1, 'Disabled'), (2, 'Enabled')], + coerce=int, + validators=[NumberRange(min=0)]) + + submit = SubmitField('Update') + +class ContextTopologyForm(FlaskForm): + context_topology = SelectField( + 'Ctx/Topo', + choices=[], + validators=[ + DataRequired(), + Length(min=1) + ]) + submit = SubmitField('Submit') + +class DescriptorForm(FlaskForm): + descriptors = FileField( + 'Descriptors', + validators=[ + FileAllowed(['json'], 'JSON Descriptors only!') + ]) + submit = SubmitField('Submit') + +class SpeakerForm(FlaskForm): + + speaker_address = StringField('ip',default='127.0.0.1',validators=[DataRequired(), Length(min=5)]) + speaker_port = StringField('port',default='179',validators=[DataRequired(), Length(min=1)]) + speaker_as = StringField('as',default='65000',validators=[DataRequired(), Length(min=1)]) + submit = SubmitField('Submit') \ No newline at end of file diff --git a/src/webui/service/topology/routes.py b/src/webui/service/topology/routes.py new file mode 100644 index 0000000000000000000000000000000000000000..7bbfae162c52786fe2b5217e234a470d4163ecc0 --- /dev/null +++ b/src/webui/service/topology/routes.py @@ -0,0 +1,245 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 +from flask import current_app, render_template, Blueprint, flash, session, redirect, url_for, request +from common.proto.context_pb2 import ( + ConfigActionEnum, ConfigRule, ConfigRule_Custom, Device, DeviceConfig, DeviceDriverEnum, DeviceId, DeviceList, DeviceOperationalStatusEnum, + Empty, EndPoint, EndPointId, TopologyId, Uuid) +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from webui.service.device.forms import AddDeviceForm +from common.DeviceTypes import DeviceTypeEnum +from webui.service.topology.forms import ConfigForm, SpeakerForm +from webui.service.topology.forms import UpdateDeviceForm + +from bgpls_speaker.client.BgplsClient import BgplsClient +from common.proto.bgpls_pb2 import (BgplsSpeaker, DiscoveredDeviceList,DiscoveredDevice,DiscoveredLinkList,DiscoveredLink, NodeDescriptors) + +topology = Blueprint('topology', __name__, url_prefix='/topology') +context_client = ContextClient() +device_client = DeviceClient() +bgpls_client = BgplsClient() +logger = logging.getLogger(__name__) + +@topology.get('/') +def home(): + if 'context_uuid' not in session or 'topology_uuid' not in session: + flash("Please select a context!", "warning") + return redirect(url_for("main.home")) + + context_uuid = session['context_uuid'] + topology_uuid = session['topology_uuid'] + + context_client.connect() + json_topo_id = json_topology_id(topology_uuid, context_id=json_context_id(context_uuid)) + grpc_topology = context_client.GetTopology(TopologyId(**json_topo_id)) + topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} + + if grpc_topology is None: + flash('Context({:s})/Topology({:s}) not found'.format(str(context_uuid), str(topology_uuid)), 'danger') + devices = [] + else: + topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} + grpc_devices: DeviceList = context_client.ListDevices(Empty()) + devices = [ + device for device in grpc_devices.devices + if device.device_id.device_uuid.uuid in topo_device_uuids + ] + + # ListNewDevices discovered from bgpls + logger.info('topology/home') + bgpls_client.connect() + logger.info('bgpls_client.connect %s',bgpls_client) + discovered_device_list = bgpls_client.ListDiscoveredDevices(Empty()) + logger.info('discoveredDeviceList %s',discovered_device_list) + # List Links discovered from bgpls + discovered_link_list = bgpls_client.ListDiscoveredLinks(Empty()) + logger.info('discoveredLinkList %s',discovered_link_list) + # List current open speaker connections + speaker_list=bgpls_client.ListBgplsSpeakers(Empty()) + + + context_client.close() + bgpls_client.close() + + return render_template( + 'topology/home.html', devices=devices, dde=DeviceDriverEnum, + dose=DeviceOperationalStatusEnum,disdev=discovered_device_list.discovereddevices, + dislink=discovered_link_list.discoveredlinks,speakers=speaker_list.speakers) + +@topology.route('add/', methods=['GET', 'POST']) +def add(device_name): + """" + Add a discovered device from bgpls protocol. Populate form from + existent info in bgpls. + """ + # TODO: Conect to device and get necessary info + form = AddDeviceForm() + + logger.info('topology/add') + + # listing enum values + form.operational_status.choices = [] + for key, _ in DeviceOperationalStatusEnum.DESCRIPTOR.values_by_name.items(): + form.operational_status.choices.append( + (DeviceOperationalStatusEnum.Value(key), key.replace('DEVICEOPERATIONALSTATUS_', ''))) + + form.device_type.choices = [] + # items for Device Type field + for device_type in DeviceTypeEnum: + form.device_type.choices.append((device_type.value,device_type.value)) + + if form.validate_on_submit(): + device_obj = Device() + # Device UUID: + device_obj.device_id.device_uuid.uuid = form.device_id.data # pylint: disable=no-member + + # Device type: + device_obj.device_type = str(form.device_type.data) + + # Device configurations: + config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member + config_rule.action = ConfigActionEnum.CONFIGACTION_SET + config_rule.custom.resource_key = '_connect/address' + config_rule.custom.resource_value = form.device_config_address.data + + config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member + config_rule.action = ConfigActionEnum.CONFIGACTION_SET + config_rule.custom.resource_key = '_connect/port' + config_rule.custom.resource_value = form.device_config_port.data + + config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member + config_rule.action = ConfigActionEnum.CONFIGACTION_SET + config_rule.custom.resource_key = '_connect/settings' + + try: + device_config_settings = json.loads(form.device_config_settings.data) + except: # pylint: disable=bare-except + device_config_settings = form.device_config_settings.data + logger.info('(topology/add) config settings %s', form.device_config_settings.data) + if isinstance(device_config_settings, dict): + config_rule.custom.resource_value = json.dumps(device_config_settings) + logger.info('(topology/add) config settings is instance to json') + else: + config_rule.custom.resource_value = str(device_config_settings) + + # Device status: + device_obj.device_operational_status = form.operational_status.data + + # Device drivers: + if form.device_drivers_undefined.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_UNDEFINED) + if form.device_drivers_openconfig.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_OPENCONFIG) + if form.device_drivers_transport_api.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_TRANSPORT_API) + if form.device_drivers_p4.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_P4) + if form.device_drivers_ietf_network_topology.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY) + if form.device_drivers_onf_tr_352.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352) + if form.device_drivers_xr.data: + device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_XR) + + try: + device_client.connect() + logger.info('add device from speaker:%s',device_obj) + response: DeviceId = device_client.AddDevice(device_obj) + device_client.close() + flash(f'New device was created with ID "{response.device_uuid.uuid}".', 'success') + bgpls_client.connect() + bgpls_client.NotifyAddNodeToContext(NodeDescriptors(nodeName=device_obj.device_id.device_uuid.uuid)) + bgpls_client.close() + return redirect(url_for('device.home')) + except Exception as e: + flash(f'Problem adding the device. {e.details()}', 'danger') + + # Prefill data with discovered info from speaker + # Device Name from bgpls + form.device_name=device_name + device=device_name + form.device_id.data=device_name + # Default values (TODO: NOT WORKING) + form.device_type.data=DeviceTypeEnum.EMULATED_PACKET_ROUTER + form.device_config_settings.data=str('{"username": "admin", "password": "admin"}') + + return render_template('topology/add.html', form=form, device=device, + submit_text='Add New Device') + +@topology.route('detail/', methods=['GET', 'POST']) +def detail(device_uuid: str): + request = DeviceId() + request.device_uuid.uuid = device_uuid + context_client.connect() + response = context_client.GetDevice(request) + context_client.close() + return render_template('topology/detail.html', device=response, + dde=DeviceDriverEnum, + dose=DeviceOperationalStatusEnum) + +@topology.route('addSpeaker', methods=['GET', 'POST']) +def addSpeaker(): + # Conectar con bgplsÂż + bgpls_client.connect() + form = SpeakerForm() + if form.validate_on_submit(): + logger.info('addSpeaker ip:%s',form.speaker_address.data) + bgpls_client.AddBgplsSpeaker(BgplsSpeaker(address=form.speaker_address.data,port=form.speaker_port.data,asNumber=form.speaker_as.data)) + flash(f'Speaker "{form.speaker_address.data}:{form.speaker_port.data}" added successfully!', 'success') + bgpls_client.close() + return render_template('topology/addSpeaker.html',form=form) + +@topology.route('formSpeaker', methods=['GET','POST']) +def formSpeaker(): + # Conectar con bgplsÂż + form = SpeakerForm() + if request.method=="POST": + address = form.speaker_address.data + port = form.speaker_port.data + as_ = form.speaker_as.data + logger.info("FORM formSpeaker: %s %s %s", address,port,as_) + + flash(f'Speaker "{address}:{port}" added successfully!', 'success') + + return redirect(url_for('topology.home')) + # return 'Form submitted' + + +@topology.route('editSpeakers', methods=['GET','POST']) +def editSpeakers(): + + speakers=[] + bgpls_client.connect() + speaker_list=bgpls_client.ListBgplsSpeakers(Empty()) + speakers_ids=[speaker for speaker in speaker_list.speakers if speaker.id] + speakers=[bgpls_client.GetSpeakerInfoFromId(ids) for ids in speakers_ids] + + bgpls_client.close() + return render_template('topology/editSpeakers.html',speakers=speakers) + + +@topology.route('disconnectSpeaker/', methods=['GET','POST']) +def disconnectSpeaker(speaker_address): + + bgpls_client.connect() + current_speaker=BgplsSpeaker(address=speaker_address) + logger.info('Disconnecting speaker: %s...',speaker_address) + bgpls_client.DisconnectFromSpeaker(current_speaker) + bgpls_client.close() + + return redirect(url_for('topology.editSpeakers')) \ No newline at end of file diff --git a/src/webui/tests/__init__.py b/src/webui/tests/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/webui/tests/__init__.py +++ b/src/webui/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/tests/test_unitary.py b/src/webui/tests/test_unitary.py index a1e4f9f6fab7ca1bc66a80d7cd8fde41a6a2e289..73782b32ac905d3451995c908ebf361e8af5af26 100644 --- a/src/webui/tests/test_unitary.py +++ b/src/webui/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/utils/__init__.py b/src/webui/utils/__init__.py index 38d04994fb0fa1951fb465bc127eb72659dc2eaf..bbfc943b68af13a11e562abbc8680ade71db8f02 100644 --- a/src/webui/utils/__init__.py +++ b/src/webui/utils/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/webui/utils/form_validators.py b/src/webui/utils/form_validators.py index 9048fc7fa4f672527b1e461c1761356fd3d82002..9ad5e2e7dc335e74c49d51d2374eb9a60cd3fd88 100644 --- a/src/webui/utils/form_validators.py +++ b/src/webui/utils/form_validators.py @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/ztp/.gitlab-ci.yml b/src/ztp/.gitlab-ci.yml index a40a14f495b46da55f47d1bbb851fc62e261b32c..0cd46b21042d2aed9526e4addff7341d527727eb 100644 --- a/src/ztp/.gitlab-ci.yml +++ b/src/ztp/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ build ztp: - export IMAGE_TAG=$(grep -m1 '' ./src/$IMAGE_NAME/pom.xml | grep -oP '(?<=>).*(?=<)') - echo "IMAGE_TAG=${IMAGE_TAG}" >> ${BUILD_ENV} - cat ${BUILD_ENV} - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME/ --target builder + - docker buildx build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME/ --target builder after_script: - docker images --filter="dangling=true" --quiet | xargs -r docker rmi artifacts: @@ -50,7 +50,7 @@ unit_test ztp: - docker rm ${REPORTS_CONTAINER} || true script: - echo "Running tests for image ${IMAGE_TAG}" - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME/ --target unit-test + - docker buildx build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME/ --target unit-test # Transfer JaCoCo and Surefire reports from within tests image - docker create --name ${REPORTS_CONTAINER} "$IMAGE_NAME:$IMAGE_TAG" - mkdir -p ${REPORTS_PATH} @@ -60,7 +60,7 @@ unit_test ztp: - cat ${REPORTS_PATH}/coverage.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/JaCoCo Coverage Total:/' - docker run -v "$(pwd)/src/${IMAGE_NAME}:/${IMAGE_NAME}" --rm registry.gitlab.com/haynes/jacoco2cobertura:1.0.7 python /opt/cover2cover.py ${IMAGE_NAME}/reports/jacoco.xml ${IMAGE_NAME}/src/main/java > ${REPORTS_PATH}/cobertura.xml # Build final image - - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME/ --target release + - docker buildx build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME/ --target release - docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" after_script: diff --git a/src/ztp/.mvn/wrapper/maven-wrapper.properties b/src/ztp/.mvn/wrapper/maven-wrapper.properties index ffdc10e59f87823d5abb635aa2e37bf281698e83..abd303b6738e8492a676925355189594fe1528ac 100644 --- a/src/ztp/.mvn/wrapper/maven-wrapper.properties +++ b/src/ztp/.mvn/wrapper/maven-wrapper.properties @@ -1,2 +1,2 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.2/apache-maven-3.8.2-bin.zip wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/src/ztp/pom.xml b/src/ztp/pom.xml index aeadbc57240032edcaf40960fcd8df3b5a48d2b5..c8242be2c248973bb7a00352dc3d95221eb9c295 100644 --- a/src/ztp/pom.xml +++ b/src/ztp/pom.xml @@ -1,6 +1,6 @@ - 2.2.2.Final + 3.1.3.Final @@ -272,7 +273,7 @@ io.quarkus quarkus-bootstrap-maven-plugin - ${quarkus-maven-plugin.version} + ${quarkus-bootstrap-maven-version} diff --git a/src/ztp/src/main/docker/Dockerfile.multistage.jvm b/src/ztp/src/main/docker/Dockerfile.multistage.jvm index 43fef96b4f72497c26ae9b3f457791b357249e81..a781a251aa8413f6cadd686ddc8f61622a388310 100644 --- a/src/ztp/src/main/docker/Dockerfile.multistage.jvm +++ b/src/ztp/src/main/docker/Dockerfile.multistage.jvm @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/ZtpServiceImpl.java b/src/ztp/src/main/java/eu/teraflow/ztp/ZtpServiceImpl.java deleted file mode 100644 index f4bbfc3f79ecdc73b49795ecb9dbd3efe0458f88..0000000000000000000000000000000000000000 --- a/src/ztp/src/main/java/eu/teraflow/ztp/ZtpServiceImpl.java +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package eu.teraflow.ztp; - -import eu.teraflow.ztp.context.ContextService; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceConfig; -import eu.teraflow.ztp.device.DeviceService; -import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import org.jboss.logging.Logger; - -@ApplicationScoped -public class ZtpServiceImpl implements ZtpService { - private static final Logger LOGGER = Logger.getLogger(ZtpServiceImpl.class); - // private static final String MESSAGE = "Retrieved %s"; - - private final DeviceService deviceService; - private final ContextService contextService; - - @Inject - public ZtpServiceImpl(DeviceService deviceService, ContextService contextService) { - this.deviceService = deviceService; - this.contextService = contextService; - } - - @Override - public Uni addDevice(String deviceId) { - final var deserializedDeviceUni = contextService.getDevice(deviceId); - - deserializedDeviceUni - .onFailure() - .recoverWithNull() - .subscribe() - .with( - device -> { - final var id = deviceId; - - if (device == null) { - LOGGER.warnf("%s is null. Ignoring...", device); - return; - } - - if (device.isEnabled()) { - LOGGER.warnf("%s has already been enabled. Ignoring...", device); - return; - } - - // LOGGER.infof(MESSAGE, device); - - final var initialConfiguration = - deviceService.getInitialConfiguration(device.getDeviceId()); - - device.enableDevice(); - LOGGER.infof("Enabled device [%s]", id); - - initialConfiguration - .subscribe() - .with( - deviceConfig -> { - device.setDeviceConfiguration(deviceConfig); - final var configuredDeviceIdUni = deviceService.configureDevice(device); - - configuredDeviceIdUni - .subscribe() - .with( - configuredDeviceId -> - LOGGER.infof( - "Device [%s] has been successfully enabled and configured with %s.\n", - id, deviceConfig)); - }); - }); - - return deserializedDeviceUni; - } - - @Override - public Uni deleteDevice(String deviceId) { - final var deserializedDeviceUni = contextService.getDevice(deviceId); - - deserializedDeviceUni - .onFailure() - .recoverWithNull() - .subscribe() - .with( - device -> { - final var id = deviceId; - - if (device == null) { - LOGGER.warnf("%s is null. Ignoring...", device); - return; - } - - if (device.isDisabled()) { - LOGGER.warnf("%s has already been disabled. Ignoring...", device); - return; - } - - device.disableDevice(); - LOGGER.infof("Disabled device [%s]", id); - - // LOGGER.infof(MESSAGE, device); - - final var empty = deviceService.deleteDevice(device.getDeviceId()); - - empty - .subscribe() - .with( - emptyMessage -> - LOGGER.infof("Device [%s] has been successfully deleted.\n", id)); - }); - - return deserializedDeviceUni; - } - - @Override - public Uni updateDevice(String deviceId, DeviceConfig deviceConfig) { - final var deserializedDeviceUni = contextService.getDevice(deviceId); - - deserializedDeviceUni - .onFailure() - .recoverWithNull() - .subscribe() - .with( - device -> { - final var id = deviceId; - - if (device == null) { - LOGGER.warnf("%s is null. Ignoring...", device); - return; - } - - if (!device.isEnabled()) { - LOGGER.warnf("Cannot update disabled device %s. Ignoring...", device); - return; - } - - // LOGGER.infof(MESSAGE, device); - device.setDeviceConfiguration(deviceConfig); - final var updatedDeviceIdUni = deviceService.configureDevice(device); - - updatedDeviceIdUni - .subscribe() - .with( - configuredDeviceId -> - LOGGER.infof( - "Device [%s] has been successfully updated with %s.\n", - id, deviceConfig)); - }); - - return deserializedDeviceUni; - } -} diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/ContextSubscriber.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/ContextSubscriber.java similarity index 91% rename from src/ztp/src/main/java/eu/teraflow/ztp/ContextSubscriber.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/ContextSubscriber.java index 0d2c63209eaed3b9c9c19b6bd3ba6f7e561914f1..2e4d9fdb69eaa20ff4ee5570eeee8d1ed5a4edd3 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/ContextSubscriber.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/ContextSubscriber.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,16 +14,16 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; -import eu.teraflow.ztp.context.ContextService; -import eu.teraflow.ztp.context.model.Event; -import eu.teraflow.ztp.context.model.EventTypeEnum; import io.quarkus.runtime.StartupEvent; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.event.Observes; +import jakarta.inject.Inject; import java.time.Duration; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Observes; -import javax.inject.Inject; +import org.etsi.tfs.ztp.context.ContextService; +import org.etsi.tfs.ztp.context.model.Event; +import org.etsi.tfs.ztp.context.model.EventTypeEnum; import org.jboss.logging.Logger; @ApplicationScoped diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/Serializer.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/Serializer.java similarity index 94% rename from src/ztp/src/main/java/eu/teraflow/ztp/Serializer.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/Serializer.java index 0a1bd670ab92dfe4d4ddccf3bf513cc88fa3f3c1..0b2273f2eec614461f81fc7a0b00556a65bf0de6 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/Serializer.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/Serializer.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; import acl.Acl; import context.ContextOuterClass; @@ -25,43 +25,43 @@ import context.ContextOuterClass.DeviceId; import context.ContextOuterClass.DeviceOperationalStatusEnum; import context.ContextOuterClass.Location.LocationCase; import context.ContextOuterClass.Uuid; -import eu.teraflow.ztp.acl.AclAction; -import eu.teraflow.ztp.acl.AclEntry; -import eu.teraflow.ztp.acl.AclForwardActionEnum; -import eu.teraflow.ztp.acl.AclLogActionEnum; -import eu.teraflow.ztp.acl.AclMatch; -import eu.teraflow.ztp.acl.AclRuleSet; -import eu.teraflow.ztp.acl.AclRuleTypeEnum; -import eu.teraflow.ztp.context.model.ConfigActionEnum; -import eu.teraflow.ztp.context.model.ConfigRule; -import eu.teraflow.ztp.context.model.ConfigRuleAcl; -import eu.teraflow.ztp.context.model.ConfigRuleCustom; -import eu.teraflow.ztp.context.model.ConfigRuleTypeAcl; -import eu.teraflow.ztp.context.model.ConfigRuleTypeCustom; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceConfig; -import eu.teraflow.ztp.context.model.DeviceDriverEnum; -import eu.teraflow.ztp.context.model.DeviceEvent; -import eu.teraflow.ztp.context.model.DeviceOperationalStatus; -import eu.teraflow.ztp.context.model.Empty; -import eu.teraflow.ztp.context.model.EndPoint; -import eu.teraflow.ztp.context.model.EndPointId; -import eu.teraflow.ztp.context.model.Event; -import eu.teraflow.ztp.context.model.EventTypeEnum; -import eu.teraflow.ztp.context.model.GpsPosition; -import eu.teraflow.ztp.context.model.Location; -import eu.teraflow.ztp.context.model.LocationTypeGpsPosition; -import eu.teraflow.ztp.context.model.LocationTypeRegion; -import eu.teraflow.ztp.context.model.TopologyId; -import eu.teraflow.ztp.kpi_sample_types.model.KpiSampleType; -import eu.teraflow.ztp.model.DeviceRole; -import eu.teraflow.ztp.model.DeviceRoleConfig; -import eu.teraflow.ztp.model.DeviceRoleId; -import eu.teraflow.ztp.model.DeviceRoleType; -import eu.teraflow.ztp.model.DeviceState; +import jakarta.inject.Singleton; import java.util.stream.Collectors; -import javax.inject.Singleton; import kpi_sample_types.KpiSampleTypes; +import org.etsi.tfs.ztp.acl.AclAction; +import org.etsi.tfs.ztp.acl.AclEntry; +import org.etsi.tfs.ztp.acl.AclForwardActionEnum; +import org.etsi.tfs.ztp.acl.AclLogActionEnum; +import org.etsi.tfs.ztp.acl.AclMatch; +import org.etsi.tfs.ztp.acl.AclRuleSet; +import org.etsi.tfs.ztp.acl.AclRuleTypeEnum; +import org.etsi.tfs.ztp.context.model.ConfigActionEnum; +import org.etsi.tfs.ztp.context.model.ConfigRule; +import org.etsi.tfs.ztp.context.model.ConfigRuleAcl; +import org.etsi.tfs.ztp.context.model.ConfigRuleCustom; +import org.etsi.tfs.ztp.context.model.ConfigRuleTypeAcl; +import org.etsi.tfs.ztp.context.model.ConfigRuleTypeCustom; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceConfig; +import org.etsi.tfs.ztp.context.model.DeviceDriverEnum; +import org.etsi.tfs.ztp.context.model.DeviceEvent; +import org.etsi.tfs.ztp.context.model.DeviceOperationalStatus; +import org.etsi.tfs.ztp.context.model.Empty; +import org.etsi.tfs.ztp.context.model.EndPoint; +import org.etsi.tfs.ztp.context.model.EndPointId; +import org.etsi.tfs.ztp.context.model.Event; +import org.etsi.tfs.ztp.context.model.EventTypeEnum; +import org.etsi.tfs.ztp.context.model.GpsPosition; +import org.etsi.tfs.ztp.context.model.Location; +import org.etsi.tfs.ztp.context.model.LocationTypeGpsPosition; +import org.etsi.tfs.ztp.context.model.LocationTypeRegion; +import org.etsi.tfs.ztp.context.model.TopologyId; +import org.etsi.tfs.ztp.kpi_sample_types.model.KpiSampleType; +import org.etsi.tfs.ztp.model.DeviceRole; +import org.etsi.tfs.ztp.model.DeviceRoleConfig; +import org.etsi.tfs.ztp.model.DeviceRoleId; +import org.etsi.tfs.ztp.model.DeviceRoleType; +import org.etsi.tfs.ztp.model.DeviceState; import ztp.Ztp; import ztp.Ztp.ZtpDeviceState; @@ -863,6 +863,12 @@ public class Serializer { return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_XR; case IETF_L2VPN: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN; + case GNMI_OPENCONFIG: + return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG; + case OPTICAL_TFS: + return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS; + case IETF_ACTN: + return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN; case UNDEFINED: default: return ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_UNDEFINED; @@ -886,6 +892,12 @@ public class Serializer { return DeviceDriverEnum.XR; case DEVICEDRIVER_IETF_L2VPN: return DeviceDriverEnum.IETF_L2VPN; + case DEVICEDRIVER_GNMI_OPENCONFIG: + return DeviceDriverEnum.GNMI_OPENCONFIG; + case DEVICEDRIVER_OPTICAL_TFS: + return DeviceDriverEnum.OPTICAL_TFS; + case DEVICEDRIVER_IETF_ACTN: + return DeviceDriverEnum.IETF_ACTN; case DEVICEDRIVER_UNDEFINED: case UNRECOGNIZED: default: diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/SimpleLivenessCheck.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleLivenessCheck.java similarity index 85% rename from src/ztp/src/main/java/eu/teraflow/ztp/SimpleLivenessCheck.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleLivenessCheck.java index b5d40e903e585664ea9fe975a82afb6236db33a5..e30bf8360eb1f7b87123130a39c8b4eca76427d2 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/SimpleLivenessCheck.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleLivenessCheck.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,9 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.eclipse.microprofile.health.HealthCheck; import org.eclipse.microprofile.health.HealthCheckResponse; import org.eclipse.microprofile.health.Liveness; diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/SimpleReadinessCheck.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleReadinessCheck.java similarity index 85% rename from src/ztp/src/main/java/eu/teraflow/ztp/SimpleReadinessCheck.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleReadinessCheck.java index d98b3370d99c72d0ad259efc3f6d69d4ebe9f9fa..c2de2a8ee8db10604505d8b2dc82a005250ba2db 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/SimpleReadinessCheck.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleReadinessCheck.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,9 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.eclipse.microprofile.health.HealthCheck; import org.eclipse.microprofile.health.HealthCheckResponse; import org.eclipse.microprofile.health.Readiness; diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/ZtpConfiguration.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpConfiguration.java similarity index 87% rename from src/ztp/src/main/java/eu/teraflow/ztp/ZtpConfiguration.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpConfiguration.java index 4e0ab96fa016ea26640949f7c14e5f420e289c03..a129a26366cc9867f7df95023896a28b734a1399 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/ZtpConfiguration.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpConfiguration.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; import io.smallrye.config.ConfigMapping; diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/ZtpGateway.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGateway.java similarity index 85% rename from src/ztp/src/main/java/eu/teraflow/ztp/ZtpGateway.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGateway.java index 69b3f5550906b46acadb1de363760c843708e7ba..d3106e7a47372be06a0fe832649be0cffef3db25 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/ZtpGateway.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGateway.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; import ztp.ZtpService; diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/ZtpGatewayImpl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGatewayImpl.java similarity index 94% rename from src/ztp/src/main/java/eu/teraflow/ztp/ZtpGatewayImpl.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGatewayImpl.java index bc56048178cb5b301415a233af24d6d40be70605..dc1e4e2a838f79c7d2e1ce028e8c4b56f5177398 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/ZtpGatewayImpl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGatewayImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,18 +14,18 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; import context.ContextOuterClass; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.model.DeviceRoleId; -import eu.teraflow.ztp.model.DeviceState; import io.quarkus.grpc.GrpcService; import io.smallrye.mutiny.Uni; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.eclipse.microprofile.metrics.MetricUnits; import org.eclipse.microprofile.metrics.annotation.Counted; import org.eclipse.microprofile.metrics.annotation.Timed; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.model.DeviceRoleId; +import org.etsi.tfs.ztp.model.DeviceState; import ztp.Ztp; import ztp.Ztp.DeviceRoleConfig; import ztp.Ztp.DeviceRoleState; diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/ZtpService.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpService.java similarity index 79% rename from src/ztp/src/main/java/eu/teraflow/ztp/ZtpService.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpService.java index a86aec75e1700022cf59fca33f917a4efd842418..6f2044c2c6f6746e456a9413ad40e3dd7f29e51f 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/ZtpService.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,11 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceConfig; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceConfig; public interface ZtpService { diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpServiceImpl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..8ff4dd468c82fb19aeb80f0eeb133e983c07e07d --- /dev/null +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpServiceImpl.java @@ -0,0 +1,144 @@ +/* +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package org.etsi.tfs.ztp; + +import io.smallrye.mutiny.Uni; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.etsi.tfs.ztp.context.ContextService; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceConfig; +import org.etsi.tfs.ztp.device.DeviceService; +import org.etsi.tfs.ztp.exception.ExternalServiceFailureException; +import org.jboss.logging.Logger; + +@ApplicationScoped +public class ZtpServiceImpl implements ZtpService { + private static final Logger LOGGER = Logger.getLogger(ZtpServiceImpl.class); + + private final DeviceService deviceService; + private final ContextService contextService; + + @Inject + public ZtpServiceImpl(DeviceService deviceService, ContextService contextService) { + this.deviceService = deviceService; + this.contextService = contextService; + } + + @Override + public Uni addDevice(String deviceId) { + return contextService + .getDevice(deviceId) + .onFailure() + .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) + .onItem() + .transformToUni( + device -> { + if (device.isEnabled()) { + LOGGER.warnf("%s has already been enabled. Ignoring...", device); + return Uni.createFrom().failure(new Exception("Device is already enabled")); + } else { + return addDeviceTo(device, deviceId); + } + }); + } + + public Uni addDeviceTo(Device device, String deviceId) { + LOGGER.infof("Enabling device with ID [%s]", deviceId); + device.enableDevice(); + + final Uni initialConfiguration = deviceService.getInitialConfiguration(deviceId); + + return initialConfiguration + .onItem() + .transformToUni( + deviceConfig -> { + device.setDeviceConfiguration(deviceConfig); + LOGGER.infof( + "Configuring device with ID [%s] with initial configuration %s", + deviceId, deviceConfig); + return deviceService + .configureDevice(device) + .map( + configuredDeviceId -> { + LOGGER.infof( + "Device with ID [%s] has been successfully enabled and configured.", + deviceId); + return device; + }); + }); + } + + @Override + public Uni deleteDevice(String deviceId) { + return contextService + .getDevice(deviceId) + .onFailure() + .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) + .onItem() + .transformToUni( + device -> { + if (device.isDisabled()) { + LOGGER.warnf("Device with ID %s has already been disabled. Ignoring...", deviceId); + return Uni.createFrom().nullItem(); + } else { + LOGGER.infof("Disabling device with ID [%s]", deviceId); + device.disableDevice(); + + return deviceService + .deleteDevice(deviceId) + .onItem() + .transform( + emptyMessage -> { + LOGGER.infof( + "Device with ID [%s] has been successfully deleted.", deviceId); + return device; + }); + } + }); + } + + @Override + public Uni updateDevice(String deviceId, DeviceConfig deviceConfig) { + return contextService + .getDevice(deviceId) + .onFailure() + .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) + .onItem() + .transformToUni( + device -> { + if (!device.isEnabled()) { + LOGGER.warnf("Cannot update disabled device %s. Ignoring...", deviceId); + return Uni.createFrom().nullItem(); + } else { + LOGGER.infof("Updating configuration of device with ID [%s]", deviceId); + device.setDeviceConfiguration(deviceConfig); + + return deviceService + .configureDevice(device) + .onItem() + .transform( + configuredDeviceId -> { + LOGGER.infof( + "Device with ID [%s] has been successfully updated with %s.", + deviceId, deviceConfig); + return device; + }); + } + }); + } +} diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclAction.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclAction.java similarity index 92% rename from src/ztp/src/main/java/eu/teraflow/ztp/acl/AclAction.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclAction.java index 4f2b3c717490401392242a634d34862c540970d1..0a7f21e2c014a875aa950551442980585a5c8c6f 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclAction.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclAction.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.acl; +package org.etsi.tfs.ztp.acl; public class AclAction { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclEntry.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclEntry.java similarity index 93% rename from src/ztp/src/main/java/eu/teraflow/ztp/acl/AclEntry.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclEntry.java index 78ff008c8964333932a09cd32b7c4788713f2e04..90ed34b5678e1ee73134664ea847e3f4c6519305 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclEntry.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclEntry.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.acl; +package org.etsi.tfs.ztp.acl; public class AclEntry { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclForwardActionEnum.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclForwardActionEnum.java similarity index 85% rename from src/ztp/src/main/java/eu/teraflow/ztp/acl/AclForwardActionEnum.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclForwardActionEnum.java index 86afe71de10dd07cb27d317cc433e0d38bd02b67..f13cbbbfe0b8cb0937cf9cd6aafd7310de6ae30e 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclForwardActionEnum.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclForwardActionEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.acl; +package org.etsi.tfs.ztp.acl; public enum AclForwardActionEnum { UNDEFINED, diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclLogActionEnum.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclLogActionEnum.java similarity index 85% rename from src/ztp/src/main/java/eu/teraflow/ztp/acl/AclLogActionEnum.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclLogActionEnum.java index 0c7223532dbeca92e23c0734737f50c7ccf65911..194f823b54ec8ea25193ec01a9a8921bac2c064e 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclLogActionEnum.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclLogActionEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.acl; +package org.etsi.tfs.ztp.acl; public enum AclLogActionEnum { UNDEFINED, diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclMatch.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclMatch.java similarity index 95% rename from src/ztp/src/main/java/eu/teraflow/ztp/acl/AclMatch.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclMatch.java index 513bcaece0e715964c0c934118b9b251686cf99e..8c877f5c6448d36cdb6d447af633105a4274bdb8 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclMatch.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclMatch.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.acl; +package org.etsi.tfs.ztp.acl; public class AclMatch { diff --git a/src/policy/src/main/java/eu/teraflow/policy/acl/AclRuleSet.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleSet.java similarity index 92% rename from src/policy/src/main/java/eu/teraflow/policy/acl/AclRuleSet.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleSet.java index 584ae60977ce5984c8cb78e15d3ce24d9a344581..c1aee37ca6356d8ebe0eb9fa6fa4b73b4c731afb 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/acl/AclRuleSet.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleSet.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.policy.acl; +package org.etsi.tfs.ztp.acl; -import eu.teraflow.policy.common.Util; import java.util.List; +import org.etsi.tfs.ztp.common.Util; public class AclRuleSet { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclRuleTypeEnum.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleTypeEnum.java similarity index 85% rename from src/ztp/src/main/java/eu/teraflow/ztp/acl/AclRuleTypeEnum.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleTypeEnum.java index 5abf7ab9ac992b4b4ffe39160427a05eed0408f7..3a87abb9243b9cd4ad542b13650f17987f3d2313 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclRuleTypeEnum.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleTypeEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.acl; +package org.etsi.tfs.ztp.acl; public enum AclRuleTypeEnum { UNDEFINED, diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/common/Util.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/common/Util.java similarity index 87% rename from src/ztp/src/main/java/eu/teraflow/ztp/common/Util.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/common/Util.java index f5135113c2876956def02ac8a0d61e788d72f1f8..8f990ea0897689e4a80095638c4ca150b01df74e 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/common/Util.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/common/Util.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.common; +package org.etsi.tfs.ztp.common; import java.util.List; import java.util.stream.Collectors; diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextGateway.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGateway.java similarity index 78% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/ContextGateway.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGateway.java index 0d835ee7315fe031d684efaa2f8ce39be1a7f977..cec5ba09bd62a9373242d7c249b221282a834448 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextGateway.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGateway.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.ztp.context; +package org.etsi.tfs.ztp.context; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceEvent; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceEvent; public interface ContextGateway { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextGatewayImpl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGatewayImpl.java similarity index 83% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/ContextGatewayImpl.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGatewayImpl.java index 286242fe11d1302db184abc37671dc2fa8162ec8..2b8b1a336226da50f264573907f19d6b453b44b4 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextGatewayImpl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGatewayImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,18 +14,18 @@ * limitations under the License. */ -package eu.teraflow.ztp.context; +package org.etsi.tfs.ztp.context; import context.ContextOuterClass; import context.MutinyContextServiceGrpc.MutinyContextServiceStub; -import eu.teraflow.ztp.Serializer; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceEvent; import io.quarkus.grpc.GrpcClient; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.etsi.tfs.ztp.Serializer; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceEvent; @ApplicationScoped public class ContextGatewayImpl implements ContextGateway { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextService.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextService.java similarity index 78% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/ContextService.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextService.java index d9942c16018bf91a72a4baa4d395beda01d3a3f8..fe0316de78a2038bc46b3644bc533bbf82922ef7 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextService.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.ztp.context; +package org.etsi.tfs.ztp.context; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceEvent; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceEvent; public interface ContextService { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextServiceImpl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextServiceImpl.java similarity index 79% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/ContextServiceImpl.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextServiceImpl.java index 7a2bca7c3fe57b999a72c0831758d0f83c837bf3..7df928bde04486dc6a198cb30e4cbb91f088a882 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextServiceImpl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextServiceImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ * limitations under the License. */ -package eu.teraflow.ztp.context; +package org.etsi.tfs.ztp.context; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceEvent; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceEvent; @ApplicationScoped public class ContextServiceImpl implements ContextService { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigActionEnum.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigActionEnum.java similarity index 84% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigActionEnum.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigActionEnum.java index c2de24402e0f605dcba7d274bb056afa6c76d0ff..c04e90907eea38d013f0c1f6d02e20dfb1dc4c1c 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/ConfigActionEnum.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigActionEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.ztp.context.model; public enum ConfigActionEnum { UNDEFINED, diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRule.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRule.java similarity index 91% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRule.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRule.java index a375101c1a53dbcfe6709b4647a5fbcee4198ca1..276884a830c383fdbf2b2a35e519dddef3421ccd 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRule.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRule.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; public class ConfigRule { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleAcl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleAcl.java similarity index 87% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleAcl.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleAcl.java index 1a8942cf913cfcc7355b35614c9a0ffd910ce886..a6164d75b56c3cfe1eef460cb6eb2e2c93cc6e00 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleAcl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleAcl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,9 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; -import eu.teraflow.ztp.acl.AclRuleSet; +import org.etsi.tfs.ztp.acl.AclRuleSet; public class ConfigRuleAcl { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleCustom.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleCustom.java similarity index 90% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleCustom.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleCustom.java index 2cf6dd69fb9aad6b4e4c606d6205542bfbb90146..c75cdf83dbf01562974a310f6e394b05233446da 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleCustom.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleCustom.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; public class ConfigRuleCustom { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleType.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleType.java similarity index 84% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleType.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleType.java index 2e11fc6b1628cc728025002595cdeb0ba4d767f5..f89ca0f56dee3b4594bdb5bd586c44edf9591f08 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleType.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; public interface ConfigRuleType { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleTypeAcl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeAcl.java similarity index 89% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleTypeAcl.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeAcl.java index 5405faa7348c72bb2798ebf0b1ee24ea696fbf24..bc264f03f533a2d38023fdc24612fd14bb1b6d83 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleTypeAcl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeAcl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; public class ConfigRuleTypeAcl implements ConfigRuleType { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleTypeCustom.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeCustom.java similarity index 90% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleTypeCustom.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeCustom.java index 5cc4a17fb9a1377a88e330d49ab573bd35dfa4ea..71b0d430c5118b580b9548d0b4b5ced15fc81161 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleTypeCustom.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeCustom.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; public class ConfigRuleTypeCustom implements ConfigRuleType { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Device.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Device.java similarity index 95% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/Device.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Device.java index 3bb1e7a3af1de99ccf113f02fab1df462c2c10a5..ffbe52339feea3af9bbfdb8dd83ed2b53c10ad8c 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Device.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Device.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; -import eu.teraflow.ztp.common.Util; import java.util.List; +import org.etsi.tfs.ztp.common.Util; public class Device { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceConfig.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceConfig.java similarity index 90% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceConfig.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceConfig.java index 0775248428c5de66fecb0757fc944efce38597a9..57901010e9c3edbb225ad2e339552c884f5dccb2 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceConfig.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceConfig.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; import java.util.List; import java.util.stream.Collectors; diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceDriverEnum.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceDriverEnum.java similarity index 79% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceDriverEnum.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceDriverEnum.java index e4198b9d03a4afcaef71a6311a244072ded2eab0..5fae90fc67ec89a1522c6a9d3f5d2145e02a4e4d 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/DeviceDriverEnum.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceDriverEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.ztp.context.model; public enum DeviceDriverEnum { UNDEFINED, @@ -24,5 +24,8 @@ public enum DeviceDriverEnum { IETF_NETWORK_TOPOLOGY, ONF_TR_532, XR, - IETF_L2VPN + IETF_L2VPN, + GNMI_OPENCONFIG, + OPTICAL_TFS, + IETF_ACTN } diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceEvent.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceEvent.java similarity index 92% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceEvent.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceEvent.java index 8ab56ec7c7dd5e079f000ab64003f12f6080f099..06b39d39d766ee38ae41cb20a87b2c7dd9ac12c6 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceEvent.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceEvent.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; import java.util.Optional; diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceOperationalStatus.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceOperationalStatus.java similarity index 84% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceOperationalStatus.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceOperationalStatus.java index b171d31e1d30c768c3ae4d3f7bf5160170784285..9741a02b9e82ad2bc3b7cf5cedbf31500a424900 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceOperationalStatus.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceOperationalStatus.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; public enum DeviceOperationalStatus { UNDEFINED, diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Empty.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Empty.java similarity index 85% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/Empty.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Empty.java index adeaaaafc3e940f366b9ee84c08f931197ab5658..7c6686963c30af14b9b297563c247b4dfdb18e1f 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Empty.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Empty.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; public class Empty { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/EndPoint.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPoint.java similarity index 93% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/EndPoint.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPoint.java index 51378048e2e7387542ae59b7cd1909dd8ec6e8a7..6c0e73a2a7347c9379587fbe46a2e5f40f4710f6 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/EndPoint.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPoint.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,11 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; -import eu.teraflow.ztp.common.Util; -import eu.teraflow.ztp.kpi_sample_types.model.KpiSampleType; import java.util.List; +import org.etsi.tfs.ztp.common.Util; +import org.etsi.tfs.ztp.kpi_sample_types.model.KpiSampleType; public class EndPoint { private final EndPointId endPointId; diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/EndPointId.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPointId.java similarity index 91% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/EndPointId.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPointId.java index 834081e5937006808a45cb05275c6fdd5f2f0e3d..c2c4785d9555e2dc3a13f7b2ba7bceade2313b14 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/EndPointId.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPointId.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.ztp.context.model; public class EndPointId { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Event.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Event.java similarity index 91% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/Event.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Event.java index 045b8482bc45bf29460aedbbe1d9771afde8d948..0666d2c396295e242c9729edec48b9df9587235e 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Event.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Event.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; public class Event { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/EventTypeEnum.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EventTypeEnum.java similarity index 84% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/EventTypeEnum.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EventTypeEnum.java index cde7e1885f67b66334bc559c8b5763a542cdf3cf..447a95daf35e1c0c20494dea53c319095ebfbed1 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/EventTypeEnum.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EventTypeEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.ztp.context.model; public enum EventTypeEnum { UNDEFINED, diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/GpsPosition.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/GpsPosition.java similarity index 90% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/GpsPosition.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/GpsPosition.java index 14bd2cb9993d2a9c65e760f657088f515674bd69..b54f90b735f19e84e5e3480f2e1e028af5084c1b 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/GpsPosition.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/GpsPosition.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.ztp.context.model; public class GpsPosition { diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/Location.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Location.java similarity index 88% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/Location.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Location.java index c6a00a6a763405ffa6053e2a09aad2ac5aace871..3a2df1f01fe928ca94f088a0eb12e1a4651499c6 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/Location.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Location.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.ztp.context.model; public class Location { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationType.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationType.java similarity index 84% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationType.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationType.java index e4338c42b7855223db39ad58a7f0e1076a3d4823..849d54abd6c55988bfd1bea582322befb532c741 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationType.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; public interface LocationType { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationTypeGpsPosition.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeGpsPosition.java similarity index 89% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationTypeGpsPosition.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeGpsPosition.java index f4d510e65e7cba97243df295755080f8d876e7ab..ef8b9e9fb56b8995567599a7ceca03799c0a0504 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationTypeGpsPosition.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeGpsPosition.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; public class LocationTypeGpsPosition implements LocationType { private final GpsPosition gpsPosition; diff --git a/src/policy/src/main/java/eu/teraflow/policy/context/model/LocationTypeRegion.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeRegion.java similarity index 89% rename from src/policy/src/main/java/eu/teraflow/policy/context/model/LocationTypeRegion.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeRegion.java index 94b88ca7a8be63b3096f65e76c739a8bb87c29f6..789a92831e02fbacadefc04c07589873fdba2e35 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/context/model/LocationTypeRegion.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeRegion.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.context.model; +package org.etsi.tfs.ztp.context.model; public class LocationTypeRegion implements LocationType { private final String region; diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/TopologyId.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/TopologyId.java similarity index 90% rename from src/ztp/src/main/java/eu/teraflow/ztp/context/model/TopologyId.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/TopologyId.java index 574c075d59bb801317aa67a9e22ccef05725a77a..2b967c4c5b65912df77b4f373040562e2c0afc00 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/context/model/TopologyId.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/TopologyId.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.context.model; +package org.etsi.tfs.ztp.context.model; public class TopologyId { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceGateway.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGateway.java similarity index 75% rename from src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceGateway.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGateway.java index 7302abf48edd2588af41dce32ea0946f40acc070..757e8101a7c24a994ea112720407cdefa58062d8 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceGateway.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGateway.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.ztp.device; +package org.etsi.tfs.ztp.device; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceConfig; -import eu.teraflow.ztp.context.model.Empty; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceConfig; +import org.etsi.tfs.ztp.context.model.Empty; public interface DeviceGateway { Uni getInitialConfiguration(String deviceId); diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceGatewayImpl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGatewayImpl.java similarity index 83% rename from src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceGatewayImpl.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGatewayImpl.java index aea3368a0a242413bdd1791d181441076bc6474b..62ca170e87231b47300f00317599821c7dca1a7e 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceGatewayImpl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGatewayImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,17 +14,17 @@ * limitations under the License. */ -package eu.teraflow.ztp.device; +package org.etsi.tfs.ztp.device; import device.DeviceService; -import eu.teraflow.ztp.Serializer; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceConfig; -import eu.teraflow.ztp.context.model.Empty; import io.quarkus.grpc.GrpcClient; import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.etsi.tfs.ztp.Serializer; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceConfig; +import org.etsi.tfs.ztp.context.model.Empty; @ApplicationScoped public class DeviceGatewayImpl implements DeviceGateway { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceService.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceService.java similarity index 75% rename from src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceService.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceService.java index 1f2e6d9ad8de852f9cb929df580cdc24ecbb538e..2cca2555f996fe7c45a5627d3227bf0eeae9ccab 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceService.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.ztp.device; +package org.etsi.tfs.ztp.device; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceConfig; -import eu.teraflow.ztp.context.model.Empty; import io.smallrye.mutiny.Uni; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceConfig; +import org.etsi.tfs.ztp.context.model.Empty; public interface DeviceService { diff --git a/src/policy/src/main/java/eu/teraflow/policy/device/DeviceServiceImpl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceServiceImpl.java similarity index 78% rename from src/policy/src/main/java/eu/teraflow/policy/device/DeviceServiceImpl.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceServiceImpl.java index c7bae12145bd7e26871540a89b4056451d5d179c..ff97d89bdf80a9d617f10f5c2157d50c8a6c5370 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/device/DeviceServiceImpl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceServiceImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ * limitations under the License. */ -package eu.teraflow.policy.device; +package org.etsi.tfs.ztp.device; -import eu.teraflow.policy.context.model.Device; -import eu.teraflow.policy.context.model.DeviceConfig; -import eu.teraflow.policy.context.model.Empty; import io.smallrye.mutiny.Uni; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceConfig; +import org.etsi.tfs.ztp.context.model.Empty; @ApplicationScoped public class DeviceServiceImpl implements DeviceService { diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/ExternalServiceFailureException.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/ExternalServiceFailureException.java new file mode 100644 index 0000000000000000000000000000000000000000..3c0ce9f0d5283554cbaaf6ead7cdcd6583422af6 --- /dev/null +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/ExternalServiceFailureException.java @@ -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. +*/ + +package org.etsi.tfs.ztp.exception; + +public class ExternalServiceFailureException extends RuntimeException { + + public ExternalServiceFailureException(String message, Exception e) { + super(message, e); + } + + public ExternalServiceFailureException(String message) { + super(message); + } +} diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/GeneralExceptionHandler.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/GeneralExceptionHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..42d79f8c567cc6239bc0423b4187b2854f84f449 --- /dev/null +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/GeneralExceptionHandler.java @@ -0,0 +1,57 @@ +/* +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package org.etsi.tfs.ztp.exception; + +import io.grpc.Metadata; +import io.grpc.ServerCall; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import io.quarkus.grpc.ExceptionHandlerProvider; +import jakarta.enterprise.context.ApplicationScoped; + +@ApplicationScoped +public class GeneralExceptionHandler implements ExceptionHandlerProvider { + @Override + public io.quarkus.grpc.ExceptionHandler createHandler( + ServerCall.Listener listener, ServerCall serverCall, Metadata metadata) { + return new HelloExceptionHandler<>(listener, serverCall, metadata); + } + + @Override + public Throwable transform(Throwable t) { + if (t instanceof ExternalServiceFailureException) { + return new StatusRuntimeException(Status.INTERNAL.withDescription(t.getMessage())); + } else { + return ExceptionHandlerProvider.toStatusException(t, true); + } + } + + private static class HelloExceptionHandler extends io.quarkus.grpc.ExceptionHandler { + public HelloExceptionHandler( + ServerCall.Listener listener, ServerCall call, Metadata metadata) { + super(listener, call, metadata); + } + + @Override + protected void handleException(Throwable t, ServerCall call, Metadata metadata) { + StatusRuntimeException sre = + (StatusRuntimeException) ExceptionHandlerProvider.toStatusException(t, true); + Metadata trailers = sre.getTrailers() != null ? sre.getTrailers() : metadata; + call.close(sre.getStatus(), trailers); + } + } +} diff --git a/src/policy/src/main/java/eu/teraflow/policy/kpi_sample_types/model/KpiSampleType.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/kpi_sample_types/model/KpiSampleType.java similarity index 85% rename from src/policy/src/main/java/eu/teraflow/policy/kpi_sample_types/model/KpiSampleType.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/kpi_sample_types/model/KpiSampleType.java index 12551339d9ac5a11e32fbb48871f4c67e0c4700f..c95f097a5e8588b05333bc7bb6569392b0910e8e 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/kpi_sample_types/model/KpiSampleType.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/kpi_sample_types/model/KpiSampleType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.policy.kpi_sample_types.model; +package org.etsi.tfs.ztp.kpi_sample_types.model; public enum KpiSampleType { UNKNOWN, diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRole.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRole.java similarity index 90% rename from src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRole.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRole.java index 061d500bee94dd77279f8bcf0bf5be1194900022..492ea16763087e40ec41a7d1da928c285c232db4 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRole.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRole.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.model; +package org.etsi.tfs.ztp.model; public class DeviceRole { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleConfig.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleConfig.java similarity index 87% rename from src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleConfig.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleConfig.java index badcf05889a2338d602e8dddda1435aaface0b40..aa04360a7cc05512a081e71b1427136f2af35490 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleConfig.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleConfig.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,9 @@ * limitations under the License. */ -package eu.teraflow.ztp.model; +package org.etsi.tfs.ztp.model; -import eu.teraflow.ztp.context.model.DeviceConfig; +import org.etsi.tfs.ztp.context.model.DeviceConfig; public class DeviceRoleConfig { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleId.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleId.java similarity index 90% rename from src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleId.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleId.java index dd482fb05e0fe0f5f3770df15c4161c9dae4c70f..8eb116bd26975b28306a1ee1fedf7f61d44bc683 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleId.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleId.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.model; +package org.etsi.tfs.ztp.model; public class DeviceRoleId { diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleType.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleType.java similarity index 85% rename from src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleType.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleType.java index 7db0cab714cf493c46288ad1056fc6c1db974df2..8f57019dae62a4e6c5dc0f9b0af8e1fa3e36d9f4 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleType.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.model; +package org.etsi.tfs.ztp.model; public enum DeviceRoleType { NONE, diff --git a/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceState.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceState.java similarity index 85% rename from src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceState.java rename to src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceState.java index ee953862cf64707ba656d6cbe224fc83592367de..cdb360ca9e87dc1d6dace55c2044046de554c1a7 100644 --- a/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceState.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceState.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp.model; +package org.etsi.tfs.ztp.model; public enum DeviceState { UNDEFINED, diff --git a/src/ztp/src/main/resources/application.yml b/src/ztp/src/main/resources/application.yml index c551759efb3645f9c307c20a8988fc8ee9a89e0a..561e5a7aa47e6af1b84ceaf5fc53190a9f9645c5 100644 --- a/src/ztp/src/main/resources/application.yml +++ b/src/ztp/src/main/resources/application.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,11 @@ ztp: should-subscribe-to-context-component: true quarkus: + package: + type: mutable-jar + live-reload: + password: 1234 + url: http://0.0.0.0:8080 banner: path: teraflow-ztp-banner.txt grpc: diff --git a/src/ztp/src/test/java/eu/teraflow/ztp/ConfigRuleTypeTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/ConfigRuleTypeTest.java similarity index 78% rename from src/ztp/src/test/java/eu/teraflow/ztp/ConfigRuleTypeTest.java rename to src/ztp/src/test/java/org/etsi/tfs/ztp/ConfigRuleTypeTest.java index 435164a35350623ec50fea406585100c01f48bc6..5185037e276c502ed30a671c4d548a769d2bb4d5 100644 --- a/src/ztp/src/test/java/eu/teraflow/ztp/ConfigRuleTypeTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/ConfigRuleTypeTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,25 +14,25 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; import static org.assertj.core.api.Assertions.assertThat; -import eu.teraflow.ztp.acl.AclAction; -import eu.teraflow.ztp.acl.AclEntry; -import eu.teraflow.ztp.acl.AclForwardActionEnum; -import eu.teraflow.ztp.acl.AclLogActionEnum; -import eu.teraflow.ztp.acl.AclMatch; -import eu.teraflow.ztp.acl.AclRuleSet; -import eu.teraflow.ztp.acl.AclRuleTypeEnum; -import eu.teraflow.ztp.context.model.ConfigRuleAcl; -import eu.teraflow.ztp.context.model.ConfigRuleCustom; -import eu.teraflow.ztp.context.model.ConfigRuleTypeAcl; -import eu.teraflow.ztp.context.model.ConfigRuleTypeCustom; -import eu.teraflow.ztp.context.model.EndPointId; -import eu.teraflow.ztp.context.model.TopologyId; import io.quarkus.test.junit.QuarkusTest; import java.util.List; +import org.etsi.tfs.ztp.acl.AclAction; +import org.etsi.tfs.ztp.acl.AclEntry; +import org.etsi.tfs.ztp.acl.AclForwardActionEnum; +import org.etsi.tfs.ztp.acl.AclLogActionEnum; +import org.etsi.tfs.ztp.acl.AclMatch; +import org.etsi.tfs.ztp.acl.AclRuleSet; +import org.etsi.tfs.ztp.acl.AclRuleTypeEnum; +import org.etsi.tfs.ztp.context.model.ConfigRuleAcl; +import org.etsi.tfs.ztp.context.model.ConfigRuleCustom; +import org.etsi.tfs.ztp.context.model.ConfigRuleTypeAcl; +import org.etsi.tfs.ztp.context.model.ConfigRuleTypeCustom; +import org.etsi.tfs.ztp.context.model.EndPointId; +import org.etsi.tfs.ztp.context.model.TopologyId; import org.junit.jupiter.api.Test; @QuarkusTest diff --git a/src/ztp/src/test/java/eu/teraflow/ztp/ContextSubscriberTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/ContextSubscriberTest.java similarity index 95% rename from src/ztp/src/test/java/eu/teraflow/ztp/ContextSubscriberTest.java rename to src/ztp/src/test/java/org/etsi/tfs/ztp/ContextSubscriberTest.java index 9d3d6956c4b466456b8a148b7d3996d7ae1e5132..8c17d972368505cca64be7691ae959d17f3e756a 100644 --- a/src/ztp/src/test/java/eu/teraflow/ztp/ContextSubscriberTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/ContextSubscriberTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,22 +14,22 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import context.ContextOuterClass; -import eu.teraflow.ztp.context.ContextGateway; -import eu.teraflow.ztp.context.model.DeviceEvent; -import eu.teraflow.ztp.context.model.Event; -import eu.teraflow.ztp.context.model.EventTypeEnum; import io.quarkus.runtime.StartupEvent; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.mockito.InjectMock; import io.smallrye.mutiny.Multi; +import jakarta.inject.Inject; import java.util.UUID; -import javax.inject.Inject; +import org.etsi.tfs.ztp.context.ContextGateway; +import org.etsi.tfs.ztp.context.model.DeviceEvent; +import org.etsi.tfs.ztp.context.model.Event; +import org.etsi.tfs.ztp.context.model.EventTypeEnum; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import ztp.Ztp; diff --git a/src/ztp/src/test/java/eu/teraflow/ztp/EndPointCreationTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/EndPointCreationTest.java similarity index 92% rename from src/ztp/src/test/java/eu/teraflow/ztp/EndPointCreationTest.java rename to src/ztp/src/test/java/org/etsi/tfs/ztp/EndPointCreationTest.java index cb935cd4a9f24245e801341102649c3a5ffba5d7..b837765691d878152c77cd7b26fe2d9969459429 100644 --- a/src/ztp/src/test/java/eu/teraflow/ztp/EndPointCreationTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/EndPointCreationTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,19 +14,19 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import eu.teraflow.ztp.context.model.EndPoint; -import eu.teraflow.ztp.context.model.EndPointId; -import eu.teraflow.ztp.context.model.Location; -import eu.teraflow.ztp.context.model.LocationTypeRegion; -import eu.teraflow.ztp.context.model.TopologyId; -import eu.teraflow.ztp.kpi_sample_types.model.KpiSampleType; import io.quarkus.test.junit.QuarkusTest; import java.util.List; +import org.etsi.tfs.ztp.context.model.EndPoint; +import org.etsi.tfs.ztp.context.model.EndPointId; +import org.etsi.tfs.ztp.context.model.Location; +import org.etsi.tfs.ztp.context.model.LocationTypeRegion; +import org.etsi.tfs.ztp.context.model.TopologyId; +import org.etsi.tfs.ztp.kpi_sample_types.model.KpiSampleType; import org.junit.jupiter.api.Test; @QuarkusTest diff --git a/src/ztp/src/test/java/eu/teraflow/ztp/LocationTypeTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/LocationTypeTest.java similarity index 84% rename from src/ztp/src/test/java/eu/teraflow/ztp/LocationTypeTest.java rename to src/ztp/src/test/java/org/etsi/tfs/ztp/LocationTypeTest.java index 4f038a6adafacfc5a4b8beea8f83195501c86fb9..fdfb4479a2c64956ae8a741a7a217cba6a665f30 100644 --- a/src/ztp/src/test/java/eu/teraflow/ztp/LocationTypeTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/LocationTypeTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; import static org.assertj.core.api.Assertions.assertThat; -import eu.teraflow.ztp.context.model.GpsPosition; -import eu.teraflow.ztp.context.model.LocationTypeGpsPosition; -import eu.teraflow.ztp.context.model.LocationTypeRegion; import io.quarkus.test.junit.QuarkusTest; +import org.etsi.tfs.ztp.context.model.GpsPosition; +import org.etsi.tfs.ztp.context.model.LocationTypeGpsPosition; +import org.etsi.tfs.ztp.context.model.LocationTypeRegion; import org.junit.jupiter.api.Test; @QuarkusTest diff --git a/src/ztp/src/test/java/eu/teraflow/ztp/MockZtpConfiguration.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/MockZtpConfiguration.java similarity index 80% rename from src/ztp/src/test/java/eu/teraflow/ztp/MockZtpConfiguration.java rename to src/ztp/src/test/java/org/etsi/tfs/ztp/MockZtpConfiguration.java index aa554cbc3b76e73fa1952fb95a3d9045692eb0d9..09576a0b4e9a4d79787fd91aa1e65c13e90c4cd6 100644 --- a/src/ztp/src/test/java/eu/teraflow/ztp/MockZtpConfiguration.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/MockZtpConfiguration.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; import io.smallrye.config.SmallRyeConfig; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.Produces; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Produces; import org.eclipse.microprofile.config.Config; public class MockZtpConfiguration { diff --git a/src/ztp/src/test/java/eu/teraflow/ztp/SerializerTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/SerializerTest.java similarity index 96% rename from src/ztp/src/test/java/eu/teraflow/ztp/SerializerTest.java rename to src/ztp/src/test/java/org/etsi/tfs/ztp/SerializerTest.java index 8441255f3a569662324a38aef7a025ddae815049..1d11c2124e86f26a64de8c629b0785c9971d9e73 100644 --- a/src/ztp/src/test/java/eu/teraflow/ztp/SerializerTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/SerializerTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -24,46 +24,46 @@ import context.ContextOuterClass; import context.ContextOuterClass.DeviceId; import context.ContextOuterClass.DeviceOperationalStatusEnum; import context.ContextOuterClass.Uuid; -import eu.teraflow.ztp.acl.AclAction; -import eu.teraflow.ztp.acl.AclEntry; -import eu.teraflow.ztp.acl.AclForwardActionEnum; -import eu.teraflow.ztp.acl.AclLogActionEnum; -import eu.teraflow.ztp.acl.AclMatch; -import eu.teraflow.ztp.acl.AclRuleSet; -import eu.teraflow.ztp.acl.AclRuleTypeEnum; -import eu.teraflow.ztp.context.model.ConfigActionEnum; -import eu.teraflow.ztp.context.model.ConfigRule; -import eu.teraflow.ztp.context.model.ConfigRuleAcl; -import eu.teraflow.ztp.context.model.ConfigRuleCustom; -import eu.teraflow.ztp.context.model.ConfigRuleTypeAcl; -import eu.teraflow.ztp.context.model.ConfigRuleTypeCustom; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceConfig; -import eu.teraflow.ztp.context.model.DeviceDriverEnum; -import eu.teraflow.ztp.context.model.DeviceEvent; -import eu.teraflow.ztp.context.model.DeviceOperationalStatus; -import eu.teraflow.ztp.context.model.Empty; -import eu.teraflow.ztp.context.model.EndPoint.EndPointBuilder; -import eu.teraflow.ztp.context.model.EndPointId; -import eu.teraflow.ztp.context.model.Event; -import eu.teraflow.ztp.context.model.EventTypeEnum; -import eu.teraflow.ztp.context.model.GpsPosition; -import eu.teraflow.ztp.context.model.Location; -import eu.teraflow.ztp.context.model.LocationTypeGpsPosition; -import eu.teraflow.ztp.context.model.LocationTypeRegion; -import eu.teraflow.ztp.context.model.TopologyId; -import eu.teraflow.ztp.kpi_sample_types.model.KpiSampleType; -import eu.teraflow.ztp.model.DeviceRole; -import eu.teraflow.ztp.model.DeviceRoleConfig; -import eu.teraflow.ztp.model.DeviceRoleId; -import eu.teraflow.ztp.model.DeviceRoleType; -import eu.teraflow.ztp.model.DeviceState; import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; -import javax.inject.Inject; import kpi_sample_types.KpiSampleTypes; +import org.etsi.tfs.ztp.acl.AclAction; +import org.etsi.tfs.ztp.acl.AclEntry; +import org.etsi.tfs.ztp.acl.AclForwardActionEnum; +import org.etsi.tfs.ztp.acl.AclLogActionEnum; +import org.etsi.tfs.ztp.acl.AclMatch; +import org.etsi.tfs.ztp.acl.AclRuleSet; +import org.etsi.tfs.ztp.acl.AclRuleTypeEnum; +import org.etsi.tfs.ztp.context.model.ConfigActionEnum; +import org.etsi.tfs.ztp.context.model.ConfigRule; +import org.etsi.tfs.ztp.context.model.ConfigRuleAcl; +import org.etsi.tfs.ztp.context.model.ConfigRuleCustom; +import org.etsi.tfs.ztp.context.model.ConfigRuleTypeAcl; +import org.etsi.tfs.ztp.context.model.ConfigRuleTypeCustom; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceConfig; +import org.etsi.tfs.ztp.context.model.DeviceDriverEnum; +import org.etsi.tfs.ztp.context.model.DeviceEvent; +import org.etsi.tfs.ztp.context.model.DeviceOperationalStatus; +import org.etsi.tfs.ztp.context.model.Empty; +import org.etsi.tfs.ztp.context.model.EndPoint.EndPointBuilder; +import org.etsi.tfs.ztp.context.model.EndPointId; +import org.etsi.tfs.ztp.context.model.Event; +import org.etsi.tfs.ztp.context.model.EventTypeEnum; +import org.etsi.tfs.ztp.context.model.GpsPosition; +import org.etsi.tfs.ztp.context.model.Location; +import org.etsi.tfs.ztp.context.model.LocationTypeGpsPosition; +import org.etsi.tfs.ztp.context.model.LocationTypeRegion; +import org.etsi.tfs.ztp.context.model.TopologyId; +import org.etsi.tfs.ztp.kpi_sample_types.model.KpiSampleType; +import org.etsi.tfs.ztp.model.DeviceRole; +import org.etsi.tfs.ztp.model.DeviceRoleConfig; +import org.etsi.tfs.ztp.model.DeviceRoleId; +import org.etsi.tfs.ztp.model.DeviceRoleType; +import org.etsi.tfs.ztp.model.DeviceState; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -1030,7 +1030,7 @@ class SerializerTest { final var aclRuleSet = new AclRuleSet( "aclRuleName", - eu.teraflow.ztp.acl.AclRuleTypeEnum.IPV4, + org.etsi.tfs.ztp.acl.AclRuleTypeEnum.IPV4, "AclRuleDescription", "userId", List.of(aclEntry)); @@ -1116,7 +1116,7 @@ class SerializerTest { final var aclRuleSet = new AclRuleSet( "aclRuleName", - eu.teraflow.ztp.acl.AclRuleTypeEnum.IPV4, + org.etsi.tfs.ztp.acl.AclRuleTypeEnum.IPV4, "AclRuleDescription", "userId", List.of(aclEntry)); @@ -1223,6 +1223,14 @@ class SerializerTest { Arguments.of( DeviceDriverEnum.IETF_L2VPN, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN), + Arguments.of( + DeviceDriverEnum.GNMI_OPENCONFIG, + ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG), + Arguments.of( + DeviceDriverEnum.OPTICAL_TFS, + ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS), + Arguments.of( + DeviceDriverEnum.IETF_ACTN, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN), Arguments.of( DeviceDriverEnum.UNDEFINED, ContextOuterClass.DeviceDriverEnum.DEVICEDRIVER_UNDEFINED)); } diff --git a/src/ztp/src/test/java/eu/teraflow/ztp/ZtpFunctionalServiceTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpFunctionalServiceTest.java similarity index 94% rename from src/ztp/src/test/java/eu/teraflow/ztp/ZtpFunctionalServiceTest.java rename to src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpFunctionalServiceTest.java index 83b9f6f7f332e50e7d01fe6317b2623beafe0100..278c8eac42c08e720f653aefec9e990f5c0530f0 100644 --- a/src/ztp/src/test/java/eu/teraflow/ztp/ZtpFunctionalServiceTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpFunctionalServiceTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,35 +14,35 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; import context.ContextOuterClass; -import eu.teraflow.ztp.context.ContextGateway; -import eu.teraflow.ztp.context.model.ConfigActionEnum; -import eu.teraflow.ztp.context.model.ConfigRule; -import eu.teraflow.ztp.context.model.ConfigRuleCustom; -import eu.teraflow.ztp.context.model.ConfigRuleTypeCustom; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceConfig; -import eu.teraflow.ztp.context.model.DeviceDriverEnum; -import eu.teraflow.ztp.context.model.DeviceOperationalStatus; -import eu.teraflow.ztp.context.model.EndPoint.EndPointBuilder; -import eu.teraflow.ztp.context.model.EndPointId; -import eu.teraflow.ztp.context.model.Location; -import eu.teraflow.ztp.context.model.LocationTypeRegion; -import eu.teraflow.ztp.context.model.TopologyId; -import eu.teraflow.ztp.device.DeviceGateway; -import eu.teraflow.ztp.kpi_sample_types.model.KpiSampleType; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.mockito.InjectMock; import io.smallrye.mutiny.Uni; +import jakarta.inject.Inject; import java.util.ArrayList; import java.util.List; import java.util.UUID; -import javax.inject.Inject; import org.assertj.core.api.Assertions; +import org.etsi.tfs.ztp.context.ContextGateway; +import org.etsi.tfs.ztp.context.model.ConfigActionEnum; +import org.etsi.tfs.ztp.context.model.ConfigRule; +import org.etsi.tfs.ztp.context.model.ConfigRuleCustom; +import org.etsi.tfs.ztp.context.model.ConfigRuleTypeCustom; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceConfig; +import org.etsi.tfs.ztp.context.model.DeviceDriverEnum; +import org.etsi.tfs.ztp.context.model.DeviceOperationalStatus; +import org.etsi.tfs.ztp.context.model.EndPoint.EndPointBuilder; +import org.etsi.tfs.ztp.context.model.EndPointId; +import org.etsi.tfs.ztp.context.model.Location; +import org.etsi.tfs.ztp.context.model.LocationTypeRegion; +import org.etsi.tfs.ztp.context.model.TopologyId; +import org.etsi.tfs.ztp.device.DeviceGateway; +import org.etsi.tfs.ztp.kpi_sample_types.model.KpiSampleType; import org.jboss.logging.Logger; import org.junit.jupiter.api.Test; import org.mockito.Mockito; diff --git a/src/ztp/src/test/java/eu/teraflow/ztp/ZtpServiceTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpServiceTest.java similarity index 92% rename from src/ztp/src/test/java/eu/teraflow/ztp/ZtpServiceTest.java rename to src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpServiceTest.java index f4c38f1fc0eb214db3f6cea120fe783bb5c03c5f..63b6dc28df6e2da9bb581a69c0f21481c023906b 100644 --- a/src/ztp/src/test/java/eu/teraflow/ztp/ZtpServiceTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpServiceTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,41 +14,41 @@ * limitations under the License. */ -package eu.teraflow.ztp; +package org.etsi.tfs.ztp; import static org.assertj.core.api.Assertions.assertThat; import context.ContextOuterClass; -import eu.teraflow.ztp.context.ContextGateway; -import eu.teraflow.ztp.context.model.ConfigActionEnum; -import eu.teraflow.ztp.context.model.ConfigRule; -import eu.teraflow.ztp.context.model.ConfigRuleCustom; -import eu.teraflow.ztp.context.model.ConfigRuleTypeCustom; -import eu.teraflow.ztp.context.model.Device; -import eu.teraflow.ztp.context.model.DeviceConfig; -import eu.teraflow.ztp.context.model.DeviceDriverEnum; -import eu.teraflow.ztp.context.model.DeviceOperationalStatus; -import eu.teraflow.ztp.context.model.EndPoint.EndPointBuilder; -import eu.teraflow.ztp.context.model.EndPointId; -import eu.teraflow.ztp.context.model.Location; -import eu.teraflow.ztp.context.model.LocationTypeRegion; -import eu.teraflow.ztp.context.model.TopologyId; -import eu.teraflow.ztp.device.DeviceGateway; -import eu.teraflow.ztp.kpi_sample_types.model.KpiSampleType; -import eu.teraflow.ztp.model.DeviceRole; -import eu.teraflow.ztp.model.DeviceRoleConfig; -import eu.teraflow.ztp.model.DeviceRoleId; -import eu.teraflow.ztp.model.DeviceRoleType; import io.quarkus.grpc.GrpcClient; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.mockito.InjectMock; import io.smallrye.mutiny.Uni; +import jakarta.inject.Inject; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import javax.inject.Inject; +import org.etsi.tfs.ztp.context.ContextGateway; +import org.etsi.tfs.ztp.context.model.ConfigActionEnum; +import org.etsi.tfs.ztp.context.model.ConfigRule; +import org.etsi.tfs.ztp.context.model.ConfigRuleCustom; +import org.etsi.tfs.ztp.context.model.ConfigRuleTypeCustom; +import org.etsi.tfs.ztp.context.model.Device; +import org.etsi.tfs.ztp.context.model.DeviceConfig; +import org.etsi.tfs.ztp.context.model.DeviceDriverEnum; +import org.etsi.tfs.ztp.context.model.DeviceOperationalStatus; +import org.etsi.tfs.ztp.context.model.EndPoint.EndPointBuilder; +import org.etsi.tfs.ztp.context.model.EndPointId; +import org.etsi.tfs.ztp.context.model.Location; +import org.etsi.tfs.ztp.context.model.LocationTypeRegion; +import org.etsi.tfs.ztp.context.model.TopologyId; +import org.etsi.tfs.ztp.device.DeviceGateway; +import org.etsi.tfs.ztp.kpi_sample_types.model.KpiSampleType; +import org.etsi.tfs.ztp.model.DeviceRole; +import org.etsi.tfs.ztp.model.DeviceRoleConfig; +import org.etsi.tfs.ztp.model.DeviceRoleId; +import org.etsi.tfs.ztp.model.DeviceRoleType; import org.jboss.logging.Logger; import org.junit.jupiter.api.Test; import org.mockito.Mockito; diff --git a/src/ztp/target/generated-sources/grpc/acl/Acl.java b/src/ztp/target/generated-sources/grpc/acl/Acl.java index 521294eefdec36b373b99aaca5281be28e01d2db..f1895fa7206642f8f8d6b63f5d2635fb68816f89 100644 --- a/src/ztp/target/generated-sources/grpc/acl/Acl.java +++ b/src/ztp/target/generated-sources/grpc/acl/Acl.java @@ -1,4654 +1,4432 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: acl.proto - package acl; public final class Acl { - private Acl() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * Protobuf enum {@code acl.AclRuleTypeEnum} - */ - public enum AclRuleTypeEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ACLRULETYPE_UNDEFINED = 0; - */ - ACLRULETYPE_UNDEFINED(0), - /** - * ACLRULETYPE_IPV4 = 1; - */ - ACLRULETYPE_IPV4(1), - /** - * ACLRULETYPE_IPV6 = 2; - */ - ACLRULETYPE_IPV6(2), - /** - * ACLRULETYPE_L2 = 3; - */ - ACLRULETYPE_L2(3), - /** - * ACLRULETYPE_MPLS = 4; - */ - ACLRULETYPE_MPLS(4), - /** - * ACLRULETYPE_MIXED = 5; - */ - ACLRULETYPE_MIXED(5), - UNRECOGNIZED(-1), - ; - - /** - * ACLRULETYPE_UNDEFINED = 0; - */ - public static final int ACLRULETYPE_UNDEFINED_VALUE = 0; - /** - * ACLRULETYPE_IPV4 = 1; - */ - public static final int ACLRULETYPE_IPV4_VALUE = 1; - /** - * ACLRULETYPE_IPV6 = 2; - */ - public static final int ACLRULETYPE_IPV6_VALUE = 2; - /** - * ACLRULETYPE_L2 = 3; - */ - public static final int ACLRULETYPE_L2_VALUE = 3; - /** - * ACLRULETYPE_MPLS = 4; - */ - public static final int ACLRULETYPE_MPLS_VALUE = 4; - /** - * ACLRULETYPE_MIXED = 5; - */ - public static final int ACLRULETYPE_MIXED_VALUE = 5; + private Acl() { + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AclRuleTypeEnum valueOf(int value) { - return forNumber(value); + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code acl.AclRuleTypeEnum} */ - public static AclRuleTypeEnum forNumber(int value) { - switch (value) { - case 0: return ACLRULETYPE_UNDEFINED; - case 1: return ACLRULETYPE_IPV4; - case 2: return ACLRULETYPE_IPV6; - case 3: return ACLRULETYPE_L2; - case 4: return ACLRULETYPE_MPLS; - case 5: return ACLRULETYPE_MIXED; - default: return null; - } - } + public enum AclRuleTypeEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * ACLRULETYPE_UNDEFINED = 0; + */ + ACLRULETYPE_UNDEFINED(0), + /** + * ACLRULETYPE_IPV4 = 1; + */ + ACLRULETYPE_IPV4(1), + /** + * ACLRULETYPE_IPV6 = 2; + */ + ACLRULETYPE_IPV6(2), + /** + * ACLRULETYPE_L2 = 3; + */ + ACLRULETYPE_L2(3), + /** + * ACLRULETYPE_MPLS = 4; + */ + ACLRULETYPE_MPLS(4), + /** + * ACLRULETYPE_MIXED = 5; + */ + ACLRULETYPE_MIXED(5), + UNRECOGNIZED(-1); + + /** + * ACLRULETYPE_UNDEFINED = 0; + */ + public static final int ACLRULETYPE_UNDEFINED_VALUE = 0; + + /** + * ACLRULETYPE_IPV4 = 1; + */ + public static final int ACLRULETYPE_IPV4_VALUE = 1; + + /** + * ACLRULETYPE_IPV6 = 2; + */ + public static final int ACLRULETYPE_IPV6_VALUE = 2; + + /** + * ACLRULETYPE_L2 = 3; + */ + public static final int ACLRULETYPE_L2_VALUE = 3; + + /** + * ACLRULETYPE_MPLS = 4; + */ + public static final int ACLRULETYPE_MPLS_VALUE = 4; + + /** + * ACLRULETYPE_MIXED = 5; + */ + public static final int ACLRULETYPE_MIXED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AclRuleTypeEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AclRuleTypeEnum findValueByNumber(int number) { - return AclRuleTypeEnum.forNumber(number); + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AclRuleTypeEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AclRuleTypeEnum forNumber(int value) { + switch(value) { + case 0: + return ACLRULETYPE_UNDEFINED; + case 1: + return ACLRULETYPE_IPV4; + case 2: + return ACLRULETYPE_IPV6; + case 3: + return ACLRULETYPE_L2; + case 4: + return ACLRULETYPE_MPLS; + case 5: + return ACLRULETYPE_MIXED; + default: + return null; } - }; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return acl.Acl.getDescriptor().getEnumTypes().get(0); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final AclRuleTypeEnum[] VALUES = values(); - - public static AclRuleTypeEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public AclRuleTypeEnum findValueByNumber(int number) { + return AclRuleTypeEnum.forNumber(number); + } + }; - private AclRuleTypeEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:acl.AclRuleTypeEnum) - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * Protobuf enum {@code acl.AclForwardActionEnum} - */ - public enum AclForwardActionEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ACLFORWARDINGACTION_UNDEFINED = 0; - */ - ACLFORWARDINGACTION_UNDEFINED(0), - /** - * ACLFORWARDINGACTION_DROP = 1; - */ - ACLFORWARDINGACTION_DROP(1), - /** - * ACLFORWARDINGACTION_ACCEPT = 2; - */ - ACLFORWARDINGACTION_ACCEPT(2), - /** - * ACLFORWARDINGACTION_REJECT = 3; - */ - ACLFORWARDINGACTION_REJECT(3), - UNRECOGNIZED(-1), - ; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return acl.Acl.getDescriptor().getEnumTypes().get(0); + } - /** - * ACLFORWARDINGACTION_UNDEFINED = 0; - */ - public static final int ACLFORWARDINGACTION_UNDEFINED_VALUE = 0; - /** - * ACLFORWARDINGACTION_DROP = 1; - */ - public static final int ACLFORWARDINGACTION_DROP_VALUE = 1; - /** - * ACLFORWARDINGACTION_ACCEPT = 2; - */ - public static final int ACLFORWARDINGACTION_ACCEPT_VALUE = 2; - /** - * ACLFORWARDINGACTION_REJECT = 3; - */ - public static final int ACLFORWARDINGACTION_REJECT_VALUE = 3; + private static final AclRuleTypeEnum[] VALUES = values(); + public static AclRuleTypeEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + private final int value; - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AclForwardActionEnum valueOf(int value) { - return forNumber(value); + private AclRuleTypeEnum(int value) { + this.value = value; + } } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code acl.AclForwardActionEnum} */ - public static AclForwardActionEnum forNumber(int value) { - switch (value) { - case 0: return ACLFORWARDINGACTION_UNDEFINED; - case 1: return ACLFORWARDINGACTION_DROP; - case 2: return ACLFORWARDINGACTION_ACCEPT; - case 3: return ACLFORWARDINGACTION_REJECT; - default: return null; - } - } + public enum AclForwardActionEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * ACLFORWARDINGACTION_UNDEFINED = 0; + */ + ACLFORWARDINGACTION_UNDEFINED(0), + /** + * ACLFORWARDINGACTION_DROP = 1; + */ + ACLFORWARDINGACTION_DROP(1), + /** + * ACLFORWARDINGACTION_ACCEPT = 2; + */ + ACLFORWARDINGACTION_ACCEPT(2), + /** + * ACLFORWARDINGACTION_REJECT = 3; + */ + ACLFORWARDINGACTION_REJECT(3), + UNRECOGNIZED(-1); + + /** + * ACLFORWARDINGACTION_UNDEFINED = 0; + */ + public static final int ACLFORWARDINGACTION_UNDEFINED_VALUE = 0; + + /** + * ACLFORWARDINGACTION_DROP = 1; + */ + public static final int ACLFORWARDINGACTION_DROP_VALUE = 1; + + /** + * ACLFORWARDINGACTION_ACCEPT = 2; + */ + public static final int ACLFORWARDINGACTION_ACCEPT_VALUE = 2; + + /** + * ACLFORWARDINGACTION_REJECT = 3; + */ + public static final int ACLFORWARDINGACTION_REJECT_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AclForwardActionEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AclForwardActionEnum findValueByNumber(int number) { - return AclForwardActionEnum.forNumber(number); + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AclForwardActionEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AclForwardActionEnum forNumber(int value) { + switch(value) { + case 0: + return ACLFORWARDINGACTION_UNDEFINED; + case 1: + return ACLFORWARDINGACTION_DROP; + case 2: + return ACLFORWARDINGACTION_ACCEPT; + case 3: + return ACLFORWARDINGACTION_REJECT; + default: + return null; } - }; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return acl.Acl.getDescriptor().getEnumTypes().get(1); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final AclForwardActionEnum[] VALUES = values(); - - public static AclForwardActionEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public AclForwardActionEnum findValueByNumber(int number) { + return AclForwardActionEnum.forNumber(number); + } + }; - private AclForwardActionEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:acl.AclForwardActionEnum) - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * Protobuf enum {@code acl.AclLogActionEnum} - */ - public enum AclLogActionEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ACLLOGACTION_UNDEFINED = 0; - */ - ACLLOGACTION_UNDEFINED(0), - /** - * ACLLOGACTION_NOLOG = 1; - */ - ACLLOGACTION_NOLOG(1), - /** - * ACLLOGACTION_SYSLOG = 2; - */ - ACLLOGACTION_SYSLOG(2), - UNRECOGNIZED(-1), - ; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return acl.Acl.getDescriptor().getEnumTypes().get(1); + } - /** - * ACLLOGACTION_UNDEFINED = 0; - */ - public static final int ACLLOGACTION_UNDEFINED_VALUE = 0; - /** - * ACLLOGACTION_NOLOG = 1; - */ - public static final int ACLLOGACTION_NOLOG_VALUE = 1; - /** - * ACLLOGACTION_SYSLOG = 2; - */ - public static final int ACLLOGACTION_SYSLOG_VALUE = 2; + private static final AclForwardActionEnum[] VALUES = values(); + public static AclForwardActionEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + private final int value; - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AclLogActionEnum valueOf(int value) { - return forNumber(value); + private AclForwardActionEnum(int value) { + this.value = value; + } } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code acl.AclLogActionEnum} */ - public static AclLogActionEnum forNumber(int value) { - switch (value) { - case 0: return ACLLOGACTION_UNDEFINED; - case 1: return ACLLOGACTION_NOLOG; - case 2: return ACLLOGACTION_SYSLOG; - default: return null; - } - } + public enum AclLogActionEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * ACLLOGACTION_UNDEFINED = 0; + */ + ACLLOGACTION_UNDEFINED(0), + /** + * ACLLOGACTION_NOLOG = 1; + */ + ACLLOGACTION_NOLOG(1), + /** + * ACLLOGACTION_SYSLOG = 2; + */ + ACLLOGACTION_SYSLOG(2), + UNRECOGNIZED(-1); + + /** + * ACLLOGACTION_UNDEFINED = 0; + */ + public static final int ACLLOGACTION_UNDEFINED_VALUE = 0; + + /** + * ACLLOGACTION_NOLOG = 1; + */ + public static final int ACLLOGACTION_NOLOG_VALUE = 1; + + /** + * ACLLOGACTION_SYSLOG = 2; + */ + public static final int ACLLOGACTION_SYSLOG_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AclLogActionEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AclLogActionEnum forNumber(int value) { + switch(value) { + case 0: + return ACLLOGACTION_UNDEFINED; + case 1: + return ACLLOGACTION_NOLOG; + case 2: + return ACLLOGACTION_SYSLOG; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AclLogActionEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { public AclLogActionEnum findValueByNumber(int number) { - return AclLogActionEnum.forNumber(number); + return AclLogActionEnum.forNumber(number); } - }; + }; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return acl.Acl.getDescriptor().getEnumTypes().get(2); - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - private static final AclLogActionEnum[] VALUES = values(); - - public static AclLogActionEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - private final int value; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return acl.Acl.getDescriptor().getEnumTypes().get(2); + } - private AclLogActionEnum(int value) { - this.value = value; - } + private static final AclLogActionEnum[] VALUES = values(); - // @@protoc_insertion_point(enum_scope:acl.AclLogActionEnum) - } + public static AclLogActionEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public interface AclMatchOrBuilder extends - // @@protoc_insertion_point(interface_extends:acl.AclMatch) - com.google.protobuf.MessageOrBuilder { + private final int value; - /** - * uint32 dscp = 1; - * @return The dscp. - */ - int getDscp(); + private AclLogActionEnum(int value) { + this.value = value; + } + } - /** - * uint32 protocol = 2; - * @return The protocol. - */ - int getProtocol(); + public interface AclMatchOrBuilder extends // @@protoc_insertion_point(interface_extends:acl.AclMatch) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 dscp = 1; + * @return The dscp. + */ + int getDscp(); + + /** + * uint32 protocol = 2; + * @return The protocol. + */ + int getProtocol(); + + /** + * string src_address = 3; + * @return The srcAddress. + */ + java.lang.String getSrcAddress(); + + /** + * string src_address = 3; + * @return The bytes for srcAddress. + */ + com.google.protobuf.ByteString getSrcAddressBytes(); + + /** + * string dst_address = 4; + * @return The dstAddress. + */ + java.lang.String getDstAddress(); + + /** + * string dst_address = 4; + * @return The bytes for dstAddress. + */ + com.google.protobuf.ByteString getDstAddressBytes(); + + /** + * uint32 src_port = 5; + * @return The srcPort. + */ + int getSrcPort(); + + /** + * uint32 dst_port = 6; + * @return The dstPort. + */ + int getDstPort(); + + /** + * uint32 start_mpls_label = 7; + * @return The startMplsLabel. + */ + int getStartMplsLabel(); + + /** + * uint32 end_mpls_label = 8; + * @return The endMplsLabel. + */ + int getEndMplsLabel(); + } /** - * string src_address = 3; - * @return The srcAddress. - */ - java.lang.String getSrcAddress(); - /** - * string src_address = 3; - * @return The bytes for srcAddress. + * Protobuf type {@code acl.AclMatch} */ - com.google.protobuf.ByteString - getSrcAddressBytes(); + public static final class AclMatch extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:acl.AclMatch) + AclMatchOrBuilder { - /** - * string dst_address = 4; - * @return The dstAddress. - */ - java.lang.String getDstAddress(); - /** - * string dst_address = 4; - * @return The bytes for dstAddress. - */ - com.google.protobuf.ByteString - getDstAddressBytes(); + private static final long serialVersionUID = 0L; - /** - * uint32 src_port = 5; - * @return The srcPort. - */ - int getSrcPort(); + // Use AclMatch.newBuilder() to construct. + private AclMatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - /** - * uint32 dst_port = 6; - * @return The dstPort. - */ - int getDstPort(); + private AclMatch() { + srcAddress_ = ""; + dstAddress_ = ""; + } - /** - * uint32 start_mpls_label = 7; - * @return The startMplsLabel. - */ - int getStartMplsLabel(); + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AclMatch(); + } - /** - * uint32 end_mpls_label = 8; - * @return The endMplsLabel. - */ - int getEndMplsLabel(); - } - /** - * Protobuf type {@code acl.AclMatch} - */ - public static final class AclMatch extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:acl.AclMatch) - AclMatchOrBuilder { - private static final long serialVersionUID = 0L; - // Use AclMatch.newBuilder() to construct. - private AclMatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AclMatch() { - srcAddress_ = ""; - dstAddress_ = ""; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AclMatch(); - } + 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(); + } + } - @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; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return acl.Acl.internal_static_acl_AclMatch_descriptor; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclMatch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclMatch.class, acl.Acl.AclMatch.Builder.class); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclMatch_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclMatch.class, acl.Acl.AclMatch.Builder.class); + } - public static final int DSCP_FIELD_NUMBER = 1; - private int dscp_; - /** - * uint32 dscp = 1; - * @return The dscp. - */ - @java.lang.Override - public int getDscp() { - return dscp_; - } + public static final int DSCP_FIELD_NUMBER = 1; - public static final int PROTOCOL_FIELD_NUMBER = 2; - private int protocol_; - /** - * uint32 protocol = 2; - * @return The protocol. - */ - @java.lang.Override - public int getProtocol() { - return protocol_; - } + private int dscp_; - public static final int SRC_ADDRESS_FIELD_NUMBER = 3; - private volatile java.lang.Object srcAddress_; - /** - * string src_address = 3; - * @return The srcAddress. - */ - @java.lang.Override - public java.lang.String getSrcAddress() { - java.lang.Object ref = srcAddress_; - 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(); - srcAddress_ = s; - return s; - } - } - /** - * string src_address = 3; - * @return The bytes for srcAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSrcAddressBytes() { - java.lang.Object ref = srcAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - srcAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * uint32 dscp = 1; + * @return The dscp. + */ + @java.lang.Override + public int getDscp() { + return dscp_; + } - public static final int DST_ADDRESS_FIELD_NUMBER = 4; - private volatile java.lang.Object dstAddress_; - /** - * string dst_address = 4; - * @return The dstAddress. - */ - @java.lang.Override - public java.lang.String getDstAddress() { - java.lang.Object ref = dstAddress_; - 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(); - dstAddress_ = s; - return s; - } - } - /** - * string dst_address = 4; - * @return The bytes for dstAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDstAddressBytes() { - java.lang.Object ref = dstAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dstAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static final int PROTOCOL_FIELD_NUMBER = 2; - public static final int SRC_PORT_FIELD_NUMBER = 5; - private int srcPort_; - /** - * uint32 src_port = 5; - * @return The srcPort. - */ - @java.lang.Override - public int getSrcPort() { - return srcPort_; - } + private int protocol_; - public static final int DST_PORT_FIELD_NUMBER = 6; - private int dstPort_; - /** - * uint32 dst_port = 6; - * @return The dstPort. - */ - @java.lang.Override - public int getDstPort() { - return dstPort_; - } + /** + * uint32 protocol = 2; + * @return The protocol. + */ + @java.lang.Override + public int getProtocol() { + return protocol_; + } - public static final int START_MPLS_LABEL_FIELD_NUMBER = 7; - private int startMplsLabel_; - /** - * uint32 start_mpls_label = 7; - * @return The startMplsLabel. - */ - @java.lang.Override - public int getStartMplsLabel() { - return startMplsLabel_; - } + public static final int SRC_ADDRESS_FIELD_NUMBER = 3; - public static final int END_MPLS_LABEL_FIELD_NUMBER = 8; - private int endMplsLabel_; - /** - * uint32 end_mpls_label = 8; - * @return The endMplsLabel. - */ - @java.lang.Override - public int getEndMplsLabel() { - return endMplsLabel_; - } + private volatile java.lang.Object srcAddress_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * string src_address = 3; + * @return The srcAddress. + */ + @java.lang.Override + public java.lang.String getSrcAddress() { + java.lang.Object ref = srcAddress_; + 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(); + srcAddress_ = s; + return s; + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * string src_address = 3; + * @return The bytes for srcAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSrcAddressBytes() { + java.lang.Object ref = srcAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (dscp_ != 0) { - output.writeUInt32(1, dscp_); - } - if (protocol_ != 0) { - output.writeUInt32(2, protocol_); - } - if (!getSrcAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, srcAddress_); - } - if (!getDstAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dstAddress_); - } - if (srcPort_ != 0) { - output.writeUInt32(5, srcPort_); - } - if (dstPort_ != 0) { - output.writeUInt32(6, dstPort_); - } - if (startMplsLabel_ != 0) { - output.writeUInt32(7, startMplsLabel_); - } - if (endMplsLabel_ != 0) { - output.writeUInt32(8, endMplsLabel_); - } - unknownFields.writeTo(output); - } + public static final int DST_ADDRESS_FIELD_NUMBER = 4; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dscp_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, dscp_); - } - if (protocol_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, protocol_); - } - if (!getSrcAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, srcAddress_); - } - if (!getDstAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dstAddress_); - } - if (srcPort_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, srcPort_); - } - if (dstPort_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, dstPort_); - } - if (startMplsLabel_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, startMplsLabel_); - } - if (endMplsLabel_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(8, endMplsLabel_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private volatile java.lang.Object dstAddress_; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof acl.Acl.AclMatch)) { - return super.equals(obj); - } - acl.Acl.AclMatch other = (acl.Acl.AclMatch) obj; - - if (getDscp() - != other.getDscp()) return false; - if (getProtocol() - != other.getProtocol()) return false; - if (!getSrcAddress() - .equals(other.getSrcAddress())) return false; - if (!getDstAddress() - .equals(other.getDstAddress())) return false; - if (getSrcPort() - != other.getSrcPort()) return false; - if (getDstPort() - != other.getDstPort()) return false; - if (getStartMplsLabel() - != other.getStartMplsLabel()) return false; - if (getEndMplsLabel() - != other.getEndMplsLabel()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string dst_address = 4; + * @return The dstAddress. + */ + @java.lang.Override + public java.lang.String getDstAddress() { + java.lang.Object ref = dstAddress_; + 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(); + dstAddress_ = s; + return s; + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DSCP_FIELD_NUMBER; - hash = (53 * hash) + getDscp(); - hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; - hash = (53 * hash) + getProtocol(); - hash = (37 * hash) + SRC_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getSrcAddress().hashCode(); - hash = (37 * hash) + DST_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getDstAddress().hashCode(); - hash = (37 * hash) + SRC_PORT_FIELD_NUMBER; - hash = (53 * hash) + getSrcPort(); - hash = (37 * hash) + DST_PORT_FIELD_NUMBER; - hash = (53 * hash) + getDstPort(); - hash = (37 * hash) + START_MPLS_LABEL_FIELD_NUMBER; - hash = (53 * hash) + getStartMplsLabel(); - hash = (37 * hash) + END_MPLS_LABEL_FIELD_NUMBER; - hash = (53 * hash) + getEndMplsLabel(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * string dst_address = 4; + * @return The bytes for dstAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDstAddressBytes() { + java.lang.Object ref = dstAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static acl.Acl.AclMatch parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclMatch parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclMatch parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclMatch parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclMatch parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclMatch parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclMatch parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclMatch parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclMatch parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static acl.Acl.AclMatch parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclMatch parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclMatch parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int SRC_PORT_FIELD_NUMBER = 5; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(acl.Acl.AclMatch prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private int srcPort_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code acl.AclMatch} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:acl.AclMatch) - acl.Acl.AclMatchOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return acl.Acl.internal_static_acl_AclMatch_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclMatch_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclMatch.class, acl.Acl.AclMatch.Builder.class); - } - - // 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(); - dscp_ = 0; - - protocol_ = 0; - - srcAddress_ = ""; - - dstAddress_ = ""; - - srcPort_ = 0; - - dstPort_ = 0; - - startMplsLabel_ = 0; - - endMplsLabel_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return acl.Acl.internal_static_acl_AclMatch_descriptor; - } - - @java.lang.Override - public acl.Acl.AclMatch getDefaultInstanceForType() { - return acl.Acl.AclMatch.getDefaultInstance(); - } - - @java.lang.Override - public acl.Acl.AclMatch build() { - acl.Acl.AclMatch result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof acl.Acl.AclMatch) { - return mergeFrom((acl.Acl.AclMatch)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(acl.Acl.AclMatch other) { - if (other == acl.Acl.AclMatch.getDefaultInstance()) return this; - if (other.getDscp() != 0) { - setDscp(other.getDscp()); - } - if (other.getProtocol() != 0) { - setProtocol(other.getProtocol()); - } - if (!other.getSrcAddress().isEmpty()) { - srcAddress_ = other.srcAddress_; - onChanged(); - } - if (!other.getDstAddress().isEmpty()) { - dstAddress_ = other.dstAddress_; - onChanged(); - } - if (other.getSrcPort() != 0) { - setSrcPort(other.getSrcPort()); - } - if (other.getDstPort() != 0) { - setDstPort(other.getDstPort()); - } - if (other.getStartMplsLabel() != 0) { - setStartMplsLabel(other.getStartMplsLabel()); - } - if (other.getEndMplsLabel() != 0) { - setEndMplsLabel(other.getEndMplsLabel()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclMatch) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int dscp_ ; - /** - * uint32 dscp = 1; - * @return The dscp. - */ - @java.lang.Override - public int getDscp() { - return dscp_; - } - /** - * uint32 dscp = 1; - * @param value The dscp to set. - * @return This builder for chaining. - */ - public Builder setDscp(int value) { - - dscp_ = value; - onChanged(); - return this; - } - /** - * uint32 dscp = 1; - * @return This builder for chaining. - */ - public Builder clearDscp() { - - dscp_ = 0; - onChanged(); - return this; - } - - private int protocol_ ; - /** - * uint32 protocol = 2; - * @return The protocol. - */ - @java.lang.Override - public int getProtocol() { - return protocol_; - } - /** - * uint32 protocol = 2; - * @param value The protocol to set. - * @return This builder for chaining. - */ - public Builder setProtocol(int value) { - - protocol_ = value; - onChanged(); - return this; - } - /** - * uint32 protocol = 2; - * @return This builder for chaining. - */ - public Builder clearProtocol() { - - protocol_ = 0; - onChanged(); - return this; - } - - private java.lang.Object srcAddress_ = ""; - /** - * string src_address = 3; - * @return The srcAddress. - */ - public java.lang.String getSrcAddress() { - java.lang.Object ref = srcAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - srcAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string src_address = 3; - * @return The bytes for srcAddress. - */ - public com.google.protobuf.ByteString - getSrcAddressBytes() { - java.lang.Object ref = srcAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - srcAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string src_address = 3; - * @param value The srcAddress to set. - * @return This builder for chaining. - */ - public Builder setSrcAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - srcAddress_ = value; - onChanged(); - return this; - } - /** - * string src_address = 3; - * @return This builder for chaining. - */ - public Builder clearSrcAddress() { - - srcAddress_ = getDefaultInstance().getSrcAddress(); - onChanged(); - return this; - } - /** - * string src_address = 3; - * @param value The bytes for srcAddress to set. - * @return This builder for chaining. - */ - public Builder setSrcAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - srcAddress_ = value; - onChanged(); - return this; - } - - private java.lang.Object dstAddress_ = ""; - /** - * string dst_address = 4; - * @return The dstAddress. - */ - public java.lang.String getDstAddress() { - java.lang.Object ref = dstAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dstAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string dst_address = 4; - * @return The bytes for dstAddress. - */ - public com.google.protobuf.ByteString - getDstAddressBytes() { - java.lang.Object ref = dstAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dstAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string dst_address = 4; - * @param value The dstAddress to set. - * @return This builder for chaining. - */ - public Builder setDstAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dstAddress_ = value; - onChanged(); - return this; - } - /** - * string dst_address = 4; - * @return This builder for chaining. - */ - public Builder clearDstAddress() { - - dstAddress_ = getDefaultInstance().getDstAddress(); - onChanged(); - return this; - } - /** - * string dst_address = 4; - * @param value The bytes for dstAddress to set. - * @return This builder for chaining. - */ - public Builder setDstAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dstAddress_ = value; - onChanged(); - return this; - } - - private int srcPort_ ; - /** - * uint32 src_port = 5; - * @return The srcPort. - */ - @java.lang.Override - public int getSrcPort() { - return srcPort_; - } - /** - * uint32 src_port = 5; - * @param value The srcPort to set. - * @return This builder for chaining. - */ - public Builder setSrcPort(int value) { - - srcPort_ = value; - onChanged(); - return this; - } - /** - * uint32 src_port = 5; - * @return This builder for chaining. - */ - public Builder clearSrcPort() { - - srcPort_ = 0; - onChanged(); - return this; - } - - private int dstPort_ ; - /** - * uint32 dst_port = 6; - * @return The dstPort. - */ - @java.lang.Override - public int getDstPort() { - return dstPort_; - } - /** - * uint32 dst_port = 6; - * @param value The dstPort to set. - * @return This builder for chaining. - */ - public Builder setDstPort(int value) { - - dstPort_ = value; - onChanged(); - return this; - } - /** - * uint32 dst_port = 6; - * @return This builder for chaining. - */ - public Builder clearDstPort() { - - dstPort_ = 0; - onChanged(); - return this; - } - - private int startMplsLabel_ ; - /** - * uint32 start_mpls_label = 7; - * @return The startMplsLabel. - */ - @java.lang.Override - public int getStartMplsLabel() { - return startMplsLabel_; - } - /** - * uint32 start_mpls_label = 7; - * @param value The startMplsLabel to set. - * @return This builder for chaining. - */ - public Builder setStartMplsLabel(int value) { - - startMplsLabel_ = value; - onChanged(); - return this; - } - /** - * uint32 start_mpls_label = 7; - * @return This builder for chaining. - */ - public Builder clearStartMplsLabel() { - - startMplsLabel_ = 0; - onChanged(); - return this; - } - - private int endMplsLabel_ ; - /** - * uint32 end_mpls_label = 8; - * @return The endMplsLabel. - */ - @java.lang.Override - public int getEndMplsLabel() { - return endMplsLabel_; - } - /** - * uint32 end_mpls_label = 8; - * @param value The endMplsLabel to set. - * @return This builder for chaining. - */ - public Builder setEndMplsLabel(int value) { - - endMplsLabel_ = value; - onChanged(); - return this; - } - /** - * uint32 end_mpls_label = 8; - * @return This builder for chaining. - */ - public Builder clearEndMplsLabel() { - - endMplsLabel_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:acl.AclMatch) - } + /** + * uint32 src_port = 5; + * @return The srcPort. + */ + @java.lang.Override + public int getSrcPort() { + return srcPort_; + } - // @@protoc_insertion_point(class_scope:acl.AclMatch) - private static final acl.Acl.AclMatch DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new acl.Acl.AclMatch(); - } + public static final int DST_PORT_FIELD_NUMBER = 6; - public static acl.Acl.AclMatch getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private int dstPort_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * uint32 dst_port = 6; + * @return The dstPort. + */ + @java.lang.Override + public int getDstPort() { + return dstPort_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static final int START_MPLS_LABEL_FIELD_NUMBER = 7; - @java.lang.Override - public acl.Acl.AclMatch getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private int startMplsLabel_; - } + /** + * uint32 start_mpls_label = 7; + * @return The startMplsLabel. + */ + @java.lang.Override + public int getStartMplsLabel() { + return startMplsLabel_; + } - public interface AclActionOrBuilder extends - // @@protoc_insertion_point(interface_extends:acl.AclAction) - com.google.protobuf.MessageOrBuilder { + public static final int END_MPLS_LABEL_FIELD_NUMBER = 8; - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return The enum numeric value on the wire for forwardAction. - */ - int getForwardActionValue(); - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return The forwardAction. - */ - acl.Acl.AclForwardActionEnum getForwardAction(); + private int endMplsLabel_; + + /** + * uint32 end_mpls_label = 8; + * @return The endMplsLabel. + */ + @java.lang.Override + public int getEndMplsLabel() { + return endMplsLabel_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (dscp_ != 0) { + output.writeUInt32(1, dscp_); + } + if (protocol_ != 0) { + output.writeUInt32(2, protocol_); + } + if (!getSrcAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, srcAddress_); + } + if (!getDstAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dstAddress_); + } + if (srcPort_ != 0) { + output.writeUInt32(5, srcPort_); + } + if (dstPort_ != 0) { + output.writeUInt32(6, dstPort_); + } + if (startMplsLabel_ != 0) { + output.writeUInt32(7, startMplsLabel_); + } + if (endMplsLabel_ != 0) { + output.writeUInt32(8, endMplsLabel_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (dscp_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(1, dscp_); + } + if (protocol_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, protocol_); + } + if (!getSrcAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, srcAddress_); + } + if (!getDstAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dstAddress_); + } + if (srcPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(5, srcPort_); + } + if (dstPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(6, dstPort_); + } + if (startMplsLabel_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(7, startMplsLabel_); + } + if (endMplsLabel_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(8, endMplsLabel_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof acl.Acl.AclMatch)) { + return super.equals(obj); + } + acl.Acl.AclMatch other = (acl.Acl.AclMatch) obj; + if (getDscp() != other.getDscp()) + return false; + if (getProtocol() != other.getProtocol()) + return false; + if (!getSrcAddress().equals(other.getSrcAddress())) + return false; + if (!getDstAddress().equals(other.getDstAddress())) + return false; + if (getSrcPort() != other.getSrcPort()) + return false; + if (getDstPort() != other.getDstPort()) + return false; + if (getStartMplsLabel() != other.getStartMplsLabel()) + return false; + if (getEndMplsLabel() != other.getEndMplsLabel()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DSCP_FIELD_NUMBER; + hash = (53 * hash) + getDscp(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol(); + hash = (37 * hash) + SRC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getSrcAddress().hashCode(); + hash = (37 * hash) + DST_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getDstAddress().hashCode(); + hash = (37 * hash) + SRC_PORT_FIELD_NUMBER; + hash = (53 * hash) + getSrcPort(); + hash = (37 * hash) + DST_PORT_FIELD_NUMBER; + hash = (53 * hash) + getDstPort(); + hash = (37 * hash) + START_MPLS_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getStartMplsLabel(); + hash = (37 * hash) + END_MPLS_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getEndMplsLabel(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static acl.Acl.AclMatch parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclMatch parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclMatch parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclMatch parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclMatch parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclMatch parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclMatch parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclMatch parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclMatch parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static acl.Acl.AclMatch parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclMatch parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclMatch parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(acl.Acl.AclMatch prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code acl.AclMatch} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:acl.AclMatch) + acl.Acl.AclMatchOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return acl.Acl.internal_static_acl_AclMatch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclMatch_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclMatch.class, acl.Acl.AclMatch.Builder.class); + } + + // 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(); + dscp_ = 0; + protocol_ = 0; + srcAddress_ = ""; + dstAddress_ = ""; + srcPort_ = 0; + dstPort_ = 0; + startMplsLabel_ = 0; + endMplsLabel_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return acl.Acl.internal_static_acl_AclMatch_descriptor; + } + + @java.lang.Override + public acl.Acl.AclMatch getDefaultInstanceForType() { + return acl.Acl.AclMatch.getDefaultInstance(); + } + + @java.lang.Override + public acl.Acl.AclMatch build() { + acl.Acl.AclMatch result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof acl.Acl.AclMatch) { + return mergeFrom((acl.Acl.AclMatch) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(acl.Acl.AclMatch other) { + if (other == acl.Acl.AclMatch.getDefaultInstance()) + return this; + if (other.getDscp() != 0) { + setDscp(other.getDscp()); + } + if (other.getProtocol() != 0) { + setProtocol(other.getProtocol()); + } + if (!other.getSrcAddress().isEmpty()) { + srcAddress_ = other.srcAddress_; + onChanged(); + } + if (!other.getDstAddress().isEmpty()) { + dstAddress_ = other.dstAddress_; + onChanged(); + } + if (other.getSrcPort() != 0) { + setSrcPort(other.getSrcPort()); + } + if (other.getDstPort() != 0) { + setDstPort(other.getDstPort()); + } + if (other.getStartMplsLabel() != 0) { + setStartMplsLabel(other.getStartMplsLabel()); + } + if (other.getEndMplsLabel() != 0) { + setEndMplsLabel(other.getEndMplsLabel()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (acl.Acl.AclMatch) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dscp_; + + /** + * uint32 dscp = 1; + * @return The dscp. + */ + @java.lang.Override + public int getDscp() { + return dscp_; + } + + /** + * uint32 dscp = 1; + * @param value The dscp to set. + * @return This builder for chaining. + */ + public Builder setDscp(int value) { + dscp_ = value; + onChanged(); + return this; + } + + /** + * uint32 dscp = 1; + * @return This builder for chaining. + */ + public Builder clearDscp() { + dscp_ = 0; + onChanged(); + return this; + } + + private int protocol_; + + /** + * uint32 protocol = 2; + * @return The protocol. + */ + @java.lang.Override + public int getProtocol() { + return protocol_; + } + + /** + * uint32 protocol = 2; + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(int value) { + protocol_ = value; + onChanged(); + return this; + } + + /** + * uint32 protocol = 2; + * @return This builder for chaining. + */ + public Builder clearProtocol() { + protocol_ = 0; + onChanged(); + return this; + } + + private java.lang.Object srcAddress_ = ""; + + /** + * string src_address = 3; + * @return The srcAddress. + */ + public java.lang.String getSrcAddress() { + java.lang.Object ref = srcAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string src_address = 3; + * @return The bytes for srcAddress. + */ + public com.google.protobuf.ByteString getSrcAddressBytes() { + java.lang.Object ref = srcAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string src_address = 3; + * @param value The srcAddress to set. + * @return This builder for chaining. + */ + public Builder setSrcAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + srcAddress_ = value; + onChanged(); + return this; + } + + /** + * string src_address = 3; + * @return This builder for chaining. + */ + public Builder clearSrcAddress() { + srcAddress_ = getDefaultInstance().getSrcAddress(); + onChanged(); + return this; + } + + /** + * string src_address = 3; + * @param value The bytes for srcAddress to set. + * @return This builder for chaining. + */ + public Builder setSrcAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + srcAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object dstAddress_ = ""; + + /** + * string dst_address = 4; + * @return The dstAddress. + */ + public java.lang.String getDstAddress() { + java.lang.Object ref = dstAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dstAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string dst_address = 4; + * @return The bytes for dstAddress. + */ + public com.google.protobuf.ByteString getDstAddressBytes() { + java.lang.Object ref = dstAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string dst_address = 4; + * @param value The dstAddress to set. + * @return This builder for chaining. + */ + public Builder setDstAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dstAddress_ = value; + onChanged(); + return this; + } + + /** + * string dst_address = 4; + * @return This builder for chaining. + */ + public Builder clearDstAddress() { + dstAddress_ = getDefaultInstance().getDstAddress(); + onChanged(); + return this; + } + + /** + * string dst_address = 4; + * @param value The bytes for dstAddress to set. + * @return This builder for chaining. + */ + public Builder setDstAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dstAddress_ = value; + onChanged(); + return this; + } + + private int srcPort_; + + /** + * uint32 src_port = 5; + * @return The srcPort. + */ + @java.lang.Override + public int getSrcPort() { + return srcPort_; + } + + /** + * uint32 src_port = 5; + * @param value The srcPort to set. + * @return This builder for chaining. + */ + public Builder setSrcPort(int value) { + srcPort_ = value; + onChanged(); + return this; + } + + /** + * uint32 src_port = 5; + * @return This builder for chaining. + */ + public Builder clearSrcPort() { + srcPort_ = 0; + onChanged(); + return this; + } + + private int dstPort_; + + /** + * uint32 dst_port = 6; + * @return The dstPort. + */ + @java.lang.Override + public int getDstPort() { + return dstPort_; + } + + /** + * uint32 dst_port = 6; + * @param value The dstPort to set. + * @return This builder for chaining. + */ + public Builder setDstPort(int value) { + dstPort_ = value; + onChanged(); + return this; + } + + /** + * uint32 dst_port = 6; + * @return This builder for chaining. + */ + public Builder clearDstPort() { + dstPort_ = 0; + onChanged(); + return this; + } + + private int startMplsLabel_; + + /** + * uint32 start_mpls_label = 7; + * @return The startMplsLabel. + */ + @java.lang.Override + public int getStartMplsLabel() { + return startMplsLabel_; + } + + /** + * uint32 start_mpls_label = 7; + * @param value The startMplsLabel to set. + * @return This builder for chaining. + */ + public Builder setStartMplsLabel(int value) { + startMplsLabel_ = value; + onChanged(); + return this; + } + + /** + * uint32 start_mpls_label = 7; + * @return This builder for chaining. + */ + public Builder clearStartMplsLabel() { + startMplsLabel_ = 0; + onChanged(); + return this; + } + + private int endMplsLabel_; + + /** + * uint32 end_mpls_label = 8; + * @return The endMplsLabel. + */ + @java.lang.Override + public int getEndMplsLabel() { + return endMplsLabel_; + } + + /** + * uint32 end_mpls_label = 8; + * @param value The endMplsLabel to set. + * @return This builder for chaining. + */ + public Builder setEndMplsLabel(int value) { + endMplsLabel_ = value; + onChanged(); + return this; + } + + /** + * uint32 end_mpls_label = 8; + * @return This builder for chaining. + */ + public Builder clearEndMplsLabel() { + endMplsLabel_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:acl.AclMatch) + } + + // @@protoc_insertion_point(class_scope:acl.AclMatch) + private static final acl.Acl.AclMatch DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new acl.Acl.AclMatch(); + } + + public static acl.Acl.AclMatch getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public acl.Acl.AclMatch getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AclActionOrBuilder extends // @@protoc_insertion_point(interface_extends:acl.AclAction) + com.google.protobuf.MessageOrBuilder { + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return The enum numeric value on the wire for forwardAction. + */ + int getForwardActionValue(); + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return The forwardAction. + */ + acl.Acl.AclForwardActionEnum getForwardAction(); + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return The enum numeric value on the wire for logAction. + */ + int getLogActionValue(); + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return The logAction. + */ + acl.Acl.AclLogActionEnum getLogAction(); + } /** - * .acl.AclLogActionEnum log_action = 2; - * @return The enum numeric value on the wire for logAction. - */ - int getLogActionValue(); - /** - * .acl.AclLogActionEnum log_action = 2; - * @return The logAction. + * Protobuf type {@code acl.AclAction} */ - acl.Acl.AclLogActionEnum getLogAction(); - } - /** - * Protobuf type {@code acl.AclAction} - */ - public static final class AclAction extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:acl.AclAction) - AclActionOrBuilder { - private static final long serialVersionUID = 0L; - // Use AclAction.newBuilder() to construct. - private AclAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); + public static final class AclAction extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:acl.AclAction) + AclActionOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use AclAction.newBuilder() to construct. + private AclAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AclAction() { + forwardAction_ = 0; + logAction_ = 0; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclAction_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclAction.class, acl.Acl.AclAction.Builder.class); + } + + public static final int FORWARD_ACTION_FIELD_NUMBER = 1; + + private int forwardAction_; + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return The enum numeric value on the wire for forwardAction. + */ + @java.lang.Override + public int getForwardActionValue() { + return forwardAction_; + } + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return The forwardAction. + */ + @java.lang.Override + public acl.Acl.AclForwardActionEnum getForwardAction() { + @SuppressWarnings("deprecation") + acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.valueOf(forwardAction_); + return result == null ? acl.Acl.AclForwardActionEnum.UNRECOGNIZED : result; + } + + public static final int LOG_ACTION_FIELD_NUMBER = 2; + + private int logAction_; + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return The enum numeric value on the wire for logAction. + */ + @java.lang.Override + public int getLogActionValue() { + return logAction_; + } + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return The logAction. + */ + @java.lang.Override + public acl.Acl.AclLogActionEnum getLogAction() { + @SuppressWarnings("deprecation") + acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.valueOf(logAction_); + return result == null ? acl.Acl.AclLogActionEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (forwardAction_ != acl.Acl.AclForwardActionEnum.ACLFORWARDINGACTION_UNDEFINED.getNumber()) { + output.writeEnum(1, forwardAction_); + } + if (logAction_ != acl.Acl.AclLogActionEnum.ACLLOGACTION_UNDEFINED.getNumber()) { + output.writeEnum(2, logAction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (forwardAction_ != acl.Acl.AclForwardActionEnum.ACLFORWARDINGACTION_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, forwardAction_); + } + if (logAction_ != acl.Acl.AclLogActionEnum.ACLLOGACTION_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, logAction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof acl.Acl.AclAction)) { + return super.equals(obj); + } + acl.Acl.AclAction other = (acl.Acl.AclAction) obj; + if (forwardAction_ != other.forwardAction_) + return false; + if (logAction_ != other.logAction_) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FORWARD_ACTION_FIELD_NUMBER; + hash = (53 * hash) + forwardAction_; + hash = (37 * hash) + LOG_ACTION_FIELD_NUMBER; + hash = (53 * hash) + logAction_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static acl.Acl.AclAction parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclAction parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclAction parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclAction parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclAction parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclAction parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclAction parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclAction parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclAction parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static acl.Acl.AclAction parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclAction parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclAction parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(acl.Acl.AclAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code acl.AclAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:acl.AclAction) + acl.Acl.AclActionOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return acl.Acl.internal_static_acl_AclAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclAction_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclAction.class, acl.Acl.AclAction.Builder.class); + } + + // 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(); + forwardAction_ = 0; + logAction_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return acl.Acl.internal_static_acl_AclAction_descriptor; + } + + @java.lang.Override + public acl.Acl.AclAction getDefaultInstanceForType() { + return acl.Acl.AclAction.getDefaultInstance(); + } + + @java.lang.Override + public acl.Acl.AclAction build() { + acl.Acl.AclAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public acl.Acl.AclAction buildPartial() { + acl.Acl.AclAction result = new acl.Acl.AclAction(this); + result.forwardAction_ = forwardAction_; + result.logAction_ = logAction_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof acl.Acl.AclAction) { + return mergeFrom((acl.Acl.AclAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(acl.Acl.AclAction other) { + if (other == acl.Acl.AclAction.getDefaultInstance()) + return this; + if (other.forwardAction_ != 0) { + setForwardActionValue(other.getForwardActionValue()); + } + if (other.logAction_ != 0) { + setLogActionValue(other.getLogActionValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (acl.Acl.AclAction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int forwardAction_ = 0; + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return The enum numeric value on the wire for forwardAction. + */ + @java.lang.Override + public int getForwardActionValue() { + return forwardAction_; + } + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @param value The enum numeric value on the wire for forwardAction to set. + * @return This builder for chaining. + */ + public Builder setForwardActionValue(int value) { + forwardAction_ = value; + onChanged(); + return this; + } + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return The forwardAction. + */ + @java.lang.Override + public acl.Acl.AclForwardActionEnum getForwardAction() { + @SuppressWarnings("deprecation") + acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.valueOf(forwardAction_); + return result == null ? acl.Acl.AclForwardActionEnum.UNRECOGNIZED : result; + } + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @param value The forwardAction to set. + * @return This builder for chaining. + */ + public Builder setForwardAction(acl.Acl.AclForwardActionEnum value) { + if (value == null) { + throw new NullPointerException(); + } + forwardAction_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .acl.AclForwardActionEnum forward_action = 1; + * @return This builder for chaining. + */ + public Builder clearForwardAction() { + forwardAction_ = 0; + onChanged(); + return this; + } + + private int logAction_ = 0; + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return The enum numeric value on the wire for logAction. + */ + @java.lang.Override + public int getLogActionValue() { + return logAction_; + } + + /** + * .acl.AclLogActionEnum log_action = 2; + * @param value The enum numeric value on the wire for logAction to set. + * @return This builder for chaining. + */ + public Builder setLogActionValue(int value) { + logAction_ = value; + onChanged(); + return this; + } + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return The logAction. + */ + @java.lang.Override + public acl.Acl.AclLogActionEnum getLogAction() { + @SuppressWarnings("deprecation") + acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.valueOf(logAction_); + return result == null ? acl.Acl.AclLogActionEnum.UNRECOGNIZED : result; + } + + /** + * .acl.AclLogActionEnum log_action = 2; + * @param value The logAction to set. + * @return This builder for chaining. + */ + public Builder setLogAction(acl.Acl.AclLogActionEnum value) { + if (value == null) { + throw new NullPointerException(); + } + logAction_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .acl.AclLogActionEnum log_action = 2; + * @return This builder for chaining. + */ + public Builder clearLogAction() { + logAction_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:acl.AclAction) + } + + // @@protoc_insertion_point(class_scope:acl.AclAction) + private static final acl.Acl.AclAction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new acl.Acl.AclAction(); + } + + public static acl.Acl.AclAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public acl.Acl.AclAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - private AclAction() { - forwardAction_ = 0; - logAction_ = 0; + + public interface AclEntryOrBuilder extends // @@protoc_insertion_point(interface_extends:acl.AclEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 sequence_id = 1; + * @return The sequenceId. + */ + int getSequenceId(); + + /** + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + + /** + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * .acl.AclMatch match = 3; + * @return Whether the match field is set. + */ + boolean hasMatch(); + + /** + * .acl.AclMatch match = 3; + * @return The match. + */ + acl.Acl.AclMatch getMatch(); + + /** + * .acl.AclMatch match = 3; + */ + acl.Acl.AclMatchOrBuilder getMatchOrBuilder(); + + /** + * .acl.AclAction action = 4; + * @return Whether the action field is set. + */ + boolean hasAction(); + + /** + * .acl.AclAction action = 4; + * @return The action. + */ + acl.Acl.AclAction getAction(); + + /** + * .acl.AclAction action = 4; + */ + acl.Acl.AclActionOrBuilder getActionOrBuilder(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AclAction(); - } + /** + * Protobuf type {@code acl.AclEntry} + */ + public static final class AclEntry extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:acl.AclEntry) + AclEntryOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use AclEntry.newBuilder() to construct. + private AclEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AclEntry() { + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclEntry_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclEntry.class, acl.Acl.AclEntry.Builder.class); + } + + public static final int SEQUENCE_ID_FIELD_NUMBER = 1; + + private int sequenceId_; + + /** + * uint32 sequence_id = 1; + * @return The sequenceId. + */ + @java.lang.Override + public int getSequenceId() { + return sequenceId_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + private volatile java.lang.Object description_; + + /** + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCH_FIELD_NUMBER = 3; + + private acl.Acl.AclMatch match_; + + /** + * .acl.AclMatch match = 3; + * @return Whether the match field is set. + */ + @java.lang.Override + public boolean hasMatch() { + return match_ != null; + } + + /** + * .acl.AclMatch match = 3; + * @return The match. + */ + @java.lang.Override + public acl.Acl.AclMatch getMatch() { + return match_ == null ? acl.Acl.AclMatch.getDefaultInstance() : match_; + } + + /** + * .acl.AclMatch match = 3; + */ + @java.lang.Override + public acl.Acl.AclMatchOrBuilder getMatchOrBuilder() { + return getMatch(); + } + + public static final int ACTION_FIELD_NUMBER = 4; + + private acl.Acl.AclAction action_; + + /** + * .acl.AclAction action = 4; + * @return Whether the action field is set. + */ + @java.lang.Override + public boolean hasAction() { + return action_ != null; + } + + /** + * .acl.AclAction action = 4; + * @return The action. + */ + @java.lang.Override + public acl.Acl.AclAction getAction() { + return action_ == null ? acl.Acl.AclAction.getDefaultInstance() : action_; + } + + /** + * .acl.AclAction action = 4; + */ + @java.lang.Override + public acl.Acl.AclActionOrBuilder getActionOrBuilder() { + return getAction(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sequenceId_ != 0) { + output.writeUInt32(1, sequenceId_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (match_ != null) { + output.writeMessage(3, getMatch()); + } + if (action_ != null) { + output.writeMessage(4, getAction()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (sequenceId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(1, sequenceId_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (match_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMatch()); + } + if (action_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAction()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof acl.Acl.AclEntry)) { + return super.equals(obj); + } + acl.Acl.AclEntry other = (acl.Acl.AclEntry) obj; + if (getSequenceId() != other.getSequenceId()) + return false; + if (!getDescription().equals(other.getDescription())) + return false; + if (hasMatch() != other.hasMatch()) + return false; + if (hasMatch()) { + if (!getMatch().equals(other.getMatch())) + return false; + } + if (hasAction() != other.hasAction()) + return false; + if (hasAction()) { + if (!getAction().equals(other.getAction())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SEQUENCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSequenceId(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasMatch()) { + hash = (37 * hash) + MATCH_FIELD_NUMBER; + hash = (53 * hash) + getMatch().hashCode(); + } + if (hasAction()) { + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static acl.Acl.AclEntry parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclEntry parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclEntry parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclEntry parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclEntry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclEntry parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclEntry parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclEntry parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclEntry parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static acl.Acl.AclEntry parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclEntry parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclEntry parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(acl.Acl.AclEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code acl.AclEntry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:acl.AclEntry) + acl.Acl.AclEntryOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return acl.Acl.internal_static_acl_AclEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclEntry_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclEntry.class, acl.Acl.AclEntry.Builder.class); + } + + // 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(); + sequenceId_ = 0; + description_ = ""; + if (matchBuilder_ == null) { + match_ = null; + } else { + match_ = null; + matchBuilder_ = null; + } + if (actionBuilder_ == null) { + action_ = null; + } else { + action_ = null; + actionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return acl.Acl.internal_static_acl_AclEntry_descriptor; + } + + @java.lang.Override + public acl.Acl.AclEntry getDefaultInstanceForType() { + return acl.Acl.AclEntry.getDefaultInstance(); + } + + @java.lang.Override + public acl.Acl.AclEntry build() { + acl.Acl.AclEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof acl.Acl.AclEntry) { + return mergeFrom((acl.Acl.AclEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(acl.Acl.AclEntry other) { + if (other == acl.Acl.AclEntry.getDefaultInstance()) + return this; + if (other.getSequenceId() != 0) { + setSequenceId(other.getSequenceId()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasMatch()) { + mergeMatch(other.getMatch()); + } + if (other.hasAction()) { + mergeAction(other.getAction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (acl.Acl.AclEntry) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sequenceId_; + + /** + * uint32 sequence_id = 1; + * @return The sequenceId. + */ + @java.lang.Override + public int getSequenceId() { + return sequenceId_; + } + + /** + * uint32 sequence_id = 1; + * @param value The sequenceId to set. + * @return This builder for chaining. + */ + public Builder setSequenceId(int value) { + sequenceId_ = value; + onChanged(); + return this; + } - @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; - } + /** + * uint32 sequence_id = 1; + * @return This builder for chaining. + */ + public Builder clearSequenceId() { + sequenceId_ = 0; + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclAction.class, acl.Acl.AclAction.Builder.class); - } + private java.lang.Object description_ = ""; + + /** + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static final int FORWARD_ACTION_FIELD_NUMBER = 1; - private int forwardAction_; - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return The enum numeric value on the wire for forwardAction. - */ - @java.lang.Override public int getForwardActionValue() { - return forwardAction_; - } - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return The forwardAction. - */ - @java.lang.Override public acl.Acl.AclForwardActionEnum getForwardAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.valueOf(forwardAction_); - return result == null ? acl.Acl.AclForwardActionEnum.UNRECOGNIZED : result; + /** + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + onChanged(); + return this; + } + + /** + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + + /** + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + onChanged(); + return this; + } + + private acl.Acl.AclMatch match_; + + private com.google.protobuf.SingleFieldBuilderV3 matchBuilder_; + + /** + * .acl.AclMatch match = 3; + * @return Whether the match field is set. + */ + public boolean hasMatch() { + return matchBuilder_ != null || match_ != null; + } + + /** + * .acl.AclMatch match = 3; + * @return The match. + */ + public acl.Acl.AclMatch getMatch() { + if (matchBuilder_ == null) { + return match_ == null ? acl.Acl.AclMatch.getDefaultInstance() : match_; + } else { + return matchBuilder_.getMessage(); + } + } + + /** + * .acl.AclMatch match = 3; + */ + public Builder setMatch(acl.Acl.AclMatch value) { + if (matchBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + match_ = value; + onChanged(); + } else { + matchBuilder_.setMessage(value); + } + return this; + } + + /** + * .acl.AclMatch match = 3; + */ + public Builder setMatch(acl.Acl.AclMatch.Builder builderForValue) { + if (matchBuilder_ == null) { + match_ = builderForValue.build(); + onChanged(); + } else { + matchBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .acl.AclMatch match = 3; + */ + public Builder mergeMatch(acl.Acl.AclMatch value) { + if (matchBuilder_ == null) { + if (match_ != null) { + match_ = acl.Acl.AclMatch.newBuilder(match_).mergeFrom(value).buildPartial(); + } else { + match_ = value; + } + onChanged(); + } else { + matchBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .acl.AclMatch match = 3; + */ + public Builder clearMatch() { + if (matchBuilder_ == null) { + match_ = null; + onChanged(); + } else { + match_ = null; + matchBuilder_ = null; + } + return this; + } + + /** + * .acl.AclMatch match = 3; + */ + public acl.Acl.AclMatch.Builder getMatchBuilder() { + onChanged(); + return getMatchFieldBuilder().getBuilder(); + } + + /** + * .acl.AclMatch match = 3; + */ + public acl.Acl.AclMatchOrBuilder getMatchOrBuilder() { + if (matchBuilder_ != null) { + return matchBuilder_.getMessageOrBuilder(); + } else { + return match_ == null ? acl.Acl.AclMatch.getDefaultInstance() : match_; + } + } + + /** + * .acl.AclMatch match = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getMatchFieldBuilder() { + if (matchBuilder_ == null) { + matchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getMatch(), getParentForChildren(), isClean()); + match_ = null; + } + return matchBuilder_; + } + + private acl.Acl.AclAction action_; + + private com.google.protobuf.SingleFieldBuilderV3 actionBuilder_; + + /** + * .acl.AclAction action = 4; + * @return Whether the action field is set. + */ + public boolean hasAction() { + return actionBuilder_ != null || action_ != null; + } + + /** + * .acl.AclAction action = 4; + * @return The action. + */ + public acl.Acl.AclAction getAction() { + if (actionBuilder_ == null) { + return action_ == null ? acl.Acl.AclAction.getDefaultInstance() : action_; + } else { + return actionBuilder_.getMessage(); + } + } + + /** + * .acl.AclAction action = 4; + */ + public Builder setAction(acl.Acl.AclAction value) { + if (actionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + actionBuilder_.setMessage(value); + } + return this; + } + + /** + * .acl.AclAction action = 4; + */ + public Builder setAction(acl.Acl.AclAction.Builder builderForValue) { + if (actionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + actionBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .acl.AclAction action = 4; + */ + public Builder mergeAction(acl.Acl.AclAction value) { + if (actionBuilder_ == null) { + if (action_ != null) { + action_ = acl.Acl.AclAction.newBuilder(action_).mergeFrom(value).buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + actionBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .acl.AclAction action = 4; + */ + public Builder clearAction() { + if (actionBuilder_ == null) { + action_ = null; + onChanged(); + } else { + action_ = null; + actionBuilder_ = null; + } + return this; + } + + /** + * .acl.AclAction action = 4; + */ + public acl.Acl.AclAction.Builder getActionBuilder() { + onChanged(); + return getActionFieldBuilder().getBuilder(); + } + + /** + * .acl.AclAction action = 4; + */ + public acl.Acl.AclActionOrBuilder getActionOrBuilder() { + if (actionBuilder_ != null) { + return actionBuilder_.getMessageOrBuilder(); + } else { + return action_ == null ? acl.Acl.AclAction.getDefaultInstance() : action_; + } + } + + /** + * .acl.AclAction action = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getActionFieldBuilder() { + if (actionBuilder_ == null) { + actionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getAction(), getParentForChildren(), isClean()); + action_ = null; + } + return actionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:acl.AclEntry) + } + + // @@protoc_insertion_point(class_scope:acl.AclEntry) + private static final acl.Acl.AclEntry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new acl.Acl.AclEntry(); + } + + public static acl.Acl.AclEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public acl.Acl.AclEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static final int LOG_ACTION_FIELD_NUMBER = 2; - private int logAction_; - /** - * .acl.AclLogActionEnum log_action = 2; - * @return The enum numeric value on the wire for logAction. - */ - @java.lang.Override public int getLogActionValue() { - return logAction_; + public interface AclRuleSetOrBuilder extends // @@protoc_insertion_point(interface_extends:acl.AclRuleSet) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * .acl.AclRuleTypeEnum type = 2; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * .acl.AclRuleTypeEnum type = 2; + * @return The type. + */ + acl.Acl.AclRuleTypeEnum getType(); + + /** + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + + /** + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * string user_id = 4; + * @return The userId. + */ + java.lang.String getUserId(); + + /** + * string user_id = 4; + * @return The bytes for userId. + */ + com.google.protobuf.ByteString getUserIdBytes(); + + /** + * repeated .acl.AclEntry entries = 5; + */ + java.util.List getEntriesList(); + + /** + * repeated .acl.AclEntry entries = 5; + */ + acl.Acl.AclEntry getEntries(int index); + + /** + * repeated .acl.AclEntry entries = 5; + */ + int getEntriesCount(); + + /** + * repeated .acl.AclEntry entries = 5; + */ + java.util.List getEntriesOrBuilderList(); + + /** + * repeated .acl.AclEntry entries = 5; + */ + acl.Acl.AclEntryOrBuilder getEntriesOrBuilder(int index); } + /** - * .acl.AclLogActionEnum log_action = 2; - * @return The logAction. + * Protobuf type {@code acl.AclRuleSet} */ - @java.lang.Override public acl.Acl.AclLogActionEnum getLogAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.valueOf(logAction_); - return result == null ? acl.Acl.AclLogActionEnum.UNRECOGNIZED : result; - } + public static final class AclRuleSet extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:acl.AclRuleSet) + AclRuleSetOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use AclRuleSet.newBuilder() to construct. + private AclRuleSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (forwardAction_ != acl.Acl.AclForwardActionEnum.ACLFORWARDINGACTION_UNDEFINED.getNumber()) { - output.writeEnum(1, forwardAction_); - } - if (logAction_ != acl.Acl.AclLogActionEnum.ACLLOGACTION_UNDEFINED.getNumber()) { - output.writeEnum(2, logAction_); - } - unknownFields.writeTo(output); - } + private AclRuleSet() { + name_ = ""; + type_ = 0; + description_ = ""; + userId_ = ""; + entries_ = java.util.Collections.emptyList(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (forwardAction_ != acl.Acl.AclForwardActionEnum.ACLFORWARDINGACTION_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, forwardAction_); - } - if (logAction_ != acl.Acl.AclLogActionEnum.ACLLOGACTION_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, logAction_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AclRuleSet(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof acl.Acl.AclAction)) { - return super.equals(obj); - } - acl.Acl.AclAction other = (acl.Acl.AclAction) obj; - - if (forwardAction_ != other.forwardAction_) return false; - if (logAction_ != other.logAction_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FORWARD_ACTION_FIELD_NUMBER; - hash = (53 * hash) + forwardAction_; - hash = (37 * hash) + LOG_ACTION_FIELD_NUMBER; - hash = (53 * hash) + logAction_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + 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(); + 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 acl.Acl.AclAction parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclAction parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclAction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclAction parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclAction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclAction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclAction parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclAction parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclAction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static acl.Acl.AclAction parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclAction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclAction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return acl.Acl.internal_static_acl_AclRuleSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclRuleSet_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclRuleSet.class, acl.Acl.AclRuleSet.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + private volatile java.lang.Object name_; + + /** + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + + private int type_; + + /** + * .acl.AclRuleTypeEnum type = 2; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * .acl.AclRuleTypeEnum type = 2; + * @return The type. + */ + @java.lang.Override + public acl.Acl.AclRuleTypeEnum getType() { + @SuppressWarnings("deprecation") + acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.valueOf(type_); + return result == null ? acl.Acl.AclRuleTypeEnum.UNRECOGNIZED : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + private volatile java.lang.Object description_; + + /** + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_ID_FIELD_NUMBER = 4; + + private volatile java.lang.Object userId_; + + /** + * string user_id = 4; + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + 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(); + userId_ = s; + return s; + } + } + + /** + * string user_id = 4; + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTRIES_FIELD_NUMBER = 5; + + private java.util.List entries_; + + /** + * repeated .acl.AclEntry entries = 5; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + + /** + * repeated .acl.AclEntry entries = 5; + */ + @java.lang.Override + public java.util.List getEntriesOrBuilderList() { + return entries_; + } + + /** + * repeated .acl.AclEntry entries = 5; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + + /** + * repeated .acl.AclEntry entries = 5; + */ + @java.lang.Override + public acl.Acl.AclEntry getEntries(int index) { + return entries_.get(index); + } + + /** + * repeated .acl.AclEntry entries = 5; + */ + @java.lang.Override + public acl.Acl.AclEntryOrBuilder getEntriesOrBuilder(int index) { + return entries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ != acl.Acl.AclRuleTypeEnum.ACLRULETYPE_UNDEFINED.getNumber()) { + output.writeEnum(2, type_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (!getUserIdBytes().isEmpty()) { + 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); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getNameBytes().isEmpty()) { + 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()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (!getUserIdBytes().isEmpty()) { + 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(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof acl.Acl.AclRuleSet)) { + return super.equals(obj); + } + acl.Acl.AclRuleSet other = (acl.Acl.AclRuleSet) obj; + if (!getName().equals(other.getName())) + return false; + if (type_ != other.type_) + return false; + if (!getDescription().equals(other.getDescription())) + return false; + if (!getUserId().equals(other.getUserId())) + return false; + if (!getEntriesList().equals(other.getEntriesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static acl.Acl.AclRuleSet parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclRuleSet parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclRuleSet parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclRuleSet parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclRuleSet parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static acl.Acl.AclRuleSet parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static acl.Acl.AclRuleSet parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclRuleSet parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclRuleSet parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static acl.Acl.AclRuleSet parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static acl.Acl.AclRuleSet parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static acl.Acl.AclRuleSet parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(acl.Acl.AclRuleSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code acl.AclRuleSet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:acl.AclRuleSet) + acl.Acl.AclRuleSetOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return acl.Acl.internal_static_acl_AclRuleSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return acl.Acl.internal_static_acl_AclRuleSet_fieldAccessorTable.ensureFieldAccessorsInitialized(acl.Acl.AclRuleSet.class, acl.Acl.AclRuleSet.Builder.class); + } + + // 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(); + name_ = ""; + type_ = 0; + description_ = ""; + userId_ = ""; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + entriesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return acl.Acl.internal_static_acl_AclRuleSet_descriptor; + } + + @java.lang.Override + public acl.Acl.AclRuleSet getDefaultInstanceForType() { + return acl.Acl.AclRuleSet.getDefaultInstance(); + } + + @java.lang.Override + public acl.Acl.AclRuleSet build() { + acl.Acl.AclRuleSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof acl.Acl.AclRuleSet) { + return mergeFrom((acl.Acl.AclRuleSet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(acl.Acl.AclRuleSet other) { + if (other == acl.Acl.AclRuleSet.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getUserId().isEmpty()) { + userId_ = other.userId_; + onChanged(); + } + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEntriesFieldBuilder() : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(acl.Acl.AclAction prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code acl.AclAction} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:acl.AclAction) - acl.Acl.AclActionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return acl.Acl.internal_static_acl_AclAction_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclAction.class, acl.Acl.AclAction.Builder.class); - } - - // 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(); - forwardAction_ = 0; - - logAction_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return acl.Acl.internal_static_acl_AclAction_descriptor; - } - - @java.lang.Override - public acl.Acl.AclAction getDefaultInstanceForType() { - return acl.Acl.AclAction.getDefaultInstance(); - } - - @java.lang.Override - public acl.Acl.AclAction build() { - acl.Acl.AclAction result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public acl.Acl.AclAction buildPartial() { - acl.Acl.AclAction result = new acl.Acl.AclAction(this); - result.forwardAction_ = forwardAction_; - result.logAction_ = logAction_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof acl.Acl.AclAction) { - return mergeFrom((acl.Acl.AclAction)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(acl.Acl.AclAction other) { - if (other == acl.Acl.AclAction.getDefaultInstance()) return this; - if (other.forwardAction_ != 0) { - setForwardActionValue(other.getForwardActionValue()); - } - if (other.logAction_ != 0) { - setLogActionValue(other.getLogActionValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclAction) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int forwardAction_ = 0; - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return The enum numeric value on the wire for forwardAction. - */ - @java.lang.Override public int getForwardActionValue() { - return forwardAction_; - } - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @param value The enum numeric value on the wire for forwardAction to set. - * @return This builder for chaining. - */ - public Builder setForwardActionValue(int value) { - - forwardAction_ = value; - onChanged(); - return this; - } - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return The forwardAction. - */ - @java.lang.Override - public acl.Acl.AclForwardActionEnum getForwardAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.valueOf(forwardAction_); - return result == null ? acl.Acl.AclForwardActionEnum.UNRECOGNIZED : result; - } - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @param value The forwardAction to set. - * @return This builder for chaining. - */ - public Builder setForwardAction(acl.Acl.AclForwardActionEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - forwardAction_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .acl.AclForwardActionEnum forward_action = 1; - * @return This builder for chaining. - */ - public Builder clearForwardAction() { - - forwardAction_ = 0; - onChanged(); - return this; - } - - private int logAction_ = 0; - /** - * .acl.AclLogActionEnum log_action = 2; - * @return The enum numeric value on the wire for logAction. - */ - @java.lang.Override public int getLogActionValue() { - return logAction_; - } - /** - * .acl.AclLogActionEnum log_action = 2; - * @param value The enum numeric value on the wire for logAction to set. - * @return This builder for chaining. - */ - public Builder setLogActionValue(int value) { - - logAction_ = value; - onChanged(); - return this; - } - /** - * .acl.AclLogActionEnum log_action = 2; - * @return The logAction. - */ - @java.lang.Override - public acl.Acl.AclLogActionEnum getLogAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.valueOf(logAction_); - return result == null ? acl.Acl.AclLogActionEnum.UNRECOGNIZED : result; - } - /** - * .acl.AclLogActionEnum log_action = 2; - * @param value The logAction to set. - * @return This builder for chaining. - */ - public Builder setLogAction(acl.Acl.AclLogActionEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - logAction_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .acl.AclLogActionEnum log_action = 2; - * @return This builder for chaining. - */ - public Builder clearLogAction() { - - logAction_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:acl.AclAction) - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (acl.Acl.AclRuleSet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - // @@protoc_insertion_point(class_scope:acl.AclAction) - private static final acl.Acl.AclAction DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new acl.Acl.AclAction(); - } + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static acl.Acl.AclAction getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } - @java.lang.Override - public acl.Acl.AclAction getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } - } + private int type_ = 0; - public interface AclEntryOrBuilder extends - // @@protoc_insertion_point(interface_extends:acl.AclEntry) - com.google.protobuf.MessageOrBuilder { + /** + * .acl.AclRuleTypeEnum type = 2; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } - /** - * uint32 sequence_id = 1; - * @return The sequenceId. - */ - int getSequenceId(); + /** + * .acl.AclRuleTypeEnum type = 2; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + onChanged(); + return this; + } - /** - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); + /** + * .acl.AclRuleTypeEnum type = 2; + * @return The type. + */ + @java.lang.Override + public acl.Acl.AclRuleTypeEnum getType() { + @SuppressWarnings("deprecation") + acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.valueOf(type_); + return result == null ? acl.Acl.AclRuleTypeEnum.UNRECOGNIZED : result; + } - /** - * .acl.AclMatch match = 3; - * @return Whether the match field is set. - */ - boolean hasMatch(); - /** - * .acl.AclMatch match = 3; - * @return The match. - */ - acl.Acl.AclMatch getMatch(); - /** - * .acl.AclMatch match = 3; - */ - acl.Acl.AclMatchOrBuilder getMatchOrBuilder(); + /** + * .acl.AclRuleTypeEnum type = 2; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(acl.Acl.AclRuleTypeEnum value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value.getNumber(); + onChanged(); + return this; + } - /** - * .acl.AclAction action = 4; - * @return Whether the action field is set. - */ - boolean hasAction(); - /** - * .acl.AclAction action = 4; - * @return The action. - */ - acl.Acl.AclAction getAction(); - /** - * .acl.AclAction action = 4; - */ - acl.Acl.AclActionOrBuilder getActionOrBuilder(); - } - /** - * Protobuf type {@code acl.AclEntry} - */ - public static final class AclEntry extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:acl.AclEntry) - AclEntryOrBuilder { - private static final long serialVersionUID = 0L; - // Use AclEntry.newBuilder() to construct. - private AclEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AclEntry() { - description_ = ""; - } + /** + * .acl.AclRuleTypeEnum type = 2; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = 0; + onChanged(); + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AclEntry(); - } + private java.lang.Object description_ = ""; + + /** + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @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; - } + /** + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclEntry_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclEntry.class, acl.Acl.AclEntry.Builder.class); - } + /** + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + onChanged(); + return this; + } - public static final int SEQUENCE_ID_FIELD_NUMBER = 1; - private int sequenceId_; - /** - * uint32 sequence_id = 1; - * @return The sequenceId. - */ - @java.lang.Override - public int getSequenceId() { - return sequenceId_; - } + /** + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - * string description = 2; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - /** - * string description = 2; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + onChanged(); + return this; + } - public static final int MATCH_FIELD_NUMBER = 3; - private acl.Acl.AclMatch match_; - /** - * .acl.AclMatch match = 3; - * @return Whether the match field is set. - */ - @java.lang.Override - public boolean hasMatch() { - return match_ != null; - } - /** - * .acl.AclMatch match = 3; - * @return The match. - */ - @java.lang.Override - public acl.Acl.AclMatch getMatch() { - return match_ == null ? acl.Acl.AclMatch.getDefaultInstance() : match_; - } - /** - * .acl.AclMatch match = 3; - */ - @java.lang.Override - public acl.Acl.AclMatchOrBuilder getMatchOrBuilder() { - return getMatch(); - } + private java.lang.Object userId_ = ""; + + /** + * string user_id = 4; + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = userId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static final int ACTION_FIELD_NUMBER = 4; - private acl.Acl.AclAction action_; - /** - * .acl.AclAction action = 4; - * @return Whether the action field is set. - */ - @java.lang.Override - public boolean hasAction() { - return action_ != null; - } - /** - * .acl.AclAction action = 4; - * @return The action. - */ - @java.lang.Override - public acl.Acl.AclAction getAction() { - return action_ == null ? acl.Acl.AclAction.getDefaultInstance() : action_; - } - /** - * .acl.AclAction action = 4; - */ - @java.lang.Override - public acl.Acl.AclActionOrBuilder getActionOrBuilder() { - return getAction(); - } + /** + * string user_id = 4; + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = userId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * string user_id = 4; + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userId_ = value; + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * string user_id = 4; + * @return This builder for chaining. + */ + public Builder clearUserId() { + userId_ = getDefaultInstance().getUserId(); + onChanged(); + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sequenceId_ != 0) { - output.writeUInt32(1, sequenceId_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (match_ != null) { - output.writeMessage(3, getMatch()); - } - if (action_ != null) { - output.writeMessage(4, getAction()); - } - unknownFields.writeTo(output); - } + /** + * string user_id = 4; + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userId_ = value; + onChanged(); + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sequenceId_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, sequenceId_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (match_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getMatch()); - } - if (action_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getAction()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private java.util.List entries_ = java.util.Collections.emptyList(); - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof acl.Acl.AclEntry)) { - return super.equals(obj); - } - acl.Acl.AclEntry other = (acl.Acl.AclEntry) obj; - - if (getSequenceId() - != other.getSequenceId()) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (hasMatch() != other.hasMatch()) return false; - if (hasMatch()) { - if (!getMatch() - .equals(other.getMatch())) return false; - } - if (hasAction() != other.hasAction()) return false; - if (hasAction()) { - if (!getAction() - .equals(other.getAction())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = new java.util.ArrayList(entries_); + bitField0_ |= 0x00000001; + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SEQUENCE_ID_FIELD_NUMBER; - hash = (53 * hash) + getSequenceId(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasMatch()) { - hash = (37 * hash) + MATCH_FIELD_NUMBER; - hash = (53 * hash) + getMatch().hashCode(); - } - if (hasAction()) { - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + getAction().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private com.google.protobuf.RepeatedFieldBuilderV3 entriesBuilder_; + + /** + * repeated .acl.AclEntry entries = 5; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } - public static acl.Acl.AclEntry parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclEntry parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclEntry parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclEntry parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclEntry parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclEntry parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclEntry parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclEntry parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclEntry parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static acl.Acl.AclEntry parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclEntry parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclEntry parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(acl.Acl.AclEntry prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public acl.Acl.AclEntry getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code acl.AclEntry} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:acl.AclEntry) - acl.Acl.AclEntryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return acl.Acl.internal_static_acl_AclEntry_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclEntry_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclEntry.class, acl.Acl.AclEntry.Builder.class); - } - - // 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(); - sequenceId_ = 0; - - description_ = ""; - - if (matchBuilder_ == null) { - match_ = null; - } else { - match_ = null; - matchBuilder_ = null; - } - if (actionBuilder_ == null) { - action_ = null; - } else { - action_ = null; - actionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return acl.Acl.internal_static_acl_AclEntry_descriptor; - } - - @java.lang.Override - public acl.Acl.AclEntry getDefaultInstanceForType() { - return acl.Acl.AclEntry.getDefaultInstance(); - } - - @java.lang.Override - public acl.Acl.AclEntry build() { - acl.Acl.AclEntry result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof acl.Acl.AclEntry) { - return mergeFrom((acl.Acl.AclEntry)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(acl.Acl.AclEntry other) { - if (other == acl.Acl.AclEntry.getDefaultInstance()) return this; - if (other.getSequenceId() != 0) { - setSequenceId(other.getSequenceId()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasMatch()) { - mergeMatch(other.getMatch()); - } - if (other.hasAction()) { - mergeAction(other.getAction()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclEntry) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int sequenceId_ ; - /** - * uint32 sequence_id = 1; - * @return The sequenceId. - */ - @java.lang.Override - public int getSequenceId() { - return sequenceId_; - } - /** - * uint32 sequence_id = 1; - * @param value The sequenceId to set. - * @return This builder for chaining. - */ - public Builder setSequenceId(int value) { - - sequenceId_ = value; - onChanged(); - return this; - } - /** - * uint32 sequence_id = 1; - * @return This builder for chaining. - */ - public Builder clearSequenceId() { - - sequenceId_ = 0; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * string description = 2; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string description = 2; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string description = 2; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * string description = 2; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private acl.Acl.AclMatch match_; - private com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclMatch, acl.Acl.AclMatch.Builder, acl.Acl.AclMatchOrBuilder> matchBuilder_; - /** - * .acl.AclMatch match = 3; - * @return Whether the match field is set. - */ - public boolean hasMatch() { - return matchBuilder_ != null || match_ != null; - } - /** - * .acl.AclMatch match = 3; - * @return The match. - */ - public acl.Acl.AclMatch getMatch() { - if (matchBuilder_ == null) { - return match_ == null ? acl.Acl.AclMatch.getDefaultInstance() : match_; - } else { - return matchBuilder_.getMessage(); - } - } - /** - * .acl.AclMatch match = 3; - */ - public Builder setMatch(acl.Acl.AclMatch value) { - if (matchBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - match_ = value; - onChanged(); - } else { - matchBuilder_.setMessage(value); - } - - return this; - } - /** - * .acl.AclMatch match = 3; - */ - public Builder setMatch( - acl.Acl.AclMatch.Builder builderForValue) { - if (matchBuilder_ == null) { - match_ = builderForValue.build(); - onChanged(); - } else { - matchBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .acl.AclMatch match = 3; - */ - public Builder mergeMatch(acl.Acl.AclMatch value) { - if (matchBuilder_ == null) { - if (match_ != null) { - match_ = - acl.Acl.AclMatch.newBuilder(match_).mergeFrom(value).buildPartial(); - } else { - match_ = value; - } - onChanged(); - } else { - matchBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .acl.AclMatch match = 3; - */ - public Builder clearMatch() { - if (matchBuilder_ == null) { - match_ = null; - onChanged(); - } else { - match_ = null; - matchBuilder_ = null; - } - - return this; - } - /** - * .acl.AclMatch match = 3; - */ - public acl.Acl.AclMatch.Builder getMatchBuilder() { - - onChanged(); - return getMatchFieldBuilder().getBuilder(); - } - /** - * .acl.AclMatch match = 3; - */ - public acl.Acl.AclMatchOrBuilder getMatchOrBuilder() { - if (matchBuilder_ != null) { - return matchBuilder_.getMessageOrBuilder(); - } else { - return match_ == null ? - acl.Acl.AclMatch.getDefaultInstance() : match_; - } - } - /** - * .acl.AclMatch match = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclMatch, acl.Acl.AclMatch.Builder, acl.Acl.AclMatchOrBuilder> - getMatchFieldBuilder() { - if (matchBuilder_ == null) { - matchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclMatch, acl.Acl.AclMatch.Builder, acl.Acl.AclMatchOrBuilder>( - getMatch(), - getParentForChildren(), - isClean()); - match_ = null; - } - return matchBuilder_; - } - - private acl.Acl.AclAction action_; - private com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclAction, acl.Acl.AclAction.Builder, acl.Acl.AclActionOrBuilder> actionBuilder_; - /** - * .acl.AclAction action = 4; - * @return Whether the action field is set. - */ - public boolean hasAction() { - return actionBuilder_ != null || action_ != null; - } - /** - * .acl.AclAction action = 4; - * @return The action. - */ - public acl.Acl.AclAction getAction() { - if (actionBuilder_ == null) { - return action_ == null ? acl.Acl.AclAction.getDefaultInstance() : action_; - } else { - return actionBuilder_.getMessage(); - } - } - /** - * .acl.AclAction action = 4; - */ - public Builder setAction(acl.Acl.AclAction value) { - if (actionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - onChanged(); - } else { - actionBuilder_.setMessage(value); - } - - return this; - } - /** - * .acl.AclAction action = 4; - */ - public Builder setAction( - acl.Acl.AclAction.Builder builderForValue) { - if (actionBuilder_ == null) { - action_ = builderForValue.build(); - onChanged(); - } else { - actionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .acl.AclAction action = 4; - */ - public Builder mergeAction(acl.Acl.AclAction value) { - if (actionBuilder_ == null) { - if (action_ != null) { - action_ = - acl.Acl.AclAction.newBuilder(action_).mergeFrom(value).buildPartial(); - } else { - action_ = value; - } - onChanged(); - } else { - actionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .acl.AclAction action = 4; - */ - public Builder clearAction() { - if (actionBuilder_ == null) { - action_ = null; - onChanged(); - } else { - action_ = null; - actionBuilder_ = null; - } - - return this; - } - /** - * .acl.AclAction action = 4; - */ - public acl.Acl.AclAction.Builder getActionBuilder() { - - onChanged(); - return getActionFieldBuilder().getBuilder(); - } - /** - * .acl.AclAction action = 4; - */ - public acl.Acl.AclActionOrBuilder getActionOrBuilder() { - if (actionBuilder_ != null) { - return actionBuilder_.getMessageOrBuilder(); - } else { - return action_ == null ? - acl.Acl.AclAction.getDefaultInstance() : action_; - } - } - /** - * .acl.AclAction action = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclAction, acl.Acl.AclAction.Builder, acl.Acl.AclActionOrBuilder> - getActionFieldBuilder() { - if (actionBuilder_ == null) { - actionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclAction, acl.Acl.AclAction.Builder, acl.Acl.AclActionOrBuilder>( - getAction(), - getParentForChildren(), - isClean()); - action_ = null; - } - return actionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:acl.AclEntry) - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder setEntries(int index, acl.Acl.AclEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } - // @@protoc_insertion_point(class_scope:acl.AclEntry) - private static final acl.Acl.AclEntry DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new acl.Acl.AclEntry(); - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder setEntries(int index, acl.Acl.AclEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - public static acl.Acl.AclEntry getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder addEntries(acl.Acl.AclEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder addEntries(int index, acl.Acl.AclEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder addEntries(acl.Acl.AclEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public acl.Acl.AclEntry getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder addEntries(int index, acl.Acl.AclEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder addAllEntries(java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } - public interface AclRuleSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:acl.AclRuleSet) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } - /** - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + /** + * repeated .acl.AclEntry entries = 5; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } - /** - * .acl.AclRuleTypeEnum type = 2; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * .acl.AclRuleTypeEnum type = 2; - * @return The type. - */ - acl.Acl.AclRuleTypeEnum getType(); + /** + * repeated .acl.AclEntry entries = 5; + */ + public acl.Acl.AclEntry.Builder getEntriesBuilder(int index) { + return getEntriesFieldBuilder().getBuilder(index); + } - /** - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); + /** + * repeated .acl.AclEntry entries = 5; + */ + public acl.Acl.AclEntryOrBuilder getEntriesOrBuilder(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } - /** - * string user_id = 4; - * @return The userId. - */ - java.lang.String getUserId(); - /** - * string user_id = 4; - * @return The bytes for userId. - */ - com.google.protobuf.ByteString - getUserIdBytes(); + /** + * repeated .acl.AclEntry entries = 5; + */ + public java.util.List getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } - /** - * repeated .acl.AclEntry entries = 5; - */ - java.util.List - getEntriesList(); - /** - * repeated .acl.AclEntry entries = 5; - */ - acl.Acl.AclEntry getEntries(int index); - /** - * repeated .acl.AclEntry entries = 5; - */ - int getEntriesCount(); - /** - * repeated .acl.AclEntry entries = 5; - */ - java.util.List - getEntriesOrBuilderList(); - /** - * repeated .acl.AclEntry entries = 5; - */ - acl.Acl.AclEntryOrBuilder getEntriesOrBuilder( - int index); - } - /** - * Protobuf type {@code acl.AclRuleSet} - */ - public static final class AclRuleSet extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:acl.AclRuleSet) - AclRuleSetOrBuilder { - private static final long serialVersionUID = 0L; - // Use AclRuleSet.newBuilder() to construct. - private AclRuleSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AclRuleSet() { - name_ = ""; - type_ = 0; - description_ = ""; - userId_ = ""; - entries_ = java.util.Collections.emptyList(); - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public acl.Acl.AclEntry.Builder addEntriesBuilder() { + return getEntriesFieldBuilder().addBuilder(acl.Acl.AclEntry.getDefaultInstance()); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AclRuleSet(); - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public acl.Acl.AclEntry.Builder addEntriesBuilder(int index) { + return getEntriesFieldBuilder().addBuilder(index, acl.Acl.AclEntry.getDefaultInstance()); + } - @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(); - 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; - } + /** + * repeated .acl.AclEntry entries = 5; + */ + public java.util.List getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclRuleSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclRuleSet.class, acl.Acl.AclRuleSet.Builder.class); - } + private com.google.protobuf.RepeatedFieldBuilderV3 getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public static final int TYPE_FIELD_NUMBER = 2; - private int type_; - /** - * .acl.AclRuleTypeEnum type = 2; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - * .acl.AclRuleTypeEnum type = 2; - * @return The type. - */ - @java.lang.Override public acl.Acl.AclRuleTypeEnum getType() { - @SuppressWarnings("deprecation") - acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.valueOf(type_); - return result == null ? acl.Acl.AclRuleTypeEnum.UNRECOGNIZED : result; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:acl.AclRuleSet) + } - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - /** - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + // @@protoc_insertion_point(class_scope:acl.AclRuleSet) + private static final acl.Acl.AclRuleSet DEFAULT_INSTANCE; - public static final int USER_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object userId_; - /** - * string user_id = 4; - * @return The userId. - */ - @java.lang.Override - public java.lang.String getUserId() { - java.lang.Object ref = userId_; - 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(); - userId_ = s; - return s; - } - } - /** - * string user_id = 4; - * @return The bytes for userId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUserIdBytes() { - java.lang.Object ref = userId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + static { + DEFAULT_INSTANCE = new acl.Acl.AclRuleSet(); + } - public static final int ENTRIES_FIELD_NUMBER = 5; - private java.util.List entries_; - /** - * repeated .acl.AclEntry entries = 5; - */ - @java.lang.Override - public java.util.List getEntriesList() { - return entries_; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - @java.lang.Override - public java.util.List - getEntriesOrBuilderList() { - return entries_; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - @java.lang.Override - public int getEntriesCount() { - return entries_.size(); - } - /** - * repeated .acl.AclEntry entries = 5; - */ - @java.lang.Override - public acl.Acl.AclEntry getEntries(int index) { - return entries_.get(index); - } - /** - * repeated .acl.AclEntry entries = 5; - */ - @java.lang.Override - public acl.Acl.AclEntryOrBuilder getEntriesOrBuilder( - int index) { - return entries_.get(index); - } + public static acl.Acl.AclRuleSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - memoizedIsInitialized = 1; - return true; - } + @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); + } + }; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (type_ != acl.Acl.AclRuleTypeEnum.ACLRULETYPE_UNDEFINED.getNumber()) { - output.writeEnum(2, type_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (!getUserIdBytes().isEmpty()) { - 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); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - 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()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (!getUserIdBytes().isEmpty()) { - 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(); - memoizedSize = size; - return size; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof acl.Acl.AclRuleSet)) { - return super.equals(obj); - } - acl.Acl.AclRuleSet other = (acl.Acl.AclRuleSet) obj; - - if (!getName() - .equals(other.getName())) return false; - if (type_ != other.type_) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getUserId() - .equals(other.getUserId())) return false; - if (!getEntriesList() - .equals(other.getEntriesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; + @java.lang.Override + public acl.Acl.AclRuleSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + USER_ID_FIELD_NUMBER; - hash = (53 * hash) + getUserId().hashCode(); - if (getEntriesCount() > 0) { - hash = (37 * hash) + ENTRIES_FIELD_NUMBER; - hash = (53 * hash) + getEntriesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_acl_AclMatch_descriptor; - public static acl.Acl.AclRuleSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclRuleSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclRuleSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclRuleSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclRuleSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static acl.Acl.AclRuleSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static acl.Acl.AclRuleSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclRuleSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclRuleSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static acl.Acl.AclRuleSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static acl.Acl.AclRuleSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static acl.Acl.AclRuleSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_acl_AclMatch_fieldAccessorTable; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(acl.Acl.AclRuleSet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_acl_AclAction_descriptor; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code acl.AclRuleSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:acl.AclRuleSet) - acl.Acl.AclRuleSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return acl.Acl.internal_static_acl_AclRuleSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return acl.Acl.internal_static_acl_AclRuleSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - acl.Acl.AclRuleSet.class, acl.Acl.AclRuleSet.Builder.class); - } - - // 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(); - name_ = ""; - - type_ = 0; - - description_ = ""; - - userId_ = ""; - - if (entriesBuilder_ == null) { - entries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - entriesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return acl.Acl.internal_static_acl_AclRuleSet_descriptor; - } - - @java.lang.Override - public acl.Acl.AclRuleSet getDefaultInstanceForType() { - return acl.Acl.AclRuleSet.getDefaultInstance(); - } - - @java.lang.Override - public acl.Acl.AclRuleSet build() { - acl.Acl.AclRuleSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - if (entriesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - entries_ = java.util.Collections.unmodifiableList(entries_); - bitField0_ = (bitField0_ & ~0x00000001); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof acl.Acl.AclRuleSet) { - return mergeFrom((acl.Acl.AclRuleSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(acl.Acl.AclRuleSet other) { - if (other == acl.Acl.AclRuleSet.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getUserId().isEmpty()) { - userId_ = other.userId_; - onChanged(); - } - if (entriesBuilder_ == null) { - if (!other.entries_.isEmpty()) { - if (entries_.isEmpty()) { - entries_ = other.entries_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureEntriesIsMutable(); - entries_.addAll(other.entries_); - } - onChanged(); - } - } else { - if (!other.entries_.isEmpty()) { - if (entriesBuilder_.isEmpty()) { - entriesBuilder_.dispose(); - entriesBuilder_ = null; - entries_ = other.entries_; - bitField0_ = (bitField0_ & ~0x00000001); - entriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEntriesFieldBuilder() : null; - } else { - entriesBuilder_.addAllMessages(other.entries_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclRuleSet) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int type_ = 0; - /** - * .acl.AclRuleTypeEnum type = 2; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - * .acl.AclRuleTypeEnum type = 2; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - * .acl.AclRuleTypeEnum type = 2; - * @return The type. - */ - @java.lang.Override - public acl.Acl.AclRuleTypeEnum getType() { - @SuppressWarnings("deprecation") - acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.valueOf(type_); - return result == null ? acl.Acl.AclRuleTypeEnum.UNRECOGNIZED : result; - } - /** - * .acl.AclRuleTypeEnum type = 2; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(acl.Acl.AclRuleTypeEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .acl.AclRuleTypeEnum type = 2; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.lang.Object userId_ = ""; - /** - * string user_id = 4; - * @return The userId. - */ - public java.lang.String getUserId() { - java.lang.Object ref = userId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - userId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string user_id = 4; - * @return The bytes for userId. - */ - public com.google.protobuf.ByteString - getUserIdBytes() { - java.lang.Object ref = userId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string user_id = 4; - * @param value The userId to set. - * @return This builder for chaining. - */ - public Builder setUserId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - userId_ = value; - onChanged(); - return this; - } - /** - * string user_id = 4; - * @return This builder for chaining. - */ - public Builder clearUserId() { - - userId_ = getDefaultInstance().getUserId(); - onChanged(); - return this; - } - /** - * string user_id = 4; - * @param value The bytes for userId to set. - * @return This builder for chaining. - */ - public Builder setUserIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - userId_ = value; - onChanged(); - return this; - } - - private java.util.List entries_ = - java.util.Collections.emptyList(); - private void ensureEntriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - entries_ = new java.util.ArrayList(entries_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - acl.Acl.AclEntry, acl.Acl.AclEntry.Builder, acl.Acl.AclEntryOrBuilder> entriesBuilder_; - - /** - * repeated .acl.AclEntry entries = 5; - */ - public java.util.List getEntriesList() { - if (entriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(entries_); - } else { - return entriesBuilder_.getMessageList(); - } - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public int getEntriesCount() { - if (entriesBuilder_ == null) { - return entries_.size(); - } else { - return entriesBuilder_.getCount(); - } - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public acl.Acl.AclEntry getEntries(int index) { - if (entriesBuilder_ == null) { - return entries_.get(index); - } else { - return entriesBuilder_.getMessage(index); - } - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder setEntries( - int index, acl.Acl.AclEntry value) { - if (entriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntriesIsMutable(); - entries_.set(index, value); - onChanged(); - } else { - entriesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder setEntries( - int index, acl.Acl.AclEntry.Builder builderForValue) { - if (entriesBuilder_ == null) { - ensureEntriesIsMutable(); - entries_.set(index, builderForValue.build()); - onChanged(); - } else { - entriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder addEntries(acl.Acl.AclEntry value) { - if (entriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntriesIsMutable(); - entries_.add(value); - onChanged(); - } else { - entriesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder addEntries( - int index, acl.Acl.AclEntry value) { - if (entriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEntriesIsMutable(); - entries_.add(index, value); - onChanged(); - } else { - entriesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder addEntries( - acl.Acl.AclEntry.Builder builderForValue) { - if (entriesBuilder_ == null) { - ensureEntriesIsMutable(); - entries_.add(builderForValue.build()); - onChanged(); - } else { - entriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder addEntries( - int index, acl.Acl.AclEntry.Builder builderForValue) { - if (entriesBuilder_ == null) { - ensureEntriesIsMutable(); - entries_.add(index, builderForValue.build()); - onChanged(); - } else { - entriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder addAllEntries( - java.lang.Iterable values) { - if (entriesBuilder_ == null) { - ensureEntriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, entries_); - onChanged(); - } else { - entriesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder clearEntries() { - if (entriesBuilder_ == null) { - entries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - entriesBuilder_.clear(); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public Builder removeEntries(int index) { - if (entriesBuilder_ == null) { - ensureEntriesIsMutable(); - entries_.remove(index); - onChanged(); - } else { - entriesBuilder_.remove(index); - } - return this; - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public acl.Acl.AclEntry.Builder getEntriesBuilder( - int index) { - return getEntriesFieldBuilder().getBuilder(index); - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public acl.Acl.AclEntryOrBuilder getEntriesOrBuilder( - int index) { - if (entriesBuilder_ == null) { - return entries_.get(index); } else { - return entriesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public java.util.List - getEntriesOrBuilderList() { - if (entriesBuilder_ != null) { - return entriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(entries_); - } - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public acl.Acl.AclEntry.Builder addEntriesBuilder() { - return getEntriesFieldBuilder().addBuilder( - acl.Acl.AclEntry.getDefaultInstance()); - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public acl.Acl.AclEntry.Builder addEntriesBuilder( - int index) { - return getEntriesFieldBuilder().addBuilder( - index, acl.Acl.AclEntry.getDefaultInstance()); - } - /** - * repeated .acl.AclEntry entries = 5; - */ - public java.util.List - getEntriesBuilderList() { - return getEntriesFieldBuilder().getBuilderList(); - } - 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()); - entries_ = null; - } - return entriesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:acl.AclRuleSet) - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_acl_AclAction_fieldAccessorTable; - // @@protoc_insertion_point(class_scope:acl.AclRuleSet) - private static final acl.Acl.AclRuleSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new acl.Acl.AclRuleSet(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_acl_AclEntry_descriptor; - public static acl.Acl.AclRuleSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_acl_AclEntry_fieldAccessorTable; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_acl_AclRuleSet_descriptor; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_acl_AclRuleSet_fieldAccessorTable; - @java.lang.Override - public acl.Acl.AclRuleSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_acl_AclMatch_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_acl_AclMatch_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_acl_AclAction_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_acl_AclAction_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_acl_AclEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_acl_AclEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_acl_AclRuleSet_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_acl_AclRuleSet_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - 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" - }; - 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_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); - internal_static_acl_AclEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_acl_AclEntry_descriptor, - new java.lang.String[] { "SequenceId", "Description", "Match", "Action", }); - internal_static_acl_AclRuleSet_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_acl_AclRuleSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_acl_AclRuleSet_descriptor, - new java.lang.String[] { "Name", "Type", "Description", "UserId", "Entries", }); - } - - // @@protoc_insertion_point(outer_class_scope) + 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" }; + 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_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); + internal_static_acl_AclEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_acl_AclEntry_descriptor, new java.lang.String[] { "SequenceId", "Description", "Match", "Action" }); + internal_static_acl_AclRuleSet_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_acl_AclRuleSet_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_acl_AclRuleSet_descriptor, new java.lang.String[] { "Name", "Type", "Description", "UserId", "Entries" }); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java b/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java index 85bc0d278365971bbf1bcb135d05fd8523392716..4593770498216267b8d2f95dd728fccfbb9dc134 100644 --- a/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java @@ -1,75644 +1,79934 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: context.proto - package context; public final class ContextOuterClass { - private ContextOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * Protobuf enum {@code context.EventTypeEnum} - */ - public enum EventTypeEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * EVENTTYPE_UNDEFINED = 0; - */ - EVENTTYPE_UNDEFINED(0), - /** - * EVENTTYPE_CREATE = 1; - */ - EVENTTYPE_CREATE(1), - /** - * EVENTTYPE_UPDATE = 2; - */ - EVENTTYPE_UPDATE(2), - /** - * EVENTTYPE_REMOVE = 3; - */ - EVENTTYPE_REMOVE(3), - UNRECOGNIZED(-1), - ; - - /** - * EVENTTYPE_UNDEFINED = 0; - */ - public static final int EVENTTYPE_UNDEFINED_VALUE = 0; - /** - * EVENTTYPE_CREATE = 1; - */ - public static final int EVENTTYPE_CREATE_VALUE = 1; - /** - * EVENTTYPE_UPDATE = 2; - */ - public static final int EVENTTYPE_UPDATE_VALUE = 2; - /** - * EVENTTYPE_REMOVE = 3; - */ - public static final int EVENTTYPE_REMOVE_VALUE = 3; + private ContextOuterClass() { + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static EventTypeEnum valueOf(int value) { - return forNumber(value); + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code context.EventTypeEnum} */ - public static EventTypeEnum forNumber(int value) { - switch (value) { - case 0: return EVENTTYPE_UNDEFINED; - case 1: return EVENTTYPE_CREATE; - case 2: return EVENTTYPE_UPDATE; - case 3: return EVENTTYPE_REMOVE; - default: return null; - } - } + public enum EventTypeEnum implements com.google.protobuf.ProtocolMessageEnum { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - EventTypeEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public EventTypeEnum findValueByNumber(int number) { - return EventTypeEnum.forNumber(number); - } - }; + /** + * EVENTTYPE_UNDEFINED = 0; + */ + EVENTTYPE_UNDEFINED(0), + /** + * EVENTTYPE_CREATE = 1; + */ + EVENTTYPE_CREATE(1), + /** + * EVENTTYPE_UPDATE = 2; + */ + EVENTTYPE_UPDATE(2), + /** + * EVENTTYPE_REMOVE = 3; + */ + EVENTTYPE_REMOVE(3), + UNRECOGNIZED(-1); - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(0); - } + /** + * EVENTTYPE_UNDEFINED = 0; + */ + public static final int EVENTTYPE_UNDEFINED_VALUE = 0; - private static final EventTypeEnum[] VALUES = values(); - - public static EventTypeEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + /** + * EVENTTYPE_CREATE = 1; + */ + public static final int EVENTTYPE_CREATE_VALUE = 1; - private final int value; + /** + * EVENTTYPE_UPDATE = 2; + */ + public static final int EVENTTYPE_UPDATE_VALUE = 2; - private EventTypeEnum(int value) { - this.value = value; - } + /** + * EVENTTYPE_REMOVE = 3; + */ + public static final int EVENTTYPE_REMOVE_VALUE = 3; - // @@protoc_insertion_point(enum_scope:context.EventTypeEnum) - } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EventTypeEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EventTypeEnum forNumber(int value) { + switch(value) { + case 0: + return EVENTTYPE_UNDEFINED; + case 1: + return EVENTTYPE_CREATE; + case 2: + return EVENTTYPE_UPDATE; + case 3: + return EVENTTYPE_REMOVE; + default: + return null; + } + } - /** - * Protobuf enum {@code context.DeviceDriverEnum} - */ - public enum DeviceDriverEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * also used for emulated
-     * 
- * - * DEVICEDRIVER_UNDEFINED = 0; - */ - DEVICEDRIVER_UNDEFINED(0), - /** - * DEVICEDRIVER_OPENCONFIG = 1; - */ - DEVICEDRIVER_OPENCONFIG(1), - /** - * DEVICEDRIVER_TRANSPORT_API = 2; - */ - DEVICEDRIVER_TRANSPORT_API(2), - /** - * DEVICEDRIVER_P4 = 3; - */ - DEVICEDRIVER_P4(3), - /** - * DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; - */ - DEVICEDRIVER_IETF_NETWORK_TOPOLOGY(4), - /** - * DEVICEDRIVER_ONF_TR_532 = 5; - */ - DEVICEDRIVER_ONF_TR_532(5), - /** - * DEVICEDRIVER_XR = 6; - */ - DEVICEDRIVER_XR(6), - /** - * DEVICEDRIVER_IETF_L2VPN = 7; - */ - DEVICEDRIVER_IETF_L2VPN(7), - /** - * DEVICEDRIVER_GNMI_OPENCONFIG = 8; - */ - DEVICEDRIVER_GNMI_OPENCONFIG(8), - UNRECOGNIZED(-1), - ; + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - /** - *
-     * also used for emulated
-     * 
- * - * DEVICEDRIVER_UNDEFINED = 0; - */ - public static final int DEVICEDRIVER_UNDEFINED_VALUE = 0; - /** - * DEVICEDRIVER_OPENCONFIG = 1; - */ - public static final int DEVICEDRIVER_OPENCONFIG_VALUE = 1; - /** - * DEVICEDRIVER_TRANSPORT_API = 2; - */ - public static final int DEVICEDRIVER_TRANSPORT_API_VALUE = 2; - /** - * DEVICEDRIVER_P4 = 3; - */ - public static final int DEVICEDRIVER_P4_VALUE = 3; - /** - * DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; - */ - public static final int DEVICEDRIVER_IETF_NETWORK_TOPOLOGY_VALUE = 4; - /** - * DEVICEDRIVER_ONF_TR_532 = 5; - */ - public static final int DEVICEDRIVER_ONF_TR_532_VALUE = 5; - /** - * DEVICEDRIVER_XR = 6; - */ - public static final int DEVICEDRIVER_XR_VALUE = 6; - /** - * DEVICEDRIVER_IETF_L2VPN = 7; - */ - public static final int DEVICEDRIVER_IETF_L2VPN_VALUE = 7; - /** - * DEVICEDRIVER_GNMI_OPENCONFIG = 8; - */ - public static final int DEVICEDRIVER_GNMI_OPENCONFIG_VALUE = 8; + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { + public EventTypeEnum findValueByNumber(int number) { + return EventTypeEnum.forNumber(number); + } + }; - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DeviceDriverEnum valueOf(int value) { - return forNumber(value); - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DeviceDriverEnum forNumber(int value) { - switch (value) { - case 0: return DEVICEDRIVER_UNDEFINED; - case 1: return DEVICEDRIVER_OPENCONFIG; - case 2: return DEVICEDRIVER_TRANSPORT_API; - case 3: return DEVICEDRIVER_P4; - case 4: return DEVICEDRIVER_IETF_NETWORK_TOPOLOGY; - case 5: return DEVICEDRIVER_ONF_TR_532; - case 6: return DEVICEDRIVER_XR; - case 7: return DEVICEDRIVER_IETF_L2VPN; - case 8: return DEVICEDRIVER_GNMI_OPENCONFIG; - default: return null; - } - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(0); + } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DeviceDriverEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DeviceDriverEnum findValueByNumber(int number) { - return DeviceDriverEnum.forNumber(number); + private static final EventTypeEnum[] VALUES = values(); + + public static EventTypeEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } - }; + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EventTypeEnum(int value) { + this.value = value; + } + } + + /** + * Protobuf enum {@code context.DeviceDriverEnum} + */ + public enum DeviceDriverEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + *
+         * also used for emulated
+         * 
+ * + * DEVICEDRIVER_UNDEFINED = 0; + */ + DEVICEDRIVER_UNDEFINED(0), + /** + * DEVICEDRIVER_OPENCONFIG = 1; + */ + DEVICEDRIVER_OPENCONFIG(1), + /** + * DEVICEDRIVER_TRANSPORT_API = 2; + */ + DEVICEDRIVER_TRANSPORT_API(2), + /** + * DEVICEDRIVER_P4 = 3; + */ + DEVICEDRIVER_P4(3), + /** + * DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; + */ + DEVICEDRIVER_IETF_NETWORK_TOPOLOGY(4), + /** + * DEVICEDRIVER_ONF_TR_532 = 5; + */ + DEVICEDRIVER_ONF_TR_532(5), + /** + * DEVICEDRIVER_XR = 6; + */ + DEVICEDRIVER_XR(6), + /** + * DEVICEDRIVER_IETF_L2VPN = 7; + */ + DEVICEDRIVER_IETF_L2VPN(7), + /** + * DEVICEDRIVER_GNMI_OPENCONFIG = 8; + */ + DEVICEDRIVER_GNMI_OPENCONFIG(8), + /** + * DEVICEDRIVER_OPTICAL_TFS = 9; + */ + DEVICEDRIVER_OPTICAL_TFS(9), + /** + * DEVICEDRIVER_IETF_ACTN = 10; + */ + DEVICEDRIVER_IETF_ACTN(10), + /** + * DEVICEDRIVER_OC = 11; + */ + DEVICEDRIVER_OC(11), + UNRECOGNIZED(-1); + + /** + *
+         * also used for emulated
+         * 
+ * + * DEVICEDRIVER_UNDEFINED = 0; + */ + public static final int DEVICEDRIVER_UNDEFINED_VALUE = 0; + + /** + * DEVICEDRIVER_OPENCONFIG = 1; + */ + public static final int DEVICEDRIVER_OPENCONFIG_VALUE = 1; + + /** + * DEVICEDRIVER_TRANSPORT_API = 2; + */ + public static final int DEVICEDRIVER_TRANSPORT_API_VALUE = 2; + + /** + * DEVICEDRIVER_P4 = 3; + */ + public static final int DEVICEDRIVER_P4_VALUE = 3; + + /** + * DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4; + */ + public static final int DEVICEDRIVER_IETF_NETWORK_TOPOLOGY_VALUE = 4; + + /** + * DEVICEDRIVER_ONF_TR_532 = 5; + */ + public static final int DEVICEDRIVER_ONF_TR_532_VALUE = 5; + + /** + * DEVICEDRIVER_XR = 6; + */ + public static final int DEVICEDRIVER_XR_VALUE = 6; + + /** + * DEVICEDRIVER_IETF_L2VPN = 7; + */ + public static final int DEVICEDRIVER_IETF_L2VPN_VALUE = 7; + + /** + * DEVICEDRIVER_GNMI_OPENCONFIG = 8; + */ + public static final int DEVICEDRIVER_GNMI_OPENCONFIG_VALUE = 8; + + /** + * DEVICEDRIVER_OPTICAL_TFS = 9; + */ + public static final int DEVICEDRIVER_OPTICAL_TFS_VALUE = 9; + + /** + * DEVICEDRIVER_IETF_ACTN = 10; + */ + public static final int DEVICEDRIVER_IETF_ACTN_VALUE = 10; + + /** + * DEVICEDRIVER_OC = 11; + */ + public static final int DEVICEDRIVER_OC_VALUE = 11; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DeviceDriverEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DeviceDriverEnum forNumber(int value) { + switch(value) { + case 0: + return DEVICEDRIVER_UNDEFINED; + case 1: + return DEVICEDRIVER_OPENCONFIG; + case 2: + return DEVICEDRIVER_TRANSPORT_API; + case 3: + return DEVICEDRIVER_P4; + case 4: + return DEVICEDRIVER_IETF_NETWORK_TOPOLOGY; + case 5: + return DEVICEDRIVER_ONF_TR_532; + case 6: + return DEVICEDRIVER_XR; + case 7: + return DEVICEDRIVER_IETF_L2VPN; + case 8: + return DEVICEDRIVER_GNMI_OPENCONFIG; + case 9: + return DEVICEDRIVER_OPTICAL_TFS; + case 10: + return DEVICEDRIVER_IETF_ACTN; + case 11: + return DEVICEDRIVER_OC; + default: + return null; + } + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(1); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final DeviceDriverEnum[] VALUES = values(); - - public static DeviceDriverEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public DeviceDriverEnum findValueByNumber(int number) { + return DeviceDriverEnum.forNumber(number); + } + }; - private DeviceDriverEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:context.DeviceDriverEnum) - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * Protobuf enum {@code context.DeviceOperationalStatusEnum} - */ - public enum DeviceOperationalStatusEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DEVICEOPERATIONALSTATUS_UNDEFINED = 0; - */ - DEVICEOPERATIONALSTATUS_UNDEFINED(0), - /** - * DEVICEOPERATIONALSTATUS_DISABLED = 1; - */ - DEVICEOPERATIONALSTATUS_DISABLED(1), - /** - * DEVICEOPERATIONALSTATUS_ENABLED = 2; - */ - DEVICEOPERATIONALSTATUS_ENABLED(2), - UNRECOGNIZED(-1), - ; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(1); + } - /** - * DEVICEOPERATIONALSTATUS_UNDEFINED = 0; - */ - public static final int DEVICEOPERATIONALSTATUS_UNDEFINED_VALUE = 0; - /** - * DEVICEOPERATIONALSTATUS_DISABLED = 1; - */ - public static final int DEVICEOPERATIONALSTATUS_DISABLED_VALUE = 1; - /** - * DEVICEOPERATIONALSTATUS_ENABLED = 2; - */ - public static final int DEVICEOPERATIONALSTATUS_ENABLED_VALUE = 2; + private static final DeviceDriverEnum[] VALUES = values(); + public static DeviceDriverEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + private final int value; - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DeviceOperationalStatusEnum valueOf(int value) { - return forNumber(value); + private DeviceDriverEnum(int value) { + this.value = value; + } } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code context.DeviceOperationalStatusEnum} */ - public static DeviceOperationalStatusEnum forNumber(int value) { - switch (value) { - case 0: return DEVICEOPERATIONALSTATUS_UNDEFINED; - case 1: return DEVICEOPERATIONALSTATUS_DISABLED; - case 2: return DEVICEOPERATIONALSTATUS_ENABLED; - default: return null; - } - } + public enum DeviceOperationalStatusEnum implements com.google.protobuf.ProtocolMessageEnum { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DeviceOperationalStatusEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DeviceOperationalStatusEnum findValueByNumber(int number) { - return DeviceOperationalStatusEnum.forNumber(number); - } - }; + /** + * DEVICEOPERATIONALSTATUS_UNDEFINED = 0; + */ + DEVICEOPERATIONALSTATUS_UNDEFINED(0), + /** + * DEVICEOPERATIONALSTATUS_DISABLED = 1; + */ + DEVICEOPERATIONALSTATUS_DISABLED(1), + /** + * DEVICEOPERATIONALSTATUS_ENABLED = 2; + */ + DEVICEOPERATIONALSTATUS_ENABLED(2), + UNRECOGNIZED(-1); - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(2); - } + /** + * DEVICEOPERATIONALSTATUS_UNDEFINED = 0; + */ + public static final int DEVICEOPERATIONALSTATUS_UNDEFINED_VALUE = 0; - private static final DeviceOperationalStatusEnum[] VALUES = values(); - - public static DeviceOperationalStatusEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + /** + * DEVICEOPERATIONALSTATUS_DISABLED = 1; + */ + public static final int DEVICEOPERATIONALSTATUS_DISABLED_VALUE = 1; - private final int value; + /** + * DEVICEOPERATIONALSTATUS_ENABLED = 2; + */ + public static final int DEVICEOPERATIONALSTATUS_ENABLED_VALUE = 2; - private DeviceOperationalStatusEnum(int value) { - this.value = value; - } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DeviceOperationalStatusEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DeviceOperationalStatusEnum forNumber(int value) { + switch(value) { + case 0: + return DEVICEOPERATIONALSTATUS_UNDEFINED; + case 1: + return DEVICEOPERATIONALSTATUS_DISABLED; + case 2: + return DEVICEOPERATIONALSTATUS_ENABLED; + default: + return null; + } + } - // @@protoc_insertion_point(enum_scope:context.DeviceOperationalStatusEnum) - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - /** - * Protobuf enum {@code context.ServiceTypeEnum} - */ - public enum ServiceTypeEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SERVICETYPE_UNKNOWN = 0; - */ - SERVICETYPE_UNKNOWN(0), - /** - * SERVICETYPE_L3NM = 1; - */ - SERVICETYPE_L3NM(1), - /** - * SERVICETYPE_L2NM = 2; - */ - SERVICETYPE_L2NM(2), - /** - * SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; - */ - SERVICETYPE_TAPI_CONNECTIVITY_SERVICE(3), - /** - * SERVICETYPE_TE = 4; - */ - SERVICETYPE_TE(4), - UNRECOGNIZED(-1), - ; + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - /** - * SERVICETYPE_UNKNOWN = 0; - */ - public static final int SERVICETYPE_UNKNOWN_VALUE = 0; - /** - * SERVICETYPE_L3NM = 1; - */ - public static final int SERVICETYPE_L3NM_VALUE = 1; - /** - * SERVICETYPE_L2NM = 2; - */ - public static final int SERVICETYPE_L2NM_VALUE = 2; - /** - * SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; - */ - public static final int SERVICETYPE_TAPI_CONNECTIVITY_SERVICE_VALUE = 3; - /** - * SERVICETYPE_TE = 4; - */ - public static final int SERVICETYPE_TE_VALUE = 4; + public DeviceOperationalStatusEnum findValueByNumber(int number) { + return DeviceOperationalStatusEnum.forNumber(number); + } + }; + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ServiceTypeEnum valueOf(int value) { - return forNumber(value); - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(2); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ServiceTypeEnum forNumber(int value) { - switch (value) { - case 0: return SERVICETYPE_UNKNOWN; - case 1: return SERVICETYPE_L3NM; - case 2: return SERVICETYPE_L2NM; - case 3: return SERVICETYPE_TAPI_CONNECTIVITY_SERVICE; - case 4: return SERVICETYPE_TE; - default: return null; - } - } + private static final DeviceOperationalStatusEnum[] VALUES = values(); + + public static DeviceOperationalStatusEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DeviceOperationalStatusEnum(int value) { + this.value = value; + } + } + + /** + * Protobuf enum {@code context.ServiceTypeEnum} + */ + public enum ServiceTypeEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * SERVICETYPE_UNKNOWN = 0; + */ + SERVICETYPE_UNKNOWN(0), + /** + * SERVICETYPE_L3NM = 1; + */ + SERVICETYPE_L3NM(1), + /** + * SERVICETYPE_L2NM = 2; + */ + SERVICETYPE_L2NM(2), + /** + * SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; + */ + SERVICETYPE_TAPI_CONNECTIVITY_SERVICE(3), + /** + * SERVICETYPE_TE = 4; + */ + SERVICETYPE_TE(4), + /** + * SERVICETYPE_E2E = 5; + */ + SERVICETYPE_E2E(5), + /** + * SERVICETYPE_OPTICAL_CONNECTIVITY = 6; + */ + SERVICETYPE_OPTICAL_CONNECTIVITY(6), + UNRECOGNIZED(-1); + + /** + * SERVICETYPE_UNKNOWN = 0; + */ + public static final int SERVICETYPE_UNKNOWN_VALUE = 0; + + /** + * SERVICETYPE_L3NM = 1; + */ + public static final int SERVICETYPE_L3NM_VALUE = 1; + + /** + * SERVICETYPE_L2NM = 2; + */ + public static final int SERVICETYPE_L2NM_VALUE = 2; + + /** + * SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; + */ + public static final int SERVICETYPE_TAPI_CONNECTIVITY_SERVICE_VALUE = 3; + + /** + * SERVICETYPE_TE = 4; + */ + public static final int SERVICETYPE_TE_VALUE = 4; + + /** + * SERVICETYPE_E2E = 5; + */ + public static final int SERVICETYPE_E2E_VALUE = 5; + + /** + * SERVICETYPE_OPTICAL_CONNECTIVITY = 6; + */ + public static final int SERVICETYPE_OPTICAL_CONNECTIVITY_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ServiceTypeEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ServiceTypeEnum forNumber(int value) { + switch(value) { + case 0: + return SERVICETYPE_UNKNOWN; + case 1: + return SERVICETYPE_L3NM; + case 2: + return SERVICETYPE_L2NM; + case 3: + return SERVICETYPE_TAPI_CONNECTIVITY_SERVICE; + case 4: + return SERVICETYPE_TE; + case 5: + return SERVICETYPE_E2E; + case 6: + return SERVICETYPE_OPTICAL_CONNECTIVITY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ServiceTypeEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { public ServiceTypeEnum findValueByNumber(int number) { - return ServiceTypeEnum.forNumber(number); + return ServiceTypeEnum.forNumber(number); } - }; + }; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(3); - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - private static final ServiceTypeEnum[] VALUES = values(); - - public static ServiceTypeEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - private final int value; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(3); + } - private ServiceTypeEnum(int value) { - this.value = value; - } + private static final ServiceTypeEnum[] VALUES = values(); - // @@protoc_insertion_point(enum_scope:context.ServiceTypeEnum) - } + public static ServiceTypeEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ServiceTypeEnum(int value) { + this.value = value; + } + } + + /** + * Protobuf enum {@code context.ServiceStatusEnum} + */ + public enum ServiceStatusEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * SERVICESTATUS_UNDEFINED = 0; + */ + SERVICESTATUS_UNDEFINED(0), + /** + * SERVICESTATUS_PLANNED = 1; + */ + SERVICESTATUS_PLANNED(1), + /** + * SERVICESTATUS_ACTIVE = 2; + */ + SERVICESTATUS_ACTIVE(2), + /** + * SERVICESTATUS_UPDATING = 3; + */ + SERVICESTATUS_UPDATING(3), + /** + * SERVICESTATUS_PENDING_REMOVAL = 4; + */ + SERVICESTATUS_PENDING_REMOVAL(4), + /** + * SERVICESTATUS_SLA_VIOLATED = 5; + */ + SERVICESTATUS_SLA_VIOLATED(5), + UNRECOGNIZED(-1); + + /** + * SERVICESTATUS_UNDEFINED = 0; + */ + public static final int SERVICESTATUS_UNDEFINED_VALUE = 0; + + /** + * SERVICESTATUS_PLANNED = 1; + */ + public static final int SERVICESTATUS_PLANNED_VALUE = 1; + + /** + * SERVICESTATUS_ACTIVE = 2; + */ + public static final int SERVICESTATUS_ACTIVE_VALUE = 2; + + /** + * SERVICESTATUS_UPDATING = 3; + */ + public static final int SERVICESTATUS_UPDATING_VALUE = 3; + + /** + * SERVICESTATUS_PENDING_REMOVAL = 4; + */ + public static final int SERVICESTATUS_PENDING_REMOVAL_VALUE = 4; + + /** + * SERVICESTATUS_SLA_VIOLATED = 5; + */ + public static final int SERVICESTATUS_SLA_VIOLATED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ServiceStatusEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ServiceStatusEnum forNumber(int value) { + switch(value) { + case 0: + return SERVICESTATUS_UNDEFINED; + case 1: + return SERVICESTATUS_PLANNED; + case 2: + return SERVICESTATUS_ACTIVE; + case 3: + return SERVICESTATUS_UPDATING; + case 4: + return SERVICESTATUS_PENDING_REMOVAL; + case 5: + return SERVICESTATUS_SLA_VIOLATED; + default: + return null; + } + } - /** - * Protobuf enum {@code context.ServiceStatusEnum} - */ - public enum ServiceStatusEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SERVICESTATUS_UNDEFINED = 0; - */ - SERVICESTATUS_UNDEFINED(0), - /** - * SERVICESTATUS_PLANNED = 1; - */ - SERVICESTATUS_PLANNED(1), - /** - * SERVICESTATUS_ACTIVE = 2; - */ - SERVICESTATUS_ACTIVE(2), - /** - * SERVICESTATUS_UPDATING = 3; - */ - SERVICESTATUS_UPDATING(3), - /** - * SERVICESTATUS_PENDING_REMOVAL = 4; - */ - SERVICESTATUS_PENDING_REMOVAL(4), - /** - * SERVICESTATUS_SLA_VIOLATED = 5; - */ - SERVICESTATUS_SLA_VIOLATED(5), - UNRECOGNIZED(-1), - ; + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - /** - * SERVICESTATUS_UNDEFINED = 0; - */ - public static final int SERVICESTATUS_UNDEFINED_VALUE = 0; - /** - * SERVICESTATUS_PLANNED = 1; - */ - public static final int SERVICESTATUS_PLANNED_VALUE = 1; - /** - * SERVICESTATUS_ACTIVE = 2; - */ - public static final int SERVICESTATUS_ACTIVE_VALUE = 2; - /** - * SERVICESTATUS_UPDATING = 3; - */ - public static final int SERVICESTATUS_UPDATING_VALUE = 3; - /** - * SERVICESTATUS_PENDING_REMOVAL = 4; - */ - public static final int SERVICESTATUS_PENDING_REMOVAL_VALUE = 4; - /** - * SERVICESTATUS_SLA_VIOLATED = 5; - */ - public static final int SERVICESTATUS_SLA_VIOLATED_VALUE = 5; + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { + + public ServiceStatusEnum findValueByNumber(int number) { + return ServiceStatusEnum.forNumber(number); + } + }; + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ServiceStatusEnum valueOf(int value) { - return forNumber(value); - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(4); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ServiceStatusEnum forNumber(int value) { - switch (value) { - case 0: return SERVICESTATUS_UNDEFINED; - case 1: return SERVICESTATUS_PLANNED; - case 2: return SERVICESTATUS_ACTIVE; - case 3: return SERVICESTATUS_UPDATING; - case 4: return SERVICESTATUS_PENDING_REMOVAL; - case 5: return SERVICESTATUS_SLA_VIOLATED; - default: return null; - } - } + private static final ServiceStatusEnum[] VALUES = values(); - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ServiceStatusEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ServiceStatusEnum findValueByNumber(int number) { - return ServiceStatusEnum.forNumber(number); + public static ServiceStatusEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ServiceStatusEnum(int value) { + this.value = value; + } + } + + /** + * Protobuf enum {@code context.SliceStatusEnum} + */ + public enum SliceStatusEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * SLICESTATUS_UNDEFINED = 0; + */ + SLICESTATUS_UNDEFINED(0), + /** + * SLICESTATUS_PLANNED = 1; + */ + SLICESTATUS_PLANNED(1), + /** + * SLICESTATUS_INIT = 2; + */ + SLICESTATUS_INIT(2), + /** + * SLICESTATUS_ACTIVE = 3; + */ + SLICESTATUS_ACTIVE(3), + /** + * SLICESTATUS_DEINIT = 4; + */ + SLICESTATUS_DEINIT(4), + /** + * SLICESTATUS_SLA_VIOLATED = 5; + */ + SLICESTATUS_SLA_VIOLATED(5), + UNRECOGNIZED(-1); + + /** + * SLICESTATUS_UNDEFINED = 0; + */ + public static final int SLICESTATUS_UNDEFINED_VALUE = 0; + + /** + * SLICESTATUS_PLANNED = 1; + */ + public static final int SLICESTATUS_PLANNED_VALUE = 1; + + /** + * SLICESTATUS_INIT = 2; + */ + public static final int SLICESTATUS_INIT_VALUE = 2; + + /** + * SLICESTATUS_ACTIVE = 3; + */ + public static final int SLICESTATUS_ACTIVE_VALUE = 3; + + /** + * SLICESTATUS_DEINIT = 4; + */ + public static final int SLICESTATUS_DEINIT_VALUE = 4; + + /** + * SLICESTATUS_SLA_VIOLATED = 5; + */ + public static final int SLICESTATUS_SLA_VIOLATED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); } - }; + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SliceStatusEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SliceStatusEnum forNumber(int value) { + switch(value) { + case 0: + return SLICESTATUS_UNDEFINED; + case 1: + return SLICESTATUS_PLANNED; + case 2: + return SLICESTATUS_INIT; + case 3: + return SLICESTATUS_ACTIVE; + case 4: + return SLICESTATUS_DEINIT; + case 5: + return SLICESTATUS_SLA_VIOLATED; + default: + return null; + } + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(4); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final ServiceStatusEnum[] VALUES = values(); - - public static ServiceStatusEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public SliceStatusEnum findValueByNumber(int number) { + return SliceStatusEnum.forNumber(number); + } + }; - private ServiceStatusEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:context.ServiceStatusEnum) - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * Protobuf enum {@code context.SliceStatusEnum} - */ - public enum SliceStatusEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SLICESTATUS_UNDEFINED = 0; - */ - SLICESTATUS_UNDEFINED(0), - /** - * SLICESTATUS_PLANNED = 1; - */ - SLICESTATUS_PLANNED(1), - /** - * SLICESTATUS_INIT = 2; - */ - SLICESTATUS_INIT(2), - /** - * SLICESTATUS_ACTIVE = 3; - */ - SLICESTATUS_ACTIVE(3), - /** - * SLICESTATUS_DEINIT = 4; - */ - SLICESTATUS_DEINIT(4), - /** - * SLICESTATUS_SLA_VIOLATED = 5; - */ - SLICESTATUS_SLA_VIOLATED(5), - UNRECOGNIZED(-1), - ; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(5); + } - /** - * SLICESTATUS_UNDEFINED = 0; - */ - public static final int SLICESTATUS_UNDEFINED_VALUE = 0; - /** - * SLICESTATUS_PLANNED = 1; - */ - public static final int SLICESTATUS_PLANNED_VALUE = 1; - /** - * SLICESTATUS_INIT = 2; - */ - public static final int SLICESTATUS_INIT_VALUE = 2; - /** - * SLICESTATUS_ACTIVE = 3; - */ - public static final int SLICESTATUS_ACTIVE_VALUE = 3; - /** - * SLICESTATUS_DEINIT = 4; - */ - public static final int SLICESTATUS_DEINIT_VALUE = 4; - /** - * SLICESTATUS_SLA_VIOLATED = 5; - */ - public static final int SLICESTATUS_SLA_VIOLATED_VALUE = 5; + private static final SliceStatusEnum[] VALUES = values(); + public static SliceStatusEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + private final int value; - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SliceStatusEnum valueOf(int value) { - return forNumber(value); + private SliceStatusEnum(int value) { + this.value = value; + } } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static SliceStatusEnum forNumber(int value) { - switch (value) { - case 0: return SLICESTATUS_UNDEFINED; - case 1: return SLICESTATUS_PLANNED; - case 2: return SLICESTATUS_INIT; - case 3: return SLICESTATUS_ACTIVE; - case 4: return SLICESTATUS_DEINIT; - case 5: return SLICESTATUS_SLA_VIOLATED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - SliceStatusEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public SliceStatusEnum findValueByNumber(int number) { - return SliceStatusEnum.forNumber(number); + *
+     * ----- Configuration -------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf enum {@code context.ConfigActionEnum} + */ + public enum ConfigActionEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * CONFIGACTION_UNDEFINED = 0; + */ + CONFIGACTION_UNDEFINED(0), + /** + * CONFIGACTION_SET = 1; + */ + CONFIGACTION_SET(1), + /** + * CONFIGACTION_DELETE = 2; + */ + CONFIGACTION_DELETE(2), + UNRECOGNIZED(-1); + + /** + * CONFIGACTION_UNDEFINED = 0; + */ + public static final int CONFIGACTION_UNDEFINED_VALUE = 0; + + /** + * CONFIGACTION_SET = 1; + */ + public static final int CONFIGACTION_SET_VALUE = 1; + + /** + * CONFIGACTION_DELETE = 2; + */ + public static final int CONFIGACTION_DELETE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConfigActionEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ConfigActionEnum forNumber(int value) { + switch(value) { + case 0: + return CONFIGACTION_UNDEFINED; + case 1: + return CONFIGACTION_SET; + case 2: + return CONFIGACTION_DELETE; + default: + return null; } - }; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(5); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final SliceStatusEnum[] VALUES = values(); - - public static SliceStatusEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public ConfigActionEnum findValueByNumber(int number) { + return ConfigActionEnum.forNumber(number); + } + }; - private SliceStatusEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:context.SliceStatusEnum) - } - - /** - *
-   * ----- Configuration -------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf enum {@code context.ConfigActionEnum} - */ - public enum ConfigActionEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * CONFIGACTION_UNDEFINED = 0; - */ - CONFIGACTION_UNDEFINED(0), - /** - * CONFIGACTION_SET = 1; - */ - CONFIGACTION_SET(1), - /** - * CONFIGACTION_DELETE = 2; - */ - CONFIGACTION_DELETE(2), - UNRECOGNIZED(-1), - ; + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * CONFIGACTION_UNDEFINED = 0; - */ - public static final int CONFIGACTION_UNDEFINED_VALUE = 0; - /** - * CONFIGACTION_SET = 1; - */ - public static final int CONFIGACTION_SET_VALUE = 1; - /** - * CONFIGACTION_DELETE = 2; - */ - public static final int CONFIGACTION_DELETE_VALUE = 2; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(6); + } + private static final ConfigActionEnum[] VALUES = values(); - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + public static ConfigActionEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ConfigActionEnum valueOf(int value) { - return forNumber(value); - } + private final int value; - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ConfigActionEnum forNumber(int value) { - switch (value) { - case 0: return CONFIGACTION_UNDEFINED; - case 1: return CONFIGACTION_SET; - case 2: return CONFIGACTION_DELETE; - default: return null; - } + private ConfigActionEnum(int value) { + this.value = value; + } } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ConfigActionEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ConfigActionEnum findValueByNumber(int number) { - return ConfigActionEnum.forNumber(number); + /** + *
+     * ----- Constraint ----------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf enum {@code context.ConstraintActionEnum} + */ + public enum ConstraintActionEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * CONSTRAINTACTION_UNDEFINED = 0; + */ + CONSTRAINTACTION_UNDEFINED(0), + /** + * CONSTRAINTACTION_SET = 1; + */ + CONSTRAINTACTION_SET(1), + /** + * CONSTRAINTACTION_DELETE = 2; + */ + CONSTRAINTACTION_DELETE(2), + UNRECOGNIZED(-1); + + /** + * CONSTRAINTACTION_UNDEFINED = 0; + */ + public static final int CONSTRAINTACTION_UNDEFINED_VALUE = 0; + + /** + * CONSTRAINTACTION_SET = 1; + */ + public static final int CONSTRAINTACTION_SET_VALUE = 1; + + /** + * CONSTRAINTACTION_DELETE = 2; + */ + public static final int CONSTRAINTACTION_DELETE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConstraintActionEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ConstraintActionEnum forNumber(int value) { + switch(value) { + case 0: + return CONSTRAINTACTION_UNDEFINED; + case 1: + return CONSTRAINTACTION_SET; + case 2: + return CONSTRAINTACTION_DELETE; + default: + return null; } - }; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(6); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final ConfigActionEnum[] VALUES = values(); - - public static ConfigActionEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public ConstraintActionEnum findValueByNumber(int number) { + return ConstraintActionEnum.forNumber(number); + } + }; - private ConfigActionEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:context.ConfigActionEnum) - } - - /** - *
-   * ----- Constraint ----------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf enum {@code context.ConstraintActionEnum} - */ - public enum ConstraintActionEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * CONSTRAINTACTION_UNDEFINED = 0; - */ - CONSTRAINTACTION_UNDEFINED(0), - /** - * CONSTRAINTACTION_SET = 1; - */ - CONSTRAINTACTION_SET(1), - /** - * CONSTRAINTACTION_DELETE = 2; - */ - CONSTRAINTACTION_DELETE(2), - UNRECOGNIZED(-1), - ; + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * CONSTRAINTACTION_UNDEFINED = 0; - */ - public static final int CONSTRAINTACTION_UNDEFINED_VALUE = 0; - /** - * CONSTRAINTACTION_SET = 1; - */ - public static final int CONSTRAINTACTION_SET_VALUE = 1; - /** - * CONSTRAINTACTION_DELETE = 2; - */ - public static final int CONSTRAINTACTION_DELETE_VALUE = 2; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(7); + } + private static final ConstraintActionEnum[] VALUES = values(); - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + public static ConstraintActionEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ConstraintActionEnum(int value) { + this.value = value; + } + } + + /** + * Protobuf enum {@code context.IsolationLevelEnum} + */ + public enum IsolationLevelEnum implements com.google.protobuf.ProtocolMessageEnum { + + /** + * NO_ISOLATION = 0; + */ + NO_ISOLATION(0), + /** + * PHYSICAL_ISOLATION = 1; + */ + PHYSICAL_ISOLATION(1), + /** + * LOGICAL_ISOLATION = 2; + */ + LOGICAL_ISOLATION(2), + /** + * PROCESS_ISOLATION = 3; + */ + PROCESS_ISOLATION(3), + /** + * PHYSICAL_MEMORY_ISOLATION = 4; + */ + PHYSICAL_MEMORY_ISOLATION(4), + /** + * PHYSICAL_NETWORK_ISOLATION = 5; + */ + PHYSICAL_NETWORK_ISOLATION(5), + /** + * VIRTUAL_RESOURCE_ISOLATION = 6; + */ + VIRTUAL_RESOURCE_ISOLATION(6), + /** + * NETWORK_FUNCTIONS_ISOLATION = 7; + */ + NETWORK_FUNCTIONS_ISOLATION(7), + /** + * SERVICE_ISOLATION = 8; + */ + SERVICE_ISOLATION(8), + UNRECOGNIZED(-1); + + /** + * NO_ISOLATION = 0; + */ + public static final int NO_ISOLATION_VALUE = 0; + + /** + * PHYSICAL_ISOLATION = 1; + */ + public static final int PHYSICAL_ISOLATION_VALUE = 1; + + /** + * LOGICAL_ISOLATION = 2; + */ + public static final int LOGICAL_ISOLATION_VALUE = 2; + + /** + * PROCESS_ISOLATION = 3; + */ + public static final int PROCESS_ISOLATION_VALUE = 3; + + /** + * PHYSICAL_MEMORY_ISOLATION = 4; + */ + public static final int PHYSICAL_MEMORY_ISOLATION_VALUE = 4; + + /** + * PHYSICAL_NETWORK_ISOLATION = 5; + */ + public static final int PHYSICAL_NETWORK_ISOLATION_VALUE = 5; + + /** + * VIRTUAL_RESOURCE_ISOLATION = 6; + */ + public static final int VIRTUAL_RESOURCE_ISOLATION_VALUE = 6; + + /** + * NETWORK_FUNCTIONS_ISOLATION = 7; + */ + public static final int NETWORK_FUNCTIONS_ISOLATION_VALUE = 7; + + /** + * SERVICE_ISOLATION = 8; + */ + public static final int SERVICE_ISOLATION_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IsolationLevelEnum valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static IsolationLevelEnum forNumber(int value) { + switch(value) { + case 0: + return NO_ISOLATION; + case 1: + return PHYSICAL_ISOLATION; + case 2: + return LOGICAL_ISOLATION; + case 3: + return PROCESS_ISOLATION; + case 4: + return PHYSICAL_MEMORY_ISOLATION; + case 5: + return PHYSICAL_NETWORK_ISOLATION; + case 6: + return VIRTUAL_RESOURCE_ISOLATION; + case 7: + return NETWORK_FUNCTIONS_ISOLATION; + case 8: + return SERVICE_ISOLATION; + default: + return null; + } + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ConstraintActionEnum valueOf(int value) { - return forNumber(value); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ConstraintActionEnum forNumber(int value) { - switch (value) { - case 0: return CONSTRAINTACTION_UNDEFINED; - case 1: return CONSTRAINTACTION_SET; - case 2: return CONSTRAINTACTION_DELETE; - default: return null; - } - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ConstraintActionEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ConstraintActionEnum findValueByNumber(int number) { - return ConstraintActionEnum.forNumber(number); + public IsolationLevelEnum findValueByNumber(int number) { + return IsolationLevelEnum.forNumber(number); } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(7); - } - - private static final ConstraintActionEnum[] VALUES = values(); - - public static ConstraintActionEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + }; - private final int value; + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - private ConstraintActionEnum(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - // @@protoc_insertion_point(enum_scope:context.ConstraintActionEnum) - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return context.ContextOuterClass.getDescriptor().getEnumTypes().get(8); + } - /** - * Protobuf enum {@code context.IsolationLevelEnum} - */ - public enum IsolationLevelEnum - implements com.google.protobuf.ProtocolMessageEnum { - /** - * NO_ISOLATION = 0; - */ - NO_ISOLATION(0), - /** - * PHYSICAL_ISOLATION = 1; - */ - PHYSICAL_ISOLATION(1), - /** - * LOGICAL_ISOLATION = 2; - */ - LOGICAL_ISOLATION(2), - /** - * PROCESS_ISOLATION = 3; - */ - PROCESS_ISOLATION(3), - /** - * PHYSICAL_MEMORY_ISOLATION = 4; - */ - PHYSICAL_MEMORY_ISOLATION(4), - /** - * PHYSICAL_NETWORK_ISOLATION = 5; - */ - PHYSICAL_NETWORK_ISOLATION(5), - /** - * VIRTUAL_RESOURCE_ISOLATION = 6; - */ - VIRTUAL_RESOURCE_ISOLATION(6), - /** - * NETWORK_FUNCTIONS_ISOLATION = 7; - */ - NETWORK_FUNCTIONS_ISOLATION(7), - /** - * SERVICE_ISOLATION = 8; - */ - SERVICE_ISOLATION(8), - UNRECOGNIZED(-1), - ; + private static final IsolationLevelEnum[] VALUES = values(); - /** - * NO_ISOLATION = 0; - */ - public static final int NO_ISOLATION_VALUE = 0; - /** - * PHYSICAL_ISOLATION = 1; - */ - public static final int PHYSICAL_ISOLATION_VALUE = 1; - /** - * LOGICAL_ISOLATION = 2; - */ - public static final int LOGICAL_ISOLATION_VALUE = 2; - /** - * PROCESS_ISOLATION = 3; - */ - public static final int PROCESS_ISOLATION_VALUE = 3; - /** - * PHYSICAL_MEMORY_ISOLATION = 4; - */ - public static final int PHYSICAL_MEMORY_ISOLATION_VALUE = 4; - /** - * PHYSICAL_NETWORK_ISOLATION = 5; - */ - public static final int PHYSICAL_NETWORK_ISOLATION_VALUE = 5; - /** - * VIRTUAL_RESOURCE_ISOLATION = 6; - */ - public static final int VIRTUAL_RESOURCE_ISOLATION_VALUE = 6; - /** - * NETWORK_FUNCTIONS_ISOLATION = 7; - */ - public static final int NETWORK_FUNCTIONS_ISOLATION_VALUE = 7; - /** - * SERVICE_ISOLATION = 8; - */ - public static final int SERVICE_ISOLATION_VALUE = 8; + public static IsolationLevelEnum valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + private final int value; - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; + private IsolationLevelEnum(int value) { + this.value = value; + } } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static IsolationLevelEnum valueOf(int value) { - return forNumber(value); + public interface EmptyOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Empty) + com.google.protobuf.MessageOrBuilder { } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + *
+     * ----- Generic -------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.Empty} */ - public static IsolationLevelEnum forNumber(int value) { - switch (value) { - case 0: return NO_ISOLATION; - case 1: return PHYSICAL_ISOLATION; - case 2: return LOGICAL_ISOLATION; - case 3: return PROCESS_ISOLATION; - case 4: return PHYSICAL_MEMORY_ISOLATION; - case 5: return PHYSICAL_NETWORK_ISOLATION; - case 6: return VIRTUAL_RESOURCE_ISOLATION; - case 7: return NETWORK_FUNCTIONS_ISOLATION; - case 8: return SERVICE_ISOLATION; - default: return null; - } - } + public static final class Empty extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Empty) + EmptyOrBuilder { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - IsolationLevelEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public IsolationLevelEnum findValueByNumber(int number) { - return IsolationLevelEnum.forNumber(number); - } - }; + private static final long serialVersionUID = 0L; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return context.ContextOuterClass.getDescriptor().getEnumTypes().get(8); - } + // Use Empty.newBuilder() to construct. + private Empty(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final IsolationLevelEnum[] VALUES = values(); - - public static IsolationLevelEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private Empty() { + } - private final int value; + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Empty(); + } - private IsolationLevelEnum(int value) { - this.value = value; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - // @@protoc_insertion_point(enum_scope:context.IsolationLevelEnum) - } - - public interface EmptyOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Empty) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * ----- Generic -------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.Empty} - */ - public static final class Empty extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Empty) - EmptyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Empty.newBuilder() to construct. - private Empty(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Empty() { - } + 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(); + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Empty(); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Empty_descriptor; + } - @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; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Empty_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Empty.class, context.ContextOuterClass.Empty.Builder.class); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Empty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Empty.class, context.ContextOuterClass.Empty.Builder.class); - } + private byte memoizedIsInitialized = -1; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Empty)) { + return super.equals(obj); + } + context.ContextOuterClass.Empty other = (context.ContextOuterClass.Empty) obj; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Empty)) { - return super.equals(obj); - } - context.ContextOuterClass.Empty other = (context.ContextOuterClass.Empty) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.Empty parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.Empty parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.Empty parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Empty parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Empty parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Empty parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Empty parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Empty parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Empty parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Empty parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Empty parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Empty parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Empty parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Empty parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.Empty parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Empty prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.Empty parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Generic -------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.Empty} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Empty) - context.ContextOuterClass.EmptyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Empty_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Empty_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Empty.class, context.ContextOuterClass.Empty.Builder.class); - } - - // 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 - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Empty_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Empty getDefaultInstanceForType() { - return context.ContextOuterClass.Empty.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Empty build() { - context.ContextOuterClass.Empty result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.Empty buildPartial() { - context.ContextOuterClass.Empty result = new context.ContextOuterClass.Empty(this); - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Empty) { - return mergeFrom((context.ContextOuterClass.Empty)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Empty other) { - if (other == context.ContextOuterClass.Empty.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Empty) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Empty) - } + public static context.ContextOuterClass.Empty parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(class_scope:context.Empty) - private static final context.ContextOuterClass.Empty DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Empty(); - } + public static context.ContextOuterClass.Empty parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.Empty getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Empty parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.Empty parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.Empty parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public context.ContextOuterClass.Empty getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Empty parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - } + public static context.ContextOuterClass.Empty parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public interface UuidOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Uuid) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.Empty parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - /** - * string uuid = 1; - * @return The uuid. - */ - java.lang.String getUuid(); - /** - * string uuid = 1; - * @return The bytes for uuid. - */ - com.google.protobuf.ByteString - getUuidBytes(); - } - /** - * Protobuf type {@code context.Uuid} - */ - public static final class Uuid extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Uuid) - UuidOrBuilder { - private static final long serialVersionUID = 0L; - // Use Uuid.newBuilder() to construct. - private Uuid(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Uuid() { - uuid_ = ""; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Uuid(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @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; - } + public static Builder newBuilder(context.ContextOuterClass.Empty prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Uuid_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Uuid.class, context.ContextOuterClass.Uuid.Builder.class); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static final int UUID_FIELD_NUMBER = 1; - private volatile java.lang.Object uuid_; - /** - * string uuid = 1; - * @return The uuid. - */ - @java.lang.Override - public java.lang.String getUuid() { - java.lang.Object ref = uuid_; - 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(); - uuid_ = s; - return s; - } - } - /** - * string uuid = 1; - * @return The bytes for uuid. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUuidBytes() { - java.lang.Object ref = uuid_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + *
+         * ----- Generic -------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.Empty} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Empty) + context.ContextOuterClass.EmptyOrBuilder { - memoizedIsInitialized = 1; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Empty_descriptor; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getUuidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uuid_); - } - unknownFields.writeTo(output); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Empty_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Empty.class, context.ContextOuterClass.Empty.Builder.class); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getUuidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uuid_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + // Construct using context.ContextOuterClass.Empty.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Uuid)) { - return super.equals(obj); - } - context.ContextOuterClass.Uuid other = (context.ContextOuterClass.Uuid) obj; - - if (!getUuid() - .equals(other.getUuid())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + UUID_FIELD_NUMBER; - hash = (53 * hash) + getUuid().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - public static context.ContextOuterClass.Uuid parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Uuid parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Uuid parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Uuid parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Uuid parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Uuid parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Uuid parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Uuid parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Uuid parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Uuid parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Uuid parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Uuid parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Uuid prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Empty_descriptor; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Uuid} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Uuid) - context.ContextOuterClass.UuidOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Uuid_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Uuid_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Uuid.class, context.ContextOuterClass.Uuid.Builder.class); - } - - // 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(); - uuid_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Uuid_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Uuid getDefaultInstanceForType() { - return context.ContextOuterClass.Uuid.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Uuid build() { - context.ContextOuterClass.Uuid result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.Uuid buildPartial() { - context.ContextOuterClass.Uuid result = new context.ContextOuterClass.Uuid(this); - result.uuid_ = uuid_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Uuid) { - return mergeFrom((context.ContextOuterClass.Uuid)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Uuid other) { - if (other == context.ContextOuterClass.Uuid.getDefaultInstance()) return this; - if (!other.getUuid().isEmpty()) { - uuid_ = other.uuid_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Uuid) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uuid_ = ""; - /** - * string uuid = 1; - * @return The uuid. - */ - public java.lang.String getUuid() { - java.lang.Object ref = uuid_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uuid_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string uuid = 1; - * @return The bytes for uuid. - */ - public com.google.protobuf.ByteString - getUuidBytes() { - java.lang.Object ref = uuid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uuid_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string uuid = 1; - * @param value The uuid to set. - * @return This builder for chaining. - */ - public Builder setUuid( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uuid_ = value; - onChanged(); - return this; - } - /** - * string uuid = 1; - * @return This builder for chaining. - */ - public Builder clearUuid() { - - uuid_ = getDefaultInstance().getUuid(); - onChanged(); - return this; - } - /** - * string uuid = 1; - * @param value The bytes for uuid to set. - * @return This builder for chaining. - */ - public Builder setUuidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uuid_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Uuid) - } + @java.lang.Override + public context.ContextOuterClass.Empty getDefaultInstanceForType() { + return context.ContextOuterClass.Empty.getDefaultInstance(); + } - // @@protoc_insertion_point(class_scope:context.Uuid) - private static final context.ContextOuterClass.Uuid DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Uuid(); - } + @java.lang.Override + public context.ContextOuterClass.Empty build() { + context.ContextOuterClass.Empty result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static context.ContextOuterClass.Uuid getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public context.ContextOuterClass.Empty buildPartial() { + context.ContextOuterClass.Empty result = new context.ContextOuterClass.Empty(this); + onBuilt(); + return result; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @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 context.ContextOuterClass.Uuid getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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); + } - public interface TimestampOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Timestamp) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - /** - * double timestamp = 1; - * @return The timestamp. - */ - double getTimestamp(); - } - /** - * Protobuf type {@code context.Timestamp} - */ - public static final class Timestamp extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Timestamp) - TimestampOrBuilder { - private static final long serialVersionUID = 0L; - // Use Timestamp.newBuilder() to construct. - private Timestamp(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Timestamp() { - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Timestamp(); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Empty) { + return mergeFrom((context.ContextOuterClass.Empty) other); + } else { + super.mergeFrom(other); + return this; + } + } - @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; - } + public Builder mergeFrom(context.ContextOuterClass.Empty other) { + if (other == context.ContextOuterClass.Empty.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Timestamp_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Timestamp.class, context.ContextOuterClass.Timestamp.Builder.class); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static final int TIMESTAMP_FIELD_NUMBER = 1; - private double timestamp_; - /** - * double timestamp = 1; - * @return The timestamp. - */ - @java.lang.Override - public double getTimestamp() { - return timestamp_; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Empty) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Empty) + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (timestamp_ != 0D) { - output.writeDouble(1, timestamp_); - } - unknownFields.writeTo(output); - } + // @@protoc_insertion_point(class_scope:context.Empty) + private static final context.ContextOuterClass.Empty DEFAULT_INSTANCE; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (timestamp_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, timestamp_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Empty(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Timestamp)) { - return super.equals(obj); - } - 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)) return false; - return true; - } + public static context.ContextOuterClass.Empty getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - 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(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static context.ContextOuterClass.Timestamp parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Timestamp parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Timestamp parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Timestamp parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Timestamp parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Timestamp parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Timestamp parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Timestamp parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Timestamp parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Timestamp parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Timestamp parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Timestamp parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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); + } + }; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Timestamp prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Empty getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public interface UuidOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Uuid) + com.google.protobuf.MessageOrBuilder { + + /** + * string uuid = 1; + * @return The uuid. + */ + java.lang.String getUuid(); + + /** + * string uuid = 1; + * @return The bytes for uuid. + */ + com.google.protobuf.ByteString getUuidBytes(); } + /** - * Protobuf type {@code context.Timestamp} + * Protobuf type {@code context.Uuid} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Timestamp) - context.ContextOuterClass.TimestampOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Timestamp_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Timestamp_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Timestamp.class, context.ContextOuterClass.Timestamp.Builder.class); - } - - // 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(); - timestamp_ = 0D; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Timestamp_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Timestamp getDefaultInstanceForType() { - return context.ContextOuterClass.Timestamp.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Timestamp build() { - context.ContextOuterClass.Timestamp result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.Timestamp buildPartial() { - context.ContextOuterClass.Timestamp result = new context.ContextOuterClass.Timestamp(this); - result.timestamp_ = timestamp_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Timestamp) { - return mergeFrom((context.ContextOuterClass.Timestamp)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Timestamp other) { - if (other == context.ContextOuterClass.Timestamp.getDefaultInstance()) return this; - if (other.getTimestamp() != 0D) { - setTimestamp(other.getTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Timestamp) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double timestamp_ ; - /** - * double timestamp = 1; - * @return The timestamp. - */ - @java.lang.Override - public double getTimestamp() { - return timestamp_; - } - /** - * double timestamp = 1; - * @param value The timestamp to set. - * @return This builder for chaining. - */ - public Builder setTimestamp(double value) { - - timestamp_ = value; - onChanged(); - return this; - } - /** - * double timestamp = 1; - * @return This builder for chaining. - */ - public Builder clearTimestamp() { - - timestamp_ = 0D; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Timestamp) - } + public static final class Uuid extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Uuid) + UuidOrBuilder { - // @@protoc_insertion_point(class_scope:context.Timestamp) - private static final context.ContextOuterClass.Timestamp DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Timestamp(); - } + private static final long serialVersionUID = 0L; - public static context.ContextOuterClass.Timestamp getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Use Uuid.newBuilder() to construct. + private Uuid(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private Uuid() { + uuid_ = ""; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Uuid(); + } - @java.lang.Override - public context.ContextOuterClass.Timestamp getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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 interface EventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Event) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Uuid_descriptor; + } - /** - * .context.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 1; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 1; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Uuid_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Uuid.class, context.ContextOuterClass.Uuid.Builder.class); + } - /** - * .context.EventTypeEnum event_type = 2; - * @return The enum numeric value on the wire for eventType. - */ - int getEventTypeValue(); - /** - * .context.EventTypeEnum event_type = 2; - * @return The eventType. - */ - context.ContextOuterClass.EventTypeEnum getEventType(); - } - /** - * Protobuf type {@code context.Event} - */ - public static final class Event extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Event) - EventOrBuilder { - private static final long serialVersionUID = 0L; - // Use Event.newBuilder() to construct. - private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Event() { - eventType_ = 0; - } + public static final int UUID_FIELD_NUMBER = 1; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Event(); - } + private volatile java.lang.Object uuid_; - @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; - } + /** + * string uuid = 1; + * @return The uuid. + */ + @java.lang.Override + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + 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(); + uuid_ = s; + return s; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Event_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Event.class, context.ContextOuterClass.Event.Builder.class); - } + /** + * string uuid = 1; + * @return The bytes for uuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static final int TIMESTAMP_FIELD_NUMBER = 1; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 1; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .context.Timestamp timestamp = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } + private byte memoizedIsInitialized = -1; - public static final int EVENT_TYPE_FIELD_NUMBER = 2; - private int eventType_; - /** - * .context.EventTypeEnum event_type = 2; - * @return The enum numeric value on the wire for eventType. - */ - @java.lang.Override public int getEventTypeValue() { - return eventType_; - } - /** - * .context.EventTypeEnum event_type = 2; - * @return The eventType. - */ - @java.lang.Override public context.ContextOuterClass.EventTypeEnum getEventType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.valueOf(eventType_); - return result == null ? context.ContextOuterClass.EventTypeEnum.UNRECOGNIZED : result; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getUuidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uuid_); + } + unknownFields.writeTo(output); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getUuidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uuid_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (timestamp_ != null) { - output.writeMessage(1, getTimestamp()); - } - if (eventType_ != context.ContextOuterClass.EventTypeEnum.EVENTTYPE_UNDEFINED.getNumber()) { - output.writeEnum(2, eventType_); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Uuid)) { + return super.equals(obj); + } + context.ContextOuterClass.Uuid other = (context.ContextOuterClass.Uuid) obj; + if (!getUuid().equals(other.getUuid())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuid().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTimestamp()); - } - if (eventType_ != context.ContextOuterClass.EventTypeEnum.EVENTTYPE_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, eventType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.Uuid parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Event)) { - return super.equals(obj); - } - context.ContextOuterClass.Event other = (context.ContextOuterClass.Event) obj; - - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (eventType_ != other.eventType_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.Uuid parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - hash = (37 * hash) + EVENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + eventType_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.Uuid parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static context.ContextOuterClass.Event parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Event parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Event parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Event parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Event parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Event parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Event parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Event parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Event parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Event parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Event parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Event parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.Uuid parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Event prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.Uuid parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Event} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Event) - context.ContextOuterClass.EventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Event_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Event_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Event.class, context.ContextOuterClass.Event.Builder.class); - } - - // 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; - timestampBuilder_ = null; - } - eventType_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Event_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Event getDefaultInstanceForType() { - return context.ContextOuterClass.Event.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Event build() { - context.ContextOuterClass.Event result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Event) { - return mergeFrom((context.ContextOuterClass.Event)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Event other) { - if (other == context.ContextOuterClass.Event.getDefaultInstance()) return this; - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - if (other.eventType_ != 0) { - setEventTypeValue(other.getEventTypeValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Event) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; - /** - * .context.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 1; - * @return The timestamp. - */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .context.Timestamp timestamp = 1; - */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - * .context.Timestamp timestamp = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - - private int eventType_ = 0; - /** - * .context.EventTypeEnum event_type = 2; - * @return The enum numeric value on the wire for eventType. - */ - @java.lang.Override public int getEventTypeValue() { - return eventType_; - } - /** - * .context.EventTypeEnum event_type = 2; - * @param value The enum numeric value on the wire for eventType to set. - * @return This builder for chaining. - */ - public Builder setEventTypeValue(int value) { - - eventType_ = value; - onChanged(); - return this; - } - /** - * .context.EventTypeEnum event_type = 2; - * @return The eventType. - */ - @java.lang.Override - public context.ContextOuterClass.EventTypeEnum getEventType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.valueOf(eventType_); - return result == null ? context.ContextOuterClass.EventTypeEnum.UNRECOGNIZED : result; - } - /** - * .context.EventTypeEnum event_type = 2; - * @param value The eventType to set. - * @return This builder for chaining. - */ - public Builder setEventType(context.ContextOuterClass.EventTypeEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - eventType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.EventTypeEnum event_type = 2; - * @return This builder for chaining. - */ - public Builder clearEventType() { - - eventType_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Event) - } + public static context.ContextOuterClass.Uuid parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:context.Event) - private static final context.ContextOuterClass.Event DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Event(); - } + public static context.ContextOuterClass.Uuid parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static context.ContextOuterClass.Event getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Uuid parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.Uuid parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.Uuid parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public context.ContextOuterClass.Event getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Uuid parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - } + public static context.ContextOuterClass.Uuid parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public interface ContextIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ContextId) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - /** - * .context.Uuid context_uuid = 1; - * @return Whether the contextUuid field is set. - */ - boolean hasContextUuid(); - /** - * .context.Uuid context_uuid = 1; - * @return The contextUuid. - */ - context.ContextOuterClass.Uuid getContextUuid(); - /** - * .context.Uuid context_uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder(); - } - /** - *
-   * ----- Context -------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.ContextId} - */ - public static final class ContextId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ContextId) - ContextIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use ContextId.newBuilder() to construct. - private ContextId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ContextId() { - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ContextId(); - } + public static Builder newBuilder(context.ContextOuterClass.Uuid prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @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; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextId.class, context.ContextOuterClass.ContextId.Builder.class); - } - - public static final int CONTEXT_UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid contextUuid_; - /** - * .context.Uuid context_uuid = 1; - * @return Whether the contextUuid field is set. - */ - @java.lang.Override - public boolean hasContextUuid() { - return contextUuid_ != null; - } - /** - * .context.Uuid context_uuid = 1; - * @return The contextUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getContextUuid() { - return contextUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; - } - /** - * .context.Uuid context_uuid = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder() { - return getContextUuid(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - memoizedIsInitialized = 1; - return true; - } + /** + * Protobuf type {@code context.Uuid} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Uuid) + context.ContextOuterClass.UuidOrBuilder { - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextUuid_ != null) { - output.writeMessage(1, getContextUuid()); - } - unknownFields.writeTo(output); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Uuid_descriptor; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Uuid_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Uuid.class, context.ContextOuterClass.Uuid.Builder.class); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ContextId)) { - return super.equals(obj); - } - context.ContextOuterClass.ContextId other = (context.ContextOuterClass.ContextId) obj; - - if (hasContextUuid() != other.hasContextUuid()) return false; - if (hasContextUuid()) { - if (!getContextUuid() - .equals(other.getContextUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + // Construct using context.ContextOuterClass.Uuid.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextUuid()) { - hash = (37 * hash) + CONTEXT_UUID_FIELD_NUMBER; - hash = (53 * hash) + getContextUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public static context.ContextOuterClass.ContextId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ContextId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder clear() { + super.clear(); + uuid_ = ""; + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Context -------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.ContextId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ContextId) - context.ContextOuterClass.ContextIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ContextId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextId.class, context.ContextOuterClass.ContextId.Builder.class); - } - - // 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; - contextUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ContextId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ContextId getDefaultInstanceForType() { - return context.ContextOuterClass.ContextId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ContextId build() { - context.ContextOuterClass.ContextId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ContextId) { - return mergeFrom((context.ContextOuterClass.ContextId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ContextId other) { - if (other == context.ContextOuterClass.ContextId.getDefaultInstance()) return this; - if (other.hasContextUuid()) { - mergeContextUuid(other.getContextUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid contextUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> contextUuidBuilder_; - /** - * .context.Uuid context_uuid = 1; - * @return Whether the contextUuid field is set. - */ - public boolean hasContextUuid() { - return contextUuidBuilder_ != null || contextUuid_ != null; - } - /** - * .context.Uuid context_uuid = 1; - * @return The contextUuid. - */ - public context.ContextOuterClass.Uuid getContextUuid() { - if (contextUuidBuilder_ == null) { - return contextUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; - } else { - return contextUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid context_uuid = 1; - */ - public Builder setContextUuid(context.ContextOuterClass.Uuid value) { - if (contextUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextUuid_ = value; - onChanged(); - } else { - contextUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid context_uuid = 1; - */ - public Builder setContextUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (contextUuidBuilder_ == null) { - contextUuid_ = builderForValue.build(); - onChanged(); - } else { - contextUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid context_uuid = 1; - */ - public Builder mergeContextUuid(context.ContextOuterClass.Uuid value) { - if (contextUuidBuilder_ == null) { - if (contextUuid_ != null) { - contextUuid_ = - context.ContextOuterClass.Uuid.newBuilder(contextUuid_).mergeFrom(value).buildPartial(); - } else { - contextUuid_ = value; - } - onChanged(); - } else { - contextUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid context_uuid = 1; - */ - public Builder clearContextUuid() { - if (contextUuidBuilder_ == null) { - contextUuid_ = null; - onChanged(); - } else { - contextUuid_ = null; - contextUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid context_uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getContextUuidBuilder() { - - onChanged(); - return getContextUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid context_uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder() { - if (contextUuidBuilder_ != null) { - return contextUuidBuilder_.getMessageOrBuilder(); - } else { - return contextUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; - } - } - /** - * .context.Uuid context_uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getContextUuidFieldBuilder() { - if (contextUuidBuilder_ == null) { - contextUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getContextUuid(), - getParentForChildren(), - isClean()); - contextUuid_ = null; - } - return contextUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ContextId) - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Uuid_descriptor; + } - // @@protoc_insertion_point(class_scope:context.ContextId) - private static final context.ContextOuterClass.ContextId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ContextId(); - } + @java.lang.Override + public context.ContextOuterClass.Uuid getDefaultInstanceForType() { + return context.ContextOuterClass.Uuid.getDefaultInstance(); + } - public static context.ContextOuterClass.ContextId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public context.ContextOuterClass.Uuid build() { + context.ContextOuterClass.Uuid result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public context.ContextOuterClass.Uuid buildPartial() { + context.ContextOuterClass.Uuid result = new context.ContextOuterClass.Uuid(this); + result.uuid_ = uuid_; + onBuilt(); + return result; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public context.ContextOuterClass.ContextId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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); + } - public interface ContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Context) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - java.util.List - getTopologyIdsList(); - /** - * repeated .context.TopologyId topology_ids = 3; - */ - context.ContextOuterClass.TopologyId getTopologyIds(int index); - /** - * repeated .context.TopologyId topology_ids = 3; - */ - int getTopologyIdsCount(); - /** - * repeated .context.TopologyId topology_ids = 3; - */ - java.util.List - getTopologyIdsOrBuilderList(); - /** - * repeated .context.TopologyId topology_ids = 3; - */ - context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder( - int index); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Uuid) { + return mergeFrom((context.ContextOuterClass.Uuid) other); + } else { + super.mergeFrom(other); + return this; + } + } - /** - * repeated .context.ServiceId service_ids = 4; - */ - java.util.List - getServiceIdsList(); - /** - * repeated .context.ServiceId service_ids = 4; - */ - context.ContextOuterClass.ServiceId getServiceIds(int index); - /** - * repeated .context.ServiceId service_ids = 4; - */ - int getServiceIdsCount(); - /** - * repeated .context.ServiceId service_ids = 4; - */ - java.util.List - getServiceIdsOrBuilderList(); - /** - * repeated .context.ServiceId service_ids = 4; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder( - int index); + public Builder mergeFrom(context.ContextOuterClass.Uuid other) { + if (other == context.ContextOuterClass.Uuid.getDefaultInstance()) + return this; + if (!other.getUuid().isEmpty()) { + uuid_ = other.uuid_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - /** - * repeated .context.SliceId slice_ids = 5; - */ - java.util.List - getSliceIdsList(); - /** - * repeated .context.SliceId slice_ids = 5; - */ - context.ContextOuterClass.SliceId getSliceIds(int index); - /** - * repeated .context.SliceId slice_ids = 5; - */ - int getSliceIdsCount(); - /** - * repeated .context.SliceId slice_ids = 5; - */ - java.util.List - getSliceIdsOrBuilderList(); - /** - * repeated .context.SliceId slice_ids = 5; - */ - context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder( - int index); + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * .context.TeraFlowController controller = 6; - * @return Whether the controller field is set. - */ - boolean hasController(); - /** - * .context.TeraFlowController controller = 6; - * @return The controller. - */ - context.ContextOuterClass.TeraFlowController getController(); - /** - * .context.TeraFlowController controller = 6; - */ - context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder(); - } - /** - * Protobuf type {@code context.Context} - */ - public static final class Context extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Context) - ContextOrBuilder { - private static final long serialVersionUID = 0L; - // Use Context.newBuilder() to construct. - private Context(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Context() { - name_ = ""; - topologyIds_ = java.util.Collections.emptyList(); - serviceIds_ = java.util.Collections.emptyList(); - sliceIds_ = java.util.Collections.emptyList(); - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Uuid) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Context(); - } + private java.lang.Object uuid_ = ""; + + /** + * string uuid = 1; + * @return The uuid. + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @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(); - 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(); - 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(); - 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; - } + /** + * string uuid = 1; + * @return The bytes for uuid. + */ + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Context_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Context.class, context.ContextOuterClass.Context.Builder.class); - } + /** + * string uuid = 1; + * @param value The uuid to set. + * @return This builder for chaining. + */ + public Builder setUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uuid_ = value; + onChanged(); + return this; + } - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - /** - * .context.ContextId context_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + /** + * string uuid = 1; + * @return This builder for chaining. + */ + public Builder clearUuid() { + uuid_ = getDefaultInstance().getUuid(); + onChanged(); + return this; + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * string uuid = 1; + * @param value The bytes for uuid to set. + * @return This builder for chaining. + */ + public Builder setUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uuid_ = value; + onChanged(); + return this; + } - public static final int TOPOLOGY_IDS_FIELD_NUMBER = 3; - private java.util.List topologyIds_; - /** - * repeated .context.TopologyId topology_ids = 3; - */ - @java.lang.Override - public java.util.List getTopologyIdsList() { - return topologyIds_; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - @java.lang.Override - public java.util.List - getTopologyIdsOrBuilderList() { - return topologyIds_; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - @java.lang.Override - public int getTopologyIdsCount() { - return topologyIds_.size(); - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyId getTopologyIds(int index) { - return topologyIds_.get(index); - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder( - int index) { - return topologyIds_.get(index); - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public static final int SERVICE_IDS_FIELD_NUMBER = 4; - private java.util.List serviceIds_; - /** - * repeated .context.ServiceId service_ids = 4; - */ - @java.lang.Override - public java.util.List getServiceIdsList() { - return serviceIds_; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - @java.lang.Override - public java.util.List - getServiceIdsOrBuilderList() { - return serviceIds_; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - @java.lang.Override - public int getServiceIdsCount() { - return serviceIds_.size(); - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceIds(int index) { - return serviceIds_.get(index); - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder( - int index) { - return serviceIds_.get(index); - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Uuid) + } - public static final int SLICE_IDS_FIELD_NUMBER = 5; - private java.util.List sliceIds_; - /** - * repeated .context.SliceId slice_ids = 5; - */ - @java.lang.Override - public java.util.List getSliceIdsList() { - return sliceIds_; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - @java.lang.Override - public java.util.List - getSliceIdsOrBuilderList() { - return sliceIds_; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - @java.lang.Override - public int getSliceIdsCount() { - return sliceIds_.size(); - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - @java.lang.Override - public context.ContextOuterClass.SliceId getSliceIds(int index) { - return sliceIds_.get(index); - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder( - int index) { - return sliceIds_.get(index); - } + // @@protoc_insertion_point(class_scope:context.Uuid) + private static final context.ContextOuterClass.Uuid DEFAULT_INSTANCE; - public static final int CONTROLLER_FIELD_NUMBER = 6; - private context.ContextOuterClass.TeraFlowController controller_; - /** - * .context.TeraFlowController controller = 6; - * @return Whether the controller field is set. - */ - @java.lang.Override - public boolean hasController() { - return controller_ != null; - } - /** - * .context.TeraFlowController controller = 6; - * @return The controller. - */ - @java.lang.Override - public context.ContextOuterClass.TeraFlowController getController() { - return controller_ == null ? context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; - } - /** - * .context.TeraFlowController controller = 6; - */ - @java.lang.Override - public context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder() { - return getController(); - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Uuid(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.Uuid getDefaultInstance() { + return DEFAULT_INSTANCE; + } - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - for (int i = 0; i < topologyIds_.size(); i++) { - output.writeMessage(3, topologyIds_.get(i)); - } - for (int i = 0; i < serviceIds_.size(); i++) { - output.writeMessage(4, serviceIds_.get(i)); - } - for (int i = 0; i < sliceIds_.size(); i++) { - output.writeMessage(5, sliceIds_.get(i)); - } - if (controller_ != null) { - output.writeMessage(6, getController()); - } - unknownFields.writeTo(output); - } + @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); + } + }; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - for (int i = 0; i < topologyIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, topologyIds_.get(i)); - } - for (int i = 0; i < serviceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, serviceIds_.get(i)); - } - for (int i = 0; i < sliceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, sliceIds_.get(i)); - } - if (controller_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getController()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Context)) { - return super.equals(obj); - } - context.ContextOuterClass.Context other = (context.ContextOuterClass.Context) obj; - - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getTopologyIdsList() - .equals(other.getTopologyIdsList())) return false; - if (!getServiceIdsList() - .equals(other.getServiceIdsList())) return false; - if (!getSliceIdsList() - .equals(other.getSliceIdsList())) return false; - if (hasController() != other.hasController()) return false; - if (hasController()) { - if (!getController() - .equals(other.getController())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getTopologyIdsCount() > 0) { - hash = (37 * hash) + TOPOLOGY_IDS_FIELD_NUMBER; - hash = (53 * hash) + getTopologyIdsList().hashCode(); - } - if (getServiceIdsCount() > 0) { - hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getServiceIdsList().hashCode(); - } - if (getSliceIdsCount() > 0) { - hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSliceIdsList().hashCode(); - } - if (hasController()) { - hash = (37 * hash) + CONTROLLER_FIELD_NUMBER; - hash = (53 * hash) + getController().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; + @java.lang.Override + public context.ContextOuterClass.Uuid getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static context.ContextOuterClass.Context parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Context parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Context parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Context parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Context parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Context parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Context parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Context parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Context parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Context parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Context parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Context parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public interface TimestampOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Timestamp) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Context prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * double timestamp = 1; + * @return The timestamp. + */ + double getTimestamp(); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** - * Protobuf type {@code context.Context} + * Protobuf type {@code context.Timestamp} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Context) - context.ContextOuterClass.ContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Context_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Context_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Context.class, context.ContextOuterClass.Context.Builder.class); - } - - // 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; - contextIdBuilder_ = null; - } - name_ = ""; - - if (topologyIdsBuilder_ == null) { - topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - topologyIdsBuilder_.clear(); - } - if (serviceIdsBuilder_ == null) { - serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - serviceIdsBuilder_.clear(); - } - if (sliceIdsBuilder_ == null) { - sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - sliceIdsBuilder_.clear(); - } - if (controllerBuilder_ == null) { - controller_ = null; - } else { - controller_ = null; - controllerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Context_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Context getDefaultInstanceForType() { - return context.ContextOuterClass.Context.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Context build() { - context.ContextOuterClass.Context result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - if (topologyIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.topologyIds_ = topologyIds_; - } else { - result.topologyIds_ = topologyIdsBuilder_.build(); - } - if (serviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.serviceIds_ = serviceIds_; - } else { - result.serviceIds_ = serviceIdsBuilder_.build(); - } - if (sliceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); - bitField0_ = (bitField0_ & ~0x00000004); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Context) { - return mergeFrom((context.ContextOuterClass.Context)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Context other) { - if (other == context.ContextOuterClass.Context.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (topologyIdsBuilder_ == null) { - if (!other.topologyIds_.isEmpty()) { - if (topologyIds_.isEmpty()) { - topologyIds_ = other.topologyIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTopologyIdsIsMutable(); - topologyIds_.addAll(other.topologyIds_); - } - onChanged(); - } - } else { - if (!other.topologyIds_.isEmpty()) { - if (topologyIdsBuilder_.isEmpty()) { - topologyIdsBuilder_.dispose(); - topologyIdsBuilder_ = null; - topologyIds_ = other.topologyIds_; - bitField0_ = (bitField0_ & ~0x00000001); - topologyIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTopologyIdsFieldBuilder() : null; - } else { - topologyIdsBuilder_.addAllMessages(other.topologyIds_); - } - } - } - if (serviceIdsBuilder_ == null) { - if (!other.serviceIds_.isEmpty()) { - if (serviceIds_.isEmpty()) { - serviceIds_ = other.serviceIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureServiceIdsIsMutable(); - serviceIds_.addAll(other.serviceIds_); - } - onChanged(); - } - } else { - if (!other.serviceIds_.isEmpty()) { - if (serviceIdsBuilder_.isEmpty()) { - serviceIdsBuilder_.dispose(); - serviceIdsBuilder_ = null; - serviceIds_ = other.serviceIds_; - bitField0_ = (bitField0_ & ~0x00000002); - serviceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getServiceIdsFieldBuilder() : null; - } else { - serviceIdsBuilder_.addAllMessages(other.serviceIds_); - } - } - } - if (sliceIdsBuilder_ == null) { - if (!other.sliceIds_.isEmpty()) { - if (sliceIds_.isEmpty()) { - sliceIds_ = other.sliceIds_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureSliceIdsIsMutable(); - sliceIds_.addAll(other.sliceIds_); - } - onChanged(); - } - } else { - if (!other.sliceIds_.isEmpty()) { - if (sliceIdsBuilder_.isEmpty()) { - sliceIdsBuilder_.dispose(); - sliceIdsBuilder_ = null; - sliceIds_ = other.sliceIds_; - bitField0_ = (bitField0_ & ~0x00000004); - sliceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSliceIdsFieldBuilder() : null; - } else { - sliceIdsBuilder_.addAllMessages(other.sliceIds_); - } - } - } - if (other.hasController()) { - mergeController(other.getController()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Context) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List topologyIds_ = - java.util.Collections.emptyList(); - private void ensureTopologyIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - topologyIds_ = new java.util.ArrayList(topologyIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> topologyIdsBuilder_; - - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public java.util.List getTopologyIdsList() { - if (topologyIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(topologyIds_); - } else { - return topologyIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public int getTopologyIdsCount() { - if (topologyIdsBuilder_ == null) { - return topologyIds_.size(); - } else { - return topologyIdsBuilder_.getCount(); - } - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public context.ContextOuterClass.TopologyId getTopologyIds(int index) { - if (topologyIdsBuilder_ == null) { - return topologyIds_.get(index); - } else { - return topologyIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder setTopologyIds( - int index, context.ContextOuterClass.TopologyId value) { - if (topologyIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologyIdsIsMutable(); - topologyIds_.set(index, value); - onChanged(); - } else { - topologyIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder setTopologyIds( - int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.set(index, builderForValue.build()); - onChanged(); - } else { - topologyIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder addTopologyIds(context.ContextOuterClass.TopologyId value) { - if (topologyIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologyIdsIsMutable(); - topologyIds_.add(value); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder addTopologyIds( - int index, context.ContextOuterClass.TopologyId value) { - if (topologyIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologyIdsIsMutable(); - topologyIds_.add(index, value); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder addTopologyIds( - context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.add(builderForValue.build()); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder addTopologyIds( - int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.add(index, builderForValue.build()); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder addAllTopologyIds( - java.lang.Iterable values) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, topologyIds_); - onChanged(); - } else { - topologyIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder clearTopologyIds() { - if (topologyIdsBuilder_ == null) { - topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - topologyIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public Builder removeTopologyIds(int index) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.remove(index); - onChanged(); - } else { - topologyIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public context.ContextOuterClass.TopologyId.Builder getTopologyIdsBuilder( - int index) { - return getTopologyIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder( - int index) { - if (topologyIdsBuilder_ == null) { - return topologyIds_.get(index); } else { - return topologyIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public java.util.List - getTopologyIdsOrBuilderList() { - if (topologyIdsBuilder_ != null) { - return topologyIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(topologyIds_); - } - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder() { - return getTopologyIdsFieldBuilder().addBuilder( - context.ContextOuterClass.TopologyId.getDefaultInstance()); - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder( - int index) { - return getTopologyIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.TopologyId.getDefaultInstance()); - } - /** - * repeated .context.TopologyId topology_ids = 3; - */ - public java.util.List - getTopologyIdsBuilderList() { - return getTopologyIdsFieldBuilder().getBuilderList(); - } - 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()); - topologyIds_ = null; - } - return topologyIdsBuilder_; - } - - private java.util.List serviceIds_ = - java.util.Collections.emptyList(); - private void ensureServiceIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - serviceIds_ = new java.util.ArrayList(serviceIds_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdsBuilder_; - - /** - * repeated .context.ServiceId service_ids = 4; - */ - public java.util.List getServiceIdsList() { - if (serviceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(serviceIds_); - } else { - return serviceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public int getServiceIdsCount() { - if (serviceIdsBuilder_ == null) { - return serviceIds_.size(); - } else { - return serviceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public context.ContextOuterClass.ServiceId getServiceIds(int index) { - if (serviceIdsBuilder_ == null) { - return serviceIds_.get(index); - } else { - return serviceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder setServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceIdsIsMutable(); - serviceIds_.set(index, value); - onChanged(); - } else { - serviceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder setServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - serviceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder addServiceIds(context.ContextOuterClass.ServiceId value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceIdsIsMutable(); - serviceIds_.add(value); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder addServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceIdsIsMutable(); - serviceIds_.add(index, value); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder addServiceIds( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.add(builderForValue.build()); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder addServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder addAllServiceIds( - java.lang.Iterable values) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, serviceIds_); - onChanged(); - } else { - serviceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder clearServiceIds() { - if (serviceIdsBuilder_ == null) { - serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - serviceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public Builder removeServiceIds(int index) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.remove(index); - onChanged(); - } else { - serviceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdsBuilder( - int index) { - return getServiceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder( - int index) { - if (serviceIdsBuilder_ == null) { - return serviceIds_.get(index); } else { - return serviceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public java.util.List - getServiceIdsOrBuilderList() { - if (serviceIdsBuilder_ != null) { - return serviceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(serviceIds_); - } - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder() { - return getServiceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder( - int index) { - return getServiceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId service_ids = 4; - */ - public java.util.List - getServiceIdsBuilderList() { - return getServiceIdsFieldBuilder().getBuilderList(); - } - 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()); - serviceIds_ = null; - } - return serviceIdsBuilder_; - } - - private java.util.List sliceIds_ = - java.util.Collections.emptyList(); - private void ensureSliceIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - sliceIds_ = new java.util.ArrayList(sliceIds_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> sliceIdsBuilder_; - - /** - * repeated .context.SliceId slice_ids = 5; - */ - public java.util.List getSliceIdsList() { - if (sliceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sliceIds_); - } else { - return sliceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public int getSliceIdsCount() { - if (sliceIdsBuilder_ == null) { - return sliceIds_.size(); - } else { - return sliceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public context.ContextOuterClass.SliceId getSliceIds(int index) { - if (sliceIdsBuilder_ == null) { - return sliceIds_.get(index); - } else { - return sliceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder setSliceIds( - int index, context.ContextOuterClass.SliceId value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceIdsIsMutable(); - sliceIds_.set(index, value); - onChanged(); - } else { - sliceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder setSliceIds( - int index, context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - sliceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder addSliceIds(context.ContextOuterClass.SliceId value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceIdsIsMutable(); - sliceIds_.add(value); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder addSliceIds( - int index, context.ContextOuterClass.SliceId value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceIdsIsMutable(); - sliceIds_.add(index, value); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder addSliceIds( - context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.add(builderForValue.build()); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder addSliceIds( - int index, context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder addAllSliceIds( - java.lang.Iterable values) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sliceIds_); - onChanged(); - } else { - sliceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder clearSliceIds() { - if (sliceIdsBuilder_ == null) { - sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - sliceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public Builder removeSliceIds(int index) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.remove(index); - onChanged(); - } else { - sliceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public context.ContextOuterClass.SliceId.Builder getSliceIdsBuilder( - int index) { - return getSliceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder( - int index) { - if (sliceIdsBuilder_ == null) { - return sliceIds_.get(index); } else { - return sliceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public java.util.List - getSliceIdsOrBuilderList() { - if (sliceIdsBuilder_ != null) { - return sliceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sliceIds_); - } - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder() { - return getSliceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.SliceId.getDefaultInstance()); - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder( - int index) { - return getSliceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.SliceId.getDefaultInstance()); - } - /** - * repeated .context.SliceId slice_ids = 5; - */ - public java.util.List - getSliceIdsBuilderList() { - return getSliceIdsFieldBuilder().getBuilderList(); - } - 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()); - sliceIds_ = null; - } - return sliceIdsBuilder_; - } - - private context.ContextOuterClass.TeraFlowController controller_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TeraFlowController, context.ContextOuterClass.TeraFlowController.Builder, context.ContextOuterClass.TeraFlowControllerOrBuilder> controllerBuilder_; - /** - * .context.TeraFlowController controller = 6; - * @return Whether the controller field is set. - */ - public boolean hasController() { - return controllerBuilder_ != null || controller_ != null; - } - /** - * .context.TeraFlowController controller = 6; - * @return The controller. - */ - public context.ContextOuterClass.TeraFlowController getController() { - if (controllerBuilder_ == null) { - return controller_ == null ? context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; - } else { - return controllerBuilder_.getMessage(); - } - } - /** - * .context.TeraFlowController controller = 6; - */ - public Builder setController(context.ContextOuterClass.TeraFlowController value) { - if (controllerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - controller_ = value; - onChanged(); - } else { - controllerBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.TeraFlowController controller = 6; - */ - public Builder setController( - context.ContextOuterClass.TeraFlowController.Builder builderForValue) { - if (controllerBuilder_ == null) { - controller_ = builderForValue.build(); - onChanged(); - } else { - controllerBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.TeraFlowController controller = 6; - */ - public Builder mergeController(context.ContextOuterClass.TeraFlowController value) { - if (controllerBuilder_ == null) { - if (controller_ != null) { - controller_ = - context.ContextOuterClass.TeraFlowController.newBuilder(controller_).mergeFrom(value).buildPartial(); - } else { - controller_ = value; - } - onChanged(); - } else { - controllerBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.TeraFlowController controller = 6; - */ - public Builder clearController() { - if (controllerBuilder_ == null) { - controller_ = null; - onChanged(); - } else { - controller_ = null; - controllerBuilder_ = null; - } - - return this; - } - /** - * .context.TeraFlowController controller = 6; - */ - public context.ContextOuterClass.TeraFlowController.Builder getControllerBuilder() { - - onChanged(); - return getControllerFieldBuilder().getBuilder(); - } - /** - * .context.TeraFlowController controller = 6; - */ - public context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder() { - if (controllerBuilder_ != null) { - return controllerBuilder_.getMessageOrBuilder(); - } else { - return controller_ == null ? - context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; - } - } - /** - * .context.TeraFlowController controller = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TeraFlowController, context.ContextOuterClass.TeraFlowController.Builder, context.ContextOuterClass.TeraFlowControllerOrBuilder> - getControllerFieldBuilder() { - if (controllerBuilder_ == null) { - controllerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TeraFlowController, context.ContextOuterClass.TeraFlowController.Builder, context.ContextOuterClass.TeraFlowControllerOrBuilder>( - getController(), - getParentForChildren(), - isClean()); - controller_ = null; - } - return controllerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Context) - } + public static final class Timestamp extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Timestamp) + TimestampOrBuilder { - // @@protoc_insertion_point(class_scope:context.Context) - private static final context.ContextOuterClass.Context DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Context(); - } + private static final long serialVersionUID = 0L; - public static context.ContextOuterClass.Context getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Use Timestamp.newBuilder() to construct. + private Timestamp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private Timestamp() { + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Timestamp(); + } - @java.lang.Override - public context.ContextOuterClass.Context getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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 interface ContextIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ContextIdList) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Timestamp_descriptor; + } - /** - * repeated .context.ContextId context_ids = 1; - */ - java.util.List - getContextIdsList(); - /** - * repeated .context.ContextId context_ids = 1; - */ - context.ContextOuterClass.ContextId getContextIds(int index); - /** - * repeated .context.ContextId context_ids = 1; - */ - int getContextIdsCount(); - /** - * repeated .context.ContextId context_ids = 1; - */ - java.util.List - getContextIdsOrBuilderList(); - /** - * repeated .context.ContextId context_ids = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ContextIdList} - */ - public static final class ContextIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ContextIdList) - ContextIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ContextIdList.newBuilder() to construct. - private ContextIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ContextIdList() { - contextIds_ = java.util.Collections.emptyList(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Timestamp_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Timestamp.class, context.ContextOuterClass.Timestamp.Builder.class); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ContextIdList(); - } + public static final int TIMESTAMP_FIELD_NUMBER = 1; - @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(); - 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; - } + private double timestamp_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextIdList.class, context.ContextOuterClass.ContextIdList.Builder.class); - } + /** + * double timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public double getTimestamp() { + return timestamp_; + } - public static final int CONTEXT_IDS_FIELD_NUMBER = 1; - private java.util.List contextIds_; - /** - * repeated .context.ContextId context_ids = 1; - */ - @java.lang.Override - public java.util.List getContextIdsList() { - return contextIds_; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - @java.lang.Override - public java.util.List - getContextIdsOrBuilderList() { - return contextIds_; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - @java.lang.Override - public int getContextIdsCount() { - return contextIds_.size(); - } - /** - * repeated .context.ContextId context_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextIds(int index) { - return contextIds_.get(index); - } - /** - * repeated .context.ContextId context_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdsOrBuilder( - int index) { - return contextIds_.get(index); - } + private byte memoizedIsInitialized = -1; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (timestamp_ != 0D) { + output.writeDouble(1, timestamp_); + } + unknownFields.writeTo(output); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < contextIds_.size(); i++) { - output.writeMessage(1, contextIds_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (timestamp_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, timestamp_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < contextIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, contextIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Timestamp)) { + return super.equals(obj); + } + 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)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + 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(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ContextIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.ContextIdList other = (context.ContextOuterClass.ContextIdList) obj; - - if (!getContextIdsList() - .equals(other.getContextIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.Timestamp parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getContextIdsCount() > 0) { - hash = (37 * hash) + CONTEXT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getContextIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.Timestamp parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.ContextIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.Timestamp parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ContextIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.Timestamp parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ContextIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ContextIdList) - context.ContextOuterClass.ContextIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ContextIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextIdList.class, context.ContextOuterClass.ContextIdList.Builder.class); - } - - // 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(); - if (contextIdsBuilder_ == null) { - contextIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - contextIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ContextIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ContextIdList getDefaultInstanceForType() { - return context.ContextOuterClass.ContextIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ContextIdList build() { - context.ContextOuterClass.ContextIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ContextIdList buildPartial() { - context.ContextOuterClass.ContextIdList result = new context.ContextOuterClass.ContextIdList(this); - int from_bitField0_ = bitField0_; - if (contextIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - contextIds_ = java.util.Collections.unmodifiableList(contextIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.contextIds_ = contextIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ContextIdList) { - return mergeFrom((context.ContextOuterClass.ContextIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ContextIdList other) { - if (other == context.ContextOuterClass.ContextIdList.getDefaultInstance()) return this; - if (contextIdsBuilder_ == null) { - if (!other.contextIds_.isEmpty()) { - if (contextIds_.isEmpty()) { - contextIds_ = other.contextIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureContextIdsIsMutable(); - contextIds_.addAll(other.contextIds_); - } - onChanged(); - } - } else { - if (!other.contextIds_.isEmpty()) { - if (contextIdsBuilder_.isEmpty()) { - contextIdsBuilder_.dispose(); - contextIdsBuilder_ = null; - contextIds_ = other.contextIds_; - bitField0_ = (bitField0_ & ~0x00000001); - contextIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getContextIdsFieldBuilder() : null; - } else { - contextIdsBuilder_.addAllMessages(other.contextIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List contextIds_ = - java.util.Collections.emptyList(); - private void ensureContextIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - contextIds_ = new java.util.ArrayList(contextIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdsBuilder_; - - /** - * repeated .context.ContextId context_ids = 1; - */ - public java.util.List getContextIdsList() { - if (contextIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(contextIds_); - } else { - return contextIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public int getContextIdsCount() { - if (contextIdsBuilder_ == null) { - return contextIds_.size(); - } else { - return contextIdsBuilder_.getCount(); - } - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public context.ContextOuterClass.ContextId getContextIds(int index) { - if (contextIdsBuilder_ == null) { - return contextIds_.get(index); - } else { - return contextIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder setContextIds( - int index, context.ContextOuterClass.ContextId value) { - if (contextIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContextIdsIsMutable(); - contextIds_.set(index, value); - onChanged(); - } else { - contextIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder setContextIds( - int index, context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdsBuilder_ == null) { - ensureContextIdsIsMutable(); - contextIds_.set(index, builderForValue.build()); - onChanged(); - } else { - contextIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder addContextIds(context.ContextOuterClass.ContextId value) { - if (contextIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContextIdsIsMutable(); - contextIds_.add(value); - onChanged(); - } else { - contextIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder addContextIds( - int index, context.ContextOuterClass.ContextId value) { - if (contextIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContextIdsIsMutable(); - contextIds_.add(index, value); - onChanged(); - } else { - contextIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder addContextIds( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdsBuilder_ == null) { - ensureContextIdsIsMutable(); - contextIds_.add(builderForValue.build()); - onChanged(); - } else { - contextIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder addContextIds( - int index, context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdsBuilder_ == null) { - ensureContextIdsIsMutable(); - contextIds_.add(index, builderForValue.build()); - onChanged(); - } else { - contextIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder addAllContextIds( - java.lang.Iterable values) { - if (contextIdsBuilder_ == null) { - ensureContextIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, contextIds_); - onChanged(); - } else { - contextIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder clearContextIds() { - if (contextIdsBuilder_ == null) { - contextIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - contextIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public Builder removeContextIds(int index) { - if (contextIdsBuilder_ == null) { - ensureContextIdsIsMutable(); - contextIds_.remove(index); - onChanged(); - } else { - contextIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdsBuilder( - int index) { - return getContextIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdsOrBuilder( - int index) { - if (contextIdsBuilder_ == null) { - return contextIds_.get(index); } else { - return contextIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public java.util.List - getContextIdsOrBuilderList() { - if (contextIdsBuilder_ != null) { - return contextIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(contextIds_); - } - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public context.ContextOuterClass.ContextId.Builder addContextIdsBuilder() { - return getContextIdsFieldBuilder().addBuilder( - context.ContextOuterClass.ContextId.getDefaultInstance()); - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public context.ContextOuterClass.ContextId.Builder addContextIdsBuilder( - int index) { - return getContextIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.ContextId.getDefaultInstance()); - } - /** - * repeated .context.ContextId context_ids = 1; - */ - public java.util.List - getContextIdsBuilderList() { - return getContextIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdsFieldBuilder() { - if (contextIdsBuilder_ == null) { - contextIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - contextIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - contextIds_ = null; - } - return contextIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ContextIdList) - } + public static context.ContextOuterClass.Timestamp parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(class_scope:context.ContextIdList) - private static final context.ContextOuterClass.ContextIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ContextIdList(); - } + public static context.ContextOuterClass.Timestamp parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.ContextIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Timestamp parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.Timestamp parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.Timestamp parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public context.ContextOuterClass.ContextIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Timestamp parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - } + public static context.ContextOuterClass.Timestamp parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public interface ContextListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ContextList) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.Timestamp parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - /** - * repeated .context.Context contexts = 1; - */ - java.util.List - getContextsList(); - /** - * repeated .context.Context contexts = 1; - */ - context.ContextOuterClass.Context getContexts(int index); - /** - * repeated .context.Context contexts = 1; - */ - int getContextsCount(); - /** - * repeated .context.Context contexts = 1; - */ - java.util.List - getContextsOrBuilderList(); - /** - * repeated .context.Context contexts = 1; - */ - context.ContextOuterClass.ContextOrBuilder getContextsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ContextList} - */ - public static final class ContextList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ContextList) - ContextListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ContextList.newBuilder() to construct. - private ContextList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ContextList() { - contexts_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ContextList(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @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(); - 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; - } + public static Builder newBuilder(context.ContextOuterClass.Timestamp prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextList.class, context.ContextOuterClass.ContextList.Builder.class); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static final int CONTEXTS_FIELD_NUMBER = 1; - private java.util.List contexts_; - /** - * repeated .context.Context contexts = 1; - */ - @java.lang.Override - public java.util.List getContextsList() { - return contexts_; - } - /** - * repeated .context.Context contexts = 1; - */ - @java.lang.Override - public java.util.List - getContextsOrBuilderList() { - return contexts_; - } - /** - * repeated .context.Context contexts = 1; - */ - @java.lang.Override - public int getContextsCount() { - return contexts_.size(); - } - /** - * repeated .context.Context contexts = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Context getContexts(int index) { - return contexts_.get(index); - } - /** - * repeated .context.Context contexts = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextOrBuilder getContextsOrBuilder( - int index) { - return contexts_.get(index); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * Protobuf type {@code context.Timestamp} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Timestamp) + context.ContextOuterClass.TimestampOrBuilder { - memoizedIsInitialized = 1; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Timestamp_descriptor; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < contexts_.size(); i++) { - output.writeMessage(1, contexts_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Timestamp_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Timestamp.class, context.ContextOuterClass.Timestamp.Builder.class); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < contexts_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, contexts_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + // Construct using context.ContextOuterClass.Timestamp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ContextList)) { - return super.equals(obj); - } - context.ContextOuterClass.ContextList other = (context.ContextOuterClass.ContextList) obj; - - if (!getContextsList() - .equals(other.getContextsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getContextsCount() > 0) { - hash = (37 * hash) + CONTEXTS_FIELD_NUMBER; - hash = (53 * hash) + getContextsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - public static context.ContextOuterClass.ContextList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clear() { + super.clear(); + timestamp_ = 0D; + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ContextList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Timestamp_descriptor; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ContextList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ContextList) - context.ContextOuterClass.ContextListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ContextList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextList.class, context.ContextOuterClass.ContextList.Builder.class); - } - - // 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(); - if (contextsBuilder_ == null) { - contexts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - contextsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ContextList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ContextList getDefaultInstanceForType() { - return context.ContextOuterClass.ContextList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ContextList build() { - context.ContextOuterClass.ContextList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ContextList buildPartial() { - context.ContextOuterClass.ContextList result = new context.ContextOuterClass.ContextList(this); - int from_bitField0_ = bitField0_; - if (contextsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - contexts_ = java.util.Collections.unmodifiableList(contexts_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.contexts_ = contexts_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ContextList) { - return mergeFrom((context.ContextOuterClass.ContextList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ContextList other) { - if (other == context.ContextOuterClass.ContextList.getDefaultInstance()) return this; - if (contextsBuilder_ == null) { - if (!other.contexts_.isEmpty()) { - if (contexts_.isEmpty()) { - contexts_ = other.contexts_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureContextsIsMutable(); - contexts_.addAll(other.contexts_); - } - onChanged(); - } - } else { - if (!other.contexts_.isEmpty()) { - if (contextsBuilder_.isEmpty()) { - contextsBuilder_.dispose(); - contextsBuilder_ = null; - contexts_ = other.contexts_; - bitField0_ = (bitField0_ & ~0x00000001); - contextsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getContextsFieldBuilder() : null; - } else { - contextsBuilder_.addAllMessages(other.contexts_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List contexts_ = - java.util.Collections.emptyList(); - private void ensureContextsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - contexts_ = new java.util.ArrayList(contexts_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Context, context.ContextOuterClass.Context.Builder, context.ContextOuterClass.ContextOrBuilder> contextsBuilder_; - - /** - * repeated .context.Context contexts = 1; - */ - public java.util.List getContextsList() { - if (contextsBuilder_ == null) { - return java.util.Collections.unmodifiableList(contexts_); - } else { - return contextsBuilder_.getMessageList(); - } - } - /** - * repeated .context.Context contexts = 1; - */ - public int getContextsCount() { - if (contextsBuilder_ == null) { - return contexts_.size(); - } else { - return contextsBuilder_.getCount(); - } - } - /** - * repeated .context.Context contexts = 1; - */ - public context.ContextOuterClass.Context getContexts(int index) { - if (contextsBuilder_ == null) { - return contexts_.get(index); - } else { - return contextsBuilder_.getMessage(index); - } - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder setContexts( - int index, context.ContextOuterClass.Context value) { - if (contextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContextsIsMutable(); - contexts_.set(index, value); - onChanged(); - } else { - contextsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder setContexts( - int index, context.ContextOuterClass.Context.Builder builderForValue) { - if (contextsBuilder_ == null) { - ensureContextsIsMutable(); - contexts_.set(index, builderForValue.build()); - onChanged(); - } else { - contextsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder addContexts(context.ContextOuterClass.Context value) { - if (contextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContextsIsMutable(); - contexts_.add(value); - onChanged(); - } else { - contextsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder addContexts( - int index, context.ContextOuterClass.Context value) { - if (contextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContextsIsMutable(); - contexts_.add(index, value); - onChanged(); - } else { - contextsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder addContexts( - context.ContextOuterClass.Context.Builder builderForValue) { - if (contextsBuilder_ == null) { - ensureContextsIsMutable(); - contexts_.add(builderForValue.build()); - onChanged(); - } else { - contextsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder addContexts( - int index, context.ContextOuterClass.Context.Builder builderForValue) { - if (contextsBuilder_ == null) { - ensureContextsIsMutable(); - contexts_.add(index, builderForValue.build()); - onChanged(); - } else { - contextsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder addAllContexts( - java.lang.Iterable values) { - if (contextsBuilder_ == null) { - ensureContextsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, contexts_); - onChanged(); - } else { - contextsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder clearContexts() { - if (contextsBuilder_ == null) { - contexts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - contextsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public Builder removeContexts(int index) { - if (contextsBuilder_ == null) { - ensureContextsIsMutable(); - contexts_.remove(index); - onChanged(); - } else { - contextsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Context contexts = 1; - */ - public context.ContextOuterClass.Context.Builder getContextsBuilder( - int index) { - return getContextsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Context contexts = 1; - */ - public context.ContextOuterClass.ContextOrBuilder getContextsOrBuilder( - int index) { - if (contextsBuilder_ == null) { - return contexts_.get(index); } else { - return contextsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Context contexts = 1; - */ - public java.util.List - getContextsOrBuilderList() { - if (contextsBuilder_ != null) { - return contextsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(contexts_); - } - } - /** - * repeated .context.Context contexts = 1; - */ - public context.ContextOuterClass.Context.Builder addContextsBuilder() { - return getContextsFieldBuilder().addBuilder( - context.ContextOuterClass.Context.getDefaultInstance()); - } - /** - * repeated .context.Context contexts = 1; - */ - public context.ContextOuterClass.Context.Builder addContextsBuilder( - int index) { - return getContextsFieldBuilder().addBuilder( - index, context.ContextOuterClass.Context.getDefaultInstance()); - } - /** - * repeated .context.Context contexts = 1; - */ - public java.util.List - getContextsBuilderList() { - return getContextsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Context, context.ContextOuterClass.Context.Builder, context.ContextOuterClass.ContextOrBuilder> - getContextsFieldBuilder() { - if (contextsBuilder_ == null) { - contextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Context, context.ContextOuterClass.Context.Builder, context.ContextOuterClass.ContextOrBuilder>( - contexts_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - contexts_ = null; - } - return contextsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ContextList) - } + @java.lang.Override + public context.ContextOuterClass.Timestamp getDefaultInstanceForType() { + return context.ContextOuterClass.Timestamp.getDefaultInstance(); + } - // @@protoc_insertion_point(class_scope:context.ContextList) - private static final context.ContextOuterClass.ContextList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ContextList(); - } + @java.lang.Override + public context.ContextOuterClass.Timestamp build() { + context.ContextOuterClass.Timestamp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static context.ContextOuterClass.ContextList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public context.ContextOuterClass.Timestamp buildPartial() { + context.ContextOuterClass.Timestamp result = new context.ContextOuterClass.Timestamp(this); + result.timestamp_ = timestamp_; + onBuilt(); + return result; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @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 context.ContextOuterClass.ContextList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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); + } - public interface ContextEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ContextEvent) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - /** - * .context.ContextId context_id = 2; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 2; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 2; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); - } - /** - * Protobuf type {@code context.ContextEvent} - */ - public static final class ContextEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ContextEvent) - ContextEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use ContextEvent.newBuilder() to construct. - private ContextEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ContextEvent() { - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Timestamp) { + return mergeFrom((context.ContextOuterClass.Timestamp) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ContextEvent(); - } + public Builder mergeFrom(context.ContextOuterClass.Timestamp other) { + if (other == context.ContextOuterClass.Timestamp.getDefaultInstance()) + return this; + if (other.getTimestamp() != 0D) { + setTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @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; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextEvent.class, context.ContextOuterClass.ContextEvent.Builder.class); - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Timestamp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + private double timestamp_; - public static final int CONTEXT_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 2; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 2; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - /** - * .context.ContextId context_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + /** + * double timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public double getTimestamp() { + return timestamp_; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * double timestamp = 1; + * @param value The timestamp to set. + * @return This builder for chaining. + */ + public Builder setTimestamp(double value) { + timestamp_ = value; + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * double timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearTimestamp() { + timestamp_ = 0D; + onChanged(); + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (contextId_ != null) { - output.writeMessage(2, getContextId()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getContextId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Timestamp) + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ContextEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.ContextEvent other = (context.ContextOuterClass.ContextEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + // @@protoc_insertion_point(class_scope:context.Timestamp) + private static final context.ContextOuterClass.Timestamp DEFAULT_INSTANCE; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Timestamp(); + } - public static context.ContextOuterClass.ContextEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ContextEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ContextEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.Timestamp getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ContextEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ContextEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ContextEvent) - context.ContextOuterClass.ContextEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ContextEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ContextEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ContextEvent.class, context.ContextOuterClass.ContextEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ContextEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ContextEvent getDefaultInstanceForType() { - return context.ContextOuterClass.ContextEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ContextEvent build() { - context.ContextOuterClass.ContextEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ContextEvent) { - return mergeFrom((context.ContextOuterClass.ContextEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ContextEvent other) { - if (other == context.ContextOuterClass.ContextEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.ContextId contextId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; - /** - * .context.ContextId context_id = 2; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 2; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 2; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 2; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 2; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 2; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 2; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 2; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ContextEvent) - } - - // @@protoc_insertion_point(class_scope:context.ContextEvent) - private static final context.ContextOuterClass.ContextEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ContextEvent(); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static context.ContextOuterClass.ContextEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @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); + } + }; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public context.ContextOuterClass.ContextEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + @java.lang.Override + public context.ContextOuterClass.Timestamp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - } - - public interface TopologyIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.TopologyId) - com.google.protobuf.MessageOrBuilder { + public interface EventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Event) + com.google.protobuf.MessageOrBuilder { - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + /** + * .context.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); - /** - * .context.Uuid topology_uuid = 2; - * @return Whether the topologyUuid field is set. - */ - boolean hasTopologyUuid(); - /** - * .context.Uuid topology_uuid = 2; - * @return The topologyUuid. - */ - context.ContextOuterClass.Uuid getTopologyUuid(); - /** - * .context.Uuid topology_uuid = 2; - */ - context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder(); - } - /** - *
-   * ----- Topology ------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.TopologyId} - */ - public static final class TopologyId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.TopologyId) - TopologyIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use TopologyId.newBuilder() to construct. - private TopologyId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TopologyId() { - } + /** + * .context.Timestamp timestamp = 1; + * @return The timestamp. + */ + context.ContextOuterClass.Timestamp getTimestamp(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TopologyId(); - } + /** + * .context.Timestamp timestamp = 1; + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); - @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; - } + /** + * .context.EventTypeEnum event_type = 2; + * @return The enum numeric value on the wire for eventType. + */ + int getEventTypeValue(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyId.class, context.ContextOuterClass.TopologyId.Builder.class); + /** + * .context.EventTypeEnum event_type = 2; + * @return The eventType. + */ + context.ContextOuterClass.EventTypeEnum getEventType(); } - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } /** - * .context.ContextId context_id = 1; + * Protobuf type {@code context.Event} */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + public static final class Event extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Event) + EventOrBuilder { - public static final int TOPOLOGY_UUID_FIELD_NUMBER = 2; - private context.ContextOuterClass.Uuid topologyUuid_; - /** - * .context.Uuid topology_uuid = 2; - * @return Whether the topologyUuid field is set. - */ - @java.lang.Override - public boolean hasTopologyUuid() { - return topologyUuid_ != null; - } - /** - * .context.Uuid topology_uuid = 2; - * @return The topologyUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getTopologyUuid() { - return topologyUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; - } - /** - * .context.Uuid topology_uuid = 2; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder() { - return getTopologyUuid(); - } + private static final long serialVersionUID = 0L; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + // Use Event.newBuilder() to construct. + private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - memoizedIsInitialized = 1; - return true; - } + private Event() { + eventType_ = 0; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (topologyUuid_ != null) { - output.writeMessage(2, getTopologyUuid()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Event(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextId()); - } - if (topologyUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getTopologyUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.TopologyId)) { - return super.equals(obj); - } - context.ContextOuterClass.TopologyId other = (context.ContextOuterClass.TopologyId) obj; - - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (hasTopologyUuid() != other.hasTopologyUuid()) return false; - if (hasTopologyUuid()) { - if (!getTopologyUuid() - .equals(other.getTopologyUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + 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(); + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - if (hasTopologyUuid()) { - hash = (37 * hash) + TOPOLOGY_UUID_FIELD_NUMBER; - hash = (53 * hash) + getTopologyUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Event_descriptor; + } - public static context.ContextOuterClass.TopologyId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Event_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Event.class, context.ContextOuterClass.Event.Builder.class); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.TopologyId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static final int TIMESTAMP_FIELD_NUMBER = 1; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Topology ------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.TopologyId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.TopologyId) - context.ContextOuterClass.TopologyIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_TopologyId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyId.class, context.ContextOuterClass.TopologyId.Builder.class); - } - - // 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; - contextIdBuilder_ = null; - } - if (topologyUuidBuilder_ == null) { - topologyUuid_ = null; - } else { - topologyUuid_ = null; - topologyUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TopologyId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyId getDefaultInstanceForType() { - return context.ContextOuterClass.TopologyId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.TopologyId build() { - context.ContextOuterClass.TopologyId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TopologyId) { - return mergeFrom((context.ContextOuterClass.TopologyId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.TopologyId other) { - if (other == context.ContextOuterClass.TopologyId.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (other.hasTopologyUuid()) { - mergeTopologyUuid(other.getTopologyUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ContextId contextId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private context.ContextOuterClass.Uuid topologyUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> topologyUuidBuilder_; - /** - * .context.Uuid topology_uuid = 2; - * @return Whether the topologyUuid field is set. - */ - public boolean hasTopologyUuid() { - return topologyUuidBuilder_ != null || topologyUuid_ != null; - } - /** - * .context.Uuid topology_uuid = 2; - * @return The topologyUuid. - */ - public context.ContextOuterClass.Uuid getTopologyUuid() { - if (topologyUuidBuilder_ == null) { - return topologyUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; - } else { - return topologyUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid topology_uuid = 2; - */ - public Builder setTopologyUuid(context.ContextOuterClass.Uuid value) { - if (topologyUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - topologyUuid_ = value; - onChanged(); - } else { - topologyUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid topology_uuid = 2; - */ - public Builder setTopologyUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (topologyUuidBuilder_ == null) { - topologyUuid_ = builderForValue.build(); - onChanged(); - } else { - topologyUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid topology_uuid = 2; - */ - public Builder mergeTopologyUuid(context.ContextOuterClass.Uuid value) { - if (topologyUuidBuilder_ == null) { - if (topologyUuid_ != null) { - topologyUuid_ = - context.ContextOuterClass.Uuid.newBuilder(topologyUuid_).mergeFrom(value).buildPartial(); - } else { - topologyUuid_ = value; - } - onChanged(); - } else { - topologyUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid topology_uuid = 2; - */ - public Builder clearTopologyUuid() { - if (topologyUuidBuilder_ == null) { - topologyUuid_ = null; - onChanged(); - } else { - topologyUuid_ = null; - topologyUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid topology_uuid = 2; - */ - public context.ContextOuterClass.Uuid.Builder getTopologyUuidBuilder() { - - onChanged(); - return getTopologyUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid topology_uuid = 2; - */ - public context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder() { - if (topologyUuidBuilder_ != null) { - return topologyUuidBuilder_.getMessageOrBuilder(); - } else { - return topologyUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; - } - } - /** - * .context.Uuid topology_uuid = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getTopologyUuidFieldBuilder() { - if (topologyUuidBuilder_ == null) { - topologyUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getTopologyUuid(), - getParentForChildren(), - isClean()); - topologyUuid_ = null; - } - return topologyUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.TopologyId) - } + private context.ContextOuterClass.Timestamp timestamp_; - // @@protoc_insertion_point(class_scope:context.TopologyId) - private static final context.ContextOuterClass.TopologyId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyId(); - } + /** + * .context.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } - public static context.ContextOuterClass.TopologyId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Timestamp timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Timestamp timestamp = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static final int EVENT_TYPE_FIELD_NUMBER = 2; - @java.lang.Override - public context.ContextOuterClass.TopologyId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private int eventType_; - } + /** + * .context.EventTypeEnum event_type = 2; + * @return The enum numeric value on the wire for eventType. + */ + @java.lang.Override + public int getEventTypeValue() { + return eventType_; + } - public interface TopologyOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Topology) - com.google.protobuf.MessageOrBuilder { + /** + * .context.EventTypeEnum event_type = 2; + * @return The eventType. + */ + @java.lang.Override + public context.ContextOuterClass.EventTypeEnum getEventType() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.valueOf(eventType_); + return result == null ? context.ContextOuterClass.EventTypeEnum.UNRECOGNIZED : result; + } - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - boolean hasTopologyId(); - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - context.ContextOuterClass.TopologyId getTopologyId(); - /** - * .context.TopologyId topology_id = 1; - */ - context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + private byte memoizedIsInitialized = -1; - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - /** - * repeated .context.DeviceId device_ids = 3; - */ - java.util.List - getDeviceIdsList(); - /** - * repeated .context.DeviceId device_ids = 3; - */ - context.ContextOuterClass.DeviceId getDeviceIds(int index); - /** - * repeated .context.DeviceId device_ids = 3; - */ - int getDeviceIdsCount(); - /** - * repeated .context.DeviceId device_ids = 3; - */ - java.util.List - getDeviceIdsOrBuilderList(); - /** - * repeated .context.DeviceId device_ids = 3; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (timestamp_ != null) { + output.writeMessage(1, getTimestamp()); + } + if (eventType_ != context.ContextOuterClass.EventTypeEnum.EVENTTYPE_UNDEFINED.getNumber()) { + output.writeEnum(2, eventType_); + } + unknownFields.writeTo(output); + } - /** - * repeated .context.LinkId link_ids = 4; - */ - java.util.List - getLinkIdsList(); - /** - * repeated .context.LinkId link_ids = 4; - */ - context.ContextOuterClass.LinkId getLinkIds(int index); - /** - * repeated .context.LinkId link_ids = 4; - */ - int getLinkIdsCount(); - /** - * repeated .context.LinkId link_ids = 4; - */ - java.util.List - getLinkIdsOrBuilderList(); - /** - * repeated .context.LinkId link_ids = 4; - */ - context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.Topology} - */ - public static final class Topology extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Topology) - TopologyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Topology.newBuilder() to construct. - private Topology(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Topology() { - name_ = ""; - deviceIds_ = java.util.Collections.emptyList(); - linkIds_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimestamp()); + } + if (eventType_ != context.ContextOuterClass.EventTypeEnum.EVENTTYPE_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, eventType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Topology(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Event)) { + return super.equals(obj); + } + context.ContextOuterClass.Event other = (context.ContextOuterClass.Event) obj; + if (hasTimestamp() != other.hasTimestamp()) + return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) + return false; + } + if (eventType_ != other.eventType_) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - @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(); - 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(); - 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; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (37 * hash) + EVENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + eventType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Topology_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Topology.class, context.ContextOuterClass.Topology.Builder.class); - } + public static context.ContextOuterClass.Event parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int TOPOLOGY_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.TopologyId topologyId_; - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - @java.lang.Override - public boolean hasTopologyId() { - return topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - @java.lang.Override - public context.ContextOuterClass.TopologyId getTopologyId() { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - /** - * .context.TopologyId topology_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); - } + public static context.ContextOuterClass.Event parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static context.ContextOuterClass.Event parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int DEVICE_IDS_FIELD_NUMBER = 3; - private java.util.List deviceIds_; - /** - * repeated .context.DeviceId device_ids = 3; - */ - @java.lang.Override - public java.util.List getDeviceIdsList() { - return deviceIds_; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - @java.lang.Override - public java.util.List - getDeviceIdsOrBuilderList() { - return deviceIds_; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - @java.lang.Override - public int getDeviceIdsCount() { - return deviceIds_.size(); - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceIds(int index) { - return deviceIds_.get(index); - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index) { - return deviceIds_.get(index); - } + public static context.ContextOuterClass.Event parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int LINK_IDS_FIELD_NUMBER = 4; - private java.util.List linkIds_; - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public java.util.List getLinkIdsList() { - return linkIds_; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public java.util.List - getLinkIdsOrBuilderList() { - return linkIds_; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public int getLinkIdsCount() { - return linkIds_.size(); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.LinkId getLinkIds(int index) { - return linkIds_.get(index); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index) { - return linkIds_.get(index); - } + public static context.ContextOuterClass.Event parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.Event parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.Event parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (topologyId_ != null) { - output.writeMessage(1, getTopologyId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - for (int i = 0; i < deviceIds_.size(); i++) { - output.writeMessage(3, deviceIds_.get(i)); - } - for (int i = 0; i < linkIds_.size(); i++) { - output.writeMessage(4, linkIds_.get(i)); - } - unknownFields.writeTo(output); - } + public static context.ContextOuterClass.Event parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (topologyId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTopologyId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - for (int i = 0; i < deviceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, deviceIds_.get(i)); - } - for (int i = 0; i < linkIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, linkIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.Event parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Topology)) { - return super.equals(obj); - } - context.ContextOuterClass.Topology other = (context.ContextOuterClass.Topology) obj; - - if (hasTopologyId() != other.hasTopologyId()) return false; - if (hasTopologyId()) { - if (!getTopologyId() - .equals(other.getTopologyId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getDeviceIdsList() - .equals(other.getDeviceIdsList())) return false; - if (!getLinkIdsList() - .equals(other.getLinkIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.Event parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTopologyId()) { - hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; - hash = (53 * hash) + getTopologyId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getDeviceIdsCount() > 0) { - hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getDeviceIdsList().hashCode(); - } - if (getLinkIdsCount() > 0) { - hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; - hash = (53 * hash) + getLinkIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.Event parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static context.ContextOuterClass.Topology parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Topology parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Topology parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Topology parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Topology parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Topology parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Topology parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Topology parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Topology parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Topology parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Topology parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Topology parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.Event parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Topology prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Topology} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Topology) - context.ContextOuterClass.TopologyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Topology_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Topology_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Topology.class, context.ContextOuterClass.Topology.Builder.class); - } - - // 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; - topologyIdBuilder_ = null; - } - name_ = ""; - - if (deviceIdsBuilder_ == null) { - deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - deviceIdsBuilder_.clear(); - } - if (linkIdsBuilder_ == null) { - linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - linkIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Topology_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Topology getDefaultInstanceForType() { - return context.ContextOuterClass.Topology.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Topology build() { - context.ContextOuterClass.Topology result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - if (deviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deviceIds_ = deviceIds_; - } else { - result.deviceIds_ = deviceIdsBuilder_.build(); - } - if (linkIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - bitField0_ = (bitField0_ & ~0x00000002); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Topology) { - return mergeFrom((context.ContextOuterClass.Topology)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Topology other) { - if (other == context.ContextOuterClass.Topology.getDefaultInstance()) return this; - if (other.hasTopologyId()) { - mergeTopologyId(other.getTopologyId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (deviceIdsBuilder_ == null) { - if (!other.deviceIds_.isEmpty()) { - if (deviceIds_.isEmpty()) { - deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeviceIdsIsMutable(); - deviceIds_.addAll(other.deviceIds_); - } - onChanged(); - } - } else { - if (!other.deviceIds_.isEmpty()) { - if (deviceIdsBuilder_.isEmpty()) { - deviceIdsBuilder_.dispose(); - deviceIdsBuilder_ = null; - deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - deviceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDeviceIdsFieldBuilder() : null; - } else { - deviceIdsBuilder_.addAllMessages(other.deviceIds_); - } - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - if (linkIdsBuilder_ == null) { - if (!other.linkIds_.isEmpty()) { - if (linkIds_.isEmpty()) { - linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLinkIdsIsMutable(); - linkIds_.addAll(other.linkIds_); - } - onChanged(); - } - } else { - if (!other.linkIds_.isEmpty()) { - if (linkIdsBuilder_.isEmpty()) { - linkIdsBuilder_.dispose(); - linkIdsBuilder_ = null; - linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000002); - linkIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLinkIdsFieldBuilder() : null; - } else { - linkIdsBuilder_.addAllMessages(other.linkIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Topology) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - public context.ContextOuterClass.TopologyId getTopologyId() { - if (topologyIdBuilder_ == null) { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } else { - return topologyIdBuilder_.getMessage(); - } - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - topologyId_ = value; - onChanged(); - } else { - topologyIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder setTopologyId( - context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdBuilder_ == null) { - topologyId_ = builderForValue.build(); - onChanged(); - } else { - topologyIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = - context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); - } else { - topologyId_ = value; - } - onChanged(); - } else { - topologyIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; - topologyIdBuilder_ = null; - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { - - onChanged(); - return getTopologyIdFieldBuilder().getBuilder(); - } - /** - * .context.TopologyId topology_id = 1; - */ - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - if (topologyIdBuilder_ != null) { - return topologyIdBuilder_.getMessageOrBuilder(); - } else { - return topologyId_ == null ? - context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - } - /** - * .context.TopologyId topology_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> - getTopologyIdFieldBuilder() { - if (topologyIdBuilder_ == null) { - topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder>( - getTopologyId(), - getParentForChildren(), - isClean()); - topologyId_ = null; - } - return topologyIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List deviceIds_ = - java.util.Collections.emptyList(); - private void ensureDeviceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deviceIds_ = new java.util.ArrayList(deviceIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdsBuilder_; - - /** - * repeated .context.DeviceId device_ids = 3; - */ - public java.util.List getDeviceIdsList() { - if (deviceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(deviceIds_); - } else { - return deviceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public int getDeviceIdsCount() { - if (deviceIdsBuilder_ == null) { - return deviceIds_.size(); - } else { - return deviceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public context.ContextOuterClass.DeviceId getDeviceIds(int index) { - if (deviceIdsBuilder_ == null) { - return deviceIds_.get(index); - } else { - return deviceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder setDeviceIds( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.set(index, value); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder setDeviceIds( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder addDeviceIds(context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.add(value); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder addDeviceIds( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.add(index, value); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder addDeviceIds( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.add(builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder addDeviceIds( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder addAllDeviceIds( - java.lang.Iterable values) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deviceIds_); - onChanged(); - } else { - deviceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder clearDeviceIds() { - if (deviceIdsBuilder_ == null) { - deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - deviceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public Builder removeDeviceIds(int index) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.remove(index); - onChanged(); - } else { - deviceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdsBuilder( - int index) { - return getDeviceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index) { - if (deviceIdsBuilder_ == null) { - return deviceIds_.get(index); } else { - return deviceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public java.util.List - getDeviceIdsOrBuilderList() { - if (deviceIdsBuilder_ != null) { - return deviceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deviceIds_); - } - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder() { - return getDeviceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder( - int index) { - return getDeviceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - * repeated .context.DeviceId device_ids = 3; - */ - public java.util.List - getDeviceIdsBuilderList() { - return getDeviceIdsFieldBuilder().getBuilderList(); - } - 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()); - deviceIds_ = null; - } - return deviceIdsBuilder_; - } - - private java.util.List linkIds_ = - java.util.Collections.emptyList(); - private void ensureLinkIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - linkIds_ = new java.util.ArrayList(linkIds_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> linkIdsBuilder_; - - /** - * repeated .context.LinkId link_ids = 4; - */ - public java.util.List getLinkIdsList() { - if (linkIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(linkIds_); - } else { - return linkIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public int getLinkIdsCount() { - if (linkIdsBuilder_ == null) { - return linkIds_.size(); - } else { - return linkIdsBuilder_.getCount(); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId getLinkIds(int index) { - if (linkIdsBuilder_ == null) { - return linkIds_.get(index); - } else { - return linkIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder setLinkIds( - int index, context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.set(index, value); - onChanged(); - } else { - linkIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder setLinkIds( - int index, context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.set(index, builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds(context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.add(value); - onChanged(); - } else { - linkIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds( - int index, context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.add(index, value); - onChanged(); - } else { - linkIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds( - context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.add(builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds( - int index, context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.add(index, builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addAllLinkIds( - java.lang.Iterable values) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, linkIds_); - onChanged(); - } else { - linkIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder clearLinkIds() { - if (linkIdsBuilder_ == null) { - linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - linkIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder removeLinkIds(int index) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.remove(index); - onChanged(); - } else { - linkIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId.Builder getLinkIdsBuilder( - int index) { - return getLinkIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index) { - if (linkIdsBuilder_ == null) { - return linkIds_.get(index); } else { - return linkIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public java.util.List - getLinkIdsOrBuilderList() { - if (linkIdsBuilder_ != null) { - return linkIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(linkIds_); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder() { - return getLinkIdsFieldBuilder().addBuilder( - context.ContextOuterClass.LinkId.getDefaultInstance()); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder( - int index) { - return getLinkIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.LinkId.getDefaultInstance()); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public java.util.List - getLinkIdsBuilderList() { - return getLinkIdsFieldBuilder().getBuilderList(); - } - 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()); - linkIds_ = null; - } - return linkIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Topology) - } - // @@protoc_insertion_point(class_scope:context.Topology) - private static final context.ContextOuterClass.Topology DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Topology(); - } + public static Builder newBuilder(context.ContextOuterClass.Event prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static context.ContextOuterClass.Topology getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * Protobuf type {@code context.Event} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Event) + context.ContextOuterClass.EventOrBuilder { - @java.lang.Override - public context.ContextOuterClass.Topology getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Event_descriptor; + } - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Event_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Event.class, context.ContextOuterClass.Event.Builder.class); + } - public interface TopologyDetailsOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.TopologyDetails) - com.google.protobuf.MessageOrBuilder { + // Construct using context.ContextOuterClass.Event.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - boolean hasTopologyId(); - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - context.ContextOuterClass.TopologyId getTopologyId(); - /** - * .context.TopologyId topology_id = 1; - */ - context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - /** - * repeated .context.Device devices = 3; - */ - java.util.List - getDevicesList(); - /** - * repeated .context.Device devices = 3; - */ - context.ContextOuterClass.Device getDevices(int index); - /** - * repeated .context.Device devices = 3; - */ - int getDevicesCount(); - /** - * repeated .context.Device devices = 3; - */ - java.util.List - getDevicesOrBuilderList(); - /** - * repeated .context.Device devices = 3; - */ - context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder( - int index); + @java.lang.Override + public Builder clear() { + super.clear(); + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + eventType_ = 0; + return this; + } - /** - * repeated .context.Link links = 4; - */ - java.util.List - getLinksList(); - /** - * repeated .context.Link links = 4; - */ - context.ContextOuterClass.Link getLinks(int index); - /** - * repeated .context.Link links = 4; - */ - int getLinksCount(); - /** - * repeated .context.Link links = 4; - */ - java.util.List - getLinksOrBuilderList(); - /** - * repeated .context.Link links = 4; - */ - context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder( - int index); - } - /** - * Protobuf type {@code context.TopologyDetails} - */ - public static final class TopologyDetails extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.TopologyDetails) - TopologyDetailsOrBuilder { - private static final long serialVersionUID = 0L; - // Use TopologyDetails.newBuilder() to construct. - private TopologyDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TopologyDetails() { - name_ = ""; - devices_ = java.util.Collections.emptyList(); - links_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Event_descriptor; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TopologyDetails(); - } + @java.lang.Override + public context.ContextOuterClass.Event getDefaultInstanceForType() { + return context.ContextOuterClass.Event.getDefaultInstance(); + } - @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(); - 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(); - 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; - } + @java.lang.Override + public context.ContextOuterClass.Event build() { + context.ContextOuterClass.Event result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyDetails.class, context.ContextOuterClass.TopologyDetails.Builder.class); - } + @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(); + } + result.eventType_ = eventType_; + onBuilt(); + return result; + } - public static final int TOPOLOGY_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.TopologyId topologyId_; - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - @java.lang.Override - public boolean hasTopologyId() { - return topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - @java.lang.Override - public context.ContextOuterClass.TopologyId getTopologyId() { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - /** - * .context.TopologyId topology_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static final int DEVICES_FIELD_NUMBER = 3; - private java.util.List devices_; - /** - * repeated .context.Device devices = 3; - */ - @java.lang.Override - public java.util.List getDevicesList() { - return devices_; - } - /** - * repeated .context.Device devices = 3; - */ - @java.lang.Override - public java.util.List - getDevicesOrBuilderList() { - return devices_; - } - /** - * repeated .context.Device devices = 3; - */ - @java.lang.Override - public int getDevicesCount() { - return devices_.size(); - } - /** - * repeated .context.Device devices = 3; - */ - @java.lang.Override - public context.ContextOuterClass.Device getDevices(int index) { - return devices_.get(index); - } - /** - * repeated .context.Device devices = 3; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder( - int index) { - return devices_.get(index); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static final int LINKS_FIELD_NUMBER = 4; - private java.util.List links_; - /** - * repeated .context.Link links = 4; - */ - @java.lang.Override - public java.util.List getLinksList() { - return links_; - } - /** - * repeated .context.Link links = 4; - */ - @java.lang.Override - public java.util.List - getLinksOrBuilderList() { - return links_; - } - /** - * repeated .context.Link links = 4; - */ - @java.lang.Override - public int getLinksCount() { - return links_.size(); - } - /** - * repeated .context.Link links = 4; - */ - @java.lang.Override - public context.ContextOuterClass.Link getLinks(int index) { - return links_.get(index); - } - /** - * repeated .context.Link links = 4; - */ - @java.lang.Override - public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder( - int index) { - return links_.get(index); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - memoizedIsInitialized = 1; - return true; - } + @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 void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (topologyId_ != null) { - output.writeMessage(1, getTopologyId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - for (int i = 0; i < devices_.size(); i++) { - output.writeMessage(3, devices_.get(i)); - } - for (int i = 0; i < links_.size(); i++) { - output.writeMessage(4, links_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Event) { + return mergeFrom((context.ContextOuterClass.Event) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (topologyId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTopologyId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - for (int i = 0; i < devices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, devices_.get(i)); - } - for (int i = 0; i < links_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, links_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public Builder mergeFrom(context.ContextOuterClass.Event other) { + if (other == context.ContextOuterClass.Event.getDefaultInstance()) + return this; + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (other.eventType_ != 0) { + setEventTypeValue(other.getEventTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.TopologyDetails)) { - return super.equals(obj); - } - context.ContextOuterClass.TopologyDetails other = (context.ContextOuterClass.TopologyDetails) obj; - - if (hasTopologyId() != other.hasTopologyId()) return false; - if (hasTopologyId()) { - if (!getTopologyId() - .equals(other.getTopologyId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getDevicesList() - .equals(other.getDevicesList())) return false; - if (!getLinksList() - .equals(other.getLinksList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTopologyId()) { - hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; - hash = (53 * hash) + getTopologyId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getDevicesCount() > 0) { - hash = (37 * hash) + DEVICES_FIELD_NUMBER; - hash = (53 * hash) + getDevicesList().hashCode(); - } - if (getLinksCount() > 0) { - hash = (37 * hash) + LINKS_FIELD_NUMBER; - hash = (53 * hash) + getLinksList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Event) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - public static context.ContextOuterClass.TopologyDetails parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyDetails parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyDetails parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyDetails parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyDetails parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyDetails parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private context.ContextOuterClass.Timestamp timestamp_; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.TopologyDetails prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.TopologyDetails} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.TopologyDetails) - context.ContextOuterClass.TopologyDetailsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_TopologyDetails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyDetails.class, context.ContextOuterClass.TopologyDetails.Builder.class); - } - - // 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; - topologyIdBuilder_ = null; - } - name_ = ""; - - if (devicesBuilder_ == null) { - devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - devicesBuilder_.clear(); - } - if (linksBuilder_ == null) { - links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - linksBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TopologyDetails_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyDetails getDefaultInstanceForType() { - return context.ContextOuterClass.TopologyDetails.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.TopologyDetails build() { - context.ContextOuterClass.TopologyDetails result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - if (devicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - devices_ = java.util.Collections.unmodifiableList(devices_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.devices_ = devices_; - } else { - result.devices_ = devicesBuilder_.build(); - } - if (linksBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - links_ = java.util.Collections.unmodifiableList(links_); - bitField0_ = (bitField0_ & ~0x00000002); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TopologyDetails) { - return mergeFrom((context.ContextOuterClass.TopologyDetails)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.TopologyDetails other) { - if (other == context.ContextOuterClass.TopologyDetails.getDefaultInstance()) return this; - if (other.hasTopologyId()) { - mergeTopologyId(other.getTopologyId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (devicesBuilder_ == null) { - if (!other.devices_.isEmpty()) { - if (devices_.isEmpty()) { - devices_ = other.devices_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDevicesIsMutable(); - devices_.addAll(other.devices_); - } - onChanged(); - } - } else { - if (!other.devices_.isEmpty()) { - if (devicesBuilder_.isEmpty()) { - devicesBuilder_.dispose(); - devicesBuilder_ = null; - devices_ = other.devices_; - bitField0_ = (bitField0_ & ~0x00000001); - devicesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDevicesFieldBuilder() : null; - } else { - devicesBuilder_.addAllMessages(other.devices_); + /** + * .context.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; } - } - } - if (linksBuilder_ == null) { - if (!other.links_.isEmpty()) { - if (links_.isEmpty()) { - links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLinksIsMutable(); - links_.addAll(other.links_); - } - onChanged(); - } - } else { - if (!other.links_.isEmpty()) { - if (linksBuilder_.isEmpty()) { - linksBuilder_.dispose(); - linksBuilder_ = null; - links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000002); - linksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLinksFieldBuilder() : null; - } else { - linksBuilder_.addAllMessages(other.links_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyDetails) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - public context.ContextOuterClass.TopologyId getTopologyId() { - if (topologyIdBuilder_ == null) { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } else { - return topologyIdBuilder_.getMessage(); - } - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - topologyId_ = value; - onChanged(); - } else { - topologyIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder setTopologyId( - context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdBuilder_ == null) { - topologyId_ = builderForValue.build(); - onChanged(); - } else { - topologyIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = - context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); - } else { - topologyId_ = value; - } - onChanged(); - } else { - topologyIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; - topologyIdBuilder_ = null; - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { - - onChanged(); - return getTopologyIdFieldBuilder().getBuilder(); - } - /** - * .context.TopologyId topology_id = 1; - */ - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - if (topologyIdBuilder_ != null) { - return topologyIdBuilder_.getMessageOrBuilder(); - } else { - return topologyId_ == null ? - context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - } - /** - * .context.TopologyId topology_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> - getTopologyIdFieldBuilder() { - if (topologyIdBuilder_ == null) { - topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder>( - getTopologyId(), - getParentForChildren(), - isClean()); - topologyId_ = null; - } - return topologyIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List devices_ = - java.util.Collections.emptyList(); - private void ensureDevicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - devices_ = new java.util.ArrayList(devices_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Device, context.ContextOuterClass.Device.Builder, context.ContextOuterClass.DeviceOrBuilder> devicesBuilder_; - - /** - * repeated .context.Device devices = 3; - */ - public java.util.List getDevicesList() { - if (devicesBuilder_ == null) { - return java.util.Collections.unmodifiableList(devices_); - } else { - return devicesBuilder_.getMessageList(); - } - } - /** - * repeated .context.Device devices = 3; - */ - public int getDevicesCount() { - if (devicesBuilder_ == null) { - return devices_.size(); - } else { - return devicesBuilder_.getCount(); - } - } - /** - * repeated .context.Device devices = 3; - */ - public context.ContextOuterClass.Device getDevices(int index) { - if (devicesBuilder_ == null) { - return devices_.get(index); - } else { - return devicesBuilder_.getMessage(index); - } - } - /** - * repeated .context.Device devices = 3; - */ - public Builder setDevices( - int index, context.ContextOuterClass.Device value) { - if (devicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevicesIsMutable(); - devices_.set(index, value); - onChanged(); - } else { - devicesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder setDevices( - int index, context.ContextOuterClass.Device.Builder builderForValue) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.set(index, builderForValue.build()); - onChanged(); - } else { - devicesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder addDevices(context.ContextOuterClass.Device value) { - if (devicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevicesIsMutable(); - devices_.add(value); - onChanged(); - } else { - devicesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder addDevices( - int index, context.ContextOuterClass.Device value) { - if (devicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevicesIsMutable(); - devices_.add(index, value); - onChanged(); - } else { - devicesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder addDevices( - context.ContextOuterClass.Device.Builder builderForValue) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.add(builderForValue.build()); - onChanged(); - } else { - devicesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder addDevices( - int index, context.ContextOuterClass.Device.Builder builderForValue) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.add(index, builderForValue.build()); - onChanged(); - } else { - devicesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder addAllDevices( - java.lang.Iterable values) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, devices_); - onChanged(); - } else { - devicesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder clearDevices() { - if (devicesBuilder_ == null) { - devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - devicesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public Builder removeDevices(int index) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.remove(index); - onChanged(); - } else { - devicesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Device devices = 3; - */ - public context.ContextOuterClass.Device.Builder getDevicesBuilder( - int index) { - return getDevicesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Device devices = 3; - */ - public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder( - int index) { - if (devicesBuilder_ == null) { - return devices_.get(index); } else { - return devicesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Device devices = 3; - */ - public java.util.List - getDevicesOrBuilderList() { - if (devicesBuilder_ != null) { - return devicesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(devices_); - } - } - /** - * repeated .context.Device devices = 3; - */ - public context.ContextOuterClass.Device.Builder addDevicesBuilder() { - return getDevicesFieldBuilder().addBuilder( - context.ContextOuterClass.Device.getDefaultInstance()); - } - /** - * repeated .context.Device devices = 3; - */ - public context.ContextOuterClass.Device.Builder addDevicesBuilder( - int index) { - return getDevicesFieldBuilder().addBuilder( - index, context.ContextOuterClass.Device.getDefaultInstance()); - } - /** - * repeated .context.Device devices = 3; - */ - public java.util.List - getDevicesBuilderList() { - return getDevicesFieldBuilder().getBuilderList(); - } - 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()); - devices_ = null; - } - return devicesBuilder_; - } - - private java.util.List links_ = - java.util.Collections.emptyList(); - private void ensureLinksIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - links_ = new java.util.ArrayList(links_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Link, context.ContextOuterClass.Link.Builder, context.ContextOuterClass.LinkOrBuilder> linksBuilder_; - - /** - * repeated .context.Link links = 4; - */ - public java.util.List getLinksList() { - if (linksBuilder_ == null) { - return java.util.Collections.unmodifiableList(links_); - } else { - return linksBuilder_.getMessageList(); - } - } - /** - * repeated .context.Link links = 4; - */ - public int getLinksCount() { - if (linksBuilder_ == null) { - return links_.size(); - } else { - return linksBuilder_.getCount(); - } - } - /** - * repeated .context.Link links = 4; - */ - public context.ContextOuterClass.Link getLinks(int index) { - if (linksBuilder_ == null) { - return links_.get(index); - } else { - return linksBuilder_.getMessage(index); - } - } - /** - * repeated .context.Link links = 4; - */ - public Builder setLinks( - int index, context.ContextOuterClass.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.set(index, value); - onChanged(); - } else { - linksBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder setLinks( - int index, context.ContextOuterClass.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.set(index, builderForValue.build()); - onChanged(); - } else { - linksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder addLinks(context.ContextOuterClass.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.add(value); - onChanged(); - } else { - linksBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder addLinks( - int index, context.ContextOuterClass.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.add(index, value); - onChanged(); - } else { - linksBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder addLinks( - context.ContextOuterClass.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.add(builderForValue.build()); - onChanged(); - } else { - linksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder addLinks( - int index, context.ContextOuterClass.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.add(index, builderForValue.build()); - onChanged(); - } else { - linksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder addAllLinks( - java.lang.Iterable values) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, links_); - onChanged(); - } else { - linksBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder clearLinks() { - if (linksBuilder_ == null) { - links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - linksBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public Builder removeLinks(int index) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.remove(index); - onChanged(); - } else { - linksBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Link links = 4; - */ - public context.ContextOuterClass.Link.Builder getLinksBuilder( - int index) { - return getLinksFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Link links = 4; - */ - public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder( - int index) { - if (linksBuilder_ == null) { - return links_.get(index); } else { - return linksBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Link links = 4; - */ - public java.util.List - getLinksOrBuilderList() { - if (linksBuilder_ != null) { - return linksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(links_); - } - } - /** - * repeated .context.Link links = 4; - */ - public context.ContextOuterClass.Link.Builder addLinksBuilder() { - return getLinksFieldBuilder().addBuilder( - context.ContextOuterClass.Link.getDefaultInstance()); - } - /** - * repeated .context.Link links = 4; - */ - public context.ContextOuterClass.Link.Builder addLinksBuilder( - int index) { - return getLinksFieldBuilder().addBuilder( - index, context.ContextOuterClass.Link.getDefaultInstance()); - } - /** - * repeated .context.Link links = 4; - */ - public java.util.List - getLinksBuilderList() { - return getLinksFieldBuilder().getBuilderList(); - } - 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()); - links_ = null; - } - return linksBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.TopologyDetails) - } - // @@protoc_insertion_point(class_scope:context.TopologyDetails) - private static final context.ContextOuterClass.TopologyDetails DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyDetails(); - } + /** + * .context.Timestamp timestamp = 1; + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } - public static context.ContextOuterClass.TopologyDetails getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Timestamp timestamp = 1; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Timestamp timestamp = 1; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Timestamp timestamp = 1; + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + return this; + } - @java.lang.Override - public context.ContextOuterClass.TopologyDetails getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Timestamp timestamp = 1; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } - } + /** + * .context.Timestamp timestamp = 1; + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } - public interface TopologyIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.TopologyIdList) - com.google.protobuf.MessageOrBuilder { + /** + * .context.Timestamp timestamp = 1; + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - java.util.List - getTopologyIdsList(); - /** - * repeated .context.TopologyId topology_ids = 1; - */ - context.ContextOuterClass.TopologyId getTopologyIds(int index); - /** - * repeated .context.TopologyId topology_ids = 1; - */ - int getTopologyIdsCount(); - /** - * repeated .context.TopologyId topology_ids = 1; - */ - java.util.List - getTopologyIdsOrBuilderList(); - /** - * repeated .context.TopologyId topology_ids = 1; - */ - context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.TopologyIdList} - */ - public static final class TopologyIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.TopologyIdList) - TopologyIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use TopologyIdList.newBuilder() to construct. - private TopologyIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TopologyIdList() { - topologyIds_ = java.util.Collections.emptyList(); - } + /** + * .context.Timestamp timestamp = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TopologyIdList(); - } + private int eventType_ = 0; - @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(); - 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; - } + /** + * .context.EventTypeEnum event_type = 2; + * @return The enum numeric value on the wire for eventType. + */ + @java.lang.Override + public int getEventTypeValue() { + return eventType_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyIdList.class, context.ContextOuterClass.TopologyIdList.Builder.class); - } + /** + * .context.EventTypeEnum event_type = 2; + * @param value The enum numeric value on the wire for eventType to set. + * @return This builder for chaining. + */ + public Builder setEventTypeValue(int value) { + eventType_ = value; + onChanged(); + return this; + } - public static final int TOPOLOGY_IDS_FIELD_NUMBER = 1; - private java.util.List topologyIds_; - /** - * repeated .context.TopologyId topology_ids = 1; - */ - @java.lang.Override - public java.util.List getTopologyIdsList() { - return topologyIds_; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - @java.lang.Override - public java.util.List - getTopologyIdsOrBuilderList() { - return topologyIds_; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - @java.lang.Override - public int getTopologyIdsCount() { - return topologyIds_.size(); - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyId getTopologyIds(int index) { - return topologyIds_.get(index); - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder( - int index) { - return topologyIds_.get(index); - } + /** + * .context.EventTypeEnum event_type = 2; + * @return The eventType. + */ + @java.lang.Override + public context.ContextOuterClass.EventTypeEnum getEventType() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.valueOf(eventType_); + return result == null ? context.ContextOuterClass.EventTypeEnum.UNRECOGNIZED : result; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.EventTypeEnum event_type = 2; + * @param value The eventType to set. + * @return This builder for chaining. + */ + public Builder setEventType(context.ContextOuterClass.EventTypeEnum value) { + if (value == null) { + throw new NullPointerException(); + } + eventType_ = value.getNumber(); + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.EventTypeEnum event_type = 2; + * @return This builder for chaining. + */ + public Builder clearEventType() { + eventType_ = 0; + onChanged(); + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < topologyIds_.size(); i++) { - output.writeMessage(1, topologyIds_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < topologyIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, topologyIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Event) + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.TopologyIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.TopologyIdList other = (context.ContextOuterClass.TopologyIdList) obj; - - if (!getTopologyIdsList() - .equals(other.getTopologyIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + // @@protoc_insertion_point(class_scope:context.Event) + private static final context.ContextOuterClass.Event DEFAULT_INSTANCE; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getTopologyIdsCount() > 0) { - hash = (37 * hash) + TOPOLOGY_IDS_FIELD_NUMBER; - hash = (53 * hash) + getTopologyIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Event(); + } - public static context.ContextOuterClass.TopologyIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.Event getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.TopologyIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.TopologyIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.TopologyIdList) - context.ContextOuterClass.TopologyIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_TopologyIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyIdList.class, context.ContextOuterClass.TopologyIdList.Builder.class); - } - - // 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(); - if (topologyIdsBuilder_ == null) { - topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - topologyIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TopologyIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyIdList getDefaultInstanceForType() { - return context.ContextOuterClass.TopologyIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.TopologyIdList build() { - context.ContextOuterClass.TopologyIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyIdList buildPartial() { - context.ContextOuterClass.TopologyIdList result = new context.ContextOuterClass.TopologyIdList(this); - int from_bitField0_ = bitField0_; - if (topologyIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.topologyIds_ = topologyIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TopologyIdList) { - return mergeFrom((context.ContextOuterClass.TopologyIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.TopologyIdList other) { - if (other == context.ContextOuterClass.TopologyIdList.getDefaultInstance()) return this; - if (topologyIdsBuilder_ == null) { - if (!other.topologyIds_.isEmpty()) { - if (topologyIds_.isEmpty()) { - topologyIds_ = other.topologyIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTopologyIdsIsMutable(); - topologyIds_.addAll(other.topologyIds_); - } - onChanged(); - } - } else { - if (!other.topologyIds_.isEmpty()) { - if (topologyIdsBuilder_.isEmpty()) { - topologyIdsBuilder_.dispose(); - topologyIdsBuilder_ = null; - topologyIds_ = other.topologyIds_; - bitField0_ = (bitField0_ & ~0x00000001); - topologyIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTopologyIdsFieldBuilder() : null; - } else { - topologyIdsBuilder_.addAllMessages(other.topologyIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List topologyIds_ = - java.util.Collections.emptyList(); - private void ensureTopologyIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - topologyIds_ = new java.util.ArrayList(topologyIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> topologyIdsBuilder_; - - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public java.util.List getTopologyIdsList() { - if (topologyIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(topologyIds_); - } else { - return topologyIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public int getTopologyIdsCount() { - if (topologyIdsBuilder_ == null) { - return topologyIds_.size(); - } else { - return topologyIdsBuilder_.getCount(); - } - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public context.ContextOuterClass.TopologyId getTopologyIds(int index) { - if (topologyIdsBuilder_ == null) { - return topologyIds_.get(index); - } else { - return topologyIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder setTopologyIds( - int index, context.ContextOuterClass.TopologyId value) { - if (topologyIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologyIdsIsMutable(); - topologyIds_.set(index, value); - onChanged(); - } else { - topologyIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder setTopologyIds( - int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.set(index, builderForValue.build()); - onChanged(); - } else { - topologyIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder addTopologyIds(context.ContextOuterClass.TopologyId value) { - if (topologyIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologyIdsIsMutable(); - topologyIds_.add(value); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder addTopologyIds( - int index, context.ContextOuterClass.TopologyId value) { - if (topologyIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologyIdsIsMutable(); - topologyIds_.add(index, value); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder addTopologyIds( - context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.add(builderForValue.build()); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder addTopologyIds( - int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.add(index, builderForValue.build()); - onChanged(); - } else { - topologyIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder addAllTopologyIds( - java.lang.Iterable values) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, topologyIds_); - onChanged(); - } else { - topologyIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder clearTopologyIds() { - if (topologyIdsBuilder_ == null) { - topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - topologyIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public Builder removeTopologyIds(int index) { - if (topologyIdsBuilder_ == null) { - ensureTopologyIdsIsMutable(); - topologyIds_.remove(index); - onChanged(); - } else { - topologyIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public context.ContextOuterClass.TopologyId.Builder getTopologyIdsBuilder( - int index) { - return getTopologyIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder( - int index) { - if (topologyIdsBuilder_ == null) { - return topologyIds_.get(index); } else { - return topologyIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public java.util.List - getTopologyIdsOrBuilderList() { - if (topologyIdsBuilder_ != null) { - return topologyIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(topologyIds_); - } - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder() { - return getTopologyIdsFieldBuilder().addBuilder( - context.ContextOuterClass.TopologyId.getDefaultInstance()); - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder( - int index) { - return getTopologyIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.TopologyId.getDefaultInstance()); - } - /** - * repeated .context.TopologyId topology_ids = 1; - */ - public java.util.List - getTopologyIdsBuilderList() { - return getTopologyIdsFieldBuilder().getBuilderList(); - } - 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()); - topologyIds_ = null; - } - return topologyIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.TopologyIdList) - } + @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); + } + }; - // @@protoc_insertion_point(class_scope:context.TopologyIdList) - private static final context.ContextOuterClass.TopologyIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyIdList(); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - public static context.ContextOuterClass.TopologyIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; + @java.lang.Override + public context.ContextOuterClass.Event getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public interface ContextIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ContextId) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public context.ContextOuterClass.TopologyIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid context_uuid = 1; + * @return Whether the contextUuid field is set. + */ + boolean hasContextUuid(); - } + /** + * .context.Uuid context_uuid = 1; + * @return The contextUuid. + */ + context.ContextOuterClass.Uuid getContextUuid(); - public interface TopologyListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.TopologyList) - com.google.protobuf.MessageOrBuilder { + /** + * .context.Uuid context_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder(); + } /** - * repeated .context.Topology topologies = 1; - */ - java.util.List - getTopologiesList(); - /** - * repeated .context.Topology topologies = 1; - */ - context.ContextOuterClass.Topology getTopologies(int index); - /** - * repeated .context.Topology topologies = 1; - */ - int getTopologiesCount(); - /** - * repeated .context.Topology topologies = 1; + *
+     * ----- Context -------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.ContextId} */ - java.util.List - getTopologiesOrBuilderList(); - /** - * repeated .context.Topology topologies = 1; - */ - context.ContextOuterClass.TopologyOrBuilder getTopologiesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.TopologyList} - */ - public static final class TopologyList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.TopologyList) - TopologyListOrBuilder { - private static final long serialVersionUID = 0L; - // Use TopologyList.newBuilder() to construct. - private TopologyList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TopologyList() { - topologies_ = java.util.Collections.emptyList(); - } + public static final class ContextId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ContextId) + ContextIdOrBuilder { - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TopologyList(); - } + private static final long serialVersionUID = 0L; - @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(); - 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; - } + // Use ContextId.newBuilder() to construct. + private ContextId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyList.class, context.ContextOuterClass.TopologyList.Builder.class); - } + private ContextId() { + } - public static final int TOPOLOGIES_FIELD_NUMBER = 1; - private java.util.List topologies_; - /** - * repeated .context.Topology topologies = 1; - */ - @java.lang.Override - public java.util.List getTopologiesList() { - return topologies_; - } - /** - * repeated .context.Topology topologies = 1; - */ - @java.lang.Override - public java.util.List - getTopologiesOrBuilderList() { - return topologies_; - } - /** - * repeated .context.Topology topologies = 1; - */ - @java.lang.Override - public int getTopologiesCount() { - return topologies_.size(); - } - /** - * repeated .context.Topology topologies = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Topology getTopologies(int index) { - return topologies_.get(index); - } - /** - * repeated .context.Topology topologies = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyOrBuilder getTopologiesOrBuilder( - int index) { - return topologies_.get(index); - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContextId(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - memoizedIsInitialized = 1; - return true; - } + 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(); + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < topologies_.size(); i++) { - output.writeMessage(1, topologies_.get(i)); - } - unknownFields.writeTo(output); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ContextId_descriptor; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < topologies_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, topologies_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextId.class, context.ContextOuterClass.ContextId.Builder.class); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.TopologyList)) { - return super.equals(obj); - } - context.ContextOuterClass.TopologyList other = (context.ContextOuterClass.TopologyList) obj; - - if (!getTopologiesList() - .equals(other.getTopologiesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static final int CONTEXT_UUID_FIELD_NUMBER = 1; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getTopologiesCount() > 0) { - hash = (37 * hash) + TOPOLOGIES_FIELD_NUMBER; - hash = (53 * hash) + getTopologiesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private context.ContextOuterClass.Uuid contextUuid_; - public static context.ContextOuterClass.TopologyList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Uuid context_uuid = 1; + * @return Whether the contextUuid field is set. + */ + @java.lang.Override + public boolean hasContextUuid() { + return contextUuid_ != null; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.TopologyList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Uuid context_uuid = 1; + * @return The contextUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getContextUuid() { + return contextUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.TopologyList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.TopologyList) - context.ContextOuterClass.TopologyListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_TopologyList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyList.class, context.ContextOuterClass.TopologyList.Builder.class); - } - - // 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(); - if (topologiesBuilder_ == null) { - topologies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - topologiesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TopologyList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyList getDefaultInstanceForType() { - return context.ContextOuterClass.TopologyList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.TopologyList build() { - context.ContextOuterClass.TopologyList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyList buildPartial() { - context.ContextOuterClass.TopologyList result = new context.ContextOuterClass.TopologyList(this); - int from_bitField0_ = bitField0_; - if (topologiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - topologies_ = java.util.Collections.unmodifiableList(topologies_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.topologies_ = topologies_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TopologyList) { - return mergeFrom((context.ContextOuterClass.TopologyList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.TopologyList other) { - if (other == context.ContextOuterClass.TopologyList.getDefaultInstance()) return this; - if (topologiesBuilder_ == null) { - if (!other.topologies_.isEmpty()) { - if (topologies_.isEmpty()) { - topologies_ = other.topologies_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTopologiesIsMutable(); - topologies_.addAll(other.topologies_); - } - onChanged(); - } - } else { - if (!other.topologies_.isEmpty()) { - if (topologiesBuilder_.isEmpty()) { - topologiesBuilder_.dispose(); - topologiesBuilder_ = null; - topologies_ = other.topologies_; - bitField0_ = (bitField0_ & ~0x00000001); - topologiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTopologiesFieldBuilder() : null; - } else { - topologiesBuilder_.addAllMessages(other.topologies_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List topologies_ = - java.util.Collections.emptyList(); - private void ensureTopologiesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - topologies_ = new java.util.ArrayList(topologies_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Topology, context.ContextOuterClass.Topology.Builder, context.ContextOuterClass.TopologyOrBuilder> topologiesBuilder_; - - /** - * repeated .context.Topology topologies = 1; - */ - public java.util.List getTopologiesList() { - if (topologiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(topologies_); - } else { - return topologiesBuilder_.getMessageList(); - } - } - /** - * repeated .context.Topology topologies = 1; - */ - public int getTopologiesCount() { - if (topologiesBuilder_ == null) { - return topologies_.size(); - } else { - return topologiesBuilder_.getCount(); - } - } - /** - * repeated .context.Topology topologies = 1; - */ - public context.ContextOuterClass.Topology getTopologies(int index) { - if (topologiesBuilder_ == null) { - return topologies_.get(index); - } else { - return topologiesBuilder_.getMessage(index); - } - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder setTopologies( - int index, context.ContextOuterClass.Topology value) { - if (topologiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologiesIsMutable(); - topologies_.set(index, value); - onChanged(); - } else { - topologiesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder setTopologies( - int index, context.ContextOuterClass.Topology.Builder builderForValue) { - if (topologiesBuilder_ == null) { - ensureTopologiesIsMutable(); - topologies_.set(index, builderForValue.build()); - onChanged(); - } else { - topologiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder addTopologies(context.ContextOuterClass.Topology value) { - if (topologiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologiesIsMutable(); - topologies_.add(value); - onChanged(); - } else { - topologiesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder addTopologies( - int index, context.ContextOuterClass.Topology value) { - if (topologiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopologiesIsMutable(); - topologies_.add(index, value); - onChanged(); - } else { - topologiesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder addTopologies( - context.ContextOuterClass.Topology.Builder builderForValue) { - if (topologiesBuilder_ == null) { - ensureTopologiesIsMutable(); - topologies_.add(builderForValue.build()); - onChanged(); - } else { - topologiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder addTopologies( - int index, context.ContextOuterClass.Topology.Builder builderForValue) { - if (topologiesBuilder_ == null) { - ensureTopologiesIsMutable(); - topologies_.add(index, builderForValue.build()); - onChanged(); - } else { - topologiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder addAllTopologies( - java.lang.Iterable values) { - if (topologiesBuilder_ == null) { - ensureTopologiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, topologies_); - onChanged(); - } else { - topologiesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder clearTopologies() { - if (topologiesBuilder_ == null) { - topologies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - topologiesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public Builder removeTopologies(int index) { - if (topologiesBuilder_ == null) { - ensureTopologiesIsMutable(); - topologies_.remove(index); - onChanged(); - } else { - topologiesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Topology topologies = 1; - */ - public context.ContextOuterClass.Topology.Builder getTopologiesBuilder( - int index) { - return getTopologiesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Topology topologies = 1; - */ - public context.ContextOuterClass.TopologyOrBuilder getTopologiesOrBuilder( - int index) { - if (topologiesBuilder_ == null) { - return topologies_.get(index); } else { - return topologiesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Topology topologies = 1; - */ - public java.util.List - getTopologiesOrBuilderList() { - if (topologiesBuilder_ != null) { - return topologiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(topologies_); - } - } - /** - * repeated .context.Topology topologies = 1; - */ - public context.ContextOuterClass.Topology.Builder addTopologiesBuilder() { - return getTopologiesFieldBuilder().addBuilder( - context.ContextOuterClass.Topology.getDefaultInstance()); - } - /** - * repeated .context.Topology topologies = 1; - */ - public context.ContextOuterClass.Topology.Builder addTopologiesBuilder( - int index) { - return getTopologiesFieldBuilder().addBuilder( - index, context.ContextOuterClass.Topology.getDefaultInstance()); - } - /** - * repeated .context.Topology topologies = 1; - */ - public java.util.List - getTopologiesBuilderList() { - return getTopologiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Topology, context.ContextOuterClass.Topology.Builder, context.ContextOuterClass.TopologyOrBuilder> - getTopologiesFieldBuilder() { - if (topologiesBuilder_ == null) { - topologiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Topology, context.ContextOuterClass.Topology.Builder, context.ContextOuterClass.TopologyOrBuilder>( - topologies_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - topologies_ = null; - } - return topologiesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.TopologyList) - } + /** + * .context.Uuid context_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder() { + return getContextUuid(); + } - // @@protoc_insertion_point(class_scope:context.TopologyList) - private static final context.ContextOuterClass.TopologyList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyList(); - } + private byte memoizedIsInitialized = -1; - public static context.ContextOuterClass.TopologyList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextUuid_ != null) { + output.writeMessage(1, getContextUuid()); + } + unknownFields.writeTo(output); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public context.ContextOuterClass.TopologyList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ContextId)) { + return super.equals(obj); + } + context.ContextOuterClass.ContextId other = (context.ContextOuterClass.ContextId) obj; + if (hasContextUuid() != other.hasContextUuid()) + return false; + if (hasContextUuid()) { + if (!getContextUuid().equals(other.getContextUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextUuid()) { + hash = (37 * hash) + CONTEXT_UUID_FIELD_NUMBER; + hash = (53 * hash) + getContextUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - public interface TopologyEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.TopologyEvent) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.ContextId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + public static context.ContextOuterClass.ContextId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * .context.TopologyId topology_id = 2; - * @return Whether the topologyId field is set. - */ - boolean hasTopologyId(); - /** - * .context.TopologyId topology_id = 2; - * @return The topologyId. - */ - context.ContextOuterClass.TopologyId getTopologyId(); - /** - * .context.TopologyId topology_id = 2; - */ - context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); - } - /** - * Protobuf type {@code context.TopologyEvent} - */ - public static final class TopologyEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.TopologyEvent) - TopologyEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use TopologyEvent.newBuilder() to construct. - private TopologyEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TopologyEvent() { - } + public static context.ContextOuterClass.ContextId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TopologyEvent(); - } + public static context.ContextOuterClass.ContextId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @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; - } + public static context.ContextOuterClass.ContextId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyEvent.class, context.ContextOuterClass.TopologyEvent.Builder.class); - } + public static context.ContextOuterClass.ContextId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + public static context.ContextOuterClass.ContextId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static final int TOPOLOGY_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.TopologyId topologyId_; - /** - * .context.TopologyId topology_id = 2; - * @return Whether the topologyId field is set. - */ - @java.lang.Override - public boolean hasTopologyId() { - return topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 2; - * @return The topologyId. - */ - @java.lang.Override - public context.ContextOuterClass.TopologyId getTopologyId() { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - /** - * .context.TopologyId topology_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); - } + public static context.ContextOuterClass.ContextId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.ContextId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.ContextId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (topologyId_ != null) { - output.writeMessage(2, getTopologyId()); - } - unknownFields.writeTo(output); - } + public static context.ContextOuterClass.ContextId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (topologyId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getTopologyId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.ContextId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.TopologyEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.TopologyEvent other = (context.ContextOuterClass.TopologyEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasTopologyId() != other.hasTopologyId()) return false; - if (hasTopologyId()) { - if (!getTopologyId() - .equals(other.getTopologyId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasTopologyId()) { - hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; - hash = (53 * hash) + getTopologyId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public static context.ContextOuterClass.TopologyEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TopologyEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TopologyEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static Builder newBuilder(context.ContextOuterClass.ContextId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.TopologyEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.TopologyEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.TopologyEvent) - context.ContextOuterClass.TopologyEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_TopologyEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TopologyEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TopologyEvent.class, context.ContextOuterClass.TopologyEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (topologyIdBuilder_ == null) { - topologyId_ = null; - } else { - topologyId_ = null; - topologyIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TopologyEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.TopologyEvent getDefaultInstanceForType() { - return context.ContextOuterClass.TopologyEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.TopologyEvent build() { - context.ContextOuterClass.TopologyEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TopologyEvent) { - return mergeFrom((context.ContextOuterClass.TopologyEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.TopologyEvent other) { - if (other == context.ContextOuterClass.TopologyEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasTopologyId()) { - mergeTopologyId(other.getTopologyId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.TopologyId topologyId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> topologyIdBuilder_; - /** - * .context.TopologyId topology_id = 2; - * @return Whether the topologyId field is set. - */ - public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 2; - * @return The topologyId. - */ - public context.ContextOuterClass.TopologyId getTopologyId() { - if (topologyIdBuilder_ == null) { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } else { - return topologyIdBuilder_.getMessage(); - } - } - /** - * .context.TopologyId topology_id = 2; - */ - public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - topologyId_ = value; - onChanged(); - } else { - topologyIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 2; - */ - public Builder setTopologyId( - context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdBuilder_ == null) { - topologyId_ = builderForValue.build(); - onChanged(); - } else { - topologyIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.TopologyId topology_id = 2; - */ - public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = - context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); - } else { - topologyId_ = value; - } - onChanged(); - } else { - topologyIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 2; - */ - public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; - topologyIdBuilder_ = null; - } - - return this; - } - /** - * .context.TopologyId topology_id = 2; - */ - public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { - - onChanged(); - return getTopologyIdFieldBuilder().getBuilder(); - } - /** - * .context.TopologyId topology_id = 2; - */ - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - if (topologyIdBuilder_ != null) { - return topologyIdBuilder_.getMessageOrBuilder(); - } else { - return topologyId_ == null ? - context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - } - /** - * .context.TopologyId topology_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> - getTopologyIdFieldBuilder() { - if (topologyIdBuilder_ == null) { - topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder>( - getTopologyId(), - getParentForChildren(), - isClean()); - topologyId_ = null; - } - return topologyIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.TopologyEvent) - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - // @@protoc_insertion_point(class_scope:context.TopologyEvent) - private static final context.ContextOuterClass.TopologyEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyEvent(); - } + /** + *
+         * ----- Context -------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.ContextId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ContextId) + context.ContextOuterClass.ContextIdOrBuilder { - public static context.ContextOuterClass.TopologyEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ContextId_descriptor; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextId.class, context.ContextOuterClass.ContextId.Builder.class); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + // Construct using context.ContextOuterClass.ContextId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public context.ContextOuterClass.TopologyEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - public interface DeviceIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.DeviceId) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder clear() { + super.clear(); + if (contextUuidBuilder_ == null) { + contextUuid_ = null; + } else { + contextUuid_ = null; + contextUuidBuilder_ = null; + } + return this; + } - /** - * .context.Uuid device_uuid = 1; - * @return Whether the deviceUuid field is set. - */ - boolean hasDeviceUuid(); - /** - * .context.Uuid device_uuid = 1; - * @return The deviceUuid. - */ - context.ContextOuterClass.Uuid getDeviceUuid(); - /** - * .context.Uuid device_uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder(); - } - /** - *
-   * ----- Device --------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.DeviceId} - */ - public static final class DeviceId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.DeviceId) - DeviceIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceId.newBuilder() to construct. - private DeviceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceId() { - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ContextId_descriptor; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceId(); - } + @java.lang.Override + public context.ContextOuterClass.ContextId getDefaultInstanceForType() { + return context.ContextOuterClass.ContextId.getDefaultInstance(); + } - @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; - } + @java.lang.Override + public context.ContextOuterClass.ContextId build() { + context.ContextOuterClass.ContextId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceId.class, context.ContextOuterClass.DeviceId.Builder.class); - } + @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(); + } + onBuilt(); + return result; + } - public static final int DEVICE_UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid deviceUuid_; - /** - * .context.Uuid device_uuid = 1; - * @return Whether the deviceUuid field is set. - */ - @java.lang.Override - public boolean hasDeviceUuid() { - return deviceUuid_ != null; - } - /** - * .context.Uuid device_uuid = 1; - * @return The deviceUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getDeviceUuid() { - return deviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; - } - /** - * .context.Uuid device_uuid = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder() { - return getDeviceUuid(); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (deviceUuid_ != null) { - output.writeMessage(1, getDeviceUuid()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (deviceUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDeviceUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @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 boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.DeviceId)) { - return super.equals(obj); - } - context.ContextOuterClass.DeviceId other = (context.ContextOuterClass.DeviceId) obj; - - if (hasDeviceUuid() != other.hasDeviceUuid()) return false; - if (hasDeviceUuid()) { - if (!getDeviceUuid() - .equals(other.getDeviceUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @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 int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDeviceUuid()) { - hash = (37 * hash) + DEVICE_UUID_FIELD_NUMBER; - hash = (53 * hash) + getDeviceUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ContextId) { + return mergeFrom((context.ContextOuterClass.ContextId) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static context.ContextOuterClass.DeviceId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public Builder mergeFrom(context.ContextOuterClass.ContextId other) { + if (other == context.ContextOuterClass.ContextId.getDefaultInstance()) + return this; + if (other.hasContextUuid()) { + mergeContextUuid(other.getContextUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.DeviceId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Device --------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.DeviceId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.DeviceId) - context.ContextOuterClass.DeviceIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_DeviceId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceId.class, context.ContextOuterClass.DeviceId.Builder.class); - } - - // 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; - deviceUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_DeviceId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceId getDefaultInstanceForType() { - return context.ContextOuterClass.DeviceId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.DeviceId build() { - context.ContextOuterClass.DeviceId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.DeviceId) { - return mergeFrom((context.ContextOuterClass.DeviceId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.DeviceId other) { - if (other == context.ContextOuterClass.DeviceId.getDefaultInstance()) return this; - if (other.hasDeviceUuid()) { - mergeDeviceUuid(other.getDeviceUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid deviceUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> deviceUuidBuilder_; - /** - * .context.Uuid device_uuid = 1; - * @return Whether the deviceUuid field is set. - */ - public boolean hasDeviceUuid() { - return deviceUuidBuilder_ != null || deviceUuid_ != null; - } - /** - * .context.Uuid device_uuid = 1; - * @return The deviceUuid. - */ - public context.ContextOuterClass.Uuid getDeviceUuid() { - if (deviceUuidBuilder_ == null) { - return deviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; - } else { - return deviceUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid device_uuid = 1; - */ - public Builder setDeviceUuid(context.ContextOuterClass.Uuid value) { - if (deviceUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceUuid_ = value; - onChanged(); - } else { - deviceUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid device_uuid = 1; - */ - public Builder setDeviceUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (deviceUuidBuilder_ == null) { - deviceUuid_ = builderForValue.build(); - onChanged(); - } else { - deviceUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid device_uuid = 1; - */ - public Builder mergeDeviceUuid(context.ContextOuterClass.Uuid value) { - if (deviceUuidBuilder_ == null) { - if (deviceUuid_ != null) { - deviceUuid_ = - context.ContextOuterClass.Uuid.newBuilder(deviceUuid_).mergeFrom(value).buildPartial(); - } else { - deviceUuid_ = value; - } - onChanged(); - } else { - deviceUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid device_uuid = 1; - */ - public Builder clearDeviceUuid() { - if (deviceUuidBuilder_ == null) { - deviceUuid_ = null; - onChanged(); - } else { - deviceUuid_ = null; - deviceUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid device_uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getDeviceUuidBuilder() { - - onChanged(); - return getDeviceUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid device_uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder() { - if (deviceUuidBuilder_ != null) { - return deviceUuidBuilder_.getMessageOrBuilder(); - } else { - return deviceUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; - } - } - /** - * .context.Uuid device_uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getDeviceUuidFieldBuilder() { - if (deviceUuidBuilder_ == null) { - deviceUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getDeviceUuid(), - getParentForChildren(), - isClean()); - deviceUuid_ = null; - } - return deviceUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.DeviceId) - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ContextId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - // @@protoc_insertion_point(class_scope:context.DeviceId) - private static final context.ContextOuterClass.DeviceId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceId(); - } + private context.ContextOuterClass.Uuid contextUuid_; - public static context.ContextOuterClass.DeviceId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3 contextUuidBuilder_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Uuid context_uuid = 1; + * @return Whether the contextUuid field is set. + */ + public boolean hasContextUuid() { + return contextUuidBuilder_ != null || contextUuid_ != null; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Uuid context_uuid = 1; + * @return The contextUuid. + */ + public context.ContextOuterClass.Uuid getContextUuid() { + if (contextUuidBuilder_ == null) { + return contextUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; + } else { + return contextUuidBuilder_.getMessage(); + } + } - @java.lang.Override - public context.ContextOuterClass.DeviceId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + /** + * .context.Uuid context_uuid = 1; + */ + public Builder setContextUuid(context.ContextOuterClass.Uuid value) { + if (contextUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextUuid_ = value; + onChanged(); + } else { + contextUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid context_uuid = 1; + */ + public Builder setContextUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (contextUuidBuilder_ == null) { + contextUuid_ = builderForValue.build(); + onChanged(); + } else { + contextUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid context_uuid = 1; + */ + public Builder mergeContextUuid(context.ContextOuterClass.Uuid value) { + if (contextUuidBuilder_ == null) { + if (contextUuid_ != null) { + contextUuid_ = context.ContextOuterClass.Uuid.newBuilder(contextUuid_).mergeFrom(value).buildPartial(); + } else { + contextUuid_ = value; + } + onChanged(); + } else { + contextUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid context_uuid = 1; + */ + public Builder clearContextUuid() { + if (contextUuidBuilder_ == null) { + contextUuid_ = null; + onChanged(); + } else { + contextUuid_ = null; + contextUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid context_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getContextUuidBuilder() { + onChanged(); + return getContextUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid context_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder() { + if (contextUuidBuilder_ != null) { + return contextUuidBuilder_.getMessageOrBuilder(); + } else { + return contextUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; + } + } + + /** + * .context.Uuid context_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextUuidFieldBuilder() { + if (contextUuidBuilder_ == null) { + contextUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextUuid(), getParentForChildren(), isClean()); + contextUuid_ = null; + } + return contextUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ContextId) + } + + // @@protoc_insertion_point(class_scope:context.ContextId) + private static final context.ContextOuterClass.ContextId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ContextId(); + } + + public static context.ContextOuterClass.ContextId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ContextId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ContextOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Context) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); + + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + java.util.List getTopologyIdsList(); + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + context.ContextOuterClass.TopologyId getTopologyIds(int index); + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + int getTopologyIdsCount(); + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + java.util.List getTopologyIdsOrBuilderList(); + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder(int index); + + /** + * repeated .context.ServiceId service_ids = 4; + */ + java.util.List getServiceIdsList(); + + /** + * repeated .context.ServiceId service_ids = 4; + */ + context.ContextOuterClass.ServiceId getServiceIds(int index); + + /** + * repeated .context.ServiceId service_ids = 4; + */ + int getServiceIdsCount(); + + /** + * repeated .context.ServiceId service_ids = 4; + */ + java.util.List getServiceIdsOrBuilderList(); + + /** + * repeated .context.ServiceId service_ids = 4; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder(int index); + + /** + * repeated .context.SliceId slice_ids = 5; + */ + java.util.List getSliceIdsList(); + + /** + * repeated .context.SliceId slice_ids = 5; + */ + context.ContextOuterClass.SliceId getSliceIds(int index); + + /** + * repeated .context.SliceId slice_ids = 5; + */ + int getSliceIdsCount(); + + /** + * repeated .context.SliceId slice_ids = 5; + */ + java.util.List getSliceIdsOrBuilderList(); + + /** + * repeated .context.SliceId slice_ids = 5; + */ + context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder(int index); + + /** + * .context.TeraFlowController controller = 6; + * @return Whether the controller field is set. + */ + boolean hasController(); + + /** + * .context.TeraFlowController controller = 6; + * @return The controller. + */ + context.ContextOuterClass.TeraFlowController getController(); + + /** + * .context.TeraFlowController controller = 6; + */ + context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder(); + } + + /** + * Protobuf type {@code context.Context} + */ + public static final class Context extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Context) + ContextOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Context.newBuilder() to construct. + private Context(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Context() { + name_ = ""; + topologyIds_ = java.util.Collections.emptyList(); + serviceIds_ = java.util.Collections.emptyList(); + sliceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Context_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Context.class, context.ContextOuterClass.Context.Builder.class); + } + + public static final int CONTEXT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ContextId contextId_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOPOLOGY_IDS_FIELD_NUMBER = 3; + + private java.util.List topologyIds_; + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + @java.lang.Override + public java.util.List getTopologyIdsList() { + return topologyIds_; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + @java.lang.Override + public java.util.List getTopologyIdsOrBuilderList() { + return topologyIds_; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + @java.lang.Override + public int getTopologyIdsCount() { + return topologyIds_.size(); + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyId getTopologyIds(int index) { + return topologyIds_.get(index); + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder(int index) { + return topologyIds_.get(index); + } + + public static final int SERVICE_IDS_FIELD_NUMBER = 4; + + private java.util.List serviceIds_; + + /** + * repeated .context.ServiceId service_ids = 4; + */ + @java.lang.Override + public java.util.List getServiceIdsList() { + return serviceIds_; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + @java.lang.Override + public java.util.List getServiceIdsOrBuilderList() { + return serviceIds_; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + @java.lang.Override + public int getServiceIdsCount() { + return serviceIds_.size(); + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceIds(int index) { + return serviceIds_.get(index); + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder(int index) { + return serviceIds_.get(index); + } + + public static final int SLICE_IDS_FIELD_NUMBER = 5; + + private java.util.List sliceIds_; + + /** + * repeated .context.SliceId slice_ids = 5; + */ + @java.lang.Override + public java.util.List getSliceIdsList() { + return sliceIds_; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + @java.lang.Override + public java.util.List getSliceIdsOrBuilderList() { + return sliceIds_; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + @java.lang.Override + public int getSliceIdsCount() { + return sliceIds_.size(); + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + @java.lang.Override + public context.ContextOuterClass.SliceId getSliceIds(int index) { + return sliceIds_.get(index); + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder(int index) { + return sliceIds_.get(index); + } + + public static final int CONTROLLER_FIELD_NUMBER = 6; + + private context.ContextOuterClass.TeraFlowController controller_; + + /** + * .context.TeraFlowController controller = 6; + * @return Whether the controller field is set. + */ + @java.lang.Override + public boolean hasController() { + return controller_ != null; + } + + /** + * .context.TeraFlowController controller = 6; + * @return The controller. + */ + @java.lang.Override + public context.ContextOuterClass.TeraFlowController getController() { + return controller_ == null ? context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; + } + + /** + * .context.TeraFlowController controller = 6; + */ + @java.lang.Override + public context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder() { + return getController(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < topologyIds_.size(); i++) { + output.writeMessage(3, topologyIds_.get(i)); + } + for (int i = 0; i < serviceIds_.size(); i++) { + output.writeMessage(4, serviceIds_.get(i)); + } + for (int i = 0; i < sliceIds_.size(); i++) { + output.writeMessage(5, sliceIds_.get(i)); + } + if (controller_ != null) { + output.writeMessage(6, getController()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < topologyIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, topologyIds_.get(i)); + } + for (int i = 0; i < serviceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, serviceIds_.get(i)); + } + for (int i = 0; i < sliceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, sliceIds_.get(i)); + } + if (controller_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getController()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Context)) { + return super.equals(obj); + } + context.ContextOuterClass.Context other = (context.ContextOuterClass.Context) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getTopologyIdsList().equals(other.getTopologyIdsList())) + return false; + if (!getServiceIdsList().equals(other.getServiceIdsList())) + return false; + if (!getSliceIdsList().equals(other.getSliceIdsList())) + return false; + if (hasController() != other.hasController()) + return false; + if (hasController()) { + if (!getController().equals(other.getController())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getTopologyIdsCount() > 0) { + hash = (37 * hash) + TOPOLOGY_IDS_FIELD_NUMBER; + hash = (53 * hash) + getTopologyIdsList().hashCode(); + } + if (getServiceIdsCount() > 0) { + hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getServiceIdsList().hashCode(); + } + if (getSliceIdsCount() > 0) { + hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSliceIdsList().hashCode(); + } + if (hasController()) { + hash = (37 * hash) + CONTROLLER_FIELD_NUMBER; + hash = (53 * hash) + getController().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Context parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Context parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Context parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Context parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Context parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Context parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Context parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Context parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Context parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Context parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Context parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Context parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Context prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Context} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Context) + context.ContextOuterClass.ContextOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Context_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Context_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Context.class, context.ContextOuterClass.Context.Builder.class); + } + + // 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; + contextIdBuilder_ = null; + } + name_ = ""; + if (topologyIdsBuilder_ == null) { + topologyIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + topologyIdsBuilder_.clear(); + } + if (serviceIdsBuilder_ == null) { + serviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + serviceIdsBuilder_.clear(); + } + if (sliceIdsBuilder_ == null) { + sliceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + sliceIdsBuilder_.clear(); + } + if (controllerBuilder_ == null) { + controller_ = null; + } else { + controller_ = null; + controllerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Context_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Context getDefaultInstanceForType() { + return context.ContextOuterClass.Context.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Context build() { + context.ContextOuterClass.Context result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + if (topologyIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.topologyIds_ = topologyIds_; + } else { + result.topologyIds_ = topologyIdsBuilder_.build(); + } + if (serviceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.serviceIds_ = serviceIds_; + } else { + result.serviceIds_ = serviceIdsBuilder_.build(); + } + if (sliceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); + bitField0_ = (bitField0_ & ~0x00000004); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Context) { + return mergeFrom((context.ContextOuterClass.Context) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Context other) { + if (other == context.ContextOuterClass.Context.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (topologyIdsBuilder_ == null) { + if (!other.topologyIds_.isEmpty()) { + if (topologyIds_.isEmpty()) { + topologyIds_ = other.topologyIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTopologyIdsIsMutable(); + topologyIds_.addAll(other.topologyIds_); + } + onChanged(); + } + } else { + if (!other.topologyIds_.isEmpty()) { + if (topologyIdsBuilder_.isEmpty()) { + topologyIdsBuilder_.dispose(); + topologyIdsBuilder_ = null; + topologyIds_ = other.topologyIds_; + bitField0_ = (bitField0_ & ~0x00000001); + topologyIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTopologyIdsFieldBuilder() : null; + } else { + topologyIdsBuilder_.addAllMessages(other.topologyIds_); + } + } + } + if (serviceIdsBuilder_ == null) { + if (!other.serviceIds_.isEmpty()) { + if (serviceIds_.isEmpty()) { + serviceIds_ = other.serviceIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureServiceIdsIsMutable(); + serviceIds_.addAll(other.serviceIds_); + } + onChanged(); + } + } else { + if (!other.serviceIds_.isEmpty()) { + if (serviceIdsBuilder_.isEmpty()) { + serviceIdsBuilder_.dispose(); + serviceIdsBuilder_ = null; + serviceIds_ = other.serviceIds_; + bitField0_ = (bitField0_ & ~0x00000002); + serviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceIdsFieldBuilder() : null; + } else { + serviceIdsBuilder_.addAllMessages(other.serviceIds_); + } + } + } + if (sliceIdsBuilder_ == null) { + if (!other.sliceIds_.isEmpty()) { + if (sliceIds_.isEmpty()) { + sliceIds_ = other.sliceIds_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSliceIdsIsMutable(); + sliceIds_.addAll(other.sliceIds_); + } + onChanged(); + } + } else { + if (!other.sliceIds_.isEmpty()) { + if (sliceIdsBuilder_.isEmpty()) { + sliceIdsBuilder_.dispose(); + sliceIdsBuilder_ = null; + sliceIds_ = other.sliceIds_; + bitField0_ = (bitField0_ & ~0x00000004); + sliceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceIdsFieldBuilder() : null; + } else { + sliceIdsBuilder_.addAllMessages(other.sliceIds_); + } + } + } + if (other.hasController()) { + mergeController(other.getController()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Context) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.ContextId contextId_; + + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } + + /** + * .context.ContextId context_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.util.List topologyIds_ = java.util.Collections.emptyList(); + + private void ensureTopologyIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + topologyIds_ = new java.util.ArrayList(topologyIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 topologyIdsBuilder_; + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public java.util.List getTopologyIdsList() { + if (topologyIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(topologyIds_); + } else { + return topologyIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public int getTopologyIdsCount() { + if (topologyIdsBuilder_ == null) { + return topologyIds_.size(); + } else { + return topologyIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public context.ContextOuterClass.TopologyId getTopologyIds(int index) { + if (topologyIdsBuilder_ == null) { + return topologyIds_.get(index); + } else { + return topologyIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder setTopologyIds(int index, context.ContextOuterClass.TopologyId value) { + if (topologyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologyIdsIsMutable(); + topologyIds_.set(index, value); + onChanged(); + } else { + topologyIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder setTopologyIds(int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.set(index, builderForValue.build()); + onChanged(); + } else { + topologyIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder addTopologyIds(context.ContextOuterClass.TopologyId value) { + if (topologyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologyIdsIsMutable(); + topologyIds_.add(value); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder addTopologyIds(int index, context.ContextOuterClass.TopologyId value) { + if (topologyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologyIdsIsMutable(); + topologyIds_.add(index, value); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder addTopologyIds(context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.add(builderForValue.build()); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder addTopologyIds(int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.add(index, builderForValue.build()); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder addAllTopologyIds(java.lang.Iterable values) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, topologyIds_); + onChanged(); + } else { + topologyIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder clearTopologyIds() { + if (topologyIdsBuilder_ == null) { + topologyIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + topologyIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public Builder removeTopologyIds(int index) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.remove(index); + onChanged(); + } else { + topologyIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public context.ContextOuterClass.TopologyId.Builder getTopologyIdsBuilder(int index) { + return getTopologyIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder(int index) { + if (topologyIdsBuilder_ == null) { + return topologyIds_.get(index); + } else { + return topologyIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public java.util.List getTopologyIdsOrBuilderList() { + if (topologyIdsBuilder_ != null) { + return topologyIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(topologyIds_); + } + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder() { + return getTopologyIdsFieldBuilder().addBuilder(context.ContextOuterClass.TopologyId.getDefaultInstance()); + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder(int index) { + return getTopologyIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.TopologyId.getDefaultInstance()); + } + + /** + * repeated .context.TopologyId topology_ids = 3; + */ + public java.util.List getTopologyIdsBuilderList() { + return getTopologyIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getTopologyIdsFieldBuilder() { + if (topologyIdsBuilder_ == null) { + topologyIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(topologyIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + topologyIds_ = null; + } + return topologyIdsBuilder_; + } + + private java.util.List serviceIds_ = java.util.Collections.emptyList(); + + private void ensureServiceIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + serviceIds_ = new java.util.ArrayList(serviceIds_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 serviceIdsBuilder_; + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public java.util.List getServiceIdsList() { + if (serviceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceIds_); + } else { + return serviceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public int getServiceIdsCount() { + if (serviceIdsBuilder_ == null) { + return serviceIds_.size(); + } else { + return serviceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public context.ContextOuterClass.ServiceId getServiceIds(int index) { + if (serviceIdsBuilder_ == null) { + return serviceIds_.get(index); + } else { + return serviceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder setServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceIdsIsMutable(); + serviceIds_.set(index, value); + onChanged(); + } else { + serviceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder setServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder addServiceIds(context.ContextOuterClass.ServiceId value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceIdsIsMutable(); + serviceIds_.add(value); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder addServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceIdsIsMutable(); + serviceIds_.add(index, value); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder addServiceIds(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.add(builderForValue.build()); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder addServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder addAllServiceIds(java.lang.Iterable values) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceIds_); + onChanged(); + } else { + serviceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder clearServiceIds() { + if (serviceIdsBuilder_ == null) { + serviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + serviceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public Builder removeServiceIds(int index) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.remove(index); + onChanged(); + } else { + serviceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdsBuilder(int index) { + return getServiceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder(int index) { + if (serviceIdsBuilder_ == null) { + return serviceIds_.get(index); + } else { + return serviceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public java.util.List getServiceIdsOrBuilderList() { + if (serviceIdsBuilder_ != null) { + return serviceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceIds_); + } + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder() { + return getServiceIdsFieldBuilder().addBuilder(context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder(int index) { + return getServiceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId service_ids = 4; + */ + public java.util.List getServiceIdsBuilderList() { + return getServiceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getServiceIdsFieldBuilder() { + if (serviceIdsBuilder_ == null) { + serviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + serviceIds_ = null; + } + return serviceIdsBuilder_; + } + + private java.util.List sliceIds_ = java.util.Collections.emptyList(); + + private void ensureSliceIdsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + sliceIds_ = new java.util.ArrayList(sliceIds_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 sliceIdsBuilder_; + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public java.util.List getSliceIdsList() { + if (sliceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sliceIds_); + } else { + return sliceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public int getSliceIdsCount() { + if (sliceIdsBuilder_ == null) { + return sliceIds_.size(); + } else { + return sliceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public context.ContextOuterClass.SliceId getSliceIds(int index) { + if (sliceIdsBuilder_ == null) { + return sliceIds_.get(index); + } else { + return sliceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder setSliceIds(int index, context.ContextOuterClass.SliceId value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceIdsIsMutable(); + sliceIds_.set(index, value); + onChanged(); + } else { + sliceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder setSliceIds(int index, context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + sliceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder addSliceIds(context.ContextOuterClass.SliceId value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceIdsIsMutable(); + sliceIds_.add(value); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder addSliceIds(int index, context.ContextOuterClass.SliceId value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceIdsIsMutable(); + sliceIds_.add(index, value); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder addSliceIds(context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.add(builderForValue.build()); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder addSliceIds(int index, context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder addAllSliceIds(java.lang.Iterable values) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceIds_); + onChanged(); + } else { + sliceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder clearSliceIds() { + if (sliceIdsBuilder_ == null) { + sliceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + sliceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public Builder removeSliceIds(int index) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.remove(index); + onChanged(); + } else { + sliceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public context.ContextOuterClass.SliceId.Builder getSliceIdsBuilder(int index) { + return getSliceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder(int index) { + if (sliceIdsBuilder_ == null) { + return sliceIds_.get(index); + } else { + return sliceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public java.util.List getSliceIdsOrBuilderList() { + if (sliceIdsBuilder_ != null) { + return sliceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sliceIds_); + } + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder() { + return getSliceIdsFieldBuilder().addBuilder(context.ContextOuterClass.SliceId.getDefaultInstance()); + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder(int index) { + return getSliceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.SliceId.getDefaultInstance()); + } + + /** + * repeated .context.SliceId slice_ids = 5; + */ + public java.util.List getSliceIdsBuilderList() { + return getSliceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSliceIdsFieldBuilder() { + if (sliceIdsBuilder_ == null) { + sliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + sliceIds_ = null; + } + return sliceIdsBuilder_; + } + + private context.ContextOuterClass.TeraFlowController controller_; + + private com.google.protobuf.SingleFieldBuilderV3 controllerBuilder_; + + /** + * .context.TeraFlowController controller = 6; + * @return Whether the controller field is set. + */ + public boolean hasController() { + return controllerBuilder_ != null || controller_ != null; + } + + /** + * .context.TeraFlowController controller = 6; + * @return The controller. + */ + public context.ContextOuterClass.TeraFlowController getController() { + if (controllerBuilder_ == null) { + return controller_ == null ? context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; + } else { + return controllerBuilder_.getMessage(); + } + } + + /** + * .context.TeraFlowController controller = 6; + */ + public Builder setController(context.ContextOuterClass.TeraFlowController value) { + if (controllerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + controller_ = value; + onChanged(); + } else { + controllerBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.TeraFlowController controller = 6; + */ + public Builder setController(context.ContextOuterClass.TeraFlowController.Builder builderForValue) { + if (controllerBuilder_ == null) { + controller_ = builderForValue.build(); + onChanged(); + } else { + controllerBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.TeraFlowController controller = 6; + */ + public Builder mergeController(context.ContextOuterClass.TeraFlowController value) { + if (controllerBuilder_ == null) { + if (controller_ != null) { + controller_ = context.ContextOuterClass.TeraFlowController.newBuilder(controller_).mergeFrom(value).buildPartial(); + } else { + controller_ = value; + } + onChanged(); + } else { + controllerBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.TeraFlowController controller = 6; + */ + public Builder clearController() { + if (controllerBuilder_ == null) { + controller_ = null; + onChanged(); + } else { + controller_ = null; + controllerBuilder_ = null; + } + return this; + } + + /** + * .context.TeraFlowController controller = 6; + */ + public context.ContextOuterClass.TeraFlowController.Builder getControllerBuilder() { + onChanged(); + return getControllerFieldBuilder().getBuilder(); + } + + /** + * .context.TeraFlowController controller = 6; + */ + public context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder() { + if (controllerBuilder_ != null) { + return controllerBuilder_.getMessageOrBuilder(); + } else { + return controller_ == null ? context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; + } + } + + /** + * .context.TeraFlowController controller = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3 getControllerFieldBuilder() { + if (controllerBuilder_ == null) { + controllerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getController(), getParentForChildren(), isClean()); + controller_ = null; + } + return controllerBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Context) + } + + // @@protoc_insertion_point(class_scope:context.Context) + private static final context.ContextOuterClass.Context DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Context(); + } + + public static context.ContextOuterClass.Context getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Context getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ContextIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ContextIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.ContextId context_ids = 1; + */ + java.util.List getContextIdsList(); + + /** + * repeated .context.ContextId context_ids = 1; + */ + context.ContextOuterClass.ContextId getContextIds(int index); + + /** + * repeated .context.ContextId context_ids = 1; + */ + int getContextIdsCount(); + + /** + * repeated .context.ContextId context_ids = 1; + */ + java.util.List getContextIdsOrBuilderList(); + + /** + * repeated .context.ContextId context_ids = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ContextIdList} + */ + public static final class ContextIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ContextIdList) + ContextIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ContextIdList.newBuilder() to construct. + private ContextIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContextIdList() { + contextIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextIdList.class, context.ContextOuterClass.ContextIdList.Builder.class); + } + + public static final int CONTEXT_IDS_FIELD_NUMBER = 1; + + private java.util.List contextIds_; + + /** + * repeated .context.ContextId context_ids = 1; + */ + @java.lang.Override + public java.util.List getContextIdsList() { + return contextIds_; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + @java.lang.Override + public java.util.List getContextIdsOrBuilderList() { + return contextIds_; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + @java.lang.Override + public int getContextIdsCount() { + return contextIds_.size(); + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextIds(int index) { + return contextIds_.get(index); + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdsOrBuilder(int index) { + return contextIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < contextIds_.size(); i++) { + output.writeMessage(1, contextIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < contextIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, contextIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ContextIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.ContextIdList other = (context.ContextOuterClass.ContextIdList) obj; + if (!getContextIdsList().equals(other.getContextIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getContextIdsCount() > 0) { + hash = (37 * hash) + CONTEXT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getContextIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ContextIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ContextIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ContextIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ContextIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ContextIdList) + context.ContextOuterClass.ContextIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ContextIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextIdList.class, context.ContextOuterClass.ContextIdList.Builder.class); + } + + // 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(); + if (contextIdsBuilder_ == null) { + contextIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + contextIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ContextIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ContextIdList getDefaultInstanceForType() { + return context.ContextOuterClass.ContextIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ContextIdList build() { + context.ContextOuterClass.ContextIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ContextIdList buildPartial() { + context.ContextOuterClass.ContextIdList result = new context.ContextOuterClass.ContextIdList(this); + int from_bitField0_ = bitField0_; + if (contextIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + contextIds_ = java.util.Collections.unmodifiableList(contextIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.contextIds_ = contextIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ContextIdList) { + return mergeFrom((context.ContextOuterClass.ContextIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ContextIdList other) { + if (other == context.ContextOuterClass.ContextIdList.getDefaultInstance()) + return this; + if (contextIdsBuilder_ == null) { + if (!other.contextIds_.isEmpty()) { + if (contextIds_.isEmpty()) { + contextIds_ = other.contextIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureContextIdsIsMutable(); + contextIds_.addAll(other.contextIds_); + } + onChanged(); + } + } else { + if (!other.contextIds_.isEmpty()) { + if (contextIdsBuilder_.isEmpty()) { + contextIdsBuilder_.dispose(); + contextIdsBuilder_ = null; + contextIds_ = other.contextIds_; + bitField0_ = (bitField0_ & ~0x00000001); + contextIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getContextIdsFieldBuilder() : null; + } else { + contextIdsBuilder_.addAllMessages(other.contextIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ContextIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List contextIds_ = java.util.Collections.emptyList(); + + private void ensureContextIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + contextIds_ = new java.util.ArrayList(contextIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 contextIdsBuilder_; + + /** + * repeated .context.ContextId context_ids = 1; + */ + public java.util.List getContextIdsList() { + if (contextIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(contextIds_); + } else { + return contextIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public int getContextIdsCount() { + if (contextIdsBuilder_ == null) { + return contextIds_.size(); + } else { + return contextIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public context.ContextOuterClass.ContextId getContextIds(int index) { + if (contextIdsBuilder_ == null) { + return contextIds_.get(index); + } else { + return contextIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder setContextIds(int index, context.ContextOuterClass.ContextId value) { + if (contextIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextIdsIsMutable(); + contextIds_.set(index, value); + onChanged(); + } else { + contextIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder setContextIds(int index, context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdsBuilder_ == null) { + ensureContextIdsIsMutable(); + contextIds_.set(index, builderForValue.build()); + onChanged(); + } else { + contextIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder addContextIds(context.ContextOuterClass.ContextId value) { + if (contextIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextIdsIsMutable(); + contextIds_.add(value); + onChanged(); + } else { + contextIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder addContextIds(int index, context.ContextOuterClass.ContextId value) { + if (contextIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextIdsIsMutable(); + contextIds_.add(index, value); + onChanged(); + } else { + contextIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder addContextIds(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdsBuilder_ == null) { + ensureContextIdsIsMutable(); + contextIds_.add(builderForValue.build()); + onChanged(); + } else { + contextIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder addContextIds(int index, context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdsBuilder_ == null) { + ensureContextIdsIsMutable(); + contextIds_.add(index, builderForValue.build()); + onChanged(); + } else { + contextIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder addAllContextIds(java.lang.Iterable values) { + if (contextIdsBuilder_ == null) { + ensureContextIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contextIds_); + onChanged(); + } else { + contextIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder clearContextIds() { + if (contextIdsBuilder_ == null) { + contextIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + contextIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public Builder removeContextIds(int index) { + if (contextIdsBuilder_ == null) { + ensureContextIdsIsMutable(); + contextIds_.remove(index); + onChanged(); + } else { + contextIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdsBuilder(int index) { + return getContextIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdsOrBuilder(int index) { + if (contextIdsBuilder_ == null) { + return contextIds_.get(index); + } else { + return contextIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public java.util.List getContextIdsOrBuilderList() { + if (contextIdsBuilder_ != null) { + return contextIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(contextIds_); + } + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public context.ContextOuterClass.ContextId.Builder addContextIdsBuilder() { + return getContextIdsFieldBuilder().addBuilder(context.ContextOuterClass.ContextId.getDefaultInstance()); + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public context.ContextOuterClass.ContextId.Builder addContextIdsBuilder(int index) { + return getContextIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.ContextId.getDefaultInstance()); + } + + /** + * repeated .context.ContextId context_ids = 1; + */ + public java.util.List getContextIdsBuilderList() { + return getContextIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getContextIdsFieldBuilder() { + if (contextIdsBuilder_ == null) { + contextIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(contextIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + contextIds_ = null; + } + return contextIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ContextIdList) + } + + // @@protoc_insertion_point(class_scope:context.ContextIdList) + private static final context.ContextOuterClass.ContextIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ContextIdList(); + } + + public static context.ContextOuterClass.ContextIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ContextIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ContextListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ContextList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Context contexts = 1; + */ + java.util.List getContextsList(); + + /** + * repeated .context.Context contexts = 1; + */ + context.ContextOuterClass.Context getContexts(int index); + + /** + * repeated .context.Context contexts = 1; + */ + int getContextsCount(); + + /** + * repeated .context.Context contexts = 1; + */ + java.util.List getContextsOrBuilderList(); + + /** + * repeated .context.Context contexts = 1; + */ + context.ContextOuterClass.ContextOrBuilder getContextsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ContextList} + */ + public static final class ContextList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ContextList) + ContextListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ContextList.newBuilder() to construct. + private ContextList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContextList() { + contexts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextList.class, context.ContextOuterClass.ContextList.Builder.class); + } + + public static final int CONTEXTS_FIELD_NUMBER = 1; + + private java.util.List contexts_; + + /** + * repeated .context.Context contexts = 1; + */ + @java.lang.Override + public java.util.List getContextsList() { + return contexts_; + } + + /** + * repeated .context.Context contexts = 1; + */ + @java.lang.Override + public java.util.List getContextsOrBuilderList() { + return contexts_; + } + + /** + * repeated .context.Context contexts = 1; + */ + @java.lang.Override + public int getContextsCount() { + return contexts_.size(); + } + + /** + * repeated .context.Context contexts = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Context getContexts(int index) { + return contexts_.get(index); + } + + /** + * repeated .context.Context contexts = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextOrBuilder getContextsOrBuilder(int index) { + return contexts_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < contexts_.size(); i++) { + output.writeMessage(1, contexts_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < contexts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, contexts_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ContextList)) { + return super.equals(obj); + } + context.ContextOuterClass.ContextList other = (context.ContextOuterClass.ContextList) obj; + if (!getContextsList().equals(other.getContextsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getContextsCount() > 0) { + hash = (37 * hash) + CONTEXTS_FIELD_NUMBER; + hash = (53 * hash) + getContextsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ContextList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ContextList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ContextList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ContextList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ContextList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ContextList) + context.ContextOuterClass.ContextListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ContextList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextList.class, context.ContextOuterClass.ContextList.Builder.class); + } + + // 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(); + if (contextsBuilder_ == null) { + contexts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + contextsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ContextList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ContextList getDefaultInstanceForType() { + return context.ContextOuterClass.ContextList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ContextList build() { + context.ContextOuterClass.ContextList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ContextList buildPartial() { + context.ContextOuterClass.ContextList result = new context.ContextOuterClass.ContextList(this); + int from_bitField0_ = bitField0_; + if (contextsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + contexts_ = java.util.Collections.unmodifiableList(contexts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.contexts_ = contexts_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ContextList) { + return mergeFrom((context.ContextOuterClass.ContextList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ContextList other) { + if (other == context.ContextOuterClass.ContextList.getDefaultInstance()) + return this; + if (contextsBuilder_ == null) { + if (!other.contexts_.isEmpty()) { + if (contexts_.isEmpty()) { + contexts_ = other.contexts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureContextsIsMutable(); + contexts_.addAll(other.contexts_); + } + onChanged(); + } + } else { + if (!other.contexts_.isEmpty()) { + if (contextsBuilder_.isEmpty()) { + contextsBuilder_.dispose(); + contextsBuilder_ = null; + contexts_ = other.contexts_; + bitField0_ = (bitField0_ & ~0x00000001); + contextsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getContextsFieldBuilder() : null; + } else { + contextsBuilder_.addAllMessages(other.contexts_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ContextList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List contexts_ = java.util.Collections.emptyList(); + + private void ensureContextsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + contexts_ = new java.util.ArrayList(contexts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 contextsBuilder_; + + /** + * repeated .context.Context contexts = 1; + */ + public java.util.List getContextsList() { + if (contextsBuilder_ == null) { + return java.util.Collections.unmodifiableList(contexts_); + } else { + return contextsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Context contexts = 1; + */ + public int getContextsCount() { + if (contextsBuilder_ == null) { + return contexts_.size(); + } else { + return contextsBuilder_.getCount(); + } + } + + /** + * repeated .context.Context contexts = 1; + */ + public context.ContextOuterClass.Context getContexts(int index) { + if (contextsBuilder_ == null) { + return contexts_.get(index); + } else { + return contextsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder setContexts(int index, context.ContextOuterClass.Context value) { + if (contextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextsIsMutable(); + contexts_.set(index, value); + onChanged(); + } else { + contextsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder setContexts(int index, context.ContextOuterClass.Context.Builder builderForValue) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.set(index, builderForValue.build()); + onChanged(); + } else { + contextsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder addContexts(context.ContextOuterClass.Context value) { + if (contextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextsIsMutable(); + contexts_.add(value); + onChanged(); + } else { + contextsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder addContexts(int index, context.ContextOuterClass.Context value) { + if (contextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContextsIsMutable(); + contexts_.add(index, value); + onChanged(); + } else { + contextsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder addContexts(context.ContextOuterClass.Context.Builder builderForValue) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.add(builderForValue.build()); + onChanged(); + } else { + contextsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder addContexts(int index, context.ContextOuterClass.Context.Builder builderForValue) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.add(index, builderForValue.build()); + onChanged(); + } else { + contextsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder addAllContexts(java.lang.Iterable values) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contexts_); + onChanged(); + } else { + contextsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder clearContexts() { + if (contextsBuilder_ == null) { + contexts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + contextsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public Builder removeContexts(int index) { + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.remove(index); + onChanged(); + } else { + contextsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Context contexts = 1; + */ + public context.ContextOuterClass.Context.Builder getContextsBuilder(int index) { + return getContextsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Context contexts = 1; + */ + public context.ContextOuterClass.ContextOrBuilder getContextsOrBuilder(int index) { + if (contextsBuilder_ == null) { + return contexts_.get(index); + } else { + return contextsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Context contexts = 1; + */ + public java.util.List getContextsOrBuilderList() { + if (contextsBuilder_ != null) { + return contextsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(contexts_); + } + } + + /** + * repeated .context.Context contexts = 1; + */ + public context.ContextOuterClass.Context.Builder addContextsBuilder() { + return getContextsFieldBuilder().addBuilder(context.ContextOuterClass.Context.getDefaultInstance()); + } + + /** + * repeated .context.Context contexts = 1; + */ + public context.ContextOuterClass.Context.Builder addContextsBuilder(int index) { + return getContextsFieldBuilder().addBuilder(index, context.ContextOuterClass.Context.getDefaultInstance()); + } + + /** + * repeated .context.Context contexts = 1; + */ + public java.util.List getContextsBuilderList() { + return getContextsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getContextsFieldBuilder() { + if (contextsBuilder_ == null) { + contextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(contexts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + contexts_ = null; + } + return contextsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ContextList) + } + + // @@protoc_insertion_point(class_scope:context.ContextList) + private static final context.ContextOuterClass.ContextList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ContextList(); + } + + public static context.ContextOuterClass.ContextList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ContextList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ContextEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ContextEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.ContextId context_id = 2; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); + + /** + * .context.ContextId context_id = 2; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); + + /** + * .context.ContextId context_id = 2; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + } + + /** + * Protobuf type {@code context.ContextEvent} + */ + public static final class ContextEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ContextEvent) + ContextEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ContextEvent.newBuilder() to construct. + private ContextEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContextEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextEvent.class, context.ContextOuterClass.ContextEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int CONTEXT_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.ContextId contextId_; + + /** + * .context.ContextId context_id = 2; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } + + /** + * .context.ContextId context_id = 2; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + /** + * .context.ContextId context_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (contextId_ != null) { + output.writeMessage(2, getContextId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContextId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ContextEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.ContextEvent other = (context.ContextOuterClass.ContextEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ContextEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ContextEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ContextEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ContextEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ContextEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ContextEvent) + context.ContextOuterClass.ContextEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ContextEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ContextEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ContextEvent.class, context.ContextOuterClass.ContextEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (contextIdBuilder_ == null) { + contextId_ = null; + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ContextEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ContextEvent getDefaultInstanceForType() { + return context.ContextOuterClass.ContextEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ContextEvent build() { + context.ContextOuterClass.ContextEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ContextEvent) { + return mergeFrom((context.ContextOuterClass.ContextEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ContextEvent other) { + if (other == context.ContextOuterClass.ContextEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ContextEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.ContextId contextId_; + + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; + + /** + * .context.ContextId context_id = 2; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } + + /** + * .context.ContextId context_id = 2; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } + + /** + * .context.ContextId context_id = 2; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ContextId context_id = 2; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ContextId context_id = 2; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ContextId context_id = 2; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } + + /** + * .context.ContextId context_id = 2; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } + + /** + * .context.ContextId context_id = 2; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } + + /** + * .context.ContextId context_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ContextEvent) + } + + // @@protoc_insertion_point(class_scope:context.ContextEvent) + private static final context.ContextOuterClass.ContextEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ContextEvent(); + } + + public static context.ContextOuterClass.ContextEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ContextEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TopologyIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TopologyId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); + + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + + /** + * .context.Uuid topology_uuid = 2; + * @return Whether the topologyUuid field is set. + */ + boolean hasTopologyUuid(); + + /** + * .context.Uuid topology_uuid = 2; + * @return The topologyUuid. + */ + context.ContextOuterClass.Uuid getTopologyUuid(); + + /** + * .context.Uuid topology_uuid = 2; + */ + context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder(); + } + + /** + *
+     * ----- Topology ------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.TopologyId} + */ + public static final class TopologyId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TopologyId) + TopologyIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use TopologyId.newBuilder() to construct. + private TopologyId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TopologyId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyId.class, context.ContextOuterClass.TopologyId.Builder.class); + } + + public static final int CONTEXT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ContextId contextId_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } + + public static final int TOPOLOGY_UUID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.Uuid topologyUuid_; + + /** + * .context.Uuid topology_uuid = 2; + * @return Whether the topologyUuid field is set. + */ + @java.lang.Override + public boolean hasTopologyUuid() { + return topologyUuid_ != null; + } + + /** + * .context.Uuid topology_uuid = 2; + * @return The topologyUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getTopologyUuid() { + return topologyUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; + } + + /** + * .context.Uuid topology_uuid = 2; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder() { + return getTopologyUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (topologyUuid_ != null) { + output.writeMessage(2, getTopologyUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (topologyUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTopologyUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TopologyId)) { + return super.equals(obj); + } + context.ContextOuterClass.TopologyId other = (context.ContextOuterClass.TopologyId) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (hasTopologyUuid() != other.hasTopologyUuid()) + return false; + if (hasTopologyUuid()) { + if (!getTopologyUuid().equals(other.getTopologyUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + if (hasTopologyUuid()) { + hash = (37 * hash) + TOPOLOGY_UUID_FIELD_NUMBER; + hash = (53 * hash) + getTopologyUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.TopologyId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.TopologyId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Topology ------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.TopologyId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TopologyId) + context.ContextOuterClass.TopologyIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TopologyId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyId.class, context.ContextOuterClass.TopologyId.Builder.class); + } + + // 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; + contextIdBuilder_ = null; + } + if (topologyUuidBuilder_ == null) { + topologyUuid_ = null; + } else { + topologyUuid_ = null; + topologyUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TopologyId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyId getDefaultInstanceForType() { + return context.ContextOuterClass.TopologyId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.TopologyId build() { + context.ContextOuterClass.TopologyId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TopologyId) { + return mergeFrom((context.ContextOuterClass.TopologyId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.TopologyId other) { + if (other == context.ContextOuterClass.TopologyId.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (other.hasTopologyUuid()) { + mergeTopologyUuid(other.getTopologyUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.TopologyId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.ContextId contextId_; + + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } + + /** + * .context.ContextId context_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } + + private context.ContextOuterClass.Uuid topologyUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 topologyUuidBuilder_; + + /** + * .context.Uuid topology_uuid = 2; + * @return Whether the topologyUuid field is set. + */ + public boolean hasTopologyUuid() { + return topologyUuidBuilder_ != null || topologyUuid_ != null; + } + + /** + * .context.Uuid topology_uuid = 2; + * @return The topologyUuid. + */ + public context.ContextOuterClass.Uuid getTopologyUuid() { + if (topologyUuidBuilder_ == null) { + return topologyUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; + } else { + return topologyUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid topology_uuid = 2; + */ + public Builder setTopologyUuid(context.ContextOuterClass.Uuid value) { + if (topologyUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topologyUuid_ = value; + onChanged(); + } else { + topologyUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid topology_uuid = 2; + */ + public Builder setTopologyUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (topologyUuidBuilder_ == null) { + topologyUuid_ = builderForValue.build(); + onChanged(); + } else { + topologyUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid topology_uuid = 2; + */ + public Builder mergeTopologyUuid(context.ContextOuterClass.Uuid value) { + if (topologyUuidBuilder_ == null) { + if (topologyUuid_ != null) { + topologyUuid_ = context.ContextOuterClass.Uuid.newBuilder(topologyUuid_).mergeFrom(value).buildPartial(); + } else { + topologyUuid_ = value; + } + onChanged(); + } else { + topologyUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid topology_uuid = 2; + */ + public Builder clearTopologyUuid() { + if (topologyUuidBuilder_ == null) { + topologyUuid_ = null; + onChanged(); + } else { + topologyUuid_ = null; + topologyUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid topology_uuid = 2; + */ + public context.ContextOuterClass.Uuid.Builder getTopologyUuidBuilder() { + onChanged(); + return getTopologyUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid topology_uuid = 2; + */ + public context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder() { + if (topologyUuidBuilder_ != null) { + return topologyUuidBuilder_.getMessageOrBuilder(); + } else { + return topologyUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; + } + } + + /** + * .context.Uuid topology_uuid = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTopologyUuidFieldBuilder() { + if (topologyUuidBuilder_ == null) { + topologyUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTopologyUuid(), getParentForChildren(), isClean()); + topologyUuid_ = null; + } + return topologyUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.TopologyId) + } + + // @@protoc_insertion_point(class_scope:context.TopologyId) + private static final context.ContextOuterClass.TopologyId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyId(); + } + + public static context.ContextOuterClass.TopologyId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TopologyOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Topology) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + boolean hasTopologyId(); + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + context.ContextOuterClass.TopologyId getTopologyId(); + + /** + * .context.TopologyId topology_id = 1; + */ + context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * repeated .context.DeviceId device_ids = 3; + */ + java.util.List getDeviceIdsList(); + + /** + * repeated .context.DeviceId device_ids = 3; + */ + context.ContextOuterClass.DeviceId getDeviceIds(int index); + + /** + * repeated .context.DeviceId device_ids = 3; + */ + int getDeviceIdsCount(); + + /** + * repeated .context.DeviceId device_ids = 3; + */ + java.util.List getDeviceIdsOrBuilderList(); + + /** + * repeated .context.DeviceId device_ids = 3; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index); + + /** + * repeated .context.LinkId link_ids = 4; + */ + java.util.List getLinkIdsList(); + + /** + * repeated .context.LinkId link_ids = 4; + */ + context.ContextOuterClass.LinkId getLinkIds(int index); + + /** + * repeated .context.LinkId link_ids = 4; + */ + int getLinkIdsCount(); + + /** + * repeated .context.LinkId link_ids = 4; + */ + java.util.List getLinkIdsOrBuilderList(); + + /** + * repeated .context.LinkId link_ids = 4; + */ + context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.Topology} + */ + public static final class Topology extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Topology) + TopologyOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Topology.newBuilder() to construct. + private Topology(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Topology() { + name_ = ""; + deviceIds_ = java.util.Collections.emptyList(); + linkIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Topology_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Topology.class, context.ContextOuterClass.Topology.Builder.class); + } + + public static final int TOPOLOGY_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.TopologyId topologyId_; + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + @java.lang.Override + public boolean hasTopologyId() { + return topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + @java.lang.Override + public context.ContextOuterClass.TopologyId getTopologyId() { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + + /** + * .context.TopologyId topology_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + return getTopologyId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICE_IDS_FIELD_NUMBER = 3; + + private java.util.List deviceIds_; + + /** + * repeated .context.DeviceId device_ids = 3; + */ + @java.lang.Override + public java.util.List getDeviceIdsList() { + return deviceIds_; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + @java.lang.Override + public java.util.List getDeviceIdsOrBuilderList() { + return deviceIds_; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + @java.lang.Override + public int getDeviceIdsCount() { + return deviceIds_.size(); + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceIds(int index) { + return deviceIds_.get(index); + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index) { + return deviceIds_.get(index); + } + + public static final int LINK_IDS_FIELD_NUMBER = 4; + + private java.util.List linkIds_; + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public java.util.List getLinkIdsList() { + return linkIds_; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public java.util.List getLinkIdsOrBuilderList() { + return linkIds_; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public int getLinkIdsCount() { + return linkIds_.size(); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkIds(int index) { + return linkIds_.get(index); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index) { + return linkIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (topologyId_ != null) { + output.writeMessage(1, getTopologyId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < deviceIds_.size(); i++) { + output.writeMessage(3, deviceIds_.get(i)); + } + for (int i = 0; i < linkIds_.size(); i++) { + output.writeMessage(4, linkIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (topologyId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTopologyId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < deviceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, deviceIds_.get(i)); + } + for (int i = 0; i < linkIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Topology)) { + return super.equals(obj); + } + context.ContextOuterClass.Topology other = (context.ContextOuterClass.Topology) obj; + if (hasTopologyId() != other.hasTopologyId()) + return false; + if (hasTopologyId()) { + if (!getTopologyId().equals(other.getTopologyId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getDeviceIdsList().equals(other.getDeviceIdsList())) + return false; + if (!getLinkIdsList().equals(other.getLinkIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTopologyId()) { + hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; + hash = (53 * hash) + getTopologyId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getDeviceIdsCount() > 0) { + hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceIdsList().hashCode(); + } + if (getLinkIdsCount() > 0) { + hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getLinkIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Topology parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Topology parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Topology parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Topology parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Topology parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Topology parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Topology parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Topology parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Topology parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Topology parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Topology parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Topology parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Topology prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Topology} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Topology) + context.ContextOuterClass.TopologyOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Topology_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Topology_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Topology.class, context.ContextOuterClass.Topology.Builder.class); + } + + // 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; + topologyIdBuilder_ = null; + } + name_ = ""; + if (deviceIdsBuilder_ == null) { + deviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deviceIdsBuilder_.clear(); + } + if (linkIdsBuilder_ == null) { + linkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + linkIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Topology_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Topology getDefaultInstanceForType() { + return context.ContextOuterClass.Topology.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Topology build() { + context.ContextOuterClass.Topology result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + if (deviceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deviceIds_ = deviceIds_; + } else { + result.deviceIds_ = deviceIdsBuilder_.build(); + } + if (linkIdsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + linkIds_ = java.util.Collections.unmodifiableList(linkIds_); + bitField0_ = (bitField0_ & ~0x00000002); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Topology) { + return mergeFrom((context.ContextOuterClass.Topology) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Topology other) { + if (other == context.ContextOuterClass.Topology.getDefaultInstance()) + return this; + if (other.hasTopologyId()) { + mergeTopologyId(other.getTopologyId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (deviceIdsBuilder_ == null) { + if (!other.deviceIds_.isEmpty()) { + if (deviceIds_.isEmpty()) { + deviceIds_ = other.deviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeviceIdsIsMutable(); + deviceIds_.addAll(other.deviceIds_); + } + onChanged(); + } + } else { + if (!other.deviceIds_.isEmpty()) { + if (deviceIdsBuilder_.isEmpty()) { + deviceIdsBuilder_.dispose(); + deviceIdsBuilder_ = null; + deviceIds_ = other.deviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + deviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceIdsFieldBuilder() : null; + } else { + deviceIdsBuilder_.addAllMessages(other.deviceIds_); + } + } + } + if (linkIdsBuilder_ == null) { + if (!other.linkIds_.isEmpty()) { + if (linkIds_.isEmpty()) { + linkIds_ = other.linkIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLinkIdsIsMutable(); + linkIds_.addAll(other.linkIds_); + } + onChanged(); + } + } else { + if (!other.linkIds_.isEmpty()) { + if (linkIdsBuilder_.isEmpty()) { + linkIdsBuilder_.dispose(); + linkIdsBuilder_ = null; + linkIds_ = other.linkIds_; + bitField0_ = (bitField0_ & ~0x00000002); + linkIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkIdsFieldBuilder() : null; + } else { + linkIdsBuilder_.addAllMessages(other.linkIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Topology) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.TopologyId topologyId_; + + private com.google.protobuf.SingleFieldBuilderV3 topologyIdBuilder_; + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + public boolean hasTopologyId() { + return topologyIdBuilder_ != null || topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + public context.ContextOuterClass.TopologyId getTopologyId() { + if (topologyIdBuilder_ == null) { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } else { + return topologyIdBuilder_.getMessage(); + } + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topologyId_ = value; + onChanged(); + } else { + topologyIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdBuilder_ == null) { + topologyId_ = builderForValue.build(); + onChanged(); + } else { + topologyIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (topologyId_ != null) { + topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + } else { + topologyId_ = value; + } + onChanged(); + } else { + topologyIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder clearTopologyId() { + if (topologyIdBuilder_ == null) { + topologyId_ = null; + onChanged(); + } else { + topologyId_ = null; + topologyIdBuilder_ = null; + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + onChanged(); + return getTopologyIdFieldBuilder().getBuilder(); + } + + /** + * .context.TopologyId topology_id = 1; + */ + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + if (topologyIdBuilder_ != null) { + return topologyIdBuilder_.getMessageOrBuilder(); + } else { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + } + + /** + * .context.TopologyId topology_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTopologyIdFieldBuilder() { + if (topologyIdBuilder_ == null) { + topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTopologyId(), getParentForChildren(), isClean()); + topologyId_ = null; + } + return topologyIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.util.List deviceIds_ = java.util.Collections.emptyList(); + + private void ensureDeviceIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceIds_ = new java.util.ArrayList(deviceIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 deviceIdsBuilder_; + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public java.util.List getDeviceIdsList() { + if (deviceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deviceIds_); + } else { + return deviceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public int getDeviceIdsCount() { + if (deviceIdsBuilder_ == null) { + return deviceIds_.size(); + } else { + return deviceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public context.ContextOuterClass.DeviceId getDeviceIds(int index) { + if (deviceIdsBuilder_ == null) { + return deviceIds_.get(index); + } else { + return deviceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder setDeviceIds(int index, context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.set(index, value); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder setDeviceIds(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder addDeviceIds(context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.add(value); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder addDeviceIds(int index, context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.add(index, value); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder addDeviceIds(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder addDeviceIds(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder addAllDeviceIds(java.lang.Iterable values) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deviceIds_); + onChanged(); + } else { + deviceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder clearDeviceIds() { + if (deviceIdsBuilder_ == null) { + deviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deviceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public Builder removeDeviceIds(int index) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.remove(index); + onChanged(); + } else { + deviceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdsBuilder(int index) { + return getDeviceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index) { + if (deviceIdsBuilder_ == null) { + return deviceIds_.get(index); + } else { + return deviceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public java.util.List getDeviceIdsOrBuilderList() { + if (deviceIdsBuilder_ != null) { + return deviceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deviceIds_); + } + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder() { + return getDeviceIdsFieldBuilder().addBuilder(context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder(int index) { + return getDeviceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + + /** + * repeated .context.DeviceId device_ids = 3; + */ + public java.util.List getDeviceIdsBuilderList() { + return getDeviceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceIdsFieldBuilder() { + if (deviceIdsBuilder_ == null) { + deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceIds_ = null; + } + return deviceIdsBuilder_; + } + + private java.util.List linkIds_ = java.util.Collections.emptyList(); + + private void ensureLinkIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + linkIds_ = new java.util.ArrayList(linkIds_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 linkIdsBuilder_; + + /** + * repeated .context.LinkId link_ids = 4; + */ + public java.util.List getLinkIdsList() { + if (linkIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(linkIds_); + } else { + return linkIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public int getLinkIdsCount() { + if (linkIdsBuilder_ == null) { + return linkIds_.size(); + } else { + return linkIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId getLinkIds(int index) { + if (linkIdsBuilder_ == null) { + return linkIds_.get(index); + } else { + return linkIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder setLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.set(index, value); + onChanged(); + } else { + linkIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder setLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.set(index, builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.add(value); + onChanged(); + } else { + linkIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.add(index, value); + onChanged(); + } else { + linkIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(index, builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addAllLinkIds(java.lang.Iterable values) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, linkIds_); + onChanged(); + } else { + linkIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder clearLinkIds() { + if (linkIdsBuilder_ == null) { + linkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + linkIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder removeLinkIds(int index) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.remove(index); + onChanged(); + } else { + linkIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdsBuilder(int index) { + return getLinkIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index) { + if (linkIdsBuilder_ == null) { + return linkIds_.get(index); + } else { + return linkIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public java.util.List getLinkIdsOrBuilderList() { + if (linkIdsBuilder_ != null) { + return linkIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(linkIds_); + } + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder() { + return getLinkIdsFieldBuilder().addBuilder(context.ContextOuterClass.LinkId.getDefaultInstance()); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder(int index) { + return getLinkIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.LinkId.getDefaultInstance()); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + public java.util.List getLinkIdsBuilderList() { + return getLinkIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getLinkIdsFieldBuilder() { + if (linkIdsBuilder_ == null) { + linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + linkIds_ = null; + } + return linkIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Topology) + } + + // @@protoc_insertion_point(class_scope:context.Topology) + private static final context.ContextOuterClass.Topology DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Topology(); + } + + public static context.ContextOuterClass.Topology getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Topology getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TopologyDetailsOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TopologyDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + boolean hasTopologyId(); + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + context.ContextOuterClass.TopologyId getTopologyId(); + + /** + * .context.TopologyId topology_id = 1; + */ + context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * repeated .context.Device devices = 3; + */ + java.util.List getDevicesList(); + + /** + * repeated .context.Device devices = 3; + */ + context.ContextOuterClass.Device getDevices(int index); + + /** + * repeated .context.Device devices = 3; + */ + int getDevicesCount(); + + /** + * repeated .context.Device devices = 3; + */ + java.util.List getDevicesOrBuilderList(); + + /** + * repeated .context.Device devices = 3; + */ + context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder(int index); + + /** + * repeated .context.Link links = 4; + */ + java.util.List getLinksList(); + + /** + * repeated .context.Link links = 4; + */ + context.ContextOuterClass.Link getLinks(int index); + + /** + * repeated .context.Link links = 4; + */ + int getLinksCount(); + + /** + * repeated .context.Link links = 4; + */ + java.util.List getLinksOrBuilderList(); + + /** + * repeated .context.Link links = 4; + */ + context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index); + } + + /** + * Protobuf type {@code context.TopologyDetails} + */ + public static final class TopologyDetails extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TopologyDetails) + TopologyDetailsOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use TopologyDetails.newBuilder() to construct. + private TopologyDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TopologyDetails() { + name_ = ""; + devices_ = java.util.Collections.emptyList(); + links_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyDetails.class, context.ContextOuterClass.TopologyDetails.Builder.class); + } + + public static final int TOPOLOGY_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.TopologyId topologyId_; + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + @java.lang.Override + public boolean hasTopologyId() { + return topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + @java.lang.Override + public context.ContextOuterClass.TopologyId getTopologyId() { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + + /** + * .context.TopologyId topology_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + return getTopologyId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICES_FIELD_NUMBER = 3; + + private java.util.List devices_; + + /** + * repeated .context.Device devices = 3; + */ + @java.lang.Override + public java.util.List getDevicesList() { + return devices_; + } + + /** + * repeated .context.Device devices = 3; + */ + @java.lang.Override + public java.util.List getDevicesOrBuilderList() { + return devices_; + } + + /** + * repeated .context.Device devices = 3; + */ + @java.lang.Override + public int getDevicesCount() { + return devices_.size(); + } + + /** + * repeated .context.Device devices = 3; + */ + @java.lang.Override + public context.ContextOuterClass.Device getDevices(int index) { + return devices_.get(index); + } + + /** + * repeated .context.Device devices = 3; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder(int index) { + return devices_.get(index); + } + + public static final int LINKS_FIELD_NUMBER = 4; + + private java.util.List links_; + + /** + * repeated .context.Link links = 4; + */ + @java.lang.Override + public java.util.List getLinksList() { + return links_; + } + + /** + * repeated .context.Link links = 4; + */ + @java.lang.Override + public java.util.List getLinksOrBuilderList() { + return links_; + } + + /** + * repeated .context.Link links = 4; + */ + @java.lang.Override + public int getLinksCount() { + return links_.size(); + } + + /** + * repeated .context.Link links = 4; + */ + @java.lang.Override + public context.ContextOuterClass.Link getLinks(int index) { + return links_.get(index); + } + + /** + * repeated .context.Link links = 4; + */ + @java.lang.Override + public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index) { + return links_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (topologyId_ != null) { + output.writeMessage(1, getTopologyId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < devices_.size(); i++) { + output.writeMessage(3, devices_.get(i)); + } + for (int i = 0; i < links_.size(); i++) { + output.writeMessage(4, links_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (topologyId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTopologyId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < devices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, devices_.get(i)); + } + for (int i = 0; i < links_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, links_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TopologyDetails)) { + return super.equals(obj); + } + context.ContextOuterClass.TopologyDetails other = (context.ContextOuterClass.TopologyDetails) obj; + if (hasTopologyId() != other.hasTopologyId()) + return false; + if (hasTopologyId()) { + if (!getTopologyId().equals(other.getTopologyId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getDevicesList().equals(other.getDevicesList())) + return false; + if (!getLinksList().equals(other.getLinksList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTopologyId()) { + hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; + hash = (53 * hash) + getTopologyId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getDevicesCount() > 0) { + hash = (37 * hash) + DEVICES_FIELD_NUMBER; + hash = (53 * hash) + getDevicesList().hashCode(); + } + if (getLinksCount() > 0) { + hash = (37 * hash) + LINKS_FIELD_NUMBER; + hash = (53 * hash) + getLinksList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyDetails parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyDetails parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyDetails parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.TopologyDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.TopologyDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TopologyDetails) + context.ContextOuterClass.TopologyDetailsOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TopologyDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyDetails.class, context.ContextOuterClass.TopologyDetails.Builder.class); + } + + // 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; + topologyIdBuilder_ = null; + } + name_ = ""; + if (devicesBuilder_ == null) { + devices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + devicesBuilder_.clear(); + } + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + linksBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TopologyDetails_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyDetails getDefaultInstanceForType() { + return context.ContextOuterClass.TopologyDetails.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.TopologyDetails build() { + context.ContextOuterClass.TopologyDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + if (devicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + devices_ = java.util.Collections.unmodifiableList(devices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.devices_ = devices_; + } else { + result.devices_ = devicesBuilder_.build(); + } + if (linksBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + links_ = java.util.Collections.unmodifiableList(links_); + bitField0_ = (bitField0_ & ~0x00000002); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TopologyDetails) { + return mergeFrom((context.ContextOuterClass.TopologyDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.TopologyDetails other) { + if (other == context.ContextOuterClass.TopologyDetails.getDefaultInstance()) + return this; + if (other.hasTopologyId()) { + mergeTopologyId(other.getTopologyId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (devicesBuilder_ == null) { + if (!other.devices_.isEmpty()) { + if (devices_.isEmpty()) { + devices_ = other.devices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDevicesIsMutable(); + devices_.addAll(other.devices_); + } + onChanged(); + } + } else { + if (!other.devices_.isEmpty()) { + if (devicesBuilder_.isEmpty()) { + devicesBuilder_.dispose(); + devicesBuilder_ = null; + devices_ = other.devices_; + bitField0_ = (bitField0_ & ~0x00000001); + devicesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDevicesFieldBuilder() : null; + } else { + devicesBuilder_.addAllMessages(other.devices_); + } + } + } + if (linksBuilder_ == null) { + if (!other.links_.isEmpty()) { + if (links_.isEmpty()) { + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLinksIsMutable(); + links_.addAll(other.links_); + } + onChanged(); + } + } else { + if (!other.links_.isEmpty()) { + if (linksBuilder_.isEmpty()) { + linksBuilder_.dispose(); + linksBuilder_ = null; + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000002); + linksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinksFieldBuilder() : null; + } else { + linksBuilder_.addAllMessages(other.links_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.TopologyDetails) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.TopologyId topologyId_; + + private com.google.protobuf.SingleFieldBuilderV3 topologyIdBuilder_; + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + public boolean hasTopologyId() { + return topologyIdBuilder_ != null || topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + public context.ContextOuterClass.TopologyId getTopologyId() { + if (topologyIdBuilder_ == null) { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } else { + return topologyIdBuilder_.getMessage(); + } + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topologyId_ = value; + onChanged(); + } else { + topologyIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdBuilder_ == null) { + topologyId_ = builderForValue.build(); + onChanged(); + } else { + topologyIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (topologyId_ != null) { + topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + } else { + topologyId_ = value; + } + onChanged(); + } else { + topologyIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder clearTopologyId() { + if (topologyIdBuilder_ == null) { + topologyId_ = null; + onChanged(); + } else { + topologyId_ = null; + topologyIdBuilder_ = null; + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + onChanged(); + return getTopologyIdFieldBuilder().getBuilder(); + } + + /** + * .context.TopologyId topology_id = 1; + */ + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + if (topologyIdBuilder_ != null) { + return topologyIdBuilder_.getMessageOrBuilder(); + } else { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + } + + /** + * .context.TopologyId topology_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTopologyIdFieldBuilder() { + if (topologyIdBuilder_ == null) { + topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTopologyId(), getParentForChildren(), isClean()); + topologyId_ = null; + } + return topologyIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.util.List devices_ = java.util.Collections.emptyList(); + + private void ensureDevicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + devices_ = new java.util.ArrayList(devices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 devicesBuilder_; + + /** + * repeated .context.Device devices = 3; + */ + public java.util.List getDevicesList() { + if (devicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(devices_); + } else { + return devicesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Device devices = 3; + */ + public int getDevicesCount() { + if (devicesBuilder_ == null) { + return devices_.size(); + } else { + return devicesBuilder_.getCount(); + } + } + + /** + * repeated .context.Device devices = 3; + */ + public context.ContextOuterClass.Device getDevices(int index) { + if (devicesBuilder_ == null) { + return devices_.get(index); + } else { + return devicesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder setDevices(int index, context.ContextOuterClass.Device value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.set(index, value); + onChanged(); + } else { + devicesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder setDevices(int index, context.ContextOuterClass.Device.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.set(index, builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder addDevices(context.ContextOuterClass.Device value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.add(value); + onChanged(); + } else { + devicesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder addDevices(int index, context.ContextOuterClass.Device value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.add(index, value); + onChanged(); + } else { + devicesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder addDevices(context.ContextOuterClass.Device.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder addDevices(int index, context.ContextOuterClass.Device.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(index, builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder addAllDevices(java.lang.Iterable values) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, devices_); + onChanged(); + } else { + devicesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder clearDevices() { + if (devicesBuilder_ == null) { + devices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + devicesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public Builder removeDevices(int index) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.remove(index); + onChanged(); + } else { + devicesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Device devices = 3; + */ + public context.ContextOuterClass.Device.Builder getDevicesBuilder(int index) { + return getDevicesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Device devices = 3; + */ + public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder(int index) { + if (devicesBuilder_ == null) { + return devices_.get(index); + } else { + return devicesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Device devices = 3; + */ + public java.util.List getDevicesOrBuilderList() { + if (devicesBuilder_ != null) { + return devicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(devices_); + } + } + + /** + * repeated .context.Device devices = 3; + */ + public context.ContextOuterClass.Device.Builder addDevicesBuilder() { + return getDevicesFieldBuilder().addBuilder(context.ContextOuterClass.Device.getDefaultInstance()); + } + + /** + * repeated .context.Device devices = 3; + */ + public context.ContextOuterClass.Device.Builder addDevicesBuilder(int index) { + return getDevicesFieldBuilder().addBuilder(index, context.ContextOuterClass.Device.getDefaultInstance()); + } + + /** + * repeated .context.Device devices = 3; + */ + public java.util.List getDevicesBuilderList() { + return getDevicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDevicesFieldBuilder() { + if (devicesBuilder_ == null) { + devicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(devices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + devices_ = null; + } + return devicesBuilder_; + } + + private java.util.List links_ = java.util.Collections.emptyList(); + + private void ensureLinksIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + links_ = new java.util.ArrayList(links_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 linksBuilder_; + + /** + * repeated .context.Link links = 4; + */ + public java.util.List getLinksList() { + if (linksBuilder_ == null) { + return java.util.Collections.unmodifiableList(links_); + } else { + return linksBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Link links = 4; + */ + public int getLinksCount() { + if (linksBuilder_ == null) { + return links_.size(); + } else { + return linksBuilder_.getCount(); + } + } + + /** + * repeated .context.Link links = 4; + */ + public context.ContextOuterClass.Link getLinks(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Link links = 4; + */ + public Builder setLinks(int index, context.ContextOuterClass.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.set(index, value); + onChanged(); + } else { + linksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder setLinks(int index, context.ContextOuterClass.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.set(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder addLinks(context.ContextOuterClass.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + } else { + linksBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder addLinks(int index, context.ContextOuterClass.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(index, value); + onChanged(); + } else { + linksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder addLinks(context.ContextOuterClass.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder addLinks(int index, context.ContextOuterClass.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder addAllLinks(java.lang.Iterable values) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, links_); + onChanged(); + } else { + linksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder clearLinks() { + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + linksBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public Builder removeLinks(int index) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.remove(index); + onChanged(); + } else { + linksBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Link links = 4; + */ + public context.ContextOuterClass.Link.Builder getLinksBuilder(int index) { + return getLinksFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Link links = 4; + */ + public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Link links = 4; + */ + public java.util.List getLinksOrBuilderList() { + if (linksBuilder_ != null) { + return linksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(links_); + } + } + + /** + * repeated .context.Link links = 4; + */ + public context.ContextOuterClass.Link.Builder addLinksBuilder() { + return getLinksFieldBuilder().addBuilder(context.ContextOuterClass.Link.getDefaultInstance()); + } + + /** + * repeated .context.Link links = 4; + */ + public context.ContextOuterClass.Link.Builder addLinksBuilder(int index) { + return getLinksFieldBuilder().addBuilder(index, context.ContextOuterClass.Link.getDefaultInstance()); + } + + /** + * repeated .context.Link links = 4; + */ + public java.util.List getLinksBuilderList() { + return getLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getLinksFieldBuilder() { + if (linksBuilder_ == null) { + linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(links_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + links_ = null; + } + return linksBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.TopologyDetails) + } + + // @@protoc_insertion_point(class_scope:context.TopologyDetails) + private static final context.ContextOuterClass.TopologyDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyDetails(); + } + + public static context.ContextOuterClass.TopologyDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TopologyIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TopologyIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + java.util.List getTopologyIdsList(); + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + context.ContextOuterClass.TopologyId getTopologyIds(int index); + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + int getTopologyIdsCount(); + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + java.util.List getTopologyIdsOrBuilderList(); + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.TopologyIdList} + */ + public static final class TopologyIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TopologyIdList) + TopologyIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use TopologyIdList.newBuilder() to construct. + private TopologyIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TopologyIdList() { + topologyIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyIdList.class, context.ContextOuterClass.TopologyIdList.Builder.class); + } + + public static final int TOPOLOGY_IDS_FIELD_NUMBER = 1; + + private java.util.List topologyIds_; + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + @java.lang.Override + public java.util.List getTopologyIdsList() { + return topologyIds_; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + @java.lang.Override + public java.util.List getTopologyIdsOrBuilderList() { + return topologyIds_; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + @java.lang.Override + public int getTopologyIdsCount() { + return topologyIds_.size(); + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyId getTopologyIds(int index) { + return topologyIds_.get(index); + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder(int index) { + return topologyIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < topologyIds_.size(); i++) { + output.writeMessage(1, topologyIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < topologyIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topologyIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TopologyIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.TopologyIdList other = (context.ContextOuterClass.TopologyIdList) obj; + if (!getTopologyIdsList().equals(other.getTopologyIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTopologyIdsCount() > 0) { + hash = (37 * hash) + TOPOLOGY_IDS_FIELD_NUMBER; + hash = (53 * hash) + getTopologyIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.TopologyIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.TopologyIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TopologyIdList) + context.ContextOuterClass.TopologyIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TopologyIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyIdList.class, context.ContextOuterClass.TopologyIdList.Builder.class); + } + + // 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(); + if (topologyIdsBuilder_ == null) { + topologyIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + topologyIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TopologyIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyIdList getDefaultInstanceForType() { + return context.ContextOuterClass.TopologyIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.TopologyIdList build() { + context.ContextOuterClass.TopologyIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyIdList buildPartial() { + context.ContextOuterClass.TopologyIdList result = new context.ContextOuterClass.TopologyIdList(this); + int from_bitField0_ = bitField0_; + if (topologyIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.topologyIds_ = topologyIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TopologyIdList) { + return mergeFrom((context.ContextOuterClass.TopologyIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.TopologyIdList other) { + if (other == context.ContextOuterClass.TopologyIdList.getDefaultInstance()) + return this; + if (topologyIdsBuilder_ == null) { + if (!other.topologyIds_.isEmpty()) { + if (topologyIds_.isEmpty()) { + topologyIds_ = other.topologyIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTopologyIdsIsMutable(); + topologyIds_.addAll(other.topologyIds_); + } + onChanged(); + } + } else { + if (!other.topologyIds_.isEmpty()) { + if (topologyIdsBuilder_.isEmpty()) { + topologyIdsBuilder_.dispose(); + topologyIdsBuilder_ = null; + topologyIds_ = other.topologyIds_; + bitField0_ = (bitField0_ & ~0x00000001); + topologyIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTopologyIdsFieldBuilder() : null; + } else { + topologyIdsBuilder_.addAllMessages(other.topologyIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.TopologyIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List topologyIds_ = java.util.Collections.emptyList(); + + private void ensureTopologyIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + topologyIds_ = new java.util.ArrayList(topologyIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 topologyIdsBuilder_; + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public java.util.List getTopologyIdsList() { + if (topologyIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(topologyIds_); + } else { + return topologyIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public int getTopologyIdsCount() { + if (topologyIdsBuilder_ == null) { + return topologyIds_.size(); + } else { + return topologyIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public context.ContextOuterClass.TopologyId getTopologyIds(int index) { + if (topologyIdsBuilder_ == null) { + return topologyIds_.get(index); + } else { + return topologyIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder setTopologyIds(int index, context.ContextOuterClass.TopologyId value) { + if (topologyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologyIdsIsMutable(); + topologyIds_.set(index, value); + onChanged(); + } else { + topologyIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder setTopologyIds(int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.set(index, builderForValue.build()); + onChanged(); + } else { + topologyIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder addTopologyIds(context.ContextOuterClass.TopologyId value) { + if (topologyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologyIdsIsMutable(); + topologyIds_.add(value); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder addTopologyIds(int index, context.ContextOuterClass.TopologyId value) { + if (topologyIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologyIdsIsMutable(); + topologyIds_.add(index, value); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder addTopologyIds(context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.add(builderForValue.build()); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder addTopologyIds(int index, context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.add(index, builderForValue.build()); + onChanged(); + } else { + topologyIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder addAllTopologyIds(java.lang.Iterable values) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, topologyIds_); + onChanged(); + } else { + topologyIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder clearTopologyIds() { + if (topologyIdsBuilder_ == null) { + topologyIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + topologyIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public Builder removeTopologyIds(int index) { + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.remove(index); + onChanged(); + } else { + topologyIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public context.ContextOuterClass.TopologyId.Builder getTopologyIdsBuilder(int index) { + return getTopologyIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdsOrBuilder(int index) { + if (topologyIdsBuilder_ == null) { + return topologyIds_.get(index); + } else { + return topologyIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public java.util.List getTopologyIdsOrBuilderList() { + if (topologyIdsBuilder_ != null) { + return topologyIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(topologyIds_); + } + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder() { + return getTopologyIdsFieldBuilder().addBuilder(context.ContextOuterClass.TopologyId.getDefaultInstance()); + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public context.ContextOuterClass.TopologyId.Builder addTopologyIdsBuilder(int index) { + return getTopologyIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.TopologyId.getDefaultInstance()); + } + + /** + * repeated .context.TopologyId topology_ids = 1; + */ + public java.util.List getTopologyIdsBuilderList() { + return getTopologyIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getTopologyIdsFieldBuilder() { + if (topologyIdsBuilder_ == null) { + topologyIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(topologyIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + topologyIds_ = null; + } + return topologyIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.TopologyIdList) + } + + // @@protoc_insertion_point(class_scope:context.TopologyIdList) + private static final context.ContextOuterClass.TopologyIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyIdList(); + } + + public static context.ContextOuterClass.TopologyIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TopologyListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TopologyList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Topology topologies = 1; + */ + java.util.List getTopologiesList(); + + /** + * repeated .context.Topology topologies = 1; + */ + context.ContextOuterClass.Topology getTopologies(int index); + + /** + * repeated .context.Topology topologies = 1; + */ + int getTopologiesCount(); + + /** + * repeated .context.Topology topologies = 1; + */ + java.util.List getTopologiesOrBuilderList(); + + /** + * repeated .context.Topology topologies = 1; + */ + context.ContextOuterClass.TopologyOrBuilder getTopologiesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.TopologyList} + */ + public static final class TopologyList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TopologyList) + TopologyListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use TopologyList.newBuilder() to construct. + private TopologyList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TopologyList() { + topologies_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyList.class, context.ContextOuterClass.TopologyList.Builder.class); + } + + public static final int TOPOLOGIES_FIELD_NUMBER = 1; + + private java.util.List topologies_; + + /** + * repeated .context.Topology topologies = 1; + */ + @java.lang.Override + public java.util.List getTopologiesList() { + return topologies_; + } + + /** + * repeated .context.Topology topologies = 1; + */ + @java.lang.Override + public java.util.List getTopologiesOrBuilderList() { + return topologies_; + } + + /** + * repeated .context.Topology topologies = 1; + */ + @java.lang.Override + public int getTopologiesCount() { + return topologies_.size(); + } + + /** + * repeated .context.Topology topologies = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Topology getTopologies(int index) { + return topologies_.get(index); + } + + /** + * repeated .context.Topology topologies = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyOrBuilder getTopologiesOrBuilder(int index) { + return topologies_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < topologies_.size(); i++) { + output.writeMessage(1, topologies_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < topologies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topologies_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TopologyList)) { + return super.equals(obj); + } + context.ContextOuterClass.TopologyList other = (context.ContextOuterClass.TopologyList) obj; + if (!getTopologiesList().equals(other.getTopologiesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTopologiesCount() > 0) { + hash = (37 * hash) + TOPOLOGIES_FIELD_NUMBER; + hash = (53 * hash) + getTopologiesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.TopologyList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.TopologyList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.TopologyList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TopologyList) + context.ContextOuterClass.TopologyListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TopologyList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyList.class, context.ContextOuterClass.TopologyList.Builder.class); + } + + // 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(); + if (topologiesBuilder_ == null) { + topologies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + topologiesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TopologyList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyList getDefaultInstanceForType() { + return context.ContextOuterClass.TopologyList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.TopologyList build() { + context.ContextOuterClass.TopologyList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyList buildPartial() { + context.ContextOuterClass.TopologyList result = new context.ContextOuterClass.TopologyList(this); + int from_bitField0_ = bitField0_; + if (topologiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + topologies_ = java.util.Collections.unmodifiableList(topologies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.topologies_ = topologies_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TopologyList) { + return mergeFrom((context.ContextOuterClass.TopologyList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.TopologyList other) { + if (other == context.ContextOuterClass.TopologyList.getDefaultInstance()) + return this; + if (topologiesBuilder_ == null) { + if (!other.topologies_.isEmpty()) { + if (topologies_.isEmpty()) { + topologies_ = other.topologies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTopologiesIsMutable(); + topologies_.addAll(other.topologies_); + } + onChanged(); + } + } else { + if (!other.topologies_.isEmpty()) { + if (topologiesBuilder_.isEmpty()) { + topologiesBuilder_.dispose(); + topologiesBuilder_ = null; + topologies_ = other.topologies_; + bitField0_ = (bitField0_ & ~0x00000001); + topologiesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTopologiesFieldBuilder() : null; + } else { + topologiesBuilder_.addAllMessages(other.topologies_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.TopologyList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List topologies_ = java.util.Collections.emptyList(); + + private void ensureTopologiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + topologies_ = new java.util.ArrayList(topologies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 topologiesBuilder_; + + /** + * repeated .context.Topology topologies = 1; + */ + public java.util.List getTopologiesList() { + if (topologiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(topologies_); + } else { + return topologiesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Topology topologies = 1; + */ + public int getTopologiesCount() { + if (topologiesBuilder_ == null) { + return topologies_.size(); + } else { + return topologiesBuilder_.getCount(); + } + } + + /** + * repeated .context.Topology topologies = 1; + */ + public context.ContextOuterClass.Topology getTopologies(int index) { + if (topologiesBuilder_ == null) { + return topologies_.get(index); + } else { + return topologiesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder setTopologies(int index, context.ContextOuterClass.Topology value) { + if (topologiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologiesIsMutable(); + topologies_.set(index, value); + onChanged(); + } else { + topologiesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder setTopologies(int index, context.ContextOuterClass.Topology.Builder builderForValue) { + if (topologiesBuilder_ == null) { + ensureTopologiesIsMutable(); + topologies_.set(index, builderForValue.build()); + onChanged(); + } else { + topologiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder addTopologies(context.ContextOuterClass.Topology value) { + if (topologiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologiesIsMutable(); + topologies_.add(value); + onChanged(); + } else { + topologiesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder addTopologies(int index, context.ContextOuterClass.Topology value) { + if (topologiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopologiesIsMutable(); + topologies_.add(index, value); + onChanged(); + } else { + topologiesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder addTopologies(context.ContextOuterClass.Topology.Builder builderForValue) { + if (topologiesBuilder_ == null) { + ensureTopologiesIsMutable(); + topologies_.add(builderForValue.build()); + onChanged(); + } else { + topologiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder addTopologies(int index, context.ContextOuterClass.Topology.Builder builderForValue) { + if (topologiesBuilder_ == null) { + ensureTopologiesIsMutable(); + topologies_.add(index, builderForValue.build()); + onChanged(); + } else { + topologiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder addAllTopologies(java.lang.Iterable values) { + if (topologiesBuilder_ == null) { + ensureTopologiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, topologies_); + onChanged(); + } else { + topologiesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder clearTopologies() { + if (topologiesBuilder_ == null) { + topologies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + topologiesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public Builder removeTopologies(int index) { + if (topologiesBuilder_ == null) { + ensureTopologiesIsMutable(); + topologies_.remove(index); + onChanged(); + } else { + topologiesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Topology topologies = 1; + */ + public context.ContextOuterClass.Topology.Builder getTopologiesBuilder(int index) { + return getTopologiesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Topology topologies = 1; + */ + public context.ContextOuterClass.TopologyOrBuilder getTopologiesOrBuilder(int index) { + if (topologiesBuilder_ == null) { + return topologies_.get(index); + } else { + return topologiesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Topology topologies = 1; + */ + public java.util.List getTopologiesOrBuilderList() { + if (topologiesBuilder_ != null) { + return topologiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(topologies_); + } + } + + /** + * repeated .context.Topology topologies = 1; + */ + public context.ContextOuterClass.Topology.Builder addTopologiesBuilder() { + return getTopologiesFieldBuilder().addBuilder(context.ContextOuterClass.Topology.getDefaultInstance()); + } + + /** + * repeated .context.Topology topologies = 1; + */ + public context.ContextOuterClass.Topology.Builder addTopologiesBuilder(int index) { + return getTopologiesFieldBuilder().addBuilder(index, context.ContextOuterClass.Topology.getDefaultInstance()); + } + + /** + * repeated .context.Topology topologies = 1; + */ + public java.util.List getTopologiesBuilderList() { + return getTopologiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getTopologiesFieldBuilder() { + if (topologiesBuilder_ == null) { + topologiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(topologies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + topologies_ = null; + } + return topologiesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.TopologyList) + } + + // @@protoc_insertion_point(class_scope:context.TopologyList) + private static final context.ContextOuterClass.TopologyList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyList(); + } + + public static context.ContextOuterClass.TopologyList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TopologyEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TopologyEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.TopologyId topology_id = 2; + * @return Whether the topologyId field is set. + */ + boolean hasTopologyId(); + + /** + * .context.TopologyId topology_id = 2; + * @return The topologyId. + */ + context.ContextOuterClass.TopologyId getTopologyId(); + + /** + * .context.TopologyId topology_id = 2; + */ + context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + } + + /** + * Protobuf type {@code context.TopologyEvent} + */ + public static final class TopologyEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TopologyEvent) + TopologyEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use TopologyEvent.newBuilder() to construct. + private TopologyEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TopologyEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyEvent.class, context.ContextOuterClass.TopologyEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int TOPOLOGY_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.TopologyId topologyId_; + + /** + * .context.TopologyId topology_id = 2; + * @return Whether the topologyId field is set. + */ + @java.lang.Override + public boolean hasTopologyId() { + return topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 2; + * @return The topologyId. + */ + @java.lang.Override + public context.ContextOuterClass.TopologyId getTopologyId() { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + + /** + * .context.TopologyId topology_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + return getTopologyId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (topologyId_ != null) { + output.writeMessage(2, getTopologyId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (topologyId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTopologyId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TopologyEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.TopologyEvent other = (context.ContextOuterClass.TopologyEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasTopologyId() != other.hasTopologyId()) + return false; + if (hasTopologyId()) { + if (!getTopologyId().equals(other.getTopologyId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasTopologyId()) { + hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; + hash = (53 * hash) + getTopologyId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.TopologyEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.TopologyEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.TopologyEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TopologyEvent) + context.ContextOuterClass.TopologyEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TopologyEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TopologyEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TopologyEvent.class, context.ContextOuterClass.TopologyEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (topologyIdBuilder_ == null) { + topologyId_ = null; + } else { + topologyId_ = null; + topologyIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TopologyEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyEvent getDefaultInstanceForType() { + return context.ContextOuterClass.TopologyEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.TopologyEvent build() { + context.ContextOuterClass.TopologyEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TopologyEvent) { + return mergeFrom((context.ContextOuterClass.TopologyEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.TopologyEvent other) { + if (other == context.ContextOuterClass.TopologyEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasTopologyId()) { + mergeTopologyId(other.getTopologyId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.TopologyEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.TopologyId topologyId_; + + private com.google.protobuf.SingleFieldBuilderV3 topologyIdBuilder_; + + /** + * .context.TopologyId topology_id = 2; + * @return Whether the topologyId field is set. + */ + public boolean hasTopologyId() { + return topologyIdBuilder_ != null || topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 2; + * @return The topologyId. + */ + public context.ContextOuterClass.TopologyId getTopologyId() { + if (topologyIdBuilder_ == null) { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } else { + return topologyIdBuilder_.getMessage(); + } + } + + /** + * .context.TopologyId topology_id = 2; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topologyId_ = value; + onChanged(); + } else { + topologyIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 2; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdBuilder_ == null) { + topologyId_ = builderForValue.build(); + onChanged(); + } else { + topologyIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.TopologyId topology_id = 2; + */ + public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (topologyId_ != null) { + topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + } else { + topologyId_ = value; + } + onChanged(); + } else { + topologyIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 2; + */ + public Builder clearTopologyId() { + if (topologyIdBuilder_ == null) { + topologyId_ = null; + onChanged(); + } else { + topologyId_ = null; + topologyIdBuilder_ = null; + } + return this; + } + + /** + * .context.TopologyId topology_id = 2; + */ + public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + onChanged(); + return getTopologyIdFieldBuilder().getBuilder(); + } + + /** + * .context.TopologyId topology_id = 2; + */ + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + if (topologyIdBuilder_ != null) { + return topologyIdBuilder_.getMessageOrBuilder(); + } else { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + } + + /** + * .context.TopologyId topology_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTopologyIdFieldBuilder() { + if (topologyIdBuilder_ == null) { + topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTopologyId(), getParentForChildren(), isClean()); + topologyId_ = null; + } + return topologyIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.TopologyEvent) + } + + // @@protoc_insertion_point(class_scope:context.TopologyEvent) + private static final context.ContextOuterClass.TopologyEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.TopologyEvent(); + } + + public static context.ContextOuterClass.TopologyEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.TopologyEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.DeviceId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid device_uuid = 1; + * @return Whether the deviceUuid field is set. + */ + boolean hasDeviceUuid(); + + /** + * .context.Uuid device_uuid = 1; + * @return The deviceUuid. + */ + context.ContextOuterClass.Uuid getDeviceUuid(); + + /** + * .context.Uuid device_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder(); + } + + /** + *
+     * ----- Device --------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.DeviceId} + */ + public static final class DeviceId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.DeviceId) + DeviceIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceId.newBuilder() to construct. + private DeviceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceId.class, context.ContextOuterClass.DeviceId.Builder.class); + } + + public static final int DEVICE_UUID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid deviceUuid_; + + /** + * .context.Uuid device_uuid = 1; + * @return Whether the deviceUuid field is set. + */ + @java.lang.Override + public boolean hasDeviceUuid() { + return deviceUuid_ != null; + } + + /** + * .context.Uuid device_uuid = 1; + * @return The deviceUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getDeviceUuid() { + return deviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; + } + + /** + * .context.Uuid device_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder() { + return getDeviceUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (deviceUuid_ != null) { + output.writeMessage(1, getDeviceUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (deviceUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeviceUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.DeviceId)) { + return super.equals(obj); + } + context.ContextOuterClass.DeviceId other = (context.ContextOuterClass.DeviceId) obj; + if (hasDeviceUuid() != other.hasDeviceUuid()) + return false; + if (hasDeviceUuid()) { + if (!getDeviceUuid().equals(other.getDeviceUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDeviceUuid()) { + hash = (37 * hash) + DEVICE_UUID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.DeviceId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.DeviceId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Device --------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.DeviceId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.DeviceId) + context.ContextOuterClass.DeviceIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_DeviceId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceId.class, context.ContextOuterClass.DeviceId.Builder.class); + } + + // 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; + deviceUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_DeviceId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceId getDefaultInstanceForType() { + return context.ContextOuterClass.DeviceId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.DeviceId build() { + context.ContextOuterClass.DeviceId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.DeviceId) { + return mergeFrom((context.ContextOuterClass.DeviceId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.DeviceId other) { + if (other == context.ContextOuterClass.DeviceId.getDefaultInstance()) + return this; + if (other.hasDeviceUuid()) { + mergeDeviceUuid(other.getDeviceUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.DeviceId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid deviceUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceUuidBuilder_; + + /** + * .context.Uuid device_uuid = 1; + * @return Whether the deviceUuid field is set. + */ + public boolean hasDeviceUuid() { + return deviceUuidBuilder_ != null || deviceUuid_ != null; + } + + /** + * .context.Uuid device_uuid = 1; + * @return The deviceUuid. + */ + public context.ContextOuterClass.Uuid getDeviceUuid() { + if (deviceUuidBuilder_ == null) { + return deviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; + } else { + return deviceUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid device_uuid = 1; + */ + public Builder setDeviceUuid(context.ContextOuterClass.Uuid value) { + if (deviceUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceUuid_ = value; + onChanged(); + } else { + deviceUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid device_uuid = 1; + */ + public Builder setDeviceUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (deviceUuidBuilder_ == null) { + deviceUuid_ = builderForValue.build(); + onChanged(); + } else { + deviceUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid device_uuid = 1; + */ + public Builder mergeDeviceUuid(context.ContextOuterClass.Uuid value) { + if (deviceUuidBuilder_ == null) { + if (deviceUuid_ != null) { + deviceUuid_ = context.ContextOuterClass.Uuid.newBuilder(deviceUuid_).mergeFrom(value).buildPartial(); + } else { + deviceUuid_ = value; + } + onChanged(); + } else { + deviceUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid device_uuid = 1; + */ + public Builder clearDeviceUuid() { + if (deviceUuidBuilder_ == null) { + deviceUuid_ = null; + onChanged(); + } else { + deviceUuid_ = null; + deviceUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid device_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getDeviceUuidBuilder() { + onChanged(); + return getDeviceUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid device_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder() { + if (deviceUuidBuilder_ != null) { + return deviceUuidBuilder_.getMessageOrBuilder(); + } else { + return deviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; + } + } + + /** + * .context.Uuid device_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceUuidFieldBuilder() { + if (deviceUuidBuilder_ == null) { + deviceUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceUuid(), getParentForChildren(), isClean()); + deviceUuid_ = null; + } + return deviceUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.DeviceId) + } + + // @@protoc_insertion_point(class_scope:context.DeviceId) + private static final context.ContextOuterClass.DeviceId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceId(); + } + + public static context.ContextOuterClass.DeviceId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Device) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.DeviceId device_id = 1; + * @return Whether the deviceId field is set. + */ + boolean hasDeviceId(); + + /** + * .context.DeviceId device_id = 1; + * @return The deviceId. + */ + context.ContextOuterClass.DeviceId getDeviceId(); + + /** + * .context.DeviceId device_id = 1; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * string device_type = 3; + * @return The deviceType. + */ + java.lang.String getDeviceType(); + + /** + * string device_type = 3; + * @return The bytes for deviceType. + */ + com.google.protobuf.ByteString getDeviceTypeBytes(); + + /** + * .context.DeviceConfig device_config = 4; + * @return Whether the deviceConfig field is set. + */ + boolean hasDeviceConfig(); + + /** + * .context.DeviceConfig device_config = 4; + * @return The deviceConfig. + */ + context.ContextOuterClass.DeviceConfig getDeviceConfig(); + + /** + * .context.DeviceConfig device_config = 4; + */ + context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder(); + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return The enum numeric value on the wire for deviceOperationalStatus. + */ + int getDeviceOperationalStatusValue(); + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return The deviceOperationalStatus. + */ + context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus(); + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return A list containing the deviceDrivers. + */ + java.util.List getDeviceDriversList(); + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return The count of deviceDrivers. + */ + int getDeviceDriversCount(); + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the element to return. + * @return The deviceDrivers at the given index. + */ + context.ContextOuterClass.DeviceDriverEnum getDeviceDrivers(int index); + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return A list containing the enum numeric values on the wire for deviceDrivers. + */ + java.util.List getDeviceDriversValueList(); + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of deviceDrivers at the given index. + */ + int getDeviceDriversValue(int index); + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + java.util.List getDeviceEndpointsList(); + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + context.ContextOuterClass.EndPoint getDeviceEndpoints(int index); + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + int getDeviceEndpointsCount(); + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + java.util.List getDeviceEndpointsOrBuilderList(); + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + context.ContextOuterClass.EndPointOrBuilder getDeviceEndpointsOrBuilder(int index); + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + java.util.List getComponentsList(); + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + context.ContextOuterClass.Component getComponents(int index); + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + int getComponentsCount(); + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + java.util.List getComponentsOrBuilderList(); + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder(int index); + + /** + *
+         * Identifier of node controlling the actual device
+         * 
+ * + * .context.DeviceId controller_id = 9; + * @return Whether the controllerId field is set. + */ + boolean hasControllerId(); + + /** + *
+         * Identifier of node controlling the actual device
+         * 
+ * + * .context.DeviceId controller_id = 9; + * @return The controllerId. + */ + context.ContextOuterClass.DeviceId getControllerId(); + + /** + *
+         * Identifier of node controlling the actual device
+         * 
+ * + * .context.DeviceId controller_id = 9; + */ + context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder(); + } + + /** + * Protobuf type {@code context.Device} + */ + public static final class Device extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Device) + DeviceOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Device.newBuilder() to construct. + private Device(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Device() { + name_ = ""; + deviceType_ = ""; + deviceOperationalStatus_ = 0; + deviceDrivers_ = java.util.Collections.emptyList(); + deviceEndpoints_ = java.util.Collections.emptyList(); + components_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + mutable_bitField0_ |= 0x00000001; + } + deviceDrivers_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 58: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + deviceEndpoints_ = new java.util.ArrayList(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Device_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Device.class, context.ContextOuterClass.Device.Builder.class); + } + + public static final int DEVICE_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.DeviceId deviceId_; + + /** + * .context.DeviceId device_id = 1; + * @return Whether the deviceId field is set. + */ + @java.lang.Override + public boolean hasDeviceId() { + return deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 1; + * @return The deviceId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceId() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + + /** + * .context.DeviceId device_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + return getDeviceId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICE_TYPE_FIELD_NUMBER = 3; + + private volatile java.lang.Object deviceType_; + + /** + * string device_type = 3; + * @return The deviceType. + */ + @java.lang.Override + public java.lang.String getDeviceType() { + java.lang.Object ref = deviceType_; + 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(); + deviceType_ = s; + return s; + } + } + + /** + * string device_type = 3; + * @return The bytes for deviceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeviceTypeBytes() { + java.lang.Object ref = deviceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICE_CONFIG_FIELD_NUMBER = 4; + + private context.ContextOuterClass.DeviceConfig deviceConfig_; + + /** + * .context.DeviceConfig device_config = 4; + * @return Whether the deviceConfig field is set. + */ + @java.lang.Override + public boolean hasDeviceConfig() { + return deviceConfig_ != null; + } + + /** + * .context.DeviceConfig device_config = 4; + * @return The deviceConfig. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceConfig getDeviceConfig() { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } + + /** + * .context.DeviceConfig device_config = 4; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { + return getDeviceConfig(); + } + + public static final int DEVICE_OPERATIONAL_STATUS_FIELD_NUMBER = 5; + + private int deviceOperationalStatus_; + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return The enum numeric value on the wire for deviceOperationalStatus. + */ + @java.lang.Override + public int getDeviceOperationalStatusValue() { + return deviceOperationalStatus_; + } + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return The deviceOperationalStatus. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.valueOf(deviceOperationalStatus_); + return result == null ? context.ContextOuterClass.DeviceOperationalStatusEnum.UNRECOGNIZED : result; + } + + public static final int DEVICE_DRIVERS_FIELD_NUMBER = 6; + + private java.util.List deviceDrivers_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter deviceDrivers_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter() { + + public context.ContextOuterClass.DeviceDriverEnum convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + context.ContextOuterClass.DeviceDriverEnum result = context.ContextOuterClass.DeviceDriverEnum.valueOf(from); + return result == null ? context.ContextOuterClass.DeviceDriverEnum.UNRECOGNIZED : result; + } + }; + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return A list containing the deviceDrivers. + */ + @java.lang.Override + public java.util.List getDeviceDriversList() { + return new com.google.protobuf.Internal.ListAdapter(deviceDrivers_, deviceDrivers_converter_); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return The count of deviceDrivers. + */ + @java.lang.Override + public int getDeviceDriversCount() { + return deviceDrivers_.size(); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the element to return. + * @return The deviceDrivers at the given index. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceDriverEnum getDeviceDrivers(int index) { + return deviceDrivers_converter_.convert(deviceDrivers_.get(index)); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return A list containing the enum numeric values on the wire for deviceDrivers. + */ + @java.lang.Override + public java.util.List getDeviceDriversValueList() { + return deviceDrivers_; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of deviceDrivers at the given index. + */ + @java.lang.Override + public int getDeviceDriversValue(int index) { + return deviceDrivers_.get(index); + } + + private int deviceDriversMemoizedSerializedSize; + + public static final int DEVICE_ENDPOINTS_FIELD_NUMBER = 7; + + private java.util.List deviceEndpoints_; + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + @java.lang.Override + public java.util.List getDeviceEndpointsList() { + return deviceEndpoints_; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + @java.lang.Override + public java.util.List getDeviceEndpointsOrBuilderList() { + return deviceEndpoints_; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + @java.lang.Override + public int getDeviceEndpointsCount() { + return deviceEndpoints_.size(); + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + @java.lang.Override + public context.ContextOuterClass.EndPoint getDeviceEndpoints(int index) { + return deviceEndpoints_.get(index); + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointOrBuilder getDeviceEndpointsOrBuilder(int index) { + return deviceEndpoints_.get(index); + } + + public static final int COMPONENTS_FIELD_NUMBER = 8; + + private java.util.List components_; + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + @java.lang.Override + public java.util.List getComponentsList() { + return components_; + } + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + @java.lang.Override + public java.util.List getComponentsOrBuilderList() { + return components_; + } + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + @java.lang.Override + public int getComponentsCount() { + return components_.size(); + } + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + @java.lang.Override + public context.ContextOuterClass.Component getComponents(int index) { + return components_.get(index); + } + + /** + *
+         * Used for inventory
+         * 
+ * + * repeated .context.Component components = 8; + */ + @java.lang.Override + public context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder(int index) { + return components_.get(index); + } + + public static final int CONTROLLER_ID_FIELD_NUMBER = 9; + + private context.ContextOuterClass.DeviceId controllerId_; + + /** + *
+         * Identifier of node controlling the actual device
+         * 
+ * + * .context.DeviceId controller_id = 9; + * @return Whether the controllerId field is set. + */ + @java.lang.Override + public boolean hasControllerId() { + return controllerId_ != null; + } + + /** + *
+         * Identifier of node controlling the actual device
+         * 
+ * + * .context.DeviceId controller_id = 9; + * @return The controllerId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getControllerId() { + return controllerId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; + } + + /** + *
+         * Identifier of node controlling the actual device
+         * 
+ * + * .context.DeviceId controller_id = 9; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder() { + return getControllerId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (deviceId_ != null) { + output.writeMessage(1, getDeviceId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getDeviceTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceType_); + } + if (deviceConfig_ != null) { + output.writeMessage(4, getDeviceConfig()); + } + if (deviceOperationalStatus_ != context.ContextOuterClass.DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED.getNumber()) { + output.writeEnum(5, deviceOperationalStatus_); + } + if (getDeviceDriversList().size() > 0) { + output.writeUInt32NoTag(50); + output.writeUInt32NoTag(deviceDriversMemoizedSerializedSize); + } + for (int i = 0; i < deviceDrivers_.size(); i++) { + output.writeEnumNoTag(deviceDrivers_.get(i)); + } + for (int i = 0; i < deviceEndpoints_.size(); i++) { + output.writeMessage(7, deviceEndpoints_.get(i)); + } + for (int i = 0; i < components_.size(); i++) { + output.writeMessage(8, components_.get(i)); + } + if (controllerId_ != null) { + output.writeMessage(9, getControllerId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (deviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeviceId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getDeviceTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceType_); + } + if (deviceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDeviceConfig()); + } + if (deviceOperationalStatus_ != context.ContextOuterClass.DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, deviceOperationalStatus_); + } + { + int dataSize = 0; + for (int i = 0; i < deviceDrivers_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(deviceDrivers_.get(i)); + } + size += dataSize; + if (!getDeviceDriversList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + deviceDriversMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < deviceEndpoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, deviceEndpoints_.get(i)); + } + for (int i = 0; i < components_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, components_.get(i)); + } + if (controllerId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getControllerId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Device)) { + return super.equals(obj); + } + context.ContextOuterClass.Device other = (context.ContextOuterClass.Device) obj; + if (hasDeviceId() != other.hasDeviceId()) + return false; + if (hasDeviceId()) { + if (!getDeviceId().equals(other.getDeviceId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getDeviceType().equals(other.getDeviceType())) + return false; + if (hasDeviceConfig() != other.hasDeviceConfig()) + return false; + if (hasDeviceConfig()) { + if (!getDeviceConfig().equals(other.getDeviceConfig())) + return false; + } + if (deviceOperationalStatus_ != other.deviceOperationalStatus_) + return false; + if (!deviceDrivers_.equals(other.deviceDrivers_)) + return false; + if (!getDeviceEndpointsList().equals(other.getDeviceEndpointsList())) + return false; + if (!getComponentsList().equals(other.getComponentsList())) + return false; + if (hasControllerId() != other.hasControllerId()) + return false; + if (hasControllerId()) { + if (!getControllerId().equals(other.getControllerId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDeviceId()) { + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DEVICE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getDeviceType().hashCode(); + if (hasDeviceConfig()) { + hash = (37 * hash) + DEVICE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDeviceConfig().hashCode(); + } + hash = (37 * hash) + DEVICE_OPERATIONAL_STATUS_FIELD_NUMBER; + hash = (53 * hash) + deviceOperationalStatus_; + if (getDeviceDriversCount() > 0) { + hash = (37 * hash) + DEVICE_DRIVERS_FIELD_NUMBER; + hash = (53 * hash) + deviceDrivers_.hashCode(); + } + if (getDeviceEndpointsCount() > 0) { + hash = (37 * hash) + DEVICE_ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceEndpointsList().hashCode(); + } + if (getComponentsCount() > 0) { + hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + getComponentsList().hashCode(); + } + if (hasControllerId()) { + hash = (37 * hash) + CONTROLLER_ID_FIELD_NUMBER; + hash = (53 * hash) + getControllerId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Device parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Device parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Device parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Device parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Device parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Device parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Device parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Device parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Device parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Device parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Device parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Device parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Device prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Device} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Device) + context.ContextOuterClass.DeviceOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Device_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Device_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Device.class, context.ContextOuterClass.Device.Builder.class); + } + + // 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; + deviceIdBuilder_ = null; + } + name_ = ""; + deviceType_ = ""; + if (deviceConfigBuilder_ == null) { + deviceConfig_ = null; + } else { + deviceConfig_ = null; + deviceConfigBuilder_ = null; + } + deviceOperationalStatus_ = 0; + deviceDrivers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + if (deviceEndpointsBuilder_ == null) { + deviceEndpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + deviceEndpointsBuilder_.clear(); + } + if (componentsBuilder_ == null) { + components_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + componentsBuilder_.clear(); + } + if (controllerIdBuilder_ == null) { + controllerId_ = null; + } else { + controllerId_ = null; + controllerIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Device_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Device getDefaultInstanceForType() { + return context.ContextOuterClass.Device.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Device build() { + context.ContextOuterClass.Device result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + result.deviceType_ = deviceType_; + if (deviceConfigBuilder_ == null) { + result.deviceConfig_ = deviceConfig_; + } else { + result.deviceConfig_ = deviceConfigBuilder_.build(); + } + result.deviceOperationalStatus_ = deviceOperationalStatus_; + if (((bitField0_ & 0x00000001) != 0)) { + deviceDrivers_ = java.util.Collections.unmodifiableList(deviceDrivers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deviceDrivers_ = deviceDrivers_; + if (deviceEndpointsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + deviceEndpoints_ = java.util.Collections.unmodifiableList(deviceEndpoints_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.deviceEndpoints_ = deviceEndpoints_; + } else { + result.deviceEndpoints_ = deviceEndpointsBuilder_.build(); + } + if (componentsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + components_ = java.util.Collections.unmodifiableList(components_); + bitField0_ = (bitField0_ & ~0x00000004); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Device) { + return mergeFrom((context.ContextOuterClass.Device) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Device other) { + if (other == context.ContextOuterClass.Device.getDefaultInstance()) + return this; + if (other.hasDeviceId()) { + mergeDeviceId(other.getDeviceId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDeviceType().isEmpty()) { + deviceType_ = other.deviceType_; + onChanged(); + } + if (other.hasDeviceConfig()) { + mergeDeviceConfig(other.getDeviceConfig()); + } + if (other.deviceOperationalStatus_ != 0) { + setDeviceOperationalStatusValue(other.getDeviceOperationalStatusValue()); + } + if (!other.deviceDrivers_.isEmpty()) { + if (deviceDrivers_.isEmpty()) { + deviceDrivers_ = other.deviceDrivers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeviceDriversIsMutable(); + deviceDrivers_.addAll(other.deviceDrivers_); + } + onChanged(); + } + if (deviceEndpointsBuilder_ == null) { + if (!other.deviceEndpoints_.isEmpty()) { + if (deviceEndpoints_.isEmpty()) { + deviceEndpoints_ = other.deviceEndpoints_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.addAll(other.deviceEndpoints_); + } + onChanged(); + } + } else { + if (!other.deviceEndpoints_.isEmpty()) { + if (deviceEndpointsBuilder_.isEmpty()) { + deviceEndpointsBuilder_.dispose(); + deviceEndpointsBuilder_ = null; + deviceEndpoints_ = other.deviceEndpoints_; + bitField0_ = (bitField0_ & ~0x00000002); + deviceEndpointsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceEndpointsFieldBuilder() : null; + } else { + deviceEndpointsBuilder_.addAllMessages(other.deviceEndpoints_); + } + } + } + if (componentsBuilder_ == null) { + if (!other.components_.isEmpty()) { + if (components_.isEmpty()) { + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureComponentsIsMutable(); + components_.addAll(other.components_); + } + onChanged(); + } + } else { + if (!other.components_.isEmpty()) { + if (componentsBuilder_.isEmpty()) { + componentsBuilder_.dispose(); + componentsBuilder_ = null; + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00000004); + componentsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getComponentsFieldBuilder() : null; + } else { + componentsBuilder_.addAllMessages(other.components_); + } + } + } + if (other.hasControllerId()) { + mergeControllerId(other.getControllerId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Device) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.DeviceId deviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceIdBuilder_; + + /** + * .context.DeviceId device_id = 1; + * @return Whether the deviceId field is set. + */ + public boolean hasDeviceId() { + return deviceIdBuilder_ != null || deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 1; + * @return The deviceId. + */ + public context.ContextOuterClass.DeviceId getDeviceId() { + if (deviceIdBuilder_ == null) { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } else { + return deviceIdBuilder_.getMessage(); + } + } + + /** + * .context.DeviceId device_id = 1; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceId_ = value; + onChanged(); + } else { + deviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 1; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdBuilder_ == null) { + deviceId_ = builderForValue.build(); + onChanged(); + } else { + deviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceId device_id = 1; + */ + public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (deviceId_ != null) { + deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + } else { + deviceId_ = value; + } + onChanged(); + } else { + deviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 1; + */ + public Builder clearDeviceId() { + if (deviceIdBuilder_ == null) { + deviceId_ = null; + onChanged(); + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceId device_id = 1; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + onChanged(); + return getDeviceIdFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceId device_id = 1; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + if (deviceIdBuilder_ != null) { + return deviceIdBuilder_.getMessageOrBuilder(); + } else { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + } + + /** + * .context.DeviceId device_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdFieldBuilder() { + if (deviceIdBuilder_ == null) { + deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceId(), getParentForChildren(), isClean()); + deviceId_ = null; + } + return deviceIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object deviceType_ = ""; + + /** + * string device_type = 3; + * @return The deviceType. + */ + public java.lang.String getDeviceType() { + java.lang.Object ref = deviceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string device_type = 3; + * @return The bytes for deviceType. + */ + public com.google.protobuf.ByteString getDeviceTypeBytes() { + java.lang.Object ref = deviceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string device_type = 3; + * @param value The deviceType to set. + * @return This builder for chaining. + */ + public Builder setDeviceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deviceType_ = value; + onChanged(); + return this; + } + + /** + * string device_type = 3; + * @return This builder for chaining. + */ + public Builder clearDeviceType() { + deviceType_ = getDefaultInstance().getDeviceType(); + onChanged(); + return this; + } + + /** + * string device_type = 3; + * @param value The bytes for deviceType to set. + * @return This builder for chaining. + */ + public Builder setDeviceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deviceType_ = value; + onChanged(); + return this; + } + + private context.ContextOuterClass.DeviceConfig deviceConfig_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceConfigBuilder_; + + /** + * .context.DeviceConfig device_config = 4; + * @return Whether the deviceConfig field is set. + */ + public boolean hasDeviceConfig() { + return deviceConfigBuilder_ != null || deviceConfig_ != null; + } + + /** + * .context.DeviceConfig device_config = 4; + * @return The deviceConfig. + */ + public context.ContextOuterClass.DeviceConfig getDeviceConfig() { + if (deviceConfigBuilder_ == null) { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } else { + return deviceConfigBuilder_.getMessage(); + } + } + + /** + * .context.DeviceConfig device_config = 4; + */ + public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig value) { + if (deviceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceConfig_ = value; + onChanged(); + } else { + deviceConfigBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceConfig device_config = 4; + */ + public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig.Builder builderForValue) { + if (deviceConfigBuilder_ == null) { + deviceConfig_ = builderForValue.build(); + onChanged(); + } else { + deviceConfigBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceConfig device_config = 4; + */ + public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) { + if (deviceConfigBuilder_ == null) { + if (deviceConfig_ != null) { + deviceConfig_ = context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial(); + } else { + deviceConfig_ = value; + } + onChanged(); + } else { + deviceConfigBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceConfig device_config = 4; + */ + public Builder clearDeviceConfig() { + if (deviceConfigBuilder_ == null) { + deviceConfig_ = null; + onChanged(); + } else { + deviceConfig_ = null; + deviceConfigBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceConfig device_config = 4; + */ + public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() { + onChanged(); + return getDeviceConfigFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceConfig device_config = 4; + */ + public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { + if (deviceConfigBuilder_ != null) { + return deviceConfigBuilder_.getMessageOrBuilder(); + } else { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } + } + + /** + * .context.DeviceConfig device_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceConfigFieldBuilder() { + if (deviceConfigBuilder_ == null) { + deviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceConfig(), getParentForChildren(), isClean()); + deviceConfig_ = null; + } + return deviceConfigBuilder_; + } + + private int deviceOperationalStatus_ = 0; + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return The enum numeric value on the wire for deviceOperationalStatus. + */ + @java.lang.Override + public int getDeviceOperationalStatusValue() { + return deviceOperationalStatus_; + } + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @param value The enum numeric value on the wire for deviceOperationalStatus to set. + * @return This builder for chaining. + */ + public Builder setDeviceOperationalStatusValue(int value) { + deviceOperationalStatus_ = value; + onChanged(); + return this; + } + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return The deviceOperationalStatus. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.valueOf(deviceOperationalStatus_); + return result == null ? context.ContextOuterClass.DeviceOperationalStatusEnum.UNRECOGNIZED : result; + } + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @param value The deviceOperationalStatus to set. + * @return This builder for chaining. + */ + public Builder setDeviceOperationalStatus(context.ContextOuterClass.DeviceOperationalStatusEnum value) { + if (value == null) { + throw new NullPointerException(); + } + deviceOperationalStatus_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.DeviceOperationalStatusEnum device_operational_status = 5; + * @return This builder for chaining. + */ + public Builder clearDeviceOperationalStatus() { + deviceOperationalStatus_ = 0; + onChanged(); + return this; + } + + private java.util.List deviceDrivers_ = java.util.Collections.emptyList(); + + private void ensureDeviceDriversIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceDrivers_ = new java.util.ArrayList(deviceDrivers_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return A list containing the deviceDrivers. + */ + public java.util.List getDeviceDriversList() { + return new com.google.protobuf.Internal.ListAdapter(deviceDrivers_, deviceDrivers_converter_); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return The count of deviceDrivers. + */ + public int getDeviceDriversCount() { + return deviceDrivers_.size(); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the element to return. + * @return The deviceDrivers at the given index. + */ + public context.ContextOuterClass.DeviceDriverEnum getDeviceDrivers(int index) { + return deviceDrivers_converter_.convert(deviceDrivers_.get(index)); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index to set the value at. + * @param value The deviceDrivers to set. + * @return This builder for chaining. + */ + public Builder setDeviceDrivers(int index, context.ContextOuterClass.DeviceDriverEnum value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceDriversIsMutable(); + deviceDrivers_.set(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param value The deviceDrivers to add. + * @return This builder for chaining. + */ + public Builder addDeviceDrivers(context.ContextOuterClass.DeviceDriverEnum value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceDriversIsMutable(); + deviceDrivers_.add(value.getNumber()); + onChanged(); + return this; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param values The deviceDrivers to add. + * @return This builder for chaining. + */ + public Builder addAllDeviceDrivers(java.lang.Iterable values) { + ensureDeviceDriversIsMutable(); + for (context.ContextOuterClass.DeviceDriverEnum value : values) { + deviceDrivers_.add(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return This builder for chaining. + */ + public Builder clearDeviceDrivers() { + deviceDrivers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @return A list containing the enum numeric values on the wire for deviceDrivers. + */ + public java.util.List getDeviceDriversValueList() { + return java.util.Collections.unmodifiableList(deviceDrivers_); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of deviceDrivers at the given index. + */ + public int getDeviceDriversValue(int index) { + return deviceDrivers_.get(index); + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of deviceDrivers at the given index. + * @return This builder for chaining. + */ + public Builder setDeviceDriversValue(int index, int value) { + ensureDeviceDriversIsMutable(); + deviceDrivers_.set(index, value); + onChanged(); + return this; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param value The enum numeric value on the wire for deviceDrivers to add. + * @return This builder for chaining. + */ + public Builder addDeviceDriversValue(int value) { + ensureDeviceDriversIsMutable(); + deviceDrivers_.add(value); + onChanged(); + return this; + } + + /** + * repeated .context.DeviceDriverEnum device_drivers = 6; + * @param values The enum numeric values on the wire for deviceDrivers to add. + * @return This builder for chaining. + */ + public Builder addAllDeviceDriversValue(java.lang.Iterable values) { + ensureDeviceDriversIsMutable(); + for (int value : values) { + deviceDrivers_.add(value); + } + onChanged(); + return this; + } + + private java.util.List deviceEndpoints_ = java.util.Collections.emptyList(); + + private void ensureDeviceEndpointsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + deviceEndpoints_ = new java.util.ArrayList(deviceEndpoints_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 deviceEndpointsBuilder_; + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public java.util.List getDeviceEndpointsList() { + if (deviceEndpointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deviceEndpoints_); + } else { + return deviceEndpointsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public int getDeviceEndpointsCount() { + if (deviceEndpointsBuilder_ == null) { + return deviceEndpoints_.size(); + } else { + return deviceEndpointsBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public context.ContextOuterClass.EndPoint getDeviceEndpoints(int index) { + if (deviceEndpointsBuilder_ == null) { + return deviceEndpoints_.get(index); + } else { + return deviceEndpointsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder setDeviceEndpoints(int index, context.ContextOuterClass.EndPoint value) { + if (deviceEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.set(index, value); + onChanged(); + } else { + deviceEndpointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder setDeviceEndpoints(int index, context.ContextOuterClass.EndPoint.Builder builderForValue) { + if (deviceEndpointsBuilder_ == null) { + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.set(index, builderForValue.build()); + onChanged(); + } else { + deviceEndpointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder addDeviceEndpoints(context.ContextOuterClass.EndPoint value) { + if (deviceEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.add(value); + onChanged(); + } else { + deviceEndpointsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder addDeviceEndpoints(int index, context.ContextOuterClass.EndPoint value) { + if (deviceEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.add(index, value); + onChanged(); + } else { + deviceEndpointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder addDeviceEndpoints(context.ContextOuterClass.EndPoint.Builder builderForValue) { + if (deviceEndpointsBuilder_ == null) { + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.add(builderForValue.build()); + onChanged(); + } else { + deviceEndpointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder addDeviceEndpoints(int index, context.ContextOuterClass.EndPoint.Builder builderForValue) { + if (deviceEndpointsBuilder_ == null) { + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.add(index, builderForValue.build()); + onChanged(); + } else { + deviceEndpointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder addAllDeviceEndpoints(java.lang.Iterable values) { + if (deviceEndpointsBuilder_ == null) { + ensureDeviceEndpointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deviceEndpoints_); + onChanged(); + } else { + deviceEndpointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder clearDeviceEndpoints() { + if (deviceEndpointsBuilder_ == null) { + deviceEndpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + deviceEndpointsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public Builder removeDeviceEndpoints(int index) { + if (deviceEndpointsBuilder_ == null) { + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.remove(index); + onChanged(); + } else { + deviceEndpointsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public context.ContextOuterClass.EndPoint.Builder getDeviceEndpointsBuilder(int index) { + return getDeviceEndpointsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public context.ContextOuterClass.EndPointOrBuilder getDeviceEndpointsOrBuilder(int index) { + if (deviceEndpointsBuilder_ == null) { + return deviceEndpoints_.get(index); + } else { + return deviceEndpointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public java.util.List getDeviceEndpointsOrBuilderList() { + if (deviceEndpointsBuilder_ != null) { + return deviceEndpointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deviceEndpoints_); + } + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public context.ContextOuterClass.EndPoint.Builder addDeviceEndpointsBuilder() { + return getDeviceEndpointsFieldBuilder().addBuilder(context.ContextOuterClass.EndPoint.getDefaultInstance()); + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public context.ContextOuterClass.EndPoint.Builder addDeviceEndpointsBuilder(int index) { + return getDeviceEndpointsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPoint.getDefaultInstance()); + } + + /** + * repeated .context.EndPoint device_endpoints = 7; + */ + public java.util.List getDeviceEndpointsBuilderList() { + return getDeviceEndpointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceEndpointsFieldBuilder() { + if (deviceEndpointsBuilder_ == null) { + deviceEndpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceEndpoints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + deviceEndpoints_ = null; + } + return deviceEndpointsBuilder_; + } + + private java.util.List components_ = java.util.Collections.emptyList(); + + private void ensureComponentsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + components_ = new java.util.ArrayList(components_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 componentsBuilder_; + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public java.util.List getComponentsList() { + if (componentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(components_); + } else { + return componentsBuilder_.getMessageList(); + } + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public int getComponentsCount() { + if (componentsBuilder_ == null) { + return components_.size(); + } else { + return componentsBuilder_.getCount(); + } + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public context.ContextOuterClass.Component getComponents(int index) { + if (componentsBuilder_ == null) { + return components_.get(index); + } else { + return componentsBuilder_.getMessage(index); + } + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder setComponents(int index, context.ContextOuterClass.Component value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.set(index, value); + onChanged(); + } else { + componentsBuilder_.setMessage(index, value); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder setComponents(int index, context.ContextOuterClass.Component.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.set(index, builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder addComponents(context.ContextOuterClass.Component value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(value); + onChanged(); + } else { + componentsBuilder_.addMessage(value); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder addComponents(int index, context.ContextOuterClass.Component value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(index, value); + onChanged(); + } else { + componentsBuilder_.addMessage(index, value); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder addComponents(context.ContextOuterClass.Component.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder addComponents(int index, context.ContextOuterClass.Component.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(index, builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder addAllComponents(java.lang.Iterable values) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, components_); + onChanged(); + } else { + componentsBuilder_.addAllMessages(values); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder clearComponents() { + if (componentsBuilder_ == null) { + components_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + componentsBuilder_.clear(); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public Builder removeComponents(int index) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.remove(index); + onChanged(); + } else { + componentsBuilder_.remove(index); + } + return this; + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public context.ContextOuterClass.Component.Builder getComponentsBuilder(int index) { + return getComponentsFieldBuilder().getBuilder(index); + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder(int index) { + if (componentsBuilder_ == null) { + return components_.get(index); + } else { + return componentsBuilder_.getMessageOrBuilder(index); + } + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public java.util.List getComponentsOrBuilderList() { + if (componentsBuilder_ != null) { + return componentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(components_); + } + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public context.ContextOuterClass.Component.Builder addComponentsBuilder() { + return getComponentsFieldBuilder().addBuilder(context.ContextOuterClass.Component.getDefaultInstance()); + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public context.ContextOuterClass.Component.Builder addComponentsBuilder(int index) { + return getComponentsFieldBuilder().addBuilder(index, context.ContextOuterClass.Component.getDefaultInstance()); + } + + /** + *
+             * Used for inventory
+             * 
+ * + * repeated .context.Component components = 8; + */ + public java.util.List getComponentsBuilderList() { + return getComponentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getComponentsFieldBuilder() { + if (componentsBuilder_ == null) { + componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(components_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + components_ = null; + } + return componentsBuilder_; + } + + private context.ContextOuterClass.DeviceId controllerId_; + + private com.google.protobuf.SingleFieldBuilderV3 controllerIdBuilder_; + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + * @return Whether the controllerId field is set. + */ + public boolean hasControllerId() { + return controllerIdBuilder_ != null || controllerId_ != null; + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + * @return The controllerId. + */ + public context.ContextOuterClass.DeviceId getControllerId() { + if (controllerIdBuilder_ == null) { + return controllerId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; + } else { + return controllerIdBuilder_.getMessage(); + } + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + public Builder setControllerId(context.ContextOuterClass.DeviceId value) { + if (controllerIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + controllerId_ = value; + onChanged(); + } else { + controllerIdBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + public Builder setControllerId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (controllerIdBuilder_ == null) { + controllerId_ = builderForValue.build(); + onChanged(); + } else { + controllerIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + public Builder mergeControllerId(context.ContextOuterClass.DeviceId value) { + if (controllerIdBuilder_ == null) { + if (controllerId_ != null) { + controllerId_ = context.ContextOuterClass.DeviceId.newBuilder(controllerId_).mergeFrom(value).buildPartial(); + } else { + controllerId_ = value; + } + onChanged(); + } else { + controllerIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + public Builder clearControllerId() { + if (controllerIdBuilder_ == null) { + controllerId_ = null; + onChanged(); + } else { + controllerId_ = null; + controllerIdBuilder_ = null; + } + return this; + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + public context.ContextOuterClass.DeviceId.Builder getControllerIdBuilder() { + onChanged(); + return getControllerIdFieldBuilder().getBuilder(); + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder() { + if (controllerIdBuilder_ != null) { + return controllerIdBuilder_.getMessageOrBuilder(); + } else { + return controllerId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; + } + } + + /** + *
+             * Identifier of node controlling the actual device
+             * 
+ * + * .context.DeviceId controller_id = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3 getControllerIdFieldBuilder() { + if (controllerIdBuilder_ == null) { + controllerIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getControllerId(), getParentForChildren(), isClean()); + controllerId_ = null; + } + return controllerIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Device) + } + + // @@protoc_insertion_point(class_scope:context.Device) + private static final context.ContextOuterClass.Device DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Device(); + } + + public static context.ContextOuterClass.Device getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Device getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ComponentOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Component) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid component_uuid = 1; + * @return Whether the componentUuid field is set. + */ + boolean hasComponentUuid(); + + /** + * .context.Uuid component_uuid = 1; + * @return The componentUuid. + */ + context.ContextOuterClass.Uuid getComponentUuid(); + + /** + * .context.Uuid component_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * string type = 3; + * @return The type. + */ + java.lang.String getType(); + + /** + * string type = 3; + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + int getAttributesCount(); + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + boolean containsAttributes(java.lang.String key); + + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map getAttributes(); + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + java.util.Map getAttributesMap(); + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue); + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + java.lang.String getAttributesOrThrow(java.lang.String key); + + /** + * string parent = 5; + * @return The parent. + */ + java.lang.String getParent(); + + /** + * string parent = 5; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + } + + /** + *
+     * Defined previously to this section - Tested OK
+     *  
+ * + * Protobuf type {@code context.Component} + */ + public static final class Component extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Component) + ComponentOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Component.newBuilder() to construct. + private Component(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Component() { + name_ = ""; + type_ = ""; + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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 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; + } + + @SuppressWarnings({ "rawtypes" }) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch(number) { + case 4: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Component_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Component.class, context.ContextOuterClass.Component.Builder.class); + } + + public static final int COMPONENT_UUID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid componentUuid_; + + /** + * .context.Uuid component_uuid = 1; + * @return Whether the componentUuid field is set. + */ + @java.lang.Override + public boolean hasComponentUuid() { + return componentUuid_ != null; + } + + /** + * .context.Uuid component_uuid = 1; + * @return The componentUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getComponentUuid() { + return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; + } + + /** + * .context.Uuid component_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder() { + return getComponentUuid(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + + private volatile java.lang.Object type_; + + /** + * string type = 3; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + + /** + * string type = 3; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 4; + + private static final class AttributesDefaultEntryHolder { + + static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance(context.ContextOuterClass.internal_static_context_Component_AttributesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); + } + + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAttributes().getMap().containsKey(key); + } + + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + *
+         * dict[attr.name => json.dumps(attr.value)]
+         * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public java.lang.String getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PARENT_FIELD_NUMBER = 5; + + private volatile java.lang.Object parent_; + + /** + * string parent = 5; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * string parent = 5; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (componentUuid_ != null) { + output.writeMessage(1, getComponentUuid()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 4); + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (componentUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getComponentUuid()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); + } + for (java.util.Map.Entry entry : internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry attributes__ = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, attributes__); + } + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Component)) { + return super.equals(obj); + } + context.ContextOuterClass.Component other = (context.ContextOuterClass.Component) obj; + if (hasComponentUuid() != other.hasComponentUuid()) + return false; + if (hasComponentUuid()) { + if (!getComponentUuid().equals(other.getComponentUuid())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getType().equals(other.getType())) + return false; + if (!internalGetAttributes().equals(other.internalGetAttributes())) + return false; + if (!getParent().equals(other.getParent())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasComponentUuid()) { + hash = (37 * hash) + COMPONENT_UUID_FIELD_NUMBER; + hash = (53 * hash) + getComponentUuid().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Component parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Component parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Component parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Component parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Component parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Component parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Component parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Component parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Component parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Component parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Component parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Component parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Component prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * Defined previously to this section - Tested OK
+         *  
+ * + * Protobuf type {@code context.Component} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Component) + context.ContextOuterClass.ComponentOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Component_descriptor; + } + + @SuppressWarnings({ "rawtypes" }) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch(number) { + case 4: + return internalGetAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({ "rawtypes" }) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch(number) { + case 4: + return internalGetMutableAttributes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Component_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Component.class, context.ContextOuterClass.Component.Builder.class); + } + + // 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; + componentUuidBuilder_ = null; + } + name_ = ""; + type_ = ""; + internalGetMutableAttributes().clear(); + parent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Component_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Component getDefaultInstanceForType() { + return context.ContextOuterClass.Component.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Component build() { + context.ContextOuterClass.Component result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Component) { + return mergeFrom((context.ContextOuterClass.Component) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Component other) { + if (other == context.ContextOuterClass.Component.getDefaultInstance()) + return this; + if (other.hasComponentUuid()) { + mergeComponentUuid(other.getComponentUuid()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Component) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.Uuid componentUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 componentUuidBuilder_; + + /** + * .context.Uuid component_uuid = 1; + * @return Whether the componentUuid field is set. + */ + public boolean hasComponentUuid() { + return componentUuidBuilder_ != null || componentUuid_ != null; + } + + /** + * .context.Uuid component_uuid = 1; + * @return The componentUuid. + */ + public context.ContextOuterClass.Uuid getComponentUuid() { + if (componentUuidBuilder_ == null) { + return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; + } else { + return componentUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid component_uuid = 1; + */ + public Builder setComponentUuid(context.ContextOuterClass.Uuid value) { + if (componentUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + componentUuid_ = value; + onChanged(); + } else { + componentUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid component_uuid = 1; + */ + public Builder setComponentUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (componentUuidBuilder_ == null) { + componentUuid_ = builderForValue.build(); + onChanged(); + } else { + componentUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid component_uuid = 1; + */ + public Builder mergeComponentUuid(context.ContextOuterClass.Uuid value) { + if (componentUuidBuilder_ == null) { + if (componentUuid_ != null) { + componentUuid_ = context.ContextOuterClass.Uuid.newBuilder(componentUuid_).mergeFrom(value).buildPartial(); + } else { + componentUuid_ = value; + } + onChanged(); + } else { + componentUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid component_uuid = 1; + */ + public Builder clearComponentUuid() { + if (componentUuidBuilder_ == null) { + componentUuid_ = null; + onChanged(); + } else { + componentUuid_ = null; + componentUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid component_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getComponentUuidBuilder() { + onChanged(); + return getComponentUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid component_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder() { + if (componentUuidBuilder_ != null) { + return componentUuidBuilder_.getMessageOrBuilder(); + } else { + return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; + } + } + + /** + * .context.Uuid component_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getComponentUuidFieldBuilder() { + if (componentUuidBuilder_ == null) { + componentUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getComponentUuid(), getParentForChildren(), isClean()); + componentUuid_ = null; + } + return componentUuidBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + + /** + * string type = 3; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string type = 3; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string type = 3; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + return this; + } + + /** + * string type = 3; + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + + /** + * string type = 3; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField attributes_; + + private com.google.protobuf.MapField internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + private com.google.protobuf.MapField internalGetMutableAttributes() { + onChanged(); + ; + if (attributes_ == null) { + attributes_ = com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); + } + if (!attributes_.isMutable()) { + attributes_ = attributes_.copy(); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public boolean containsAttributes(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAttributes().getMap().containsKey(key); + } + + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + public java.lang.String getAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttributes() { + internalGetMutableAttributes().getMutableMap().clear(); + return this; + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + public Builder removeAttributes(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAttributes().getMutableMap().remove(key); + return this; + } + + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map getMutableAttributes() { + return internalGetMutableAttributes().getMutableMap(); + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + public Builder putAttributes(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAttributes().getMutableMap().put(key, value); + return this; + } + + /** + *
+             * dict[attr.name => json.dumps(attr.value)]
+             * 
+ * + * map<string, string> attributes = 4; + */ + public Builder putAllAttributes(java.util.Map values) { + internalGetMutableAttributes().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object parent_ = ""; + + /** + * string parent = 5; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string parent = 5; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string parent = 5; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + onChanged(); + return this; + } + + /** + * string parent = 5; + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + + /** + * string parent = 5; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Component) + } + + // @@protoc_insertion_point(class_scope:context.Component) + private static final context.ContextOuterClass.Component DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Component(); + } + + public static context.ContextOuterClass.Component getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Component getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:context.DeviceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + java.util.List getConfigRulesList(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + context.ContextOuterClass.ConfigRule getConfigRules(int index); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + int getConfigRulesCount(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + java.util.List getConfigRulesOrBuilderList(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.DeviceConfig} + */ + public static final class DeviceConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.DeviceConfig) + DeviceConfigOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceConfig.newBuilder() to construct. + private DeviceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceConfig() { + configRules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceConfig.class, context.ContextOuterClass.DeviceConfig.Builder.class); + } + + public static final int CONFIG_RULES_FIELD_NUMBER = 1; + + private java.util.List configRules_; + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public java.util.List getConfigRulesList() { + return configRules_; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public java.util.List getConfigRulesOrBuilderList() { + return configRules_; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public int getConfigRulesCount() { + return configRules_.size(); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule getConfigRules(int index) { + return configRules_.get(index); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index) { + return configRules_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < configRules_.size(); i++) { + output.writeMessage(1, configRules_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < configRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configRules_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.DeviceConfig)) { + return super.equals(obj); + } + context.ContextOuterClass.DeviceConfig other = (context.ContextOuterClass.DeviceConfig) obj; + if (!getConfigRulesList().equals(other.getConfigRulesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConfigRulesCount() > 0) { + hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; + hash = (53 * hash) + getConfigRulesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.DeviceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.DeviceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.DeviceConfig) + context.ContextOuterClass.DeviceConfigOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_DeviceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceConfig.class, context.ContextOuterClass.DeviceConfig.Builder.class); + } + + // 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(); + if (configRulesBuilder_ == null) { + configRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + configRulesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_DeviceConfig_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceConfig getDefaultInstanceForType() { + return context.ContextOuterClass.DeviceConfig.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.DeviceConfig build() { + context.ContextOuterClass.DeviceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceConfig buildPartial() { + context.ContextOuterClass.DeviceConfig result = new context.ContextOuterClass.DeviceConfig(this); + int from_bitField0_ = bitField0_; + if (configRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + configRules_ = java.util.Collections.unmodifiableList(configRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.configRules_ = configRules_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.DeviceConfig) { + return mergeFrom((context.ContextOuterClass.DeviceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.DeviceConfig other) { + if (other == context.ContextOuterClass.DeviceConfig.getDefaultInstance()) + return this; + if (configRulesBuilder_ == null) { + if (!other.configRules_.isEmpty()) { + if (configRules_.isEmpty()) { + configRules_ = other.configRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfigRulesIsMutable(); + configRules_.addAll(other.configRules_); + } + onChanged(); + } + } else { + if (!other.configRules_.isEmpty()) { + if (configRulesBuilder_.isEmpty()) { + configRulesBuilder_.dispose(); + configRulesBuilder_ = null; + configRules_ = other.configRules_; + bitField0_ = (bitField0_ & ~0x00000001); + configRulesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConfigRulesFieldBuilder() : null; + } else { + configRulesBuilder_.addAllMessages(other.configRules_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.DeviceConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List configRules_ = java.util.Collections.emptyList(); + + private void ensureConfigRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + configRules_ = new java.util.ArrayList(configRules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 configRulesBuilder_; + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesList() { + if (configRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(configRules_); + } else { + return configRulesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public int getConfigRulesCount() { + if (configRulesBuilder_ == null) { + return configRules_.size(); + } else { + return configRulesBuilder_.getCount(); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule getConfigRules(int index) { + if (configRulesBuilder_ == null) { + return configRules_.get(index); + } else { + return configRulesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder setConfigRules(int index, context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.set(index, value); + onChanged(); + } else { + configRulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder setConfigRules(int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.set(index, builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.add(value); + onChanged(); + } else { + configRulesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(int index, context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.add(index, value); + onChanged(); + } else { + configRulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(index, builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addAllConfigRules(java.lang.Iterable values) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, configRules_); + onChanged(); + } else { + configRulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder clearConfigRules() { + if (configRulesBuilder_ == null) { + configRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + configRulesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder removeConfigRules(int index) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.remove(index); + onChanged(); + } else { + configRulesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder getConfigRulesBuilder(int index) { + return getConfigRulesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index) { + if (configRulesBuilder_ == null) { + return configRules_.get(index); + } else { + return configRulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesOrBuilderList() { + if (configRulesBuilder_ != null) { + return configRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configRules_); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder() { + return getConfigRulesFieldBuilder().addBuilder(context.ContextOuterClass.ConfigRule.getDefaultInstance()); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder(int index) { + return getConfigRulesFieldBuilder().addBuilder(index, context.ContextOuterClass.ConfigRule.getDefaultInstance()); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesBuilderList() { + return getConfigRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getConfigRulesFieldBuilder() { + if (configRulesBuilder_ == null) { + configRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(configRules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + configRules_ = null; + } + return configRulesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.DeviceConfig) + } + + // @@protoc_insertion_point(class_scope:context.DeviceConfig) + private static final context.ContextOuterClass.DeviceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceConfig(); + } + + public static context.ContextOuterClass.DeviceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.DeviceIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.DeviceId device_ids = 1; + */ + java.util.List getDeviceIdsList(); + + /** + * repeated .context.DeviceId device_ids = 1; + */ + context.ContextOuterClass.DeviceId getDeviceIds(int index); + + /** + * repeated .context.DeviceId device_ids = 1; + */ + int getDeviceIdsCount(); + + /** + * repeated .context.DeviceId device_ids = 1; + */ + java.util.List getDeviceIdsOrBuilderList(); + + /** + * repeated .context.DeviceId device_ids = 1; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.DeviceIdList} + */ + public static final class DeviceIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.DeviceIdList) + DeviceIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceIdList.newBuilder() to construct. + private DeviceIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceIdList() { + deviceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceIdList.class, context.ContextOuterClass.DeviceIdList.Builder.class); + } + + public static final int DEVICE_IDS_FIELD_NUMBER = 1; + + private java.util.List deviceIds_; + + /** + * repeated .context.DeviceId device_ids = 1; + */ + @java.lang.Override + public java.util.List getDeviceIdsList() { + return deviceIds_; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + @java.lang.Override + public java.util.List getDeviceIdsOrBuilderList() { + return deviceIds_; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + @java.lang.Override + public int getDeviceIdsCount() { + return deviceIds_.size(); + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceIds(int index) { + return deviceIds_.get(index); + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index) { + return deviceIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < deviceIds_.size(); i++) { + output.writeMessage(1, deviceIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < deviceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, deviceIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.DeviceIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.DeviceIdList other = (context.ContextOuterClass.DeviceIdList) obj; + if (!getDeviceIdsList().equals(other.getDeviceIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeviceIdsCount() > 0) { + hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.DeviceIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.DeviceIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.DeviceIdList) + context.ContextOuterClass.DeviceIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_DeviceIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceIdList.class, context.ContextOuterClass.DeviceIdList.Builder.class); + } + + // 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(); + if (deviceIdsBuilder_ == null) { + deviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deviceIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_DeviceIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceIdList getDefaultInstanceForType() { + return context.ContextOuterClass.DeviceIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.DeviceIdList build() { + context.ContextOuterClass.DeviceIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceIdList buildPartial() { + context.ContextOuterClass.DeviceIdList result = new context.ContextOuterClass.DeviceIdList(this); + int from_bitField0_ = bitField0_; + if (deviceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deviceIds_ = deviceIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.DeviceIdList) { + return mergeFrom((context.ContextOuterClass.DeviceIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.DeviceIdList other) { + if (other == context.ContextOuterClass.DeviceIdList.getDefaultInstance()) + return this; + if (deviceIdsBuilder_ == null) { + if (!other.deviceIds_.isEmpty()) { + if (deviceIds_.isEmpty()) { + deviceIds_ = other.deviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeviceIdsIsMutable(); + deviceIds_.addAll(other.deviceIds_); + } + onChanged(); + } + } else { + if (!other.deviceIds_.isEmpty()) { + if (deviceIdsBuilder_.isEmpty()) { + deviceIdsBuilder_.dispose(); + deviceIdsBuilder_ = null; + deviceIds_ = other.deviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + deviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceIdsFieldBuilder() : null; + } else { + deviceIdsBuilder_.addAllMessages(other.deviceIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.DeviceIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List deviceIds_ = java.util.Collections.emptyList(); + + private void ensureDeviceIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceIds_ = new java.util.ArrayList(deviceIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 deviceIdsBuilder_; + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public java.util.List getDeviceIdsList() { + if (deviceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deviceIds_); + } else { + return deviceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public int getDeviceIdsCount() { + if (deviceIdsBuilder_ == null) { + return deviceIds_.size(); + } else { + return deviceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public context.ContextOuterClass.DeviceId getDeviceIds(int index) { + if (deviceIdsBuilder_ == null) { + return deviceIds_.get(index); + } else { + return deviceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder setDeviceIds(int index, context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.set(index, value); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder setDeviceIds(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder addDeviceIds(context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.add(value); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder addDeviceIds(int index, context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.add(index, value); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder addDeviceIds(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder addDeviceIds(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder addAllDeviceIds(java.lang.Iterable values) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deviceIds_); + onChanged(); + } else { + deviceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder clearDeviceIds() { + if (deviceIdsBuilder_ == null) { + deviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deviceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public Builder removeDeviceIds(int index) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.remove(index); + onChanged(); + } else { + deviceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdsBuilder(int index) { + return getDeviceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index) { + if (deviceIdsBuilder_ == null) { + return deviceIds_.get(index); + } else { + return deviceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public java.util.List getDeviceIdsOrBuilderList() { + if (deviceIdsBuilder_ != null) { + return deviceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deviceIds_); + } + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder() { + return getDeviceIdsFieldBuilder().addBuilder(context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder(int index) { + return getDeviceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.DeviceId.getDefaultInstance()); + } + + /** + * repeated .context.DeviceId device_ids = 1; + */ + public java.util.List getDeviceIdsBuilderList() { + return getDeviceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceIdsFieldBuilder() { + if (deviceIdsBuilder_ == null) { + deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceIds_ = null; + } + return deviceIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.DeviceIdList) + } + + // @@protoc_insertion_point(class_scope:context.DeviceIdList) + private static final context.ContextOuterClass.DeviceIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceIdList(); + } + + public static context.ContextOuterClass.DeviceIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.DeviceList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Device devices = 1; + */ + java.util.List getDevicesList(); + + /** + * repeated .context.Device devices = 1; + */ + context.ContextOuterClass.Device getDevices(int index); + + /** + * repeated .context.Device devices = 1; + */ + int getDevicesCount(); + + /** + * repeated .context.Device devices = 1; + */ + java.util.List getDevicesOrBuilderList(); + + /** + * repeated .context.Device devices = 1; + */ + context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.DeviceList} + */ + public static final class DeviceList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.DeviceList) + DeviceListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceList.newBuilder() to construct. + private DeviceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceList() { + devices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceList.class, context.ContextOuterClass.DeviceList.Builder.class); + } + + public static final int DEVICES_FIELD_NUMBER = 1; + + private java.util.List devices_; + + /** + * repeated .context.Device devices = 1; + */ + @java.lang.Override + public java.util.List getDevicesList() { + return devices_; + } + + /** + * repeated .context.Device devices = 1; + */ + @java.lang.Override + public java.util.List getDevicesOrBuilderList() { + return devices_; + } + + /** + * repeated .context.Device devices = 1; + */ + @java.lang.Override + public int getDevicesCount() { + return devices_.size(); + } + + /** + * repeated .context.Device devices = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Device getDevices(int index) { + return devices_.get(index); + } + + /** + * repeated .context.Device devices = 1; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder(int index) { + return devices_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < devices_.size(); i++) { + output.writeMessage(1, devices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < devices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, devices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.DeviceList)) { + return super.equals(obj); + } + context.ContextOuterClass.DeviceList other = (context.ContextOuterClass.DeviceList) obj; + if (!getDevicesList().equals(other.getDevicesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDevicesCount() > 0) { + hash = (37 * hash) + DEVICES_FIELD_NUMBER; + hash = (53 * hash) + getDevicesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.DeviceList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.DeviceList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.DeviceList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.DeviceList) + context.ContextOuterClass.DeviceListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_DeviceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceList.class, context.ContextOuterClass.DeviceList.Builder.class); + } + + // 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(); + if (devicesBuilder_ == null) { + devices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + devicesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_DeviceList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceList getDefaultInstanceForType() { + return context.ContextOuterClass.DeviceList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.DeviceList build() { + context.ContextOuterClass.DeviceList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceList buildPartial() { + context.ContextOuterClass.DeviceList result = new context.ContextOuterClass.DeviceList(this); + int from_bitField0_ = bitField0_; + if (devicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + devices_ = java.util.Collections.unmodifiableList(devices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.devices_ = devices_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.DeviceList) { + return mergeFrom((context.ContextOuterClass.DeviceList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.DeviceList other) { + if (other == context.ContextOuterClass.DeviceList.getDefaultInstance()) + return this; + if (devicesBuilder_ == null) { + if (!other.devices_.isEmpty()) { + if (devices_.isEmpty()) { + devices_ = other.devices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDevicesIsMutable(); + devices_.addAll(other.devices_); + } + onChanged(); + } + } else { + if (!other.devices_.isEmpty()) { + if (devicesBuilder_.isEmpty()) { + devicesBuilder_.dispose(); + devicesBuilder_ = null; + devices_ = other.devices_; + bitField0_ = (bitField0_ & ~0x00000001); + devicesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDevicesFieldBuilder() : null; + } else { + devicesBuilder_.addAllMessages(other.devices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.DeviceList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List devices_ = java.util.Collections.emptyList(); + + private void ensureDevicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + devices_ = new java.util.ArrayList(devices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 devicesBuilder_; + + /** + * repeated .context.Device devices = 1; + */ + public java.util.List getDevicesList() { + if (devicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(devices_); + } else { + return devicesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Device devices = 1; + */ + public int getDevicesCount() { + if (devicesBuilder_ == null) { + return devices_.size(); + } else { + return devicesBuilder_.getCount(); + } + } + + /** + * repeated .context.Device devices = 1; + */ + public context.ContextOuterClass.Device getDevices(int index) { + if (devicesBuilder_ == null) { + return devices_.get(index); + } else { + return devicesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder setDevices(int index, context.ContextOuterClass.Device value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.set(index, value); + onChanged(); + } else { + devicesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder setDevices(int index, context.ContextOuterClass.Device.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.set(index, builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder addDevices(context.ContextOuterClass.Device value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.add(value); + onChanged(); + } else { + devicesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder addDevices(int index, context.ContextOuterClass.Device value) { + if (devicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevicesIsMutable(); + devices_.add(index, value); + onChanged(); + } else { + devicesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder addDevices(context.ContextOuterClass.Device.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder addDevices(int index, context.ContextOuterClass.Device.Builder builderForValue) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(index, builderForValue.build()); + onChanged(); + } else { + devicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder addAllDevices(java.lang.Iterable values) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, devices_); + onChanged(); + } else { + devicesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder clearDevices() { + if (devicesBuilder_ == null) { + devices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + devicesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public Builder removeDevices(int index) { + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.remove(index); + onChanged(); + } else { + devicesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Device devices = 1; + */ + public context.ContextOuterClass.Device.Builder getDevicesBuilder(int index) { + return getDevicesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Device devices = 1; + */ + public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder(int index) { + if (devicesBuilder_ == null) { + return devices_.get(index); + } else { + return devicesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Device devices = 1; + */ + public java.util.List getDevicesOrBuilderList() { + if (devicesBuilder_ != null) { + return devicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(devices_); + } + } + + /** + * repeated .context.Device devices = 1; + */ + public context.ContextOuterClass.Device.Builder addDevicesBuilder() { + return getDevicesFieldBuilder().addBuilder(context.ContextOuterClass.Device.getDefaultInstance()); + } + + /** + * repeated .context.Device devices = 1; + */ + public context.ContextOuterClass.Device.Builder addDevicesBuilder(int index) { + return getDevicesFieldBuilder().addBuilder(index, context.ContextOuterClass.Device.getDefaultInstance()); + } + + /** + * repeated .context.Device devices = 1; + */ + public java.util.List getDevicesBuilderList() { + return getDevicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDevicesFieldBuilder() { + if (devicesBuilder_ == null) { + devicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(devices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + devices_ = null; + } + return devicesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.DeviceList) + } + + // @@protoc_insertion_point(class_scope:context.DeviceList) + private static final context.ContextOuterClass.DeviceList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceList(); + } + + public static context.ContextOuterClass.DeviceList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceFilterOrBuilder extends // @@protoc_insertion_point(interface_extends:context.DeviceFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.DeviceIdList device_ids = 1; + * @return Whether the deviceIds field is set. + */ + boolean hasDeviceIds(); + + /** + * .context.DeviceIdList device_ids = 1; + * @return The deviceIds. + */ + context.ContextOuterClass.DeviceIdList getDeviceIds(); + + /** + * .context.DeviceIdList device_ids = 1; + */ + context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder(); + + /** + * bool include_endpoints = 2; + * @return The includeEndpoints. + */ + boolean getIncludeEndpoints(); + + /** + * bool include_config_rules = 3; + * @return The includeConfigRules. + */ + boolean getIncludeConfigRules(); + + /** + * bool include_components = 4; + * @return The includeComponents. + */ + boolean getIncludeComponents(); + } + + /** + * Protobuf type {@code context.DeviceFilter} + */ + public static final class DeviceFilter extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.DeviceFilter) + DeviceFilterOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceFilter.newBuilder() to construct. + private DeviceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceFilter() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceFilter_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceFilter.class, context.ContextOuterClass.DeviceFilter.Builder.class); + } + + public static final int DEVICE_IDS_FIELD_NUMBER = 1; + + private context.ContextOuterClass.DeviceIdList deviceIds_; + + /** + * .context.DeviceIdList device_ids = 1; + * @return Whether the deviceIds field is set. + */ + @java.lang.Override + public boolean hasDeviceIds() { + return deviceIds_ != null; + } + + /** + * .context.DeviceIdList device_ids = 1; + * @return The deviceIds. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdList getDeviceIds() { + return deviceIds_ == null ? context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder() { + return getDeviceIds(); + } + + public static final int INCLUDE_ENDPOINTS_FIELD_NUMBER = 2; + + private boolean includeEndpoints_; + + /** + * bool include_endpoints = 2; + * @return The includeEndpoints. + */ + @java.lang.Override + public boolean getIncludeEndpoints() { + return includeEndpoints_; + } + + public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 3; + + private boolean includeConfigRules_; + + /** + * bool include_config_rules = 3; + * @return The includeConfigRules. + */ + @java.lang.Override + public boolean getIncludeConfigRules() { + return includeConfigRules_; + } + + public static final int INCLUDE_COMPONENTS_FIELD_NUMBER = 4; + + private boolean includeComponents_; + + /** + * bool include_components = 4; + * @return The includeComponents. + */ + @java.lang.Override + public boolean getIncludeComponents() { + return includeComponents_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (deviceIds_ != null) { + output.writeMessage(1, getDeviceIds()); + } + if (includeEndpoints_ != false) { + output.writeBool(2, includeEndpoints_); + } + if (includeConfigRules_ != false) { + output.writeBool(3, includeConfigRules_); + } + if (includeComponents_ != false) { + output.writeBool(4, includeComponents_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (deviceIds_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeviceIds()); + } + if (includeEndpoints_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeEndpoints_); + } + if (includeConfigRules_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, includeConfigRules_); + } + if (includeComponents_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeComponents_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.DeviceFilter)) { + return super.equals(obj); + } + context.ContextOuterClass.DeviceFilter other = (context.ContextOuterClass.DeviceFilter) obj; + if (hasDeviceIds() != other.hasDeviceIds()) + return false; + if (hasDeviceIds()) { + if (!getDeviceIds().equals(other.getDeviceIds())) + return false; + } + if (getIncludeEndpoints() != other.getIncludeEndpoints()) + return false; + if (getIncludeConfigRules() != other.getIncludeConfigRules()) + return false; + if (getIncludeComponents() != other.getIncludeComponents()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDeviceIds()) { + hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceIds().hashCode(); + } + hash = (37 * hash) + INCLUDE_ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeEndpoints()); + hash = (37 * hash) + INCLUDE_CONFIG_RULES_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceFilter parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceFilter parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceFilter parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.DeviceFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.DeviceFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.DeviceFilter) + context.ContextOuterClass.DeviceFilterOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_DeviceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceFilter_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceFilter.class, context.ContextOuterClass.DeviceFilter.Builder.class); + } + + // 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; + deviceIdsBuilder_ = null; + } + includeEndpoints_ = false; + includeConfigRules_ = false; + includeComponents_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_DeviceFilter_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceFilter getDefaultInstanceForType() { + return context.ContextOuterClass.DeviceFilter.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.DeviceFilter build() { + context.ContextOuterClass.DeviceFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.DeviceFilter) { + return mergeFrom((context.ContextOuterClass.DeviceFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.DeviceFilter other) { + if (other == context.ContextOuterClass.DeviceFilter.getDefaultInstance()) + return this; + if (other.hasDeviceIds()) { + mergeDeviceIds(other.getDeviceIds()); + } + if (other.getIncludeEndpoints() != false) { + setIncludeEndpoints(other.getIncludeEndpoints()); + } + if (other.getIncludeConfigRules() != false) { + setIncludeConfigRules(other.getIncludeConfigRules()); + } + if (other.getIncludeComponents() != false) { + setIncludeComponents(other.getIncludeComponents()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.DeviceFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.DeviceIdList deviceIds_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceIdsBuilder_; + + /** + * .context.DeviceIdList device_ids = 1; + * @return Whether the deviceIds field is set. + */ + public boolean hasDeviceIds() { + return deviceIdsBuilder_ != null || deviceIds_ != null; + } + + /** + * .context.DeviceIdList device_ids = 1; + * @return The deviceIds. + */ + public context.ContextOuterClass.DeviceIdList getDeviceIds() { + if (deviceIdsBuilder_ == null) { + return deviceIds_ == null ? context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; + } else { + return deviceIdsBuilder_.getMessage(); + } + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + public Builder setDeviceIds(context.ContextOuterClass.DeviceIdList value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceIds_ = value; + onChanged(); + } else { + deviceIdsBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + public Builder setDeviceIds(context.ContextOuterClass.DeviceIdList.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + deviceIds_ = builderForValue.build(); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + public Builder mergeDeviceIds(context.ContextOuterClass.DeviceIdList value) { + if (deviceIdsBuilder_ == null) { + if (deviceIds_ != null) { + deviceIds_ = context.ContextOuterClass.DeviceIdList.newBuilder(deviceIds_).mergeFrom(value).buildPartial(); + } else { + deviceIds_ = value; + } + onChanged(); + } else { + deviceIdsBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + public Builder clearDeviceIds() { + if (deviceIdsBuilder_ == null) { + deviceIds_ = null; + onChanged(); + } else { + deviceIds_ = null; + deviceIdsBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + public context.ContextOuterClass.DeviceIdList.Builder getDeviceIdsBuilder() { + onChanged(); + return getDeviceIdsFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + public context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder() { + if (deviceIdsBuilder_ != null) { + return deviceIdsBuilder_.getMessageOrBuilder(); + } else { + return deviceIds_ == null ? context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; + } + } + + /** + * .context.DeviceIdList device_ids = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdsFieldBuilder() { + if (deviceIdsBuilder_ == null) { + deviceIdsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceIds(), getParentForChildren(), isClean()); + deviceIds_ = null; + } + return deviceIdsBuilder_; + } + + private boolean includeEndpoints_; + + /** + * bool include_endpoints = 2; + * @return The includeEndpoints. + */ + @java.lang.Override + public boolean getIncludeEndpoints() { + return includeEndpoints_; + } + + /** + * bool include_endpoints = 2; + * @param value The includeEndpoints to set. + * @return This builder for chaining. + */ + public Builder setIncludeEndpoints(boolean value) { + includeEndpoints_ = value; + onChanged(); + return this; + } + + /** + * bool include_endpoints = 2; + * @return This builder for chaining. + */ + public Builder clearIncludeEndpoints() { + includeEndpoints_ = false; + onChanged(); + return this; + } + + private boolean includeConfigRules_; + + /** + * bool include_config_rules = 3; + * @return The includeConfigRules. + */ + @java.lang.Override + public boolean getIncludeConfigRules() { + return includeConfigRules_; + } + + /** + * bool include_config_rules = 3; + * @param value The includeConfigRules to set. + * @return This builder for chaining. + */ + public Builder setIncludeConfigRules(boolean value) { + includeConfigRules_ = value; + onChanged(); + return this; + } + + /** + * bool include_config_rules = 3; + * @return This builder for chaining. + */ + public Builder clearIncludeConfigRules() { + includeConfigRules_ = false; + onChanged(); + return this; + } + + private boolean includeComponents_; + + /** + * bool include_components = 4; + * @return The includeComponents. + */ + @java.lang.Override + public boolean getIncludeComponents() { + return includeComponents_; + } + + /** + * bool include_components = 4; + * @param value The includeComponents to set. + * @return This builder for chaining. + */ + public Builder setIncludeComponents(boolean value) { + includeComponents_ = value; + onChanged(); + return this; + } + + /** + * bool include_components = 4; + * @return This builder for chaining. + */ + public Builder clearIncludeComponents() { + includeComponents_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.DeviceFilter) + } + + // @@protoc_insertion_point(class_scope:context.DeviceFilter) + private static final context.ContextOuterClass.DeviceFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceFilter(); + } + + public static context.ContextOuterClass.DeviceFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.DeviceEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + boolean hasDeviceId(); + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + context.ContextOuterClass.DeviceId getDeviceId(); + + /** + * .context.DeviceId device_id = 2; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + + /** + * .context.DeviceConfig device_config = 3; + * @return Whether the deviceConfig field is set. + */ + boolean hasDeviceConfig(); + + /** + * .context.DeviceConfig device_config = 3; + * @return The deviceConfig. + */ + context.ContextOuterClass.DeviceConfig getDeviceConfig(); + + /** + * .context.DeviceConfig device_config = 3; + */ + context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder(); + } + + /** + * Protobuf type {@code context.DeviceEvent} + */ + public static final class DeviceEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.DeviceEvent) + DeviceEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceEvent.newBuilder() to construct. + private DeviceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceEvent.class, context.ContextOuterClass.DeviceEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int DEVICE_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.DeviceId deviceId_; + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + @java.lang.Override + public boolean hasDeviceId() { + return deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceId() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + + /** + * .context.DeviceId device_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + return getDeviceId(); + } + + public static final int DEVICE_CONFIG_FIELD_NUMBER = 3; + + private context.ContextOuterClass.DeviceConfig deviceConfig_; + + /** + * .context.DeviceConfig device_config = 3; + * @return Whether the deviceConfig field is set. + */ + @java.lang.Override + public boolean hasDeviceConfig() { + return deviceConfig_ != null; + } + + /** + * .context.DeviceConfig device_config = 3; + * @return The deviceConfig. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceConfig getDeviceConfig() { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } + + /** + * .context.DeviceConfig device_config = 3; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { + return getDeviceConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (deviceId_ != null) { + output.writeMessage(2, getDeviceId()); + } + if (deviceConfig_ != null) { + output.writeMessage(3, getDeviceConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (deviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeviceId()); + } + if (deviceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeviceConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.DeviceEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.DeviceEvent other = (context.ContextOuterClass.DeviceEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasDeviceId() != other.hasDeviceId()) + return false; + if (hasDeviceId()) { + if (!getDeviceId().equals(other.getDeviceId())) + return false; + } + if (hasDeviceConfig() != other.hasDeviceConfig()) + return false; + if (hasDeviceConfig()) { + if (!getDeviceConfig().equals(other.getDeviceConfig())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasDeviceId()) { + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + } + if (hasDeviceConfig()) { + hash = (37 * hash) + DEVICE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDeviceConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.DeviceEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.DeviceEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.DeviceEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.DeviceEvent) + context.ContextOuterClass.DeviceEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_DeviceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_DeviceEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.DeviceEvent.class, context.ContextOuterClass.DeviceEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (deviceIdBuilder_ == null) { + deviceId_ = null; + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + if (deviceConfigBuilder_ == null) { + deviceConfig_ = null; + } else { + deviceConfig_ = null; + deviceConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_DeviceEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceEvent getDefaultInstanceForType() { + return context.ContextOuterClass.DeviceEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.DeviceEvent build() { + context.ContextOuterClass.DeviceEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.DeviceEvent) { + return mergeFrom((context.ContextOuterClass.DeviceEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.DeviceEvent other) { + if (other == context.ContextOuterClass.DeviceEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasDeviceId()) { + mergeDeviceId(other.getDeviceId()); + } + if (other.hasDeviceConfig()) { + mergeDeviceConfig(other.getDeviceConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.DeviceEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.DeviceId deviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceIdBuilder_; + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + public boolean hasDeviceId() { + return deviceIdBuilder_ != null || deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + public context.ContextOuterClass.DeviceId getDeviceId() { + if (deviceIdBuilder_ == null) { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } else { + return deviceIdBuilder_.getMessage(); + } + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceId_ = value; + onChanged(); + } else { + deviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdBuilder_ == null) { + deviceId_ = builderForValue.build(); + onChanged(); + } else { + deviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (deviceId_ != null) { + deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + } else { + deviceId_ = value; + } + onChanged(); + } else { + deviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder clearDeviceId() { + if (deviceIdBuilder_ == null) { + deviceId_ = null; + onChanged(); + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + onChanged(); + return getDeviceIdFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceId device_id = 2; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + if (deviceIdBuilder_ != null) { + return deviceIdBuilder_.getMessageOrBuilder(); + } else { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + } + + /** + * .context.DeviceId device_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdFieldBuilder() { + if (deviceIdBuilder_ == null) { + deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceId(), getParentForChildren(), isClean()); + deviceId_ = null; + } + return deviceIdBuilder_; + } + + private context.ContextOuterClass.DeviceConfig deviceConfig_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceConfigBuilder_; + + /** + * .context.DeviceConfig device_config = 3; + * @return Whether the deviceConfig field is set. + */ + public boolean hasDeviceConfig() { + return deviceConfigBuilder_ != null || deviceConfig_ != null; + } + + /** + * .context.DeviceConfig device_config = 3; + * @return The deviceConfig. + */ + public context.ContextOuterClass.DeviceConfig getDeviceConfig() { + if (deviceConfigBuilder_ == null) { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } else { + return deviceConfigBuilder_.getMessage(); + } + } + + /** + * .context.DeviceConfig device_config = 3; + */ + public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig value) { + if (deviceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceConfig_ = value; + onChanged(); + } else { + deviceConfigBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceConfig device_config = 3; + */ + public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig.Builder builderForValue) { + if (deviceConfigBuilder_ == null) { + deviceConfig_ = builderForValue.build(); + onChanged(); + } else { + deviceConfigBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceConfig device_config = 3; + */ + public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) { + if (deviceConfigBuilder_ == null) { + if (deviceConfig_ != null) { + deviceConfig_ = context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial(); + } else { + deviceConfig_ = value; + } + onChanged(); + } else { + deviceConfigBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceConfig device_config = 3; + */ + public Builder clearDeviceConfig() { + if (deviceConfigBuilder_ == null) { + deviceConfig_ = null; + onChanged(); + } else { + deviceConfig_ = null; + deviceConfigBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceConfig device_config = 3; + */ + public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() { + onChanged(); + return getDeviceConfigFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceConfig device_config = 3; + */ + public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { + if (deviceConfigBuilder_ != null) { + return deviceConfigBuilder_.getMessageOrBuilder(); + } else { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } + } + + /** + * .context.DeviceConfig device_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceConfigFieldBuilder() { + if (deviceConfigBuilder_ == null) { + deviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceConfig(), getParentForChildren(), isClean()); + deviceConfig_ = null; + } + return deviceConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.DeviceEvent) + } + + // @@protoc_insertion_point(class_scope:context.DeviceEvent) + private static final context.ContextOuterClass.DeviceEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceEvent(); + } + + public static context.ContextOuterClass.DeviceEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.DeviceEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.LinkId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid link_uuid = 1; + * @return Whether the linkUuid field is set. + */ + boolean hasLinkUuid(); + + /** + * .context.Uuid link_uuid = 1; + * @return The linkUuid. + */ + context.ContextOuterClass.Uuid getLinkUuid(); + + /** + * .context.Uuid link_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder(); + } + + /** + *
+     * ----- Link ----------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.LinkId} + */ + public static final class LinkId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.LinkId) + LinkIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use LinkId.newBuilder() to construct. + private LinkId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkId.class, context.ContextOuterClass.LinkId.Builder.class); + } + + public static final int LINK_UUID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid linkUuid_; + + /** + * .context.Uuid link_uuid = 1; + * @return Whether the linkUuid field is set. + */ + @java.lang.Override + public boolean hasLinkUuid() { + return linkUuid_ != null; + } + + /** + * .context.Uuid link_uuid = 1; + * @return The linkUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getLinkUuid() { + return linkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; + } + + /** + * .context.Uuid link_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder() { + return getLinkUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (linkUuid_ != null) { + output.writeMessage(1, getLinkUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (linkUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLinkUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.LinkId)) { + return super.equals(obj); + } + context.ContextOuterClass.LinkId other = (context.ContextOuterClass.LinkId) obj; + if (hasLinkUuid() != other.hasLinkUuid()) + return false; + if (hasLinkUuid()) { + if (!getLinkUuid().equals(other.getLinkUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLinkUuid()) { + hash = (37 * hash) + LINK_UUID_FIELD_NUMBER; + hash = (53 * hash) + getLinkUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.LinkId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.LinkId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Link ----------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.LinkId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.LinkId) + context.ContextOuterClass.LinkIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_LinkId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkId.class, context.ContextOuterClass.LinkId.Builder.class); + } + + // 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; + linkUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_LinkId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.LinkId getDefaultInstanceForType() { + return context.ContextOuterClass.LinkId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.LinkId build() { + context.ContextOuterClass.LinkId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.LinkId) { + return mergeFrom((context.ContextOuterClass.LinkId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.LinkId other) { + if (other == context.ContextOuterClass.LinkId.getDefaultInstance()) + return this; + if (other.hasLinkUuid()) { + mergeLinkUuid(other.getLinkUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.LinkId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid linkUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 linkUuidBuilder_; + + /** + * .context.Uuid link_uuid = 1; + * @return Whether the linkUuid field is set. + */ + public boolean hasLinkUuid() { + return linkUuidBuilder_ != null || linkUuid_ != null; + } + + /** + * .context.Uuid link_uuid = 1; + * @return The linkUuid. + */ + public context.ContextOuterClass.Uuid getLinkUuid() { + if (linkUuidBuilder_ == null) { + return linkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; + } else { + return linkUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid link_uuid = 1; + */ + public Builder setLinkUuid(context.ContextOuterClass.Uuid value) { + if (linkUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkUuid_ = value; + onChanged(); + } else { + linkUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid link_uuid = 1; + */ + public Builder setLinkUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (linkUuidBuilder_ == null) { + linkUuid_ = builderForValue.build(); + onChanged(); + } else { + linkUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid link_uuid = 1; + */ + public Builder mergeLinkUuid(context.ContextOuterClass.Uuid value) { + if (linkUuidBuilder_ == null) { + if (linkUuid_ != null) { + linkUuid_ = context.ContextOuterClass.Uuid.newBuilder(linkUuid_).mergeFrom(value).buildPartial(); + } else { + linkUuid_ = value; + } + onChanged(); + } else { + linkUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid link_uuid = 1; + */ + public Builder clearLinkUuid() { + if (linkUuidBuilder_ == null) { + linkUuid_ = null; + onChanged(); + } else { + linkUuid_ = null; + linkUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid link_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getLinkUuidBuilder() { + onChanged(); + return getLinkUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid link_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder() { + if (linkUuidBuilder_ != null) { + return linkUuidBuilder_.getMessageOrBuilder(); + } else { + return linkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; + } + } + + /** + * .context.Uuid link_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getLinkUuidFieldBuilder() { + if (linkUuidBuilder_ == null) { + linkUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getLinkUuid(), getParentForChildren(), isClean()); + linkUuid_ = null; + } + return linkUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.LinkId) + } + + // @@protoc_insertion_point(class_scope:context.LinkId) + private static final context.ContextOuterClass.LinkId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.LinkId(); + } + + public static context.ContextOuterClass.LinkId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.LinkId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkAttributesOrBuilder extends // @@protoc_insertion_point(interface_extends:context.LinkAttributes) + com.google.protobuf.MessageOrBuilder { + + /** + * float total_capacity_gbps = 1; + * @return The totalCapacityGbps. + */ + float getTotalCapacityGbps(); + + /** + * float used_capacity_gbps = 2; + * @return The usedCapacityGbps. + */ + float getUsedCapacityGbps(); + } + + /** + * Protobuf type {@code context.LinkAttributes} + */ + public static final class LinkAttributes extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.LinkAttributes) + LinkAttributesOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use LinkAttributes.newBuilder() to construct. + private LinkAttributes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkAttributes() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkAttributes_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkAttributes.class, context.ContextOuterClass.LinkAttributes.Builder.class); + } + + public static final int TOTAL_CAPACITY_GBPS_FIELD_NUMBER = 1; + + private float totalCapacityGbps_; + + /** + * float total_capacity_gbps = 1; + * @return The totalCapacityGbps. + */ + @java.lang.Override + public float getTotalCapacityGbps() { + return totalCapacityGbps_; + } + + public static final int USED_CAPACITY_GBPS_FIELD_NUMBER = 2; + + private float usedCapacityGbps_; + + /** + * float used_capacity_gbps = 2; + * @return The usedCapacityGbps. + */ + @java.lang.Override + public float getUsedCapacityGbps() { + return usedCapacityGbps_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (totalCapacityGbps_ != 0F) { + output.writeFloat(1, totalCapacityGbps_); + } + if (usedCapacityGbps_ != 0F) { + output.writeFloat(2, usedCapacityGbps_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (totalCapacityGbps_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, totalCapacityGbps_); + } + if (usedCapacityGbps_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, usedCapacityGbps_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.LinkAttributes)) { + return super.equals(obj); + } + context.ContextOuterClass.LinkAttributes other = (context.ContextOuterClass.LinkAttributes) obj; + if (java.lang.Float.floatToIntBits(getTotalCapacityGbps()) != java.lang.Float.floatToIntBits(other.getTotalCapacityGbps())) + return false; + if (java.lang.Float.floatToIntBits(getUsedCapacityGbps()) != java.lang.Float.floatToIntBits(other.getUsedCapacityGbps())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOTAL_CAPACITY_GBPS_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkAttributes parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkAttributes parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkAttributes parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.LinkAttributes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.LinkAttributes} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.LinkAttributes) + context.ContextOuterClass.LinkAttributesOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_LinkAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkAttributes_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkAttributes.class, context.ContextOuterClass.LinkAttributes.Builder.class); + } + + // 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(); + totalCapacityGbps_ = 0F; + usedCapacityGbps_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_LinkAttributes_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.LinkAttributes getDefaultInstanceForType() { + return context.ContextOuterClass.LinkAttributes.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.LinkAttributes build() { + context.ContextOuterClass.LinkAttributes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.LinkAttributes buildPartial() { + context.ContextOuterClass.LinkAttributes result = new context.ContextOuterClass.LinkAttributes(this); + result.totalCapacityGbps_ = totalCapacityGbps_; + result.usedCapacityGbps_ = usedCapacityGbps_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.LinkAttributes) { + return mergeFrom((context.ContextOuterClass.LinkAttributes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.LinkAttributes other) { + if (other == context.ContextOuterClass.LinkAttributes.getDefaultInstance()) + return this; + if (other.getTotalCapacityGbps() != 0F) { + setTotalCapacityGbps(other.getTotalCapacityGbps()); + } + if (other.getUsedCapacityGbps() != 0F) { + setUsedCapacityGbps(other.getUsedCapacityGbps()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.LinkAttributes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float totalCapacityGbps_; + + /** + * float total_capacity_gbps = 1; + * @return The totalCapacityGbps. + */ + @java.lang.Override + public float getTotalCapacityGbps() { + return totalCapacityGbps_; + } + + /** + * float total_capacity_gbps = 1; + * @param value The totalCapacityGbps to set. + * @return This builder for chaining. + */ + public Builder setTotalCapacityGbps(float value) { + totalCapacityGbps_ = value; + onChanged(); + return this; + } + + /** + * float total_capacity_gbps = 1; + * @return This builder for chaining. + */ + public Builder clearTotalCapacityGbps() { + totalCapacityGbps_ = 0F; + onChanged(); + return this; + } + + private float usedCapacityGbps_; + + /** + * float used_capacity_gbps = 2; + * @return The usedCapacityGbps. + */ + @java.lang.Override + public float getUsedCapacityGbps() { + return usedCapacityGbps_; + } + + /** + * float used_capacity_gbps = 2; + * @param value The usedCapacityGbps to set. + * @return This builder for chaining. + */ + public Builder setUsedCapacityGbps(float value) { + usedCapacityGbps_ = value; + onChanged(); + return this; + } + + /** + * float used_capacity_gbps = 2; + * @return This builder for chaining. + */ + public Builder clearUsedCapacityGbps() { + usedCapacityGbps_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.LinkAttributes) + } + + // @@protoc_insertion_point(class_scope:context.LinkAttributes) + private static final context.ContextOuterClass.LinkAttributes DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.LinkAttributes(); + } + + public static context.ContextOuterClass.LinkAttributes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.LinkAttributes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Link) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.LinkId link_id = 1; + * @return Whether the linkId field is set. + */ + boolean hasLinkId(); + + /** + * .context.LinkId link_id = 1; + * @return The linkId. + */ + context.ContextOuterClass.LinkId getLinkId(); + + /** + * .context.LinkId link_id = 1; + */ + context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + java.util.List getLinkEndpointIdsList(); + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointId getLinkEndpointIds(int index); + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + int getLinkEndpointIdsCount(); + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + java.util.List getLinkEndpointIdsOrBuilderList(); + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index); + + /** + * .context.LinkAttributes attributes = 4; + * @return Whether the attributes field is set. + */ + boolean hasAttributes(); + + /** + * .context.LinkAttributes attributes = 4; + * @return The attributes. + */ + context.ContextOuterClass.LinkAttributes getAttributes(); + + /** + * .context.LinkAttributes attributes = 4; + */ + context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder(); + } + + /** + * Protobuf type {@code context.Link} + */ + public static final class Link extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Link) + LinkOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Link.newBuilder() to construct. + private Link(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Link() { + name_ = ""; + linkEndpointIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Link_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Link.class, context.ContextOuterClass.Link.Builder.class); + } + + public static final int LINK_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.LinkId linkId_; + + /** + * .context.LinkId link_id = 1; + * @return Whether the linkId field is set. + */ + @java.lang.Override + public boolean hasLinkId() { + return linkId_ != null; + } + + /** + * .context.LinkId link_id = 1; + * @return The linkId. + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkId() { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + + /** + * .context.LinkId link_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + return getLinkId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 3; + + private java.util.List linkEndpointIds_; + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getLinkEndpointIdsList() { + return linkEndpointIds_; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getLinkEndpointIdsOrBuilderList() { + return linkEndpointIds_; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + @java.lang.Override + public int getLinkEndpointIdsCount() { + return linkEndpointIds_.size(); + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { + return linkEndpointIds_.get(index); + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { + return linkEndpointIds_.get(index); + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 4; + + private context.ContextOuterClass.LinkAttributes attributes_; + + /** + * .context.LinkAttributes attributes = 4; + * @return Whether the attributes field is set. + */ + @java.lang.Override + public boolean hasAttributes() { + return attributes_ != null; + } + + /** + * .context.LinkAttributes attributes = 4; + * @return The attributes. + */ + @java.lang.Override + public context.ContextOuterClass.LinkAttributes getAttributes() { + return attributes_ == null ? context.ContextOuterClass.LinkAttributes.getDefaultInstance() : attributes_; + } + + /** + * .context.LinkAttributes attributes = 4; + */ + @java.lang.Override + public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() { + return getAttributes(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (linkId_ != null) { + output.writeMessage(1, getLinkId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < linkEndpointIds_.size(); i++) { + output.writeMessage(3, linkEndpointIds_.get(i)); + } + if (attributes_ != null) { + output.writeMessage(4, getAttributes()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (linkId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLinkId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < linkEndpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, linkEndpointIds_.get(i)); + } + if (attributes_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAttributes()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Link)) { + return super.equals(obj); + } + context.ContextOuterClass.Link other = (context.ContextOuterClass.Link) obj; + if (hasLinkId() != other.hasLinkId()) + return false; + if (hasLinkId()) { + if (!getLinkId().equals(other.getLinkId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getLinkEndpointIdsList().equals(other.getLinkEndpointIdsList())) + return false; + if (hasAttributes() != other.hasAttributes()) + return false; + if (hasAttributes()) { + if (!getAttributes().equals(other.getAttributes())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLinkId()) { + hash = (37 * hash) + LINK_ID_FIELD_NUMBER; + hash = (53 * hash) + getLinkId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getLinkEndpointIdsCount() > 0) { + hash = (37 * hash) + LINK_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getLinkEndpointIdsList().hashCode(); + } + if (hasAttributes()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributes().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Link parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Link parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Link parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Link parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Link parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Link parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Link parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Link parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Link parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Link parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Link parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Link parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Link prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Link} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Link) + context.ContextOuterClass.LinkOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Link_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Link_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Link.class, context.ContextOuterClass.Link.Builder.class); + } + + // 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; + linkIdBuilder_ = null; + } + name_ = ""; + if (linkEndpointIdsBuilder_ == null) { + linkEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + linkEndpointIdsBuilder_.clear(); + } + if (attributesBuilder_ == null) { + attributes_ = null; + } else { + attributes_ = null; + attributesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Link_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Link getDefaultInstanceForType() { + return context.ContextOuterClass.Link.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Link build() { + context.ContextOuterClass.Link result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + if (linkEndpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Link) { + return mergeFrom((context.ContextOuterClass.Link) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Link other) { + if (other == context.ContextOuterClass.Link.getDefaultInstance()) + return this; + if (other.hasLinkId()) { + mergeLinkId(other.getLinkId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (linkEndpointIdsBuilder_ == null) { + if (!other.linkEndpointIds_.isEmpty()) { + if (linkEndpointIds_.isEmpty()) { + linkEndpointIds_ = other.linkEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.addAll(other.linkEndpointIds_); + } + onChanged(); + } + } else { + if (!other.linkEndpointIds_.isEmpty()) { + if (linkEndpointIdsBuilder_.isEmpty()) { + linkEndpointIdsBuilder_.dispose(); + linkEndpointIdsBuilder_ = null; + linkEndpointIds_ = other.linkEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + linkEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkEndpointIdsFieldBuilder() : null; + } else { + linkEndpointIdsBuilder_.addAllMessages(other.linkEndpointIds_); + } + } + } + if (other.hasAttributes()) { + mergeAttributes(other.getAttributes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Link) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.LinkId linkId_; + + private com.google.protobuf.SingleFieldBuilderV3 linkIdBuilder_; + + /** + * .context.LinkId link_id = 1; + * @return Whether the linkId field is set. + */ + public boolean hasLinkId() { + return linkIdBuilder_ != null || linkId_ != null; + } + + /** + * .context.LinkId link_id = 1; + * @return The linkId. + */ + public context.ContextOuterClass.LinkId getLinkId() { + if (linkIdBuilder_ == null) { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } else { + return linkIdBuilder_.getMessage(); + } + } + + /** + * .context.LinkId link_id = 1; + */ + public Builder setLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkId_ = value; + onChanged(); + } else { + linkIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.LinkId link_id = 1; + */ + public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdBuilder_ == null) { + linkId_ = builderForValue.build(); + onChanged(); + } else { + linkIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.LinkId link_id = 1; + */ + public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (linkId_ != null) { + linkId_ = context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); + } else { + linkId_ = value; + } + onChanged(); + } else { + linkIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.LinkId link_id = 1; + */ + public Builder clearLinkId() { + if (linkIdBuilder_ == null) { + linkId_ = null; + onChanged(); + } else { + linkId_ = null; + linkIdBuilder_ = null; + } + return this; + } + + /** + * .context.LinkId link_id = 1; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { + onChanged(); + return getLinkIdFieldBuilder().getBuilder(); + } + + /** + * .context.LinkId link_id = 1; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + if (linkIdBuilder_ != null) { + return linkIdBuilder_.getMessageOrBuilder(); + } else { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + } + + /** + * .context.LinkId link_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getLinkIdFieldBuilder() { + if (linkIdBuilder_ == null) { + linkIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getLinkId(), getParentForChildren(), isClean()); + linkId_ = null; + } + return linkIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.util.List linkEndpointIds_ = java.util.Collections.emptyList(); + + private void ensureLinkEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + linkEndpointIds_ = new java.util.ArrayList(linkEndpointIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 linkEndpointIdsBuilder_; + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public java.util.List getLinkEndpointIdsList() { + if (linkEndpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(linkEndpointIds_); + } else { + return linkEndpointIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public int getLinkEndpointIdsCount() { + if (linkEndpointIdsBuilder_ == null) { + return linkEndpointIds_.size(); + } else { + return linkEndpointIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { + if (linkEndpointIdsBuilder_ == null) { + return linkEndpointIds_.get(index); + } else { + return linkEndpointIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (linkEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.set(index, value); + onChanged(); + } else { + linkEndpointIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder setLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.set(index, builderForValue.build()); + onChanged(); + } else { + linkEndpointIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId value) { + if (linkEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(value); + onChanged(); + } else { + linkEndpointIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (linkEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(index, value); + onChanged(); + } else { + linkEndpointIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(builderForValue.build()); + onChanged(); + } else { + linkEndpointIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder addLinkEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(index, builderForValue.build()); + onChanged(); + } else { + linkEndpointIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder addAllLinkEndpointIds(java.lang.Iterable values) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, linkEndpointIds_); + onChanged(); + } else { + linkEndpointIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder clearLinkEndpointIds() { + if (linkEndpointIdsBuilder_ == null) { + linkEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + linkEndpointIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public Builder removeLinkEndpointIds(int index) { + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.remove(index); + onChanged(); + } else { + linkEndpointIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder getLinkEndpointIdsBuilder(int index) { + return getLinkEndpointIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder(int index) { + if (linkEndpointIdsBuilder_ == null) { + return linkEndpointIds_.get(index); + } else { + return linkEndpointIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public java.util.List getLinkEndpointIdsOrBuilderList() { + if (linkEndpointIdsBuilder_ != null) { + return linkEndpointIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(linkEndpointIds_); + } + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder() { + return getLinkEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder(int index) { + return getLinkEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId link_endpoint_ids = 3; + */ + public java.util.List getLinkEndpointIdsBuilderList() { + return getLinkEndpointIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getLinkEndpointIdsFieldBuilder() { + if (linkEndpointIdsBuilder_ == null) { + linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + linkEndpointIds_ = null; + } + return linkEndpointIdsBuilder_; + } + + private context.ContextOuterClass.LinkAttributes attributes_; + + private com.google.protobuf.SingleFieldBuilderV3 attributesBuilder_; + + /** + * .context.LinkAttributes attributes = 4; + * @return Whether the attributes field is set. + */ + public boolean hasAttributes() { + return attributesBuilder_ != null || attributes_ != null; + } + + /** + * .context.LinkAttributes attributes = 4; + * @return The attributes. + */ + public context.ContextOuterClass.LinkAttributes getAttributes() { + if (attributesBuilder_ == null) { + return attributes_ == null ? context.ContextOuterClass.LinkAttributes.getDefaultInstance() : attributes_; + } else { + return attributesBuilder_.getMessage(); + } + } + + /** + * .context.LinkAttributes attributes = 4; + */ + public Builder setAttributes(context.ContextOuterClass.LinkAttributes value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attributes_ = value; + onChanged(); + } else { + attributesBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.LinkAttributes attributes = 4; + */ + public Builder setAttributes(context.ContextOuterClass.LinkAttributes.Builder builderForValue) { + if (attributesBuilder_ == null) { + attributes_ = builderForValue.build(); + onChanged(); + } else { + attributesBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.LinkAttributes attributes = 4; + */ + public Builder mergeAttributes(context.ContextOuterClass.LinkAttributes value) { + if (attributesBuilder_ == null) { + if (attributes_ != null) { + attributes_ = context.ContextOuterClass.LinkAttributes.newBuilder(attributes_).mergeFrom(value).buildPartial(); + } else { + attributes_ = value; + } + onChanged(); + } else { + attributesBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.LinkAttributes attributes = 4; + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = null; + onChanged(); + } else { + attributes_ = null; + attributesBuilder_ = null; + } + return this; + } + + /** + * .context.LinkAttributes attributes = 4; + */ + public context.ContextOuterClass.LinkAttributes.Builder getAttributesBuilder() { + onChanged(); + return getAttributesFieldBuilder().getBuilder(); + } + + /** + * .context.LinkAttributes attributes = 4; + */ + public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilder(); + } else { + return attributes_ == null ? context.ContextOuterClass.LinkAttributes.getDefaultInstance() : attributes_; + } + } + + /** + * .context.LinkAttributes attributes = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getAttributes(), getParentForChildren(), isClean()); + attributes_ = null; + } + return attributesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Link) + } + + // @@protoc_insertion_point(class_scope:context.Link) + private static final context.ContextOuterClass.Link DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Link(); + } + + public static context.ContextOuterClass.Link getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Link getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.LinkIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.LinkId link_ids = 1; + */ + java.util.List getLinkIdsList(); + + /** + * repeated .context.LinkId link_ids = 1; + */ + context.ContextOuterClass.LinkId getLinkIds(int index); + + /** + * repeated .context.LinkId link_ids = 1; + */ + int getLinkIdsCount(); + + /** + * repeated .context.LinkId link_ids = 1; + */ + java.util.List getLinkIdsOrBuilderList(); + + /** + * repeated .context.LinkId link_ids = 1; + */ + context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.LinkIdList} + */ + public static final class LinkIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.LinkIdList) + LinkIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use LinkIdList.newBuilder() to construct. + private LinkIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkIdList() { + linkIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkIdList.class, context.ContextOuterClass.LinkIdList.Builder.class); + } + + public static final int LINK_IDS_FIELD_NUMBER = 1; + + private java.util.List linkIds_; + + /** + * repeated .context.LinkId link_ids = 1; + */ + @java.lang.Override + public java.util.List getLinkIdsList() { + return linkIds_; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + @java.lang.Override + public java.util.List getLinkIdsOrBuilderList() { + return linkIds_; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + @java.lang.Override + public int getLinkIdsCount() { + return linkIds_.size(); + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkIds(int index) { + return linkIds_.get(index); + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index) { + return linkIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < linkIds_.size(); i++) { + output.writeMessage(1, linkIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < linkIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, linkIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.LinkIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.LinkIdList other = (context.ContextOuterClass.LinkIdList) obj; + if (!getLinkIdsList().equals(other.getLinkIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLinkIdsCount() > 0) { + hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getLinkIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.LinkIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.LinkIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.LinkIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.LinkIdList) + context.ContextOuterClass.LinkIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_LinkIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkIdList.class, context.ContextOuterClass.LinkIdList.Builder.class); + } + + // 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(); + if (linkIdsBuilder_ == null) { + linkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + linkIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_LinkIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.LinkIdList getDefaultInstanceForType() { + return context.ContextOuterClass.LinkIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.LinkIdList build() { + context.ContextOuterClass.LinkIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.LinkIdList buildPartial() { + context.ContextOuterClass.LinkIdList result = new context.ContextOuterClass.LinkIdList(this); + int from_bitField0_ = bitField0_; + if (linkIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + linkIds_ = java.util.Collections.unmodifiableList(linkIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.LinkIdList) { + return mergeFrom((context.ContextOuterClass.LinkIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.LinkIdList other) { + if (other == context.ContextOuterClass.LinkIdList.getDefaultInstance()) + return this; + if (linkIdsBuilder_ == null) { + if (!other.linkIds_.isEmpty()) { + if (linkIds_.isEmpty()) { + linkIds_ = other.linkIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinkIdsIsMutable(); + linkIds_.addAll(other.linkIds_); + } + onChanged(); + } + } else { + if (!other.linkIds_.isEmpty()) { + if (linkIdsBuilder_.isEmpty()) { + linkIdsBuilder_.dispose(); + linkIdsBuilder_ = null; + linkIds_ = other.linkIds_; + bitField0_ = (bitField0_ & ~0x00000001); + linkIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkIdsFieldBuilder() : null; + } else { + linkIdsBuilder_.addAllMessages(other.linkIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.LinkIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List linkIds_ = java.util.Collections.emptyList(); + + private void ensureLinkIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + linkIds_ = new java.util.ArrayList(linkIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 linkIdsBuilder_; + + /** + * repeated .context.LinkId link_ids = 1; + */ + public java.util.List getLinkIdsList() { + if (linkIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(linkIds_); + } else { + return linkIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public int getLinkIdsCount() { + if (linkIdsBuilder_ == null) { + return linkIds_.size(); + } else { + return linkIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public context.ContextOuterClass.LinkId getLinkIds(int index) { + if (linkIdsBuilder_ == null) { + return linkIds_.get(index); + } else { + return linkIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder setLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.set(index, value); + onChanged(); + } else { + linkIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder setLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.set(index, builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder addLinkIds(context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.add(value); + onChanged(); + } else { + linkIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder addLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.add(index, value); + onChanged(); + } else { + linkIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder addLinkIds(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder addLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(index, builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder addAllLinkIds(java.lang.Iterable values) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, linkIds_); + onChanged(); + } else { + linkIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder clearLinkIds() { + if (linkIdsBuilder_ == null) { + linkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + linkIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public Builder removeLinkIds(int index) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.remove(index); + onChanged(); + } else { + linkIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdsBuilder(int index) { + return getLinkIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index) { + if (linkIdsBuilder_ == null) { + return linkIds_.get(index); + } else { + return linkIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public java.util.List getLinkIdsOrBuilderList() { + if (linkIdsBuilder_ != null) { + return linkIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(linkIds_); + } + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder() { + return getLinkIdsFieldBuilder().addBuilder(context.ContextOuterClass.LinkId.getDefaultInstance()); + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder(int index) { + return getLinkIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.LinkId.getDefaultInstance()); + } + + /** + * repeated .context.LinkId link_ids = 1; + */ + public java.util.List getLinkIdsBuilderList() { + return getLinkIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getLinkIdsFieldBuilder() { + if (linkIdsBuilder_ == null) { + linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + linkIds_ = null; + } + return linkIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.LinkIdList) + } + + // @@protoc_insertion_point(class_scope:context.LinkIdList) + private static final context.ContextOuterClass.LinkIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.LinkIdList(); + } + + public static context.ContextOuterClass.LinkIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.LinkIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.LinkList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Link links = 1; + */ + java.util.List getLinksList(); + + /** + * repeated .context.Link links = 1; + */ + context.ContextOuterClass.Link getLinks(int index); + + /** + * repeated .context.Link links = 1; + */ + int getLinksCount(); + + /** + * repeated .context.Link links = 1; + */ + java.util.List getLinksOrBuilderList(); + + /** + * repeated .context.Link links = 1; + */ + context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index); + } + + /** + * Protobuf type {@code context.LinkList} + */ + public static final class LinkList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.LinkList) + LinkListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use LinkList.newBuilder() to construct. + private LinkList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkList() { + links_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkList.class, context.ContextOuterClass.LinkList.Builder.class); + } + + public static final int LINKS_FIELD_NUMBER = 1; + + private java.util.List links_; + + /** + * repeated .context.Link links = 1; + */ + @java.lang.Override + public java.util.List getLinksList() { + return links_; + } + + /** + * repeated .context.Link links = 1; + */ + @java.lang.Override + public java.util.List getLinksOrBuilderList() { + return links_; + } + + /** + * repeated .context.Link links = 1; + */ + @java.lang.Override + public int getLinksCount() { + return links_.size(); + } + + /** + * repeated .context.Link links = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Link getLinks(int index) { + return links_.get(index); + } + + /** + * repeated .context.Link links = 1; + */ + @java.lang.Override + public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index) { + return links_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < links_.size(); i++) { + output.writeMessage(1, links_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < links_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, links_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.LinkList)) { + return super.equals(obj); + } + context.ContextOuterClass.LinkList other = (context.ContextOuterClass.LinkList) obj; + if (!getLinksList().equals(other.getLinksList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLinksCount() > 0) { + hash = (37 * hash) + LINKS_FIELD_NUMBER; + hash = (53 * hash) + getLinksList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.LinkList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.LinkList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.LinkList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.LinkList) + context.ContextOuterClass.LinkListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_LinkList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkList.class, context.ContextOuterClass.LinkList.Builder.class); + } + + // 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(); + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + linksBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_LinkList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.LinkList getDefaultInstanceForType() { + return context.ContextOuterClass.LinkList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.LinkList build() { + context.ContextOuterClass.LinkList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.LinkList buildPartial() { + context.ContextOuterClass.LinkList result = new context.ContextOuterClass.LinkList(this); + int from_bitField0_ = bitField0_; + if (linksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + links_ = java.util.Collections.unmodifiableList(links_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.LinkList) { + return mergeFrom((context.ContextOuterClass.LinkList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.LinkList other) { + if (other == context.ContextOuterClass.LinkList.getDefaultInstance()) + return this; + if (linksBuilder_ == null) { + if (!other.links_.isEmpty()) { + if (links_.isEmpty()) { + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLinksIsMutable(); + links_.addAll(other.links_); + } + onChanged(); + } + } else { + if (!other.links_.isEmpty()) { + if (linksBuilder_.isEmpty()) { + linksBuilder_.dispose(); + linksBuilder_ = null; + links_ = other.links_; + bitField0_ = (bitField0_ & ~0x00000001); + linksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinksFieldBuilder() : null; + } else { + linksBuilder_.addAllMessages(other.links_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.LinkList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List links_ = java.util.Collections.emptyList(); + + private void ensureLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + links_ = new java.util.ArrayList(links_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 linksBuilder_; + + /** + * repeated .context.Link links = 1; + */ + public java.util.List getLinksList() { + if (linksBuilder_ == null) { + return java.util.Collections.unmodifiableList(links_); + } else { + return linksBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Link links = 1; + */ + public int getLinksCount() { + if (linksBuilder_ == null) { + return links_.size(); + } else { + return linksBuilder_.getCount(); + } + } + + /** + * repeated .context.Link links = 1; + */ + public context.ContextOuterClass.Link getLinks(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Link links = 1; + */ + public Builder setLinks(int index, context.ContextOuterClass.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.set(index, value); + onChanged(); + } else { + linksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder setLinks(int index, context.ContextOuterClass.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.set(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder addLinks(context.ContextOuterClass.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(value); + onChanged(); + } else { + linksBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder addLinks(int index, context.ContextOuterClass.Link value) { + if (linksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinksIsMutable(); + links_.add(index, value); + onChanged(); + } else { + linksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder addLinks(context.ContextOuterClass.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder addLinks(int index, context.ContextOuterClass.Link.Builder builderForValue) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(index, builderForValue.build()); + onChanged(); + } else { + linksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder addAllLinks(java.lang.Iterable values) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, links_); + onChanged(); + } else { + linksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder clearLinks() { + if (linksBuilder_ == null) { + links_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + linksBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public Builder removeLinks(int index) { + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.remove(index); + onChanged(); + } else { + linksBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Link links = 1; + */ + public context.ContextOuterClass.Link.Builder getLinksBuilder(int index) { + return getLinksFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Link links = 1; + */ + public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder(int index) { + if (linksBuilder_ == null) { + return links_.get(index); + } else { + return linksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Link links = 1; + */ + public java.util.List getLinksOrBuilderList() { + if (linksBuilder_ != null) { + return linksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(links_); + } + } + + /** + * repeated .context.Link links = 1; + */ + public context.ContextOuterClass.Link.Builder addLinksBuilder() { + return getLinksFieldBuilder().addBuilder(context.ContextOuterClass.Link.getDefaultInstance()); + } + + /** + * repeated .context.Link links = 1; + */ + public context.ContextOuterClass.Link.Builder addLinksBuilder(int index) { + return getLinksFieldBuilder().addBuilder(index, context.ContextOuterClass.Link.getDefaultInstance()); + } + + /** + * repeated .context.Link links = 1; + */ + public java.util.List getLinksBuilderList() { + return getLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getLinksFieldBuilder() { + if (linksBuilder_ == null) { + linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(links_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + links_ = null; + } + return linksBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.LinkList) + } + + // @@protoc_insertion_point(class_scope:context.LinkList) + private static final context.ContextOuterClass.LinkList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.LinkList(); + } + + public static context.ContextOuterClass.LinkList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.LinkList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LinkEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.LinkEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.LinkId link_id = 2; + * @return Whether the linkId field is set. + */ + boolean hasLinkId(); + + /** + * .context.LinkId link_id = 2; + * @return The linkId. + */ + context.ContextOuterClass.LinkId getLinkId(); + + /** + * .context.LinkId link_id = 2; + */ + context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder(); + } + + /** + * Protobuf type {@code context.LinkEvent} + */ + public static final class LinkEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.LinkEvent) + LinkEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use LinkEvent.newBuilder() to construct. + private LinkEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LinkEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkEvent.class, context.ContextOuterClass.LinkEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int LINK_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.LinkId linkId_; + + /** + * .context.LinkId link_id = 2; + * @return Whether the linkId field is set. + */ + @java.lang.Override + public boolean hasLinkId() { + return linkId_ != null; + } + + /** + * .context.LinkId link_id = 2; + * @return The linkId. + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkId() { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + + /** + * .context.LinkId link_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + return getLinkId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (linkId_ != null) { + output.writeMessage(2, getLinkId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (linkId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLinkId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.LinkEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.LinkEvent other = (context.ContextOuterClass.LinkEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasLinkId() != other.hasLinkId()) + return false; + if (hasLinkId()) { + if (!getLinkId().equals(other.getLinkId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasLinkId()) { + hash = (37 * hash) + LINK_ID_FIELD_NUMBER; + hash = (53 * hash) + getLinkId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.LinkEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.LinkEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.LinkEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.LinkEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.LinkEvent) + context.ContextOuterClass.LinkEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_LinkEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_LinkEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.LinkEvent.class, context.ContextOuterClass.LinkEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (linkIdBuilder_ == null) { + linkId_ = null; + } else { + linkId_ = null; + linkIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_LinkEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.LinkEvent getDefaultInstanceForType() { + return context.ContextOuterClass.LinkEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.LinkEvent build() { + context.ContextOuterClass.LinkEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.LinkEvent) { + return mergeFrom((context.ContextOuterClass.LinkEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.LinkEvent other) { + if (other == context.ContextOuterClass.LinkEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasLinkId()) { + mergeLinkId(other.getLinkId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.LinkEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.LinkId linkId_; + + private com.google.protobuf.SingleFieldBuilderV3 linkIdBuilder_; + + /** + * .context.LinkId link_id = 2; + * @return Whether the linkId field is set. + */ + public boolean hasLinkId() { + return linkIdBuilder_ != null || linkId_ != null; + } + + /** + * .context.LinkId link_id = 2; + * @return The linkId. + */ + public context.ContextOuterClass.LinkId getLinkId() { + if (linkIdBuilder_ == null) { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } else { + return linkIdBuilder_.getMessage(); + } + } + + /** + * .context.LinkId link_id = 2; + */ + public Builder setLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkId_ = value; + onChanged(); + } else { + linkIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.LinkId link_id = 2; + */ + public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdBuilder_ == null) { + linkId_ = builderForValue.build(); + onChanged(); + } else { + linkIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.LinkId link_id = 2; + */ + public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (linkId_ != null) { + linkId_ = context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); + } else { + linkId_ = value; + } + onChanged(); + } else { + linkIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.LinkId link_id = 2; + */ + public Builder clearLinkId() { + if (linkIdBuilder_ == null) { + linkId_ = null; + onChanged(); + } else { + linkId_ = null; + linkIdBuilder_ = null; + } + return this; + } + + /** + * .context.LinkId link_id = 2; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { + onChanged(); + return getLinkIdFieldBuilder().getBuilder(); + } + + /** + * .context.LinkId link_id = 2; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + if (linkIdBuilder_ != null) { + return linkIdBuilder_.getMessageOrBuilder(); + } else { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + } + + /** + * .context.LinkId link_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getLinkIdFieldBuilder() { + if (linkIdBuilder_ == null) { + linkIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getLinkId(), getParentForChildren(), isClean()); + linkId_ = null; + } + return linkIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.LinkEvent) + } + + // @@protoc_insertion_point(class_scope:context.LinkEvent) + private static final context.ContextOuterClass.LinkEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.LinkEvent(); + } + + public static context.ContextOuterClass.LinkEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.LinkEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); + + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + + /** + * .context.Uuid service_uuid = 2; + * @return Whether the serviceUuid field is set. + */ + boolean hasServiceUuid(); + + /** + * .context.Uuid service_uuid = 2; + * @return The serviceUuid. + */ + context.ContextOuterClass.Uuid getServiceUuid(); + + /** + * .context.Uuid service_uuid = 2; + */ + context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder(); + } + + /** + *
+     * ----- Service -------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.ServiceId} + */ + public static final class ServiceId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceId) + ServiceIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceId.newBuilder() to construct. + private ServiceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceId.class, context.ContextOuterClass.ServiceId.Builder.class); + } + + public static final int CONTEXT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ContextId contextId_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } + + public static final int SERVICE_UUID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.Uuid serviceUuid_; + + /** + * .context.Uuid service_uuid = 2; + * @return Whether the serviceUuid field is set. + */ + @java.lang.Override + public boolean hasServiceUuid() { + return serviceUuid_ != null; + } + + /** + * .context.Uuid service_uuid = 2; + * @return The serviceUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getServiceUuid() { + return serviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; + } + + /** + * .context.Uuid service_uuid = 2; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder() { + return getServiceUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (serviceUuid_ != null) { + output.writeMessage(2, getServiceUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (serviceUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceId)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceId other = (context.ContextOuterClass.ServiceId) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (hasServiceUuid() != other.hasServiceUuid()) + return false; + if (hasServiceUuid()) { + if (!getServiceUuid().equals(other.getServiceUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + if (hasServiceUuid()) { + hash = (37 * hash) + SERVICE_UUID_FIELD_NUMBER; + hash = (53 * hash) + getServiceUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Service -------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.ServiceId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceId) + context.ContextOuterClass.ServiceIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceId.class, context.ContextOuterClass.ServiceId.Builder.class); + } + + // 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; + contextIdBuilder_ = null; + } + if (serviceUuidBuilder_ == null) { + serviceUuid_ = null; + } else { + serviceUuid_ = null; + serviceUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceId getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceId build() { + context.ContextOuterClass.ServiceId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceId) { + return mergeFrom((context.ContextOuterClass.ServiceId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceId other) { + if (other == context.ContextOuterClass.ServiceId.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (other.hasServiceUuid()) { + mergeServiceUuid(other.getServiceUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.ContextId contextId_; + + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } + + /** + * .context.ContextId context_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } + + private context.ContextOuterClass.Uuid serviceUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceUuidBuilder_; + + /** + * .context.Uuid service_uuid = 2; + * @return Whether the serviceUuid field is set. + */ + public boolean hasServiceUuid() { + return serviceUuidBuilder_ != null || serviceUuid_ != null; + } + + /** + * .context.Uuid service_uuid = 2; + * @return The serviceUuid. + */ + public context.ContextOuterClass.Uuid getServiceUuid() { + if (serviceUuidBuilder_ == null) { + return serviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; + } else { + return serviceUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid service_uuid = 2; + */ + public Builder setServiceUuid(context.ContextOuterClass.Uuid value) { + if (serviceUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceUuid_ = value; + onChanged(); + } else { + serviceUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid service_uuid = 2; + */ + public Builder setServiceUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (serviceUuidBuilder_ == null) { + serviceUuid_ = builderForValue.build(); + onChanged(); + } else { + serviceUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid service_uuid = 2; + */ + public Builder mergeServiceUuid(context.ContextOuterClass.Uuid value) { + if (serviceUuidBuilder_ == null) { + if (serviceUuid_ != null) { + serviceUuid_ = context.ContextOuterClass.Uuid.newBuilder(serviceUuid_).mergeFrom(value).buildPartial(); + } else { + serviceUuid_ = value; + } + onChanged(); + } else { + serviceUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid service_uuid = 2; + */ + public Builder clearServiceUuid() { + if (serviceUuidBuilder_ == null) { + serviceUuid_ = null; + onChanged(); + } else { + serviceUuid_ = null; + serviceUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid service_uuid = 2; + */ + public context.ContextOuterClass.Uuid.Builder getServiceUuidBuilder() { + onChanged(); + return getServiceUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid service_uuid = 2; + */ + public context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder() { + if (serviceUuidBuilder_ != null) { + return serviceUuidBuilder_.getMessageOrBuilder(); + } else { + return serviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; + } + } + + /** + * .context.Uuid service_uuid = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceUuidFieldBuilder() { + if (serviceUuidBuilder_ == null) { + serviceUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceUuid(), getParentForChildren(), isClean()); + serviceUuid_ = null; + } + return serviceUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceId) + } + + // @@protoc_insertion_point(class_scope:context.ServiceId) + private static final context.ContextOuterClass.ServiceId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceId(); + } + + public static context.ContextOuterClass.ServiceId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Service) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ServiceId service_id = 1; + * @return Whether the serviceId field is set. + */ + boolean hasServiceId(); + + /** + * .context.ServiceId service_id = 1; + * @return The serviceId. + */ + context.ContextOuterClass.ServiceId getServiceId(); + + /** + * .context.ServiceId service_id = 1; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return The enum numeric value on the wire for serviceType. + */ + int getServiceTypeValue(); + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return The serviceType. + */ + context.ContextOuterClass.ServiceTypeEnum getServiceType(); + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + java.util.List getServiceEndpointIdsList(); + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + context.ContextOuterClass.EndPointId getServiceEndpointIds(int index); + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + int getServiceEndpointIdsCount(); + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + java.util.List getServiceEndpointIdsOrBuilderList(); + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + context.ContextOuterClass.EndPointIdOrBuilder getServiceEndpointIdsOrBuilder(int index); + + /** + * repeated .context.Constraint service_constraints = 5; + */ + java.util.List getServiceConstraintsList(); + + /** + * repeated .context.Constraint service_constraints = 5; + */ + context.ContextOuterClass.Constraint getServiceConstraints(int index); + + /** + * repeated .context.Constraint service_constraints = 5; + */ + int getServiceConstraintsCount(); + + /** + * repeated .context.Constraint service_constraints = 5; + */ + java.util.List getServiceConstraintsOrBuilderList(); + + /** + * repeated .context.Constraint service_constraints = 5; + */ + context.ContextOuterClass.ConstraintOrBuilder getServiceConstraintsOrBuilder(int index); + + /** + * .context.ServiceStatus service_status = 6; + * @return Whether the serviceStatus field is set. + */ + boolean hasServiceStatus(); + + /** + * .context.ServiceStatus service_status = 6; + * @return The serviceStatus. + */ + context.ContextOuterClass.ServiceStatus getServiceStatus(); + + /** + * .context.ServiceStatus service_status = 6; + */ + context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder(); + + /** + * .context.ServiceConfig service_config = 7; + * @return Whether the serviceConfig field is set. + */ + boolean hasServiceConfig(); + + /** + * .context.ServiceConfig service_config = 7; + * @return The serviceConfig. + */ + context.ContextOuterClass.ServiceConfig getServiceConfig(); + + /** + * .context.ServiceConfig service_config = 7; + */ + context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder(); + + /** + * .context.Timestamp timestamp = 8; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + + /** + * .context.Timestamp timestamp = 8; + * @return The timestamp. + */ + context.ContextOuterClass.Timestamp getTimestamp(); + + /** + * .context.Timestamp timestamp = 8; + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + } + + /** + * Protobuf type {@code context.Service} + */ + public static final class Service extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Service) + ServiceOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Service.newBuilder() to construct. + private Service(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Service() { + name_ = ""; + serviceType_ = 0; + serviceEndpointIds_ = java.util.Collections.emptyList(); + serviceConstraints_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Service_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Service.class, context.ContextOuterClass.Service.Builder.class); + } + + public static final int SERVICE_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ServiceId serviceId_; + + /** + * .context.ServiceId service_id = 1; + * @return Whether the serviceId field is set. + */ + @java.lang.Override + public boolean hasServiceId() { + return serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 1; + * @return The serviceId. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceId() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + + /** + * .context.ServiceId service_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + return getServiceId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_TYPE_FIELD_NUMBER = 3; + + private int serviceType_; + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return The enum numeric value on the wire for serviceType. + */ + @java.lang.Override + public int getServiceTypeValue() { + return serviceType_; + } + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return The serviceType. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceTypeEnum getServiceType() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.valueOf(serviceType_); + return result == null ? context.ContextOuterClass.ServiceTypeEnum.UNRECOGNIZED : result; + } + + public static final int SERVICE_ENDPOINT_IDS_FIELD_NUMBER = 4; + + private java.util.List serviceEndpointIds_; + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + @java.lang.Override + public java.util.List getServiceEndpointIdsList() { + return serviceEndpointIds_; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + @java.lang.Override + public java.util.List getServiceEndpointIdsOrBuilderList() { + return serviceEndpointIds_; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + @java.lang.Override + public int getServiceEndpointIdsCount() { + return serviceEndpointIds_.size(); + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getServiceEndpointIds(int index) { + return serviceEndpointIds_.get(index); + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getServiceEndpointIdsOrBuilder(int index) { + return serviceEndpointIds_.get(index); + } + + public static final int SERVICE_CONSTRAINTS_FIELD_NUMBER = 5; + + private java.util.List serviceConstraints_; + + /** + * repeated .context.Constraint service_constraints = 5; + */ + @java.lang.Override + public java.util.List getServiceConstraintsList() { + return serviceConstraints_; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + @java.lang.Override + public java.util.List getServiceConstraintsOrBuilderList() { + return serviceConstraints_; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + @java.lang.Override + public int getServiceConstraintsCount() { + return serviceConstraints_.size(); + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint getServiceConstraints(int index) { + return serviceConstraints_.get(index); + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + @java.lang.Override + public context.ContextOuterClass.ConstraintOrBuilder getServiceConstraintsOrBuilder(int index) { + return serviceConstraints_.get(index); + } + + public static final int SERVICE_STATUS_FIELD_NUMBER = 6; + + private context.ContextOuterClass.ServiceStatus serviceStatus_; + + /** + * .context.ServiceStatus service_status = 6; + * @return Whether the serviceStatus field is set. + */ + @java.lang.Override + public boolean hasServiceStatus() { + return serviceStatus_ != null; + } + + /** + * .context.ServiceStatus service_status = 6; + * @return The serviceStatus. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceStatus getServiceStatus() { + return serviceStatus_ == null ? context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; + } + + /** + * .context.ServiceStatus service_status = 6; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder() { + return getServiceStatus(); + } + + public static final int SERVICE_CONFIG_FIELD_NUMBER = 7; + + private context.ContextOuterClass.ServiceConfig serviceConfig_; + + /** + * .context.ServiceConfig service_config = 7; + * @return Whether the serviceConfig field is set. + */ + @java.lang.Override + public boolean hasServiceConfig() { + return serviceConfig_ != null; + } + + /** + * .context.ServiceConfig service_config = 7; + * @return The serviceConfig. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceConfig getServiceConfig() { + return serviceConfig_ == null ? context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; + } + + /** + * .context.ServiceConfig service_config = 7; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder() { + return getServiceConfig(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 8; + + private context.ContextOuterClass.Timestamp timestamp_; + + /** + * .context.Timestamp timestamp = 8; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 8; + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + + /** + * .context.Timestamp timestamp = 8; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (serviceId_ != null) { + output.writeMessage(1, getServiceId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (serviceType_ != context.ContextOuterClass.ServiceTypeEnum.SERVICETYPE_UNKNOWN.getNumber()) { + output.writeEnum(3, serviceType_); + } + for (int i = 0; i < serviceEndpointIds_.size(); i++) { + output.writeMessage(4, serviceEndpointIds_.get(i)); + } + for (int i = 0; i < serviceConstraints_.size(); i++) { + output.writeMessage(5, serviceConstraints_.get(i)); + } + if (serviceStatus_ != null) { + output.writeMessage(6, getServiceStatus()); + } + if (serviceConfig_ != null) { + output.writeMessage(7, getServiceConfig()); + } + if (timestamp_ != null) { + output.writeMessage(8, getTimestamp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (serviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getServiceId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (serviceType_ != context.ContextOuterClass.ServiceTypeEnum.SERVICETYPE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, serviceType_); + } + for (int i = 0; i < serviceEndpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, serviceEndpointIds_.get(i)); + } + for (int i = 0; i < serviceConstraints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, serviceConstraints_.get(i)); + } + if (serviceStatus_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getServiceStatus()); + } + if (serviceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getServiceConfig()); + } + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getTimestamp()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Service)) { + return super.equals(obj); + } + context.ContextOuterClass.Service other = (context.ContextOuterClass.Service) obj; + if (hasServiceId() != other.hasServiceId()) + return false; + if (hasServiceId()) { + if (!getServiceId().equals(other.getServiceId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (serviceType_ != other.serviceType_) + return false; + if (!getServiceEndpointIdsList().equals(other.getServiceEndpointIdsList())) + return false; + if (!getServiceConstraintsList().equals(other.getServiceConstraintsList())) + return false; + if (hasServiceStatus() != other.hasServiceStatus()) + return false; + if (hasServiceStatus()) { + if (!getServiceStatus().equals(other.getServiceStatus())) + return false; + } + if (hasServiceConfig() != other.hasServiceConfig()) + return false; + if (hasServiceConfig()) { + if (!getServiceConfig().equals(other.getServiceConfig())) + return false; + } + if (hasTimestamp() != other.hasTimestamp()) + return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasServiceId()) { + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SERVICE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + serviceType_; + if (getServiceEndpointIdsCount() > 0) { + hash = (37 * hash) + SERVICE_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getServiceEndpointIdsList().hashCode(); + } + if (getServiceConstraintsCount() > 0) { + hash = (37 * hash) + SERVICE_CONSTRAINTS_FIELD_NUMBER; + hash = (53 * hash) + getServiceConstraintsList().hashCode(); + } + if (hasServiceStatus()) { + hash = (37 * hash) + SERVICE_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getServiceStatus().hashCode(); + } + if (hasServiceConfig()) { + hash = (37 * hash) + SERVICE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServiceConfig().hashCode(); + } + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Service parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Service parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Service parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Service parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Service parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Service parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Service parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Service parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Service parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Service parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Service parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Service parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Service prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Service} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Service) + context.ContextOuterClass.ServiceOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Service_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Service_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Service.class, context.ContextOuterClass.Service.Builder.class); + } + + // 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; + serviceIdBuilder_ = null; + } + name_ = ""; + serviceType_ = 0; + if (serviceEndpointIdsBuilder_ == null) { + serviceEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + serviceEndpointIdsBuilder_.clear(); + } + if (serviceConstraintsBuilder_ == null) { + serviceConstraints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + serviceConstraintsBuilder_.clear(); + } + if (serviceStatusBuilder_ == null) { + serviceStatus_ = null; + } else { + serviceStatus_ = null; + serviceStatusBuilder_ = null; + } + if (serviceConfigBuilder_ == null) { + serviceConfig_ = null; + } else { + serviceConfig_ = null; + serviceConfigBuilder_ = null; + } + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Service_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Service getDefaultInstanceForType() { + return context.ContextOuterClass.Service.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Service build() { + context.ContextOuterClass.Service result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + result.serviceType_ = serviceType_; + if (serviceEndpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + serviceEndpointIds_ = java.util.Collections.unmodifiableList(serviceEndpointIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.serviceEndpointIds_ = serviceEndpointIds_; + } else { + result.serviceEndpointIds_ = serviceEndpointIdsBuilder_.build(); + } + if (serviceConstraintsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + serviceConstraints_ = java.util.Collections.unmodifiableList(serviceConstraints_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.serviceConstraints_ = serviceConstraints_; + } else { + result.serviceConstraints_ = serviceConstraintsBuilder_.build(); + } + if (serviceStatusBuilder_ == null) { + result.serviceStatus_ = serviceStatus_; + } else { + result.serviceStatus_ = serviceStatusBuilder_.build(); + } + if (serviceConfigBuilder_ == null) { + result.serviceConfig_ = serviceConfig_; + } else { + result.serviceConfig_ = serviceConfigBuilder_.build(); + } + if (timestampBuilder_ == null) { + result.timestamp_ = timestamp_; + } else { + result.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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Service) { + return mergeFrom((context.ContextOuterClass.Service) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Service other) { + if (other == context.ContextOuterClass.Service.getDefaultInstance()) + return this; + if (other.hasServiceId()) { + mergeServiceId(other.getServiceId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.serviceType_ != 0) { + setServiceTypeValue(other.getServiceTypeValue()); + } + if (serviceEndpointIdsBuilder_ == null) { + if (!other.serviceEndpointIds_.isEmpty()) { + if (serviceEndpointIds_.isEmpty()) { + serviceEndpointIds_ = other.serviceEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.addAll(other.serviceEndpointIds_); + } + onChanged(); + } + } else { + if (!other.serviceEndpointIds_.isEmpty()) { + if (serviceEndpointIdsBuilder_.isEmpty()) { + serviceEndpointIdsBuilder_.dispose(); + serviceEndpointIdsBuilder_ = null; + serviceEndpointIds_ = other.serviceEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + serviceEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceEndpointIdsFieldBuilder() : null; + } else { + serviceEndpointIdsBuilder_.addAllMessages(other.serviceEndpointIds_); + } + } + } + if (serviceConstraintsBuilder_ == null) { + if (!other.serviceConstraints_.isEmpty()) { + if (serviceConstraints_.isEmpty()) { + serviceConstraints_ = other.serviceConstraints_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureServiceConstraintsIsMutable(); + serviceConstraints_.addAll(other.serviceConstraints_); + } + onChanged(); + } + } else { + if (!other.serviceConstraints_.isEmpty()) { + if (serviceConstraintsBuilder_.isEmpty()) { + serviceConstraintsBuilder_.dispose(); + serviceConstraintsBuilder_ = null; + serviceConstraints_ = other.serviceConstraints_; + bitField0_ = (bitField0_ & ~0x00000002); + serviceConstraintsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceConstraintsFieldBuilder() : null; + } else { + serviceConstraintsBuilder_.addAllMessages(other.serviceConstraints_); + } + } + } + if (other.hasServiceStatus()) { + mergeServiceStatus(other.getServiceStatus()); + } + if (other.hasServiceConfig()) { + mergeServiceConfig(other.getServiceConfig()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Service) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.ServiceId serviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceIdBuilder_; + + /** + * .context.ServiceId service_id = 1; + * @return Whether the serviceId field is set. + */ + public boolean hasServiceId() { + return serviceIdBuilder_ != null || serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 1; + * @return The serviceId. + */ + public context.ContextOuterClass.ServiceId getServiceId() { + if (serviceIdBuilder_ == null) { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } else { + return serviceIdBuilder_.getMessage(); + } + } + + /** + * .context.ServiceId service_id = 1; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceId_ = value; + onChanged(); + } else { + serviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 1; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdBuilder_ == null) { + serviceId_ = builderForValue.build(); + onChanged(); + } else { + serviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceId service_id = 1; + */ + public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (serviceId_ != null) { + serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + } else { + serviceId_ = value; + } + onChanged(); + } else { + serviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 1; + */ + public Builder clearServiceId() { + if (serviceIdBuilder_ == null) { + serviceId_ = null; + onChanged(); + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceId service_id = 1; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + onChanged(); + return getServiceIdFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceId service_id = 1; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + if (serviceIdBuilder_ != null) { + return serviceIdBuilder_.getMessageOrBuilder(); + } else { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + } + + /** + * .context.ServiceId service_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdFieldBuilder() { + if (serviceIdBuilder_ == null) { + serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceId(), getParentForChildren(), isClean()); + serviceId_ = null; + } + return serviceIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private int serviceType_ = 0; + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return The enum numeric value on the wire for serviceType. + */ + @java.lang.Override + public int getServiceTypeValue() { + return serviceType_; + } + + /** + * .context.ServiceTypeEnum service_type = 3; + * @param value The enum numeric value on the wire for serviceType to set. + * @return This builder for chaining. + */ + public Builder setServiceTypeValue(int value) { + serviceType_ = value; + onChanged(); + return this; + } + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return The serviceType. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceTypeEnum getServiceType() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.valueOf(serviceType_); + return result == null ? context.ContextOuterClass.ServiceTypeEnum.UNRECOGNIZED : result; + } + + /** + * .context.ServiceTypeEnum service_type = 3; + * @param value The serviceType to set. + * @return This builder for chaining. + */ + public Builder setServiceType(context.ContextOuterClass.ServiceTypeEnum value) { + if (value == null) { + throw new NullPointerException(); + } + serviceType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.ServiceTypeEnum service_type = 3; + * @return This builder for chaining. + */ + public Builder clearServiceType() { + serviceType_ = 0; + onChanged(); + return this; + } + + private java.util.List serviceEndpointIds_ = java.util.Collections.emptyList(); + + private void ensureServiceEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + serviceEndpointIds_ = new java.util.ArrayList(serviceEndpointIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 serviceEndpointIdsBuilder_; + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public java.util.List getServiceEndpointIdsList() { + if (serviceEndpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceEndpointIds_); + } else { + return serviceEndpointIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public int getServiceEndpointIdsCount() { + if (serviceEndpointIdsBuilder_ == null) { + return serviceEndpointIds_.size(); + } else { + return serviceEndpointIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public context.ContextOuterClass.EndPointId getServiceEndpointIds(int index) { + if (serviceEndpointIdsBuilder_ == null) { + return serviceEndpointIds_.get(index); + } else { + return serviceEndpointIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder setServiceEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (serviceEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.set(index, value); + onChanged(); + } else { + serviceEndpointIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder setServiceEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (serviceEndpointIdsBuilder_ == null) { + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceEndpointIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder addServiceEndpointIds(context.ContextOuterClass.EndPointId value) { + if (serviceEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.add(value); + onChanged(); + } else { + serviceEndpointIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder addServiceEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (serviceEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.add(index, value); + onChanged(); + } else { + serviceEndpointIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder addServiceEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (serviceEndpointIdsBuilder_ == null) { + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.add(builderForValue.build()); + onChanged(); + } else { + serviceEndpointIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder addServiceEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (serviceEndpointIdsBuilder_ == null) { + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceEndpointIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder addAllServiceEndpointIds(java.lang.Iterable values) { + if (serviceEndpointIdsBuilder_ == null) { + ensureServiceEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceEndpointIds_); + onChanged(); + } else { + serviceEndpointIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder clearServiceEndpointIds() { + if (serviceEndpointIdsBuilder_ == null) { + serviceEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + serviceEndpointIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public Builder removeServiceEndpointIds(int index) { + if (serviceEndpointIdsBuilder_ == null) { + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.remove(index); + onChanged(); + } else { + serviceEndpointIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public context.ContextOuterClass.EndPointId.Builder getServiceEndpointIdsBuilder(int index) { + return getServiceEndpointIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getServiceEndpointIdsOrBuilder(int index) { + if (serviceEndpointIdsBuilder_ == null) { + return serviceEndpointIds_.get(index); + } else { + return serviceEndpointIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public java.util.List getServiceEndpointIdsOrBuilderList() { + if (serviceEndpointIdsBuilder_ != null) { + return serviceEndpointIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceEndpointIds_); + } + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public context.ContextOuterClass.EndPointId.Builder addServiceEndpointIdsBuilder() { + return getServiceEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public context.ContextOuterClass.EndPointId.Builder addServiceEndpointIdsBuilder(int index) { + return getServiceEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId service_endpoint_ids = 4; + */ + public java.util.List getServiceEndpointIdsBuilderList() { + return getServiceEndpointIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getServiceEndpointIdsFieldBuilder() { + if (serviceEndpointIdsBuilder_ == null) { + serviceEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + serviceEndpointIds_ = null; + } + return serviceEndpointIdsBuilder_; + } + + private java.util.List serviceConstraints_ = java.util.Collections.emptyList(); + + private void ensureServiceConstraintsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + serviceConstraints_ = new java.util.ArrayList(serviceConstraints_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 serviceConstraintsBuilder_; + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public java.util.List getServiceConstraintsList() { + if (serviceConstraintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceConstraints_); + } else { + return serviceConstraintsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public int getServiceConstraintsCount() { + if (serviceConstraintsBuilder_ == null) { + return serviceConstraints_.size(); + } else { + return serviceConstraintsBuilder_.getCount(); + } + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public context.ContextOuterClass.Constraint getServiceConstraints(int index) { + if (serviceConstraintsBuilder_ == null) { + return serviceConstraints_.get(index); + } else { + return serviceConstraintsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder setServiceConstraints(int index, context.ContextOuterClass.Constraint value) { + if (serviceConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceConstraintsIsMutable(); + serviceConstraints_.set(index, value); + onChanged(); + } else { + serviceConstraintsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder setServiceConstraints(int index, context.ContextOuterClass.Constraint.Builder builderForValue) { + if (serviceConstraintsBuilder_ == null) { + ensureServiceConstraintsIsMutable(); + serviceConstraints_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceConstraintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder addServiceConstraints(context.ContextOuterClass.Constraint value) { + if (serviceConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceConstraintsIsMutable(); + serviceConstraints_.add(value); + onChanged(); + } else { + serviceConstraintsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder addServiceConstraints(int index, context.ContextOuterClass.Constraint value) { + if (serviceConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceConstraintsIsMutable(); + serviceConstraints_.add(index, value); + onChanged(); + } else { + serviceConstraintsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder addServiceConstraints(context.ContextOuterClass.Constraint.Builder builderForValue) { + if (serviceConstraintsBuilder_ == null) { + ensureServiceConstraintsIsMutable(); + serviceConstraints_.add(builderForValue.build()); + onChanged(); + } else { + serviceConstraintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder addServiceConstraints(int index, context.ContextOuterClass.Constraint.Builder builderForValue) { + if (serviceConstraintsBuilder_ == null) { + ensureServiceConstraintsIsMutable(); + serviceConstraints_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceConstraintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder addAllServiceConstraints(java.lang.Iterable values) { + if (serviceConstraintsBuilder_ == null) { + ensureServiceConstraintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceConstraints_); + onChanged(); + } else { + serviceConstraintsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder clearServiceConstraints() { + if (serviceConstraintsBuilder_ == null) { + serviceConstraints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + serviceConstraintsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public Builder removeServiceConstraints(int index) { + if (serviceConstraintsBuilder_ == null) { + ensureServiceConstraintsIsMutable(); + serviceConstraints_.remove(index); + onChanged(); + } else { + serviceConstraintsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public context.ContextOuterClass.Constraint.Builder getServiceConstraintsBuilder(int index) { + return getServiceConstraintsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public context.ContextOuterClass.ConstraintOrBuilder getServiceConstraintsOrBuilder(int index) { + if (serviceConstraintsBuilder_ == null) { + return serviceConstraints_.get(index); + } else { + return serviceConstraintsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public java.util.List getServiceConstraintsOrBuilderList() { + if (serviceConstraintsBuilder_ != null) { + return serviceConstraintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceConstraints_); + } + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public context.ContextOuterClass.Constraint.Builder addServiceConstraintsBuilder() { + return getServiceConstraintsFieldBuilder().addBuilder(context.ContextOuterClass.Constraint.getDefaultInstance()); + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public context.ContextOuterClass.Constraint.Builder addServiceConstraintsBuilder(int index) { + return getServiceConstraintsFieldBuilder().addBuilder(index, context.ContextOuterClass.Constraint.getDefaultInstance()); + } + + /** + * repeated .context.Constraint service_constraints = 5; + */ + public java.util.List getServiceConstraintsBuilderList() { + return getServiceConstraintsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getServiceConstraintsFieldBuilder() { + if (serviceConstraintsBuilder_ == null) { + serviceConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceConstraints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + serviceConstraints_ = null; + } + return serviceConstraintsBuilder_; + } + + private context.ContextOuterClass.ServiceStatus serviceStatus_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceStatusBuilder_; + + /** + * .context.ServiceStatus service_status = 6; + * @return Whether the serviceStatus field is set. + */ + public boolean hasServiceStatus() { + return serviceStatusBuilder_ != null || serviceStatus_ != null; + } + + /** + * .context.ServiceStatus service_status = 6; + * @return The serviceStatus. + */ + public context.ContextOuterClass.ServiceStatus getServiceStatus() { + if (serviceStatusBuilder_ == null) { + return serviceStatus_ == null ? context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; + } else { + return serviceStatusBuilder_.getMessage(); + } + } + + /** + * .context.ServiceStatus service_status = 6; + */ + public Builder setServiceStatus(context.ContextOuterClass.ServiceStatus value) { + if (serviceStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceStatus_ = value; + onChanged(); + } else { + serviceStatusBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceStatus service_status = 6; + */ + public Builder setServiceStatus(context.ContextOuterClass.ServiceStatus.Builder builderForValue) { + if (serviceStatusBuilder_ == null) { + serviceStatus_ = builderForValue.build(); + onChanged(); + } else { + serviceStatusBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceStatus service_status = 6; + */ + public Builder mergeServiceStatus(context.ContextOuterClass.ServiceStatus value) { + if (serviceStatusBuilder_ == null) { + if (serviceStatus_ != null) { + serviceStatus_ = context.ContextOuterClass.ServiceStatus.newBuilder(serviceStatus_).mergeFrom(value).buildPartial(); + } else { + serviceStatus_ = value; + } + onChanged(); + } else { + serviceStatusBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceStatus service_status = 6; + */ + public Builder clearServiceStatus() { + if (serviceStatusBuilder_ == null) { + serviceStatus_ = null; + onChanged(); + } else { + serviceStatus_ = null; + serviceStatusBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceStatus service_status = 6; + */ + public context.ContextOuterClass.ServiceStatus.Builder getServiceStatusBuilder() { + onChanged(); + return getServiceStatusFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceStatus service_status = 6; + */ + public context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder() { + if (serviceStatusBuilder_ != null) { + return serviceStatusBuilder_.getMessageOrBuilder(); + } else { + return serviceStatus_ == null ? context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; + } + } + + /** + * .context.ServiceStatus service_status = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceStatusFieldBuilder() { + if (serviceStatusBuilder_ == null) { + serviceStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceStatus(), getParentForChildren(), isClean()); + serviceStatus_ = null; + } + return serviceStatusBuilder_; + } + + private context.ContextOuterClass.ServiceConfig serviceConfig_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceConfigBuilder_; + + /** + * .context.ServiceConfig service_config = 7; + * @return Whether the serviceConfig field is set. + */ + public boolean hasServiceConfig() { + return serviceConfigBuilder_ != null || serviceConfig_ != null; + } + + /** + * .context.ServiceConfig service_config = 7; + * @return The serviceConfig. + */ + public context.ContextOuterClass.ServiceConfig getServiceConfig() { + if (serviceConfigBuilder_ == null) { + return serviceConfig_ == null ? context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; + } else { + return serviceConfigBuilder_.getMessage(); + } + } + + /** + * .context.ServiceConfig service_config = 7; + */ + public Builder setServiceConfig(context.ContextOuterClass.ServiceConfig value) { + if (serviceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceConfig_ = value; + onChanged(); + } else { + serviceConfigBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceConfig service_config = 7; + */ + public Builder setServiceConfig(context.ContextOuterClass.ServiceConfig.Builder builderForValue) { + if (serviceConfigBuilder_ == null) { + serviceConfig_ = builderForValue.build(); + onChanged(); + } else { + serviceConfigBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceConfig service_config = 7; + */ + public Builder mergeServiceConfig(context.ContextOuterClass.ServiceConfig value) { + if (serviceConfigBuilder_ == null) { + if (serviceConfig_ != null) { + serviceConfig_ = context.ContextOuterClass.ServiceConfig.newBuilder(serviceConfig_).mergeFrom(value).buildPartial(); + } else { + serviceConfig_ = value; + } + onChanged(); + } else { + serviceConfigBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceConfig service_config = 7; + */ + public Builder clearServiceConfig() { + if (serviceConfigBuilder_ == null) { + serviceConfig_ = null; + onChanged(); + } else { + serviceConfig_ = null; + serviceConfigBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceConfig service_config = 7; + */ + public context.ContextOuterClass.ServiceConfig.Builder getServiceConfigBuilder() { + onChanged(); + return getServiceConfigFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceConfig service_config = 7; + */ + public context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder() { + if (serviceConfigBuilder_ != null) { + return serviceConfigBuilder_.getMessageOrBuilder(); + } else { + return serviceConfig_ == null ? context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; + } + } + + /** + * .context.ServiceConfig service_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceConfigFieldBuilder() { + if (serviceConfigBuilder_ == null) { + serviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceConfig(), getParentForChildren(), isClean()); + serviceConfig_ = null; + } + return serviceConfigBuilder_; + } + + private context.ContextOuterClass.Timestamp timestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; + + /** + * .context.Timestamp timestamp = 8; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 8; + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * .context.Timestamp timestamp = 8; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 8; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Timestamp timestamp = 8; + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 8; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + /** + * .context.Timestamp timestamp = 8; + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + + /** + * .context.Timestamp timestamp = 8; + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } + + /** + * .context.Timestamp timestamp = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Service) + } + + // @@protoc_insertion_point(class_scope:context.Service) + private static final context.ContextOuterClass.Service DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Service(); + } + + public static context.ContextOuterClass.Service getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Service getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceStatusOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return The enum numeric value on the wire for serviceStatus. + */ + int getServiceStatusValue(); + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return The serviceStatus. + */ + context.ContextOuterClass.ServiceStatusEnum getServiceStatus(); + } + + /** + * Protobuf type {@code context.ServiceStatus} + */ + public static final class ServiceStatus extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceStatus) + ServiceStatusOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceStatus.newBuilder() to construct. + private ServiceStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceStatus() { + serviceStatus_ = 0; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceStatus_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceStatus.class, context.ContextOuterClass.ServiceStatus.Builder.class); + } + + public static final int SERVICE_STATUS_FIELD_NUMBER = 1; + + private int serviceStatus_; + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return The enum numeric value on the wire for serviceStatus. + */ + @java.lang.Override + public int getServiceStatusValue() { + return serviceStatus_; + } + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return The serviceStatus. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceStatusEnum getServiceStatus() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.valueOf(serviceStatus_); + return result == null ? context.ContextOuterClass.ServiceStatusEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (serviceStatus_ != context.ContextOuterClass.ServiceStatusEnum.SERVICESTATUS_UNDEFINED.getNumber()) { + output.writeEnum(1, serviceStatus_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (serviceStatus_ != context.ContextOuterClass.ServiceStatusEnum.SERVICESTATUS_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, serviceStatus_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceStatus)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceStatus other = (context.ContextOuterClass.ServiceStatus) obj; + if (serviceStatus_ != other.serviceStatus_) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_STATUS_FIELD_NUMBER; + hash = (53 * hash) + serviceStatus_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceStatus parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceStatus parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceStatus parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ServiceStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceStatus) + context.ContextOuterClass.ServiceStatusOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceStatus_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceStatus.class, context.ContextOuterClass.ServiceStatus.Builder.class); + } + + // 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(); + serviceStatus_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceStatus_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceStatus getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceStatus.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceStatus build() { + context.ContextOuterClass.ServiceStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceStatus buildPartial() { + context.ContextOuterClass.ServiceStatus result = new context.ContextOuterClass.ServiceStatus(this); + result.serviceStatus_ = serviceStatus_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceStatus) { + return mergeFrom((context.ContextOuterClass.ServiceStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceStatus other) { + if (other == context.ContextOuterClass.ServiceStatus.getDefaultInstance()) + return this; + if (other.serviceStatus_ != 0) { + setServiceStatusValue(other.getServiceStatusValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int serviceStatus_ = 0; + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return The enum numeric value on the wire for serviceStatus. + */ + @java.lang.Override + public int getServiceStatusValue() { + return serviceStatus_; + } + + /** + * .context.ServiceStatusEnum service_status = 1; + * @param value The enum numeric value on the wire for serviceStatus to set. + * @return This builder for chaining. + */ + public Builder setServiceStatusValue(int value) { + serviceStatus_ = value; + onChanged(); + return this; + } + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return The serviceStatus. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceStatusEnum getServiceStatus() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.valueOf(serviceStatus_); + return result == null ? context.ContextOuterClass.ServiceStatusEnum.UNRECOGNIZED : result; + } + + /** + * .context.ServiceStatusEnum service_status = 1; + * @param value The serviceStatus to set. + * @return This builder for chaining. + */ + public Builder setServiceStatus(context.ContextOuterClass.ServiceStatusEnum value) { + if (value == null) { + throw new NullPointerException(); + } + serviceStatus_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.ServiceStatusEnum service_status = 1; + * @return This builder for chaining. + */ + public Builder clearServiceStatus() { + serviceStatus_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceStatus) + } + + // @@protoc_insertion_point(class_scope:context.ServiceStatus) + private static final context.ContextOuterClass.ServiceStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceStatus(); + } + + public static context.ContextOuterClass.ServiceStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + java.util.List getConfigRulesList(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + context.ContextOuterClass.ConfigRule getConfigRules(int index); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + int getConfigRulesCount(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + java.util.List getConfigRulesOrBuilderList(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ServiceConfig} + */ + public static final class ServiceConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceConfig) + ServiceConfigOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceConfig.newBuilder() to construct. + private ServiceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceConfig() { + configRules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceConfig.class, context.ContextOuterClass.ServiceConfig.Builder.class); + } + + public static final int CONFIG_RULES_FIELD_NUMBER = 1; + + private java.util.List configRules_; + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public java.util.List getConfigRulesList() { + return configRules_; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public java.util.List getConfigRulesOrBuilderList() { + return configRules_; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public int getConfigRulesCount() { + return configRules_.size(); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule getConfigRules(int index) { + return configRules_.get(index); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index) { + return configRules_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < configRules_.size(); i++) { + output.writeMessage(1, configRules_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < configRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configRules_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceConfig)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceConfig other = (context.ContextOuterClass.ServiceConfig) obj; + if (!getConfigRulesList().equals(other.getConfigRulesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConfigRulesCount() > 0) { + hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; + hash = (53 * hash) + getConfigRulesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ServiceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceConfig) + context.ContextOuterClass.ServiceConfigOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceConfig.class, context.ContextOuterClass.ServiceConfig.Builder.class); + } + + // 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(); + if (configRulesBuilder_ == null) { + configRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + configRulesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceConfig_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceConfig getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceConfig.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceConfig build() { + context.ContextOuterClass.ServiceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceConfig buildPartial() { + context.ContextOuterClass.ServiceConfig result = new context.ContextOuterClass.ServiceConfig(this); + int from_bitField0_ = bitField0_; + if (configRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + configRules_ = java.util.Collections.unmodifiableList(configRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.configRules_ = configRules_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceConfig) { + return mergeFrom((context.ContextOuterClass.ServiceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceConfig other) { + if (other == context.ContextOuterClass.ServiceConfig.getDefaultInstance()) + return this; + if (configRulesBuilder_ == null) { + if (!other.configRules_.isEmpty()) { + if (configRules_.isEmpty()) { + configRules_ = other.configRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfigRulesIsMutable(); + configRules_.addAll(other.configRules_); + } + onChanged(); + } + } else { + if (!other.configRules_.isEmpty()) { + if (configRulesBuilder_.isEmpty()) { + configRulesBuilder_.dispose(); + configRulesBuilder_ = null; + configRules_ = other.configRules_; + bitField0_ = (bitField0_ & ~0x00000001); + configRulesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConfigRulesFieldBuilder() : null; + } else { + configRulesBuilder_.addAllMessages(other.configRules_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List configRules_ = java.util.Collections.emptyList(); + + private void ensureConfigRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + configRules_ = new java.util.ArrayList(configRules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 configRulesBuilder_; + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesList() { + if (configRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(configRules_); + } else { + return configRulesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public int getConfigRulesCount() { + if (configRulesBuilder_ == null) { + return configRules_.size(); + } else { + return configRulesBuilder_.getCount(); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule getConfigRules(int index) { + if (configRulesBuilder_ == null) { + return configRules_.get(index); + } else { + return configRulesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder setConfigRules(int index, context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.set(index, value); + onChanged(); + } else { + configRulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder setConfigRules(int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.set(index, builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.add(value); + onChanged(); + } else { + configRulesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(int index, context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.add(index, value); + onChanged(); + } else { + configRulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(index, builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addAllConfigRules(java.lang.Iterable values) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, configRules_); + onChanged(); + } else { + configRulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder clearConfigRules() { + if (configRulesBuilder_ == null) { + configRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + configRulesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder removeConfigRules(int index) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.remove(index); + onChanged(); + } else { + configRulesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder getConfigRulesBuilder(int index) { + return getConfigRulesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index) { + if (configRulesBuilder_ == null) { + return configRules_.get(index); + } else { + return configRulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesOrBuilderList() { + if (configRulesBuilder_ != null) { + return configRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configRules_); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder() { + return getConfigRulesFieldBuilder().addBuilder(context.ContextOuterClass.ConfigRule.getDefaultInstance()); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder(int index) { + return getConfigRulesFieldBuilder().addBuilder(index, context.ContextOuterClass.ConfigRule.getDefaultInstance()); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesBuilderList() { + return getConfigRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getConfigRulesFieldBuilder() { + if (configRulesBuilder_ == null) { + configRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(configRules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + configRules_ = null; + } + return configRulesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceConfig) + } + + // @@protoc_insertion_point(class_scope:context.ServiceConfig) + private static final context.ContextOuterClass.ServiceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceConfig(); + } + + public static context.ContextOuterClass.ServiceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.ServiceId service_ids = 1; + */ + java.util.List getServiceIdsList(); + + /** + * repeated .context.ServiceId service_ids = 1; + */ + context.ContextOuterClass.ServiceId getServiceIds(int index); + + /** + * repeated .context.ServiceId service_ids = 1; + */ + int getServiceIdsCount(); + + /** + * repeated .context.ServiceId service_ids = 1; + */ + java.util.List getServiceIdsOrBuilderList(); + + /** + * repeated .context.ServiceId service_ids = 1; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ServiceIdList} + */ + public static final class ServiceIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceIdList) + ServiceIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceIdList.newBuilder() to construct. + private ServiceIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceIdList() { + serviceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceIdList.class, context.ContextOuterClass.ServiceIdList.Builder.class); + } + + public static final int SERVICE_IDS_FIELD_NUMBER = 1; + + private java.util.List serviceIds_; + + /** + * repeated .context.ServiceId service_ids = 1; + */ + @java.lang.Override + public java.util.List getServiceIdsList() { + return serviceIds_; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + @java.lang.Override + public java.util.List getServiceIdsOrBuilderList() { + return serviceIds_; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + @java.lang.Override + public int getServiceIdsCount() { + return serviceIds_.size(); + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceIds(int index) { + return serviceIds_.get(index); + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder(int index) { + return serviceIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < serviceIds_.size(); i++) { + output.writeMessage(1, serviceIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < serviceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, serviceIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceIdList other = (context.ContextOuterClass.ServiceIdList) obj; + if (!getServiceIdsList().equals(other.getServiceIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getServiceIdsCount() > 0) { + hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getServiceIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ServiceIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceIdList) + context.ContextOuterClass.ServiceIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceIdList.class, context.ContextOuterClass.ServiceIdList.Builder.class); + } + + // 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(); + if (serviceIdsBuilder_ == null) { + serviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + serviceIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceIdList getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceIdList build() { + context.ContextOuterClass.ServiceIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceIdList buildPartial() { + context.ContextOuterClass.ServiceIdList result = new context.ContextOuterClass.ServiceIdList(this); + int from_bitField0_ = bitField0_; + if (serviceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.serviceIds_ = serviceIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceIdList) { + return mergeFrom((context.ContextOuterClass.ServiceIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceIdList other) { + if (other == context.ContextOuterClass.ServiceIdList.getDefaultInstance()) + return this; + if (serviceIdsBuilder_ == null) { + if (!other.serviceIds_.isEmpty()) { + if (serviceIds_.isEmpty()) { + serviceIds_ = other.serviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServiceIdsIsMutable(); + serviceIds_.addAll(other.serviceIds_); + } + onChanged(); + } + } else { + if (!other.serviceIds_.isEmpty()) { + if (serviceIdsBuilder_.isEmpty()) { + serviceIdsBuilder_.dispose(); + serviceIdsBuilder_ = null; + serviceIds_ = other.serviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + serviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceIdsFieldBuilder() : null; + } else { + serviceIdsBuilder_.addAllMessages(other.serviceIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List serviceIds_ = java.util.Collections.emptyList(); + + private void ensureServiceIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + serviceIds_ = new java.util.ArrayList(serviceIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 serviceIdsBuilder_; + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public java.util.List getServiceIdsList() { + if (serviceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceIds_); + } else { + return serviceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public int getServiceIdsCount() { + if (serviceIdsBuilder_ == null) { + return serviceIds_.size(); + } else { + return serviceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public context.ContextOuterClass.ServiceId getServiceIds(int index) { + if (serviceIdsBuilder_ == null) { + return serviceIds_.get(index); + } else { + return serviceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder setServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceIdsIsMutable(); + serviceIds_.set(index, value); + onChanged(); + } else { + serviceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder setServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder addServiceIds(context.ContextOuterClass.ServiceId value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceIdsIsMutable(); + serviceIds_.add(value); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder addServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceIdsIsMutable(); + serviceIds_.add(index, value); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder addServiceIds(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.add(builderForValue.build()); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder addServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder addAllServiceIds(java.lang.Iterable values) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceIds_); + onChanged(); + } else { + serviceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder clearServiceIds() { + if (serviceIdsBuilder_ == null) { + serviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + serviceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public Builder removeServiceIds(int index) { + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.remove(index); + onChanged(); + } else { + serviceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdsBuilder(int index) { + return getServiceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder(int index) { + if (serviceIdsBuilder_ == null) { + return serviceIds_.get(index); + } else { + return serviceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public java.util.List getServiceIdsOrBuilderList() { + if (serviceIdsBuilder_ != null) { + return serviceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceIds_); + } + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder() { + return getServiceIdsFieldBuilder().addBuilder(context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder(int index) { + return getServiceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId service_ids = 1; + */ + public java.util.List getServiceIdsBuilderList() { + return getServiceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getServiceIdsFieldBuilder() { + if (serviceIdsBuilder_ == null) { + serviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(serviceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + serviceIds_ = null; + } + return serviceIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceIdList) + } + + // @@protoc_insertion_point(class_scope:context.ServiceIdList) + private static final context.ContextOuterClass.ServiceIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceIdList(); + } + + public static context.ContextOuterClass.ServiceIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Service services = 1; + */ + java.util.List getServicesList(); + + /** + * repeated .context.Service services = 1; + */ + context.ContextOuterClass.Service getServices(int index); + + /** + * repeated .context.Service services = 1; + */ + int getServicesCount(); + + /** + * repeated .context.Service services = 1; + */ + java.util.List getServicesOrBuilderList(); + + /** + * repeated .context.Service services = 1; + */ + context.ContextOuterClass.ServiceOrBuilder getServicesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ServiceList} + */ + public static final class ServiceList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceList) + ServiceListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceList.newBuilder() to construct. + private ServiceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceList() { + services_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceList.class, context.ContextOuterClass.ServiceList.Builder.class); + } + + public static final int SERVICES_FIELD_NUMBER = 1; + + private java.util.List services_; + + /** + * repeated .context.Service services = 1; + */ + @java.lang.Override + public java.util.List getServicesList() { + return services_; + } + + /** + * repeated .context.Service services = 1; + */ + @java.lang.Override + public java.util.List getServicesOrBuilderList() { + return services_; + } + + /** + * repeated .context.Service services = 1; + */ + @java.lang.Override + public int getServicesCount() { + return services_.size(); + } + + /** + * repeated .context.Service services = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Service getServices(int index) { + return services_.get(index); + } + + /** + * repeated .context.Service services = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceOrBuilder getServicesOrBuilder(int index) { + return services_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < services_.size(); i++) { + output.writeMessage(1, services_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < services_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, services_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceList)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceList other = (context.ContextOuterClass.ServiceList) obj; + if (!getServicesList().equals(other.getServicesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getServicesCount() > 0) { + hash = (37 * hash) + SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getServicesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ServiceList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceList) + context.ContextOuterClass.ServiceListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceList.class, context.ContextOuterClass.ServiceList.Builder.class); + } + + // 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(); + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + servicesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceList getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceList build() { + context.ContextOuterClass.ServiceList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceList buildPartial() { + context.ContextOuterClass.ServiceList result = new context.ContextOuterClass.ServiceList(this); + int from_bitField0_ = bitField0_; + if (servicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + services_ = java.util.Collections.unmodifiableList(services_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.services_ = services_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceList) { + return mergeFrom((context.ContextOuterClass.ServiceList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceList other) { + if (other == context.ContextOuterClass.ServiceList.getDefaultInstance()) + return this; + if (servicesBuilder_ == null) { + if (!other.services_.isEmpty()) { + if (services_.isEmpty()) { + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServicesIsMutable(); + services_.addAll(other.services_); + } + onChanged(); + } + } else { + if (!other.services_.isEmpty()) { + if (servicesBuilder_.isEmpty()) { + servicesBuilder_.dispose(); + servicesBuilder_ = null; + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + servicesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServicesFieldBuilder() : null; + } else { + servicesBuilder_.addAllMessages(other.services_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List services_ = java.util.Collections.emptyList(); + + private void ensureServicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + services_ = new java.util.ArrayList(services_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 servicesBuilder_; + + /** + * repeated .context.Service services = 1; + */ + public java.util.List getServicesList() { + if (servicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(services_); + } else { + return servicesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Service services = 1; + */ + public int getServicesCount() { + if (servicesBuilder_ == null) { + return services_.size(); + } else { + return servicesBuilder_.getCount(); + } + } + + /** + * repeated .context.Service services = 1; + */ + public context.ContextOuterClass.Service getServices(int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Service services = 1; + */ + public Builder setServices(int index, context.ContextOuterClass.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.set(index, value); + onChanged(); + } else { + servicesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder setServices(int index, context.ContextOuterClass.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.set(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder addServices(context.ContextOuterClass.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(value); + onChanged(); + } else { + servicesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder addServices(int index, context.ContextOuterClass.Service value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(index, value); + onChanged(); + } else { + servicesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder addServices(context.ContextOuterClass.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder addServices(int index, context.ContextOuterClass.Service.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder addAllServices(java.lang.Iterable values) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, services_); + onChanged(); + } else { + servicesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder clearServices() { + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + servicesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public Builder removeServices(int index) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.remove(index); + onChanged(); + } else { + servicesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Service services = 1; + */ + public context.ContextOuterClass.Service.Builder getServicesBuilder(int index) { + return getServicesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Service services = 1; + */ + public context.ContextOuterClass.ServiceOrBuilder getServicesOrBuilder(int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Service services = 1; + */ + public java.util.List getServicesOrBuilderList() { + if (servicesBuilder_ != null) { + return servicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(services_); + } + } + + /** + * repeated .context.Service services = 1; + */ + public context.ContextOuterClass.Service.Builder addServicesBuilder() { + return getServicesFieldBuilder().addBuilder(context.ContextOuterClass.Service.getDefaultInstance()); + } + + /** + * repeated .context.Service services = 1; + */ + public context.ContextOuterClass.Service.Builder addServicesBuilder(int index) { + return getServicesFieldBuilder().addBuilder(index, context.ContextOuterClass.Service.getDefaultInstance()); + } + + /** + * repeated .context.Service services = 1; + */ + public java.util.List getServicesBuilderList() { + return getServicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getServicesFieldBuilder() { + if (servicesBuilder_ == null) { + servicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(services_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + services_ = null; + } + return servicesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceList) + } + + // @@protoc_insertion_point(class_scope:context.ServiceList) + private static final context.ContextOuterClass.ServiceList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceList(); + } + + public static context.ContextOuterClass.ServiceList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceFilterOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ServiceIdList service_ids = 1; + * @return Whether the serviceIds field is set. + */ + boolean hasServiceIds(); + + /** + * .context.ServiceIdList service_ids = 1; + * @return The serviceIds. + */ + context.ContextOuterClass.ServiceIdList getServiceIds(); + + /** + * .context.ServiceIdList service_ids = 1; + */ + context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder(); + + /** + * bool include_endpoint_ids = 2; + * @return The includeEndpointIds. + */ + boolean getIncludeEndpointIds(); + + /** + * bool include_constraints = 3; + * @return The includeConstraints. + */ + boolean getIncludeConstraints(); + + /** + * bool include_config_rules = 4; + * @return The includeConfigRules. + */ + boolean getIncludeConfigRules(); + } + + /** + * Protobuf type {@code context.ServiceFilter} + */ + public static final class ServiceFilter extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceFilter) + ServiceFilterOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceFilter.newBuilder() to construct. + private ServiceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceFilter() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceFilter_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceFilter.class, context.ContextOuterClass.ServiceFilter.Builder.class); + } + + public static final int SERVICE_IDS_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ServiceIdList serviceIds_; + + /** + * .context.ServiceIdList service_ids = 1; + * @return Whether the serviceIds field is set. + */ + @java.lang.Override + public boolean hasServiceIds() { + return serviceIds_ != null; + } + + /** + * .context.ServiceIdList service_ids = 1; + * @return The serviceIds. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdList getServiceIds() { + return serviceIds_ == null ? context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder() { + return getServiceIds(); + } + + public static final int INCLUDE_ENDPOINT_IDS_FIELD_NUMBER = 2; + + private boolean includeEndpointIds_; + + /** + * bool include_endpoint_ids = 2; + * @return The includeEndpointIds. + */ + @java.lang.Override + public boolean getIncludeEndpointIds() { + return includeEndpointIds_; + } + + public static final int INCLUDE_CONSTRAINTS_FIELD_NUMBER = 3; + + private boolean includeConstraints_; + + /** + * bool include_constraints = 3; + * @return The includeConstraints. + */ + @java.lang.Override + public boolean getIncludeConstraints() { + return includeConstraints_; + } + + public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 4; + + private boolean includeConfigRules_; + + /** + * bool include_config_rules = 4; + * @return The includeConfigRules. + */ + @java.lang.Override + public boolean getIncludeConfigRules() { + return includeConfigRules_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (serviceIds_ != null) { + output.writeMessage(1, getServiceIds()); + } + if (includeEndpointIds_ != false) { + output.writeBool(2, includeEndpointIds_); + } + if (includeConstraints_ != false) { + output.writeBool(3, includeConstraints_); + } + if (includeConfigRules_ != false) { + output.writeBool(4, includeConfigRules_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (serviceIds_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getServiceIds()); + } + if (includeEndpointIds_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeEndpointIds_); + } + if (includeConstraints_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, includeConstraints_); + } + if (includeConfigRules_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeConfigRules_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceFilter)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceFilter other = (context.ContextOuterClass.ServiceFilter) obj; + if (hasServiceIds() != other.hasServiceIds()) + return false; + if (hasServiceIds()) { + if (!getServiceIds().equals(other.getServiceIds())) + return false; + } + if (getIncludeEndpointIds() != other.getIncludeEndpointIds()) + return false; + if (getIncludeConstraints() != other.getIncludeConstraints()) + return false; + if (getIncludeConfigRules() != other.getIncludeConfigRules()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasServiceIds()) { + hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getServiceIds().hashCode(); + } + hash = (37 * hash) + INCLUDE_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeEndpointIds()); + hash = (37 * hash) + INCLUDE_CONSTRAINTS_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceFilter parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceFilter parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceFilter parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ServiceFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceFilter) + context.ContextOuterClass.ServiceFilterOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceFilter_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceFilter.class, context.ContextOuterClass.ServiceFilter.Builder.class); + } + + // 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; + serviceIdsBuilder_ = null; + } + includeEndpointIds_ = false; + includeConstraints_ = false; + includeConfigRules_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceFilter_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceFilter getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceFilter.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceFilter build() { + context.ContextOuterClass.ServiceFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceFilter) { + return mergeFrom((context.ContextOuterClass.ServiceFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceFilter other) { + if (other == context.ContextOuterClass.ServiceFilter.getDefaultInstance()) + return this; + if (other.hasServiceIds()) { + mergeServiceIds(other.getServiceIds()); + } + if (other.getIncludeEndpointIds() != false) { + setIncludeEndpointIds(other.getIncludeEndpointIds()); + } + if (other.getIncludeConstraints() != false) { + setIncludeConstraints(other.getIncludeConstraints()); + } + if (other.getIncludeConfigRules() != false) { + setIncludeConfigRules(other.getIncludeConfigRules()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.ServiceIdList serviceIds_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceIdsBuilder_; + + /** + * .context.ServiceIdList service_ids = 1; + * @return Whether the serviceIds field is set. + */ + public boolean hasServiceIds() { + return serviceIdsBuilder_ != null || serviceIds_ != null; + } + + /** + * .context.ServiceIdList service_ids = 1; + * @return The serviceIds. + */ + public context.ContextOuterClass.ServiceIdList getServiceIds() { + if (serviceIdsBuilder_ == null) { + return serviceIds_ == null ? context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; + } else { + return serviceIdsBuilder_.getMessage(); + } + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + public Builder setServiceIds(context.ContextOuterClass.ServiceIdList value) { + if (serviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceIds_ = value; + onChanged(); + } else { + serviceIdsBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + public Builder setServiceIds(context.ContextOuterClass.ServiceIdList.Builder builderForValue) { + if (serviceIdsBuilder_ == null) { + serviceIds_ = builderForValue.build(); + onChanged(); + } else { + serviceIdsBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + public Builder mergeServiceIds(context.ContextOuterClass.ServiceIdList value) { + if (serviceIdsBuilder_ == null) { + if (serviceIds_ != null) { + serviceIds_ = context.ContextOuterClass.ServiceIdList.newBuilder(serviceIds_).mergeFrom(value).buildPartial(); + } else { + serviceIds_ = value; + } + onChanged(); + } else { + serviceIdsBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + public Builder clearServiceIds() { + if (serviceIdsBuilder_ == null) { + serviceIds_ = null; + onChanged(); + } else { + serviceIds_ = null; + serviceIdsBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + public context.ContextOuterClass.ServiceIdList.Builder getServiceIdsBuilder() { + onChanged(); + return getServiceIdsFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + public context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder() { + if (serviceIdsBuilder_ != null) { + return serviceIdsBuilder_.getMessageOrBuilder(); + } else { + return serviceIds_ == null ? context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; + } + } + + /** + * .context.ServiceIdList service_ids = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdsFieldBuilder() { + if (serviceIdsBuilder_ == null) { + serviceIdsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceIds(), getParentForChildren(), isClean()); + serviceIds_ = null; + } + return serviceIdsBuilder_; + } + + private boolean includeEndpointIds_; + + /** + * bool include_endpoint_ids = 2; + * @return The includeEndpointIds. + */ + @java.lang.Override + public boolean getIncludeEndpointIds() { + return includeEndpointIds_; + } + + /** + * bool include_endpoint_ids = 2; + * @param value The includeEndpointIds to set. + * @return This builder for chaining. + */ + public Builder setIncludeEndpointIds(boolean value) { + includeEndpointIds_ = value; + onChanged(); + return this; + } + + /** + * bool include_endpoint_ids = 2; + * @return This builder for chaining. + */ + public Builder clearIncludeEndpointIds() { + includeEndpointIds_ = false; + onChanged(); + return this; + } + + private boolean includeConstraints_; + + /** + * bool include_constraints = 3; + * @return The includeConstraints. + */ + @java.lang.Override + public boolean getIncludeConstraints() { + return includeConstraints_; + } + + /** + * bool include_constraints = 3; + * @param value The includeConstraints to set. + * @return This builder for chaining. + */ + public Builder setIncludeConstraints(boolean value) { + includeConstraints_ = value; + onChanged(); + return this; + } + + /** + * bool include_constraints = 3; + * @return This builder for chaining. + */ + public Builder clearIncludeConstraints() { + includeConstraints_ = false; + onChanged(); + return this; + } + + private boolean includeConfigRules_; + + /** + * bool include_config_rules = 4; + * @return The includeConfigRules. + */ + @java.lang.Override + public boolean getIncludeConfigRules() { + return includeConfigRules_; + } + + /** + * bool include_config_rules = 4; + * @param value The includeConfigRules to set. + * @return This builder for chaining. + */ + public Builder setIncludeConfigRules(boolean value) { + includeConfigRules_ = value; + onChanged(); + return this; + } + + /** + * bool include_config_rules = 4; + * @return This builder for chaining. + */ + public Builder clearIncludeConfigRules() { + includeConfigRules_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceFilter) + } + + // @@protoc_insertion_point(class_scope:context.ServiceFilter) + private static final context.ContextOuterClass.ServiceFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceFilter(); + } + + public static context.ContextOuterClass.ServiceFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ServiceEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.ServiceId service_id = 2; + * @return Whether the serviceId field is set. + */ + boolean hasServiceId(); + + /** + * .context.ServiceId service_id = 2; + * @return The serviceId. + */ + context.ContextOuterClass.ServiceId getServiceId(); + + /** + * .context.ServiceId service_id = 2; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + } + + /** + * Protobuf type {@code context.ServiceEvent} + */ + public static final class ServiceEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ServiceEvent) + ServiceEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ServiceEvent.newBuilder() to construct. + private ServiceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceEvent.class, context.ContextOuterClass.ServiceEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int SERVICE_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.ServiceId serviceId_; + + /** + * .context.ServiceId service_id = 2; + * @return Whether the serviceId field is set. + */ + @java.lang.Override + public boolean hasServiceId() { + return serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 2; + * @return The serviceId. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceId() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + + /** + * .context.ServiceId service_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + return getServiceId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (serviceId_ != null) { + output.writeMessage(2, getServiceId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (serviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ServiceEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.ServiceEvent other = (context.ContextOuterClass.ServiceEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasServiceId() != other.hasServiceId()) + return false; + if (hasServiceId()) { + if (!getServiceId().equals(other.getServiceId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasServiceId()) { + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ServiceEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ServiceEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ServiceEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ServiceEvent) + context.ContextOuterClass.ServiceEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ServiceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ServiceEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ServiceEvent.class, context.ContextOuterClass.ServiceEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (serviceIdBuilder_ == null) { + serviceId_ = null; + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ServiceEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceEvent getDefaultInstanceForType() { + return context.ContextOuterClass.ServiceEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ServiceEvent build() { + context.ContextOuterClass.ServiceEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ServiceEvent) { + return mergeFrom((context.ContextOuterClass.ServiceEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ServiceEvent other) { + if (other == context.ContextOuterClass.ServiceEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasServiceId()) { + mergeServiceId(other.getServiceId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ServiceEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.ServiceId serviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceIdBuilder_; + + /** + * .context.ServiceId service_id = 2; + * @return Whether the serviceId field is set. + */ + public boolean hasServiceId() { + return serviceIdBuilder_ != null || serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 2; + * @return The serviceId. + */ + public context.ContextOuterClass.ServiceId getServiceId() { + if (serviceIdBuilder_ == null) { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } else { + return serviceIdBuilder_.getMessage(); + } + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceId_ = value; + onChanged(); + } else { + serviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdBuilder_ == null) { + serviceId_ = builderForValue.build(); + onChanged(); + } else { + serviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (serviceId_ != null) { + serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + } else { + serviceId_ = value; + } + onChanged(); + } else { + serviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder clearServiceId() { + if (serviceIdBuilder_ == null) { + serviceId_ = null; + onChanged(); + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + onChanged(); + return getServiceIdFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceId service_id = 2; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + if (serviceIdBuilder_ != null) { + return serviceIdBuilder_.getMessageOrBuilder(); + } else { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + } + + /** + * .context.ServiceId service_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdFieldBuilder() { + if (serviceIdBuilder_ == null) { + serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceId(), getParentForChildren(), isClean()); + serviceId_ = null; + } + return serviceIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ServiceEvent) + } + + // @@protoc_insertion_point(class_scope:context.ServiceEvent) + private static final context.ContextOuterClass.ServiceEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceEvent(); + } + + public static context.ContextOuterClass.ServiceEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ServiceEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); + + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + + /** + * .context.Uuid slice_uuid = 2; + * @return Whether the sliceUuid field is set. + */ + boolean hasSliceUuid(); + + /** + * .context.Uuid slice_uuid = 2; + * @return The sliceUuid. + */ + context.ContextOuterClass.Uuid getSliceUuid(); + + /** + * .context.Uuid slice_uuid = 2; + */ + context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder(); + } + + /** + *
+     * ----- Slice ---------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.SliceId} + */ + public static final class SliceId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceId) + SliceIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceId.newBuilder() to construct. + private SliceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceId.class, context.ContextOuterClass.SliceId.Builder.class); + } + + public static final int CONTEXT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ContextId contextId_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } + + public static final int SLICE_UUID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.Uuid sliceUuid_; + + /** + * .context.Uuid slice_uuid = 2; + * @return Whether the sliceUuid field is set. + */ + @java.lang.Override + public boolean hasSliceUuid() { + return sliceUuid_ != null; + } + + /** + * .context.Uuid slice_uuid = 2; + * @return The sliceUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getSliceUuid() { + return sliceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; + } + + /** + * .context.Uuid slice_uuid = 2; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder() { + return getSliceUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (sliceUuid_ != null) { + output.writeMessage(2, getSliceUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (sliceUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSliceUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceId)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceId other = (context.ContextOuterClass.SliceId) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (hasSliceUuid() != other.hasSliceUuid()) + return false; + if (hasSliceUuid()) { + if (!getSliceUuid().equals(other.getSliceUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + if (hasSliceUuid()) { + hash = (37 * hash) + SLICE_UUID_FIELD_NUMBER; + hash = (53 * hash) + getSliceUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Slice ---------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.SliceId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceId) + context.ContextOuterClass.SliceIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceId.class, context.ContextOuterClass.SliceId.Builder.class); + } + + // 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; + contextIdBuilder_ = null; + } + if (sliceUuidBuilder_ == null) { + sliceUuid_ = null; + } else { + sliceUuid_ = null; + sliceUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceId getDefaultInstanceForType() { + return context.ContextOuterClass.SliceId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceId build() { + context.ContextOuterClass.SliceId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceId) { + return mergeFrom((context.ContextOuterClass.SliceId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceId other) { + if (other == context.ContextOuterClass.SliceId.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (other.hasSliceUuid()) { + mergeSliceUuid(other.getSliceUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.ContextId contextId_; + + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; + + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } + + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } + + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } + + /** + * .context.ContextId context_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } + + private context.ContextOuterClass.Uuid sliceUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceUuidBuilder_; + + /** + * .context.Uuid slice_uuid = 2; + * @return Whether the sliceUuid field is set. + */ + public boolean hasSliceUuid() { + return sliceUuidBuilder_ != null || sliceUuid_ != null; + } + + /** + * .context.Uuid slice_uuid = 2; + * @return The sliceUuid. + */ + public context.ContextOuterClass.Uuid getSliceUuid() { + if (sliceUuidBuilder_ == null) { + return sliceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; + } else { + return sliceUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid slice_uuid = 2; + */ + public Builder setSliceUuid(context.ContextOuterClass.Uuid value) { + if (sliceUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceUuid_ = value; + onChanged(); + } else { + sliceUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid slice_uuid = 2; + */ + public Builder setSliceUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (sliceUuidBuilder_ == null) { + sliceUuid_ = builderForValue.build(); + onChanged(); + } else { + sliceUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid slice_uuid = 2; + */ + public Builder mergeSliceUuid(context.ContextOuterClass.Uuid value) { + if (sliceUuidBuilder_ == null) { + if (sliceUuid_ != null) { + sliceUuid_ = context.ContextOuterClass.Uuid.newBuilder(sliceUuid_).mergeFrom(value).buildPartial(); + } else { + sliceUuid_ = value; + } + onChanged(); + } else { + sliceUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid slice_uuid = 2; + */ + public Builder clearSliceUuid() { + if (sliceUuidBuilder_ == null) { + sliceUuid_ = null; + onChanged(); + } else { + sliceUuid_ = null; + sliceUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid slice_uuid = 2; + */ + public context.ContextOuterClass.Uuid.Builder getSliceUuidBuilder() { + onChanged(); + return getSliceUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid slice_uuid = 2; + */ + public context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder() { + if (sliceUuidBuilder_ != null) { + return sliceUuidBuilder_.getMessageOrBuilder(); + } else { + return sliceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; + } + } + + /** + * .context.Uuid slice_uuid = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceUuidFieldBuilder() { + if (sliceUuidBuilder_ == null) { + sliceUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceUuid(), getParentForChildren(), isClean()); + sliceUuid_ = null; + } + return sliceUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceId) + } + + // @@protoc_insertion_point(class_scope:context.SliceId) + private static final context.ContextOuterClass.SliceId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceId(); + } + + public static context.ContextOuterClass.SliceId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Slice) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.SliceId slice_id = 1; + * @return Whether the sliceId field is set. + */ + boolean hasSliceId(); + + /** + * .context.SliceId slice_id = 1; + * @return The sliceId. + */ + context.ContextOuterClass.SliceId getSliceId(); + + /** + * .context.SliceId slice_id = 1; + */ + context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + java.util.List getSliceEndpointIdsList(); + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointId getSliceEndpointIds(int index); + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + int getSliceEndpointIdsCount(); + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + java.util.List getSliceEndpointIdsOrBuilderList(); + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointIdOrBuilder getSliceEndpointIdsOrBuilder(int index); + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + java.util.List getSliceConstraintsList(); + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + context.ContextOuterClass.Constraint getSliceConstraints(int index); + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + int getSliceConstraintsCount(); + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + java.util.List getSliceConstraintsOrBuilderList(); + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + context.ContextOuterClass.ConstraintOrBuilder getSliceConstraintsOrBuilder(int index); + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + java.util.List getSliceServiceIdsList(); + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + context.ContextOuterClass.ServiceId getSliceServiceIds(int index); + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + int getSliceServiceIdsCount(); + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + java.util.List getSliceServiceIdsOrBuilderList(); + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + context.ContextOuterClass.ServiceIdOrBuilder getSliceServiceIdsOrBuilder(int index); + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + java.util.List getSliceSubsliceIdsList(); + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + context.ContextOuterClass.SliceId getSliceSubsliceIds(int index); + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + int getSliceSubsliceIdsCount(); + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + java.util.List getSliceSubsliceIdsOrBuilderList(); + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + context.ContextOuterClass.SliceIdOrBuilder getSliceSubsliceIdsOrBuilder(int index); + + /** + * .context.SliceStatus slice_status = 7; + * @return Whether the sliceStatus field is set. + */ + boolean hasSliceStatus(); + + /** + * .context.SliceStatus slice_status = 7; + * @return The sliceStatus. + */ + context.ContextOuterClass.SliceStatus getSliceStatus(); + + /** + * .context.SliceStatus slice_status = 7; + */ + context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder(); + + /** + * .context.SliceConfig slice_config = 8; + * @return Whether the sliceConfig field is set. + */ + boolean hasSliceConfig(); + + /** + * .context.SliceConfig slice_config = 8; + * @return The sliceConfig. + */ + context.ContextOuterClass.SliceConfig getSliceConfig(); + + /** + * .context.SliceConfig slice_config = 8; + */ + context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder(); + + /** + * .context.SliceOwner slice_owner = 9; + * @return Whether the sliceOwner field is set. + */ + boolean hasSliceOwner(); + + /** + * .context.SliceOwner slice_owner = 9; + * @return The sliceOwner. + */ + context.ContextOuterClass.SliceOwner getSliceOwner(); + + /** + * .context.SliceOwner slice_owner = 9; + */ + context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder(); + + /** + * .context.Timestamp timestamp = 10; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + + /** + * .context.Timestamp timestamp = 10; + * @return The timestamp. + */ + context.ContextOuterClass.Timestamp getTimestamp(); + + /** + * .context.Timestamp timestamp = 10; + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + } + + /** + * Protobuf type {@code context.Slice} + */ + public static final class Slice extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Slice) + SliceOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Slice.newBuilder() to construct. + private Slice(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Slice() { + name_ = ""; + sliceEndpointIds_ = java.util.Collections.emptyList(); + sliceConstraints_ = java.util.Collections.emptyList(); + sliceServiceIds_ = java.util.Collections.emptyList(); + sliceSubsliceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Slice_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Slice.class, context.ContextOuterClass.Slice.Builder.class); + } + + public static final int SLICE_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.SliceId sliceId_; + + /** + * .context.SliceId slice_id = 1; + * @return Whether the sliceId field is set. + */ + @java.lang.Override + public boolean hasSliceId() { + return sliceId_ != null; + } + + /** + * .context.SliceId slice_id = 1; + * @return The sliceId. + */ + @java.lang.Override + public context.ContextOuterClass.SliceId getSliceId() { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } + + /** + * .context.SliceId slice_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { + return getSliceId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SLICE_ENDPOINT_IDS_FIELD_NUMBER = 3; + + private java.util.List sliceEndpointIds_; + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getSliceEndpointIdsList() { + return sliceEndpointIds_; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getSliceEndpointIdsOrBuilderList() { + return sliceEndpointIds_; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + @java.lang.Override + public int getSliceEndpointIdsCount() { + return sliceEndpointIds_.size(); + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getSliceEndpointIds(int index) { + return sliceEndpointIds_.get(index); + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getSliceEndpointIdsOrBuilder(int index) { + return sliceEndpointIds_.get(index); + } + + public static final int SLICE_CONSTRAINTS_FIELD_NUMBER = 4; + + private java.util.List sliceConstraints_; + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + @java.lang.Override + public java.util.List getSliceConstraintsList() { + return sliceConstraints_; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + @java.lang.Override + public java.util.List getSliceConstraintsOrBuilderList() { + return sliceConstraints_; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + @java.lang.Override + public int getSliceConstraintsCount() { + return sliceConstraints_.size(); + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint getSliceConstraints(int index) { + return sliceConstraints_.get(index); + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + @java.lang.Override + public context.ContextOuterClass.ConstraintOrBuilder getSliceConstraintsOrBuilder(int index) { + return sliceConstraints_.get(index); + } + + public static final int SLICE_SERVICE_IDS_FIELD_NUMBER = 5; + + private java.util.List sliceServiceIds_; + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + @java.lang.Override + public java.util.List getSliceServiceIdsList() { + return sliceServiceIds_; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + @java.lang.Override + public java.util.List getSliceServiceIdsOrBuilderList() { + return sliceServiceIds_; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + @java.lang.Override + public int getSliceServiceIdsCount() { + return sliceServiceIds_.size(); + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getSliceServiceIds(int index) { + return sliceServiceIds_.get(index); + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getSliceServiceIdsOrBuilder(int index) { + return sliceServiceIds_.get(index); + } + + public static final int SLICE_SUBSLICE_IDS_FIELD_NUMBER = 6; + + private java.util.List sliceSubsliceIds_; + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + @java.lang.Override + public java.util.List getSliceSubsliceIdsList() { + return sliceSubsliceIds_; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + @java.lang.Override + public java.util.List getSliceSubsliceIdsOrBuilderList() { + return sliceSubsliceIds_; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + @java.lang.Override + public int getSliceSubsliceIdsCount() { + return sliceSubsliceIds_.size(); + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + @java.lang.Override + public context.ContextOuterClass.SliceId getSliceSubsliceIds(int index) { + return sliceSubsliceIds_.get(index); + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdOrBuilder getSliceSubsliceIdsOrBuilder(int index) { + return sliceSubsliceIds_.get(index); + } + + public static final int SLICE_STATUS_FIELD_NUMBER = 7; + + private context.ContextOuterClass.SliceStatus sliceStatus_; + + /** + * .context.SliceStatus slice_status = 7; + * @return Whether the sliceStatus field is set. + */ + @java.lang.Override + public boolean hasSliceStatus() { + return sliceStatus_ != null; + } + + /** + * .context.SliceStatus slice_status = 7; + * @return The sliceStatus. + */ + @java.lang.Override + public context.ContextOuterClass.SliceStatus getSliceStatus() { + return sliceStatus_ == null ? context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; + } + + /** + * .context.SliceStatus slice_status = 7; + */ + @java.lang.Override + public context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder() { + return getSliceStatus(); + } + + public static final int SLICE_CONFIG_FIELD_NUMBER = 8; + + private context.ContextOuterClass.SliceConfig sliceConfig_; + + /** + * .context.SliceConfig slice_config = 8; + * @return Whether the sliceConfig field is set. + */ + @java.lang.Override + public boolean hasSliceConfig() { + return sliceConfig_ != null; + } + + /** + * .context.SliceConfig slice_config = 8; + * @return The sliceConfig. + */ + @java.lang.Override + public context.ContextOuterClass.SliceConfig getSliceConfig() { + return sliceConfig_ == null ? context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; + } + + /** + * .context.SliceConfig slice_config = 8; + */ + @java.lang.Override + public context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder() { + return getSliceConfig(); + } + + public static final int SLICE_OWNER_FIELD_NUMBER = 9; + + private context.ContextOuterClass.SliceOwner sliceOwner_; + + /** + * .context.SliceOwner slice_owner = 9; + * @return Whether the sliceOwner field is set. + */ + @java.lang.Override + public boolean hasSliceOwner() { + return sliceOwner_ != null; + } + + /** + * .context.SliceOwner slice_owner = 9; + * @return The sliceOwner. + */ + @java.lang.Override + public context.ContextOuterClass.SliceOwner getSliceOwner() { + return sliceOwner_ == null ? context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + @java.lang.Override + public context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder() { + return getSliceOwner(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 10; + + private context.ContextOuterClass.Timestamp timestamp_; + + /** + * .context.Timestamp timestamp = 10; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 10; + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + + /** + * .context.Timestamp timestamp = 10; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sliceId_ != null) { + output.writeMessage(1, getSliceId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < sliceEndpointIds_.size(); i++) { + output.writeMessage(3, sliceEndpointIds_.get(i)); + } + for (int i = 0; i < sliceConstraints_.size(); i++) { + output.writeMessage(4, sliceConstraints_.get(i)); + } + for (int i = 0; i < sliceServiceIds_.size(); i++) { + output.writeMessage(5, sliceServiceIds_.get(i)); + } + for (int i = 0; i < sliceSubsliceIds_.size(); i++) { + output.writeMessage(6, sliceSubsliceIds_.get(i)); + } + if (sliceStatus_ != null) { + output.writeMessage(7, getSliceStatus()); + } + if (sliceConfig_ != null) { + output.writeMessage(8, getSliceConfig()); + } + if (sliceOwner_ != null) { + output.writeMessage(9, getSliceOwner()); + } + if (timestamp_ != null) { + output.writeMessage(10, getTimestamp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (sliceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSliceId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < sliceEndpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, sliceEndpointIds_.get(i)); + } + for (int i = 0; i < sliceConstraints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, sliceConstraints_.get(i)); + } + for (int i = 0; i < sliceServiceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, sliceServiceIds_.get(i)); + } + for (int i = 0; i < sliceSubsliceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, sliceSubsliceIds_.get(i)); + } + if (sliceStatus_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSliceStatus()); + } + if (sliceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSliceConfig()); + } + if (sliceOwner_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSliceOwner()); + } + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getTimestamp()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Slice)) { + return super.equals(obj); + } + context.ContextOuterClass.Slice other = (context.ContextOuterClass.Slice) obj; + if (hasSliceId() != other.hasSliceId()) + return false; + if (hasSliceId()) { + if (!getSliceId().equals(other.getSliceId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getSliceEndpointIdsList().equals(other.getSliceEndpointIdsList())) + return false; + if (!getSliceConstraintsList().equals(other.getSliceConstraintsList())) + return false; + if (!getSliceServiceIdsList().equals(other.getSliceServiceIdsList())) + return false; + if (!getSliceSubsliceIdsList().equals(other.getSliceSubsliceIdsList())) + return false; + if (hasSliceStatus() != other.hasSliceStatus()) + return false; + if (hasSliceStatus()) { + if (!getSliceStatus().equals(other.getSliceStatus())) + return false; + } + if (hasSliceConfig() != other.hasSliceConfig()) + return false; + if (hasSliceConfig()) { + if (!getSliceConfig().equals(other.getSliceConfig())) + return false; + } + if (hasSliceOwner() != other.hasSliceOwner()) + return false; + if (hasSliceOwner()) { + if (!getSliceOwner().equals(other.getSliceOwner())) + return false; + } + if (hasTimestamp() != other.hasTimestamp()) + return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSliceId()) { + hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSliceId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getSliceEndpointIdsCount() > 0) { + hash = (37 * hash) + SLICE_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSliceEndpointIdsList().hashCode(); + } + if (getSliceConstraintsCount() > 0) { + hash = (37 * hash) + SLICE_CONSTRAINTS_FIELD_NUMBER; + hash = (53 * hash) + getSliceConstraintsList().hashCode(); + } + if (getSliceServiceIdsCount() > 0) { + hash = (37 * hash) + SLICE_SERVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSliceServiceIdsList().hashCode(); + } + if (getSliceSubsliceIdsCount() > 0) { + hash = (37 * hash) + SLICE_SUBSLICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSliceSubsliceIdsList().hashCode(); + } + if (hasSliceStatus()) { + hash = (37 * hash) + SLICE_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getSliceStatus().hashCode(); + } + if (hasSliceConfig()) { + hash = (37 * hash) + SLICE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSliceConfig().hashCode(); + } + if (hasSliceOwner()) { + hash = (37 * hash) + SLICE_OWNER_FIELD_NUMBER; + hash = (53 * hash) + getSliceOwner().hashCode(); + } + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Slice parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Slice parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Slice parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Slice parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Slice parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Slice parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Slice parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Slice parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Slice parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Slice parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Slice parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Slice parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Slice prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Slice} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Slice) + context.ContextOuterClass.SliceOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Slice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Slice_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Slice.class, context.ContextOuterClass.Slice.Builder.class); + } + + // 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; + sliceIdBuilder_ = null; + } + name_ = ""; + if (sliceEndpointIdsBuilder_ == null) { + sliceEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + sliceEndpointIdsBuilder_.clear(); + } + if (sliceConstraintsBuilder_ == null) { + sliceConstraints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + sliceConstraintsBuilder_.clear(); + } + if (sliceServiceIdsBuilder_ == null) { + sliceServiceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + sliceServiceIdsBuilder_.clear(); + } + if (sliceSubsliceIdsBuilder_ == null) { + sliceSubsliceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + sliceSubsliceIdsBuilder_.clear(); + } + if (sliceStatusBuilder_ == null) { + sliceStatus_ = null; + } else { + sliceStatus_ = null; + sliceStatusBuilder_ = null; + } + if (sliceConfigBuilder_ == null) { + sliceConfig_ = null; + } else { + sliceConfig_ = null; + sliceConfigBuilder_ = null; + } + if (sliceOwnerBuilder_ == null) { + sliceOwner_ = null; + } else { + sliceOwner_ = null; + sliceOwnerBuilder_ = null; + } + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Slice_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Slice getDefaultInstanceForType() { + return context.ContextOuterClass.Slice.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Slice build() { + context.ContextOuterClass.Slice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.name_ = name_; + if (sliceEndpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sliceEndpointIds_ = java.util.Collections.unmodifiableList(sliceEndpointIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sliceEndpointIds_ = sliceEndpointIds_; + } else { + result.sliceEndpointIds_ = sliceEndpointIdsBuilder_.build(); + } + if (sliceConstraintsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + sliceConstraints_ = java.util.Collections.unmodifiableList(sliceConstraints_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.sliceConstraints_ = sliceConstraints_; + } else { + result.sliceConstraints_ = sliceConstraintsBuilder_.build(); + } + if (sliceServiceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + sliceServiceIds_ = java.util.Collections.unmodifiableList(sliceServiceIds_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.sliceServiceIds_ = sliceServiceIds_; + } else { + result.sliceServiceIds_ = sliceServiceIdsBuilder_.build(); + } + if (sliceSubsliceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + sliceSubsliceIds_ = java.util.Collections.unmodifiableList(sliceSubsliceIds_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.sliceSubsliceIds_ = sliceSubsliceIds_; + } else { + result.sliceSubsliceIds_ = sliceSubsliceIdsBuilder_.build(); + } + if (sliceStatusBuilder_ == null) { + result.sliceStatus_ = sliceStatus_; + } else { + result.sliceStatus_ = sliceStatusBuilder_.build(); + } + if (sliceConfigBuilder_ == null) { + result.sliceConfig_ = sliceConfig_; + } else { + result.sliceConfig_ = sliceConfigBuilder_.build(); + } + if (sliceOwnerBuilder_ == null) { + result.sliceOwner_ = sliceOwner_; + } else { + result.sliceOwner_ = sliceOwnerBuilder_.build(); + } + if (timestampBuilder_ == null) { + result.timestamp_ = timestamp_; + } else { + result.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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Slice) { + return mergeFrom((context.ContextOuterClass.Slice) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Slice other) { + if (other == context.ContextOuterClass.Slice.getDefaultInstance()) + return this; + if (other.hasSliceId()) { + mergeSliceId(other.getSliceId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (sliceEndpointIdsBuilder_ == null) { + if (!other.sliceEndpointIds_.isEmpty()) { + if (sliceEndpointIds_.isEmpty()) { + sliceEndpointIds_ = other.sliceEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.addAll(other.sliceEndpointIds_); + } + onChanged(); + } + } else { + if (!other.sliceEndpointIds_.isEmpty()) { + if (sliceEndpointIdsBuilder_.isEmpty()) { + sliceEndpointIdsBuilder_.dispose(); + sliceEndpointIdsBuilder_ = null; + sliceEndpointIds_ = other.sliceEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + sliceEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceEndpointIdsFieldBuilder() : null; + } else { + sliceEndpointIdsBuilder_.addAllMessages(other.sliceEndpointIds_); + } + } + } + if (sliceConstraintsBuilder_ == null) { + if (!other.sliceConstraints_.isEmpty()) { + if (sliceConstraints_.isEmpty()) { + sliceConstraints_ = other.sliceConstraints_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSliceConstraintsIsMutable(); + sliceConstraints_.addAll(other.sliceConstraints_); + } + onChanged(); + } + } else { + if (!other.sliceConstraints_.isEmpty()) { + if (sliceConstraintsBuilder_.isEmpty()) { + sliceConstraintsBuilder_.dispose(); + sliceConstraintsBuilder_ = null; + sliceConstraints_ = other.sliceConstraints_; + bitField0_ = (bitField0_ & ~0x00000002); + sliceConstraintsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceConstraintsFieldBuilder() : null; + } else { + sliceConstraintsBuilder_.addAllMessages(other.sliceConstraints_); + } + } + } + if (sliceServiceIdsBuilder_ == null) { + if (!other.sliceServiceIds_.isEmpty()) { + if (sliceServiceIds_.isEmpty()) { + sliceServiceIds_ = other.sliceServiceIds_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.addAll(other.sliceServiceIds_); + } + onChanged(); + } + } else { + if (!other.sliceServiceIds_.isEmpty()) { + if (sliceServiceIdsBuilder_.isEmpty()) { + sliceServiceIdsBuilder_.dispose(); + sliceServiceIdsBuilder_ = null; + sliceServiceIds_ = other.sliceServiceIds_; + bitField0_ = (bitField0_ & ~0x00000004); + sliceServiceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceServiceIdsFieldBuilder() : null; + } else { + sliceServiceIdsBuilder_.addAllMessages(other.sliceServiceIds_); + } + } + } + if (sliceSubsliceIdsBuilder_ == null) { + if (!other.sliceSubsliceIds_.isEmpty()) { + if (sliceSubsliceIds_.isEmpty()) { + sliceSubsliceIds_ = other.sliceSubsliceIds_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.addAll(other.sliceSubsliceIds_); + } + onChanged(); + } + } else { + if (!other.sliceSubsliceIds_.isEmpty()) { + if (sliceSubsliceIdsBuilder_.isEmpty()) { + sliceSubsliceIdsBuilder_.dispose(); + sliceSubsliceIdsBuilder_ = null; + sliceSubsliceIds_ = other.sliceSubsliceIds_; + bitField0_ = (bitField0_ & ~0x00000008); + sliceSubsliceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceSubsliceIdsFieldBuilder() : null; + } else { + sliceSubsliceIdsBuilder_.addAllMessages(other.sliceSubsliceIds_); + } + } + } + if (other.hasSliceStatus()) { + mergeSliceStatus(other.getSliceStatus()); + } + if (other.hasSliceConfig()) { + mergeSliceConfig(other.getSliceConfig()); + } + if (other.hasSliceOwner()) { + mergeSliceOwner(other.getSliceOwner()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Slice) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.SliceId sliceId_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceIdBuilder_; + + /** + * .context.SliceId slice_id = 1; + * @return Whether the sliceId field is set. + */ + public boolean hasSliceId() { + return sliceIdBuilder_ != null || sliceId_ != null; + } + + /** + * .context.SliceId slice_id = 1; + * @return The sliceId. + */ + public context.ContextOuterClass.SliceId getSliceId() { + if (sliceIdBuilder_ == null) { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } else { + return sliceIdBuilder_.getMessage(); + } + } + + /** + * .context.SliceId slice_id = 1; + */ + public Builder setSliceId(context.ContextOuterClass.SliceId value) { + if (sliceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceId_ = value; + onChanged(); + } else { + sliceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceId slice_id = 1; + */ + public Builder setSliceId(context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdBuilder_ == null) { + sliceId_ = builderForValue.build(); + onChanged(); + } else { + sliceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceId slice_id = 1; + */ + public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { + if (sliceIdBuilder_ == null) { + if (sliceId_ != null) { + sliceId_ = context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); + } else { + sliceId_ = value; + } + onChanged(); + } else { + sliceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceId slice_id = 1; + */ + public Builder clearSliceId() { + if (sliceIdBuilder_ == null) { + sliceId_ = null; + onChanged(); + } else { + sliceId_ = null; + sliceIdBuilder_ = null; + } + return this; + } + + /** + * .context.SliceId slice_id = 1; + */ + public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { + onChanged(); + return getSliceIdFieldBuilder().getBuilder(); + } + + /** + * .context.SliceId slice_id = 1; + */ + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { + if (sliceIdBuilder_ != null) { + return sliceIdBuilder_.getMessageOrBuilder(); + } else { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } + } + + /** + * .context.SliceId slice_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceIdFieldBuilder() { + if (sliceIdBuilder_ == null) { + sliceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceId(), getParentForChildren(), isClean()); + sliceId_ = null; + } + return sliceIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.util.List sliceEndpointIds_ = java.util.Collections.emptyList(); + + private void ensureSliceEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sliceEndpointIds_ = new java.util.ArrayList(sliceEndpointIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 sliceEndpointIdsBuilder_; + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public java.util.List getSliceEndpointIdsList() { + if (sliceEndpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sliceEndpointIds_); + } else { + return sliceEndpointIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public int getSliceEndpointIdsCount() { + if (sliceEndpointIdsBuilder_ == null) { + return sliceEndpointIds_.size(); + } else { + return sliceEndpointIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId getSliceEndpointIds(int index) { + if (sliceEndpointIdsBuilder_ == null) { + return sliceEndpointIds_.get(index); + } else { + return sliceEndpointIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder setSliceEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (sliceEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.set(index, value); + onChanged(); + } else { + sliceEndpointIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder setSliceEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (sliceEndpointIdsBuilder_ == null) { + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.set(index, builderForValue.build()); + onChanged(); + } else { + sliceEndpointIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder addSliceEndpointIds(context.ContextOuterClass.EndPointId value) { + if (sliceEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.add(value); + onChanged(); + } else { + sliceEndpointIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder addSliceEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (sliceEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.add(index, value); + onChanged(); + } else { + sliceEndpointIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder addSliceEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (sliceEndpointIdsBuilder_ == null) { + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.add(builderForValue.build()); + onChanged(); + } else { + sliceEndpointIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder addSliceEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (sliceEndpointIdsBuilder_ == null) { + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.add(index, builderForValue.build()); + onChanged(); + } else { + sliceEndpointIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder addAllSliceEndpointIds(java.lang.Iterable values) { + if (sliceEndpointIdsBuilder_ == null) { + ensureSliceEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceEndpointIds_); + onChanged(); + } else { + sliceEndpointIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder clearSliceEndpointIds() { + if (sliceEndpointIdsBuilder_ == null) { + sliceEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sliceEndpointIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public Builder removeSliceEndpointIds(int index) { + if (sliceEndpointIdsBuilder_ == null) { + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.remove(index); + onChanged(); + } else { + sliceEndpointIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder getSliceEndpointIdsBuilder(int index) { + return getSliceEndpointIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getSliceEndpointIdsOrBuilder(int index) { + if (sliceEndpointIdsBuilder_ == null) { + return sliceEndpointIds_.get(index); + } else { + return sliceEndpointIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public java.util.List getSliceEndpointIdsOrBuilderList() { + if (sliceEndpointIdsBuilder_ != null) { + return sliceEndpointIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sliceEndpointIds_); + } + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addSliceEndpointIdsBuilder() { + return getSliceEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addSliceEndpointIdsBuilder(int index) { + return getSliceEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId slice_endpoint_ids = 3; + */ + public java.util.List getSliceEndpointIdsBuilderList() { + return getSliceEndpointIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSliceEndpointIdsFieldBuilder() { + if (sliceEndpointIdsBuilder_ == null) { + sliceEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + sliceEndpointIds_ = null; + } + return sliceEndpointIdsBuilder_; + } + + private java.util.List sliceConstraints_ = java.util.Collections.emptyList(); + + private void ensureSliceConstraintsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + sliceConstraints_ = new java.util.ArrayList(sliceConstraints_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 sliceConstraintsBuilder_; + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public java.util.List getSliceConstraintsList() { + if (sliceConstraintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sliceConstraints_); + } else { + return sliceConstraintsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public int getSliceConstraintsCount() { + if (sliceConstraintsBuilder_ == null) { + return sliceConstraints_.size(); + } else { + return sliceConstraintsBuilder_.getCount(); + } + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public context.ContextOuterClass.Constraint getSliceConstraints(int index) { + if (sliceConstraintsBuilder_ == null) { + return sliceConstraints_.get(index); + } else { + return sliceConstraintsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder setSliceConstraints(int index, context.ContextOuterClass.Constraint value) { + if (sliceConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceConstraintsIsMutable(); + sliceConstraints_.set(index, value); + onChanged(); + } else { + sliceConstraintsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder setSliceConstraints(int index, context.ContextOuterClass.Constraint.Builder builderForValue) { + if (sliceConstraintsBuilder_ == null) { + ensureSliceConstraintsIsMutable(); + sliceConstraints_.set(index, builderForValue.build()); + onChanged(); + } else { + sliceConstraintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder addSliceConstraints(context.ContextOuterClass.Constraint value) { + if (sliceConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceConstraintsIsMutable(); + sliceConstraints_.add(value); + onChanged(); + } else { + sliceConstraintsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder addSliceConstraints(int index, context.ContextOuterClass.Constraint value) { + if (sliceConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceConstraintsIsMutable(); + sliceConstraints_.add(index, value); + onChanged(); + } else { + sliceConstraintsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder addSliceConstraints(context.ContextOuterClass.Constraint.Builder builderForValue) { + if (sliceConstraintsBuilder_ == null) { + ensureSliceConstraintsIsMutable(); + sliceConstraints_.add(builderForValue.build()); + onChanged(); + } else { + sliceConstraintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder addSliceConstraints(int index, context.ContextOuterClass.Constraint.Builder builderForValue) { + if (sliceConstraintsBuilder_ == null) { + ensureSliceConstraintsIsMutable(); + sliceConstraints_.add(index, builderForValue.build()); + onChanged(); + } else { + sliceConstraintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder addAllSliceConstraints(java.lang.Iterable values) { + if (sliceConstraintsBuilder_ == null) { + ensureSliceConstraintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceConstraints_); + onChanged(); + } else { + sliceConstraintsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder clearSliceConstraints() { + if (sliceConstraintsBuilder_ == null) { + sliceConstraints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + sliceConstraintsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public Builder removeSliceConstraints(int index) { + if (sliceConstraintsBuilder_ == null) { + ensureSliceConstraintsIsMutable(); + sliceConstraints_.remove(index); + onChanged(); + } else { + sliceConstraintsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public context.ContextOuterClass.Constraint.Builder getSliceConstraintsBuilder(int index) { + return getSliceConstraintsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public context.ContextOuterClass.ConstraintOrBuilder getSliceConstraintsOrBuilder(int index) { + if (sliceConstraintsBuilder_ == null) { + return sliceConstraints_.get(index); + } else { + return sliceConstraintsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public java.util.List getSliceConstraintsOrBuilderList() { + if (sliceConstraintsBuilder_ != null) { + return sliceConstraintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sliceConstraints_); + } + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public context.ContextOuterClass.Constraint.Builder addSliceConstraintsBuilder() { + return getSliceConstraintsFieldBuilder().addBuilder(context.ContextOuterClass.Constraint.getDefaultInstance()); + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public context.ContextOuterClass.Constraint.Builder addSliceConstraintsBuilder(int index) { + return getSliceConstraintsFieldBuilder().addBuilder(index, context.ContextOuterClass.Constraint.getDefaultInstance()); + } + + /** + * repeated .context.Constraint slice_constraints = 4; + */ + public java.util.List getSliceConstraintsBuilderList() { + return getSliceConstraintsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSliceConstraintsFieldBuilder() { + if (sliceConstraintsBuilder_ == null) { + sliceConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceConstraints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + sliceConstraints_ = null; + } + return sliceConstraintsBuilder_; + } + + private java.util.List sliceServiceIds_ = java.util.Collections.emptyList(); + + private void ensureSliceServiceIdsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + sliceServiceIds_ = new java.util.ArrayList(sliceServiceIds_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 sliceServiceIdsBuilder_; + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public java.util.List getSliceServiceIdsList() { + if (sliceServiceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sliceServiceIds_); + } else { + return sliceServiceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public int getSliceServiceIdsCount() { + if (sliceServiceIdsBuilder_ == null) { + return sliceServiceIds_.size(); + } else { + return sliceServiceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public context.ContextOuterClass.ServiceId getSliceServiceIds(int index) { + if (sliceServiceIdsBuilder_ == null) { + return sliceServiceIds_.get(index); + } else { + return sliceServiceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder setSliceServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (sliceServiceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.set(index, value); + onChanged(); + } else { + sliceServiceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder setSliceServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (sliceServiceIdsBuilder_ == null) { + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + sliceServiceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder addSliceServiceIds(context.ContextOuterClass.ServiceId value) { + if (sliceServiceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.add(value); + onChanged(); + } else { + sliceServiceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder addSliceServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (sliceServiceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.add(index, value); + onChanged(); + } else { + sliceServiceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder addSliceServiceIds(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (sliceServiceIdsBuilder_ == null) { + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.add(builderForValue.build()); + onChanged(); + } else { + sliceServiceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder addSliceServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (sliceServiceIdsBuilder_ == null) { + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + sliceServiceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder addAllSliceServiceIds(java.lang.Iterable values) { + if (sliceServiceIdsBuilder_ == null) { + ensureSliceServiceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceServiceIds_); + onChanged(); + } else { + sliceServiceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder clearSliceServiceIds() { + if (sliceServiceIdsBuilder_ == null) { + sliceServiceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + sliceServiceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public Builder removeSliceServiceIds(int index) { + if (sliceServiceIdsBuilder_ == null) { + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.remove(index); + onChanged(); + } else { + sliceServiceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public context.ContextOuterClass.ServiceId.Builder getSliceServiceIdsBuilder(int index) { + return getSliceServiceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getSliceServiceIdsOrBuilder(int index) { + if (sliceServiceIdsBuilder_ == null) { + return sliceServiceIds_.get(index); + } else { + return sliceServiceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public java.util.List getSliceServiceIdsOrBuilderList() { + if (sliceServiceIdsBuilder_ != null) { + return sliceServiceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sliceServiceIds_); + } + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public context.ContextOuterClass.ServiceId.Builder addSliceServiceIdsBuilder() { + return getSliceServiceIdsFieldBuilder().addBuilder(context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public context.ContextOuterClass.ServiceId.Builder addSliceServiceIdsBuilder(int index) { + return getSliceServiceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId slice_service_ids = 5; + */ + public java.util.List getSliceServiceIdsBuilderList() { + return getSliceServiceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSliceServiceIdsFieldBuilder() { + if (sliceServiceIdsBuilder_ == null) { + sliceServiceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceServiceIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + sliceServiceIds_ = null; + } + return sliceServiceIdsBuilder_; + } + + private java.util.List sliceSubsliceIds_ = java.util.Collections.emptyList(); + + private void ensureSliceSubsliceIdsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + sliceSubsliceIds_ = new java.util.ArrayList(sliceSubsliceIds_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 sliceSubsliceIdsBuilder_; + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public java.util.List getSliceSubsliceIdsList() { + if (sliceSubsliceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sliceSubsliceIds_); + } else { + return sliceSubsliceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public int getSliceSubsliceIdsCount() { + if (sliceSubsliceIdsBuilder_ == null) { + return sliceSubsliceIds_.size(); + } else { + return sliceSubsliceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public context.ContextOuterClass.SliceId getSliceSubsliceIds(int index) { + if (sliceSubsliceIdsBuilder_ == null) { + return sliceSubsliceIds_.get(index); + } else { + return sliceSubsliceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder setSliceSubsliceIds(int index, context.ContextOuterClass.SliceId value) { + if (sliceSubsliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.set(index, value); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder setSliceSubsliceIds(int index, context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceSubsliceIdsBuilder_ == null) { + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder addSliceSubsliceIds(context.ContextOuterClass.SliceId value) { + if (sliceSubsliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.add(value); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder addSliceSubsliceIds(int index, context.ContextOuterClass.SliceId value) { + if (sliceSubsliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.add(index, value); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder addSliceSubsliceIds(context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceSubsliceIdsBuilder_ == null) { + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.add(builderForValue.build()); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder addSliceSubsliceIds(int index, context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceSubsliceIdsBuilder_ == null) { + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder addAllSliceSubsliceIds(java.lang.Iterable values) { + if (sliceSubsliceIdsBuilder_ == null) { + ensureSliceSubsliceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceSubsliceIds_); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder clearSliceSubsliceIds() { + if (sliceSubsliceIdsBuilder_ == null) { + sliceSubsliceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public Builder removeSliceSubsliceIds(int index) { + if (sliceSubsliceIdsBuilder_ == null) { + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.remove(index); + onChanged(); + } else { + sliceSubsliceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public context.ContextOuterClass.SliceId.Builder getSliceSubsliceIdsBuilder(int index) { + return getSliceSubsliceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public context.ContextOuterClass.SliceIdOrBuilder getSliceSubsliceIdsOrBuilder(int index) { + if (sliceSubsliceIdsBuilder_ == null) { + return sliceSubsliceIds_.get(index); + } else { + return sliceSubsliceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public java.util.List getSliceSubsliceIdsOrBuilderList() { + if (sliceSubsliceIdsBuilder_ != null) { + return sliceSubsliceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sliceSubsliceIds_); + } + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public context.ContextOuterClass.SliceId.Builder addSliceSubsliceIdsBuilder() { + return getSliceSubsliceIdsFieldBuilder().addBuilder(context.ContextOuterClass.SliceId.getDefaultInstance()); + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public context.ContextOuterClass.SliceId.Builder addSliceSubsliceIdsBuilder(int index) { + return getSliceSubsliceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.SliceId.getDefaultInstance()); + } + + /** + * repeated .context.SliceId slice_subslice_ids = 6; + */ + public java.util.List getSliceSubsliceIdsBuilderList() { + return getSliceSubsliceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSliceSubsliceIdsFieldBuilder() { + if (sliceSubsliceIdsBuilder_ == null) { + sliceSubsliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceSubsliceIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + sliceSubsliceIds_ = null; + } + return sliceSubsliceIdsBuilder_; + } + + private context.ContextOuterClass.SliceStatus sliceStatus_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceStatusBuilder_; + + /** + * .context.SliceStatus slice_status = 7; + * @return Whether the sliceStatus field is set. + */ + public boolean hasSliceStatus() { + return sliceStatusBuilder_ != null || sliceStatus_ != null; + } + + /** + * .context.SliceStatus slice_status = 7; + * @return The sliceStatus. + */ + public context.ContextOuterClass.SliceStatus getSliceStatus() { + if (sliceStatusBuilder_ == null) { + return sliceStatus_ == null ? context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; + } else { + return sliceStatusBuilder_.getMessage(); + } + } + + /** + * .context.SliceStatus slice_status = 7; + */ + public Builder setSliceStatus(context.ContextOuterClass.SliceStatus value) { + if (sliceStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceStatus_ = value; + onChanged(); + } else { + sliceStatusBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceStatus slice_status = 7; + */ + public Builder setSliceStatus(context.ContextOuterClass.SliceStatus.Builder builderForValue) { + if (sliceStatusBuilder_ == null) { + sliceStatus_ = builderForValue.build(); + onChanged(); + } else { + sliceStatusBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceStatus slice_status = 7; + */ + public Builder mergeSliceStatus(context.ContextOuterClass.SliceStatus value) { + if (sliceStatusBuilder_ == null) { + if (sliceStatus_ != null) { + sliceStatus_ = context.ContextOuterClass.SliceStatus.newBuilder(sliceStatus_).mergeFrom(value).buildPartial(); + } else { + sliceStatus_ = value; + } + onChanged(); + } else { + sliceStatusBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceStatus slice_status = 7; + */ + public Builder clearSliceStatus() { + if (sliceStatusBuilder_ == null) { + sliceStatus_ = null; + onChanged(); + } else { + sliceStatus_ = null; + sliceStatusBuilder_ = null; + } + return this; + } + + /** + * .context.SliceStatus slice_status = 7; + */ + public context.ContextOuterClass.SliceStatus.Builder getSliceStatusBuilder() { + onChanged(); + return getSliceStatusFieldBuilder().getBuilder(); + } + + /** + * .context.SliceStatus slice_status = 7; + */ + public context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder() { + if (sliceStatusBuilder_ != null) { + return sliceStatusBuilder_.getMessageOrBuilder(); + } else { + return sliceStatus_ == null ? context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; + } + } + + /** + * .context.SliceStatus slice_status = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceStatusFieldBuilder() { + if (sliceStatusBuilder_ == null) { + sliceStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceStatus(), getParentForChildren(), isClean()); + sliceStatus_ = null; + } + return sliceStatusBuilder_; + } + + private context.ContextOuterClass.SliceConfig sliceConfig_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceConfigBuilder_; + + /** + * .context.SliceConfig slice_config = 8; + * @return Whether the sliceConfig field is set. + */ + public boolean hasSliceConfig() { + return sliceConfigBuilder_ != null || sliceConfig_ != null; + } + + /** + * .context.SliceConfig slice_config = 8; + * @return The sliceConfig. + */ + public context.ContextOuterClass.SliceConfig getSliceConfig() { + if (sliceConfigBuilder_ == null) { + return sliceConfig_ == null ? context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; + } else { + return sliceConfigBuilder_.getMessage(); + } + } + + /** + * .context.SliceConfig slice_config = 8; + */ + public Builder setSliceConfig(context.ContextOuterClass.SliceConfig value) { + if (sliceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceConfig_ = value; + onChanged(); + } else { + sliceConfigBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceConfig slice_config = 8; + */ + public Builder setSliceConfig(context.ContextOuterClass.SliceConfig.Builder builderForValue) { + if (sliceConfigBuilder_ == null) { + sliceConfig_ = builderForValue.build(); + onChanged(); + } else { + sliceConfigBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceConfig slice_config = 8; + */ + public Builder mergeSliceConfig(context.ContextOuterClass.SliceConfig value) { + if (sliceConfigBuilder_ == null) { + if (sliceConfig_ != null) { + sliceConfig_ = context.ContextOuterClass.SliceConfig.newBuilder(sliceConfig_).mergeFrom(value).buildPartial(); + } else { + sliceConfig_ = value; + } + onChanged(); + } else { + sliceConfigBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceConfig slice_config = 8; + */ + public Builder clearSliceConfig() { + if (sliceConfigBuilder_ == null) { + sliceConfig_ = null; + onChanged(); + } else { + sliceConfig_ = null; + sliceConfigBuilder_ = null; + } + return this; + } + + /** + * .context.SliceConfig slice_config = 8; + */ + public context.ContextOuterClass.SliceConfig.Builder getSliceConfigBuilder() { + onChanged(); + return getSliceConfigFieldBuilder().getBuilder(); + } + + /** + * .context.SliceConfig slice_config = 8; + */ + public context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder() { + if (sliceConfigBuilder_ != null) { + return sliceConfigBuilder_.getMessageOrBuilder(); + } else { + return sliceConfig_ == null ? context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; + } + } + + /** + * .context.SliceConfig slice_config = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceConfigFieldBuilder() { + if (sliceConfigBuilder_ == null) { + sliceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceConfig(), getParentForChildren(), isClean()); + sliceConfig_ = null; + } + return sliceConfigBuilder_; + } + + private context.ContextOuterClass.SliceOwner sliceOwner_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceOwnerBuilder_; + + /** + * .context.SliceOwner slice_owner = 9; + * @return Whether the sliceOwner field is set. + */ + public boolean hasSliceOwner() { + return sliceOwnerBuilder_ != null || sliceOwner_ != null; + } + + /** + * .context.SliceOwner slice_owner = 9; + * @return The sliceOwner. + */ + public context.ContextOuterClass.SliceOwner getSliceOwner() { + if (sliceOwnerBuilder_ == null) { + return sliceOwner_ == null ? context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; + } else { + return sliceOwnerBuilder_.getMessage(); + } + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + public Builder setSliceOwner(context.ContextOuterClass.SliceOwner value) { + if (sliceOwnerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceOwner_ = value; + onChanged(); + } else { + sliceOwnerBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + public Builder setSliceOwner(context.ContextOuterClass.SliceOwner.Builder builderForValue) { + if (sliceOwnerBuilder_ == null) { + sliceOwner_ = builderForValue.build(); + onChanged(); + } else { + sliceOwnerBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + public Builder mergeSliceOwner(context.ContextOuterClass.SliceOwner value) { + if (sliceOwnerBuilder_ == null) { + if (sliceOwner_ != null) { + sliceOwner_ = context.ContextOuterClass.SliceOwner.newBuilder(sliceOwner_).mergeFrom(value).buildPartial(); + } else { + sliceOwner_ = value; + } + onChanged(); + } else { + sliceOwnerBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + public Builder clearSliceOwner() { + if (sliceOwnerBuilder_ == null) { + sliceOwner_ = null; + onChanged(); + } else { + sliceOwner_ = null; + sliceOwnerBuilder_ = null; + } + return this; + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + public context.ContextOuterClass.SliceOwner.Builder getSliceOwnerBuilder() { + onChanged(); + return getSliceOwnerFieldBuilder().getBuilder(); + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + public context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder() { + if (sliceOwnerBuilder_ != null) { + return sliceOwnerBuilder_.getMessageOrBuilder(); + } else { + return sliceOwner_ == null ? context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; + } + } + + /** + * .context.SliceOwner slice_owner = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceOwnerFieldBuilder() { + if (sliceOwnerBuilder_ == null) { + sliceOwnerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceOwner(), getParentForChildren(), isClean()); + sliceOwner_ = null; + } + return sliceOwnerBuilder_; + } + + private context.ContextOuterClass.Timestamp timestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; + + /** + * .context.Timestamp timestamp = 10; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 10; + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * .context.Timestamp timestamp = 10; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 10; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Timestamp timestamp = 10; + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 10; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + /** + * .context.Timestamp timestamp = 10; + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + + /** + * .context.Timestamp timestamp = 10; + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } + + /** + * .context.Timestamp timestamp = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Slice) + } + + // @@protoc_insertion_point(class_scope:context.Slice) + private static final context.ContextOuterClass.Slice DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Slice(); + } + + public static context.ContextOuterClass.Slice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Slice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceOwnerOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceOwner) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid owner_uuid = 1; + * @return Whether the ownerUuid field is set. + */ + boolean hasOwnerUuid(); + + /** + * .context.Uuid owner_uuid = 1; + * @return The ownerUuid. + */ + context.ContextOuterClass.Uuid getOwnerUuid(); + + /** + * .context.Uuid owner_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder(); + + /** + * string owner_string = 2; + * @return The ownerString. + */ + java.lang.String getOwnerString(); + + /** + * string owner_string = 2; + * @return The bytes for ownerString. + */ + com.google.protobuf.ByteString getOwnerStringBytes(); + } + + /** + * Protobuf type {@code context.SliceOwner} + */ + public static final class SliceOwner extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceOwner) + SliceOwnerOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceOwner.newBuilder() to construct. + private SliceOwner(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceOwner() { + ownerString_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceOwner_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceOwner.class, context.ContextOuterClass.SliceOwner.Builder.class); + } + + public static final int OWNER_UUID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid ownerUuid_; + + /** + * .context.Uuid owner_uuid = 1; + * @return Whether the ownerUuid field is set. + */ + @java.lang.Override + public boolean hasOwnerUuid() { + return ownerUuid_ != null; + } + + /** + * .context.Uuid owner_uuid = 1; + * @return The ownerUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getOwnerUuid() { + return ownerUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; + } + + /** + * .context.Uuid owner_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder() { + return getOwnerUuid(); + } + + public static final int OWNER_STRING_FIELD_NUMBER = 2; + + private volatile java.lang.Object ownerString_; + + /** + * string owner_string = 2; + * @return The ownerString. + */ + @java.lang.Override + public java.lang.String getOwnerString() { + java.lang.Object ref = ownerString_; + 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(); + ownerString_ = s; + return s; + } + } + + /** + * string owner_string = 2; + * @return The bytes for ownerString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOwnerStringBytes() { + java.lang.Object ref = ownerString_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ownerString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (ownerUuid_ != null) { + output.writeMessage(1, getOwnerUuid()); + } + if (!getOwnerStringBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ownerString_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (ownerUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOwnerUuid()); + } + if (!getOwnerStringBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ownerString_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceOwner)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceOwner other = (context.ContextOuterClass.SliceOwner) obj; + if (hasOwnerUuid() != other.hasOwnerUuid()) + return false; + if (hasOwnerUuid()) { + if (!getOwnerUuid().equals(other.getOwnerUuid())) + return false; + } + if (!getOwnerString().equals(other.getOwnerString())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOwnerUuid()) { + hash = (37 * hash) + OWNER_UUID_FIELD_NUMBER; + hash = (53 * hash) + getOwnerUuid().hashCode(); + } + hash = (37 * hash) + OWNER_STRING_FIELD_NUMBER; + hash = (53 * hash) + getOwnerString().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceOwner parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceOwner parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceOwner parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceOwner parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceOwner prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceOwner} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceOwner) + context.ContextOuterClass.SliceOwnerOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceOwner_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceOwner_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceOwner.class, context.ContextOuterClass.SliceOwner.Builder.class); + } + + // 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; + ownerUuidBuilder_ = null; + } + ownerString_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceOwner_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceOwner getDefaultInstanceForType() { + return context.ContextOuterClass.SliceOwner.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceOwner build() { + context.ContextOuterClass.SliceOwner result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceOwner) { + return mergeFrom((context.ContextOuterClass.SliceOwner) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceOwner other) { + if (other == context.ContextOuterClass.SliceOwner.getDefaultInstance()) + return this; + if (other.hasOwnerUuid()) { + mergeOwnerUuid(other.getOwnerUuid()); + } + if (!other.getOwnerString().isEmpty()) { + ownerString_ = other.ownerString_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceOwner) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid ownerUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 ownerUuidBuilder_; + + /** + * .context.Uuid owner_uuid = 1; + * @return Whether the ownerUuid field is set. + */ + public boolean hasOwnerUuid() { + return ownerUuidBuilder_ != null || ownerUuid_ != null; + } + + /** + * .context.Uuid owner_uuid = 1; + * @return The ownerUuid. + */ + public context.ContextOuterClass.Uuid getOwnerUuid() { + if (ownerUuidBuilder_ == null) { + return ownerUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; + } else { + return ownerUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid owner_uuid = 1; + */ + public Builder setOwnerUuid(context.ContextOuterClass.Uuid value) { + if (ownerUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ownerUuid_ = value; + onChanged(); + } else { + ownerUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid owner_uuid = 1; + */ + public Builder setOwnerUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (ownerUuidBuilder_ == null) { + ownerUuid_ = builderForValue.build(); + onChanged(); + } else { + ownerUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid owner_uuid = 1; + */ + public Builder mergeOwnerUuid(context.ContextOuterClass.Uuid value) { + if (ownerUuidBuilder_ == null) { + if (ownerUuid_ != null) { + ownerUuid_ = context.ContextOuterClass.Uuid.newBuilder(ownerUuid_).mergeFrom(value).buildPartial(); + } else { + ownerUuid_ = value; + } + onChanged(); + } else { + ownerUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid owner_uuid = 1; + */ + public Builder clearOwnerUuid() { + if (ownerUuidBuilder_ == null) { + ownerUuid_ = null; + onChanged(); + } else { + ownerUuid_ = null; + ownerUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid owner_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getOwnerUuidBuilder() { + onChanged(); + return getOwnerUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid owner_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder() { + if (ownerUuidBuilder_ != null) { + return ownerUuidBuilder_.getMessageOrBuilder(); + } else { + return ownerUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; + } + } + + /** + * .context.Uuid owner_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getOwnerUuidFieldBuilder() { + if (ownerUuidBuilder_ == null) { + ownerUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOwnerUuid(), getParentForChildren(), isClean()); + ownerUuid_ = null; + } + return ownerUuidBuilder_; + } + + private java.lang.Object ownerString_ = ""; + + /** + * string owner_string = 2; + * @return The ownerString. + */ + public java.lang.String getOwnerString() { + java.lang.Object ref = ownerString_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ownerString_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string owner_string = 2; + * @return The bytes for ownerString. + */ + public com.google.protobuf.ByteString getOwnerStringBytes() { + java.lang.Object ref = ownerString_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ownerString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string owner_string = 2; + * @param value The ownerString to set. + * @return This builder for chaining. + */ + public Builder setOwnerString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ownerString_ = value; + onChanged(); + return this; + } + + /** + * string owner_string = 2; + * @return This builder for chaining. + */ + public Builder clearOwnerString() { + ownerString_ = getDefaultInstance().getOwnerString(); + onChanged(); + return this; + } + + /** + * string owner_string = 2; + * @param value The bytes for ownerString to set. + * @return This builder for chaining. + */ + public Builder setOwnerStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ownerString_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceOwner) + } + + // @@protoc_insertion_point(class_scope:context.SliceOwner) + private static final context.ContextOuterClass.SliceOwner DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceOwner(); + } + + public static context.ContextOuterClass.SliceOwner getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceOwner getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceStatusOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return The enum numeric value on the wire for sliceStatus. + */ + int getSliceStatusValue(); + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return The sliceStatus. + */ + context.ContextOuterClass.SliceStatusEnum getSliceStatus(); + } + + /** + * Protobuf type {@code context.SliceStatus} + */ + public static final class SliceStatus extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceStatus) + SliceStatusOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceStatus.newBuilder() to construct. + private SliceStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceStatus() { + sliceStatus_ = 0; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceStatus_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceStatus.class, context.ContextOuterClass.SliceStatus.Builder.class); + } + + public static final int SLICE_STATUS_FIELD_NUMBER = 1; + + private int sliceStatus_; + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return The enum numeric value on the wire for sliceStatus. + */ + @java.lang.Override + public int getSliceStatusValue() { + return sliceStatus_; + } + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return The sliceStatus. + */ + @java.lang.Override + public context.ContextOuterClass.SliceStatusEnum getSliceStatus() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.valueOf(sliceStatus_); + return result == null ? context.ContextOuterClass.SliceStatusEnum.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sliceStatus_ != context.ContextOuterClass.SliceStatusEnum.SLICESTATUS_UNDEFINED.getNumber()) { + output.writeEnum(1, sliceStatus_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (sliceStatus_ != context.ContextOuterClass.SliceStatusEnum.SLICESTATUS_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, sliceStatus_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceStatus)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceStatus other = (context.ContextOuterClass.SliceStatus) obj; + if (sliceStatus_ != other.sliceStatus_) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SLICE_STATUS_FIELD_NUMBER; + hash = (53 * hash) + sliceStatus_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceStatus parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceStatus parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceStatus parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceStatus parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceStatus) + context.ContextOuterClass.SliceStatusOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceStatus_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceStatus.class, context.ContextOuterClass.SliceStatus.Builder.class); + } + + // 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(); + sliceStatus_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceStatus_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceStatus getDefaultInstanceForType() { + return context.ContextOuterClass.SliceStatus.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceStatus build() { + context.ContextOuterClass.SliceStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.SliceStatus buildPartial() { + context.ContextOuterClass.SliceStatus result = new context.ContextOuterClass.SliceStatus(this); + result.sliceStatus_ = sliceStatus_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceStatus) { + return mergeFrom((context.ContextOuterClass.SliceStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceStatus other) { + if (other == context.ContextOuterClass.SliceStatus.getDefaultInstance()) + return this; + if (other.sliceStatus_ != 0) { + setSliceStatusValue(other.getSliceStatusValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sliceStatus_ = 0; + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return The enum numeric value on the wire for sliceStatus. + */ + @java.lang.Override + public int getSliceStatusValue() { + return sliceStatus_; + } + + /** + * .context.SliceStatusEnum slice_status = 1; + * @param value The enum numeric value on the wire for sliceStatus to set. + * @return This builder for chaining. + */ + public Builder setSliceStatusValue(int value) { + sliceStatus_ = value; + onChanged(); + return this; + } + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return The sliceStatus. + */ + @java.lang.Override + public context.ContextOuterClass.SliceStatusEnum getSliceStatus() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.valueOf(sliceStatus_); + return result == null ? context.ContextOuterClass.SliceStatusEnum.UNRECOGNIZED : result; + } + + /** + * .context.SliceStatusEnum slice_status = 1; + * @param value The sliceStatus to set. + * @return This builder for chaining. + */ + public Builder setSliceStatus(context.ContextOuterClass.SliceStatusEnum value) { + if (value == null) { + throw new NullPointerException(); + } + sliceStatus_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.SliceStatusEnum slice_status = 1; + * @return This builder for chaining. + */ + public Builder clearSliceStatus() { + sliceStatus_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceStatus) + } + + // @@protoc_insertion_point(class_scope:context.SliceStatus) + private static final context.ContextOuterClass.SliceStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceStatus(); + } + + public static context.ContextOuterClass.SliceStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + java.util.List getConfigRulesList(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + context.ContextOuterClass.ConfigRule getConfigRules(int index); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + int getConfigRulesCount(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + java.util.List getConfigRulesOrBuilderList(); + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.SliceConfig} + */ + public static final class SliceConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceConfig) + SliceConfigOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceConfig.newBuilder() to construct. + private SliceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceConfig() { + configRules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceConfig.class, context.ContextOuterClass.SliceConfig.Builder.class); + } + + public static final int CONFIG_RULES_FIELD_NUMBER = 1; + + private java.util.List configRules_; + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public java.util.List getConfigRulesList() { + return configRules_; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public java.util.List getConfigRulesOrBuilderList() { + return configRules_; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public int getConfigRulesCount() { + return configRules_.size(); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule getConfigRules(int index) { + return configRules_.get(index); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index) { + return configRules_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < configRules_.size(); i++) { + output.writeMessage(1, configRules_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < configRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configRules_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceConfig)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceConfig other = (context.ContextOuterClass.SliceConfig) obj; + if (!getConfigRulesList().equals(other.getConfigRulesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConfigRulesCount() > 0) { + hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; + hash = (53 * hash) + getConfigRulesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceConfig) + context.ContextOuterClass.SliceConfigOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceConfig.class, context.ContextOuterClass.SliceConfig.Builder.class); + } + + // 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(); + if (configRulesBuilder_ == null) { + configRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + configRulesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceConfig_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceConfig getDefaultInstanceForType() { + return context.ContextOuterClass.SliceConfig.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceConfig build() { + context.ContextOuterClass.SliceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.SliceConfig buildPartial() { + context.ContextOuterClass.SliceConfig result = new context.ContextOuterClass.SliceConfig(this); + int from_bitField0_ = bitField0_; + if (configRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + configRules_ = java.util.Collections.unmodifiableList(configRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.configRules_ = configRules_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceConfig) { + return mergeFrom((context.ContextOuterClass.SliceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceConfig other) { + if (other == context.ContextOuterClass.SliceConfig.getDefaultInstance()) + return this; + if (configRulesBuilder_ == null) { + if (!other.configRules_.isEmpty()) { + if (configRules_.isEmpty()) { + configRules_ = other.configRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfigRulesIsMutable(); + configRules_.addAll(other.configRules_); + } + onChanged(); + } + } else { + if (!other.configRules_.isEmpty()) { + if (configRulesBuilder_.isEmpty()) { + configRulesBuilder_.dispose(); + configRulesBuilder_ = null; + configRules_ = other.configRules_; + bitField0_ = (bitField0_ & ~0x00000001); + configRulesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConfigRulesFieldBuilder() : null; + } else { + configRulesBuilder_.addAllMessages(other.configRules_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List configRules_ = java.util.Collections.emptyList(); + + private void ensureConfigRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + configRules_ = new java.util.ArrayList(configRules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 configRulesBuilder_; + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesList() { + if (configRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(configRules_); + } else { + return configRulesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public int getConfigRulesCount() { + if (configRulesBuilder_ == null) { + return configRules_.size(); + } else { + return configRulesBuilder_.getCount(); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule getConfigRules(int index) { + if (configRulesBuilder_ == null) { + return configRules_.get(index); + } else { + return configRulesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder setConfigRules(int index, context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.set(index, value); + onChanged(); + } else { + configRulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder setConfigRules(int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.set(index, builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.add(value); + onChanged(); + } else { + configRulesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(int index, context.ContextOuterClass.ConfigRule value) { + if (configRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigRulesIsMutable(); + configRules_.add(index, value); + onChanged(); + } else { + configRulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addConfigRules(int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(index, builderForValue.build()); + onChanged(); + } else { + configRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder addAllConfigRules(java.lang.Iterable values) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, configRules_); + onChanged(); + } else { + configRulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder clearConfigRules() { + if (configRulesBuilder_ == null) { + configRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + configRulesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public Builder removeConfigRules(int index) { + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.remove(index); + onChanged(); + } else { + configRulesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder getConfigRulesBuilder(int index) { + return getConfigRulesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder(int index) { + if (configRulesBuilder_ == null) { + return configRules_.get(index); + } else { + return configRulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesOrBuilderList() { + if (configRulesBuilder_ != null) { + return configRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configRules_); + } + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder() { + return getConfigRulesFieldBuilder().addBuilder(context.ContextOuterClass.ConfigRule.getDefaultInstance()); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder(int index) { + return getConfigRulesFieldBuilder().addBuilder(index, context.ContextOuterClass.ConfigRule.getDefaultInstance()); + } + + /** + * repeated .context.ConfigRule config_rules = 1; + */ + public java.util.List getConfigRulesBuilderList() { + return getConfigRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getConfigRulesFieldBuilder() { + if (configRulesBuilder_ == null) { + configRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(configRules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + configRules_ = null; + } + return configRulesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceConfig) + } + + // @@protoc_insertion_point(class_scope:context.SliceConfig) + private static final context.ContextOuterClass.SliceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceConfig(); + } + + public static context.ContextOuterClass.SliceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.SliceId slice_ids = 1; + */ + java.util.List getSliceIdsList(); + + /** + * repeated .context.SliceId slice_ids = 1; + */ + context.ContextOuterClass.SliceId getSliceIds(int index); + + /** + * repeated .context.SliceId slice_ids = 1; + */ + int getSliceIdsCount(); + + /** + * repeated .context.SliceId slice_ids = 1; + */ + java.util.List getSliceIdsOrBuilderList(); + + /** + * repeated .context.SliceId slice_ids = 1; + */ + context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.SliceIdList} + */ + public static final class SliceIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceIdList) + SliceIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceIdList.newBuilder() to construct. + private SliceIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceIdList() { + sliceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceIdList.class, context.ContextOuterClass.SliceIdList.Builder.class); + } + + public static final int SLICE_IDS_FIELD_NUMBER = 1; + + private java.util.List sliceIds_; + + /** + * repeated .context.SliceId slice_ids = 1; + */ + @java.lang.Override + public java.util.List getSliceIdsList() { + return sliceIds_; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + @java.lang.Override + public java.util.List getSliceIdsOrBuilderList() { + return sliceIds_; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + @java.lang.Override + public int getSliceIdsCount() { + return sliceIds_.size(); + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.SliceId getSliceIds(int index) { + return sliceIds_.get(index); + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder(int index) { + return sliceIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < sliceIds_.size(); i++) { + output.writeMessage(1, sliceIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < sliceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, sliceIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceIdList other = (context.ContextOuterClass.SliceIdList) obj; + if (!getSliceIdsList().equals(other.getSliceIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSliceIdsCount() > 0) { + hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSliceIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceIdList) + context.ContextOuterClass.SliceIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceIdList.class, context.ContextOuterClass.SliceIdList.Builder.class); + } + + // 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(); + if (sliceIdsBuilder_ == null) { + sliceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + sliceIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceIdList getDefaultInstanceForType() { + return context.ContextOuterClass.SliceIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceIdList build() { + context.ContextOuterClass.SliceIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.SliceIdList buildPartial() { + context.ContextOuterClass.SliceIdList result = new context.ContextOuterClass.SliceIdList(this); + int from_bitField0_ = bitField0_; + if (sliceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sliceIds_ = sliceIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceIdList) { + return mergeFrom((context.ContextOuterClass.SliceIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceIdList other) { + if (other == context.ContextOuterClass.SliceIdList.getDefaultInstance()) + return this; + if (sliceIdsBuilder_ == null) { + if (!other.sliceIds_.isEmpty()) { + if (sliceIds_.isEmpty()) { + sliceIds_ = other.sliceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSliceIdsIsMutable(); + sliceIds_.addAll(other.sliceIds_); + } + onChanged(); + } + } else { + if (!other.sliceIds_.isEmpty()) { + if (sliceIdsBuilder_.isEmpty()) { + sliceIdsBuilder_.dispose(); + sliceIdsBuilder_ = null; + sliceIds_ = other.sliceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + sliceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceIdsFieldBuilder() : null; + } else { + sliceIdsBuilder_.addAllMessages(other.sliceIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List sliceIds_ = java.util.Collections.emptyList(); + + private void ensureSliceIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sliceIds_ = new java.util.ArrayList(sliceIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 sliceIdsBuilder_; + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public java.util.List getSliceIdsList() { + if (sliceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sliceIds_); + } else { + return sliceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public int getSliceIdsCount() { + if (sliceIdsBuilder_ == null) { + return sliceIds_.size(); + } else { + return sliceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public context.ContextOuterClass.SliceId getSliceIds(int index) { + if (sliceIdsBuilder_ == null) { + return sliceIds_.get(index); + } else { + return sliceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder setSliceIds(int index, context.ContextOuterClass.SliceId value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceIdsIsMutable(); + sliceIds_.set(index, value); + onChanged(); + } else { + sliceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder setSliceIds(int index, context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + sliceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder addSliceIds(context.ContextOuterClass.SliceId value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceIdsIsMutable(); + sliceIds_.add(value); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder addSliceIds(int index, context.ContextOuterClass.SliceId value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSliceIdsIsMutable(); + sliceIds_.add(index, value); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder addSliceIds(context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.add(builderForValue.build()); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder addSliceIds(int index, context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + sliceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder addAllSliceIds(java.lang.Iterable values) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sliceIds_); + onChanged(); + } else { + sliceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder clearSliceIds() { + if (sliceIdsBuilder_ == null) { + sliceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sliceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public Builder removeSliceIds(int index) { + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.remove(index); + onChanged(); + } else { + sliceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public context.ContextOuterClass.SliceId.Builder getSliceIdsBuilder(int index) { + return getSliceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder(int index) { + if (sliceIdsBuilder_ == null) { + return sliceIds_.get(index); + } else { + return sliceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public java.util.List getSliceIdsOrBuilderList() { + if (sliceIdsBuilder_ != null) { + return sliceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sliceIds_); + } + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder() { + return getSliceIdsFieldBuilder().addBuilder(context.ContextOuterClass.SliceId.getDefaultInstance()); + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder(int index) { + return getSliceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.SliceId.getDefaultInstance()); + } + + /** + * repeated .context.SliceId slice_ids = 1; + */ + public java.util.List getSliceIdsBuilderList() { + return getSliceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSliceIdsFieldBuilder() { + if (sliceIdsBuilder_ == null) { + sliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(sliceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + sliceIds_ = null; + } + return sliceIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceIdList) + } + + // @@protoc_insertion_point(class_scope:context.SliceIdList) + private static final context.ContextOuterClass.SliceIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceIdList(); + } + + public static context.ContextOuterClass.SliceIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Slice slices = 1; + */ + java.util.List getSlicesList(); + + /** + * repeated .context.Slice slices = 1; + */ + context.ContextOuterClass.Slice getSlices(int index); + + /** + * repeated .context.Slice slices = 1; + */ + int getSlicesCount(); + + /** + * repeated .context.Slice slices = 1; + */ + java.util.List getSlicesOrBuilderList(); + + /** + * repeated .context.Slice slices = 1; + */ + context.ContextOuterClass.SliceOrBuilder getSlicesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.SliceList} + */ + public static final class SliceList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceList) + SliceListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceList.newBuilder() to construct. + private SliceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceList() { + slices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceList.class, context.ContextOuterClass.SliceList.Builder.class); + } + + public static final int SLICES_FIELD_NUMBER = 1; + + private java.util.List slices_; + + /** + * repeated .context.Slice slices = 1; + */ + @java.lang.Override + public java.util.List getSlicesList() { + return slices_; + } + + /** + * repeated .context.Slice slices = 1; + */ + @java.lang.Override + public java.util.List getSlicesOrBuilderList() { + return slices_; + } + + /** + * repeated .context.Slice slices = 1; + */ + @java.lang.Override + public int getSlicesCount() { + return slices_.size(); + } + + /** + * repeated .context.Slice slices = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Slice getSlices(int index) { + return slices_.get(index); + } + + /** + * repeated .context.Slice slices = 1; + */ + @java.lang.Override + public context.ContextOuterClass.SliceOrBuilder getSlicesOrBuilder(int index) { + return slices_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < slices_.size(); i++) { + output.writeMessage(1, slices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < slices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, slices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceList)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceList other = (context.ContextOuterClass.SliceList) obj; + if (!getSlicesList().equals(other.getSlicesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSlicesCount() > 0) { + hash = (37 * hash) + SLICES_FIELD_NUMBER; + hash = (53 * hash) + getSlicesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceList) + context.ContextOuterClass.SliceListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceList.class, context.ContextOuterClass.SliceList.Builder.class); + } + + // 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(); + if (slicesBuilder_ == null) { + slices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + slicesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceList getDefaultInstanceForType() { + return context.ContextOuterClass.SliceList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceList build() { + context.ContextOuterClass.SliceList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.SliceList buildPartial() { + context.ContextOuterClass.SliceList result = new context.ContextOuterClass.SliceList(this); + int from_bitField0_ = bitField0_; + if (slicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + slices_ = java.util.Collections.unmodifiableList(slices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.slices_ = slices_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceList) { + return mergeFrom((context.ContextOuterClass.SliceList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceList other) { + if (other == context.ContextOuterClass.SliceList.getDefaultInstance()) + return this; + if (slicesBuilder_ == null) { + if (!other.slices_.isEmpty()) { + if (slices_.isEmpty()) { + slices_ = other.slices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSlicesIsMutable(); + slices_.addAll(other.slices_); + } + onChanged(); + } + } else { + if (!other.slices_.isEmpty()) { + if (slicesBuilder_.isEmpty()) { + slicesBuilder_.dispose(); + slicesBuilder_ = null; + slices_ = other.slices_; + bitField0_ = (bitField0_ & ~0x00000001); + slicesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSlicesFieldBuilder() : null; + } else { + slicesBuilder_.addAllMessages(other.slices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List slices_ = java.util.Collections.emptyList(); + + private void ensureSlicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + slices_ = new java.util.ArrayList(slices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 slicesBuilder_; + + /** + * repeated .context.Slice slices = 1; + */ + public java.util.List getSlicesList() { + if (slicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(slices_); + } else { + return slicesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Slice slices = 1; + */ + public int getSlicesCount() { + if (slicesBuilder_ == null) { + return slices_.size(); + } else { + return slicesBuilder_.getCount(); + } + } + + /** + * repeated .context.Slice slices = 1; + */ + public context.ContextOuterClass.Slice getSlices(int index) { + if (slicesBuilder_ == null) { + return slices_.get(index); + } else { + return slicesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder setSlices(int index, context.ContextOuterClass.Slice value) { + if (slicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSlicesIsMutable(); + slices_.set(index, value); + onChanged(); + } else { + slicesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder setSlices(int index, context.ContextOuterClass.Slice.Builder builderForValue) { + if (slicesBuilder_ == null) { + ensureSlicesIsMutable(); + slices_.set(index, builderForValue.build()); + onChanged(); + } else { + slicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder addSlices(context.ContextOuterClass.Slice value) { + if (slicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSlicesIsMutable(); + slices_.add(value); + onChanged(); + } else { + slicesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder addSlices(int index, context.ContextOuterClass.Slice value) { + if (slicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSlicesIsMutable(); + slices_.add(index, value); + onChanged(); + } else { + slicesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder addSlices(context.ContextOuterClass.Slice.Builder builderForValue) { + if (slicesBuilder_ == null) { + ensureSlicesIsMutable(); + slices_.add(builderForValue.build()); + onChanged(); + } else { + slicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder addSlices(int index, context.ContextOuterClass.Slice.Builder builderForValue) { + if (slicesBuilder_ == null) { + ensureSlicesIsMutable(); + slices_.add(index, builderForValue.build()); + onChanged(); + } else { + slicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder addAllSlices(java.lang.Iterable values) { + if (slicesBuilder_ == null) { + ensureSlicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, slices_); + onChanged(); + } else { + slicesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder clearSlices() { + if (slicesBuilder_ == null) { + slices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + slicesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public Builder removeSlices(int index) { + if (slicesBuilder_ == null) { + ensureSlicesIsMutable(); + slices_.remove(index); + onChanged(); + } else { + slicesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Slice slices = 1; + */ + public context.ContextOuterClass.Slice.Builder getSlicesBuilder(int index) { + return getSlicesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Slice slices = 1; + */ + public context.ContextOuterClass.SliceOrBuilder getSlicesOrBuilder(int index) { + if (slicesBuilder_ == null) { + return slices_.get(index); + } else { + return slicesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Slice slices = 1; + */ + public java.util.List getSlicesOrBuilderList() { + if (slicesBuilder_ != null) { + return slicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(slices_); + } + } + + /** + * repeated .context.Slice slices = 1; + */ + public context.ContextOuterClass.Slice.Builder addSlicesBuilder() { + return getSlicesFieldBuilder().addBuilder(context.ContextOuterClass.Slice.getDefaultInstance()); + } + + /** + * repeated .context.Slice slices = 1; + */ + public context.ContextOuterClass.Slice.Builder addSlicesBuilder(int index) { + return getSlicesFieldBuilder().addBuilder(index, context.ContextOuterClass.Slice.getDefaultInstance()); + } + + /** + * repeated .context.Slice slices = 1; + */ + public java.util.List getSlicesBuilderList() { + return getSlicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSlicesFieldBuilder() { + if (slicesBuilder_ == null) { + slicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(slices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + slices_ = null; + } + return slicesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceList) + } + + // @@protoc_insertion_point(class_scope:context.SliceList) + private static final context.ContextOuterClass.SliceList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceList(); + } + + public static context.ContextOuterClass.SliceList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceFilterOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.SliceIdList slice_ids = 1; + * @return Whether the sliceIds field is set. + */ + boolean hasSliceIds(); + + /** + * .context.SliceIdList slice_ids = 1; + * @return The sliceIds. + */ + context.ContextOuterClass.SliceIdList getSliceIds(); + + /** + * .context.SliceIdList slice_ids = 1; + */ + context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder(); + + /** + * bool include_endpoint_ids = 2; + * @return The includeEndpointIds. + */ + boolean getIncludeEndpointIds(); + + /** + * bool include_constraints = 3; + * @return The includeConstraints. + */ + boolean getIncludeConstraints(); + + /** + * bool include_service_ids = 4; + * @return The includeServiceIds. + */ + boolean getIncludeServiceIds(); + + /** + * bool include_subslice_ids = 5; + * @return The includeSubsliceIds. + */ + boolean getIncludeSubsliceIds(); + + /** + * bool include_config_rules = 6; + * @return The includeConfigRules. + */ + boolean getIncludeConfigRules(); + } + + /** + * Protobuf type {@code context.SliceFilter} + */ + public static final class SliceFilter extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceFilter) + SliceFilterOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceFilter.newBuilder() to construct. + private SliceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceFilter() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceFilter_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceFilter.class, context.ContextOuterClass.SliceFilter.Builder.class); + } + + public static final int SLICE_IDS_FIELD_NUMBER = 1; + + private context.ContextOuterClass.SliceIdList sliceIds_; + + /** + * .context.SliceIdList slice_ids = 1; + * @return Whether the sliceIds field is set. + */ + @java.lang.Override + public boolean hasSliceIds() { + return sliceIds_ != null; + } + + /** + * .context.SliceIdList slice_ids = 1; + * @return The sliceIds. + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdList getSliceIds() { + return sliceIds_ == null ? context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder() { + return getSliceIds(); + } + + public static final int INCLUDE_ENDPOINT_IDS_FIELD_NUMBER = 2; + + private boolean includeEndpointIds_; + + /** + * bool include_endpoint_ids = 2; + * @return The includeEndpointIds. + */ + @java.lang.Override + public boolean getIncludeEndpointIds() { + return includeEndpointIds_; + } + + public static final int INCLUDE_CONSTRAINTS_FIELD_NUMBER = 3; + + private boolean includeConstraints_; + + /** + * bool include_constraints = 3; + * @return The includeConstraints. + */ + @java.lang.Override + public boolean getIncludeConstraints() { + return includeConstraints_; + } + + public static final int INCLUDE_SERVICE_IDS_FIELD_NUMBER = 4; + + private boolean includeServiceIds_; + + /** + * bool include_service_ids = 4; + * @return The includeServiceIds. + */ + @java.lang.Override + public boolean getIncludeServiceIds() { + return includeServiceIds_; + } + + public static final int INCLUDE_SUBSLICE_IDS_FIELD_NUMBER = 5; + + private boolean includeSubsliceIds_; + + /** + * bool include_subslice_ids = 5; + * @return The includeSubsliceIds. + */ + @java.lang.Override + public boolean getIncludeSubsliceIds() { + return includeSubsliceIds_; + } + + public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 6; + + private boolean includeConfigRules_; + + /** + * bool include_config_rules = 6; + * @return The includeConfigRules. + */ + @java.lang.Override + public boolean getIncludeConfigRules() { + return includeConfigRules_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sliceIds_ != null) { + output.writeMessage(1, getSliceIds()); + } + if (includeEndpointIds_ != false) { + output.writeBool(2, includeEndpointIds_); + } + if (includeConstraints_ != false) { + output.writeBool(3, includeConstraints_); + } + if (includeServiceIds_ != false) { + output.writeBool(4, includeServiceIds_); + } + if (includeSubsliceIds_ != false) { + output.writeBool(5, includeSubsliceIds_); + } + if (includeConfigRules_ != false) { + output.writeBool(6, includeConfigRules_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (sliceIds_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSliceIds()); + } + if (includeEndpointIds_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeEndpointIds_); + } + if (includeConstraints_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, includeConstraints_); + } + if (includeServiceIds_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeServiceIds_); + } + if (includeSubsliceIds_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, includeSubsliceIds_); + } + if (includeConfigRules_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, includeConfigRules_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceFilter)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceFilter other = (context.ContextOuterClass.SliceFilter) obj; + if (hasSliceIds() != other.hasSliceIds()) + return false; + if (hasSliceIds()) { + if (!getSliceIds().equals(other.getSliceIds())) + return false; + } + if (getIncludeEndpointIds() != other.getIncludeEndpointIds()) + return false; + if (getIncludeConstraints() != other.getIncludeConstraints()) + return false; + if (getIncludeServiceIds() != other.getIncludeServiceIds()) + return false; + if (getIncludeSubsliceIds() != other.getIncludeSubsliceIds()) + return false; + if (getIncludeConfigRules() != other.getIncludeConfigRules()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSliceIds()) { + hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSliceIds().hashCode(); + } + hash = (37 * hash) + INCLUDE_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeEndpointIds()); + hash = (37 * hash) + INCLUDE_CONSTRAINTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeConstraints()); + hash = (37 * hash) + INCLUDE_SERVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeServiceIds()); + hash = (37 * hash) + INCLUDE_SUBSLICE_IDS_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceFilter parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceFilter parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceFilter parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceFilter parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceFilter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceFilter) + context.ContextOuterClass.SliceFilterOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceFilter_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceFilter.class, context.ContextOuterClass.SliceFilter.Builder.class); + } + + // 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; + sliceIdsBuilder_ = null; + } + includeEndpointIds_ = false; + includeConstraints_ = false; + includeServiceIds_ = false; + includeSubsliceIds_ = false; + includeConfigRules_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceFilter_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceFilter getDefaultInstanceForType() { + return context.ContextOuterClass.SliceFilter.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceFilter build() { + context.ContextOuterClass.SliceFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceFilter) { + return mergeFrom((context.ContextOuterClass.SliceFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceFilter other) { + if (other == context.ContextOuterClass.SliceFilter.getDefaultInstance()) + return this; + if (other.hasSliceIds()) { + mergeSliceIds(other.getSliceIds()); + } + if (other.getIncludeEndpointIds() != false) { + setIncludeEndpointIds(other.getIncludeEndpointIds()); + } + if (other.getIncludeConstraints() != false) { + setIncludeConstraints(other.getIncludeConstraints()); + } + if (other.getIncludeServiceIds() != false) { + setIncludeServiceIds(other.getIncludeServiceIds()); + } + if (other.getIncludeSubsliceIds() != false) { + setIncludeSubsliceIds(other.getIncludeSubsliceIds()); + } + if (other.getIncludeConfigRules() != false) { + setIncludeConfigRules(other.getIncludeConfigRules()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.SliceIdList sliceIds_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceIdsBuilder_; + + /** + * .context.SliceIdList slice_ids = 1; + * @return Whether the sliceIds field is set. + */ + public boolean hasSliceIds() { + return sliceIdsBuilder_ != null || sliceIds_ != null; + } + + /** + * .context.SliceIdList slice_ids = 1; + * @return The sliceIds. + */ + public context.ContextOuterClass.SliceIdList getSliceIds() { + if (sliceIdsBuilder_ == null) { + return sliceIds_ == null ? context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; + } else { + return sliceIdsBuilder_.getMessage(); + } + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + public Builder setSliceIds(context.ContextOuterClass.SliceIdList value) { + if (sliceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceIds_ = value; + onChanged(); + } else { + sliceIdsBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + public Builder setSliceIds(context.ContextOuterClass.SliceIdList.Builder builderForValue) { + if (sliceIdsBuilder_ == null) { + sliceIds_ = builderForValue.build(); + onChanged(); + } else { + sliceIdsBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + public Builder mergeSliceIds(context.ContextOuterClass.SliceIdList value) { + if (sliceIdsBuilder_ == null) { + if (sliceIds_ != null) { + sliceIds_ = context.ContextOuterClass.SliceIdList.newBuilder(sliceIds_).mergeFrom(value).buildPartial(); + } else { + sliceIds_ = value; + } + onChanged(); + } else { + sliceIdsBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + public Builder clearSliceIds() { + if (sliceIdsBuilder_ == null) { + sliceIds_ = null; + onChanged(); + } else { + sliceIds_ = null; + sliceIdsBuilder_ = null; + } + return this; + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + public context.ContextOuterClass.SliceIdList.Builder getSliceIdsBuilder() { + onChanged(); + return getSliceIdsFieldBuilder().getBuilder(); + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + public context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder() { + if (sliceIdsBuilder_ != null) { + return sliceIdsBuilder_.getMessageOrBuilder(); + } else { + return sliceIds_ == null ? context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; + } + } + + /** + * .context.SliceIdList slice_ids = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceIdsFieldBuilder() { + if (sliceIdsBuilder_ == null) { + sliceIdsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceIds(), getParentForChildren(), isClean()); + sliceIds_ = null; + } + return sliceIdsBuilder_; + } + + private boolean includeEndpointIds_; + + /** + * bool include_endpoint_ids = 2; + * @return The includeEndpointIds. + */ + @java.lang.Override + public boolean getIncludeEndpointIds() { + return includeEndpointIds_; + } + + /** + * bool include_endpoint_ids = 2; + * @param value The includeEndpointIds to set. + * @return This builder for chaining. + */ + public Builder setIncludeEndpointIds(boolean value) { + includeEndpointIds_ = value; + onChanged(); + return this; + } + + /** + * bool include_endpoint_ids = 2; + * @return This builder for chaining. + */ + public Builder clearIncludeEndpointIds() { + includeEndpointIds_ = false; + onChanged(); + return this; + } + + private boolean includeConstraints_; + + /** + * bool include_constraints = 3; + * @return The includeConstraints. + */ + @java.lang.Override + public boolean getIncludeConstraints() { + return includeConstraints_; + } + + /** + * bool include_constraints = 3; + * @param value The includeConstraints to set. + * @return This builder for chaining. + */ + public Builder setIncludeConstraints(boolean value) { + includeConstraints_ = value; + onChanged(); + return this; + } + + /** + * bool include_constraints = 3; + * @return This builder for chaining. + */ + public Builder clearIncludeConstraints() { + includeConstraints_ = false; + onChanged(); + return this; + } + + private boolean includeServiceIds_; + + /** + * bool include_service_ids = 4; + * @return The includeServiceIds. + */ + @java.lang.Override + public boolean getIncludeServiceIds() { + return includeServiceIds_; + } + + /** + * bool include_service_ids = 4; + * @param value The includeServiceIds to set. + * @return This builder for chaining. + */ + public Builder setIncludeServiceIds(boolean value) { + includeServiceIds_ = value; + onChanged(); + return this; + } + + /** + * bool include_service_ids = 4; + * @return This builder for chaining. + */ + public Builder clearIncludeServiceIds() { + includeServiceIds_ = false; + onChanged(); + return this; + } + + private boolean includeSubsliceIds_; + + /** + * bool include_subslice_ids = 5; + * @return The includeSubsliceIds. + */ + @java.lang.Override + public boolean getIncludeSubsliceIds() { + return includeSubsliceIds_; + } + + /** + * bool include_subslice_ids = 5; + * @param value The includeSubsliceIds to set. + * @return This builder for chaining. + */ + public Builder setIncludeSubsliceIds(boolean value) { + includeSubsliceIds_ = value; + onChanged(); + return this; + } + + /** + * bool include_subslice_ids = 5; + * @return This builder for chaining. + */ + public Builder clearIncludeSubsliceIds() { + includeSubsliceIds_ = false; + onChanged(); + return this; + } + + private boolean includeConfigRules_; + + /** + * bool include_config_rules = 6; + * @return The includeConfigRules. + */ + @java.lang.Override + public boolean getIncludeConfigRules() { + return includeConfigRules_; + } + + /** + * bool include_config_rules = 6; + * @param value The includeConfigRules to set. + * @return This builder for chaining. + */ + public Builder setIncludeConfigRules(boolean value) { + includeConfigRules_ = value; + onChanged(); + return this; + } + + /** + * bool include_config_rules = 6; + * @return This builder for chaining. + */ + public Builder clearIncludeConfigRules() { + includeConfigRules_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceFilter) + } + + // @@protoc_insertion_point(class_scope:context.SliceFilter) + private static final context.ContextOuterClass.SliceFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceFilter(); + } + + public static context.ContextOuterClass.SliceFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SliceEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.SliceEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.SliceId slice_id = 2; + * @return Whether the sliceId field is set. + */ + boolean hasSliceId(); + + /** + * .context.SliceId slice_id = 2; + * @return The sliceId. + */ + context.ContextOuterClass.SliceId getSliceId(); + + /** + * .context.SliceId slice_id = 2; + */ + context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); + } + + /** + * Protobuf type {@code context.SliceEvent} + */ + public static final class SliceEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.SliceEvent) + SliceEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SliceEvent.newBuilder() to construct. + private SliceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SliceEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceEvent.class, context.ContextOuterClass.SliceEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int SLICE_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.SliceId sliceId_; + + /** + * .context.SliceId slice_id = 2; + * @return Whether the sliceId field is set. + */ + @java.lang.Override + public boolean hasSliceId() { + return sliceId_ != null; + } + + /** + * .context.SliceId slice_id = 2; + * @return The sliceId. + */ + @java.lang.Override + public context.ContextOuterClass.SliceId getSliceId() { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } + + /** + * .context.SliceId slice_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { + return getSliceId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (sliceId_ != null) { + output.writeMessage(2, getSliceId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (sliceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSliceId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.SliceEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.SliceEvent other = (context.ContextOuterClass.SliceEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasSliceId() != other.hasSliceId()) + return false; + if (hasSliceId()) { + if (!getSliceId().equals(other.getSliceId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasSliceId()) { + hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSliceId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.SliceEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.SliceEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.SliceEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.SliceEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.SliceEvent) + context.ContextOuterClass.SliceEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_SliceEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_SliceEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.SliceEvent.class, context.ContextOuterClass.SliceEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (sliceIdBuilder_ == null) { + sliceId_ = null; + } else { + sliceId_ = null; + sliceIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_SliceEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.SliceEvent getDefaultInstanceForType() { + return context.ContextOuterClass.SliceEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.SliceEvent build() { + context.ContextOuterClass.SliceEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.SliceEvent) { + return mergeFrom((context.ContextOuterClass.SliceEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.SliceEvent other) { + if (other == context.ContextOuterClass.SliceEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasSliceId()) { + mergeSliceId(other.getSliceId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.SliceEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.SliceId sliceId_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceIdBuilder_; + + /** + * .context.SliceId slice_id = 2; + * @return Whether the sliceId field is set. + */ + public boolean hasSliceId() { + return sliceIdBuilder_ != null || sliceId_ != null; + } + + /** + * .context.SliceId slice_id = 2; + * @return The sliceId. + */ + public context.ContextOuterClass.SliceId getSliceId() { + if (sliceIdBuilder_ == null) { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } else { + return sliceIdBuilder_.getMessage(); + } + } + + /** + * .context.SliceId slice_id = 2; + */ + public Builder setSliceId(context.ContextOuterClass.SliceId value) { + if (sliceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceId_ = value; + onChanged(); + } else { + sliceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceId slice_id = 2; + */ + public Builder setSliceId(context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdBuilder_ == null) { + sliceId_ = builderForValue.build(); + onChanged(); + } else { + sliceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceId slice_id = 2; + */ + public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { + if (sliceIdBuilder_ == null) { + if (sliceId_ != null) { + sliceId_ = context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); + } else { + sliceId_ = value; + } + onChanged(); + } else { + sliceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceId slice_id = 2; + */ + public Builder clearSliceId() { + if (sliceIdBuilder_ == null) { + sliceId_ = null; + onChanged(); + } else { + sliceId_ = null; + sliceIdBuilder_ = null; + } + return this; + } + + /** + * .context.SliceId slice_id = 2; + */ + public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { + onChanged(); + return getSliceIdFieldBuilder().getBuilder(); + } + + /** + * .context.SliceId slice_id = 2; + */ + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { + if (sliceIdBuilder_ != null) { + return sliceIdBuilder_.getMessageOrBuilder(); + } else { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } + } + + /** + * .context.SliceId slice_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceIdFieldBuilder() { + if (sliceIdBuilder_ == null) { + sliceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceId(), getParentForChildren(), isClean()); + sliceId_ = null; + } + return sliceIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.SliceEvent) + } + + // @@protoc_insertion_point(class_scope:context.SliceEvent) + private static final context.ContextOuterClass.SliceEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.SliceEvent(); + } + + public static context.ContextOuterClass.SliceEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.SliceEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid connection_uuid = 1; + * @return Whether the connectionUuid field is set. + */ + boolean hasConnectionUuid(); + + /** + * .context.Uuid connection_uuid = 1; + * @return The connectionUuid. + */ + context.ContextOuterClass.Uuid getConnectionUuid(); + + /** + * .context.Uuid connection_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder(); + } + + /** + *
+     * ----- Connection ----------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.ConnectionId} + */ + public static final class ConnectionId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionId) + ConnectionIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionId.newBuilder() to construct. + private ConnectionId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionId.class, context.ContextOuterClass.ConnectionId.Builder.class); + } + + public static final int CONNECTION_UUID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid connectionUuid_; + + /** + * .context.Uuid connection_uuid = 1; + * @return Whether the connectionUuid field is set. + */ + @java.lang.Override + public boolean hasConnectionUuid() { + return connectionUuid_ != null; + } + + /** + * .context.Uuid connection_uuid = 1; + * @return The connectionUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getConnectionUuid() { + return connectionUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; + } + + /** + * .context.Uuid connection_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder() { + return getConnectionUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (connectionUuid_ != null) { + output.writeMessage(1, getConnectionUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (connectionUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getConnectionUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionId)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionId other = (context.ContextOuterClass.ConnectionId) obj; + if (hasConnectionUuid() != other.hasConnectionUuid()) + return false; + if (hasConnectionUuid()) { + if (!getConnectionUuid().equals(other.getConnectionUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasConnectionUuid()) { + hash = (37 * hash) + CONNECTION_UUID_FIELD_NUMBER; + hash = (53 * hash) + getConnectionUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Connection ----------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.ConnectionId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionId) + context.ContextOuterClass.ConnectionIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionId.class, context.ContextOuterClass.ConnectionId.Builder.class); + } + + // 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; + connectionUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionId getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionId build() { + context.ContextOuterClass.ConnectionId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionId) { + return mergeFrom((context.ContextOuterClass.ConnectionId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionId other) { + if (other == context.ContextOuterClass.ConnectionId.getDefaultInstance()) + return this; + if (other.hasConnectionUuid()) { + mergeConnectionUuid(other.getConnectionUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid connectionUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 connectionUuidBuilder_; + + /** + * .context.Uuid connection_uuid = 1; + * @return Whether the connectionUuid field is set. + */ + public boolean hasConnectionUuid() { + return connectionUuidBuilder_ != null || connectionUuid_ != null; + } + + /** + * .context.Uuid connection_uuid = 1; + * @return The connectionUuid. + */ + public context.ContextOuterClass.Uuid getConnectionUuid() { + if (connectionUuidBuilder_ == null) { + return connectionUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; + } else { + return connectionUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid connection_uuid = 1; + */ + public Builder setConnectionUuid(context.ContextOuterClass.Uuid value) { + if (connectionUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionUuid_ = value; + onChanged(); + } else { + connectionUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid connection_uuid = 1; + */ + public Builder setConnectionUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (connectionUuidBuilder_ == null) { + connectionUuid_ = builderForValue.build(); + onChanged(); + } else { + connectionUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid connection_uuid = 1; + */ + public Builder mergeConnectionUuid(context.ContextOuterClass.Uuid value) { + if (connectionUuidBuilder_ == null) { + if (connectionUuid_ != null) { + connectionUuid_ = context.ContextOuterClass.Uuid.newBuilder(connectionUuid_).mergeFrom(value).buildPartial(); + } else { + connectionUuid_ = value; + } + onChanged(); + } else { + connectionUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid connection_uuid = 1; + */ + public Builder clearConnectionUuid() { + if (connectionUuidBuilder_ == null) { + connectionUuid_ = null; + onChanged(); + } else { + connectionUuid_ = null; + connectionUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid connection_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getConnectionUuidBuilder() { + onChanged(); + return getConnectionUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid connection_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder() { + if (connectionUuidBuilder_ != null) { + return connectionUuidBuilder_.getMessageOrBuilder(); + } else { + return connectionUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; + } + } + + /** + * .context.Uuid connection_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getConnectionUuidFieldBuilder() { + if (connectionUuidBuilder_ == null) { + connectionUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getConnectionUuid(), getParentForChildren(), isClean()); + connectionUuid_ = null; + } + return connectionUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionId) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionId) + private static final context.ContextOuterClass.ConnectionId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionId(); + } + + public static context.ContextOuterClass.ConnectionId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionSettings_L0OrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L0) + com.google.protobuf.MessageOrBuilder { + + /** + * string lsp_symbolic_name = 1; + * @return The lspSymbolicName. + */ + java.lang.String getLspSymbolicName(); + + /** + * string lsp_symbolic_name = 1; + * @return The bytes for lspSymbolicName. + */ + com.google.protobuf.ByteString getLspSymbolicNameBytes(); + } + + /** + * Protobuf type {@code context.ConnectionSettings_L0} + */ + public static final class ConnectionSettings_L0 extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L0) + ConnectionSettings_L0OrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionSettings_L0.newBuilder() to construct. + private ConnectionSettings_L0(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionSettings_L0() { + lspSymbolicName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L0.class, context.ContextOuterClass.ConnectionSettings_L0.Builder.class); + } + + public static final int LSP_SYMBOLIC_NAME_FIELD_NUMBER = 1; + + private volatile java.lang.Object lspSymbolicName_; + + /** + * string lsp_symbolic_name = 1; + * @return The lspSymbolicName. + */ + @java.lang.Override + public java.lang.String getLspSymbolicName() { + java.lang.Object ref = lspSymbolicName_; + 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(); + lspSymbolicName_ = s; + return s; + } + } + + /** + * string lsp_symbolic_name = 1; + * @return The bytes for lspSymbolicName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLspSymbolicNameBytes() { + java.lang.Object ref = lspSymbolicName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lspSymbolicName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getLspSymbolicNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, lspSymbolicName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getLspSymbolicNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, lspSymbolicName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L0)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionSettings_L0 other = (context.ContextOuterClass.ConnectionSettings_L0) obj; + if (!getLspSymbolicName().equals(other.getLspSymbolicName())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LSP_SYMBOLIC_NAME_FIELD_NUMBER; + hash = (53 * hash) + getLspSymbolicName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L0 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionSettings_L0} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L0) + context.ContextOuterClass.ConnectionSettings_L0OrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L0.class, context.ContextOuterClass.ConnectionSettings_L0.Builder.class); + } + + // 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(); + lspSymbolicName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L0 getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L0 build() { + context.ContextOuterClass.ConnectionSettings_L0 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L0 buildPartial() { + context.ContextOuterClass.ConnectionSettings_L0 result = new context.ContextOuterClass.ConnectionSettings_L0(this); + result.lspSymbolicName_ = lspSymbolicName_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionSettings_L0) { + return mergeFrom((context.ContextOuterClass.ConnectionSettings_L0) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L0 other) { + if (other == context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance()) + return this; + if (!other.getLspSymbolicName().isEmpty()) { + lspSymbolicName_ = other.lspSymbolicName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionSettings_L0) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object lspSymbolicName_ = ""; + + /** + * string lsp_symbolic_name = 1; + * @return The lspSymbolicName. + */ + public java.lang.String getLspSymbolicName() { + java.lang.Object ref = lspSymbolicName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lspSymbolicName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string lsp_symbolic_name = 1; + * @return The bytes for lspSymbolicName. + */ + public com.google.protobuf.ByteString getLspSymbolicNameBytes() { + java.lang.Object ref = lspSymbolicName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lspSymbolicName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string lsp_symbolic_name = 1; + * @param value The lspSymbolicName to set. + * @return This builder for chaining. + */ + public Builder setLspSymbolicName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + lspSymbolicName_ = value; + onChanged(); + return this; + } + + /** + * string lsp_symbolic_name = 1; + * @return This builder for chaining. + */ + public Builder clearLspSymbolicName() { + lspSymbolicName_ = getDefaultInstance().getLspSymbolicName(); + onChanged(); + return this; + } + + /** + * string lsp_symbolic_name = 1; + * @param value The bytes for lspSymbolicName to set. + * @return This builder for chaining. + */ + public Builder setLspSymbolicNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + lspSymbolicName_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L0) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L0) + private static final context.ContextOuterClass.ConnectionSettings_L0 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L0(); + } + + public static context.ContextOuterClass.ConnectionSettings_L0 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L0 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionSettings_L2OrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L2) + com.google.protobuf.MessageOrBuilder { + + /** + * string src_mac_address = 1; + * @return The srcMacAddress. + */ + java.lang.String getSrcMacAddress(); + + /** + * string src_mac_address = 1; + * @return The bytes for srcMacAddress. + */ + com.google.protobuf.ByteString getSrcMacAddressBytes(); + + /** + * string dst_mac_address = 2; + * @return The dstMacAddress. + */ + java.lang.String getDstMacAddress(); + + /** + * string dst_mac_address = 2; + * @return The bytes for dstMacAddress. + */ + com.google.protobuf.ByteString getDstMacAddressBytes(); + + /** + * uint32 ether_type = 3; + * @return The etherType. + */ + int getEtherType(); + + /** + * uint32 vlan_id = 4; + * @return The vlanId. + */ + int getVlanId(); + + /** + * uint32 mpls_label = 5; + * @return The mplsLabel. + */ + int getMplsLabel(); + + /** + * uint32 mpls_traffic_class = 6; + * @return The mplsTrafficClass. + */ + int getMplsTrafficClass(); + } + + /** + * Protobuf type {@code context.ConnectionSettings_L2} + */ + public static final class ConnectionSettings_L2 extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L2) + ConnectionSettings_L2OrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionSettings_L2.newBuilder() to construct. + private ConnectionSettings_L2(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionSettings_L2() { + srcMacAddress_ = ""; + dstMacAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L2.class, context.ContextOuterClass.ConnectionSettings_L2.Builder.class); + } + + public static final int SRC_MAC_ADDRESS_FIELD_NUMBER = 1; + + private volatile java.lang.Object srcMacAddress_; + + /** + * string src_mac_address = 1; + * @return The srcMacAddress. + */ + @java.lang.Override + public java.lang.String getSrcMacAddress() { + java.lang.Object ref = srcMacAddress_; + 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(); + srcMacAddress_ = s; + return s; + } + } + + /** + * string src_mac_address = 1; + * @return The bytes for srcMacAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSrcMacAddressBytes() { + java.lang.Object ref = srcMacAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcMacAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DST_MAC_ADDRESS_FIELD_NUMBER = 2; + + private volatile java.lang.Object dstMacAddress_; + + /** + * string dst_mac_address = 2; + * @return The dstMacAddress. + */ + @java.lang.Override + public java.lang.String getDstMacAddress() { + java.lang.Object ref = dstMacAddress_; + 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(); + dstMacAddress_ = s; + return s; + } + } + + /** + * string dst_mac_address = 2; + * @return The bytes for dstMacAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDstMacAddressBytes() { + java.lang.Object ref = dstMacAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstMacAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETHER_TYPE_FIELD_NUMBER = 3; + + private int etherType_; + + /** + * uint32 ether_type = 3; + * @return The etherType. + */ + @java.lang.Override + public int getEtherType() { + return etherType_; + } + + public static final int VLAN_ID_FIELD_NUMBER = 4; + + private int vlanId_; + + /** + * uint32 vlan_id = 4; + * @return The vlanId. + */ + @java.lang.Override + public int getVlanId() { + return vlanId_; + } + + public static final int MPLS_LABEL_FIELD_NUMBER = 5; + + private int mplsLabel_; + + /** + * uint32 mpls_label = 5; + * @return The mplsLabel. + */ + @java.lang.Override + public int getMplsLabel() { + return mplsLabel_; + } + + public static final int MPLS_TRAFFIC_CLASS_FIELD_NUMBER = 6; + + private int mplsTrafficClass_; + + /** + * uint32 mpls_traffic_class = 6; + * @return The mplsTrafficClass. + */ + @java.lang.Override + public int getMplsTrafficClass() { + return mplsTrafficClass_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getSrcMacAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcMacAddress_); + } + if (!getDstMacAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstMacAddress_); + } + if (etherType_ != 0) { + output.writeUInt32(3, etherType_); + } + if (vlanId_ != 0) { + output.writeUInt32(4, vlanId_); + } + if (mplsLabel_ != 0) { + output.writeUInt32(5, mplsLabel_); + } + if (mplsTrafficClass_ != 0) { + output.writeUInt32(6, mplsTrafficClass_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getSrcMacAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcMacAddress_); + } + if (!getDstMacAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstMacAddress_); + } + if (etherType_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, etherType_); + } + if (vlanId_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(4, vlanId_); + } + if (mplsLabel_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(5, mplsLabel_); + } + if (mplsTrafficClass_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(6, mplsTrafficClass_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L2)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionSettings_L2 other = (context.ContextOuterClass.ConnectionSettings_L2) obj; + if (!getSrcMacAddress().equals(other.getSrcMacAddress())) + return false; + if (!getDstMacAddress().equals(other.getDstMacAddress())) + return false; + if (getEtherType() != other.getEtherType()) + return false; + if (getVlanId() != other.getVlanId()) + return false; + if (getMplsLabel() != other.getMplsLabel()) + return false; + if (getMplsTrafficClass() != other.getMplsTrafficClass()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SRC_MAC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getSrcMacAddress().hashCode(); + hash = (37 * hash) + DST_MAC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getDstMacAddress().hashCode(); + hash = (37 * hash) + ETHER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getEtherType(); + hash = (37 * hash) + VLAN_ID_FIELD_NUMBER; + hash = (53 * hash) + getVlanId(); + hash = (37 * hash) + MPLS_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getMplsLabel(); + hash = (37 * hash) + MPLS_TRAFFIC_CLASS_FIELD_NUMBER; + hash = (53 * hash) + getMplsTrafficClass(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionSettings_L2} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L2) + context.ContextOuterClass.ConnectionSettings_L2OrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L2.class, context.ContextOuterClass.ConnectionSettings_L2.Builder.class); + } + + // 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(); + srcMacAddress_ = ""; + dstMacAddress_ = ""; + etherType_ = 0; + vlanId_ = 0; + mplsLabel_ = 0; + mplsTrafficClass_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L2 getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L2 build() { + context.ContextOuterClass.ConnectionSettings_L2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionSettings_L2) { + return mergeFrom((context.ContextOuterClass.ConnectionSettings_L2) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L2 other) { + if (other == context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance()) + return this; + if (!other.getSrcMacAddress().isEmpty()) { + srcMacAddress_ = other.srcMacAddress_; + onChanged(); + } + if (!other.getDstMacAddress().isEmpty()) { + dstMacAddress_ = other.dstMacAddress_; + onChanged(); + } + if (other.getEtherType() != 0) { + setEtherType(other.getEtherType()); + } + if (other.getVlanId() != 0) { + setVlanId(other.getVlanId()); + } + if (other.getMplsLabel() != 0) { + setMplsLabel(other.getMplsLabel()); + } + if (other.getMplsTrafficClass() != 0) { + setMplsTrafficClass(other.getMplsTrafficClass()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionSettings_L2) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object srcMacAddress_ = ""; + + /** + * string src_mac_address = 1; + * @return The srcMacAddress. + */ + public java.lang.String getSrcMacAddress() { + java.lang.Object ref = srcMacAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcMacAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string src_mac_address = 1; + * @return The bytes for srcMacAddress. + */ + public com.google.protobuf.ByteString getSrcMacAddressBytes() { + java.lang.Object ref = srcMacAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcMacAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string src_mac_address = 1; + * @param value The srcMacAddress to set. + * @return This builder for chaining. + */ + public Builder setSrcMacAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + srcMacAddress_ = value; + onChanged(); + return this; + } + + /** + * string src_mac_address = 1; + * @return This builder for chaining. + */ + public Builder clearSrcMacAddress() { + srcMacAddress_ = getDefaultInstance().getSrcMacAddress(); + onChanged(); + return this; + } + + /** + * string src_mac_address = 1; + * @param value The bytes for srcMacAddress to set. + * @return This builder for chaining. + */ + public Builder setSrcMacAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + srcMacAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object dstMacAddress_ = ""; + + /** + * string dst_mac_address = 2; + * @return The dstMacAddress. + */ + public java.lang.String getDstMacAddress() { + java.lang.Object ref = dstMacAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dstMacAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string dst_mac_address = 2; + * @return The bytes for dstMacAddress. + */ + public com.google.protobuf.ByteString getDstMacAddressBytes() { + java.lang.Object ref = dstMacAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstMacAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string dst_mac_address = 2; + * @param value The dstMacAddress to set. + * @return This builder for chaining. + */ + public Builder setDstMacAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dstMacAddress_ = value; + onChanged(); + return this; + } + + /** + * string dst_mac_address = 2; + * @return This builder for chaining. + */ + public Builder clearDstMacAddress() { + dstMacAddress_ = getDefaultInstance().getDstMacAddress(); + onChanged(); + return this; + } + + /** + * string dst_mac_address = 2; + * @param value The bytes for dstMacAddress to set. + * @return This builder for chaining. + */ + public Builder setDstMacAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dstMacAddress_ = value; + onChanged(); + return this; + } + + private int etherType_; + + /** + * uint32 ether_type = 3; + * @return The etherType. + */ + @java.lang.Override + public int getEtherType() { + return etherType_; + } + + /** + * uint32 ether_type = 3; + * @param value The etherType to set. + * @return This builder for chaining. + */ + public Builder setEtherType(int value) { + etherType_ = value; + onChanged(); + return this; + } + + /** + * uint32 ether_type = 3; + * @return This builder for chaining. + */ + public Builder clearEtherType() { + etherType_ = 0; + onChanged(); + return this; + } + + private int vlanId_; + + /** + * uint32 vlan_id = 4; + * @return The vlanId. + */ + @java.lang.Override + public int getVlanId() { + return vlanId_; + } + + /** + * uint32 vlan_id = 4; + * @param value The vlanId to set. + * @return This builder for chaining. + */ + public Builder setVlanId(int value) { + vlanId_ = value; + onChanged(); + return this; + } + + /** + * uint32 vlan_id = 4; + * @return This builder for chaining. + */ + public Builder clearVlanId() { + vlanId_ = 0; + onChanged(); + return this; + } + + private int mplsLabel_; + + /** + * uint32 mpls_label = 5; + * @return The mplsLabel. + */ + @java.lang.Override + public int getMplsLabel() { + return mplsLabel_; + } + + /** + * uint32 mpls_label = 5; + * @param value The mplsLabel to set. + * @return This builder for chaining. + */ + public Builder setMplsLabel(int value) { + mplsLabel_ = value; + onChanged(); + return this; + } + + /** + * uint32 mpls_label = 5; + * @return This builder for chaining. + */ + public Builder clearMplsLabel() { + mplsLabel_ = 0; + onChanged(); + return this; + } + + private int mplsTrafficClass_; + + /** + * uint32 mpls_traffic_class = 6; + * @return The mplsTrafficClass. + */ + @java.lang.Override + public int getMplsTrafficClass() { + return mplsTrafficClass_; + } + + /** + * uint32 mpls_traffic_class = 6; + * @param value The mplsTrafficClass to set. + * @return This builder for chaining. + */ + public Builder setMplsTrafficClass(int value) { + mplsTrafficClass_ = value; + onChanged(); + return this; + } + + /** + * uint32 mpls_traffic_class = 6; + * @return This builder for chaining. + */ + public Builder clearMplsTrafficClass() { + mplsTrafficClass_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L2) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L2) + private static final context.ContextOuterClass.ConnectionSettings_L2 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L2(); + } + + public static context.ContextOuterClass.ConnectionSettings_L2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionSettings_L3OrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L3) + com.google.protobuf.MessageOrBuilder { + + /** + * string src_ip_address = 1; + * @return The srcIpAddress. + */ + java.lang.String getSrcIpAddress(); + + /** + * string src_ip_address = 1; + * @return The bytes for srcIpAddress. + */ + com.google.protobuf.ByteString getSrcIpAddressBytes(); + + /** + * string dst_ip_address = 2; + * @return The dstIpAddress. + */ + java.lang.String getDstIpAddress(); + + /** + * string dst_ip_address = 2; + * @return The bytes for dstIpAddress. + */ + com.google.protobuf.ByteString getDstIpAddressBytes(); + + /** + * uint32 dscp = 3; + * @return The dscp. + */ + int getDscp(); + + /** + * uint32 protocol = 4; + * @return The protocol. + */ + int getProtocol(); + + /** + * uint32 ttl = 5; + * @return The ttl. + */ + int getTtl(); + } + + /** + * Protobuf type {@code context.ConnectionSettings_L3} + */ + public static final class ConnectionSettings_L3 extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L3) + ConnectionSettings_L3OrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionSettings_L3.newBuilder() to construct. + private ConnectionSettings_L3(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionSettings_L3() { + srcIpAddress_ = ""; + dstIpAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L3.class, context.ContextOuterClass.ConnectionSettings_L3.Builder.class); + } + + public static final int SRC_IP_ADDRESS_FIELD_NUMBER = 1; + + private volatile java.lang.Object srcIpAddress_; + + /** + * string src_ip_address = 1; + * @return The srcIpAddress. + */ + @java.lang.Override + public java.lang.String getSrcIpAddress() { + java.lang.Object ref = srcIpAddress_; + 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(); + srcIpAddress_ = s; + return s; + } + } + + /** + * string src_ip_address = 1; + * @return The bytes for srcIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSrcIpAddressBytes() { + java.lang.Object ref = srcIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DST_IP_ADDRESS_FIELD_NUMBER = 2; + + private volatile java.lang.Object dstIpAddress_; + + /** + * string dst_ip_address = 2; + * @return The dstIpAddress. + */ + @java.lang.Override + public java.lang.String getDstIpAddress() { + java.lang.Object ref = dstIpAddress_; + 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(); + dstIpAddress_ = s; + return s; + } + } + + /** + * string dst_ip_address = 2; + * @return The bytes for dstIpAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDstIpAddressBytes() { + java.lang.Object ref = dstIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DSCP_FIELD_NUMBER = 3; + + private int dscp_; + + /** + * uint32 dscp = 3; + * @return The dscp. + */ + @java.lang.Override + public int getDscp() { + return dscp_; + } + + public static final int PROTOCOL_FIELD_NUMBER = 4; + + private int protocol_; + + /** + * uint32 protocol = 4; + * @return The protocol. + */ + @java.lang.Override + public int getProtocol() { + return protocol_; + } + + public static final int TTL_FIELD_NUMBER = 5; + + private int ttl_; + + /** + * uint32 ttl = 5; + * @return The ttl. + */ + @java.lang.Override + public int getTtl() { + return ttl_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getSrcIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcIpAddress_); + } + if (!getDstIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstIpAddress_); + } + if (dscp_ != 0) { + output.writeUInt32(3, dscp_); + } + if (protocol_ != 0) { + output.writeUInt32(4, protocol_); + } + if (ttl_ != 0) { + output.writeUInt32(5, ttl_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getSrcIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcIpAddress_); + } + if (!getDstIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstIpAddress_); + } + if (dscp_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, dscp_); + } + if (protocol_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(4, protocol_); + } + if (ttl_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(5, ttl_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L3)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionSettings_L3 other = (context.ContextOuterClass.ConnectionSettings_L3) obj; + if (!getSrcIpAddress().equals(other.getSrcIpAddress())) + return false; + if (!getDstIpAddress().equals(other.getDstIpAddress())) + return false; + if (getDscp() != other.getDscp()) + return false; + if (getProtocol() != other.getProtocol()) + return false; + if (getTtl() != other.getTtl()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SRC_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getSrcIpAddress().hashCode(); + hash = (37 * hash) + DST_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getDstIpAddress().hashCode(); + hash = (37 * hash) + DSCP_FIELD_NUMBER; + hash = (53 * hash) + getDscp(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol(); + hash = (37 * hash) + TTL_FIELD_NUMBER; + hash = (53 * hash) + getTtl(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionSettings_L3} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L3) + context.ContextOuterClass.ConnectionSettings_L3OrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L3.class, context.ContextOuterClass.ConnectionSettings_L3.Builder.class); + } + + // 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(); + srcIpAddress_ = ""; + dstIpAddress_ = ""; + dscp_ = 0; + protocol_ = 0; + ttl_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L3 getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L3 build() { + context.ContextOuterClass.ConnectionSettings_L3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionSettings_L3) { + return mergeFrom((context.ContextOuterClass.ConnectionSettings_L3) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L3 other) { + if (other == context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance()) + return this; + if (!other.getSrcIpAddress().isEmpty()) { + srcIpAddress_ = other.srcIpAddress_; + onChanged(); + } + if (!other.getDstIpAddress().isEmpty()) { + dstIpAddress_ = other.dstIpAddress_; + onChanged(); + } + if (other.getDscp() != 0) { + setDscp(other.getDscp()); + } + if (other.getProtocol() != 0) { + setProtocol(other.getProtocol()); + } + if (other.getTtl() != 0) { + setTtl(other.getTtl()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionSettings_L3) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object srcIpAddress_ = ""; + + /** + * string src_ip_address = 1; + * @return The srcIpAddress. + */ + public java.lang.String getSrcIpAddress() { + java.lang.Object ref = srcIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string src_ip_address = 1; + * @return The bytes for srcIpAddress. + */ + public com.google.protobuf.ByteString getSrcIpAddressBytes() { + java.lang.Object ref = srcIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string src_ip_address = 1; + * @param value The srcIpAddress to set. + * @return This builder for chaining. + */ + public Builder setSrcIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + srcIpAddress_ = value; + onChanged(); + return this; + } + + /** + * string src_ip_address = 1; + * @return This builder for chaining. + */ + public Builder clearSrcIpAddress() { + srcIpAddress_ = getDefaultInstance().getSrcIpAddress(); + onChanged(); + return this; + } + + /** + * string src_ip_address = 1; + * @param value The bytes for srcIpAddress to set. + * @return This builder for chaining. + */ + public Builder setSrcIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + srcIpAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object dstIpAddress_ = ""; + + /** + * string dst_ip_address = 2; + * @return The dstIpAddress. + */ + public java.lang.String getDstIpAddress() { + java.lang.Object ref = dstIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dstIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string dst_ip_address = 2; + * @return The bytes for dstIpAddress. + */ + public com.google.protobuf.ByteString getDstIpAddressBytes() { + java.lang.Object ref = dstIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string dst_ip_address = 2; + * @param value The dstIpAddress to set. + * @return This builder for chaining. + */ + public Builder setDstIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dstIpAddress_ = value; + onChanged(); + return this; + } + + /** + * string dst_ip_address = 2; + * @return This builder for chaining. + */ + public Builder clearDstIpAddress() { + dstIpAddress_ = getDefaultInstance().getDstIpAddress(); + onChanged(); + return this; + } + + /** + * string dst_ip_address = 2; + * @param value The bytes for dstIpAddress to set. + * @return This builder for chaining. + */ + public Builder setDstIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dstIpAddress_ = value; + onChanged(); + return this; + } + + private int dscp_; + + /** + * uint32 dscp = 3; + * @return The dscp. + */ + @java.lang.Override + public int getDscp() { + return dscp_; + } + + /** + * uint32 dscp = 3; + * @param value The dscp to set. + * @return This builder for chaining. + */ + public Builder setDscp(int value) { + dscp_ = value; + onChanged(); + return this; + } + + /** + * uint32 dscp = 3; + * @return This builder for chaining. + */ + public Builder clearDscp() { + dscp_ = 0; + onChanged(); + return this; + } + + private int protocol_; + + /** + * uint32 protocol = 4; + * @return The protocol. + */ + @java.lang.Override + public int getProtocol() { + return protocol_; + } + + /** + * uint32 protocol = 4; + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(int value) { + protocol_ = value; + onChanged(); + return this; + } + + /** + * uint32 protocol = 4; + * @return This builder for chaining. + */ + public Builder clearProtocol() { + protocol_ = 0; + onChanged(); + return this; + } + + private int ttl_; + + /** + * uint32 ttl = 5; + * @return The ttl. + */ + @java.lang.Override + public int getTtl() { + return ttl_; + } + + /** + * uint32 ttl = 5; + * @param value The ttl to set. + * @return This builder for chaining. + */ + public Builder setTtl(int value) { + ttl_ = value; + onChanged(); + return this; + } + + /** + * uint32 ttl = 5; + * @return This builder for chaining. + */ + public Builder clearTtl() { + ttl_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L3) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L3) + private static final context.ContextOuterClass.ConnectionSettings_L3 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L3(); + } + + public static context.ContextOuterClass.ConnectionSettings_L3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionSettings_L4OrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L4) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 src_port = 1; + * @return The srcPort. + */ + int getSrcPort(); + + /** + * uint32 dst_port = 2; + * @return The dstPort. + */ + int getDstPort(); + + /** + * uint32 tcp_flags = 3; + * @return The tcpFlags. + */ + int getTcpFlags(); + + /** + * uint32 ttl = 4; + * @return The ttl. + */ + int getTtl(); + } + + /** + * Protobuf type {@code context.ConnectionSettings_L4} + */ + public static final class ConnectionSettings_L4 extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L4) + ConnectionSettings_L4OrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionSettings_L4.newBuilder() to construct. + private ConnectionSettings_L4(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionSettings_L4() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L4.class, context.ContextOuterClass.ConnectionSettings_L4.Builder.class); + } + + public static final int SRC_PORT_FIELD_NUMBER = 1; + + private int srcPort_; + + /** + * uint32 src_port = 1; + * @return The srcPort. + */ + @java.lang.Override + public int getSrcPort() { + return srcPort_; + } + + public static final int DST_PORT_FIELD_NUMBER = 2; + + private int dstPort_; + + /** + * uint32 dst_port = 2; + * @return The dstPort. + */ + @java.lang.Override + public int getDstPort() { + return dstPort_; + } + + public static final int TCP_FLAGS_FIELD_NUMBER = 3; + + private int tcpFlags_; + + /** + * uint32 tcp_flags = 3; + * @return The tcpFlags. + */ + @java.lang.Override + public int getTcpFlags() { + return tcpFlags_; + } + + public static final int TTL_FIELD_NUMBER = 4; + + private int ttl_; + + /** + * uint32 ttl = 4; + * @return The ttl. + */ + @java.lang.Override + public int getTtl() { + return ttl_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (srcPort_ != 0) { + output.writeUInt32(1, srcPort_); + } + if (dstPort_ != 0) { + output.writeUInt32(2, dstPort_); + } + if (tcpFlags_ != 0) { + output.writeUInt32(3, tcpFlags_); + } + if (ttl_ != 0) { + output.writeUInt32(4, ttl_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (srcPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(1, srcPort_); + } + if (dstPort_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, dstPort_); + } + if (tcpFlags_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, tcpFlags_); + } + if (ttl_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(4, ttl_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L4)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionSettings_L4 other = (context.ContextOuterClass.ConnectionSettings_L4) obj; + if (getSrcPort() != other.getSrcPort()) + return false; + if (getDstPort() != other.getDstPort()) + return false; + if (getTcpFlags() != other.getTcpFlags()) + return false; + if (getTtl() != other.getTtl()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SRC_PORT_FIELD_NUMBER; + hash = (53 * hash) + getSrcPort(); + hash = (37 * hash) + DST_PORT_FIELD_NUMBER; + hash = (53 * hash) + getDstPort(); + hash = (37 * hash) + TCP_FLAGS_FIELD_NUMBER; + hash = (53 * hash) + getTcpFlags(); + hash = (37 * hash) + TTL_FIELD_NUMBER; + hash = (53 * hash) + getTtl(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L4 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionSettings_L4} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L4) + context.ContextOuterClass.ConnectionSettings_L4OrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings_L4.class, context.ContextOuterClass.ConnectionSettings_L4.Builder.class); + } + + // 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(); + srcPort_ = 0; + dstPort_ = 0; + tcpFlags_ = 0; + ttl_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L4 getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L4 build() { + context.ContextOuterClass.ConnectionSettings_L4 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionSettings_L4) { + return mergeFrom((context.ContextOuterClass.ConnectionSettings_L4) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L4 other) { + if (other == context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance()) + return this; + if (other.getSrcPort() != 0) { + setSrcPort(other.getSrcPort()); + } + if (other.getDstPort() != 0) { + setDstPort(other.getDstPort()); + } + if (other.getTcpFlags() != 0) { + setTcpFlags(other.getTcpFlags()); + } + if (other.getTtl() != 0) { + setTtl(other.getTtl()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionSettings_L4) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int srcPort_; + + /** + * uint32 src_port = 1; + * @return The srcPort. + */ + @java.lang.Override + public int getSrcPort() { + return srcPort_; + } + + /** + * uint32 src_port = 1; + * @param value The srcPort to set. + * @return This builder for chaining. + */ + public Builder setSrcPort(int value) { + srcPort_ = value; + onChanged(); + return this; + } + + /** + * uint32 src_port = 1; + * @return This builder for chaining. + */ + public Builder clearSrcPort() { + srcPort_ = 0; + onChanged(); + return this; + } + + private int dstPort_; + + /** + * uint32 dst_port = 2; + * @return The dstPort. + */ + @java.lang.Override + public int getDstPort() { + return dstPort_; + } + + /** + * uint32 dst_port = 2; + * @param value The dstPort to set. + * @return This builder for chaining. + */ + public Builder setDstPort(int value) { + dstPort_ = value; + onChanged(); + return this; + } + + /** + * uint32 dst_port = 2; + * @return This builder for chaining. + */ + public Builder clearDstPort() { + dstPort_ = 0; + onChanged(); + return this; + } + + private int tcpFlags_; + + /** + * uint32 tcp_flags = 3; + * @return The tcpFlags. + */ + @java.lang.Override + public int getTcpFlags() { + return tcpFlags_; + } + + /** + * uint32 tcp_flags = 3; + * @param value The tcpFlags to set. + * @return This builder for chaining. + */ + public Builder setTcpFlags(int value) { + tcpFlags_ = value; + onChanged(); + return this; + } + + /** + * uint32 tcp_flags = 3; + * @return This builder for chaining. + */ + public Builder clearTcpFlags() { + tcpFlags_ = 0; + onChanged(); + return this; + } + + private int ttl_; + + /** + * uint32 ttl = 4; + * @return The ttl. + */ + @java.lang.Override + public int getTtl() { + return ttl_; + } + + /** + * uint32 ttl = 4; + * @param value The ttl to set. + * @return This builder for chaining. + */ + public Builder setTtl(int value) { + ttl_ = value; + onChanged(); + return this; + } + + /** + * uint32 ttl = 4; + * @return This builder for chaining. + */ + public Builder clearTtl() { + ttl_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L4) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L4) + private static final context.ContextOuterClass.ConnectionSettings_L4 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L4(); + } + + public static context.ContextOuterClass.ConnectionSettings_L4 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L4 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionSettingsOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ConnectionSettings_L0 l0 = 1; + * @return Whether the l0 field is set. + */ + boolean hasL0(); + + /** + * .context.ConnectionSettings_L0 l0 = 1; + * @return The l0. + */ + context.ContextOuterClass.ConnectionSettings_L0 getL0(); + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder(); + + /** + * .context.ConnectionSettings_L2 l2 = 2; + * @return Whether the l2 field is set. + */ + boolean hasL2(); + + /** + * .context.ConnectionSettings_L2 l2 = 2; + * @return The l2. + */ + context.ContextOuterClass.ConnectionSettings_L2 getL2(); + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder(); + + /** + * .context.ConnectionSettings_L3 l3 = 3; + * @return Whether the l3 field is set. + */ + boolean hasL3(); + + /** + * .context.ConnectionSettings_L3 l3 = 3; + * @return The l3. + */ + context.ContextOuterClass.ConnectionSettings_L3 getL3(); + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder(); + + /** + * .context.ConnectionSettings_L4 l4 = 4; + * @return Whether the l4 field is set. + */ + boolean hasL4(); + + /** + * .context.ConnectionSettings_L4 l4 = 4; + * @return The l4. + */ + context.ContextOuterClass.ConnectionSettings_L4 getL4(); + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder(); + } + + /** + * Protobuf type {@code context.ConnectionSettings} + */ + public static final class ConnectionSettings extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionSettings) + ConnectionSettingsOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionSettings.newBuilder() to construct. + private ConnectionSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionSettings() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings.class, context.ContextOuterClass.ConnectionSettings.Builder.class); + } + + public static final int L0_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ConnectionSettings_L0 l0_; + + /** + * .context.ConnectionSettings_L0 l0 = 1; + * @return Whether the l0 field is set. + */ + @java.lang.Override + public boolean hasL0() { + return l0_ != null; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + * @return The l0. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L0 getL0() { + return l0_ == null ? context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder() { + return getL0(); + } + + public static final int L2_FIELD_NUMBER = 2; + + private context.ContextOuterClass.ConnectionSettings_L2 l2_; + + /** + * .context.ConnectionSettings_L2 l2 = 2; + * @return Whether the l2 field is set. + */ + @java.lang.Override + public boolean hasL2() { + return l2_ != null; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + * @return The l2. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L2 getL2() { + return l2_ == null ? context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder() { + return getL2(); + } + + public static final int L3_FIELD_NUMBER = 3; + + private context.ContextOuterClass.ConnectionSettings_L3 l3_; + + /** + * .context.ConnectionSettings_L3 l3 = 3; + * @return Whether the l3 field is set. + */ + @java.lang.Override + public boolean hasL3() { + return l3_ != null; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + * @return The l3. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L3 getL3() { + return l3_ == null ? context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder() { + return getL3(); + } + + public static final int L4_FIELD_NUMBER = 4; + + private context.ContextOuterClass.ConnectionSettings_L4 l4_; + + /** + * .context.ConnectionSettings_L4 l4 = 4; + * @return Whether the l4 field is set. + */ + @java.lang.Override + public boolean hasL4() { + return l4_ != null; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + * @return The l4. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L4 getL4() { + return l4_ == null ? context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder() { + return getL4(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (l0_ != null) { + output.writeMessage(1, getL0()); + } + if (l2_ != null) { + output.writeMessage(2, getL2()); + } + if (l3_ != null) { + output.writeMessage(3, getL3()); + } + if (l4_ != null) { + output.writeMessage(4, getL4()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (l0_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getL0()); + } + if (l2_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getL2()); + } + if (l3_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getL3()); + } + if (l4_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getL4()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionSettings)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionSettings other = (context.ContextOuterClass.ConnectionSettings) obj; + if (hasL0() != other.hasL0()) + return false; + if (hasL0()) { + if (!getL0().equals(other.getL0())) + return false; + } + if (hasL2() != other.hasL2()) + return false; + if (hasL2()) { + if (!getL2().equals(other.getL2())) + return false; + } + if (hasL3() != other.hasL3()) + return false; + if (hasL3()) { + if (!getL3().equals(other.getL3())) + return false; + } + if (hasL4() != other.hasL4()) + return false; + if (hasL4()) { + if (!getL4().equals(other.getL4())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasL0()) { + hash = (37 * hash) + L0_FIELD_NUMBER; + hash = (53 * hash) + getL0().hashCode(); + } + if (hasL2()) { + hash = (37 * hash) + L2_FIELD_NUMBER; + hash = (53 * hash) + getL2().hashCode(); + } + if (hasL3()) { + hash = (37 * hash) + L3_FIELD_NUMBER; + hash = (53 * hash) + getL3().hashCode(); + } + if (hasL4()) { + hash = (37 * hash) + L4_FIELD_NUMBER; + hash = (53 * hash) + getL4().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionSettings parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionSettings) + context.ContextOuterClass.ConnectionSettingsOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionSettings.class, context.ContextOuterClass.ConnectionSettings.Builder.class); + } + + // 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; + l0Builder_ = null; + } + if (l2Builder_ == null) { + l2_ = null; + } else { + l2_ = null; + l2Builder_ = null; + } + if (l3Builder_ == null) { + l3_ = null; + } else { + l3_ = null; + l3Builder_ = null; + } + if (l4Builder_ == null) { + l4_ = null; + } else { + l4_ = null; + l4Builder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionSettings_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionSettings.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings build() { + context.ContextOuterClass.ConnectionSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionSettings) { + return mergeFrom((context.ContextOuterClass.ConnectionSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings other) { + if (other == context.ContextOuterClass.ConnectionSettings.getDefaultInstance()) + return this; + if (other.hasL0()) { + mergeL0(other.getL0()); + } + if (other.hasL2()) { + mergeL2(other.getL2()); + } + if (other.hasL3()) { + mergeL3(other.getL3()); + } + if (other.hasL4()) { + mergeL4(other.getL4()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.ConnectionSettings_L0 l0_; + + private com.google.protobuf.SingleFieldBuilderV3 l0Builder_; + + /** + * .context.ConnectionSettings_L0 l0 = 1; + * @return Whether the l0 field is set. + */ + public boolean hasL0() { + return l0Builder_ != null || l0_ != null; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + * @return The l0. + */ + public context.ContextOuterClass.ConnectionSettings_L0 getL0() { + if (l0Builder_ == null) { + return l0_ == null ? context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; + } else { + return l0Builder_.getMessage(); + } + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + public Builder setL0(context.ContextOuterClass.ConnectionSettings_L0 value) { + if (l0Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + l0_ = value; + onChanged(); + } else { + l0Builder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + public Builder setL0(context.ContextOuterClass.ConnectionSettings_L0.Builder builderForValue) { + if (l0Builder_ == null) { + l0_ = builderForValue.build(); + onChanged(); + } else { + l0Builder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + public Builder mergeL0(context.ContextOuterClass.ConnectionSettings_L0 value) { + if (l0Builder_ == null) { + if (l0_ != null) { + l0_ = context.ContextOuterClass.ConnectionSettings_L0.newBuilder(l0_).mergeFrom(value).buildPartial(); + } else { + l0_ = value; + } + onChanged(); + } else { + l0Builder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + public Builder clearL0() { + if (l0Builder_ == null) { + l0_ = null; + onChanged(); + } else { + l0_ = null; + l0Builder_ = null; + } + return this; + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + public context.ContextOuterClass.ConnectionSettings_L0.Builder getL0Builder() { + onChanged(); + return getL0FieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + public context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder() { + if (l0Builder_ != null) { + return l0Builder_.getMessageOrBuilder(); + } else { + return l0_ == null ? context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; + } + } + + /** + * .context.ConnectionSettings_L0 l0 = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getL0FieldBuilder() { + if (l0Builder_ == null) { + l0Builder_ = new com.google.protobuf.SingleFieldBuilderV3(getL0(), getParentForChildren(), isClean()); + l0_ = null; + } + return l0Builder_; + } + + private context.ContextOuterClass.ConnectionSettings_L2 l2_; + + private com.google.protobuf.SingleFieldBuilderV3 l2Builder_; + + /** + * .context.ConnectionSettings_L2 l2 = 2; + * @return Whether the l2 field is set. + */ + public boolean hasL2() { + return l2Builder_ != null || l2_ != null; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + * @return The l2. + */ + public context.ContextOuterClass.ConnectionSettings_L2 getL2() { + if (l2Builder_ == null) { + return l2_ == null ? context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; + } else { + return l2Builder_.getMessage(); + } + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + public Builder setL2(context.ContextOuterClass.ConnectionSettings_L2 value) { + if (l2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + l2_ = value; + onChanged(); + } else { + l2Builder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + public Builder setL2(context.ContextOuterClass.ConnectionSettings_L2.Builder builderForValue) { + if (l2Builder_ == null) { + l2_ = builderForValue.build(); + onChanged(); + } else { + l2Builder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + public Builder mergeL2(context.ContextOuterClass.ConnectionSettings_L2 value) { + if (l2Builder_ == null) { + if (l2_ != null) { + l2_ = context.ContextOuterClass.ConnectionSettings_L2.newBuilder(l2_).mergeFrom(value).buildPartial(); + } else { + l2_ = value; + } + onChanged(); + } else { + l2Builder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + public Builder clearL2() { + if (l2Builder_ == null) { + l2_ = null; + onChanged(); + } else { + l2_ = null; + l2Builder_ = null; + } + return this; + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + public context.ContextOuterClass.ConnectionSettings_L2.Builder getL2Builder() { + onChanged(); + return getL2FieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + public context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder() { + if (l2Builder_ != null) { + return l2Builder_.getMessageOrBuilder(); + } else { + return l2_ == null ? context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; + } + } + + /** + * .context.ConnectionSettings_L2 l2 = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getL2FieldBuilder() { + if (l2Builder_ == null) { + l2Builder_ = new com.google.protobuf.SingleFieldBuilderV3(getL2(), getParentForChildren(), isClean()); + l2_ = null; + } + return l2Builder_; + } + + private context.ContextOuterClass.ConnectionSettings_L3 l3_; + + private com.google.protobuf.SingleFieldBuilderV3 l3Builder_; + + /** + * .context.ConnectionSettings_L3 l3 = 3; + * @return Whether the l3 field is set. + */ + public boolean hasL3() { + return l3Builder_ != null || l3_ != null; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + * @return The l3. + */ + public context.ContextOuterClass.ConnectionSettings_L3 getL3() { + if (l3Builder_ == null) { + return l3_ == null ? context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; + } else { + return l3Builder_.getMessage(); + } + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + public Builder setL3(context.ContextOuterClass.ConnectionSettings_L3 value) { + if (l3Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + l3_ = value; + onChanged(); + } else { + l3Builder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + public Builder setL3(context.ContextOuterClass.ConnectionSettings_L3.Builder builderForValue) { + if (l3Builder_ == null) { + l3_ = builderForValue.build(); + onChanged(); + } else { + l3Builder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + public Builder mergeL3(context.ContextOuterClass.ConnectionSettings_L3 value) { + if (l3Builder_ == null) { + if (l3_ != null) { + l3_ = context.ContextOuterClass.ConnectionSettings_L3.newBuilder(l3_).mergeFrom(value).buildPartial(); + } else { + l3_ = value; + } + onChanged(); + } else { + l3Builder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + public Builder clearL3() { + if (l3Builder_ == null) { + l3_ = null; + onChanged(); + } else { + l3_ = null; + l3Builder_ = null; + } + return this; + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + public context.ContextOuterClass.ConnectionSettings_L3.Builder getL3Builder() { + onChanged(); + return getL3FieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + public context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder() { + if (l3Builder_ != null) { + return l3Builder_.getMessageOrBuilder(); + } else { + return l3_ == null ? context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; + } + } + + /** + * .context.ConnectionSettings_L3 l3 = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getL3FieldBuilder() { + if (l3Builder_ == null) { + l3Builder_ = new com.google.protobuf.SingleFieldBuilderV3(getL3(), getParentForChildren(), isClean()); + l3_ = null; + } + return l3Builder_; + } + + private context.ContextOuterClass.ConnectionSettings_L4 l4_; + + private com.google.protobuf.SingleFieldBuilderV3 l4Builder_; + + /** + * .context.ConnectionSettings_L4 l4 = 4; + * @return Whether the l4 field is set. + */ + public boolean hasL4() { + return l4Builder_ != null || l4_ != null; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + * @return The l4. + */ + public context.ContextOuterClass.ConnectionSettings_L4 getL4() { + if (l4Builder_ == null) { + return l4_ == null ? context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; + } else { + return l4Builder_.getMessage(); + } + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + public Builder setL4(context.ContextOuterClass.ConnectionSettings_L4 value) { + if (l4Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + l4_ = value; + onChanged(); + } else { + l4Builder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + public Builder setL4(context.ContextOuterClass.ConnectionSettings_L4.Builder builderForValue) { + if (l4Builder_ == null) { + l4_ = builderForValue.build(); + onChanged(); + } else { + l4Builder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + public Builder mergeL4(context.ContextOuterClass.ConnectionSettings_L4 value) { + if (l4Builder_ == null) { + if (l4_ != null) { + l4_ = context.ContextOuterClass.ConnectionSettings_L4.newBuilder(l4_).mergeFrom(value).buildPartial(); + } else { + l4_ = value; + } + onChanged(); + } else { + l4Builder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + public Builder clearL4() { + if (l4Builder_ == null) { + l4_ = null; + onChanged(); + } else { + l4_ = null; + l4Builder_ = null; + } + return this; + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + public context.ContextOuterClass.ConnectionSettings_L4.Builder getL4Builder() { + onChanged(); + return getL4FieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + public context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder() { + if (l4Builder_ != null) { + return l4Builder_.getMessageOrBuilder(); + } else { + return l4_ == null ? context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; + } + } + + /** + * .context.ConnectionSettings_L4 l4 = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getL4FieldBuilder() { + if (l4Builder_ == null) { + l4Builder_ = new com.google.protobuf.SingleFieldBuilderV3(getL4(), getParentForChildren(), isClean()); + l4_ = null; + } + return l4Builder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionSettings) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionSettings) + private static final context.ContextOuterClass.ConnectionSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings(); + } + + public static context.ContextOuterClass.ConnectionSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Connection) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ConnectionId connection_id = 1; + * @return Whether the connectionId field is set. + */ + boolean hasConnectionId(); + + /** + * .context.ConnectionId connection_id = 1; + * @return The connectionId. + */ + context.ContextOuterClass.ConnectionId getConnectionId(); + + /** + * .context.ConnectionId connection_id = 1; + */ + context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); + + /** + * .context.ServiceId service_id = 2; + * @return Whether the serviceId field is set. + */ + boolean hasServiceId(); + + /** + * .context.ServiceId service_id = 2; + * @return The serviceId. + */ + context.ContextOuterClass.ServiceId getServiceId(); + + /** + * .context.ServiceId service_id = 2; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + java.util.List getPathHopsEndpointIdsList(); + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointId getPathHopsEndpointIds(int index); + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + int getPathHopsEndpointIdsCount(); + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + java.util.List getPathHopsEndpointIdsOrBuilderList(); + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointIdOrBuilder getPathHopsEndpointIdsOrBuilder(int index); + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + java.util.List getSubServiceIdsList(); + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + context.ContextOuterClass.ServiceId getSubServiceIds(int index); + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + int getSubServiceIdsCount(); + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + java.util.List getSubServiceIdsOrBuilderList(); + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + context.ContextOuterClass.ServiceIdOrBuilder getSubServiceIdsOrBuilder(int index); + + /** + * .context.ConnectionSettings settings = 5; + * @return Whether the settings field is set. + */ + boolean hasSettings(); + + /** + * .context.ConnectionSettings settings = 5; + * @return The settings. + */ + context.ContextOuterClass.ConnectionSettings getSettings(); + + /** + * .context.ConnectionSettings settings = 5; + */ + context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder(); + } + + /** + * Protobuf type {@code context.Connection} + */ + public static final class Connection extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Connection) + ConnectionOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Connection.newBuilder() to construct. + private Connection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Connection() { + pathHopsEndpointIds_ = java.util.Collections.emptyList(); + subServiceIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Connection_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Connection.class, context.ContextOuterClass.Connection.Builder.class); + } + + public static final int CONNECTION_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.ConnectionId connectionId_; + + /** + * .context.ConnectionId connection_id = 1; + * @return Whether the connectionId field is set. + */ + @java.lang.Override + public boolean hasConnectionId() { + return connectionId_ != null; + } + + /** + * .context.ConnectionId connection_id = 1; + * @return The connectionId. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionId getConnectionId() { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + + /** + * .context.ConnectionId connection_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + return getConnectionId(); + } + + public static final int SERVICE_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.ServiceId serviceId_; + + /** + * .context.ServiceId service_id = 2; + * @return Whether the serviceId field is set. + */ + @java.lang.Override + public boolean hasServiceId() { + return serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 2; + * @return The serviceId. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceId() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + + /** + * .context.ServiceId service_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + return getServiceId(); + } + + public static final int PATH_HOPS_ENDPOINT_IDS_FIELD_NUMBER = 3; + + private java.util.List pathHopsEndpointIds_; + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getPathHopsEndpointIdsList() { + return pathHopsEndpointIds_; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getPathHopsEndpointIdsOrBuilderList() { + return pathHopsEndpointIds_; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + @java.lang.Override + public int getPathHopsEndpointIdsCount() { + return pathHopsEndpointIds_.size(); + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getPathHopsEndpointIds(int index) { + return pathHopsEndpointIds_.get(index); + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getPathHopsEndpointIdsOrBuilder(int index) { + return pathHopsEndpointIds_.get(index); + } + + public static final int SUB_SERVICE_IDS_FIELD_NUMBER = 4; + + private java.util.List subServiceIds_; + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + @java.lang.Override + public java.util.List getSubServiceIdsList() { + return subServiceIds_; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + @java.lang.Override + public java.util.List getSubServiceIdsOrBuilderList() { + return subServiceIds_; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + @java.lang.Override + public int getSubServiceIdsCount() { + return subServiceIds_.size(); + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getSubServiceIds(int index) { + return subServiceIds_.get(index); + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getSubServiceIdsOrBuilder(int index) { + return subServiceIds_.get(index); + } + + public static final int SETTINGS_FIELD_NUMBER = 5; + + private context.ContextOuterClass.ConnectionSettings settings_; + + /** + * .context.ConnectionSettings settings = 5; + * @return Whether the settings field is set. + */ + @java.lang.Override + public boolean hasSettings() { + return settings_ != null; + } + + /** + * .context.ConnectionSettings settings = 5; + * @return The settings. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettings getSettings() { + return settings_ == null ? context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; + } + + /** + * .context.ConnectionSettings settings = 5; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder() { + return getSettings(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (connectionId_ != null) { + output.writeMessage(1, getConnectionId()); + } + if (serviceId_ != null) { + output.writeMessage(2, getServiceId()); + } + for (int i = 0; i < pathHopsEndpointIds_.size(); i++) { + output.writeMessage(3, pathHopsEndpointIds_.get(i)); + } + for (int i = 0; i < subServiceIds_.size(); i++) { + output.writeMessage(4, subServiceIds_.get(i)); + } + if (settings_ != null) { + output.writeMessage(5, getSettings()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (connectionId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getConnectionId()); + } + if (serviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceId()); + } + for (int i = 0; i < pathHopsEndpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, pathHopsEndpointIds_.get(i)); + } + for (int i = 0; i < subServiceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, subServiceIds_.get(i)); + } + if (settings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSettings()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Connection)) { + return super.equals(obj); + } + context.ContextOuterClass.Connection other = (context.ContextOuterClass.Connection) obj; + if (hasConnectionId() != other.hasConnectionId()) + return false; + if (hasConnectionId()) { + if (!getConnectionId().equals(other.getConnectionId())) + return false; + } + if (hasServiceId() != other.hasServiceId()) + return false; + if (hasServiceId()) { + if (!getServiceId().equals(other.getServiceId())) + return false; + } + if (!getPathHopsEndpointIdsList().equals(other.getPathHopsEndpointIdsList())) + return false; + if (!getSubServiceIdsList().equals(other.getSubServiceIdsList())) + return false; + if (hasSettings() != other.hasSettings()) + return false; + if (hasSettings()) { + if (!getSettings().equals(other.getSettings())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasConnectionId()) { + hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getConnectionId().hashCode(); + } + if (hasServiceId()) { + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + } + if (getPathHopsEndpointIdsCount() > 0) { + hash = (37 * hash) + PATH_HOPS_ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getPathHopsEndpointIdsList().hashCode(); + } + if (getSubServiceIdsCount() > 0) { + hash = (37 * hash) + SUB_SERVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getSubServiceIdsList().hashCode(); + } + if (hasSettings()) { + hash = (37 * hash) + SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSettings().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Connection parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Connection parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Connection parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Connection parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Connection parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Connection parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Connection parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Connection parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Connection parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Connection parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Connection parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Connection parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Connection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Connection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Connection) + context.ContextOuterClass.ConnectionOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Connection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Connection_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Connection.class, context.ContextOuterClass.Connection.Builder.class); + } + + // 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; + connectionIdBuilder_ = null; + } + if (serviceIdBuilder_ == null) { + serviceId_ = null; + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + if (pathHopsEndpointIdsBuilder_ == null) { + pathHopsEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pathHopsEndpointIdsBuilder_.clear(); + } + if (subServiceIdsBuilder_ == null) { + subServiceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + subServiceIdsBuilder_.clear(); + } + if (settingsBuilder_ == null) { + settings_ = null; + } else { + settings_ = null; + settingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Connection_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Connection getDefaultInstanceForType() { + return context.ContextOuterClass.Connection.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Connection build() { + context.ContextOuterClass.Connection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + if (pathHopsEndpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pathHopsEndpointIds_ = java.util.Collections.unmodifiableList(pathHopsEndpointIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pathHopsEndpointIds_ = pathHopsEndpointIds_; + } else { + result.pathHopsEndpointIds_ = pathHopsEndpointIdsBuilder_.build(); + } + if (subServiceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + subServiceIds_ = java.util.Collections.unmodifiableList(subServiceIds_); + bitField0_ = (bitField0_ & ~0x00000002); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Connection) { + return mergeFrom((context.ContextOuterClass.Connection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Connection other) { + if (other == context.ContextOuterClass.Connection.getDefaultInstance()) + return this; + if (other.hasConnectionId()) { + mergeConnectionId(other.getConnectionId()); + } + if (other.hasServiceId()) { + mergeServiceId(other.getServiceId()); + } + if (pathHopsEndpointIdsBuilder_ == null) { + if (!other.pathHopsEndpointIds_.isEmpty()) { + if (pathHopsEndpointIds_.isEmpty()) { + pathHopsEndpointIds_ = other.pathHopsEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.addAll(other.pathHopsEndpointIds_); + } + onChanged(); + } + } else { + if (!other.pathHopsEndpointIds_.isEmpty()) { + if (pathHopsEndpointIdsBuilder_.isEmpty()) { + pathHopsEndpointIdsBuilder_.dispose(); + pathHopsEndpointIdsBuilder_ = null; + pathHopsEndpointIds_ = other.pathHopsEndpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + pathHopsEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPathHopsEndpointIdsFieldBuilder() : null; + } else { + pathHopsEndpointIdsBuilder_.addAllMessages(other.pathHopsEndpointIds_); + } + } + } + if (subServiceIdsBuilder_ == null) { + if (!other.subServiceIds_.isEmpty()) { + if (subServiceIds_.isEmpty()) { + subServiceIds_ = other.subServiceIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSubServiceIdsIsMutable(); + subServiceIds_.addAll(other.subServiceIds_); + } + onChanged(); + } + } else { + if (!other.subServiceIds_.isEmpty()) { + if (subServiceIdsBuilder_.isEmpty()) { + subServiceIdsBuilder_.dispose(); + subServiceIdsBuilder_ = null; + subServiceIds_ = other.subServiceIds_; + bitField0_ = (bitField0_ & ~0x00000002); + subServiceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSubServiceIdsFieldBuilder() : null; + } else { + subServiceIdsBuilder_.addAllMessages(other.subServiceIds_); + } + } + } + if (other.hasSettings()) { + mergeSettings(other.getSettings()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Connection) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.ConnectionId connectionId_; + + private com.google.protobuf.SingleFieldBuilderV3 connectionIdBuilder_; + + /** + * .context.ConnectionId connection_id = 1; + * @return Whether the connectionId field is set. + */ + public boolean hasConnectionId() { + return connectionIdBuilder_ != null || connectionId_ != null; + } + + /** + * .context.ConnectionId connection_id = 1; + * @return The connectionId. + */ + public context.ContextOuterClass.ConnectionId getConnectionId() { + if (connectionIdBuilder_ == null) { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } else { + return connectionIdBuilder_.getMessage(); + } + } + + /** + * .context.ConnectionId connection_id = 1; + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionId_ = value; + onChanged(); + } else { + connectionIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 1; + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdBuilder_ == null) { + connectionId_ = builderForValue.build(); + onChanged(); + } else { + connectionIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 1; + */ + public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (connectionId_ != null) { + connectionId_ = context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); + } else { + connectionId_ = value; + } + onChanged(); + } else { + connectionIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 1; + */ + public Builder clearConnectionId() { + if (connectionIdBuilder_ == null) { + connectionId_ = null; + onChanged(); + } else { + connectionId_ = null; + connectionIdBuilder_ = null; + } + return this; + } + + /** + * .context.ConnectionId connection_id = 1; + */ + public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { + onChanged(); + return getConnectionIdFieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionId connection_id = 1; + */ + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + if (connectionIdBuilder_ != null) { + return connectionIdBuilder_.getMessageOrBuilder(); + } else { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + } + + /** + * .context.ConnectionId connection_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getConnectionIdFieldBuilder() { + if (connectionIdBuilder_ == null) { + connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getConnectionId(), getParentForChildren(), isClean()); + connectionId_ = null; + } + return connectionIdBuilder_; + } + + private context.ContextOuterClass.ServiceId serviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceIdBuilder_; + + /** + * .context.ServiceId service_id = 2; + * @return Whether the serviceId field is set. + */ + public boolean hasServiceId() { + return serviceIdBuilder_ != null || serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 2; + * @return The serviceId. + */ + public context.ContextOuterClass.ServiceId getServiceId() { + if (serviceIdBuilder_ == null) { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } else { + return serviceIdBuilder_.getMessage(); + } + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceId_ = value; + onChanged(); + } else { + serviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdBuilder_ == null) { + serviceId_ = builderForValue.build(); + onChanged(); + } else { + serviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (serviceId_ != null) { + serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + } else { + serviceId_ = value; + } + onChanged(); + } else { + serviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public Builder clearServiceId() { + if (serviceIdBuilder_ == null) { + serviceId_ = null; + onChanged(); + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceId service_id = 2; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + onChanged(); + return getServiceIdFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceId service_id = 2; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + if (serviceIdBuilder_ != null) { + return serviceIdBuilder_.getMessageOrBuilder(); + } else { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + } + + /** + * .context.ServiceId service_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdFieldBuilder() { + if (serviceIdBuilder_ == null) { + serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceId(), getParentForChildren(), isClean()); + serviceId_ = null; + } + return serviceIdBuilder_; + } + + private java.util.List pathHopsEndpointIds_ = java.util.Collections.emptyList(); + + private void ensurePathHopsEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pathHopsEndpointIds_ = new java.util.ArrayList(pathHopsEndpointIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 pathHopsEndpointIdsBuilder_; + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public java.util.List getPathHopsEndpointIdsList() { + if (pathHopsEndpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pathHopsEndpointIds_); + } else { + return pathHopsEndpointIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public int getPathHopsEndpointIdsCount() { + if (pathHopsEndpointIdsBuilder_ == null) { + return pathHopsEndpointIds_.size(); + } else { + return pathHopsEndpointIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId getPathHopsEndpointIds(int index) { + if (pathHopsEndpointIdsBuilder_ == null) { + return pathHopsEndpointIds_.get(index); + } else { + return pathHopsEndpointIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder setPathHopsEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (pathHopsEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.set(index, value); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder setPathHopsEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (pathHopsEndpointIdsBuilder_ == null) { + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.set(index, builderForValue.build()); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder addPathHopsEndpointIds(context.ContextOuterClass.EndPointId value) { + if (pathHopsEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.add(value); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder addPathHopsEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (pathHopsEndpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.add(index, value); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder addPathHopsEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (pathHopsEndpointIdsBuilder_ == null) { + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.add(builderForValue.build()); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder addPathHopsEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (pathHopsEndpointIdsBuilder_ == null) { + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.add(index, builderForValue.build()); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder addAllPathHopsEndpointIds(java.lang.Iterable values) { + if (pathHopsEndpointIdsBuilder_ == null) { + ensurePathHopsEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pathHopsEndpointIds_); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder clearPathHopsEndpointIds() { + if (pathHopsEndpointIdsBuilder_ == null) { + pathHopsEndpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public Builder removePathHopsEndpointIds(int index) { + if (pathHopsEndpointIdsBuilder_ == null) { + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.remove(index); + onChanged(); + } else { + pathHopsEndpointIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder getPathHopsEndpointIdsBuilder(int index) { + return getPathHopsEndpointIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getPathHopsEndpointIdsOrBuilder(int index) { + if (pathHopsEndpointIdsBuilder_ == null) { + return pathHopsEndpointIds_.get(index); + } else { + return pathHopsEndpointIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public java.util.List getPathHopsEndpointIdsOrBuilderList() { + if (pathHopsEndpointIdsBuilder_ != null) { + return pathHopsEndpointIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pathHopsEndpointIds_); + } + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addPathHopsEndpointIdsBuilder() { + return getPathHopsEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addPathHopsEndpointIdsBuilder(int index) { + return getPathHopsEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId path_hops_endpoint_ids = 3; + */ + public java.util.List getPathHopsEndpointIdsBuilderList() { + return getPathHopsEndpointIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getPathHopsEndpointIdsFieldBuilder() { + if (pathHopsEndpointIdsBuilder_ == null) { + pathHopsEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(pathHopsEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + pathHopsEndpointIds_ = null; + } + return pathHopsEndpointIdsBuilder_; + } + + private java.util.List subServiceIds_ = java.util.Collections.emptyList(); + + private void ensureSubServiceIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + subServiceIds_ = new java.util.ArrayList(subServiceIds_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 subServiceIdsBuilder_; + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public java.util.List getSubServiceIdsList() { + if (subServiceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subServiceIds_); + } else { + return subServiceIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public int getSubServiceIdsCount() { + if (subServiceIdsBuilder_ == null) { + return subServiceIds_.size(); + } else { + return subServiceIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public context.ContextOuterClass.ServiceId getSubServiceIds(int index) { + if (subServiceIdsBuilder_ == null) { + return subServiceIds_.get(index); + } else { + return subServiceIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder setSubServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (subServiceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubServiceIdsIsMutable(); + subServiceIds_.set(index, value); + onChanged(); + } else { + subServiceIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder setSubServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (subServiceIdsBuilder_ == null) { + ensureSubServiceIdsIsMutable(); + subServiceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + subServiceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder addSubServiceIds(context.ContextOuterClass.ServiceId value) { + if (subServiceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubServiceIdsIsMutable(); + subServiceIds_.add(value); + onChanged(); + } else { + subServiceIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder addSubServiceIds(int index, context.ContextOuterClass.ServiceId value) { + if (subServiceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubServiceIdsIsMutable(); + subServiceIds_.add(index, value); + onChanged(); + } else { + subServiceIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder addSubServiceIds(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (subServiceIdsBuilder_ == null) { + ensureSubServiceIdsIsMutable(); + subServiceIds_.add(builderForValue.build()); + onChanged(); + } else { + subServiceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder addSubServiceIds(int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (subServiceIdsBuilder_ == null) { + ensureSubServiceIdsIsMutable(); + subServiceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + subServiceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder addAllSubServiceIds(java.lang.Iterable values) { + if (subServiceIdsBuilder_ == null) { + ensureSubServiceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subServiceIds_); + onChanged(); + } else { + subServiceIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder clearSubServiceIds() { + if (subServiceIdsBuilder_ == null) { + subServiceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + subServiceIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public Builder removeSubServiceIds(int index) { + if (subServiceIdsBuilder_ == null) { + ensureSubServiceIdsIsMutable(); + subServiceIds_.remove(index); + onChanged(); + } else { + subServiceIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public context.ContextOuterClass.ServiceId.Builder getSubServiceIdsBuilder(int index) { + return getSubServiceIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getSubServiceIdsOrBuilder(int index) { + if (subServiceIdsBuilder_ == null) { + return subServiceIds_.get(index); + } else { + return subServiceIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public java.util.List getSubServiceIdsOrBuilderList() { + if (subServiceIdsBuilder_ != null) { + return subServiceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subServiceIds_); + } + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public context.ContextOuterClass.ServiceId.Builder addSubServiceIdsBuilder() { + return getSubServiceIdsFieldBuilder().addBuilder(context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public context.ContextOuterClass.ServiceId.Builder addSubServiceIdsBuilder(int index) { + return getSubServiceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.ServiceId.getDefaultInstance()); + } + + /** + * repeated .context.ServiceId sub_service_ids = 4; + */ + public java.util.List getSubServiceIdsBuilderList() { + return getSubServiceIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSubServiceIdsFieldBuilder() { + if (subServiceIdsBuilder_ == null) { + subServiceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(subServiceIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + subServiceIds_ = null; + } + return subServiceIdsBuilder_; + } + + private context.ContextOuterClass.ConnectionSettings settings_; + + private com.google.protobuf.SingleFieldBuilderV3 settingsBuilder_; + + /** + * .context.ConnectionSettings settings = 5; + * @return Whether the settings field is set. + */ + public boolean hasSettings() { + return settingsBuilder_ != null || settings_ != null; + } + + /** + * .context.ConnectionSettings settings = 5; + * @return The settings. + */ + public context.ContextOuterClass.ConnectionSettings getSettings() { + if (settingsBuilder_ == null) { + return settings_ == null ? context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; + } else { + return settingsBuilder_.getMessage(); + } + } + + /** + * .context.ConnectionSettings settings = 5; + */ + public Builder setSettings(context.ContextOuterClass.ConnectionSettings value) { + if (settingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + settings_ = value; + onChanged(); + } else { + settingsBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionSettings settings = 5; + */ + public Builder setSettings(context.ContextOuterClass.ConnectionSettings.Builder builderForValue) { + if (settingsBuilder_ == null) { + settings_ = builderForValue.build(); + onChanged(); + } else { + settingsBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionSettings settings = 5; + */ + public Builder mergeSettings(context.ContextOuterClass.ConnectionSettings value) { + if (settingsBuilder_ == null) { + if (settings_ != null) { + settings_ = context.ContextOuterClass.ConnectionSettings.newBuilder(settings_).mergeFrom(value).buildPartial(); + } else { + settings_ = value; + } + onChanged(); + } else { + settingsBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionSettings settings = 5; + */ + public Builder clearSettings() { + if (settingsBuilder_ == null) { + settings_ = null; + onChanged(); + } else { + settings_ = null; + settingsBuilder_ = null; + } + return this; + } + + /** + * .context.ConnectionSettings settings = 5; + */ + public context.ContextOuterClass.ConnectionSettings.Builder getSettingsBuilder() { + onChanged(); + return getSettingsFieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionSettings settings = 5; + */ + public context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder() { + if (settingsBuilder_ != null) { + return settingsBuilder_.getMessageOrBuilder(); + } else { + return settings_ == null ? context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; + } + } + + /** + * .context.ConnectionSettings settings = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSettingsFieldBuilder() { + if (settingsBuilder_ == null) { + settingsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSettings(), getParentForChildren(), isClean()); + settings_ = null; + } + return settingsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Connection) + } + + // @@protoc_insertion_point(class_scope:context.Connection) + private static final context.ContextOuterClass.Connection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Connection(); + } + + public static context.ContextOuterClass.Connection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Connection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + java.util.List getConnectionIdsList(); + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + context.ContextOuterClass.ConnectionId getConnectionIds(int index); + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + int getConnectionIdsCount(); + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + java.util.List getConnectionIdsOrBuilderList(); + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ConnectionIdList} + */ + public static final class ConnectionIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionIdList) + ConnectionIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionIdList.newBuilder() to construct. + private ConnectionIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionIdList() { + connectionIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionIdList.class, context.ContextOuterClass.ConnectionIdList.Builder.class); + } + + public static final int CONNECTION_IDS_FIELD_NUMBER = 1; + + private java.util.List connectionIds_; + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + @java.lang.Override + public java.util.List getConnectionIdsList() { + return connectionIds_; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + @java.lang.Override + public java.util.List getConnectionIdsOrBuilderList() { + return connectionIds_; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + @java.lang.Override + public int getConnectionIdsCount() { + return connectionIds_.size(); + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionId getConnectionIds(int index) { + return connectionIds_.get(index); + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdsOrBuilder(int index) { + return connectionIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < connectionIds_.size(); i++) { + output.writeMessage(1, connectionIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < connectionIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, connectionIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionIdList other = (context.ContextOuterClass.ConnectionIdList) obj; + if (!getConnectionIdsList().equals(other.getConnectionIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConnectionIdsCount() > 0) { + hash = (37 * hash) + CONNECTION_IDS_FIELD_NUMBER; + hash = (53 * hash) + getConnectionIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionIdList) + context.ContextOuterClass.ConnectionIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionIdList.class, context.ContextOuterClass.ConnectionIdList.Builder.class); + } + + // 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(); + if (connectionIdsBuilder_ == null) { + connectionIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + connectionIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionIdList getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionIdList build() { + context.ContextOuterClass.ConnectionIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionIdList buildPartial() { + context.ContextOuterClass.ConnectionIdList result = new context.ContextOuterClass.ConnectionIdList(this); + int from_bitField0_ = bitField0_; + if (connectionIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + connectionIds_ = java.util.Collections.unmodifiableList(connectionIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.connectionIds_ = connectionIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionIdList) { + return mergeFrom((context.ContextOuterClass.ConnectionIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionIdList other) { + if (other == context.ContextOuterClass.ConnectionIdList.getDefaultInstance()) + return this; + if (connectionIdsBuilder_ == null) { + if (!other.connectionIds_.isEmpty()) { + if (connectionIds_.isEmpty()) { + connectionIds_ = other.connectionIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConnectionIdsIsMutable(); + connectionIds_.addAll(other.connectionIds_); + } + onChanged(); + } + } else { + if (!other.connectionIds_.isEmpty()) { + if (connectionIdsBuilder_.isEmpty()) { + connectionIdsBuilder_.dispose(); + connectionIdsBuilder_ = null; + connectionIds_ = other.connectionIds_; + bitField0_ = (bitField0_ & ~0x00000001); + connectionIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConnectionIdsFieldBuilder() : null; + } else { + connectionIdsBuilder_.addAllMessages(other.connectionIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List connectionIds_ = java.util.Collections.emptyList(); + + private void ensureConnectionIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + connectionIds_ = new java.util.ArrayList(connectionIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 connectionIdsBuilder_; + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public java.util.List getConnectionIdsList() { + if (connectionIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(connectionIds_); + } else { + return connectionIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public int getConnectionIdsCount() { + if (connectionIdsBuilder_ == null) { + return connectionIds_.size(); + } else { + return connectionIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public context.ContextOuterClass.ConnectionId getConnectionIds(int index) { + if (connectionIdsBuilder_ == null) { + return connectionIds_.get(index); + } else { + return connectionIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder setConnectionIds(int index, context.ContextOuterClass.ConnectionId value) { + if (connectionIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionIdsIsMutable(); + connectionIds_.set(index, value); + onChanged(); + } else { + connectionIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder setConnectionIds(int index, context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdsBuilder_ == null) { + ensureConnectionIdsIsMutable(); + connectionIds_.set(index, builderForValue.build()); + onChanged(); + } else { + connectionIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder addConnectionIds(context.ContextOuterClass.ConnectionId value) { + if (connectionIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionIdsIsMutable(); + connectionIds_.add(value); + onChanged(); + } else { + connectionIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder addConnectionIds(int index, context.ContextOuterClass.ConnectionId value) { + if (connectionIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionIdsIsMutable(); + connectionIds_.add(index, value); + onChanged(); + } else { + connectionIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder addConnectionIds(context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdsBuilder_ == null) { + ensureConnectionIdsIsMutable(); + connectionIds_.add(builderForValue.build()); + onChanged(); + } else { + connectionIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder addConnectionIds(int index, context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdsBuilder_ == null) { + ensureConnectionIdsIsMutable(); + connectionIds_.add(index, builderForValue.build()); + onChanged(); + } else { + connectionIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder addAllConnectionIds(java.lang.Iterable values) { + if (connectionIdsBuilder_ == null) { + ensureConnectionIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, connectionIds_); + onChanged(); + } else { + connectionIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder clearConnectionIds() { + if (connectionIdsBuilder_ == null) { + connectionIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + connectionIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public Builder removeConnectionIds(int index) { + if (connectionIdsBuilder_ == null) { + ensureConnectionIdsIsMutable(); + connectionIds_.remove(index); + onChanged(); + } else { + connectionIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public context.ContextOuterClass.ConnectionId.Builder getConnectionIdsBuilder(int index) { + return getConnectionIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdsOrBuilder(int index) { + if (connectionIdsBuilder_ == null) { + return connectionIds_.get(index); + } else { + return connectionIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public java.util.List getConnectionIdsOrBuilderList() { + if (connectionIdsBuilder_ != null) { + return connectionIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(connectionIds_); + } + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public context.ContextOuterClass.ConnectionId.Builder addConnectionIdsBuilder() { + return getConnectionIdsFieldBuilder().addBuilder(context.ContextOuterClass.ConnectionId.getDefaultInstance()); + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public context.ContextOuterClass.ConnectionId.Builder addConnectionIdsBuilder(int index) { + return getConnectionIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.ConnectionId.getDefaultInstance()); + } + + /** + * repeated .context.ConnectionId connection_ids = 1; + */ + public java.util.List getConnectionIdsBuilderList() { + return getConnectionIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getConnectionIdsFieldBuilder() { + if (connectionIdsBuilder_ == null) { + connectionIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(connectionIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + connectionIds_ = null; + } + return connectionIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionIdList) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionIdList) + private static final context.ContextOuterClass.ConnectionIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionIdList(); + } + + public static context.ContextOuterClass.ConnectionIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.Connection connections = 1; + */ + java.util.List getConnectionsList(); + + /** + * repeated .context.Connection connections = 1; + */ + context.ContextOuterClass.Connection getConnections(int index); + + /** + * repeated .context.Connection connections = 1; + */ + int getConnectionsCount(); + + /** + * repeated .context.Connection connections = 1; + */ + java.util.List getConnectionsOrBuilderList(); + + /** + * repeated .context.Connection connections = 1; + */ + context.ContextOuterClass.ConnectionOrBuilder getConnectionsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.ConnectionList} + */ + public static final class ConnectionList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionList) + ConnectionListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionList.newBuilder() to construct. + private ConnectionList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionList() { + connections_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionList.class, context.ContextOuterClass.ConnectionList.Builder.class); + } + + public static final int CONNECTIONS_FIELD_NUMBER = 1; + + private java.util.List connections_; + + /** + * repeated .context.Connection connections = 1; + */ + @java.lang.Override + public java.util.List getConnectionsList() { + return connections_; + } + + /** + * repeated .context.Connection connections = 1; + */ + @java.lang.Override + public java.util.List getConnectionsOrBuilderList() { + return connections_; + } + + /** + * repeated .context.Connection connections = 1; + */ + @java.lang.Override + public int getConnectionsCount() { + return connections_.size(); + } + + /** + * repeated .context.Connection connections = 1; + */ + @java.lang.Override + public context.ContextOuterClass.Connection getConnections(int index) { + return connections_.get(index); + } + + /** + * repeated .context.Connection connections = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionOrBuilder getConnectionsOrBuilder(int index) { + return connections_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < connections_.size(); i++) { + output.writeMessage(1, connections_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < connections_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, connections_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionList)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionList other = (context.ContextOuterClass.ConnectionList) obj; + if (!getConnectionsList().equals(other.getConnectionsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConnectionsCount() > 0) { + hash = (37 * hash) + CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getConnectionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionList) + context.ContextOuterClass.ConnectionListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionList.class, context.ContextOuterClass.ConnectionList.Builder.class); + } + + // 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(); + if (connectionsBuilder_ == null) { + connections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + connectionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionList getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionList build() { + context.ContextOuterClass.ConnectionList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionList buildPartial() { + context.ContextOuterClass.ConnectionList result = new context.ContextOuterClass.ConnectionList(this); + int from_bitField0_ = bitField0_; + if (connectionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + connections_ = java.util.Collections.unmodifiableList(connections_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.connections_ = connections_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionList) { + return mergeFrom((context.ContextOuterClass.ConnectionList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionList other) { + if (other == context.ContextOuterClass.ConnectionList.getDefaultInstance()) + return this; + if (connectionsBuilder_ == null) { + if (!other.connections_.isEmpty()) { + if (connections_.isEmpty()) { + connections_ = other.connections_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConnectionsIsMutable(); + connections_.addAll(other.connections_); + } + onChanged(); + } + } else { + if (!other.connections_.isEmpty()) { + if (connectionsBuilder_.isEmpty()) { + connectionsBuilder_.dispose(); + connectionsBuilder_ = null; + connections_ = other.connections_; + bitField0_ = (bitField0_ & ~0x00000001); + connectionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConnectionsFieldBuilder() : null; + } else { + connectionsBuilder_.addAllMessages(other.connections_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List connections_ = java.util.Collections.emptyList(); + + private void ensureConnectionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + connections_ = new java.util.ArrayList(connections_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 connectionsBuilder_; + + /** + * repeated .context.Connection connections = 1; + */ + public java.util.List getConnectionsList() { + if (connectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(connections_); + } else { + return connectionsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.Connection connections = 1; + */ + public int getConnectionsCount() { + if (connectionsBuilder_ == null) { + return connections_.size(); + } else { + return connectionsBuilder_.getCount(); + } + } + + /** + * repeated .context.Connection connections = 1; + */ + public context.ContextOuterClass.Connection getConnections(int index) { + if (connectionsBuilder_ == null) { + return connections_.get(index); + } else { + return connectionsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder setConnections(int index, context.ContextOuterClass.Connection value) { + if (connectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionsIsMutable(); + connections_.set(index, value); + onChanged(); + } else { + connectionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder setConnections(int index, context.ContextOuterClass.Connection.Builder builderForValue) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.set(index, builderForValue.build()); + onChanged(); + } else { + connectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder addConnections(context.ContextOuterClass.Connection value) { + if (connectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionsIsMutable(); + connections_.add(value); + onChanged(); + } else { + connectionsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder addConnections(int index, context.ContextOuterClass.Connection value) { + if (connectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectionsIsMutable(); + connections_.add(index, value); + onChanged(); + } else { + connectionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder addConnections(context.ContextOuterClass.Connection.Builder builderForValue) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.add(builderForValue.build()); + onChanged(); + } else { + connectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder addConnections(int index, context.ContextOuterClass.Connection.Builder builderForValue) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.add(index, builderForValue.build()); + onChanged(); + } else { + connectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder addAllConnections(java.lang.Iterable values) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, connections_); + onChanged(); + } else { + connectionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder clearConnections() { + if (connectionsBuilder_ == null) { + connections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + connectionsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public Builder removeConnections(int index) { + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.remove(index); + onChanged(); + } else { + connectionsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.Connection connections = 1; + */ + public context.ContextOuterClass.Connection.Builder getConnectionsBuilder(int index) { + return getConnectionsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.Connection connections = 1; + */ + public context.ContextOuterClass.ConnectionOrBuilder getConnectionsOrBuilder(int index) { + if (connectionsBuilder_ == null) { + return connections_.get(index); + } else { + return connectionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.Connection connections = 1; + */ + public java.util.List getConnectionsOrBuilderList() { + if (connectionsBuilder_ != null) { + return connectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(connections_); + } + } + + /** + * repeated .context.Connection connections = 1; + */ + public context.ContextOuterClass.Connection.Builder addConnectionsBuilder() { + return getConnectionsFieldBuilder().addBuilder(context.ContextOuterClass.Connection.getDefaultInstance()); + } + + /** + * repeated .context.Connection connections = 1; + */ + public context.ContextOuterClass.Connection.Builder addConnectionsBuilder(int index) { + return getConnectionsFieldBuilder().addBuilder(index, context.ContextOuterClass.Connection.getDefaultInstance()); + } + + /** + * repeated .context.Connection connections = 1; + */ + public java.util.List getConnectionsBuilderList() { + return getConnectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getConnectionsFieldBuilder() { + if (connectionsBuilder_ == null) { + connectionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(connections_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + connections_ = null; + } + return connectionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionList) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionList) + private static final context.ContextOuterClass.ConnectionList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionList(); + } + + public static context.ContextOuterClass.ConnectionList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConnectionEventOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConnectionEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + boolean hasEvent(); + + /** + * .context.Event event = 1; + * @return The event. + */ + context.ContextOuterClass.Event getEvent(); + + /** + * .context.Event event = 1; + */ + context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + + /** + * .context.ConnectionId connection_id = 2; + * @return Whether the connectionId field is set. + */ + boolean hasConnectionId(); + + /** + * .context.ConnectionId connection_id = 2; + * @return The connectionId. + */ + context.ContextOuterClass.ConnectionId getConnectionId(); + + /** + * .context.ConnectionId connection_id = 2; + */ + context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); + } + + /** + * Protobuf type {@code context.ConnectionEvent} + */ + public static final class ConnectionEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConnectionEvent) + ConnectionEventOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConnectionEvent.newBuilder() to construct. + private ConnectionEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConnectionEvent() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionEvent.class, context.ContextOuterClass.ConnectionEvent.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Event event_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + @java.lang.Override + public context.ContextOuterClass.Event getEvent() { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + + /** + * .context.Event event = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + public static final int CONNECTION_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.ConnectionId connectionId_; + + /** + * .context.ConnectionId connection_id = 2; + * @return Whether the connectionId field is set. + */ + @java.lang.Override + public boolean hasConnectionId() { + return connectionId_ != null; + } + + /** + * .context.ConnectionId connection_id = 2; + * @return The connectionId. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionId getConnectionId() { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + + /** + * .context.ConnectionId connection_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + return getConnectionId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (event_ != null) { + output.writeMessage(1, getEvent()); + } + if (connectionId_ != null) { + output.writeMessage(2, getConnectionId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEvent()); + } + if (connectionId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConnectionId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConnectionEvent)) { + return super.equals(obj); + } + context.ContextOuterClass.ConnectionEvent other = (context.ContextOuterClass.ConnectionEvent) obj; + if (hasEvent() != other.hasEvent()) + return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) + return false; + } + if (hasConnectionId() != other.hasConnectionId()) + return false; + if (hasConnectionId()) { + if (!getConnectionId().equals(other.getConnectionId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + if (hasConnectionId()) { + hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getConnectionId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionEvent parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConnectionEvent parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConnectionEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConnectionEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConnectionEvent) + context.ContextOuterClass.ConnectionEventOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConnectionEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConnectionEvent_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConnectionEvent.class, context.ContextOuterClass.ConnectionEvent.Builder.class); + } + + // 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; + eventBuilder_ = null; + } + if (connectionIdBuilder_ == null) { + connectionId_ = null; + } else { + connectionId_ = null; + connectionIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConnectionEvent_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionEvent getDefaultInstanceForType() { + return context.ContextOuterClass.ConnectionEvent.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionEvent build() { + context.ContextOuterClass.ConnectionEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConnectionEvent) { + return mergeFrom((context.ContextOuterClass.ConnectionEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConnectionEvent other) { + if (other == context.ContextOuterClass.ConnectionEvent.getDefaultInstance()) + return this; + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (other.hasConnectionId()) { + mergeConnectionId(other.getConnectionId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConnectionEvent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Event event_; + + private com.google.protobuf.SingleFieldBuilderV3 eventBuilder_; + + /** + * .context.Event event = 1; + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + + /** + * .context.Event event = 1; + * @return The event. + */ + public context.ContextOuterClass.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder mergeEvent(context.ContextOuterClass.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Event event = 1; + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.Event.Builder getEventBuilder() { + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + + /** + * .context.Event event = 1; + */ + public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; + } + } + + /** + * .context.Event event = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private context.ContextOuterClass.ConnectionId connectionId_; + + private com.google.protobuf.SingleFieldBuilderV3 connectionIdBuilder_; + + /** + * .context.ConnectionId connection_id = 2; + * @return Whether the connectionId field is set. + */ + public boolean hasConnectionId() { + return connectionIdBuilder_ != null || connectionId_ != null; + } + + /** + * .context.ConnectionId connection_id = 2; + * @return The connectionId. + */ + public context.ContextOuterClass.ConnectionId getConnectionId() { + if (connectionIdBuilder_ == null) { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } else { + return connectionIdBuilder_.getMessage(); + } + } + + /** + * .context.ConnectionId connection_id = 2; + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionId_ = value; + onChanged(); + } else { + connectionIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 2; + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdBuilder_ == null) { + connectionId_ = builderForValue.build(); + onChanged(); + } else { + connectionIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 2; + */ + public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (connectionId_ != null) { + connectionId_ = context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); + } else { + connectionId_ = value; + } + onChanged(); + } else { + connectionIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 2; + */ + public Builder clearConnectionId() { + if (connectionIdBuilder_ == null) { + connectionId_ = null; + onChanged(); + } else { + connectionId_ = null; + connectionIdBuilder_ = null; + } + return this; + } + + /** + * .context.ConnectionId connection_id = 2; + */ + public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { + onChanged(); + return getConnectionIdFieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionId connection_id = 2; + */ + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + if (connectionIdBuilder_ != null) { + return connectionIdBuilder_.getMessageOrBuilder(); + } else { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + } + + /** + * .context.ConnectionId connection_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getConnectionIdFieldBuilder() { + if (connectionIdBuilder_ == null) { + connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getConnectionId(), getParentForChildren(), isClean()); + connectionId_ = null; + } + return connectionIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConnectionEvent) + } + + // @@protoc_insertion_point(class_scope:context.ConnectionEvent) + private static final context.ContextOuterClass.ConnectionEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionEvent(); + } + + public static context.ContextOuterClass.ConnectionEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConnectionEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EndPointIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.EndPointId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + boolean hasTopologyId(); + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + context.ContextOuterClass.TopologyId getTopologyId(); + + /** + * .context.TopologyId topology_id = 1; + */ + context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + boolean hasDeviceId(); + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + context.ContextOuterClass.DeviceId getDeviceId(); + + /** + * .context.DeviceId device_id = 2; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + + /** + * .context.Uuid endpoint_uuid = 3; + * @return Whether the endpointUuid field is set. + */ + boolean hasEndpointUuid(); + + /** + * .context.Uuid endpoint_uuid = 3; + * @return The endpointUuid. + */ + context.ContextOuterClass.Uuid getEndpointUuid(); + + /** + * .context.Uuid endpoint_uuid = 3; + */ + context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder(); + } + + /** + *
+     * ----- Endpoint ------------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.EndPointId} + */ + public static final class EndPointId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.EndPointId) + EndPointIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use EndPointId.newBuilder() to construct. + private EndPointId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndPointId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointId.class, context.ContextOuterClass.EndPointId.Builder.class); + } + + public static final int TOPOLOGY_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.TopologyId topologyId_; + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + @java.lang.Override + public boolean hasTopologyId() { + return topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + @java.lang.Override + public context.ContextOuterClass.TopologyId getTopologyId() { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + + /** + * .context.TopologyId topology_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + return getTopologyId(); + } + + public static final int DEVICE_ID_FIELD_NUMBER = 2; + + private context.ContextOuterClass.DeviceId deviceId_; + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + @java.lang.Override + public boolean hasDeviceId() { + return deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceId() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + + /** + * .context.DeviceId device_id = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + return getDeviceId(); + } + + public static final int ENDPOINT_UUID_FIELD_NUMBER = 3; + + private context.ContextOuterClass.Uuid endpointUuid_; + + /** + * .context.Uuid endpoint_uuid = 3; + * @return Whether the endpointUuid field is set. + */ + @java.lang.Override + public boolean hasEndpointUuid() { + return endpointUuid_ != null; + } + + /** + * .context.Uuid endpoint_uuid = 3; + * @return The endpointUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getEndpointUuid() { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { + return getEndpointUuid(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (topologyId_ != null) { + output.writeMessage(1, getTopologyId()); + } + if (deviceId_ != null) { + output.writeMessage(2, getDeviceId()); + } + if (endpointUuid_ != null) { + output.writeMessage(3, getEndpointUuid()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (topologyId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTopologyId()); + } + if (deviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeviceId()); + } + if (endpointUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndpointUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.EndPointId)) { + return super.equals(obj); + } + context.ContextOuterClass.EndPointId other = (context.ContextOuterClass.EndPointId) obj; + if (hasTopologyId() != other.hasTopologyId()) + return false; + if (hasTopologyId()) { + if (!getTopologyId().equals(other.getTopologyId())) + return false; + } + if (hasDeviceId() != other.hasDeviceId()) + return false; + if (hasDeviceId()) { + if (!getDeviceId().equals(other.getDeviceId())) + return false; + } + if (hasEndpointUuid() != other.hasEndpointUuid()) + return false; + if (hasEndpointUuid()) { + if (!getEndpointUuid().equals(other.getEndpointUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTopologyId()) { + hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; + hash = (53 * hash) + getTopologyId().hashCode(); + } + if (hasDeviceId()) { + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + } + if (hasEndpointUuid()) { + hash = (37 * hash) + ENDPOINT_UUID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.EndPointId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.EndPointId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ----- Endpoint ------------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.EndPointId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.EndPointId) + context.ContextOuterClass.EndPointIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_EndPointId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointId.class, context.ContextOuterClass.EndPointId.Builder.class); + } + + // 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; + topologyIdBuilder_ = null; + } + if (deviceIdBuilder_ == null) { + deviceId_ = null; + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + if (endpointUuidBuilder_ == null) { + endpointUuid_ = null; + } else { + endpointUuid_ = null; + endpointUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_EndPointId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointId getDefaultInstanceForType() { + return context.ContextOuterClass.EndPointId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.EndPointId build() { + context.ContextOuterClass.EndPointId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.EndPointId) { + return mergeFrom((context.ContextOuterClass.EndPointId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.EndPointId other) { + if (other == context.ContextOuterClass.EndPointId.getDefaultInstance()) + return this; + if (other.hasTopologyId()) { + mergeTopologyId(other.getTopologyId()); + } + if (other.hasDeviceId()) { + mergeDeviceId(other.getDeviceId()); + } + if (other.hasEndpointUuid()) { + mergeEndpointUuid(other.getEndpointUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.EndPointId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.TopologyId topologyId_; + + private com.google.protobuf.SingleFieldBuilderV3 topologyIdBuilder_; + + /** + * .context.TopologyId topology_id = 1; + * @return Whether the topologyId field is set. + */ + public boolean hasTopologyId() { + return topologyIdBuilder_ != null || topologyId_ != null; + } + + /** + * .context.TopologyId topology_id = 1; + * @return The topologyId. + */ + public context.ContextOuterClass.TopologyId getTopologyId() { + if (topologyIdBuilder_ == null) { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } else { + return topologyIdBuilder_.getMessage(); + } + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topologyId_ = value; + onChanged(); + } else { + topologyIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { + if (topologyIdBuilder_ == null) { + topologyId_ = builderForValue.build(); + onChanged(); + } else { + topologyIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { + if (topologyIdBuilder_ == null) { + if (topologyId_ != null) { + topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + } else { + topologyId_ = value; + } + onChanged(); + } else { + topologyIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public Builder clearTopologyId() { + if (topologyIdBuilder_ == null) { + topologyId_ = null; + onChanged(); + } else { + topologyId_ = null; + topologyIdBuilder_ = null; + } + return this; + } + + /** + * .context.TopologyId topology_id = 1; + */ + public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + onChanged(); + return getTopologyIdFieldBuilder().getBuilder(); + } + + /** + * .context.TopologyId topology_id = 1; + */ + public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { + if (topologyIdBuilder_ != null) { + return topologyIdBuilder_.getMessageOrBuilder(); + } else { + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; + } + } + + /** + * .context.TopologyId topology_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTopologyIdFieldBuilder() { + if (topologyIdBuilder_ == null) { + topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTopologyId(), getParentForChildren(), isClean()); + topologyId_ = null; + } + return topologyIdBuilder_; + } + + private context.ContextOuterClass.DeviceId deviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceIdBuilder_; + + /** + * .context.DeviceId device_id = 2; + * @return Whether the deviceId field is set. + */ + public boolean hasDeviceId() { + return deviceIdBuilder_ != null || deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 2; + * @return The deviceId. + */ + public context.ContextOuterClass.DeviceId getDeviceId() { + if (deviceIdBuilder_ == null) { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } else { + return deviceIdBuilder_.getMessage(); + } + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceId_ = value; + onChanged(); + } else { + deviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdBuilder_ == null) { + deviceId_ = builderForValue.build(); + onChanged(); + } else { + deviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (deviceId_ != null) { + deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + } else { + deviceId_ = value; + } + onChanged(); + } else { + deviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public Builder clearDeviceId() { + if (deviceIdBuilder_ == null) { + deviceId_ = null; + onChanged(); + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceId device_id = 2; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + onChanged(); + return getDeviceIdFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceId device_id = 2; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + if (deviceIdBuilder_ != null) { + return deviceIdBuilder_.getMessageOrBuilder(); + } else { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + } + + /** + * .context.DeviceId device_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdFieldBuilder() { + if (deviceIdBuilder_ == null) { + deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceId(), getParentForChildren(), isClean()); + deviceId_ = null; + } + return deviceIdBuilder_; + } + + private context.ContextOuterClass.Uuid endpointUuid_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointUuidBuilder_; + + /** + * .context.Uuid endpoint_uuid = 3; + * @return Whether the endpointUuid field is set. + */ + public boolean hasEndpointUuid() { + return endpointUuidBuilder_ != null || endpointUuid_ != null; + } + + /** + * .context.Uuid endpoint_uuid = 3; + * @return The endpointUuid. + */ + public context.ContextOuterClass.Uuid getEndpointUuid() { + if (endpointUuidBuilder_ == null) { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; + } else { + return endpointUuidBuilder_.getMessage(); + } + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder setEndpointUuid(context.ContextOuterClass.Uuid value) { + if (endpointUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointUuid_ = value; + onChanged(); + } else { + endpointUuidBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder setEndpointUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (endpointUuidBuilder_ == null) { + endpointUuid_ = builderForValue.build(); + onChanged(); + } else { + endpointUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder mergeEndpointUuid(context.ContextOuterClass.Uuid value) { + if (endpointUuidBuilder_ == null) { + if (endpointUuid_ != null) { + endpointUuid_ = context.ContextOuterClass.Uuid.newBuilder(endpointUuid_).mergeFrom(value).buildPartial(); + } else { + endpointUuid_ = value; + } + onChanged(); + } else { + endpointUuidBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public Builder clearEndpointUuid() { + if (endpointUuidBuilder_ == null) { + endpointUuid_ = null; + onChanged(); + } else { + endpointUuid_ = null; + endpointUuidBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public context.ContextOuterClass.Uuid.Builder getEndpointUuidBuilder() { + onChanged(); + return getEndpointUuidFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { + if (endpointUuidBuilder_ != null) { + return endpointUuidBuilder_.getMessageOrBuilder(); + } else { + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; + } + } + + /** + * .context.Uuid endpoint_uuid = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointUuidFieldBuilder() { + if (endpointUuidBuilder_ == null) { + endpointUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointUuid(), getParentForChildren(), isClean()); + endpointUuid_ = null; + } + return endpointUuidBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.EndPointId) + } + + // @@protoc_insertion_point(class_scope:context.EndPointId) + private static final context.ContextOuterClass.EndPointId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointId(); + } + + public static context.ContextOuterClass.EndPointId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EndPointOrBuilder extends // @@protoc_insertion_point(interface_extends:context.EndPoint) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + boolean hasEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + context.ContextOuterClass.EndPointId getEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * string endpoint_type = 3; + * @return The endpointType. + */ + java.lang.String getEndpointType(); + + /** + * string endpoint_type = 3; + * @return The bytes for endpointType. + */ + com.google.protobuf.ByteString getEndpointTypeBytes(); + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return A list containing the kpiSampleTypes. + */ + java.util.List getKpiSampleTypesList(); + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return The count of kpiSampleTypes. + */ + int getKpiSampleTypesCount(); + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the element to return. + * @return The kpiSampleTypes at the given index. + */ + kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleTypes(int index); + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return A list containing the enum numeric values on the wire for kpiSampleTypes. + */ + java.util.List getKpiSampleTypesValueList(); + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of kpiSampleTypes at the given index. + */ + int getKpiSampleTypesValue(int index); + + /** + * .context.Location endpoint_location = 5; + * @return Whether the endpointLocation field is set. + */ + boolean hasEndpointLocation(); + + /** + * .context.Location endpoint_location = 5; + * @return The endpointLocation. + */ + context.ContextOuterClass.Location getEndpointLocation(); + + /** + * .context.Location endpoint_location = 5; + */ + context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder(); + } + + /** + * Protobuf type {@code context.EndPoint} + */ + public static final class EndPoint extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.EndPoint) + EndPointOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use EndPoint.newBuilder() to construct. + private EndPoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndPoint() { + name_ = ""; + endpointType_ = ""; + kpiSampleTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPoint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPoint.class, context.ContextOuterClass.EndPoint.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.EndPointId endpointId_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + @java.lang.Override + public boolean hasEndpointId() { + return endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointId() { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + return getEndpointId(); + } + + public static final int NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object name_; + + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_TYPE_FIELD_NUMBER = 3; + + private volatile java.lang.Object endpointType_; + + /** + * string endpoint_type = 3; + * @return The endpointType. + */ + @java.lang.Override + public java.lang.String getEndpointType() { + java.lang.Object ref = endpointType_; + 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(); + endpointType_ = s; + return s; + } + } + + /** + * string endpoint_type = 3; + * @return The bytes for endpointType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointTypeBytes() { + java.lang.Object ref = endpointType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KPI_SAMPLE_TYPES_FIELD_NUMBER = 4; + + private java.util.List kpiSampleTypes_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter kpiSampleTypes_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter() { + + 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); + return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; + } + }; + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return A list containing the kpiSampleTypes. + */ + @java.lang.Override + public java.util.List getKpiSampleTypesList() { + return new com.google.protobuf.Internal.ListAdapter(kpiSampleTypes_, kpiSampleTypes_converter_); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return The count of kpiSampleTypes. + */ + @java.lang.Override + public int getKpiSampleTypesCount() { + return kpiSampleTypes_.size(); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the element to return. + * @return The kpiSampleTypes at the given index. + */ + @java.lang.Override + public kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleTypes(int index) { + return kpiSampleTypes_converter_.convert(kpiSampleTypes_.get(index)); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return A list containing the enum numeric values on the wire for kpiSampleTypes. + */ + @java.lang.Override + public java.util.List getKpiSampleTypesValueList() { + return kpiSampleTypes_; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of kpiSampleTypes at the given index. + */ + @java.lang.Override + public int getKpiSampleTypesValue(int index) { + return kpiSampleTypes_.get(index); + } + + private int kpiSampleTypesMemoizedSerializedSize; + + public static final int ENDPOINT_LOCATION_FIELD_NUMBER = 5; + + private context.ContextOuterClass.Location endpointLocation_; + + /** + * .context.Location endpoint_location = 5; + * @return Whether the endpointLocation field is set. + */ + @java.lang.Override + public boolean hasEndpointLocation() { + return endpointLocation_ != null; + } + + /** + * .context.Location endpoint_location = 5; + * @return The endpointLocation. + */ + @java.lang.Override + public context.ContextOuterClass.Location getEndpointLocation() { + return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; + } + + /** + * .context.Location endpoint_location = 5; + */ + @java.lang.Override + public context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder() { + return getEndpointLocation(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (endpointId_ != null) { + output.writeMessage(1, getEndpointId()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getEndpointTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointType_); + } + if (getKpiSampleTypesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(kpiSampleTypesMemoizedSerializedSize); + } + for (int i = 0; i < kpiSampleTypes_.size(); i++) { + output.writeEnumNoTag(kpiSampleTypes_.get(i)); + } + if (endpointLocation_ != null) { + output.writeMessage(5, getEndpointLocation()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (endpointId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getEndpointTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointType_); + } + { + int dataSize = 0; + for (int i = 0; i < kpiSampleTypes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(kpiSampleTypes_.get(i)); + } + size += dataSize; + if (!getKpiSampleTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + kpiSampleTypesMemoizedSerializedSize = dataSize; + } + if (endpointLocation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndpointLocation()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.EndPoint)) { + return super.equals(obj); + } + context.ContextOuterClass.EndPoint other = (context.ContextOuterClass.EndPoint) obj; + if (hasEndpointId() != other.hasEndpointId()) + return false; + if (hasEndpointId()) { + if (!getEndpointId().equals(other.getEndpointId())) + return false; + } + if (!getName().equals(other.getName())) + return false; + if (!getEndpointType().equals(other.getEndpointType())) + return false; + if (!kpiSampleTypes_.equals(other.kpiSampleTypes_)) + return false; + if (hasEndpointLocation() != other.hasEndpointLocation()) + return false; + if (hasEndpointLocation()) { + if (!getEndpointLocation().equals(other.getEndpointLocation())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointId()) { + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ENDPOINT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getEndpointType().hashCode(); + if (getKpiSampleTypesCount() > 0) { + hash = (37 * hash) + KPI_SAMPLE_TYPES_FIELD_NUMBER; + hash = (53 * hash) + kpiSampleTypes_.hashCode(); + } + if (hasEndpointLocation()) { + hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getEndpointLocation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.EndPoint parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPoint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPoint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPoint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPoint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPoint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPoint parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPoint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPoint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPoint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPoint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPoint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.EndPoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.EndPoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.EndPoint) + context.ContextOuterClass.EndPointOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_EndPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPoint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPoint.class, context.ContextOuterClass.EndPoint.Builder.class); + } + + // 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; + endpointIdBuilder_ = null; + } + name_ = ""; + endpointType_ = ""; + kpiSampleTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + if (endpointLocationBuilder_ == null) { + endpointLocation_ = null; + } else { + endpointLocation_ = null; + endpointLocationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_EndPoint_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.EndPoint getDefaultInstanceForType() { + return context.ContextOuterClass.EndPoint.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.EndPoint build() { + context.ContextOuterClass.EndPoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.EndPoint) { + return mergeFrom((context.ContextOuterClass.EndPoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.EndPoint other) { + if (other == context.ContextOuterClass.EndPoint.getDefaultInstance()) + return this; + if (other.hasEndpointId()) { + mergeEndpointId(other.getEndpointId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getEndpointType().isEmpty()) { + endpointType_ = other.endpointType_; + onChanged(); + } + if (!other.kpiSampleTypes_.isEmpty()) { + if (kpiSampleTypes_.isEmpty()) { + kpiSampleTypes_ = other.kpiSampleTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKpiSampleTypesIsMutable(); + kpiSampleTypes_.addAll(other.kpiSampleTypes_); + } + onChanged(); + } + if (other.hasEndpointLocation()) { + mergeEndpointLocation(other.getEndpointLocation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.EndPoint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private context.ContextOuterClass.EndPointId endpointId_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + public boolean hasEndpointId() { + return endpointIdBuilder_ != null || endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + public context.ContextOuterClass.EndPointId getEndpointId() { + if (endpointIdBuilder_ == null) { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } else { + return endpointIdBuilder_.getMessage(); + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + onChanged(); + } else { + endpointIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdBuilder_ == null) { + endpointId_ = builderForValue.build(); + onChanged(); + } else { + endpointIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (endpointId_ != null) { + endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + } else { + endpointId_ = value; + } + onChanged(); + } else { + endpointIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder clearEndpointId() { + if (endpointIdBuilder_ == null) { + endpointId_ = null; + onChanged(); + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + onChanged(); + return getEndpointIdFieldBuilder().getBuilder(); + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + if (endpointIdBuilder_ != null) { + return endpointIdBuilder_.getMessageOrBuilder(); + } else { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointIdFieldBuilder() { + if (endpointIdBuilder_ == null) { + endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointId(), getParentForChildren(), isClean()); + endpointId_ = null; + } + return endpointIdBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } + + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object endpointType_ = ""; + + /** + * string endpoint_type = 3; + * @return The endpointType. + */ + public java.lang.String getEndpointType() { + java.lang.Object ref = endpointType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string endpoint_type = 3; + * @return The bytes for endpointType. + */ + public com.google.protobuf.ByteString getEndpointTypeBytes() { + java.lang.Object ref = endpointType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string endpoint_type = 3; + * @param value The endpointType to set. + * @return This builder for chaining. + */ + public Builder setEndpointType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpointType_ = value; + onChanged(); + return this; + } + + /** + * string endpoint_type = 3; + * @return This builder for chaining. + */ + public Builder clearEndpointType() { + endpointType_ = getDefaultInstance().getEndpointType(); + onChanged(); + return this; + } + + /** + * string endpoint_type = 3; + * @param value The bytes for endpointType to set. + * @return This builder for chaining. + */ + public Builder setEndpointTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpointType_ = value; + onChanged(); + return this; + } + + private java.util.List kpiSampleTypes_ = java.util.Collections.emptyList(); + + private void ensureKpiSampleTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + kpiSampleTypes_ = new java.util.ArrayList(kpiSampleTypes_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return A list containing the kpiSampleTypes. + */ + public java.util.List getKpiSampleTypesList() { + return new com.google.protobuf.Internal.ListAdapter(kpiSampleTypes_, kpiSampleTypes_converter_); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return The count of kpiSampleTypes. + */ + public int getKpiSampleTypesCount() { + return kpiSampleTypes_.size(); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the element to return. + * @return The kpiSampleTypes at the given index. + */ + public kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleTypes(int index) { + return kpiSampleTypes_converter_.convert(kpiSampleTypes_.get(index)); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index to set the value at. + * @param value The kpiSampleTypes to set. + * @return This builder for chaining. + */ + public Builder setKpiSampleTypes(int index, kpi_sample_types.KpiSampleTypes.KpiSampleType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiSampleTypesIsMutable(); + kpiSampleTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param value The kpiSampleTypes to add. + * @return This builder for chaining. + */ + public Builder addKpiSampleTypes(kpi_sample_types.KpiSampleTypes.KpiSampleType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiSampleTypesIsMutable(); + kpiSampleTypes_.add(value.getNumber()); + onChanged(); + return this; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param values The kpiSampleTypes to add. + * @return This builder for chaining. + */ + public Builder addAllKpiSampleTypes(java.lang.Iterable values) { + ensureKpiSampleTypesIsMutable(); + for (kpi_sample_types.KpiSampleTypes.KpiSampleType value : values) { + kpiSampleTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return This builder for chaining. + */ + public Builder clearKpiSampleTypes() { + kpiSampleTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @return A list containing the enum numeric values on the wire for kpiSampleTypes. + */ + public java.util.List getKpiSampleTypesValueList() { + return java.util.Collections.unmodifiableList(kpiSampleTypes_); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of kpiSampleTypes at the given index. + */ + public int getKpiSampleTypesValue(int index) { + return kpiSampleTypes_.get(index); + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of kpiSampleTypes at the given index. + * @return This builder for chaining. + */ + public Builder setKpiSampleTypesValue(int index, int value) { + ensureKpiSampleTypesIsMutable(); + kpiSampleTypes_.set(index, value); + onChanged(); + return this; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param value The enum numeric value on the wire for kpiSampleTypes to add. + * @return This builder for chaining. + */ + public Builder addKpiSampleTypesValue(int value) { + ensureKpiSampleTypesIsMutable(); + kpiSampleTypes_.add(value); + onChanged(); + return this; + } + + /** + * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; + * @param values The enum numeric values on the wire for kpiSampleTypes to add. + * @return This builder for chaining. + */ + public Builder addAllKpiSampleTypesValue(java.lang.Iterable values) { + ensureKpiSampleTypesIsMutable(); + for (int value : values) { + kpiSampleTypes_.add(value); + } + onChanged(); + return this; + } + + private context.ContextOuterClass.Location endpointLocation_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointLocationBuilder_; + + /** + * .context.Location endpoint_location = 5; + * @return Whether the endpointLocation field is set. + */ + public boolean hasEndpointLocation() { + return endpointLocationBuilder_ != null || endpointLocation_ != null; + } + + /** + * .context.Location endpoint_location = 5; + * @return The endpointLocation. + */ + public context.ContextOuterClass.Location getEndpointLocation() { + if (endpointLocationBuilder_ == null) { + return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; + } else { + return endpointLocationBuilder_.getMessage(); + } + } + + /** + * .context.Location endpoint_location = 5; + */ + public Builder setEndpointLocation(context.ContextOuterClass.Location value) { + if (endpointLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointLocation_ = value; + onChanged(); + } else { + endpointLocationBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Location endpoint_location = 5; + */ + public Builder setEndpointLocation(context.ContextOuterClass.Location.Builder builderForValue) { + if (endpointLocationBuilder_ == null) { + endpointLocation_ = builderForValue.build(); + onChanged(); + } else { + endpointLocationBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Location endpoint_location = 5; + */ + public Builder mergeEndpointLocation(context.ContextOuterClass.Location value) { + if (endpointLocationBuilder_ == null) { + if (endpointLocation_ != null) { + endpointLocation_ = context.ContextOuterClass.Location.newBuilder(endpointLocation_).mergeFrom(value).buildPartial(); + } else { + endpointLocation_ = value; + } + onChanged(); + } else { + endpointLocationBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Location endpoint_location = 5; + */ + public Builder clearEndpointLocation() { + if (endpointLocationBuilder_ == null) { + endpointLocation_ = null; + onChanged(); + } else { + endpointLocation_ = null; + endpointLocationBuilder_ = null; + } + return this; + } + + /** + * .context.Location endpoint_location = 5; + */ + public context.ContextOuterClass.Location.Builder getEndpointLocationBuilder() { + onChanged(); + return getEndpointLocationFieldBuilder().getBuilder(); + } + + /** + * .context.Location endpoint_location = 5; + */ + public context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder() { + if (endpointLocationBuilder_ != null) { + return endpointLocationBuilder_.getMessageOrBuilder(); + } else { + return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; + } + } + + /** + * .context.Location endpoint_location = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointLocationFieldBuilder() { + if (endpointLocationBuilder_ == null) { + endpointLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointLocation(), getParentForChildren(), isClean()); + endpointLocation_ = null; + } + return endpointLocationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.EndPoint) + } + + // @@protoc_insertion_point(class_scope:context.EndPoint) + private static final context.ContextOuterClass.EndPoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.EndPoint(); + } + + public static context.ContextOuterClass.EndPoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.EndPoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EndPointNameOrBuilder extends // @@protoc_insertion_point(interface_extends:context.EndPointName) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + boolean hasEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + context.ContextOuterClass.EndPointId getEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + + /** + * string device_name = 2; + * @return The deviceName. + */ + java.lang.String getDeviceName(); + + /** + * string device_name = 2; + * @return The bytes for deviceName. + */ + com.google.protobuf.ByteString getDeviceNameBytes(); + + /** + * string endpoint_name = 3; + * @return The endpointName. + */ + java.lang.String getEndpointName(); + + /** + * string endpoint_name = 3; + * @return The bytes for endpointName. + */ + com.google.protobuf.ByteString getEndpointNameBytes(); + + /** + * string endpoint_type = 4; + * @return The endpointType. + */ + java.lang.String getEndpointType(); + + /** + * string endpoint_type = 4; + * @return The bytes for endpointType. + */ + com.google.protobuf.ByteString getEndpointTypeBytes(); + } + + /** + * Protobuf type {@code context.EndPointName} + */ + public static final class EndPointName extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.EndPointName) + EndPointNameOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use EndPointName.newBuilder() to construct. + private EndPointName(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndPointName() { + deviceName_ = ""; + endpointName_ = ""; + endpointType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointName_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointName.class, context.ContextOuterClass.EndPointName.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.EndPointId endpointId_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + @java.lang.Override + public boolean hasEndpointId() { + return endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointId() { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + return getEndpointId(); + } + + public static final int DEVICE_NAME_FIELD_NUMBER = 2; + + private volatile java.lang.Object deviceName_; + + /** + * string device_name = 2; + * @return The deviceName. + */ + @java.lang.Override + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + 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(); + deviceName_ = s; + return s; + } + } + + /** + * string device_name = 2; + * @return The bytes for deviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_NAME_FIELD_NUMBER = 3; + + private volatile java.lang.Object endpointName_; + + /** + * string endpoint_name = 3; + * @return The endpointName. + */ + @java.lang.Override + public java.lang.String getEndpointName() { + java.lang.Object ref = endpointName_; + 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(); + endpointName_ = s; + return s; + } + } + + /** + * string endpoint_name = 3; + * @return The bytes for endpointName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointNameBytes() { + java.lang.Object ref = endpointName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_TYPE_FIELD_NUMBER = 4; + + private volatile java.lang.Object endpointType_; + + /** + * string endpoint_type = 4; + * @return The endpointType. + */ + @java.lang.Override + public java.lang.String getEndpointType() { + java.lang.Object ref = endpointType_; + 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(); + endpointType_ = s; + return s; + } + } + + /** + * string endpoint_type = 4; + * @return The bytes for endpointType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointTypeBytes() { + java.lang.Object ref = endpointType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (endpointId_ != null) { + output.writeMessage(1, getEndpointId()); + } + if (!getDeviceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceName_); + } + if (!getEndpointNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointName_); + } + if (!getEndpointTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, endpointType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (endpointId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId()); + } + if (!getDeviceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceName_); + } + if (!getEndpointNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointName_); + } + if (!getEndpointTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, endpointType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.EndPointName)) { + return super.equals(obj); + } + context.ContextOuterClass.EndPointName other = (context.ContextOuterClass.EndPointName) obj; + if (hasEndpointId() != other.hasEndpointId()) + return false; + if (hasEndpointId()) { + if (!getEndpointId().equals(other.getEndpointId())) + return false; + } + if (!getDeviceName().equals(other.getDeviceName())) + return false; + if (!getEndpointName().equals(other.getEndpointName())) + return false; + if (!getEndpointType().equals(other.getEndpointType())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointId()) { + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + } + hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDeviceName().hashCode(); + hash = (37 * hash) + ENDPOINT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getEndpointName().hashCode(); + hash = (37 * hash) + ENDPOINT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getEndpointType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.EndPointName parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointName parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointName parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointName parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointName parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointName parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointName parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointName parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointName parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointName parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointName parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointName parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.EndPointName prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.EndPointName} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.EndPointName) + context.ContextOuterClass.EndPointNameOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_EndPointName_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointName_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointName.class, context.ContextOuterClass.EndPointName.Builder.class); + } + + // 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; + endpointIdBuilder_ = null; + } + deviceName_ = ""; + endpointName_ = ""; + endpointType_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_EndPointName_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointName getDefaultInstanceForType() { + return context.ContextOuterClass.EndPointName.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.EndPointName build() { + context.ContextOuterClass.EndPointName result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.EndPointName) { + return mergeFrom((context.ContextOuterClass.EndPointName) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.EndPointName other) { + if (other == context.ContextOuterClass.EndPointName.getDefaultInstance()) + return this; + if (other.hasEndpointId()) { + mergeEndpointId(other.getEndpointId()); + } + if (!other.getDeviceName().isEmpty()) { + deviceName_ = other.deviceName_; + onChanged(); + } + if (!other.getEndpointName().isEmpty()) { + endpointName_ = other.endpointName_; + onChanged(); + } + if (!other.getEndpointType().isEmpty()) { + endpointType_ = other.endpointType_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.EndPointName) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.EndPointId endpointId_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + public boolean hasEndpointId() { + return endpointIdBuilder_ != null || endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + public context.ContextOuterClass.EndPointId getEndpointId() { + if (endpointIdBuilder_ == null) { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } else { + return endpointIdBuilder_.getMessage(); + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + onChanged(); + } else { + endpointIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdBuilder_ == null) { + endpointId_ = builderForValue.build(); + onChanged(); + } else { + endpointIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (endpointId_ != null) { + endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + } else { + endpointId_ = value; + } + onChanged(); + } else { + endpointIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder clearEndpointId() { + if (endpointIdBuilder_ == null) { + endpointId_ = null; + onChanged(); + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + onChanged(); + return getEndpointIdFieldBuilder().getBuilder(); + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + if (endpointIdBuilder_ != null) { + return endpointIdBuilder_.getMessageOrBuilder(); + } else { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointIdFieldBuilder() { + if (endpointIdBuilder_ == null) { + endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointId(), getParentForChildren(), isClean()); + endpointId_ = null; + } + return endpointIdBuilder_; + } + + private java.lang.Object deviceName_ = ""; + + /** + * string device_name = 2; + * @return The deviceName. + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string device_name = 2; + * @return The bytes for deviceName. + */ + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string device_name = 2; + * @param value The deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deviceName_ = value; + onChanged(); + return this; + } + + /** + * string device_name = 2; + * @return This builder for chaining. + */ + public Builder clearDeviceName() { + deviceName_ = getDefaultInstance().getDeviceName(); + onChanged(); + return this; + } + + /** + * string device_name = 2; + * @param value The bytes for deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object endpointName_ = ""; + + /** + * string endpoint_name = 3; + * @return The endpointName. + */ + public java.lang.String getEndpointName() { + java.lang.Object ref = endpointName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string endpoint_name = 3; + * @return The bytes for endpointName. + */ + public com.google.protobuf.ByteString getEndpointNameBytes() { + java.lang.Object ref = endpointName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string endpoint_name = 3; + * @param value The endpointName to set. + * @return This builder for chaining. + */ + public Builder setEndpointName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpointName_ = value; + onChanged(); + return this; + } + + /** + * string endpoint_name = 3; + * @return This builder for chaining. + */ + public Builder clearEndpointName() { + endpointName_ = getDefaultInstance().getEndpointName(); + onChanged(); + return this; + } + + /** + * string endpoint_name = 3; + * @param value The bytes for endpointName to set. + * @return This builder for chaining. + */ + public Builder setEndpointNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpointName_ = value; + onChanged(); + return this; + } + + private java.lang.Object endpointType_ = ""; + + /** + * string endpoint_type = 4; + * @return The endpointType. + */ + public java.lang.String getEndpointType() { + java.lang.Object ref = endpointType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpointType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string endpoint_type = 4; + * @return The bytes for endpointType. + */ + public com.google.protobuf.ByteString getEndpointTypeBytes() { + java.lang.Object ref = endpointType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpointType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string endpoint_type = 4; + * @param value The endpointType to set. + * @return This builder for chaining. + */ + public Builder setEndpointType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpointType_ = value; + onChanged(); + return this; + } + + /** + * string endpoint_type = 4; + * @return This builder for chaining. + */ + public Builder clearEndpointType() { + endpointType_ = getDefaultInstance().getEndpointType(); + onChanged(); + return this; + } + + /** + * string endpoint_type = 4; + * @param value The bytes for endpointType to set. + * @return This builder for chaining. + */ + public Builder setEndpointTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpointType_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.EndPointName) + } + + // @@protoc_insertion_point(class_scope:context.EndPointName) + private static final context.ContextOuterClass.EndPointName DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointName(); + } + + public static context.ContextOuterClass.EndPointName getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointName getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EndPointIdListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.EndPointIdList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + java.util.List getEndpointIdsList(); + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + context.ContextOuterClass.EndPointId getEndpointIds(int index); + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + int getEndpointIdsCount(); + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + java.util.List getEndpointIdsOrBuilderList(); + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder(int index); + } + + /** + * Protobuf type {@code context.EndPointIdList} + */ + public static final class EndPointIdList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.EndPointIdList) + EndPointIdListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use EndPointIdList.newBuilder() to construct. + private EndPointIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndPointIdList() { + endpointIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointIdList.class, context.ContextOuterClass.EndPointIdList.Builder.class); + } + + public static final int ENDPOINT_IDS_FIELD_NUMBER = 1; + + private java.util.List endpointIds_; + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + @java.lang.Override + public java.util.List getEndpointIdsList() { + return endpointIds_; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + @java.lang.Override + public java.util.List getEndpointIdsOrBuilderList() { + return endpointIds_; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + @java.lang.Override + public int getEndpointIdsCount() { + return endpointIds_.size(); + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointIds(int index) { + return endpointIds_.get(index); + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder(int index) { + return endpointIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < endpointIds_.size(); i++) { + output.writeMessage(1, endpointIds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < endpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpointIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.EndPointIdList)) { + return super.equals(obj); + } + context.ContextOuterClass.EndPointIdList other = (context.ContextOuterClass.EndPointIdList) obj; + if (!getEndpointIdsList().equals(other.getEndpointIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEndpointIdsCount() > 0) { + hash = (37 * hash) + ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getEndpointIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointIdList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointIdList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointIdList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.EndPointIdList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.EndPointIdList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.EndPointIdList) + context.ContextOuterClass.EndPointIdListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_EndPointIdList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointIdList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointIdList.class, context.ContextOuterClass.EndPointIdList.Builder.class); + } + + // 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(); + if (endpointIdsBuilder_ == null) { + endpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + endpointIdsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_EndPointIdList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointIdList getDefaultInstanceForType() { + return context.ContextOuterClass.EndPointIdList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.EndPointIdList build() { + context.ContextOuterClass.EndPointIdList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointIdList buildPartial() { + context.ContextOuterClass.EndPointIdList result = new context.ContextOuterClass.EndPointIdList(this); + int from_bitField0_ = bitField0_; + if (endpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.endpointIds_ = endpointIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.EndPointIdList) { + return mergeFrom((context.ContextOuterClass.EndPointIdList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.EndPointIdList other) { + if (other == context.ContextOuterClass.EndPointIdList.getDefaultInstance()) + return this; + if (endpointIdsBuilder_ == null) { + if (!other.endpointIds_.isEmpty()) { + if (endpointIds_.isEmpty()) { + endpointIds_ = other.endpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEndpointIdsIsMutable(); + endpointIds_.addAll(other.endpointIds_); + } + onChanged(); + } + } else { + if (!other.endpointIds_.isEmpty()) { + if (endpointIdsBuilder_.isEmpty()) { + endpointIdsBuilder_.dispose(); + endpointIdsBuilder_ = null; + endpointIds_ = other.endpointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + endpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndpointIdsFieldBuilder() : null; + } else { + endpointIdsBuilder_.addAllMessages(other.endpointIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.EndPointIdList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List endpointIds_ = java.util.Collections.emptyList(); + + private void ensureEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + endpointIds_ = new java.util.ArrayList(endpointIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 endpointIdsBuilder_; + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public java.util.List getEndpointIdsList() { + if (endpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(endpointIds_); + } else { + return endpointIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public int getEndpointIdsCount() { + if (endpointIdsBuilder_ == null) { + return endpointIds_.size(); + } else { + return endpointIdsBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public context.ContextOuterClass.EndPointId getEndpointIds(int index) { + if (endpointIdsBuilder_ == null) { + return endpointIds_.get(index); + } else { + return endpointIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder setEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (endpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIdsIsMutable(); + endpointIds_.set(index, value); + onChanged(); + } else { + endpointIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder setEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.set(index, builderForValue.build()); + onChanged(); + } else { + endpointIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder addEndpointIds(context.ContextOuterClass.EndPointId value) { + if (endpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIdsIsMutable(); + endpointIds_.add(value); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder addEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (endpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIdsIsMutable(); + endpointIds_.add(index, value); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder addEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.add(builderForValue.build()); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder addEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.add(index, builderForValue.build()); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder addAllEndpointIds(java.lang.Iterable values) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endpointIds_); + onChanged(); + } else { + endpointIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder clearEndpointIds() { + if (endpointIdsBuilder_ == null) { + endpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + endpointIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public Builder removeEndpointIds(int index) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.remove(index); + onChanged(); + } else { + endpointIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdsBuilder(int index) { + return getEndpointIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder(int index) { + if (endpointIdsBuilder_ == null) { + return endpointIds_.get(index); + } else { + return endpointIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public java.util.List getEndpointIdsOrBuilderList() { + if (endpointIdsBuilder_ != null) { + return endpointIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endpointIds_); + } + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder() { + return getEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder(int index) { + return getEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); + } + + /** + * repeated .context.EndPointId endpoint_ids = 1; + */ + public java.util.List getEndpointIdsBuilderList() { + return getEndpointIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getEndpointIdsFieldBuilder() { + if (endpointIdsBuilder_ == null) { + endpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(endpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + endpointIds_ = null; + } + return endpointIdsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.EndPointIdList) + } + + // @@protoc_insertion_point(class_scope:context.EndPointIdList) + private static final context.ContextOuterClass.EndPointIdList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointIdList(); + } + + public static context.ContextOuterClass.EndPointIdList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointIdList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EndPointNameListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.EndPointNameList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + java.util.List getEndpointNamesList(); + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + context.ContextOuterClass.EndPointName getEndpointNames(int index); + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + int getEndpointNamesCount(); + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + java.util.List getEndpointNamesOrBuilderList(); + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + context.ContextOuterClass.EndPointNameOrBuilder getEndpointNamesOrBuilder(int index); + } + + /** + * Protobuf type {@code context.EndPointNameList} + */ + public static final class EndPointNameList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.EndPointNameList) + EndPointNameListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use EndPointNameList.newBuilder() to construct. + private EndPointNameList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EndPointNameList() { + endpointNames_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointNameList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointNameList.class, context.ContextOuterClass.EndPointNameList.Builder.class); + } + + public static final int ENDPOINT_NAMES_FIELD_NUMBER = 1; + + private java.util.List endpointNames_; + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + @java.lang.Override + public java.util.List getEndpointNamesList() { + return endpointNames_; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + @java.lang.Override + public java.util.List getEndpointNamesOrBuilderList() { + return endpointNames_; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + @java.lang.Override + public int getEndpointNamesCount() { + return endpointNames_.size(); + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointName getEndpointNames(int index) { + return endpointNames_.get(index); + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointNameOrBuilder getEndpointNamesOrBuilder(int index) { + return endpointNames_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < endpointNames_.size(); i++) { + output.writeMessage(1, endpointNames_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < endpointNames_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpointNames_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.EndPointNameList)) { + return super.equals(obj); + } + context.ContextOuterClass.EndPointNameList other = (context.ContextOuterClass.EndPointNameList) obj; + if (!getEndpointNamesList().equals(other.getEndpointNamesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEndpointNamesCount() > 0) { + hash = (37 * hash) + ENDPOINT_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getEndpointNamesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointNameList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointNameList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.EndPointNameList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.EndPointNameList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.EndPointNameList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.EndPointNameList) + context.ContextOuterClass.EndPointNameListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_EndPointNameList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_EndPointNameList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.EndPointNameList.class, context.ContextOuterClass.EndPointNameList.Builder.class); + } + + // 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(); + if (endpointNamesBuilder_ == null) { + endpointNames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + endpointNamesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_EndPointNameList_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointNameList getDefaultInstanceForType() { + return context.ContextOuterClass.EndPointNameList.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.EndPointNameList build() { + context.ContextOuterClass.EndPointNameList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointNameList buildPartial() { + context.ContextOuterClass.EndPointNameList result = new context.ContextOuterClass.EndPointNameList(this); + int from_bitField0_ = bitField0_; + if (endpointNamesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + endpointNames_ = java.util.Collections.unmodifiableList(endpointNames_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.endpointNames_ = endpointNames_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.EndPointNameList) { + return mergeFrom((context.ContextOuterClass.EndPointNameList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.EndPointNameList other) { + if (other == context.ContextOuterClass.EndPointNameList.getDefaultInstance()) + return this; + if (endpointNamesBuilder_ == null) { + if (!other.endpointNames_.isEmpty()) { + if (endpointNames_.isEmpty()) { + endpointNames_ = other.endpointNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEndpointNamesIsMutable(); + endpointNames_.addAll(other.endpointNames_); + } + onChanged(); + } + } else { + if (!other.endpointNames_.isEmpty()) { + if (endpointNamesBuilder_.isEmpty()) { + endpointNamesBuilder_.dispose(); + endpointNamesBuilder_ = null; + endpointNames_ = other.endpointNames_; + bitField0_ = (bitField0_ & ~0x00000001); + endpointNamesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndpointNamesFieldBuilder() : null; + } else { + endpointNamesBuilder_.addAllMessages(other.endpointNames_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.EndPointNameList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List endpointNames_ = java.util.Collections.emptyList(); + + private void ensureEndpointNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + endpointNames_ = new java.util.ArrayList(endpointNames_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 endpointNamesBuilder_; + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public java.util.List getEndpointNamesList() { + if (endpointNamesBuilder_ == null) { + return java.util.Collections.unmodifiableList(endpointNames_); + } else { + return endpointNamesBuilder_.getMessageList(); + } + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public int getEndpointNamesCount() { + if (endpointNamesBuilder_ == null) { + return endpointNames_.size(); + } else { + return endpointNamesBuilder_.getCount(); + } + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public context.ContextOuterClass.EndPointName getEndpointNames(int index) { + if (endpointNamesBuilder_ == null) { + return endpointNames_.get(index); + } else { + return endpointNamesBuilder_.getMessage(index); + } + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder setEndpointNames(int index, context.ContextOuterClass.EndPointName value) { + if (endpointNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointNamesIsMutable(); + endpointNames_.set(index, value); + onChanged(); + } else { + endpointNamesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder setEndpointNames(int index, context.ContextOuterClass.EndPointName.Builder builderForValue) { + if (endpointNamesBuilder_ == null) { + ensureEndpointNamesIsMutable(); + endpointNames_.set(index, builderForValue.build()); + onChanged(); + } else { + endpointNamesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder addEndpointNames(context.ContextOuterClass.EndPointName value) { + if (endpointNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointNamesIsMutable(); + endpointNames_.add(value); + onChanged(); + } else { + endpointNamesBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder addEndpointNames(int index, context.ContextOuterClass.EndPointName value) { + if (endpointNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointNamesIsMutable(); + endpointNames_.add(index, value); + onChanged(); + } else { + endpointNamesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder addEndpointNames(context.ContextOuterClass.EndPointName.Builder builderForValue) { + if (endpointNamesBuilder_ == null) { + ensureEndpointNamesIsMutable(); + endpointNames_.add(builderForValue.build()); + onChanged(); + } else { + endpointNamesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder addEndpointNames(int index, context.ContextOuterClass.EndPointName.Builder builderForValue) { + if (endpointNamesBuilder_ == null) { + ensureEndpointNamesIsMutable(); + endpointNames_.add(index, builderForValue.build()); + onChanged(); + } else { + endpointNamesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder addAllEndpointNames(java.lang.Iterable values) { + if (endpointNamesBuilder_ == null) { + ensureEndpointNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endpointNames_); + onChanged(); + } else { + endpointNamesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder clearEndpointNames() { + if (endpointNamesBuilder_ == null) { + endpointNames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + endpointNamesBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public Builder removeEndpointNames(int index) { + if (endpointNamesBuilder_ == null) { + ensureEndpointNamesIsMutable(); + endpointNames_.remove(index); + onChanged(); + } else { + endpointNamesBuilder_.remove(index); + } + return this; + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public context.ContextOuterClass.EndPointName.Builder getEndpointNamesBuilder(int index) { + return getEndpointNamesFieldBuilder().getBuilder(index); + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public context.ContextOuterClass.EndPointNameOrBuilder getEndpointNamesOrBuilder(int index) { + if (endpointNamesBuilder_ == null) { + return endpointNames_.get(index); + } else { + return endpointNamesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public java.util.List getEndpointNamesOrBuilderList() { + if (endpointNamesBuilder_ != null) { + return endpointNamesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endpointNames_); + } + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public context.ContextOuterClass.EndPointName.Builder addEndpointNamesBuilder() { + return getEndpointNamesFieldBuilder().addBuilder(context.ContextOuterClass.EndPointName.getDefaultInstance()); + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public context.ContextOuterClass.EndPointName.Builder addEndpointNamesBuilder(int index) { + return getEndpointNamesFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointName.getDefaultInstance()); + } + + /** + * repeated .context.EndPointName endpoint_names = 1; + */ + public java.util.List getEndpointNamesBuilderList() { + return getEndpointNamesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getEndpointNamesFieldBuilder() { + if (endpointNamesBuilder_ == null) { + endpointNamesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(endpointNames_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + endpointNames_ = null; + } + return endpointNamesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.EndPointNameList) + } + + // @@protoc_insertion_point(class_scope:context.EndPointNameList) + private static final context.ContextOuterClass.EndPointNameList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointNameList(); + } + + public static context.ContextOuterClass.EndPointNameList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.EndPointNameList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConfigRule_CustomOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConfigRule_Custom) + com.google.protobuf.MessageOrBuilder { + + /** + * string resource_key = 1; + * @return The resourceKey. + */ + java.lang.String getResourceKey(); + + /** + * string resource_key = 1; + * @return The bytes for resourceKey. + */ + com.google.protobuf.ByteString getResourceKeyBytes(); + + /** + * string resource_value = 2; + * @return The resourceValue. + */ + java.lang.String getResourceValue(); + + /** + * string resource_value = 2; + * @return The bytes for resourceValue. + */ + com.google.protobuf.ByteString getResourceValueBytes(); + } + + /** + * Protobuf type {@code context.ConfigRule_Custom} + */ + public static final class ConfigRule_Custom extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConfigRule_Custom) + ConfigRule_CustomOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConfigRule_Custom.newBuilder() to construct. + private ConfigRule_Custom(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigRule_Custom() { + resourceKey_ = ""; + resourceValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConfigRule_Custom.class, context.ContextOuterClass.ConfigRule_Custom.Builder.class); + } + + public static final int RESOURCE_KEY_FIELD_NUMBER = 1; + + private volatile java.lang.Object resourceKey_; + + /** + * string resource_key = 1; + * @return The resourceKey. + */ + @java.lang.Override + public java.lang.String getResourceKey() { + java.lang.Object ref = resourceKey_; + 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(); + resourceKey_ = s; + return s; + } + } + + /** + * string resource_key = 1; + * @return The bytes for resourceKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceKeyBytes() { + java.lang.Object ref = resourceKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_VALUE_FIELD_NUMBER = 2; + + private volatile java.lang.Object resourceValue_; + + /** + * string resource_value = 2; + * @return The resourceValue. + */ + @java.lang.Override + public java.lang.String getResourceValue() { + java.lang.Object ref = resourceValue_; + 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(); + resourceValue_ = s; + return s; + } + } + + /** + * string resource_value = 2; + * @return The bytes for resourceValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceValueBytes() { + java.lang.Object ref = resourceValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getResourceKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceKey_); + } + if (!getResourceValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getResourceKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceKey_); + } + if (!getResourceValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConfigRule_Custom)) { + return super.equals(obj); + } + context.ContextOuterClass.ConfigRule_Custom other = (context.ContextOuterClass.ConfigRule_Custom) obj; + if (!getResourceKey().equals(other.getResourceKey())) + return false; + if (!getResourceValue().equals(other.getResourceValue())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_KEY_FIELD_NUMBER; + hash = (53 * hash) + getResourceKey().hashCode(); + hash = (37 * hash) + RESOURCE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getResourceValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule_Custom parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConfigRule_Custom prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConfigRule_Custom} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConfigRule_Custom) + context.ContextOuterClass.ConfigRule_CustomOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConfigRule_Custom.class, context.ContextOuterClass.ConfigRule_Custom.Builder.class); + } + + // 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(); + resourceKey_ = ""; + resourceValue_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule_Custom getDefaultInstanceForType() { + return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule_Custom build() { + context.ContextOuterClass.ConfigRule_Custom result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConfigRule_Custom) { + return mergeFrom((context.ContextOuterClass.ConfigRule_Custom) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConfigRule_Custom other) { + if (other == context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance()) + return this; + if (!other.getResourceKey().isEmpty()) { + resourceKey_ = other.resourceKey_; + onChanged(); + } + if (!other.getResourceValue().isEmpty()) { + resourceValue_ = other.resourceValue_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConfigRule_Custom) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object resourceKey_ = ""; + + /** + * string resource_key = 1; + * @return The resourceKey. + */ + public java.lang.String getResourceKey() { + java.lang.Object ref = resourceKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string resource_key = 1; + * @return The bytes for resourceKey. + */ + public com.google.protobuf.ByteString getResourceKeyBytes() { + java.lang.Object ref = resourceKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string resource_key = 1; + * @param value The resourceKey to set. + * @return This builder for chaining. + */ + public Builder setResourceKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceKey_ = value; + onChanged(); + return this; + } + + /** + * string resource_key = 1; + * @return This builder for chaining. + */ + public Builder clearResourceKey() { + resourceKey_ = getDefaultInstance().getResourceKey(); + onChanged(); + return this; + } + + /** + * string resource_key = 1; + * @param value The bytes for resourceKey to set. + * @return This builder for chaining. + */ + public Builder setResourceKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object resourceValue_ = ""; + + /** + * string resource_value = 2; + * @return The resourceValue. + */ + public java.lang.String getResourceValue() { + java.lang.Object ref = resourceValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string resource_value = 2; + * @return The bytes for resourceValue. + */ + public com.google.protobuf.ByteString getResourceValueBytes() { + java.lang.Object ref = resourceValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string resource_value = 2; + * @param value The resourceValue to set. + * @return This builder for chaining. + */ + public Builder setResourceValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceValue_ = value; + onChanged(); + return this; + } + + /** + * string resource_value = 2; + * @return This builder for chaining. + */ + public Builder clearResourceValue() { + resourceValue_ = getDefaultInstance().getResourceValue(); + onChanged(); + return this; + } + + /** + * string resource_value = 2; + * @param value The bytes for resourceValue to set. + * @return This builder for chaining. + */ + public Builder setResourceValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceValue_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConfigRule_Custom) + } + + // @@protoc_insertion_point(class_scope:context.ConfigRule_Custom) + private static final context.ContextOuterClass.ConfigRule_Custom DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConfigRule_Custom(); + } + + public static context.ContextOuterClass.ConfigRule_Custom getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule_Custom getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConfigRule_ACLOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConfigRule_ACL) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + boolean hasEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + context.ContextOuterClass.EndPointId getEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + + /** + * .acl.AclRuleSet rule_set = 2; + * @return Whether the ruleSet field is set. + */ + boolean hasRuleSet(); + + /** + * .acl.AclRuleSet rule_set = 2; + * @return The ruleSet. + */ + acl.Acl.AclRuleSet getRuleSet(); + + /** + * .acl.AclRuleSet rule_set = 2; + */ + acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder(); + } + + /** + * Protobuf type {@code context.ConfigRule_ACL} + */ + public static final class ConfigRule_ACL extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConfigRule_ACL) + ConfigRule_ACLOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConfigRule_ACL.newBuilder() to construct. + private ConfigRule_ACL(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigRule_ACL() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConfigRule_ACL.class, context.ContextOuterClass.ConfigRule_ACL.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.EndPointId endpointId_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + @java.lang.Override + public boolean hasEndpointId() { + return endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointId() { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + return getEndpointId(); + } + + public static final int RULE_SET_FIELD_NUMBER = 2; + + private acl.Acl.AclRuleSet ruleSet_; + + /** + * .acl.AclRuleSet rule_set = 2; + * @return Whether the ruleSet field is set. + */ + @java.lang.Override + public boolean hasRuleSet() { + return ruleSet_ != null; + } + + /** + * .acl.AclRuleSet rule_set = 2; + * @return The ruleSet. + */ + @java.lang.Override + public acl.Acl.AclRuleSet getRuleSet() { + return ruleSet_ == null ? acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + @java.lang.Override + public acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder() { + return getRuleSet(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (endpointId_ != null) { + output.writeMessage(1, getEndpointId()); + } + if (ruleSet_ != null) { + output.writeMessage(2, getRuleSet()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (endpointId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId()); + } + if (ruleSet_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRuleSet()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConfigRule_ACL)) { + return super.equals(obj); + } + context.ContextOuterClass.ConfigRule_ACL other = (context.ContextOuterClass.ConfigRule_ACL) obj; + if (hasEndpointId() != other.hasEndpointId()) + return false; + if (hasEndpointId()) { + if (!getEndpointId().equals(other.getEndpointId())) + return false; + } + if (hasRuleSet() != other.hasRuleSet()) + return false; + if (hasRuleSet()) { + if (!getRuleSet().equals(other.getRuleSet())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointId()) { + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + } + if (hasRuleSet()) { + hash = (37 * hash) + RULE_SET_FIELD_NUMBER; + hash = (53 * hash) + getRuleSet().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule_ACL parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConfigRule_ACL prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConfigRule_ACL} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConfigRule_ACL) + context.ContextOuterClass.ConfigRule_ACLOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConfigRule_ACL.class, context.ContextOuterClass.ConfigRule_ACL.Builder.class); + } + + // 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; + endpointIdBuilder_ = null; + } + if (ruleSetBuilder_ == null) { + ruleSet_ = null; + } else { + ruleSet_ = null; + ruleSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACL getDefaultInstanceForType() { + return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACL build() { + context.ContextOuterClass.ConfigRule_ACL result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConfigRule_ACL) { + return mergeFrom((context.ContextOuterClass.ConfigRule_ACL) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConfigRule_ACL other) { + if (other == context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance()) + return this; + if (other.hasEndpointId()) { + mergeEndpointId(other.getEndpointId()); + } + if (other.hasRuleSet()) { + mergeRuleSet(other.getRuleSet()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConfigRule_ACL) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.EndPointId endpointId_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + public boolean hasEndpointId() { + return endpointIdBuilder_ != null || endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + public context.ContextOuterClass.EndPointId getEndpointId() { + if (endpointIdBuilder_ == null) { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } else { + return endpointIdBuilder_.getMessage(); + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + onChanged(); + } else { + endpointIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdBuilder_ == null) { + endpointId_ = builderForValue.build(); + onChanged(); + } else { + endpointIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (endpointId_ != null) { + endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + } else { + endpointId_ = value; + } + onChanged(); + } else { + endpointIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder clearEndpointId() { + if (endpointIdBuilder_ == null) { + endpointId_ = null; + onChanged(); + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + onChanged(); + return getEndpointIdFieldBuilder().getBuilder(); + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + if (endpointIdBuilder_ != null) { + return endpointIdBuilder_.getMessageOrBuilder(); + } else { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointIdFieldBuilder() { + if (endpointIdBuilder_ == null) { + endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointId(), getParentForChildren(), isClean()); + endpointId_ = null; + } + return endpointIdBuilder_; + } + + private acl.Acl.AclRuleSet ruleSet_; + + private com.google.protobuf.SingleFieldBuilderV3 ruleSetBuilder_; + + /** + * .acl.AclRuleSet rule_set = 2; + * @return Whether the ruleSet field is set. + */ + public boolean hasRuleSet() { + return ruleSetBuilder_ != null || ruleSet_ != null; + } + + /** + * .acl.AclRuleSet rule_set = 2; + * @return The ruleSet. + */ + public acl.Acl.AclRuleSet getRuleSet() { + if (ruleSetBuilder_ == null) { + return ruleSet_ == null ? acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; + } else { + return ruleSetBuilder_.getMessage(); + } + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + public Builder setRuleSet(acl.Acl.AclRuleSet value) { + if (ruleSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ruleSet_ = value; + onChanged(); + } else { + ruleSetBuilder_.setMessage(value); + } + return this; + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + public Builder setRuleSet(acl.Acl.AclRuleSet.Builder builderForValue) { + if (ruleSetBuilder_ == null) { + ruleSet_ = builderForValue.build(); + onChanged(); + } else { + ruleSetBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + public Builder mergeRuleSet(acl.Acl.AclRuleSet value) { + if (ruleSetBuilder_ == null) { + if (ruleSet_ != null) { + ruleSet_ = acl.Acl.AclRuleSet.newBuilder(ruleSet_).mergeFrom(value).buildPartial(); + } else { + ruleSet_ = value; + } + onChanged(); + } else { + ruleSetBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + public Builder clearRuleSet() { + if (ruleSetBuilder_ == null) { + ruleSet_ = null; + onChanged(); + } else { + ruleSet_ = null; + ruleSetBuilder_ = null; + } + return this; + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + public acl.Acl.AclRuleSet.Builder getRuleSetBuilder() { + onChanged(); + return getRuleSetFieldBuilder().getBuilder(); + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + public acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder() { + if (ruleSetBuilder_ != null) { + return ruleSetBuilder_.getMessageOrBuilder(); + } else { + return ruleSet_ == null ? acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; + } + } + + /** + * .acl.AclRuleSet rule_set = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getRuleSetFieldBuilder() { + if (ruleSetBuilder_ == null) { + ruleSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getRuleSet(), getParentForChildren(), isClean()); + ruleSet_ = null; + } + return ruleSetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConfigRule_ACL) + } + + // @@protoc_insertion_point(class_scope:context.ConfigRule_ACL) + private static final context.ContextOuterClass.ConfigRule_ACL DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConfigRule_ACL(); + } + + public static context.ContextOuterClass.ConfigRule_ACL getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACL getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConfigRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:context.ConfigRule) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ConfigActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + + /** + * .context.ConfigActionEnum action = 1; + * @return The action. + */ + context.ContextOuterClass.ConfigActionEnum getAction(); + + /** + * .context.ConfigRule_Custom custom = 2; + * @return Whether the custom field is set. + */ + boolean hasCustom(); + + /** + * .context.ConfigRule_Custom custom = 2; + * @return The custom. + */ + context.ContextOuterClass.ConfigRule_Custom getCustom(); + + /** + * .context.ConfigRule_Custom custom = 2; + */ + context.ContextOuterClass.ConfigRule_CustomOrBuilder getCustomOrBuilder(); + + /** + * .context.ConfigRule_ACL acl = 3; + * @return Whether the acl field is set. + */ + boolean hasAcl(); + + /** + * .context.ConfigRule_ACL acl = 3; + * @return The acl. + */ + context.ContextOuterClass.ConfigRule_ACL getAcl(); + + /** + * .context.ConfigRule_ACL acl = 3; + */ + context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder(); + + public context.ContextOuterClass.ConfigRule.ConfigRuleCase getConfigRuleCase(); + } + + /** + * Protobuf type {@code context.ConfigRule} + */ + public static final class ConfigRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.ConfigRule) + ConfigRuleOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use ConfigRule.newBuilder() to construct. + private ConfigRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigRule() { + action_ = 0; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConfigRule_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConfigRule.class, context.ContextOuterClass.ConfigRule.Builder.class); + } + + private int configRuleCase_ = 0; + + private java.lang.Object configRule_; + + public enum ConfigRuleCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { + + CUSTOM(2), ACL(3), CONFIGRULE_NOT_SET(0); + + private final int value; + + private ConfigRuleCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConfigRuleCase valueOf(int value) { + return forNumber(value); + } + + public static ConfigRuleCase forNumber(int value) { + switch(value) { + case 2: + return CUSTOM; + case 3: + return ACL; + case 0: + return CONFIGRULE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + } + + public ConfigRuleCase getConfigRuleCase() { + return ConfigRuleCase.forNumber(configRuleCase_); + } + + public static final int ACTION_FIELD_NUMBER = 1; + + private int action_; + + /** + * .context.ConfigActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + + /** + * .context.ConfigActionEnum action = 1; + * @return The action. + */ + @java.lang.Override + public context.ContextOuterClass.ConfigActionEnum getAction() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.valueOf(action_); + return result == null ? context.ContextOuterClass.ConfigActionEnum.UNRECOGNIZED : result; + } + + public static final int CUSTOM_FIELD_NUMBER = 2; + + /** + * .context.ConfigRule_Custom custom = 2; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return configRuleCase_ == 2; + } + + /** + * .context.ConfigRule_Custom custom = 2; + * @return The custom. + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_Custom getCustom() { + if (configRuleCase_ == 2) { + return (context.ContextOuterClass.ConfigRule_Custom) configRule_; + } + return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_CustomOrBuilder getCustomOrBuilder() { + if (configRuleCase_ == 2) { + return (context.ContextOuterClass.ConfigRule_Custom) configRule_; + } + return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } + + public static final int ACL_FIELD_NUMBER = 3; + + /** + * .context.ConfigRule_ACL acl = 3; + * @return Whether the acl field is set. + */ + @java.lang.Override + public boolean hasAcl() { + return configRuleCase_ == 3; + } + + /** + * .context.ConfigRule_ACL acl = 3; + * @return The acl. + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACL getAcl() { + if (configRuleCase_ == 3) { + return (context.ContextOuterClass.ConfigRule_ACL) configRule_; + } + return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder() { + if (configRuleCase_ == 3) { + return (context.ContextOuterClass.ConfigRule_ACL) configRule_; + } + return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (action_ != context.ContextOuterClass.ConfigActionEnum.CONFIGACTION_UNDEFINED.getNumber()) { + output.writeEnum(1, action_); + } + if (configRuleCase_ == 2) { + output.writeMessage(2, (context.ContextOuterClass.ConfigRule_Custom) configRule_); + } + if (configRuleCase_ == 3) { + output.writeMessage(3, (context.ContextOuterClass.ConfigRule_ACL) configRule_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (action_ != context.ContextOuterClass.ConfigActionEnum.CONFIGACTION_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_); + } + if (configRuleCase_ == 2) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.ConfigRule_Custom) configRule_); + } + if (configRuleCase_ == 3) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, (context.ContextOuterClass.ConfigRule_ACL) configRule_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.ConfigRule)) { + return super.equals(obj); + } + context.ContextOuterClass.ConfigRule other = (context.ContextOuterClass.ConfigRule) obj; + if (action_ != other.action_) + return false; + if (!getConfigRuleCase().equals(other.getConfigRuleCase())) + return false; + switch(configRuleCase_) { + case 2: + if (!getCustom().equals(other.getCustom())) + return false; + break; + case 3: + if (!getAcl().equals(other.getAcl())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + switch(configRuleCase_) { + case 2: + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + getCustom().hashCode(); + break; + case 3: + hash = (37 * hash) + ACL_FIELD_NUMBER; + hash = (53 * hash) + getAcl().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.ConfigRule parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.ConfigRule parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.ConfigRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.ConfigRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.ConfigRule) + context.ContextOuterClass.ConfigRuleOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_ConfigRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_ConfigRule_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.ConfigRule.class, context.ContextOuterClass.ConfigRule.Builder.class); + } + + // 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(); + action_ = 0; + configRuleCase_ = 0; + configRule_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_ConfigRule_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule getDefaultInstanceForType() { + return context.ContextOuterClass.ConfigRule.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule build() { + context.ContextOuterClass.ConfigRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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 (configRuleCase_ == 3) { + if (aclBuilder_ == null) { + result.configRule_ = configRule_; + } else { + result.configRule_ = aclBuilder_.build(); + } + } + result.configRuleCase_ = configRuleCase_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.ConfigRule) { + return mergeFrom((context.ContextOuterClass.ConfigRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.ConfigRule other) { + if (other == context.ContextOuterClass.ConfigRule.getDefaultInstance()) + return this; + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + switch(other.getConfigRuleCase()) { + case CUSTOM: + { + mergeCustom(other.getCustom()); + break; + } + case ACL: + { + mergeAcl(other.getAcl()); + break; + } + case CONFIGRULE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.ConfigRule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int configRuleCase_ = 0; + + private java.lang.Object configRule_; + + public ConfigRuleCase getConfigRuleCase() { + return ConfigRuleCase.forNumber(configRuleCase_); + } + + public Builder clearConfigRule() { + configRuleCase_ = 0; + configRule_ = null; + onChanged(); + return this; + } + + private int action_ = 0; + + /** + * .context.ConfigActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + + /** + * .context.ConfigActionEnum action = 1; + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + action_ = value; + onChanged(); + return this; + } + + /** + * .context.ConfigActionEnum action = 1; + * @return The action. + */ + @java.lang.Override + public context.ContextOuterClass.ConfigActionEnum getAction() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.valueOf(action_); + return result == null ? context.ContextOuterClass.ConfigActionEnum.UNRECOGNIZED : result; + } + + /** + * .context.ConfigActionEnum action = 1; + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(context.ContextOuterClass.ConfigActionEnum value) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .context.ConfigActionEnum action = 1; + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3 customBuilder_; + + /** + * .context.ConfigRule_Custom custom = 2; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return configRuleCase_ == 2; + } + + /** + * .context.ConfigRule_Custom custom = 2; + * @return The custom. + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_Custom getCustom() { + if (customBuilder_ == null) { + if (configRuleCase_ == 2) { + return (context.ContextOuterClass.ConfigRule_Custom) configRule_; + } + return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } else { + if (configRuleCase_ == 2) { + return customBuilder_.getMessage(); + } + return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + public Builder setCustom(context.ContextOuterClass.ConfigRule_Custom value) { + if (customBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configRule_ = value; + onChanged(); + } else { + customBuilder_.setMessage(value); + } + configRuleCase_ = 2; + return this; + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + public Builder setCustom(context.ContextOuterClass.ConfigRule_Custom.Builder builderForValue) { + if (customBuilder_ == null) { + configRule_ = builderForValue.build(); + onChanged(); + } else { + customBuilder_.setMessage(builderForValue.build()); + } + configRuleCase_ = 2; + return this; + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + public Builder mergeCustom(context.ContextOuterClass.ConfigRule_Custom value) { + if (customBuilder_ == null) { + if (configRuleCase_ == 2 && configRule_ != context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance()) { + configRule_ = context.ContextOuterClass.ConfigRule_Custom.newBuilder((context.ContextOuterClass.ConfigRule_Custom) configRule_).mergeFrom(value).buildPartial(); + } else { + configRule_ = value; + } + onChanged(); + } else { + if (configRuleCase_ == 2) { + customBuilder_.mergeFrom(value); + } + customBuilder_.setMessage(value); + } + configRuleCase_ = 2; + return this; + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + public Builder clearCustom() { + if (customBuilder_ == null) { + if (configRuleCase_ == 2) { + configRuleCase_ = 0; + configRule_ = null; + onChanged(); + } + } else { + if (configRuleCase_ == 2) { + configRuleCase_ = 0; + configRule_ = null; + } + customBuilder_.clear(); + } + return this; + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + public context.ContextOuterClass.ConfigRule_Custom.Builder getCustomBuilder() { + return getCustomFieldBuilder().getBuilder(); + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_CustomOrBuilder getCustomOrBuilder() { + if ((configRuleCase_ == 2) && (customBuilder_ != null)) { + return customBuilder_.getMessageOrBuilder(); + } else { + if (configRuleCase_ == 2) { + return (context.ContextOuterClass.ConfigRule_Custom) configRule_; + } + return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } + } + + /** + * .context.ConfigRule_Custom custom = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getCustomFieldBuilder() { + if (customBuilder_ == null) { + if (!(configRuleCase_ == 2)) { + configRule_ = context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); + } + customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.ConfigRule_Custom) configRule_, getParentForChildren(), isClean()); + configRule_ = null; + } + configRuleCase_ = 2; + onChanged(); + ; + return customBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3 aclBuilder_; + + /** + * .context.ConfigRule_ACL acl = 3; + * @return Whether the acl field is set. + */ + @java.lang.Override + public boolean hasAcl() { + return configRuleCase_ == 3; + } + + /** + * .context.ConfigRule_ACL acl = 3; + * @return The acl. + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACL getAcl() { + if (aclBuilder_ == null) { + if (configRuleCase_ == 3) { + return (context.ContextOuterClass.ConfigRule_ACL) configRule_; + } + return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } else { + if (configRuleCase_ == 3) { + return aclBuilder_.getMessage(); + } + return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + public Builder setAcl(context.ContextOuterClass.ConfigRule_ACL value) { + if (aclBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configRule_ = value; + onChanged(); + } else { + aclBuilder_.setMessage(value); + } + configRuleCase_ = 3; + return this; + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + public Builder setAcl(context.ContextOuterClass.ConfigRule_ACL.Builder builderForValue) { + if (aclBuilder_ == null) { + configRule_ = builderForValue.build(); + onChanged(); + } else { + aclBuilder_.setMessage(builderForValue.build()); + } + configRuleCase_ = 3; + return this; + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + public Builder mergeAcl(context.ContextOuterClass.ConfigRule_ACL value) { + if (aclBuilder_ == null) { + if (configRuleCase_ == 3 && configRule_ != context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance()) { + configRule_ = context.ContextOuterClass.ConfigRule_ACL.newBuilder((context.ContextOuterClass.ConfigRule_ACL) configRule_).mergeFrom(value).buildPartial(); + } else { + configRule_ = value; + } + onChanged(); + } else { + if (configRuleCase_ == 3) { + aclBuilder_.mergeFrom(value); + } + aclBuilder_.setMessage(value); + } + configRuleCase_ = 3; + return this; + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + public Builder clearAcl() { + if (aclBuilder_ == null) { + if (configRuleCase_ == 3) { + configRuleCase_ = 0; + configRule_ = null; + onChanged(); + } + } else { + if (configRuleCase_ == 3) { + configRuleCase_ = 0; + configRule_ = null; + } + aclBuilder_.clear(); + } + return this; + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + public context.ContextOuterClass.ConfigRule_ACL.Builder getAclBuilder() { + return getAclFieldBuilder().getBuilder(); + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + @java.lang.Override + public context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder() { + if ((configRuleCase_ == 3) && (aclBuilder_ != null)) { + return aclBuilder_.getMessageOrBuilder(); + } else { + if (configRuleCase_ == 3) { + return (context.ContextOuterClass.ConfigRule_ACL) configRule_; + } + return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } + } + + /** + * .context.ConfigRule_ACL acl = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getAclFieldBuilder() { + if (aclBuilder_ == null) { + if (!(configRuleCase_ == 3)) { + configRule_ = context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); + } + aclBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.ConfigRule_ACL) configRule_, getParentForChildren(), isClean()); + configRule_ = null; + } + configRuleCase_ = 3; + onChanged(); + ; + return aclBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.ConfigRule) + } + + // @@protoc_insertion_point(class_scope:context.ConfigRule) + private static final context.ContextOuterClass.ConfigRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.ConfigRule(); + } + + public static context.ContextOuterClass.ConfigRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.ConfigRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_CustomOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_Custom) + com.google.protobuf.MessageOrBuilder { + + /** + * string constraint_type = 1; + * @return The constraintType. + */ + java.lang.String getConstraintType(); + + /** + * string constraint_type = 1; + * @return The bytes for constraintType. + */ + com.google.protobuf.ByteString getConstraintTypeBytes(); + + /** + * string constraint_value = 2; + * @return The constraintValue. + */ + java.lang.String getConstraintValue(); + + /** + * string constraint_value = 2; + * @return The bytes for constraintValue. + */ + com.google.protobuf.ByteString getConstraintValueBytes(); + } + + /** + * Protobuf type {@code context.Constraint_Custom} + */ + public static final class Constraint_Custom extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_Custom) + Constraint_CustomOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_Custom.newBuilder() to construct. + private Constraint_Custom(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_Custom() { + constraintType_ = ""; + constraintValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_Custom_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_Custom.class, context.ContextOuterClass.Constraint_Custom.Builder.class); + } + + public static final int CONSTRAINT_TYPE_FIELD_NUMBER = 1; + + private volatile java.lang.Object constraintType_; + + /** + * string constraint_type = 1; + * @return The constraintType. + */ + @java.lang.Override + public java.lang.String getConstraintType() { + java.lang.Object ref = constraintType_; + 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(); + constraintType_ = s; + return s; + } + } + + /** + * string constraint_type = 1; + * @return The bytes for constraintType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConstraintTypeBytes() { + java.lang.Object ref = constraintType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + constraintType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONSTRAINT_VALUE_FIELD_NUMBER = 2; + + private volatile java.lang.Object constraintValue_; + + /** + * string constraint_value = 2; + * @return The constraintValue. + */ + @java.lang.Override + public java.lang.String getConstraintValue() { + java.lang.Object ref = constraintValue_; + 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(); + constraintValue_ = s; + return s; + } + } + + /** + * string constraint_value = 2; + * @return The bytes for constraintValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConstraintValueBytes() { + java.lang.Object ref = constraintValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + constraintValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getConstraintTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, constraintType_); + } + if (!getConstraintValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, constraintValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getConstraintTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, constraintType_); + } + if (!getConstraintValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, constraintValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_Custom)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint_Custom other = (context.ContextOuterClass.Constraint_Custom) obj; + if (!getConstraintType().equals(other.getConstraintType())) + return false; + if (!getConstraintValue().equals(other.getConstraintValue())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONSTRAINT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getConstraintType().hashCode(); + hash = (37 * hash) + CONSTRAINT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getConstraintValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Custom parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Custom parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Custom parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_Custom prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_Custom} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_Custom) + context.ContextOuterClass.Constraint_CustomOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_Custom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_Custom_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_Custom.class, context.ContextOuterClass.Constraint_Custom.Builder.class); + } + + // 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(); + constraintType_ = ""; + constraintValue_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_Custom_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Custom getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Custom build() { + context.ContextOuterClass.Constraint_Custom result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_Custom) { + return mergeFrom((context.ContextOuterClass.Constraint_Custom) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_Custom other) { + if (other == context.ContextOuterClass.Constraint_Custom.getDefaultInstance()) + return this; + if (!other.getConstraintType().isEmpty()) { + constraintType_ = other.constraintType_; + onChanged(); + } + if (!other.getConstraintValue().isEmpty()) { + constraintValue_ = other.constraintValue_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_Custom) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object constraintType_ = ""; + + /** + * string constraint_type = 1; + * @return The constraintType. + */ + public java.lang.String getConstraintType() { + java.lang.Object ref = constraintType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + constraintType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string constraint_type = 1; + * @return The bytes for constraintType. + */ + public com.google.protobuf.ByteString getConstraintTypeBytes() { + java.lang.Object ref = constraintType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + constraintType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string constraint_type = 1; + * @param value The constraintType to set. + * @return This builder for chaining. + */ + public Builder setConstraintType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + constraintType_ = value; + onChanged(); + return this; + } + + /** + * string constraint_type = 1; + * @return This builder for chaining. + */ + public Builder clearConstraintType() { + constraintType_ = getDefaultInstance().getConstraintType(); + onChanged(); + return this; + } + + /** + * string constraint_type = 1; + * @param value The bytes for constraintType to set. + * @return This builder for chaining. + */ + public Builder setConstraintTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + constraintType_ = value; + onChanged(); + return this; + } + + private java.lang.Object constraintValue_ = ""; + + /** + * string constraint_value = 2; + * @return The constraintValue. + */ + public java.lang.String getConstraintValue() { + java.lang.Object ref = constraintValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + constraintValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string constraint_value = 2; + * @return The bytes for constraintValue. + */ + public com.google.protobuf.ByteString getConstraintValueBytes() { + java.lang.Object ref = constraintValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + constraintValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string constraint_value = 2; + * @param value The constraintValue to set. + * @return This builder for chaining. + */ + public Builder setConstraintValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + constraintValue_ = value; + onChanged(); + return this; + } + + /** + * string constraint_value = 2; + * @return This builder for chaining. + */ + public Builder clearConstraintValue() { + constraintValue_ = getDefaultInstance().getConstraintValue(); + onChanged(); + return this; + } + + /** + * string constraint_value = 2; + * @param value The bytes for constraintValue to set. + * @return This builder for chaining. + */ + public Builder setConstraintValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + constraintValue_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_Custom) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_Custom) + private static final context.ContextOuterClass.Constraint_Custom DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_Custom(); + } + + public static context.ContextOuterClass.Constraint_Custom getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Custom getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_ScheduleOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_Schedule) + com.google.protobuf.MessageOrBuilder { + + /** + * float start_timestamp = 1; + * @return The startTimestamp. + */ + float getStartTimestamp(); + + /** + * float duration_days = 2; + * @return The durationDays. + */ + float getDurationDays(); + } + + /** + * Protobuf type {@code context.Constraint_Schedule} + */ + public static final class Constraint_Schedule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_Schedule) + Constraint_ScheduleOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_Schedule.newBuilder() to construct. + private Constraint_Schedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_Schedule() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_Schedule_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_Schedule.class, context.ContextOuterClass.Constraint_Schedule.Builder.class); + } + + public static final int START_TIMESTAMP_FIELD_NUMBER = 1; + + private float startTimestamp_; + + /** + * float start_timestamp = 1; + * @return The startTimestamp. + */ + @java.lang.Override + public float getStartTimestamp() { + return startTimestamp_; + } + + public static final int DURATION_DAYS_FIELD_NUMBER = 2; + + private float durationDays_; + + /** + * float duration_days = 2; + * @return The durationDays. + */ + @java.lang.Override + public float getDurationDays() { + return durationDays_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (startTimestamp_ != 0F) { + output.writeFloat(1, startTimestamp_); + } + if (durationDays_ != 0F) { + output.writeFloat(2, durationDays_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (startTimestamp_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, startTimestamp_); + } + if (durationDays_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, durationDays_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_Schedule)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint_Schedule other = (context.ContextOuterClass.Constraint_Schedule) obj; + if (java.lang.Float.floatToIntBits(getStartTimestamp()) != java.lang.Float.floatToIntBits(other.getStartTimestamp())) + return false; + if (java.lang.Float.floatToIntBits(getDurationDays()) != java.lang.Float.floatToIntBits(other.getDurationDays())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Schedule parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Schedule parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Schedule parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_Schedule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_Schedule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_Schedule) + context.ContextOuterClass.Constraint_ScheduleOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_Schedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_Schedule_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_Schedule.class, context.ContextOuterClass.Constraint_Schedule.Builder.class); + } + + // 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(); + startTimestamp_ = 0F; + durationDays_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_Schedule_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Schedule getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Schedule build() { + context.ContextOuterClass.Constraint_Schedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_Schedule) { + return mergeFrom((context.ContextOuterClass.Constraint_Schedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_Schedule other) { + if (other == context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) + return this; + if (other.getStartTimestamp() != 0F) { + setStartTimestamp(other.getStartTimestamp()); + } + if (other.getDurationDays() != 0F) { + setDurationDays(other.getDurationDays()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_Schedule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float startTimestamp_; + + /** + * float start_timestamp = 1; + * @return The startTimestamp. + */ + @java.lang.Override + public float getStartTimestamp() { + return startTimestamp_; + } + + /** + * float start_timestamp = 1; + * @param value The startTimestamp to set. + * @return This builder for chaining. + */ + public Builder setStartTimestamp(float value) { + startTimestamp_ = value; + onChanged(); + return this; + } + + /** + * float start_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearStartTimestamp() { + startTimestamp_ = 0F; + onChanged(); + return this; + } + + private float durationDays_; + + /** + * float duration_days = 2; + * @return The durationDays. + */ + @java.lang.Override + public float getDurationDays() { + return durationDays_; + } + + /** + * float duration_days = 2; + * @param value The durationDays to set. + * @return This builder for chaining. + */ + public Builder setDurationDays(float value) { + durationDays_ = value; + onChanged(); + return this; + } + + /** + * float duration_days = 2; + * @return This builder for chaining. + */ + public Builder clearDurationDays() { + durationDays_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_Schedule) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_Schedule) + private static final context.ContextOuterClass.Constraint_Schedule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_Schedule(); + } + + public static context.ContextOuterClass.Constraint_Schedule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Schedule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GPS_PositionOrBuilder extends // @@protoc_insertion_point(interface_extends:context.GPS_Position) + com.google.protobuf.MessageOrBuilder { + + /** + * float latitude = 1; + * @return The latitude. + */ + float getLatitude(); + + /** + * float longitude = 2; + * @return The longitude. + */ + float getLongitude(); + } + + /** + * Protobuf type {@code context.GPS_Position} + */ + public static final class GPS_Position extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.GPS_Position) + GPS_PositionOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use GPS_Position.newBuilder() to construct. + private GPS_Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GPS_Position() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_GPS_Position_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.GPS_Position.class, context.ContextOuterClass.GPS_Position.Builder.class); + } + + public static final int LATITUDE_FIELD_NUMBER = 1; + + private float latitude_; + + /** + * float latitude = 1; + * @return The latitude. + */ + @java.lang.Override + public float getLatitude() { + return latitude_; + } + + public static final int LONGITUDE_FIELD_NUMBER = 2; + + private float longitude_; + + /** + * float longitude = 2; + * @return The longitude. + */ + @java.lang.Override + public float getLongitude() { + return longitude_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (latitude_ != 0F) { + output.writeFloat(1, latitude_); + } + if (longitude_ != 0F) { + output.writeFloat(2, longitude_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (latitude_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, latitude_); + } + if (longitude_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, longitude_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.GPS_Position)) { + return super.equals(obj); + } + context.ContextOuterClass.GPS_Position other = (context.ContextOuterClass.GPS_Position) obj; + if (java.lang.Float.floatToIntBits(getLatitude()) != java.lang.Float.floatToIntBits(other.getLatitude())) + return false; + if (java.lang.Float.floatToIntBits(getLongitude()) != java.lang.Float.floatToIntBits(other.getLongitude())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LATITUDE_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.GPS_Position parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.GPS_Position parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.GPS_Position parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.GPS_Position parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.GPS_Position prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.GPS_Position} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.GPS_Position) + context.ContextOuterClass.GPS_PositionOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_GPS_Position_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_GPS_Position_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.GPS_Position.class, context.ContextOuterClass.GPS_Position.Builder.class); + } + + // 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(); + latitude_ = 0F; + longitude_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_GPS_Position_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.GPS_Position getDefaultInstanceForType() { + return context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.GPS_Position build() { + context.ContextOuterClass.GPS_Position result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.GPS_Position) { + return mergeFrom((context.ContextOuterClass.GPS_Position) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.GPS_Position other) { + if (other == context.ContextOuterClass.GPS_Position.getDefaultInstance()) + return this; + if (other.getLatitude() != 0F) { + setLatitude(other.getLatitude()); + } + if (other.getLongitude() != 0F) { + setLongitude(other.getLongitude()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.GPS_Position) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float latitude_; + + /** + * float latitude = 1; + * @return The latitude. + */ + @java.lang.Override + public float getLatitude() { + return latitude_; + } + + /** + * float latitude = 1; + * @param value The latitude to set. + * @return This builder for chaining. + */ + public Builder setLatitude(float value) { + latitude_ = value; + onChanged(); + return this; + } + + /** + * float latitude = 1; + * @return This builder for chaining. + */ + public Builder clearLatitude() { + latitude_ = 0F; + onChanged(); + return this; + } + + private float longitude_; + + /** + * float longitude = 2; + * @return The longitude. + */ + @java.lang.Override + public float getLongitude() { + return longitude_; + } + + /** + * float longitude = 2; + * @param value The longitude to set. + * @return This builder for chaining. + */ + public Builder setLongitude(float value) { + longitude_ = value; + onChanged(); + return this; + } + + /** + * float longitude = 2; + * @return This builder for chaining. + */ + public Builder clearLongitude() { + longitude_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.GPS_Position) + } + + // @@protoc_insertion_point(class_scope:context.GPS_Position) + private static final context.ContextOuterClass.GPS_Position DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.GPS_Position(); + } + + public static context.ContextOuterClass.GPS_Position getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.GPS_Position getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LocationOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Location) + com.google.protobuf.MessageOrBuilder { + + /** + * string region = 1; + * @return Whether the region field is set. + */ + boolean hasRegion(); + + /** + * string region = 1; + * @return The region. + */ + java.lang.String getRegion(); + + /** + * string region = 1; + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); + + /** + * .context.GPS_Position gps_position = 2; + * @return Whether the gpsPosition field is set. + */ + boolean hasGpsPosition(); + + /** + * .context.GPS_Position gps_position = 2; + * @return The gpsPosition. + */ + context.ContextOuterClass.GPS_Position getGpsPosition(); + + /** + * .context.GPS_Position gps_position = 2; + */ + context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder(); + + public context.ContextOuterClass.Location.LocationCase getLocationCase(); + } + + /** + * Protobuf type {@code context.Location} + */ + public static final class Location extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Location) + LocationOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Location.newBuilder() to construct. + private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Location() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Location_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Location.class, context.ContextOuterClass.Location.Builder.class); + } + + private int locationCase_ = 0; + + private java.lang.Object location_; + + public enum LocationCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { + + REGION(1), GPS_POSITION(2), LOCATION_NOT_SET(0); + + private final int value; + + private LocationCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LocationCase valueOf(int value) { + return forNumber(value); + } + + public static LocationCase forNumber(int value) { + switch(value) { + case 1: + return REGION; + case 2: + return GPS_POSITION; + case 0: + return LOCATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + } + + public LocationCase getLocationCase() { + return LocationCase.forNumber(locationCase_); + } + + public static final int REGION_FIELD_NUMBER = 1; + + /** + * string region = 1; + * @return Whether the region field is set. + */ + public boolean hasRegion() { + return locationCase_ == 1; + } + + /** + * string region = 1; + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = ""; + if (locationCase_ == 1) { + ref = location_; + } + 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(); + if (locationCase_ == 1) { + location_ = s; + } + return s; + } + } + + /** + * string region = 1; + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = ""; + if (locationCase_ == 1) { + ref = location_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationCase_ == 1) { + location_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GPS_POSITION_FIELD_NUMBER = 2; + + /** + * .context.GPS_Position gps_position = 2; + * @return Whether the gpsPosition field is set. + */ + @java.lang.Override + public boolean hasGpsPosition() { + return locationCase_ == 2; + } + + /** + * .context.GPS_Position gps_position = 2; + * @return The gpsPosition. + */ + @java.lang.Override + public context.ContextOuterClass.GPS_Position getGpsPosition() { + if (locationCase_ == 2) { + return (context.ContextOuterClass.GPS_Position) location_; + } + return context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } + + /** + * .context.GPS_Position gps_position = 2; + */ + @java.lang.Override + public context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder() { + if (locationCase_ == 2) { + return (context.ContextOuterClass.GPS_Position) location_; + } + return context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (locationCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + } + if (locationCase_ == 2) { + output.writeMessage(2, (context.ContextOuterClass.GPS_Position) location_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (locationCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + } + if (locationCase_ == 2) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.GPS_Position) location_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Location)) { + return super.equals(obj); + } + context.ContextOuterClass.Location other = (context.ContextOuterClass.Location) obj; + if (!getLocationCase().equals(other.getLocationCase())) + return false; + switch(locationCase_) { + case 1: + if (!getRegion().equals(other.getRegion())) + return false; + break; + case 2: + if (!getGpsPosition().equals(other.getGpsPosition())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch(locationCase_) { + case 1: + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + break; + case 2: + hash = (37 * hash) + GPS_POSITION_FIELD_NUMBER; + hash = (53 * hash) + getGpsPosition().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Location parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Location parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Location parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Location parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Location parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Location parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Location parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Location parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Location parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Location parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Location parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Location parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Location prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Location} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Location) + context.ContextOuterClass.LocationOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Location_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Location.class, context.ContextOuterClass.Location.Builder.class); + } + + // 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(); + locationCase_ = 0; + location_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Location_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Location getDefaultInstanceForType() { + return context.ContextOuterClass.Location.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Location build() { + context.ContextOuterClass.Location result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + } + result.locationCase_ = locationCase_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Location) { + return mergeFrom((context.ContextOuterClass.Location) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Location other) { + if (other == context.ContextOuterClass.Location.getDefaultInstance()) + return this; + switch(other.getLocationCase()) { + case REGION: + { + locationCase_ = 1; + location_ = other.location_; + onChanged(); + break; + } + case GPS_POSITION: + { + mergeGpsPosition(other.getGpsPosition()); + break; + } + case LOCATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Location) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int locationCase_ = 0; + + private java.lang.Object location_; + + public LocationCase getLocationCase() { + return LocationCase.forNumber(locationCase_); + } + + public Builder clearLocation() { + locationCase_ = 0; + location_ = null; + onChanged(); + return this; + } + + /** + * string region = 1; + * @return Whether the region field is set. + */ + @java.lang.Override + public boolean hasRegion() { + return locationCase_ == 1; + } + + /** + * string region = 1; + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = ""; + if (locationCase_ == 1) { + ref = location_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (locationCase_ == 1) { + location_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string region = 1; + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = ""; + if (locationCase_ == 1) { + ref = location_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationCase_ == 1) { + location_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string region = 1; + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + locationCase_ = 1; + location_ = value; + onChanged(); + return this; + } + + /** + * string region = 1; + * @return This builder for chaining. + */ + public Builder clearRegion() { + if (locationCase_ == 1) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + return this; + } + + /** + * string region = 1; + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + locationCase_ = 1; + location_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3 gpsPositionBuilder_; + + /** + * .context.GPS_Position gps_position = 2; + * @return Whether the gpsPosition field is set. + */ + @java.lang.Override + public boolean hasGpsPosition() { + return locationCase_ == 2; + } + + /** + * .context.GPS_Position gps_position = 2; + * @return The gpsPosition. + */ + @java.lang.Override + public context.ContextOuterClass.GPS_Position getGpsPosition() { + if (gpsPositionBuilder_ == null) { + if (locationCase_ == 2) { + return (context.ContextOuterClass.GPS_Position) location_; + } + return context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } else { + if (locationCase_ == 2) { + return gpsPositionBuilder_.getMessage(); + } + return context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } + } + + /** + * .context.GPS_Position gps_position = 2; + */ + public Builder setGpsPosition(context.ContextOuterClass.GPS_Position value) { + if (gpsPositionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + gpsPositionBuilder_.setMessage(value); + } + locationCase_ = 2; + return this; + } + + /** + * .context.GPS_Position gps_position = 2; + */ + public Builder setGpsPosition(context.ContextOuterClass.GPS_Position.Builder builderForValue) { + if (gpsPositionBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + gpsPositionBuilder_.setMessage(builderForValue.build()); + } + locationCase_ = 2; + return this; + } + + /** + * .context.GPS_Position gps_position = 2; + */ + public Builder mergeGpsPosition(context.ContextOuterClass.GPS_Position value) { + if (gpsPositionBuilder_ == null) { + if (locationCase_ == 2 && location_ != context.ContextOuterClass.GPS_Position.getDefaultInstance()) { + location_ = context.ContextOuterClass.GPS_Position.newBuilder((context.ContextOuterClass.GPS_Position) location_).mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + if (locationCase_ == 2) { + gpsPositionBuilder_.mergeFrom(value); + } + gpsPositionBuilder_.setMessage(value); + } + locationCase_ = 2; + return this; + } + + /** + * .context.GPS_Position gps_position = 2; + */ + public Builder clearGpsPosition() { + if (gpsPositionBuilder_ == null) { + if (locationCase_ == 2) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + } else { + if (locationCase_ == 2) { + locationCase_ = 0; + location_ = null; + } + gpsPositionBuilder_.clear(); + } + return this; + } + + /** + * .context.GPS_Position gps_position = 2; + */ + public context.ContextOuterClass.GPS_Position.Builder getGpsPositionBuilder() { + return getGpsPositionFieldBuilder().getBuilder(); + } + + /** + * .context.GPS_Position gps_position = 2; + */ + @java.lang.Override + public context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder() { + if ((locationCase_ == 2) && (gpsPositionBuilder_ != null)) { + return gpsPositionBuilder_.getMessageOrBuilder(); + } else { + if (locationCase_ == 2) { + return (context.ContextOuterClass.GPS_Position) location_; + } + return context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } + } + + /** + * .context.GPS_Position gps_position = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getGpsPositionFieldBuilder() { + if (gpsPositionBuilder_ == null) { + if (!(locationCase_ == 2)) { + location_ = context.ContextOuterClass.GPS_Position.getDefaultInstance(); + } + gpsPositionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.GPS_Position) location_, getParentForChildren(), isClean()); + location_ = null; + } + locationCase_ = 2; + onChanged(); + ; + return gpsPositionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Location) + } + + // @@protoc_insertion_point(class_scope:context.Location) + private static final context.ContextOuterClass.Location DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Location(); + } + + public static context.ContextOuterClass.Location getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Location getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_EndPointLocationOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_EndPointLocation) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + boolean hasEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + context.ContextOuterClass.EndPointId getEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + + /** + * .context.Location location = 2; + * @return Whether the location field is set. + */ + boolean hasLocation(); + + /** + * .context.Location location = 2; + * @return The location. + */ + context.ContextOuterClass.Location getLocation(); + + /** + * .context.Location location = 2; + */ + context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder(); + } + + /** + * Protobuf type {@code context.Constraint_EndPointLocation} + */ + public static final class Constraint_EndPointLocation extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_EndPointLocation) + Constraint_EndPointLocationOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_EndPointLocation.newBuilder() to construct. + private Constraint_EndPointLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_EndPointLocation() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_EndPointLocation.class, context.ContextOuterClass.Constraint_EndPointLocation.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.EndPointId endpointId_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + @java.lang.Override + public boolean hasEndpointId() { + return endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointId() { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + return getEndpointId(); + } + + public static final int LOCATION_FIELD_NUMBER = 2; + + private context.ContextOuterClass.Location location_; + + /** + * .context.Location location = 2; + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return location_ != null; + } + + /** + * .context.Location location = 2; + * @return The location. + */ + @java.lang.Override + public context.ContextOuterClass.Location getLocation() { + return location_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : location_; + } + + /** + * .context.Location location = 2; + */ + @java.lang.Override + public context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder() { + return getLocation(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (endpointId_ != null) { + output.writeMessage(1, getEndpointId()); + } + if (location_ != null) { + output.writeMessage(2, getLocation()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (endpointId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId()); + } + if (location_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLocation()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_EndPointLocation)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint_EndPointLocation other = (context.ContextOuterClass.Constraint_EndPointLocation) obj; + if (hasEndpointId() != other.hasEndpointId()) + return false; + if (hasEndpointId()) { + if (!getEndpointId().equals(other.getEndpointId())) + return false; + } + if (hasLocation() != other.hasLocation()) + return false; + if (hasLocation()) { + if (!getLocation().equals(other.getLocation())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointId()) { + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + } + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_EndPointLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_EndPointLocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_EndPointLocation) + context.ContextOuterClass.Constraint_EndPointLocationOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_EndPointLocation.class, context.ContextOuterClass.Constraint_EndPointLocation.Builder.class); + } + + // 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; + endpointIdBuilder_ = null; + } + if (locationBuilder_ == null) { + location_ = null; + } else { + location_ = null; + locationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocation getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocation build() { + context.ContextOuterClass.Constraint_EndPointLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_EndPointLocation) { + return mergeFrom((context.ContextOuterClass.Constraint_EndPointLocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_EndPointLocation other) { + if (other == context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance()) + return this; + if (other.hasEndpointId()) { + mergeEndpointId(other.getEndpointId()); + } + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_EndPointLocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.EndPointId endpointId_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + public boolean hasEndpointId() { + return endpointIdBuilder_ != null || endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + public context.ContextOuterClass.EndPointId getEndpointId() { + if (endpointIdBuilder_ == null) { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } else { + return endpointIdBuilder_.getMessage(); + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + onChanged(); + } else { + endpointIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdBuilder_ == null) { + endpointId_ = builderForValue.build(); + onChanged(); + } else { + endpointIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (endpointId_ != null) { + endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + } else { + endpointId_ = value; + } + onChanged(); + } else { + endpointIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder clearEndpointId() { + if (endpointIdBuilder_ == null) { + endpointId_ = null; + onChanged(); + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + onChanged(); + return getEndpointIdFieldBuilder().getBuilder(); + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + if (endpointIdBuilder_ != null) { + return endpointIdBuilder_.getMessageOrBuilder(); + } else { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointIdFieldBuilder() { + if (endpointIdBuilder_ == null) { + endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointId(), getParentForChildren(), isClean()); + endpointId_ = null; + } + return endpointIdBuilder_; + } + + private context.ContextOuterClass.Location location_; + + private com.google.protobuf.SingleFieldBuilderV3 locationBuilder_; + + /** + * .context.Location location = 2; + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return locationBuilder_ != null || location_ != null; + } + + /** + * .context.Location location = 2; + * @return The location. + */ + public context.ContextOuterClass.Location getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + + /** + * .context.Location location = 2; + */ + public Builder setLocation(context.ContextOuterClass.Location value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + locationBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Location location = 2; + */ + public Builder setLocation(context.ContextOuterClass.Location.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Location location = 2; + */ + public Builder mergeLocation(context.ContextOuterClass.Location value) { + if (locationBuilder_ == null) { + if (location_ != null) { + location_ = context.ContextOuterClass.Location.newBuilder(location_).mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + locationBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Location location = 2; + */ + public Builder clearLocation() { + if (locationBuilder_ == null) { + location_ = null; + onChanged(); + } else { + location_ = null; + locationBuilder_ = null; + } + return this; + } + + /** + * .context.Location location = 2; + */ + public context.ContextOuterClass.Location.Builder getLocationBuilder() { + onChanged(); + return getLocationFieldBuilder().getBuilder(); + } + + /** + * .context.Location location = 2; + */ + public context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : location_; + } + } + + /** + * .context.Location location = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getLocation(), getParentForChildren(), isClean()); + location_ = null; + } + return locationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_EndPointLocation) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_EndPointLocation) + private static final context.ContextOuterClass.Constraint_EndPointLocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_EndPointLocation(); + } + + public static context.ContextOuterClass.Constraint_EndPointLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_EndPointPriorityOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_EndPointPriority) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + boolean hasEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + context.ContextOuterClass.EndPointId getEndpointId(); + + /** + * .context.EndPointId endpoint_id = 1; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + + /** + * uint32 priority = 2; + * @return The priority. + */ + int getPriority(); + } + + /** + * Protobuf type {@code context.Constraint_EndPointPriority} + */ + public static final class Constraint_EndPointPriority extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_EndPointPriority) + Constraint_EndPointPriorityOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_EndPointPriority.newBuilder() to construct. + private Constraint_EndPointPriority(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_EndPointPriority() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_EndPointPriority.class, context.ContextOuterClass.Constraint_EndPointPriority.Builder.class); + } + + public static final int ENDPOINT_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.EndPointId endpointId_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + @java.lang.Override + public boolean hasEndpointId() { + return endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointId() { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + return getEndpointId(); + } + + public static final int PRIORITY_FIELD_NUMBER = 2; + + private int priority_; + + /** + * uint32 priority = 2; + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (endpointId_ != null) { + output.writeMessage(1, getEndpointId()); + } + if (priority_ != 0) { + output.writeUInt32(2, priority_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (endpointId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId()); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, priority_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_EndPointPriority)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint_EndPointPriority other = (context.ContextOuterClass.Constraint_EndPointPriority) obj; + if (hasEndpointId() != other.hasEndpointId()) + return false; + if (hasEndpointId()) { + if (!getEndpointId().equals(other.getEndpointId())) + return false; + } + if (getPriority() != other.getPriority()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEndpointId()) { + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + } + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_EndPointPriority prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_EndPointPriority} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_EndPointPriority) + context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_EndPointPriority.class, context.ContextOuterClass.Constraint_EndPointPriority.Builder.class); + } + + // 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; + endpointIdBuilder_ = null; + } + priority_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriority getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriority build() { + context.ContextOuterClass.Constraint_EndPointPriority result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_EndPointPriority) { + return mergeFrom((context.ContextOuterClass.Constraint_EndPointPriority) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_EndPointPriority other) { + if (other == context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance()) + return this; + if (other.hasEndpointId()) { + mergeEndpointId(other.getEndpointId()); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_EndPointPriority) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.EndPointId endpointId_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_; + + /** + * .context.EndPointId endpoint_id = 1; + * @return Whether the endpointId field is set. + */ + public boolean hasEndpointId() { + return endpointIdBuilder_ != null || endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 1; + * @return The endpointId. + */ + public context.ContextOuterClass.EndPointId getEndpointId() { + if (endpointIdBuilder_ == null) { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } else { + return endpointIdBuilder_.getMessage(); + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + onChanged(); + } else { + endpointIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdBuilder_ == null) { + endpointId_ = builderForValue.build(); + onChanged(); + } else { + endpointIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (endpointId_ != null) { + endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + } else { + endpointId_ = value; + } + onChanged(); + } else { + endpointIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public Builder clearEndpointId() { + if (endpointIdBuilder_ == null) { + endpointId_ = null; + onChanged(); + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + onChanged(); + return getEndpointIdFieldBuilder().getBuilder(); + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + if (endpointIdBuilder_ != null) { + return endpointIdBuilder_.getMessageOrBuilder(); + } else { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + } + + /** + * .context.EndPointId endpoint_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointIdFieldBuilder() { + if (endpointIdBuilder_ == null) { + endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointId(), getParentForChildren(), isClean()); + endpointId_ = null; + } + return endpointIdBuilder_; + } + + private int priority_; + + /** + * uint32 priority = 2; + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + /** + * uint32 priority = 2; + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + priority_ = value; + onChanged(); + return this; + } + + /** + * uint32 priority = 2; + * @return This builder for chaining. + */ + public Builder clearPriority() { + priority_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_EndPointPriority) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_EndPointPriority) + private static final context.ContextOuterClass.Constraint_EndPointPriority DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_EndPointPriority(); + } + + public static context.ContextOuterClass.Constraint_EndPointPriority getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriority getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_SLA_LatencyOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Latency) + com.google.protobuf.MessageOrBuilder { + + /** + * float e2e_latency_ms = 1; + * @return The e2eLatencyMs. + */ + float getE2ELatencyMs(); + } + + /** + * Protobuf type {@code context.Constraint_SLA_Latency} + */ + public static final class Constraint_SLA_Latency extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Latency) + Constraint_SLA_LatencyOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_SLA_Latency.newBuilder() to construct. + private Constraint_SLA_Latency(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_SLA_Latency() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Latency.class, context.ContextOuterClass.Constraint_SLA_Latency.Builder.class); + } + + public static final int E2E_LATENCY_MS_FIELD_NUMBER = 1; + + private float e2ELatencyMs_; + + /** + * float e2e_latency_ms = 1; + * @return The e2eLatencyMs. + */ + @java.lang.Override + public float getE2ELatencyMs() { + return e2ELatencyMs_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (e2ELatencyMs_ != 0F) { + output.writeFloat(1, e2ELatencyMs_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (e2ELatencyMs_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, e2ELatencyMs_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Latency)) { + return super.equals(obj); + } + 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)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Latency prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_SLA_Latency} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Latency) + context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Latency.class, context.ContextOuterClass.Constraint_SLA_Latency.Builder.class); + } + + // 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(); + e2ELatencyMs_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Latency getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Latency build() { + context.ContextOuterClass.Constraint_SLA_Latency result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_SLA_Latency) { + return mergeFrom((context.ContextOuterClass.Constraint_SLA_Latency) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Latency other) { + if (other == context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance()) + return this; + if (other.getE2ELatencyMs() != 0F) { + setE2ELatencyMs(other.getE2ELatencyMs()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_SLA_Latency) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float e2ELatencyMs_; + + /** + * float e2e_latency_ms = 1; + * @return The e2eLatencyMs. + */ + @java.lang.Override + public float getE2ELatencyMs() { + return e2ELatencyMs_; + } + + /** + * float e2e_latency_ms = 1; + * @param value The e2eLatencyMs to set. + * @return This builder for chaining. + */ + public Builder setE2ELatencyMs(float value) { + e2ELatencyMs_ = value; + onChanged(); + return this; + } + + /** + * float e2e_latency_ms = 1; + * @return This builder for chaining. + */ + public Builder clearE2ELatencyMs() { + e2ELatencyMs_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Latency) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Latency) + private static final context.ContextOuterClass.Constraint_SLA_Latency DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Latency(); + } + + public static context.ContextOuterClass.Constraint_SLA_Latency getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Latency getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_SLA_CapacityOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Capacity) + com.google.protobuf.MessageOrBuilder { + + /** + * float capacity_gbps = 1; + * @return The capacityGbps. + */ + float getCapacityGbps(); + } + + /** + * Protobuf type {@code context.Constraint_SLA_Capacity} + */ + public static final class Constraint_SLA_Capacity extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Capacity) + Constraint_SLA_CapacityOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_SLA_Capacity.newBuilder() to construct. + private Constraint_SLA_Capacity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_SLA_Capacity() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Capacity.class, context.ContextOuterClass.Constraint_SLA_Capacity.Builder.class); + } + + public static final int CAPACITY_GBPS_FIELD_NUMBER = 1; + + private float capacityGbps_; + + /** + * float capacity_gbps = 1; + * @return The capacityGbps. + */ + @java.lang.Override + public float getCapacityGbps() { + return capacityGbps_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (capacityGbps_ != 0F) { + output.writeFloat(1, capacityGbps_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (capacityGbps_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, capacityGbps_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Capacity)) { + return super.equals(obj); + } + 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)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Capacity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_SLA_Capacity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Capacity) + context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Capacity.class, context.ContextOuterClass.Constraint_SLA_Capacity.Builder.class); + } + + // 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(); + capacityGbps_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Capacity getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Capacity build() { + context.ContextOuterClass.Constraint_SLA_Capacity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_SLA_Capacity) { + return mergeFrom((context.ContextOuterClass.Constraint_SLA_Capacity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Capacity other) { + if (other == context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance()) + return this; + if (other.getCapacityGbps() != 0F) { + setCapacityGbps(other.getCapacityGbps()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_SLA_Capacity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float capacityGbps_; + + /** + * float capacity_gbps = 1; + * @return The capacityGbps. + */ + @java.lang.Override + public float getCapacityGbps() { + return capacityGbps_; + } + + /** + * float capacity_gbps = 1; + * @param value The capacityGbps to set. + * @return This builder for chaining. + */ + public Builder setCapacityGbps(float value) { + capacityGbps_ = value; + onChanged(); + return this; + } + + /** + * float capacity_gbps = 1; + * @return This builder for chaining. + */ + public Builder clearCapacityGbps() { + capacityGbps_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Capacity) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Capacity) + private static final context.ContextOuterClass.Constraint_SLA_Capacity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Capacity(); + } + + public static context.ContextOuterClass.Constraint_SLA_Capacity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Capacity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface Constraint_SLA_AvailabilityOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Availability) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 num_disjoint_paths = 1; + * @return The numDisjointPaths. + */ + int getNumDisjointPaths(); + + /** + * bool all_active = 2; + * @return The allActive. + */ + boolean getAllActive(); + + /** + *
+         * 0.0 .. 100.0 percentage of availability
+         * 
+ * + * float availability = 3; + * @return The availability. + */ + float getAvailability(); + } + + /** + * Protobuf type {@code context.Constraint_SLA_Availability} + */ + public static final class Constraint_SLA_Availability extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Availability) + Constraint_SLA_AvailabilityOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Constraint_SLA_Availability.newBuilder() to construct. + private Constraint_SLA_Availability(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraint_SLA_Availability() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Availability.class, context.ContextOuterClass.Constraint_SLA_Availability.Builder.class); + } + + public static final int NUM_DISJOINT_PATHS_FIELD_NUMBER = 1; + + private int numDisjointPaths_; + + /** + * uint32 num_disjoint_paths = 1; + * @return The numDisjointPaths. + */ + @java.lang.Override + public int getNumDisjointPaths() { + return numDisjointPaths_; + } + + public static final int ALL_ACTIVE_FIELD_NUMBER = 2; + + private boolean allActive_; + + /** + * bool all_active = 2; + * @return The allActive. + */ + @java.lang.Override + public boolean getAllActive() { + return allActive_; + } + + public static final int AVAILABILITY_FIELD_NUMBER = 3; + + private float availability_; + + /** + *
+         * 0.0 .. 100.0 percentage of availability
+         * 
+ * + * float availability = 3; + * @return The availability. + */ + @java.lang.Override + public float getAvailability() { + return availability_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (numDisjointPaths_ != 0) { + output.writeUInt32(1, numDisjointPaths_); + } + if (allActive_ != false) { + output.writeBool(2, allActive_); + } + if (availability_ != 0F) { + output.writeFloat(3, availability_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (numDisjointPaths_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(1, numDisjointPaths_); + } + if (allActive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allActive_); + } + if (availability_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, availability_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Availability)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint_SLA_Availability other = (context.ContextOuterClass.Constraint_SLA_Availability) obj; + if (getNumDisjointPaths() != other.getNumDisjointPaths()) + return false; + if (getAllActive() != other.getAllActive()) + return false; + if (java.lang.Float.floatToIntBits(getAvailability()) != java.lang.Float.floatToIntBits(other.getAvailability())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NUM_DISJOINT_PATHS_FIELD_NUMBER; + hash = (53 * hash) + getNumDisjointPaths(); + hash = (37 * hash) + ALL_ACTIVE_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Availability prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_SLA_Availability} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Availability) + context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Availability.class, context.ContextOuterClass.Constraint_SLA_Availability.Builder.class); + } + + // 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(); + numDisjointPaths_ = 0; + allActive_ = false; + availability_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Availability getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Availability build() { + context.ContextOuterClass.Constraint_SLA_Availability result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_SLA_Availability) { + return mergeFrom((context.ContextOuterClass.Constraint_SLA_Availability) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Availability other) { + if (other == context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance()) + return this; + if (other.getNumDisjointPaths() != 0) { + setNumDisjointPaths(other.getNumDisjointPaths()); + } + if (other.getAllActive() != false) { + setAllActive(other.getAllActive()); + } + if (other.getAvailability() != 0F) { + setAvailability(other.getAvailability()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_SLA_Availability) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int numDisjointPaths_; + + /** + * uint32 num_disjoint_paths = 1; + * @return The numDisjointPaths. + */ + @java.lang.Override + public int getNumDisjointPaths() { + return numDisjointPaths_; + } + + /** + * uint32 num_disjoint_paths = 1; + * @param value The numDisjointPaths to set. + * @return This builder for chaining. + */ + public Builder setNumDisjointPaths(int value) { + numDisjointPaths_ = value; + onChanged(); + return this; + } + + /** + * uint32 num_disjoint_paths = 1; + * @return This builder for chaining. + */ + public Builder clearNumDisjointPaths() { + numDisjointPaths_ = 0; + onChanged(); + return this; + } + + private boolean allActive_; + + /** + * bool all_active = 2; + * @return The allActive. + */ + @java.lang.Override + public boolean getAllActive() { + return allActive_; + } + + /** + * bool all_active = 2; + * @param value The allActive to set. + * @return This builder for chaining. + */ + public Builder setAllActive(boolean value) { + allActive_ = value; + onChanged(); + return this; + } + + /** + * bool all_active = 2; + * @return This builder for chaining. + */ + public Builder clearAllActive() { + allActive_ = false; + onChanged(); + return this; + } + + private float availability_; + + /** + *
+             * 0.0 .. 100.0 percentage of availability
+             * 
+ * + * float availability = 3; + * @return The availability. + */ + @java.lang.Override + public float getAvailability() { + return availability_; + } + + /** + *
+             * 0.0 .. 100.0 percentage of availability
+             * 
+ * + * float availability = 3; + * @param value The availability to set. + * @return This builder for chaining. + */ + public Builder setAvailability(float value) { + availability_ = value; + onChanged(); + return this; + } + + /** + *
+             * 0.0 .. 100.0 percentage of availability
+             * 
+ * + * float availability = 3; + * @return This builder for chaining. + */ + public Builder clearAvailability() { + availability_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Availability) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Availability) + private static final context.ContextOuterClass.Constraint_SLA_Availability DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Availability(); + } + + public static context.ContextOuterClass.Constraint_SLA_Availability getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Availability getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - } + public interface Constraint_SLA_Isolation_levelOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Isolation_level) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return A list containing the isolationLevel. + */ + java.util.List getIsolationLevelList(); + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return The count of isolationLevel. + */ + int getIsolationLevelCount(); + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the element to return. + * @return The isolationLevel at the given index. + */ + context.ContextOuterClass.IsolationLevelEnum getIsolationLevel(int index); + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return A list containing the enum numeric values on the wire for isolationLevel. + */ + java.util.List getIsolationLevelValueList(); - public interface DeviceOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Device) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of isolationLevel at the given index. + */ + int getIsolationLevelValue(int index); + } /** - * .context.DeviceId device_id = 1; - * @return Whether the deviceId field is set. - */ - boolean hasDeviceId(); - /** - * .context.DeviceId device_id = 1; - * @return The deviceId. - */ - context.ContextOuterClass.DeviceId getDeviceId(); - /** - * .context.DeviceId device_id = 1; + * Protobuf type {@code context.Constraint_SLA_Isolation_level} */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + public static final class Constraint_SLA_Isolation_level extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Isolation_level) + Constraint_SLA_Isolation_levelOrBuilder { - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + private static final long serialVersionUID = 0L; - /** - * string device_type = 3; - * @return The deviceType. - */ - java.lang.String getDeviceType(); - /** - * string device_type = 3; - * @return The bytes for deviceType. - */ - com.google.protobuf.ByteString - getDeviceTypeBytes(); + // Use Constraint_SLA_Isolation_level.newBuilder() to construct. + private Constraint_SLA_Isolation_level(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - /** - * .context.DeviceConfig device_config = 4; - * @return Whether the deviceConfig field is set. - */ - boolean hasDeviceConfig(); - /** - * .context.DeviceConfig device_config = 4; - * @return The deviceConfig. - */ - context.ContextOuterClass.DeviceConfig getDeviceConfig(); - /** - * .context.DeviceConfig device_config = 4; - */ - context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder(); + private Constraint_SLA_Isolation_level() { + isolationLevel_ = java.util.Collections.emptyList(); + } - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return The enum numeric value on the wire for deviceOperationalStatus. - */ - int getDeviceOperationalStatusValue(); - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return The deviceOperationalStatus. - */ - context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus(); + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Constraint_SLA_Isolation_level(); + } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return A list containing the deviceDrivers. - */ - java.util.List getDeviceDriversList(); - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return The count of deviceDrivers. - */ - int getDeviceDriversCount(); - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the element to return. - * @return The deviceDrivers at the given index. - */ - context.ContextOuterClass.DeviceDriverEnum getDeviceDrivers(int index); - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return A list containing the enum numeric values on the wire for deviceDrivers. - */ - java.util.List - getDeviceDriversValueList(); - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of deviceDrivers at the given index. - */ - int getDeviceDriversValue(int index); + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - java.util.List - getDeviceEndpointsList(); - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - context.ContextOuterClass.EndPoint getDeviceEndpoints(int index); - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - int getDeviceEndpointsCount(); - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - java.util.List - getDeviceEndpointsOrBuilderList(); - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - context.ContextOuterClass.EndPointOrBuilder getDeviceEndpointsOrBuilder( - int index); + 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(); + 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(); + 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(); + } + } - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - java.util.List - getComponentsList(); - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - context.ContextOuterClass.Component getComponents(int index); - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - int getComponentsCount(); - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - java.util.List - getComponentsOrBuilderList(); - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder( - int index); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_descriptor; + } - /** - *
-     * Identifier of node controlling the actual device
-     * 
- * - * .context.DeviceId controller_id = 9; - * @return Whether the controllerId field is set. - */ - boolean hasControllerId(); - /** - *
-     * Identifier of node controlling the actual device
-     * 
- * - * .context.DeviceId controller_id = 9; - * @return The controllerId. - */ - context.ContextOuterClass.DeviceId getControllerId(); - /** - *
-     * Identifier of node controlling the actual device
-     * 
- * - * .context.DeviceId controller_id = 9; - */ - context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder(); - } - /** - * Protobuf type {@code context.Device} - */ - public static final class Device extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Device) - DeviceOrBuilder { - private static final long serialVersionUID = 0L; - // Use Device.newBuilder() to construct. - private Device(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Device() { - name_ = ""; - deviceType_ = ""; - deviceOperationalStatus_ = 0; - deviceDrivers_ = java.util.Collections.emptyList(); - deviceEndpoints_ = java.util.Collections.emptyList(); - components_ = java.util.Collections.emptyList(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Isolation_level.class, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder.class); + } + + public static final int ISOLATION_LEVEL_FIELD_NUMBER = 1; + + private java.util.List isolationLevel_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter isolationLevel_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter() { + + public context.ContextOuterClass.IsolationLevelEnum convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + context.ContextOuterClass.IsolationLevelEnum result = context.ContextOuterClass.IsolationLevelEnum.valueOf(from); + return result == null ? context.ContextOuterClass.IsolationLevelEnum.UNRECOGNIZED : result; + } + }; + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return A list containing the isolationLevel. + */ + @java.lang.Override + public java.util.List getIsolationLevelList() { + return new com.google.protobuf.Internal.ListAdapter(isolationLevel_, isolationLevel_converter_); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return The count of isolationLevel. + */ + @java.lang.Override + public int getIsolationLevelCount() { + return isolationLevel_.size(); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the element to return. + * @return The isolationLevel at the given index. + */ + @java.lang.Override + public context.ContextOuterClass.IsolationLevelEnum getIsolationLevel(int index) { + return isolationLevel_converter_.convert(isolationLevel_.get(index)); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return A list containing the enum numeric values on the wire for isolationLevel. + */ + @java.lang.Override + public java.util.List getIsolationLevelValueList() { + return isolationLevel_; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of isolationLevel at the given index. + */ + @java.lang.Override + public int getIsolationLevelValue(int index) { + return isolationLevel_.get(index); + } + + private int isolationLevelMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (getIsolationLevelList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(isolationLevelMemoizedSerializedSize); + } + for (int i = 0; i < isolationLevel_.size(); i++) { + output.writeEnumNoTag(isolationLevel_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + { + int dataSize = 0; + for (int i = 0; i < isolationLevel_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(isolationLevel_.get(i)); + } + size += dataSize; + if (!getIsolationLevelList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + isolationLevelMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Isolation_level)) { + return super.equals(obj); + } + 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)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIsolationLevelCount() > 0) { + hash = (37 * hash) + ISOLATION_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + isolationLevel_.hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Isolation_level prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code context.Constraint_SLA_Isolation_level} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Isolation_level) + context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_SLA_Isolation_level.class, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder.class); + } + + // 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(); + isolationLevel_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_level getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_level build() { + context.ContextOuterClass.Constraint_SLA_Isolation_level result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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); + } + 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); + } + + @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.Constraint_SLA_Isolation_level) { + return mergeFrom((context.ContextOuterClass.Constraint_SLA_Isolation_level) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Isolation_level other) { + if (other == context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance()) + return this; + if (!other.isolationLevel_.isEmpty()) { + if (isolationLevel_.isEmpty()) { + isolationLevel_ = other.isolationLevel_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIsolationLevelIsMutable(); + isolationLevel_.addAll(other.isolationLevel_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_SLA_Isolation_level) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List isolationLevel_ = java.util.Collections.emptyList(); + + private void ensureIsolationLevelIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + isolationLevel_ = new java.util.ArrayList(isolationLevel_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return A list containing the isolationLevel. + */ + public java.util.List getIsolationLevelList() { + return new com.google.protobuf.Internal.ListAdapter(isolationLevel_, isolationLevel_converter_); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return The count of isolationLevel. + */ + public int getIsolationLevelCount() { + return isolationLevel_.size(); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the element to return. + * @return The isolationLevel at the given index. + */ + public context.ContextOuterClass.IsolationLevelEnum getIsolationLevel(int index) { + return isolationLevel_converter_.convert(isolationLevel_.get(index)); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index to set the value at. + * @param value The isolationLevel to set. + * @return This builder for chaining. + */ + public Builder setIsolationLevel(int index, context.ContextOuterClass.IsolationLevelEnum value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIsolationLevelIsMutable(); + isolationLevel_.set(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param value The isolationLevel to add. + * @return This builder for chaining. + */ + public Builder addIsolationLevel(context.ContextOuterClass.IsolationLevelEnum value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIsolationLevelIsMutable(); + isolationLevel_.add(value.getNumber()); + onChanged(); + return this; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param values The isolationLevel to add. + * @return This builder for chaining. + */ + public Builder addAllIsolationLevel(java.lang.Iterable values) { + ensureIsolationLevelIsMutable(); + for (context.ContextOuterClass.IsolationLevelEnum value : values) { + isolationLevel_.add(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return This builder for chaining. + */ + public Builder clearIsolationLevel() { + isolationLevel_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @return A list containing the enum numeric values on the wire for isolationLevel. + */ + public java.util.List getIsolationLevelValueList() { + return java.util.Collections.unmodifiableList(isolationLevel_); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of isolationLevel at the given index. + */ + public int getIsolationLevelValue(int index) { + return isolationLevel_.get(index); + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of isolationLevel at the given index. + * @return This builder for chaining. + */ + public Builder setIsolationLevelValue(int index, int value) { + ensureIsolationLevelIsMutable(); + isolationLevel_.set(index, value); + onChanged(); + return this; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param value The enum numeric value on the wire for isolationLevel to add. + * @return This builder for chaining. + */ + public Builder addIsolationLevelValue(int value) { + ensureIsolationLevelIsMutable(); + isolationLevel_.add(value); + onChanged(); + return this; + } + + /** + * repeated .context.IsolationLevelEnum isolation_level = 1; + * @param values The enum numeric values on the wire for isolationLevel to add. + * @return This builder for chaining. + */ + public Builder addAllIsolationLevelValue(java.lang.Iterable values) { + ensureIsolationLevelIsMutable(); + for (int value : values) { + isolationLevel_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Isolation_level) + } + + // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Isolation_level) + private static final context.ContextOuterClass.Constraint_SLA_Isolation_level DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Isolation_level(); + } + + public static context.ContextOuterClass.Constraint_SLA_Isolation_level getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_level getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Device(); - } + public interface Constraint_ExclusionsOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint_Exclusions) + com.google.protobuf.MessageOrBuilder { + + /** + * bool is_permanent = 1; + * @return The isPermanent. + */ + boolean getIsPermanent(); + + /** + * repeated .context.DeviceId device_ids = 2; + */ + java.util.List getDeviceIdsList(); + + /** + * repeated .context.DeviceId device_ids = 2; + */ + context.ContextOuterClass.DeviceId getDeviceIds(int index); + + /** + * repeated .context.DeviceId device_ids = 2; + */ + int getDeviceIdsCount(); + + /** + * repeated .context.DeviceId device_ids = 2; + */ + java.util.List getDeviceIdsOrBuilderList(); + + /** + * repeated .context.DeviceId device_ids = 2; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index); - @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(); - 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(); - mutable_bitField0_ |= 0x00000001; - } - deviceDrivers_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - deviceEndpoints_ = new java.util.ArrayList(); - 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(); - 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; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + java.util.List getEndpointIdsList(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Device_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Device.class, context.ContextOuterClass.Device.Builder.class); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointId getEndpointIds(int index); - public static final int DEVICE_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.DeviceId deviceId_; - /** - * .context.DeviceId device_id = 1; - * @return Whether the deviceId field is set. - */ - @java.lang.Override - public boolean hasDeviceId() { - return deviceId_ != null; - } - /** - * .context.DeviceId device_id = 1; - * @return The deviceId. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceId() { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - /** - * .context.DeviceId device_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + int getEndpointIdsCount(); - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + java.util.List getEndpointIdsOrBuilderList(); - public static final int DEVICE_TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object deviceType_; - /** - * string device_type = 3; - * @return The deviceType. - */ - @java.lang.Override - public java.lang.String getDeviceType() { - java.lang.Object ref = deviceType_; - 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(); - deviceType_ = s; - return s; - } - } - /** - * string device_type = 3; - * @return The bytes for deviceType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDeviceTypeBytes() { - java.lang.Object ref = deviceType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deviceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder(int index); - public static final int DEVICE_CONFIG_FIELD_NUMBER = 4; - private context.ContextOuterClass.DeviceConfig deviceConfig_; - /** - * .context.DeviceConfig device_config = 4; - * @return Whether the deviceConfig field is set. - */ - @java.lang.Override - public boolean hasDeviceConfig() { - return deviceConfig_ != null; - } - /** - * .context.DeviceConfig device_config = 4; - * @return The deviceConfig. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceConfig getDeviceConfig() { - return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; - } - /** - * .context.DeviceConfig device_config = 4; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { - return getDeviceConfig(); - } + /** + * repeated .context.LinkId link_ids = 4; + */ + java.util.List getLinkIdsList(); - public static final int DEVICE_OPERATIONAL_STATUS_FIELD_NUMBER = 5; - private int deviceOperationalStatus_; - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return The enum numeric value on the wire for deviceOperationalStatus. - */ - @java.lang.Override public int getDeviceOperationalStatusValue() { - return deviceOperationalStatus_; - } - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return The deviceOperationalStatus. - */ - @java.lang.Override public context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.valueOf(deviceOperationalStatus_); - return result == null ? context.ContextOuterClass.DeviceOperationalStatusEnum.UNRECOGNIZED : result; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + context.ContextOuterClass.LinkId getLinkIds(int index); - public static final int DEVICE_DRIVERS_FIELD_NUMBER = 6; - private java.util.List 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); - return result == null ? context.ContextOuterClass.DeviceDriverEnum.UNRECOGNIZED : result; - } - }; - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return A list containing the deviceDrivers. - */ - @java.lang.Override - public java.util.List getDeviceDriversList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, context.ContextOuterClass.DeviceDriverEnum>(deviceDrivers_, deviceDrivers_converter_); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return The count of deviceDrivers. - */ - @java.lang.Override - public int getDeviceDriversCount() { - return deviceDrivers_.size(); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the element to return. - * @return The deviceDrivers at the given index. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceDriverEnum getDeviceDrivers(int index) { - return deviceDrivers_converter_.convert(deviceDrivers_.get(index)); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return A list containing the enum numeric values on the wire for deviceDrivers. - */ - @java.lang.Override - public java.util.List - getDeviceDriversValueList() { - return deviceDrivers_; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of deviceDrivers at the given index. - */ - @java.lang.Override - public int getDeviceDriversValue(int index) { - return deviceDrivers_.get(index); - } - private int deviceDriversMemoizedSerializedSize; + /** + * repeated .context.LinkId link_ids = 4; + */ + int getLinkIdsCount(); - public static final int DEVICE_ENDPOINTS_FIELD_NUMBER = 7; - private java.util.List deviceEndpoints_; - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - @java.lang.Override - public java.util.List getDeviceEndpointsList() { - return deviceEndpoints_; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - @java.lang.Override - public java.util.List - getDeviceEndpointsOrBuilderList() { - return deviceEndpoints_; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - @java.lang.Override - public int getDeviceEndpointsCount() { - return deviceEndpoints_.size(); - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - @java.lang.Override - public context.ContextOuterClass.EndPoint getDeviceEndpoints(int index) { - return deviceEndpoints_.get(index); - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointOrBuilder getDeviceEndpointsOrBuilder( - int index) { - return deviceEndpoints_.get(index); - } + /** + * repeated .context.LinkId link_ids = 4; + */ + java.util.List getLinkIdsOrBuilderList(); - public static final int COMPONENTS_FIELD_NUMBER = 8; - private java.util.List components_; - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - @java.lang.Override - public java.util.List getComponentsList() { - return components_; - } - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - @java.lang.Override - public java.util.List - getComponentsOrBuilderList() { - return components_; - } - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - @java.lang.Override - public int getComponentsCount() { - return components_.size(); - } - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - @java.lang.Override - public context.ContextOuterClass.Component getComponents(int index) { - return components_.get(index); - } - /** - *
-     * Used for inventory
-     * 
- * - * repeated .context.Component components = 8; - */ - @java.lang.Override - public context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder( - int index) { - return components_.get(index); + /** + * repeated .context.LinkId link_ids = 4; + */ + context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index); } - public static final int CONTROLLER_ID_FIELD_NUMBER = 9; - private context.ContextOuterClass.DeviceId controllerId_; - /** - *
-     * Identifier of node controlling the actual device
-     * 
- * - * .context.DeviceId controller_id = 9; - * @return Whether the controllerId field is set. - */ - @java.lang.Override - public boolean hasControllerId() { - return controllerId_ != null; - } - /** - *
-     * Identifier of node controlling the actual device
-     * 
- * - * .context.DeviceId controller_id = 9; - * @return The controllerId. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getControllerId() { - return controllerId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; - } /** - *
-     * Identifier of node controlling the actual device
-     * 
- * - * .context.DeviceId controller_id = 9; + * Protobuf type {@code context.Constraint_Exclusions} */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder() { - return getControllerId(); - } + public static final class Constraint_Exclusions extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint_Exclusions) + Constraint_ExclusionsOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use Constraint_Exclusions.newBuilder() to construct. + private Constraint_Exclusions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (deviceId_ != null) { - output.writeMessage(1, getDeviceId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (!getDeviceTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceType_); - } - if (deviceConfig_ != null) { - output.writeMessage(4, getDeviceConfig()); - } - if (deviceOperationalStatus_ != context.ContextOuterClass.DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED.getNumber()) { - output.writeEnum(5, deviceOperationalStatus_); - } - if (getDeviceDriversList().size() > 0) { - output.writeUInt32NoTag(50); - output.writeUInt32NoTag(deviceDriversMemoizedSerializedSize); - } - for (int i = 0; i < deviceDrivers_.size(); i++) { - output.writeEnumNoTag(deviceDrivers_.get(i)); - } - for (int i = 0; i < deviceEndpoints_.size(); i++) { - output.writeMessage(7, deviceEndpoints_.get(i)); - } - for (int i = 0; i < components_.size(); i++) { - output.writeMessage(8, components_.get(i)); - } - if (controllerId_ != null) { - output.writeMessage(9, getControllerId()); - } - unknownFields.writeTo(output); - } + private Constraint_Exclusions() { + deviceIds_ = java.util.Collections.emptyList(); + endpointIds_ = java.util.Collections.emptyList(); + linkIds_ = java.util.Collections.emptyList(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (deviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDeviceId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (!getDeviceTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceType_); - } - if (deviceConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getDeviceConfig()); - } - if (deviceOperationalStatus_ != context.ContextOuterClass.DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, deviceOperationalStatus_); - } - { - int dataSize = 0; - for (int i = 0; i < deviceDrivers_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(deviceDrivers_.get(i)); - } - size += dataSize; - if (!getDeviceDriversList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }deviceDriversMemoizedSerializedSize = dataSize; - } - for (int i = 0; i < deviceEndpoints_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, deviceEndpoints_.get(i)); - } - for (int i = 0; i < components_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, components_.get(i)); - } - if (controllerId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getControllerId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Constraint_Exclusions(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Device)) { - return super.equals(obj); - } - context.ContextOuterClass.Device other = (context.ContextOuterClass.Device) obj; - - if (hasDeviceId() != other.hasDeviceId()) return false; - if (hasDeviceId()) { - if (!getDeviceId() - .equals(other.getDeviceId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getDeviceType() - .equals(other.getDeviceType())) return false; - if (hasDeviceConfig() != other.hasDeviceConfig()) return false; - if (hasDeviceConfig()) { - if (!getDeviceConfig() - .equals(other.getDeviceConfig())) return false; - } - if (deviceOperationalStatus_ != other.deviceOperationalStatus_) return false; - if (!deviceDrivers_.equals(other.deviceDrivers_)) return false; - if (!getDeviceEndpointsList() - .equals(other.getDeviceEndpointsList())) return false; - if (!getComponentsList() - .equals(other.getComponentsList())) return false; - if (hasControllerId() != other.hasControllerId()) return false; - if (hasControllerId()) { - if (!getControllerId() - .equals(other.getControllerId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDeviceId()) { - hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getDeviceId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DEVICE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getDeviceType().hashCode(); - if (hasDeviceConfig()) { - hash = (37 * hash) + DEVICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDeviceConfig().hashCode(); - } - hash = (37 * hash) + DEVICE_OPERATIONAL_STATUS_FIELD_NUMBER; - hash = (53 * hash) + deviceOperationalStatus_; - if (getDeviceDriversCount() > 0) { - hash = (37 * hash) + DEVICE_DRIVERS_FIELD_NUMBER; - hash = (53 * hash) + deviceDrivers_.hashCode(); - } - if (getDeviceEndpointsCount() > 0) { - hash = (37 * hash) + DEVICE_ENDPOINTS_FIELD_NUMBER; - hash = (53 * hash) + getDeviceEndpointsList().hashCode(); - } - if (getComponentsCount() > 0) { - hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; - hash = (53 * hash) + getComponentsList().hashCode(); - } - if (hasControllerId()) { - hash = (37 * hash) + CONTROLLER_ID_FIELD_NUMBER; - hash = (53 * hash) + getControllerId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + 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(); + 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(); + 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(); + 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 context.ContextOuterClass.Device parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Device parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Device parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Device parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Device parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Device parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Device parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Device parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Device parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Device parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Device parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Device parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Device prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_Exclusions.class, context.ContextOuterClass.Constraint_Exclusions.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Device} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Device) - context.ContextOuterClass.DeviceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Device_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Device_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Device.class, context.ContextOuterClass.Device.Builder.class); - } - - // 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; - deviceIdBuilder_ = null; - } - name_ = ""; - - deviceType_ = ""; - - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - } else { - deviceConfig_ = null; - deviceConfigBuilder_ = null; - } - deviceOperationalStatus_ = 0; - - deviceDrivers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - if (deviceEndpointsBuilder_ == null) { - deviceEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - deviceEndpointsBuilder_.clear(); - } - if (componentsBuilder_ == null) { - components_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - componentsBuilder_.clear(); - } - if (controllerIdBuilder_ == null) { - controllerId_ = null; - } else { - controllerId_ = null; - controllerIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Device_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Device getDefaultInstanceForType() { - return context.ContextOuterClass.Device.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Device build() { - context.ContextOuterClass.Device result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - result.deviceType_ = deviceType_; - if (deviceConfigBuilder_ == null) { - result.deviceConfig_ = deviceConfig_; - } else { - result.deviceConfig_ = deviceConfigBuilder_.build(); - } - result.deviceOperationalStatus_ = deviceOperationalStatus_; - if (((bitField0_ & 0x00000001) != 0)) { - deviceDrivers_ = java.util.Collections.unmodifiableList(deviceDrivers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deviceDrivers_ = deviceDrivers_; - if (deviceEndpointsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - deviceEndpoints_ = java.util.Collections.unmodifiableList(deviceEndpoints_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.deviceEndpoints_ = deviceEndpoints_; - } else { - result.deviceEndpoints_ = deviceEndpointsBuilder_.build(); - } - if (componentsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - components_ = java.util.Collections.unmodifiableList(components_); - bitField0_ = (bitField0_ & ~0x00000004); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Device) { - return mergeFrom((context.ContextOuterClass.Device)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Device other) { - if (other == context.ContextOuterClass.Device.getDefaultInstance()) return this; - if (other.hasDeviceId()) { - mergeDeviceId(other.getDeviceId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDeviceType().isEmpty()) { - deviceType_ = other.deviceType_; - onChanged(); - } - if (other.hasDeviceConfig()) { - mergeDeviceConfig(other.getDeviceConfig()); - } - if (other.deviceOperationalStatus_ != 0) { - setDeviceOperationalStatusValue(other.getDeviceOperationalStatusValue()); - } - if (!other.deviceDrivers_.isEmpty()) { - if (deviceDrivers_.isEmpty()) { - deviceDrivers_ = other.deviceDrivers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeviceDriversIsMutable(); - deviceDrivers_.addAll(other.deviceDrivers_); - } - onChanged(); - } - if (deviceEndpointsBuilder_ == null) { - if (!other.deviceEndpoints_.isEmpty()) { - if (deviceEndpoints_.isEmpty()) { - deviceEndpoints_ = other.deviceEndpoints_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.addAll(other.deviceEndpoints_); - } - onChanged(); - } - } else { - if (!other.deviceEndpoints_.isEmpty()) { - if (deviceEndpointsBuilder_.isEmpty()) { - deviceEndpointsBuilder_.dispose(); - deviceEndpointsBuilder_ = null; - deviceEndpoints_ = other.deviceEndpoints_; - bitField0_ = (bitField0_ & ~0x00000002); - deviceEndpointsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDeviceEndpointsFieldBuilder() : null; - } else { - deviceEndpointsBuilder_.addAllMessages(other.deviceEndpoints_); + public static final int IS_PERMANENT_FIELD_NUMBER = 1; + + private boolean isPermanent_; + + /** + * bool is_permanent = 1; + * @return The isPermanent. + */ + @java.lang.Override + public boolean getIsPermanent() { + return isPermanent_; + } + + public static final int DEVICE_IDS_FIELD_NUMBER = 2; + + private java.util.List deviceIds_; + + /** + * repeated .context.DeviceId device_ids = 2; + */ + @java.lang.Override + public java.util.List getDeviceIdsList() { + return deviceIds_; + } + + /** + * repeated .context.DeviceId device_ids = 2; + */ + @java.lang.Override + public java.util.List getDeviceIdsOrBuilderList() { + return deviceIds_; + } + + /** + * repeated .context.DeviceId device_ids = 2; + */ + @java.lang.Override + public int getDeviceIdsCount() { + return deviceIds_.size(); + } + + /** + * repeated .context.DeviceId device_ids = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceIds(int index) { + return deviceIds_.get(index); + } + + /** + * repeated .context.DeviceId device_ids = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index) { + return deviceIds_.get(index); + } + + public static final int ENDPOINT_IDS_FIELD_NUMBER = 3; + + private java.util.List endpointIds_; + + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getEndpointIdsList() { + return endpointIds_; + } + + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + @java.lang.Override + public java.util.List getEndpointIdsOrBuilderList() { + return endpointIds_; + } + + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + @java.lang.Override + public int getEndpointIdsCount() { + return endpointIds_.size(); + } + + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointIds(int index) { + return endpointIds_.get(index); + } + + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder(int index) { + return endpointIds_.get(index); + } + + public static final int LINK_IDS_FIELD_NUMBER = 4; + + private java.util.List linkIds_; + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public java.util.List getLinkIdsList() { + return linkIds_; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public java.util.List getLinkIdsOrBuilderList() { + return linkIds_; + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public int getLinkIdsCount() { + return linkIds_.size(); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkIds(int index) { + return linkIds_.get(index); + } + + /** + * repeated .context.LinkId link_ids = 4; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index) { + return linkIds_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (isPermanent_ != false) { + output.writeBool(1, isPermanent_); + } + for (int i = 0; i < deviceIds_.size(); i++) { + output.writeMessage(2, deviceIds_.get(i)); } - } + for (int i = 0; i < endpointIds_.size(); i++) { + output.writeMessage(3, endpointIds_.get(i)); + } + for (int i = 0; i < linkIds_.size(); i++) { + output.writeMessage(4, linkIds_.get(i)); + } + unknownFields.writeTo(output); } - if (componentsBuilder_ == null) { - if (!other.components_.isEmpty()) { - if (components_.isEmpty()) { - components_ = other.components_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureComponentsIsMutable(); - components_.addAll(other.components_); - } - onChanged(); - } - } else { - if (!other.components_.isEmpty()) { - if (componentsBuilder_.isEmpty()) { - componentsBuilder_.dispose(); - componentsBuilder_ = null; - components_ = other.components_; - bitField0_ = (bitField0_ & ~0x00000004); - componentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getComponentsFieldBuilder() : null; - } else { - componentsBuilder_.addAllMessages(other.components_); - } - } - } - if (other.hasControllerId()) { - mergeControllerId(other.getControllerId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Device) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private context.ContextOuterClass.DeviceId deviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdBuilder_; - /** - * .context.DeviceId device_id = 1; - * @return Whether the deviceId field is set. - */ - public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; - } - /** - * .context.DeviceId device_id = 1; - * @return The deviceId. - */ - public context.ContextOuterClass.DeviceId getDeviceId() { - if (deviceIdBuilder_ == null) { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } else { - return deviceIdBuilder_.getMessage(); - } - } - /** - * .context.DeviceId device_id = 1; - */ - public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceId_ = value; - onChanged(); - } else { - deviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 1; - */ - public Builder setDeviceId( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdBuilder_ == null) { - deviceId_ = builderForValue.build(); - onChanged(); - } else { - deviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceId device_id = 1; - */ - public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = - context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); - } else { - deviceId_ = value; - } - onChanged(); - } else { - deviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 1; - */ - public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceId device_id = 1; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { - - onChanged(); - return getDeviceIdFieldBuilder().getBuilder(); - } - /** - * .context.DeviceId device_id = 1; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - if (deviceIdBuilder_ != null) { - return deviceIdBuilder_.getMessageOrBuilder(); - } else { - return deviceId_ == null ? - context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - } - /** - * .context.DeviceId device_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> - getDeviceIdFieldBuilder() { - if (deviceIdBuilder_ == null) { - deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( - getDeviceId(), - getParentForChildren(), - isClean()); - deviceId_ = null; - } - return deviceIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object deviceType_ = ""; - /** - * string device_type = 3; - * @return The deviceType. - */ - public java.lang.String getDeviceType() { - java.lang.Object ref = deviceType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - deviceType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string device_type = 3; - * @return The bytes for deviceType. - */ - public com.google.protobuf.ByteString - getDeviceTypeBytes() { - java.lang.Object ref = deviceType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deviceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string device_type = 3; - * @param value The deviceType to set. - * @return This builder for chaining. - */ - public Builder setDeviceType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - deviceType_ = value; - onChanged(); - return this; - } - /** - * string device_type = 3; - * @return This builder for chaining. - */ - public Builder clearDeviceType() { - - deviceType_ = getDefaultInstance().getDeviceType(); - onChanged(); - return this; - } - /** - * string device_type = 3; - * @param value The bytes for deviceType to set. - * @return This builder for chaining. - */ - public Builder setDeviceTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - deviceType_ = value; - onChanged(); - return this; - } - - private context.ContextOuterClass.DeviceConfig deviceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder> deviceConfigBuilder_; - /** - * .context.DeviceConfig device_config = 4; - * @return Whether the deviceConfig field is set. - */ - public boolean hasDeviceConfig() { - return deviceConfigBuilder_ != null || deviceConfig_ != null; - } - /** - * .context.DeviceConfig device_config = 4; - * @return The deviceConfig. - */ - public context.ContextOuterClass.DeviceConfig getDeviceConfig() { - if (deviceConfigBuilder_ == null) { - return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; - } else { - return deviceConfigBuilder_.getMessage(); - } - } - /** - * .context.DeviceConfig device_config = 4; - */ - public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig value) { - if (deviceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceConfig_ = value; - onChanged(); - } else { - deviceConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceConfig device_config = 4; - */ - public Builder setDeviceConfig( - context.ContextOuterClass.DeviceConfig.Builder builderForValue) { - if (deviceConfigBuilder_ == null) { - deviceConfig_ = builderForValue.build(); - onChanged(); - } else { - deviceConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceConfig device_config = 4; - */ - public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) { - if (deviceConfigBuilder_ == null) { - if (deviceConfig_ != null) { - deviceConfig_ = - context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial(); - } else { - deviceConfig_ = value; - } - onChanged(); - } else { - deviceConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceConfig device_config = 4; - */ - public Builder clearDeviceConfig() { - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - onChanged(); - } else { - deviceConfig_ = null; - deviceConfigBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceConfig device_config = 4; - */ - public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() { - - onChanged(); - return getDeviceConfigFieldBuilder().getBuilder(); - } - /** - * .context.DeviceConfig device_config = 4; - */ - public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { - if (deviceConfigBuilder_ != null) { - return deviceConfigBuilder_.getMessageOrBuilder(); - } else { - return deviceConfig_ == null ? - context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; - } - } - /** - * .context.DeviceConfig device_config = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder> - getDeviceConfigFieldBuilder() { - if (deviceConfigBuilder_ == null) { - deviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder>( - getDeviceConfig(), - getParentForChildren(), - isClean()); - deviceConfig_ = null; - } - return deviceConfigBuilder_; - } - - private int deviceOperationalStatus_ = 0; - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return The enum numeric value on the wire for deviceOperationalStatus. - */ - @java.lang.Override public int getDeviceOperationalStatusValue() { - return deviceOperationalStatus_; - } - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @param value The enum numeric value on the wire for deviceOperationalStatus to set. - * @return This builder for chaining. - */ - public Builder setDeviceOperationalStatusValue(int value) { - - deviceOperationalStatus_ = value; - onChanged(); - return this; - } - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return The deviceOperationalStatus. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.valueOf(deviceOperationalStatus_); - return result == null ? context.ContextOuterClass.DeviceOperationalStatusEnum.UNRECOGNIZED : result; - } - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @param value The deviceOperationalStatus to set. - * @return This builder for chaining. - */ - public Builder setDeviceOperationalStatus(context.ContextOuterClass.DeviceOperationalStatusEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - deviceOperationalStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.DeviceOperationalStatusEnum device_operational_status = 5; - * @return This builder for chaining. - */ - public Builder clearDeviceOperationalStatus() { - - deviceOperationalStatus_ = 0; - onChanged(); - return this; - } - - private java.util.List deviceDrivers_ = - java.util.Collections.emptyList(); - private void ensureDeviceDriversIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deviceDrivers_ = new java.util.ArrayList(deviceDrivers_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return A list containing the deviceDrivers. - */ - public java.util.List getDeviceDriversList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, context.ContextOuterClass.DeviceDriverEnum>(deviceDrivers_, deviceDrivers_converter_); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return The count of deviceDrivers. - */ - public int getDeviceDriversCount() { - return deviceDrivers_.size(); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the element to return. - * @return The deviceDrivers at the given index. - */ - public context.ContextOuterClass.DeviceDriverEnum getDeviceDrivers(int index) { - return deviceDrivers_converter_.convert(deviceDrivers_.get(index)); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index to set the value at. - * @param value The deviceDrivers to set. - * @return This builder for chaining. - */ - public Builder setDeviceDrivers( - int index, context.ContextOuterClass.DeviceDriverEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceDriversIsMutable(); - deviceDrivers_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param value The deviceDrivers to add. - * @return This builder for chaining. - */ - public Builder addDeviceDrivers(context.ContextOuterClass.DeviceDriverEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceDriversIsMutable(); - deviceDrivers_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param values The deviceDrivers to add. - * @return This builder for chaining. - */ - public Builder addAllDeviceDrivers( - java.lang.Iterable values) { - ensureDeviceDriversIsMutable(); - for (context.ContextOuterClass.DeviceDriverEnum value : values) { - deviceDrivers_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return This builder for chaining. - */ - public Builder clearDeviceDrivers() { - deviceDrivers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @return A list containing the enum numeric values on the wire for deviceDrivers. - */ - public java.util.List - getDeviceDriversValueList() { - return java.util.Collections.unmodifiableList(deviceDrivers_); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of deviceDrivers at the given index. - */ - public int getDeviceDriversValue(int index) { - return deviceDrivers_.get(index); - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of deviceDrivers at the given index. - * @return This builder for chaining. - */ - public Builder setDeviceDriversValue( - int index, int value) { - ensureDeviceDriversIsMutable(); - deviceDrivers_.set(index, value); - onChanged(); - return this; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param value The enum numeric value on the wire for deviceDrivers to add. - * @return This builder for chaining. - */ - public Builder addDeviceDriversValue(int value) { - ensureDeviceDriversIsMutable(); - deviceDrivers_.add(value); - onChanged(); - return this; - } - /** - * repeated .context.DeviceDriverEnum device_drivers = 6; - * @param values The enum numeric values on the wire for deviceDrivers to add. - * @return This builder for chaining. - */ - public Builder addAllDeviceDriversValue( - java.lang.Iterable values) { - ensureDeviceDriversIsMutable(); - for (int value : values) { - deviceDrivers_.add(value); - } - onChanged(); - return this; - } - - private java.util.List deviceEndpoints_ = - java.util.Collections.emptyList(); - private void ensureDeviceEndpointsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - deviceEndpoints_ = new java.util.ArrayList(deviceEndpoints_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPoint, context.ContextOuterClass.EndPoint.Builder, context.ContextOuterClass.EndPointOrBuilder> deviceEndpointsBuilder_; - - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public java.util.List getDeviceEndpointsList() { - if (deviceEndpointsBuilder_ == null) { - return java.util.Collections.unmodifiableList(deviceEndpoints_); - } else { - return deviceEndpointsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public int getDeviceEndpointsCount() { - if (deviceEndpointsBuilder_ == null) { - return deviceEndpoints_.size(); - } else { - return deviceEndpointsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public context.ContextOuterClass.EndPoint getDeviceEndpoints(int index) { - if (deviceEndpointsBuilder_ == null) { - return deviceEndpoints_.get(index); - } else { - return deviceEndpointsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder setDeviceEndpoints( - int index, context.ContextOuterClass.EndPoint value) { - if (deviceEndpointsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.set(index, value); - onChanged(); - } else { - deviceEndpointsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder setDeviceEndpoints( - int index, context.ContextOuterClass.EndPoint.Builder builderForValue) { - if (deviceEndpointsBuilder_ == null) { - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.set(index, builderForValue.build()); - onChanged(); - } else { - deviceEndpointsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder addDeviceEndpoints(context.ContextOuterClass.EndPoint value) { - if (deviceEndpointsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.add(value); - onChanged(); - } else { - deviceEndpointsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder addDeviceEndpoints( - int index, context.ContextOuterClass.EndPoint value) { - if (deviceEndpointsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.add(index, value); - onChanged(); - } else { - deviceEndpointsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder addDeviceEndpoints( - context.ContextOuterClass.EndPoint.Builder builderForValue) { - if (deviceEndpointsBuilder_ == null) { - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.add(builderForValue.build()); - onChanged(); - } else { - deviceEndpointsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder addDeviceEndpoints( - int index, context.ContextOuterClass.EndPoint.Builder builderForValue) { - if (deviceEndpointsBuilder_ == null) { - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.add(index, builderForValue.build()); - onChanged(); - } else { - deviceEndpointsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder addAllDeviceEndpoints( - java.lang.Iterable values) { - if (deviceEndpointsBuilder_ == null) { - ensureDeviceEndpointsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deviceEndpoints_); - onChanged(); - } else { - deviceEndpointsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder clearDeviceEndpoints() { - if (deviceEndpointsBuilder_ == null) { - deviceEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - deviceEndpointsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public Builder removeDeviceEndpoints(int index) { - if (deviceEndpointsBuilder_ == null) { - ensureDeviceEndpointsIsMutable(); - deviceEndpoints_.remove(index); - onChanged(); - } else { - deviceEndpointsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public context.ContextOuterClass.EndPoint.Builder getDeviceEndpointsBuilder( - int index) { - return getDeviceEndpointsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public context.ContextOuterClass.EndPointOrBuilder getDeviceEndpointsOrBuilder( - int index) { - if (deviceEndpointsBuilder_ == null) { - return deviceEndpoints_.get(index); } else { - return deviceEndpointsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public java.util.List - getDeviceEndpointsOrBuilderList() { - if (deviceEndpointsBuilder_ != null) { - return deviceEndpointsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deviceEndpoints_); - } - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public context.ContextOuterClass.EndPoint.Builder addDeviceEndpointsBuilder() { - return getDeviceEndpointsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPoint.getDefaultInstance()); - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public context.ContextOuterClass.EndPoint.Builder addDeviceEndpointsBuilder( - int index) { - return getDeviceEndpointsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPoint.getDefaultInstance()); - } - /** - * repeated .context.EndPoint device_endpoints = 7; - */ - public java.util.List - getDeviceEndpointsBuilderList() { - return getDeviceEndpointsFieldBuilder().getBuilderList(); - } - 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()); - deviceEndpoints_ = null; - } - return deviceEndpointsBuilder_; - } - - private java.util.List components_ = - java.util.Collections.emptyList(); - private void ensureComponentsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - components_ = new java.util.ArrayList(components_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Component, context.ContextOuterClass.Component.Builder, context.ContextOuterClass.ComponentOrBuilder> componentsBuilder_; - - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public java.util.List getComponentsList() { - if (componentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(components_); - } else { - return componentsBuilder_.getMessageList(); - } - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public int getComponentsCount() { - if (componentsBuilder_ == null) { - return components_.size(); - } else { - return componentsBuilder_.getCount(); - } - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public context.ContextOuterClass.Component getComponents(int index) { - if (componentsBuilder_ == null) { - return components_.get(index); - } else { - return componentsBuilder_.getMessage(index); - } - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder setComponents( - int index, context.ContextOuterClass.Component value) { - if (componentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureComponentsIsMutable(); - components_.set(index, value); - onChanged(); - } else { - componentsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder setComponents( - int index, context.ContextOuterClass.Component.Builder builderForValue) { - if (componentsBuilder_ == null) { - ensureComponentsIsMutable(); - components_.set(index, builderForValue.build()); - onChanged(); - } else { - componentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder addComponents(context.ContextOuterClass.Component value) { - if (componentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureComponentsIsMutable(); - components_.add(value); - onChanged(); - } else { - componentsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder addComponents( - int index, context.ContextOuterClass.Component value) { - if (componentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureComponentsIsMutable(); - components_.add(index, value); - onChanged(); - } else { - componentsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder addComponents( - context.ContextOuterClass.Component.Builder builderForValue) { - if (componentsBuilder_ == null) { - ensureComponentsIsMutable(); - components_.add(builderForValue.build()); - onChanged(); - } else { - componentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder addComponents( - int index, context.ContextOuterClass.Component.Builder builderForValue) { - if (componentsBuilder_ == null) { - ensureComponentsIsMutable(); - components_.add(index, builderForValue.build()); - onChanged(); - } else { - componentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder addAllComponents( - java.lang.Iterable values) { - if (componentsBuilder_ == null) { - ensureComponentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, components_); - onChanged(); - } else { - componentsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder clearComponents() { - if (componentsBuilder_ == null) { - components_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - componentsBuilder_.clear(); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public Builder removeComponents(int index) { - if (componentsBuilder_ == null) { - ensureComponentsIsMutable(); - components_.remove(index); - onChanged(); - } else { - componentsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public context.ContextOuterClass.Component.Builder getComponentsBuilder( - int index) { - return getComponentsFieldBuilder().getBuilder(index); - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder( - int index) { - if (componentsBuilder_ == null) { - return components_.get(index); } else { - return componentsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public java.util.List - getComponentsOrBuilderList() { - if (componentsBuilder_ != null) { - return componentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(components_); - } - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public context.ContextOuterClass.Component.Builder addComponentsBuilder() { - return getComponentsFieldBuilder().addBuilder( - context.ContextOuterClass.Component.getDefaultInstance()); - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public context.ContextOuterClass.Component.Builder addComponentsBuilder( - int index) { - return getComponentsFieldBuilder().addBuilder( - index, context.ContextOuterClass.Component.getDefaultInstance()); - } - /** - *
-       * Used for inventory
-       * 
- * - * repeated .context.Component components = 8; - */ - public java.util.List - getComponentsBuilderList() { - return getComponentsFieldBuilder().getBuilderList(); - } - 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()); - components_ = null; - } - return componentsBuilder_; - } - - private context.ContextOuterClass.DeviceId controllerId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> controllerIdBuilder_; - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - * @return Whether the controllerId field is set. - */ - public boolean hasControllerId() { - return controllerIdBuilder_ != null || controllerId_ != null; - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - * @return The controllerId. - */ - public context.ContextOuterClass.DeviceId getControllerId() { - if (controllerIdBuilder_ == null) { - return controllerId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; - } else { - return controllerIdBuilder_.getMessage(); - } - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - public Builder setControllerId(context.ContextOuterClass.DeviceId value) { - if (controllerIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - controllerId_ = value; - onChanged(); - } else { - controllerIdBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - public Builder setControllerId( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (controllerIdBuilder_ == null) { - controllerId_ = builderForValue.build(); - onChanged(); - } else { - controllerIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - public Builder mergeControllerId(context.ContextOuterClass.DeviceId value) { - if (controllerIdBuilder_ == null) { - if (controllerId_ != null) { - controllerId_ = - context.ContextOuterClass.DeviceId.newBuilder(controllerId_).mergeFrom(value).buildPartial(); - } else { - controllerId_ = value; - } - onChanged(); - } else { - controllerIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - public Builder clearControllerId() { - if (controllerIdBuilder_ == null) { - controllerId_ = null; - onChanged(); - } else { - controllerId_ = null; - controllerIdBuilder_ = null; - } - - return this; - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - public context.ContextOuterClass.DeviceId.Builder getControllerIdBuilder() { - - onChanged(); - return getControllerIdFieldBuilder().getBuilder(); - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder() { - if (controllerIdBuilder_ != null) { - return controllerIdBuilder_.getMessageOrBuilder(); - } else { - return controllerId_ == null ? - context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; - } - } - /** - *
-       * Identifier of node controlling the actual device
-       * 
- * - * .context.DeviceId controller_id = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> - getControllerIdFieldBuilder() { - if (controllerIdBuilder_ == null) { - controllerIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( - getControllerId(), - getParentForChildren(), - isClean()); - controllerId_ = null; - } - return controllerIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Device) - } - // @@protoc_insertion_point(class_scope:context.Device) - private static final context.ContextOuterClass.Device DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Device(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (isPermanent_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, isPermanent_); + } + for (int i = 0; i < deviceIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, deviceIds_.get(i)); + } + for (int i = 0; i < endpointIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, endpointIds_.get(i)); + } + for (int i = 0; i < linkIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkIds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static context.ContextOuterClass.Device getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint_Exclusions)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint_Exclusions other = (context.ContextOuterClass.Constraint_Exclusions) obj; + if (getIsPermanent() != other.getIsPermanent()) + return false; + if (!getDeviceIdsList().equals(other.getDeviceIdsList())) + return false; + if (!getEndpointIdsList().equals(other.getEndpointIdsList())) + return false; + if (!getLinkIdsList().equals(other.getLinkIdsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IS_PERMANENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsPermanent()); + if (getDeviceIdsCount() > 0) { + hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDeviceIdsList().hashCode(); + } + if (getEndpointIdsCount() > 0) { + hash = (37 * hash) + ENDPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getEndpointIdsList().hashCode(); + } + if (getLinkIdsCount() > 0) { + hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getLinkIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public context.ContextOuterClass.Device getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - } + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public interface ComponentOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Component) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * .context.Uuid component_uuid = 1; - * @return Whether the componentUuid field is set. - */ - boolean hasComponentUuid(); - /** - * .context.Uuid component_uuid = 1; - * @return The componentUuid. - */ - context.ContextOuterClass.Uuid getComponentUuid(); - /** - * .context.Uuid component_uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder(); + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - /** - * string type = 3; - * @return The type. - */ - java.lang.String getType(); - /** - * string type = 3; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Exclusions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Exclusions parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.Constraint_Exclusions parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ - int getAttributesCount(); - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ - boolean containsAttributes( - java.lang.String key); - /** - * Use {@link #getAttributesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getAttributes(); - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ - java.util.Map - getAttributesMap(); - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - java.lang.String getAttributesOrDefault( - java.lang.String key, - java.lang.String defaultValue); - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - java.lang.String getAttributesOrThrow( - java.lang.String key); + public static Builder newBuilder(context.ContextOuterClass.Constraint_Exclusions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * string parent = 5; - * @return The parent. - */ - java.lang.String getParent(); - /** - * string parent = 5; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - } - /** - *
-   *Defined previously to this section - Tested OK
-   * 
- * - * Protobuf type {@code context.Component} - */ - public static final class Component extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Component) - ComponentOrBuilder { - private static final long serialVersionUID = 0L; - // Use Component.newBuilder() to construct. - private Component(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Component() { - name_ = ""; - type_ = ""; - parent_ = ""; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Component(); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @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 - 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; - } + /** + * Protobuf type {@code context.Constraint_Exclusions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint_Exclusions) + context.ContextOuterClass.Constraint_ExclusionsOrBuilder { - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 4: - return internalGetAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Component_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Component.class, context.ContextOuterClass.Component.Builder.class); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_descriptor; + } - public static final int COMPONENT_UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid componentUuid_; - /** - * .context.Uuid component_uuid = 1; - * @return Whether the componentUuid field is set. - */ - @java.lang.Override - public boolean hasComponentUuid() { - return componentUuid_ != null; - } - /** - * .context.Uuid component_uuid = 1; - * @return The componentUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getComponentUuid() { - return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; - } - /** - * .context.Uuid component_uuid = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder() { - return getComponentUuid(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint_Exclusions.class, context.ContextOuterClass.Constraint_Exclusions.Builder.class); + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + // Construct using context.ContextOuterClass.Constraint_Exclusions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - public static final int TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object type_; - /** - * string type = 3; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - 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(); - type_ = s; - return s; - } - } - /** - * string type = 3; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public static final int ATTRIBUTES_FIELD_NUMBER = 4; - private static final class AttributesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - context.ContextOuterClass.internal_static_context_Component_AttributesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> attributes_; - private com.google.protobuf.MapField - internalGetAttributes() { - if (attributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - return attributes_; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeviceIdsFieldBuilder(); + getEndpointIdsFieldBuilder(); + getLinkIdsFieldBuilder(); + } + } - public int getAttributesCount() { - return internalGetAttributes().getMap().size(); - } - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ + @java.lang.Override + public Builder clear() { + super.clear(); + isPermanent_ = false; + if (deviceIdsBuilder_ == null) { + deviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deviceIdsBuilder_.clear(); + } + if (endpointIdsBuilder_ == null) { + endpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + endpointIdsBuilder_.clear(); + } + if (linkIdsBuilder_ == null) { + linkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + linkIdsBuilder_.clear(); + } + return this; + } - @java.lang.Override - public boolean containsAttributes( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - return internalGetAttributes().getMap().containsKey(key); - } - /** - * Use {@link #getAttributesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAttributes() { - return getAttributesMap(); - } - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ - @java.lang.Override + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_descriptor; + } - public java.util.Map getAttributesMap() { - return internalGetAttributes().getMap(); - } - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ - @java.lang.Override - - public java.lang.String getAttributesOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetAttributes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * dict[attr.name => json.dumps(attr.value)]
-     * 
- * - * map<string, string> attributes = 4; - */ - @java.lang.Override - - public java.lang.String getAttributesOrThrow( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetAttributes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } + @java.lang.Override + public context.ContextOuterClass.Constraint_Exclusions getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } - public static final int PARENT_FIELD_NUMBER = 5; - private volatile java.lang.Object parent_; - /** - * string parent = 5; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - 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(); - parent_ = s; - return s; - } - } - /** - * string parent = 5; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public context.ContextOuterClass.Constraint_Exclusions build() { + context.ContextOuterClass.Constraint_Exclusions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @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_; + if (deviceIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deviceIds_ = deviceIds_; + } else { + result.deviceIds_ = deviceIdsBuilder_.build(); + } + if (endpointIdsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.endpointIds_ = endpointIds_; + } else { + result.endpointIds_ = endpointIdsBuilder_.build(); + } + if (linkIdsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + linkIds_ = java.util.Collections.unmodifiableList(linkIds_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.linkIds_ = linkIds_; + } else { + result.linkIds_ = linkIdsBuilder_.build(); + } + onBuilt(); + return result; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (componentUuid_ != null) { - output.writeMessage(1, getComponentUuid()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (!getTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetAttributes(), - AttributesDefaultEntryHolder.defaultEntry, - 4); - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); - } - unknownFields.writeTo(output); - } + @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 int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (componentUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getComponentUuid()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (!getTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); - } - for (java.util.Map.Entry entry - : internalGetAttributes().getMap().entrySet()) { - com.google.protobuf.MapEntry - attributes__ = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, attributes__); - } - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Component)) { - return super.equals(obj); - } - context.ContextOuterClass.Component other = (context.ContextOuterClass.Component) obj; - - if (hasComponentUuid() != other.hasComponentUuid()) return false; - if (hasComponentUuid()) { - if (!getComponentUuid() - .equals(other.getComponentUuid())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getType() - .equals(other.getType())) return false; - if (!internalGetAttributes().equals( - other.internalGetAttributes())) return false; - if (!getParent() - .equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasComponentUuid()) { - hash = (37 * hash) + COMPONENT_UUID_FIELD_NUMBER; - hash = (53 * hash) + getComponentUuid().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - if (!internalGetAttributes().getMap().isEmpty()) { - hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + internalGetAttributes().hashCode(); - } - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - public static context.ContextOuterClass.Component parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Component parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Component parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Component parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Component parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Component parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Component parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Component parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Component parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Component parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Component parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Component parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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 newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Component prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint_Exclusions) { + return mergeFrom((context.ContextOuterClass.Constraint_Exclusions) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     *Defined previously to this section - Tested OK
-     * 
- * - * Protobuf type {@code context.Component} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Component) - context.ContextOuterClass.ComponentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Component_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 4: - return internalGetAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 4: - return internalGetMutableAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Component_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Component.class, context.ContextOuterClass.Component.Builder.class); - } - - // 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; - componentUuidBuilder_ = null; - } - name_ = ""; - - type_ = ""; - - internalGetMutableAttributes().clear(); - parent_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Component_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Component getDefaultInstanceForType() { - return context.ContextOuterClass.Component.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Component build() { - context.ContextOuterClass.Component result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Component) { - return mergeFrom((context.ContextOuterClass.Component)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Component other) { - if (other == context.ContextOuterClass.Component.getDefaultInstance()) return this; - if (other.hasComponentUuid()) { - mergeComponentUuid(other.getComponentUuid()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getType().isEmpty()) { - type_ = other.type_; - onChanged(); - } - internalGetMutableAttributes().mergeFrom( - other.internalGetAttributes()); - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Component) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private context.ContextOuterClass.Uuid componentUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> componentUuidBuilder_; - /** - * .context.Uuid component_uuid = 1; - * @return Whether the componentUuid field is set. - */ - public boolean hasComponentUuid() { - return componentUuidBuilder_ != null || componentUuid_ != null; - } - /** - * .context.Uuid component_uuid = 1; - * @return The componentUuid. - */ - public context.ContextOuterClass.Uuid getComponentUuid() { - if (componentUuidBuilder_ == null) { - return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; - } else { - return componentUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid component_uuid = 1; - */ - public Builder setComponentUuid(context.ContextOuterClass.Uuid value) { - if (componentUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - componentUuid_ = value; - onChanged(); - } else { - componentUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid component_uuid = 1; - */ - public Builder setComponentUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (componentUuidBuilder_ == null) { - componentUuid_ = builderForValue.build(); - onChanged(); - } else { - componentUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid component_uuid = 1; - */ - public Builder mergeComponentUuid(context.ContextOuterClass.Uuid value) { - if (componentUuidBuilder_ == null) { - if (componentUuid_ != null) { - componentUuid_ = - context.ContextOuterClass.Uuid.newBuilder(componentUuid_).mergeFrom(value).buildPartial(); - } else { - componentUuid_ = value; - } - onChanged(); - } else { - componentUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid component_uuid = 1; - */ - public Builder clearComponentUuid() { - if (componentUuidBuilder_ == null) { - componentUuid_ = null; - onChanged(); - } else { - componentUuid_ = null; - componentUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid component_uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getComponentUuidBuilder() { - - onChanged(); - return getComponentUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid component_uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder() { - if (componentUuidBuilder_ != null) { - return componentUuidBuilder_.getMessageOrBuilder(); - } else { - return componentUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; - } - } - /** - * .context.Uuid component_uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getComponentUuidFieldBuilder() { - if (componentUuidBuilder_ == null) { - componentUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getComponentUuid(), - getParentForChildren(), - isClean()); - componentUuid_ = null; - } - return componentUuidBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object type_ = ""; - /** - * string type = 3; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string type = 3; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string type = 3; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value; - onChanged(); - return this; - } - /** - * string type = 3; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - * string type = 3; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - type_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> attributes_; - private com.google.protobuf.MapField - internalGetAttributes() { - if (attributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - return attributes_; - } - private com.google.protobuf.MapField - internalGetMutableAttributes() { - onChanged();; - if (attributes_ == null) { - attributes_ = com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - if (!attributes_.isMutable()) { - attributes_ = attributes_.copy(); - } - return attributes_; - } - - public int getAttributesCount() { - return internalGetAttributes().getMap().size(); - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - - @java.lang.Override - public boolean containsAttributes( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - return internalGetAttributes().getMap().containsKey(key); - } - /** - * Use {@link #getAttributesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getAttributes() { - return getAttributesMap(); - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - @java.lang.Override - - public java.util.Map getAttributesMap() { - return internalGetAttributes().getMap(); - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - @java.lang.Override - - public java.lang.String getAttributesOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetAttributes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - @java.lang.Override - - public java.lang.String getAttributesOrThrow( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetAttributes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearAttributes() { - internalGetMutableAttributes().getMutableMap() - .clear(); - return this; - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - - public Builder removeAttributes( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - internalGetMutableAttributes().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableAttributes() { - return internalGetMutableAttributes().getMutableMap(); - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - public Builder putAttributes( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new java.lang.NullPointerException(); } - if (value == null) { throw new java.lang.NullPointerException(); } - internalGetMutableAttributes().getMutableMap() - .put(key, value); - return this; - } - /** - *
-       * dict[attr.name => json.dumps(attr.value)]
-       * 
- * - * map<string, string> attributes = 4; - */ - - public Builder putAllAttributes( - java.util.Map values) { - internalGetMutableAttributes().getMutableMap() - .putAll(values); - return this; - } - - private java.lang.Object parent_ = ""; - /** - * string parent = 5; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string parent = 5; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string parent = 5; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * string parent = 5; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * string parent = 5; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Component) - } + public Builder mergeFrom(context.ContextOuterClass.Constraint_Exclusions other) { + if (other == context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance()) + return this; + if (other.getIsPermanent() != false) { + setIsPermanent(other.getIsPermanent()); + } + if (deviceIdsBuilder_ == null) { + if (!other.deviceIds_.isEmpty()) { + if (deviceIds_.isEmpty()) { + deviceIds_ = other.deviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeviceIdsIsMutable(); + deviceIds_.addAll(other.deviceIds_); + } + onChanged(); + } + } else { + if (!other.deviceIds_.isEmpty()) { + if (deviceIdsBuilder_.isEmpty()) { + deviceIdsBuilder_.dispose(); + deviceIdsBuilder_ = null; + deviceIds_ = other.deviceIds_; + bitField0_ = (bitField0_ & ~0x00000001); + deviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceIdsFieldBuilder() : null; + } else { + deviceIdsBuilder_.addAllMessages(other.deviceIds_); + } + } + } + if (endpointIdsBuilder_ == null) { + if (!other.endpointIds_.isEmpty()) { + if (endpointIds_.isEmpty()) { + endpointIds_ = other.endpointIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEndpointIdsIsMutable(); + endpointIds_.addAll(other.endpointIds_); + } + onChanged(); + } + } else { + if (!other.endpointIds_.isEmpty()) { + if (endpointIdsBuilder_.isEmpty()) { + endpointIdsBuilder_.dispose(); + endpointIdsBuilder_ = null; + endpointIds_ = other.endpointIds_; + bitField0_ = (bitField0_ & ~0x00000002); + endpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndpointIdsFieldBuilder() : null; + } else { + endpointIdsBuilder_.addAllMessages(other.endpointIds_); + } + } + } + if (linkIdsBuilder_ == null) { + if (!other.linkIds_.isEmpty()) { + if (linkIds_.isEmpty()) { + linkIds_ = other.linkIds_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureLinkIdsIsMutable(); + linkIds_.addAll(other.linkIds_); + } + onChanged(); + } + } else { + if (!other.linkIds_.isEmpty()) { + if (linkIdsBuilder_.isEmpty()) { + linkIdsBuilder_.dispose(); + linkIdsBuilder_ = null; + linkIds_ = other.linkIds_; + bitField0_ = (bitField0_ & ~0x00000004); + linkIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkIdsFieldBuilder() : null; + } else { + linkIdsBuilder_.addAllMessages(other.linkIds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:context.Component) - private static final context.ContextOuterClass.Component DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Component(); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static context.ContextOuterClass.Component getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint_Exclusions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private int bitField0_; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private boolean isPermanent_; - @java.lang.Override - public context.ContextOuterClass.Component getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * bool is_permanent = 1; + * @return The isPermanent. + */ + @java.lang.Override + public boolean getIsPermanent() { + return isPermanent_; + } - } + /** + * bool is_permanent = 1; + * @param value The isPermanent to set. + * @return This builder for chaining. + */ + public Builder setIsPermanent(boolean value) { + isPermanent_ = value; + onChanged(); + return this; + } - public interface DeviceConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.DeviceConfig) - com.google.protobuf.MessageOrBuilder { + /** + * bool is_permanent = 1; + * @return This builder for chaining. + */ + public Builder clearIsPermanent() { + isPermanent_ = false; + onChanged(); + return this; + } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - java.util.List - getConfigRulesList(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - context.ContextOuterClass.ConfigRule getConfigRules(int index); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - int getConfigRulesCount(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - java.util.List - getConfigRulesOrBuilderList(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.DeviceConfig} - */ - public static final class DeviceConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.DeviceConfig) - DeviceConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceConfig.newBuilder() to construct. - private DeviceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceConfig() { - configRules_ = java.util.Collections.emptyList(); - } + private java.util.List deviceIds_ = java.util.Collections.emptyList(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceConfig(); - } + private void ensureDeviceIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deviceIds_ = new java.util.ArrayList(deviceIds_); + bitField0_ |= 0x00000001; + } + } - @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(); - 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; - } + private com.google.protobuf.RepeatedFieldBuilderV3 deviceIdsBuilder_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceConfig.class, context.ContextOuterClass.DeviceConfig.Builder.class); - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public java.util.List getDeviceIdsList() { + if (deviceIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deviceIds_); + } else { + return deviceIdsBuilder_.getMessageList(); + } + } - public static final int CONFIG_RULES_FIELD_NUMBER = 1; - private java.util.List configRules_; - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public java.util.List getConfigRulesList() { - return configRules_; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public java.util.List - getConfigRulesOrBuilderList() { - return configRules_; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public int getConfigRulesCount() { - return configRules_.size(); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule getConfigRules(int index) { - return configRules_.get(index); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index) { - return configRules_.get(index); - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public int getDeviceIdsCount() { + if (deviceIdsBuilder_ == null) { + return deviceIds_.size(); + } else { + return deviceIdsBuilder_.getCount(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .context.DeviceId device_ids = 2; + */ + public context.ContextOuterClass.DeviceId getDeviceIds(int index) { + if (deviceIdsBuilder_ == null) { + return deviceIds_.get(index); + } else { + return deviceIdsBuilder_.getMessage(index); + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder setDeviceIds(int index, context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.set(index, value); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < configRules_.size(); i++) { - output.writeMessage(1, configRules_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder setDeviceIds(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.set(index, builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < configRules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, configRules_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder addDeviceIds(context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.add(value); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(value); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.DeviceConfig)) { - return super.equals(obj); - } - context.ContextOuterClass.DeviceConfig other = (context.ContextOuterClass.DeviceConfig) obj; - - if (!getConfigRulesList() - .equals(other.getConfigRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder addDeviceIds(int index, context.ContextOuterClass.DeviceId value) { + if (deviceIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeviceIdsIsMutable(); + deviceIds_.add(index, value); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(index, value); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConfigRulesCount() > 0) { - hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; - hash = (53 * hash) + getConfigRulesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder addDeviceIds(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } - public static context.ContextOuterClass.DeviceConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder addDeviceIds(int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(index, builderForValue.build()); + onChanged(); + } else { + deviceIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.DeviceConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder addAllDeviceIds(java.lang.Iterable values) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deviceIds_); + onChanged(); + } else { + deviceIdsBuilder_.addAllMessages(values); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.DeviceConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.DeviceConfig) - context.ContextOuterClass.DeviceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_DeviceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceConfig.class, context.ContextOuterClass.DeviceConfig.Builder.class); - } - - // 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(); - if (configRulesBuilder_ == null) { - configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - configRulesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_DeviceConfig_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceConfig getDefaultInstanceForType() { - return context.ContextOuterClass.DeviceConfig.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.DeviceConfig build() { - context.ContextOuterClass.DeviceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceConfig buildPartial() { - context.ContextOuterClass.DeviceConfig result = new context.ContextOuterClass.DeviceConfig(this); - int from_bitField0_ = bitField0_; - if (configRulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - configRules_ = java.util.Collections.unmodifiableList(configRules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.configRules_ = configRules_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.DeviceConfig) { - return mergeFrom((context.ContextOuterClass.DeviceConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.DeviceConfig other) { - if (other == context.ContextOuterClass.DeviceConfig.getDefaultInstance()) return this; - if (configRulesBuilder_ == null) { - if (!other.configRules_.isEmpty()) { - if (configRules_.isEmpty()) { - configRules_ = other.configRules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConfigRulesIsMutable(); - configRules_.addAll(other.configRules_); - } - onChanged(); - } - } else { - if (!other.configRules_.isEmpty()) { - if (configRulesBuilder_.isEmpty()) { - configRulesBuilder_.dispose(); - configRulesBuilder_ = null; - configRules_ = other.configRules_; - bitField0_ = (bitField0_ & ~0x00000001); - configRulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConfigRulesFieldBuilder() : null; - } else { - configRulesBuilder_.addAllMessages(other.configRules_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List configRules_ = - java.util.Collections.emptyList(); - private void ensureConfigRulesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - configRules_ = new java.util.ArrayList(configRules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder> configRulesBuilder_; - - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List getConfigRulesList() { - if (configRulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(configRules_); - } else { - return configRulesBuilder_.getMessageList(); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public int getConfigRulesCount() { - if (configRulesBuilder_ == null) { - return configRules_.size(); - } else { - return configRulesBuilder_.getCount(); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule getConfigRules(int index) { - if (configRulesBuilder_ == null) { - return configRules_.get(index); - } else { - return configRulesBuilder_.getMessage(index); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder setConfigRules( - int index, context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.set(index, value); - onChanged(); - } else { - configRulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder setConfigRules( - int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.set(index, builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules(context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.add(value); - onChanged(); - } else { - configRulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - int index, context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.add(index, value); - onChanged(); - } else { - configRulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.add(builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.add(index, builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addAllConfigRules( - java.lang.Iterable values) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, configRules_); - onChanged(); - } else { - configRulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder clearConfigRules() { - if (configRulesBuilder_ == null) { - configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - configRulesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder removeConfigRules(int index) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.remove(index); - onChanged(); - } else { - configRulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder getConfigRulesBuilder( - int index) { - return getConfigRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index) { - if (configRulesBuilder_ == null) { - return configRules_.get(index); } else { - return configRulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List - getConfigRulesOrBuilderList() { - if (configRulesBuilder_ != null) { - return configRulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(configRules_); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder() { - return getConfigRulesFieldBuilder().addBuilder( - context.ContextOuterClass.ConfigRule.getDefaultInstance()); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder( - int index) { - return getConfigRulesFieldBuilder().addBuilder( - index, context.ContextOuterClass.ConfigRule.getDefaultInstance()); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List - getConfigRulesBuilderList() { - return getConfigRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder> - getConfigRulesFieldBuilder() { - if (configRulesBuilder_ == null) { - configRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder>( - configRules_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - configRules_ = null; - } - return configRulesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.DeviceConfig) - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder clearDeviceIds() { + if (deviceIdsBuilder_ == null) { + deviceIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deviceIdsBuilder_.clear(); + } + return this; + } - // @@protoc_insertion_point(class_scope:context.DeviceConfig) - private static final context.ContextOuterClass.DeviceConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceConfig(); - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public Builder removeDeviceIds(int index) { + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.remove(index); + onChanged(); + } else { + deviceIdsBuilder_.remove(index); + } + return this; + } - public static context.ContextOuterClass.DeviceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdsBuilder(int index) { + return getDeviceIdsFieldBuilder().getBuilder(index); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder(int index) { + if (deviceIdsBuilder_ == null) { + return deviceIds_.get(index); + } else { + return deviceIdsBuilder_.getMessageOrBuilder(index); + } + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public java.util.List getDeviceIdsOrBuilderList() { + if (deviceIdsBuilder_ != null) { + return deviceIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deviceIds_); + } + } - @java.lang.Override - public context.ContextOuterClass.DeviceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder() { + return getDeviceIdsFieldBuilder().addBuilder(context.ContextOuterClass.DeviceId.getDefaultInstance()); + } - } + /** + * repeated .context.DeviceId device_ids = 2; + */ + public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder(int index) { + return getDeviceIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.DeviceId.getDefaultInstance()); + } - public interface DeviceIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.DeviceIdList) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.DeviceId device_ids = 2; + */ + public java.util.List getDeviceIdsBuilderList() { + return getDeviceIdsFieldBuilder().getBuilderList(); + } - /** - * repeated .context.DeviceId device_ids = 1; - */ - java.util.List - getDeviceIdsList(); - /** - * repeated .context.DeviceId device_ids = 1; - */ - context.ContextOuterClass.DeviceId getDeviceIds(int index); - /** - * repeated .context.DeviceId device_ids = 1; - */ - int getDeviceIdsCount(); - /** - * repeated .context.DeviceId device_ids = 1; - */ - java.util.List - getDeviceIdsOrBuilderList(); - /** - * repeated .context.DeviceId device_ids = 1; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.DeviceIdList} - */ - public static final class DeviceIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.DeviceIdList) - DeviceIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceIdList.newBuilder() to construct. - private DeviceIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceIdList() { - deviceIds_ = java.util.Collections.emptyList(); - } + private com.google.protobuf.RepeatedFieldBuilderV3 getDeviceIdsFieldBuilder() { + if (deviceIdsBuilder_ == null) { + deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(deviceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceIds_ = null; + } + return deviceIdsBuilder_; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceIdList(); - } + private java.util.List endpointIds_ = java.util.Collections.emptyList(); - @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(); - 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; - } + private void ensureEndpointIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + endpointIds_ = new java.util.ArrayList(endpointIds_); + bitField0_ |= 0x00000002; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceIdList.class, context.ContextOuterClass.DeviceIdList.Builder.class); - } + private com.google.protobuf.RepeatedFieldBuilderV3 endpointIdsBuilder_; - public static final int DEVICE_IDS_FIELD_NUMBER = 1; - private java.util.List deviceIds_; - /** - * repeated .context.DeviceId device_ids = 1; - */ - @java.lang.Override - public java.util.List getDeviceIdsList() { - return deviceIds_; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - @java.lang.Override - public java.util.List - getDeviceIdsOrBuilderList() { - return deviceIds_; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - @java.lang.Override - public int getDeviceIdsCount() { - return deviceIds_.size(); - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceIds(int index) { - return deviceIds_.get(index); - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index) { - return deviceIds_.get(index); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public java.util.List getEndpointIdsList() { + if (endpointIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(endpointIds_); + } else { + return endpointIdsBuilder_.getMessageList(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public int getEndpointIdsCount() { + if (endpointIdsBuilder_ == null) { + return endpointIds_.size(); + } else { + return endpointIdsBuilder_.getCount(); + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId getEndpointIds(int index) { + if (endpointIdsBuilder_ == null) { + return endpointIds_.get(index); + } else { + return endpointIdsBuilder_.getMessage(index); + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < deviceIds_.size(); i++) { - output.writeMessage(1, deviceIds_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder setEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (endpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIdsIsMutable(); + endpointIds_.set(index, value); + onChanged(); + } else { + endpointIdsBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < deviceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, deviceIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder setEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.set(index, builderForValue.build()); + onChanged(); + } else { + endpointIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.DeviceIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.DeviceIdList other = (context.ContextOuterClass.DeviceIdList) obj; - - if (!getDeviceIdsList() - .equals(other.getDeviceIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder addEndpointIds(context.ContextOuterClass.EndPointId value) { + if (endpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIdsIsMutable(); + endpointIds_.add(value); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(value); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDeviceIdsCount() > 0) { - hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getDeviceIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder addEndpointIds(int index, context.ContextOuterClass.EndPointId value) { + if (endpointIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointIdsIsMutable(); + endpointIds_.add(index, value); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(index, value); + } + return this; + } - public static context.ContextOuterClass.DeviceIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder addEndpointIds(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.add(builderForValue.build()); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.DeviceIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder addEndpointIds(int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.add(index, builderForValue.build()); + onChanged(); + } else { + endpointIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.DeviceIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.DeviceIdList) - context.ContextOuterClass.DeviceIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_DeviceIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceIdList.class, context.ContextOuterClass.DeviceIdList.Builder.class); - } - - // 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(); - if (deviceIdsBuilder_ == null) { - deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - deviceIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_DeviceIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceIdList getDefaultInstanceForType() { - return context.ContextOuterClass.DeviceIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.DeviceIdList build() { - context.ContextOuterClass.DeviceIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceIdList buildPartial() { - context.ContextOuterClass.DeviceIdList result = new context.ContextOuterClass.DeviceIdList(this); - int from_bitField0_ = bitField0_; - if (deviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deviceIds_ = deviceIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.DeviceIdList) { - return mergeFrom((context.ContextOuterClass.DeviceIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.DeviceIdList other) { - if (other == context.ContextOuterClass.DeviceIdList.getDefaultInstance()) return this; - if (deviceIdsBuilder_ == null) { - if (!other.deviceIds_.isEmpty()) { - if (deviceIds_.isEmpty()) { - deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeviceIdsIsMutable(); - deviceIds_.addAll(other.deviceIds_); - } - onChanged(); - } - } else { - if (!other.deviceIds_.isEmpty()) { - if (deviceIdsBuilder_.isEmpty()) { - deviceIdsBuilder_.dispose(); - deviceIdsBuilder_ = null; - deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - deviceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDeviceIdsFieldBuilder() : null; - } else { - deviceIdsBuilder_.addAllMessages(other.deviceIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List deviceIds_ = - java.util.Collections.emptyList(); - private void ensureDeviceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deviceIds_ = new java.util.ArrayList(deviceIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdsBuilder_; - - /** - * repeated .context.DeviceId device_ids = 1; - */ - public java.util.List getDeviceIdsList() { - if (deviceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(deviceIds_); - } else { - return deviceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public int getDeviceIdsCount() { - if (deviceIdsBuilder_ == null) { - return deviceIds_.size(); - } else { - return deviceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public context.ContextOuterClass.DeviceId getDeviceIds(int index) { - if (deviceIdsBuilder_ == null) { - return deviceIds_.get(index); - } else { - return deviceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder setDeviceIds( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.set(index, value); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder setDeviceIds( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder addDeviceIds(context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.add(value); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder addDeviceIds( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.add(index, value); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder addDeviceIds( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.add(builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder addDeviceIds( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder addAllDeviceIds( - java.lang.Iterable values) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deviceIds_); - onChanged(); - } else { - deviceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder clearDeviceIds() { - if (deviceIdsBuilder_ == null) { - deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - deviceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public Builder removeDeviceIds(int index) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.remove(index); - onChanged(); - } else { - deviceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdsBuilder( - int index) { - return getDeviceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index) { - if (deviceIdsBuilder_ == null) { - return deviceIds_.get(index); } else { - return deviceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public java.util.List - getDeviceIdsOrBuilderList() { - if (deviceIdsBuilder_ != null) { - return deviceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deviceIds_); - } - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder() { - return getDeviceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder( - int index) { - return getDeviceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - * repeated .context.DeviceId device_ids = 1; - */ - public java.util.List - getDeviceIdsBuilderList() { - return getDeviceIdsFieldBuilder().getBuilderList(); - } - 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()); - deviceIds_ = null; - } - return deviceIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.DeviceIdList) - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder addAllEndpointIds(java.lang.Iterable values) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endpointIds_); + onChanged(); + } else { + endpointIdsBuilder_.addAllMessages(values); + } + return this; + } - // @@protoc_insertion_point(class_scope:context.DeviceIdList) - private static final context.ContextOuterClass.DeviceIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceIdList(); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder clearEndpointIds() { + if (endpointIdsBuilder_ == null) { + endpointIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + endpointIdsBuilder_.clear(); + } + return this; + } - public static context.ContextOuterClass.DeviceIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public Builder removeEndpointIds(int index) { + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.remove(index); + onChanged(); + } else { + endpointIdsBuilder_.remove(index); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdsBuilder(int index) { + return getEndpointIdsFieldBuilder().getBuilder(index); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder(int index) { + if (endpointIdsBuilder_ == null) { + return endpointIds_.get(index); + } else { + return endpointIdsBuilder_.getMessageOrBuilder(index); + } + } - @java.lang.Override - public context.ContextOuterClass.DeviceIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public java.util.List getEndpointIdsOrBuilderList() { + if (endpointIdsBuilder_ != null) { + return endpointIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endpointIds_); + } + } - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder() { + return getEndpointIdsFieldBuilder().addBuilder(context.ContextOuterClass.EndPointId.getDefaultInstance()); + } - public interface DeviceListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.DeviceList) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder(int index) { + return getEndpointIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.EndPointId.getDefaultInstance()); + } - /** - * repeated .context.Device devices = 1; - */ - java.util.List - getDevicesList(); - /** - * repeated .context.Device devices = 1; - */ - context.ContextOuterClass.Device getDevices(int index); - /** - * repeated .context.Device devices = 1; - */ - int getDevicesCount(); - /** - * repeated .context.Device devices = 1; - */ - java.util.List - getDevicesOrBuilderList(); - /** - * repeated .context.Device devices = 1; - */ - context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.DeviceList} - */ - public static final class DeviceList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.DeviceList) - DeviceListOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceList.newBuilder() to construct. - private DeviceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceList() { - devices_ = java.util.Collections.emptyList(); - } + /** + * repeated .context.EndPointId endpoint_ids = 3; + */ + public java.util.List getEndpointIdsBuilderList() { + return getEndpointIdsFieldBuilder().getBuilderList(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceList(); - } + private com.google.protobuf.RepeatedFieldBuilderV3 getEndpointIdsFieldBuilder() { + if (endpointIdsBuilder_ == null) { + endpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(endpointIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + endpointIds_ = null; + } + return endpointIdsBuilder_; + } - @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(); - 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; - } + private java.util.List linkIds_ = java.util.Collections.emptyList(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceList.class, context.ContextOuterClass.DeviceList.Builder.class); - } + private void ensureLinkIdsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + linkIds_ = new java.util.ArrayList(linkIds_); + bitField0_ |= 0x00000004; + } + } - public static final int DEVICES_FIELD_NUMBER = 1; - private java.util.List devices_; - /** - * repeated .context.Device devices = 1; - */ - @java.lang.Override - public java.util.List getDevicesList() { - return devices_; - } - /** - * repeated .context.Device devices = 1; - */ - @java.lang.Override - public java.util.List - getDevicesOrBuilderList() { - return devices_; - } - /** - * repeated .context.Device devices = 1; - */ - @java.lang.Override - public int getDevicesCount() { - return devices_.size(); - } - /** - * repeated .context.Device devices = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Device getDevices(int index) { - return devices_.get(index); - } - /** - * repeated .context.Device devices = 1; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder( - int index) { - return devices_.get(index); - } + private com.google.protobuf.RepeatedFieldBuilderV3 linkIdsBuilder_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .context.LinkId link_ids = 4; + */ + public java.util.List getLinkIdsList() { + if (linkIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(linkIds_); + } else { + return linkIdsBuilder_.getMessageList(); + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public int getLinkIdsCount() { + if (linkIdsBuilder_ == null) { + return linkIds_.size(); + } else { + return linkIdsBuilder_.getCount(); + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < devices_.size(); i++) { - output.writeMessage(1, devices_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId getLinkIds(int index) { + if (linkIdsBuilder_ == null) { + return linkIds_.get(index); + } else { + return linkIdsBuilder_.getMessage(index); + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < devices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, devices_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder setLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.set(index, value); + onChanged(); + } else { + linkIdsBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.DeviceList)) { - return super.equals(obj); - } - context.ContextOuterClass.DeviceList other = (context.ContextOuterClass.DeviceList) obj; - - if (!getDevicesList() - .equals(other.getDevicesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder setLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.set(index, builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDevicesCount() > 0) { - hash = (37 * hash) + DEVICES_FIELD_NUMBER; - hash = (53 * hash) + getDevicesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.add(value); + onChanged(); + } else { + linkIdsBuilder_.addMessage(value); + } + return this; + } - public static context.ContextOuterClass.DeviceList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(int index, context.ContextOuterClass.LinkId value) { + if (linkIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIdsIsMutable(); + linkIds_.add(index, value); + onChanged(); + } else { + linkIdsBuilder_.addMessage(index, value); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.DeviceList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.DeviceList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.DeviceList) - context.ContextOuterClass.DeviceListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_DeviceList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceList.class, context.ContextOuterClass.DeviceList.Builder.class); - } - - // 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(); - if (devicesBuilder_ == null) { - devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - devicesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_DeviceList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceList getDefaultInstanceForType() { - return context.ContextOuterClass.DeviceList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.DeviceList build() { - context.ContextOuterClass.DeviceList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceList buildPartial() { - context.ContextOuterClass.DeviceList result = new context.ContextOuterClass.DeviceList(this); - int from_bitField0_ = bitField0_; - if (devicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - devices_ = java.util.Collections.unmodifiableList(devices_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.devices_ = devices_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.DeviceList) { - return mergeFrom((context.ContextOuterClass.DeviceList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.DeviceList other) { - if (other == context.ContextOuterClass.DeviceList.getDefaultInstance()) return this; - if (devicesBuilder_ == null) { - if (!other.devices_.isEmpty()) { - if (devices_.isEmpty()) { - devices_ = other.devices_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDevicesIsMutable(); - devices_.addAll(other.devices_); - } - onChanged(); - } - } else { - if (!other.devices_.isEmpty()) { - if (devicesBuilder_.isEmpty()) { - devicesBuilder_.dispose(); - devicesBuilder_ = null; - devices_ = other.devices_; - bitField0_ = (bitField0_ & ~0x00000001); - devicesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDevicesFieldBuilder() : null; - } else { - devicesBuilder_.addAllMessages(other.devices_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List devices_ = - java.util.Collections.emptyList(); - private void ensureDevicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - devices_ = new java.util.ArrayList(devices_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Device, context.ContextOuterClass.Device.Builder, context.ContextOuterClass.DeviceOrBuilder> devicesBuilder_; - - /** - * repeated .context.Device devices = 1; - */ - public java.util.List getDevicesList() { - if (devicesBuilder_ == null) { - return java.util.Collections.unmodifiableList(devices_); - } else { - return devicesBuilder_.getMessageList(); - } - } - /** - * repeated .context.Device devices = 1; - */ - public int getDevicesCount() { - if (devicesBuilder_ == null) { - return devices_.size(); - } else { - return devicesBuilder_.getCount(); - } - } - /** - * repeated .context.Device devices = 1; - */ - public context.ContextOuterClass.Device getDevices(int index) { - if (devicesBuilder_ == null) { - return devices_.get(index); - } else { - return devicesBuilder_.getMessage(index); - } - } - /** - * repeated .context.Device devices = 1; - */ - public Builder setDevices( - int index, context.ContextOuterClass.Device value) { - if (devicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevicesIsMutable(); - devices_.set(index, value); - onChanged(); - } else { - devicesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder setDevices( - int index, context.ContextOuterClass.Device.Builder builderForValue) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.set(index, builderForValue.build()); - onChanged(); - } else { - devicesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder addDevices(context.ContextOuterClass.Device value) { - if (devicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevicesIsMutable(); - devices_.add(value); - onChanged(); - } else { - devicesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder addDevices( - int index, context.ContextOuterClass.Device value) { - if (devicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevicesIsMutable(); - devices_.add(index, value); - onChanged(); - } else { - devicesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder addDevices( - context.ContextOuterClass.Device.Builder builderForValue) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.add(builderForValue.build()); - onChanged(); - } else { - devicesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder addDevices( - int index, context.ContextOuterClass.Device.Builder builderForValue) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.add(index, builderForValue.build()); - onChanged(); - } else { - devicesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder addAllDevices( - java.lang.Iterable values) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, devices_); - onChanged(); - } else { - devicesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder clearDevices() { - if (devicesBuilder_ == null) { - devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - devicesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public Builder removeDevices(int index) { - if (devicesBuilder_ == null) { - ensureDevicesIsMutable(); - devices_.remove(index); - onChanged(); - } else { - devicesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Device devices = 1; - */ - public context.ContextOuterClass.Device.Builder getDevicesBuilder( - int index) { - return getDevicesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Device devices = 1; - */ - public context.ContextOuterClass.DeviceOrBuilder getDevicesOrBuilder( - int index) { - if (devicesBuilder_ == null) { - return devices_.get(index); } else { - return devicesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Device devices = 1; - */ - public java.util.List - getDevicesOrBuilderList() { - if (devicesBuilder_ != null) { - return devicesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(devices_); - } - } - /** - * repeated .context.Device devices = 1; - */ - public context.ContextOuterClass.Device.Builder addDevicesBuilder() { - return getDevicesFieldBuilder().addBuilder( - context.ContextOuterClass.Device.getDefaultInstance()); - } - /** - * repeated .context.Device devices = 1; - */ - public context.ContextOuterClass.Device.Builder addDevicesBuilder( - int index) { - return getDevicesFieldBuilder().addBuilder( - index, context.ContextOuterClass.Device.getDefaultInstance()); - } - /** - * repeated .context.Device devices = 1; - */ - public java.util.List - getDevicesBuilderList() { - return getDevicesFieldBuilder().getBuilderList(); - } - 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()); - devices_ = null; - } - return devicesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.DeviceList) - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addLinkIds(int index, context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(index, builderForValue.build()); + onChanged(); + } else { + linkIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - // @@protoc_insertion_point(class_scope:context.DeviceList) - private static final context.ContextOuterClass.DeviceList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceList(); - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder addAllLinkIds(java.lang.Iterable values) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, linkIds_); + onChanged(); + } else { + linkIdsBuilder_.addAllMessages(values); + } + return this; + } - public static context.ContextOuterClass.DeviceList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder clearLinkIds() { + if (linkIdsBuilder_ == null) { + linkIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + linkIdsBuilder_.clear(); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public Builder removeLinkIds(int index) { + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.remove(index); + onChanged(); + } else { + linkIdsBuilder_.remove(index); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdsBuilder(int index) { + return getLinkIdsFieldBuilder().getBuilder(index); + } - @java.lang.Override - public context.ContextOuterClass.DeviceList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder(int index) { + if (linkIdsBuilder_ == null) { + return linkIds_.get(index); + } else { + return linkIdsBuilder_.getMessageOrBuilder(index); + } + } - } + /** + * repeated .context.LinkId link_ids = 4; + */ + public java.util.List getLinkIdsOrBuilderList() { + if (linkIdsBuilder_ != null) { + return linkIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(linkIds_); + } + } - public interface DeviceFilterOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.DeviceFilter) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder() { + return getLinkIdsFieldBuilder().addBuilder(context.ContextOuterClass.LinkId.getDefaultInstance()); + } - /** - * .context.DeviceIdList device_ids = 1; - * @return Whether the deviceIds field is set. - */ - boolean hasDeviceIds(); - /** - * .context.DeviceIdList device_ids = 1; - * @return The deviceIds. - */ - context.ContextOuterClass.DeviceIdList getDeviceIds(); - /** - * .context.DeviceIdList device_ids = 1; - */ - context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder(); + /** + * repeated .context.LinkId link_ids = 4; + */ + public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder(int index) { + return getLinkIdsFieldBuilder().addBuilder(index, context.ContextOuterClass.LinkId.getDefaultInstance()); + } - /** - * bool include_endpoints = 2; - * @return The includeEndpoints. - */ - boolean getIncludeEndpoints(); + /** + * repeated .context.LinkId link_ids = 4; + */ + public java.util.List getLinkIdsBuilderList() { + return getLinkIdsFieldBuilder().getBuilderList(); + } - /** - * bool include_config_rules = 3; - * @return The includeConfigRules. - */ - boolean getIncludeConfigRules(); + private com.google.protobuf.RepeatedFieldBuilderV3 getLinkIdsFieldBuilder() { + if (linkIdsBuilder_ == null) { + linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(linkIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + linkIds_ = null; + } + return linkIdsBuilder_; + } - /** - * bool include_components = 4; - * @return The includeComponents. - */ - boolean getIncludeComponents(); - } - /** - * Protobuf type {@code context.DeviceFilter} - */ - public static final class DeviceFilter extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.DeviceFilter) - DeviceFilterOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceFilter.newBuilder() to construct. - private DeviceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceFilter() { - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceFilter(); - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Constraint_Exclusions) + } - @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; - } + // @@protoc_insertion_point(class_scope:context.Constraint_Exclusions) + private static final context.ContextOuterClass.Constraint_Exclusions DEFAULT_INSTANCE; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceFilter.class, context.ContextOuterClass.DeviceFilter.Builder.class); - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_Exclusions(); + } - public static final int DEVICE_IDS_FIELD_NUMBER = 1; - private context.ContextOuterClass.DeviceIdList deviceIds_; - /** - * .context.DeviceIdList device_ids = 1; - * @return Whether the deviceIds field is set. - */ - @java.lang.Override - public boolean hasDeviceIds() { - return deviceIds_ != null; - } - /** - * .context.DeviceIdList device_ids = 1; - * @return The deviceIds. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdList getDeviceIds() { - return deviceIds_ == null ? context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; - } - /** - * .context.DeviceIdList device_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder() { - return getDeviceIds(); - } + public static context.ContextOuterClass.Constraint_Exclusions getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static final int INCLUDE_ENDPOINTS_FIELD_NUMBER = 2; - private boolean includeEndpoints_; - /** - * bool include_endpoints = 2; - * @return The includeEndpoints. - */ - @java.lang.Override - public boolean getIncludeEndpoints() { - return includeEndpoints_; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 3; - private boolean includeConfigRules_; - /** - * bool include_config_rules = 3; - * @return The includeConfigRules. - */ - @java.lang.Override - public boolean getIncludeConfigRules() { - return includeConfigRules_; + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.Constraint_Exclusions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConstraintOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Constraint) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.ConstraintActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + + /** + * .context.ConstraintActionEnum action = 1; + * @return The action. + */ + context.ContextOuterClass.ConstraintActionEnum getAction(); + + /** + * .context.Constraint_Custom custom = 2; + * @return Whether the custom field is set. + */ + boolean hasCustom(); + + /** + * .context.Constraint_Custom custom = 2; + * @return The custom. + */ + context.ContextOuterClass.Constraint_Custom getCustom(); + + /** + * .context.Constraint_Custom custom = 2; + */ + context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder(); + + /** + * .context.Constraint_Schedule schedule = 3; + * @return Whether the schedule field is set. + */ + boolean hasSchedule(); + + /** + * .context.Constraint_Schedule schedule = 3; + * @return The schedule. + */ + context.ContextOuterClass.Constraint_Schedule getSchedule(); + + /** + * .context.Constraint_Schedule schedule = 3; + */ + context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder(); + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return Whether the endpointLocation field is set. + */ + boolean hasEndpointLocation(); + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return The endpointLocation. + */ + context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation(); + + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder(); + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return Whether the endpointPriority field is set. + */ + boolean hasEndpointPriority(); + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return The endpointPriority. + */ + context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority(); + + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder(); + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return Whether the slaCapacity field is set. + */ + boolean hasSlaCapacity(); + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return The slaCapacity. + */ + context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity(); + + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder(); + + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return Whether the slaLatency field is set. + */ + boolean hasSlaLatency(); + + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return The slaLatency. + */ + context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency(); + + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder(); + + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return Whether the slaAvailability field is set. + */ + boolean hasSlaAvailability(); + + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return The slaAvailability. + */ + context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability(); + + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder(); + + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return Whether the slaIsolation field is set. + */ + boolean hasSlaIsolation(); + + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return The slaIsolation. + */ + context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation(); + + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder(); + + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return Whether the exclusions field is set. + */ + boolean hasExclusions(); + + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return The exclusions. + */ + context.ContextOuterClass.Constraint_Exclusions getExclusions(); + + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder(); + + public context.ContextOuterClass.Constraint.ConstraintCase getConstraintCase(); } - public static final int INCLUDE_COMPONENTS_FIELD_NUMBER = 4; - private boolean includeComponents_; /** - * bool include_components = 4; - * @return The includeComponents. + * Protobuf type {@code context.Constraint} */ - @java.lang.Override - public boolean getIncludeComponents() { - return includeComponents_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static final class Constraint extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Constraint) + ConstraintOrBuilder { - memoizedIsInitialized = 1; - return true; - } + private static final long serialVersionUID = 0L; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (deviceIds_ != null) { - output.writeMessage(1, getDeviceIds()); - } - if (includeEndpoints_ != false) { - output.writeBool(2, includeEndpoints_); - } - if (includeConfigRules_ != false) { - output.writeBool(3, includeConfigRules_); - } - if (includeComponents_ != false) { - output.writeBool(4, includeComponents_); - } - unknownFields.writeTo(output); - } + // Use Constraint.newBuilder() to construct. + private Constraint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (deviceIds_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDeviceIds()); - } - if (includeEndpoints_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, includeEndpoints_); - } - if (includeConfigRules_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, includeConfigRules_); - } - if (includeComponents_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, includeComponents_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private Constraint() { + action_ = 0; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.DeviceFilter)) { - return super.equals(obj); - } - context.ContextOuterClass.DeviceFilter other = (context.ContextOuterClass.DeviceFilter) obj; - - if (hasDeviceIds() != other.hasDeviceIds()) return false; - if (hasDeviceIds()) { - if (!getDeviceIds() - .equals(other.getDeviceIds())) return false; - } - if (getIncludeEndpoints() - != other.getIncludeEndpoints()) return false; - if (getIncludeConfigRules() - != other.getIncludeConfigRules()) return false; - if (getIncludeComponents() - != other.getIncludeComponents()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Constraint(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDeviceIds()) { - hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getDeviceIds().hashCode(); - } - hash = (37 * hash) + INCLUDE_ENDPOINTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeEndpoints()); - hash = (37 * hash) + INCLUDE_CONFIG_RULES_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - public static context.ContextOuterClass.DeviceFilter parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceFilter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceFilter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceFilter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceFilter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceFilter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + 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(); + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.DeviceFilter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_descriptor; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.DeviceFilter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.DeviceFilter) - context.ContextOuterClass.DeviceFilterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_DeviceFilter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceFilter.class, context.ContextOuterClass.DeviceFilter.Builder.class); - } - - // 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; - deviceIdsBuilder_ = null; - } - includeEndpoints_ = false; - - includeConfigRules_ = false; - - includeComponents_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_DeviceFilter_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceFilter getDefaultInstanceForType() { - return context.ContextOuterClass.DeviceFilter.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.DeviceFilter build() { - context.ContextOuterClass.DeviceFilter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.DeviceFilter) { - return mergeFrom((context.ContextOuterClass.DeviceFilter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.DeviceFilter other) { - if (other == context.ContextOuterClass.DeviceFilter.getDefaultInstance()) return this; - if (other.hasDeviceIds()) { - mergeDeviceIds(other.getDeviceIds()); - } - if (other.getIncludeEndpoints() != false) { - setIncludeEndpoints(other.getIncludeEndpoints()); - } - if (other.getIncludeConfigRules() != false) { - setIncludeConfigRules(other.getIncludeConfigRules()); - } - if (other.getIncludeComponents() != false) { - setIncludeComponents(other.getIncludeComponents()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceFilter) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.DeviceIdList deviceIds_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceIdList, context.ContextOuterClass.DeviceIdList.Builder, context.ContextOuterClass.DeviceIdListOrBuilder> deviceIdsBuilder_; - /** - * .context.DeviceIdList device_ids = 1; - * @return Whether the deviceIds field is set. - */ - public boolean hasDeviceIds() { - return deviceIdsBuilder_ != null || deviceIds_ != null; - } - /** - * .context.DeviceIdList device_ids = 1; - * @return The deviceIds. - */ - public context.ContextOuterClass.DeviceIdList getDeviceIds() { - if (deviceIdsBuilder_ == null) { - return deviceIds_ == null ? context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; - } else { - return deviceIdsBuilder_.getMessage(); - } - } - /** - * .context.DeviceIdList device_ids = 1; - */ - public Builder setDeviceIds(context.ContextOuterClass.DeviceIdList value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceIds_ = value; - onChanged(); - } else { - deviceIdsBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceIdList device_ids = 1; - */ - public Builder setDeviceIds( - context.ContextOuterClass.DeviceIdList.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - deviceIds_ = builderForValue.build(); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceIdList device_ids = 1; - */ - public Builder mergeDeviceIds(context.ContextOuterClass.DeviceIdList value) { - if (deviceIdsBuilder_ == null) { - if (deviceIds_ != null) { - deviceIds_ = - context.ContextOuterClass.DeviceIdList.newBuilder(deviceIds_).mergeFrom(value).buildPartial(); - } else { - deviceIds_ = value; - } - onChanged(); - } else { - deviceIdsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceIdList device_ids = 1; - */ - public Builder clearDeviceIds() { - if (deviceIdsBuilder_ == null) { - deviceIds_ = null; - onChanged(); - } else { - deviceIds_ = null; - deviceIdsBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceIdList device_ids = 1; - */ - public context.ContextOuterClass.DeviceIdList.Builder getDeviceIdsBuilder() { - - onChanged(); - return getDeviceIdsFieldBuilder().getBuilder(); - } - /** - * .context.DeviceIdList device_ids = 1; - */ - public context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder() { - if (deviceIdsBuilder_ != null) { - return deviceIdsBuilder_.getMessageOrBuilder(); - } else { - return deviceIds_ == null ? - context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; - } - } - /** - * .context.DeviceIdList device_ids = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceIdList, context.ContextOuterClass.DeviceIdList.Builder, context.ContextOuterClass.DeviceIdListOrBuilder> - getDeviceIdsFieldBuilder() { - if (deviceIdsBuilder_ == null) { - deviceIdsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceIdList, context.ContextOuterClass.DeviceIdList.Builder, context.ContextOuterClass.DeviceIdListOrBuilder>( - getDeviceIds(), - getParentForChildren(), - isClean()); - deviceIds_ = null; - } - return deviceIdsBuilder_; - } - - private boolean includeEndpoints_ ; - /** - * bool include_endpoints = 2; - * @return The includeEndpoints. - */ - @java.lang.Override - public boolean getIncludeEndpoints() { - return includeEndpoints_; - } - /** - * bool include_endpoints = 2; - * @param value The includeEndpoints to set. - * @return This builder for chaining. - */ - public Builder setIncludeEndpoints(boolean value) { - - includeEndpoints_ = value; - onChanged(); - return this; - } - /** - * bool include_endpoints = 2; - * @return This builder for chaining. - */ - public Builder clearIncludeEndpoints() { - - includeEndpoints_ = false; - onChanged(); - return this; - } - - private boolean includeConfigRules_ ; - /** - * bool include_config_rules = 3; - * @return The includeConfigRules. - */ - @java.lang.Override - public boolean getIncludeConfigRules() { - return includeConfigRules_; - } - /** - * bool include_config_rules = 3; - * @param value The includeConfigRules to set. - * @return This builder for chaining. - */ - public Builder setIncludeConfigRules(boolean value) { - - includeConfigRules_ = value; - onChanged(); - return this; - } - /** - * bool include_config_rules = 3; - * @return This builder for chaining. - */ - public Builder clearIncludeConfigRules() { - - includeConfigRules_ = false; - onChanged(); - return this; - } - - private boolean includeComponents_ ; - /** - * bool include_components = 4; - * @return The includeComponents. - */ - @java.lang.Override - public boolean getIncludeComponents() { - return includeComponents_; - } - /** - * bool include_components = 4; - * @param value The includeComponents to set. - * @return This builder for chaining. - */ - public Builder setIncludeComponents(boolean value) { - - includeComponents_ = value; - onChanged(); - return this; - } - /** - * bool include_components = 4; - * @return This builder for chaining. - */ - public Builder clearIncludeComponents() { - - includeComponents_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.DeviceFilter) - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class); + } - // @@protoc_insertion_point(class_scope:context.DeviceFilter) - private static final context.ContextOuterClass.DeviceFilter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceFilter(); - } + private int constraintCase_ = 0; - public static context.ContextOuterClass.DeviceFilter getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private java.lang.Object constraint_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public enum ConstraintCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + CUSTOM(2), + SCHEDULE(3), + ENDPOINT_LOCATION(4), + ENDPOINT_PRIORITY(5), + SLA_CAPACITY(6), + SLA_LATENCY(7), + SLA_AVAILABILITY(8), + SLA_ISOLATION(9), + EXCLUSIONS(10), + CONSTRAINT_NOT_SET(0); - @java.lang.Override - public context.ContextOuterClass.DeviceFilter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private final int value; - } + private ConstraintCase(int value) { + this.value = value; + } - public interface DeviceEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.DeviceEvent) - com.google.protobuf.MessageOrBuilder { + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConstraintCase valueOf(int value) { + return forNumber(value); + } - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + public static ConstraintCase forNumber(int value) { + switch(value) { + case 2: + return CUSTOM; + case 3: + return SCHEDULE; + case 4: + return ENDPOINT_LOCATION; + case 5: + return ENDPOINT_PRIORITY; + case 6: + return SLA_CAPACITY; + case 7: + return SLA_LATENCY; + case 8: + return SLA_AVAILABILITY; + case 9: + return SLA_ISOLATION; + case 10: + return EXCLUSIONS; + case 0: + return CONSTRAINT_NOT_SET; + default: + return null; + } + } - /** - * .context.DeviceId device_id = 2; - * @return Whether the deviceId field is set. - */ - boolean hasDeviceId(); - /** - * .context.DeviceId device_id = 2; - * @return The deviceId. - */ - context.ContextOuterClass.DeviceId getDeviceId(); - /** - * .context.DeviceId device_id = 2; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + public int getNumber() { + return this.value; + } + } - /** - * .context.DeviceConfig device_config = 3; - * @return Whether the deviceConfig field is set. - */ - boolean hasDeviceConfig(); - /** - * .context.DeviceConfig device_config = 3; - * @return The deviceConfig. - */ - context.ContextOuterClass.DeviceConfig getDeviceConfig(); - /** - * .context.DeviceConfig device_config = 3; - */ - context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder(); - } - /** - * Protobuf type {@code context.DeviceEvent} - */ - public static final class DeviceEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.DeviceEvent) - DeviceEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceEvent.newBuilder() to construct. - private DeviceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceEvent() { - } + public ConstraintCase getConstraintCase() { + return ConstraintCase.forNumber(constraintCase_); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceEvent(); - } + public static final int ACTION_FIELD_NUMBER = 1; - @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; - } + private int action_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceEvent.class, context.ContextOuterClass.DeviceEvent.Builder.class); - } + /** + * .context.ConstraintActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + /** + * .context.ConstraintActionEnum action = 1; + * @return The action. + */ + @java.lang.Override + public context.ContextOuterClass.ConstraintActionEnum getAction() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.valueOf(action_); + return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; + } - public static final int DEVICE_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.DeviceId deviceId_; - /** - * .context.DeviceId device_id = 2; - * @return Whether the deviceId field is set. - */ - @java.lang.Override - public boolean hasDeviceId() { - return deviceId_ != null; - } - /** - * .context.DeviceId device_id = 2; - * @return The deviceId. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceId() { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - /** - * .context.DeviceId device_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); - } + public static final int CUSTOM_FIELD_NUMBER = 2; - public static final int DEVICE_CONFIG_FIELD_NUMBER = 3; - private context.ContextOuterClass.DeviceConfig deviceConfig_; - /** - * .context.DeviceConfig device_config = 3; - * @return Whether the deviceConfig field is set. - */ - @java.lang.Override - public boolean hasDeviceConfig() { - return deviceConfig_ != null; - } - /** - * .context.DeviceConfig device_config = 3; - * @return The deviceConfig. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceConfig getDeviceConfig() { - return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; - } - /** - * .context.DeviceConfig device_config = 3; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { - return getDeviceConfig(); - } + /** + * .context.Constraint_Custom custom = 2; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return constraintCase_ == 2; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.Constraint_Custom custom = 2; + * @return The custom. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Custom getCustom() { + if (constraintCase_ == 2) { + return (context.ContextOuterClass.Constraint_Custom) constraint_; + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.Constraint_Custom custom = 2; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() { + if (constraintCase_ == 2) { + return (context.ContextOuterClass.Constraint_Custom) constraint_; + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (deviceId_ != null) { - output.writeMessage(2, getDeviceId()); - } - if (deviceConfig_ != null) { - output.writeMessage(3, getDeviceConfig()); - } - unknownFields.writeTo(output); - } + public static final int SCHEDULE_FIELD_NUMBER = 3; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (deviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDeviceId()); - } - if (deviceConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getDeviceConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Constraint_Schedule schedule = 3; + * @return Whether the schedule field is set. + */ + @java.lang.Override + public boolean hasSchedule() { + return constraintCase_ == 3; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.DeviceEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.DeviceEvent other = (context.ContextOuterClass.DeviceEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasDeviceId() != other.hasDeviceId()) return false; - if (hasDeviceId()) { - if (!getDeviceId() - .equals(other.getDeviceId())) return false; - } - if (hasDeviceConfig() != other.hasDeviceConfig()) return false; - if (hasDeviceConfig()) { - if (!getDeviceConfig() - .equals(other.getDeviceConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Constraint_Schedule schedule = 3; + * @return The schedule. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Schedule getSchedule() { + if (constraintCase_ == 3) { + return (context.ContextOuterClass.Constraint_Schedule) constraint_; + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasDeviceId()) { - hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getDeviceId().hashCode(); - } - if (hasDeviceConfig()) { - hash = (37 * hash) + DEVICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDeviceConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Constraint_Schedule schedule = 3; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() { + if (constraintCase_ == 3) { + return (context.ContextOuterClass.Constraint_Schedule) constraint_; + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } - public static context.ContextOuterClass.DeviceEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.DeviceEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.DeviceEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int ENDPOINT_LOCATION_FIELD_NUMBER = 4; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.DeviceEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return Whether the endpointLocation field is set. + */ + @java.lang.Override + public boolean hasEndpointLocation() { + return constraintCase_ == 4; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.DeviceEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.DeviceEvent) - context.ContextOuterClass.DeviceEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_DeviceEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_DeviceEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.DeviceEvent.class, context.ContextOuterClass.DeviceEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (deviceIdBuilder_ == null) { - deviceId_ = null; - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - } else { - deviceConfig_ = null; - deviceConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_DeviceEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.DeviceEvent getDefaultInstanceForType() { - return context.ContextOuterClass.DeviceEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.DeviceEvent build() { - context.ContextOuterClass.DeviceEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.DeviceEvent) { - return mergeFrom((context.ContextOuterClass.DeviceEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.DeviceEvent other) { - if (other == context.ContextOuterClass.DeviceEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasDeviceId()) { - mergeDeviceId(other.getDeviceId()); - } - if (other.hasDeviceConfig()) { - mergeDeviceConfig(other.getDeviceConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.DeviceId deviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdBuilder_; - /** - * .context.DeviceId device_id = 2; - * @return Whether the deviceId field is set. - */ - public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; - } - /** - * .context.DeviceId device_id = 2; - * @return The deviceId. - */ - public context.ContextOuterClass.DeviceId getDeviceId() { - if (deviceIdBuilder_ == null) { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } else { - return deviceIdBuilder_.getMessage(); - } - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceId_ = value; - onChanged(); - } else { - deviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder setDeviceId( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdBuilder_ == null) { - deviceId_ = builderForValue.build(); - onChanged(); - } else { - deviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = - context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); - } else { - deviceId_ = value; - } - onChanged(); - } else { - deviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { - - onChanged(); - return getDeviceIdFieldBuilder().getBuilder(); - } - /** - * .context.DeviceId device_id = 2; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - if (deviceIdBuilder_ != null) { - return deviceIdBuilder_.getMessageOrBuilder(); - } else { - return deviceId_ == null ? - context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - } - /** - * .context.DeviceId device_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> - getDeviceIdFieldBuilder() { - if (deviceIdBuilder_ == null) { - deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( - getDeviceId(), - getParentForChildren(), - isClean()); - deviceId_ = null; - } - return deviceIdBuilder_; - } - - private context.ContextOuterClass.DeviceConfig deviceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder> deviceConfigBuilder_; - /** - * .context.DeviceConfig device_config = 3; - * @return Whether the deviceConfig field is set. - */ - public boolean hasDeviceConfig() { - return deviceConfigBuilder_ != null || deviceConfig_ != null; - } - /** - * .context.DeviceConfig device_config = 3; - * @return The deviceConfig. - */ - public context.ContextOuterClass.DeviceConfig getDeviceConfig() { - if (deviceConfigBuilder_ == null) { - return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; - } else { - return deviceConfigBuilder_.getMessage(); - } - } - /** - * .context.DeviceConfig device_config = 3; - */ - public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig value) { - if (deviceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceConfig_ = value; - onChanged(); - } else { - deviceConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceConfig device_config = 3; - */ - public Builder setDeviceConfig( - context.ContextOuterClass.DeviceConfig.Builder builderForValue) { - if (deviceConfigBuilder_ == null) { - deviceConfig_ = builderForValue.build(); - onChanged(); - } else { - deviceConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceConfig device_config = 3; - */ - public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) { - if (deviceConfigBuilder_ == null) { - if (deviceConfig_ != null) { - deviceConfig_ = - context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial(); - } else { - deviceConfig_ = value; - } - onChanged(); - } else { - deviceConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceConfig device_config = 3; - */ - public Builder clearDeviceConfig() { - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - onChanged(); - } else { - deviceConfig_ = null; - deviceConfigBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceConfig device_config = 3; - */ - public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() { - - onChanged(); - return getDeviceConfigFieldBuilder().getBuilder(); - } - /** - * .context.DeviceConfig device_config = 3; - */ - public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { - if (deviceConfigBuilder_ != null) { - return deviceConfigBuilder_.getMessageOrBuilder(); - } else { - return deviceConfig_ == null ? - context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; - } - } - /** - * .context.DeviceConfig device_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder> - getDeviceConfigFieldBuilder() { - if (deviceConfigBuilder_ == null) { - deviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder>( - getDeviceConfig(), - getParentForChildren(), - isClean()); - deviceConfig_ = null; - } - return deviceConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.DeviceEvent) - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return The endpointLocation. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() { + if (constraintCase_ == 4) { + return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } - // @@protoc_insertion_point(class_scope:context.DeviceEvent) - private static final context.ContextOuterClass.DeviceEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.DeviceEvent(); - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() { + if (constraintCase_ == 4) { + return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } - public static context.ContextOuterClass.DeviceEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final int ENDPOINT_PRIORITY_FIELD_NUMBER = 5; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return Whether the endpointPriority field is set. + */ + @java.lang.Override + public boolean hasEndpointPriority() { + return constraintCase_ == 5; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return The endpointPriority. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() { + if (constraintCase_ == 5) { + return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } - @java.lang.Override - public context.ContextOuterClass.DeviceEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() { + if (constraintCase_ == 5) { + return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } - } + public static final int SLA_CAPACITY_FIELD_NUMBER = 6; - public interface LinkIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.LinkId) - com.google.protobuf.MessageOrBuilder { + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return Whether the slaCapacity field is set. + */ + @java.lang.Override + public boolean hasSlaCapacity() { + return constraintCase_ == 6; + } - /** - * .context.Uuid link_uuid = 1; - * @return Whether the linkUuid field is set. - */ - boolean hasLinkUuid(); - /** - * .context.Uuid link_uuid = 1; - * @return The linkUuid. - */ - context.ContextOuterClass.Uuid getLinkUuid(); - /** - * .context.Uuid link_uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder(); - } - /** - *
-   * ----- Link ----------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.LinkId} - */ - public static final class LinkId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.LinkId) - LinkIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use LinkId.newBuilder() to construct. - private LinkId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LinkId() { - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return The slaCapacity. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() { + if (constraintCase_ == 6) { + return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LinkId(); - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() { + if (constraintCase_ == 6) { + return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } - @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; - } + public static final int SLA_LATENCY_FIELD_NUMBER = 7; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkId.class, context.ContextOuterClass.LinkId.Builder.class); - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return Whether the slaLatency field is set. + */ + @java.lang.Override + public boolean hasSlaLatency() { + return constraintCase_ == 7; + } - public static final int LINK_UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid linkUuid_; - /** - * .context.Uuid link_uuid = 1; - * @return Whether the linkUuid field is set. - */ - @java.lang.Override - public boolean hasLinkUuid() { - return linkUuid_ != null; - } - /** - * .context.Uuid link_uuid = 1; - * @return The linkUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getLinkUuid() { - return linkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; - } - /** - * .context.Uuid link_uuid = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder() { - return getLinkUuid(); - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return The slaLatency. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { + if (constraintCase_ == 7) { + return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { + if (constraintCase_ == 7) { + return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } - memoizedIsInitialized = 1; - return true; - } + public static final int SLA_AVAILABILITY_FIELD_NUMBER = 8; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (linkUuid_ != null) { - output.writeMessage(1, getLinkUuid()); - } - unknownFields.writeTo(output); - } + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return Whether the slaAvailability field is set. + */ + @java.lang.Override + public boolean hasSlaAvailability() { + return constraintCase_ == 8; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (linkUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLinkUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return The slaAvailability. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { + if (constraintCase_ == 8) { + return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.LinkId)) { - return super.equals(obj); - } - context.ContextOuterClass.LinkId other = (context.ContextOuterClass.LinkId) obj; - - if (hasLinkUuid() != other.hasLinkUuid()) return false; - if (hasLinkUuid()) { - if (!getLinkUuid() - .equals(other.getLinkUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { + if (constraintCase_ == 8) { + return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLinkUuid()) { - hash = (37 * hash) + LINK_UUID_FIELD_NUMBER; - hash = (53 * hash) + getLinkUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static final int SLA_ISOLATION_FIELD_NUMBER = 9; - public static context.ContextOuterClass.LinkId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return Whether the slaIsolation field is set. + */ + @java.lang.Override + public boolean hasSlaIsolation() { + return constraintCase_ == 9; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.LinkId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return The slaIsolation. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { + if (constraintCase_ == 9) { + return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Link ----------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.LinkId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.LinkId) - context.ContextOuterClass.LinkIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_LinkId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkId.class, context.ContextOuterClass.LinkId.Builder.class); - } - - // 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; - linkUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_LinkId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.LinkId getDefaultInstanceForType() { - return context.ContextOuterClass.LinkId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.LinkId build() { - context.ContextOuterClass.LinkId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.LinkId) { - return mergeFrom((context.ContextOuterClass.LinkId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.LinkId other) { - if (other == context.ContextOuterClass.LinkId.getDefaultInstance()) return this; - if (other.hasLinkUuid()) { - mergeLinkUuid(other.getLinkUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid linkUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> linkUuidBuilder_; - /** - * .context.Uuid link_uuid = 1; - * @return Whether the linkUuid field is set. - */ - public boolean hasLinkUuid() { - return linkUuidBuilder_ != null || linkUuid_ != null; - } - /** - * .context.Uuid link_uuid = 1; - * @return The linkUuid. - */ - public context.ContextOuterClass.Uuid getLinkUuid() { - if (linkUuidBuilder_ == null) { - return linkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; - } else { - return linkUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid link_uuid = 1; - */ - public Builder setLinkUuid(context.ContextOuterClass.Uuid value) { - if (linkUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - linkUuid_ = value; - onChanged(); - } else { - linkUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid link_uuid = 1; - */ - public Builder setLinkUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (linkUuidBuilder_ == null) { - linkUuid_ = builderForValue.build(); - onChanged(); - } else { - linkUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid link_uuid = 1; - */ - public Builder mergeLinkUuid(context.ContextOuterClass.Uuid value) { - if (linkUuidBuilder_ == null) { - if (linkUuid_ != null) { - linkUuid_ = - context.ContextOuterClass.Uuid.newBuilder(linkUuid_).mergeFrom(value).buildPartial(); - } else { - linkUuid_ = value; - } - onChanged(); - } else { - linkUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid link_uuid = 1; - */ - public Builder clearLinkUuid() { - if (linkUuidBuilder_ == null) { - linkUuid_ = null; - onChanged(); - } else { - linkUuid_ = null; - linkUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid link_uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getLinkUuidBuilder() { - - onChanged(); - return getLinkUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid link_uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder() { - if (linkUuidBuilder_ != null) { - return linkUuidBuilder_.getMessageOrBuilder(); - } else { - return linkUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; - } - } - /** - * .context.Uuid link_uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getLinkUuidFieldBuilder() { - if (linkUuidBuilder_ == null) { - linkUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getLinkUuid(), - getParentForChildren(), - isClean()); - linkUuid_ = null; - } - return linkUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.LinkId) - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { + if (constraintCase_ == 9) { + return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } - // @@protoc_insertion_point(class_scope:context.LinkId) - private static final context.ContextOuterClass.LinkId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.LinkId(); - } + public static final int EXCLUSIONS_FIELD_NUMBER = 10; - public static context.ContextOuterClass.LinkId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return Whether the exclusions field is set. + */ + @java.lang.Override + public boolean hasExclusions() { + return constraintCase_ == 10; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return The exclusions. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Exclusions getExclusions() { + if (constraintCase_ == 10) { + return (context.ContextOuterClass.Constraint_Exclusions) constraint_; + } + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { + if (constraintCase_ == 10) { + return (context.ContextOuterClass.Constraint_Exclusions) constraint_; + } + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } - @java.lang.Override - public context.ContextOuterClass.LinkId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private byte memoizedIsInitialized = -1; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - public interface LinkOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Link) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) { + output.writeEnum(1, action_); + } + if (constraintCase_ == 2) { + output.writeMessage(2, (context.ContextOuterClass.Constraint_Custom) constraint_); + } + if (constraintCase_ == 3) { + output.writeMessage(3, (context.ContextOuterClass.Constraint_Schedule) constraint_); + } + if (constraintCase_ == 4) { + output.writeMessage(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_); + } + if (constraintCase_ == 5) { + output.writeMessage(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_); + } + if (constraintCase_ == 6) { + output.writeMessage(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); + } + if (constraintCase_ == 7) { + output.writeMessage(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_); + } + if (constraintCase_ == 8) { + output.writeMessage(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_); + } + if (constraintCase_ == 9) { + output.writeMessage(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); + } + if (constraintCase_ == 10) { + output.writeMessage(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); + } + unknownFields.writeTo(output); + } - /** - * .context.LinkId link_id = 1; - * @return Whether the linkId field is set. - */ - boolean hasLinkId(); - /** - * .context.LinkId link_id = 1; - * @return The linkId. - */ - context.ContextOuterClass.LinkId getLinkId(); - /** - * .context.LinkId link_id = 1; - */ - context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder(); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, action_); + } + if (constraintCase_ == 2) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.Constraint_Custom) constraint_); + } + if (constraintCase_ == 3) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, (context.ContextOuterClass.Constraint_Schedule) constraint_); + } + if (constraintCase_ == 4) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_); + } + if (constraintCase_ == 5) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_); + } + if (constraintCase_ == 6) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); + } + if (constraintCase_ == 7) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_); + } + if (constraintCase_ == 8) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_); + } + if (constraintCase_ == 9) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); + } + if (constraintCase_ == 10) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Constraint)) { + return super.equals(obj); + } + context.ContextOuterClass.Constraint other = (context.ContextOuterClass.Constraint) obj; + if (action_ != other.action_) + return false; + if (!getConstraintCase().equals(other.getConstraintCase())) + return false; + switch(constraintCase_) { + case 2: + if (!getCustom().equals(other.getCustom())) + return false; + break; + case 3: + if (!getSchedule().equals(other.getSchedule())) + return false; + break; + case 4: + if (!getEndpointLocation().equals(other.getEndpointLocation())) + return false; + break; + case 5: + if (!getEndpointPriority().equals(other.getEndpointPriority())) + return false; + break; + case 6: + if (!getSlaCapacity().equals(other.getSlaCapacity())) + return false; + break; + case 7: + if (!getSlaLatency().equals(other.getSlaLatency())) + return false; + break; + case 8: + if (!getSlaAvailability().equals(other.getSlaAvailability())) + return false; + break; + case 9: + if (!getSlaIsolation().equals(other.getSlaIsolation())) + return false; + break; + case 10: + if (!getExclusions().equals(other.getExclusions())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - java.util.List - getLinkEndpointIdsList(); - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointId getLinkEndpointIds(int index); - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - int getLinkEndpointIdsCount(); - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - java.util.List - getLinkEndpointIdsOrBuilderList(); - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.Link} - */ - public static final class Link extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Link) - LinkOrBuilder { - private static final long serialVersionUID = 0L; - // Use Link.newBuilder() to construct. - private Link(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Link() { - name_ = ""; - linkEndpointIds_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + switch(constraintCase_) { + case 2: + hash = (37 * hash) + CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + getCustom().hashCode(); + break; + case 3: + hash = (37 * hash) + SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getSchedule().hashCode(); + break; + case 4: + hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getEndpointLocation().hashCode(); + break; + case 5: + hash = (37 * hash) + ENDPOINT_PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getEndpointPriority().hashCode(); + break; + case 6: + hash = (37 * hash) + SLA_CAPACITY_FIELD_NUMBER; + hash = (53 * hash) + getSlaCapacity().hashCode(); + break; + case 7: + hash = (37 * hash) + SLA_LATENCY_FIELD_NUMBER; + hash = (53 * hash) + getSlaLatency().hashCode(); + break; + case 8: + hash = (37 * hash) + SLA_AVAILABILITY_FIELD_NUMBER; + hash = (53 * hash) + getSlaAvailability().hashCode(); + break; + case 9: + hash = (37 * hash) + SLA_ISOLATION_FIELD_NUMBER; + hash = (53 * hash) + getSlaIsolation().hashCode(); + break; + case 10: + hash = (37 * hash) + EXCLUSIONS_FIELD_NUMBER; + hash = (53 * hash) + getExclusions().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Link(); - } + public static context.ContextOuterClass.Constraint parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @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(); - mutable_bitField0_ |= 0x00000001; - } - linkEndpointIds_.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)) { - 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; - } + public static context.ContextOuterClass.Constraint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Link_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Link.class, context.ContextOuterClass.Link.Builder.class); - } + public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int LINK_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.LinkId linkId_; - /** - * .context.LinkId link_id = 1; - * @return Whether the linkId field is set. - */ - @java.lang.Override - public boolean hasLinkId() { - return linkId_ != null; - } - /** - * .context.LinkId link_id = 1; - * @return The linkId. - */ - @java.lang.Override - public context.ContextOuterClass.LinkId getLinkId() { - return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; - } - /** - * .context.LinkId link_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { - return getLinkId(); - } + public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static context.ContextOuterClass.Constraint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 3; - private java.util.List linkEndpointIds_; - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List getLinkEndpointIdsList() { - return linkEndpointIds_; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List - getLinkEndpointIdsOrBuilderList() { - return linkEndpointIds_; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - @java.lang.Override - public int getLinkEndpointIdsCount() { - return linkEndpointIds_.size(); - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { - return linkEndpointIds_.get(index); - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder( - int index) { - return linkEndpointIds_.get(index); - } + public static context.ContextOuterClass.Constraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (linkId_ != null) { - output.writeMessage(1, getLinkId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - for (int i = 0; i < linkEndpointIds_.size(); i++) { - output.writeMessage(3, linkEndpointIds_.get(i)); - } - unknownFields.writeTo(output); - } + public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (linkId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLinkId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - for (int i = 0; i < linkEndpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, linkEndpointIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Link)) { - return super.equals(obj); - } - context.ContextOuterClass.Link other = (context.ContextOuterClass.Link) obj; - - if (hasLinkId() != other.hasLinkId()) return false; - if (hasLinkId()) { - if (!getLinkId() - .equals(other.getLinkId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getLinkEndpointIdsList() - .equals(other.getLinkEndpointIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLinkId()) { - hash = (37 * hash) + LINK_ID_FIELD_NUMBER; - hash = (53 * hash) + getLinkId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getLinkEndpointIdsCount() > 0) { - hash = (37 * hash) + LINK_ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getLinkEndpointIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.Constraint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public static context.ContextOuterClass.Link parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Link parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Link parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Link parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Link parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Link parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Link parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Link parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Link parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Link parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Link parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Link parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Link prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Link} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Link) - context.ContextOuterClass.LinkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Link_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Link_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Link.class, context.ContextOuterClass.Link.Builder.class); - } - - // 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; - linkIdBuilder_ = null; - } - name_ = ""; - - if (linkEndpointIdsBuilder_ == null) { - linkEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - linkEndpointIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Link_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Link getDefaultInstanceForType() { - return context.ContextOuterClass.Link.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Link build() { - context.ContextOuterClass.Link result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - if (linkEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.linkEndpointIds_ = linkEndpointIds_; - } else { - result.linkEndpointIds_ = linkEndpointIdsBuilder_.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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Link) { - return mergeFrom((context.ContextOuterClass.Link)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Link other) { - if (other == context.ContextOuterClass.Link.getDefaultInstance()) return this; - if (other.hasLinkId()) { - mergeLinkId(other.getLinkId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (linkEndpointIdsBuilder_ == null) { - if (!other.linkEndpointIds_.isEmpty()) { - if (linkEndpointIds_.isEmpty()) { - linkEndpointIds_ = other.linkEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.addAll(other.linkEndpointIds_); - } - onChanged(); - } - } else { - if (!other.linkEndpointIds_.isEmpty()) { - if (linkEndpointIdsBuilder_.isEmpty()) { - linkEndpointIdsBuilder_.dispose(); - linkEndpointIdsBuilder_ = null; - linkEndpointIds_ = other.linkEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - linkEndpointIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLinkEndpointIdsFieldBuilder() : null; - } else { - linkEndpointIdsBuilder_.addAllMessages(other.linkEndpointIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Link) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private context.ContextOuterClass.LinkId linkId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> linkIdBuilder_; - /** - * .context.LinkId link_id = 1; - * @return Whether the linkId field is set. - */ - public boolean hasLinkId() { - return linkIdBuilder_ != null || linkId_ != null; - } - /** - * .context.LinkId link_id = 1; - * @return The linkId. - */ - public context.ContextOuterClass.LinkId getLinkId() { - if (linkIdBuilder_ == null) { - return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; - } else { - return linkIdBuilder_.getMessage(); - } - } - /** - * .context.LinkId link_id = 1; - */ - public Builder setLinkId(context.ContextOuterClass.LinkId value) { - if (linkIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - linkId_ = value; - onChanged(); - } else { - linkIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.LinkId link_id = 1; - */ - public Builder setLinkId( - context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdBuilder_ == null) { - linkId_ = builderForValue.build(); - onChanged(); - } else { - linkIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.LinkId link_id = 1; - */ - public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { - if (linkIdBuilder_ == null) { - if (linkId_ != null) { - linkId_ = - context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); - } else { - linkId_ = value; - } - onChanged(); - } else { - linkIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.LinkId link_id = 1; - */ - public Builder clearLinkId() { - if (linkIdBuilder_ == null) { - linkId_ = null; - onChanged(); - } else { - linkId_ = null; - linkIdBuilder_ = null; - } - - return this; - } - /** - * .context.LinkId link_id = 1; - */ - public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { - - onChanged(); - return getLinkIdFieldBuilder().getBuilder(); - } - /** - * .context.LinkId link_id = 1; - */ - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { - if (linkIdBuilder_ != null) { - return linkIdBuilder_.getMessageOrBuilder(); - } else { - return linkId_ == null ? - context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; - } - } - /** - * .context.LinkId link_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> - getLinkIdFieldBuilder() { - if (linkIdBuilder_ == null) { - linkIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder>( - getLinkId(), - getParentForChildren(), - isClean()); - linkId_ = null; - } - return linkIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List linkEndpointIds_ = - java.util.Collections.emptyList(); - private void ensureLinkEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - linkEndpointIds_ = new java.util.ArrayList(linkEndpointIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> linkEndpointIdsBuilder_; - - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public java.util.List getLinkEndpointIdsList() { - if (linkEndpointIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(linkEndpointIds_); - } else { - return linkEndpointIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public int getLinkEndpointIdsCount() { - if (linkEndpointIdsBuilder_ == null) { - return linkEndpointIds_.size(); - } else { - return linkEndpointIdsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId getLinkEndpointIds(int index) { - if (linkEndpointIdsBuilder_ == null) { - return linkEndpointIds_.get(index); - } else { - return linkEndpointIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder setLinkEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (linkEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.set(index, value); - onChanged(); - } else { - linkEndpointIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder setLinkEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (linkEndpointIdsBuilder_ == null) { - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.set(index, builderForValue.build()); - onChanged(); - } else { - linkEndpointIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder addLinkEndpointIds(context.ContextOuterClass.EndPointId value) { - if (linkEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.add(value); - onChanged(); - } else { - linkEndpointIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder addLinkEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (linkEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.add(index, value); - onChanged(); - } else { - linkEndpointIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder addLinkEndpointIds( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (linkEndpointIdsBuilder_ == null) { - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.add(builderForValue.build()); - onChanged(); - } else { - linkEndpointIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder addLinkEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (linkEndpointIdsBuilder_ == null) { - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.add(index, builderForValue.build()); - onChanged(); - } else { - linkEndpointIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder addAllLinkEndpointIds( - java.lang.Iterable values) { - if (linkEndpointIdsBuilder_ == null) { - ensureLinkEndpointIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, linkEndpointIds_); - onChanged(); - } else { - linkEndpointIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder clearLinkEndpointIds() { - if (linkEndpointIdsBuilder_ == null) { - linkEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - linkEndpointIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public Builder removeLinkEndpointIds(int index) { - if (linkEndpointIdsBuilder_ == null) { - ensureLinkEndpointIdsIsMutable(); - linkEndpointIds_.remove(index); - onChanged(); - } else { - linkEndpointIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder getLinkEndpointIdsBuilder( - int index) { - return getLinkEndpointIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getLinkEndpointIdsOrBuilder( - int index) { - if (linkEndpointIdsBuilder_ == null) { - return linkEndpointIds_.get(index); } else { - return linkEndpointIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public java.util.List - getLinkEndpointIdsOrBuilderList() { - if (linkEndpointIdsBuilder_ != null) { - return linkEndpointIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(linkEndpointIds_); - } - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder() { - return getLinkEndpointIdsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addLinkEndpointIdsBuilder( - int index) { - return getLinkEndpointIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId link_endpoint_ids = 3; - */ - public java.util.List - getLinkEndpointIdsBuilderList() { - return getLinkEndpointIdsFieldBuilder().getBuilderList(); - } - 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()); - linkEndpointIds_ = null; - } - return linkEndpointIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Link) - } + public static Builder newBuilder(context.ContextOuterClass.Constraint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - // @@protoc_insertion_point(class_scope:context.Link) - private static final context.ContextOuterClass.Link DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Link(); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static context.ContextOuterClass.Link getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * Protobuf type {@code context.Constraint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Constraint) + context.ContextOuterClass.ConstraintOrBuilder { - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Constraint_descriptor; + } - @java.lang.Override - public context.ContextOuterClass.Link getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class); + } - } + // Construct using context.ContextOuterClass.Constraint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - public interface LinkIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.LinkIdList) - com.google.protobuf.MessageOrBuilder { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - /** - * repeated .context.LinkId link_ids = 1; - */ - java.util.List - getLinkIdsList(); - /** - * repeated .context.LinkId link_ids = 1; - */ - context.ContextOuterClass.LinkId getLinkIds(int index); - /** - * repeated .context.LinkId link_ids = 1; - */ - int getLinkIdsCount(); - /** - * repeated .context.LinkId link_ids = 1; - */ - java.util.List - getLinkIdsOrBuilderList(); - /** - * repeated .context.LinkId link_ids = 1; - */ - context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.LinkIdList} - */ - public static final class LinkIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.LinkIdList) - LinkIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use LinkIdList.newBuilder() to construct. - private LinkIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LinkIdList() { - linkIds_ = java.util.Collections.emptyList(); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LinkIdList(); - } + @java.lang.Override + public Builder clear() { + super.clear(); + action_ = 0; + constraintCase_ = 0; + constraint_ = null; + return this; + } - @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(); - 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; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Constraint_descriptor; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkIdList.class, context.ContextOuterClass.LinkIdList.Builder.class); - } + @java.lang.Override + public context.ContextOuterClass.Constraint getDefaultInstanceForType() { + return context.ContextOuterClass.Constraint.getDefaultInstance(); + } - public static final int LINK_IDS_FIELD_NUMBER = 1; - private java.util.List linkIds_; - /** - * repeated .context.LinkId link_ids = 1; - */ - @java.lang.Override - public java.util.List getLinkIdsList() { - return linkIds_; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - @java.lang.Override - public java.util.List - getLinkIdsOrBuilderList() { - return linkIds_; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - @java.lang.Override - public int getLinkIdsCount() { - return linkIds_.size(); - } - /** - * repeated .context.LinkId link_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.LinkId getLinkIds(int index) { - return linkIds_.get(index); - } - /** - * repeated .context.LinkId link_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index) { - return linkIds_.get(index); - } + @java.lang.Override + public context.ContextOuterClass.Constraint build() { + context.ContextOuterClass.Constraint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @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 (constraintCase_ == 3) { + if (scheduleBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = scheduleBuilder_.build(); + } + } + if (constraintCase_ == 4) { + if (endpointLocationBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = endpointLocationBuilder_.build(); + } + } + if (constraintCase_ == 5) { + if (endpointPriorityBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = endpointPriorityBuilder_.build(); + } + } + if (constraintCase_ == 6) { + if (slaCapacityBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = slaCapacityBuilder_.build(); + } + } + if (constraintCase_ == 7) { + if (slaLatencyBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = slaLatencyBuilder_.build(); + } + } + if (constraintCase_ == 8) { + if (slaAvailabilityBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = slaAvailabilityBuilder_.build(); + } + } + if (constraintCase_ == 9) { + if (slaIsolationBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = slaIsolationBuilder_.build(); + } + } + if (constraintCase_ == 10) { + if (exclusionsBuilder_ == null) { + result.constraint_ = constraint_; + } else { + result.constraint_ = exclusionsBuilder_.build(); + } + } + result.constraintCase_ = constraintCase_; + onBuilt(); + return result; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < linkIds_.size(); i++) { - output.writeMessage(1, linkIds_.get(i)); - } - unknownFields.writeTo(output); - } + @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 int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < linkIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, linkIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.LinkIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.LinkIdList other = (context.ContextOuterClass.LinkIdList) obj; - - if (!getLinkIdsList() - .equals(other.getLinkIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getLinkIdsCount() > 0) { - hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; - hash = (53 * hash) + getLinkIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - public static context.ContextOuterClass.LinkIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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 newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.LinkIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.Constraint) { + return mergeFrom((context.ContextOuterClass.Constraint) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.LinkIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.LinkIdList) - context.ContextOuterClass.LinkIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_LinkIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkIdList.class, context.ContextOuterClass.LinkIdList.Builder.class); - } - - // 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(); - if (linkIdsBuilder_ == null) { - linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - linkIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_LinkIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.LinkIdList getDefaultInstanceForType() { - return context.ContextOuterClass.LinkIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.LinkIdList build() { - context.ContextOuterClass.LinkIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.LinkIdList buildPartial() { - context.ContextOuterClass.LinkIdList result = new context.ContextOuterClass.LinkIdList(this); - int from_bitField0_ = bitField0_; - if (linkIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.LinkIdList) { - return mergeFrom((context.ContextOuterClass.LinkIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.LinkIdList other) { - if (other == context.ContextOuterClass.LinkIdList.getDefaultInstance()) return this; - if (linkIdsBuilder_ == null) { - if (!other.linkIds_.isEmpty()) { - if (linkIds_.isEmpty()) { - linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLinkIdsIsMutable(); - linkIds_.addAll(other.linkIds_); - } - onChanged(); - } - } else { - if (!other.linkIds_.isEmpty()) { - if (linkIdsBuilder_.isEmpty()) { - linkIdsBuilder_.dispose(); - linkIdsBuilder_ = null; - linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000001); - linkIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLinkIdsFieldBuilder() : null; - } else { - linkIdsBuilder_.addAllMessages(other.linkIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List linkIds_ = - java.util.Collections.emptyList(); - private void ensureLinkIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - linkIds_ = new java.util.ArrayList(linkIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> linkIdsBuilder_; - - /** - * repeated .context.LinkId link_ids = 1; - */ - public java.util.List getLinkIdsList() { - if (linkIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(linkIds_); - } else { - return linkIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public int getLinkIdsCount() { - if (linkIdsBuilder_ == null) { - return linkIds_.size(); - } else { - return linkIdsBuilder_.getCount(); - } - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public context.ContextOuterClass.LinkId getLinkIds(int index) { - if (linkIdsBuilder_ == null) { - return linkIds_.get(index); - } else { - return linkIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder setLinkIds( - int index, context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.set(index, value); - onChanged(); - } else { - linkIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder setLinkIds( - int index, context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.set(index, builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder addLinkIds(context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.add(value); - onChanged(); - } else { - linkIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder addLinkIds( - int index, context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.add(index, value); - onChanged(); - } else { - linkIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder addLinkIds( - context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.add(builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder addLinkIds( - int index, context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.add(index, builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder addAllLinkIds( - java.lang.Iterable values) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, linkIds_); - onChanged(); - } else { - linkIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder clearLinkIds() { - if (linkIdsBuilder_ == null) { - linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - linkIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public Builder removeLinkIds(int index) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.remove(index); - onChanged(); - } else { - linkIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public context.ContextOuterClass.LinkId.Builder getLinkIdsBuilder( - int index) { - return getLinkIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index) { - if (linkIdsBuilder_ == null) { - return linkIds_.get(index); } else { - return linkIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public java.util.List - getLinkIdsOrBuilderList() { - if (linkIdsBuilder_ != null) { - return linkIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(linkIds_); - } - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder() { - return getLinkIdsFieldBuilder().addBuilder( - context.ContextOuterClass.LinkId.getDefaultInstance()); - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder( - int index) { - return getLinkIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.LinkId.getDefaultInstance()); - } - /** - * repeated .context.LinkId link_ids = 1; - */ - public java.util.List - getLinkIdsBuilderList() { - return getLinkIdsFieldBuilder().getBuilderList(); - } - 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_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - linkIds_ = null; - } - return linkIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.LinkIdList) - } + public Builder mergeFrom(context.ContextOuterClass.Constraint other) { + if (other == context.ContextOuterClass.Constraint.getDefaultInstance()) + return this; + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + switch(other.getConstraintCase()) { + case CUSTOM: + { + mergeCustom(other.getCustom()); + break; + } + case SCHEDULE: + { + mergeSchedule(other.getSchedule()); + break; + } + case ENDPOINT_LOCATION: + { + mergeEndpointLocation(other.getEndpointLocation()); + break; + } + case ENDPOINT_PRIORITY: + { + mergeEndpointPriority(other.getEndpointPriority()); + break; + } + case SLA_CAPACITY: + { + mergeSlaCapacity(other.getSlaCapacity()); + break; + } + case SLA_LATENCY: + { + mergeSlaLatency(other.getSlaLatency()); + break; + } + case SLA_AVAILABILITY: + { + mergeSlaAvailability(other.getSlaAvailability()); + break; + } + case SLA_ISOLATION: + { + mergeSlaIsolation(other.getSlaIsolation()); + break; + } + case EXCLUSIONS: + { + mergeExclusions(other.getExclusions()); + break; + } + case CONSTRAINT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:context.LinkIdList) - private static final context.ContextOuterClass.LinkIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.LinkIdList(); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static context.ContextOuterClass.LinkIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Constraint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private int constraintCase_ = 0; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private java.lang.Object constraint_; - @java.lang.Override - public context.ContextOuterClass.LinkIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public ConstraintCase getConstraintCase() { + return ConstraintCase.forNumber(constraintCase_); + } - } + public Builder clearConstraint() { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + return this; + } - public interface LinkListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.LinkList) - com.google.protobuf.MessageOrBuilder { + private int action_ = 0; - /** - * repeated .context.Link links = 1; - */ - java.util.List - getLinksList(); - /** - * repeated .context.Link links = 1; - */ - context.ContextOuterClass.Link getLinks(int index); - /** - * repeated .context.Link links = 1; - */ - int getLinksCount(); - /** - * repeated .context.Link links = 1; - */ - java.util.List - getLinksOrBuilderList(); - /** - * repeated .context.Link links = 1; - */ - context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder( - int index); - } - /** - * Protobuf type {@code context.LinkList} - */ - public static final class LinkList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.LinkList) - LinkListOrBuilder { - private static final long serialVersionUID = 0L; - // Use LinkList.newBuilder() to construct. - private LinkList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LinkList() { - links_ = java.util.Collections.emptyList(); - } + /** + * .context.ConstraintActionEnum action = 1; + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LinkList(); - } + /** + * .context.ConstraintActionEnum action = 1; + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + action_ = value; + onChanged(); + return this; + } - @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(); - 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; - } + /** + * .context.ConstraintActionEnum action = 1; + * @return The action. + */ + @java.lang.Override + public context.ContextOuterClass.ConstraintActionEnum getAction() { + @SuppressWarnings("deprecation") + context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.valueOf(action_); + return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkList.class, context.ContextOuterClass.LinkList.Builder.class); - } + /** + * .context.ConstraintActionEnum action = 1; + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(context.ContextOuterClass.ConstraintActionEnum value) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value.getNumber(); + onChanged(); + return this; + } - public static final int LINKS_FIELD_NUMBER = 1; - private java.util.List links_; - /** - * repeated .context.Link links = 1; - */ - @java.lang.Override - public java.util.List getLinksList() { - return links_; - } - /** - * repeated .context.Link links = 1; - */ - @java.lang.Override - public java.util.List - getLinksOrBuilderList() { - return links_; - } - /** - * repeated .context.Link links = 1; - */ - @java.lang.Override - public int getLinksCount() { - return links_.size(); - } - /** - * repeated .context.Link links = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Link getLinks(int index) { - return links_.get(index); - } - /** - * repeated .context.Link links = 1; - */ - @java.lang.Override - public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder( - int index) { - return links_.get(index); - } + /** + * .context.ConstraintActionEnum action = 1; + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = 0; + onChanged(); + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private com.google.protobuf.SingleFieldBuilderV3 customBuilder_; - memoizedIsInitialized = 1; - return true; - } + /** + * .context.Constraint_Custom custom = 2; + * @return Whether the custom field is set. + */ + @java.lang.Override + public boolean hasCustom() { + return constraintCase_ == 2; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < links_.size(); i++) { - output.writeMessage(1, links_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * .context.Constraint_Custom custom = 2; + * @return The custom. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Custom getCustom() { + if (customBuilder_ == null) { + if (constraintCase_ == 2) { + return (context.ContextOuterClass.Constraint_Custom) constraint_; + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } else { + if (constraintCase_ == 2) { + return customBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < links_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, links_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Constraint_Custom custom = 2; + */ + public Builder setCustom(context.ContextOuterClass.Constraint_Custom value) { + if (customBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + customBuilder_.setMessage(value); + } + constraintCase_ = 2; + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.LinkList)) { - return super.equals(obj); - } - context.ContextOuterClass.LinkList other = (context.ContextOuterClass.LinkList) obj; - - if (!getLinksList() - .equals(other.getLinksList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Constraint_Custom custom = 2; + */ + public Builder setCustom(context.ContextOuterClass.Constraint_Custom.Builder builderForValue) { + if (customBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + customBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 2; + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getLinksCount() > 0) { - hash = (37 * hash) + LINKS_FIELD_NUMBER; - hash = (53 * hash) + getLinksList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Constraint_Custom custom = 2; + */ + public Builder mergeCustom(context.ContextOuterClass.Constraint_Custom value) { + if (customBuilder_ == null) { + if (constraintCase_ == 2 && constraint_ != context.ContextOuterClass.Constraint_Custom.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_Custom.newBuilder((context.ContextOuterClass.Constraint_Custom) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 2) { + customBuilder_.mergeFrom(value); + } + customBuilder_.setMessage(value); + } + constraintCase_ = 2; + return this; + } - public static context.ContextOuterClass.LinkList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Constraint_Custom custom = 2; + */ + public Builder clearCustom() { + if (customBuilder_ == null) { + if (constraintCase_ == 2) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 2) { + constraintCase_ = 0; + constraint_ = null; + } + customBuilder_.clear(); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.LinkList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Constraint_Custom custom = 2; + */ + public context.ContextOuterClass.Constraint_Custom.Builder getCustomBuilder() { + return getCustomFieldBuilder().getBuilder(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.LinkList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.LinkList) - context.ContextOuterClass.LinkListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_LinkList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkList.class, context.ContextOuterClass.LinkList.Builder.class); - } - - // 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(); - if (linksBuilder_ == null) { - links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - linksBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_LinkList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.LinkList getDefaultInstanceForType() { - return context.ContextOuterClass.LinkList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.LinkList build() { - context.ContextOuterClass.LinkList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.LinkList buildPartial() { - context.ContextOuterClass.LinkList result = new context.ContextOuterClass.LinkList(this); - int from_bitField0_ = bitField0_; - if (linksBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - links_ = java.util.Collections.unmodifiableList(links_); - bitField0_ = (bitField0_ & ~0x00000001); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.LinkList) { - return mergeFrom((context.ContextOuterClass.LinkList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.LinkList other) { - if (other == context.ContextOuterClass.LinkList.getDefaultInstance()) return this; - if (linksBuilder_ == null) { - if (!other.links_.isEmpty()) { - if (links_.isEmpty()) { - links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLinksIsMutable(); - links_.addAll(other.links_); - } - onChanged(); - } - } else { - if (!other.links_.isEmpty()) { - if (linksBuilder_.isEmpty()) { - linksBuilder_.dispose(); - linksBuilder_ = null; - links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000001); - linksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLinksFieldBuilder() : null; - } else { - linksBuilder_.addAllMessages(other.links_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List links_ = - java.util.Collections.emptyList(); - private void ensureLinksIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - links_ = new java.util.ArrayList(links_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Link, context.ContextOuterClass.Link.Builder, context.ContextOuterClass.LinkOrBuilder> linksBuilder_; - - /** - * repeated .context.Link links = 1; - */ - public java.util.List getLinksList() { - if (linksBuilder_ == null) { - return java.util.Collections.unmodifiableList(links_); - } else { - return linksBuilder_.getMessageList(); - } - } - /** - * repeated .context.Link links = 1; - */ - public int getLinksCount() { - if (linksBuilder_ == null) { - return links_.size(); - } else { - return linksBuilder_.getCount(); - } - } - /** - * repeated .context.Link links = 1; - */ - public context.ContextOuterClass.Link getLinks(int index) { - if (linksBuilder_ == null) { - return links_.get(index); - } else { - return linksBuilder_.getMessage(index); - } - } - /** - * repeated .context.Link links = 1; - */ - public Builder setLinks( - int index, context.ContextOuterClass.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.set(index, value); - onChanged(); - } else { - linksBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder setLinks( - int index, context.ContextOuterClass.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.set(index, builderForValue.build()); - onChanged(); - } else { - linksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder addLinks(context.ContextOuterClass.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.add(value); - onChanged(); - } else { - linksBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder addLinks( - int index, context.ContextOuterClass.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.add(index, value); - onChanged(); - } else { - linksBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder addLinks( - context.ContextOuterClass.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.add(builderForValue.build()); - onChanged(); - } else { - linksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder addLinks( - int index, context.ContextOuterClass.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.add(index, builderForValue.build()); - onChanged(); - } else { - linksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder addAllLinks( - java.lang.Iterable values) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, links_); - onChanged(); - } else { - linksBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder clearLinks() { - if (linksBuilder_ == null) { - links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - linksBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public Builder removeLinks(int index) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.remove(index); - onChanged(); - } else { - linksBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Link links = 1; - */ - public context.ContextOuterClass.Link.Builder getLinksBuilder( - int index) { - return getLinksFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Link links = 1; - */ - public context.ContextOuterClass.LinkOrBuilder getLinksOrBuilder( - int index) { - if (linksBuilder_ == null) { - return links_.get(index); } else { - return linksBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Link links = 1; - */ - public java.util.List - getLinksOrBuilderList() { - if (linksBuilder_ != null) { - return linksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(links_); - } - } - /** - * repeated .context.Link links = 1; - */ - public context.ContextOuterClass.Link.Builder addLinksBuilder() { - return getLinksFieldBuilder().addBuilder( - context.ContextOuterClass.Link.getDefaultInstance()); - } - /** - * repeated .context.Link links = 1; - */ - public context.ContextOuterClass.Link.Builder addLinksBuilder( - int index) { - return getLinksFieldBuilder().addBuilder( - index, context.ContextOuterClass.Link.getDefaultInstance()); - } - /** - * repeated .context.Link links = 1; - */ - public java.util.List - getLinksBuilderList() { - return getLinksFieldBuilder().getBuilderList(); - } - 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_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - links_ = null; - } - return linksBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.LinkList) - } + /** + * .context.Constraint_Custom custom = 2; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() { + if ((constraintCase_ == 2) && (customBuilder_ != null)) { + return customBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 2) { + return (context.ContextOuterClass.Constraint_Custom) constraint_; + } + return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + } - // @@protoc_insertion_point(class_scope:context.LinkList) - private static final context.ContextOuterClass.LinkList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.LinkList(); - } + /** + * .context.Constraint_Custom custom = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getCustomFieldBuilder() { + if (customBuilder_ == null) { + if (!(constraintCase_ == 2)) { + constraint_ = context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); + } + customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Custom) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 2; + onChanged(); + ; + return customBuilder_; + } - public static context.ContextOuterClass.LinkList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3 scheduleBuilder_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Constraint_Schedule schedule = 3; + * @return Whether the schedule field is set. + */ + @java.lang.Override + public boolean hasSchedule() { + return constraintCase_ == 3; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Constraint_Schedule schedule = 3; + * @return The schedule. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Schedule getSchedule() { + if (scheduleBuilder_ == null) { + if (constraintCase_ == 3) { + return (context.ContextOuterClass.Constraint_Schedule) constraint_; + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } else { + if (constraintCase_ == 3) { + return scheduleBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + } - @java.lang.Override - public context.ContextOuterClass.LinkList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_Schedule schedule = 3; + */ + public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule value) { + if (scheduleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + scheduleBuilder_.setMessage(value); + } + constraintCase_ = 3; + return this; + } - } + /** + * .context.Constraint_Schedule schedule = 3; + */ + public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule.Builder builderForValue) { + if (scheduleBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + scheduleBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 3; + return this; + } - public interface LinkEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.LinkEvent) - com.google.protobuf.MessageOrBuilder { + /** + * .context.Constraint_Schedule schedule = 3; + */ + public Builder mergeSchedule(context.ContextOuterClass.Constraint_Schedule value) { + if (scheduleBuilder_ == null) { + if (constraintCase_ == 3 && constraint_ != context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_Schedule.newBuilder((context.ContextOuterClass.Constraint_Schedule) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 3) { + scheduleBuilder_.mergeFrom(value); + } + scheduleBuilder_.setMessage(value); + } + constraintCase_ = 3; + return this; + } - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + /** + * .context.Constraint_Schedule schedule = 3; + */ + public Builder clearSchedule() { + if (scheduleBuilder_ == null) { + if (constraintCase_ == 3) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 3) { + constraintCase_ = 0; + constraint_ = null; + } + scheduleBuilder_.clear(); + } + return this; + } - /** - * .context.LinkId link_id = 2; - * @return Whether the linkId field is set. - */ - boolean hasLinkId(); - /** - * .context.LinkId link_id = 2; - * @return The linkId. - */ - context.ContextOuterClass.LinkId getLinkId(); - /** - * .context.LinkId link_id = 2; - */ - context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder(); - } - /** - * Protobuf type {@code context.LinkEvent} - */ - public static final class LinkEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.LinkEvent) - LinkEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use LinkEvent.newBuilder() to construct. - private LinkEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LinkEvent() { - } + /** + * .context.Constraint_Schedule schedule = 3; + */ + public context.ContextOuterClass.Constraint_Schedule.Builder getScheduleBuilder() { + return getScheduleFieldBuilder().getBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LinkEvent(); - } + /** + * .context.Constraint_Schedule schedule = 3; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() { + if ((constraintCase_ == 3) && (scheduleBuilder_ != null)) { + return scheduleBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 3) { + return (context.ContextOuterClass.Constraint_Schedule) constraint_; + } + return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + } - @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; - } + /** + * .context.Constraint_Schedule schedule = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getScheduleFieldBuilder() { + if (scheduleBuilder_ == null) { + if (!(constraintCase_ == 3)) { + constraint_ = context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); + } + scheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Schedule) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 3; + onChanged(); + ; + return scheduleBuilder_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkEvent.class, context.ContextOuterClass.LinkEvent.Builder.class); - } + private com.google.protobuf.SingleFieldBuilderV3 endpointLocationBuilder_; - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return Whether the endpointLocation field is set. + */ + @java.lang.Override + public boolean hasEndpointLocation() { + return constraintCase_ == 4; + } - public static final int LINK_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.LinkId linkId_; - /** - * .context.LinkId link_id = 2; - * @return Whether the linkId field is set. - */ - @java.lang.Override - public boolean hasLinkId() { - return linkId_ != null; - } - /** - * .context.LinkId link_id = 2; - * @return The linkId. - */ - @java.lang.Override - public context.ContextOuterClass.LinkId getLinkId() { - return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; - } - /** - * .context.LinkId link_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { - return getLinkId(); - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + * @return The endpointLocation. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() { + if (endpointLocationBuilder_ == null) { + if (constraintCase_ == 4) { + return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } else { + if (constraintCase_ == 4) { + return endpointLocationBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) { + if (endpointLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + endpointLocationBuilder_.setMessage(value); + } + constraintCase_ = 4; + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation.Builder builderForValue) { + if (endpointLocationBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + endpointLocationBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 4; + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (linkId_ != null) { - output.writeMessage(2, getLinkId()); - } - unknownFields.writeTo(output); - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public Builder mergeEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) { + if (endpointLocationBuilder_ == null) { + if (constraintCase_ == 4 && constraint_ != context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.newBuilder((context.ContextOuterClass.Constraint_EndPointLocation) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 4) { + endpointLocationBuilder_.mergeFrom(value); + } + endpointLocationBuilder_.setMessage(value); + } + constraintCase_ = 4; + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (linkId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getLinkId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public Builder clearEndpointLocation() { + if (endpointLocationBuilder_ == null) { + if (constraintCase_ == 4) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 4) { + constraintCase_ = 0; + constraint_ = null; + } + endpointLocationBuilder_.clear(); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.LinkEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.LinkEvent other = (context.ContextOuterClass.LinkEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasLinkId() != other.hasLinkId()) return false; - if (hasLinkId()) { - if (!getLinkId() - .equals(other.getLinkId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + public context.ContextOuterClass.Constraint_EndPointLocation.Builder getEndpointLocationBuilder() { + return getEndpointLocationFieldBuilder().getBuilder(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasLinkId()) { - hash = (37 * hash) + LINK_ID_FIELD_NUMBER; - hash = (53 * hash) + getLinkId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() { + if ((constraintCase_ == 4) && (endpointLocationBuilder_ != null)) { + return endpointLocationBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 4) { + return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + } - public static context.ContextOuterClass.LinkEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.LinkEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.LinkEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Constraint_EndPointLocation endpoint_location = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointLocationFieldBuilder() { + if (endpointLocationBuilder_ == null) { + if (!(constraintCase_ == 4)) { + constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); + } + endpointLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_EndPointLocation) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 4; + onChanged(); + ; + return endpointLocationBuilder_; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.LinkEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private com.google.protobuf.SingleFieldBuilderV3 endpointPriorityBuilder_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.LinkEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.LinkEvent) - context.ContextOuterClass.LinkEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_LinkEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_LinkEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.LinkEvent.class, context.ContextOuterClass.LinkEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (linkIdBuilder_ == null) { - linkId_ = null; - } else { - linkId_ = null; - linkIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_LinkEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.LinkEvent getDefaultInstanceForType() { - return context.ContextOuterClass.LinkEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.LinkEvent build() { - context.ContextOuterClass.LinkEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.LinkEvent) { - return mergeFrom((context.ContextOuterClass.LinkEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.LinkEvent other) { - if (other == context.ContextOuterClass.LinkEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasLinkId()) { - mergeLinkId(other.getLinkId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.LinkId linkId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> linkIdBuilder_; - /** - * .context.LinkId link_id = 2; - * @return Whether the linkId field is set. - */ - public boolean hasLinkId() { - return linkIdBuilder_ != null || linkId_ != null; - } - /** - * .context.LinkId link_id = 2; - * @return The linkId. - */ - public context.ContextOuterClass.LinkId getLinkId() { - if (linkIdBuilder_ == null) { - return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; - } else { - return linkIdBuilder_.getMessage(); - } - } - /** - * .context.LinkId link_id = 2; - */ - public Builder setLinkId(context.ContextOuterClass.LinkId value) { - if (linkIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - linkId_ = value; - onChanged(); - } else { - linkIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.LinkId link_id = 2; - */ - public Builder setLinkId( - context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdBuilder_ == null) { - linkId_ = builderForValue.build(); - onChanged(); - } else { - linkIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.LinkId link_id = 2; - */ - public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { - if (linkIdBuilder_ == null) { - if (linkId_ != null) { - linkId_ = - context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); - } else { - linkId_ = value; - } - onChanged(); - } else { - linkIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.LinkId link_id = 2; - */ - public Builder clearLinkId() { - if (linkIdBuilder_ == null) { - linkId_ = null; - onChanged(); - } else { - linkId_ = null; - linkIdBuilder_ = null; - } - - return this; - } - /** - * .context.LinkId link_id = 2; - */ - public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { - - onChanged(); - return getLinkIdFieldBuilder().getBuilder(); - } - /** - * .context.LinkId link_id = 2; - */ - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { - if (linkIdBuilder_ != null) { - return linkIdBuilder_.getMessageOrBuilder(); - } else { - return linkId_ == null ? - context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; - } - } - /** - * .context.LinkId link_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> - getLinkIdFieldBuilder() { - if (linkIdBuilder_ == null) { - linkIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder>( - getLinkId(), - getParentForChildren(), - isClean()); - linkId_ = null; - } - return linkIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.LinkEvent) - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return Whether the endpointPriority field is set. + */ + @java.lang.Override + public boolean hasEndpointPriority() { + return constraintCase_ == 5; + } - // @@protoc_insertion_point(class_scope:context.LinkEvent) - private static final context.ContextOuterClass.LinkEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.LinkEvent(); - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + * @return The endpointPriority. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() { + if (endpointPriorityBuilder_ == null) { + if (constraintCase_ == 5) { + return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } else { + if (constraintCase_ == 5) { + return endpointPriorityBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + } - public static context.ContextOuterClass.LinkEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) { + if (endpointPriorityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + endpointPriorityBuilder_.setMessage(value); + } + constraintCase_ = 5; + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority.Builder builderForValue) { + if (endpointPriorityBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + endpointPriorityBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 5; + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public Builder mergeEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) { + if (endpointPriorityBuilder_ == null) { + if (constraintCase_ == 5 && constraint_ != context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.newBuilder((context.ContextOuterClass.Constraint_EndPointPriority) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 5) { + endpointPriorityBuilder_.mergeFrom(value); + } + endpointPriorityBuilder_.setMessage(value); + } + constraintCase_ = 5; + return this; + } - @java.lang.Override - public context.ContextOuterClass.LinkEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public Builder clearEndpointPriority() { + if (endpointPriorityBuilder_ == null) { + if (constraintCase_ == 5) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 5) { + constraintCase_ = 0; + constraint_ = null; + } + endpointPriorityBuilder_.clear(); + } + return this; + } - } + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + public context.ContextOuterClass.Constraint_EndPointPriority.Builder getEndpointPriorityBuilder() { + return getEndpointPriorityFieldBuilder().getBuilder(); + } - public interface ServiceIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceId) - com.google.protobuf.MessageOrBuilder { + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() { + if ((constraintCase_ == 5) && (endpointPriorityBuilder_ != null)) { + return endpointPriorityBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 5) { + return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; + } + return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + } - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + /** + * .context.Constraint_EndPointPriority endpoint_priority = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointPriorityFieldBuilder() { + if (endpointPriorityBuilder_ == null) { + if (!(constraintCase_ == 5)) { + constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); + } + endpointPriorityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_EndPointPriority) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 5; + onChanged(); + ; + return endpointPriorityBuilder_; + } - /** - * .context.Uuid service_uuid = 2; - * @return Whether the serviceUuid field is set. - */ - boolean hasServiceUuid(); - /** - * .context.Uuid service_uuid = 2; - * @return The serviceUuid. - */ - context.ContextOuterClass.Uuid getServiceUuid(); - /** - * .context.Uuid service_uuid = 2; - */ - context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder(); - } - /** - *
-   * ----- Service -------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.ServiceId} - */ - public static final class ServiceId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceId) - ServiceIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceId.newBuilder() to construct. - private ServiceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceId() { - } + private com.google.protobuf.SingleFieldBuilderV3 slaCapacityBuilder_; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceId(); - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return Whether the slaCapacity field is set. + */ + @java.lang.Override + public boolean hasSlaCapacity() { + return constraintCase_ == 6; + } - @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; - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + * @return The slaCapacity. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() { + if (slaCapacityBuilder_ == null) { + if (constraintCase_ == 6) { + return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } else { + if (constraintCase_ == 6) { + return slaCapacityBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceId.class, context.ContextOuterClass.ServiceId.Builder.class); - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) { + if (slaCapacityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + slaCapacityBuilder_.setMessage(value); + } + constraintCase_ = 6; + return this; + } - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - /** - * .context.ContextId context_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity.Builder builderForValue) { + if (slaCapacityBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + slaCapacityBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 6; + return this; + } - public static final int SERVICE_UUID_FIELD_NUMBER = 2; - private context.ContextOuterClass.Uuid serviceUuid_; - /** - * .context.Uuid service_uuid = 2; - * @return Whether the serviceUuid field is set. - */ - @java.lang.Override - public boolean hasServiceUuid() { - return serviceUuid_ != null; - } - /** - * .context.Uuid service_uuid = 2; - * @return The serviceUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getServiceUuid() { - return serviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; - } - /** - * .context.Uuid service_uuid = 2; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder() { - return getServiceUuid(); - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + public Builder mergeSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) { + if (slaCapacityBuilder_ == null) { + if (constraintCase_ == 6 && constraint_ != context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.newBuilder((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 6) { + slaCapacityBuilder_.mergeFrom(value); + } + slaCapacityBuilder_.setMessage(value); + } + constraintCase_ = 6; + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + public Builder clearSlaCapacity() { + if (slaCapacityBuilder_ == null) { + if (constraintCase_ == 6) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 6) { + constraintCase_ = 0; + constraint_ = null; + } + slaCapacityBuilder_.clear(); + } + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + public context.ContextOuterClass.Constraint_SLA_Capacity.Builder getSlaCapacityBuilder() { + return getSlaCapacityFieldBuilder().getBuilder(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (serviceUuid_ != null) { - output.writeMessage(2, getServiceUuid()); - } - unknownFields.writeTo(output); - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() { + if ((constraintCase_ == 6) && (slaCapacityBuilder_ != null)) { + return slaCapacityBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 6) { + return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextId()); - } - if (serviceUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getServiceUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Constraint_SLA_Capacity sla_capacity = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSlaCapacityFieldBuilder() { + if (slaCapacityBuilder_ == null) { + if (!(constraintCase_ == 6)) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); + } + slaCapacityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 6; + onChanged(); + ; + return slaCapacityBuilder_; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceId)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceId other = (context.ContextOuterClass.ServiceId) obj; - - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (hasServiceUuid() != other.hasServiceUuid()) return false; - if (hasServiceUuid()) { - if (!getServiceUuid() - .equals(other.getServiceUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private com.google.protobuf.SingleFieldBuilderV3 slaLatencyBuilder_; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - if (hasServiceUuid()) { - hash = (37 * hash) + SERVICE_UUID_FIELD_NUMBER; - hash = (53 * hash) + getServiceUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return Whether the slaLatency field is set. + */ + @java.lang.Override + public boolean hasSlaLatency() { + return constraintCase_ == 7; + } - public static context.ContextOuterClass.ServiceId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + * @return The slaLatency. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { + if (slaLatencyBuilder_ == null) { + if (constraintCase_ == 7) { + return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } else { + if (constraintCase_ == 7) { + return slaLatencyBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { + if (slaLatencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + slaLatencyBuilder_.setMessage(value); + } + constraintCase_ = 7; + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Service -------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.ServiceId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceId) - context.ContextOuterClass.ServiceIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceId.class, context.ContextOuterClass.ServiceId.Builder.class); - } - - // 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; - contextIdBuilder_ = null; - } - if (serviceUuidBuilder_ == null) { - serviceUuid_ = null; - } else { - serviceUuid_ = null; - serviceUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceId getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceId build() { - context.ContextOuterClass.ServiceId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceId) { - return mergeFrom((context.ContextOuterClass.ServiceId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceId other) { - if (other == context.ContextOuterClass.ServiceId.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (other.hasServiceUuid()) { - mergeServiceUuid(other.getServiceUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ContextId contextId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private context.ContextOuterClass.Uuid serviceUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> serviceUuidBuilder_; - /** - * .context.Uuid service_uuid = 2; - * @return Whether the serviceUuid field is set. - */ - public boolean hasServiceUuid() { - return serviceUuidBuilder_ != null || serviceUuid_ != null; - } - /** - * .context.Uuid service_uuid = 2; - * @return The serviceUuid. - */ - public context.ContextOuterClass.Uuid getServiceUuid() { - if (serviceUuidBuilder_ == null) { - return serviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; - } else { - return serviceUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid service_uuid = 2; - */ - public Builder setServiceUuid(context.ContextOuterClass.Uuid value) { - if (serviceUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceUuid_ = value; - onChanged(); - } else { - serviceUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid service_uuid = 2; - */ - public Builder setServiceUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (serviceUuidBuilder_ == null) { - serviceUuid_ = builderForValue.build(); - onChanged(); - } else { - serviceUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid service_uuid = 2; - */ - public Builder mergeServiceUuid(context.ContextOuterClass.Uuid value) { - if (serviceUuidBuilder_ == null) { - if (serviceUuid_ != null) { - serviceUuid_ = - context.ContextOuterClass.Uuid.newBuilder(serviceUuid_).mergeFrom(value).buildPartial(); - } else { - serviceUuid_ = value; - } - onChanged(); - } else { - serviceUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid service_uuid = 2; - */ - public Builder clearServiceUuid() { - if (serviceUuidBuilder_ == null) { - serviceUuid_ = null; - onChanged(); - } else { - serviceUuid_ = null; - serviceUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid service_uuid = 2; - */ - public context.ContextOuterClass.Uuid.Builder getServiceUuidBuilder() { - - onChanged(); - return getServiceUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid service_uuid = 2; - */ - public context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder() { - if (serviceUuidBuilder_ != null) { - return serviceUuidBuilder_.getMessageOrBuilder(); - } else { - return serviceUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; - } - } - /** - * .context.Uuid service_uuid = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getServiceUuidFieldBuilder() { - if (serviceUuidBuilder_ == null) { - serviceUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getServiceUuid(), - getParentForChildren(), - isClean()); - serviceUuid_ = null; - } - return serviceUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceId) - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency.Builder builderForValue) { + if (slaLatencyBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + slaLatencyBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 7; + return this; + } - // @@protoc_insertion_point(class_scope:context.ServiceId) - private static final context.ContextOuterClass.ServiceId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceId(); - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + public Builder mergeSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { + if (slaLatencyBuilder_ == null) { + if (constraintCase_ == 7 && constraint_ != context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.newBuilder((context.ContextOuterClass.Constraint_SLA_Latency) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 7) { + slaLatencyBuilder_.mergeFrom(value); + } + slaLatencyBuilder_.setMessage(value); + } + constraintCase_ = 7; + return this; + } - public static context.ContextOuterClass.ServiceId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + public Builder clearSlaLatency() { + if (slaLatencyBuilder_ == null) { + if (constraintCase_ == 7) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 7) { + constraintCase_ = 0; + constraint_ = null; + } + slaLatencyBuilder_.clear(); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + public context.ContextOuterClass.Constraint_SLA_Latency.Builder getSlaLatencyBuilder() { + return getSlaLatencyFieldBuilder().getBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { + if ((constraintCase_ == 7) && (slaLatencyBuilder_ != null)) { + return slaLatencyBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 7) { + return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } + } - @java.lang.Override - public context.ContextOuterClass.ServiceId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Constraint_SLA_Latency sla_latency = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSlaLatencyFieldBuilder() { + if (slaLatencyBuilder_ == null) { + if (!(constraintCase_ == 7)) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); + } + slaLatencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Latency) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 7; + onChanged(); + ; + return slaLatencyBuilder_; + } - } + private com.google.protobuf.SingleFieldBuilderV3 slaAvailabilityBuilder_; - public interface ServiceOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Service) - com.google.protobuf.MessageOrBuilder { + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return Whether the slaAvailability field is set. + */ + @java.lang.Override + public boolean hasSlaAvailability() { + return constraintCase_ == 8; + } - /** - * .context.ServiceId service_id = 1; - * @return Whether the serviceId field is set. - */ - boolean hasServiceId(); - /** - * .context.ServiceId service_id = 1; - * @return The serviceId. - */ - context.ContextOuterClass.ServiceId getServiceId(); - /** - * .context.ServiceId service_id = 1; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + * @return The slaAvailability. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { + if (slaAvailabilityBuilder_ == null) { + if (constraintCase_ == 8) { + return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } else { + if (constraintCase_ == 8) { + return slaAvailabilityBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { + if (slaAvailabilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + slaAvailabilityBuilder_.setMessage(value); + } + constraintCase_ = 8; + return this; + } - /** - * .context.ServiceTypeEnum service_type = 3; - * @return The enum numeric value on the wire for serviceType. - */ - int getServiceTypeValue(); - /** - * .context.ServiceTypeEnum service_type = 3; - * @return The serviceType. - */ - context.ContextOuterClass.ServiceTypeEnum getServiceType(); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability.Builder builderForValue) { + if (slaAvailabilityBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + slaAvailabilityBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 8; + return this; + } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - java.util.List - getServiceEndpointIdsList(); - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - context.ContextOuterClass.EndPointId getServiceEndpointIds(int index); - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - int getServiceEndpointIdsCount(); - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - java.util.List - getServiceEndpointIdsOrBuilderList(); - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - context.ContextOuterClass.EndPointIdOrBuilder getServiceEndpointIdsOrBuilder( - int index); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + public Builder mergeSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { + if (slaAvailabilityBuilder_ == null) { + if (constraintCase_ == 8 && constraint_ != context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.newBuilder((context.ContextOuterClass.Constraint_SLA_Availability) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 8) { + slaAvailabilityBuilder_.mergeFrom(value); + } + slaAvailabilityBuilder_.setMessage(value); + } + constraintCase_ = 8; + return this; + } - /** - * repeated .context.Constraint service_constraints = 5; - */ - java.util.List - getServiceConstraintsList(); - /** - * repeated .context.Constraint service_constraints = 5; - */ - context.ContextOuterClass.Constraint getServiceConstraints(int index); - /** - * repeated .context.Constraint service_constraints = 5; - */ - int getServiceConstraintsCount(); - /** - * repeated .context.Constraint service_constraints = 5; - */ - java.util.List - getServiceConstraintsOrBuilderList(); - /** - * repeated .context.Constraint service_constraints = 5; - */ - context.ContextOuterClass.ConstraintOrBuilder getServiceConstraintsOrBuilder( - int index); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + public Builder clearSlaAvailability() { + if (slaAvailabilityBuilder_ == null) { + if (constraintCase_ == 8) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 8) { + constraintCase_ = 0; + constraint_ = null; + } + slaAvailabilityBuilder_.clear(); + } + return this; + } - /** - * .context.ServiceStatus service_status = 6; - * @return Whether the serviceStatus field is set. - */ - boolean hasServiceStatus(); - /** - * .context.ServiceStatus service_status = 6; - * @return The serviceStatus. - */ - context.ContextOuterClass.ServiceStatus getServiceStatus(); - /** - * .context.ServiceStatus service_status = 6; - */ - context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder(); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + public context.ContextOuterClass.Constraint_SLA_Availability.Builder getSlaAvailabilityBuilder() { + return getSlaAvailabilityFieldBuilder().getBuilder(); + } - /** - * .context.ServiceConfig service_config = 7; - * @return Whether the serviceConfig field is set. - */ - boolean hasServiceConfig(); - /** - * .context.ServiceConfig service_config = 7; - * @return The serviceConfig. - */ - context.ContextOuterClass.ServiceConfig getServiceConfig(); - /** - * .context.ServiceConfig service_config = 7; - */ - context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder(); + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { + if ((constraintCase_ == 8) && (slaAvailabilityBuilder_ != null)) { + return slaAvailabilityBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 8) { + return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } + } - /** - * .context.Timestamp timestamp = 8; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 8; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 8; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); - } - /** - * Protobuf type {@code context.Service} - */ - public static final class Service extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Service) - ServiceOrBuilder { - private static final long serialVersionUID = 0L; - // Use Service.newBuilder() to construct. - private Service(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Service() { - name_ = ""; - serviceType_ = 0; - serviceEndpointIds_ = java.util.Collections.emptyList(); - serviceConstraints_ = java.util.Collections.emptyList(); - } + /** + * .context.Constraint_SLA_Availability sla_availability = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSlaAvailabilityFieldBuilder() { + if (slaAvailabilityBuilder_ == null) { + if (!(constraintCase_ == 8)) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); + } + slaAvailabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Availability) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 8; + onChanged(); + ; + return slaAvailabilityBuilder_; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Service(); - } + private com.google.protobuf.SingleFieldBuilderV3 slaIsolationBuilder_; - @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(); - 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(); - 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; - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return Whether the slaIsolation field is set. + */ + @java.lang.Override + public boolean hasSlaIsolation() { + return constraintCase_ == 9; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Service_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Service.class, context.ContextOuterClass.Service.Builder.class); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + * @return The slaIsolation. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { + if (slaIsolationBuilder_ == null) { + if (constraintCase_ == 9) { + return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } else { + if (constraintCase_ == 9) { + return slaIsolationBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } + } - public static final int SERVICE_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ServiceId serviceId_; - /** - * .context.ServiceId service_id = 1; - * @return Whether the serviceId field is set. - */ - @java.lang.Override - public boolean hasServiceId() { - return serviceId_ != null; - } - /** - * .context.ServiceId service_id = 1; - * @return The serviceId. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceId() { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - /** - * .context.ServiceId service_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { + if (slaIsolationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + slaIsolationBuilder_.setMessage(value); + } + constraintCase_ = 9; + return this; + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder builderForValue) { + if (slaIsolationBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + slaIsolationBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 9; + return this; + } - public static final int SERVICE_TYPE_FIELD_NUMBER = 3; - private int serviceType_; - /** - * .context.ServiceTypeEnum service_type = 3; - * @return The enum numeric value on the wire for serviceType. - */ - @java.lang.Override public int getServiceTypeValue() { - return serviceType_; - } - /** - * .context.ServiceTypeEnum service_type = 3; - * @return The serviceType. - */ - @java.lang.Override public context.ContextOuterClass.ServiceTypeEnum getServiceType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.valueOf(serviceType_); - return result == null ? context.ContextOuterClass.ServiceTypeEnum.UNRECOGNIZED : result; - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + public Builder mergeSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { + if (slaIsolationBuilder_ == null) { + if (constraintCase_ == 9 && constraint_ != context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.newBuilder((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 9) { + slaIsolationBuilder_.mergeFrom(value); + } + slaIsolationBuilder_.setMessage(value); + } + constraintCase_ = 9; + return this; + } - public static final int SERVICE_ENDPOINT_IDS_FIELD_NUMBER = 4; - private java.util.List serviceEndpointIds_; - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - @java.lang.Override - public java.util.List getServiceEndpointIdsList() { - return serviceEndpointIds_; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - @java.lang.Override - public java.util.List - getServiceEndpointIdsOrBuilderList() { - return serviceEndpointIds_; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - @java.lang.Override - public int getServiceEndpointIdsCount() { - return serviceEndpointIds_.size(); - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getServiceEndpointIds(int index) { - return serviceEndpointIds_.get(index); - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getServiceEndpointIdsOrBuilder( - int index) { - return serviceEndpointIds_.get(index); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + public Builder clearSlaIsolation() { + if (slaIsolationBuilder_ == null) { + if (constraintCase_ == 9) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 9) { + constraintCase_ = 0; + constraint_ = null; + } + slaIsolationBuilder_.clear(); + } + return this; + } - public static final int SERVICE_CONSTRAINTS_FIELD_NUMBER = 5; - private java.util.List serviceConstraints_; - /** - * repeated .context.Constraint service_constraints = 5; - */ - @java.lang.Override - public java.util.List getServiceConstraintsList() { - return serviceConstraints_; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - @java.lang.Override - public java.util.List - getServiceConstraintsOrBuilderList() { - return serviceConstraints_; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - @java.lang.Override - public int getServiceConstraintsCount() { - return serviceConstraints_.size(); - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint getServiceConstraints(int index) { - return serviceConstraints_.get(index); - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - @java.lang.Override - public context.ContextOuterClass.ConstraintOrBuilder getServiceConstraintsOrBuilder( - int index) { - return serviceConstraints_.get(index); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + public context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder getSlaIsolationBuilder() { + return getSlaIsolationFieldBuilder().getBuilder(); + } - public static final int SERVICE_STATUS_FIELD_NUMBER = 6; - private context.ContextOuterClass.ServiceStatus serviceStatus_; - /** - * .context.ServiceStatus service_status = 6; - * @return Whether the serviceStatus field is set. - */ - @java.lang.Override - public boolean hasServiceStatus() { - return serviceStatus_ != null; - } - /** - * .context.ServiceStatus service_status = 6; - * @return The serviceStatus. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceStatus getServiceStatus() { - return serviceStatus_ == null ? context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; - } - /** - * .context.ServiceStatus service_status = 6; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder() { - return getServiceStatus(); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { + if ((constraintCase_ == 9) && (slaIsolationBuilder_ != null)) { + return slaIsolationBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 9) { + return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; + } + return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } + } - public static final int SERVICE_CONFIG_FIELD_NUMBER = 7; - private context.ContextOuterClass.ServiceConfig serviceConfig_; - /** - * .context.ServiceConfig service_config = 7; - * @return Whether the serviceConfig field is set. - */ - @java.lang.Override - public boolean hasServiceConfig() { - return serviceConfig_ != null; - } - /** - * .context.ServiceConfig service_config = 7; - * @return The serviceConfig. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceConfig getServiceConfig() { - return serviceConfig_ == null ? context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; - } - /** - * .context.ServiceConfig service_config = 7; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder() { - return getServiceConfig(); - } + /** + * .context.Constraint_SLA_Isolation_level sla_isolation = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSlaIsolationFieldBuilder() { + if (slaIsolationBuilder_ == null) { + if (!(constraintCase_ == 9)) { + constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); + } + slaIsolationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 9; + onChanged(); + ; + return slaIsolationBuilder_; + } - public static final int TIMESTAMP_FIELD_NUMBER = 8; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 8; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 8; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .context.Timestamp timestamp = 8; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } + private com.google.protobuf.SingleFieldBuilderV3 exclusionsBuilder_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return Whether the exclusions field is set. + */ + @java.lang.Override + public boolean hasExclusions() { + return constraintCase_ == 10; + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + * @return The exclusions. + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_Exclusions getExclusions() { + if (exclusionsBuilder_ == null) { + if (constraintCase_ == 10) { + return (context.ContextOuterClass.Constraint_Exclusions) constraint_; + } + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } else { + if (constraintCase_ == 10) { + return exclusionsBuilder_.getMessage(); + } + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (serviceId_ != null) { - output.writeMessage(1, getServiceId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (serviceType_ != context.ContextOuterClass.ServiceTypeEnum.SERVICETYPE_UNKNOWN.getNumber()) { - output.writeEnum(3, serviceType_); - } - for (int i = 0; i < serviceEndpointIds_.size(); i++) { - output.writeMessage(4, serviceEndpointIds_.get(i)); - } - for (int i = 0; i < serviceConstraints_.size(); i++) { - output.writeMessage(5, serviceConstraints_.get(i)); - } - if (serviceStatus_ != null) { - output.writeMessage(6, getServiceStatus()); - } - if (serviceConfig_ != null) { - output.writeMessage(7, getServiceConfig()); - } - if (timestamp_ != null) { - output.writeMessage(8, getTimestamp()); - } - unknownFields.writeTo(output); - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions value) { + if (exclusionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraint_ = value; + onChanged(); + } else { + exclusionsBuilder_.setMessage(value); + } + constraintCase_ = 10; + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (serviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getServiceId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (serviceType_ != context.ContextOuterClass.ServiceTypeEnum.SERVICETYPE_UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, serviceType_); - } - for (int i = 0; i < serviceEndpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, serviceEndpointIds_.get(i)); - } - for (int i = 0; i < serviceConstraints_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, serviceConstraints_.get(i)); - } - if (serviceStatus_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getServiceStatus()); - } - if (serviceConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getServiceConfig()); - } - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getTimestamp()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions.Builder builderForValue) { + if (exclusionsBuilder_ == null) { + constraint_ = builderForValue.build(); + onChanged(); + } else { + exclusionsBuilder_.setMessage(builderForValue.build()); + } + constraintCase_ = 10; + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Service)) { - return super.equals(obj); - } - context.ContextOuterClass.Service other = (context.ContextOuterClass.Service) obj; - - if (hasServiceId() != other.hasServiceId()) return false; - if (hasServiceId()) { - if (!getServiceId() - .equals(other.getServiceId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (serviceType_ != other.serviceType_) return false; - if (!getServiceEndpointIdsList() - .equals(other.getServiceEndpointIdsList())) return false; - if (!getServiceConstraintsList() - .equals(other.getServiceConstraintsList())) return false; - if (hasServiceStatus() != other.hasServiceStatus()) return false; - if (hasServiceStatus()) { - if (!getServiceStatus() - .equals(other.getServiceStatus())) return false; - } - if (hasServiceConfig() != other.hasServiceConfig()) return false; - if (hasServiceConfig()) { - if (!getServiceConfig() - .equals(other.getServiceConfig())) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + public Builder mergeExclusions(context.ContextOuterClass.Constraint_Exclusions value) { + if (exclusionsBuilder_ == null) { + if (constraintCase_ == 10 && constraint_ != context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance()) { + constraint_ = context.ContextOuterClass.Constraint_Exclusions.newBuilder((context.ContextOuterClass.Constraint_Exclusions) constraint_).mergeFrom(value).buildPartial(); + } else { + constraint_ = value; + } + onChanged(); + } else { + if (constraintCase_ == 10) { + exclusionsBuilder_.mergeFrom(value); + } + exclusionsBuilder_.setMessage(value); + } + constraintCase_ = 10; + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasServiceId()) { - hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + SERVICE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + serviceType_; - if (getServiceEndpointIdsCount() > 0) { - hash = (37 * hash) + SERVICE_ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getServiceEndpointIdsList().hashCode(); - } - if (getServiceConstraintsCount() > 0) { - hash = (37 * hash) + SERVICE_CONSTRAINTS_FIELD_NUMBER; - hash = (53 * hash) + getServiceConstraintsList().hashCode(); - } - if (hasServiceStatus()) { - hash = (37 * hash) + SERVICE_STATUS_FIELD_NUMBER; - hash = (53 * hash) + getServiceStatus().hashCode(); - } - if (hasServiceConfig()) { - hash = (37 * hash) + SERVICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getServiceConfig().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + public Builder clearExclusions() { + if (exclusionsBuilder_ == null) { + if (constraintCase_ == 10) { + constraintCase_ = 0; + constraint_ = null; + onChanged(); + } + } else { + if (constraintCase_ == 10) { + constraintCase_ = 0; + constraint_ = null; + } + exclusionsBuilder_.clear(); + } + return this; + } - public static context.ContextOuterClass.Service parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Service parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Service parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Service parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Service parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Service parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Service parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Service parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Service parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Service parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Service parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Service parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + public context.ContextOuterClass.Constraint_Exclusions.Builder getExclusionsBuilder() { + return getExclusionsFieldBuilder().getBuilder(); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Service prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + @java.lang.Override + public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { + if ((constraintCase_ == 10) && (exclusionsBuilder_ != null)) { + return exclusionsBuilder_.getMessageOrBuilder(); + } else { + if (constraintCase_ == 10) { + return (context.ContextOuterClass.Constraint_Exclusions) constraint_; + } + return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Service} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Service) - context.ContextOuterClass.ServiceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Service_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Service_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Service.class, context.ContextOuterClass.Service.Builder.class); - } - - // 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; - serviceIdBuilder_ = null; - } - name_ = ""; - - serviceType_ = 0; - - if (serviceEndpointIdsBuilder_ == null) { - serviceEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - serviceEndpointIdsBuilder_.clear(); - } - if (serviceConstraintsBuilder_ == null) { - serviceConstraints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - serviceConstraintsBuilder_.clear(); - } - if (serviceStatusBuilder_ == null) { - serviceStatus_ = null; - } else { - serviceStatus_ = null; - serviceStatusBuilder_ = null; - } - if (serviceConfigBuilder_ == null) { - serviceConfig_ = null; - } else { - serviceConfig_ = null; - serviceConfigBuilder_ = null; - } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Service_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Service getDefaultInstanceForType() { - return context.ContextOuterClass.Service.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Service build() { - context.ContextOuterClass.Service result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - result.serviceType_ = serviceType_; - if (serviceEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - serviceEndpointIds_ = java.util.Collections.unmodifiableList(serviceEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.serviceEndpointIds_ = serviceEndpointIds_; - } else { - result.serviceEndpointIds_ = serviceEndpointIdsBuilder_.build(); - } - if (serviceConstraintsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - serviceConstraints_ = java.util.Collections.unmodifiableList(serviceConstraints_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.serviceConstraints_ = serviceConstraints_; - } else { - result.serviceConstraints_ = serviceConstraintsBuilder_.build(); - } - if (serviceStatusBuilder_ == null) { - result.serviceStatus_ = serviceStatus_; - } else { - result.serviceStatus_ = serviceStatusBuilder_.build(); - } - if (serviceConfigBuilder_ == null) { - result.serviceConfig_ = serviceConfig_; - } else { - result.serviceConfig_ = serviceConfigBuilder_.build(); - } - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; - } else { - result.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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Service) { - return mergeFrom((context.ContextOuterClass.Service)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Service other) { - if (other == context.ContextOuterClass.Service.getDefaultInstance()) return this; - if (other.hasServiceId()) { - mergeServiceId(other.getServiceId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.serviceType_ != 0) { - setServiceTypeValue(other.getServiceTypeValue()); - } - if (serviceEndpointIdsBuilder_ == null) { - if (!other.serviceEndpointIds_.isEmpty()) { - if (serviceEndpointIds_.isEmpty()) { - serviceEndpointIds_ = other.serviceEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.addAll(other.serviceEndpointIds_); - } - onChanged(); - } - } else { - if (!other.serviceEndpointIds_.isEmpty()) { - if (serviceEndpointIdsBuilder_.isEmpty()) { - serviceEndpointIdsBuilder_.dispose(); - serviceEndpointIdsBuilder_ = null; - serviceEndpointIds_ = other.serviceEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - serviceEndpointIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getServiceEndpointIdsFieldBuilder() : null; - } else { - serviceEndpointIdsBuilder_.addAllMessages(other.serviceEndpointIds_); + /** + * .context.Constraint_Exclusions exclusions = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3 getExclusionsFieldBuilder() { + if (exclusionsBuilder_ == null) { + if (!(constraintCase_ == 10)) { + constraint_ = context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); + } + exclusionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3((context.ContextOuterClass.Constraint_Exclusions) constraint_, getParentForChildren(), isClean()); + constraint_ = null; + } + constraintCase_ = 10; + onChanged(); + ; + return exclusionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - } + // @@protoc_insertion_point(builder_scope:context.Constraint) + } + + // @@protoc_insertion_point(class_scope:context.Constraint) + private static final context.ContextOuterClass.Constraint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint(); + } + + public static context.ContextOuterClass.Constraint getDefaultInstance() { + return DEFAULT_INSTANCE; } - if (serviceConstraintsBuilder_ == null) { - if (!other.serviceConstraints_.isEmpty()) { - if (serviceConstraints_.isEmpty()) { - serviceConstraints_ = other.serviceConstraints_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureServiceConstraintsIsMutable(); - serviceConstraints_.addAll(other.serviceConstraints_); - } - onChanged(); - } - } else { - if (!other.serviceConstraints_.isEmpty()) { - if (serviceConstraintsBuilder_.isEmpty()) { - serviceConstraintsBuilder_.dispose(); - serviceConstraintsBuilder_ = null; - serviceConstraints_ = other.serviceConstraints_; - bitField0_ = (bitField0_ & ~0x00000002); - serviceConstraintsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getServiceConstraintsFieldBuilder() : null; - } else { - serviceConstraintsBuilder_.addAllMessages(other.serviceConstraints_); - } - } - } - if (other.hasServiceStatus()) { - mergeServiceStatus(other.getServiceStatus()); - } - if (other.hasServiceConfig()) { - mergeServiceConfig(other.getServiceConfig()); - } - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Service) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private context.ContextOuterClass.ServiceId serviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdBuilder_; - /** - * .context.ServiceId service_id = 1; - * @return Whether the serviceId field is set. - */ - public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; - } - /** - * .context.ServiceId service_id = 1; - * @return The serviceId. - */ - public context.ContextOuterClass.ServiceId getServiceId() { - if (serviceIdBuilder_ == null) { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } else { - return serviceIdBuilder_.getMessage(); - } - } - /** - * .context.ServiceId service_id = 1; - */ - public Builder setServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - onChanged(); - } else { - serviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 1; - */ - public Builder setServiceId( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdBuilder_ == null) { - serviceId_ = builderForValue.build(); - onChanged(); - } else { - serviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceId service_id = 1; - */ - public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = - context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); - } else { - serviceId_ = value; - } - onChanged(); - } else { - serviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 1; - */ - public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceId service_id = 1; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { - - onChanged(); - return getServiceIdFieldBuilder().getBuilder(); - } - /** - * .context.ServiceId service_id = 1; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - if (serviceIdBuilder_ != null) { - return serviceIdBuilder_.getMessageOrBuilder(); - } else { - return serviceId_ == null ? - context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - } - /** - * .context.ServiceId service_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> - getServiceIdFieldBuilder() { - if (serviceIdBuilder_ == null) { - serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>( - getServiceId(), - getParentForChildren(), - isClean()); - serviceId_ = null; - } - return serviceIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int serviceType_ = 0; - /** - * .context.ServiceTypeEnum service_type = 3; - * @return The enum numeric value on the wire for serviceType. - */ - @java.lang.Override public int getServiceTypeValue() { - return serviceType_; - } - /** - * .context.ServiceTypeEnum service_type = 3; - * @param value The enum numeric value on the wire for serviceType to set. - * @return This builder for chaining. - */ - public Builder setServiceTypeValue(int value) { - - serviceType_ = value; - onChanged(); - return this; - } - /** - * .context.ServiceTypeEnum service_type = 3; - * @return The serviceType. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceTypeEnum getServiceType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.valueOf(serviceType_); - return result == null ? context.ContextOuterClass.ServiceTypeEnum.UNRECOGNIZED : result; - } - /** - * .context.ServiceTypeEnum service_type = 3; - * @param value The serviceType to set. - * @return This builder for chaining. - */ - public Builder setServiceType(context.ContextOuterClass.ServiceTypeEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - serviceType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.ServiceTypeEnum service_type = 3; - * @return This builder for chaining. - */ - public Builder clearServiceType() { - - serviceType_ = 0; - onChanged(); - return this; - } - - private java.util.List serviceEndpointIds_ = - java.util.Collections.emptyList(); - private void ensureServiceEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - serviceEndpointIds_ = new java.util.ArrayList(serviceEndpointIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> serviceEndpointIdsBuilder_; - - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public java.util.List getServiceEndpointIdsList() { - if (serviceEndpointIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(serviceEndpointIds_); - } else { - return serviceEndpointIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public int getServiceEndpointIdsCount() { - if (serviceEndpointIdsBuilder_ == null) { - return serviceEndpointIds_.size(); - } else { - return serviceEndpointIdsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public context.ContextOuterClass.EndPointId getServiceEndpointIds(int index) { - if (serviceEndpointIdsBuilder_ == null) { - return serviceEndpointIds_.get(index); - } else { - return serviceEndpointIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder setServiceEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (serviceEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.set(index, value); - onChanged(); - } else { - serviceEndpointIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder setServiceEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (serviceEndpointIdsBuilder_ == null) { - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.set(index, builderForValue.build()); - onChanged(); - } else { - serviceEndpointIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder addServiceEndpointIds(context.ContextOuterClass.EndPointId value) { - if (serviceEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.add(value); - onChanged(); - } else { - serviceEndpointIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder addServiceEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (serviceEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.add(index, value); - onChanged(); - } else { - serviceEndpointIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder addServiceEndpointIds( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (serviceEndpointIdsBuilder_ == null) { - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.add(builderForValue.build()); - onChanged(); - } else { - serviceEndpointIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder addServiceEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (serviceEndpointIdsBuilder_ == null) { - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.add(index, builderForValue.build()); - onChanged(); - } else { - serviceEndpointIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder addAllServiceEndpointIds( - java.lang.Iterable values) { - if (serviceEndpointIdsBuilder_ == null) { - ensureServiceEndpointIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, serviceEndpointIds_); - onChanged(); - } else { - serviceEndpointIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder clearServiceEndpointIds() { - if (serviceEndpointIdsBuilder_ == null) { - serviceEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - serviceEndpointIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public Builder removeServiceEndpointIds(int index) { - if (serviceEndpointIdsBuilder_ == null) { - ensureServiceEndpointIdsIsMutable(); - serviceEndpointIds_.remove(index); - onChanged(); - } else { - serviceEndpointIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public context.ContextOuterClass.EndPointId.Builder getServiceEndpointIdsBuilder( - int index) { - return getServiceEndpointIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getServiceEndpointIdsOrBuilder( - int index) { - if (serviceEndpointIdsBuilder_ == null) { - return serviceEndpointIds_.get(index); } else { - return serviceEndpointIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public java.util.List - getServiceEndpointIdsOrBuilderList() { - if (serviceEndpointIdsBuilder_ != null) { - return serviceEndpointIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(serviceEndpointIds_); - } - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public context.ContextOuterClass.EndPointId.Builder addServiceEndpointIdsBuilder() { - return getServiceEndpointIdsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public context.ContextOuterClass.EndPointId.Builder addServiceEndpointIdsBuilder( - int index) { - return getServiceEndpointIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId service_endpoint_ids = 4; - */ - public java.util.List - getServiceEndpointIdsBuilderList() { - return getServiceEndpointIdsFieldBuilder().getBuilderList(); - } - 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()); - serviceEndpointIds_ = null; - } - return serviceEndpointIdsBuilder_; - } - - private java.util.List serviceConstraints_ = - java.util.Collections.emptyList(); - private void ensureServiceConstraintsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - serviceConstraints_ = new java.util.ArrayList(serviceConstraints_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Constraint, context.ContextOuterClass.Constraint.Builder, context.ContextOuterClass.ConstraintOrBuilder> serviceConstraintsBuilder_; - - /** - * repeated .context.Constraint service_constraints = 5; - */ - public java.util.List getServiceConstraintsList() { - if (serviceConstraintsBuilder_ == null) { - return java.util.Collections.unmodifiableList(serviceConstraints_); - } else { - return serviceConstraintsBuilder_.getMessageList(); - } - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public int getServiceConstraintsCount() { - if (serviceConstraintsBuilder_ == null) { - return serviceConstraints_.size(); - } else { - return serviceConstraintsBuilder_.getCount(); - } - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public context.ContextOuterClass.Constraint getServiceConstraints(int index) { - if (serviceConstraintsBuilder_ == null) { - return serviceConstraints_.get(index); - } else { - return serviceConstraintsBuilder_.getMessage(index); - } - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder setServiceConstraints( - int index, context.ContextOuterClass.Constraint value) { - if (serviceConstraintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceConstraintsIsMutable(); - serviceConstraints_.set(index, value); - onChanged(); - } else { - serviceConstraintsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder setServiceConstraints( - int index, context.ContextOuterClass.Constraint.Builder builderForValue) { - if (serviceConstraintsBuilder_ == null) { - ensureServiceConstraintsIsMutable(); - serviceConstraints_.set(index, builderForValue.build()); - onChanged(); - } else { - serviceConstraintsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder addServiceConstraints(context.ContextOuterClass.Constraint value) { - if (serviceConstraintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceConstraintsIsMutable(); - serviceConstraints_.add(value); - onChanged(); - } else { - serviceConstraintsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder addServiceConstraints( - int index, context.ContextOuterClass.Constraint value) { - if (serviceConstraintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceConstraintsIsMutable(); - serviceConstraints_.add(index, value); - onChanged(); - } else { - serviceConstraintsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder addServiceConstraints( - context.ContextOuterClass.Constraint.Builder builderForValue) { - if (serviceConstraintsBuilder_ == null) { - ensureServiceConstraintsIsMutable(); - serviceConstraints_.add(builderForValue.build()); - onChanged(); - } else { - serviceConstraintsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder addServiceConstraints( - int index, context.ContextOuterClass.Constraint.Builder builderForValue) { - if (serviceConstraintsBuilder_ == null) { - ensureServiceConstraintsIsMutable(); - serviceConstraints_.add(index, builderForValue.build()); - onChanged(); - } else { - serviceConstraintsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder addAllServiceConstraints( - java.lang.Iterable values) { - if (serviceConstraintsBuilder_ == null) { - ensureServiceConstraintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, serviceConstraints_); - onChanged(); - } else { - serviceConstraintsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder clearServiceConstraints() { - if (serviceConstraintsBuilder_ == null) { - serviceConstraints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - serviceConstraintsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public Builder removeServiceConstraints(int index) { - if (serviceConstraintsBuilder_ == null) { - ensureServiceConstraintsIsMutable(); - serviceConstraints_.remove(index); - onChanged(); - } else { - serviceConstraintsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public context.ContextOuterClass.Constraint.Builder getServiceConstraintsBuilder( - int index) { - return getServiceConstraintsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public context.ContextOuterClass.ConstraintOrBuilder getServiceConstraintsOrBuilder( - int index) { - if (serviceConstraintsBuilder_ == null) { - return serviceConstraints_.get(index); } else { - return serviceConstraintsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public java.util.List - getServiceConstraintsOrBuilderList() { - if (serviceConstraintsBuilder_ != null) { - return serviceConstraintsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(serviceConstraints_); - } - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public context.ContextOuterClass.Constraint.Builder addServiceConstraintsBuilder() { - return getServiceConstraintsFieldBuilder().addBuilder( - context.ContextOuterClass.Constraint.getDefaultInstance()); - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public context.ContextOuterClass.Constraint.Builder addServiceConstraintsBuilder( - int index) { - return getServiceConstraintsFieldBuilder().addBuilder( - index, context.ContextOuterClass.Constraint.getDefaultInstance()); - } - /** - * repeated .context.Constraint service_constraints = 5; - */ - public java.util.List - getServiceConstraintsBuilderList() { - return getServiceConstraintsFieldBuilder().getBuilderList(); - } - 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()); - serviceConstraints_ = null; - } - return serviceConstraintsBuilder_; - } - - private context.ContextOuterClass.ServiceStatus serviceStatus_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceStatus, context.ContextOuterClass.ServiceStatus.Builder, context.ContextOuterClass.ServiceStatusOrBuilder> serviceStatusBuilder_; - /** - * .context.ServiceStatus service_status = 6; - * @return Whether the serviceStatus field is set. - */ - public boolean hasServiceStatus() { - return serviceStatusBuilder_ != null || serviceStatus_ != null; - } - /** - * .context.ServiceStatus service_status = 6; - * @return The serviceStatus. - */ - public context.ContextOuterClass.ServiceStatus getServiceStatus() { - if (serviceStatusBuilder_ == null) { - return serviceStatus_ == null ? context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; - } else { - return serviceStatusBuilder_.getMessage(); - } - } - /** - * .context.ServiceStatus service_status = 6; - */ - public Builder setServiceStatus(context.ContextOuterClass.ServiceStatus value) { - if (serviceStatusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceStatus_ = value; - onChanged(); - } else { - serviceStatusBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceStatus service_status = 6; - */ - public Builder setServiceStatus( - context.ContextOuterClass.ServiceStatus.Builder builderForValue) { - if (serviceStatusBuilder_ == null) { - serviceStatus_ = builderForValue.build(); - onChanged(); - } else { - serviceStatusBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceStatus service_status = 6; - */ - public Builder mergeServiceStatus(context.ContextOuterClass.ServiceStatus value) { - if (serviceStatusBuilder_ == null) { - if (serviceStatus_ != null) { - serviceStatus_ = - context.ContextOuterClass.ServiceStatus.newBuilder(serviceStatus_).mergeFrom(value).buildPartial(); - } else { - serviceStatus_ = value; - } - onChanged(); - } else { - serviceStatusBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceStatus service_status = 6; - */ - public Builder clearServiceStatus() { - if (serviceStatusBuilder_ == null) { - serviceStatus_ = null; - onChanged(); - } else { - serviceStatus_ = null; - serviceStatusBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceStatus service_status = 6; - */ - public context.ContextOuterClass.ServiceStatus.Builder getServiceStatusBuilder() { - - onChanged(); - return getServiceStatusFieldBuilder().getBuilder(); - } - /** - * .context.ServiceStatus service_status = 6; - */ - public context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder() { - if (serviceStatusBuilder_ != null) { - return serviceStatusBuilder_.getMessageOrBuilder(); - } else { - return serviceStatus_ == null ? - context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; - } - } - /** - * .context.ServiceStatus service_status = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceStatus, context.ContextOuterClass.ServiceStatus.Builder, context.ContextOuterClass.ServiceStatusOrBuilder> - getServiceStatusFieldBuilder() { - if (serviceStatusBuilder_ == null) { - serviceStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceStatus, context.ContextOuterClass.ServiceStatus.Builder, context.ContextOuterClass.ServiceStatusOrBuilder>( - getServiceStatus(), - getParentForChildren(), - isClean()); - serviceStatus_ = null; - } - return serviceStatusBuilder_; - } - - private context.ContextOuterClass.ServiceConfig serviceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceConfig, context.ContextOuterClass.ServiceConfig.Builder, context.ContextOuterClass.ServiceConfigOrBuilder> serviceConfigBuilder_; - /** - * .context.ServiceConfig service_config = 7; - * @return Whether the serviceConfig field is set. - */ - public boolean hasServiceConfig() { - return serviceConfigBuilder_ != null || serviceConfig_ != null; - } - /** - * .context.ServiceConfig service_config = 7; - * @return The serviceConfig. - */ - public context.ContextOuterClass.ServiceConfig getServiceConfig() { - if (serviceConfigBuilder_ == null) { - return serviceConfig_ == null ? context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; - } else { - return serviceConfigBuilder_.getMessage(); - } - } - /** - * .context.ServiceConfig service_config = 7; - */ - public Builder setServiceConfig(context.ContextOuterClass.ServiceConfig value) { - if (serviceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceConfig_ = value; - onChanged(); - } else { - serviceConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceConfig service_config = 7; - */ - public Builder setServiceConfig( - context.ContextOuterClass.ServiceConfig.Builder builderForValue) { - if (serviceConfigBuilder_ == null) { - serviceConfig_ = builderForValue.build(); - onChanged(); - } else { - serviceConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceConfig service_config = 7; - */ - public Builder mergeServiceConfig(context.ContextOuterClass.ServiceConfig value) { - if (serviceConfigBuilder_ == null) { - if (serviceConfig_ != null) { - serviceConfig_ = - context.ContextOuterClass.ServiceConfig.newBuilder(serviceConfig_).mergeFrom(value).buildPartial(); - } else { - serviceConfig_ = value; - } - onChanged(); - } else { - serviceConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceConfig service_config = 7; - */ - public Builder clearServiceConfig() { - if (serviceConfigBuilder_ == null) { - serviceConfig_ = null; - onChanged(); - } else { - serviceConfig_ = null; - serviceConfigBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceConfig service_config = 7; - */ - public context.ContextOuterClass.ServiceConfig.Builder getServiceConfigBuilder() { - - onChanged(); - return getServiceConfigFieldBuilder().getBuilder(); - } - /** - * .context.ServiceConfig service_config = 7; - */ - public context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder() { - if (serviceConfigBuilder_ != null) { - return serviceConfigBuilder_.getMessageOrBuilder(); - } else { - return serviceConfig_ == null ? - context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; - } - } - /** - * .context.ServiceConfig service_config = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceConfig, context.ContextOuterClass.ServiceConfig.Builder, context.ContextOuterClass.ServiceConfigOrBuilder> - getServiceConfigFieldBuilder() { - if (serviceConfigBuilder_ == null) { - serviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceConfig, context.ContextOuterClass.ServiceConfig.Builder, context.ContextOuterClass.ServiceConfigOrBuilder>( - getServiceConfig(), - getParentForChildren(), - isClean()); - serviceConfig_ = null; - } - return serviceConfigBuilder_; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; - /** - * .context.Timestamp timestamp = 8; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 8; - * @return The timestamp. - */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - * .context.Timestamp timestamp = 8; - */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 8; - */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Timestamp timestamp = 8; - */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 8; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - * .context.Timestamp timestamp = 8; - */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .context.Timestamp timestamp = 8; - */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - * .context.Timestamp timestamp = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Service) - } - // @@protoc_insertion_point(class_scope:context.Service) - private static final context.ContextOuterClass.Service DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Service(); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static context.ContextOuterClass.Service getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @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); + } + }; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public context.ContextOuterClass.Service getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + @java.lang.Override + public context.ContextOuterClass.Constraint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - } + public interface TeraFlowControllerOrBuilder extends // @@protoc_insertion_point(interface_extends:context.TeraFlowController) + com.google.protobuf.MessageOrBuilder { - public interface ServiceStatusOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceStatus) - com.google.protobuf.MessageOrBuilder { + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); - /** - * .context.ServiceStatusEnum service_status = 1; - * @return The enum numeric value on the wire for serviceStatus. - */ - int getServiceStatusValue(); - /** - * .context.ServiceStatusEnum service_status = 1; - * @return The serviceStatus. - */ - context.ContextOuterClass.ServiceStatusEnum getServiceStatus(); - } - /** - * Protobuf type {@code context.ServiceStatus} - */ - public static final class ServiceStatus extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceStatus) - ServiceStatusOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceStatus.newBuilder() to construct. - private ServiceStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceStatus() { - serviceStatus_ = 0; - } + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceStatus(); - } + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); - @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; - } + /** + * string ip_address = 2; + * @return The ipAddress. + */ + java.lang.String getIpAddress(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceStatus.class, context.ContextOuterClass.ServiceStatus.Builder.class); - } + /** + * string ip_address = 2; + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); - public static final int SERVICE_STATUS_FIELD_NUMBER = 1; - private int serviceStatus_; - /** - * .context.ServiceStatusEnum service_status = 1; - * @return The enum numeric value on the wire for serviceStatus. - */ - @java.lang.Override public int getServiceStatusValue() { - return serviceStatus_; + /** + * uint32 port = 3; + * @return The port. + */ + int getPort(); } + /** - * .context.ServiceStatusEnum service_status = 1; - * @return The serviceStatus. + *
+     * ----- Miscellaneous -------------------------------------------------------------------------------------------------
+     * 
+ * + * Protobuf type {@code context.TeraFlowController} */ - @java.lang.Override public context.ContextOuterClass.ServiceStatusEnum getServiceStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.valueOf(serviceStatus_); - return result == null ? context.ContextOuterClass.ServiceStatusEnum.UNRECOGNIZED : result; - } + public static final class TeraFlowController extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.TeraFlowController) + TeraFlowControllerOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use TeraFlowController.newBuilder() to construct. + private TeraFlowController(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (serviceStatus_ != context.ContextOuterClass.ServiceStatusEnum.SERVICESTATUS_UNDEFINED.getNumber()) { - output.writeEnum(1, serviceStatus_); - } - unknownFields.writeTo(output); - } + private TeraFlowController() { + ipAddress_ = ""; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (serviceStatus_ != context.ContextOuterClass.ServiceStatusEnum.SERVICESTATUS_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, serviceStatus_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TeraFlowController(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceStatus)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceStatus other = (context.ContextOuterClass.ServiceStatus) obj; - - if (serviceStatus_ != other.serviceStatus_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SERVICE_STATUS_FIELD_NUMBER; - hash = (53 * hash) + serviceStatus_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + 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 context.ContextOuterClass.ServiceStatus parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceStatus parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceStatus parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceStatus parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceStatus prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ServiceStatus} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceStatus) - context.ContextOuterClass.ServiceStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceStatus.class, context.ContextOuterClass.ServiceStatus.Builder.class); - } - - // 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(); - serviceStatus_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceStatus_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceStatus getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceStatus.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceStatus build() { - context.ContextOuterClass.ServiceStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceStatus buildPartial() { - context.ContextOuterClass.ServiceStatus result = new context.ContextOuterClass.ServiceStatus(this); - result.serviceStatus_ = serviceStatus_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceStatus) { - return mergeFrom((context.ContextOuterClass.ServiceStatus)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceStatus other) { - if (other == context.ContextOuterClass.ServiceStatus.getDefaultInstance()) return this; - if (other.serviceStatus_ != 0) { - setServiceStatusValue(other.getServiceStatusValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceStatus) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int serviceStatus_ = 0; - /** - * .context.ServiceStatusEnum service_status = 1; - * @return The enum numeric value on the wire for serviceStatus. - */ - @java.lang.Override public int getServiceStatusValue() { - return serviceStatus_; - } - /** - * .context.ServiceStatusEnum service_status = 1; - * @param value The enum numeric value on the wire for serviceStatus to set. - * @return This builder for chaining. - */ - public Builder setServiceStatusValue(int value) { - - serviceStatus_ = value; - onChanged(); - return this; - } - /** - * .context.ServiceStatusEnum service_status = 1; - * @return The serviceStatus. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceStatusEnum getServiceStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.valueOf(serviceStatus_); - return result == null ? context.ContextOuterClass.ServiceStatusEnum.UNRECOGNIZED : result; - } - /** - * .context.ServiceStatusEnum service_status = 1; - * @param value The serviceStatus to set. - * @return This builder for chaining. - */ - public Builder setServiceStatus(context.ContextOuterClass.ServiceStatusEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - serviceStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.ServiceStatusEnum service_status = 1; - * @return This builder for chaining. - */ - public Builder clearServiceStatus() { - - serviceStatus_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceStatus) - } + public static final int CONTEXT_ID_FIELD_NUMBER = 1; - // @@protoc_insertion_point(class_scope:context.ServiceStatus) - private static final context.ContextOuterClass.ServiceStatus DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceStatus(); - } + private context.ContextOuterClass.ContextId contextId_; - public static context.ContextOuterClass.ServiceStatus getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } - @java.lang.Override - public context.ContextOuterClass.ServiceStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static final int IP_ADDRESS_FIELD_NUMBER = 2; - } + private volatile java.lang.Object ipAddress_; - public interface ServiceConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceConfig) - com.google.protobuf.MessageOrBuilder { + /** + * string ip_address = 2; + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + 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(); + ipAddress_ = s; + return s; + } + } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - java.util.List - getConfigRulesList(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - context.ContextOuterClass.ConfigRule getConfigRules(int index); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - int getConfigRulesCount(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - java.util.List - getConfigRulesOrBuilderList(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ServiceConfig} - */ - public static final class ServiceConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceConfig) - ServiceConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceConfig.newBuilder() to construct. - private ServiceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceConfig() { - configRules_ = java.util.Collections.emptyList(); - } + /** + * string ip_address = 2; + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceConfig(); - } + public static final int PORT_FIELD_NUMBER = 3; - @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(); - 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; - } + private int port_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceConfig.class, context.ContextOuterClass.ServiceConfig.Builder.class); - } + /** + * uint32 port = 3; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } - public static final int CONFIG_RULES_FIELD_NUMBER = 1; - private java.util.List configRules_; - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public java.util.List getConfigRulesList() { - return configRules_; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public java.util.List - getConfigRulesOrBuilderList() { - return configRules_; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public int getConfigRulesCount() { - return configRules_.size(); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule getConfigRules(int index) { - return configRules_.get(index); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index) { - return configRules_.get(index); - } + private byte memoizedIsInitialized = -1; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (!getIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_); + } + if (port_ != 0) { + output.writeUInt32(3, port_); + } + unknownFields.writeTo(output); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < configRules_.size(); i++) { - output.writeMessage(1, configRules_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (!getIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, port_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < configRules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, configRules_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.TeraFlowController)) { + return super.equals(obj); + } + context.ContextOuterClass.TeraFlowController other = (context.ContextOuterClass.TeraFlowController) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (!getIpAddress().equals(other.getIpAddress())) + return false; + if (getPort() != other.getPort()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceConfig)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceConfig other = (context.ContextOuterClass.ServiceConfig) obj; - - if (!getConfigRulesList() - .equals(other.getConfigRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.TeraFlowController parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConfigRulesCount() > 0) { - hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; - hash = (53 * hash) + getConfigRulesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.TeraFlowController parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.ServiceConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ServiceConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceConfig) - context.ContextOuterClass.ServiceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceConfig.class, context.ContextOuterClass.ServiceConfig.Builder.class); - } - - // 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(); - if (configRulesBuilder_ == null) { - configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - configRulesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceConfig_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceConfig getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceConfig.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceConfig build() { - context.ContextOuterClass.ServiceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceConfig buildPartial() { - context.ContextOuterClass.ServiceConfig result = new context.ContextOuterClass.ServiceConfig(this); - int from_bitField0_ = bitField0_; - if (configRulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - configRules_ = java.util.Collections.unmodifiableList(configRules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.configRules_ = configRules_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceConfig) { - return mergeFrom((context.ContextOuterClass.ServiceConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceConfig other) { - if (other == context.ContextOuterClass.ServiceConfig.getDefaultInstance()) return this; - if (configRulesBuilder_ == null) { - if (!other.configRules_.isEmpty()) { - if (configRules_.isEmpty()) { - configRules_ = other.configRules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConfigRulesIsMutable(); - configRules_.addAll(other.configRules_); - } - onChanged(); - } - } else { - if (!other.configRules_.isEmpty()) { - if (configRulesBuilder_.isEmpty()) { - configRulesBuilder_.dispose(); - configRulesBuilder_ = null; - configRules_ = other.configRules_; - bitField0_ = (bitField0_ & ~0x00000001); - configRulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConfigRulesFieldBuilder() : null; - } else { - configRulesBuilder_.addAllMessages(other.configRules_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List configRules_ = - java.util.Collections.emptyList(); - private void ensureConfigRulesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - configRules_ = new java.util.ArrayList(configRules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder> configRulesBuilder_; - - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List getConfigRulesList() { - if (configRulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(configRules_); - } else { - return configRulesBuilder_.getMessageList(); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public int getConfigRulesCount() { - if (configRulesBuilder_ == null) { - return configRules_.size(); - } else { - return configRulesBuilder_.getCount(); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule getConfigRules(int index) { - if (configRulesBuilder_ == null) { - return configRules_.get(index); - } else { - return configRulesBuilder_.getMessage(index); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder setConfigRules( - int index, context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.set(index, value); - onChanged(); - } else { - configRulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder setConfigRules( - int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.set(index, builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules(context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.add(value); - onChanged(); - } else { - configRulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - int index, context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.add(index, value); - onChanged(); - } else { - configRulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.add(builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.add(index, builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addAllConfigRules( - java.lang.Iterable values) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, configRules_); - onChanged(); - } else { - configRulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder clearConfigRules() { - if (configRulesBuilder_ == null) { - configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - configRulesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder removeConfigRules(int index) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.remove(index); - onChanged(); - } else { - configRulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder getConfigRulesBuilder( - int index) { - return getConfigRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index) { - if (configRulesBuilder_ == null) { - return configRules_.get(index); } else { - return configRulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List - getConfigRulesOrBuilderList() { - if (configRulesBuilder_ != null) { - return configRulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(configRules_); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder() { - return getConfigRulesFieldBuilder().addBuilder( - context.ContextOuterClass.ConfigRule.getDefaultInstance()); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder( - int index) { - return getConfigRulesFieldBuilder().addBuilder( - index, context.ContextOuterClass.ConfigRule.getDefaultInstance()); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List - getConfigRulesBuilderList() { - return getConfigRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder> - getConfigRulesFieldBuilder() { - if (configRulesBuilder_ == null) { - configRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder>( - configRules_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - configRules_ = null; - } - return configRulesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceConfig) - } + public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(class_scope:context.ServiceConfig) - private static final context.ContextOuterClass.ServiceConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceConfig(); - } + public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.ServiceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public context.ContextOuterClass.ServiceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - } + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public interface ServiceIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceIdList) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.TeraFlowController parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - /** - * repeated .context.ServiceId service_ids = 1; - */ - java.util.List - getServiceIdsList(); - /** - * repeated .context.ServiceId service_ids = 1; - */ - context.ContextOuterClass.ServiceId getServiceIds(int index); - /** - * repeated .context.ServiceId service_ids = 1; - */ - int getServiceIdsCount(); - /** - * repeated .context.ServiceId service_ids = 1; - */ - java.util.List - getServiceIdsOrBuilderList(); - /** - * repeated .context.ServiceId service_ids = 1; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ServiceIdList} - */ - public static final class ServiceIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceIdList) - ServiceIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceIdList.newBuilder() to construct. - private ServiceIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceIdList() { - serviceIds_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceIdList(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @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(); - 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; - } + public static Builder newBuilder(context.ContextOuterClass.TeraFlowController prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceIdList.class, context.ContextOuterClass.ServiceIdList.Builder.class); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static final int SERVICE_IDS_FIELD_NUMBER = 1; - private java.util.List serviceIds_; - /** - * repeated .context.ServiceId service_ids = 1; - */ - @java.lang.Override - public java.util.List getServiceIdsList() { - return serviceIds_; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - @java.lang.Override - public java.util.List - getServiceIdsOrBuilderList() { - return serviceIds_; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - @java.lang.Override - public int getServiceIdsCount() { - return serviceIds_.size(); - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceIds(int index) { - return serviceIds_.get(index); - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder( - int index) { - return serviceIds_.get(index); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + *
+         * ----- Miscellaneous -------------------------------------------------------------------------------------------------
+         * 
+ * + * Protobuf type {@code context.TeraFlowController} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.TeraFlowController) + context.ContextOuterClass.TeraFlowControllerOrBuilder { - memoizedIsInitialized = 1; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < serviceIds_.size(); i++) { - output.writeMessage(1, serviceIds_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < serviceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, serviceIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + // Construct using context.ContextOuterClass.TeraFlowController.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceIdList other = (context.ContextOuterClass.ServiceIdList) obj; - - if (!getServiceIdsList() - .equals(other.getServiceIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getServiceIdsCount() > 0) { - hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getServiceIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - public static context.ContextOuterClass.ServiceIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (contextIdBuilder_ == null) { + contextId_ = null; + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + ipAddress_ = ""; + port_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { + return context.ContextOuterClass.TeraFlowController.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.TeraFlowController build() { + context.ContextOuterClass.TeraFlowController result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ServiceIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceIdList) - context.ContextOuterClass.ServiceIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceIdList.class, context.ContextOuterClass.ServiceIdList.Builder.class); - } - - // 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(); - if (serviceIdsBuilder_ == null) { - serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - serviceIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceIdList getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceIdList build() { - context.ContextOuterClass.ServiceIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceIdList buildPartial() { - context.ContextOuterClass.ServiceIdList result = new context.ContextOuterClass.ServiceIdList(this); - int from_bitField0_ = bitField0_; - if (serviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.serviceIds_ = serviceIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceIdList) { - return mergeFrom((context.ContextOuterClass.ServiceIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceIdList other) { - if (other == context.ContextOuterClass.ServiceIdList.getDefaultInstance()) return this; - if (serviceIdsBuilder_ == null) { - if (!other.serviceIds_.isEmpty()) { - if (serviceIds_.isEmpty()) { - serviceIds_ = other.serviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureServiceIdsIsMutable(); - serviceIds_.addAll(other.serviceIds_); - } - onChanged(); - } - } else { - if (!other.serviceIds_.isEmpty()) { - if (serviceIdsBuilder_.isEmpty()) { - serviceIdsBuilder_.dispose(); - serviceIdsBuilder_ = null; - serviceIds_ = other.serviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - serviceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getServiceIdsFieldBuilder() : null; - } else { - serviceIdsBuilder_.addAllMessages(other.serviceIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List serviceIds_ = - java.util.Collections.emptyList(); - private void ensureServiceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - serviceIds_ = new java.util.ArrayList(serviceIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdsBuilder_; - - /** - * repeated .context.ServiceId service_ids = 1; - */ - public java.util.List getServiceIdsList() { - if (serviceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(serviceIds_); - } else { - return serviceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public int getServiceIdsCount() { - if (serviceIdsBuilder_ == null) { - return serviceIds_.size(); - } else { - return serviceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public context.ContextOuterClass.ServiceId getServiceIds(int index) { - if (serviceIdsBuilder_ == null) { - return serviceIds_.get(index); - } else { - return serviceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder setServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceIdsIsMutable(); - serviceIds_.set(index, value); - onChanged(); - } else { - serviceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder setServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - serviceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder addServiceIds(context.ContextOuterClass.ServiceId value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceIdsIsMutable(); - serviceIds_.add(value); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder addServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceIdsIsMutable(); - serviceIds_.add(index, value); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder addServiceIds( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.add(builderForValue.build()); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder addServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - serviceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder addAllServiceIds( - java.lang.Iterable values) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, serviceIds_); - onChanged(); - } else { - serviceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder clearServiceIds() { - if (serviceIdsBuilder_ == null) { - serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - serviceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public Builder removeServiceIds(int index) { - if (serviceIdsBuilder_ == null) { - ensureServiceIdsIsMutable(); - serviceIds_.remove(index); - onChanged(); - } else { - serviceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdsBuilder( - int index) { - return getServiceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdsOrBuilder( - int index) { - if (serviceIdsBuilder_ == null) { - return serviceIds_.get(index); } else { - return serviceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public java.util.List - getServiceIdsOrBuilderList() { - if (serviceIdsBuilder_ != null) { - return serviceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(serviceIds_); - } - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder() { - return getServiceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public context.ContextOuterClass.ServiceId.Builder addServiceIdsBuilder( - int index) { - return getServiceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId service_ids = 1; - */ - public java.util.List - getServiceIdsBuilderList() { - return getServiceIdsFieldBuilder().getBuilderList(); - } - 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_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - serviceIds_ = null; - } - return serviceIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceIdList) - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.TeraFlowController) { + return mergeFrom((context.ContextOuterClass.TeraFlowController) other); + } else { + super.mergeFrom(other); + return this; + } + } - // @@protoc_insertion_point(class_scope:context.ServiceIdList) - private static final context.ContextOuterClass.ServiceIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceIdList(); - } + public Builder mergeFrom(context.ContextOuterClass.TeraFlowController other) { + if (other == context.ContextOuterClass.TeraFlowController.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - public static context.ContextOuterClass.ServiceIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.TeraFlowController) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private context.ContextOuterClass.ContextId contextId_; - @java.lang.Override - public context.ContextOuterClass.ServiceIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; - } + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } - public interface ServiceListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceList) - com.google.protobuf.MessageOrBuilder { + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } - /** - * repeated .context.Service services = 1; - */ - java.util.List - getServicesList(); - /** - * repeated .context.Service services = 1; - */ - context.ContextOuterClass.Service getServices(int index); - /** - * repeated .context.Service services = 1; - */ - int getServicesCount(); - /** - * repeated .context.Service services = 1; - */ - java.util.List - getServicesOrBuilderList(); - /** - * repeated .context.Service services = 1; - */ - context.ContextOuterClass.ServiceOrBuilder getServicesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ServiceList} - */ - public static final class ServiceList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceList) - ServiceListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceList.newBuilder() to construct. - private ServiceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceList() { - services_ = java.util.Collections.emptyList(); - } + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceList(); - } + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @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(); - 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; - } + /** + * .context.ContextId context_id = 1; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceList.class, context.ContextOuterClass.ServiceList.Builder.class); - } + /** + * .context.ContextId context_id = 1; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } - public static final int SERVICES_FIELD_NUMBER = 1; - private java.util.List services_; - /** - * repeated .context.Service services = 1; - */ - @java.lang.Override - public java.util.List getServicesList() { - return services_; - } - /** - * repeated .context.Service services = 1; - */ - @java.lang.Override - public java.util.List - getServicesOrBuilderList() { - return services_; - } - /** - * repeated .context.Service services = 1; - */ - @java.lang.Override - public int getServicesCount() { - return services_.size(); - } - /** - * repeated .context.Service services = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Service getServices(int index) { - return services_.get(index); - } - /** - * repeated .context.Service services = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceOrBuilder getServicesOrBuilder( - int index) { - return services_.get(index); - } + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.ContextId context_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < services_.size(); i++) { - output.writeMessage(1, services_.get(i)); - } - unknownFields.writeTo(output); - } + private java.lang.Object ipAddress_ = ""; + + /** + * string ip_address = 2; + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < services_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, services_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * string ip_address = 2; + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceList)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceList other = (context.ContextOuterClass.ServiceList) obj; - - if (!getServicesList() - .equals(other.getServicesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string ip_address = 2; + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipAddress_ = value; + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getServicesCount() > 0) { - hash = (37 * hash) + SERVICES_FIELD_NUMBER; - hash = (53 * hash) + getServicesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * string ip_address = 2; + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + onChanged(); + return this; + } - public static context.ContextOuterClass.ServiceList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * string ip_address = 2; + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private int port_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ServiceList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceList) - context.ContextOuterClass.ServiceListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceList.class, context.ContextOuterClass.ServiceList.Builder.class); - } - - // 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(); - if (servicesBuilder_ == null) { - services_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - servicesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceList getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceList build() { - context.ContextOuterClass.ServiceList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceList buildPartial() { - context.ContextOuterClass.ServiceList result = new context.ContextOuterClass.ServiceList(this); - int from_bitField0_ = bitField0_; - if (servicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - services_ = java.util.Collections.unmodifiableList(services_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.services_ = services_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceList) { - return mergeFrom((context.ContextOuterClass.ServiceList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceList other) { - if (other == context.ContextOuterClass.ServiceList.getDefaultInstance()) return this; - if (servicesBuilder_ == null) { - if (!other.services_.isEmpty()) { - if (services_.isEmpty()) { - services_ = other.services_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureServicesIsMutable(); - services_.addAll(other.services_); - } - onChanged(); - } - } else { - if (!other.services_.isEmpty()) { - if (servicesBuilder_.isEmpty()) { - servicesBuilder_.dispose(); - servicesBuilder_ = null; - services_ = other.services_; - bitField0_ = (bitField0_ & ~0x00000001); - servicesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getServicesFieldBuilder() : null; - } else { - servicesBuilder_.addAllMessages(other.services_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List services_ = - java.util.Collections.emptyList(); - private void ensureServicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - services_ = new java.util.ArrayList(services_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Service, context.ContextOuterClass.Service.Builder, context.ContextOuterClass.ServiceOrBuilder> servicesBuilder_; - - /** - * repeated .context.Service services = 1; - */ - public java.util.List getServicesList() { - if (servicesBuilder_ == null) { - return java.util.Collections.unmodifiableList(services_); - } else { - return servicesBuilder_.getMessageList(); - } - } - /** - * repeated .context.Service services = 1; - */ - public int getServicesCount() { - if (servicesBuilder_ == null) { - return services_.size(); - } else { - return servicesBuilder_.getCount(); - } - } - /** - * repeated .context.Service services = 1; - */ - public context.ContextOuterClass.Service getServices(int index) { - if (servicesBuilder_ == null) { - return services_.get(index); - } else { - return servicesBuilder_.getMessage(index); - } - } - /** - * repeated .context.Service services = 1; - */ - public Builder setServices( - int index, context.ContextOuterClass.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.set(index, value); - onChanged(); - } else { - servicesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder setServices( - int index, context.ContextOuterClass.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.set(index, builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder addServices(context.ContextOuterClass.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.add(value); - onChanged(); - } else { - servicesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder addServices( - int index, context.ContextOuterClass.Service value) { - if (servicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServicesIsMutable(); - services_.add(index, value); - onChanged(); - } else { - servicesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder addServices( - context.ContextOuterClass.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder addServices( - int index, context.ContextOuterClass.Service.Builder builderForValue) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.add(index, builderForValue.build()); - onChanged(); - } else { - servicesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder addAllServices( - java.lang.Iterable values) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, services_); - onChanged(); - } else { - servicesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder clearServices() { - if (servicesBuilder_ == null) { - services_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - servicesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public Builder removeServices(int index) { - if (servicesBuilder_ == null) { - ensureServicesIsMutable(); - services_.remove(index); - onChanged(); - } else { - servicesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Service services = 1; - */ - public context.ContextOuterClass.Service.Builder getServicesBuilder( - int index) { - return getServicesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Service services = 1; - */ - public context.ContextOuterClass.ServiceOrBuilder getServicesOrBuilder( - int index) { - if (servicesBuilder_ == null) { - return services_.get(index); } else { - return servicesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Service services = 1; - */ - public java.util.List - getServicesOrBuilderList() { - if (servicesBuilder_ != null) { - return servicesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(services_); - } - } - /** - * repeated .context.Service services = 1; - */ - public context.ContextOuterClass.Service.Builder addServicesBuilder() { - return getServicesFieldBuilder().addBuilder( - context.ContextOuterClass.Service.getDefaultInstance()); - } - /** - * repeated .context.Service services = 1; - */ - public context.ContextOuterClass.Service.Builder addServicesBuilder( - int index) { - return getServicesFieldBuilder().addBuilder( - index, context.ContextOuterClass.Service.getDefaultInstance()); - } - /** - * repeated .context.Service services = 1; - */ - public java.util.List - getServicesBuilderList() { - return getServicesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Service, context.ContextOuterClass.Service.Builder, context.ContextOuterClass.ServiceOrBuilder> - getServicesFieldBuilder() { - if (servicesBuilder_ == null) { - servicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Service, context.ContextOuterClass.Service.Builder, context.ContextOuterClass.ServiceOrBuilder>( - services_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - services_ = null; - } - return servicesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceList) - } + /** + * uint32 port = 3; + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } - // @@protoc_insertion_point(class_scope:context.ServiceList) - private static final context.ContextOuterClass.ServiceList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceList(); - } + /** + * uint32 port = 3; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + port_ = value; + onChanged(); + return this; + } - public static context.ContextOuterClass.ServiceList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * uint32 port = 3; + * @return This builder for chaining. + */ + public Builder clearPort() { + port_ = 0; + onChanged(); + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.TeraFlowController) + } - @java.lang.Override - public context.ContextOuterClass.ServiceList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + // @@protoc_insertion_point(class_scope:context.TeraFlowController) + private static final context.ContextOuterClass.TeraFlowController DEFAULT_INSTANCE; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.TeraFlowController(); + } - public interface ServiceFilterOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceFilter) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.TeraFlowController getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * .context.ServiceIdList service_ids = 1; - * @return Whether the serviceIds field is set. - */ - boolean hasServiceIds(); - /** - * .context.ServiceIdList service_ids = 1; - * @return The serviceIds. - */ - context.ContextOuterClass.ServiceIdList getServiceIds(); - /** - * .context.ServiceIdList service_ids = 1; - */ - context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder(); + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - /** - * bool include_endpoint_ids = 2; - * @return The includeEndpointIds. - */ - boolean getIncludeEndpointIds(); + @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); + } + }; - /** - * bool include_constraints = 3; - * @return The includeConstraints. - */ - boolean getIncludeConstraints(); + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * bool include_config_rules = 4; - * @return The includeConfigRules. - */ - boolean getIncludeConfigRules(); - } - /** - * Protobuf type {@code context.ServiceFilter} - */ - public static final class ServiceFilter extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceFilter) - ServiceFilterOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceFilter.newBuilder() to construct. - private ServiceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceFilter() { - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceFilter(); + @java.lang.Override + public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @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; - } + public interface AuthenticationResultOrBuilder extends // @@protoc_insertion_point(interface_extends:context.AuthenticationResult) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceFilter.class, context.ContextOuterClass.ServiceFilter.Builder.class); - } + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + boolean hasContextId(); - public static final int SERVICE_IDS_FIELD_NUMBER = 1; - private context.ContextOuterClass.ServiceIdList serviceIds_; - /** - * .context.ServiceIdList service_ids = 1; - * @return Whether the serviceIds field is set. - */ - @java.lang.Override - public boolean hasServiceIds() { - return serviceIds_ != null; - } - /** - * .context.ServiceIdList service_ids = 1; - * @return The serviceIds. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdList getServiceIds() { - return serviceIds_ == null ? context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; - } - /** - * .context.ServiceIdList service_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder() { - return getServiceIds(); - } + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + context.ContextOuterClass.ContextId getContextId(); - public static final int INCLUDE_ENDPOINT_IDS_FIELD_NUMBER = 2; - private boolean includeEndpointIds_; - /** - * bool include_endpoint_ids = 2; - * @return The includeEndpointIds. - */ - @java.lang.Override - public boolean getIncludeEndpointIds() { - return includeEndpointIds_; - } + /** + * .context.ContextId context_id = 1; + */ + context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); - public static final int INCLUDE_CONSTRAINTS_FIELD_NUMBER = 3; - private boolean includeConstraints_; - /** - * bool include_constraints = 3; - * @return The includeConstraints. - */ - @java.lang.Override - public boolean getIncludeConstraints() { - return includeConstraints_; + /** + * bool authenticated = 2; + * @return The authenticated. + */ + boolean getAuthenticated(); } - public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 4; - private boolean includeConfigRules_; /** - * bool include_config_rules = 4; - * @return The includeConfigRules. + * Protobuf type {@code context.AuthenticationResult} */ - @java.lang.Override - public boolean getIncludeConfigRules() { - return includeConfigRules_; - } + public static final class AuthenticationResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.AuthenticationResult) + AuthenticationResultOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use AuthenticationResult.newBuilder() to construct. + private AuthenticationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (serviceIds_ != null) { - output.writeMessage(1, getServiceIds()); - } - if (includeEndpointIds_ != false) { - output.writeBool(2, includeEndpointIds_); - } - if (includeConstraints_ != false) { - output.writeBool(3, includeConstraints_); - } - if (includeConfigRules_ != false) { - output.writeBool(4, includeConfigRules_); - } - unknownFields.writeTo(output); - } + private AuthenticationResult() { + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (serviceIds_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getServiceIds()); - } - if (includeEndpointIds_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, includeEndpointIds_); - } - if (includeConstraints_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, includeConstraints_); - } - if (includeConfigRules_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, includeConfigRules_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuthenticationResult(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceFilter)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceFilter other = (context.ContextOuterClass.ServiceFilter) obj; - - if (hasServiceIds() != other.hasServiceIds()) return false; - if (hasServiceIds()) { - if (!getServiceIds() - .equals(other.getServiceIds())) return false; - } - if (getIncludeEndpointIds() - != other.getIncludeEndpointIds()) return false; - if (getIncludeConstraints() - != other.getIncludeConstraints()) return false; - if (getIncludeConfigRules() - != other.getIncludeConfigRules()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasServiceIds()) { - hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getServiceIds().hashCode(); - } - hash = (37 * hash) + INCLUDE_ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeEndpointIds()); - hash = (37 * hash) + INCLUDE_CONSTRAINTS_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + 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 context.ContextOuterClass.ServiceFilter parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceFilter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceFilter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceFilter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceFilter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceFilter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceFilter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ServiceFilter} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceFilter) - context.ContextOuterClass.ServiceFilterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceFilter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceFilter.class, context.ContextOuterClass.ServiceFilter.Builder.class); - } - - // 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; - serviceIdsBuilder_ = null; - } - includeEndpointIds_ = false; - - includeConstraints_ = false; - - includeConfigRules_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceFilter_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceFilter getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceFilter.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceFilter build() { - context.ContextOuterClass.ServiceFilter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceFilter) { - return mergeFrom((context.ContextOuterClass.ServiceFilter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceFilter other) { - if (other == context.ContextOuterClass.ServiceFilter.getDefaultInstance()) return this; - if (other.hasServiceIds()) { - mergeServiceIds(other.getServiceIds()); - } - if (other.getIncludeEndpointIds() != false) { - setIncludeEndpointIds(other.getIncludeEndpointIds()); - } - if (other.getIncludeConstraints() != false) { - setIncludeConstraints(other.getIncludeConstraints()); - } - if (other.getIncludeConfigRules() != false) { - setIncludeConfigRules(other.getIncludeConfigRules()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceFilter) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ServiceIdList serviceIds_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceIdList, context.ContextOuterClass.ServiceIdList.Builder, context.ContextOuterClass.ServiceIdListOrBuilder> serviceIdsBuilder_; - /** - * .context.ServiceIdList service_ids = 1; - * @return Whether the serviceIds field is set. - */ - public boolean hasServiceIds() { - return serviceIdsBuilder_ != null || serviceIds_ != null; - } - /** - * .context.ServiceIdList service_ids = 1; - * @return The serviceIds. - */ - public context.ContextOuterClass.ServiceIdList getServiceIds() { - if (serviceIdsBuilder_ == null) { - return serviceIds_ == null ? context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; - } else { - return serviceIdsBuilder_.getMessage(); - } - } - /** - * .context.ServiceIdList service_ids = 1; - */ - public Builder setServiceIds(context.ContextOuterClass.ServiceIdList value) { - if (serviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceIds_ = value; - onChanged(); - } else { - serviceIdsBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceIdList service_ids = 1; - */ - public Builder setServiceIds( - context.ContextOuterClass.ServiceIdList.Builder builderForValue) { - if (serviceIdsBuilder_ == null) { - serviceIds_ = builderForValue.build(); - onChanged(); - } else { - serviceIdsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceIdList service_ids = 1; - */ - public Builder mergeServiceIds(context.ContextOuterClass.ServiceIdList value) { - if (serviceIdsBuilder_ == null) { - if (serviceIds_ != null) { - serviceIds_ = - context.ContextOuterClass.ServiceIdList.newBuilder(serviceIds_).mergeFrom(value).buildPartial(); - } else { - serviceIds_ = value; - } - onChanged(); - } else { - serviceIdsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceIdList service_ids = 1; - */ - public Builder clearServiceIds() { - if (serviceIdsBuilder_ == null) { - serviceIds_ = null; - onChanged(); - } else { - serviceIds_ = null; - serviceIdsBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceIdList service_ids = 1; - */ - public context.ContextOuterClass.ServiceIdList.Builder getServiceIdsBuilder() { - - onChanged(); - return getServiceIdsFieldBuilder().getBuilder(); - } - /** - * .context.ServiceIdList service_ids = 1; - */ - public context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder() { - if (serviceIdsBuilder_ != null) { - return serviceIdsBuilder_.getMessageOrBuilder(); - } else { - return serviceIds_ == null ? - context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; - } - } - /** - * .context.ServiceIdList service_ids = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceIdList, context.ContextOuterClass.ServiceIdList.Builder, context.ContextOuterClass.ServiceIdListOrBuilder> - getServiceIdsFieldBuilder() { - if (serviceIdsBuilder_ == null) { - serviceIdsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceIdList, context.ContextOuterClass.ServiceIdList.Builder, context.ContextOuterClass.ServiceIdListOrBuilder>( - getServiceIds(), - getParentForChildren(), - isClean()); - serviceIds_ = null; - } - return serviceIdsBuilder_; - } - - private boolean includeEndpointIds_ ; - /** - * bool include_endpoint_ids = 2; - * @return The includeEndpointIds. - */ - @java.lang.Override - public boolean getIncludeEndpointIds() { - return includeEndpointIds_; - } - /** - * bool include_endpoint_ids = 2; - * @param value The includeEndpointIds to set. - * @return This builder for chaining. - */ - public Builder setIncludeEndpointIds(boolean value) { - - includeEndpointIds_ = value; - onChanged(); - return this; - } - /** - * bool include_endpoint_ids = 2; - * @return This builder for chaining. - */ - public Builder clearIncludeEndpointIds() { - - includeEndpointIds_ = false; - onChanged(); - return this; - } - - private boolean includeConstraints_ ; - /** - * bool include_constraints = 3; - * @return The includeConstraints. - */ - @java.lang.Override - public boolean getIncludeConstraints() { - return includeConstraints_; - } - /** - * bool include_constraints = 3; - * @param value The includeConstraints to set. - * @return This builder for chaining. - */ - public Builder setIncludeConstraints(boolean value) { - - includeConstraints_ = value; - onChanged(); - return this; - } - /** - * bool include_constraints = 3; - * @return This builder for chaining. - */ - public Builder clearIncludeConstraints() { - - includeConstraints_ = false; - onChanged(); - return this; - } - - private boolean includeConfigRules_ ; - /** - * bool include_config_rules = 4; - * @return The includeConfigRules. - */ - @java.lang.Override - public boolean getIncludeConfigRules() { - return includeConfigRules_; - } - /** - * bool include_config_rules = 4; - * @param value The includeConfigRules to set. - * @return This builder for chaining. - */ - public Builder setIncludeConfigRules(boolean value) { - - includeConfigRules_ = value; - onChanged(); - return this; - } - /** - * bool include_config_rules = 4; - * @return This builder for chaining. - */ - public Builder clearIncludeConfigRules() { - - includeConfigRules_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceFilter) - } + public static final int CONTEXT_ID_FIELD_NUMBER = 1; - // @@protoc_insertion_point(class_scope:context.ServiceFilter) - private static final context.ContextOuterClass.ServiceFilter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceFilter(); - } + private context.ContextOuterClass.ContextId contextId_; - public static context.ContextOuterClass.ServiceFilter getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + @java.lang.Override + public boolean hasContextId() { + return contextId_ != null; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + @java.lang.Override + public context.ContextOuterClass.ContextId getContextId() { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.ContextId context_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + return getContextId(); + } - @java.lang.Override - public context.ContextOuterClass.ServiceFilter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static final int AUTHENTICATED_FIELD_NUMBER = 2; - } + private boolean authenticated_; - public interface ServiceEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ServiceEvent) - com.google.protobuf.MessageOrBuilder { + /** + * bool authenticated = 2; + * @return The authenticated. + */ + @java.lang.Override + public boolean getAuthenticated() { + return authenticated_; + } - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + private byte memoizedIsInitialized = -1; - /** - * .context.ServiceId service_id = 2; - * @return Whether the serviceId field is set. - */ - boolean hasServiceId(); - /** - * .context.ServiceId service_id = 2; - * @return The serviceId. - */ - context.ContextOuterClass.ServiceId getServiceId(); - /** - * .context.ServiceId service_id = 2; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); - } - /** - * Protobuf type {@code context.ServiceEvent} - */ - public static final class ServiceEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ServiceEvent) - ServiceEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceEvent.newBuilder() to construct. - private ServiceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServiceEvent() { - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ServiceEvent(); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contextId_ != null) { + output.writeMessage(1, getContextId()); + } + if (authenticated_ != false) { + output.writeBool(2, authenticated_); + } + unknownFields.writeTo(output); + } - @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; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (contextId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); + } + if (authenticated_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, authenticated_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceEvent.class, context.ContextOuterClass.ServiceEvent.Builder.class); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.AuthenticationResult)) { + return super.equals(obj); + } + context.ContextOuterClass.AuthenticationResult other = (context.ContextOuterClass.AuthenticationResult) obj; + if (hasContextId() != other.hasContextId()) + return false; + if (hasContextId()) { + if (!getContextId().equals(other.getContextId())) + return false; + } + if (getAuthenticated() != other.getAuthenticated()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContextId()) { + hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContextId().hashCode(); + } + hash = (37 * hash) + AUTHENTICATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAuthenticated()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int SERVICE_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.ServiceId serviceId_; - /** - * .context.ServiceId service_id = 2; - * @return Whether the serviceId field is set. - */ - @java.lang.Override - public boolean hasServiceId() { - return serviceId_ != null; - } - /** - * .context.ServiceId service_id = 2; - * @return The serviceId. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceId() { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - /** - * .context.ServiceId service_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (serviceId_ != null) { - output.writeMessage(2, getServiceId()); - } - unknownFields.writeTo(output); - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (serviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getServiceId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ServiceEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.ServiceEvent other = (context.ContextOuterClass.ServiceEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasServiceId() != other.hasServiceId()) return false; - if (hasServiceId()) { - if (!getServiceId() - .equals(other.getServiceId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasServiceId()) { - hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - public static context.ContextOuterClass.ServiceEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ServiceEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ServiceEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ServiceEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ServiceEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ServiceEvent) - context.ContextOuterClass.ServiceEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ServiceEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ServiceEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ServiceEvent.class, context.ContextOuterClass.ServiceEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ServiceEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ServiceEvent getDefaultInstanceForType() { - return context.ContextOuterClass.ServiceEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ServiceEvent build() { - context.ContextOuterClass.ServiceEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ServiceEvent) { - return mergeFrom((context.ContextOuterClass.ServiceEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ServiceEvent other) { - if (other == context.ContextOuterClass.ServiceEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasServiceId()) { - mergeServiceId(other.getServiceId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.ServiceId serviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdBuilder_; - /** - * .context.ServiceId service_id = 2; - * @return Whether the serviceId field is set. - */ - public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; - } - /** - * .context.ServiceId service_id = 2; - * @return The serviceId. - */ - public context.ContextOuterClass.ServiceId getServiceId() { - if (serviceIdBuilder_ == null) { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } else { - return serviceIdBuilder_.getMessage(); - } - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder setServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - onChanged(); - } else { - serviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder setServiceId( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdBuilder_ == null) { - serviceId_ = builderForValue.build(); - onChanged(); - } else { - serviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = - context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); - } else { - serviceId_ = value; - } - onChanged(); - } else { - serviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { - - onChanged(); - return getServiceIdFieldBuilder().getBuilder(); - } - /** - * .context.ServiceId service_id = 2; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - if (serviceIdBuilder_ != null) { - return serviceIdBuilder_.getMessageOrBuilder(); - } else { - return serviceId_ == null ? - context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - } - /** - * .context.ServiceId service_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> - getServiceIdFieldBuilder() { - if (serviceIdBuilder_ == null) { - serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>( - getServiceId(), - getParentForChildren(), - isClean()); - serviceId_ = null; - } - return serviceIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ServiceEvent) - } + public static context.ContextOuterClass.AuthenticationResult parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:context.ServiceEvent) - private static final context.ContextOuterClass.ServiceEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ServiceEvent(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static context.ContextOuterClass.ServiceEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static Builder newBuilder(context.ContextOuterClass.AuthenticationResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public context.ContextOuterClass.ServiceEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - } + /** + * Protobuf type {@code context.AuthenticationResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.AuthenticationResult) + context.ContextOuterClass.AuthenticationResultOrBuilder { - public interface SliceIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceId) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; + } - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); + } - /** - * .context.Uuid slice_uuid = 2; - * @return Whether the sliceUuid field is set. - */ - boolean hasSliceUuid(); - /** - * .context.Uuid slice_uuid = 2; - * @return The sliceUuid. - */ - context.ContextOuterClass.Uuid getSliceUuid(); - /** - * .context.Uuid slice_uuid = 2; - */ - context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder(); - } - /** - *
-   * ----- Slice ---------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.SliceId} - */ - public static final class SliceId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceId) - SliceIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceId.newBuilder() to construct. - private SliceId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceId() { - } + // Construct using context.ContextOuterClass.AuthenticationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceId(); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @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; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceId.class, context.ContextOuterClass.SliceId.Builder.class); - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (contextIdBuilder_ == null) { + contextId_ = null; + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + authenticated_ = false; + return this; + } - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - /** - * .context.ContextId context_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; + } - public static final int SLICE_UUID_FIELD_NUMBER = 2; - private context.ContextOuterClass.Uuid sliceUuid_; - /** - * .context.Uuid slice_uuid = 2; - * @return Whether the sliceUuid field is set. - */ - @java.lang.Override - public boolean hasSliceUuid() { - return sliceUuid_ != null; - } - /** - * .context.Uuid slice_uuid = 2; - * @return The sliceUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getSliceUuid() { - return sliceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; - } - /** - * .context.Uuid slice_uuid = 2; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder() { - return getSliceUuid(); - } + @java.lang.Override + public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { + return context.ContextOuterClass.AuthenticationResult.getDefaultInstance(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public context.ContextOuterClass.AuthenticationResult build() { + context.ContextOuterClass.AuthenticationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - memoizedIsInitialized = 1; - return true; - } + @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(); + } + result.authenticated_ = authenticated_; + onBuilt(); + return result; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (sliceUuid_ != null) { - output.writeMessage(2, getSliceUuid()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextId()); - } - if (sliceUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSliceUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @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 boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceId)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceId other = (context.ContextOuterClass.SliceId) obj; - - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (hasSliceUuid() != other.hasSliceUuid()) return false; - if (hasSliceUuid()) { - if (!getSliceUuid() - .equals(other.getSliceUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - if (hasSliceUuid()) { - hash = (37 * hash) + SLICE_UUID_FIELD_NUMBER; - hash = (53 * hash) + getSliceUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - public static context.ContextOuterClass.SliceId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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 newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Slice ---------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.SliceId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceId) - context.ContextOuterClass.SliceIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceId.class, context.ContextOuterClass.SliceId.Builder.class); - } - - // 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; - contextIdBuilder_ = null; - } - if (sliceUuidBuilder_ == null) { - sliceUuid_ = null; - } else { - sliceUuid_ = null; - sliceUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceId getDefaultInstanceForType() { - return context.ContextOuterClass.SliceId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceId build() { - context.ContextOuterClass.SliceId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceId) { - return mergeFrom((context.ContextOuterClass.SliceId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceId other) { - if (other == context.ContextOuterClass.SliceId.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (other.hasSliceUuid()) { - mergeSliceUuid(other.getSliceUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ContextId contextId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private context.ContextOuterClass.Uuid sliceUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> sliceUuidBuilder_; - /** - * .context.Uuid slice_uuid = 2; - * @return Whether the sliceUuid field is set. - */ - public boolean hasSliceUuid() { - return sliceUuidBuilder_ != null || sliceUuid_ != null; - } - /** - * .context.Uuid slice_uuid = 2; - * @return The sliceUuid. - */ - public context.ContextOuterClass.Uuid getSliceUuid() { - if (sliceUuidBuilder_ == null) { - return sliceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; - } else { - return sliceUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid slice_uuid = 2; - */ - public Builder setSliceUuid(context.ContextOuterClass.Uuid value) { - if (sliceUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceUuid_ = value; - onChanged(); - } else { - sliceUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid slice_uuid = 2; - */ - public Builder setSliceUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (sliceUuidBuilder_ == null) { - sliceUuid_ = builderForValue.build(); - onChanged(); - } else { - sliceUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid slice_uuid = 2; - */ - public Builder mergeSliceUuid(context.ContextOuterClass.Uuid value) { - if (sliceUuidBuilder_ == null) { - if (sliceUuid_ != null) { - sliceUuid_ = - context.ContextOuterClass.Uuid.newBuilder(sliceUuid_).mergeFrom(value).buildPartial(); - } else { - sliceUuid_ = value; - } - onChanged(); - } else { - sliceUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid slice_uuid = 2; - */ - public Builder clearSliceUuid() { - if (sliceUuidBuilder_ == null) { - sliceUuid_ = null; - onChanged(); - } else { - sliceUuid_ = null; - sliceUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid slice_uuid = 2; - */ - public context.ContextOuterClass.Uuid.Builder getSliceUuidBuilder() { - - onChanged(); - return getSliceUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid slice_uuid = 2; - */ - public context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder() { - if (sliceUuidBuilder_ != null) { - return sliceUuidBuilder_.getMessageOrBuilder(); - } else { - return sliceUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; - } - } - /** - * .context.Uuid slice_uuid = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getSliceUuidFieldBuilder() { - if (sliceUuidBuilder_ == null) { - sliceUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getSliceUuid(), - getParentForChildren(), - isClean()); - sliceUuid_ = null; - } - return sliceUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceId) - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.AuthenticationResult) { + return mergeFrom((context.ContextOuterClass.AuthenticationResult) other); + } else { + super.mergeFrom(other); + return this; + } + } - // @@protoc_insertion_point(class_scope:context.SliceId) - private static final context.ContextOuterClass.SliceId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceId(); - } + public Builder mergeFrom(context.ContextOuterClass.AuthenticationResult other) { + if (other == context.ContextOuterClass.AuthenticationResult.getDefaultInstance()) + return this; + if (other.hasContextId()) { + mergeContextId(other.getContextId()); + } + if (other.getAuthenticated() != false) { + setAuthenticated(other.getAuthenticated()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - public static context.ContextOuterClass.SliceId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.AuthenticationResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private context.ContextOuterClass.ContextId contextId_; - @java.lang.Override - public context.ContextOuterClass.SliceId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3 contextIdBuilder_; - } + /** + * .context.ContextId context_id = 1; + * @return Whether the contextId field is set. + */ + public boolean hasContextId() { + return contextIdBuilder_ != null || contextId_ != null; + } - public interface SliceOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Slice) - com.google.protobuf.MessageOrBuilder { + /** + * .context.ContextId context_id = 1; + * @return The contextId. + */ + public context.ContextOuterClass.ContextId getContextId() { + if (contextIdBuilder_ == null) { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } else { + return contextIdBuilder_.getMessage(); + } + } - /** - * .context.SliceId slice_id = 1; - * @return Whether the sliceId field is set. - */ - boolean hasSliceId(); - /** - * .context.SliceId slice_id = 1; - * @return The sliceId. - */ - context.ContextOuterClass.SliceId getSliceId(); - /** - * .context.SliceId slice_id = 1; - */ - context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contextId_ = value; + onChanged(); + } else { + contextIdBuilder_.setMessage(value); + } + return this; + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + /** + * .context.ContextId context_id = 1; + */ + public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { + if (contextIdBuilder_ == null) { + contextId_ = builderForValue.build(); + onChanged(); + } else { + contextIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - java.util.List - getSliceEndpointIdsList(); - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointId getSliceEndpointIds(int index); - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - int getSliceEndpointIdsCount(); - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - java.util.List - getSliceEndpointIdsOrBuilderList(); - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointIdOrBuilder getSliceEndpointIdsOrBuilder( - int index); + /** + * .context.ContextId context_id = 1; + */ + public Builder mergeContextId(context.ContextOuterClass.ContextId value) { + if (contextIdBuilder_ == null) { + if (contextId_ != null) { + contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + } else { + contextId_ = value; + } + onChanged(); + } else { + contextIdBuilder_.mergeFrom(value); + } + return this; + } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - java.util.List - getSliceConstraintsList(); - /** - * repeated .context.Constraint slice_constraints = 4; - */ - context.ContextOuterClass.Constraint getSliceConstraints(int index); - /** - * repeated .context.Constraint slice_constraints = 4; - */ - int getSliceConstraintsCount(); - /** - * repeated .context.Constraint slice_constraints = 4; - */ - java.util.List - getSliceConstraintsOrBuilderList(); - /** - * repeated .context.Constraint slice_constraints = 4; - */ - context.ContextOuterClass.ConstraintOrBuilder getSliceConstraintsOrBuilder( - int index); + /** + * .context.ContextId context_id = 1; + */ + public Builder clearContextId() { + if (contextIdBuilder_ == null) { + contextId_ = null; + onChanged(); + } else { + contextId_ = null; + contextIdBuilder_ = null; + } + return this; + } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - java.util.List - getSliceServiceIdsList(); - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - context.ContextOuterClass.ServiceId getSliceServiceIds(int index); - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - int getSliceServiceIdsCount(); - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - java.util.List - getSliceServiceIdsOrBuilderList(); - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - context.ContextOuterClass.ServiceIdOrBuilder getSliceServiceIdsOrBuilder( - int index); + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + onChanged(); + return getContextIdFieldBuilder().getBuilder(); + } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - java.util.List - getSliceSubsliceIdsList(); - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - context.ContextOuterClass.SliceId getSliceSubsliceIds(int index); - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - int getSliceSubsliceIdsCount(); - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - java.util.List - getSliceSubsliceIdsOrBuilderList(); - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - context.ContextOuterClass.SliceIdOrBuilder getSliceSubsliceIdsOrBuilder( - int index); + /** + * .context.ContextId context_id = 1; + */ + public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { + if (contextIdBuilder_ != null) { + return contextIdBuilder_.getMessageOrBuilder(); + } else { + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; + } + } - /** - * .context.SliceStatus slice_status = 7; - * @return Whether the sliceStatus field is set. - */ - boolean hasSliceStatus(); - /** - * .context.SliceStatus slice_status = 7; - * @return The sliceStatus. - */ - context.ContextOuterClass.SliceStatus getSliceStatus(); - /** - * .context.SliceStatus slice_status = 7; - */ - context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder(); + /** + * .context.ContextId context_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getContextIdFieldBuilder() { + if (contextIdBuilder_ == null) { + contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getContextId(), getParentForChildren(), isClean()); + contextId_ = null; + } + return contextIdBuilder_; + } - /** - * .context.SliceConfig slice_config = 8; - * @return Whether the sliceConfig field is set. - */ - boolean hasSliceConfig(); - /** - * .context.SliceConfig slice_config = 8; - * @return The sliceConfig. - */ - context.ContextOuterClass.SliceConfig getSliceConfig(); - /** - * .context.SliceConfig slice_config = 8; - */ - context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder(); + private boolean authenticated_; - /** - * .context.SliceOwner slice_owner = 9; - * @return Whether the sliceOwner field is set. - */ - boolean hasSliceOwner(); - /** - * .context.SliceOwner slice_owner = 9; - * @return The sliceOwner. - */ - context.ContextOuterClass.SliceOwner getSliceOwner(); - /** - * .context.SliceOwner slice_owner = 9; - */ - context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder(); + /** + * bool authenticated = 2; + * @return The authenticated. + */ + @java.lang.Override + public boolean getAuthenticated() { + return authenticated_; + } - /** - * .context.Timestamp timestamp = 10; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 10; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 10; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); - } - /** - * Protobuf type {@code context.Slice} - */ - public static final class Slice extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Slice) - SliceOrBuilder { - private static final long serialVersionUID = 0L; - // Use Slice.newBuilder() to construct. - private Slice(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Slice() { - name_ = ""; - sliceEndpointIds_ = java.util.Collections.emptyList(); - sliceConstraints_ = java.util.Collections.emptyList(); - sliceServiceIds_ = java.util.Collections.emptyList(); - sliceSubsliceIds_ = java.util.Collections.emptyList(); - } + /** + * bool authenticated = 2; + * @param value The authenticated to set. + * @return This builder for chaining. + */ + public Builder setAuthenticated(boolean value) { + authenticated_ = value; + onChanged(); + return this; + } + + /** + * bool authenticated = 2; + * @return This builder for chaining. + */ + public Builder clearAuthenticated() { + authenticated_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Slice(); - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.AuthenticationResult) + } - @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(); - 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(); - 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(); - 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(); - 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; - } + // @@protoc_insertion_point(class_scope:context.AuthenticationResult) + private static final context.ContextOuterClass.AuthenticationResult DEFAULT_INSTANCE; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Slice_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Slice.class, context.ContextOuterClass.Slice.Builder.class); - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.AuthenticationResult(); + } - public static final int SLICE_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.SliceId sliceId_; - /** - * .context.SliceId slice_id = 1; - * @return Whether the sliceId field is set. - */ - @java.lang.Override - public boolean hasSliceId() { - return sliceId_ != null; - } - /** - * .context.SliceId slice_id = 1; - * @return The sliceId. - */ - @java.lang.Override - public context.ContextOuterClass.SliceId getSliceId() { - return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } - /** - * .context.SliceId slice_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - return getSliceId(); - } + public static context.ContextOuterClass.AuthenticationResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static final int SLICE_ENDPOINT_IDS_FIELD_NUMBER = 3; - private java.util.List sliceEndpointIds_; - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List getSliceEndpointIdsList() { - return sliceEndpointIds_; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List - getSliceEndpointIdsOrBuilderList() { - return sliceEndpointIds_; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - @java.lang.Override - public int getSliceEndpointIdsCount() { - return sliceEndpointIds_.size(); - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getSliceEndpointIds(int index) { - return sliceEndpointIds_.get(index); - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getSliceEndpointIdsOrBuilder( - int index) { - return sliceEndpointIds_.get(index); - } + @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); + } + }; - public static final int SLICE_CONSTRAINTS_FIELD_NUMBER = 4; - private java.util.List sliceConstraints_; - /** - * repeated .context.Constraint slice_constraints = 4; - */ - @java.lang.Override - public java.util.List getSliceConstraintsList() { - return sliceConstraints_; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - @java.lang.Override - public java.util.List - getSliceConstraintsOrBuilderList() { - return sliceConstraints_; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - @java.lang.Override - public int getSliceConstraintsCount() { - return sliceConstraints_.size(); - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint getSliceConstraints(int index) { - return sliceConstraints_.get(index); - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - @java.lang.Override - public context.ContextOuterClass.ConstraintOrBuilder getSliceConstraintsOrBuilder( - int index) { - return sliceConstraints_.get(index); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - public static final int SLICE_SERVICE_IDS_FIELD_NUMBER = 5; - private java.util.List sliceServiceIds_; - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - @java.lang.Override - public java.util.List getSliceServiceIdsList() { - return sliceServiceIds_; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - @java.lang.Override - public java.util.List - getSliceServiceIdsOrBuilderList() { - return sliceServiceIds_; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - @java.lang.Override - public int getSliceServiceIdsCount() { - return sliceServiceIds_.size(); - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getSliceServiceIds(int index) { - return sliceServiceIds_.get(index); - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getSliceServiceIdsOrBuilder( - int index) { - return sliceServiceIds_.get(index); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static final int SLICE_SUBSLICE_IDS_FIELD_NUMBER = 6; - private java.util.List sliceSubsliceIds_; - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - @java.lang.Override - public java.util.List getSliceSubsliceIdsList() { - return sliceSubsliceIds_; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - @java.lang.Override - public java.util.List - getSliceSubsliceIdsOrBuilderList() { - return sliceSubsliceIds_; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - @java.lang.Override - public int getSliceSubsliceIdsCount() { - return sliceSubsliceIds_.size(); - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - @java.lang.Override - public context.ContextOuterClass.SliceId getSliceSubsliceIds(int index) { - return sliceSubsliceIds_.get(index); - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdOrBuilder getSliceSubsliceIdsOrBuilder( - int index) { - return sliceSubsliceIds_.get(index); + @java.lang.Override + public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static final int SLICE_STATUS_FIELD_NUMBER = 7; - private context.ContextOuterClass.SliceStatus sliceStatus_; - /** - * .context.SliceStatus slice_status = 7; - * @return Whether the sliceStatus field is set. - */ - @java.lang.Override - public boolean hasSliceStatus() { - return sliceStatus_ != null; - } - /** - * .context.SliceStatus slice_status = 7; - * @return The sliceStatus. - */ - @java.lang.Override - public context.ContextOuterClass.SliceStatus getSliceStatus() { - return sliceStatus_ == null ? context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; - } - /** - * .context.SliceStatus slice_status = 7; - */ - @java.lang.Override - public context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder() { - return getSliceStatus(); - } + public interface OpticalConfigIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigId) + com.google.protobuf.MessageOrBuilder { - public static final int SLICE_CONFIG_FIELD_NUMBER = 8; - private context.ContextOuterClass.SliceConfig sliceConfig_; - /** - * .context.SliceConfig slice_config = 8; - * @return Whether the sliceConfig field is set. - */ - @java.lang.Override - public boolean hasSliceConfig() { - return sliceConfig_ != null; - } - /** - * .context.SliceConfig slice_config = 8; - * @return The sliceConfig. - */ - @java.lang.Override - public context.ContextOuterClass.SliceConfig getSliceConfig() { - return sliceConfig_ == null ? context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; - } - /** - * .context.SliceConfig slice_config = 8; - */ - @java.lang.Override - public context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder() { - return getSliceConfig(); - } + /** + * string opticalconfig_uuid = 1; + * @return The opticalconfigUuid. + */ + java.lang.String getOpticalconfigUuid(); - public static final int SLICE_OWNER_FIELD_NUMBER = 9; - private context.ContextOuterClass.SliceOwner sliceOwner_; - /** - * .context.SliceOwner slice_owner = 9; - * @return Whether the sliceOwner field is set. - */ - @java.lang.Override - public boolean hasSliceOwner() { - return sliceOwner_ != null; - } - /** - * .context.SliceOwner slice_owner = 9; - * @return The sliceOwner. - */ - @java.lang.Override - public context.ContextOuterClass.SliceOwner getSliceOwner() { - return sliceOwner_ == null ? context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; - } - /** - * .context.SliceOwner slice_owner = 9; - */ - @java.lang.Override - public context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder() { - return getSliceOwner(); + /** + * string opticalconfig_uuid = 1; + * @return The bytes for opticalconfigUuid. + */ + com.google.protobuf.ByteString getOpticalconfigUuidBytes(); } - public static final int TIMESTAMP_FIELD_NUMBER = 10; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 10; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 10; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } /** - * .context.Timestamp timestamp = 10; + *
+     * ---------------- Experimental ------------------------
+     * 
+ * + * Protobuf type {@code context.OpticalConfigId} */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } + public static final class OpticalConfigId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigId) + OpticalConfigIdOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use OpticalConfigId.newBuilder() to construct. + private OpticalConfigId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sliceId_ != null) { - output.writeMessage(1, getSliceId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - for (int i = 0; i < sliceEndpointIds_.size(); i++) { - output.writeMessage(3, sliceEndpointIds_.get(i)); - } - for (int i = 0; i < sliceConstraints_.size(); i++) { - output.writeMessage(4, sliceConstraints_.get(i)); - } - for (int i = 0; i < sliceServiceIds_.size(); i++) { - output.writeMessage(5, sliceServiceIds_.get(i)); - } - for (int i = 0; i < sliceSubsliceIds_.size(); i++) { - output.writeMessage(6, sliceSubsliceIds_.get(i)); - } - if (sliceStatus_ != null) { - output.writeMessage(7, getSliceStatus()); - } - if (sliceConfig_ != null) { - output.writeMessage(8, getSliceConfig()); - } - if (sliceOwner_ != null) { - output.writeMessage(9, getSliceOwner()); - } - if (timestamp_ != null) { - output.writeMessage(10, getTimestamp()); - } - unknownFields.writeTo(output); - } + private OpticalConfigId() { + opticalconfigUuid_ = ""; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sliceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSliceId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - for (int i = 0; i < sliceEndpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, sliceEndpointIds_.get(i)); - } - for (int i = 0; i < sliceConstraints_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, sliceConstraints_.get(i)); - } - for (int i = 0; i < sliceServiceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, sliceServiceIds_.get(i)); - } - for (int i = 0; i < sliceSubsliceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, sliceSubsliceIds_.get(i)); - } - if (sliceStatus_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getSliceStatus()); - } - if (sliceConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getSliceConfig()); - } - if (sliceOwner_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getSliceOwner()); - } - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getTimestamp()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpticalConfigId(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Slice)) { - return super.equals(obj); - } - context.ContextOuterClass.Slice other = (context.ContextOuterClass.Slice) obj; - - if (hasSliceId() != other.hasSliceId()) return false; - if (hasSliceId()) { - if (!getSliceId() - .equals(other.getSliceId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getSliceEndpointIdsList() - .equals(other.getSliceEndpointIdsList())) return false; - if (!getSliceConstraintsList() - .equals(other.getSliceConstraintsList())) return false; - if (!getSliceServiceIdsList() - .equals(other.getSliceServiceIdsList())) return false; - if (!getSliceSubsliceIdsList() - .equals(other.getSliceSubsliceIdsList())) return false; - if (hasSliceStatus() != other.hasSliceStatus()) return false; - if (hasSliceStatus()) { - if (!getSliceStatus() - .equals(other.getSliceStatus())) return false; - } - if (hasSliceConfig() != other.hasSliceConfig()) return false; - if (hasSliceConfig()) { - if (!getSliceConfig() - .equals(other.getSliceConfig())) return false; - } - if (hasSliceOwner() != other.hasSliceOwner()) return false; - if (hasSliceOwner()) { - if (!getSliceOwner() - .equals(other.getSliceOwner())) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSliceId()) { - hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getSliceId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getSliceEndpointIdsCount() > 0) { - hash = (37 * hash) + SLICE_ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSliceEndpointIdsList().hashCode(); - } - if (getSliceConstraintsCount() > 0) { - hash = (37 * hash) + SLICE_CONSTRAINTS_FIELD_NUMBER; - hash = (53 * hash) + getSliceConstraintsList().hashCode(); - } - if (getSliceServiceIdsCount() > 0) { - hash = (37 * hash) + SLICE_SERVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSliceServiceIdsList().hashCode(); - } - if (getSliceSubsliceIdsCount() > 0) { - hash = (37 * hash) + SLICE_SUBSLICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSliceSubsliceIdsList().hashCode(); - } - if (hasSliceStatus()) { - hash = (37 * hash) + SLICE_STATUS_FIELD_NUMBER; - hash = (53 * hash) + getSliceStatus().hashCode(); - } - if (hasSliceConfig()) { - hash = (37 * hash) + SLICE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSliceConfig().hashCode(); - } - if (hasSliceOwner()) { - hash = (37 * hash) + SLICE_OWNER_FIELD_NUMBER; - hash = (53 * hash) + getSliceOwner().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + 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 context.ContextOuterClass.Slice parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Slice parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Slice parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Slice parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Slice parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Slice parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Slice parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Slice parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Slice parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Slice parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Slice parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Slice parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Slice prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfigId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigId.class, context.ContextOuterClass.OpticalConfigId.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Slice} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Slice) - context.ContextOuterClass.SliceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Slice_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Slice_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Slice.class, context.ContextOuterClass.Slice.Builder.class); - } - - // 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; - sliceIdBuilder_ = null; - } - name_ = ""; - - if (sliceEndpointIdsBuilder_ == null) { - sliceEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - sliceEndpointIdsBuilder_.clear(); - } - if (sliceConstraintsBuilder_ == null) { - sliceConstraints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - sliceConstraintsBuilder_.clear(); - } - if (sliceServiceIdsBuilder_ == null) { - sliceServiceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - sliceServiceIdsBuilder_.clear(); - } - if (sliceSubsliceIdsBuilder_ == null) { - sliceSubsliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - sliceSubsliceIdsBuilder_.clear(); - } - if (sliceStatusBuilder_ == null) { - sliceStatus_ = null; - } else { - sliceStatus_ = null; - sliceStatusBuilder_ = null; - } - if (sliceConfigBuilder_ == null) { - sliceConfig_ = null; - } else { - sliceConfig_ = null; - sliceConfigBuilder_ = null; - } - if (sliceOwnerBuilder_ == null) { - sliceOwner_ = null; - } else { - sliceOwner_ = null; - sliceOwnerBuilder_ = null; - } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Slice_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Slice getDefaultInstanceForType() { - return context.ContextOuterClass.Slice.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Slice build() { - context.ContextOuterClass.Slice result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.name_ = name_; - if (sliceEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - sliceEndpointIds_ = java.util.Collections.unmodifiableList(sliceEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.sliceEndpointIds_ = sliceEndpointIds_; - } else { - result.sliceEndpointIds_ = sliceEndpointIdsBuilder_.build(); - } - if (sliceConstraintsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - sliceConstraints_ = java.util.Collections.unmodifiableList(sliceConstraints_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.sliceConstraints_ = sliceConstraints_; - } else { - result.sliceConstraints_ = sliceConstraintsBuilder_.build(); - } - if (sliceServiceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - sliceServiceIds_ = java.util.Collections.unmodifiableList(sliceServiceIds_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.sliceServiceIds_ = sliceServiceIds_; - } else { - result.sliceServiceIds_ = sliceServiceIdsBuilder_.build(); - } - if (sliceSubsliceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - sliceSubsliceIds_ = java.util.Collections.unmodifiableList(sliceSubsliceIds_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.sliceSubsliceIds_ = sliceSubsliceIds_; - } else { - result.sliceSubsliceIds_ = sliceSubsliceIdsBuilder_.build(); - } - if (sliceStatusBuilder_ == null) { - result.sliceStatus_ = sliceStatus_; - } else { - result.sliceStatus_ = sliceStatusBuilder_.build(); - } - if (sliceConfigBuilder_ == null) { - result.sliceConfig_ = sliceConfig_; - } else { - result.sliceConfig_ = sliceConfigBuilder_.build(); - } - if (sliceOwnerBuilder_ == null) { - result.sliceOwner_ = sliceOwner_; - } else { - result.sliceOwner_ = sliceOwnerBuilder_.build(); - } - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; - } else { - result.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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Slice) { - return mergeFrom((context.ContextOuterClass.Slice)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Slice other) { - if (other == context.ContextOuterClass.Slice.getDefaultInstance()) return this; - if (other.hasSliceId()) { - mergeSliceId(other.getSliceId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (sliceEndpointIdsBuilder_ == null) { - if (!other.sliceEndpointIds_.isEmpty()) { - if (sliceEndpointIds_.isEmpty()) { - sliceEndpointIds_ = other.sliceEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.addAll(other.sliceEndpointIds_); - } - onChanged(); - } - } else { - if (!other.sliceEndpointIds_.isEmpty()) { - if (sliceEndpointIdsBuilder_.isEmpty()) { - sliceEndpointIdsBuilder_.dispose(); - sliceEndpointIdsBuilder_ = null; - sliceEndpointIds_ = other.sliceEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - sliceEndpointIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSliceEndpointIdsFieldBuilder() : null; + public static final int OPTICALCONFIG_UUID_FIELD_NUMBER = 1; + + private volatile java.lang.Object opticalconfigUuid_; + + /** + * string opticalconfig_uuid = 1; + * @return The opticalconfigUuid. + */ + @java.lang.Override + public java.lang.String getOpticalconfigUuid() { + java.lang.Object ref = opticalconfigUuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - sliceEndpointIdsBuilder_.addAllMessages(other.sliceEndpointIds_); + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + opticalconfigUuid_ = s; + return s; } - } } - if (sliceConstraintsBuilder_ == null) { - if (!other.sliceConstraints_.isEmpty()) { - if (sliceConstraints_.isEmpty()) { - sliceConstraints_ = other.sliceConstraints_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSliceConstraintsIsMutable(); - sliceConstraints_.addAll(other.sliceConstraints_); - } - onChanged(); - } - } else { - if (!other.sliceConstraints_.isEmpty()) { - if (sliceConstraintsBuilder_.isEmpty()) { - sliceConstraintsBuilder_.dispose(); - sliceConstraintsBuilder_ = null; - sliceConstraints_ = other.sliceConstraints_; - bitField0_ = (bitField0_ & ~0x00000002); - sliceConstraintsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSliceConstraintsFieldBuilder() : null; + + /** + * string opticalconfig_uuid = 1; + * @return The bytes for opticalconfigUuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOpticalconfigUuidBytes() { + java.lang.Object ref = opticalconfigUuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + opticalconfigUuid_ = b; + return b; } else { - sliceConstraintsBuilder_.addAllMessages(other.sliceConstraints_); + return (com.google.protobuf.ByteString) ref; } - } } - if (sliceServiceIdsBuilder_ == null) { - if (!other.sliceServiceIds_.isEmpty()) { - if (sliceServiceIds_.isEmpty()) { - sliceServiceIds_ = other.sliceServiceIds_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.addAll(other.sliceServiceIds_); - } - onChanged(); - } - } else { - if (!other.sliceServiceIds_.isEmpty()) { - if (sliceServiceIdsBuilder_.isEmpty()) { - sliceServiceIdsBuilder_.dispose(); - sliceServiceIdsBuilder_ = null; - sliceServiceIds_ = other.sliceServiceIds_; - bitField0_ = (bitField0_ & ~0x00000004); - sliceServiceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSliceServiceIdsFieldBuilder() : null; - } else { - sliceServiceIdsBuilder_.addAllMessages(other.sliceServiceIds_); + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getOpticalconfigUuidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, opticalconfigUuid_); } - } + unknownFields.writeTo(output); } - if (sliceSubsliceIdsBuilder_ == null) { - if (!other.sliceSubsliceIds_.isEmpty()) { - if (sliceSubsliceIds_.isEmpty()) { - sliceSubsliceIds_ = other.sliceSubsliceIds_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.addAll(other.sliceSubsliceIds_); - } - onChanged(); - } - } else { - if (!other.sliceSubsliceIds_.isEmpty()) { - if (sliceSubsliceIdsBuilder_.isEmpty()) { - sliceSubsliceIdsBuilder_.dispose(); - sliceSubsliceIdsBuilder_ = null; - sliceSubsliceIds_ = other.sliceSubsliceIds_; - bitField0_ = (bitField0_ & ~0x00000008); - sliceSubsliceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSliceSubsliceIdsFieldBuilder() : null; - } else { - sliceSubsliceIdsBuilder_.addAllMessages(other.sliceSubsliceIds_); - } - } - } - if (other.hasSliceStatus()) { - mergeSliceStatus(other.getSliceStatus()); - } - if (other.hasSliceConfig()) { - mergeSliceConfig(other.getSliceConfig()); - } - if (other.hasSliceOwner()) { - mergeSliceOwner(other.getSliceOwner()); - } - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Slice) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private context.ContextOuterClass.SliceId sliceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> sliceIdBuilder_; - /** - * .context.SliceId slice_id = 1; - * @return Whether the sliceId field is set. - */ - public boolean hasSliceId() { - return sliceIdBuilder_ != null || sliceId_ != null; - } - /** - * .context.SliceId slice_id = 1; - * @return The sliceId. - */ - public context.ContextOuterClass.SliceId getSliceId() { - if (sliceIdBuilder_ == null) { - return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } else { - return sliceIdBuilder_.getMessage(); - } - } - /** - * .context.SliceId slice_id = 1; - */ - public Builder setSliceId(context.ContextOuterClass.SliceId value) { - if (sliceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceId_ = value; - onChanged(); - } else { - sliceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceId slice_id = 1; - */ - public Builder setSliceId( - context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdBuilder_ == null) { - sliceId_ = builderForValue.build(); - onChanged(); - } else { - sliceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceId slice_id = 1; - */ - public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { - if (sliceIdBuilder_ == null) { - if (sliceId_ != null) { - sliceId_ = - context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); - } else { - sliceId_ = value; - } - onChanged(); - } else { - sliceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceId slice_id = 1; - */ - public Builder clearSliceId() { - if (sliceIdBuilder_ == null) { - sliceId_ = null; - onChanged(); - } else { - sliceId_ = null; - sliceIdBuilder_ = null; - } - - return this; - } - /** - * .context.SliceId slice_id = 1; - */ - public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { - - onChanged(); - return getSliceIdFieldBuilder().getBuilder(); - } - /** - * .context.SliceId slice_id = 1; - */ - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - if (sliceIdBuilder_ != null) { - return sliceIdBuilder_.getMessageOrBuilder(); - } else { - return sliceId_ == null ? - context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } - } - /** - * .context.SliceId slice_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> - getSliceIdFieldBuilder() { - if (sliceIdBuilder_ == null) { - sliceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder>( - getSliceId(), - getParentForChildren(), - isClean()); - sliceId_ = null; - } - return sliceIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List sliceEndpointIds_ = - java.util.Collections.emptyList(); - private void ensureSliceEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - sliceEndpointIds_ = new java.util.ArrayList(sliceEndpointIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> sliceEndpointIdsBuilder_; - - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public java.util.List getSliceEndpointIdsList() { - if (sliceEndpointIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sliceEndpointIds_); - } else { - return sliceEndpointIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public int getSliceEndpointIdsCount() { - if (sliceEndpointIdsBuilder_ == null) { - return sliceEndpointIds_.size(); - } else { - return sliceEndpointIdsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId getSliceEndpointIds(int index) { - if (sliceEndpointIdsBuilder_ == null) { - return sliceEndpointIds_.get(index); - } else { - return sliceEndpointIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder setSliceEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (sliceEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.set(index, value); - onChanged(); - } else { - sliceEndpointIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder setSliceEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (sliceEndpointIdsBuilder_ == null) { - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.set(index, builderForValue.build()); - onChanged(); - } else { - sliceEndpointIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder addSliceEndpointIds(context.ContextOuterClass.EndPointId value) { - if (sliceEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.add(value); - onChanged(); - } else { - sliceEndpointIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder addSliceEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (sliceEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.add(index, value); - onChanged(); - } else { - sliceEndpointIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder addSliceEndpointIds( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (sliceEndpointIdsBuilder_ == null) { - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.add(builderForValue.build()); - onChanged(); - } else { - sliceEndpointIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder addSliceEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (sliceEndpointIdsBuilder_ == null) { - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.add(index, builderForValue.build()); - onChanged(); - } else { - sliceEndpointIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder addAllSliceEndpointIds( - java.lang.Iterable values) { - if (sliceEndpointIdsBuilder_ == null) { - ensureSliceEndpointIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sliceEndpointIds_); - onChanged(); - } else { - sliceEndpointIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder clearSliceEndpointIds() { - if (sliceEndpointIdsBuilder_ == null) { - sliceEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - sliceEndpointIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public Builder removeSliceEndpointIds(int index) { - if (sliceEndpointIdsBuilder_ == null) { - ensureSliceEndpointIdsIsMutable(); - sliceEndpointIds_.remove(index); - onChanged(); - } else { - sliceEndpointIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder getSliceEndpointIdsBuilder( - int index) { - return getSliceEndpointIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getSliceEndpointIdsOrBuilder( - int index) { - if (sliceEndpointIdsBuilder_ == null) { - return sliceEndpointIds_.get(index); } else { - return sliceEndpointIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public java.util.List - getSliceEndpointIdsOrBuilderList() { - if (sliceEndpointIdsBuilder_ != null) { - return sliceEndpointIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sliceEndpointIds_); - } - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addSliceEndpointIdsBuilder() { - return getSliceEndpointIdsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addSliceEndpointIdsBuilder( - int index) { - return getSliceEndpointIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId slice_endpoint_ids = 3; - */ - public java.util.List - getSliceEndpointIdsBuilderList() { - return getSliceEndpointIdsFieldBuilder().getBuilderList(); - } - 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()); - sliceEndpointIds_ = null; - } - return sliceEndpointIdsBuilder_; - } - - private java.util.List sliceConstraints_ = - java.util.Collections.emptyList(); - private void ensureSliceConstraintsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - sliceConstraints_ = new java.util.ArrayList(sliceConstraints_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Constraint, context.ContextOuterClass.Constraint.Builder, context.ContextOuterClass.ConstraintOrBuilder> sliceConstraintsBuilder_; - - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public java.util.List getSliceConstraintsList() { - if (sliceConstraintsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sliceConstraints_); - } else { - return sliceConstraintsBuilder_.getMessageList(); - } - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public int getSliceConstraintsCount() { - if (sliceConstraintsBuilder_ == null) { - return sliceConstraints_.size(); - } else { - return sliceConstraintsBuilder_.getCount(); - } - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public context.ContextOuterClass.Constraint getSliceConstraints(int index) { - if (sliceConstraintsBuilder_ == null) { - return sliceConstraints_.get(index); - } else { - return sliceConstraintsBuilder_.getMessage(index); - } - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder setSliceConstraints( - int index, context.ContextOuterClass.Constraint value) { - if (sliceConstraintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceConstraintsIsMutable(); - sliceConstraints_.set(index, value); - onChanged(); - } else { - sliceConstraintsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder setSliceConstraints( - int index, context.ContextOuterClass.Constraint.Builder builderForValue) { - if (sliceConstraintsBuilder_ == null) { - ensureSliceConstraintsIsMutable(); - sliceConstraints_.set(index, builderForValue.build()); - onChanged(); - } else { - sliceConstraintsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder addSliceConstraints(context.ContextOuterClass.Constraint value) { - if (sliceConstraintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceConstraintsIsMutable(); - sliceConstraints_.add(value); - onChanged(); - } else { - sliceConstraintsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder addSliceConstraints( - int index, context.ContextOuterClass.Constraint value) { - if (sliceConstraintsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceConstraintsIsMutable(); - sliceConstraints_.add(index, value); - onChanged(); - } else { - sliceConstraintsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder addSliceConstraints( - context.ContextOuterClass.Constraint.Builder builderForValue) { - if (sliceConstraintsBuilder_ == null) { - ensureSliceConstraintsIsMutable(); - sliceConstraints_.add(builderForValue.build()); - onChanged(); - } else { - sliceConstraintsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder addSliceConstraints( - int index, context.ContextOuterClass.Constraint.Builder builderForValue) { - if (sliceConstraintsBuilder_ == null) { - ensureSliceConstraintsIsMutable(); - sliceConstraints_.add(index, builderForValue.build()); - onChanged(); - } else { - sliceConstraintsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder addAllSliceConstraints( - java.lang.Iterable values) { - if (sliceConstraintsBuilder_ == null) { - ensureSliceConstraintsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sliceConstraints_); - onChanged(); - } else { - sliceConstraintsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder clearSliceConstraints() { - if (sliceConstraintsBuilder_ == null) { - sliceConstraints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - sliceConstraintsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public Builder removeSliceConstraints(int index) { - if (sliceConstraintsBuilder_ == null) { - ensureSliceConstraintsIsMutable(); - sliceConstraints_.remove(index); - onChanged(); - } else { - sliceConstraintsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public context.ContextOuterClass.Constraint.Builder getSliceConstraintsBuilder( - int index) { - return getSliceConstraintsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public context.ContextOuterClass.ConstraintOrBuilder getSliceConstraintsOrBuilder( - int index) { - if (sliceConstraintsBuilder_ == null) { - return sliceConstraints_.get(index); } else { - return sliceConstraintsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public java.util.List - getSliceConstraintsOrBuilderList() { - if (sliceConstraintsBuilder_ != null) { - return sliceConstraintsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sliceConstraints_); - } - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public context.ContextOuterClass.Constraint.Builder addSliceConstraintsBuilder() { - return getSliceConstraintsFieldBuilder().addBuilder( - context.ContextOuterClass.Constraint.getDefaultInstance()); - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public context.ContextOuterClass.Constraint.Builder addSliceConstraintsBuilder( - int index) { - return getSliceConstraintsFieldBuilder().addBuilder( - index, context.ContextOuterClass.Constraint.getDefaultInstance()); - } - /** - * repeated .context.Constraint slice_constraints = 4; - */ - public java.util.List - getSliceConstraintsBuilderList() { - return getSliceConstraintsFieldBuilder().getBuilderList(); - } - 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()); - sliceConstraints_ = null; - } - return sliceConstraintsBuilder_; - } - - private java.util.List sliceServiceIds_ = - java.util.Collections.emptyList(); - private void ensureSliceServiceIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - sliceServiceIds_ = new java.util.ArrayList(sliceServiceIds_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> sliceServiceIdsBuilder_; - - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public java.util.List getSliceServiceIdsList() { - if (sliceServiceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sliceServiceIds_); - } else { - return sliceServiceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public int getSliceServiceIdsCount() { - if (sliceServiceIdsBuilder_ == null) { - return sliceServiceIds_.size(); - } else { - return sliceServiceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public context.ContextOuterClass.ServiceId getSliceServiceIds(int index) { - if (sliceServiceIdsBuilder_ == null) { - return sliceServiceIds_.get(index); - } else { - return sliceServiceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder setSliceServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (sliceServiceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.set(index, value); - onChanged(); - } else { - sliceServiceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder setSliceServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (sliceServiceIdsBuilder_ == null) { - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - sliceServiceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder addSliceServiceIds(context.ContextOuterClass.ServiceId value) { - if (sliceServiceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.add(value); - onChanged(); - } else { - sliceServiceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder addSliceServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (sliceServiceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.add(index, value); - onChanged(); - } else { - sliceServiceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder addSliceServiceIds( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (sliceServiceIdsBuilder_ == null) { - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.add(builderForValue.build()); - onChanged(); - } else { - sliceServiceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder addSliceServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (sliceServiceIdsBuilder_ == null) { - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - sliceServiceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder addAllSliceServiceIds( - java.lang.Iterable values) { - if (sliceServiceIdsBuilder_ == null) { - ensureSliceServiceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sliceServiceIds_); - onChanged(); - } else { - sliceServiceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder clearSliceServiceIds() { - if (sliceServiceIdsBuilder_ == null) { - sliceServiceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - sliceServiceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public Builder removeSliceServiceIds(int index) { - if (sliceServiceIdsBuilder_ == null) { - ensureSliceServiceIdsIsMutable(); - sliceServiceIds_.remove(index); - onChanged(); - } else { - sliceServiceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public context.ContextOuterClass.ServiceId.Builder getSliceServiceIdsBuilder( - int index) { - return getSliceServiceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getSliceServiceIdsOrBuilder( - int index) { - if (sliceServiceIdsBuilder_ == null) { - return sliceServiceIds_.get(index); } else { - return sliceServiceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public java.util.List - getSliceServiceIdsOrBuilderList() { - if (sliceServiceIdsBuilder_ != null) { - return sliceServiceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sliceServiceIds_); - } - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public context.ContextOuterClass.ServiceId.Builder addSliceServiceIdsBuilder() { - return getSliceServiceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public context.ContextOuterClass.ServiceId.Builder addSliceServiceIdsBuilder( - int index) { - return getSliceServiceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId slice_service_ids = 5; - */ - public java.util.List - getSliceServiceIdsBuilderList() { - return getSliceServiceIdsFieldBuilder().getBuilderList(); - } - 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()); - sliceServiceIds_ = null; - } - return sliceServiceIdsBuilder_; - } - - private java.util.List sliceSubsliceIds_ = - java.util.Collections.emptyList(); - private void ensureSliceSubsliceIdsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - sliceSubsliceIds_ = new java.util.ArrayList(sliceSubsliceIds_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> sliceSubsliceIdsBuilder_; - - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public java.util.List getSliceSubsliceIdsList() { - if (sliceSubsliceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sliceSubsliceIds_); - } else { - return sliceSubsliceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public int getSliceSubsliceIdsCount() { - if (sliceSubsliceIdsBuilder_ == null) { - return sliceSubsliceIds_.size(); - } else { - return sliceSubsliceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public context.ContextOuterClass.SliceId getSliceSubsliceIds(int index) { - if (sliceSubsliceIdsBuilder_ == null) { - return sliceSubsliceIds_.get(index); - } else { - return sliceSubsliceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder setSliceSubsliceIds( - int index, context.ContextOuterClass.SliceId value) { - if (sliceSubsliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.set(index, value); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder setSliceSubsliceIds( - int index, context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceSubsliceIdsBuilder_ == null) { - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder addSliceSubsliceIds(context.ContextOuterClass.SliceId value) { - if (sliceSubsliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.add(value); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder addSliceSubsliceIds( - int index, context.ContextOuterClass.SliceId value) { - if (sliceSubsliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.add(index, value); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder addSliceSubsliceIds( - context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceSubsliceIdsBuilder_ == null) { - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.add(builderForValue.build()); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder addSliceSubsliceIds( - int index, context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceSubsliceIdsBuilder_ == null) { - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder addAllSliceSubsliceIds( - java.lang.Iterable values) { - if (sliceSubsliceIdsBuilder_ == null) { - ensureSliceSubsliceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sliceSubsliceIds_); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder clearSliceSubsliceIds() { - if (sliceSubsliceIdsBuilder_ == null) { - sliceSubsliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public Builder removeSliceSubsliceIds(int index) { - if (sliceSubsliceIdsBuilder_ == null) { - ensureSliceSubsliceIdsIsMutable(); - sliceSubsliceIds_.remove(index); - onChanged(); - } else { - sliceSubsliceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public context.ContextOuterClass.SliceId.Builder getSliceSubsliceIdsBuilder( - int index) { - return getSliceSubsliceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public context.ContextOuterClass.SliceIdOrBuilder getSliceSubsliceIdsOrBuilder( - int index) { - if (sliceSubsliceIdsBuilder_ == null) { - return sliceSubsliceIds_.get(index); } else { - return sliceSubsliceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public java.util.List - getSliceSubsliceIdsOrBuilderList() { - if (sliceSubsliceIdsBuilder_ != null) { - return sliceSubsliceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sliceSubsliceIds_); - } - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public context.ContextOuterClass.SliceId.Builder addSliceSubsliceIdsBuilder() { - return getSliceSubsliceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.SliceId.getDefaultInstance()); - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public context.ContextOuterClass.SliceId.Builder addSliceSubsliceIdsBuilder( - int index) { - return getSliceSubsliceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.SliceId.getDefaultInstance()); - } - /** - * repeated .context.SliceId slice_subslice_ids = 6; - */ - public java.util.List - getSliceSubsliceIdsBuilderList() { - return getSliceSubsliceIdsFieldBuilder().getBuilderList(); - } - 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()); - sliceSubsliceIds_ = null; - } - return sliceSubsliceIdsBuilder_; - } - - private context.ContextOuterClass.SliceStatus sliceStatus_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceStatus, context.ContextOuterClass.SliceStatus.Builder, context.ContextOuterClass.SliceStatusOrBuilder> sliceStatusBuilder_; - /** - * .context.SliceStatus slice_status = 7; - * @return Whether the sliceStatus field is set. - */ - public boolean hasSliceStatus() { - return sliceStatusBuilder_ != null || sliceStatus_ != null; - } - /** - * .context.SliceStatus slice_status = 7; - * @return The sliceStatus. - */ - public context.ContextOuterClass.SliceStatus getSliceStatus() { - if (sliceStatusBuilder_ == null) { - return sliceStatus_ == null ? context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; - } else { - return sliceStatusBuilder_.getMessage(); - } - } - /** - * .context.SliceStatus slice_status = 7; - */ - public Builder setSliceStatus(context.ContextOuterClass.SliceStatus value) { - if (sliceStatusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceStatus_ = value; - onChanged(); - } else { - sliceStatusBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceStatus slice_status = 7; - */ - public Builder setSliceStatus( - context.ContextOuterClass.SliceStatus.Builder builderForValue) { - if (sliceStatusBuilder_ == null) { - sliceStatus_ = builderForValue.build(); - onChanged(); - } else { - sliceStatusBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceStatus slice_status = 7; - */ - public Builder mergeSliceStatus(context.ContextOuterClass.SliceStatus value) { - if (sliceStatusBuilder_ == null) { - if (sliceStatus_ != null) { - sliceStatus_ = - context.ContextOuterClass.SliceStatus.newBuilder(sliceStatus_).mergeFrom(value).buildPartial(); - } else { - sliceStatus_ = value; - } - onChanged(); - } else { - sliceStatusBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceStatus slice_status = 7; - */ - public Builder clearSliceStatus() { - if (sliceStatusBuilder_ == null) { - sliceStatus_ = null; - onChanged(); - } else { - sliceStatus_ = null; - sliceStatusBuilder_ = null; - } - - return this; - } - /** - * .context.SliceStatus slice_status = 7; - */ - public context.ContextOuterClass.SliceStatus.Builder getSliceStatusBuilder() { - - onChanged(); - return getSliceStatusFieldBuilder().getBuilder(); - } - /** - * .context.SliceStatus slice_status = 7; - */ - public context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder() { - if (sliceStatusBuilder_ != null) { - return sliceStatusBuilder_.getMessageOrBuilder(); - } else { - return sliceStatus_ == null ? - context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; - } - } - /** - * .context.SliceStatus slice_status = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceStatus, context.ContextOuterClass.SliceStatus.Builder, context.ContextOuterClass.SliceStatusOrBuilder> - getSliceStatusFieldBuilder() { - if (sliceStatusBuilder_ == null) { - sliceStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceStatus, context.ContextOuterClass.SliceStatus.Builder, context.ContextOuterClass.SliceStatusOrBuilder>( - getSliceStatus(), - getParentForChildren(), - isClean()); - sliceStatus_ = null; - } - return sliceStatusBuilder_; - } - - private context.ContextOuterClass.SliceConfig sliceConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceConfig, context.ContextOuterClass.SliceConfig.Builder, context.ContextOuterClass.SliceConfigOrBuilder> sliceConfigBuilder_; - /** - * .context.SliceConfig slice_config = 8; - * @return Whether the sliceConfig field is set. - */ - public boolean hasSliceConfig() { - return sliceConfigBuilder_ != null || sliceConfig_ != null; - } - /** - * .context.SliceConfig slice_config = 8; - * @return The sliceConfig. - */ - public context.ContextOuterClass.SliceConfig getSliceConfig() { - if (sliceConfigBuilder_ == null) { - return sliceConfig_ == null ? context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; - } else { - return sliceConfigBuilder_.getMessage(); - } - } - /** - * .context.SliceConfig slice_config = 8; - */ - public Builder setSliceConfig(context.ContextOuterClass.SliceConfig value) { - if (sliceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceConfig_ = value; - onChanged(); - } else { - sliceConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceConfig slice_config = 8; - */ - public Builder setSliceConfig( - context.ContextOuterClass.SliceConfig.Builder builderForValue) { - if (sliceConfigBuilder_ == null) { - sliceConfig_ = builderForValue.build(); - onChanged(); - } else { - sliceConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceConfig slice_config = 8; - */ - public Builder mergeSliceConfig(context.ContextOuterClass.SliceConfig value) { - if (sliceConfigBuilder_ == null) { - if (sliceConfig_ != null) { - sliceConfig_ = - context.ContextOuterClass.SliceConfig.newBuilder(sliceConfig_).mergeFrom(value).buildPartial(); - } else { - sliceConfig_ = value; - } - onChanged(); - } else { - sliceConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceConfig slice_config = 8; - */ - public Builder clearSliceConfig() { - if (sliceConfigBuilder_ == null) { - sliceConfig_ = null; - onChanged(); - } else { - sliceConfig_ = null; - sliceConfigBuilder_ = null; - } - - return this; - } - /** - * .context.SliceConfig slice_config = 8; - */ - public context.ContextOuterClass.SliceConfig.Builder getSliceConfigBuilder() { - - onChanged(); - return getSliceConfigFieldBuilder().getBuilder(); - } - /** - * .context.SliceConfig slice_config = 8; - */ - public context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder() { - if (sliceConfigBuilder_ != null) { - return sliceConfigBuilder_.getMessageOrBuilder(); - } else { - return sliceConfig_ == null ? - context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; - } - } - /** - * .context.SliceConfig slice_config = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceConfig, context.ContextOuterClass.SliceConfig.Builder, context.ContextOuterClass.SliceConfigOrBuilder> - getSliceConfigFieldBuilder() { - if (sliceConfigBuilder_ == null) { - sliceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceConfig, context.ContextOuterClass.SliceConfig.Builder, context.ContextOuterClass.SliceConfigOrBuilder>( - getSliceConfig(), - getParentForChildren(), - isClean()); - sliceConfig_ = null; - } - return sliceConfigBuilder_; - } - - private context.ContextOuterClass.SliceOwner sliceOwner_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceOwner, context.ContextOuterClass.SliceOwner.Builder, context.ContextOuterClass.SliceOwnerOrBuilder> sliceOwnerBuilder_; - /** - * .context.SliceOwner slice_owner = 9; - * @return Whether the sliceOwner field is set. - */ - public boolean hasSliceOwner() { - return sliceOwnerBuilder_ != null || sliceOwner_ != null; - } - /** - * .context.SliceOwner slice_owner = 9; - * @return The sliceOwner. - */ - public context.ContextOuterClass.SliceOwner getSliceOwner() { - if (sliceOwnerBuilder_ == null) { - return sliceOwner_ == null ? context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; - } else { - return sliceOwnerBuilder_.getMessage(); - } - } - /** - * .context.SliceOwner slice_owner = 9; - */ - public Builder setSliceOwner(context.ContextOuterClass.SliceOwner value) { - if (sliceOwnerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceOwner_ = value; - onChanged(); - } else { - sliceOwnerBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceOwner slice_owner = 9; - */ - public Builder setSliceOwner( - context.ContextOuterClass.SliceOwner.Builder builderForValue) { - if (sliceOwnerBuilder_ == null) { - sliceOwner_ = builderForValue.build(); - onChanged(); - } else { - sliceOwnerBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceOwner slice_owner = 9; - */ - public Builder mergeSliceOwner(context.ContextOuterClass.SliceOwner value) { - if (sliceOwnerBuilder_ == null) { - if (sliceOwner_ != null) { - sliceOwner_ = - context.ContextOuterClass.SliceOwner.newBuilder(sliceOwner_).mergeFrom(value).buildPartial(); - } else { - sliceOwner_ = value; - } - onChanged(); - } else { - sliceOwnerBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceOwner slice_owner = 9; - */ - public Builder clearSliceOwner() { - if (sliceOwnerBuilder_ == null) { - sliceOwner_ = null; - onChanged(); - } else { - sliceOwner_ = null; - sliceOwnerBuilder_ = null; - } - - return this; - } - /** - * .context.SliceOwner slice_owner = 9; - */ - public context.ContextOuterClass.SliceOwner.Builder getSliceOwnerBuilder() { - - onChanged(); - return getSliceOwnerFieldBuilder().getBuilder(); - } - /** - * .context.SliceOwner slice_owner = 9; - */ - public context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder() { - if (sliceOwnerBuilder_ != null) { - return sliceOwnerBuilder_.getMessageOrBuilder(); - } else { - return sliceOwner_ == null ? - context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; - } - } - /** - * .context.SliceOwner slice_owner = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceOwner, context.ContextOuterClass.SliceOwner.Builder, context.ContextOuterClass.SliceOwnerOrBuilder> - getSliceOwnerFieldBuilder() { - if (sliceOwnerBuilder_ == null) { - sliceOwnerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceOwner, context.ContextOuterClass.SliceOwner.Builder, context.ContextOuterClass.SliceOwnerOrBuilder>( - getSliceOwner(), - getParentForChildren(), - isClean()); - sliceOwner_ = null; - } - return sliceOwnerBuilder_; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; - /** - * .context.Timestamp timestamp = 10; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 10; - * @return The timestamp. - */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - * .context.Timestamp timestamp = 10; - */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 10; - */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Timestamp timestamp = 10; - */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 10; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - * .context.Timestamp timestamp = 10; - */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .context.Timestamp timestamp = 10; - */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - * .context.Timestamp timestamp = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Slice) - } - // @@protoc_insertion_point(class_scope:context.Slice) - private static final context.ContextOuterClass.Slice DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Slice(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getOpticalconfigUuidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, opticalconfigUuid_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static context.ContextOuterClass.Slice getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.OpticalConfigId)) { + return super.equals(obj); + } + context.ContextOuterClass.OpticalConfigId other = (context.ContextOuterClass.OpticalConfigId) obj; + if (!getOpticalconfigUuid().equals(other.getOpticalconfigUuid())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OPTICALCONFIG_UUID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigUuid().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public context.ContextOuterClass.Slice getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public interface SliceOwnerOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceOwner) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.OpticalConfigId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * .context.Uuid owner_uuid = 1; - * @return Whether the ownerUuid field is set. - */ - boolean hasOwnerUuid(); - /** - * .context.Uuid owner_uuid = 1; - * @return The ownerUuid. - */ - context.ContextOuterClass.Uuid getOwnerUuid(); - /** - * .context.Uuid owner_uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder(); + public static context.ContextOuterClass.OpticalConfigId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * string owner_string = 2; - * @return The ownerString. - */ - java.lang.String getOwnerString(); - /** - * string owner_string = 2; - * @return The bytes for ownerString. - */ - com.google.protobuf.ByteString - getOwnerStringBytes(); - } - /** - * Protobuf type {@code context.SliceOwner} - */ - public static final class SliceOwner extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceOwner) - SliceOwnerOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceOwner.newBuilder() to construct. - private SliceOwner(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceOwner() { - ownerString_ = ""; - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceOwner(); - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @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; - } + public static context.ContextOuterClass.OpticalConfigId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceOwner_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceOwner.class, context.ContextOuterClass.SliceOwner.Builder.class); - } + public static context.ContextOuterClass.OpticalConfigId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - public static final int OWNER_UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid ownerUuid_; - /** - * .context.Uuid owner_uuid = 1; - * @return Whether the ownerUuid field is set. - */ - @java.lang.Override - public boolean hasOwnerUuid() { - return ownerUuid_ != null; - } - /** - * .context.Uuid owner_uuid = 1; - * @return The ownerUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getOwnerUuid() { - return ownerUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; - } - /** - * .context.Uuid owner_uuid = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder() { - return getOwnerUuid(); - } + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.OpticalConfigId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(context.ContextOuterClass.OpticalConfigId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * ---------------- Experimental ------------------------
+         * 
+ * + * Protobuf type {@code context.OpticalConfigId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigId) + context.ContextOuterClass.OpticalConfigIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfigId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigId.class, context.ContextOuterClass.OpticalConfigId.Builder.class); + } + + // 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(); + opticalconfigUuid_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.OpticalConfigId getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfigId.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.OpticalConfigId build() { + context.ContextOuterClass.OpticalConfigId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public context.ContextOuterClass.OpticalConfigId buildPartial() { + context.ContextOuterClass.OpticalConfigId result = new context.ContextOuterClass.OpticalConfigId(this); + result.opticalconfigUuid_ = opticalconfigUuid_; + onBuilt(); + return result; + } - public static final int OWNER_STRING_FIELD_NUMBER = 2; - private volatile java.lang.Object ownerString_; - /** - * string owner_string = 2; - * @return The ownerString. - */ - @java.lang.Override - public java.lang.String getOwnerString() { - java.lang.Object ref = ownerString_; - 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(); - ownerString_ = s; - return s; - } - } - /** - * string owner_string = 2; - * @return The bytes for ownerString. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOwnerStringBytes() { - java.lang.Object ref = ownerString_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ownerString_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (ownerUuid_ != null) { - output.writeMessage(1, getOwnerUuid()); - } - if (!getOwnerStringBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ownerString_); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (ownerUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getOwnerUuid()); - } - if (!getOwnerStringBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ownerString_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @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 boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceOwner)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceOwner other = (context.ContextOuterClass.SliceOwner) obj; - - if (hasOwnerUuid() != other.hasOwnerUuid()) return false; - if (hasOwnerUuid()) { - if (!getOwnerUuid() - .equals(other.getOwnerUuid())) return false; - } - if (!getOwnerString() - .equals(other.getOwnerString())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @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 int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOwnerUuid()) { - hash = (37 * hash) + OWNER_UUID_FIELD_NUMBER; - hash = (53 * hash) + getOwnerUuid().hashCode(); - } - hash = (37 * hash) + OWNER_STRING_FIELD_NUMBER; - hash = (53 * hash) + getOwnerString().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalConfigId) { + return mergeFrom((context.ContextOuterClass.OpticalConfigId) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static context.ContextOuterClass.SliceOwner parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceOwner parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceOwner parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceOwner parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceOwner parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceOwner parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public Builder mergeFrom(context.ContextOuterClass.OpticalConfigId other) { + if (other == context.ContextOuterClass.OpticalConfigId.getDefaultInstance()) + return this; + if (!other.getOpticalconfigUuid().isEmpty()) { + opticalconfigUuid_ = other.opticalconfigUuid_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceOwner prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.SliceOwner} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceOwner) - context.ContextOuterClass.SliceOwnerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceOwner_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceOwner_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceOwner.class, context.ContextOuterClass.SliceOwner.Builder.class); - } - - // 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; - ownerUuidBuilder_ = null; - } - ownerString_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceOwner_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceOwner getDefaultInstanceForType() { - return context.ContextOuterClass.SliceOwner.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceOwner build() { - context.ContextOuterClass.SliceOwner result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceOwner) { - return mergeFrom((context.ContextOuterClass.SliceOwner)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceOwner other) { - if (other == context.ContextOuterClass.SliceOwner.getDefaultInstance()) return this; - if (other.hasOwnerUuid()) { - mergeOwnerUuid(other.getOwnerUuid()); - } - if (!other.getOwnerString().isEmpty()) { - ownerString_ = other.ownerString_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceOwner) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid ownerUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> ownerUuidBuilder_; - /** - * .context.Uuid owner_uuid = 1; - * @return Whether the ownerUuid field is set. - */ - public boolean hasOwnerUuid() { - return ownerUuidBuilder_ != null || ownerUuid_ != null; - } - /** - * .context.Uuid owner_uuid = 1; - * @return The ownerUuid. - */ - public context.ContextOuterClass.Uuid getOwnerUuid() { - if (ownerUuidBuilder_ == null) { - return ownerUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; - } else { - return ownerUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid owner_uuid = 1; - */ - public Builder setOwnerUuid(context.ContextOuterClass.Uuid value) { - if (ownerUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ownerUuid_ = value; - onChanged(); - } else { - ownerUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid owner_uuid = 1; - */ - public Builder setOwnerUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (ownerUuidBuilder_ == null) { - ownerUuid_ = builderForValue.build(); - onChanged(); - } else { - ownerUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid owner_uuid = 1; - */ - public Builder mergeOwnerUuid(context.ContextOuterClass.Uuid value) { - if (ownerUuidBuilder_ == null) { - if (ownerUuid_ != null) { - ownerUuid_ = - context.ContextOuterClass.Uuid.newBuilder(ownerUuid_).mergeFrom(value).buildPartial(); - } else { - ownerUuid_ = value; - } - onChanged(); - } else { - ownerUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid owner_uuid = 1; - */ - public Builder clearOwnerUuid() { - if (ownerUuidBuilder_ == null) { - ownerUuid_ = null; - onChanged(); - } else { - ownerUuid_ = null; - ownerUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid owner_uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getOwnerUuidBuilder() { - - onChanged(); - return getOwnerUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid owner_uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder() { - if (ownerUuidBuilder_ != null) { - return ownerUuidBuilder_.getMessageOrBuilder(); - } else { - return ownerUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; - } - } - /** - * .context.Uuid owner_uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getOwnerUuidFieldBuilder() { - if (ownerUuidBuilder_ == null) { - ownerUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getOwnerUuid(), - getParentForChildren(), - isClean()); - ownerUuid_ = null; - } - return ownerUuidBuilder_; - } - - private java.lang.Object ownerString_ = ""; - /** - * string owner_string = 2; - * @return The ownerString. - */ - public java.lang.String getOwnerString() { - java.lang.Object ref = ownerString_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ownerString_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string owner_string = 2; - * @return The bytes for ownerString. - */ - public com.google.protobuf.ByteString - getOwnerStringBytes() { - java.lang.Object ref = ownerString_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ownerString_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string owner_string = 2; - * @param value The ownerString to set. - * @return This builder for chaining. - */ - public Builder setOwnerString( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - ownerString_ = value; - onChanged(); - return this; - } - /** - * string owner_string = 2; - * @return This builder for chaining. - */ - public Builder clearOwnerString() { - - ownerString_ = getDefaultInstance().getOwnerString(); - onChanged(); - return this; - } - /** - * string owner_string = 2; - * @param value The bytes for ownerString to set. - * @return This builder for chaining. - */ - public Builder setOwnerStringBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - ownerString_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceOwner) - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.OpticalConfigId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - // @@protoc_insertion_point(class_scope:context.SliceOwner) - private static final context.ContextOuterClass.SliceOwner DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceOwner(); - } + private java.lang.Object opticalconfigUuid_ = ""; + + /** + * string opticalconfig_uuid = 1; + * @return The opticalconfigUuid. + */ + public java.lang.String getOpticalconfigUuid() { + java.lang.Object ref = opticalconfigUuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + opticalconfigUuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static context.ContextOuterClass.SliceOwner getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * string opticalconfig_uuid = 1; + * @return The bytes for opticalconfigUuid. + */ + public com.google.protobuf.ByteString getOpticalconfigUuidBytes() { + java.lang.Object ref = opticalconfigUuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + opticalconfigUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * string opticalconfig_uuid = 1; + * @param value The opticalconfigUuid to set. + * @return This builder for chaining. + */ + public Builder setOpticalconfigUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + opticalconfigUuid_ = value; + onChanged(); + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * string opticalconfig_uuid = 1; + * @return This builder for chaining. + */ + public Builder clearOpticalconfigUuid() { + opticalconfigUuid_ = getDefaultInstance().getOpticalconfigUuid(); + onChanged(); + return this; + } - @java.lang.Override - public context.ContextOuterClass.SliceOwner getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * string opticalconfig_uuid = 1; + * @param value The bytes for opticalconfigUuid to set. + * @return This builder for chaining. + */ + public Builder setOpticalconfigUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + opticalconfigUuid_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.OpticalConfigId) + } - public interface SliceStatusOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceStatus) - com.google.protobuf.MessageOrBuilder { + // @@protoc_insertion_point(class_scope:context.OpticalConfigId) + private static final context.ContextOuterClass.OpticalConfigId DEFAULT_INSTANCE; - /** - * .context.SliceStatusEnum slice_status = 1; - * @return The enum numeric value on the wire for sliceStatus. - */ - int getSliceStatusValue(); - /** - * .context.SliceStatusEnum slice_status = 1; - * @return The sliceStatus. - */ - context.ContextOuterClass.SliceStatusEnum getSliceStatus(); - } - /** - * Protobuf type {@code context.SliceStatus} - */ - public static final class SliceStatus extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceStatus) - SliceStatusOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceStatus.newBuilder() to construct. - private SliceStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceStatus() { - sliceStatus_ = 0; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigId(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceStatus(); - } + public static context.ContextOuterClass.OpticalConfigId getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @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; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceStatus.class, context.ContextOuterClass.SliceStatus.Builder.class); - } + @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); + } + }; - public static final int SLICE_STATUS_FIELD_NUMBER = 1; - private int sliceStatus_; - /** - * .context.SliceStatusEnum slice_status = 1; - * @return The enum numeric value on the wire for sliceStatus. - */ - @java.lang.Override public int getSliceStatusValue() { - return sliceStatus_; - } - /** - * .context.SliceStatusEnum slice_status = 1; - * @return The sliceStatus. - */ - @java.lang.Override public context.ContextOuterClass.SliceStatusEnum getSliceStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.valueOf(sliceStatus_); - return result == null ? context.ContextOuterClass.SliceStatusEnum.UNRECOGNIZED : result; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - memoizedIsInitialized = 1; - return true; + @java.lang.Override + public context.ContextOuterClass.OpticalConfigId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sliceStatus_ != context.ContextOuterClass.SliceStatusEnum.SLICESTATUS_UNDEFINED.getNumber()) { - output.writeEnum(1, sliceStatus_); - } - unknownFields.writeTo(output); - } + public interface OpticalConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfig) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sliceStatus_ != context.ContextOuterClass.SliceStatusEnum.SLICESTATUS_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, sliceStatus_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return Whether the opticalconfigId field is set. + */ + boolean hasOpticalconfigId(); - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceStatus)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceStatus other = (context.ContextOuterClass.SliceStatus) obj; - - if (sliceStatus_ != other.sliceStatus_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return The opticalconfigId. + */ + context.ContextOuterClass.OpticalConfigId getOpticalconfigId(); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SLICE_STATUS_FIELD_NUMBER; - hash = (53 * hash) + sliceStatus_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder(); - public static context.ContextOuterClass.SliceStatus parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceStatus parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceStatus parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceStatus parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * string config = 2; + * @return The config. + */ + java.lang.String getConfig(); - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceStatus prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * string config = 2; + * @return The bytes for config. + */ + com.google.protobuf.ByteString getConfigBytes(); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** - * Protobuf type {@code context.SliceStatus} + * Protobuf type {@code context.OpticalConfig} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceStatus) - context.ContextOuterClass.SliceStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceStatus.class, context.ContextOuterClass.SliceStatus.Builder.class); - } - - // 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(); - sliceStatus_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceStatus_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceStatus getDefaultInstanceForType() { - return context.ContextOuterClass.SliceStatus.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceStatus build() { - context.ContextOuterClass.SliceStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.SliceStatus buildPartial() { - context.ContextOuterClass.SliceStatus result = new context.ContextOuterClass.SliceStatus(this); - result.sliceStatus_ = sliceStatus_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceStatus) { - return mergeFrom((context.ContextOuterClass.SliceStatus)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceStatus other) { - if (other == context.ContextOuterClass.SliceStatus.getDefaultInstance()) return this; - if (other.sliceStatus_ != 0) { - setSliceStatusValue(other.getSliceStatusValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceStatus) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int sliceStatus_ = 0; - /** - * .context.SliceStatusEnum slice_status = 1; - * @return The enum numeric value on the wire for sliceStatus. - */ - @java.lang.Override public int getSliceStatusValue() { - return sliceStatus_; - } - /** - * .context.SliceStatusEnum slice_status = 1; - * @param value The enum numeric value on the wire for sliceStatus to set. - * @return This builder for chaining. - */ - public Builder setSliceStatusValue(int value) { - - sliceStatus_ = value; - onChanged(); - return this; - } - /** - * .context.SliceStatusEnum slice_status = 1; - * @return The sliceStatus. - */ - @java.lang.Override - public context.ContextOuterClass.SliceStatusEnum getSliceStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.valueOf(sliceStatus_); - return result == null ? context.ContextOuterClass.SliceStatusEnum.UNRECOGNIZED : result; - } - /** - * .context.SliceStatusEnum slice_status = 1; - * @param value The sliceStatus to set. - * @return This builder for chaining. - */ - public Builder setSliceStatus(context.ContextOuterClass.SliceStatusEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - sliceStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.SliceStatusEnum slice_status = 1; - * @return This builder for chaining. - */ - public Builder clearSliceStatus() { - - sliceStatus_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceStatus) - } + public static final class OpticalConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfig) + OpticalConfigOrBuilder { - // @@protoc_insertion_point(class_scope:context.SliceStatus) - private static final context.ContextOuterClass.SliceStatus DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceStatus(); - } + private static final long serialVersionUID = 0L; - public static context.ContextOuterClass.SliceStatus getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Use OpticalConfig.newBuilder() to construct. + private OpticalConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private OpticalConfig() { + config_ = ""; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpticalConfig(); + } - @java.lang.Override - public context.ContextOuterClass.SliceStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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 interface SliceConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceConfig) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; + } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - java.util.List - getConfigRulesList(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - context.ContextOuterClass.ConfigRule getConfigRules(int index); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - int getConfigRulesCount(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - java.util.List - getConfigRulesOrBuilderList(); - /** - * repeated .context.ConfigRule config_rules = 1; - */ - context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.SliceConfig} - */ - public static final class SliceConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceConfig) - SliceConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceConfig.newBuilder() to construct. - private SliceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceConfig() { - configRules_ = java.util.Collections.emptyList(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfig.class, context.ContextOuterClass.OpticalConfig.Builder.class); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceConfig(); - } + public static final int OPTICALCONFIG_ID_FIELD_NUMBER = 1; - @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(); - 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; - } + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceConfig.class, context.ContextOuterClass.SliceConfig.Builder.class); - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return Whether the opticalconfigId field is set. + */ + @java.lang.Override + public boolean hasOpticalconfigId() { + return opticalconfigId_ != null; + } - public static final int CONFIG_RULES_FIELD_NUMBER = 1; - private java.util.List configRules_; - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public java.util.List getConfigRulesList() { - return configRules_; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public java.util.List - getConfigRulesOrBuilderList() { - return configRules_; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public int getConfigRulesCount() { - return configRules_.size(); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule getConfigRules(int index) { - return configRules_.get(index); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index) { - return configRules_.get(index); - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return The opticalconfigId. + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { + return getOpticalconfigId(); + } - memoizedIsInitialized = 1; - return true; - } + public static final int CONFIG_FIELD_NUMBER = 2; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < configRules_.size(); i++) { - output.writeMessage(1, configRules_.get(i)); - } - unknownFields.writeTo(output); - } + private volatile java.lang.Object config_; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < configRules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, configRules_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * string config = 2; + * @return The config. + */ + @java.lang.Override + public java.lang.String getConfig() { + java.lang.Object ref = config_; + 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(); + config_ = s; + return s; + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceConfig)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceConfig other = (context.ContextOuterClass.SliceConfig) obj; - - if (!getConfigRulesList() - .equals(other.getConfigRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string config = 2; + * @return The bytes for config. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfigBytes() { + java.lang.Object ref = config_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + config_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConfigRulesCount() > 0) { - hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; - hash = (53 * hash) + getConfigRulesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private byte memoizedIsInitialized = -1; - public static context.ContextOuterClass.SliceConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (opticalconfigId_ != null) { + output.writeMessage(1, getOpticalconfigId()); + } + if (!getConfigBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, config_); + } + unknownFields.writeTo(output); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.SliceConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceConfig) - context.ContextOuterClass.SliceConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceConfig.class, context.ContextOuterClass.SliceConfig.Builder.class); - } - - // 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(); - if (configRulesBuilder_ == null) { - configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - configRulesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceConfig_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceConfig getDefaultInstanceForType() { - return context.ContextOuterClass.SliceConfig.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceConfig build() { - context.ContextOuterClass.SliceConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.SliceConfig buildPartial() { - context.ContextOuterClass.SliceConfig result = new context.ContextOuterClass.SliceConfig(this); - int from_bitField0_ = bitField0_; - if (configRulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - configRules_ = java.util.Collections.unmodifiableList(configRules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.configRules_ = configRules_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceConfig) { - return mergeFrom((context.ContextOuterClass.SliceConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceConfig other) { - if (other == context.ContextOuterClass.SliceConfig.getDefaultInstance()) return this; - if (configRulesBuilder_ == null) { - if (!other.configRules_.isEmpty()) { - if (configRules_.isEmpty()) { - configRules_ = other.configRules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConfigRulesIsMutable(); - configRules_.addAll(other.configRules_); - } - onChanged(); - } - } else { - if (!other.configRules_.isEmpty()) { - if (configRulesBuilder_.isEmpty()) { - configRulesBuilder_.dispose(); - configRulesBuilder_ = null; - configRules_ = other.configRules_; - bitField0_ = (bitField0_ & ~0x00000001); - configRulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConfigRulesFieldBuilder() : null; - } else { - configRulesBuilder_.addAllMessages(other.configRules_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List configRules_ = - java.util.Collections.emptyList(); - private void ensureConfigRulesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - configRules_ = new java.util.ArrayList(configRules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder> configRulesBuilder_; - - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List getConfigRulesList() { - if (configRulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(configRules_); - } else { - return configRulesBuilder_.getMessageList(); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public int getConfigRulesCount() { - if (configRulesBuilder_ == null) { - return configRules_.size(); - } else { - return configRulesBuilder_.getCount(); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule getConfigRules(int index) { - if (configRulesBuilder_ == null) { - return configRules_.get(index); - } else { - return configRulesBuilder_.getMessage(index); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder setConfigRules( - int index, context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.set(index, value); - onChanged(); - } else { - configRulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder setConfigRules( - int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.set(index, builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules(context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.add(value); - onChanged(); - } else { - configRulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - int index, context.ContextOuterClass.ConfigRule value) { - if (configRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfigRulesIsMutable(); - configRules_.add(index, value); - onChanged(); - } else { - configRulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.add(builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addConfigRules( - int index, context.ContextOuterClass.ConfigRule.Builder builderForValue) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.add(index, builderForValue.build()); - onChanged(); - } else { - configRulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder addAllConfigRules( - java.lang.Iterable values) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, configRules_); - onChanged(); - } else { - configRulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder clearConfigRules() { - if (configRulesBuilder_ == null) { - configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - configRulesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public Builder removeConfigRules(int index) { - if (configRulesBuilder_ == null) { - ensureConfigRulesIsMutable(); - configRules_.remove(index); - onChanged(); - } else { - configRulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder getConfigRulesBuilder( - int index) { - return getConfigRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRuleOrBuilder getConfigRulesOrBuilder( - int index) { - if (configRulesBuilder_ == null) { - return configRules_.get(index); } else { - return configRulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List - getConfigRulesOrBuilderList() { - if (configRulesBuilder_ != null) { - return configRulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(configRules_); - } - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder() { - return getConfigRulesFieldBuilder().addBuilder( - context.ContextOuterClass.ConfigRule.getDefaultInstance()); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public context.ContextOuterClass.ConfigRule.Builder addConfigRulesBuilder( - int index) { - return getConfigRulesFieldBuilder().addBuilder( - index, context.ContextOuterClass.ConfigRule.getDefaultInstance()); - } - /** - * repeated .context.ConfigRule config_rules = 1; - */ - public java.util.List - getConfigRulesBuilderList() { - return getConfigRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder> - getConfigRulesFieldBuilder() { - if (configRulesBuilder_ == null) { - configRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConfigRule, context.ContextOuterClass.ConfigRule.Builder, context.ContextOuterClass.ConfigRuleOrBuilder>( - configRules_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - configRules_ = null; - } - return configRulesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceConfig) - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (opticalconfigId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpticalconfigId()); + } + if (!getConfigBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, config_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - // @@protoc_insertion_point(class_scope:context.SliceConfig) - private static final context.ContextOuterClass.SliceConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceConfig(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.OpticalConfig)) { + return super.equals(obj); + } + context.ContextOuterClass.OpticalConfig other = (context.ContextOuterClass.OpticalConfig) obj; + if (hasOpticalconfigId() != other.hasOpticalconfigId()) + return false; + if (hasOpticalconfigId()) { + if (!getOpticalconfigId().equals(other.getOpticalconfigId())) + return false; + } + if (!getConfig().equals(other.getConfig())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - public static context.ContextOuterClass.SliceConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOpticalconfigId()) { + hash = (37 * hash) + OPTICALCONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigId().hashCode(); + } + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.OpticalConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.OpticalConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public context.ContextOuterClass.SliceConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - } + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public interface SliceIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceIdList) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.OpticalConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * repeated .context.SliceId slice_ids = 1; - */ - java.util.List - getSliceIdsList(); - /** - * repeated .context.SliceId slice_ids = 1; - */ - context.ContextOuterClass.SliceId getSliceIds(int index); - /** - * repeated .context.SliceId slice_ids = 1; - */ - int getSliceIdsCount(); - /** - * repeated .context.SliceId slice_ids = 1; - */ - java.util.List - getSliceIdsOrBuilderList(); - /** - * repeated .context.SliceId slice_ids = 1; - */ - context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.SliceIdList} - */ - public static final class SliceIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceIdList) - SliceIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceIdList.newBuilder() to construct. - private SliceIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceIdList() { - sliceIds_ = java.util.Collections.emptyList(); - } + public static context.ContextOuterClass.OpticalConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceIdList(); - } + public static context.ContextOuterClass.OpticalConfig parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @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(); - 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; - } + public static context.ContextOuterClass.OpticalConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceIdList.class, context.ContextOuterClass.SliceIdList.Builder.class); - } + public static context.ContextOuterClass.OpticalConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - public static final int SLICE_IDS_FIELD_NUMBER = 1; - private java.util.List sliceIds_; - /** - * repeated .context.SliceId slice_ids = 1; - */ - @java.lang.Override - public java.util.List getSliceIdsList() { - return sliceIds_; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - @java.lang.Override - public java.util.List - getSliceIdsOrBuilderList() { - return sliceIds_; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - @java.lang.Override - public int getSliceIdsCount() { - return sliceIds_.size(); - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.SliceId getSliceIds(int index) { - return sliceIds_.get(index); - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder( - int index) { - return sliceIds_.get(index); - } + public static context.ContextOuterClass.OpticalConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.OpticalConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < sliceIds_.size(); i++) { - output.writeMessage(1, sliceIds_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < sliceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, sliceIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceIdList other = (context.ContextOuterClass.SliceIdList) obj; - - if (!getSliceIdsList() - .equals(other.getSliceIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static Builder newBuilder(context.ContextOuterClass.OpticalConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSliceIdsCount() > 0) { - hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSliceIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static context.ContextOuterClass.SliceIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * Protobuf type {@code context.OpticalConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfig) + context.ContextOuterClass.OpticalConfigOrBuilder { - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.SliceIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceIdList) - context.ContextOuterClass.SliceIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceIdList.class, context.ContextOuterClass.SliceIdList.Builder.class); - } - - // 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(); - if (sliceIdsBuilder_ == null) { - sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - sliceIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceIdList getDefaultInstanceForType() { - return context.ContextOuterClass.SliceIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceIdList build() { - context.ContextOuterClass.SliceIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.SliceIdList buildPartial() { - context.ContextOuterClass.SliceIdList result = new context.ContextOuterClass.SliceIdList(this); - int from_bitField0_ = bitField0_; - if (sliceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.sliceIds_ = sliceIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceIdList) { - return mergeFrom((context.ContextOuterClass.SliceIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceIdList other) { - if (other == context.ContextOuterClass.SliceIdList.getDefaultInstance()) return this; - if (sliceIdsBuilder_ == null) { - if (!other.sliceIds_.isEmpty()) { - if (sliceIds_.isEmpty()) { - sliceIds_ = other.sliceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSliceIdsIsMutable(); - sliceIds_.addAll(other.sliceIds_); - } - onChanged(); - } - } else { - if (!other.sliceIds_.isEmpty()) { - if (sliceIdsBuilder_.isEmpty()) { - sliceIdsBuilder_.dispose(); - sliceIdsBuilder_ = null; - sliceIds_ = other.sliceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - sliceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSliceIdsFieldBuilder() : null; - } else { - sliceIdsBuilder_.addAllMessages(other.sliceIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List sliceIds_ = - java.util.Collections.emptyList(); - private void ensureSliceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - sliceIds_ = new java.util.ArrayList(sliceIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> sliceIdsBuilder_; - - /** - * repeated .context.SliceId slice_ids = 1; - */ - public java.util.List getSliceIdsList() { - if (sliceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sliceIds_); - } else { - return sliceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public int getSliceIdsCount() { - if (sliceIdsBuilder_ == null) { - return sliceIds_.size(); - } else { - return sliceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public context.ContextOuterClass.SliceId getSliceIds(int index) { - if (sliceIdsBuilder_ == null) { - return sliceIds_.get(index); - } else { - return sliceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder setSliceIds( - int index, context.ContextOuterClass.SliceId value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceIdsIsMutable(); - sliceIds_.set(index, value); - onChanged(); - } else { - sliceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder setSliceIds( - int index, context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - sliceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder addSliceIds(context.ContextOuterClass.SliceId value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceIdsIsMutable(); - sliceIds_.add(value); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder addSliceIds( - int index, context.ContextOuterClass.SliceId value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSliceIdsIsMutable(); - sliceIds_.add(index, value); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder addSliceIds( - context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.add(builderForValue.build()); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder addSliceIds( - int index, context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - sliceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder addAllSliceIds( - java.lang.Iterable values) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sliceIds_); - onChanged(); - } else { - sliceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder clearSliceIds() { - if (sliceIdsBuilder_ == null) { - sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - sliceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public Builder removeSliceIds(int index) { - if (sliceIdsBuilder_ == null) { - ensureSliceIdsIsMutable(); - sliceIds_.remove(index); - onChanged(); - } else { - sliceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public context.ContextOuterClass.SliceId.Builder getSliceIdsBuilder( - int index) { - return getSliceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdsOrBuilder( - int index) { - if (sliceIdsBuilder_ == null) { - return sliceIds_.get(index); } else { - return sliceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public java.util.List - getSliceIdsOrBuilderList() { - if (sliceIdsBuilder_ != null) { - return sliceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sliceIds_); - } - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder() { - return getSliceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.SliceId.getDefaultInstance()); - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public context.ContextOuterClass.SliceId.Builder addSliceIdsBuilder( - int index) { - return getSliceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.SliceId.getDefaultInstance()); - } - /** - * repeated .context.SliceId slice_ids = 1; - */ - public java.util.List - getSliceIdsBuilderList() { - return getSliceIdsFieldBuilder().getBuilderList(); - } - 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_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - sliceIds_ = null; - } - return sliceIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceIdList) - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; + } - // @@protoc_insertion_point(class_scope:context.SliceIdList) - private static final context.ContextOuterClass.SliceIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceIdList(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfig.class, context.ContextOuterClass.OpticalConfig.Builder.class); + } - public static context.ContextOuterClass.SliceIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Construct using context.ContextOuterClass.OpticalConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - public context.ContextOuterClass.SliceIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (opticalconfigIdBuilder_ == null) { + opticalconfigId_ = null; + } else { + opticalconfigId_ = null; + opticalconfigIdBuilder_ = null; + } + config_ = ""; + return this; + } - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; + } - public interface SliceListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceList) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public context.ContextOuterClass.OpticalConfig getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfig.getDefaultInstance(); + } - /** - * repeated .context.Slice slices = 1; - */ - java.util.List - getSlicesList(); - /** - * repeated .context.Slice slices = 1; - */ - context.ContextOuterClass.Slice getSlices(int index); - /** - * repeated .context.Slice slices = 1; - */ - int getSlicesCount(); - /** - * repeated .context.Slice slices = 1; - */ - java.util.List - getSlicesOrBuilderList(); - /** - * repeated .context.Slice slices = 1; - */ - context.ContextOuterClass.SliceOrBuilder getSlicesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.SliceList} - */ - public static final class SliceList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceList) - SliceListOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceList.newBuilder() to construct. - private SliceList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceList() { - slices_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public context.ContextOuterClass.OpticalConfig build() { + context.ContextOuterClass.OpticalConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceList(); - } + @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(); + } + result.config_ = config_; + onBuilt(); + return result; + } - @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(); - 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; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceList.class, context.ContextOuterClass.SliceList.Builder.class); - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static final int SLICES_FIELD_NUMBER = 1; - private java.util.List slices_; - /** - * repeated .context.Slice slices = 1; - */ - @java.lang.Override - public java.util.List getSlicesList() { - return slices_; - } - /** - * repeated .context.Slice slices = 1; - */ - @java.lang.Override - public java.util.List - getSlicesOrBuilderList() { - return slices_; - } - /** - * repeated .context.Slice slices = 1; - */ - @java.lang.Override - public int getSlicesCount() { - return slices_.size(); - } - /** - * repeated .context.Slice slices = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Slice getSlices(int index) { - return slices_.get(index); - } - /** - * repeated .context.Slice slices = 1; - */ - @java.lang.Override - public context.ContextOuterClass.SliceOrBuilder getSlicesOrBuilder( - int index) { - return slices_.get(index); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - memoizedIsInitialized = 1; - return true; - } + @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 void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < slices_.size(); i++) { - output.writeMessage(1, slices_.get(i)); - } - unknownFields.writeTo(output); - } + @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 int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < slices_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, slices_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalConfig) { + return mergeFrom((context.ContextOuterClass.OpticalConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceList)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceList other = (context.ContextOuterClass.SliceList) obj; - - if (!getSlicesList() - .equals(other.getSlicesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public Builder mergeFrom(context.ContextOuterClass.OpticalConfig other) { + if (other == context.ContextOuterClass.OpticalConfig.getDefaultInstance()) + return this; + if (other.hasOpticalconfigId()) { + mergeOpticalconfigId(other.getOpticalconfigId()); + } + if (!other.getConfig().isEmpty()) { + config_ = other.config_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSlicesCount() > 0) { - hash = (37 * hash) + SLICES_FIELD_NUMBER; - hash = (53 * hash) + getSlicesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static context.ContextOuterClass.SliceList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.OpticalConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.SliceList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceList) - context.ContextOuterClass.SliceListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceList.class, context.ContextOuterClass.SliceList.Builder.class); - } - - // 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(); - if (slicesBuilder_ == null) { - slices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - slicesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceList getDefaultInstanceForType() { - return context.ContextOuterClass.SliceList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceList build() { - context.ContextOuterClass.SliceList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.SliceList buildPartial() { - context.ContextOuterClass.SliceList result = new context.ContextOuterClass.SliceList(this); - int from_bitField0_ = bitField0_; - if (slicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - slices_ = java.util.Collections.unmodifiableList(slices_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.slices_ = slices_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceList) { - return mergeFrom((context.ContextOuterClass.SliceList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceList other) { - if (other == context.ContextOuterClass.SliceList.getDefaultInstance()) return this; - if (slicesBuilder_ == null) { - if (!other.slices_.isEmpty()) { - if (slices_.isEmpty()) { - slices_ = other.slices_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSlicesIsMutable(); - slices_.addAll(other.slices_); - } - onChanged(); - } - } else { - if (!other.slices_.isEmpty()) { - if (slicesBuilder_.isEmpty()) { - slicesBuilder_.dispose(); - slicesBuilder_ = null; - slices_ = other.slices_; - bitField0_ = (bitField0_ & ~0x00000001); - slicesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSlicesFieldBuilder() : null; - } else { - slicesBuilder_.addAllMessages(other.slices_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List slices_ = - java.util.Collections.emptyList(); - private void ensureSlicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - slices_ = new java.util.ArrayList(slices_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Slice, context.ContextOuterClass.Slice.Builder, context.ContextOuterClass.SliceOrBuilder> slicesBuilder_; - - /** - * repeated .context.Slice slices = 1; - */ - public java.util.List getSlicesList() { - if (slicesBuilder_ == null) { - return java.util.Collections.unmodifiableList(slices_); - } else { - return slicesBuilder_.getMessageList(); - } - } - /** - * repeated .context.Slice slices = 1; - */ - public int getSlicesCount() { - if (slicesBuilder_ == null) { - return slices_.size(); - } else { - return slicesBuilder_.getCount(); - } - } - /** - * repeated .context.Slice slices = 1; - */ - public context.ContextOuterClass.Slice getSlices(int index) { - if (slicesBuilder_ == null) { - return slices_.get(index); - } else { - return slicesBuilder_.getMessage(index); - } - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder setSlices( - int index, context.ContextOuterClass.Slice value) { - if (slicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSlicesIsMutable(); - slices_.set(index, value); - onChanged(); - } else { - slicesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder setSlices( - int index, context.ContextOuterClass.Slice.Builder builderForValue) { - if (slicesBuilder_ == null) { - ensureSlicesIsMutable(); - slices_.set(index, builderForValue.build()); - onChanged(); - } else { - slicesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder addSlices(context.ContextOuterClass.Slice value) { - if (slicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSlicesIsMutable(); - slices_.add(value); - onChanged(); - } else { - slicesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder addSlices( - int index, context.ContextOuterClass.Slice value) { - if (slicesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSlicesIsMutable(); - slices_.add(index, value); - onChanged(); - } else { - slicesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder addSlices( - context.ContextOuterClass.Slice.Builder builderForValue) { - if (slicesBuilder_ == null) { - ensureSlicesIsMutable(); - slices_.add(builderForValue.build()); - onChanged(); - } else { - slicesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder addSlices( - int index, context.ContextOuterClass.Slice.Builder builderForValue) { - if (slicesBuilder_ == null) { - ensureSlicesIsMutable(); - slices_.add(index, builderForValue.build()); - onChanged(); - } else { - slicesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder addAllSlices( - java.lang.Iterable values) { - if (slicesBuilder_ == null) { - ensureSlicesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, slices_); - onChanged(); - } else { - slicesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder clearSlices() { - if (slicesBuilder_ == null) { - slices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - slicesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public Builder removeSlices(int index) { - if (slicesBuilder_ == null) { - ensureSlicesIsMutable(); - slices_.remove(index); - onChanged(); - } else { - slicesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Slice slices = 1; - */ - public context.ContextOuterClass.Slice.Builder getSlicesBuilder( - int index) { - return getSlicesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Slice slices = 1; - */ - public context.ContextOuterClass.SliceOrBuilder getSlicesOrBuilder( - int index) { - if (slicesBuilder_ == null) { - return slices_.get(index); } else { - return slicesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Slice slices = 1; - */ - public java.util.List - getSlicesOrBuilderList() { - if (slicesBuilder_ != null) { - return slicesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(slices_); - } - } - /** - * repeated .context.Slice slices = 1; - */ - public context.ContextOuterClass.Slice.Builder addSlicesBuilder() { - return getSlicesFieldBuilder().addBuilder( - context.ContextOuterClass.Slice.getDefaultInstance()); - } - /** - * repeated .context.Slice slices = 1; - */ - public context.ContextOuterClass.Slice.Builder addSlicesBuilder( - int index) { - return getSlicesFieldBuilder().addBuilder( - index, context.ContextOuterClass.Slice.getDefaultInstance()); - } - /** - * repeated .context.Slice slices = 1; - */ - public java.util.List - getSlicesBuilderList() { - return getSlicesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Slice, context.ContextOuterClass.Slice.Builder, context.ContextOuterClass.SliceOrBuilder> - getSlicesFieldBuilder() { - if (slicesBuilder_ == null) { - slicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Slice, context.ContextOuterClass.Slice.Builder, context.ContextOuterClass.SliceOrBuilder>( - slices_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - slices_ = null; - } - return slicesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceList) - } + private com.google.protobuf.SingleFieldBuilderV3 opticalconfigIdBuilder_; - // @@protoc_insertion_point(class_scope:context.SliceList) - private static final context.ContextOuterClass.SliceList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceList(); - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return Whether the opticalconfigId field is set. + */ + public boolean hasOpticalconfigId() { + return opticalconfigIdBuilder_ != null || opticalconfigId_ != null; + } - public static context.ContextOuterClass.SliceList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + * @return The opticalconfigId. + */ + public context.ContextOuterClass.OpticalConfigId getOpticalconfigId() { + if (opticalconfigIdBuilder_ == null) { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } else { + return opticalconfigIdBuilder_.getMessage(); + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { + if (opticalconfigIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + opticalconfigId_ = value; + onChanged(); + } else { + opticalconfigIdBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId.Builder builderForValue) { + if (opticalconfigIdBuilder_ == null) { + opticalconfigId_ = builderForValue.build(); + onChanged(); + } else { + opticalconfigIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public context.ContextOuterClass.SliceList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder mergeOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { + if (opticalconfigIdBuilder_ == null) { + if (opticalconfigId_ != null) { + opticalconfigId_ = context.ContextOuterClass.OpticalConfigId.newBuilder(opticalconfigId_).mergeFrom(value).buildPartial(); + } else { + opticalconfigId_ = value; + } + onChanged(); + } else { + opticalconfigIdBuilder_.mergeFrom(value); + } + return this; + } - } + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public Builder clearOpticalconfigId() { + if (opticalconfigIdBuilder_ == null) { + opticalconfigId_ = null; + onChanged(); + } else { + opticalconfigId_ = null; + opticalconfigIdBuilder_ = null; + } + return this; + } - public interface SliceFilterOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceFilter) - com.google.protobuf.MessageOrBuilder { + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public context.ContextOuterClass.OpticalConfigId.Builder getOpticalconfigIdBuilder() { + onChanged(); + return getOpticalconfigIdFieldBuilder().getBuilder(); + } - /** - * .context.SliceIdList slice_ids = 1; - * @return Whether the sliceIds field is set. - */ - boolean hasSliceIds(); - /** - * .context.SliceIdList slice_ids = 1; - * @return The sliceIds. - */ - context.ContextOuterClass.SliceIdList getSliceIds(); - /** - * .context.SliceIdList slice_ids = 1; - */ - context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder(); + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { + if (opticalconfigIdBuilder_ != null) { + return opticalconfigIdBuilder_.getMessageOrBuilder(); + } else { + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; + } + } - /** - * bool include_endpoint_ids = 2; - * @return The includeEndpointIds. - */ - boolean getIncludeEndpointIds(); + /** + * .context.OpticalConfigId opticalconfig_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getOpticalconfigIdFieldBuilder() { + if (opticalconfigIdBuilder_ == null) { + opticalconfigIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalconfigId(), getParentForChildren(), isClean()); + opticalconfigId_ = null; + } + return opticalconfigIdBuilder_; + } - /** - * bool include_constraints = 3; - * @return The includeConstraints. - */ - boolean getIncludeConstraints(); + private java.lang.Object config_ = ""; + + /** + * string config = 2; + * @return The config. + */ + public java.lang.String getConfig() { + java.lang.Object ref = config_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + config_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * bool include_service_ids = 4; - * @return The includeServiceIds. - */ - boolean getIncludeServiceIds(); + /** + * string config = 2; + * @return The bytes for config. + */ + public com.google.protobuf.ByteString getConfigBytes() { + java.lang.Object ref = config_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + config_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * bool include_subslice_ids = 5; - * @return The includeSubsliceIds. - */ - boolean getIncludeSubsliceIds(); + /** + * string config = 2; + * @param value The config to set. + * @return This builder for chaining. + */ + public Builder setConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + return this; + } - /** - * bool include_config_rules = 6; - * @return The includeConfigRules. - */ - boolean getIncludeConfigRules(); - } - /** - * Protobuf type {@code context.SliceFilter} - */ - public static final class SliceFilter extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceFilter) - SliceFilterOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceFilter.newBuilder() to construct. - private SliceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceFilter() { - } + /** + * string config = 2; + * @return This builder for chaining. + */ + public Builder clearConfig() { + config_ = getDefaultInstance().getConfig(); + onChanged(); + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceFilter(); - } + /** + * string config = 2; + * @param value The bytes for config to set. + * @return This builder for chaining. + */ + public Builder setConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + config_ = value; + onChanged(); + return this; + } - @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; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceFilter.class, context.ContextOuterClass.SliceFilter.Builder.class); - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.OpticalConfig) + } - public static final int SLICE_IDS_FIELD_NUMBER = 1; - private context.ContextOuterClass.SliceIdList sliceIds_; - /** - * .context.SliceIdList slice_ids = 1; - * @return Whether the sliceIds field is set. - */ - @java.lang.Override - public boolean hasSliceIds() { - return sliceIds_ != null; - } - /** - * .context.SliceIdList slice_ids = 1; - * @return The sliceIds. - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdList getSliceIds() { - return sliceIds_ == null ? context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; - } - /** - * .context.SliceIdList slice_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder() { - return getSliceIds(); - } + // @@protoc_insertion_point(class_scope:context.OpticalConfig) + private static final context.ContextOuterClass.OpticalConfig DEFAULT_INSTANCE; - public static final int INCLUDE_ENDPOINT_IDS_FIELD_NUMBER = 2; - private boolean includeEndpointIds_; - /** - * bool include_endpoint_ids = 2; - * @return The includeEndpointIds. - */ - @java.lang.Override - public boolean getIncludeEndpointIds() { - return includeEndpointIds_; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfig(); + } - public static final int INCLUDE_CONSTRAINTS_FIELD_NUMBER = 3; - private boolean includeConstraints_; - /** - * bool include_constraints = 3; - * @return The includeConstraints. - */ - @java.lang.Override - public boolean getIncludeConstraints() { - return includeConstraints_; - } + public static context.ContextOuterClass.OpticalConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static final int INCLUDE_SERVICE_IDS_FIELD_NUMBER = 4; - private boolean includeServiceIds_; - /** - * bool include_service_ids = 4; - * @return The includeServiceIds. - */ - @java.lang.Override - public boolean getIncludeServiceIds() { - return includeServiceIds_; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static final int INCLUDE_SUBSLICE_IDS_FIELD_NUMBER = 5; - private boolean includeSubsliceIds_; - /** - * bool include_subslice_ids = 5; - * @return The includeSubsliceIds. - */ - @java.lang.Override - public boolean getIncludeSubsliceIds() { - return includeSubsliceIds_; - } + @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); + } + }; - public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 6; - private boolean includeConfigRules_; - /** - * bool include_config_rules = 6; - * @return The includeConfigRules. - */ - @java.lang.Override - public boolean getIncludeConfigRules() { - return includeConfigRules_; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - memoizedIsInitialized = 1; - return true; + @java.lang.Override + public context.ContextOuterClass.OpticalConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sliceIds_ != null) { - output.writeMessage(1, getSliceIds()); - } - if (includeEndpointIds_ != false) { - output.writeBool(2, includeEndpointIds_); - } - if (includeConstraints_ != false) { - output.writeBool(3, includeConstraints_); - } - if (includeServiceIds_ != false) { - output.writeBool(4, includeServiceIds_); - } - if (includeSubsliceIds_ != false) { - output.writeBool(5, includeSubsliceIds_); - } - if (includeConfigRules_ != false) { - output.writeBool(6, includeConfigRules_); - } - unknownFields.writeTo(output); - } + public interface OpticalConfigListOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalConfigList) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sliceIds_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSliceIds()); - } - if (includeEndpointIds_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, includeEndpointIds_); - } - if (includeConstraints_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, includeConstraints_); - } - if (includeServiceIds_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, includeServiceIds_); - } - if (includeSubsliceIds_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, includeSubsliceIds_); - } - if (includeConfigRules_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, includeConfigRules_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + java.util.List getOpticalconfigsList(); - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceFilter)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceFilter other = (context.ContextOuterClass.SliceFilter) obj; - - if (hasSliceIds() != other.hasSliceIds()) return false; - if (hasSliceIds()) { - if (!getSliceIds() - .equals(other.getSliceIds())) return false; - } - if (getIncludeEndpointIds() - != other.getIncludeEndpointIds()) return false; - if (getIncludeConstraints() - != other.getIncludeConstraints()) return false; - if (getIncludeServiceIds() - != other.getIncludeServiceIds()) return false; - if (getIncludeSubsliceIds() - != other.getIncludeSubsliceIds()) return false; - if (getIncludeConfigRules() - != other.getIncludeConfigRules()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSliceIds()) { - hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSliceIds().hashCode(); - } - hash = (37 * hash) + INCLUDE_ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeEndpointIds()); - hash = (37 * hash) + INCLUDE_CONSTRAINTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeConstraints()); - hash = (37 * hash) + INCLUDE_SERVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeServiceIds()); - hash = (37 * hash) + INCLUDE_SUBSLICE_IDS_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + int getOpticalconfigsCount(); - public static context.ContextOuterClass.SliceFilter parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceFilter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceFilter parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceFilter parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceFilter parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceFilter parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + java.util.List getOpticalconfigsOrBuilderList(); - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceFilter prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** - * Protobuf type {@code context.SliceFilter} + * Protobuf type {@code context.OpticalConfigList} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceFilter) - context.ContextOuterClass.SliceFilterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceFilter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceFilter.class, context.ContextOuterClass.SliceFilter.Builder.class); - } - - // 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; - sliceIdsBuilder_ = null; - } - includeEndpointIds_ = false; - - includeConstraints_ = false; - - includeServiceIds_ = false; - - includeSubsliceIds_ = false; - - includeConfigRules_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceFilter_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceFilter getDefaultInstanceForType() { - return context.ContextOuterClass.SliceFilter.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceFilter build() { - context.ContextOuterClass.SliceFilter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceFilter) { - return mergeFrom((context.ContextOuterClass.SliceFilter)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceFilter other) { - if (other == context.ContextOuterClass.SliceFilter.getDefaultInstance()) return this; - if (other.hasSliceIds()) { - mergeSliceIds(other.getSliceIds()); - } - if (other.getIncludeEndpointIds() != false) { - setIncludeEndpointIds(other.getIncludeEndpointIds()); - } - if (other.getIncludeConstraints() != false) { - setIncludeConstraints(other.getIncludeConstraints()); - } - if (other.getIncludeServiceIds() != false) { - setIncludeServiceIds(other.getIncludeServiceIds()); - } - if (other.getIncludeSubsliceIds() != false) { - setIncludeSubsliceIds(other.getIncludeSubsliceIds()); - } - if (other.getIncludeConfigRules() != false) { - setIncludeConfigRules(other.getIncludeConfigRules()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceFilter) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.SliceIdList sliceIds_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceIdList, context.ContextOuterClass.SliceIdList.Builder, context.ContextOuterClass.SliceIdListOrBuilder> sliceIdsBuilder_; - /** - * .context.SliceIdList slice_ids = 1; - * @return Whether the sliceIds field is set. - */ - public boolean hasSliceIds() { - return sliceIdsBuilder_ != null || sliceIds_ != null; - } - /** - * .context.SliceIdList slice_ids = 1; - * @return The sliceIds. - */ - public context.ContextOuterClass.SliceIdList getSliceIds() { - if (sliceIdsBuilder_ == null) { - return sliceIds_ == null ? context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; - } else { - return sliceIdsBuilder_.getMessage(); - } - } - /** - * .context.SliceIdList slice_ids = 1; - */ - public Builder setSliceIds(context.ContextOuterClass.SliceIdList value) { - if (sliceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceIds_ = value; - onChanged(); - } else { - sliceIdsBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceIdList slice_ids = 1; - */ - public Builder setSliceIds( - context.ContextOuterClass.SliceIdList.Builder builderForValue) { - if (sliceIdsBuilder_ == null) { - sliceIds_ = builderForValue.build(); - onChanged(); - } else { - sliceIdsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceIdList slice_ids = 1; - */ - public Builder mergeSliceIds(context.ContextOuterClass.SliceIdList value) { - if (sliceIdsBuilder_ == null) { - if (sliceIds_ != null) { - sliceIds_ = - context.ContextOuterClass.SliceIdList.newBuilder(sliceIds_).mergeFrom(value).buildPartial(); - } else { - sliceIds_ = value; - } - onChanged(); - } else { - sliceIdsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceIdList slice_ids = 1; - */ - public Builder clearSliceIds() { - if (sliceIdsBuilder_ == null) { - sliceIds_ = null; - onChanged(); - } else { - sliceIds_ = null; - sliceIdsBuilder_ = null; - } - - return this; - } - /** - * .context.SliceIdList slice_ids = 1; - */ - public context.ContextOuterClass.SliceIdList.Builder getSliceIdsBuilder() { - - onChanged(); - return getSliceIdsFieldBuilder().getBuilder(); - } - /** - * .context.SliceIdList slice_ids = 1; - */ - public context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder() { - if (sliceIdsBuilder_ != null) { - return sliceIdsBuilder_.getMessageOrBuilder(); - } else { - return sliceIds_ == null ? - context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; - } - } - /** - * .context.SliceIdList slice_ids = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceIdList, context.ContextOuterClass.SliceIdList.Builder, context.ContextOuterClass.SliceIdListOrBuilder> - getSliceIdsFieldBuilder() { - if (sliceIdsBuilder_ == null) { - sliceIdsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceIdList, context.ContextOuterClass.SliceIdList.Builder, context.ContextOuterClass.SliceIdListOrBuilder>( - getSliceIds(), - getParentForChildren(), - isClean()); - sliceIds_ = null; - } - return sliceIdsBuilder_; - } - - private boolean includeEndpointIds_ ; - /** - * bool include_endpoint_ids = 2; - * @return The includeEndpointIds. - */ - @java.lang.Override - public boolean getIncludeEndpointIds() { - return includeEndpointIds_; - } - /** - * bool include_endpoint_ids = 2; - * @param value The includeEndpointIds to set. - * @return This builder for chaining. - */ - public Builder setIncludeEndpointIds(boolean value) { - - includeEndpointIds_ = value; - onChanged(); - return this; - } - /** - * bool include_endpoint_ids = 2; - * @return This builder for chaining. - */ - public Builder clearIncludeEndpointIds() { - - includeEndpointIds_ = false; - onChanged(); - return this; - } - - private boolean includeConstraints_ ; - /** - * bool include_constraints = 3; - * @return The includeConstraints. - */ - @java.lang.Override - public boolean getIncludeConstraints() { - return includeConstraints_; - } - /** - * bool include_constraints = 3; - * @param value The includeConstraints to set. - * @return This builder for chaining. - */ - public Builder setIncludeConstraints(boolean value) { - - includeConstraints_ = value; - onChanged(); - return this; - } - /** - * bool include_constraints = 3; - * @return This builder for chaining. - */ - public Builder clearIncludeConstraints() { - - includeConstraints_ = false; - onChanged(); - return this; - } - - private boolean includeServiceIds_ ; - /** - * bool include_service_ids = 4; - * @return The includeServiceIds. - */ - @java.lang.Override - public boolean getIncludeServiceIds() { - return includeServiceIds_; - } - /** - * bool include_service_ids = 4; - * @param value The includeServiceIds to set. - * @return This builder for chaining. - */ - public Builder setIncludeServiceIds(boolean value) { - - includeServiceIds_ = value; - onChanged(); - return this; - } - /** - * bool include_service_ids = 4; - * @return This builder for chaining. - */ - public Builder clearIncludeServiceIds() { - - includeServiceIds_ = false; - onChanged(); - return this; - } - - private boolean includeSubsliceIds_ ; - /** - * bool include_subslice_ids = 5; - * @return The includeSubsliceIds. - */ - @java.lang.Override - public boolean getIncludeSubsliceIds() { - return includeSubsliceIds_; - } - /** - * bool include_subslice_ids = 5; - * @param value The includeSubsliceIds to set. - * @return This builder for chaining. - */ - public Builder setIncludeSubsliceIds(boolean value) { - - includeSubsliceIds_ = value; - onChanged(); - return this; - } - /** - * bool include_subslice_ids = 5; - * @return This builder for chaining. - */ - public Builder clearIncludeSubsliceIds() { - - includeSubsliceIds_ = false; - onChanged(); - return this; - } - - private boolean includeConfigRules_ ; - /** - * bool include_config_rules = 6; - * @return The includeConfigRules. - */ - @java.lang.Override - public boolean getIncludeConfigRules() { - return includeConfigRules_; - } - /** - * bool include_config_rules = 6; - * @param value The includeConfigRules to set. - * @return This builder for chaining. - */ - public Builder setIncludeConfigRules(boolean value) { - - includeConfigRules_ = value; - onChanged(); - return this; - } - /** - * bool include_config_rules = 6; - * @return This builder for chaining. - */ - public Builder clearIncludeConfigRules() { - - includeConfigRules_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceFilter) - } + public static final class OpticalConfigList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalConfigList) + OpticalConfigListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use OpticalConfigList.newBuilder() to construct. + private OpticalConfigList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OpticalConfigList() { + opticalconfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } - // @@protoc_insertion_point(class_scope:context.SliceFilter) - private static final context.ContextOuterClass.SliceFilter DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceFilter(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfigList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigList.class, context.ContextOuterClass.OpticalConfigList.Builder.class); + } - public static context.ContextOuterClass.SliceFilter getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final int OPTICALCONFIGS_FIELD_NUMBER = 1; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private java.util.List opticalconfigs_; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + @java.lang.Override + public java.util.List getOpticalconfigsList() { + return opticalconfigs_; + } - @java.lang.Override - public context.ContextOuterClass.SliceFilter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + @java.lang.Override + public java.util.List getOpticalconfigsOrBuilderList() { + return opticalconfigs_; + } - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + @java.lang.Override + public int getOpticalconfigsCount() { + return opticalconfigs_.size(); + } - public interface SliceEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.SliceEvent) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index) { + return opticalconfigs_.get(index); + } - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index) { + return opticalconfigs_.get(index); + } - /** - * .context.SliceId slice_id = 2; - * @return Whether the sliceId field is set. - */ - boolean hasSliceId(); - /** - * .context.SliceId slice_id = 2; - * @return The sliceId. - */ - context.ContextOuterClass.SliceId getSliceId(); - /** - * .context.SliceId slice_id = 2; - */ - context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); - } - /** - * Protobuf type {@code context.SliceEvent} - */ - public static final class SliceEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.SliceEvent) - SliceEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use SliceEvent.newBuilder() to construct. - private SliceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SliceEvent() { - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SliceEvent(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @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; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < opticalconfigs_.size(); i++) { + output.writeMessage(1, opticalconfigs_.get(i)); + } + unknownFields.writeTo(output); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceEvent.class, context.ContextOuterClass.SliceEvent.Builder.class); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < opticalconfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, opticalconfigs_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.OpticalConfigList)) { + return super.equals(obj); + } + context.ContextOuterClass.OpticalConfigList other = (context.ContextOuterClass.OpticalConfigList) obj; + if (!getOpticalconfigsList().equals(other.getOpticalconfigsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOpticalconfigsCount() > 0) { + hash = (37 * hash) + OPTICALCONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getOpticalconfigsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - public static final int SLICE_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.SliceId sliceId_; - /** - * .context.SliceId slice_id = 2; - * @return Whether the sliceId field is set. - */ - @java.lang.Override - public boolean hasSliceId() { - return sliceId_ != null; - } - /** - * .context.SliceId slice_id = 2; - * @return The sliceId. - */ - @java.lang.Override - public context.ContextOuterClass.SliceId getSliceId() { - return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } - /** - * .context.SliceId slice_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - return getSliceId(); - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (sliceId_ != null) { - output.writeMessage(2, getSliceId()); - } - unknownFields.writeTo(output); - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (sliceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSliceId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.SliceEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.SliceEvent other = (context.ContextOuterClass.SliceEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasSliceId() != other.hasSliceId()) return false; - if (hasSliceId()) { - if (!getSliceId() - .equals(other.getSliceId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasSliceId()) { - hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getSliceId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static context.ContextOuterClass.SliceEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.SliceEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.SliceEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.SliceEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.OpticalConfigList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.SliceEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.SliceEvent) - context.ContextOuterClass.SliceEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_SliceEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_SliceEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.SliceEvent.class, context.ContextOuterClass.SliceEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (sliceIdBuilder_ == null) { - sliceId_ = null; - } else { - sliceId_ = null; - sliceIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_SliceEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.SliceEvent getDefaultInstanceForType() { - return context.ContextOuterClass.SliceEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.SliceEvent build() { - context.ContextOuterClass.SliceEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.SliceEvent) { - return mergeFrom((context.ContextOuterClass.SliceEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.SliceEvent other) { - if (other == context.ContextOuterClass.SliceEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasSliceId()) { - mergeSliceId(other.getSliceId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.SliceId sliceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> sliceIdBuilder_; - /** - * .context.SliceId slice_id = 2; - * @return Whether the sliceId field is set. - */ - public boolean hasSliceId() { - return sliceIdBuilder_ != null || sliceId_ != null; - } - /** - * .context.SliceId slice_id = 2; - * @return The sliceId. - */ - public context.ContextOuterClass.SliceId getSliceId() { - if (sliceIdBuilder_ == null) { - return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } else { - return sliceIdBuilder_.getMessage(); - } - } - /** - * .context.SliceId slice_id = 2; - */ - public Builder setSliceId(context.ContextOuterClass.SliceId value) { - if (sliceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceId_ = value; - onChanged(); - } else { - sliceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceId slice_id = 2; - */ - public Builder setSliceId( - context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdBuilder_ == null) { - sliceId_ = builderForValue.build(); - onChanged(); - } else { - sliceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceId slice_id = 2; - */ - public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { - if (sliceIdBuilder_ == null) { - if (sliceId_ != null) { - sliceId_ = - context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); - } else { - sliceId_ = value; - } - onChanged(); - } else { - sliceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceId slice_id = 2; - */ - public Builder clearSliceId() { - if (sliceIdBuilder_ == null) { - sliceId_ = null; - onChanged(); - } else { - sliceId_ = null; - sliceIdBuilder_ = null; - } - - return this; - } - /** - * .context.SliceId slice_id = 2; - */ - public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { - - onChanged(); - return getSliceIdFieldBuilder().getBuilder(); - } - /** - * .context.SliceId slice_id = 2; - */ - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - if (sliceIdBuilder_ != null) { - return sliceIdBuilder_.getMessageOrBuilder(); - } else { - return sliceId_ == null ? - context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } - } - /** - * .context.SliceId slice_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> - getSliceIdFieldBuilder() { - if (sliceIdBuilder_ == null) { - sliceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder>( - getSliceId(), - getParentForChildren(), - isClean()); - sliceId_ = null; - } - return sliceIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.SliceEvent) - } + public static context.ContextOuterClass.OpticalConfigList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:context.SliceEvent) - private static final context.ContextOuterClass.SliceEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.SliceEvent(); - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static context.ContextOuterClass.SliceEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.OpticalConfigList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public context.ContextOuterClass.SliceEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static Builder newBuilder(context.ContextOuterClass.OpticalConfigList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public interface ConnectionIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionId) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * .context.Uuid connection_uuid = 1; - * @return Whether the connectionUuid field is set. - */ - boolean hasConnectionUuid(); - /** - * .context.Uuid connection_uuid = 1; - * @return The connectionUuid. - */ - context.ContextOuterClass.Uuid getConnectionUuid(); - /** - * .context.Uuid connection_uuid = 1; - */ - context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder(); - } - /** - *
-   * ----- Connection ----------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.ConnectionId} - */ - public static final class ConnectionId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionId) - ConnectionIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionId.newBuilder() to construct. - private ConnectionId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionId() { - } + /** + * Protobuf type {@code context.OpticalConfigList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalConfigList) + context.ContextOuterClass.OpticalConfigListOrBuilder { - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionId(); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; + } - @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; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalConfigList_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalConfigList.class, context.ContextOuterClass.OpticalConfigList.Builder.class); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionId.class, context.ContextOuterClass.ConnectionId.Builder.class); - } + // Construct using context.ContextOuterClass.OpticalConfigList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - public static final int CONNECTION_UUID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid connectionUuid_; - /** - * .context.Uuid connection_uuid = 1; - * @return Whether the connectionUuid field is set. - */ - @java.lang.Override - public boolean hasConnectionUuid() { - return connectionUuid_ != null; - } - /** - * .context.Uuid connection_uuid = 1; - * @return The connectionUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getConnectionUuid() { - return connectionUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; - } - /** - * .context.Uuid connection_uuid = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder() { - return getConnectionUuid(); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOpticalconfigsFieldBuilder(); + } + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (opticalconfigsBuilder_ == null) { + opticalconfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + opticalconfigsBuilder_.clear(); + } + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (connectionUuid_ != null) { - output.writeMessage(1, getConnectionUuid()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (connectionUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getConnectionUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public context.ContextOuterClass.OpticalConfigList getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalConfigList.getDefaultInstance(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionId)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionId other = (context.ContextOuterClass.ConnectionId) obj; - - if (hasConnectionUuid() != other.hasConnectionUuid()) return false; - if (hasConnectionUuid()) { - if (!getConnectionUuid() - .equals(other.getConnectionUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public context.ContextOuterClass.OpticalConfigList build() { + context.ContextOuterClass.OpticalConfigList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConnectionUuid()) { - hash = (37 * hash) + CONNECTION_UUID_FIELD_NUMBER; - hash = (53 * hash) + getConnectionUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public context.ContextOuterClass.OpticalConfigList buildPartial() { + context.ContextOuterClass.OpticalConfigList result = new context.ContextOuterClass.OpticalConfigList(this); + int from_bitField0_ = bitField0_; + if (opticalconfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + opticalconfigs_ = java.util.Collections.unmodifiableList(opticalconfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.opticalconfigs_ = opticalconfigs_; + } else { + result.opticalconfigs_ = opticalconfigsBuilder_.build(); + } + onBuilt(); + return result; + } - public static context.ContextOuterClass.ConnectionId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Connection ----------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.ConnectionId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionId) - context.ContextOuterClass.ConnectionIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionId.class, context.ContextOuterClass.ConnectionId.Builder.class); - } - - // 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; - connectionUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionId getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionId build() { - context.ContextOuterClass.ConnectionId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionId) { - return mergeFrom((context.ContextOuterClass.ConnectionId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionId other) { - if (other == context.ContextOuterClass.ConnectionId.getDefaultInstance()) return this; - if (other.hasConnectionUuid()) { - mergeConnectionUuid(other.getConnectionUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid connectionUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> connectionUuidBuilder_; - /** - * .context.Uuid connection_uuid = 1; - * @return Whether the connectionUuid field is set. - */ - public boolean hasConnectionUuid() { - return connectionUuidBuilder_ != null || connectionUuid_ != null; - } - /** - * .context.Uuid connection_uuid = 1; - * @return The connectionUuid. - */ - public context.ContextOuterClass.Uuid getConnectionUuid() { - if (connectionUuidBuilder_ == null) { - return connectionUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; - } else { - return connectionUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid connection_uuid = 1; - */ - public Builder setConnectionUuid(context.ContextOuterClass.Uuid value) { - if (connectionUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - connectionUuid_ = value; - onChanged(); - } else { - connectionUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid connection_uuid = 1; - */ - public Builder setConnectionUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (connectionUuidBuilder_ == null) { - connectionUuid_ = builderForValue.build(); - onChanged(); - } else { - connectionUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid connection_uuid = 1; - */ - public Builder mergeConnectionUuid(context.ContextOuterClass.Uuid value) { - if (connectionUuidBuilder_ == null) { - if (connectionUuid_ != null) { - connectionUuid_ = - context.ContextOuterClass.Uuid.newBuilder(connectionUuid_).mergeFrom(value).buildPartial(); - } else { - connectionUuid_ = value; - } - onChanged(); - } else { - connectionUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid connection_uuid = 1; - */ - public Builder clearConnectionUuid() { - if (connectionUuidBuilder_ == null) { - connectionUuid_ = null; - onChanged(); - } else { - connectionUuid_ = null; - connectionUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid connection_uuid = 1; - */ - public context.ContextOuterClass.Uuid.Builder getConnectionUuidBuilder() { - - onChanged(); - return getConnectionUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid connection_uuid = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder() { - if (connectionUuidBuilder_ != null) { - return connectionUuidBuilder_.getMessageOrBuilder(); - } else { - return connectionUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; - } - } - /** - * .context.Uuid connection_uuid = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getConnectionUuidFieldBuilder() { - if (connectionUuidBuilder_ == null) { - connectionUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getConnectionUuid(), - getParentForChildren(), - isClean()); - connectionUuid_ = null; - } - return connectionUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionId) - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - // @@protoc_insertion_point(class_scope:context.ConnectionId) - private static final context.ContextOuterClass.ConnectionId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionId(); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - public static context.ContextOuterClass.ConnectionId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @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 static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @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 com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalConfigList) { + return mergeFrom((context.ContextOuterClass.OpticalConfigList) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public context.ContextOuterClass.ConnectionId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public Builder mergeFrom(context.ContextOuterClass.OpticalConfigList other) { + if (other == context.ContextOuterClass.OpticalConfigList.getDefaultInstance()) + return this; + if (opticalconfigsBuilder_ == null) { + if (!other.opticalconfigs_.isEmpty()) { + if (opticalconfigs_.isEmpty()) { + opticalconfigs_ = other.opticalconfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.addAll(other.opticalconfigs_); + } + onChanged(); + } + } else { + if (!other.opticalconfigs_.isEmpty()) { + if (opticalconfigsBuilder_.isEmpty()) { + opticalconfigsBuilder_.dispose(); + opticalconfigsBuilder_ = null; + opticalconfigs_ = other.opticalconfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + opticalconfigsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getOpticalconfigsFieldBuilder() : null; + } else { + opticalconfigsBuilder_.addAllMessages(other.opticalconfigs_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.OpticalConfigList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - public interface ConnectionSettings_L0OrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L0) - com.google.protobuf.MessageOrBuilder { + private int bitField0_; - /** - * string lsp_symbolic_name = 1; - * @return The lspSymbolicName. - */ - java.lang.String getLspSymbolicName(); - /** - * string lsp_symbolic_name = 1; - * @return The bytes for lspSymbolicName. - */ - com.google.protobuf.ByteString - getLspSymbolicNameBytes(); - } - /** - * Protobuf type {@code context.ConnectionSettings_L0} - */ - public static final class ConnectionSettings_L0 extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L0) - ConnectionSettings_L0OrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionSettings_L0.newBuilder() to construct. - private ConnectionSettings_L0(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionSettings_L0() { - lspSymbolicName_ = ""; - } + private java.util.List opticalconfigs_ = java.util.Collections.emptyList(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionSettings_L0(); - } + private void ensureOpticalconfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + opticalconfigs_ = new java.util.ArrayList(opticalconfigs_); + bitField0_ |= 0x00000001; + } + } - @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; - } + private com.google.protobuf.RepeatedFieldBuilderV3 opticalconfigsBuilder_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L0.class, context.ContextOuterClass.ConnectionSettings_L0.Builder.class); - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public java.util.List getOpticalconfigsList() { + if (opticalconfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(opticalconfigs_); + } else { + return opticalconfigsBuilder_.getMessageList(); + } + } - public static final int LSP_SYMBOLIC_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object lspSymbolicName_; - /** - * string lsp_symbolic_name = 1; - * @return The lspSymbolicName. - */ - @java.lang.Override - public java.lang.String getLspSymbolicName() { - java.lang.Object ref = lspSymbolicName_; - 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(); - lspSymbolicName_ = s; - return s; - } - } - /** - * string lsp_symbolic_name = 1; - * @return The bytes for lspSymbolicName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLspSymbolicNameBytes() { - java.lang.Object ref = lspSymbolicName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - lspSymbolicName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public int getOpticalconfigsCount() { + if (opticalconfigsBuilder_ == null) { + return opticalconfigs_.size(); + } else { + return opticalconfigsBuilder_.getCount(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public context.ContextOuterClass.OpticalConfig getOpticalconfigs(int index) { + if (opticalconfigsBuilder_ == null) { + return opticalconfigs_.get(index); + } else { + return opticalconfigsBuilder_.getMessage(index); + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder setOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig value) { + if (opticalconfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalconfigsIsMutable(); + opticalconfigs_.set(index, value); + onChanged(); + } else { + opticalconfigsBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getLspSymbolicNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, lspSymbolicName_); - } - unknownFields.writeTo(output); - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder setOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig.Builder builderForValue) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + opticalconfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getLspSymbolicNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, lspSymbolicName_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder addOpticalconfigs(context.ContextOuterClass.OpticalConfig value) { + if (opticalconfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(value); + onChanged(); + } else { + opticalconfigsBuilder_.addMessage(value); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L0)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionSettings_L0 other = (context.ContextOuterClass.ConnectionSettings_L0) obj; - - if (!getLspSymbolicName() - .equals(other.getLspSymbolicName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder addOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig value) { + if (opticalconfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(index, value); + onChanged(); + } else { + opticalconfigsBuilder_.addMessage(index, value); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LSP_SYMBOLIC_NAME_FIELD_NUMBER; - hash = (53 * hash) + getLspSymbolicName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder addOpticalconfigs(context.ContextOuterClass.OpticalConfig.Builder builderForValue) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(builderForValue.build()); + onChanged(); + } else { + opticalconfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L0 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder addOpticalconfigs(int index, context.ContextOuterClass.OpticalConfig.Builder builderForValue) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + opticalconfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder addAllOpticalconfigs(java.lang.Iterable values) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, opticalconfigs_); + onChanged(); + } else { + opticalconfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder clearOpticalconfigs() { + if (opticalconfigsBuilder_ == null) { + opticalconfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + opticalconfigsBuilder_.clear(); + } + return this; + } + + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public Builder removeOpticalconfigs(int index) { + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.remove(index); + onChanged(); + } else { + opticalconfigsBuilder_.remove(index); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L0 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public context.ContextOuterClass.OpticalConfig.Builder getOpticalconfigsBuilder(int index) { + return getOpticalconfigsFieldBuilder().getBuilder(index); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionSettings_L0} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L0) - context.ContextOuterClass.ConnectionSettings_L0OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L0.class, context.ContextOuterClass.ConnectionSettings_L0.Builder.class); - } - - // 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(); - lspSymbolicName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L0 getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L0 build() { - context.ContextOuterClass.ConnectionSettings_L0 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L0 buildPartial() { - context.ContextOuterClass.ConnectionSettings_L0 result = new context.ContextOuterClass.ConnectionSettings_L0(this); - result.lspSymbolicName_ = lspSymbolicName_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionSettings_L0) { - return mergeFrom((context.ContextOuterClass.ConnectionSettings_L0)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L0 other) { - if (other == context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance()) return this; - if (!other.getLspSymbolicName().isEmpty()) { - lspSymbolicName_ = other.lspSymbolicName_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings_L0) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object lspSymbolicName_ = ""; - /** - * string lsp_symbolic_name = 1; - * @return The lspSymbolicName. - */ - public java.lang.String getLspSymbolicName() { - java.lang.Object ref = lspSymbolicName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - lspSymbolicName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string lsp_symbolic_name = 1; - * @return The bytes for lspSymbolicName. - */ - public com.google.protobuf.ByteString - getLspSymbolicNameBytes() { - java.lang.Object ref = lspSymbolicName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - lspSymbolicName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string lsp_symbolic_name = 1; - * @param value The lspSymbolicName to set. - * @return This builder for chaining. - */ - public Builder setLspSymbolicName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - lspSymbolicName_ = value; - onChanged(); - return this; - } - /** - * string lsp_symbolic_name = 1; - * @return This builder for chaining. - */ - public Builder clearLspSymbolicName() { - - lspSymbolicName_ = getDefaultInstance().getLspSymbolicName(); - onChanged(); - return this; - } - /** - * string lsp_symbolic_name = 1; - * @param value The bytes for lspSymbolicName to set. - * @return This builder for chaining. - */ - public Builder setLspSymbolicNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - lspSymbolicName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L0) - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public context.ContextOuterClass.OpticalConfigOrBuilder getOpticalconfigsOrBuilder(int index) { + if (opticalconfigsBuilder_ == null) { + return opticalconfigs_.get(index); + } else { + return opticalconfigsBuilder_.getMessageOrBuilder(index); + } + } - // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L0) - private static final context.ContextOuterClass.ConnectionSettings_L0 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L0(); - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public java.util.List getOpticalconfigsOrBuilderList() { + if (opticalconfigsBuilder_ != null) { + return opticalconfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(opticalconfigs_); + } + } - public static context.ContextOuterClass.ConnectionSettings_L0 getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public context.ContextOuterClass.OpticalConfig.Builder addOpticalconfigsBuilder() { + return getOpticalconfigsFieldBuilder().addBuilder(context.ContextOuterClass.OpticalConfig.getDefaultInstance()); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public context.ContextOuterClass.OpticalConfig.Builder addOpticalconfigsBuilder(int index) { + return getOpticalconfigsFieldBuilder().addBuilder(index, context.ContextOuterClass.OpticalConfig.getDefaultInstance()); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .context.OpticalConfig opticalconfigs = 1; + */ + public java.util.List getOpticalconfigsBuilderList() { + return getOpticalconfigsFieldBuilder().getBuilderList(); + } - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L0 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.RepeatedFieldBuilderV3 getOpticalconfigsFieldBuilder() { + if (opticalconfigsBuilder_ == null) { + opticalconfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(opticalconfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + opticalconfigs_ = null; + } + return opticalconfigsBuilder_; + } - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public interface ConnectionSettings_L2OrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L2) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.OpticalConfigList) + } - /** - * string src_mac_address = 1; - * @return The srcMacAddress. - */ - java.lang.String getSrcMacAddress(); - /** - * string src_mac_address = 1; - * @return The bytes for srcMacAddress. - */ - com.google.protobuf.ByteString - getSrcMacAddressBytes(); + // @@protoc_insertion_point(class_scope:context.OpticalConfigList) + private static final context.ContextOuterClass.OpticalConfigList DEFAULT_INSTANCE; - /** - * string dst_mac_address = 2; - * @return The dstMacAddress. - */ - java.lang.String getDstMacAddress(); - /** - * string dst_mac_address = 2; - * @return The bytes for dstMacAddress. - */ - com.google.protobuf.ByteString - getDstMacAddressBytes(); + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalConfigList(); + } - /** - * uint32 ether_type = 3; - * @return The etherType. - */ - int getEtherType(); + public static context.ContextOuterClass.OpticalConfigList getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * uint32 vlan_id = 4; - * @return The vlanId. - */ - int getVlanId(); + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - /** - * uint32 mpls_label = 5; - * @return The mplsLabel. - */ - int getMplsLabel(); + @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); + } + }; - /** - * uint32 mpls_traffic_class = 6; - * @return The mplsTrafficClass. - */ - int getMplsTrafficClass(); - } - /** - * Protobuf type {@code context.ConnectionSettings_L2} - */ - public static final class ConnectionSettings_L2 extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L2) - ConnectionSettings_L2OrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionSettings_L2.newBuilder() to construct. - private ConnectionSettings_L2(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionSettings_L2() { - srcMacAddress_ = ""; - dstMacAddress_ = ""; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionSettings_L2(); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @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; + @java.lang.Override + public context.ContextOuterClass.OpticalConfigList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L2.class, context.ContextOuterClass.ConnectionSettings_L2.Builder.class); - } + public interface OpticalLinkIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLinkId) + com.google.protobuf.MessageOrBuilder { - public static final int SRC_MAC_ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object srcMacAddress_; - /** - * string src_mac_address = 1; - * @return The srcMacAddress. - */ - @java.lang.Override - public java.lang.String getSrcMacAddress() { - java.lang.Object ref = srcMacAddress_; - 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(); - srcMacAddress_ = s; - return s; - } - } - /** - * string src_mac_address = 1; - * @return The bytes for srcMacAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSrcMacAddressBytes() { - java.lang.Object ref = srcMacAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - srcMacAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * .context.Uuid optical_link_uuid = 1; + * @return Whether the opticalLinkUuid field is set. + */ + boolean hasOpticalLinkUuid(); - public static final int DST_MAC_ADDRESS_FIELD_NUMBER = 2; - private volatile java.lang.Object dstMacAddress_; - /** - * string dst_mac_address = 2; - * @return The dstMacAddress. - */ - @java.lang.Override - public java.lang.String getDstMacAddress() { - java.lang.Object ref = dstMacAddress_; - 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(); - dstMacAddress_ = s; - return s; - } - } - /** - * string dst_mac_address = 2; - * @return The bytes for dstMacAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDstMacAddressBytes() { - java.lang.Object ref = dstMacAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dstMacAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * .context.Uuid optical_link_uuid = 1; + * @return The opticalLinkUuid. + */ + context.ContextOuterClass.Uuid getOpticalLinkUuid(); - public static final int ETHER_TYPE_FIELD_NUMBER = 3; - private int etherType_; - /** - * uint32 ether_type = 3; - * @return The etherType. - */ - @java.lang.Override - public int getEtherType() { - return etherType_; + /** + * .context.Uuid optical_link_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder(); } - public static final int VLAN_ID_FIELD_NUMBER = 4; - private int vlanId_; /** - * uint32 vlan_id = 4; - * @return The vlanId. + * Protobuf type {@code context.OpticalLinkId} */ - @java.lang.Override - public int getVlanId() { - return vlanId_; - } + public static final class OpticalLinkId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLinkId) + OpticalLinkIdOrBuilder { - public static final int MPLS_LABEL_FIELD_NUMBER = 5; - private int mplsLabel_; - /** - * uint32 mpls_label = 5; - * @return The mplsLabel. - */ - @java.lang.Override - public int getMplsLabel() { - return mplsLabel_; - } + private static final long serialVersionUID = 0L; - public static final int MPLS_TRAFFIC_CLASS_FIELD_NUMBER = 6; - private int mplsTrafficClass_; - /** - * uint32 mpls_traffic_class = 6; - * @return The mplsTrafficClass. - */ - @java.lang.Override - public int getMplsTrafficClass() { - return mplsTrafficClass_; - } + // Use OpticalLinkId.newBuilder() to construct. + private OpticalLinkId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private OpticalLinkId() { + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpticalLinkId(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSrcMacAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcMacAddress_); - } - if (!getDstMacAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstMacAddress_); - } - if (etherType_ != 0) { - output.writeUInt32(3, etherType_); - } - if (vlanId_ != 0) { - output.writeUInt32(4, vlanId_); - } - if (mplsLabel_ != 0) { - output.writeUInt32(5, mplsLabel_); - } - if (mplsTrafficClass_ != 0) { - output.writeUInt32(6, mplsTrafficClass_); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSrcMacAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcMacAddress_); - } - if (!getDstMacAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstMacAddress_); - } - if (etherType_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, etherType_); - } - if (vlanId_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, vlanId_); - } - if (mplsLabel_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, mplsLabel_); - } - if (mplsTrafficClass_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, mplsTrafficClass_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + 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(); + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L2)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionSettings_L2 other = (context.ContextOuterClass.ConnectionSettings_L2) obj; - - if (!getSrcMacAddress() - .equals(other.getSrcMacAddress())) return false; - if (!getDstMacAddress() - .equals(other.getDstMacAddress())) return false; - if (getEtherType() - != other.getEtherType()) return false; - if (getVlanId() - != other.getVlanId()) return false; - if (getMplsLabel() - != other.getMplsLabel()) return false; - if (getMplsTrafficClass() - != other.getMplsTrafficClass()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SRC_MAC_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getSrcMacAddress().hashCode(); - hash = (37 * hash) + DST_MAC_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getDstMacAddress().hashCode(); - hash = (37 * hash) + ETHER_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getEtherType(); - hash = (37 * hash) + VLAN_ID_FIELD_NUMBER; - hash = (53 * hash) + getVlanId(); - hash = (37 * hash) + MPLS_LABEL_FIELD_NUMBER; - hash = (53 * hash) + getMplsLabel(); - hash = (37 * hash) + MPLS_TRAFFIC_CLASS_FIELD_NUMBER; - hash = (53 * hash) + getMplsTrafficClass(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLinkId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkId.class, context.ContextOuterClass.OpticalLinkId.Builder.class); + } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L2 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int OPTICAL_LINK_UUID_FIELD_NUMBER = 1; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L2 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private context.ContextOuterClass.Uuid opticalLinkUuid_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionSettings_L2} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L2) - context.ContextOuterClass.ConnectionSettings_L2OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L2.class, context.ContextOuterClass.ConnectionSettings_L2.Builder.class); - } - - // 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(); - srcMacAddress_ = ""; - - dstMacAddress_ = ""; - - etherType_ = 0; - - vlanId_ = 0; - - mplsLabel_ = 0; - - mplsTrafficClass_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L2 getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L2 build() { - context.ContextOuterClass.ConnectionSettings_L2 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionSettings_L2) { - return mergeFrom((context.ContextOuterClass.ConnectionSettings_L2)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L2 other) { - if (other == context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance()) return this; - if (!other.getSrcMacAddress().isEmpty()) { - srcMacAddress_ = other.srcMacAddress_; - onChanged(); - } - if (!other.getDstMacAddress().isEmpty()) { - dstMacAddress_ = other.dstMacAddress_; - onChanged(); - } - if (other.getEtherType() != 0) { - setEtherType(other.getEtherType()); - } - if (other.getVlanId() != 0) { - setVlanId(other.getVlanId()); - } - if (other.getMplsLabel() != 0) { - setMplsLabel(other.getMplsLabel()); - } - if (other.getMplsTrafficClass() != 0) { - setMplsTrafficClass(other.getMplsTrafficClass()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings_L2) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object srcMacAddress_ = ""; - /** - * string src_mac_address = 1; - * @return The srcMacAddress. - */ - public java.lang.String getSrcMacAddress() { - java.lang.Object ref = srcMacAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - srcMacAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string src_mac_address = 1; - * @return The bytes for srcMacAddress. - */ - public com.google.protobuf.ByteString - getSrcMacAddressBytes() { - java.lang.Object ref = srcMacAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - srcMacAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string src_mac_address = 1; - * @param value The srcMacAddress to set. - * @return This builder for chaining. - */ - public Builder setSrcMacAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - srcMacAddress_ = value; - onChanged(); - return this; - } - /** - * string src_mac_address = 1; - * @return This builder for chaining. - */ - public Builder clearSrcMacAddress() { - - srcMacAddress_ = getDefaultInstance().getSrcMacAddress(); - onChanged(); - return this; - } - /** - * string src_mac_address = 1; - * @param value The bytes for srcMacAddress to set. - * @return This builder for chaining. - */ - public Builder setSrcMacAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - srcMacAddress_ = value; - onChanged(); - return this; - } - - private java.lang.Object dstMacAddress_ = ""; - /** - * string dst_mac_address = 2; - * @return The dstMacAddress. - */ - public java.lang.String getDstMacAddress() { - java.lang.Object ref = dstMacAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dstMacAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string dst_mac_address = 2; - * @return The bytes for dstMacAddress. - */ - public com.google.protobuf.ByteString - getDstMacAddressBytes() { - java.lang.Object ref = dstMacAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dstMacAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string dst_mac_address = 2; - * @param value The dstMacAddress to set. - * @return This builder for chaining. - */ - public Builder setDstMacAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dstMacAddress_ = value; - onChanged(); - return this; - } - /** - * string dst_mac_address = 2; - * @return This builder for chaining. - */ - public Builder clearDstMacAddress() { - - dstMacAddress_ = getDefaultInstance().getDstMacAddress(); - onChanged(); - return this; - } - /** - * string dst_mac_address = 2; - * @param value The bytes for dstMacAddress to set. - * @return This builder for chaining. - */ - public Builder setDstMacAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dstMacAddress_ = value; - onChanged(); - return this; - } - - private int etherType_ ; - /** - * uint32 ether_type = 3; - * @return The etherType. - */ - @java.lang.Override - public int getEtherType() { - return etherType_; - } - /** - * uint32 ether_type = 3; - * @param value The etherType to set. - * @return This builder for chaining. - */ - public Builder setEtherType(int value) { - - etherType_ = value; - onChanged(); - return this; - } - /** - * uint32 ether_type = 3; - * @return This builder for chaining. - */ - public Builder clearEtherType() { - - etherType_ = 0; - onChanged(); - return this; - } - - private int vlanId_ ; - /** - * uint32 vlan_id = 4; - * @return The vlanId. - */ - @java.lang.Override - public int getVlanId() { - return vlanId_; - } - /** - * uint32 vlan_id = 4; - * @param value The vlanId to set. - * @return This builder for chaining. - */ - public Builder setVlanId(int value) { - - vlanId_ = value; - onChanged(); - return this; - } - /** - * uint32 vlan_id = 4; - * @return This builder for chaining. - */ - public Builder clearVlanId() { - - vlanId_ = 0; - onChanged(); - return this; - } - - private int mplsLabel_ ; - /** - * uint32 mpls_label = 5; - * @return The mplsLabel. - */ - @java.lang.Override - public int getMplsLabel() { - return mplsLabel_; - } - /** - * uint32 mpls_label = 5; - * @param value The mplsLabel to set. - * @return This builder for chaining. - */ - public Builder setMplsLabel(int value) { - - mplsLabel_ = value; - onChanged(); - return this; - } - /** - * uint32 mpls_label = 5; - * @return This builder for chaining. - */ - public Builder clearMplsLabel() { - - mplsLabel_ = 0; - onChanged(); - return this; - } - - private int mplsTrafficClass_ ; - /** - * uint32 mpls_traffic_class = 6; - * @return The mplsTrafficClass. - */ - @java.lang.Override - public int getMplsTrafficClass() { - return mplsTrafficClass_; - } - /** - * uint32 mpls_traffic_class = 6; - * @param value The mplsTrafficClass to set. - * @return This builder for chaining. - */ - public Builder setMplsTrafficClass(int value) { - - mplsTrafficClass_ = value; - onChanged(); - return this; - } - /** - * uint32 mpls_traffic_class = 6; - * @return This builder for chaining. - */ - public Builder clearMplsTrafficClass() { - - mplsTrafficClass_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L2) - } + /** + * .context.Uuid optical_link_uuid = 1; + * @return Whether the opticalLinkUuid field is set. + */ + @java.lang.Override + public boolean hasOpticalLinkUuid() { + return opticalLinkUuid_ != null; + } - // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L2) - private static final context.ContextOuterClass.ConnectionSettings_L2 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L2(); - } + /** + * .context.Uuid optical_link_uuid = 1; + * @return The opticalLinkUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getOpticalLinkUuid() { + return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + } - public static context.ContextOuterClass.ConnectionSettings_L2 getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder() { + return getOpticalLinkUuid(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L2 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (opticalLinkUuid_ != null) { + output.writeMessage(1, getOpticalLinkUuid()); + } + unknownFields.writeTo(output); + } - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (opticalLinkUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpticalLinkUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public interface ConnectionSettings_L3OrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L3) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.OpticalLinkId)) { + return super.equals(obj); + } + context.ContextOuterClass.OpticalLinkId other = (context.ContextOuterClass.OpticalLinkId) obj; + if (hasOpticalLinkUuid() != other.hasOpticalLinkUuid()) + return false; + if (hasOpticalLinkUuid()) { + if (!getOpticalLinkUuid().equals(other.getOpticalLinkUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - /** - * string src_ip_address = 1; - * @return The srcIpAddress. - */ - java.lang.String getSrcIpAddress(); - /** - * string src_ip_address = 1; - * @return The bytes for srcIpAddress. - */ - com.google.protobuf.ByteString - getSrcIpAddressBytes(); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOpticalLinkUuid()) { + hash = (37 * hash) + OPTICAL_LINK_UUID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalLinkUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * string dst_ip_address = 2; - * @return The dstIpAddress. - */ - java.lang.String getDstIpAddress(); - /** - * string dst_ip_address = 2; - * @return The bytes for dstIpAddress. - */ - com.google.protobuf.ByteString - getDstIpAddressBytes(); + public static context.ContextOuterClass.OpticalLinkId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * uint32 dscp = 3; - * @return The dscp. - */ - int getDscp(); + public static context.ContextOuterClass.OpticalLinkId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * uint32 protocol = 4; - * @return The protocol. - */ - int getProtocol(); + public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * uint32 ttl = 5; - * @return The ttl. - */ - int getTtl(); - } - /** - * Protobuf type {@code context.ConnectionSettings_L3} - */ - public static final class ConnectionSettings_L3 extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L3) - ConnectionSettings_L3OrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionSettings_L3.newBuilder() to construct. - private ConnectionSettings_L3(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionSettings_L3() { - srcIpAddress_ = ""; - dstIpAddress_ = ""; - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionSettings_L3(); - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @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; - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L3.class, context.ContextOuterClass.ConnectionSettings_L3.Builder.class); - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static final int SRC_IP_ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object srcIpAddress_; - /** - * string src_ip_address = 1; - * @return The srcIpAddress. - */ - @java.lang.Override - public java.lang.String getSrcIpAddress() { - java.lang.Object ref = srcIpAddress_; - 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(); - srcIpAddress_ = s; - return s; - } - } - /** - * string src_ip_address = 1; - * @return The bytes for srcIpAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSrcIpAddressBytes() { - java.lang.Object ref = srcIpAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - srcIpAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public static final int DST_IP_ADDRESS_FIELD_NUMBER = 2; - private volatile java.lang.Object dstIpAddress_; - /** - * string dst_ip_address = 2; - * @return The dstIpAddress. - */ - @java.lang.Override - public java.lang.String getDstIpAddress() { - java.lang.Object ref = dstIpAddress_; - 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(); - dstIpAddress_ = s; - return s; - } - } - /** - * string dst_ip_address = 2; - * @return The bytes for dstIpAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDstIpAddressBytes() { - java.lang.Object ref = dstIpAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dstIpAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static context.ContextOuterClass.OpticalLinkId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - public static final int DSCP_FIELD_NUMBER = 3; - private int dscp_; - /** - * uint32 dscp = 3; - * @return The dscp. - */ - @java.lang.Override - public int getDscp() { - return dscp_; - } + public static context.ContextOuterClass.OpticalLinkId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - public static final int PROTOCOL_FIELD_NUMBER = 4; - private int protocol_; - /** - * uint32 protocol = 4; - * @return The protocol. - */ - @java.lang.Override - public int getProtocol() { - return protocol_; - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static final int TTL_FIELD_NUMBER = 5; - private int ttl_; - /** - * uint32 ttl = 5; - * @return The ttl. - */ - @java.lang.Override - public int getTtl() { - return ttl_; - } + public static context.ContextOuterClass.OpticalLinkId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - memoizedIsInitialized = 1; - return true; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSrcIpAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcIpAddress_); - } - if (!getDstIpAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstIpAddress_); - } - if (dscp_ != 0) { - output.writeUInt32(3, dscp_); - } - if (protocol_ != 0) { - output.writeUInt32(4, protocol_); - } - if (ttl_ != 0) { - output.writeUInt32(5, ttl_); - } - unknownFields.writeTo(output); - } + public static Builder newBuilder(context.ContextOuterClass.OpticalLinkId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSrcIpAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcIpAddress_); - } - if (!getDstIpAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstIpAddress_); - } - if (dscp_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, dscp_); - } - if (protocol_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, protocol_); - } - if (ttl_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, ttl_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L3)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionSettings_L3 other = (context.ContextOuterClass.ConnectionSettings_L3) obj; - - if (!getSrcIpAddress() - .equals(other.getSrcIpAddress())) return false; - if (!getDstIpAddress() - .equals(other.getDstIpAddress())) return false; - if (getDscp() - != other.getDscp()) return false; - if (getProtocol() - != other.getProtocol()) return false; - if (getTtl() - != other.getTtl()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SRC_IP_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getSrcIpAddress().hashCode(); - hash = (37 * hash) + DST_IP_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getDstIpAddress().hashCode(); - hash = (37 * hash) + DSCP_FIELD_NUMBER; - hash = (53 * hash) + getDscp(); - hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; - hash = (53 * hash) + getProtocol(); - hash = (37 * hash) + TTL_FIELD_NUMBER; - hash = (53 * hash) + getTtl(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * Protobuf type {@code context.OpticalLinkId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLinkId) + context.ContextOuterClass.OpticalLinkIdOrBuilder { - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L3 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L3 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLinkId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkId.class, context.ContextOuterClass.OpticalLinkId.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionSettings_L3} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L3) - context.ContextOuterClass.ConnectionSettings_L3OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L3.class, context.ContextOuterClass.ConnectionSettings_L3.Builder.class); - } - - // 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(); - srcIpAddress_ = ""; - - dstIpAddress_ = ""; - - dscp_ = 0; - - protocol_ = 0; - - ttl_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L3 getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L3 build() { - context.ContextOuterClass.ConnectionSettings_L3 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionSettings_L3) { - return mergeFrom((context.ContextOuterClass.ConnectionSettings_L3)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L3 other) { - if (other == context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance()) return this; - if (!other.getSrcIpAddress().isEmpty()) { - srcIpAddress_ = other.srcIpAddress_; - onChanged(); - } - if (!other.getDstIpAddress().isEmpty()) { - dstIpAddress_ = other.dstIpAddress_; - onChanged(); - } - if (other.getDscp() != 0) { - setDscp(other.getDscp()); - } - if (other.getProtocol() != 0) { - setProtocol(other.getProtocol()); - } - if (other.getTtl() != 0) { - setTtl(other.getTtl()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings_L3) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object srcIpAddress_ = ""; - /** - * string src_ip_address = 1; - * @return The srcIpAddress. - */ - public java.lang.String getSrcIpAddress() { - java.lang.Object ref = srcIpAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - srcIpAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string src_ip_address = 1; - * @return The bytes for srcIpAddress. - */ - public com.google.protobuf.ByteString - getSrcIpAddressBytes() { - java.lang.Object ref = srcIpAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - srcIpAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string src_ip_address = 1; - * @param value The srcIpAddress to set. - * @return This builder for chaining. - */ - public Builder setSrcIpAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - srcIpAddress_ = value; - onChanged(); - return this; - } - /** - * string src_ip_address = 1; - * @return This builder for chaining. - */ - public Builder clearSrcIpAddress() { - - srcIpAddress_ = getDefaultInstance().getSrcIpAddress(); - onChanged(); - return this; - } - /** - * string src_ip_address = 1; - * @param value The bytes for srcIpAddress to set. - * @return This builder for chaining. - */ - public Builder setSrcIpAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - srcIpAddress_ = value; - onChanged(); - return this; - } - - private java.lang.Object dstIpAddress_ = ""; - /** - * string dst_ip_address = 2; - * @return The dstIpAddress. - */ - public java.lang.String getDstIpAddress() { - java.lang.Object ref = dstIpAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dstIpAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string dst_ip_address = 2; - * @return The bytes for dstIpAddress. - */ - public com.google.protobuf.ByteString - getDstIpAddressBytes() { - java.lang.Object ref = dstIpAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dstIpAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string dst_ip_address = 2; - * @param value The dstIpAddress to set. - * @return This builder for chaining. - */ - public Builder setDstIpAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dstIpAddress_ = value; - onChanged(); - return this; - } - /** - * string dst_ip_address = 2; - * @return This builder for chaining. - */ - public Builder clearDstIpAddress() { - - dstIpAddress_ = getDefaultInstance().getDstIpAddress(); - onChanged(); - return this; - } - /** - * string dst_ip_address = 2; - * @param value The bytes for dstIpAddress to set. - * @return This builder for chaining. - */ - public Builder setDstIpAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dstIpAddress_ = value; - onChanged(); - return this; - } - - private int dscp_ ; - /** - * uint32 dscp = 3; - * @return The dscp. - */ - @java.lang.Override - public int getDscp() { - return dscp_; - } - /** - * uint32 dscp = 3; - * @param value The dscp to set. - * @return This builder for chaining. - */ - public Builder setDscp(int value) { - - dscp_ = value; - onChanged(); - return this; - } - /** - * uint32 dscp = 3; - * @return This builder for chaining. - */ - public Builder clearDscp() { - - dscp_ = 0; - onChanged(); - return this; - } - - private int protocol_ ; - /** - * uint32 protocol = 4; - * @return The protocol. - */ - @java.lang.Override - public int getProtocol() { - return protocol_; - } - /** - * uint32 protocol = 4; - * @param value The protocol to set. - * @return This builder for chaining. - */ - public Builder setProtocol(int value) { - - protocol_ = value; - onChanged(); - return this; - } - /** - * uint32 protocol = 4; - * @return This builder for chaining. - */ - public Builder clearProtocol() { - - protocol_ = 0; - onChanged(); - return this; - } - - private int ttl_ ; - /** - * uint32 ttl = 5; - * @return The ttl. - */ - @java.lang.Override - public int getTtl() { - return ttl_; - } - /** - * uint32 ttl = 5; - * @param value The ttl to set. - * @return This builder for chaining. - */ - public Builder setTtl(int value) { - - ttl_ = value; - onChanged(); - return this; - } - /** - * uint32 ttl = 5; - * @return This builder for chaining. - */ - public Builder clearTtl() { - - ttl_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L3) - } + // Construct using context.ContextOuterClass.OpticalLinkId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L3) - private static final context.ContextOuterClass.ConnectionSettings_L3 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L3(); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public static context.ContextOuterClass.ConnectionSettings_L3 getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuid_ = null; + } else { + opticalLinkUuid_ = null; + opticalLinkUuidBuilder_ = null; + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; + } - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L3 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public context.ContextOuterClass.OpticalLinkId getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalLinkId.getDefaultInstance(); + } - } + @java.lang.Override + public context.ContextOuterClass.OpticalLinkId build() { + context.ContextOuterClass.OpticalLinkId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public interface ConnectionSettings_L4OrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionSettings_L4) - com.google.protobuf.MessageOrBuilder { + @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(); + } + onBuilt(); + return result; + } - /** - * uint32 src_port = 1; - * @return The srcPort. - */ - int getSrcPort(); + @java.lang.Override + public Builder clone() { + return super.clone(); + } - /** - * uint32 dst_port = 2; - * @return The dstPort. - */ - int getDstPort(); + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - /** - * uint32 tcp_flags = 3; - * @return The tcpFlags. - */ - int getTcpFlags(); + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - /** - * uint32 ttl = 4; - * @return The ttl. - */ - int getTtl(); - } - /** - * Protobuf type {@code context.ConnectionSettings_L4} - */ - public static final class ConnectionSettings_L4 extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionSettings_L4) - ConnectionSettings_L4OrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionSettings_L4.newBuilder() to construct. - private ConnectionSettings_L4(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionSettings_L4() { - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionSettings_L4(); - } + @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 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; - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L4.class, context.ContextOuterClass.ConnectionSettings_L4.Builder.class); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalLinkId) { + return mergeFrom((context.ContextOuterClass.OpticalLinkId) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static final int SRC_PORT_FIELD_NUMBER = 1; - private int srcPort_; - /** - * uint32 src_port = 1; - * @return The srcPort. - */ - @java.lang.Override - public int getSrcPort() { - return srcPort_; - } + public Builder mergeFrom(context.ContextOuterClass.OpticalLinkId other) { + if (other == context.ContextOuterClass.OpticalLinkId.getDefaultInstance()) + return this; + if (other.hasOpticalLinkUuid()) { + mergeOpticalLinkUuid(other.getOpticalLinkUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - public static final int DST_PORT_FIELD_NUMBER = 2; - private int dstPort_; - /** - * uint32 dst_port = 2; - * @return The dstPort. - */ - @java.lang.Override - public int getDstPort() { - return dstPort_; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static final int TCP_FLAGS_FIELD_NUMBER = 3; - private int tcpFlags_; - /** - * uint32 tcp_flags = 3; - * @return The tcpFlags. - */ - @java.lang.Override - public int getTcpFlags() { - return tcpFlags_; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.OpticalLinkId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - public static final int TTL_FIELD_NUMBER = 4; - private int ttl_; - /** - * uint32 ttl = 4; - * @return The ttl. - */ - @java.lang.Override - public int getTtl() { - return ttl_; - } + private context.ContextOuterClass.Uuid opticalLinkUuid_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private com.google.protobuf.SingleFieldBuilderV3 opticalLinkUuidBuilder_; - memoizedIsInitialized = 1; - return true; - } + /** + * .context.Uuid optical_link_uuid = 1; + * @return Whether the opticalLinkUuid field is set. + */ + public boolean hasOpticalLinkUuid() { + return opticalLinkUuidBuilder_ != null || opticalLinkUuid_ != null; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (srcPort_ != 0) { - output.writeUInt32(1, srcPort_); - } - if (dstPort_ != 0) { - output.writeUInt32(2, dstPort_); - } - if (tcpFlags_ != 0) { - output.writeUInt32(3, tcpFlags_); - } - if (ttl_ != 0) { - output.writeUInt32(4, ttl_); - } - unknownFields.writeTo(output); - } + /** + * .context.Uuid optical_link_uuid = 1; + * @return The opticalLinkUuid. + */ + public context.ContextOuterClass.Uuid getOpticalLinkUuid() { + if (opticalLinkUuidBuilder_ == null) { + return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + } else { + return opticalLinkUuidBuilder_.getMessage(); + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (srcPort_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, srcPort_); - } - if (dstPort_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, dstPort_); - } - if (tcpFlags_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, tcpFlags_); - } - if (ttl_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, ttl_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + public Builder setOpticalLinkUuid(context.ContextOuterClass.Uuid value) { + if (opticalLinkUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + opticalLinkUuid_ = value; + onChanged(); + } else { + opticalLinkUuidBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionSettings_L4)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionSettings_L4 other = (context.ContextOuterClass.ConnectionSettings_L4) obj; - - if (getSrcPort() - != other.getSrcPort()) return false; - if (getDstPort() - != other.getDstPort()) return false; - if (getTcpFlags() - != other.getTcpFlags()) return false; - if (getTtl() - != other.getTtl()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + public Builder setOpticalLinkUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuid_ = builderForValue.build(); + onChanged(); + } else { + opticalLinkUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SRC_PORT_FIELD_NUMBER; - hash = (53 * hash) + getSrcPort(); - hash = (37 * hash) + DST_PORT_FIELD_NUMBER; - hash = (53 * hash) + getDstPort(); - hash = (37 * hash) + TCP_FLAGS_FIELD_NUMBER; - hash = (53 * hash) + getTcpFlags(); - hash = (37 * hash) + TTL_FIELD_NUMBER; - hash = (53 * hash) + getTtl(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + public Builder mergeOpticalLinkUuid(context.ContextOuterClass.Uuid value) { + if (opticalLinkUuidBuilder_ == null) { + if (opticalLinkUuid_ != null) { + opticalLinkUuid_ = context.ContextOuterClass.Uuid.newBuilder(opticalLinkUuid_).mergeFrom(value).buildPartial(); + } else { + opticalLinkUuid_ = value; + } + onChanged(); + } else { + opticalLinkUuidBuilder_.mergeFrom(value); + } + return this; + } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings_L4 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + public Builder clearOpticalLinkUuid() { + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuid_ = null; + onChanged(); + } else { + opticalLinkUuid_ = null; + opticalLinkUuidBuilder_ = null; + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings_L4 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getOpticalLinkUuidBuilder() { + onChanged(); + return getOpticalLinkUuidFieldBuilder().getBuilder(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionSettings_L4} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionSettings_L4) - context.ContextOuterClass.ConnectionSettings_L4OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings_L4.class, context.ContextOuterClass.ConnectionSettings_L4.Builder.class); - } - - // 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(); - srcPort_ = 0; - - dstPort_ = 0; - - tcpFlags_ = 0; - - ttl_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L4 getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L4 build() { - context.ContextOuterClass.ConnectionSettings_L4 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionSettings_L4) { - return mergeFrom((context.ContextOuterClass.ConnectionSettings_L4)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings_L4 other) { - if (other == context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance()) return this; - if (other.getSrcPort() != 0) { - setSrcPort(other.getSrcPort()); - } - if (other.getDstPort() != 0) { - setDstPort(other.getDstPort()); - } - if (other.getTcpFlags() != 0) { - setTcpFlags(other.getTcpFlags()); - } - if (other.getTtl() != 0) { - setTtl(other.getTtl()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings_L4) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int srcPort_ ; - /** - * uint32 src_port = 1; - * @return The srcPort. - */ - @java.lang.Override - public int getSrcPort() { - return srcPort_; - } - /** - * uint32 src_port = 1; - * @param value The srcPort to set. - * @return This builder for chaining. - */ - public Builder setSrcPort(int value) { - - srcPort_ = value; - onChanged(); - return this; - } - /** - * uint32 src_port = 1; - * @return This builder for chaining. - */ - public Builder clearSrcPort() { - - srcPort_ = 0; - onChanged(); - return this; - } - - private int dstPort_ ; - /** - * uint32 dst_port = 2; - * @return The dstPort. - */ - @java.lang.Override - public int getDstPort() { - return dstPort_; - } - /** - * uint32 dst_port = 2; - * @param value The dstPort to set. - * @return This builder for chaining. - */ - public Builder setDstPort(int value) { - - dstPort_ = value; - onChanged(); - return this; - } - /** - * uint32 dst_port = 2; - * @return This builder for chaining. - */ - public Builder clearDstPort() { - - dstPort_ = 0; - onChanged(); - return this; - } - - private int tcpFlags_ ; - /** - * uint32 tcp_flags = 3; - * @return The tcpFlags. - */ - @java.lang.Override - public int getTcpFlags() { - return tcpFlags_; - } - /** - * uint32 tcp_flags = 3; - * @param value The tcpFlags to set. - * @return This builder for chaining. - */ - public Builder setTcpFlags(int value) { - - tcpFlags_ = value; - onChanged(); - return this; - } - /** - * uint32 tcp_flags = 3; - * @return This builder for chaining. - */ - public Builder clearTcpFlags() { - - tcpFlags_ = 0; - onChanged(); - return this; - } - - private int ttl_ ; - /** - * uint32 ttl = 4; - * @return The ttl. - */ - @java.lang.Override - public int getTtl() { - return ttl_; - } - /** - * uint32 ttl = 4; - * @param value The ttl to set. - * @return This builder for chaining. - */ - public Builder setTtl(int value) { - - ttl_ = value; - onChanged(); - return this; - } - /** - * uint32 ttl = 4; - * @return This builder for chaining. - */ - public Builder clearTtl() { - - ttl_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionSettings_L4) - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder() { + if (opticalLinkUuidBuilder_ != null) { + return opticalLinkUuidBuilder_.getMessageOrBuilder(); + } else { + return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; + } + } - // @@protoc_insertion_point(class_scope:context.ConnectionSettings_L4) - private static final context.ContextOuterClass.ConnectionSettings_L4 DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings_L4(); - } + /** + * .context.Uuid optical_link_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getOpticalLinkUuidFieldBuilder() { + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalLinkUuid(), getParentForChildren(), isClean()); + opticalLinkUuid_ = null; + } + return opticalLinkUuidBuilder_; + } - public static context.ContextOuterClass.ConnectionSettings_L4 getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.OpticalLinkId) + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + // @@protoc_insertion_point(class_scope:context.OpticalLinkId) + private static final context.ContextOuterClass.OpticalLinkId DEFAULT_INSTANCE; - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L4 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLinkId(); + } - } + public static context.ContextOuterClass.OpticalLinkId getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public interface ConnectionSettingsOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionSettings) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - /** - * .context.ConnectionSettings_L0 l0 = 1; - * @return Whether the l0 field is set. - */ - boolean hasL0(); - /** - * .context.ConnectionSettings_L0 l0 = 1; - * @return The l0. - */ - context.ContextOuterClass.ConnectionSettings_L0 getL0(); - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder(); + @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); + } + }; - /** - * .context.ConnectionSettings_L2 l2 = 2; - * @return Whether the l2 field is set. - */ - boolean hasL2(); - /** - * .context.ConnectionSettings_L2 l2 = 2; - * @return The l2. - */ - context.ContextOuterClass.ConnectionSettings_L2 getL2(); - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder(); + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * .context.ConnectionSettings_L3 l3 = 3; - * @return Whether the l3 field is set. - */ - boolean hasL3(); - /** - * .context.ConnectionSettings_L3 l3 = 3; - * @return The l3. - */ - context.ContextOuterClass.ConnectionSettings_L3 getL3(); - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder(); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * .context.ConnectionSettings_L4 l4 = 4; - * @return Whether the l4 field is set. - */ - boolean hasL4(); - /** - * .context.ConnectionSettings_L4 l4 = 4; - * @return The l4. - */ - context.ContextOuterClass.ConnectionSettings_L4 getL4(); - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder(); - } - /** - * Protobuf type {@code context.ConnectionSettings} - */ - public static final class ConnectionSettings extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionSettings) - ConnectionSettingsOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionSettings.newBuilder() to construct. - private ConnectionSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionSettings() { + @java.lang.Override + public context.ContextOuterClass.OpticalLinkId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionSettings(); - } + public interface FiberIdOrBuilder extends // @@protoc_insertion_point(interface_extends:context.FiberId) + com.google.protobuf.MessageOrBuilder { - @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; - } + /** + * .context.Uuid fiber_uuid = 1; + * @return Whether the fiberUuid field is set. + */ + boolean hasFiberUuid(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings.class, context.ContextOuterClass.ConnectionSettings.Builder.class); - } + /** + * .context.Uuid fiber_uuid = 1; + * @return The fiberUuid. + */ + context.ContextOuterClass.Uuid getFiberUuid(); - public static final int L0_FIELD_NUMBER = 1; - private context.ContextOuterClass.ConnectionSettings_L0 l0_; - /** - * .context.ConnectionSettings_L0 l0 = 1; - * @return Whether the l0 field is set. - */ - @java.lang.Override - public boolean hasL0() { - return l0_ != null; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - * @return The l0. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L0 getL0() { - return l0_ == null ? context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder() { - return getL0(); + /** + * .context.Uuid fiber_uuid = 1; + */ + context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder(); } - public static final int L2_FIELD_NUMBER = 2; - private context.ContextOuterClass.ConnectionSettings_L2 l2_; - /** - * .context.ConnectionSettings_L2 l2 = 2; - * @return Whether the l2 field is set. - */ - @java.lang.Override - public boolean hasL2() { - return l2_ != null; - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - * @return The l2. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L2 getL2() { - return l2_ == null ? context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; - } /** - * .context.ConnectionSettings_L2 l2 = 2; + * Protobuf type {@code context.FiberId} */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder() { - return getL2(); - } + public static final class FiberId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.FiberId) + FiberIdOrBuilder { - public static final int L3_FIELD_NUMBER = 3; - private context.ContextOuterClass.ConnectionSettings_L3 l3_; - /** - * .context.ConnectionSettings_L3 l3 = 3; - * @return Whether the l3 field is set. - */ - @java.lang.Override - public boolean hasL3() { - return l3_ != null; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - * @return The l3. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L3 getL3() { - return l3_ == null ? context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder() { - return getL3(); - } + private static final long serialVersionUID = 0L; - public static final int L4_FIELD_NUMBER = 4; - private context.ContextOuterClass.ConnectionSettings_L4 l4_; - /** - * .context.ConnectionSettings_L4 l4 = 4; - * @return Whether the l4 field is set. - */ - @java.lang.Override - public boolean hasL4() { - return l4_ != null; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - * @return The l4. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L4 getL4() { - return l4_ == null ? context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder() { - return getL4(); - } + // Use FiberId.newBuilder() to construct. + private FiberId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private FiberId() { + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FiberId(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (l0_ != null) { - output.writeMessage(1, getL0()); - } - if (l2_ != null) { - output.writeMessage(2, getL2()); - } - if (l3_ != null) { - output.writeMessage(3, getL3()); - } - if (l4_ != null) { - output.writeMessage(4, getL4()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (l0_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getL0()); - } - if (l2_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getL2()); - } - if (l3_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getL3()); - } - if (l4_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getL4()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + 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(); + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionSettings)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionSettings other = (context.ContextOuterClass.ConnectionSettings) obj; - - if (hasL0() != other.hasL0()) return false; - if (hasL0()) { - if (!getL0() - .equals(other.getL0())) return false; - } - if (hasL2() != other.hasL2()) return false; - if (hasL2()) { - if (!getL2() - .equals(other.getL2())) return false; - } - if (hasL3() != other.hasL3()) return false; - if (hasL3()) { - if (!getL3() - .equals(other.getL3())) return false; - } - if (hasL4() != other.hasL4()) return false; - if (hasL4()) { - if (!getL4() - .equals(other.getL4())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_FiberId_descriptor; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasL0()) { - hash = (37 * hash) + L0_FIELD_NUMBER; - hash = (53 * hash) + getL0().hashCode(); - } - if (hasL2()) { - hash = (37 * hash) + L2_FIELD_NUMBER; - hash = (53 * hash) + getL2().hashCode(); - } - if (hasL3()) { - hash = (37 * hash) + L3_FIELD_NUMBER; - hash = (53 * hash) + getL3().hashCode(); - } - if (hasL4()) { - hash = (37 * hash) + L4_FIELD_NUMBER; - hash = (53 * hash) + getL4().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_FiberId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.FiberId.class, context.ContextOuterClass.FiberId.Builder.class); + } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionSettings parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int FIBER_UUID_FIELD_NUMBER = 1; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionSettings prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private context.ContextOuterClass.Uuid fiberUuid_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionSettings} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionSettings) - context.ContextOuterClass.ConnectionSettingsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionSettings.class, context.ContextOuterClass.ConnectionSettings.Builder.class); - } - - // 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; - l0Builder_ = null; - } - if (l2Builder_ == null) { - l2_ = null; - } else { - l2_ = null; - l2Builder_ = null; - } - if (l3Builder_ == null) { - l3_ = null; - } else { - l3_ = null; - l3Builder_ = null; - } - if (l4Builder_ == null) { - l4_ = null; - } else { - l4_ = null; - l4Builder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionSettings_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionSettings.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings build() { - context.ContextOuterClass.ConnectionSettings result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionSettings) { - return mergeFrom((context.ContextOuterClass.ConnectionSettings)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionSettings other) { - if (other == context.ContextOuterClass.ConnectionSettings.getDefaultInstance()) return this; - if (other.hasL0()) { - mergeL0(other.getL0()); - } - if (other.hasL2()) { - mergeL2(other.getL2()); - } - if (other.hasL3()) { - mergeL3(other.getL3()); - } - if (other.hasL4()) { - mergeL4(other.getL4()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - 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_; - /** - * .context.ConnectionSettings_L0 l0 = 1; - * @return Whether the l0 field is set. - */ - public boolean hasL0() { - return l0Builder_ != null || l0_ != null; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - * @return The l0. - */ - public context.ContextOuterClass.ConnectionSettings_L0 getL0() { - if (l0Builder_ == null) { - return l0_ == null ? context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; - } else { - return l0Builder_.getMessage(); - } - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - public Builder setL0(context.ContextOuterClass.ConnectionSettings_L0 value) { - if (l0Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - l0_ = value; - onChanged(); - } else { - l0Builder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - public Builder setL0( - context.ContextOuterClass.ConnectionSettings_L0.Builder builderForValue) { - if (l0Builder_ == null) { - l0_ = builderForValue.build(); - onChanged(); - } else { - l0Builder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - public Builder mergeL0(context.ContextOuterClass.ConnectionSettings_L0 value) { - if (l0Builder_ == null) { - if (l0_ != null) { - l0_ = - context.ContextOuterClass.ConnectionSettings_L0.newBuilder(l0_).mergeFrom(value).buildPartial(); - } else { - l0_ = value; - } - onChanged(); - } else { - l0Builder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - public Builder clearL0() { - if (l0Builder_ == null) { - l0_ = null; - onChanged(); - } else { - l0_ = null; - l0Builder_ = null; - } - - return this; - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - public context.ContextOuterClass.ConnectionSettings_L0.Builder getL0Builder() { - - onChanged(); - return getL0FieldBuilder().getBuilder(); - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - public context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder() { - if (l0Builder_ != null) { - return l0Builder_.getMessageOrBuilder(); - } else { - return l0_ == null ? - context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; - } - } - /** - * .context.ConnectionSettings_L0 l0 = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L0, context.ContextOuterClass.ConnectionSettings_L0.Builder, context.ContextOuterClass.ConnectionSettings_L0OrBuilder> - getL0FieldBuilder() { - if (l0Builder_ == null) { - l0Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L0, context.ContextOuterClass.ConnectionSettings_L0.Builder, context.ContextOuterClass.ConnectionSettings_L0OrBuilder>( - getL0(), - getParentForChildren(), - isClean()); - l0_ = null; - } - return l0Builder_; - } - - private context.ContextOuterClass.ConnectionSettings_L2 l2_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L2, context.ContextOuterClass.ConnectionSettings_L2.Builder, context.ContextOuterClass.ConnectionSettings_L2OrBuilder> l2Builder_; - /** - * .context.ConnectionSettings_L2 l2 = 2; - * @return Whether the l2 field is set. - */ - public boolean hasL2() { - return l2Builder_ != null || l2_ != null; - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - * @return The l2. - */ - public context.ContextOuterClass.ConnectionSettings_L2 getL2() { - if (l2Builder_ == null) { - return l2_ == null ? context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; - } else { - return l2Builder_.getMessage(); - } - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - public Builder setL2(context.ContextOuterClass.ConnectionSettings_L2 value) { - if (l2Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - l2_ = value; - onChanged(); - } else { - l2Builder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - public Builder setL2( - context.ContextOuterClass.ConnectionSettings_L2.Builder builderForValue) { - if (l2Builder_ == null) { - l2_ = builderForValue.build(); - onChanged(); - } else { - l2Builder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - public Builder mergeL2(context.ContextOuterClass.ConnectionSettings_L2 value) { - if (l2Builder_ == null) { - if (l2_ != null) { - l2_ = - context.ContextOuterClass.ConnectionSettings_L2.newBuilder(l2_).mergeFrom(value).buildPartial(); - } else { - l2_ = value; - } - onChanged(); - } else { - l2Builder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - public Builder clearL2() { - if (l2Builder_ == null) { - l2_ = null; - onChanged(); - } else { - l2_ = null; - l2Builder_ = null; - } - - return this; - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - public context.ContextOuterClass.ConnectionSettings_L2.Builder getL2Builder() { - - onChanged(); - return getL2FieldBuilder().getBuilder(); - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - public context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder() { - if (l2Builder_ != null) { - return l2Builder_.getMessageOrBuilder(); - } else { - return l2_ == null ? - context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; - } - } - /** - * .context.ConnectionSettings_L2 l2 = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L2, context.ContextOuterClass.ConnectionSettings_L2.Builder, context.ContextOuterClass.ConnectionSettings_L2OrBuilder> - getL2FieldBuilder() { - if (l2Builder_ == null) { - l2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L2, context.ContextOuterClass.ConnectionSettings_L2.Builder, context.ContextOuterClass.ConnectionSettings_L2OrBuilder>( - getL2(), - getParentForChildren(), - isClean()); - l2_ = null; - } - return l2Builder_; - } - - private context.ContextOuterClass.ConnectionSettings_L3 l3_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L3, context.ContextOuterClass.ConnectionSettings_L3.Builder, context.ContextOuterClass.ConnectionSettings_L3OrBuilder> l3Builder_; - /** - * .context.ConnectionSettings_L3 l3 = 3; - * @return Whether the l3 field is set. - */ - public boolean hasL3() { - return l3Builder_ != null || l3_ != null; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - * @return The l3. - */ - public context.ContextOuterClass.ConnectionSettings_L3 getL3() { - if (l3Builder_ == null) { - return l3_ == null ? context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; - } else { - return l3Builder_.getMessage(); - } - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - public Builder setL3(context.ContextOuterClass.ConnectionSettings_L3 value) { - if (l3Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - l3_ = value; - onChanged(); - } else { - l3Builder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - public Builder setL3( - context.ContextOuterClass.ConnectionSettings_L3.Builder builderForValue) { - if (l3Builder_ == null) { - l3_ = builderForValue.build(); - onChanged(); - } else { - l3Builder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - public Builder mergeL3(context.ContextOuterClass.ConnectionSettings_L3 value) { - if (l3Builder_ == null) { - if (l3_ != null) { - l3_ = - context.ContextOuterClass.ConnectionSettings_L3.newBuilder(l3_).mergeFrom(value).buildPartial(); - } else { - l3_ = value; - } - onChanged(); - } else { - l3Builder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - public Builder clearL3() { - if (l3Builder_ == null) { - l3_ = null; - onChanged(); - } else { - l3_ = null; - l3Builder_ = null; - } - - return this; - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - public context.ContextOuterClass.ConnectionSettings_L3.Builder getL3Builder() { - - onChanged(); - return getL3FieldBuilder().getBuilder(); - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - public context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder() { - if (l3Builder_ != null) { - return l3Builder_.getMessageOrBuilder(); - } else { - return l3_ == null ? - context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; - } - } - /** - * .context.ConnectionSettings_L3 l3 = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L3, context.ContextOuterClass.ConnectionSettings_L3.Builder, context.ContextOuterClass.ConnectionSettings_L3OrBuilder> - getL3FieldBuilder() { - if (l3Builder_ == null) { - l3Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L3, context.ContextOuterClass.ConnectionSettings_L3.Builder, context.ContextOuterClass.ConnectionSettings_L3OrBuilder>( - getL3(), - getParentForChildren(), - isClean()); - l3_ = null; - } - return l3Builder_; - } - - private context.ContextOuterClass.ConnectionSettings_L4 l4_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L4, context.ContextOuterClass.ConnectionSettings_L4.Builder, context.ContextOuterClass.ConnectionSettings_L4OrBuilder> l4Builder_; - /** - * .context.ConnectionSettings_L4 l4 = 4; - * @return Whether the l4 field is set. - */ - public boolean hasL4() { - return l4Builder_ != null || l4_ != null; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - * @return The l4. - */ - public context.ContextOuterClass.ConnectionSettings_L4 getL4() { - if (l4Builder_ == null) { - return l4_ == null ? context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; - } else { - return l4Builder_.getMessage(); - } - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - public Builder setL4(context.ContextOuterClass.ConnectionSettings_L4 value) { - if (l4Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - l4_ = value; - onChanged(); - } else { - l4Builder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - public Builder setL4( - context.ContextOuterClass.ConnectionSettings_L4.Builder builderForValue) { - if (l4Builder_ == null) { - l4_ = builderForValue.build(); - onChanged(); - } else { - l4Builder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - public Builder mergeL4(context.ContextOuterClass.ConnectionSettings_L4 value) { - if (l4Builder_ == null) { - if (l4_ != null) { - l4_ = - context.ContextOuterClass.ConnectionSettings_L4.newBuilder(l4_).mergeFrom(value).buildPartial(); - } else { - l4_ = value; - } - onChanged(); - } else { - l4Builder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - public Builder clearL4() { - if (l4Builder_ == null) { - l4_ = null; - onChanged(); - } else { - l4_ = null; - l4Builder_ = null; - } - - return this; - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - public context.ContextOuterClass.ConnectionSettings_L4.Builder getL4Builder() { - - onChanged(); - return getL4FieldBuilder().getBuilder(); - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - public context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder() { - if (l4Builder_ != null) { - return l4Builder_.getMessageOrBuilder(); - } else { - return l4_ == null ? - context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; - } - } - /** - * .context.ConnectionSettings_L4 l4 = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L4, context.ContextOuterClass.ConnectionSettings_L4.Builder, context.ContextOuterClass.ConnectionSettings_L4OrBuilder> - getL4FieldBuilder() { - if (l4Builder_ == null) { - l4Builder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings_L4, context.ContextOuterClass.ConnectionSettings_L4.Builder, context.ContextOuterClass.ConnectionSettings_L4OrBuilder>( - getL4(), - getParentForChildren(), - isClean()); - l4_ = null; - } - return l4Builder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionSettings) - } + /** + * .context.Uuid fiber_uuid = 1; + * @return Whether the fiberUuid field is set. + */ + @java.lang.Override + public boolean hasFiberUuid() { + return fiberUuid_ != null; + } - // @@protoc_insertion_point(class_scope:context.ConnectionSettings) - private static final context.ContextOuterClass.ConnectionSettings DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionSettings(); - } + /** + * .context.Uuid fiber_uuid = 1; + * @return The fiberUuid. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getFiberUuid() { + return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + } - public static context.ContextOuterClass.ConnectionSettings getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid fiber_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder() { + return getFiberUuid(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (fiberUuid_ != null) { + output.writeMessage(1, getFiberUuid()); + } + unknownFields.writeTo(output); + } - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (fiberUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFiberUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public interface ConnectionOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Connection) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.FiberId)) { + return super.equals(obj); + } + context.ContextOuterClass.FiberId other = (context.ContextOuterClass.FiberId) obj; + if (hasFiberUuid() != other.hasFiberUuid()) + return false; + if (hasFiberUuid()) { + if (!getFiberUuid().equals(other.getFiberUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - /** - * .context.ConnectionId connection_id = 1; - * @return Whether the connectionId field is set. - */ - boolean hasConnectionId(); - /** - * .context.ConnectionId connection_id = 1; - * @return The connectionId. - */ - context.ContextOuterClass.ConnectionId getConnectionId(); - /** - * .context.ConnectionId connection_id = 1; - */ - context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFiberUuid()) { + hash = (37 * hash) + FIBER_UUID_FIELD_NUMBER; + hash = (53 * hash) + getFiberUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * .context.ServiceId service_id = 2; - * @return Whether the serviceId field is set. - */ - boolean hasServiceId(); - /** - * .context.ServiceId service_id = 2; - * @return The serviceId. - */ - context.ContextOuterClass.ServiceId getServiceId(); - /** - * .context.ServiceId service_id = 2; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + public static context.ContextOuterClass.FiberId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - java.util.List - getPathHopsEndpointIdsList(); - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointId getPathHopsEndpointIds(int index); - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - int getPathHopsEndpointIdsCount(); - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - java.util.List - getPathHopsEndpointIdsOrBuilderList(); - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointIdOrBuilder getPathHopsEndpointIdsOrBuilder( - int index); + public static context.ContextOuterClass.FiberId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - java.util.List - getSubServiceIdsList(); - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - context.ContextOuterClass.ServiceId getSubServiceIds(int index); - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - int getSubServiceIdsCount(); - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - java.util.List - getSubServiceIdsOrBuilderList(); - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - context.ContextOuterClass.ServiceIdOrBuilder getSubServiceIdsOrBuilder( - int index); + public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * .context.ConnectionSettings settings = 5; - * @return Whether the settings field is set. - */ - boolean hasSettings(); - /** - * .context.ConnectionSettings settings = 5; - * @return The settings. - */ - context.ContextOuterClass.ConnectionSettings getSettings(); - /** - * .context.ConnectionSettings settings = 5; - */ - context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder(); - } - /** - * Protobuf type {@code context.Connection} - */ - public static final class Connection extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Connection) - ConnectionOrBuilder { - private static final long serialVersionUID = 0L; - // Use Connection.newBuilder() to construct. - private Connection(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Connection() { - pathHopsEndpointIds_ = java.util.Collections.emptyList(); - subServiceIds_ = java.util.Collections.emptyList(); - } + public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Connection(); - } + public static context.ContextOuterClass.FiberId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @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(); - 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(); - 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; - } + public static context.ContextOuterClass.FiberId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Connection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Connection.class, context.ContextOuterClass.Connection.Builder.class); - } + public static context.ContextOuterClass.FiberId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.FiberId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.FiberId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - public static final int CONNECTION_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ConnectionId connectionId_; - /** - * .context.ConnectionId connection_id = 1; - * @return Whether the connectionId field is set. - */ - @java.lang.Override - public boolean hasConnectionId() { - return connectionId_ != null; - } - /** - * .context.ConnectionId connection_id = 1; - * @return The connectionId. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionId getConnectionId() { - return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } - /** - * .context.ConnectionId connection_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - return getConnectionId(); - } + public static context.ContextOuterClass.FiberId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - public static final int SERVICE_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.ServiceId serviceId_; - /** - * .context.ServiceId service_id = 2; - * @return Whether the serviceId field is set. - */ - @java.lang.Override - public boolean hasServiceId() { - return serviceId_ != null; - } - /** - * .context.ServiceId service_id = 2; - * @return The serviceId. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceId() { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - /** - * .context.ServiceId service_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); - } + public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static final int PATH_HOPS_ENDPOINT_IDS_FIELD_NUMBER = 3; - private java.util.List pathHopsEndpointIds_; - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List getPathHopsEndpointIdsList() { - return pathHopsEndpointIds_; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List - getPathHopsEndpointIdsOrBuilderList() { - return pathHopsEndpointIds_; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - @java.lang.Override - public int getPathHopsEndpointIdsCount() { - return pathHopsEndpointIds_.size(); - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getPathHopsEndpointIds(int index) { - return pathHopsEndpointIds_.get(index); - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getPathHopsEndpointIdsOrBuilder( - int index) { - return pathHopsEndpointIds_.get(index); - } + public static context.ContextOuterClass.FiberId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public static final int SUB_SERVICE_IDS_FIELD_NUMBER = 4; - private java.util.List subServiceIds_; - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - @java.lang.Override - public java.util.List getSubServiceIdsList() { - return subServiceIds_; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - @java.lang.Override - public java.util.List - getSubServiceIdsOrBuilderList() { - return subServiceIds_; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - @java.lang.Override - public int getSubServiceIdsCount() { - return subServiceIds_.size(); - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getSubServiceIds(int index) { - return subServiceIds_.get(index); - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getSubServiceIdsOrBuilder( - int index) { - return subServiceIds_.get(index); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static final int SETTINGS_FIELD_NUMBER = 5; - private context.ContextOuterClass.ConnectionSettings settings_; - /** - * .context.ConnectionSettings settings = 5; - * @return Whether the settings field is set. - */ - @java.lang.Override - public boolean hasSettings() { - return settings_ != null; - } - /** - * .context.ConnectionSettings settings = 5; - * @return The settings. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettings getSettings() { - return settings_ == null ? context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; - } - /** - * .context.ConnectionSettings settings = 5; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder() { - return getSettings(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static Builder newBuilder(context.ContextOuterClass.FiberId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (connectionId_ != null) { - output.writeMessage(1, getConnectionId()); - } - if (serviceId_ != null) { - output.writeMessage(2, getServiceId()); - } - for (int i = 0; i < pathHopsEndpointIds_.size(); i++) { - output.writeMessage(3, pathHopsEndpointIds_.get(i)); - } - for (int i = 0; i < subServiceIds_.size(); i++) { - output.writeMessage(4, subServiceIds_.get(i)); - } - if (settings_ != null) { - output.writeMessage(5, getSettings()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (connectionId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getConnectionId()); - } - if (serviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getServiceId()); - } - for (int i = 0; i < pathHopsEndpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, pathHopsEndpointIds_.get(i)); - } - for (int i = 0; i < subServiceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, subServiceIds_.get(i)); - } - if (settings_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getSettings()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * Protobuf type {@code context.FiberId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.FiberId) + context.ContextOuterClass.FiberIdOrBuilder { - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Connection)) { - return super.equals(obj); - } - context.ContextOuterClass.Connection other = (context.ContextOuterClass.Connection) obj; - - if (hasConnectionId() != other.hasConnectionId()) return false; - if (hasConnectionId()) { - if (!getConnectionId() - .equals(other.getConnectionId())) return false; - } - if (hasServiceId() != other.hasServiceId()) return false; - if (hasServiceId()) { - if (!getServiceId() - .equals(other.getServiceId())) return false; - } - if (!getPathHopsEndpointIdsList() - .equals(other.getPathHopsEndpointIdsList())) return false; - if (!getSubServiceIdsList() - .equals(other.getSubServiceIdsList())) return false; - if (hasSettings() != other.hasSettings()) return false; - if (hasSettings()) { - if (!getSettings() - .equals(other.getSettings())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_FiberId_descriptor; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConnectionId()) { - hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; - hash = (53 * hash) + getConnectionId().hashCode(); - } - if (hasServiceId()) { - hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); - } - if (getPathHopsEndpointIdsCount() > 0) { - hash = (37 * hash) + PATH_HOPS_ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getPathHopsEndpointIdsList().hashCode(); - } - if (getSubServiceIdsCount() > 0) { - hash = (37 * hash) + SUB_SERVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSubServiceIdsList().hashCode(); - } - if (hasSettings()) { - hash = (37 * hash) + SETTINGS_FIELD_NUMBER; - hash = (53 * hash) + getSettings().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_FiberId_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.FiberId.class, context.ContextOuterClass.FiberId.Builder.class); + } - public static context.ContextOuterClass.Connection parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Connection parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Connection parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Connection parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Connection parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Connection parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Connection parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Connection parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Connection parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Connection parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Connection parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Connection parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + // Construct using context.ContextOuterClass.FiberId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Connection prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Connection} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Connection) - context.ContextOuterClass.ConnectionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Connection_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Connection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Connection.class, context.ContextOuterClass.Connection.Builder.class); - } - - // 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; - connectionIdBuilder_ = null; - } - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - if (pathHopsEndpointIdsBuilder_ == null) { - pathHopsEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - pathHopsEndpointIdsBuilder_.clear(); - } - if (subServiceIdsBuilder_ == null) { - subServiceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - subServiceIdsBuilder_.clear(); - } - if (settingsBuilder_ == null) { - settings_ = null; - } else { - settings_ = null; - settingsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Connection_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Connection getDefaultInstanceForType() { - return context.ContextOuterClass.Connection.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Connection build() { - context.ContextOuterClass.Connection result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - if (pathHopsEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - pathHopsEndpointIds_ = java.util.Collections.unmodifiableList(pathHopsEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.pathHopsEndpointIds_ = pathHopsEndpointIds_; - } else { - result.pathHopsEndpointIds_ = pathHopsEndpointIdsBuilder_.build(); - } - if (subServiceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - subServiceIds_ = java.util.Collections.unmodifiableList(subServiceIds_); - bitField0_ = (bitField0_ & ~0x00000002); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Connection) { - return mergeFrom((context.ContextOuterClass.Connection)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Connection other) { - if (other == context.ContextOuterClass.Connection.getDefaultInstance()) return this; - if (other.hasConnectionId()) { - mergeConnectionId(other.getConnectionId()); - } - if (other.hasServiceId()) { - mergeServiceId(other.getServiceId()); - } - if (pathHopsEndpointIdsBuilder_ == null) { - if (!other.pathHopsEndpointIds_.isEmpty()) { - if (pathHopsEndpointIds_.isEmpty()) { - pathHopsEndpointIds_ = other.pathHopsEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.addAll(other.pathHopsEndpointIds_); - } - onChanged(); - } - } else { - if (!other.pathHopsEndpointIds_.isEmpty()) { - if (pathHopsEndpointIdsBuilder_.isEmpty()) { - pathHopsEndpointIdsBuilder_.dispose(); - pathHopsEndpointIdsBuilder_ = null; - pathHopsEndpointIds_ = other.pathHopsEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - pathHopsEndpointIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPathHopsEndpointIdsFieldBuilder() : null; - } else { - pathHopsEndpointIdsBuilder_.addAllMessages(other.pathHopsEndpointIds_); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } } - } - } - if (subServiceIdsBuilder_ == null) { - if (!other.subServiceIds_.isEmpty()) { - if (subServiceIds_.isEmpty()) { - subServiceIds_ = other.subServiceIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSubServiceIdsIsMutable(); - subServiceIds_.addAll(other.subServiceIds_); - } - onChanged(); - } - } else { - if (!other.subServiceIds_.isEmpty()) { - if (subServiceIdsBuilder_.isEmpty()) { - subServiceIdsBuilder_.dispose(); - subServiceIdsBuilder_ = null; - subServiceIds_ = other.subServiceIds_; - bitField0_ = (bitField0_ & ~0x00000002); - subServiceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubServiceIdsFieldBuilder() : null; - } else { - subServiceIdsBuilder_.addAllMessages(other.subServiceIds_); - } - } - } - if (other.hasSettings()) { - mergeSettings(other.getSettings()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Connection) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private context.ContextOuterClass.ConnectionId connectionId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> connectionIdBuilder_; - /** - * .context.ConnectionId connection_id = 1; - * @return Whether the connectionId field is set. - */ - public boolean hasConnectionId() { - return connectionIdBuilder_ != null || connectionId_ != null; - } - /** - * .context.ConnectionId connection_id = 1; - * @return The connectionId. - */ - public context.ContextOuterClass.ConnectionId getConnectionId() { - if (connectionIdBuilder_ == null) { - return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } else { - return connectionIdBuilder_.getMessage(); - } - } - /** - * .context.ConnectionId connection_id = 1; - */ - public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { - if (connectionIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - connectionId_ = value; - onChanged(); - } else { - connectionIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 1; - */ - public Builder setConnectionId( - context.ContextOuterClass.ConnectionId.Builder builderForValue) { - if (connectionIdBuilder_ == null) { - connectionId_ = builderForValue.build(); - onChanged(); - } else { - connectionIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 1; - */ - public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { - if (connectionIdBuilder_ == null) { - if (connectionId_ != null) { - connectionId_ = - context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); - } else { - connectionId_ = value; - } - onChanged(); - } else { - connectionIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 1; - */ - public Builder clearConnectionId() { - if (connectionIdBuilder_ == null) { - connectionId_ = null; - onChanged(); - } else { - connectionId_ = null; - connectionIdBuilder_ = null; - } - - return this; - } - /** - * .context.ConnectionId connection_id = 1; - */ - public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { - - onChanged(); - return getConnectionIdFieldBuilder().getBuilder(); - } - /** - * .context.ConnectionId connection_id = 1; - */ - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - if (connectionIdBuilder_ != null) { - return connectionIdBuilder_.getMessageOrBuilder(); - } else { - return connectionId_ == null ? - context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } - } - /** - * .context.ConnectionId connection_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> - getConnectionIdFieldBuilder() { - if (connectionIdBuilder_ == null) { - connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder>( - getConnectionId(), - getParentForChildren(), - isClean()); - connectionId_ = null; - } - return connectionIdBuilder_; - } - - private context.ContextOuterClass.ServiceId serviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdBuilder_; - /** - * .context.ServiceId service_id = 2; - * @return Whether the serviceId field is set. - */ - public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; - } - /** - * .context.ServiceId service_id = 2; - * @return The serviceId. - */ - public context.ContextOuterClass.ServiceId getServiceId() { - if (serviceIdBuilder_ == null) { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } else { - return serviceIdBuilder_.getMessage(); - } - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder setServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - onChanged(); - } else { - serviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder setServiceId( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdBuilder_ == null) { - serviceId_ = builderForValue.build(); - onChanged(); - } else { - serviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = - context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); - } else { - serviceId_ = value; - } - onChanged(); - } else { - serviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceId service_id = 2; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { - - onChanged(); - return getServiceIdFieldBuilder().getBuilder(); - } - /** - * .context.ServiceId service_id = 2; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - if (serviceIdBuilder_ != null) { - return serviceIdBuilder_.getMessageOrBuilder(); - } else { - return serviceId_ == null ? - context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - } - /** - * .context.ServiceId service_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> - getServiceIdFieldBuilder() { - if (serviceIdBuilder_ == null) { - serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>( - getServiceId(), - getParentForChildren(), - isClean()); - serviceId_ = null; - } - return serviceIdBuilder_; - } - - private java.util.List pathHopsEndpointIds_ = - java.util.Collections.emptyList(); - private void ensurePathHopsEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - pathHopsEndpointIds_ = new java.util.ArrayList(pathHopsEndpointIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> pathHopsEndpointIdsBuilder_; - - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public java.util.List getPathHopsEndpointIdsList() { - if (pathHopsEndpointIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(pathHopsEndpointIds_); - } else { - return pathHopsEndpointIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public int getPathHopsEndpointIdsCount() { - if (pathHopsEndpointIdsBuilder_ == null) { - return pathHopsEndpointIds_.size(); - } else { - return pathHopsEndpointIdsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId getPathHopsEndpointIds(int index) { - if (pathHopsEndpointIdsBuilder_ == null) { - return pathHopsEndpointIds_.get(index); - } else { - return pathHopsEndpointIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder setPathHopsEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (pathHopsEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.set(index, value); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder setPathHopsEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (pathHopsEndpointIdsBuilder_ == null) { - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.set(index, builderForValue.build()); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder addPathHopsEndpointIds(context.ContextOuterClass.EndPointId value) { - if (pathHopsEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.add(value); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder addPathHopsEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (pathHopsEndpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.add(index, value); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder addPathHopsEndpointIds( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (pathHopsEndpointIdsBuilder_ == null) { - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.add(builderForValue.build()); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder addPathHopsEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (pathHopsEndpointIdsBuilder_ == null) { - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.add(index, builderForValue.build()); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder addAllPathHopsEndpointIds( - java.lang.Iterable values) { - if (pathHopsEndpointIdsBuilder_ == null) { - ensurePathHopsEndpointIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pathHopsEndpointIds_); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder clearPathHopsEndpointIds() { - if (pathHopsEndpointIdsBuilder_ == null) { - pathHopsEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public Builder removePathHopsEndpointIds(int index) { - if (pathHopsEndpointIdsBuilder_ == null) { - ensurePathHopsEndpointIdsIsMutable(); - pathHopsEndpointIds_.remove(index); - onChanged(); - } else { - pathHopsEndpointIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder getPathHopsEndpointIdsBuilder( - int index) { - return getPathHopsEndpointIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getPathHopsEndpointIdsOrBuilder( - int index) { - if (pathHopsEndpointIdsBuilder_ == null) { - return pathHopsEndpointIds_.get(index); } else { - return pathHopsEndpointIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public java.util.List - getPathHopsEndpointIdsOrBuilderList() { - if (pathHopsEndpointIdsBuilder_ != null) { - return pathHopsEndpointIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pathHopsEndpointIds_); - } - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addPathHopsEndpointIdsBuilder() { - return getPathHopsEndpointIdsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addPathHopsEndpointIdsBuilder( - int index) { - return getPathHopsEndpointIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId path_hops_endpoint_ids = 3; - */ - public java.util.List - getPathHopsEndpointIdsBuilderList() { - return getPathHopsEndpointIdsFieldBuilder().getBuilderList(); - } - 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()); - pathHopsEndpointIds_ = null; - } - return pathHopsEndpointIdsBuilder_; - } - - private java.util.List subServiceIds_ = - java.util.Collections.emptyList(); - private void ensureSubServiceIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - subServiceIds_ = new java.util.ArrayList(subServiceIds_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> subServiceIdsBuilder_; - - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public java.util.List getSubServiceIdsList() { - if (subServiceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subServiceIds_); - } else { - return subServiceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public int getSubServiceIdsCount() { - if (subServiceIdsBuilder_ == null) { - return subServiceIds_.size(); - } else { - return subServiceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public context.ContextOuterClass.ServiceId getSubServiceIds(int index) { - if (subServiceIdsBuilder_ == null) { - return subServiceIds_.get(index); - } else { - return subServiceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder setSubServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (subServiceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubServiceIdsIsMutable(); - subServiceIds_.set(index, value); - onChanged(); - } else { - subServiceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder setSubServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (subServiceIdsBuilder_ == null) { - ensureSubServiceIdsIsMutable(); - subServiceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - subServiceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder addSubServiceIds(context.ContextOuterClass.ServiceId value) { - if (subServiceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubServiceIdsIsMutable(); - subServiceIds_.add(value); - onChanged(); - } else { - subServiceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder addSubServiceIds( - int index, context.ContextOuterClass.ServiceId value) { - if (subServiceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubServiceIdsIsMutable(); - subServiceIds_.add(index, value); - onChanged(); - } else { - subServiceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder addSubServiceIds( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (subServiceIdsBuilder_ == null) { - ensureSubServiceIdsIsMutable(); - subServiceIds_.add(builderForValue.build()); - onChanged(); - } else { - subServiceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder addSubServiceIds( - int index, context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (subServiceIdsBuilder_ == null) { - ensureSubServiceIdsIsMutable(); - subServiceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - subServiceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder addAllSubServiceIds( - java.lang.Iterable values) { - if (subServiceIdsBuilder_ == null) { - ensureSubServiceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subServiceIds_); - onChanged(); - } else { - subServiceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder clearSubServiceIds() { - if (subServiceIdsBuilder_ == null) { - subServiceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - subServiceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public Builder removeSubServiceIds(int index) { - if (subServiceIdsBuilder_ == null) { - ensureSubServiceIdsIsMutable(); - subServiceIds_.remove(index); - onChanged(); - } else { - subServiceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public context.ContextOuterClass.ServiceId.Builder getSubServiceIdsBuilder( - int index) { - return getSubServiceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getSubServiceIdsOrBuilder( - int index) { - if (subServiceIdsBuilder_ == null) { - return subServiceIds_.get(index); } else { - return subServiceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public java.util.List - getSubServiceIdsOrBuilderList() { - if (subServiceIdsBuilder_ != null) { - return subServiceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subServiceIds_); - } - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public context.ContextOuterClass.ServiceId.Builder addSubServiceIdsBuilder() { - return getSubServiceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public context.ContextOuterClass.ServiceId.Builder addSubServiceIdsBuilder( - int index) { - return getSubServiceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.ServiceId.getDefaultInstance()); - } - /** - * repeated .context.ServiceId sub_service_ids = 4; - */ - public java.util.List - getSubServiceIdsBuilderList() { - return getSubServiceIdsFieldBuilder().getBuilderList(); - } - 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()); - subServiceIds_ = null; - } - return subServiceIdsBuilder_; - } - - private context.ContextOuterClass.ConnectionSettings settings_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings, context.ContextOuterClass.ConnectionSettings.Builder, context.ContextOuterClass.ConnectionSettingsOrBuilder> settingsBuilder_; - /** - * .context.ConnectionSettings settings = 5; - * @return Whether the settings field is set. - */ - public boolean hasSettings() { - return settingsBuilder_ != null || settings_ != null; - } - /** - * .context.ConnectionSettings settings = 5; - * @return The settings. - */ - public context.ContextOuterClass.ConnectionSettings getSettings() { - if (settingsBuilder_ == null) { - return settings_ == null ? context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; - } else { - return settingsBuilder_.getMessage(); - } - } - /** - * .context.ConnectionSettings settings = 5; - */ - public Builder setSettings(context.ContextOuterClass.ConnectionSettings value) { - if (settingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - settings_ = value; - onChanged(); - } else { - settingsBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionSettings settings = 5; - */ - public Builder setSettings( - context.ContextOuterClass.ConnectionSettings.Builder builderForValue) { - if (settingsBuilder_ == null) { - settings_ = builderForValue.build(); - onChanged(); - } else { - settingsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionSettings settings = 5; - */ - public Builder mergeSettings(context.ContextOuterClass.ConnectionSettings value) { - if (settingsBuilder_ == null) { - if (settings_ != null) { - settings_ = - context.ContextOuterClass.ConnectionSettings.newBuilder(settings_).mergeFrom(value).buildPartial(); - } else { - settings_ = value; - } - onChanged(); - } else { - settingsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionSettings settings = 5; - */ - public Builder clearSettings() { - if (settingsBuilder_ == null) { - settings_ = null; - onChanged(); - } else { - settings_ = null; - settingsBuilder_ = null; - } - - return this; - } - /** - * .context.ConnectionSettings settings = 5; - */ - public context.ContextOuterClass.ConnectionSettings.Builder getSettingsBuilder() { - - onChanged(); - return getSettingsFieldBuilder().getBuilder(); - } - /** - * .context.ConnectionSettings settings = 5; - */ - public context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder() { - if (settingsBuilder_ != null) { - return settingsBuilder_.getMessageOrBuilder(); - } else { - return settings_ == null ? - context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; - } - } - /** - * .context.ConnectionSettings settings = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings, context.ContextOuterClass.ConnectionSettings.Builder, context.ContextOuterClass.ConnectionSettingsOrBuilder> - getSettingsFieldBuilder() { - if (settingsBuilder_ == null) { - settingsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionSettings, context.ContextOuterClass.ConnectionSettings.Builder, context.ContextOuterClass.ConnectionSettingsOrBuilder>( - getSettings(), - getParentForChildren(), - isClean()); - settings_ = null; - } - return settingsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Connection) - } - // @@protoc_insertion_point(class_scope:context.Connection) - private static final context.ContextOuterClass.Connection DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Connection(); - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fiberUuidBuilder_ == null) { + fiberUuid_ = null; + } else { + fiberUuid_ = null; + fiberUuidBuilder_ = null; + } + return this; + } - public static context.ContextOuterClass.Connection getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_FiberId_descriptor; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public context.ContextOuterClass.FiberId getDefaultInstanceForType() { + return context.ContextOuterClass.FiberId.getDefaultInstance(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public context.ContextOuterClass.FiberId build() { + context.ContextOuterClass.FiberId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public context.ContextOuterClass.Connection getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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(); + } + onBuilt(); + return result; + } - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public interface ConnectionIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionIdList) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - java.util.List - getConnectionIdsList(); - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - context.ContextOuterClass.ConnectionId getConnectionIds(int index); - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - int getConnectionIdsCount(); - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - java.util.List - getConnectionIdsOrBuilderList(); - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ConnectionIdList} - */ - public static final class ConnectionIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionIdList) - ConnectionIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionIdList.newBuilder() to construct. - private ConnectionIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionIdList() { - connectionIds_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionIdList(); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @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(); - 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; - } + @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 - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionIdList.class, context.ContextOuterClass.ConnectionIdList.Builder.class); - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - public static final int CONNECTION_IDS_FIELD_NUMBER = 1; - private java.util.List connectionIds_; - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - @java.lang.Override - public java.util.List getConnectionIdsList() { - return connectionIds_; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - @java.lang.Override - public java.util.List - getConnectionIdsOrBuilderList() { - return connectionIds_; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - @java.lang.Override - public int getConnectionIdsCount() { - return connectionIds_.size(); - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionId getConnectionIds(int index) { - return connectionIds_.get(index); - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdsOrBuilder( - int index) { - return connectionIds_.get(index); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.FiberId) { + return mergeFrom((context.ContextOuterClass.FiberId) other); + } else { + super.mergeFrom(other); + return this; + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public Builder mergeFrom(context.ContextOuterClass.FiberId other) { + if (other == context.ContextOuterClass.FiberId.getDefaultInstance()) + return this; + if (other.hasFiberUuid()) { + mergeFiberUuid(other.getFiberUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < connectionIds_.size(); i++) { - output.writeMessage(1, connectionIds_.get(i)); - } - unknownFields.writeTo(output); - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.FiberId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < connectionIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, connectionIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private context.ContextOuterClass.Uuid fiberUuid_; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionIdList other = (context.ContextOuterClass.ConnectionIdList) obj; - - if (!getConnectionIdsList() - .equals(other.getConnectionIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private com.google.protobuf.SingleFieldBuilderV3 fiberUuidBuilder_; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConnectionIdsCount() > 0) { - hash = (37 * hash) + CONNECTION_IDS_FIELD_NUMBER; - hash = (53 * hash) + getConnectionIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Uuid fiber_uuid = 1; + * @return Whether the fiberUuid field is set. + */ + public boolean hasFiberUuid() { + return fiberUuidBuilder_ != null || fiberUuid_ != null; + } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Uuid fiber_uuid = 1; + * @return The fiberUuid. + */ + public context.ContextOuterClass.Uuid getFiberUuid() { + if (fiberUuidBuilder_ == null) { + return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + } else { + return fiberUuidBuilder_.getMessage(); + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Uuid fiber_uuid = 1; + */ + public Builder setFiberUuid(context.ContextOuterClass.Uuid value) { + if (fiberUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fiberUuid_ = value; + onChanged(); + } else { + fiberUuidBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionIdList) - context.ContextOuterClass.ConnectionIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionIdList.class, context.ContextOuterClass.ConnectionIdList.Builder.class); - } - - // 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(); - if (connectionIdsBuilder_ == null) { - connectionIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - connectionIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionIdList getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionIdList build() { - context.ContextOuterClass.ConnectionIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionIdList buildPartial() { - context.ContextOuterClass.ConnectionIdList result = new context.ContextOuterClass.ConnectionIdList(this); - int from_bitField0_ = bitField0_; - if (connectionIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - connectionIds_ = java.util.Collections.unmodifiableList(connectionIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.connectionIds_ = connectionIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionIdList) { - return mergeFrom((context.ContextOuterClass.ConnectionIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionIdList other) { - if (other == context.ContextOuterClass.ConnectionIdList.getDefaultInstance()) return this; - if (connectionIdsBuilder_ == null) { - if (!other.connectionIds_.isEmpty()) { - if (connectionIds_.isEmpty()) { - connectionIds_ = other.connectionIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConnectionIdsIsMutable(); - connectionIds_.addAll(other.connectionIds_); - } - onChanged(); - } - } else { - if (!other.connectionIds_.isEmpty()) { - if (connectionIdsBuilder_.isEmpty()) { - connectionIdsBuilder_.dispose(); - connectionIdsBuilder_ = null; - connectionIds_ = other.connectionIds_; - bitField0_ = (bitField0_ & ~0x00000001); - connectionIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConnectionIdsFieldBuilder() : null; - } else { - connectionIdsBuilder_.addAllMessages(other.connectionIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List connectionIds_ = - java.util.Collections.emptyList(); - private void ensureConnectionIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - connectionIds_ = new java.util.ArrayList(connectionIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> connectionIdsBuilder_; - - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public java.util.List getConnectionIdsList() { - if (connectionIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(connectionIds_); - } else { - return connectionIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public int getConnectionIdsCount() { - if (connectionIdsBuilder_ == null) { - return connectionIds_.size(); - } else { - return connectionIdsBuilder_.getCount(); - } - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public context.ContextOuterClass.ConnectionId getConnectionIds(int index) { - if (connectionIdsBuilder_ == null) { - return connectionIds_.get(index); - } else { - return connectionIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder setConnectionIds( - int index, context.ContextOuterClass.ConnectionId value) { - if (connectionIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionIdsIsMutable(); - connectionIds_.set(index, value); - onChanged(); - } else { - connectionIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder setConnectionIds( - int index, context.ContextOuterClass.ConnectionId.Builder builderForValue) { - if (connectionIdsBuilder_ == null) { - ensureConnectionIdsIsMutable(); - connectionIds_.set(index, builderForValue.build()); - onChanged(); - } else { - connectionIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder addConnectionIds(context.ContextOuterClass.ConnectionId value) { - if (connectionIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionIdsIsMutable(); - connectionIds_.add(value); - onChanged(); - } else { - connectionIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder addConnectionIds( - int index, context.ContextOuterClass.ConnectionId value) { - if (connectionIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionIdsIsMutable(); - connectionIds_.add(index, value); - onChanged(); - } else { - connectionIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder addConnectionIds( - context.ContextOuterClass.ConnectionId.Builder builderForValue) { - if (connectionIdsBuilder_ == null) { - ensureConnectionIdsIsMutable(); - connectionIds_.add(builderForValue.build()); - onChanged(); - } else { - connectionIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder addConnectionIds( - int index, context.ContextOuterClass.ConnectionId.Builder builderForValue) { - if (connectionIdsBuilder_ == null) { - ensureConnectionIdsIsMutable(); - connectionIds_.add(index, builderForValue.build()); - onChanged(); - } else { - connectionIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder addAllConnectionIds( - java.lang.Iterable values) { - if (connectionIdsBuilder_ == null) { - ensureConnectionIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, connectionIds_); - onChanged(); - } else { - connectionIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder clearConnectionIds() { - if (connectionIdsBuilder_ == null) { - connectionIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - connectionIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public Builder removeConnectionIds(int index) { - if (connectionIdsBuilder_ == null) { - ensureConnectionIdsIsMutable(); - connectionIds_.remove(index); - onChanged(); - } else { - connectionIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public context.ContextOuterClass.ConnectionId.Builder getConnectionIdsBuilder( - int index) { - return getConnectionIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdsOrBuilder( - int index) { - if (connectionIdsBuilder_ == null) { - return connectionIds_.get(index); } else { - return connectionIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public java.util.List - getConnectionIdsOrBuilderList() { - if (connectionIdsBuilder_ != null) { - return connectionIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(connectionIds_); - } - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public context.ContextOuterClass.ConnectionId.Builder addConnectionIdsBuilder() { - return getConnectionIdsFieldBuilder().addBuilder( - context.ContextOuterClass.ConnectionId.getDefaultInstance()); - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public context.ContextOuterClass.ConnectionId.Builder addConnectionIdsBuilder( - int index) { - return getConnectionIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.ConnectionId.getDefaultInstance()); - } - /** - * repeated .context.ConnectionId connection_ids = 1; - */ - public java.util.List - getConnectionIdsBuilderList() { - return getConnectionIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> - getConnectionIdsFieldBuilder() { - if (connectionIdsBuilder_ == null) { - connectionIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder>( - connectionIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - connectionIds_ = null; - } - return connectionIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionIdList) - } + /** + * .context.Uuid fiber_uuid = 1; + */ + public Builder setFiberUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (fiberUuidBuilder_ == null) { + fiberUuid_ = builderForValue.build(); + onChanged(); + } else { + fiberUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } - // @@protoc_insertion_point(class_scope:context.ConnectionIdList) - private static final context.ContextOuterClass.ConnectionIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionIdList(); - } + /** + * .context.Uuid fiber_uuid = 1; + */ + public Builder mergeFiberUuid(context.ContextOuterClass.Uuid value) { + if (fiberUuidBuilder_ == null) { + if (fiberUuid_ != null) { + fiberUuid_ = context.ContextOuterClass.Uuid.newBuilder(fiberUuid_).mergeFrom(value).buildPartial(); + } else { + fiberUuid_ = value; + } + onChanged(); + } else { + fiberUuidBuilder_.mergeFrom(value); + } + return this; + } - public static context.ContextOuterClass.ConnectionIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid fiber_uuid = 1; + */ + public Builder clearFiberUuid() { + if (fiberUuidBuilder_ == null) { + fiberUuid_ = null; + onChanged(); + } else { + fiberUuid_ = null; + fiberUuidBuilder_ = null; + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Uuid fiber_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getFiberUuidBuilder() { + onChanged(); + return getFiberUuidFieldBuilder().getBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.Uuid fiber_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder() { + if (fiberUuidBuilder_ != null) { + return fiberUuidBuilder_.getMessageOrBuilder(); + } else { + return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; + } + } - @java.lang.Override - public context.ContextOuterClass.ConnectionIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid fiber_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getFiberUuidFieldBuilder() { + if (fiberUuidBuilder_ == null) { + fiberUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getFiberUuid(), getParentForChildren(), isClean()); + fiberUuid_ = null; + } + return fiberUuidBuilder_; + } - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public interface ConnectionListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionList) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.FiberId) + } - /** - * repeated .context.Connection connections = 1; - */ - java.util.List - getConnectionsList(); - /** - * repeated .context.Connection connections = 1; - */ - context.ContextOuterClass.Connection getConnections(int index); - /** - * repeated .context.Connection connections = 1; - */ - int getConnectionsCount(); - /** - * repeated .context.Connection connections = 1; - */ - java.util.List - getConnectionsOrBuilderList(); - /** - * repeated .context.Connection connections = 1; - */ - context.ContextOuterClass.ConnectionOrBuilder getConnectionsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.ConnectionList} - */ - public static final class ConnectionList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionList) - ConnectionListOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionList.newBuilder() to construct. - private ConnectionList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionList() { - connections_ = java.util.Collections.emptyList(); - } + // @@protoc_insertion_point(class_scope:context.FiberId) + private static final context.ContextOuterClass.FiberId DEFAULT_INSTANCE; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionList(); - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.FiberId(); + } - @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(); - 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; - } + public static context.ContextOuterClass.FiberId getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionList.class, context.ContextOuterClass.ConnectionList.Builder.class); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static final int CONNECTIONS_FIELD_NUMBER = 1; - private java.util.List connections_; - /** - * repeated .context.Connection connections = 1; - */ - @java.lang.Override - public java.util.List getConnectionsList() { - return connections_; - } - /** - * repeated .context.Connection connections = 1; - */ - @java.lang.Override - public java.util.List - getConnectionsOrBuilderList() { - return connections_; - } - /** - * repeated .context.Connection connections = 1; - */ - @java.lang.Override - public int getConnectionsCount() { - return connections_.size(); - } - /** - * repeated .context.Connection connections = 1; - */ - @java.lang.Override - public context.ContextOuterClass.Connection getConnections(int index) { - return connections_.get(index); - } - /** - * repeated .context.Connection connections = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionOrBuilder getConnectionsOrBuilder( - int index) { - return connections_.get(index); - } + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public context.ContextOuterClass.FiberId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FiberOrBuilder extends // @@protoc_insertion_point(interface_extends:context.Fiber) + com.google.protobuf.MessageOrBuilder { + + /** + * string ID = 10; + * @return The iD. + */ + java.lang.String getID(); + + /** + * string ID = 10; + * @return The bytes for iD. + */ + com.google.protobuf.ByteString getIDBytes(); + + /** + * string src_port = 1; + * @return The srcPort. + */ + java.lang.String getSrcPort(); + + /** + * string src_port = 1; + * @return The bytes for srcPort. + */ + com.google.protobuf.ByteString getSrcPortBytes(); + + /** + * string dst_port = 2; + * @return The dstPort. + */ + java.lang.String getDstPort(); + + /** + * string dst_port = 2; + * @return The bytes for dstPort. + */ + com.google.protobuf.ByteString getDstPortBytes(); + + /** + * string local_peer_port = 3; + * @return The localPeerPort. + */ + java.lang.String getLocalPeerPort(); + + /** + * string local_peer_port = 3; + * @return The bytes for localPeerPort. + */ + com.google.protobuf.ByteString getLocalPeerPortBytes(); + + /** + * string remote_peer_port = 4; + * @return The remotePeerPort. + */ + java.lang.String getRemotePeerPort(); + + /** + * string remote_peer_port = 4; + * @return The bytes for remotePeerPort. + */ + com.google.protobuf.ByteString getRemotePeerPortBytes(); + + /** + * repeated int32 c_slots = 5; + * @return A list containing the cSlots. + */ + java.util.List getCSlotsList(); + + /** + * repeated int32 c_slots = 5; + * @return The count of cSlots. + */ + int getCSlotsCount(); + + /** + * repeated int32 c_slots = 5; + * @param index The index of the element to return. + * @return The cSlots at the given index. + */ + int getCSlots(int index); + + /** + * repeated int32 l_slots = 6; + * @return A list containing the lSlots. + */ + java.util.List getLSlotsList(); + + /** + * repeated int32 l_slots = 6; + * @return The count of lSlots. + */ + int getLSlotsCount(); + + /** + * repeated int32 l_slots = 6; + * @param index The index of the element to return. + * @return The lSlots at the given index. + */ + int getLSlots(int index); + + /** + * repeated int32 s_slots = 7; + * @return A list containing the sSlots. + */ + java.util.List getSSlotsList(); + + /** + * repeated int32 s_slots = 7; + * @return The count of sSlots. + */ + int getSSlotsCount(); + + /** + * repeated int32 s_slots = 7; + * @param index The index of the element to return. + * @return The sSlots at the given index. + */ + int getSSlots(int index); + + /** + * float length = 8; + * @return The length. + */ + float getLength(); + + /** + * bool used = 9; + * @return The used. + */ + boolean getUsed(); + + /** + * .context.FiberId fiber_uuid = 11; + * @return Whether the fiberUuid field is set. + */ + boolean hasFiberUuid(); + + /** + * .context.FiberId fiber_uuid = 11; + * @return The fiberUuid. + */ + context.ContextOuterClass.FiberId getFiberUuid(); + + /** + * .context.FiberId fiber_uuid = 11; + */ + context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder(); + } + + /** + * Protobuf type {@code context.Fiber} + */ + public static final class Fiber extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.Fiber) + FiberOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Fiber.newBuilder() to construct. + private Fiber(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Fiber() { + iD_ = ""; + srcPort_ = ""; + dstPort_ = ""; + localPeerPort_ = ""; + remotePeerPort_ = ""; + cSlots_ = emptyIntList(); + lSlots_ = emptyIntList(); + sSlots_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Fiber_descriptor; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Fiber_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Fiber.class, context.ContextOuterClass.Fiber.Builder.class); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < connections_.size(); i++) { - output.writeMessage(1, connections_.get(i)); - } - unknownFields.writeTo(output); - } + public static final int ID_FIELD_NUMBER = 10; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < connections_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, connections_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private volatile java.lang.Object iD_; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionList)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionList other = (context.ContextOuterClass.ConnectionList) obj; - - if (!getConnectionsList() - .equals(other.getConnectionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string ID = 10; + * @return The iD. + */ + @java.lang.Override + public java.lang.String getID() { + java.lang.Object ref = iD_; + 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(); + iD_ = s; + return s; + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConnectionsCount() > 0) { - hash = (37 * hash) + CONNECTIONS_FIELD_NUMBER; - hash = (53 * hash) + getConnectionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * string ID = 10; + * @return The bytes for iD. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIDBytes() { + java.lang.Object ref = iD_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iD_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static context.ContextOuterClass.ConnectionList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int SRC_PORT_FIELD_NUMBER = 1; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private volatile java.lang.Object srcPort_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionList) - context.ContextOuterClass.ConnectionListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionList.class, context.ContextOuterClass.ConnectionList.Builder.class); - } - - // 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(); - if (connectionsBuilder_ == null) { - connections_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - connectionsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionList getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionList build() { - context.ContextOuterClass.ConnectionList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionList buildPartial() { - context.ContextOuterClass.ConnectionList result = new context.ContextOuterClass.ConnectionList(this); - int from_bitField0_ = bitField0_; - if (connectionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - connections_ = java.util.Collections.unmodifiableList(connections_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.connections_ = connections_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionList) { - return mergeFrom((context.ContextOuterClass.ConnectionList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionList other) { - if (other == context.ContextOuterClass.ConnectionList.getDefaultInstance()) return this; - if (connectionsBuilder_ == null) { - if (!other.connections_.isEmpty()) { - if (connections_.isEmpty()) { - connections_ = other.connections_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConnectionsIsMutable(); - connections_.addAll(other.connections_); - } - onChanged(); - } - } else { - if (!other.connections_.isEmpty()) { - if (connectionsBuilder_.isEmpty()) { - connectionsBuilder_.dispose(); - connectionsBuilder_ = null; - connections_ = other.connections_; - bitField0_ = (bitField0_ & ~0x00000001); - connectionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConnectionsFieldBuilder() : null; + /** + * string src_port = 1; + * @return The srcPort. + */ + @java.lang.Override + public java.lang.String getSrcPort() { + java.lang.Object ref = srcPort_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - connectionsBuilder_.addAllMessages(other.connections_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List connections_ = - java.util.Collections.emptyList(); - private void ensureConnectionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - connections_ = new java.util.ArrayList(connections_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Connection, context.ContextOuterClass.Connection.Builder, context.ContextOuterClass.ConnectionOrBuilder> connectionsBuilder_; - - /** - * repeated .context.Connection connections = 1; - */ - public java.util.List getConnectionsList() { - if (connectionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(connections_); - } else { - return connectionsBuilder_.getMessageList(); - } - } - /** - * repeated .context.Connection connections = 1; - */ - public int getConnectionsCount() { - if (connectionsBuilder_ == null) { - return connections_.size(); - } else { - return connectionsBuilder_.getCount(); - } - } - /** - * repeated .context.Connection connections = 1; - */ - public context.ContextOuterClass.Connection getConnections(int index) { - if (connectionsBuilder_ == null) { - return connections_.get(index); - } else { - return connectionsBuilder_.getMessage(index); - } - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder setConnections( - int index, context.ContextOuterClass.Connection value) { - if (connectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionsIsMutable(); - connections_.set(index, value); - onChanged(); - } else { - connectionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder setConnections( - int index, context.ContextOuterClass.Connection.Builder builderForValue) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - connections_.set(index, builderForValue.build()); - onChanged(); - } else { - connectionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder addConnections(context.ContextOuterClass.Connection value) { - if (connectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionsIsMutable(); - connections_.add(value); - onChanged(); - } else { - connectionsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder addConnections( - int index, context.ContextOuterClass.Connection value) { - if (connectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectionsIsMutable(); - connections_.add(index, value); - onChanged(); - } else { - connectionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder addConnections( - context.ContextOuterClass.Connection.Builder builderForValue) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - connections_.add(builderForValue.build()); - onChanged(); - } else { - connectionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder addConnections( - int index, context.ContextOuterClass.Connection.Builder builderForValue) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - connections_.add(index, builderForValue.build()); - onChanged(); - } else { - connectionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder addAllConnections( - java.lang.Iterable values) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, connections_); - onChanged(); - } else { - connectionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder clearConnections() { - if (connectionsBuilder_ == null) { - connections_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - connectionsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public Builder removeConnections(int index) { - if (connectionsBuilder_ == null) { - ensureConnectionsIsMutable(); - connections_.remove(index); - onChanged(); - } else { - connectionsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.Connection connections = 1; - */ - public context.ContextOuterClass.Connection.Builder getConnectionsBuilder( - int index) { - return getConnectionsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.Connection connections = 1; - */ - public context.ContextOuterClass.ConnectionOrBuilder getConnectionsOrBuilder( - int index) { - if (connectionsBuilder_ == null) { - return connections_.get(index); } else { - return connectionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.Connection connections = 1; - */ - public java.util.List - getConnectionsOrBuilderList() { - if (connectionsBuilder_ != null) { - return connectionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(connections_); - } - } - /** - * repeated .context.Connection connections = 1; - */ - public context.ContextOuterClass.Connection.Builder addConnectionsBuilder() { - return getConnectionsFieldBuilder().addBuilder( - context.ContextOuterClass.Connection.getDefaultInstance()); - } - /** - * repeated .context.Connection connections = 1; - */ - public context.ContextOuterClass.Connection.Builder addConnectionsBuilder( - int index) { - return getConnectionsFieldBuilder().addBuilder( - index, context.ContextOuterClass.Connection.getDefaultInstance()); - } - /** - * repeated .context.Connection connections = 1; - */ - public java.util.List - getConnectionsBuilderList() { - return getConnectionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Connection, context.ContextOuterClass.Connection.Builder, context.ContextOuterClass.ConnectionOrBuilder> - getConnectionsFieldBuilder() { - if (connectionsBuilder_ == null) { - connectionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Connection, context.ContextOuterClass.Connection.Builder, context.ContextOuterClass.ConnectionOrBuilder>( - connections_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - connections_ = null; - } - return connectionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionList) - } + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcPort_ = s; + return s; + } + } - // @@protoc_insertion_point(class_scope:context.ConnectionList) - private static final context.ContextOuterClass.ConnectionList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionList(); - } + /** + * string src_port = 1; + * @return The bytes for srcPort. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSrcPortBytes() { + java.lang.Object ref = srcPort_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static context.ContextOuterClass.ConnectionList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final int DST_PORT_FIELD_NUMBER = 2; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private volatile java.lang.Object dstPort_; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * string dst_port = 2; + * @return The dstPort. + */ + @java.lang.Override + public java.lang.String getDstPort() { + java.lang.Object ref = dstPort_; + 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(); + dstPort_ = s; + return s; + } + } - @java.lang.Override - public context.ContextOuterClass.ConnectionList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * string dst_port = 2; + * @return The bytes for dstPort. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDstPortBytes() { + java.lang.Object ref = dstPort_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - } + public static final int LOCAL_PEER_PORT_FIELD_NUMBER = 3; - public interface ConnectionEventOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConnectionEvent) - com.google.protobuf.MessageOrBuilder { + private volatile java.lang.Object localPeerPort_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - boolean hasEvent(); - /** - * .context.Event event = 1; - * @return The event. - */ - context.ContextOuterClass.Event getEvent(); - /** - * .context.Event event = 1; - */ - context.ContextOuterClass.EventOrBuilder getEventOrBuilder(); + /** + * string local_peer_port = 3; + * @return The localPeerPort. + */ + @java.lang.Override + public java.lang.String getLocalPeerPort() { + java.lang.Object ref = localPeerPort_; + 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(); + localPeerPort_ = s; + return s; + } + } - /** - * .context.ConnectionId connection_id = 2; - * @return Whether the connectionId field is set. - */ - boolean hasConnectionId(); - /** - * .context.ConnectionId connection_id = 2; - * @return The connectionId. - */ - context.ContextOuterClass.ConnectionId getConnectionId(); - /** - * .context.ConnectionId connection_id = 2; - */ - context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); - } - /** - * Protobuf type {@code context.ConnectionEvent} - */ - public static final class ConnectionEvent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConnectionEvent) - ConnectionEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionEvent.newBuilder() to construct. - private ConnectionEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionEvent() { - } + /** + * string local_peer_port = 3; + * @return The bytes for localPeerPort. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocalPeerPortBytes() { + java.lang.Object ref = localPeerPort_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + localPeerPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionEvent(); - } + public static final int REMOTE_PEER_PORT_FIELD_NUMBER = 4; - @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; - } + private volatile java.lang.Object remotePeerPort_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionEvent.class, context.ContextOuterClass.ConnectionEvent.Builder.class); - } + /** + * string remote_peer_port = 4; + * @return The remotePeerPort. + */ + @java.lang.Override + public java.lang.String getRemotePeerPort() { + java.lang.Object ref = remotePeerPort_; + 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(); + remotePeerPort_ = s; + return s; + } + } - public static final int EVENT_FIELD_NUMBER = 1; - private context.ContextOuterClass.Event event_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - @java.lang.Override - public boolean hasEvent() { - return event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - @java.lang.Override - public context.ContextOuterClass.Event getEvent() { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - /** - * .context.Event event = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); - } + /** + * string remote_peer_port = 4; + * @return The bytes for remotePeerPort. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRemotePeerPortBytes() { + java.lang.Object ref = remotePeerPort_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remotePeerPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static final int CONNECTION_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.ConnectionId connectionId_; - /** - * .context.ConnectionId connection_id = 2; - * @return Whether the connectionId field is set. - */ - @java.lang.Override - public boolean hasConnectionId() { - return connectionId_ != null; - } - /** - * .context.ConnectionId connection_id = 2; - * @return The connectionId. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionId getConnectionId() { - return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } - /** - * .context.ConnectionId connection_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - return getConnectionId(); - } + public static final int C_SLOTS_FIELD_NUMBER = 5; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private com.google.protobuf.Internal.IntList cSlots_; - memoizedIsInitialized = 1; - return true; - } + /** + * repeated int32 c_slots = 5; + * @return A list containing the cSlots. + */ + @java.lang.Override + public java.util.List getCSlotsList() { + return cSlots_; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (event_ != null) { - output.writeMessage(1, getEvent()); - } - if (connectionId_ != null) { - output.writeMessage(2, getConnectionId()); - } - unknownFields.writeTo(output); - } + /** + * repeated int32 c_slots = 5; + * @return The count of cSlots. + */ + public int getCSlotsCount() { + return cSlots_.size(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (event_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEvent()); - } - if (connectionId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getConnectionId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated int32 c_slots = 5; + * @param index The index of the element to return. + * @return The cSlots at the given index. + */ + public int getCSlots(int index) { + return cSlots_.getInt(index); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConnectionEvent)) { - return super.equals(obj); - } - context.ContextOuterClass.ConnectionEvent other = (context.ContextOuterClass.ConnectionEvent) obj; - - if (hasEvent() != other.hasEvent()) return false; - if (hasEvent()) { - if (!getEvent() - .equals(other.getEvent())) return false; - } - if (hasConnectionId() != other.hasConnectionId()) return false; - if (hasConnectionId()) { - if (!getConnectionId() - .equals(other.getConnectionId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private int cSlotsMemoizedSerializedSize = -1; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEvent()) { - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + getEvent().hashCode(); - } - if (hasConnectionId()) { - hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; - hash = (53 * hash) + getConnectionId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static final int L_SLOTS_FIELD_NUMBER = 6; - public static context.ContextOuterClass.ConnectionEvent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionEvent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionEvent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConnectionEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private com.google.protobuf.Internal.IntList lSlots_; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConnectionEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated int32 l_slots = 6; + * @return A list containing the lSlots. + */ + @java.lang.Override + public java.util.List getLSlotsList() { + return lSlots_; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConnectionEvent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConnectionEvent) - context.ContextOuterClass.ConnectionEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConnectionEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConnectionEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConnectionEvent.class, context.ContextOuterClass.ConnectionEvent.Builder.class); - } - - // 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; - eventBuilder_ = null; - } - if (connectionIdBuilder_ == null) { - connectionId_ = null; - } else { - connectionId_ = null; - connectionIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConnectionEvent_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionEvent getDefaultInstanceForType() { - return context.ContextOuterClass.ConnectionEvent.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConnectionEvent build() { - context.ContextOuterClass.ConnectionEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConnectionEvent) { - return mergeFrom((context.ContextOuterClass.ConnectionEvent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConnectionEvent other) { - if (other == context.ContextOuterClass.ConnectionEvent.getDefaultInstance()) return this; - if (other.hasEvent()) { - mergeEvent(other.getEvent()); - } - if (other.hasConnectionId()) { - mergeConnectionId(other.getConnectionId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionEvent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Event event_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; - /** - * .context.Event event = 1; - * @return Whether the event field is set. - */ - public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; - } - /** - * .context.Event event = 1; - * @return The event. - */ - public context.ContextOuterClass.Event getEvent() { - if (eventBuilder_ == null) { - return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; - } else { - return eventBuilder_.getMessage(); - } - } - /** - * .context.Event event = 1; - */ - public Builder setEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - event_ = value; - onChanged(); - } else { - eventBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder setEvent( - context.ContextOuterClass.Event.Builder builderForValue) { - if (eventBuilder_ == null) { - event_ = builderForValue.build(); - onChanged(); - } else { - eventBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder mergeEvent(context.ContextOuterClass.Event value) { - if (eventBuilder_ == null) { - if (event_ != null) { - event_ = - context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); - } else { - event_ = value; - } - onChanged(); - } else { - eventBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Event event = 1; - */ - public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; - eventBuilder_ = null; - } - - return this; - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.Event.Builder getEventBuilder() { - - onChanged(); - return getEventFieldBuilder().getBuilder(); - } - /** - * .context.Event event = 1; - */ - public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - if (eventBuilder_ != null) { - return eventBuilder_.getMessageOrBuilder(); - } else { - return event_ == null ? - context.ContextOuterClass.Event.getDefaultInstance() : event_; - } - } - /** - * .context.Event event = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> - getEventFieldBuilder() { - if (eventBuilder_ == null) { - eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder>( - getEvent(), - getParentForChildren(), - isClean()); - event_ = null; - } - return eventBuilder_; - } - - private context.ContextOuterClass.ConnectionId connectionId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> connectionIdBuilder_; - /** - * .context.ConnectionId connection_id = 2; - * @return Whether the connectionId field is set. - */ - public boolean hasConnectionId() { - return connectionIdBuilder_ != null || connectionId_ != null; - } - /** - * .context.ConnectionId connection_id = 2; - * @return The connectionId. - */ - public context.ContextOuterClass.ConnectionId getConnectionId() { - if (connectionIdBuilder_ == null) { - return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } else { - return connectionIdBuilder_.getMessage(); - } - } - /** - * .context.ConnectionId connection_id = 2; - */ - public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { - if (connectionIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - connectionId_ = value; - onChanged(); - } else { - connectionIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 2; - */ - public Builder setConnectionId( - context.ContextOuterClass.ConnectionId.Builder builderForValue) { - if (connectionIdBuilder_ == null) { - connectionId_ = builderForValue.build(); - onChanged(); - } else { - connectionIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 2; - */ - public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { - if (connectionIdBuilder_ == null) { - if (connectionId_ != null) { - connectionId_ = - context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); - } else { - connectionId_ = value; - } - onChanged(); - } else { - connectionIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 2; - */ - public Builder clearConnectionId() { - if (connectionIdBuilder_ == null) { - connectionId_ = null; - onChanged(); - } else { - connectionId_ = null; - connectionIdBuilder_ = null; - } - - return this; - } - /** - * .context.ConnectionId connection_id = 2; - */ - public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { - - onChanged(); - return getConnectionIdFieldBuilder().getBuilder(); - } - /** - * .context.ConnectionId connection_id = 2; - */ - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - if (connectionIdBuilder_ != null) { - return connectionIdBuilder_.getMessageOrBuilder(); - } else { - return connectionId_ == null ? - context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } - } - /** - * .context.ConnectionId connection_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> - getConnectionIdFieldBuilder() { - if (connectionIdBuilder_ == null) { - connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder>( - getConnectionId(), - getParentForChildren(), - isClean()); - connectionId_ = null; - } - return connectionIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConnectionEvent) - } + /** + * repeated int32 l_slots = 6; + * @return The count of lSlots. + */ + public int getLSlotsCount() { + return lSlots_.size(); + } - // @@protoc_insertion_point(class_scope:context.ConnectionEvent) - private static final context.ContextOuterClass.ConnectionEvent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConnectionEvent(); - } + /** + * repeated int32 l_slots = 6; + * @param index The index of the element to return. + * @return The lSlots at the given index. + */ + public int getLSlots(int index) { + return lSlots_.getInt(index); + } - public static context.ContextOuterClass.ConnectionEvent getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private int lSlotsMemoizedSerializedSize = -1; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static final int S_SLOTS_FIELD_NUMBER = 7; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private com.google.protobuf.Internal.IntList sSlots_; - @java.lang.Override - public context.ContextOuterClass.ConnectionEvent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated int32 s_slots = 7; + * @return A list containing the sSlots. + */ + @java.lang.Override + public java.util.List getSSlotsList() { + return sSlots_; + } - } + /** + * repeated int32 s_slots = 7; + * @return The count of sSlots. + */ + public int getSSlotsCount() { + return sSlots_.size(); + } - public interface EndPointIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.EndPointId) - com.google.protobuf.MessageOrBuilder { + /** + * repeated int32 s_slots = 7; + * @param index The index of the element to return. + * @return The sSlots at the given index. + */ + public int getSSlots(int index) { + return sSlots_.getInt(index); + } - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - boolean hasTopologyId(); - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - context.ContextOuterClass.TopologyId getTopologyId(); - /** - * .context.TopologyId topology_id = 1; - */ - context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder(); + private int sSlotsMemoizedSerializedSize = -1; - /** - * .context.DeviceId device_id = 2; - * @return Whether the deviceId field is set. - */ - boolean hasDeviceId(); - /** - * .context.DeviceId device_id = 2; - * @return The deviceId. - */ - context.ContextOuterClass.DeviceId getDeviceId(); - /** - * .context.DeviceId device_id = 2; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + public static final int LENGTH_FIELD_NUMBER = 8; - /** - * .context.Uuid endpoint_uuid = 3; - * @return Whether the endpointUuid field is set. - */ - boolean hasEndpointUuid(); - /** - * .context.Uuid endpoint_uuid = 3; - * @return The endpointUuid. - */ - context.ContextOuterClass.Uuid getEndpointUuid(); - /** - * .context.Uuid endpoint_uuid = 3; - */ - context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder(); - } - /** - *
-   * ----- Endpoint ------------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.EndPointId} - */ - public static final class EndPointId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.EndPointId) - EndPointIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use EndPointId.newBuilder() to construct. - private EndPointId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EndPointId() { - } + private float length_; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EndPointId(); - } + /** + * float length = 8; + * @return The length. + */ + @java.lang.Override + public float getLength() { + return length_; + } - @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; - } + public static final int USED_FIELD_NUMBER = 9; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointId.class, context.ContextOuterClass.EndPointId.Builder.class); - } + private boolean used_; - public static final int TOPOLOGY_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.TopologyId topologyId_; - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - @java.lang.Override - public boolean hasTopologyId() { - return topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - @java.lang.Override - public context.ContextOuterClass.TopologyId getTopologyId() { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - /** - * .context.TopologyId topology_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); - } + /** + * bool used = 9; + * @return The used. + */ + @java.lang.Override + public boolean getUsed() { + return used_; + } - public static final int DEVICE_ID_FIELD_NUMBER = 2; - private context.ContextOuterClass.DeviceId deviceId_; - /** - * .context.DeviceId device_id = 2; - * @return Whether the deviceId field is set. - */ - @java.lang.Override - public boolean hasDeviceId() { - return deviceId_ != null; - } - /** - * .context.DeviceId device_id = 2; - * @return The deviceId. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceId() { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - /** - * .context.DeviceId device_id = 2; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); - } + public static final int FIBER_UUID_FIELD_NUMBER = 11; - public static final int ENDPOINT_UUID_FIELD_NUMBER = 3; - private context.ContextOuterClass.Uuid endpointUuid_; - /** - * .context.Uuid endpoint_uuid = 3; - * @return Whether the endpointUuid field is set. - */ - @java.lang.Override - public boolean hasEndpointUuid() { - return endpointUuid_ != null; - } - /** - * .context.Uuid endpoint_uuid = 3; - * @return The endpointUuid. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getEndpointUuid() { - return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { - return getEndpointUuid(); - } + private context.ContextOuterClass.FiberId fiberUuid_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .context.FiberId fiber_uuid = 11; + * @return Whether the fiberUuid field is set. + */ + @java.lang.Override + public boolean hasFiberUuid() { + return fiberUuid_ != null; + } - memoizedIsInitialized = 1; - return true; - } + /** + * .context.FiberId fiber_uuid = 11; + * @return The fiberUuid. + */ + @java.lang.Override + public context.ContextOuterClass.FiberId getFiberUuid() { + return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (topologyId_ != null) { - output.writeMessage(1, getTopologyId()); - } - if (deviceId_ != null) { - output.writeMessage(2, getDeviceId()); - } - if (endpointUuid_ != null) { - output.writeMessage(3, getEndpointUuid()); - } - unknownFields.writeTo(output); - } + /** + * .context.FiberId fiber_uuid = 11; + */ + @java.lang.Override + public context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder() { + return getFiberUuid(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (topologyId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTopologyId()); - } - if (deviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDeviceId()); - } - if (endpointUuid_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getEndpointUuid()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.EndPointId)) { - return super.equals(obj); - } - context.ContextOuterClass.EndPointId other = (context.ContextOuterClass.EndPointId) obj; - - if (hasTopologyId() != other.hasTopologyId()) return false; - if (hasTopologyId()) { - if (!getTopologyId() - .equals(other.getTopologyId())) return false; - } - if (hasDeviceId() != other.hasDeviceId()) return false; - if (hasDeviceId()) { - if (!getDeviceId() - .equals(other.getDeviceId())) return false; - } - if (hasEndpointUuid() != other.hasEndpointUuid()) return false; - if (hasEndpointUuid()) { - if (!getEndpointUuid() - .equals(other.getEndpointUuid())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTopologyId()) { - hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; - hash = (53 * hash) + getTopologyId().hashCode(); - } - if (hasDeviceId()) { - hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getDeviceId().hashCode(); - } - if (hasEndpointUuid()) { - hash = (37 * hash) + ENDPOINT_UUID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointUuid().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!getSrcPortBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcPort_); + } + if (!getDstPortBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstPort_); + } + if (!getLocalPeerPortBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, localPeerPort_); + } + if (!getRemotePeerPortBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, remotePeerPort_); + } + if (getCSlotsList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(cSlotsMemoizedSerializedSize); + } + for (int i = 0; i < cSlots_.size(); i++) { + output.writeInt32NoTag(cSlots_.getInt(i)); + } + if (getLSlotsList().size() > 0) { + output.writeUInt32NoTag(50); + output.writeUInt32NoTag(lSlotsMemoizedSerializedSize); + } + for (int i = 0; i < lSlots_.size(); i++) { + output.writeInt32NoTag(lSlots_.getInt(i)); + } + if (getSSlotsList().size() > 0) { + output.writeUInt32NoTag(58); + output.writeUInt32NoTag(sSlotsMemoizedSerializedSize); + } + for (int i = 0; i < sSlots_.size(); i++) { + output.writeInt32NoTag(sSlots_.getInt(i)); + } + if (length_ != 0F) { + output.writeFloat(8, length_); + } + if (used_ != false) { + output.writeBool(9, used_); + } + if (!getIDBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, iD_); + } + if (fiberUuid_ != null) { + output.writeMessage(11, getFiberUuid()); + } + unknownFields.writeTo(output); + } - public static context.ContextOuterClass.EndPointId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getSrcPortBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcPort_); + } + if (!getDstPortBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstPort_); + } + if (!getLocalPeerPortBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, localPeerPort_); + } + if (!getRemotePeerPortBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, remotePeerPort_); + } + { + int dataSize = 0; + for (int i = 0; i < cSlots_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(cSlots_.getInt(i)); + } + size += dataSize; + if (!getCSlotsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + cSlotsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < lSlots_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(lSlots_.getInt(i)); + } + size += dataSize; + if (!getLSlotsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + lSlotsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < sSlots_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(sSlots_.getInt(i)); + } + size += dataSize; + if (!getSSlotsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + sSlotsMemoizedSerializedSize = dataSize; + } + if (length_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, length_); + } + if (used_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, used_); + } + if (!getIDBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, iD_); + } + if (fiberUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getFiberUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.EndPointId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.Fiber)) { + return super.equals(obj); + } + context.ContextOuterClass.Fiber other = (context.ContextOuterClass.Fiber) obj; + if (!getID().equals(other.getID())) + return false; + if (!getSrcPort().equals(other.getSrcPort())) + return false; + if (!getDstPort().equals(other.getDstPort())) + return false; + if (!getLocalPeerPort().equals(other.getLocalPeerPort())) + return false; + if (!getRemotePeerPort().equals(other.getRemotePeerPort())) + return false; + if (!getCSlotsList().equals(other.getCSlotsList())) + return false; + if (!getLSlotsList().equals(other.getLSlotsList())) + return false; + if (!getSSlotsList().equals(other.getSSlotsList())) + return false; + if (java.lang.Float.floatToIntBits(getLength()) != java.lang.Float.floatToIntBits(other.getLength())) + return false; + if (getUsed() != other.getUsed()) + return false; + if (hasFiberUuid() != other.hasFiberUuid()) + return false; + if (hasFiberUuid()) { + if (!getFiberUuid().equals(other.getFiberUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Endpoint ------------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.EndPointId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.EndPointId) - context.ContextOuterClass.EndPointIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_EndPointId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointId.class, context.ContextOuterClass.EndPointId.Builder.class); - } - - // 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; - topologyIdBuilder_ = null; - } - if (deviceIdBuilder_ == null) { - deviceId_ = null; - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - if (endpointUuidBuilder_ == null) { - endpointUuid_ = null; - } else { - endpointUuid_ = null; - endpointUuidBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_EndPointId_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.EndPointId getDefaultInstanceForType() { - return context.ContextOuterClass.EndPointId.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.EndPointId build() { - context.ContextOuterClass.EndPointId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.EndPointId) { - return mergeFrom((context.ContextOuterClass.EndPointId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.EndPointId other) { - if (other == context.ContextOuterClass.EndPointId.getDefaultInstance()) return this; - if (other.hasTopologyId()) { - mergeTopologyId(other.getTopologyId()); - } - if (other.hasDeviceId()) { - mergeDeviceId(other.getDeviceId()); - } - if (other.hasEndpointUuid()) { - mergeEndpointUuid(other.getEndpointUuid()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPointId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.TopologyId topologyId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> topologyIdBuilder_; - /** - * .context.TopologyId topology_id = 1; - * @return Whether the topologyId field is set. - */ - public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; - } - /** - * .context.TopologyId topology_id = 1; - * @return The topologyId. - */ - public context.ContextOuterClass.TopologyId getTopologyId() { - if (topologyIdBuilder_ == null) { - return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } else { - return topologyIdBuilder_.getMessage(); - } - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder setTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - topologyId_ = value; - onChanged(); - } else { - topologyIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder setTopologyId( - context.ContextOuterClass.TopologyId.Builder builderForValue) { - if (topologyIdBuilder_ == null) { - topologyId_ = builderForValue.build(); - onChanged(); - } else { - topologyIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { - if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = - context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); - } else { - topologyId_ = value; - } - onChanged(); - } else { - topologyIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; - topologyIdBuilder_ = null; - } - - return this; - } - /** - * .context.TopologyId topology_id = 1; - */ - public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { - - onChanged(); - return getTopologyIdFieldBuilder().getBuilder(); - } - /** - * .context.TopologyId topology_id = 1; - */ - public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - if (topologyIdBuilder_ != null) { - return topologyIdBuilder_.getMessageOrBuilder(); - } else { - return topologyId_ == null ? - context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; - } - } - /** - * .context.TopologyId topology_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> - getTopologyIdFieldBuilder() { - if (topologyIdBuilder_ == null) { - topologyIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder>( - getTopologyId(), - getParentForChildren(), - isClean()); - topologyId_ = null; - } - return topologyIdBuilder_; - } - - private context.ContextOuterClass.DeviceId deviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdBuilder_; - /** - * .context.DeviceId device_id = 2; - * @return Whether the deviceId field is set. - */ - public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; - } - /** - * .context.DeviceId device_id = 2; - * @return The deviceId. - */ - public context.ContextOuterClass.DeviceId getDeviceId() { - if (deviceIdBuilder_ == null) { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } else { - return deviceIdBuilder_.getMessage(); - } - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceId_ = value; - onChanged(); - } else { - deviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder setDeviceId( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdBuilder_ == null) { - deviceId_ = builderForValue.build(); - onChanged(); - } else { - deviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = - context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); - } else { - deviceId_ = value; - } - onChanged(); - } else { - deviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceId device_id = 2; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { - - onChanged(); - return getDeviceIdFieldBuilder().getBuilder(); - } - /** - * .context.DeviceId device_id = 2; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - if (deviceIdBuilder_ != null) { - return deviceIdBuilder_.getMessageOrBuilder(); - } else { - return deviceId_ == null ? - context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - } - /** - * .context.DeviceId device_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> - getDeviceIdFieldBuilder() { - if (deviceIdBuilder_ == null) { - deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( - getDeviceId(), - getParentForChildren(), - isClean()); - deviceId_ = null; - } - return deviceIdBuilder_; - } - - private context.ContextOuterClass.Uuid endpointUuid_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> endpointUuidBuilder_; - /** - * .context.Uuid endpoint_uuid = 3; - * @return Whether the endpointUuid field is set. - */ - public boolean hasEndpointUuid() { - return endpointUuidBuilder_ != null || endpointUuid_ != null; - } - /** - * .context.Uuid endpoint_uuid = 3; - * @return The endpointUuid. - */ - public context.ContextOuterClass.Uuid getEndpointUuid() { - if (endpointUuidBuilder_ == null) { - return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; - } else { - return endpointUuidBuilder_.getMessage(); - } - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - public Builder setEndpointUuid(context.ContextOuterClass.Uuid value) { - if (endpointUuidBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointUuid_ = value; - onChanged(); - } else { - endpointUuidBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - public Builder setEndpointUuid( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (endpointUuidBuilder_ == null) { - endpointUuid_ = builderForValue.build(); - onChanged(); - } else { - endpointUuidBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - public Builder mergeEndpointUuid(context.ContextOuterClass.Uuid value) { - if (endpointUuidBuilder_ == null) { - if (endpointUuid_ != null) { - endpointUuid_ = - context.ContextOuterClass.Uuid.newBuilder(endpointUuid_).mergeFrom(value).buildPartial(); - } else { - endpointUuid_ = value; - } - onChanged(); - } else { - endpointUuidBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - public Builder clearEndpointUuid() { - if (endpointUuidBuilder_ == null) { - endpointUuid_ = null; - onChanged(); - } else { - endpointUuid_ = null; - endpointUuidBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - public context.ContextOuterClass.Uuid.Builder getEndpointUuidBuilder() { - - onChanged(); - return getEndpointUuidFieldBuilder().getBuilder(); - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { - if (endpointUuidBuilder_ != null) { - return endpointUuidBuilder_.getMessageOrBuilder(); - } else { - return endpointUuid_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; - } - } - /** - * .context.Uuid endpoint_uuid = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getEndpointUuidFieldBuilder() { - if (endpointUuidBuilder_ == null) { - endpointUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getEndpointUuid(), - getParentForChildren(), - isClean()); - endpointUuid_ = null; - } - return endpointUuidBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.EndPointId) - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getID().hashCode(); + hash = (37 * hash) + SRC_PORT_FIELD_NUMBER; + hash = (53 * hash) + getSrcPort().hashCode(); + hash = (37 * hash) + DST_PORT_FIELD_NUMBER; + hash = (53 * hash) + getDstPort().hashCode(); + hash = (37 * hash) + LOCAL_PEER_PORT_FIELD_NUMBER; + hash = (53 * hash) + getLocalPeerPort().hashCode(); + hash = (37 * hash) + REMOTE_PEER_PORT_FIELD_NUMBER; + hash = (53 * hash) + getRemotePeerPort().hashCode(); + if (getCSlotsCount() > 0) { + hash = (37 * hash) + C_SLOTS_FIELD_NUMBER; + hash = (53 * hash) + getCSlotsList().hashCode(); + } + if (getLSlotsCount() > 0) { + hash = (37 * hash) + L_SLOTS_FIELD_NUMBER; + hash = (53 * hash) + getLSlotsList().hashCode(); + } + if (getSSlotsCount() > 0) { + hash = (37 * hash) + S_SLOTS_FIELD_NUMBER; + hash = (53 * hash) + getSSlotsList().hashCode(); + } + hash = (37 * hash) + LENGTH_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getLength()); + hash = (37 * hash) + USED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUsed()); + if (hasFiberUuid()) { + hash = (37 * hash) + FIBER_UUID_FIELD_NUMBER; + hash = (53 * hash) + getFiberUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - // @@protoc_insertion_point(class_scope:context.EndPointId) - private static final context.ContextOuterClass.EndPointId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointId(); - } + public static context.ContextOuterClass.Fiber parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static context.ContextOuterClass.EndPointId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Fiber parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public context.ContextOuterClass.EndPointId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.Fiber parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - } + public static context.ContextOuterClass.Fiber parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public interface EndPointOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.EndPoint) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.Fiber parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - boolean hasEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - context.ContextOuterClass.EndPointId getEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + public static context.ContextOuterClass.Fiber parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - /** - * string name = 2; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 2; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + public static context.ContextOuterClass.Fiber parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - /** - * string endpoint_type = 3; - * @return The endpointType. - */ - java.lang.String getEndpointType(); - /** - * string endpoint_type = 3; - * @return The bytes for endpointType. - */ - com.google.protobuf.ByteString - getEndpointTypeBytes(); + public static context.ContextOuterClass.Fiber parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return A list containing the kpiSampleTypes. - */ - java.util.List getKpiSampleTypesList(); - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return The count of kpiSampleTypes. - */ - int getKpiSampleTypesCount(); - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the element to return. - * @return The kpiSampleTypes at the given index. - */ - kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleTypes(int index); - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return A list containing the enum numeric values on the wire for kpiSampleTypes. - */ - java.util.List - getKpiSampleTypesValueList(); - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of kpiSampleTypes at the given index. - */ - int getKpiSampleTypesValue(int index); + public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - /** - * .context.Location endpoint_location = 5; - * @return Whether the endpointLocation field is set. - */ - boolean hasEndpointLocation(); - /** - * .context.Location endpoint_location = 5; - * @return The endpointLocation. - */ - context.ContextOuterClass.Location getEndpointLocation(); - /** - * .context.Location endpoint_location = 5; - */ - context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder(); - } - /** - * Protobuf type {@code context.EndPoint} - */ - public static final class EndPoint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.EndPoint) - EndPointOrBuilder { - private static final long serialVersionUID = 0L; - // Use EndPoint.newBuilder() to construct. - private EndPoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EndPoint() { - name_ = ""; - endpointType_ = ""; - kpiSampleTypes_ = java.util.Collections.emptyList(); - } + public static context.ContextOuterClass.Fiber parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EndPoint(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @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(); - 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(); - 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; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPoint.class, context.ContextOuterClass.EndPoint.Builder.class); - } + public static Builder newBuilder(context.ContextOuterClass.Fiber prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static final int ENDPOINT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.EndPointId endpointId_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - @java.lang.Override - public boolean hasEndpointId() { - return endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointId() { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; - /** - * string name = 2; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public static final int ENDPOINT_TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object endpointType_; - /** - * string endpoint_type = 3; - * @return The endpointType. - */ - @java.lang.Override - public java.lang.String getEndpointType() { - java.lang.Object ref = endpointType_; - 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(); - endpointType_ = s; - return s; - } - } - /** - * string endpoint_type = 3; - * @return The bytes for endpointType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEndpointTypeBytes() { - java.lang.Object ref = endpointType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * Protobuf type {@code context.Fiber} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.Fiber) + context.ContextOuterClass.FiberOrBuilder { - public static final int KPI_SAMPLE_TYPES_FIELD_NUMBER = 4; - private java.util.List 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); - return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; - } - }; - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return A list containing the kpiSampleTypes. - */ - @java.lang.Override - public java.util.List getKpiSampleTypesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, kpi_sample_types.KpiSampleTypes.KpiSampleType>(kpiSampleTypes_, kpiSampleTypes_converter_); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return The count of kpiSampleTypes. - */ - @java.lang.Override - public int getKpiSampleTypesCount() { - return kpiSampleTypes_.size(); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the element to return. - * @return The kpiSampleTypes at the given index. - */ - @java.lang.Override - public kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleTypes(int index) { - return kpiSampleTypes_converter_.convert(kpiSampleTypes_.get(index)); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return A list containing the enum numeric values on the wire for kpiSampleTypes. - */ - @java.lang.Override - public java.util.List - getKpiSampleTypesValueList() { - return kpiSampleTypes_; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of kpiSampleTypes at the given index. - */ - @java.lang.Override - public int getKpiSampleTypesValue(int index) { - return kpiSampleTypes_.get(index); - } - private int kpiSampleTypesMemoizedSerializedSize; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_Fiber_descriptor; + } - public static final int ENDPOINT_LOCATION_FIELD_NUMBER = 5; - private context.ContextOuterClass.Location endpointLocation_; - /** - * .context.Location endpoint_location = 5; - * @return Whether the endpointLocation field is set. - */ - @java.lang.Override - public boolean hasEndpointLocation() { - return endpointLocation_ != null; - } - /** - * .context.Location endpoint_location = 5; - * @return The endpointLocation. - */ - @java.lang.Override - public context.ContextOuterClass.Location getEndpointLocation() { - return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; - } - /** - * .context.Location endpoint_location = 5; - */ - @java.lang.Override - public context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder() { - return getEndpointLocation(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_Fiber_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.Fiber.class, context.ContextOuterClass.Fiber.Builder.class); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + // Construct using context.ContextOuterClass.Fiber.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - memoizedIsInitialized = 1; - return true; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (endpointId_ != null) { - output.writeMessage(1, getEndpointId()); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (!getEndpointTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointType_); - } - if (getKpiSampleTypesList().size() > 0) { - output.writeUInt32NoTag(34); - output.writeUInt32NoTag(kpiSampleTypesMemoizedSerializedSize); - } - for (int i = 0; i < kpiSampleTypes_.size(); i++) { - output.writeEnumNoTag(kpiSampleTypes_.get(i)); - } - if (endpointLocation_ != null) { - output.writeMessage(5, getEndpointLocation()); - } - unknownFields.writeTo(output); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (endpointId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEndpointId()); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (!getEndpointTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointType_); - } - { - int dataSize = 0; - for (int i = 0; i < kpiSampleTypes_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(kpiSampleTypes_.get(i)); - } - size += dataSize; - if (!getKpiSampleTypesList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }kpiSampleTypesMemoizedSerializedSize = dataSize; - } - if (endpointLocation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getEndpointLocation()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder clear() { + super.clear(); + 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; + fiberUuidBuilder_ = null; + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.EndPoint)) { - return super.equals(obj); - } - context.ContextOuterClass.EndPoint other = (context.ContextOuterClass.EndPoint) obj; - - if (hasEndpointId() != other.hasEndpointId()) return false; - if (hasEndpointId()) { - if (!getEndpointId() - .equals(other.getEndpointId())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getEndpointType() - .equals(other.getEndpointType())) return false; - if (!kpiSampleTypes_.equals(other.kpiSampleTypes_)) return false; - if (hasEndpointLocation() != other.hasEndpointLocation()) return false; - if (hasEndpointLocation()) { - if (!getEndpointLocation() - .equals(other.getEndpointLocation())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_Fiber_descriptor; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEndpointId()) { - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ENDPOINT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getEndpointType().hashCode(); - if (getKpiSampleTypesCount() > 0) { - hash = (37 * hash) + KPI_SAMPLE_TYPES_FIELD_NUMBER; - hash = (53 * hash) + kpiSampleTypes_.hashCode(); - } - if (hasEndpointLocation()) { - hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getEndpointLocation().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public context.ContextOuterClass.Fiber getDefaultInstanceForType() { + return context.ContextOuterClass.Fiber.getDefaultInstance(); + } - public static context.ContextOuterClass.EndPoint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPoint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPoint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPoint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPoint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPoint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPoint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPoint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPoint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPoint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPoint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPoint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public context.ContextOuterClass.Fiber build() { + context.ContextOuterClass.Fiber result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.EndPoint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @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)) { + cSlots_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cSlots_ = cSlots_; + if (((bitField0_ & 0x00000002) != 0)) { + lSlots_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.lSlots_ = lSlots_; + if (((bitField0_ & 0x00000004) != 0)) { + sSlots_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000004); + } + 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 - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.EndPoint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.EndPoint) - context.ContextOuterClass.EndPointOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_EndPoint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPoint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPoint.class, context.ContextOuterClass.EndPoint.Builder.class); - } - - // 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; - endpointIdBuilder_ = null; - } - name_ = ""; - - endpointType_ = ""; - - kpiSampleTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - if (endpointLocationBuilder_ == null) { - endpointLocation_ = null; - } else { - endpointLocation_ = null; - endpointLocationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_EndPoint_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.EndPoint getDefaultInstanceForType() { - return context.ContextOuterClass.EndPoint.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.EndPoint build() { - context.ContextOuterClass.EndPoint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.EndPoint) { - return mergeFrom((context.ContextOuterClass.EndPoint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.EndPoint other) { - if (other == context.ContextOuterClass.EndPoint.getDefaultInstance()) return this; - if (other.hasEndpointId()) { - mergeEndpointId(other.getEndpointId()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getEndpointType().isEmpty()) { - endpointType_ = other.endpointType_; - onChanged(); - } - if (!other.kpiSampleTypes_.isEmpty()) { - if (kpiSampleTypes_.isEmpty()) { - kpiSampleTypes_ = other.kpiSampleTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiSampleTypesIsMutable(); - kpiSampleTypes_.addAll(other.kpiSampleTypes_); - } - onChanged(); - } - if (other.hasEndpointLocation()) { - mergeEndpointLocation(other.getEndpointLocation()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPoint) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - public context.ContextOuterClass.EndPointId getEndpointId() { - if (endpointIdBuilder_ == null) { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } else { - return endpointIdBuilder_.getMessage(); - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - onChanged(); - } else { - endpointIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdBuilder_ == null) { - endpointId_ = builderForValue.build(); - onChanged(); - } else { - endpointIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = - context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); - } else { - endpointId_ = value; - } - onChanged(); - } else { - endpointIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { - - onChanged(); - return getEndpointIdFieldBuilder().getBuilder(); - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - if (endpointIdBuilder_ != null) { - return endpointIdBuilder_.getMessageOrBuilder(); - } else { - return endpointId_ == null ? - context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> - getEndpointIdFieldBuilder() { - if (endpointIdBuilder_ == null) { - endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>( - getEndpointId(), - getParentForChildren(), - isClean()); - endpointId_ = null; - } - return endpointIdBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * string name = 2; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 2; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 2; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 2; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 2; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object endpointType_ = ""; - /** - * string endpoint_type = 3; - * @return The endpointType. - */ - public java.lang.String getEndpointType() { - java.lang.Object ref = endpointType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string endpoint_type = 3; - * @return The bytes for endpointType. - */ - public com.google.protobuf.ByteString - getEndpointTypeBytes() { - java.lang.Object ref = endpointType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string endpoint_type = 3; - * @param value The endpointType to set. - * @return This builder for chaining. - */ - public Builder setEndpointType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - endpointType_ = value; - onChanged(); - return this; - } - /** - * string endpoint_type = 3; - * @return This builder for chaining. - */ - public Builder clearEndpointType() { - - endpointType_ = getDefaultInstance().getEndpointType(); - onChanged(); - return this; - } - /** - * string endpoint_type = 3; - * @param value The bytes for endpointType to set. - * @return This builder for chaining. - */ - public Builder setEndpointTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - endpointType_ = value; - onChanged(); - return this; - } - - private java.util.List kpiSampleTypes_ = - java.util.Collections.emptyList(); - private void ensureKpiSampleTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiSampleTypes_ = new java.util.ArrayList(kpiSampleTypes_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return A list containing the kpiSampleTypes. - */ - public java.util.List getKpiSampleTypesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, kpi_sample_types.KpiSampleTypes.KpiSampleType>(kpiSampleTypes_, kpiSampleTypes_converter_); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return The count of kpiSampleTypes. - */ - public int getKpiSampleTypesCount() { - return kpiSampleTypes_.size(); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the element to return. - * @return The kpiSampleTypes at the given index. - */ - public kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleTypes(int index) { - return kpiSampleTypes_converter_.convert(kpiSampleTypes_.get(index)); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index to set the value at. - * @param value The kpiSampleTypes to set. - * @return This builder for chaining. - */ - public Builder setKpiSampleTypes( - int index, kpi_sample_types.KpiSampleTypes.KpiSampleType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiSampleTypesIsMutable(); - kpiSampleTypes_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param value The kpiSampleTypes to add. - * @return This builder for chaining. - */ - public Builder addKpiSampleTypes(kpi_sample_types.KpiSampleTypes.KpiSampleType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiSampleTypesIsMutable(); - kpiSampleTypes_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param values The kpiSampleTypes to add. - * @return This builder for chaining. - */ - public Builder addAllKpiSampleTypes( - java.lang.Iterable values) { - ensureKpiSampleTypesIsMutable(); - for (kpi_sample_types.KpiSampleTypes.KpiSampleType value : values) { - kpiSampleTypes_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return This builder for chaining. - */ - public Builder clearKpiSampleTypes() { - kpiSampleTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @return A list containing the enum numeric values on the wire for kpiSampleTypes. - */ - public java.util.List - getKpiSampleTypesValueList() { - return java.util.Collections.unmodifiableList(kpiSampleTypes_); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of kpiSampleTypes at the given index. - */ - public int getKpiSampleTypesValue(int index) { - return kpiSampleTypes_.get(index); - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of kpiSampleTypes at the given index. - * @return This builder for chaining. - */ - public Builder setKpiSampleTypesValue( - int index, int value) { - ensureKpiSampleTypesIsMutable(); - kpiSampleTypes_.set(index, value); - onChanged(); - return this; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param value The enum numeric value on the wire for kpiSampleTypes to add. - * @return This builder for chaining. - */ - public Builder addKpiSampleTypesValue(int value) { - ensureKpiSampleTypesIsMutable(); - kpiSampleTypes_.add(value); - onChanged(); - return this; - } - /** - * repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4; - * @param values The enum numeric values on the wire for kpiSampleTypes to add. - * @return This builder for chaining. - */ - public Builder addAllKpiSampleTypesValue( - java.lang.Iterable values) { - ensureKpiSampleTypesIsMutable(); - for (int value : values) { - kpiSampleTypes_.add(value); - } - onChanged(); - return this; - } - - private context.ContextOuterClass.Location endpointLocation_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Location, context.ContextOuterClass.Location.Builder, context.ContextOuterClass.LocationOrBuilder> endpointLocationBuilder_; - /** - * .context.Location endpoint_location = 5; - * @return Whether the endpointLocation field is set. - */ - public boolean hasEndpointLocation() { - return endpointLocationBuilder_ != null || endpointLocation_ != null; - } - /** - * .context.Location endpoint_location = 5; - * @return The endpointLocation. - */ - public context.ContextOuterClass.Location getEndpointLocation() { - if (endpointLocationBuilder_ == null) { - return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; - } else { - return endpointLocationBuilder_.getMessage(); - } - } - /** - * .context.Location endpoint_location = 5; - */ - public Builder setEndpointLocation(context.ContextOuterClass.Location value) { - if (endpointLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointLocation_ = value; - onChanged(); - } else { - endpointLocationBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Location endpoint_location = 5; - */ - public Builder setEndpointLocation( - context.ContextOuterClass.Location.Builder builderForValue) { - if (endpointLocationBuilder_ == null) { - endpointLocation_ = builderForValue.build(); - onChanged(); - } else { - endpointLocationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Location endpoint_location = 5; - */ - public Builder mergeEndpointLocation(context.ContextOuterClass.Location value) { - if (endpointLocationBuilder_ == null) { - if (endpointLocation_ != null) { - endpointLocation_ = - context.ContextOuterClass.Location.newBuilder(endpointLocation_).mergeFrom(value).buildPartial(); - } else { - endpointLocation_ = value; - } - onChanged(); - } else { - endpointLocationBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Location endpoint_location = 5; - */ - public Builder clearEndpointLocation() { - if (endpointLocationBuilder_ == null) { - endpointLocation_ = null; - onChanged(); - } else { - endpointLocation_ = null; - endpointLocationBuilder_ = null; - } - - return this; - } - /** - * .context.Location endpoint_location = 5; - */ - public context.ContextOuterClass.Location.Builder getEndpointLocationBuilder() { - - onChanged(); - return getEndpointLocationFieldBuilder().getBuilder(); - } - /** - * .context.Location endpoint_location = 5; - */ - public context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder() { - if (endpointLocationBuilder_ != null) { - return endpointLocationBuilder_.getMessageOrBuilder(); - } else { - return endpointLocation_ == null ? - context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; - } - } - /** - * .context.Location endpoint_location = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Location, context.ContextOuterClass.Location.Builder, context.ContextOuterClass.LocationOrBuilder> - getEndpointLocationFieldBuilder() { - if (endpointLocationBuilder_ == null) { - endpointLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Location, context.ContextOuterClass.Location.Builder, context.ContextOuterClass.LocationOrBuilder>( - getEndpointLocation(), - getParentForChildren(), - isClean()); - endpointLocation_ = null; - } - return endpointLocationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.EndPoint) - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - // @@protoc_insertion_point(class_scope:context.EndPoint) - private static final context.ContextOuterClass.EndPoint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.EndPoint(); - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static context.ContextOuterClass.EndPoint getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @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 context.ContextOuterClass.EndPoint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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.Fiber) { + return mergeFrom((context.ContextOuterClass.Fiber) other); + } else { + super.mergeFrom(other); + return this; + } + } - public interface EndPointNameOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.EndPointName) - com.google.protobuf.MessageOrBuilder { + public Builder mergeFrom(context.ContextOuterClass.Fiber other) { + if (other == context.ContextOuterClass.Fiber.getDefaultInstance()) + return this; + if (!other.getID().isEmpty()) { + iD_ = other.iD_; + onChanged(); + } + if (!other.getSrcPort().isEmpty()) { + srcPort_ = other.srcPort_; + onChanged(); + } + if (!other.getDstPort().isEmpty()) { + dstPort_ = other.dstPort_; + onChanged(); + } + if (!other.getLocalPeerPort().isEmpty()) { + localPeerPort_ = other.localPeerPort_; + onChanged(); + } + if (!other.getRemotePeerPort().isEmpty()) { + remotePeerPort_ = other.remotePeerPort_; + onChanged(); + } + if (!other.cSlots_.isEmpty()) { + if (cSlots_.isEmpty()) { + cSlots_ = other.cSlots_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCSlotsIsMutable(); + cSlots_.addAll(other.cSlots_); + } + onChanged(); + } + if (!other.lSlots_.isEmpty()) { + if (lSlots_.isEmpty()) { + lSlots_ = other.lSlots_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLSlotsIsMutable(); + lSlots_.addAll(other.lSlots_); + } + onChanged(); + } + if (!other.sSlots_.isEmpty()) { + if (sSlots_.isEmpty()) { + sSlots_ = other.sSlots_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSSlotsIsMutable(); + sSlots_.addAll(other.sSlots_); + } + onChanged(); + } + if (other.getLength() != 0F) { + setLength(other.getLength()); + } + if (other.getUsed() != false) { + setUsed(other.getUsed()); + } + if (other.hasFiberUuid()) { + mergeFiberUuid(other.getFiberUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - boolean hasEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - context.ContextOuterClass.EndPointId getEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * string device_name = 2; - * @return The deviceName. - */ - java.lang.String getDeviceName(); - /** - * string device_name = 2; - * @return The bytes for deviceName. - */ - com.google.protobuf.ByteString - getDeviceNameBytes(); + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.Fiber) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - /** - * string endpoint_name = 3; - * @return The endpointName. - */ - java.lang.String getEndpointName(); - /** - * string endpoint_name = 3; - * @return The bytes for endpointName. - */ - com.google.protobuf.ByteString - getEndpointNameBytes(); + private int bitField0_; + + private java.lang.Object iD_ = ""; + + /** + * string ID = 10; + * @return The iD. + */ + public java.lang.String getID() { + java.lang.Object ref = iD_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iD_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * string endpoint_type = 4; - * @return The endpointType. - */ - java.lang.String getEndpointType(); - /** - * string endpoint_type = 4; - * @return The bytes for endpointType. - */ - com.google.protobuf.ByteString - getEndpointTypeBytes(); - } - /** - * Protobuf type {@code context.EndPointName} - */ - public static final class EndPointName extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.EndPointName) - EndPointNameOrBuilder { - private static final long serialVersionUID = 0L; - // Use EndPointName.newBuilder() to construct. - private EndPointName(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EndPointName() { - deviceName_ = ""; - endpointName_ = ""; - endpointType_ = ""; - } + /** + * string ID = 10; + * @return The bytes for iD. + */ + public com.google.protobuf.ByteString getIDBytes() { + java.lang.Object ref = iD_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iD_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EndPointName(); - } + /** + * string ID = 10; + * @param value The iD to set. + * @return This builder for chaining. + */ + public Builder setID(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + iD_ = value; + onChanged(); + return this; + } - @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; - } + /** + * string ID = 10; + * @return This builder for chaining. + */ + public Builder clearID() { + iD_ = getDefaultInstance().getID(); + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointName_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointName.class, context.ContextOuterClass.EndPointName.Builder.class); - } + /** + * string ID = 10; + * @param value The bytes for iD to set. + * @return This builder for chaining. + */ + public Builder setIDBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + iD_ = value; + onChanged(); + return this; + } - public static final int ENDPOINT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.EndPointId endpointId_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - @java.lang.Override - public boolean hasEndpointId() { - return endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointId() { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); - } + private java.lang.Object srcPort_ = ""; + + /** + * string src_port = 1; + * @return The srcPort. + */ + public java.lang.String getSrcPort() { + java.lang.Object ref = srcPort_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcPort_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static final int DEVICE_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object deviceName_; - /** - * string device_name = 2; - * @return The deviceName. - */ - @java.lang.Override - public java.lang.String getDeviceName() { - java.lang.Object ref = deviceName_; - 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(); - deviceName_ = s; - return s; - } - } - /** - * string device_name = 2; - * @return The bytes for deviceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDeviceNameBytes() { - java.lang.Object ref = deviceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deviceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * string src_port = 1; + * @return The bytes for srcPort. + */ + public com.google.protobuf.ByteString getSrcPortBytes() { + java.lang.Object ref = srcPort_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static final int ENDPOINT_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object endpointName_; - /** - * string endpoint_name = 3; - * @return The endpointName. - */ - @java.lang.Override - public java.lang.String getEndpointName() { - java.lang.Object ref = endpointName_; - 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(); - endpointName_ = s; - return s; - } - } - /** - * string endpoint_name = 3; - * @return The bytes for endpointName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEndpointNameBytes() { - java.lang.Object ref = endpointName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * string src_port = 1; + * @param value The srcPort to set. + * @return This builder for chaining. + */ + public Builder setSrcPort(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + srcPort_ = value; + onChanged(); + return this; + } - public static final int ENDPOINT_TYPE_FIELD_NUMBER = 4; - private volatile java.lang.Object endpointType_; - /** - * string endpoint_type = 4; - * @return The endpointType. - */ - @java.lang.Override - public java.lang.String getEndpointType() { - java.lang.Object ref = endpointType_; - 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(); - endpointType_ = s; - return s; - } - } - /** - * string endpoint_type = 4; - * @return The bytes for endpointType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getEndpointTypeBytes() { - java.lang.Object ref = endpointType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * string src_port = 1; + * @return This builder for chaining. + */ + public Builder clearSrcPort() { + srcPort_ = getDefaultInstance().getSrcPort(); + onChanged(); + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * string src_port = 1; + * @param value The bytes for srcPort to set. + * @return This builder for chaining. + */ + public Builder setSrcPortBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + srcPort_ = value; + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + private java.lang.Object dstPort_ = ""; + + /** + * string dst_port = 2; + * @return The dstPort. + */ + public java.lang.String getDstPort() { + java.lang.Object ref = dstPort_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dstPort_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (endpointId_ != null) { - output.writeMessage(1, getEndpointId()); - } - if (!getDeviceNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceName_); - } - if (!getEndpointNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointName_); - } - if (!getEndpointTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, endpointType_); - } - unknownFields.writeTo(output); - } + /** + * string dst_port = 2; + * @return The bytes for dstPort. + */ + public com.google.protobuf.ByteString getDstPortBytes() { + java.lang.Object ref = dstPort_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dstPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (endpointId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEndpointId()); - } - if (!getDeviceNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceName_); - } - if (!getEndpointNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointName_); - } - if (!getEndpointTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, endpointType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * string dst_port = 2; + * @param value The dstPort to set. + * @return This builder for chaining. + */ + public Builder setDstPort(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dstPort_ = value; + onChanged(); + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.EndPointName)) { - return super.equals(obj); - } - context.ContextOuterClass.EndPointName other = (context.ContextOuterClass.EndPointName) obj; - - if (hasEndpointId() != other.hasEndpointId()) return false; - if (hasEndpointId()) { - if (!getEndpointId() - .equals(other.getEndpointId())) return false; - } - if (!getDeviceName() - .equals(other.getDeviceName())) return false; - if (!getEndpointName() - .equals(other.getEndpointName())) return false; - if (!getEndpointType() - .equals(other.getEndpointType())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string dst_port = 2; + * @return This builder for chaining. + */ + public Builder clearDstPort() { + dstPort_ = getDefaultInstance().getDstPort(); + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEndpointId()) { - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - } - hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDeviceName().hashCode(); - hash = (37 * hash) + ENDPOINT_NAME_FIELD_NUMBER; - hash = (53 * hash) + getEndpointName().hashCode(); - hash = (37 * hash) + ENDPOINT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getEndpointType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * string dst_port = 2; + * @param value The bytes for dstPort to set. + * @return This builder for chaining. + */ + public Builder setDstPortBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dstPort_ = value; + onChanged(); + return this; + } - public static context.ContextOuterClass.EndPointName parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointName parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointName parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointName parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointName parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointName parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointName parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointName parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointName parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointName parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointName parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointName parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private java.lang.Object localPeerPort_ = ""; + + /** + * string local_peer_port = 3; + * @return The localPeerPort. + */ + public java.lang.String getLocalPeerPort() { + java.lang.Object ref = localPeerPort_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + localPeerPort_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.EndPointName prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * string local_peer_port = 3; + * @return The bytes for localPeerPort. + */ + public com.google.protobuf.ByteString getLocalPeerPortBytes() { + java.lang.Object ref = localPeerPort_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + localPeerPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.EndPointName} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.EndPointName) - context.ContextOuterClass.EndPointNameOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_EndPointName_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointName_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointName.class, context.ContextOuterClass.EndPointName.Builder.class); - } - - // 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; - endpointIdBuilder_ = null; - } - deviceName_ = ""; - - endpointName_ = ""; - - endpointType_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_EndPointName_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.EndPointName getDefaultInstanceForType() { - return context.ContextOuterClass.EndPointName.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.EndPointName build() { - context.ContextOuterClass.EndPointName result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.EndPointName) { - return mergeFrom((context.ContextOuterClass.EndPointName)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.EndPointName other) { - if (other == context.ContextOuterClass.EndPointName.getDefaultInstance()) return this; - if (other.hasEndpointId()) { - mergeEndpointId(other.getEndpointId()); - } - if (!other.getDeviceName().isEmpty()) { - deviceName_ = other.deviceName_; - onChanged(); - } - if (!other.getEndpointName().isEmpty()) { - endpointName_ = other.endpointName_; - onChanged(); - } - if (!other.getEndpointType().isEmpty()) { - endpointType_ = other.endpointType_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPointName) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.EndPointId endpointId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - public context.ContextOuterClass.EndPointId getEndpointId() { - if (endpointIdBuilder_ == null) { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } else { - return endpointIdBuilder_.getMessage(); - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - onChanged(); - } else { - endpointIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdBuilder_ == null) { - endpointId_ = builderForValue.build(); - onChanged(); - } else { - endpointIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = - context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); - } else { - endpointId_ = value; - } - onChanged(); - } else { - endpointIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { - - onChanged(); - return getEndpointIdFieldBuilder().getBuilder(); - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - if (endpointIdBuilder_ != null) { - return endpointIdBuilder_.getMessageOrBuilder(); - } else { - return endpointId_ == null ? - context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> - getEndpointIdFieldBuilder() { - if (endpointIdBuilder_ == null) { - endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>( - getEndpointId(), - getParentForChildren(), - isClean()); - endpointId_ = null; - } - return endpointIdBuilder_; - } - - private java.lang.Object deviceName_ = ""; - /** - * string device_name = 2; - * @return The deviceName. - */ - public java.lang.String getDeviceName() { - java.lang.Object ref = deviceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - deviceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string device_name = 2; - * @return The bytes for deviceName. - */ - public com.google.protobuf.ByteString - getDeviceNameBytes() { - java.lang.Object ref = deviceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deviceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string device_name = 2; - * @param value The deviceName to set. - * @return This builder for chaining. - */ - public Builder setDeviceName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - deviceName_ = value; - onChanged(); - return this; - } - /** - * string device_name = 2; - * @return This builder for chaining. - */ - public Builder clearDeviceName() { - - deviceName_ = getDefaultInstance().getDeviceName(); - onChanged(); - return this; - } - /** - * string device_name = 2; - * @param value The bytes for deviceName to set. - * @return This builder for chaining. - */ - public Builder setDeviceNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - deviceName_ = value; - onChanged(); - return this; - } - - private java.lang.Object endpointName_ = ""; - /** - * string endpoint_name = 3; - * @return The endpointName. - */ - public java.lang.String getEndpointName() { - java.lang.Object ref = endpointName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string endpoint_name = 3; - * @return The bytes for endpointName. - */ - public com.google.protobuf.ByteString - getEndpointNameBytes() { - java.lang.Object ref = endpointName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string endpoint_name = 3; - * @param value The endpointName to set. - * @return This builder for chaining. - */ - public Builder setEndpointName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - endpointName_ = value; - onChanged(); - return this; - } - /** - * string endpoint_name = 3; - * @return This builder for chaining. - */ - public Builder clearEndpointName() { - - endpointName_ = getDefaultInstance().getEndpointName(); - onChanged(); - return this; - } - /** - * string endpoint_name = 3; - * @param value The bytes for endpointName to set. - * @return This builder for chaining. - */ - public Builder setEndpointNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - endpointName_ = value; - onChanged(); - return this; - } - - private java.lang.Object endpointType_ = ""; - /** - * string endpoint_type = 4; - * @return The endpointType. - */ - public java.lang.String getEndpointType() { - java.lang.Object ref = endpointType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - endpointType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string endpoint_type = 4; - * @return The bytes for endpointType. - */ - public com.google.protobuf.ByteString - getEndpointTypeBytes() { - java.lang.Object ref = endpointType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - endpointType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string endpoint_type = 4; - * @param value The endpointType to set. - * @return This builder for chaining. - */ - public Builder setEndpointType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - endpointType_ = value; - onChanged(); - return this; - } - /** - * string endpoint_type = 4; - * @return This builder for chaining. - */ - public Builder clearEndpointType() { - - endpointType_ = getDefaultInstance().getEndpointType(); - onChanged(); - return this; - } - /** - * string endpoint_type = 4; - * @param value The bytes for endpointType to set. - * @return This builder for chaining. - */ - public Builder setEndpointTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - endpointType_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.EndPointName) - } + /** + * string local_peer_port = 3; + * @param value The localPeerPort to set. + * @return This builder for chaining. + */ + public Builder setLocalPeerPort(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + localPeerPort_ = value; + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:context.EndPointName) - private static final context.ContextOuterClass.EndPointName DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointName(); - } + /** + * string local_peer_port = 3; + * @return This builder for chaining. + */ + public Builder clearLocalPeerPort() { + localPeerPort_ = getDefaultInstance().getLocalPeerPort(); + onChanged(); + return this; + } - public static context.ContextOuterClass.EndPointName getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * string local_peer_port = 3; + * @param value The bytes for localPeerPort to set. + * @return This builder for chaining. + */ + public Builder setLocalPeerPortBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + localPeerPort_ = value; + onChanged(); + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private java.lang.Object remotePeerPort_ = ""; + + /** + * string remote_peer_port = 4; + * @return The remotePeerPort. + */ + public java.lang.String getRemotePeerPort() { + java.lang.Object ref = remotePeerPort_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remotePeerPort_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * string remote_peer_port = 4; + * @return The bytes for remotePeerPort. + */ + public com.google.protobuf.ByteString getRemotePeerPortBytes() { + java.lang.Object ref = remotePeerPort_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remotePeerPort_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public context.ContextOuterClass.EndPointName getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * string remote_peer_port = 4; + * @param value The remotePeerPort to set. + * @return This builder for chaining. + */ + public Builder setRemotePeerPort(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + remotePeerPort_ = value; + onChanged(); + return this; + } - } + /** + * string remote_peer_port = 4; + * @return This builder for chaining. + */ + public Builder clearRemotePeerPort() { + remotePeerPort_ = getDefaultInstance().getRemotePeerPort(); + onChanged(); + return this; + } - public interface EndPointIdListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.EndPointIdList) - com.google.protobuf.MessageOrBuilder { + /** + * string remote_peer_port = 4; + * @param value The bytes for remotePeerPort to set. + * @return This builder for chaining. + */ + public Builder setRemotePeerPortBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + remotePeerPort_ = value; + onChanged(); + return this; + } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - java.util.List - getEndpointIdsList(); - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - context.ContextOuterClass.EndPointId getEndpointIds(int index); - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - int getEndpointIdsCount(); - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - java.util.List - getEndpointIdsOrBuilderList(); - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.EndPointIdList} - */ - public static final class EndPointIdList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.EndPointIdList) - EndPointIdListOrBuilder { - private static final long serialVersionUID = 0L; - // Use EndPointIdList.newBuilder() to construct. - private EndPointIdList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EndPointIdList() { - endpointIds_ = java.util.Collections.emptyList(); - } + private com.google.protobuf.Internal.IntList cSlots_ = emptyIntList(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EndPointIdList(); - } + private void ensureCSlotsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cSlots_ = mutableCopy(cSlots_); + bitField0_ |= 0x00000001; + } + } - @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(); - 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; - } + /** + * repeated int32 c_slots = 5; + * @return A list containing the cSlots. + */ + public java.util.List getCSlotsList() { + return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(cSlots_) : cSlots_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointIdList.class, context.ContextOuterClass.EndPointIdList.Builder.class); - } + /** + * repeated int32 c_slots = 5; + * @return The count of cSlots. + */ + public int getCSlotsCount() { + return cSlots_.size(); + } - public static final int ENDPOINT_IDS_FIELD_NUMBER = 1; - private java.util.List endpointIds_; - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - @java.lang.Override - public java.util.List getEndpointIdsList() { - return endpointIds_; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - @java.lang.Override - public java.util.List - getEndpointIdsOrBuilderList() { - return endpointIds_; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - @java.lang.Override - public int getEndpointIdsCount() { - return endpointIds_.size(); - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointIds(int index) { - return endpointIds_.get(index); - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder( - int index) { - return endpointIds_.get(index); - } + /** + * repeated int32 c_slots = 5; + * @param index The index of the element to return. + * @return The cSlots at the given index. + */ + public int getCSlots(int index) { + return cSlots_.getInt(index); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated int32 c_slots = 5; + * @param index The index to set the value at. + * @param value The cSlots to set. + * @return This builder for chaining. + */ + public Builder setCSlots(int index, int value) { + ensureCSlotsIsMutable(); + cSlots_.setInt(index, value); + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated int32 c_slots = 5; + * @param value The cSlots to add. + * @return This builder for chaining. + */ + public Builder addCSlots(int value) { + ensureCSlotsIsMutable(); + cSlots_.addInt(value); + onChanged(); + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < endpointIds_.size(); i++) { - output.writeMessage(1, endpointIds_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * repeated int32 c_slots = 5; + * @param values The cSlots to add. + * @return This builder for chaining. + */ + public Builder addAllCSlots(java.lang.Iterable values) { + ensureCSlotsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cSlots_); + onChanged(); + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < endpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, endpointIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated int32 c_slots = 5; + * @return This builder for chaining. + */ + public Builder clearCSlots() { + cSlots_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.EndPointIdList)) { - return super.equals(obj); - } - context.ContextOuterClass.EndPointIdList other = (context.ContextOuterClass.EndPointIdList) obj; - - if (!getEndpointIdsList() - .equals(other.getEndpointIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private com.google.protobuf.Internal.IntList lSlots_ = emptyIntList(); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getEndpointIdsCount() > 0) { - hash = (37 * hash) + ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getEndpointIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private void ensureLSlotsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + lSlots_ = mutableCopy(lSlots_); + bitField0_ |= 0x00000002; + } + } - public static context.ContextOuterClass.EndPointIdList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointIdList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointIdList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointIdList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointIdList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointIdList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated int32 l_slots = 6; + * @return A list containing the lSlots. + */ + public java.util.List getLSlotsList() { + return ((bitField0_ & 0x00000002) != 0) ? java.util.Collections.unmodifiableList(lSlots_) : lSlots_; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.EndPointIdList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated int32 l_slots = 6; + * @return The count of lSlots. + */ + public int getLSlotsCount() { + return lSlots_.size(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.EndPointIdList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.EndPointIdList) - context.ContextOuterClass.EndPointIdListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_EndPointIdList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointIdList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointIdList.class, context.ContextOuterClass.EndPointIdList.Builder.class); - } - - // 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(); - if (endpointIdsBuilder_ == null) { - endpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - endpointIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_EndPointIdList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.EndPointIdList getDefaultInstanceForType() { - return context.ContextOuterClass.EndPointIdList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.EndPointIdList build() { - context.ContextOuterClass.EndPointIdList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.EndPointIdList buildPartial() { - context.ContextOuterClass.EndPointIdList result = new context.ContextOuterClass.EndPointIdList(this); - int from_bitField0_ = bitField0_; - if (endpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.endpointIds_ = endpointIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.EndPointIdList) { - return mergeFrom((context.ContextOuterClass.EndPointIdList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.EndPointIdList other) { - if (other == context.ContextOuterClass.EndPointIdList.getDefaultInstance()) return this; - if (endpointIdsBuilder_ == null) { - if (!other.endpointIds_.isEmpty()) { - if (endpointIds_.isEmpty()) { - endpointIds_ = other.endpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureEndpointIdsIsMutable(); - endpointIds_.addAll(other.endpointIds_); - } - onChanged(); - } - } else { - if (!other.endpointIds_.isEmpty()) { - if (endpointIdsBuilder_.isEmpty()) { - endpointIdsBuilder_.dispose(); - endpointIdsBuilder_ = null; - endpointIds_ = other.endpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); - endpointIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEndpointIdsFieldBuilder() : null; - } else { - endpointIdsBuilder_.addAllMessages(other.endpointIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPointIdList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List endpointIds_ = - java.util.Collections.emptyList(); - private void ensureEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - endpointIds_ = new java.util.ArrayList(endpointIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdsBuilder_; - - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public java.util.List getEndpointIdsList() { - if (endpointIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(endpointIds_); - } else { - return endpointIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public int getEndpointIdsCount() { - if (endpointIdsBuilder_ == null) { - return endpointIds_.size(); - } else { - return endpointIdsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public context.ContextOuterClass.EndPointId getEndpointIds(int index) { - if (endpointIdsBuilder_ == null) { - return endpointIds_.get(index); - } else { - return endpointIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder setEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (endpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointIdsIsMutable(); - endpointIds_.set(index, value); - onChanged(); - } else { - endpointIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder setEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.set(index, builderForValue.build()); - onChanged(); - } else { - endpointIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder addEndpointIds(context.ContextOuterClass.EndPointId value) { - if (endpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointIdsIsMutable(); - endpointIds_.add(value); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder addEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (endpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointIdsIsMutable(); - endpointIds_.add(index, value); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder addEndpointIds( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.add(builderForValue.build()); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder addEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.add(index, builderForValue.build()); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder addAllEndpointIds( - java.lang.Iterable values) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, endpointIds_); - onChanged(); - } else { - endpointIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder clearEndpointIds() { - if (endpointIdsBuilder_ == null) { - endpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - endpointIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public Builder removeEndpointIds(int index) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.remove(index); - onChanged(); - } else { - endpointIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdsBuilder( - int index) { - return getEndpointIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder( - int index) { - if (endpointIdsBuilder_ == null) { - return endpointIds_.get(index); } else { - return endpointIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public java.util.List - getEndpointIdsOrBuilderList() { - if (endpointIdsBuilder_ != null) { - return endpointIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(endpointIds_); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder() { - return getEndpointIdsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder( - int index) { - return getEndpointIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId endpoint_ids = 1; - */ - public java.util.List - getEndpointIdsBuilderList() { - return getEndpointIdsFieldBuilder().getBuilderList(); - } - 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_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - endpointIds_ = null; - } - return endpointIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.EndPointIdList) - } + /** + * repeated int32 l_slots = 6; + * @param index The index of the element to return. + * @return The lSlots at the given index. + */ + public int getLSlots(int index) { + return lSlots_.getInt(index); + } - // @@protoc_insertion_point(class_scope:context.EndPointIdList) - private static final context.ContextOuterClass.EndPointIdList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointIdList(); - } + /** + * repeated int32 l_slots = 6; + * @param index The index to set the value at. + * @param value The lSlots to set. + * @return This builder for chaining. + */ + public Builder setLSlots(int index, int value) { + ensureLSlotsIsMutable(); + lSlots_.setInt(index, value); + onChanged(); + return this; + } - public static context.ContextOuterClass.EndPointIdList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated int32 l_slots = 6; + * @param value The lSlots to add. + * @return This builder for chaining. + */ + public Builder addLSlots(int value) { + ensureLSlotsIsMutable(); + lSlots_.addInt(value); + onChanged(); + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated int32 l_slots = 6; + * @param values The lSlots to add. + * @return This builder for chaining. + */ + public Builder addAllLSlots(java.lang.Iterable values) { + ensureLSlotsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, lSlots_); + onChanged(); + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated int32 l_slots = 6; + * @return This builder for chaining. + */ + public Builder clearLSlots() { + lSlots_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } - @java.lang.Override - public context.ContextOuterClass.EndPointIdList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.Internal.IntList sSlots_ = emptyIntList(); - } + private void ensureSSlotsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + sSlots_ = mutableCopy(sSlots_); + bitField0_ |= 0x00000004; + } + } - public interface EndPointNameListOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.EndPointNameList) - com.google.protobuf.MessageOrBuilder { + /** + * repeated int32 s_slots = 7; + * @return A list containing the sSlots. + */ + public java.util.List getSSlotsList() { + return ((bitField0_ & 0x00000004) != 0) ? java.util.Collections.unmodifiableList(sSlots_) : sSlots_; + } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - java.util.List - getEndpointNamesList(); - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - context.ContextOuterClass.EndPointName getEndpointNames(int index); - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - int getEndpointNamesCount(); - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - java.util.List - getEndpointNamesOrBuilderList(); - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - context.ContextOuterClass.EndPointNameOrBuilder getEndpointNamesOrBuilder( - int index); - } - /** - * Protobuf type {@code context.EndPointNameList} - */ - public static final class EndPointNameList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.EndPointNameList) - EndPointNameListOrBuilder { - private static final long serialVersionUID = 0L; - // Use EndPointNameList.newBuilder() to construct. - private EndPointNameList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EndPointNameList() { - endpointNames_ = java.util.Collections.emptyList(); - } + /** + * repeated int32 s_slots = 7; + * @return The count of sSlots. + */ + public int getSSlotsCount() { + return sSlots_.size(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EndPointNameList(); - } + /** + * repeated int32 s_slots = 7; + * @param index The index of the element to return. + * @return The sSlots at the given index. + */ + public int getSSlots(int index) { + return sSlots_.getInt(index); + } - @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(); - 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; - } + /** + * repeated int32 s_slots = 7; + * @param index The index to set the value at. + * @param value The sSlots to set. + * @return This builder for chaining. + */ + public Builder setSSlots(int index, int value) { + ensureSSlotsIsMutable(); + sSlots_.setInt(index, value); + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointNameList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointNameList.class, context.ContextOuterClass.EndPointNameList.Builder.class); - } + /** + * repeated int32 s_slots = 7; + * @param value The sSlots to add. + * @return This builder for chaining. + */ + public Builder addSSlots(int value) { + ensureSSlotsIsMutable(); + sSlots_.addInt(value); + onChanged(); + return this; + } - public static final int ENDPOINT_NAMES_FIELD_NUMBER = 1; - private java.util.List endpointNames_; - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - @java.lang.Override - public java.util.List getEndpointNamesList() { - return endpointNames_; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - @java.lang.Override - public java.util.List - getEndpointNamesOrBuilderList() { - return endpointNames_; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - @java.lang.Override - public int getEndpointNamesCount() { - return endpointNames_.size(); - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointName getEndpointNames(int index) { - return endpointNames_.get(index); - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointNameOrBuilder getEndpointNamesOrBuilder( - int index) { - return endpointNames_.get(index); - } + /** + * repeated int32 s_slots = 7; + * @param values The sSlots to add. + * @return This builder for chaining. + */ + public Builder addAllSSlots(java.lang.Iterable values) { + ensureSSlotsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sSlots_); + onChanged(); + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated int32 s_slots = 7; + * @return This builder for chaining. + */ + public Builder clearSSlots() { + sSlots_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + private float length_; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < endpointNames_.size(); i++) { - output.writeMessage(1, endpointNames_.get(i)); - } - unknownFields.writeTo(output); - } + /** + * float length = 8; + * @return The length. + */ + @java.lang.Override + public float getLength() { + return length_; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < endpointNames_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, endpointNames_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * float length = 8; + * @param value The length to set. + * @return This builder for chaining. + */ + public Builder setLength(float value) { + length_ = value; + onChanged(); + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.EndPointNameList)) { - return super.equals(obj); - } - context.ContextOuterClass.EndPointNameList other = (context.ContextOuterClass.EndPointNameList) obj; - - if (!getEndpointNamesList() - .equals(other.getEndpointNamesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * float length = 8; + * @return This builder for chaining. + */ + public Builder clearLength() { + length_ = 0F; + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getEndpointNamesCount() > 0) { - hash = (37 * hash) + ENDPOINT_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getEndpointNamesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private boolean used_; - public static context.ContextOuterClass.EndPointNameList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointNameList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.EndPointNameList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointNameList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointNameList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.EndPointNameList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * bool used = 9; + * @return The used. + */ + @java.lang.Override + public boolean getUsed() { + return used_; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.EndPointNameList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * bool used = 9; + * @param value The used to set. + * @return This builder for chaining. + */ + public Builder setUsed(boolean value) { + used_ = value; + onChanged(); + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.EndPointNameList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.EndPointNameList) - context.ContextOuterClass.EndPointNameListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_EndPointNameList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_EndPointNameList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.EndPointNameList.class, context.ContextOuterClass.EndPointNameList.Builder.class); - } - - // 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(); - if (endpointNamesBuilder_ == null) { - endpointNames_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - endpointNamesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_EndPointNameList_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.EndPointNameList getDefaultInstanceForType() { - return context.ContextOuterClass.EndPointNameList.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.EndPointNameList build() { - context.ContextOuterClass.EndPointNameList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public context.ContextOuterClass.EndPointNameList buildPartial() { - context.ContextOuterClass.EndPointNameList result = new context.ContextOuterClass.EndPointNameList(this); - int from_bitField0_ = bitField0_; - if (endpointNamesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - endpointNames_ = java.util.Collections.unmodifiableList(endpointNames_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.endpointNames_ = endpointNames_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.EndPointNameList) { - return mergeFrom((context.ContextOuterClass.EndPointNameList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.EndPointNameList other) { - if (other == context.ContextOuterClass.EndPointNameList.getDefaultInstance()) return this; - if (endpointNamesBuilder_ == null) { - if (!other.endpointNames_.isEmpty()) { - if (endpointNames_.isEmpty()) { - endpointNames_ = other.endpointNames_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureEndpointNamesIsMutable(); - endpointNames_.addAll(other.endpointNames_); - } - onChanged(); - } - } else { - if (!other.endpointNames_.isEmpty()) { - if (endpointNamesBuilder_.isEmpty()) { - endpointNamesBuilder_.dispose(); - endpointNamesBuilder_ = null; - endpointNames_ = other.endpointNames_; - bitField0_ = (bitField0_ & ~0x00000001); - endpointNamesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEndpointNamesFieldBuilder() : null; - } else { - endpointNamesBuilder_.addAllMessages(other.endpointNames_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPointNameList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List endpointNames_ = - java.util.Collections.emptyList(); - private void ensureEndpointNamesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - endpointNames_ = new java.util.ArrayList(endpointNames_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointName, context.ContextOuterClass.EndPointName.Builder, context.ContextOuterClass.EndPointNameOrBuilder> endpointNamesBuilder_; - - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public java.util.List getEndpointNamesList() { - if (endpointNamesBuilder_ == null) { - return java.util.Collections.unmodifiableList(endpointNames_); - } else { - return endpointNamesBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public int getEndpointNamesCount() { - if (endpointNamesBuilder_ == null) { - return endpointNames_.size(); - } else { - return endpointNamesBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public context.ContextOuterClass.EndPointName getEndpointNames(int index) { - if (endpointNamesBuilder_ == null) { - return endpointNames_.get(index); - } else { - return endpointNamesBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder setEndpointNames( - int index, context.ContextOuterClass.EndPointName value) { - if (endpointNamesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointNamesIsMutable(); - endpointNames_.set(index, value); - onChanged(); - } else { - endpointNamesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder setEndpointNames( - int index, context.ContextOuterClass.EndPointName.Builder builderForValue) { - if (endpointNamesBuilder_ == null) { - ensureEndpointNamesIsMutable(); - endpointNames_.set(index, builderForValue.build()); - onChanged(); - } else { - endpointNamesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder addEndpointNames(context.ContextOuterClass.EndPointName value) { - if (endpointNamesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointNamesIsMutable(); - endpointNames_.add(value); - onChanged(); - } else { - endpointNamesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder addEndpointNames( - int index, context.ContextOuterClass.EndPointName value) { - if (endpointNamesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointNamesIsMutable(); - endpointNames_.add(index, value); - onChanged(); - } else { - endpointNamesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder addEndpointNames( - context.ContextOuterClass.EndPointName.Builder builderForValue) { - if (endpointNamesBuilder_ == null) { - ensureEndpointNamesIsMutable(); - endpointNames_.add(builderForValue.build()); - onChanged(); - } else { - endpointNamesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder addEndpointNames( - int index, context.ContextOuterClass.EndPointName.Builder builderForValue) { - if (endpointNamesBuilder_ == null) { - ensureEndpointNamesIsMutable(); - endpointNames_.add(index, builderForValue.build()); - onChanged(); - } else { - endpointNamesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder addAllEndpointNames( - java.lang.Iterable values) { - if (endpointNamesBuilder_ == null) { - ensureEndpointNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, endpointNames_); - onChanged(); - } else { - endpointNamesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder clearEndpointNames() { - if (endpointNamesBuilder_ == null) { - endpointNames_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - endpointNamesBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public Builder removeEndpointNames(int index) { - if (endpointNamesBuilder_ == null) { - ensureEndpointNamesIsMutable(); - endpointNames_.remove(index); - onChanged(); - } else { - endpointNamesBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public context.ContextOuterClass.EndPointName.Builder getEndpointNamesBuilder( - int index) { - return getEndpointNamesFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public context.ContextOuterClass.EndPointNameOrBuilder getEndpointNamesOrBuilder( - int index) { - if (endpointNamesBuilder_ == null) { - return endpointNames_.get(index); } else { - return endpointNamesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public java.util.List - getEndpointNamesOrBuilderList() { - if (endpointNamesBuilder_ != null) { - return endpointNamesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(endpointNames_); - } - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public context.ContextOuterClass.EndPointName.Builder addEndpointNamesBuilder() { - return getEndpointNamesFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointName.getDefaultInstance()); - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public context.ContextOuterClass.EndPointName.Builder addEndpointNamesBuilder( - int index) { - return getEndpointNamesFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointName.getDefaultInstance()); - } - /** - * repeated .context.EndPointName endpoint_names = 1; - */ - public java.util.List - getEndpointNamesBuilderList() { - return getEndpointNamesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointName, context.ContextOuterClass.EndPointName.Builder, context.ContextOuterClass.EndPointNameOrBuilder> - getEndpointNamesFieldBuilder() { - if (endpointNamesBuilder_ == null) { - endpointNamesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointName, context.ContextOuterClass.EndPointName.Builder, context.ContextOuterClass.EndPointNameOrBuilder>( - endpointNames_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - endpointNames_ = null; - } - return endpointNamesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.EndPointNameList) - } + /** + * bool used = 9; + * @return This builder for chaining. + */ + public Builder clearUsed() { + used_ = false; + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:context.EndPointNameList) - private static final context.ContextOuterClass.EndPointNameList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.EndPointNameList(); - } + private context.ContextOuterClass.FiberId fiberUuid_; - public static context.ContextOuterClass.EndPointNameList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3 fiberUuidBuilder_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.FiberId fiber_uuid = 11; + * @return Whether the fiberUuid field is set. + */ + public boolean hasFiberUuid() { + return fiberUuidBuilder_ != null || fiberUuid_ != null; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.FiberId fiber_uuid = 11; + * @return The fiberUuid. + */ + public context.ContextOuterClass.FiberId getFiberUuid() { + if (fiberUuidBuilder_ == null) { + return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; + } else { + return fiberUuidBuilder_.getMessage(); + } + } - @java.lang.Override - public context.ContextOuterClass.EndPointNameList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.FiberId fiber_uuid = 11; + */ + public Builder setFiberUuid(context.ContextOuterClass.FiberId value) { + if (fiberUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fiberUuid_ = value; + onChanged(); + } else { + fiberUuidBuilder_.setMessage(value); + } + return this; + } - } + /** + * .context.FiberId fiber_uuid = 11; + */ + public Builder setFiberUuid(context.ContextOuterClass.FiberId.Builder builderForValue) { + if (fiberUuidBuilder_ == null) { + fiberUuid_ = builderForValue.build(); + onChanged(); + } else { + fiberUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } - public interface ConfigRule_CustomOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConfigRule_Custom) - com.google.protobuf.MessageOrBuilder { + /** + * .context.FiberId fiber_uuid = 11; + */ + public Builder mergeFiberUuid(context.ContextOuterClass.FiberId value) { + if (fiberUuidBuilder_ == null) { + if (fiberUuid_ != null) { + fiberUuid_ = context.ContextOuterClass.FiberId.newBuilder(fiberUuid_).mergeFrom(value).buildPartial(); + } else { + fiberUuid_ = value; + } + onChanged(); + } else { + fiberUuidBuilder_.mergeFrom(value); + } + return this; + } - /** - * string resource_key = 1; - * @return The resourceKey. - */ - java.lang.String getResourceKey(); - /** - * string resource_key = 1; - * @return The bytes for resourceKey. - */ - com.google.protobuf.ByteString - getResourceKeyBytes(); + /** + * .context.FiberId fiber_uuid = 11; + */ + public Builder clearFiberUuid() { + if (fiberUuidBuilder_ == null) { + fiberUuid_ = null; + onChanged(); + } else { + fiberUuid_ = null; + fiberUuidBuilder_ = null; + } + return this; + } - /** - * string resource_value = 2; - * @return The resourceValue. - */ - java.lang.String getResourceValue(); - /** - * string resource_value = 2; - * @return The bytes for resourceValue. - */ - com.google.protobuf.ByteString - getResourceValueBytes(); - } - /** - * Protobuf type {@code context.ConfigRule_Custom} - */ - public static final class ConfigRule_Custom extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConfigRule_Custom) - ConfigRule_CustomOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfigRule_Custom.newBuilder() to construct. - private ConfigRule_Custom(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConfigRule_Custom() { - resourceKey_ = ""; - resourceValue_ = ""; - } + /** + * .context.FiberId fiber_uuid = 11; + */ + public context.ContextOuterClass.FiberId.Builder getFiberUuidBuilder() { + onChanged(); + return getFiberUuidFieldBuilder().getBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConfigRule_Custom(); - } + /** + * .context.FiberId fiber_uuid = 11; + */ + public context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder() { + if (fiberUuidBuilder_ != null) { + return fiberUuidBuilder_.getMessageOrBuilder(); + } else { + return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; + } + } - @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; - } + /** + * .context.FiberId fiber_uuid = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3 getFiberUuidFieldBuilder() { + if (fiberUuidBuilder_ == null) { + fiberUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getFiberUuid(), getParentForChildren(), isClean()); + fiberUuid_ = null; + } + return fiberUuidBuilder_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConfigRule_Custom.class, context.ContextOuterClass.ConfigRule_Custom.Builder.class); - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public static final int RESOURCE_KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object resourceKey_; - /** - * string resource_key = 1; - * @return The resourceKey. - */ - @java.lang.Override - public java.lang.String getResourceKey() { - java.lang.Object ref = resourceKey_; - 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(); - resourceKey_ = s; - return s; - } - } - /** - * string resource_key = 1; - * @return The bytes for resourceKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceKeyBytes() { - java.lang.Object ref = resourceKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.Fiber) + } - public static final int RESOURCE_VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object resourceValue_; - /** - * string resource_value = 2; - * @return The resourceValue. - */ - @java.lang.Override - public java.lang.String getResourceValue() { - java.lang.Object ref = resourceValue_; - 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(); - resourceValue_ = s; - return s; - } - } - /** - * string resource_value = 2; - * @return The bytes for resourceValue. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceValueBytes() { - java.lang.Object ref = resourceValue_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + // @@protoc_insertion_point(class_scope:context.Fiber) + private static final context.ContextOuterClass.Fiber DEFAULT_INSTANCE; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.Fiber(); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.Fiber getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getResourceKeyBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceKey_); - } - if (!getResourceValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceValue_); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getResourceKeyBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceKey_); - } - if (!getResourceValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceValue_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @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); + } + }; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConfigRule_Custom)) { - return super.equals(obj); - } - context.ContextOuterClass.ConfigRule_Custom other = (context.ContextOuterClass.ConfigRule_Custom) obj; - - if (!getResourceKey() - .equals(other.getResourceKey())) return false; - if (!getResourceValue() - .equals(other.getResourceValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_KEY_FIELD_NUMBER; - hash = (53 * hash) + getResourceKey().hashCode(); - hash = (37 * hash) + RESOURCE_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getResourceValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_Custom parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule_Custom parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule_Custom parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + @java.lang.Override + public context.ContextOuterClass.Fiber getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConfigRule_Custom prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public interface OpticalLinkDetailsOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLinkDetails) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConfigRule_Custom} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConfigRule_Custom) - context.ContextOuterClass.ConfigRule_CustomOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConfigRule_Custom.class, context.ContextOuterClass.ConfigRule_Custom.Builder.class); - } - - // 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(); - resourceKey_ = ""; - - resourceValue_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConfigRule_Custom getDefaultInstanceForType() { - return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConfigRule_Custom build() { - context.ContextOuterClass.ConfigRule_Custom result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConfigRule_Custom) { - return mergeFrom((context.ContextOuterClass.ConfigRule_Custom)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConfigRule_Custom other) { - if (other == context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance()) return this; - if (!other.getResourceKey().isEmpty()) { - resourceKey_ = other.resourceKey_; - onChanged(); - } - if (!other.getResourceValue().isEmpty()) { - resourceValue_ = other.resourceValue_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConfigRule_Custom) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object resourceKey_ = ""; - /** - * string resource_key = 1; - * @return The resourceKey. - */ - public java.lang.String getResourceKey() { - java.lang.Object ref = resourceKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string resource_key = 1; - * @return The bytes for resourceKey. - */ - public com.google.protobuf.ByteString - getResourceKeyBytes() { - java.lang.Object ref = resourceKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string resource_key = 1; - * @param value The resourceKey to set. - * @return This builder for chaining. - */ - public Builder setResourceKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceKey_ = value; - onChanged(); - return this; - } - /** - * string resource_key = 1; - * @return This builder for chaining. - */ - public Builder clearResourceKey() { - - resourceKey_ = getDefaultInstance().getResourceKey(); - onChanged(); - return this; - } - /** - * string resource_key = 1; - * @param value The bytes for resourceKey to set. - * @return This builder for chaining. - */ - public Builder setResourceKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceKey_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceValue_ = ""; - /** - * string resource_value = 2; - * @return The resourceValue. - */ - public java.lang.String getResourceValue() { - java.lang.Object ref = resourceValue_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceValue_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string resource_value = 2; - * @return The bytes for resourceValue. - */ - public com.google.protobuf.ByteString - getResourceValueBytes() { - java.lang.Object ref = resourceValue_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string resource_value = 2; - * @param value The resourceValue to set. - * @return This builder for chaining. - */ - public Builder setResourceValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceValue_ = value; - onChanged(); - return this; - } - /** - * string resource_value = 2; - * @return This builder for chaining. - */ - public Builder clearResourceValue() { - - resourceValue_ = getDefaultInstance().getResourceValue(); - onChanged(); - return this; - } - /** - * string resource_value = 2; - * @param value The bytes for resourceValue to set. - * @return This builder for chaining. - */ - public Builder setResourceValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceValue_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConfigRule_Custom) - } + /** + * float length = 1; + * @return The length. + */ + float getLength(); - // @@protoc_insertion_point(class_scope:context.ConfigRule_Custom) - private static final context.ContextOuterClass.ConfigRule_Custom DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConfigRule_Custom(); - } + /** + * string source = 2; + * @return The source. + */ + java.lang.String getSource(); - public static context.ContextOuterClass.ConfigRule_Custom getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * string source = 2; + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * string target = 3; + * @return The target. + */ + java.lang.String getTarget(); - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * string target = 3; + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); - @java.lang.Override - public context.ContextOuterClass.ConfigRule_Custom getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.Fiber fibers = 4; + */ + java.util.List getFibersList(); - } + /** + * repeated .context.Fiber fibers = 4; + */ + context.ContextOuterClass.Fiber getFibers(int index); - public interface ConfigRule_ACLOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConfigRule_ACL) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.Fiber fibers = 4; + */ + int getFibersCount(); - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - boolean hasEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - context.ContextOuterClass.EndPointId getEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + /** + * repeated .context.Fiber fibers = 4; + */ + java.util.List getFibersOrBuilderList(); + + /** + * repeated .context.Fiber fibers = 4; + */ + context.ContextOuterClass.FiberOrBuilder getFibersOrBuilder(int index); + } /** - * .acl.AclRuleSet rule_set = 2; - * @return Whether the ruleSet field is set. - */ - boolean hasRuleSet(); - /** - * .acl.AclRuleSet rule_set = 2; - * @return The ruleSet. - */ - acl.Acl.AclRuleSet getRuleSet(); - /** - * .acl.AclRuleSet rule_set = 2; + * Protobuf type {@code context.OpticalLinkDetails} */ - acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder(); - } - /** - * Protobuf type {@code context.ConfigRule_ACL} - */ - public static final class ConfigRule_ACL extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConfigRule_ACL) - ConfigRule_ACLOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfigRule_ACL.newBuilder() to construct. - private ConfigRule_ACL(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConfigRule_ACL() { - } + public static final class OpticalLinkDetails extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLinkDetails) + OpticalLinkDetailsOrBuilder { - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConfigRule_ACL(); - } + private static final long serialVersionUID = 0L; - @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; - } + // Use OpticalLinkDetails.newBuilder() to construct. + private OpticalLinkDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConfigRule_ACL.class, context.ContextOuterClass.ConfigRule_ACL.Builder.class); - } + private OpticalLinkDetails() { + source_ = ""; + target_ = ""; + fibers_ = java.util.Collections.emptyList(); + } - public static final int ENDPOINT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.EndPointId endpointId_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - @java.lang.Override - public boolean hasEndpointId() { - return endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointId() { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpticalLinkDetails(); + } - public static final int RULE_SET_FIELD_NUMBER = 2; - private acl.Acl.AclRuleSet ruleSet_; - /** - * .acl.AclRuleSet rule_set = 2; - * @return Whether the ruleSet field is set. - */ - @java.lang.Override - public boolean hasRuleSet() { - return ruleSet_ != null; - } - /** - * .acl.AclRuleSet rule_set = 2; - * @return The ruleSet. - */ - @java.lang.Override - public acl.Acl.AclRuleSet getRuleSet() { - return ruleSet_ == null ? acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - @java.lang.Override - public acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder() { - return getRuleSet(); - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + 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(); + 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(); + } + } - memoizedIsInitialized = 1; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (endpointId_ != null) { - output.writeMessage(1, getEndpointId()); - } - if (ruleSet_ != null) { - output.writeMessage(2, getRuleSet()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkDetails.class, context.ContextOuterClass.OpticalLinkDetails.Builder.class); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (endpointId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEndpointId()); - } - if (ruleSet_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getRuleSet()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static final int LENGTH_FIELD_NUMBER = 1; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConfigRule_ACL)) { - return super.equals(obj); - } - context.ContextOuterClass.ConfigRule_ACL other = (context.ContextOuterClass.ConfigRule_ACL) obj; - - if (hasEndpointId() != other.hasEndpointId()) return false; - if (hasEndpointId()) { - if (!getEndpointId() - .equals(other.getEndpointId())) return false; - } - if (hasRuleSet() != other.hasRuleSet()) return false; - if (hasRuleSet()) { - if (!getRuleSet() - .equals(other.getRuleSet())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private float length_; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEndpointId()) { - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - } - if (hasRuleSet()) { - hash = (37 * hash) + RULE_SET_FIELD_NUMBER; - hash = (53 * hash) + getRuleSet().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * float length = 1; + * @return The length. + */ + @java.lang.Override + public float getLength() { + return length_; + } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_ACL parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule_ACL parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule_ACL parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final int SOURCE_FIELD_NUMBER = 2; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConfigRule_ACL prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private volatile java.lang.Object source_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConfigRule_ACL} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConfigRule_ACL) - context.ContextOuterClass.ConfigRule_ACLOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConfigRule_ACL.class, context.ContextOuterClass.ConfigRule_ACL.Builder.class); - } - - // 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; - endpointIdBuilder_ = null; - } - if (ruleSetBuilder_ == null) { - ruleSet_ = null; - } else { - ruleSet_ = null; - ruleSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACL getDefaultInstanceForType() { - return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACL build() { - context.ContextOuterClass.ConfigRule_ACL result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConfigRule_ACL) { - return mergeFrom((context.ContextOuterClass.ConfigRule_ACL)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConfigRule_ACL other) { - if (other == context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance()) return this; - if (other.hasEndpointId()) { - mergeEndpointId(other.getEndpointId()); - } - if (other.hasRuleSet()) { - mergeRuleSet(other.getRuleSet()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConfigRule_ACL) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.EndPointId endpointId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - public context.ContextOuterClass.EndPointId getEndpointId() { - if (endpointIdBuilder_ == null) { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } else { - return endpointIdBuilder_.getMessage(); - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - onChanged(); - } else { - endpointIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdBuilder_ == null) { - endpointId_ = builderForValue.build(); - onChanged(); - } else { - endpointIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = - context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); - } else { - endpointId_ = value; - } - onChanged(); - } else { - endpointIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { - - onChanged(); - return getEndpointIdFieldBuilder().getBuilder(); - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - if (endpointIdBuilder_ != null) { - return endpointIdBuilder_.getMessageOrBuilder(); - } else { - return endpointId_ == null ? - context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> - getEndpointIdFieldBuilder() { - if (endpointIdBuilder_ == null) { - endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>( - getEndpointId(), - getParentForChildren(), - isClean()); - endpointId_ = null; - } - return endpointIdBuilder_; - } - - private acl.Acl.AclRuleSet ruleSet_; - private com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclRuleSet, acl.Acl.AclRuleSet.Builder, acl.Acl.AclRuleSetOrBuilder> ruleSetBuilder_; - /** - * .acl.AclRuleSet rule_set = 2; - * @return Whether the ruleSet field is set. - */ - public boolean hasRuleSet() { - return ruleSetBuilder_ != null || ruleSet_ != null; - } - /** - * .acl.AclRuleSet rule_set = 2; - * @return The ruleSet. - */ - public acl.Acl.AclRuleSet getRuleSet() { - if (ruleSetBuilder_ == null) { - return ruleSet_ == null ? acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; - } else { - return ruleSetBuilder_.getMessage(); - } - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - public Builder setRuleSet(acl.Acl.AclRuleSet value) { - if (ruleSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ruleSet_ = value; - onChanged(); - } else { - ruleSetBuilder_.setMessage(value); - } - - return this; - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - public Builder setRuleSet( - acl.Acl.AclRuleSet.Builder builderForValue) { - if (ruleSetBuilder_ == null) { - ruleSet_ = builderForValue.build(); - onChanged(); - } else { - ruleSetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - public Builder mergeRuleSet(acl.Acl.AclRuleSet value) { - if (ruleSetBuilder_ == null) { - if (ruleSet_ != null) { - ruleSet_ = - acl.Acl.AclRuleSet.newBuilder(ruleSet_).mergeFrom(value).buildPartial(); - } else { - ruleSet_ = value; - } - onChanged(); - } else { - ruleSetBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - public Builder clearRuleSet() { - if (ruleSetBuilder_ == null) { - ruleSet_ = null; - onChanged(); - } else { - ruleSet_ = null; - ruleSetBuilder_ = null; - } - - return this; - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - public acl.Acl.AclRuleSet.Builder getRuleSetBuilder() { - - onChanged(); - return getRuleSetFieldBuilder().getBuilder(); - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - public acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder() { - if (ruleSetBuilder_ != null) { - return ruleSetBuilder_.getMessageOrBuilder(); - } else { - return ruleSet_ == null ? - acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; - } - } - /** - * .acl.AclRuleSet rule_set = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclRuleSet, acl.Acl.AclRuleSet.Builder, acl.Acl.AclRuleSetOrBuilder> - getRuleSetFieldBuilder() { - if (ruleSetBuilder_ == null) { - ruleSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - acl.Acl.AclRuleSet, acl.Acl.AclRuleSet.Builder, acl.Acl.AclRuleSetOrBuilder>( - getRuleSet(), - getParentForChildren(), - isClean()); - ruleSet_ = null; - } - return ruleSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConfigRule_ACL) - } + /** + * string source = 2; + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + 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(); + source_ = s; + return s; + } + } - // @@protoc_insertion_point(class_scope:context.ConfigRule_ACL) - private static final context.ContextOuterClass.ConfigRule_ACL DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConfigRule_ACL(); - } + /** + * string source = 2; + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static context.ContextOuterClass.ConfigRule_ACL getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final int TARGET_FIELD_NUMBER = 3; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private volatile java.lang.Object target_; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * string target = 3; + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACL getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * string target = 3; + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - } + public static final int FIBERS_FIELD_NUMBER = 4; - public interface ConfigRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.ConfigRule) - com.google.protobuf.MessageOrBuilder { + private java.util.List fibers_; - /** - * .context.ConfigActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - int getActionValue(); - /** - * .context.ConfigActionEnum action = 1; - * @return The action. - */ - context.ContextOuterClass.ConfigActionEnum getAction(); + /** + * repeated .context.Fiber fibers = 4; + */ + @java.lang.Override + public java.util.List getFibersList() { + return fibers_; + } - /** - * .context.ConfigRule_Custom custom = 2; - * @return Whether the custom field is set. - */ - boolean hasCustom(); - /** - * .context.ConfigRule_Custom custom = 2; - * @return The custom. - */ - context.ContextOuterClass.ConfigRule_Custom getCustom(); - /** - * .context.ConfigRule_Custom custom = 2; - */ - context.ContextOuterClass.ConfigRule_CustomOrBuilder getCustomOrBuilder(); + /** + * repeated .context.Fiber fibers = 4; + */ + @java.lang.Override + public java.util.List getFibersOrBuilderList() { + return fibers_; + } - /** - * .context.ConfigRule_ACL acl = 3; - * @return Whether the acl field is set. - */ - boolean hasAcl(); - /** - * .context.ConfigRule_ACL acl = 3; - * @return The acl. - */ - context.ContextOuterClass.ConfigRule_ACL getAcl(); - /** - * .context.ConfigRule_ACL acl = 3; - */ - context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder(); - - public context.ContextOuterClass.ConfigRule.ConfigRuleCase getConfigRuleCase(); - } - /** - * Protobuf type {@code context.ConfigRule} - */ - public static final class ConfigRule extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.ConfigRule) - ConfigRuleOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfigRule.newBuilder() to construct. - private ConfigRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConfigRule() { - action_ = 0; - } + /** + * repeated .context.Fiber fibers = 4; + */ + @java.lang.Override + public int getFibersCount() { + return fibers_.size(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConfigRule(); - } + /** + * repeated .context.Fiber fibers = 4; + */ + @java.lang.Override + public context.ContextOuterClass.Fiber getFibers(int index) { + return fibers_.get(index); + } - @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; - } + /** + * repeated .context.Fiber fibers = 4; + */ + @java.lang.Override + public context.ContextOuterClass.FiberOrBuilder getFibersOrBuilder(int index) { + return fibers_.get(index); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConfigRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConfigRule.class, context.ContextOuterClass.ConfigRule.Builder.class); - } + private byte memoizedIsInitialized = -1; - private int configRuleCase_ = 0; - private java.lang.Object configRule_; - public enum ConfigRuleCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CUSTOM(2), - ACL(3), - CONFIGRULE_NOT_SET(0); - private final int value; - private ConfigRuleCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ConfigRuleCase valueOf(int value) { - return forNumber(value); - } - - public static ConfigRuleCase forNumber(int value) { - switch (value) { - case 2: return CUSTOM; - case 3: return ACL; - case 0: return CONFIGRULE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ConfigRuleCase - getConfigRuleCase() { - return ConfigRuleCase.forNumber( - configRuleCase_); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - public static final int ACTION_FIELD_NUMBER = 1; - private int action_; - /** - * .context.ConfigActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override public int getActionValue() { - return action_; - } - /** - * .context.ConfigActionEnum action = 1; - * @return The action. - */ - @java.lang.Override public context.ContextOuterClass.ConfigActionEnum getAction() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.valueOf(action_); - return result == null ? context.ContextOuterClass.ConfigActionEnum.UNRECOGNIZED : result; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (length_ != 0F) { + output.writeFloat(1, length_); + } + if (!getSourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); + } + if (!getTargetBytes().isEmpty()) { + 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); + } - public static final int CUSTOM_FIELD_NUMBER = 2; - /** - * .context.ConfigRule_Custom custom = 2; - * @return Whether the custom field is set. - */ - @java.lang.Override - public boolean hasCustom() { - return configRuleCase_ == 2; - } - /** - * .context.ConfigRule_Custom custom = 2; - * @return The custom. - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_Custom getCustom() { - if (configRuleCase_ == 2) { - return (context.ContextOuterClass.ConfigRule_Custom) configRule_; - } - return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_CustomOrBuilder getCustomOrBuilder() { - if (configRuleCase_ == 2) { - return (context.ContextOuterClass.ConfigRule_Custom) configRule_; - } - return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (length_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, length_); + } + if (!getSourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); + } + if (!getTargetBytes().isEmpty()) { + 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(); + memoizedSize = size; + return size; + } - public static final int ACL_FIELD_NUMBER = 3; - /** - * .context.ConfigRule_ACL acl = 3; - * @return Whether the acl field is set. - */ - @java.lang.Override - public boolean hasAcl() { - return configRuleCase_ == 3; - } - /** - * .context.ConfigRule_ACL acl = 3; - * @return The acl. - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACL getAcl() { - if (configRuleCase_ == 3) { - return (context.ContextOuterClass.ConfigRule_ACL) configRule_; - } - return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder() { - if (configRuleCase_ == 3) { - return (context.ContextOuterClass.ConfigRule_ACL) configRule_; - } - return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.OpticalLinkDetails)) { + return super.equals(obj); + } + context.ContextOuterClass.OpticalLinkDetails other = (context.ContextOuterClass.OpticalLinkDetails) obj; + if (java.lang.Float.floatToIntBits(getLength()) != java.lang.Float.floatToIntBits(other.getLength())) + return false; + if (!getSource().equals(other.getSource())) + return false; + if (!getTarget().equals(other.getTarget())) + return false; + if (!getFibersList().equals(other.getFibersList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LENGTH_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getLength()); + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + if (getFibersCount() > 0) { + hash = (37 * hash) + FIBERS_FIELD_NUMBER; + hash = (53 * hash) + getFibersList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - memoizedIsInitialized = 1; - return true; - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (action_ != context.ContextOuterClass.ConfigActionEnum.CONFIGACTION_UNDEFINED.getNumber()) { - output.writeEnum(1, action_); - } - if (configRuleCase_ == 2) { - output.writeMessage(2, (context.ContextOuterClass.ConfigRule_Custom) configRule_); - } - if (configRuleCase_ == 3) { - output.writeMessage(3, (context.ContextOuterClass.ConfigRule_ACL) configRule_); - } - unknownFields.writeTo(output); - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (action_ != context.ContextOuterClass.ConfigActionEnum.CONFIGACTION_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, action_); - } - if (configRuleCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (context.ContextOuterClass.ConfigRule_Custom) configRule_); - } - if (configRuleCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (context.ContextOuterClass.ConfigRule_ACL) configRule_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.ConfigRule)) { - return super.equals(obj); - } - context.ContextOuterClass.ConfigRule other = (context.ContextOuterClass.ConfigRule) obj; - - if (action_ != other.action_) return false; - if (!getConfigRuleCase().equals(other.getConfigRuleCase())) return false; - switch (configRuleCase_) { - case 2: - if (!getCustom() - .equals(other.getCustom())) return false; - break; - case 3: - if (!getAcl() - .equals(other.getAcl())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + action_; - switch (configRuleCase_) { - case 2: - hash = (37 * hash) + CUSTOM_FIELD_NUMBER; - hash = (53 * hash) + getCustom().hashCode(); - break; - case 3: - hash = (37 * hash) + ACL_FIELD_NUMBER; - hash = (53 * hash) + getAcl().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.ConfigRule parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.ConfigRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.ConfigRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static context.ContextOuterClass.OpticalLinkDetails parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static context.ContextOuterClass.OpticalLinkDetails parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.ConfigRule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.ConfigRule) - context.ContextOuterClass.ConfigRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_ConfigRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_ConfigRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.ConfigRule.class, context.ContextOuterClass.ConfigRule.Builder.class); - } - - // 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(); - action_ = 0; - - configRuleCase_ = 0; - configRule_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_ConfigRule_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.ConfigRule getDefaultInstanceForType() { - return context.ContextOuterClass.ConfigRule.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.ConfigRule build() { - context.ContextOuterClass.ConfigRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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 (configRuleCase_ == 3) { - if (aclBuilder_ == null) { - result.configRule_ = configRule_; - } else { - result.configRule_ = aclBuilder_.build(); - } - } - result.configRuleCase_ = configRuleCase_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.ConfigRule) { - return mergeFrom((context.ContextOuterClass.ConfigRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.ConfigRule other) { - if (other == context.ContextOuterClass.ConfigRule.getDefaultInstance()) return this; - if (other.action_ != 0) { - setActionValue(other.getActionValue()); - } - switch (other.getConfigRuleCase()) { - case CUSTOM: { - mergeCustom(other.getCustom()); - break; - } - case ACL: { - mergeAcl(other.getAcl()); - break; - } - case CONFIGRULE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConfigRule) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int configRuleCase_ = 0; - private java.lang.Object configRule_; - public ConfigRuleCase - getConfigRuleCase() { - return ConfigRuleCase.forNumber( - configRuleCase_); - } - - public Builder clearConfigRule() { - configRuleCase_ = 0; - configRule_ = null; - onChanged(); - return this; - } - - - private int action_ = 0; - /** - * .context.ConfigActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override public int getActionValue() { - return action_; - } - /** - * .context.ConfigActionEnum action = 1; - * @param value The enum numeric value on the wire for action to set. - * @return This builder for chaining. - */ - public Builder setActionValue(int value) { - - action_ = value; - onChanged(); - return this; - } - /** - * .context.ConfigActionEnum action = 1; - * @return The action. - */ - @java.lang.Override - public context.ContextOuterClass.ConfigActionEnum getAction() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.valueOf(action_); - return result == null ? context.ContextOuterClass.ConfigActionEnum.UNRECOGNIZED : result; - } - /** - * .context.ConfigActionEnum action = 1; - * @param value The action to set. - * @return This builder for chaining. - */ - public Builder setAction(context.ContextOuterClass.ConfigActionEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - action_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.ConfigActionEnum action = 1; - * @return This builder for chaining. - */ - public Builder clearAction() { - - action_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConfigRule_Custom, context.ContextOuterClass.ConfigRule_Custom.Builder, context.ContextOuterClass.ConfigRule_CustomOrBuilder> customBuilder_; - /** - * .context.ConfigRule_Custom custom = 2; - * @return Whether the custom field is set. - */ - @java.lang.Override - public boolean hasCustom() { - return configRuleCase_ == 2; - } - /** - * .context.ConfigRule_Custom custom = 2; - * @return The custom. - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_Custom getCustom() { - if (customBuilder_ == null) { - if (configRuleCase_ == 2) { - return (context.ContextOuterClass.ConfigRule_Custom) configRule_; - } - return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } else { - if (configRuleCase_ == 2) { - return customBuilder_.getMessage(); - } - return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - public Builder setCustom(context.ContextOuterClass.ConfigRule_Custom value) { - if (customBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - configRule_ = value; - onChanged(); - } else { - customBuilder_.setMessage(value); - } - configRuleCase_ = 2; - return this; - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - public Builder setCustom( - context.ContextOuterClass.ConfigRule_Custom.Builder builderForValue) { - if (customBuilder_ == null) { - configRule_ = builderForValue.build(); - onChanged(); - } else { - customBuilder_.setMessage(builderForValue.build()); - } - configRuleCase_ = 2; - return this; - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - public Builder mergeCustom(context.ContextOuterClass.ConfigRule_Custom value) { - if (customBuilder_ == null) { - if (configRuleCase_ == 2 && - configRule_ != context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance()) { - configRule_ = context.ContextOuterClass.ConfigRule_Custom.newBuilder((context.ContextOuterClass.ConfigRule_Custom) configRule_) - .mergeFrom(value).buildPartial(); - } else { - configRule_ = value; - } - onChanged(); - } else { - if (configRuleCase_ == 2) { - customBuilder_.mergeFrom(value); - } - customBuilder_.setMessage(value); - } - configRuleCase_ = 2; - return this; - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - public Builder clearCustom() { - if (customBuilder_ == null) { - if (configRuleCase_ == 2) { - configRuleCase_ = 0; - configRule_ = null; - onChanged(); - } - } else { - if (configRuleCase_ == 2) { - configRuleCase_ = 0; - configRule_ = null; - } - customBuilder_.clear(); - } - return this; - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - public context.ContextOuterClass.ConfigRule_Custom.Builder getCustomBuilder() { - return getCustomFieldBuilder().getBuilder(); - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_CustomOrBuilder getCustomOrBuilder() { - if ((configRuleCase_ == 2) && (customBuilder_ != null)) { - return customBuilder_.getMessageOrBuilder(); - } else { - if (configRuleCase_ == 2) { - return (context.ContextOuterClass.ConfigRule_Custom) configRule_; - } - return context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } - } - /** - * .context.ConfigRule_Custom custom = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConfigRule_Custom, context.ContextOuterClass.ConfigRule_Custom.Builder, context.ContextOuterClass.ConfigRule_CustomOrBuilder> - getCustomFieldBuilder() { - if (customBuilder_ == null) { - if (!(configRuleCase_ == 2)) { - configRule_ = context.ContextOuterClass.ConfigRule_Custom.getDefaultInstance(); - } - customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConfigRule_Custom, context.ContextOuterClass.ConfigRule_Custom.Builder, context.ContextOuterClass.ConfigRule_CustomOrBuilder>( - (context.ContextOuterClass.ConfigRule_Custom) configRule_, - getParentForChildren(), - isClean()); - configRule_ = null; - } - configRuleCase_ = 2; - onChanged();; - return customBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConfigRule_ACL, context.ContextOuterClass.ConfigRule_ACL.Builder, context.ContextOuterClass.ConfigRule_ACLOrBuilder> aclBuilder_; - /** - * .context.ConfigRule_ACL acl = 3; - * @return Whether the acl field is set. - */ - @java.lang.Override - public boolean hasAcl() { - return configRuleCase_ == 3; - } - /** - * .context.ConfigRule_ACL acl = 3; - * @return The acl. - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACL getAcl() { - if (aclBuilder_ == null) { - if (configRuleCase_ == 3) { - return (context.ContextOuterClass.ConfigRule_ACL) configRule_; - } - return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } else { - if (configRuleCase_ == 3) { - return aclBuilder_.getMessage(); - } - return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - public Builder setAcl(context.ContextOuterClass.ConfigRule_ACL value) { - if (aclBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - configRule_ = value; - onChanged(); - } else { - aclBuilder_.setMessage(value); - } - configRuleCase_ = 3; - return this; - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - public Builder setAcl( - context.ContextOuterClass.ConfigRule_ACL.Builder builderForValue) { - if (aclBuilder_ == null) { - configRule_ = builderForValue.build(); - onChanged(); - } else { - aclBuilder_.setMessage(builderForValue.build()); - } - configRuleCase_ = 3; - return this; - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - public Builder mergeAcl(context.ContextOuterClass.ConfigRule_ACL value) { - if (aclBuilder_ == null) { - if (configRuleCase_ == 3 && - configRule_ != context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance()) { - configRule_ = context.ContextOuterClass.ConfigRule_ACL.newBuilder((context.ContextOuterClass.ConfigRule_ACL) configRule_) - .mergeFrom(value).buildPartial(); - } else { - configRule_ = value; - } - onChanged(); - } else { - if (configRuleCase_ == 3) { - aclBuilder_.mergeFrom(value); - } - aclBuilder_.setMessage(value); - } - configRuleCase_ = 3; - return this; - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - public Builder clearAcl() { - if (aclBuilder_ == null) { - if (configRuleCase_ == 3) { - configRuleCase_ = 0; - configRule_ = null; - onChanged(); - } - } else { - if (configRuleCase_ == 3) { - configRuleCase_ = 0; - configRule_ = null; - } - aclBuilder_.clear(); - } - return this; - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - public context.ContextOuterClass.ConfigRule_ACL.Builder getAclBuilder() { - return getAclFieldBuilder().getBuilder(); - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - @java.lang.Override - public context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder() { - if ((configRuleCase_ == 3) && (aclBuilder_ != null)) { - return aclBuilder_.getMessageOrBuilder(); - } else { - if (configRuleCase_ == 3) { - return (context.ContextOuterClass.ConfigRule_ACL) configRule_; - } - return context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } - } - /** - * .context.ConfigRule_ACL acl = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConfigRule_ACL, context.ContextOuterClass.ConfigRule_ACL.Builder, context.ContextOuterClass.ConfigRule_ACLOrBuilder> - getAclFieldBuilder() { - if (aclBuilder_ == null) { - if (!(configRuleCase_ == 3)) { - configRule_ = context.ContextOuterClass.ConfigRule_ACL.getDefaultInstance(); - } - aclBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConfigRule_ACL, context.ContextOuterClass.ConfigRule_ACL.Builder, context.ContextOuterClass.ConfigRule_ACLOrBuilder>( - (context.ContextOuterClass.ConfigRule_ACL) configRule_, - getParentForChildren(), - isClean()); - configRule_ = null; - } - configRuleCase_ = 3; - onChanged();; - return aclBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.ConfigRule) - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - // @@protoc_insertion_point(class_scope:context.ConfigRule) - private static final context.ContextOuterClass.ConfigRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.ConfigRule(); - } + public static context.ContextOuterClass.OpticalLinkDetails parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public static context.ContextOuterClass.ConfigRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static Builder newBuilder(context.ContextOuterClass.OpticalLinkDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public context.ContextOuterClass.ConfigRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public interface Constraint_CustomOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_Custom) - com.google.protobuf.MessageOrBuilder { + /** + * Protobuf type {@code context.OpticalLinkDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLinkDetails) + context.ContextOuterClass.OpticalLinkDetailsOrBuilder { - /** - * string constraint_type = 1; - * @return The constraintType. - */ - java.lang.String getConstraintType(); - /** - * string constraint_type = 1; - * @return The bytes for constraintType. - */ - com.google.protobuf.ByteString - getConstraintTypeBytes(); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + } - /** - * string constraint_value = 2; - * @return The constraintValue. - */ - java.lang.String getConstraintValue(); - /** - * string constraint_value = 2; - * @return The bytes for constraintValue. - */ - com.google.protobuf.ByteString - getConstraintValueBytes(); - } - /** - * Protobuf type {@code context.Constraint_Custom} - */ - public static final class Constraint_Custom extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_Custom) - Constraint_CustomOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_Custom.newBuilder() to construct. - private Constraint_Custom(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_Custom() { - constraintType_ = ""; - constraintValue_ = ""; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLinkDetails.class, context.ContextOuterClass.OpticalLinkDetails.Builder.class); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_Custom(); - } + // Construct using context.ContextOuterClass.OpticalLinkDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @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; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_Custom_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_Custom.class, context.ContextOuterClass.Constraint_Custom.Builder.class); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFibersFieldBuilder(); + } + } - public static final int CONSTRAINT_TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object constraintType_; - /** - * string constraint_type = 1; - * @return The constraintType. - */ - @java.lang.Override - public java.lang.String getConstraintType() { - java.lang.Object ref = constraintType_; - 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(); - constraintType_ = s; - return s; - } - } - /** - * string constraint_type = 1; - * @return The bytes for constraintType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getConstraintTypeBytes() { - java.lang.Object ref = constraintType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - constraintType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public Builder clear() { + super.clear(); + length_ = 0F; + source_ = ""; + target_ = ""; + if (fibersBuilder_ == null) { + fibers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fibersBuilder_.clear(); + } + return this; + } - public static final int CONSTRAINT_VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object constraintValue_; - /** - * string constraint_value = 2; - * @return The constraintValue. - */ - @java.lang.Override - public java.lang.String getConstraintValue() { - java.lang.Object ref = constraintValue_; - 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(); - constraintValue_ = s; - return s; - } - } - /** - * string constraint_value = 2; - * @return The bytes for constraintValue. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getConstraintValueBytes() { - java.lang.Object ref = constraintValue_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - constraintValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public context.ContextOuterClass.OpticalLinkDetails getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance(); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public context.ContextOuterClass.OpticalLinkDetails build() { + context.ContextOuterClass.OpticalLinkDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getConstraintTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, constraintType_); - } - if (!getConstraintValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, constraintValue_); - } - unknownFields.writeTo(output); - } + @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_; + if (fibersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fibers_ = java.util.Collections.unmodifiableList(fibers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fibers_ = fibers_; + } else { + result.fibers_ = fibersBuilder_.build(); + } + onBuilt(); + return result; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getConstraintTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, constraintType_); - } - if (!getConstraintValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, constraintValue_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_Custom)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint_Custom other = (context.ContextOuterClass.Constraint_Custom) obj; - - if (!getConstraintType() - .equals(other.getConstraintType())) return false; - if (!getConstraintValue() - .equals(other.getConstraintValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @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 int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONSTRAINT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getConstraintType().hashCode(); - hash = (37 * hash) + CONSTRAINT_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getConstraintValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Custom parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Custom parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Custom parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_Custom prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @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 - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_Custom} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_Custom) - context.ContextOuterClass.Constraint_CustomOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_Custom_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_Custom_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_Custom.class, context.ContextOuterClass.Constraint_Custom.Builder.class); - } - - // 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(); - constraintType_ = ""; - - constraintValue_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_Custom_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_Custom getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_Custom build() { - context.ContextOuterClass.Constraint_Custom result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_Custom) { - return mergeFrom((context.ContextOuterClass.Constraint_Custom)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_Custom other) { - if (other == context.ContextOuterClass.Constraint_Custom.getDefaultInstance()) return this; - if (!other.getConstraintType().isEmpty()) { - constraintType_ = other.constraintType_; - onChanged(); - } - if (!other.getConstraintValue().isEmpty()) { - constraintValue_ = other.constraintValue_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_Custom) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object constraintType_ = ""; - /** - * string constraint_type = 1; - * @return The constraintType. - */ - public java.lang.String getConstraintType() { - java.lang.Object ref = constraintType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - constraintType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string constraint_type = 1; - * @return The bytes for constraintType. - */ - public com.google.protobuf.ByteString - getConstraintTypeBytes() { - java.lang.Object ref = constraintType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - constraintType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string constraint_type = 1; - * @param value The constraintType to set. - * @return This builder for chaining. - */ - public Builder setConstraintType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - constraintType_ = value; - onChanged(); - return this; - } - /** - * string constraint_type = 1; - * @return This builder for chaining. - */ - public Builder clearConstraintType() { - - constraintType_ = getDefaultInstance().getConstraintType(); - onChanged(); - return this; - } - /** - * string constraint_type = 1; - * @param value The bytes for constraintType to set. - * @return This builder for chaining. - */ - public Builder setConstraintTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - constraintType_ = value; - onChanged(); - return this; - } - - private java.lang.Object constraintValue_ = ""; - /** - * string constraint_value = 2; - * @return The constraintValue. - */ - public java.lang.String getConstraintValue() { - java.lang.Object ref = constraintValue_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - constraintValue_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string constraint_value = 2; - * @return The bytes for constraintValue. - */ - public com.google.protobuf.ByteString - getConstraintValueBytes() { - java.lang.Object ref = constraintValue_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - constraintValue_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string constraint_value = 2; - * @param value The constraintValue to set. - * @return This builder for chaining. - */ - public Builder setConstraintValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - constraintValue_ = value; - onChanged(); - return this; - } - /** - * string constraint_value = 2; - * @return This builder for chaining. - */ - public Builder clearConstraintValue() { - - constraintValue_ = getDefaultInstance().getConstraintValue(); - onChanged(); - return this; - } - /** - * string constraint_value = 2; - * @param value The bytes for constraintValue to set. - * @return This builder for chaining. - */ - public Builder setConstraintValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - constraintValue_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_Custom) - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - // @@protoc_insertion_point(class_scope:context.Constraint_Custom) - private static final context.ContextOuterClass.Constraint_Custom DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_Custom(); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalLinkDetails) { + return mergeFrom((context.ContextOuterClass.OpticalLinkDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static context.ContextOuterClass.Constraint_Custom getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public Builder mergeFrom(context.ContextOuterClass.OpticalLinkDetails other) { + if (other == context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance()) + return this; + if (other.getLength() != 0F) { + setLength(other.getLength()); + } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + onChanged(); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (fibersBuilder_ == null) { + if (!other.fibers_.isEmpty()) { + if (fibers_.isEmpty()) { + fibers_ = other.fibers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFibersIsMutable(); + fibers_.addAll(other.fibers_); + } + onChanged(); + } + } else { + if (!other.fibers_.isEmpty()) { + if (fibersBuilder_.isEmpty()) { + fibersBuilder_.dispose(); + fibersBuilder_ = null; + fibers_ = other.fibers_; + bitField0_ = (bitField0_ & ~0x00000001); + fibersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFibersFieldBuilder() : null; + } else { + fibersBuilder_.addAllMessages(other.fibers_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.OpticalLinkDetails) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public context.ContextOuterClass.Constraint_Custom getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private int bitField0_; - } + private float length_; - public interface Constraint_ScheduleOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_Schedule) - com.google.protobuf.MessageOrBuilder { + /** + * float length = 1; + * @return The length. + */ + @java.lang.Override + public float getLength() { + return length_; + } - /** - * float start_timestamp = 1; - * @return The startTimestamp. - */ - float getStartTimestamp(); + /** + * float length = 1; + * @param value The length to set. + * @return This builder for chaining. + */ + public Builder setLength(float value) { + length_ = value; + onChanged(); + return this; + } - /** - * float duration_days = 2; - * @return The durationDays. - */ - float getDurationDays(); - } - /** - * Protobuf type {@code context.Constraint_Schedule} - */ - public static final class Constraint_Schedule extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_Schedule) - Constraint_ScheduleOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_Schedule.newBuilder() to construct. - private Constraint_Schedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_Schedule() { - } + /** + * float length = 1; + * @return This builder for chaining. + */ + public Builder clearLength() { + length_ = 0F; + onChanged(); + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_Schedule(); - } + private java.lang.Object source_ = ""; + + /** + * string source = 2; + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @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; - } + /** + * string source = 2; + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_Schedule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_Schedule.class, context.ContextOuterClass.Constraint_Schedule.Builder.class); - } + /** + * string source = 2; + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + return this; + } - public static final int START_TIMESTAMP_FIELD_NUMBER = 1; - private float startTimestamp_; - /** - * float start_timestamp = 1; - * @return The startTimestamp. - */ - @java.lang.Override - public float getStartTimestamp() { - return startTimestamp_; - } + /** + * string source = 2; + * @return This builder for chaining. + */ + public Builder clearSource() { + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } - public static final int DURATION_DAYS_FIELD_NUMBER = 2; - private float durationDays_; - /** - * float duration_days = 2; - * @return The durationDays. - */ - @java.lang.Override - public float getDurationDays() { - return durationDays_; - } + /** + * string source = 2; + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + source_ = value; + onChanged(); + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private java.lang.Object target_ = ""; + + /** + * string target = 3; + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * string target = 3; + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (startTimestamp_ != 0F) { - output.writeFloat(1, startTimestamp_); - } - if (durationDays_ != 0F) { - output.writeFloat(2, durationDays_); - } - unknownFields.writeTo(output); - } + /** + * string target = 3; + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTimestamp_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, startTimestamp_); - } - if (durationDays_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, durationDays_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * string target = 3; + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_Schedule)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint_Schedule other = (context.ContextOuterClass.Constraint_Schedule) obj; - - if (java.lang.Float.floatToIntBits(getStartTimestamp()) - != java.lang.Float.floatToIntBits( - other.getStartTimestamp())) return false; - if (java.lang.Float.floatToIntBits(getDurationDays()) - != java.lang.Float.floatToIntBits( - other.getDurationDays())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string target = 3; + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + private java.util.List fibers_ = java.util.Collections.emptyList(); - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Schedule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Schedule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Schedule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private void ensureFibersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fibers_ = new java.util.ArrayList(fibers_); + bitField0_ |= 0x00000001; + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_Schedule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private com.google.protobuf.RepeatedFieldBuilderV3 fibersBuilder_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_Schedule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_Schedule) - context.ContextOuterClass.Constraint_ScheduleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_Schedule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_Schedule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_Schedule.class, context.ContextOuterClass.Constraint_Schedule.Builder.class); - } - - // 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(); - startTimestamp_ = 0F; - - durationDays_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_Schedule_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_Schedule getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_Schedule build() { - context.ContextOuterClass.Constraint_Schedule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_Schedule) { - return mergeFrom((context.ContextOuterClass.Constraint_Schedule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_Schedule other) { - if (other == context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) return this; - if (other.getStartTimestamp() != 0F) { - setStartTimestamp(other.getStartTimestamp()); - } - if (other.getDurationDays() != 0F) { - setDurationDays(other.getDurationDays()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_Schedule) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float startTimestamp_ ; - /** - * float start_timestamp = 1; - * @return The startTimestamp. - */ - @java.lang.Override - public float getStartTimestamp() { - return startTimestamp_; - } - /** - * float start_timestamp = 1; - * @param value The startTimestamp to set. - * @return This builder for chaining. - */ - public Builder setStartTimestamp(float value) { - - startTimestamp_ = value; - onChanged(); - return this; - } - /** - * float start_timestamp = 1; - * @return This builder for chaining. - */ - public Builder clearStartTimestamp() { - - startTimestamp_ = 0F; - onChanged(); - return this; - } - - private float durationDays_ ; - /** - * float duration_days = 2; - * @return The durationDays. - */ - @java.lang.Override - public float getDurationDays() { - return durationDays_; - } - /** - * float duration_days = 2; - * @param value The durationDays to set. - * @return This builder for chaining. - */ - public Builder setDurationDays(float value) { - - durationDays_ = value; - onChanged(); - return this; - } - /** - * float duration_days = 2; - * @return This builder for chaining. - */ - public Builder clearDurationDays() { - - durationDays_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_Schedule) - } + /** + * repeated .context.Fiber fibers = 4; + */ + public java.util.List getFibersList() { + if (fibersBuilder_ == null) { + return java.util.Collections.unmodifiableList(fibers_); + } else { + return fibersBuilder_.getMessageList(); + } + } - // @@protoc_insertion_point(class_scope:context.Constraint_Schedule) - private static final context.ContextOuterClass.Constraint_Schedule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_Schedule(); - } + /** + * repeated .context.Fiber fibers = 4; + */ + public int getFibersCount() { + if (fibersBuilder_ == null) { + return fibers_.size(); + } else { + return fibersBuilder_.getCount(); + } + } - public static context.ContextOuterClass.Constraint_Schedule getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public context.ContextOuterClass.Fiber getFibers(int index) { + if (fibersBuilder_ == null) { + return fibers_.get(index); + } else { + return fibersBuilder_.getMessage(index); + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder setFibers(int index, context.ContextOuterClass.Fiber value) { + if (fibersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFibersIsMutable(); + fibers_.set(index, value); + onChanged(); + } else { + fibersBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder setFibers(int index, context.ContextOuterClass.Fiber.Builder builderForValue) { + if (fibersBuilder_ == null) { + ensureFibersIsMutable(); + fibers_.set(index, builderForValue.build()); + onChanged(); + } else { + fibersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - @java.lang.Override - public context.ContextOuterClass.Constraint_Schedule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder addFibers(context.ContextOuterClass.Fiber value) { + if (fibersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFibersIsMutable(); + fibers_.add(value); + onChanged(); + } else { + fibersBuilder_.addMessage(value); + } + return this; + } - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder addFibers(int index, context.ContextOuterClass.Fiber value) { + if (fibersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFibersIsMutable(); + fibers_.add(index, value); + onChanged(); + } else { + fibersBuilder_.addMessage(index, value); + } + return this; + } - public interface GPS_PositionOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.GPS_Position) - com.google.protobuf.MessageOrBuilder { + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder addFibers(context.ContextOuterClass.Fiber.Builder builderForValue) { + if (fibersBuilder_ == null) { + ensureFibersIsMutable(); + fibers_.add(builderForValue.build()); + onChanged(); + } else { + fibersBuilder_.addMessage(builderForValue.build()); + } + return this; + } - /** - * float latitude = 1; - * @return The latitude. - */ - float getLatitude(); + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder addFibers(int index, context.ContextOuterClass.Fiber.Builder builderForValue) { + if (fibersBuilder_ == null) { + ensureFibersIsMutable(); + fibers_.add(index, builderForValue.build()); + onChanged(); + } else { + fibersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - /** - * float longitude = 2; - * @return The longitude. - */ - float getLongitude(); - } - /** - * Protobuf type {@code context.GPS_Position} - */ - public static final class GPS_Position extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.GPS_Position) - GPS_PositionOrBuilder { - private static final long serialVersionUID = 0L; - // Use GPS_Position.newBuilder() to construct. - private GPS_Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GPS_Position() { - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder addAllFibers(java.lang.Iterable values) { + if (fibersBuilder_ == null) { + ensureFibersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fibers_); + onChanged(); + } else { + fibersBuilder_.addAllMessages(values); + } + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GPS_Position(); - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder clearFibers() { + if (fibersBuilder_ == null) { + fibers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fibersBuilder_.clear(); + } + return this; + } - @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; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public Builder removeFibers(int index) { + if (fibersBuilder_ == null) { + ensureFibersIsMutable(); + fibers_.remove(index); + onChanged(); + } else { + fibersBuilder_.remove(index); + } + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_GPS_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.GPS_Position.class, context.ContextOuterClass.GPS_Position.Builder.class); - } + /** + * repeated .context.Fiber fibers = 4; + */ + public context.ContextOuterClass.Fiber.Builder getFibersBuilder(int index) { + return getFibersFieldBuilder().getBuilder(index); + } - public static final int LATITUDE_FIELD_NUMBER = 1; - private float latitude_; - /** - * float latitude = 1; - * @return The latitude. - */ - @java.lang.Override - public float getLatitude() { - return latitude_; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public context.ContextOuterClass.FiberOrBuilder getFibersOrBuilder(int index) { + if (fibersBuilder_ == null) { + return fibers_.get(index); + } else { + return fibersBuilder_.getMessageOrBuilder(index); + } + } - public static final int LONGITUDE_FIELD_NUMBER = 2; - private float longitude_; - /** - * float longitude = 2; - * @return The longitude. - */ - @java.lang.Override - public float getLongitude() { - return longitude_; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public java.util.List getFibersOrBuilderList() { + if (fibersBuilder_ != null) { + return fibersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fibers_); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .context.Fiber fibers = 4; + */ + public context.ContextOuterClass.Fiber.Builder addFibersBuilder() { + return getFibersFieldBuilder().addBuilder(context.ContextOuterClass.Fiber.getDefaultInstance()); + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .context.Fiber fibers = 4; + */ + public context.ContextOuterClass.Fiber.Builder addFibersBuilder(int index) { + return getFibersFieldBuilder().addBuilder(index, context.ContextOuterClass.Fiber.getDefaultInstance()); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latitude_ != 0F) { - output.writeFloat(1, latitude_); - } - if (longitude_ != 0F) { - output.writeFloat(2, longitude_); - } - unknownFields.writeTo(output); - } + /** + * repeated .context.Fiber fibers = 4; + */ + public java.util.List getFibersBuilderList() { + return getFibersFieldBuilder().getBuilderList(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latitude_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, latitude_); - } - if (longitude_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, longitude_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private com.google.protobuf.RepeatedFieldBuilderV3 getFibersFieldBuilder() { + if (fibersBuilder_ == null) { + fibersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(fibers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + fibers_ = null; + } + return fibersBuilder_; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.GPS_Position)) { - return super.equals(obj); - } - context.ContextOuterClass.GPS_Position other = (context.ContextOuterClass.GPS_Position) obj; - - if (java.lang.Float.floatToIntBits(getLatitude()) - != java.lang.Float.floatToIntBits( - other.getLatitude())) return false; - if (java.lang.Float.floatToIntBits(getLongitude()) - != java.lang.Float.floatToIntBits( - other.getLongitude())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LATITUDE_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.OpticalLinkDetails) + } - public static context.ContextOuterClass.GPS_Position parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.GPS_Position parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.GPS_Position parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.GPS_Position parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.GPS_Position parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.GPS_Position parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + // @@protoc_insertion_point(class_scope:context.OpticalLinkDetails) + private static final context.ContextOuterClass.OpticalLinkDetails DEFAULT_INSTANCE; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.GPS_Position prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLinkDetails(); + } + + public static context.ContextOuterClass.OpticalLinkDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.GPS_Position} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.GPS_Position) - context.ContextOuterClass.GPS_PositionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_GPS_Position_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_GPS_Position_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.GPS_Position.class, context.ContextOuterClass.GPS_Position.Builder.class); - } - - // 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(); - latitude_ = 0F; - - longitude_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_GPS_Position_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.GPS_Position getDefaultInstanceForType() { - return context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.GPS_Position build() { - context.ContextOuterClass.GPS_Position result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.GPS_Position) { - return mergeFrom((context.ContextOuterClass.GPS_Position)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.GPS_Position other) { - if (other == context.ContextOuterClass.GPS_Position.getDefaultInstance()) return this; - if (other.getLatitude() != 0F) { - setLatitude(other.getLatitude()); - } - if (other.getLongitude() != 0F) { - setLongitude(other.getLongitude()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.GPS_Position) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float latitude_ ; - /** - * float latitude = 1; - * @return The latitude. - */ - @java.lang.Override - public float getLatitude() { - return latitude_; - } - /** - * float latitude = 1; - * @param value The latitude to set. - * @return This builder for chaining. - */ - public Builder setLatitude(float value) { - - latitude_ = value; - onChanged(); - return this; - } - /** - * float latitude = 1; - * @return This builder for chaining. - */ - public Builder clearLatitude() { - - latitude_ = 0F; - onChanged(); - return this; - } - - private float longitude_ ; - /** - * float longitude = 2; - * @return The longitude. - */ - @java.lang.Override - public float getLongitude() { - return longitude_; - } - /** - * float longitude = 2; - * @param value The longitude to set. - * @return This builder for chaining. - */ - public Builder setLongitude(float value) { - - longitude_ = value; - onChanged(); - return this; - } - /** - * float longitude = 2; - * @return This builder for chaining. - */ - public Builder clearLongitude() { - - longitude_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.GPS_Position) - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - // @@protoc_insertion_point(class_scope:context.GPS_Position) - private static final context.ContextOuterClass.GPS_Position DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.GPS_Position(); - } + @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); + } + }; - public static context.ContextOuterClass.GPS_Position getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + @java.lang.Override + public context.ContextOuterClass.OpticalLinkDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public context.ContextOuterClass.GPS_Position getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public interface OpticalLinkOrBuilder extends // @@protoc_insertion_point(interface_extends:context.OpticalLink) + com.google.protobuf.MessageOrBuilder { - } + /** + * string name = 1; + * @return The name. + */ + java.lang.String getName(); - public interface LocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Location) - com.google.protobuf.MessageOrBuilder { + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); - /** - * string region = 1; - * @return Whether the region field is set. - */ - boolean hasRegion(); - /** - * string region = 1; - * @return The region. - */ - java.lang.String getRegion(); - /** - * string region = 1; - * @return The bytes for region. - */ - com.google.protobuf.ByteString - getRegionBytes(); + /** + * .context.OpticalLinkDetails details = 2; + * @return Whether the details field is set. + */ + boolean hasDetails(); - /** - * .context.GPS_Position gps_position = 2; - * @return Whether the gpsPosition field is set. - */ - boolean hasGpsPosition(); - /** - * .context.GPS_Position gps_position = 2; - * @return The gpsPosition. - */ - context.ContextOuterClass.GPS_Position getGpsPosition(); - /** - * .context.GPS_Position gps_position = 2; - */ - context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder(); - - public context.ContextOuterClass.Location.LocationCase getLocationCase(); - } - /** - * Protobuf type {@code context.Location} - */ - public static final class Location extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Location) - LocationOrBuilder { - private static final long serialVersionUID = 0L; - // Use Location.newBuilder() to construct. - private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Location() { - } + /** + * .context.OpticalLinkDetails details = 2; + * @return The details. + */ + context.ContextOuterClass.OpticalLinkDetails getDetails(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Location(); - } + /** + * .context.OpticalLinkDetails details = 2; + */ + context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder(); - @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; - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + * @return Whether the opticalLinkUuid field is set. + */ + boolean hasOpticalLinkUuid(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Location_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Location.class, context.ContextOuterClass.Location.Builder.class); - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + * @return The opticalLinkUuid. + */ + context.ContextOuterClass.OpticalLinkId getOpticalLinkUuid(); - private int locationCase_ = 0; - private java.lang.Object location_; - public enum LocationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - REGION(1), - GPS_POSITION(2), - LOCATION_NOT_SET(0); - private final int value; - private LocationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LocationCase valueOf(int value) { - return forNumber(value); - } - - public static LocationCase forNumber(int value) { - switch (value) { - case 1: return REGION; - case 2: return GPS_POSITION; - case 0: return LOCATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LocationCase - getLocationCase() { - return LocationCase.forNumber( - locationCase_); + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder(); } - public static final int REGION_FIELD_NUMBER = 1; - /** - * string region = 1; - * @return Whether the region field is set. - */ - public boolean hasRegion() { - return locationCase_ == 1; - } - /** - * string region = 1; - * @return The region. - */ - public java.lang.String getRegion() { - java.lang.Object ref = ""; - if (locationCase_ == 1) { - ref = location_; - } - 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(); - if (locationCase_ == 1) { - location_ = s; - } - return s; - } - } /** - * string region = 1; - * @return The bytes for region. + * Protobuf type {@code context.OpticalLink} */ - public com.google.protobuf.ByteString - getRegionBytes() { - java.lang.Object ref = ""; - if (locationCase_ == 1) { - ref = location_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (locationCase_ == 1) { - location_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static final class OpticalLink extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:context.OpticalLink) + OpticalLinkOrBuilder { - public static final int GPS_POSITION_FIELD_NUMBER = 2; - /** - * .context.GPS_Position gps_position = 2; - * @return Whether the gpsPosition field is set. - */ - @java.lang.Override - public boolean hasGpsPosition() { - return locationCase_ == 2; - } - /** - * .context.GPS_Position gps_position = 2; - * @return The gpsPosition. - */ - @java.lang.Override - public context.ContextOuterClass.GPS_Position getGpsPosition() { - if (locationCase_ == 2) { - return (context.ContextOuterClass.GPS_Position) location_; - } - return context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } - /** - * .context.GPS_Position gps_position = 2; - */ - @java.lang.Override - public context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder() { - if (locationCase_ == 2) { - return (context.ContextOuterClass.GPS_Position) location_; - } - return context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } + private static final long serialVersionUID = 0L; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + // Use OpticalLink.newBuilder() to construct. + private OpticalLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - memoizedIsInitialized = 1; - return true; - } + private OpticalLink() { + name_ = ""; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (locationCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); - } - if (locationCase_ == 2) { - output.writeMessage(2, (context.ContextOuterClass.GPS_Position) location_); - } - unknownFields.writeTo(output); - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpticalLink(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (locationCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); - } - if (locationCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (context.ContextOuterClass.GPS_Position) location_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Location)) { - return super.equals(obj); - } - context.ContextOuterClass.Location other = (context.ContextOuterClass.Location) obj; - - if (!getLocationCase().equals(other.getLocationCase())) return false; - switch (locationCase_) { - case 1: - if (!getRegion() - .equals(other.getRegion())) return false; - break; - case 2: - if (!getGpsPosition() - .equals(other.getGpsPosition())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + 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(); + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (locationCase_) { - case 1: - hash = (37 * hash) + REGION_FIELD_NUMBER; - hash = (53 * hash) + getRegion().hashCode(); - break; - case 2: - hash = (37 * hash) + GPS_POSITION_FIELD_NUMBER; - hash = (53 * hash) + getGpsPosition().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; + } - public static context.ContextOuterClass.Location parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Location parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Location parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Location parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Location parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Location parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Location parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Location parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Location parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Location parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Location parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Location parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLink_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLink.class, context.ContextOuterClass.OpticalLink.Builder.class); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Location prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static final int NAME_FIELD_NUMBER = 1; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Location} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Location) - context.ContextOuterClass.LocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Location_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Location_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Location.class, context.ContextOuterClass.Location.Builder.class); - } - - // 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(); - locationCase_ = 0; - location_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Location_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Location getDefaultInstanceForType() { - return context.ContextOuterClass.Location.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Location build() { - context.ContextOuterClass.Location result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - } - result.locationCase_ = locationCase_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Location) { - return mergeFrom((context.ContextOuterClass.Location)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Location other) { - if (other == context.ContextOuterClass.Location.getDefaultInstance()) return this; - switch (other.getLocationCase()) { - case REGION: { - locationCase_ = 1; - location_ = other.location_; - onChanged(); - break; - } - case GPS_POSITION: { - mergeGpsPosition(other.getGpsPosition()); - break; - } - case LOCATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Location) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int locationCase_ = 0; - private java.lang.Object location_; - public LocationCase - getLocationCase() { - return LocationCase.forNumber( - locationCase_); - } - - public Builder clearLocation() { - locationCase_ = 0; - location_ = null; - onChanged(); - return this; - } - - - /** - * string region = 1; - * @return Whether the region field is set. - */ - @java.lang.Override - public boolean hasRegion() { - return locationCase_ == 1; - } - /** - * string region = 1; - * @return The region. - */ - @java.lang.Override - public java.lang.String getRegion() { - java.lang.Object ref = ""; - if (locationCase_ == 1) { - ref = location_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (locationCase_ == 1) { - location_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string region = 1; - * @return The bytes for region. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRegionBytes() { - java.lang.Object ref = ""; - if (locationCase_ == 1) { - ref = location_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (locationCase_ == 1) { - location_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string region = 1; - * @param value The region to set. - * @return This builder for chaining. - */ - public Builder setRegion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - locationCase_ = 1; - location_ = value; - onChanged(); - return this; - } - /** - * string region = 1; - * @return This builder for chaining. - */ - public Builder clearRegion() { - if (locationCase_ == 1) { - locationCase_ = 0; - location_ = null; - onChanged(); - } - return this; - } - /** - * string region = 1; - * @param value The bytes for region to set. - * @return This builder for chaining. - */ - public Builder setRegionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - locationCase_ = 1; - location_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.GPS_Position, context.ContextOuterClass.GPS_Position.Builder, context.ContextOuterClass.GPS_PositionOrBuilder> gpsPositionBuilder_; - /** - * .context.GPS_Position gps_position = 2; - * @return Whether the gpsPosition field is set. - */ - @java.lang.Override - public boolean hasGpsPosition() { - return locationCase_ == 2; - } - /** - * .context.GPS_Position gps_position = 2; - * @return The gpsPosition. - */ - @java.lang.Override - public context.ContextOuterClass.GPS_Position getGpsPosition() { - if (gpsPositionBuilder_ == null) { - if (locationCase_ == 2) { - return (context.ContextOuterClass.GPS_Position) location_; - } - return context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } else { - if (locationCase_ == 2) { - return gpsPositionBuilder_.getMessage(); - } - return context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } - } - /** - * .context.GPS_Position gps_position = 2; - */ - public Builder setGpsPosition(context.ContextOuterClass.GPS_Position value) { - if (gpsPositionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - location_ = value; - onChanged(); - } else { - gpsPositionBuilder_.setMessage(value); - } - locationCase_ = 2; - return this; - } - /** - * .context.GPS_Position gps_position = 2; - */ - public Builder setGpsPosition( - context.ContextOuterClass.GPS_Position.Builder builderForValue) { - if (gpsPositionBuilder_ == null) { - location_ = builderForValue.build(); - onChanged(); - } else { - gpsPositionBuilder_.setMessage(builderForValue.build()); - } - locationCase_ = 2; - return this; - } - /** - * .context.GPS_Position gps_position = 2; - */ - public Builder mergeGpsPosition(context.ContextOuterClass.GPS_Position value) { - if (gpsPositionBuilder_ == null) { - if (locationCase_ == 2 && - location_ != context.ContextOuterClass.GPS_Position.getDefaultInstance()) { - location_ = context.ContextOuterClass.GPS_Position.newBuilder((context.ContextOuterClass.GPS_Position) location_) - .mergeFrom(value).buildPartial(); - } else { - location_ = value; - } - onChanged(); - } else { - if (locationCase_ == 2) { - gpsPositionBuilder_.mergeFrom(value); - } - gpsPositionBuilder_.setMessage(value); - } - locationCase_ = 2; - return this; - } - /** - * .context.GPS_Position gps_position = 2; - */ - public Builder clearGpsPosition() { - if (gpsPositionBuilder_ == null) { - if (locationCase_ == 2) { - locationCase_ = 0; - location_ = null; - onChanged(); - } - } else { - if (locationCase_ == 2) { - locationCase_ = 0; - location_ = null; - } - gpsPositionBuilder_.clear(); - } - return this; - } - /** - * .context.GPS_Position gps_position = 2; - */ - public context.ContextOuterClass.GPS_Position.Builder getGpsPositionBuilder() { - return getGpsPositionFieldBuilder().getBuilder(); - } - /** - * .context.GPS_Position gps_position = 2; - */ - @java.lang.Override - public context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder() { - if ((locationCase_ == 2) && (gpsPositionBuilder_ != null)) { - return gpsPositionBuilder_.getMessageOrBuilder(); - } else { - if (locationCase_ == 2) { - return (context.ContextOuterClass.GPS_Position) location_; - } - return context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } - } - /** - * .context.GPS_Position gps_position = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.GPS_Position, context.ContextOuterClass.GPS_Position.Builder, context.ContextOuterClass.GPS_PositionOrBuilder> - getGpsPositionFieldBuilder() { - if (gpsPositionBuilder_ == null) { - if (!(locationCase_ == 2)) { - location_ = context.ContextOuterClass.GPS_Position.getDefaultInstance(); - } - gpsPositionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.GPS_Position, context.ContextOuterClass.GPS_Position.Builder, context.ContextOuterClass.GPS_PositionOrBuilder>( - (context.ContextOuterClass.GPS_Position) location_, - getParentForChildren(), - isClean()); - location_ = null; - } - locationCase_ = 2; - onChanged();; - return gpsPositionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Location) - } + private volatile java.lang.Object name_; - // @@protoc_insertion_point(class_scope:context.Location) - private static final context.ContextOuterClass.Location DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Location(); - } + /** + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } - public static context.ContextOuterClass.Location getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static final int DETAILS_FIELD_NUMBER = 2; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private context.ContextOuterClass.OpticalLinkDetails details_; - @java.lang.Override - public context.ContextOuterClass.Location getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.OpticalLinkDetails details = 2; + * @return Whether the details field is set. + */ + @java.lang.Override + public boolean hasDetails() { + return details_ != null; + } - } + /** + * .context.OpticalLinkDetails details = 2; + * @return The details. + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLinkDetails getDetails() { + return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + } - public interface Constraint_EndPointLocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_EndPointLocation) - com.google.protobuf.MessageOrBuilder { + /** + * .context.OpticalLinkDetails details = 2; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder() { + return getDetails(); + } - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - boolean hasEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - context.ContextOuterClass.EndPointId getEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + public static final int OPTICAL_LINK_UUID_FIELD_NUMBER = 3; - /** - * .context.Location location = 2; - * @return Whether the location field is set. - */ - boolean hasLocation(); - /** - * .context.Location location = 2; - * @return The location. - */ - context.ContextOuterClass.Location getLocation(); - /** - * .context.Location location = 2; - */ - context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder(); - } - /** - * Protobuf type {@code context.Constraint_EndPointLocation} - */ - public static final class Constraint_EndPointLocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_EndPointLocation) - Constraint_EndPointLocationOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_EndPointLocation.newBuilder() to construct. - private Constraint_EndPointLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_EndPointLocation() { - } + private context.ContextOuterClass.OpticalLinkId opticalLinkUuid_; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_EndPointLocation(); - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + * @return Whether the opticalLinkUuid field is set. + */ + @java.lang.Override + public boolean hasOpticalLinkUuid() { + return opticalLinkUuid_ != null; + } - @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; - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + * @return The opticalLinkUuid. + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLinkId getOpticalLinkUuid() { + return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_EndPointLocation.class, context.ContextOuterClass.Constraint_EndPointLocation.Builder.class); - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + @java.lang.Override + public context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder() { + return getOpticalLinkUuid(); + } - public static final int ENDPOINT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.EndPointId endpointId_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - @java.lang.Override - public boolean hasEndpointId() { - return endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointId() { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); - } + private byte memoizedIsInitialized = -1; - public static final int LOCATION_FIELD_NUMBER = 2; - private context.ContextOuterClass.Location location_; - /** - * .context.Location location = 2; - * @return Whether the location field is set. - */ - @java.lang.Override - public boolean hasLocation() { - return location_ != null; - } - /** - * .context.Location location = 2; - * @return The location. - */ - @java.lang.Override - public context.ContextOuterClass.Location getLocation() { - return location_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : location_; - } - /** - * .context.Location location = 2; - */ - @java.lang.Override - public context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder() { - return getLocation(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (details_ != null) { + output.writeMessage(2, getDetails()); + } + if (opticalLinkUuid_ != null) { + output.writeMessage(3, getOpticalLinkUuid()); + } + unknownFields.writeTo(output); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (details_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDetails()); + } + if (opticalLinkUuid_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOpticalLinkUuid()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (endpointId_ != null) { - output.writeMessage(1, getEndpointId()); - } - if (location_ != null) { - output.writeMessage(2, getLocation()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof context.ContextOuterClass.OpticalLink)) { + return super.equals(obj); + } + context.ContextOuterClass.OpticalLink other = (context.ContextOuterClass.OpticalLink) obj; + if (!getName().equals(other.getName())) + return false; + if (hasDetails() != other.hasDetails()) + return false; + if (hasDetails()) { + if (!getDetails().equals(other.getDetails())) + return false; + } + if (hasOpticalLinkUuid() != other.hasOpticalLinkUuid()) + return false; + if (hasOpticalLinkUuid()) { + if (!getOpticalLinkUuid().equals(other.getOpticalLinkUuid())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (endpointId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEndpointId()); - } - if (location_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getLocation()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasDetails()) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + } + if (hasOpticalLinkUuid()) { + hash = (37 * hash) + OPTICAL_LINK_UUID_FIELD_NUMBER; + hash = (53 * hash) + getOpticalLinkUuid().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_EndPointLocation)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint_EndPointLocation other = (context.ContextOuterClass.Constraint_EndPointLocation) obj; - - if (hasEndpointId() != other.hasEndpointId()) return false; - if (hasEndpointId()) { - if (!getEndpointId() - .equals(other.getEndpointId())) return false; - } - if (hasLocation() != other.hasLocation()) return false; - if (hasLocation()) { - if (!getLocation() - .equals(other.getLocation())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static context.ContextOuterClass.OpticalLink parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEndpointId()) { - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - } - if (hasLocation()) { - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocation().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static context.ContextOuterClass.OpticalLink parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_EndPointLocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_EndPointLocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_EndPointLocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_EndPointLocation) - context.ContextOuterClass.Constraint_EndPointLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_EndPointLocation.class, context.ContextOuterClass.Constraint_EndPointLocation.Builder.class); - } - - // 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; - endpointIdBuilder_ = null; - } - if (locationBuilder_ == null) { - location_ = null; - } else { - location_ = null; - locationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocation getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocation build() { - context.ContextOuterClass.Constraint_EndPointLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_EndPointLocation) { - return mergeFrom((context.ContextOuterClass.Constraint_EndPointLocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_EndPointLocation other) { - if (other == context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance()) return this; - if (other.hasEndpointId()) { - mergeEndpointId(other.getEndpointId()); - } - if (other.hasLocation()) { - mergeLocation(other.getLocation()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_EndPointLocation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.EndPointId endpointId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - public context.ContextOuterClass.EndPointId getEndpointId() { - if (endpointIdBuilder_ == null) { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } else { - return endpointIdBuilder_.getMessage(); - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - onChanged(); - } else { - endpointIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdBuilder_ == null) { - endpointId_ = builderForValue.build(); - onChanged(); - } else { - endpointIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = - context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); - } else { - endpointId_ = value; - } - onChanged(); - } else { - endpointIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { - - onChanged(); - return getEndpointIdFieldBuilder().getBuilder(); - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - if (endpointIdBuilder_ != null) { - return endpointIdBuilder_.getMessageOrBuilder(); - } else { - return endpointId_ == null ? - context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> - getEndpointIdFieldBuilder() { - if (endpointIdBuilder_ == null) { - endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>( - getEndpointId(), - getParentForChildren(), - isClean()); - endpointId_ = null; - } - return endpointIdBuilder_; - } - - private context.ContextOuterClass.Location location_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Location, context.ContextOuterClass.Location.Builder, context.ContextOuterClass.LocationOrBuilder> locationBuilder_; - /** - * .context.Location location = 2; - * @return Whether the location field is set. - */ - public boolean hasLocation() { - return locationBuilder_ != null || location_ != null; - } - /** - * .context.Location location = 2; - * @return The location. - */ - public context.ContextOuterClass.Location getLocation() { - if (locationBuilder_ == null) { - return location_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : location_; - } else { - return locationBuilder_.getMessage(); - } - } - /** - * .context.Location location = 2; - */ - public Builder setLocation(context.ContextOuterClass.Location value) { - if (locationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - location_ = value; - onChanged(); - } else { - locationBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Location location = 2; - */ - public Builder setLocation( - context.ContextOuterClass.Location.Builder builderForValue) { - if (locationBuilder_ == null) { - location_ = builderForValue.build(); - onChanged(); - } else { - locationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Location location = 2; - */ - public Builder mergeLocation(context.ContextOuterClass.Location value) { - if (locationBuilder_ == null) { - if (location_ != null) { - location_ = - context.ContextOuterClass.Location.newBuilder(location_).mergeFrom(value).buildPartial(); - } else { - location_ = value; - } - onChanged(); - } else { - locationBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Location location = 2; - */ - public Builder clearLocation() { - if (locationBuilder_ == null) { - location_ = null; - onChanged(); - } else { - location_ = null; - locationBuilder_ = null; - } - - return this; - } - /** - * .context.Location location = 2; - */ - public context.ContextOuterClass.Location.Builder getLocationBuilder() { - - onChanged(); - return getLocationFieldBuilder().getBuilder(); - } - /** - * .context.Location location = 2; - */ - public context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder() { - if (locationBuilder_ != null) { - return locationBuilder_.getMessageOrBuilder(); - } else { - return location_ == null ? - context.ContextOuterClass.Location.getDefaultInstance() : location_; - } - } - /** - * .context.Location location = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Location, context.ContextOuterClass.Location.Builder, context.ContextOuterClass.LocationOrBuilder> - getLocationFieldBuilder() { - if (locationBuilder_ == null) { - locationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Location, context.ContextOuterClass.Location.Builder, context.ContextOuterClass.LocationOrBuilder>( - getLocation(), - getParentForChildren(), - isClean()); - location_ = null; - } - return locationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_EndPointLocation) - } + public static context.ContextOuterClass.OpticalLink parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(class_scope:context.Constraint_EndPointLocation) - private static final context.ContextOuterClass.Constraint_EndPointLocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_EndPointLocation(); - } + public static context.ContextOuterClass.OpticalLink parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static context.ContextOuterClass.Constraint_EndPointLocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.OpticalLink parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static context.ContextOuterClass.OpticalLink parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static context.ContextOuterClass.OpticalLink parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static context.ContextOuterClass.OpticalLink parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - } + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public interface Constraint_EndPointPriorityOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_EndPointPriority) - com.google.protobuf.MessageOrBuilder { + public static context.ContextOuterClass.OpticalLink parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - boolean hasEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - context.ContextOuterClass.EndPointId getEndpointId(); - /** - * .context.EndPointId endpoint_id = 1; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - /** - * uint32 priority = 2; - * @return The priority. - */ - int getPriority(); - } - /** - * Protobuf type {@code context.Constraint_EndPointPriority} - */ - public static final class Constraint_EndPointPriority extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_EndPointPriority) - Constraint_EndPointPriorityOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_EndPointPriority.newBuilder() to construct. - private Constraint_EndPointPriority(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_EndPointPriority() { - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_EndPointPriority(); - } + public static Builder newBuilder(context.ContextOuterClass.OpticalLink prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @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; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_EndPointPriority.class, context.ContextOuterClass.Constraint_EndPointPriority.Builder.class); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public static final int ENDPOINT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.EndPointId endpointId_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - @java.lang.Override - public boolean hasEndpointId() { - return endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointId() { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); - } + /** + * Protobuf type {@code context.OpticalLink} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:context.OpticalLink) + context.ContextOuterClass.OpticalLinkOrBuilder { - public static final int PRIORITY_FIELD_NUMBER = 2; - private int priority_; - /** - * uint32 priority = 2; - * @return The priority. - */ - @java.lang.Override - public int getPriority() { - return priority_; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return context.ContextOuterClass.internal_static_context_OpticalLink_fieldAccessorTable.ensureFieldAccessorsInitialized(context.ContextOuterClass.OpticalLink.class, context.ContextOuterClass.OpticalLink.Builder.class); + } - memoizedIsInitialized = 1; - return true; - } + // Construct using context.ContextOuterClass.OpticalLink.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (endpointId_ != null) { - output.writeMessage(1, getEndpointId()); - } - if (priority_ != 0) { - output.writeUInt32(2, priority_); - } - unknownFields.writeTo(output); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (endpointId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEndpointId()); - } - if (priority_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, priority_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + if (detailsBuilder_ == null) { + details_ = null; + } else { + details_ = null; + detailsBuilder_ = null; + } + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuid_ = null; + } else { + opticalLinkUuid_ = null; + opticalLinkUuidBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; + } + + @java.lang.Override + public context.ContextOuterClass.OpticalLink getDefaultInstanceForType() { + return context.ContextOuterClass.OpticalLink.getDefaultInstance(); + } + + @java.lang.Override + public context.ContextOuterClass.OpticalLink build() { + context.ContextOuterClass.OpticalLink result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_EndPointPriority)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint_EndPointPriority other = (context.ContextOuterClass.Constraint_EndPointPriority) obj; - - if (hasEndpointId() != other.hasEndpointId()) return false; - if (hasEndpointId()) { - if (!getEndpointId() - .equals(other.getEndpointId())) return false; - } - if (getPriority() - != other.getPriority()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @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(); + } + onBuilt(); + return result; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEndpointId()) { - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - } - hash = (37 * hash) + PRIORITY_FIELD_NUMBER; - hash = (53 * hash) + getPriority(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_EndPointPriority parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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 newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_EndPointPriority prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_EndPointPriority} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_EndPointPriority) - context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_EndPointPriority.class, context.ContextOuterClass.Constraint_EndPointPriority.Builder.class); - } - - // 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; - endpointIdBuilder_ = null; - } - priority_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriority getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriority build() { - context.ContextOuterClass.Constraint_EndPointPriority result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_EndPointPriority) { - return mergeFrom((context.ContextOuterClass.Constraint_EndPointPriority)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_EndPointPriority other) { - if (other == context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance()) return this; - if (other.hasEndpointId()) { - mergeEndpointId(other.getEndpointId()); - } - if (other.getPriority() != 0) { - setPriority(other.getPriority()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_EndPointPriority) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.EndPointId endpointId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; - /** - * .context.EndPointId endpoint_id = 1; - * @return Whether the endpointId field is set. - */ - public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 1; - * @return The endpointId. - */ - public context.ContextOuterClass.EndPointId getEndpointId() { - if (endpointIdBuilder_ == null) { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } else { - return endpointIdBuilder_.getMessage(); - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - onChanged(); - } else { - endpointIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder setEndpointId( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdBuilder_ == null) { - endpointId_ = builderForValue.build(); - onChanged(); - } else { - endpointIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = - context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); - } else { - endpointId_ = value; - } - onChanged(); - } else { - endpointIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { - - onChanged(); - return getEndpointIdFieldBuilder().getBuilder(); - } - /** - * .context.EndPointId endpoint_id = 1; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - if (endpointIdBuilder_ != null) { - return endpointIdBuilder_.getMessageOrBuilder(); - } else { - return endpointId_ == null ? - context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - } - /** - * .context.EndPointId endpoint_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> - getEndpointIdFieldBuilder() { - if (endpointIdBuilder_ == null) { - endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>( - getEndpointId(), - getParentForChildren(), - isClean()); - endpointId_ = null; - } - return endpointIdBuilder_; - } - - private int priority_ ; - /** - * uint32 priority = 2; - * @return The priority. - */ - @java.lang.Override - public int getPriority() { - return priority_; - } - /** - * uint32 priority = 2; - * @param value The priority to set. - * @return This builder for chaining. - */ - public Builder setPriority(int value) { - - priority_ = value; - onChanged(); - return this; - } - /** - * uint32 priority = 2; - * @return This builder for chaining. - */ - public Builder clearPriority() { - - priority_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_EndPointPriority) - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - // @@protoc_insertion_point(class_scope:context.Constraint_EndPointPriority) - private static final context.ContextOuterClass.Constraint_EndPointPriority DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_EndPointPriority(); - } + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - public static context.ContextOuterClass.Constraint_EndPointPriority getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof context.ContextOuterClass.OpticalLink) { + return mergeFrom((context.ContextOuterClass.OpticalLink) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public Builder mergeFrom(context.ContextOuterClass.OpticalLink other) { + if (other == context.ContextOuterClass.OpticalLink.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasDetails()) { + mergeDetails(other.getDetails()); + } + if (other.hasOpticalLinkUuid()) { + mergeOpticalLinkUuid(other.getOpticalLinkUuid()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriority getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (context.ContextOuterClass.OpticalLink) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - public interface Constraint_SLA_LatencyOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Latency) - com.google.protobuf.MessageOrBuilder { + private java.lang.Object name_ = ""; + + /** + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * float e2e_latency_ms = 1; - * @return The e2eLatencyMs. - */ - float getE2ELatencyMs(); - } - /** - * Protobuf type {@code context.Constraint_SLA_Latency} - */ - public static final class Constraint_SLA_Latency extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Latency) - Constraint_SLA_LatencyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_SLA_Latency.newBuilder() to construct. - private Constraint_SLA_Latency(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_SLA_Latency() { - } + /** + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_SLA_Latency(); - } + /** + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } - @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; - } + /** + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Latency.class, context.ContextOuterClass.Constraint_SLA_Latency.Builder.class); - } + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } - public static final int E2E_LATENCY_MS_FIELD_NUMBER = 1; - private float e2ELatencyMs_; - /** - * float e2e_latency_ms = 1; - * @return The e2eLatencyMs. - */ - @java.lang.Override - public float getE2ELatencyMs() { - return e2ELatencyMs_; - } + private context.ContextOuterClass.OpticalLinkDetails details_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private com.google.protobuf.SingleFieldBuilderV3 detailsBuilder_; - memoizedIsInitialized = 1; - return true; - } + /** + * .context.OpticalLinkDetails details = 2; + * @return Whether the details field is set. + */ + public boolean hasDetails() { + return detailsBuilder_ != null || details_ != null; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (e2ELatencyMs_ != 0F) { - output.writeFloat(1, e2ELatencyMs_); - } - unknownFields.writeTo(output); - } + /** + * .context.OpticalLinkDetails details = 2; + * @return The details. + */ + public context.ContextOuterClass.OpticalLinkDetails getDetails() { + if (detailsBuilder_ == null) { + return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + } else { + return detailsBuilder_.getMessage(); + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (e2ELatencyMs_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, e2ELatencyMs_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.OpticalLinkDetails details = 2; + */ + public Builder setDetails(context.ContextOuterClass.OpticalLinkDetails value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + detailsBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Latency)) { - return super.equals(obj); - } - 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)) return false; - return true; - } + /** + * .context.OpticalLinkDetails details = 2; + */ + public Builder setDetails(context.ContextOuterClass.OpticalLinkDetails.Builder builderForValue) { + if (detailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + detailsBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - 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(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.OpticalLinkDetails details = 2; + */ + public Builder mergeDetails(context.ContextOuterClass.OpticalLinkDetails value) { + if (detailsBuilder_ == null) { + if (details_ != null) { + details_ = context.ContextOuterClass.OpticalLinkDetails.newBuilder(details_).mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + detailsBuilder_.mergeFrom(value); + } + return this; + } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Latency parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.OpticalLinkDetails details = 2; + */ + public Builder clearDetails() { + if (detailsBuilder_ == null) { + details_ = null; + onChanged(); + } else { + details_ = null; + detailsBuilder_ = null; + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Latency prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.OpticalLinkDetails details = 2; + */ + public context.ContextOuterClass.OpticalLinkDetails.Builder getDetailsBuilder() { + onChanged(); + return getDetailsFieldBuilder().getBuilder(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_SLA_Latency} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Latency) - context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Latency.class, context.ContextOuterClass.Constraint_SLA_Latency.Builder.class); - } - - // 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(); - e2ELatencyMs_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency build() { - context.ContextOuterClass.Constraint_SLA_Latency result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_SLA_Latency) { - return mergeFrom((context.ContextOuterClass.Constraint_SLA_Latency)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Latency other) { - if (other == context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance()) return this; - if (other.getE2ELatencyMs() != 0F) { - setE2ELatencyMs(other.getE2ELatencyMs()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_SLA_Latency) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float e2ELatencyMs_ ; - /** - * float e2e_latency_ms = 1; - * @return The e2eLatencyMs. - */ - @java.lang.Override - public float getE2ELatencyMs() { - return e2ELatencyMs_; - } - /** - * float e2e_latency_ms = 1; - * @param value The e2eLatencyMs to set. - * @return This builder for chaining. - */ - public Builder setE2ELatencyMs(float value) { - - e2ELatencyMs_ = value; - onChanged(); - return this; - } - /** - * float e2e_latency_ms = 1; - * @return This builder for chaining. - */ - public Builder clearE2ELatencyMs() { - - e2ELatencyMs_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Latency) - } + /** + * .context.OpticalLinkDetails details = 2; + */ + public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder() { + if (detailsBuilder_ != null) { + return detailsBuilder_.getMessageOrBuilder(); + } else { + return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; + } + } - // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Latency) - private static final context.ContextOuterClass.Constraint_SLA_Latency DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Latency(); - } + /** + * .context.OpticalLinkDetails details = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDetailsFieldBuilder() { + if (detailsBuilder_ == null) { + detailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDetails(), getParentForChildren(), isClean()); + details_ = null; + } + return detailsBuilder_; + } - public static context.ContextOuterClass.Constraint_SLA_Latency getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private context.ContextOuterClass.OpticalLinkId opticalLinkUuid_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private com.google.protobuf.SingleFieldBuilderV3 opticalLinkUuidBuilder_; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + * @return Whether the opticalLinkUuid field is set. + */ + public boolean hasOpticalLinkUuid() { + return opticalLinkUuidBuilder_ != null || opticalLinkUuid_ != null; + } - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + * @return The opticalLinkUuid. + */ + public context.ContextOuterClass.OpticalLinkId getOpticalLinkUuid() { + if (opticalLinkUuidBuilder_ == null) { + return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + } else { + return opticalLinkUuidBuilder_.getMessage(); + } + } - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + public Builder setOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId value) { + if (opticalLinkUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + opticalLinkUuid_ = value; + onChanged(); + } else { + opticalLinkUuidBuilder_.setMessage(value); + } + return this; + } - public interface Constraint_SLA_CapacityOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Capacity) - com.google.protobuf.MessageOrBuilder { + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + public Builder setOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId.Builder builderForValue) { + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuid_ = builderForValue.build(); + onChanged(); + } else { + opticalLinkUuidBuilder_.setMessage(builderForValue.build()); + } + return this; + } - /** - * float capacity_gbps = 1; - * @return The capacityGbps. - */ - float getCapacityGbps(); - } - /** - * Protobuf type {@code context.Constraint_SLA_Capacity} - */ - public static final class Constraint_SLA_Capacity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Capacity) - Constraint_SLA_CapacityOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_SLA_Capacity.newBuilder() to construct. - private Constraint_SLA_Capacity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_SLA_Capacity() { - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + public Builder mergeOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId value) { + if (opticalLinkUuidBuilder_ == null) { + if (opticalLinkUuid_ != null) { + opticalLinkUuid_ = context.ContextOuterClass.OpticalLinkId.newBuilder(opticalLinkUuid_).mergeFrom(value).buildPartial(); + } else { + opticalLinkUuid_ = value; + } + onChanged(); + } else { + opticalLinkUuidBuilder_.mergeFrom(value); + } + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_SLA_Capacity(); - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + public Builder clearOpticalLinkUuid() { + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuid_ = null; + onChanged(); + } else { + opticalLinkUuid_ = null; + opticalLinkUuidBuilder_ = null; + } + return this; + } - @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; - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + public context.ContextOuterClass.OpticalLinkId.Builder getOpticalLinkUuidBuilder() { + onChanged(); + return getOpticalLinkUuidFieldBuilder().getBuilder(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Capacity.class, context.ContextOuterClass.Constraint_SLA_Capacity.Builder.class); - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + public context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder() { + if (opticalLinkUuidBuilder_ != null) { + return opticalLinkUuidBuilder_.getMessageOrBuilder(); + } else { + return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; + } + } - public static final int CAPACITY_GBPS_FIELD_NUMBER = 1; - private float capacityGbps_; - /** - * float capacity_gbps = 1; - * @return The capacityGbps. - */ - @java.lang.Override - public float getCapacityGbps() { - return capacityGbps_; - } + /** + * .context.OpticalLinkId optical_link_uuid = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getOpticalLinkUuidFieldBuilder() { + if (opticalLinkUuidBuilder_ == null) { + opticalLinkUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getOpticalLinkUuid(), getParentForChildren(), isClean()); + opticalLinkUuid_ = null; + } + return opticalLinkUuidBuilder_; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:context.OpticalLink) + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (capacityGbps_ != 0F) { - output.writeFloat(1, capacityGbps_); - } - unknownFields.writeTo(output); - } + // @@protoc_insertion_point(class_scope:context.OpticalLink) + private static final context.ContextOuterClass.OpticalLink DEFAULT_INSTANCE; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (capacityGbps_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, capacityGbps_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + static { + DEFAULT_INSTANCE = new context.ContextOuterClass.OpticalLink(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Capacity)) { - return super.equals(obj); - } - 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)) return false; - return true; - } + public static context.ContextOuterClass.OpticalLink getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - 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(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Capacity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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); + } + }; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Capacity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_SLA_Capacity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Capacity) - context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Capacity.class, context.ContextOuterClass.Constraint_SLA_Capacity.Builder.class); - } - - // 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(); - capacityGbps_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Capacity getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Capacity build() { - context.ContextOuterClass.Constraint_SLA_Capacity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_SLA_Capacity) { - return mergeFrom((context.ContextOuterClass.Constraint_SLA_Capacity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Capacity other) { - if (other == context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance()) return this; - if (other.getCapacityGbps() != 0F) { - setCapacityGbps(other.getCapacityGbps()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_SLA_Capacity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float capacityGbps_ ; - /** - * float capacity_gbps = 1; - * @return The capacityGbps. - */ - @java.lang.Override - public float getCapacityGbps() { - return capacityGbps_; - } - /** - * float capacity_gbps = 1; - * @param value The capacityGbps to set. - * @return This builder for chaining. - */ - public Builder setCapacityGbps(float value) { - - capacityGbps_ = value; - onChanged(); - return this; - } - /** - * float capacity_gbps = 1; - * @return This builder for chaining. - */ - public Builder clearCapacityGbps() { - - capacityGbps_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Capacity) - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Capacity) - private static final context.ContextOuterClass.Constraint_SLA_Capacity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Capacity(); + @java.lang.Override + public context.ContextOuterClass.OpticalLink getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static context.ContextOuterClass.Constraint_SLA_Capacity getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Empty_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Empty_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Uuid_descriptor; - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Capacity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Uuid_fieldAccessorTable; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Timestamp_descriptor; - public interface Constraint_SLA_AvailabilityOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Availability) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Timestamp_fieldAccessorTable; - /** - * uint32 num_disjoint_paths = 1; - * @return The numDisjointPaths. - */ - int getNumDisjointPaths(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Event_descriptor; - /** - * bool all_active = 2; - * @return The allActive. - */ - boolean getAllActive(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Event_fieldAccessorTable; - /** - *
-     * 0.0 .. 100.0 percentage of availability
-     * 
- * - * float availability = 3; - * @return The availability. - */ - float getAvailability(); - } - /** - * Protobuf type {@code context.Constraint_SLA_Availability} - */ - public static final class Constraint_SLA_Availability extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Availability) - Constraint_SLA_AvailabilityOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_SLA_Availability.newBuilder() to construct. - private Constraint_SLA_Availability(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_SLA_Availability() { - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ContextId_descriptor; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_SLA_Availability(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ContextId_fieldAccessorTable; - @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; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Context_descriptor; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Availability.class, context.ContextOuterClass.Constraint_SLA_Availability.Builder.class); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Context_fieldAccessorTable; - public static final int NUM_DISJOINT_PATHS_FIELD_NUMBER = 1; - private int numDisjointPaths_; - /** - * uint32 num_disjoint_paths = 1; - * @return The numDisjointPaths. - */ - @java.lang.Override - public int getNumDisjointPaths() { - return numDisjointPaths_; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ContextIdList_descriptor; - public static final int ALL_ACTIVE_FIELD_NUMBER = 2; - private boolean allActive_; - /** - * bool all_active = 2; - * @return The allActive. - */ - @java.lang.Override - public boolean getAllActive() { - return allActive_; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ContextIdList_fieldAccessorTable; - public static final int AVAILABILITY_FIELD_NUMBER = 3; - private float availability_; - /** - *
-     * 0.0 .. 100.0 percentage of availability
-     * 
- * - * float availability = 3; - * @return The availability. - */ - @java.lang.Override - public float getAvailability() { - return availability_; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ContextList_descriptor; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ContextList_fieldAccessorTable; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ContextEvent_descriptor; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (numDisjointPaths_ != 0) { - output.writeUInt32(1, numDisjointPaths_); - } - if (allActive_ != false) { - output.writeBool(2, allActive_); - } - if (availability_ != 0F) { - output.writeFloat(3, availability_); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ContextEvent_fieldAccessorTable; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (numDisjointPaths_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, numDisjointPaths_); - } - if (allActive_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, allActive_); - } - if (availability_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, availability_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_TopologyId_descriptor; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Availability)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint_SLA_Availability other = (context.ContextOuterClass.Constraint_SLA_Availability) obj; - - if (getNumDisjointPaths() - != other.getNumDisjointPaths()) return false; - if (getAllActive() - != other.getAllActive()) return false; - if (java.lang.Float.floatToIntBits(getAvailability()) - != java.lang.Float.floatToIntBits( - other.getAvailability())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_TopologyId_fieldAccessorTable; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NUM_DISJOINT_PATHS_FIELD_NUMBER; - hash = (53 * hash) + getNumDisjointPaths(); - hash = (37 * hash) + ALL_ACTIVE_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Topology_descriptor; - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Availability parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Topology_fieldAccessorTable; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Availability prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_TopologyDetails_descriptor; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_SLA_Availability} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Availability) - context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Availability.class, context.ContextOuterClass.Constraint_SLA_Availability.Builder.class); - } - - // 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(); - numDisjointPaths_ = 0; - - allActive_ = false; - - availability_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability build() { - context.ContextOuterClass.Constraint_SLA_Availability result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_SLA_Availability) { - return mergeFrom((context.ContextOuterClass.Constraint_SLA_Availability)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Availability other) { - if (other == context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance()) return this; - if (other.getNumDisjointPaths() != 0) { - setNumDisjointPaths(other.getNumDisjointPaths()); - } - if (other.getAllActive() != false) { - setAllActive(other.getAllActive()); - } - if (other.getAvailability() != 0F) { - setAvailability(other.getAvailability()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_SLA_Availability) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int numDisjointPaths_ ; - /** - * uint32 num_disjoint_paths = 1; - * @return The numDisjointPaths. - */ - @java.lang.Override - public int getNumDisjointPaths() { - return numDisjointPaths_; - } - /** - * uint32 num_disjoint_paths = 1; - * @param value The numDisjointPaths to set. - * @return This builder for chaining. - */ - public Builder setNumDisjointPaths(int value) { - - numDisjointPaths_ = value; - onChanged(); - return this; - } - /** - * uint32 num_disjoint_paths = 1; - * @return This builder for chaining. - */ - public Builder clearNumDisjointPaths() { - - numDisjointPaths_ = 0; - onChanged(); - return this; - } - - private boolean allActive_ ; - /** - * bool all_active = 2; - * @return The allActive. - */ - @java.lang.Override - public boolean getAllActive() { - return allActive_; - } - /** - * bool all_active = 2; - * @param value The allActive to set. - * @return This builder for chaining. - */ - public Builder setAllActive(boolean value) { - - allActive_ = value; - onChanged(); - return this; - } - /** - * bool all_active = 2; - * @return This builder for chaining. - */ - public Builder clearAllActive() { - - allActive_ = false; - onChanged(); - return this; - } - - private float availability_ ; - /** - *
-       * 0.0 .. 100.0 percentage of availability
-       * 
- * - * float availability = 3; - * @return The availability. - */ - @java.lang.Override - public float getAvailability() { - return availability_; - } - /** - *
-       * 0.0 .. 100.0 percentage of availability
-       * 
- * - * float availability = 3; - * @param value The availability to set. - * @return This builder for chaining. - */ - public Builder setAvailability(float value) { - - availability_ = value; - onChanged(); - return this; - } - /** - *
-       * 0.0 .. 100.0 percentage of availability
-       * 
- * - * float availability = 3; - * @return This builder for chaining. - */ - public Builder clearAvailability() { - - availability_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Availability) - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_TopologyDetails_fieldAccessorTable; - // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Availability) - private static final context.ContextOuterClass.Constraint_SLA_Availability DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Availability(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_TopologyIdList_descriptor; - public static context.ContextOuterClass.Constraint_SLA_Availability getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_TopologyIdList_fieldAccessorTable; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_TopologyList_descriptor; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_TopologyList_fieldAccessorTable; - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_TopologyEvent_descriptor; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_TopologyEvent_fieldAccessorTable; - public interface Constraint_SLA_Isolation_levelOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_SLA_Isolation_level) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceId_descriptor; - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return A list containing the isolationLevel. - */ - java.util.List getIsolationLevelList(); - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return The count of isolationLevel. - */ - int getIsolationLevelCount(); - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the element to return. - * @return The isolationLevel at the given index. - */ - context.ContextOuterClass.IsolationLevelEnum getIsolationLevel(int index); - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return A list containing the enum numeric values on the wire for isolationLevel. - */ - java.util.List - getIsolationLevelValueList(); - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of isolationLevel at the given index. - */ - int getIsolationLevelValue(int index); - } - /** - * Protobuf type {@code context.Constraint_SLA_Isolation_level} - */ - public static final class Constraint_SLA_Isolation_level extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_SLA_Isolation_level) - Constraint_SLA_Isolation_levelOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_SLA_Isolation_level.newBuilder() to construct. - private Constraint_SLA_Isolation_level(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_SLA_Isolation_level() { - isolationLevel_ = java.util.Collections.emptyList(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_DeviceId_fieldAccessorTable; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_SLA_Isolation_level(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Device_descriptor; - @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(); - 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(); - 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; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Device_fieldAccessorTable; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Isolation_level.class, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder.class); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Component_descriptor; - public static final int ISOLATION_LEVEL_FIELD_NUMBER = 1; - private java.util.List 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); - return result == null ? context.ContextOuterClass.IsolationLevelEnum.UNRECOGNIZED : result; - } - }; - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return A list containing the isolationLevel. - */ - @java.lang.Override - public java.util.List getIsolationLevelList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, context.ContextOuterClass.IsolationLevelEnum>(isolationLevel_, isolationLevel_converter_); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return The count of isolationLevel. - */ - @java.lang.Override - public int getIsolationLevelCount() { - return isolationLevel_.size(); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the element to return. - * @return The isolationLevel at the given index. - */ - @java.lang.Override - public context.ContextOuterClass.IsolationLevelEnum getIsolationLevel(int index) { - return isolationLevel_converter_.convert(isolationLevel_.get(index)); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return A list containing the enum numeric values on the wire for isolationLevel. - */ - @java.lang.Override - public java.util.List - getIsolationLevelValueList() { - return isolationLevel_; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of isolationLevel at the given index. - */ - @java.lang.Override - public int getIsolationLevelValue(int index) { - return isolationLevel_.get(index); - } - private int isolationLevelMemoizedSerializedSize; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Component_fieldAccessorTable; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Component_AttributesEntry_descriptor; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Component_AttributesEntry_fieldAccessorTable; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (getIsolationLevelList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(isolationLevelMemoizedSerializedSize); - } - for (int i = 0; i < isolationLevel_.size(); i++) { - output.writeEnumNoTag(isolationLevel_.get(i)); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceConfig_descriptor; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < isolationLevel_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(isolationLevel_.get(i)); - } - size += dataSize; - if (!getIsolationLevelList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }isolationLevelMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_DeviceConfig_fieldAccessorTable; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_SLA_Isolation_level)) { - return super.equals(obj); - } - 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)) return false; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceIdList_descriptor; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getIsolationLevelCount() > 0) { - hash = (37 * hash) + ISOLATION_LEVEL_FIELD_NUMBER; - hash = (53 * hash) + isolationLevel_.hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_DeviceIdList_fieldAccessorTable; - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_SLA_Isolation_level parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceList_descriptor; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_SLA_Isolation_level prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_DeviceList_fieldAccessorTable; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_SLA_Isolation_level} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_SLA_Isolation_level) - context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_SLA_Isolation_level.class, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder.class); - } - - // 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(); - isolationLevel_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level build() { - context.ContextOuterClass.Constraint_SLA_Isolation_level result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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); - } - 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); - } - @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.Constraint_SLA_Isolation_level) { - return mergeFrom((context.ContextOuterClass.Constraint_SLA_Isolation_level)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_SLA_Isolation_level other) { - if (other == context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance()) return this; - if (!other.isolationLevel_.isEmpty()) { - if (isolationLevel_.isEmpty()) { - isolationLevel_ = other.isolationLevel_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIsolationLevelIsMutable(); - isolationLevel_.addAll(other.isolationLevel_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_SLA_Isolation_level) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List isolationLevel_ = - java.util.Collections.emptyList(); - private void ensureIsolationLevelIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - isolationLevel_ = new java.util.ArrayList(isolationLevel_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return A list containing the isolationLevel. - */ - public java.util.List getIsolationLevelList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, context.ContextOuterClass.IsolationLevelEnum>(isolationLevel_, isolationLevel_converter_); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return The count of isolationLevel. - */ - public int getIsolationLevelCount() { - return isolationLevel_.size(); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the element to return. - * @return The isolationLevel at the given index. - */ - public context.ContextOuterClass.IsolationLevelEnum getIsolationLevel(int index) { - return isolationLevel_converter_.convert(isolationLevel_.get(index)); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index to set the value at. - * @param value The isolationLevel to set. - * @return This builder for chaining. - */ - public Builder setIsolationLevel( - int index, context.ContextOuterClass.IsolationLevelEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIsolationLevelIsMutable(); - isolationLevel_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param value The isolationLevel to add. - * @return This builder for chaining. - */ - public Builder addIsolationLevel(context.ContextOuterClass.IsolationLevelEnum value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIsolationLevelIsMutable(); - isolationLevel_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param values The isolationLevel to add. - * @return This builder for chaining. - */ - public Builder addAllIsolationLevel( - java.lang.Iterable values) { - ensureIsolationLevelIsMutable(); - for (context.ContextOuterClass.IsolationLevelEnum value : values) { - isolationLevel_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return This builder for chaining. - */ - public Builder clearIsolationLevel() { - isolationLevel_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @return A list containing the enum numeric values on the wire for isolationLevel. - */ - public java.util.List - getIsolationLevelValueList() { - return java.util.Collections.unmodifiableList(isolationLevel_); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of isolationLevel at the given index. - */ - public int getIsolationLevelValue(int index) { - return isolationLevel_.get(index); - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of isolationLevel at the given index. - * @return This builder for chaining. - */ - public Builder setIsolationLevelValue( - int index, int value) { - ensureIsolationLevelIsMutable(); - isolationLevel_.set(index, value); - onChanged(); - return this; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param value The enum numeric value on the wire for isolationLevel to add. - * @return This builder for chaining. - */ - public Builder addIsolationLevelValue(int value) { - ensureIsolationLevelIsMutable(); - isolationLevel_.add(value); - onChanged(); - return this; - } - /** - * repeated .context.IsolationLevelEnum isolation_level = 1; - * @param values The enum numeric values on the wire for isolationLevel to add. - * @return This builder for chaining. - */ - public Builder addAllIsolationLevelValue( - java.lang.Iterable values) { - ensureIsolationLevelIsMutable(); - for (int value : values) { - isolationLevel_.add(value); - } - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_SLA_Isolation_level) - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceFilter_descriptor; - // @@protoc_insertion_point(class_scope:context.Constraint_SLA_Isolation_level) - private static final context.ContextOuterClass.Constraint_SLA_Isolation_level DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_SLA_Isolation_level(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_DeviceFilter_fieldAccessorTable; - public static context.ContextOuterClass.Constraint_SLA_Isolation_level getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceEvent_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_DeviceEvent_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_LinkId_descriptor; - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_LinkId_fieldAccessorTable; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_LinkAttributes_descriptor; - public interface Constraint_ExclusionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint_Exclusions) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_LinkAttributes_fieldAccessorTable; - /** - * bool is_permanent = 1; - * @return The isPermanent. - */ - boolean getIsPermanent(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Link_descriptor; - /** - * repeated .context.DeviceId device_ids = 2; - */ - java.util.List - getDeviceIdsList(); - /** - * repeated .context.DeviceId device_ids = 2; - */ - context.ContextOuterClass.DeviceId getDeviceIds(int index); - /** - * repeated .context.DeviceId device_ids = 2; - */ - int getDeviceIdsCount(); - /** - * repeated .context.DeviceId device_ids = 2; - */ - java.util.List - getDeviceIdsOrBuilderList(); - /** - * repeated .context.DeviceId device_ids = 2; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Link_fieldAccessorTable; - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - java.util.List - getEndpointIdsList(); - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointId getEndpointIds(int index); - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - int getEndpointIdsCount(); - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - java.util.List - getEndpointIdsOrBuilderList(); - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder( - int index); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_LinkIdList_descriptor; - /** - * repeated .context.LinkId link_ids = 4; - */ - java.util.List - getLinkIdsList(); - /** - * repeated .context.LinkId link_ids = 4; - */ - context.ContextOuterClass.LinkId getLinkIds(int index); - /** - * repeated .context.LinkId link_ids = 4; - */ - int getLinkIdsCount(); - /** - * repeated .context.LinkId link_ids = 4; - */ - java.util.List - getLinkIdsOrBuilderList(); - /** - * repeated .context.LinkId link_ids = 4; - */ - context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index); - } - /** - * Protobuf type {@code context.Constraint_Exclusions} - */ - public static final class Constraint_Exclusions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint_Exclusions) - Constraint_ExclusionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint_Exclusions.newBuilder() to construct. - private Constraint_Exclusions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint_Exclusions() { - deviceIds_ = java.util.Collections.emptyList(); - endpointIds_ = java.util.Collections.emptyList(); - linkIds_ = java.util.Collections.emptyList(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_LinkIdList_fieldAccessorTable; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint_Exclusions(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_LinkList_descriptor; - @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(); - 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(); - 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(); - 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; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_LinkList_fieldAccessorTable; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_Exclusions.class, context.ContextOuterClass.Constraint_Exclusions.Builder.class); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_LinkEvent_descriptor; - public static final int IS_PERMANENT_FIELD_NUMBER = 1; - private boolean isPermanent_; - /** - * bool is_permanent = 1; - * @return The isPermanent. - */ - @java.lang.Override - public boolean getIsPermanent() { - return isPermanent_; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_LinkEvent_fieldAccessorTable; - public static final int DEVICE_IDS_FIELD_NUMBER = 2; - private java.util.List deviceIds_; - /** - * repeated .context.DeviceId device_ids = 2; - */ - @java.lang.Override - public java.util.List getDeviceIdsList() { - return deviceIds_; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - @java.lang.Override - public java.util.List - getDeviceIdsOrBuilderList() { - return deviceIds_; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - @java.lang.Override - public int getDeviceIdsCount() { - return deviceIds_.size(); - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceIds(int index) { - return deviceIds_.get(index); - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index) { - return deviceIds_.get(index); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceId_descriptor; - public static final int ENDPOINT_IDS_FIELD_NUMBER = 3; - private java.util.List endpointIds_; - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List getEndpointIdsList() { - return endpointIds_; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - @java.lang.Override - public java.util.List - getEndpointIdsOrBuilderList() { - return endpointIds_; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - @java.lang.Override - public int getEndpointIdsCount() { - return endpointIds_.size(); - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointIds(int index) { - return endpointIds_.get(index); - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder( - int index) { - return endpointIds_.get(index); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceId_fieldAccessorTable; - public static final int LINK_IDS_FIELD_NUMBER = 4; - private java.util.List linkIds_; - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public java.util.List getLinkIdsList() { - return linkIds_; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public java.util.List - getLinkIdsOrBuilderList() { - return linkIds_; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public int getLinkIdsCount() { - return linkIds_.size(); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.LinkId getLinkIds(int index) { - return linkIds_.get(index); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - @java.lang.Override - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index) { - return linkIds_.get(index); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Service_descriptor; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Service_fieldAccessorTable; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceStatus_descriptor; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (isPermanent_ != false) { - output.writeBool(1, isPermanent_); - } - for (int i = 0; i < deviceIds_.size(); i++) { - output.writeMessage(2, deviceIds_.get(i)); - } - for (int i = 0; i < endpointIds_.size(); i++) { - output.writeMessage(3, endpointIds_.get(i)); - } - for (int i = 0; i < linkIds_.size(); i++) { - output.writeMessage(4, linkIds_.get(i)); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceStatus_fieldAccessorTable; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (isPermanent_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, isPermanent_); - } - for (int i = 0; i < deviceIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, deviceIds_.get(i)); - } - for (int i = 0; i < endpointIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, endpointIds_.get(i)); - } - for (int i = 0; i < linkIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, linkIds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceConfig_descriptor; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint_Exclusions)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint_Exclusions other = (context.ContextOuterClass.Constraint_Exclusions) obj; - - if (getIsPermanent() - != other.getIsPermanent()) return false; - if (!getDeviceIdsList() - .equals(other.getDeviceIdsList())) return false; - if (!getEndpointIdsList() - .equals(other.getEndpointIdsList())) return false; - if (!getLinkIdsList() - .equals(other.getLinkIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceConfig_fieldAccessorTable; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + IS_PERMANENT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsPermanent()); - if (getDeviceIdsCount() > 0) { - hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getDeviceIdsList().hashCode(); - } - if (getEndpointIdsCount() > 0) { - hash = (37 * hash) + ENDPOINT_IDS_FIELD_NUMBER; - hash = (53 * hash) + getEndpointIdsList().hashCode(); - } - if (getLinkIdsCount() > 0) { - hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; - hash = (53 * hash) + getLinkIdsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceIdList_descriptor; - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Exclusions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Exclusions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint_Exclusions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceIdList_fieldAccessorTable; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint_Exclusions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceList_descriptor; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint_Exclusions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint_Exclusions) - context.ContextOuterClass.Constraint_ExclusionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint_Exclusions.class, context.ContextOuterClass.Constraint_Exclusions.Builder.class); - } - - // 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(); - isPermanent_ = false; - - if (deviceIdsBuilder_ == null) { - deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - deviceIdsBuilder_.clear(); - } - if (endpointIdsBuilder_ == null) { - endpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - endpointIdsBuilder_.clear(); - } - if (linkIdsBuilder_ == null) { - linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - linkIdsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions build() { - context.ContextOuterClass.Constraint_Exclusions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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_; - if (deviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deviceIds_ = deviceIds_; - } else { - result.deviceIds_ = deviceIdsBuilder_.build(); - } - if (endpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.endpointIds_ = endpointIds_; - } else { - result.endpointIds_ = endpointIdsBuilder_.build(); - } - if (linkIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - bitField0_ = (bitField0_ & ~0x00000004); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint_Exclusions) { - return mergeFrom((context.ContextOuterClass.Constraint_Exclusions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint_Exclusions other) { - if (other == context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance()) return this; - if (other.getIsPermanent() != false) { - setIsPermanent(other.getIsPermanent()); - } - if (deviceIdsBuilder_ == null) { - if (!other.deviceIds_.isEmpty()) { - if (deviceIds_.isEmpty()) { - deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeviceIdsIsMutable(); - deviceIds_.addAll(other.deviceIds_); - } - onChanged(); - } - } else { - if (!other.deviceIds_.isEmpty()) { - if (deviceIdsBuilder_.isEmpty()) { - deviceIdsBuilder_.dispose(); - deviceIdsBuilder_ = null; - deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); - deviceIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDeviceIdsFieldBuilder() : null; - } else { - deviceIdsBuilder_.addAllMessages(other.deviceIds_); - } - } - } - if (endpointIdsBuilder_ == null) { - if (!other.endpointIds_.isEmpty()) { - if (endpointIds_.isEmpty()) { - endpointIds_ = other.endpointIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureEndpointIdsIsMutable(); - endpointIds_.addAll(other.endpointIds_); - } - onChanged(); - } - } else { - if (!other.endpointIds_.isEmpty()) { - if (endpointIdsBuilder_.isEmpty()) { - endpointIdsBuilder_.dispose(); - endpointIdsBuilder_ = null; - endpointIds_ = other.endpointIds_; - bitField0_ = (bitField0_ & ~0x00000002); - endpointIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEndpointIdsFieldBuilder() : null; - } else { - endpointIdsBuilder_.addAllMessages(other.endpointIds_); - } - } - } - if (linkIdsBuilder_ == null) { - if (!other.linkIds_.isEmpty()) { - if (linkIds_.isEmpty()) { - linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureLinkIdsIsMutable(); - linkIds_.addAll(other.linkIds_); - } - onChanged(); - } - } else { - if (!other.linkIds_.isEmpty()) { - if (linkIdsBuilder_.isEmpty()) { - linkIdsBuilder_.dispose(); - linkIdsBuilder_ = null; - linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000004); - linkIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLinkIdsFieldBuilder() : null; - } else { - linkIdsBuilder_.addAllMessages(other.linkIds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_Exclusions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private boolean isPermanent_ ; - /** - * bool is_permanent = 1; - * @return The isPermanent. - */ - @java.lang.Override - public boolean getIsPermanent() { - return isPermanent_; - } - /** - * bool is_permanent = 1; - * @param value The isPermanent to set. - * @return This builder for chaining. - */ - public Builder setIsPermanent(boolean value) { - - isPermanent_ = value; - onChanged(); - return this; - } - /** - * bool is_permanent = 1; - * @return This builder for chaining. - */ - public Builder clearIsPermanent() { - - isPermanent_ = false; - onChanged(); - return this; - } - - private java.util.List deviceIds_ = - java.util.Collections.emptyList(); - private void ensureDeviceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deviceIds_ = new java.util.ArrayList(deviceIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdsBuilder_; - - /** - * repeated .context.DeviceId device_ids = 2; - */ - public java.util.List getDeviceIdsList() { - if (deviceIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(deviceIds_); - } else { - return deviceIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public int getDeviceIdsCount() { - if (deviceIdsBuilder_ == null) { - return deviceIds_.size(); - } else { - return deviceIdsBuilder_.getCount(); - } - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public context.ContextOuterClass.DeviceId getDeviceIds(int index) { - if (deviceIdsBuilder_ == null) { - return deviceIds_.get(index); - } else { - return deviceIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder setDeviceIds( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.set(index, value); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder setDeviceIds( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.set(index, builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder addDeviceIds(context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.add(value); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder addDeviceIds( - int index, context.ContextOuterClass.DeviceId value) { - if (deviceIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeviceIdsIsMutable(); - deviceIds_.add(index, value); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder addDeviceIds( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.add(builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder addDeviceIds( - int index, context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.add(index, builderForValue.build()); - onChanged(); - } else { - deviceIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder addAllDeviceIds( - java.lang.Iterable values) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deviceIds_); - onChanged(); - } else { - deviceIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder clearDeviceIds() { - if (deviceIdsBuilder_ == null) { - deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - deviceIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public Builder removeDeviceIds(int index) { - if (deviceIdsBuilder_ == null) { - ensureDeviceIdsIsMutable(); - deviceIds_.remove(index); - onChanged(); - } else { - deviceIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdsBuilder( - int index) { - return getDeviceIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdsOrBuilder( - int index) { - if (deviceIdsBuilder_ == null) { - return deviceIds_.get(index); } else { - return deviceIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public java.util.List - getDeviceIdsOrBuilderList() { - if (deviceIdsBuilder_ != null) { - return deviceIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deviceIds_); - } - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder() { - return getDeviceIdsFieldBuilder().addBuilder( - context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public context.ContextOuterClass.DeviceId.Builder addDeviceIdsBuilder( - int index) { - return getDeviceIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.DeviceId.getDefaultInstance()); - } - /** - * repeated .context.DeviceId device_ids = 2; - */ - public java.util.List - getDeviceIdsBuilderList() { - return getDeviceIdsFieldBuilder().getBuilderList(); - } - 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()); - deviceIds_ = null; - } - return deviceIdsBuilder_; - } - - private java.util.List endpointIds_ = - java.util.Collections.emptyList(); - private void ensureEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - endpointIds_ = new java.util.ArrayList(endpointIds_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdsBuilder_; - - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public java.util.List getEndpointIdsList() { - if (endpointIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(endpointIds_); - } else { - return endpointIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public int getEndpointIdsCount() { - if (endpointIdsBuilder_ == null) { - return endpointIds_.size(); - } else { - return endpointIdsBuilder_.getCount(); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId getEndpointIds(int index) { - if (endpointIdsBuilder_ == null) { - return endpointIds_.get(index); - } else { - return endpointIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder setEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (endpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointIdsIsMutable(); - endpointIds_.set(index, value); - onChanged(); - } else { - endpointIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder setEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.set(index, builderForValue.build()); - onChanged(); - } else { - endpointIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder addEndpointIds(context.ContextOuterClass.EndPointId value) { - if (endpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointIdsIsMutable(); - endpointIds_.add(value); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder addEndpointIds( - int index, context.ContextOuterClass.EndPointId value) { - if (endpointIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEndpointIdsIsMutable(); - endpointIds_.add(index, value); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder addEndpointIds( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.add(builderForValue.build()); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder addEndpointIds( - int index, context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.add(index, builderForValue.build()); - onChanged(); - } else { - endpointIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder addAllEndpointIds( - java.lang.Iterable values) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, endpointIds_); - onChanged(); - } else { - endpointIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder clearEndpointIds() { - if (endpointIdsBuilder_ == null) { - endpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - endpointIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public Builder removeEndpointIds(int index) { - if (endpointIdsBuilder_ == null) { - ensureEndpointIdsIsMutable(); - endpointIds_.remove(index); - onChanged(); - } else { - endpointIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdsBuilder( - int index) { - return getEndpointIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdsOrBuilder( - int index) { - if (endpointIdsBuilder_ == null) { - return endpointIds_.get(index); } else { - return endpointIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public java.util.List - getEndpointIdsOrBuilderList() { - if (endpointIdsBuilder_ != null) { - return endpointIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(endpointIds_); - } - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder() { - return getEndpointIdsFieldBuilder().addBuilder( - context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public context.ContextOuterClass.EndPointId.Builder addEndpointIdsBuilder( - int index) { - return getEndpointIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.EndPointId.getDefaultInstance()); - } - /** - * repeated .context.EndPointId endpoint_ids = 3; - */ - public java.util.List - getEndpointIdsBuilderList() { - return getEndpointIdsFieldBuilder().getBuilderList(); - } - 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()); - endpointIds_ = null; - } - return endpointIdsBuilder_; - } - - private java.util.List linkIds_ = - java.util.Collections.emptyList(); - private void ensureLinkIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - linkIds_ = new java.util.ArrayList(linkIds_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> linkIdsBuilder_; - - /** - * repeated .context.LinkId link_ids = 4; - */ - public java.util.List getLinkIdsList() { - if (linkIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(linkIds_); - } else { - return linkIdsBuilder_.getMessageList(); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public int getLinkIdsCount() { - if (linkIdsBuilder_ == null) { - return linkIds_.size(); - } else { - return linkIdsBuilder_.getCount(); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId getLinkIds(int index) { - if (linkIdsBuilder_ == null) { - return linkIds_.get(index); - } else { - return linkIdsBuilder_.getMessage(index); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder setLinkIds( - int index, context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.set(index, value); - onChanged(); - } else { - linkIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder setLinkIds( - int index, context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.set(index, builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds(context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.add(value); - onChanged(); - } else { - linkIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds( - int index, context.ContextOuterClass.LinkId value) { - if (linkIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIdsIsMutable(); - linkIds_.add(index, value); - onChanged(); - } else { - linkIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds( - context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.add(builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addLinkIds( - int index, context.ContextOuterClass.LinkId.Builder builderForValue) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.add(index, builderForValue.build()); - onChanged(); - } else { - linkIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder addAllLinkIds( - java.lang.Iterable values) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, linkIds_); - onChanged(); - } else { - linkIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder clearLinkIds() { - if (linkIdsBuilder_ == null) { - linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - linkIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public Builder removeLinkIds(int index) { - if (linkIdsBuilder_ == null) { - ensureLinkIdsIsMutable(); - linkIds_.remove(index); - onChanged(); - } else { - linkIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId.Builder getLinkIdsBuilder( - int index) { - return getLinkIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkIdOrBuilder getLinkIdsOrBuilder( - int index) { - if (linkIdsBuilder_ == null) { - return linkIds_.get(index); } else { - return linkIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public java.util.List - getLinkIdsOrBuilderList() { - if (linkIdsBuilder_ != null) { - return linkIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(linkIds_); - } - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder() { - return getLinkIdsFieldBuilder().addBuilder( - context.ContextOuterClass.LinkId.getDefaultInstance()); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public context.ContextOuterClass.LinkId.Builder addLinkIdsBuilder( - int index) { - return getLinkIdsFieldBuilder().addBuilder( - index, context.ContextOuterClass.LinkId.getDefaultInstance()); - } - /** - * repeated .context.LinkId link_ids = 4; - */ - public java.util.List - getLinkIdsBuilderList() { - return getLinkIdsFieldBuilder().getBuilderList(); - } - 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()); - linkIds_ = null; - } - return linkIdsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint_Exclusions) - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceList_fieldAccessorTable; - // @@protoc_insertion_point(class_scope:context.Constraint_Exclusions) - private static final context.ContextOuterClass.Constraint_Exclusions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint_Exclusions(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceFilter_descriptor; - public static context.ContextOuterClass.Constraint_Exclusions getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceFilter_fieldAccessorTable; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ServiceEvent_descriptor; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ServiceEvent_fieldAccessorTable; - @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceId_descriptor; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceId_fieldAccessorTable; - public interface ConstraintOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.Constraint) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Slice_descriptor; - /** - * .context.ConstraintActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - int getActionValue(); - /** - * .context.ConstraintActionEnum action = 1; - * @return The action. - */ - context.ContextOuterClass.ConstraintActionEnum getAction(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Slice_fieldAccessorTable; - /** - * .context.Constraint_Custom custom = 2; - * @return Whether the custom field is set. - */ - boolean hasCustom(); - /** - * .context.Constraint_Custom custom = 2; - * @return The custom. - */ - context.ContextOuterClass.Constraint_Custom getCustom(); - /** - * .context.Constraint_Custom custom = 2; - */ - context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceOwner_descriptor; - /** - * .context.Constraint_Schedule schedule = 3; - * @return Whether the schedule field is set. - */ - boolean hasSchedule(); - /** - * .context.Constraint_Schedule schedule = 3; - * @return The schedule. - */ - context.ContextOuterClass.Constraint_Schedule getSchedule(); - /** - * .context.Constraint_Schedule schedule = 3; - */ - context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceOwner_fieldAccessorTable; - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return Whether the endpointLocation field is set. - */ - boolean hasEndpointLocation(); - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return The endpointLocation. - */ - context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation(); - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceStatus_descriptor; - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return Whether the endpointPriority field is set. - */ - boolean hasEndpointPriority(); - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return The endpointPriority. - */ - context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority(); - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceStatus_fieldAccessorTable; - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return Whether the slaCapacity field is set. - */ - boolean hasSlaCapacity(); - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return The slaCapacity. - */ - context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity(); - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceConfig_descriptor; - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return Whether the slaLatency field is set. - */ - boolean hasSlaLatency(); - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return The slaLatency. - */ - context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency(); - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceConfig_fieldAccessorTable; - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return Whether the slaAvailability field is set. - */ - boolean hasSlaAvailability(); - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return The slaAvailability. - */ - context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability(); - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceIdList_descriptor; - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return Whether the slaIsolation field is set. - */ - boolean hasSlaIsolation(); - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return The slaIsolation. - */ - context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation(); - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceIdList_fieldAccessorTable; - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return Whether the exclusions field is set. - */ - boolean hasExclusions(); - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return The exclusions. - */ - context.ContextOuterClass.Constraint_Exclusions getExclusions(); - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder(); - - public context.ContextOuterClass.Constraint.ConstraintCase getConstraintCase(); - } - /** - * Protobuf type {@code context.Constraint} - */ - public static final class Constraint extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.Constraint) - ConstraintOrBuilder { - private static final long serialVersionUID = 0L; - // Use Constraint.newBuilder() to construct. - private Constraint(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Constraint() { - action_ = 0; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceList_descriptor; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Constraint(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceList_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceFilter_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceFilter_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_SliceEvent_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_SliceEvent_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionId_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionId_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionSettings_L0_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionSettings_L0_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionSettings_L2_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionSettings_L2_fieldAccessorTable; + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionSettings_L3_descriptor; - @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; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionSettings_L3_fieldAccessorTable; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionSettings_L4_descriptor; - private int constraintCase_ = 0; - private java.lang.Object constraint_; - public enum ConstraintCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CUSTOM(2), - SCHEDULE(3), - ENDPOINT_LOCATION(4), - ENDPOINT_PRIORITY(5), - SLA_CAPACITY(6), - SLA_LATENCY(7), - SLA_AVAILABILITY(8), - SLA_ISOLATION(9), - EXCLUSIONS(10), - CONSTRAINT_NOT_SET(0); - private final int value; - private ConstraintCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ConstraintCase valueOf(int value) { - return forNumber(value); - } - - public static ConstraintCase forNumber(int value) { - switch (value) { - case 2: return CUSTOM; - case 3: return SCHEDULE; - case 4: return ENDPOINT_LOCATION; - case 5: return ENDPOINT_PRIORITY; - case 6: return SLA_CAPACITY; - case 7: return SLA_LATENCY; - case 8: return SLA_AVAILABILITY; - case 9: return SLA_ISOLATION; - case 10: return EXCLUSIONS; - case 0: return CONSTRAINT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ConstraintCase - getConstraintCase() { - return ConstraintCase.forNumber( - constraintCase_); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionSettings_L4_fieldAccessorTable; - public static final int ACTION_FIELD_NUMBER = 1; - private int action_; - /** - * .context.ConstraintActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override public int getActionValue() { - return action_; - } - /** - * .context.ConstraintActionEnum action = 1; - * @return The action. - */ - @java.lang.Override public context.ContextOuterClass.ConstraintActionEnum getAction() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.valueOf(action_); - return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionSettings_descriptor; - public static final int CUSTOM_FIELD_NUMBER = 2; - /** - * .context.Constraint_Custom custom = 2; - * @return Whether the custom field is set. - */ - @java.lang.Override - public boolean hasCustom() { - return constraintCase_ == 2; - } - /** - * .context.Constraint_Custom custom = 2; - * @return The custom. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Custom getCustom() { - if (constraintCase_ == 2) { - return (context.ContextOuterClass.Constraint_Custom) constraint_; - } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } - /** - * .context.Constraint_Custom custom = 2; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() { - if (constraintCase_ == 2) { - return (context.ContextOuterClass.Constraint_Custom) constraint_; - } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionSettings_fieldAccessorTable; - public static final int SCHEDULE_FIELD_NUMBER = 3; - /** - * .context.Constraint_Schedule schedule = 3; - * @return Whether the schedule field is set. - */ - @java.lang.Override - public boolean hasSchedule() { - return constraintCase_ == 3; - } - /** - * .context.Constraint_Schedule schedule = 3; - * @return The schedule. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Schedule getSchedule() { - if (constraintCase_ == 3) { - return (context.ContextOuterClass.Constraint_Schedule) constraint_; - } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() { - if (constraintCase_ == 3) { - return (context.ContextOuterClass.Constraint_Schedule) constraint_; - } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Connection_descriptor; - public static final int ENDPOINT_LOCATION_FIELD_NUMBER = 4; - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return Whether the endpointLocation field is set. - */ - @java.lang.Override - public boolean hasEndpointLocation() { - return constraintCase_ == 4; - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return The endpointLocation. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() { - if (constraintCase_ == 4) { - return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() { - if (constraintCase_ == 4) { - return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Connection_fieldAccessorTable; - public static final int ENDPOINT_PRIORITY_FIELD_NUMBER = 5; - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return Whether the endpointPriority field is set. - */ - @java.lang.Override - public boolean hasEndpointPriority() { - return constraintCase_ == 5; - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return The endpointPriority. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() { - if (constraintCase_ == 5) { - return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() { - if (constraintCase_ == 5) { - return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionIdList_descriptor; - public static final int SLA_CAPACITY_FIELD_NUMBER = 6; - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return Whether the slaCapacity field is set. - */ - @java.lang.Override - public boolean hasSlaCapacity() { - return constraintCase_ == 6; - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return The slaCapacity. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() { - if (constraintCase_ == 6) { - return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() { - if (constraintCase_ == 6) { - return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionIdList_fieldAccessorTable; - public static final int SLA_LATENCY_FIELD_NUMBER = 7; - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return Whether the slaLatency field is set. - */ - @java.lang.Override - public boolean hasSlaLatency() { - return constraintCase_ == 7; - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return The slaLatency. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionList_descriptor; - public static final int SLA_AVAILABILITY_FIELD_NUMBER = 8; - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return Whether the slaAvailability field is set. - */ - @java.lang.Override - public boolean hasSlaAvailability() { - return constraintCase_ == 8; - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return The slaAvailability. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionList_fieldAccessorTable; - public static final int SLA_ISOLATION_FIELD_NUMBER = 9; - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return Whether the slaIsolation field is set. - */ - @java.lang.Override - public boolean hasSlaIsolation() { - return constraintCase_ == 9; - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return The slaIsolation. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConnectionEvent_descriptor; - public static final int EXCLUSIONS_FIELD_NUMBER = 10; - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return Whether the exclusions field is set. - */ - @java.lang.Override - public boolean hasExclusions() { - return constraintCase_ == 10; - } - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return The exclusions. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions getExclusions() { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConnectionEvent_fieldAccessorTable; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPointId_descriptor; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPointId_fieldAccessorTable; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) { - output.writeEnum(1, action_); - } - if (constraintCase_ == 2) { - output.writeMessage(2, (context.ContextOuterClass.Constraint_Custom) constraint_); - } - if (constraintCase_ == 3) { - output.writeMessage(3, (context.ContextOuterClass.Constraint_Schedule) constraint_); - } - if (constraintCase_ == 4) { - output.writeMessage(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_); - } - if (constraintCase_ == 5) { - output.writeMessage(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_); - } - if (constraintCase_ == 6) { - output.writeMessage(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); - } - if (constraintCase_ == 7) { - output.writeMessage(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_); - } - if (constraintCase_ == 8) { - output.writeMessage(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_); - } - if (constraintCase_ == 9) { - output.writeMessage(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); - } - if (constraintCase_ == 10) { - output.writeMessage(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPoint_descriptor; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (action_ != context.ContextOuterClass.ConstraintActionEnum.CONSTRAINTACTION_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, action_); - } - if (constraintCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (context.ContextOuterClass.Constraint_Custom) constraint_); - } - if (constraintCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (context.ContextOuterClass.Constraint_Schedule) constraint_); - } - if (constraintCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (context.ContextOuterClass.Constraint_EndPointLocation) constraint_); - } - if (constraintCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (context.ContextOuterClass.Constraint_EndPointPriority) constraint_); - } - if (constraintCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); - } - if (constraintCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (context.ContextOuterClass.Constraint_SLA_Latency) constraint_); - } - if (constraintCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (context.ContextOuterClass.Constraint_SLA_Availability) constraint_); - } - if (constraintCase_ == 9) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); - } - if (constraintCase_ == 10) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPoint_fieldAccessorTable; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.Constraint)) { - return super.equals(obj); - } - context.ContextOuterClass.Constraint other = (context.ContextOuterClass.Constraint) obj; - - if (action_ != other.action_) return false; - if (!getConstraintCase().equals(other.getConstraintCase())) return false; - switch (constraintCase_) { - case 2: - if (!getCustom() - .equals(other.getCustom())) return false; - break; - case 3: - if (!getSchedule() - .equals(other.getSchedule())) return false; - break; - case 4: - if (!getEndpointLocation() - .equals(other.getEndpointLocation())) return false; - break; - case 5: - if (!getEndpointPriority() - .equals(other.getEndpointPriority())) return false; - break; - case 6: - if (!getSlaCapacity() - .equals(other.getSlaCapacity())) return false; - break; - case 7: - if (!getSlaLatency() - .equals(other.getSlaLatency())) return false; - break; - case 8: - if (!getSlaAvailability() - .equals(other.getSlaAvailability())) return false; - break; - case 9: - if (!getSlaIsolation() - .equals(other.getSlaIsolation())) return false; - break; - case 10: - if (!getExclusions() - .equals(other.getExclusions())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPointName_descriptor; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + action_; - switch (constraintCase_) { - case 2: - hash = (37 * hash) + CUSTOM_FIELD_NUMBER; - hash = (53 * hash) + getCustom().hashCode(); - break; - case 3: - hash = (37 * hash) + SCHEDULE_FIELD_NUMBER; - hash = (53 * hash) + getSchedule().hashCode(); - break; - case 4: - hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getEndpointLocation().hashCode(); - break; - case 5: - hash = (37 * hash) + ENDPOINT_PRIORITY_FIELD_NUMBER; - hash = (53 * hash) + getEndpointPriority().hashCode(); - break; - case 6: - hash = (37 * hash) + SLA_CAPACITY_FIELD_NUMBER; - hash = (53 * hash) + getSlaCapacity().hashCode(); - break; - case 7: - hash = (37 * hash) + SLA_LATENCY_FIELD_NUMBER; - hash = (53 * hash) + getSlaLatency().hashCode(); - break; - case 8: - hash = (37 * hash) + SLA_AVAILABILITY_FIELD_NUMBER; - hash = (53 * hash) + getSlaAvailability().hashCode(); - break; - case 9: - hash = (37 * hash) + SLA_ISOLATION_FIELD_NUMBER; - hash = (53 * hash) + getSlaIsolation().hashCode(); - break; - case 10: - hash = (37 * hash) + EXCLUSIONS_FIELD_NUMBER; - hash = (53 * hash) + getExclusions().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPointName_fieldAccessorTable; - public static context.ContextOuterClass.Constraint parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.Constraint parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.Constraint parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.Constraint parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.Constraint parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPointIdList_descriptor; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.Constraint prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPointIdList_fieldAccessorTable; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.Constraint} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.Constraint) - context.ContextOuterClass.ConstraintOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_Constraint_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_Constraint_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.Constraint.class, context.ContextOuterClass.Constraint.Builder.class); - } - - // 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(); - action_ = 0; - - constraintCase_ = 0; - constraint_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_Constraint_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.Constraint getDefaultInstanceForType() { - return context.ContextOuterClass.Constraint.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.Constraint build() { - context.ContextOuterClass.Constraint result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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 (constraintCase_ == 3) { - if (scheduleBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = scheduleBuilder_.build(); - } - } - if (constraintCase_ == 4) { - if (endpointLocationBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = endpointLocationBuilder_.build(); - } - } - if (constraintCase_ == 5) { - if (endpointPriorityBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = endpointPriorityBuilder_.build(); - } - } - if (constraintCase_ == 6) { - if (slaCapacityBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = slaCapacityBuilder_.build(); - } - } - if (constraintCase_ == 7) { - if (slaLatencyBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = slaLatencyBuilder_.build(); - } - } - if (constraintCase_ == 8) { - if (slaAvailabilityBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = slaAvailabilityBuilder_.build(); - } - } - if (constraintCase_ == 9) { - if (slaIsolationBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = slaIsolationBuilder_.build(); - } - } - if (constraintCase_ == 10) { - if (exclusionsBuilder_ == null) { - result.constraint_ = constraint_; - } else { - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.Constraint) { - return mergeFrom((context.ContextOuterClass.Constraint)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.Constraint other) { - if (other == context.ContextOuterClass.Constraint.getDefaultInstance()) return this; - if (other.action_ != 0) { - setActionValue(other.getActionValue()); - } - switch (other.getConstraintCase()) { - case CUSTOM: { - mergeCustom(other.getCustom()); - break; - } - case SCHEDULE: { - mergeSchedule(other.getSchedule()); - break; - } - case ENDPOINT_LOCATION: { - mergeEndpointLocation(other.getEndpointLocation()); - break; - } - case ENDPOINT_PRIORITY: { - mergeEndpointPriority(other.getEndpointPriority()); - break; - } - case SLA_CAPACITY: { - mergeSlaCapacity(other.getSlaCapacity()); - break; - } - case SLA_LATENCY: { - mergeSlaLatency(other.getSlaLatency()); - break; - } - case SLA_AVAILABILITY: { - mergeSlaAvailability(other.getSlaAvailability()); - break; - } - case SLA_ISOLATION: { - mergeSlaIsolation(other.getSlaIsolation()); - break; - } - case EXCLUSIONS: { - mergeExclusions(other.getExclusions()); - break; - } - case CONSTRAINT_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int constraintCase_ = 0; - private java.lang.Object constraint_; - public ConstraintCase - getConstraintCase() { - return ConstraintCase.forNumber( - constraintCase_); - } - - public Builder clearConstraint() { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - return this; - } - - - private int action_ = 0; - /** - * .context.ConstraintActionEnum action = 1; - * @return The enum numeric value on the wire for action. - */ - @java.lang.Override public int getActionValue() { - return action_; - } - /** - * .context.ConstraintActionEnum action = 1; - * @param value The enum numeric value on the wire for action to set. - * @return This builder for chaining. - */ - public Builder setActionValue(int value) { - - action_ = value; - onChanged(); - return this; - } - /** - * .context.ConstraintActionEnum action = 1; - * @return The action. - */ - @java.lang.Override - public context.ContextOuterClass.ConstraintActionEnum getAction() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.valueOf(action_); - return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; - } - /** - * .context.ConstraintActionEnum action = 1; - * @param value The action to set. - * @return This builder for chaining. - */ - public Builder setAction(context.ContextOuterClass.ConstraintActionEnum value) { - if (value == null) { - throw new NullPointerException(); - } - - action_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .context.ConstraintActionEnum action = 1; - * @return This builder for chaining. - */ - public Builder clearAction() { - - action_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Custom, context.ContextOuterClass.Constraint_Custom.Builder, context.ContextOuterClass.Constraint_CustomOrBuilder> customBuilder_; - /** - * .context.Constraint_Custom custom = 2; - * @return Whether the custom field is set. - */ - @java.lang.Override - public boolean hasCustom() { - return constraintCase_ == 2; - } - /** - * .context.Constraint_Custom custom = 2; - * @return The custom. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Custom getCustom() { - if (customBuilder_ == null) { - if (constraintCase_ == 2) { - return (context.ContextOuterClass.Constraint_Custom) constraint_; - } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } else { - if (constraintCase_ == 2) { - return customBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } - } - /** - * .context.Constraint_Custom custom = 2; - */ - public Builder setCustom(context.ContextOuterClass.Constraint_Custom value) { - if (customBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - customBuilder_.setMessage(value); - } - constraintCase_ = 2; - return this; - } - /** - * .context.Constraint_Custom custom = 2; - */ - public Builder setCustom( - context.ContextOuterClass.Constraint_Custom.Builder builderForValue) { - if (customBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - customBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 2; - return this; - } - /** - * .context.Constraint_Custom custom = 2; - */ - public Builder mergeCustom(context.ContextOuterClass.Constraint_Custom value) { - if (customBuilder_ == null) { - if (constraintCase_ == 2 && - constraint_ != context.ContextOuterClass.Constraint_Custom.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_Custom.newBuilder((context.ContextOuterClass.Constraint_Custom) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 2) { - customBuilder_.mergeFrom(value); - } - customBuilder_.setMessage(value); - } - constraintCase_ = 2; - return this; - } - /** - * .context.Constraint_Custom custom = 2; - */ - public Builder clearCustom() { - if (customBuilder_ == null) { - if (constraintCase_ == 2) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 2) { - constraintCase_ = 0; - constraint_ = null; - } - customBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_Custom custom = 2; - */ - public context.ContextOuterClass.Constraint_Custom.Builder getCustomBuilder() { - return getCustomFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_Custom custom = 2; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_CustomOrBuilder getCustomOrBuilder() { - if ((constraintCase_ == 2) && (customBuilder_ != null)) { - return customBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 2) { - return (context.ContextOuterClass.Constraint_Custom) constraint_; - } - return context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } - } - /** - * .context.Constraint_Custom custom = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Custom, context.ContextOuterClass.Constraint_Custom.Builder, context.ContextOuterClass.Constraint_CustomOrBuilder> - getCustomFieldBuilder() { - if (customBuilder_ == null) { - if (!(constraintCase_ == 2)) { - constraint_ = context.ContextOuterClass.Constraint_Custom.getDefaultInstance(); - } - customBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Custom, context.ContextOuterClass.Constraint_Custom.Builder, context.ContextOuterClass.Constraint_CustomOrBuilder>( - (context.ContextOuterClass.Constraint_Custom) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 2; - onChanged();; - return customBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Schedule, context.ContextOuterClass.Constraint_Schedule.Builder, context.ContextOuterClass.Constraint_ScheduleOrBuilder> scheduleBuilder_; - /** - * .context.Constraint_Schedule schedule = 3; - * @return Whether the schedule field is set. - */ - @java.lang.Override - public boolean hasSchedule() { - return constraintCase_ == 3; - } - /** - * .context.Constraint_Schedule schedule = 3; - * @return The schedule. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Schedule getSchedule() { - if (scheduleBuilder_ == null) { - if (constraintCase_ == 3) { - return (context.ContextOuterClass.Constraint_Schedule) constraint_; - } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } else { - if (constraintCase_ == 3) { - return scheduleBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - public Builder setSchedule(context.ContextOuterClass.Constraint_Schedule value) { - if (scheduleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - scheduleBuilder_.setMessage(value); - } - constraintCase_ = 3; - return this; - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - public Builder setSchedule( - context.ContextOuterClass.Constraint_Schedule.Builder builderForValue) { - if (scheduleBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - scheduleBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 3; - return this; - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - public Builder mergeSchedule(context.ContextOuterClass.Constraint_Schedule value) { - if (scheduleBuilder_ == null) { - if (constraintCase_ == 3 && - constraint_ != context.ContextOuterClass.Constraint_Schedule.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_Schedule.newBuilder((context.ContextOuterClass.Constraint_Schedule) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 3) { - scheduleBuilder_.mergeFrom(value); - } - scheduleBuilder_.setMessage(value); - } - constraintCase_ = 3; - return this; - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - public Builder clearSchedule() { - if (scheduleBuilder_ == null) { - if (constraintCase_ == 3) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 3) { - constraintCase_ = 0; - constraint_ = null; - } - scheduleBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - public context.ContextOuterClass.Constraint_Schedule.Builder getScheduleBuilder() { - return getScheduleFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_ScheduleOrBuilder getScheduleOrBuilder() { - if ((constraintCase_ == 3) && (scheduleBuilder_ != null)) { - return scheduleBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 3) { - return (context.ContextOuterClass.Constraint_Schedule) constraint_; - } - return context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } - } - /** - * .context.Constraint_Schedule schedule = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Schedule, context.ContextOuterClass.Constraint_Schedule.Builder, context.ContextOuterClass.Constraint_ScheduleOrBuilder> - getScheduleFieldBuilder() { - if (scheduleBuilder_ == null) { - if (!(constraintCase_ == 3)) { - constraint_ = context.ContextOuterClass.Constraint_Schedule.getDefaultInstance(); - } - scheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Schedule, context.ContextOuterClass.Constraint_Schedule.Builder, context.ContextOuterClass.Constraint_ScheduleOrBuilder>( - (context.ContextOuterClass.Constraint_Schedule) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 3; - onChanged();; - return scheduleBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_EndPointLocation, context.ContextOuterClass.Constraint_EndPointLocation.Builder, context.ContextOuterClass.Constraint_EndPointLocationOrBuilder> endpointLocationBuilder_; - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return Whether the endpointLocation field is set. - */ - @java.lang.Override - public boolean hasEndpointLocation() { - return constraintCase_ == 4; - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - * @return The endpointLocation. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocation getEndpointLocation() { - if (endpointLocationBuilder_ == null) { - if (constraintCase_ == 4) { - return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } else { - if (constraintCase_ == 4) { - return endpointLocationBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - public Builder setEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) { - if (endpointLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - endpointLocationBuilder_.setMessage(value); - } - constraintCase_ = 4; - return this; - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - public Builder setEndpointLocation( - context.ContextOuterClass.Constraint_EndPointLocation.Builder builderForValue) { - if (endpointLocationBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - endpointLocationBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 4; - return this; - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - public Builder mergeEndpointLocation(context.ContextOuterClass.Constraint_EndPointLocation value) { - if (endpointLocationBuilder_ == null) { - if (constraintCase_ == 4 && - constraint_ != context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.newBuilder((context.ContextOuterClass.Constraint_EndPointLocation) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 4) { - endpointLocationBuilder_.mergeFrom(value); - } - endpointLocationBuilder_.setMessage(value); - } - constraintCase_ = 4; - return this; - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - public Builder clearEndpointLocation() { - if (endpointLocationBuilder_ == null) { - if (constraintCase_ == 4) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 4) { - constraintCase_ = 0; - constraint_ = null; - } - endpointLocationBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - public context.ContextOuterClass.Constraint_EndPointLocation.Builder getEndpointLocationBuilder() { - return getEndpointLocationFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointLocationOrBuilder getEndpointLocationOrBuilder() { - if ((constraintCase_ == 4) && (endpointLocationBuilder_ != null)) { - return endpointLocationBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 4) { - return (context.ContextOuterClass.Constraint_EndPointLocation) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } - } - /** - * .context.Constraint_EndPointLocation endpoint_location = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_EndPointLocation, context.ContextOuterClass.Constraint_EndPointLocation.Builder, context.ContextOuterClass.Constraint_EndPointLocationOrBuilder> - getEndpointLocationFieldBuilder() { - if (endpointLocationBuilder_ == null) { - if (!(constraintCase_ == 4)) { - constraint_ = context.ContextOuterClass.Constraint_EndPointLocation.getDefaultInstance(); - } - endpointLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_EndPointLocation, context.ContextOuterClass.Constraint_EndPointLocation.Builder, context.ContextOuterClass.Constraint_EndPointLocationOrBuilder>( - (context.ContextOuterClass.Constraint_EndPointLocation) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 4; - onChanged();; - return endpointLocationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_EndPointPriority, context.ContextOuterClass.Constraint_EndPointPriority.Builder, context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder> endpointPriorityBuilder_; - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return Whether the endpointPriority field is set. - */ - @java.lang.Override - public boolean hasEndpointPriority() { - return constraintCase_ == 5; - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - * @return The endpointPriority. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriority getEndpointPriority() { - if (endpointPriorityBuilder_ == null) { - if (constraintCase_ == 5) { - return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } else { - if (constraintCase_ == 5) { - return endpointPriorityBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - public Builder setEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) { - if (endpointPriorityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - endpointPriorityBuilder_.setMessage(value); - } - constraintCase_ = 5; - return this; - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - public Builder setEndpointPriority( - context.ContextOuterClass.Constraint_EndPointPriority.Builder builderForValue) { - if (endpointPriorityBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - endpointPriorityBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 5; - return this; - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - public Builder mergeEndpointPriority(context.ContextOuterClass.Constraint_EndPointPriority value) { - if (endpointPriorityBuilder_ == null) { - if (constraintCase_ == 5 && - constraint_ != context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.newBuilder((context.ContextOuterClass.Constraint_EndPointPriority) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 5) { - endpointPriorityBuilder_.mergeFrom(value); - } - endpointPriorityBuilder_.setMessage(value); - } - constraintCase_ = 5; - return this; - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - public Builder clearEndpointPriority() { - if (endpointPriorityBuilder_ == null) { - if (constraintCase_ == 5) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 5) { - constraintCase_ = 0; - constraint_ = null; - } - endpointPriorityBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - public context.ContextOuterClass.Constraint_EndPointPriority.Builder getEndpointPriorityBuilder() { - return getEndpointPriorityFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder getEndpointPriorityOrBuilder() { - if ((constraintCase_ == 5) && (endpointPriorityBuilder_ != null)) { - return endpointPriorityBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 5) { - return (context.ContextOuterClass.Constraint_EndPointPriority) constraint_; - } - return context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } - } - /** - * .context.Constraint_EndPointPriority endpoint_priority = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_EndPointPriority, context.ContextOuterClass.Constraint_EndPointPriority.Builder, context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder> - getEndpointPriorityFieldBuilder() { - if (endpointPriorityBuilder_ == null) { - if (!(constraintCase_ == 5)) { - constraint_ = context.ContextOuterClass.Constraint_EndPointPriority.getDefaultInstance(); - } - endpointPriorityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_EndPointPriority, context.ContextOuterClass.Constraint_EndPointPriority.Builder, context.ContextOuterClass.Constraint_EndPointPriorityOrBuilder>( - (context.ContextOuterClass.Constraint_EndPointPriority) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 5; - onChanged();; - return endpointPriorityBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Capacity, context.ContextOuterClass.Constraint_SLA_Capacity.Builder, context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder> slaCapacityBuilder_; - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return Whether the slaCapacity field is set. - */ - @java.lang.Override - public boolean hasSlaCapacity() { - return constraintCase_ == 6; - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - * @return The slaCapacity. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Capacity getSlaCapacity() { - if (slaCapacityBuilder_ == null) { - if (constraintCase_ == 6) { - return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } else { - if (constraintCase_ == 6) { - return slaCapacityBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - public Builder setSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) { - if (slaCapacityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - slaCapacityBuilder_.setMessage(value); - } - constraintCase_ = 6; - return this; - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - public Builder setSlaCapacity( - context.ContextOuterClass.Constraint_SLA_Capacity.Builder builderForValue) { - if (slaCapacityBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - slaCapacityBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 6; - return this; - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - public Builder mergeSlaCapacity(context.ContextOuterClass.Constraint_SLA_Capacity value) { - if (slaCapacityBuilder_ == null) { - if (constraintCase_ == 6 && - constraint_ != context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.newBuilder((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 6) { - slaCapacityBuilder_.mergeFrom(value); - } - slaCapacityBuilder_.setMessage(value); - } - constraintCase_ = 6; - return this; - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - public Builder clearSlaCapacity() { - if (slaCapacityBuilder_ == null) { - if (constraintCase_ == 6) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 6) { - constraintCase_ = 0; - constraint_ = null; - } - slaCapacityBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - public context.ContextOuterClass.Constraint_SLA_Capacity.Builder getSlaCapacityBuilder() { - return getSlaCapacityFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder getSlaCapacityOrBuilder() { - if ((constraintCase_ == 6) && (slaCapacityBuilder_ != null)) { - return slaCapacityBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 6) { - return (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Capacity sla_capacity = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Capacity, context.ContextOuterClass.Constraint_SLA_Capacity.Builder, context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder> - getSlaCapacityFieldBuilder() { - if (slaCapacityBuilder_ == null) { - if (!(constraintCase_ == 6)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Capacity.getDefaultInstance(); - } - slaCapacityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Capacity, context.ContextOuterClass.Constraint_SLA_Capacity.Builder, context.ContextOuterClass.Constraint_SLA_CapacityOrBuilder>( - (context.ContextOuterClass.Constraint_SLA_Capacity) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 6; - onChanged();; - return slaCapacityBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Latency, context.ContextOuterClass.Constraint_SLA_Latency.Builder, context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder> slaLatencyBuilder_; - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return Whether the slaLatency field is set. - */ - @java.lang.Override - public boolean hasSlaLatency() { - return constraintCase_ == 7; - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - * @return The slaLatency. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Latency getSlaLatency() { - if (slaLatencyBuilder_ == null) { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } else { - if (constraintCase_ == 7) { - return slaLatencyBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public Builder setSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { - if (slaLatencyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - slaLatencyBuilder_.setMessage(value); - } - constraintCase_ = 7; - return this; - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public Builder setSlaLatency( - context.ContextOuterClass.Constraint_SLA_Latency.Builder builderForValue) { - if (slaLatencyBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - slaLatencyBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 7; - return this; - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public Builder mergeSlaLatency(context.ContextOuterClass.Constraint_SLA_Latency value) { - if (slaLatencyBuilder_ == null) { - if (constraintCase_ == 7 && - constraint_ != context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.newBuilder((context.ContextOuterClass.Constraint_SLA_Latency) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 7) { - slaLatencyBuilder_.mergeFrom(value); - } - slaLatencyBuilder_.setMessage(value); - } - constraintCase_ = 7; - return this; - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public Builder clearSlaLatency() { - if (slaLatencyBuilder_ == null) { - if (constraintCase_ == 7) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 7) { - constraintCase_ = 0; - constraint_ = null; - } - slaLatencyBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - public context.ContextOuterClass.Constraint_SLA_Latency.Builder getSlaLatencyBuilder() { - return getSlaLatencyFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder getSlaLatencyOrBuilder() { - if ((constraintCase_ == 7) && (slaLatencyBuilder_ != null)) { - return slaLatencyBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 7) { - return (context.ContextOuterClass.Constraint_SLA_Latency) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Latency sla_latency = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Latency, context.ContextOuterClass.Constraint_SLA_Latency.Builder, context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder> - getSlaLatencyFieldBuilder() { - if (slaLatencyBuilder_ == null) { - if (!(constraintCase_ == 7)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Latency.getDefaultInstance(); - } - slaLatencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Latency, context.ContextOuterClass.Constraint_SLA_Latency.Builder, context.ContextOuterClass.Constraint_SLA_LatencyOrBuilder>( - (context.ContextOuterClass.Constraint_SLA_Latency) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 7; - onChanged();; - return slaLatencyBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Availability, context.ContextOuterClass.Constraint_SLA_Availability.Builder, context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder> slaAvailabilityBuilder_; - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return Whether the slaAvailability field is set. - */ - @java.lang.Override - public boolean hasSlaAvailability() { - return constraintCase_ == 8; - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - * @return The slaAvailability. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Availability getSlaAvailability() { - if (slaAvailabilityBuilder_ == null) { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } else { - if (constraintCase_ == 8) { - return slaAvailabilityBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder setSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { - if (slaAvailabilityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - slaAvailabilityBuilder_.setMessage(value); - } - constraintCase_ = 8; - return this; - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder setSlaAvailability( - context.ContextOuterClass.Constraint_SLA_Availability.Builder builderForValue) { - if (slaAvailabilityBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - slaAvailabilityBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 8; - return this; - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder mergeSlaAvailability(context.ContextOuterClass.Constraint_SLA_Availability value) { - if (slaAvailabilityBuilder_ == null) { - if (constraintCase_ == 8 && - constraint_ != context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.newBuilder((context.ContextOuterClass.Constraint_SLA_Availability) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 8) { - slaAvailabilityBuilder_.mergeFrom(value); - } - slaAvailabilityBuilder_.setMessage(value); - } - constraintCase_ = 8; - return this; - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public Builder clearSlaAvailability() { - if (slaAvailabilityBuilder_ == null) { - if (constraintCase_ == 8) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 8) { - constraintCase_ = 0; - constraint_ = null; - } - slaAvailabilityBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - public context.ContextOuterClass.Constraint_SLA_Availability.Builder getSlaAvailabilityBuilder() { - return getSlaAvailabilityFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder getSlaAvailabilityOrBuilder() { - if ((constraintCase_ == 8) && (slaAvailabilityBuilder_ != null)) { - return slaAvailabilityBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 8) { - return (context.ContextOuterClass.Constraint_SLA_Availability) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Availability sla_availability = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Availability, context.ContextOuterClass.Constraint_SLA_Availability.Builder, context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder> - getSlaAvailabilityFieldBuilder() { - if (slaAvailabilityBuilder_ == null) { - if (!(constraintCase_ == 8)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Availability.getDefaultInstance(); - } - slaAvailabilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Availability, context.ContextOuterClass.Constraint_SLA_Availability.Builder, context.ContextOuterClass.Constraint_SLA_AvailabilityOrBuilder>( - (context.ContextOuterClass.Constraint_SLA_Availability) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 8; - onChanged();; - return slaAvailabilityBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Isolation_level, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder, context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder> slaIsolationBuilder_; - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return Whether the slaIsolation field is set. - */ - @java.lang.Override - public boolean hasSlaIsolation() { - return constraintCase_ == 9; - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - * @return The slaIsolation. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_level getSlaIsolation() { - if (slaIsolationBuilder_ == null) { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } else { - if (constraintCase_ == 9) { - return slaIsolationBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - public Builder setSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { - if (slaIsolationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - slaIsolationBuilder_.setMessage(value); - } - constraintCase_ = 9; - return this; - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - public Builder setSlaIsolation( - context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder builderForValue) { - if (slaIsolationBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - slaIsolationBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 9; - return this; - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - public Builder mergeSlaIsolation(context.ContextOuterClass.Constraint_SLA_Isolation_level value) { - if (slaIsolationBuilder_ == null) { - if (constraintCase_ == 9 && - constraint_ != context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.newBuilder((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 9) { - slaIsolationBuilder_.mergeFrom(value); - } - slaIsolationBuilder_.setMessage(value); - } - constraintCase_ = 9; - return this; - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - public Builder clearSlaIsolation() { - if (slaIsolationBuilder_ == null) { - if (constraintCase_ == 9) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 9) { - constraintCase_ = 0; - constraint_ = null; - } - slaIsolationBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - public context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder getSlaIsolationBuilder() { - return getSlaIsolationFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder getSlaIsolationOrBuilder() { - if ((constraintCase_ == 9) && (slaIsolationBuilder_ != null)) { - return slaIsolationBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 9) { - return (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_; - } - return context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } - } - /** - * .context.Constraint_SLA_Isolation_level sla_isolation = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Isolation_level, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder, context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder> - getSlaIsolationFieldBuilder() { - if (slaIsolationBuilder_ == null) { - if (!(constraintCase_ == 9)) { - constraint_ = context.ContextOuterClass.Constraint_SLA_Isolation_level.getDefaultInstance(); - } - slaIsolationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_SLA_Isolation_level, context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder, context.ContextOuterClass.Constraint_SLA_Isolation_levelOrBuilder>( - (context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 9; - onChanged();; - return slaIsolationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Exclusions, context.ContextOuterClass.Constraint_Exclusions.Builder, context.ContextOuterClass.Constraint_ExclusionsOrBuilder> exclusionsBuilder_; - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return Whether the exclusions field is set. - */ - @java.lang.Override - public boolean hasExclusions() { - return constraintCase_ == 10; - } - /** - * .context.Constraint_Exclusions exclusions = 10; - * @return The exclusions. - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_Exclusions getExclusions() { - if (exclusionsBuilder_ == null) { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } else { - if (constraintCase_ == 10) { - return exclusionsBuilder_.getMessage(); - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - public Builder setExclusions(context.ContextOuterClass.Constraint_Exclusions value) { - if (exclusionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constraint_ = value; - onChanged(); - } else { - exclusionsBuilder_.setMessage(value); - } - constraintCase_ = 10; - return this; - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - public Builder setExclusions( - context.ContextOuterClass.Constraint_Exclusions.Builder builderForValue) { - if (exclusionsBuilder_ == null) { - constraint_ = builderForValue.build(); - onChanged(); - } else { - exclusionsBuilder_.setMessage(builderForValue.build()); - } - constraintCase_ = 10; - return this; - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - public Builder mergeExclusions(context.ContextOuterClass.Constraint_Exclusions value) { - if (exclusionsBuilder_ == null) { - if (constraintCase_ == 10 && - constraint_ != context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance()) { - constraint_ = context.ContextOuterClass.Constraint_Exclusions.newBuilder((context.ContextOuterClass.Constraint_Exclusions) constraint_) - .mergeFrom(value).buildPartial(); - } else { - constraint_ = value; - } - onChanged(); - } else { - if (constraintCase_ == 10) { - exclusionsBuilder_.mergeFrom(value); - } - exclusionsBuilder_.setMessage(value); - } - constraintCase_ = 10; - return this; - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - public Builder clearExclusions() { - if (exclusionsBuilder_ == null) { - if (constraintCase_ == 10) { - constraintCase_ = 0; - constraint_ = null; - onChanged(); - } - } else { - if (constraintCase_ == 10) { - constraintCase_ = 0; - constraint_ = null; - } - exclusionsBuilder_.clear(); - } - return this; - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - public context.ContextOuterClass.Constraint_Exclusions.Builder getExclusionsBuilder() { - return getExclusionsFieldBuilder().getBuilder(); - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - @java.lang.Override - public context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder() { - if ((constraintCase_ == 10) && (exclusionsBuilder_ != null)) { - return exclusionsBuilder_.getMessageOrBuilder(); - } else { - if (constraintCase_ == 10) { - return (context.ContextOuterClass.Constraint_Exclusions) constraint_; - } - return context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } - } - /** - * .context.Constraint_Exclusions exclusions = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Exclusions, context.ContextOuterClass.Constraint_Exclusions.Builder, context.ContextOuterClass.Constraint_ExclusionsOrBuilder> - getExclusionsFieldBuilder() { - if (exclusionsBuilder_ == null) { - if (!(constraintCase_ == 10)) { - constraint_ = context.ContextOuterClass.Constraint_Exclusions.getDefaultInstance(); - } - exclusionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Constraint_Exclusions, context.ContextOuterClass.Constraint_Exclusions.Builder, context.ContextOuterClass.Constraint_ExclusionsOrBuilder>( - (context.ContextOuterClass.Constraint_Exclusions) constraint_, - getParentForChildren(), - isClean()); - constraint_ = null; - } - constraintCase_ = 10; - onChanged();; - return exclusionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.Constraint) - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_EndPointNameList_descriptor; - // @@protoc_insertion_point(class_scope:context.Constraint) - private static final context.ContextOuterClass.Constraint DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.Constraint(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_EndPointNameList_fieldAccessorTable; - public static context.ContextOuterClass.Constraint getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConfigRule_Custom_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConfigRule_Custom_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConfigRule_ACL_descriptor; - @java.lang.Override - public context.ContextOuterClass.Constraint getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConfigRule_ACL_fieldAccessorTable; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_ConfigRule_descriptor; - public interface TeraFlowControllerOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.TeraFlowController) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_ConfigRule_fieldAccessorTable; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_Custom_descriptor; - /** - * string ip_address = 2; - * @return The ipAddress. - */ - java.lang.String getIpAddress(); - /** - * string ip_address = 2; - * @return The bytes for ipAddress. - */ - com.google.protobuf.ByteString - getIpAddressBytes(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_Custom_fieldAccessorTable; - /** - * uint32 port = 3; - * @return The port. - */ - int getPort(); - } - /** - *
-   * ----- Miscellaneous -------------------------------------------------------------------------------------------------
-   * 
- * - * Protobuf type {@code context.TeraFlowController} - */ - public static final class TeraFlowController extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.TeraFlowController) - TeraFlowControllerOrBuilder { - private static final long serialVersionUID = 0L; - // Use TeraFlowController.newBuilder() to construct. - private TeraFlowController(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TeraFlowController() { - ipAddress_ = ""; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_Schedule_descriptor; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TeraFlowController(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_Schedule_fieldAccessorTable; - @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; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_GPS_Position_descriptor; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_GPS_Position_fieldAccessorTable; - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - /** - * .context.ContextId context_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Location_descriptor; - public static final int IP_ADDRESS_FIELD_NUMBER = 2; - private volatile java.lang.Object ipAddress_; - /** - * string ip_address = 2; - * @return The ipAddress. - */ - @java.lang.Override - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - 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(); - ipAddress_ = s; - return s; - } - } - /** - * string ip_address = 2; - * @return The bytes for ipAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Location_fieldAccessorTable; - public static final int PORT_FIELD_NUMBER = 3; - private int port_; - /** - * uint32 port = 3; - * @return The port. - */ - @java.lang.Override - public int getPort() { - return port_; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_EndPointLocation_descriptor; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_EndPointLocation_fieldAccessorTable; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_EndPointPriority_descriptor; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (!getIpAddressBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_); - } - if (port_ != 0) { - output.writeUInt32(3, port_); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_EndPointPriority_fieldAccessorTable; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextId()); - } - if (!getIpAddressBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_); - } - if (port_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, port_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_SLA_Latency_descriptor; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.TeraFlowController)) { - return super.equals(obj); - } - context.ContextOuterClass.TeraFlowController other = (context.ContextOuterClass.TeraFlowController) obj; - - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (!getIpAddress() - .equals(other.getIpAddress())) return false; - if (getPort() - != other.getPort()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_SLA_Latency_fieldAccessorTable; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getIpAddress().hashCode(); - hash = (37 * hash) + PORT_FIELD_NUMBER; - hash = (53 * hash) + getPort(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_SLA_Capacity_descriptor; - public static context.ContextOuterClass.TeraFlowController parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TeraFlowController parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.TeraFlowController parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TeraFlowController parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.TeraFlowController parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.TeraFlowController prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_SLA_Availability_descriptor; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ----- Miscellaneous -------------------------------------------------------------------------------------------------
-     * 
- * - * Protobuf type {@code context.TeraFlowController} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.TeraFlowController) - context.ContextOuterClass.TeraFlowControllerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.TeraFlowController.class, context.ContextOuterClass.TeraFlowController.Builder.class); - } - - // 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; - contextIdBuilder_ = null; - } - ipAddress_ = ""; - - port_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { - return context.ContextOuterClass.TeraFlowController.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.TeraFlowController build() { - context.ContextOuterClass.TeraFlowController result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.TeraFlowController) { - return mergeFrom((context.ContextOuterClass.TeraFlowController)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.TeraFlowController other) { - if (other == context.ContextOuterClass.TeraFlowController.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (!other.getIpAddress().isEmpty()) { - ipAddress_ = other.ipAddress_; - onChanged(); - } - if (other.getPort() != 0) { - setPort(other.getPort()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TeraFlowController) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ContextId contextId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private java.lang.Object ipAddress_ = ""; - /** - * string ip_address = 2; - * @return The ipAddress. - */ - public java.lang.String getIpAddress() { - java.lang.Object ref = ipAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ipAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string ip_address = 2; - * @return The bytes for ipAddress. - */ - public com.google.protobuf.ByteString - getIpAddressBytes() { - java.lang.Object ref = ipAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ipAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string ip_address = 2; - * @param value The ipAddress to set. - * @return This builder for chaining. - */ - public Builder setIpAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - ipAddress_ = value; - onChanged(); - return this; - } - /** - * string ip_address = 2; - * @return This builder for chaining. - */ - public Builder clearIpAddress() { - - ipAddress_ = getDefaultInstance().getIpAddress(); - onChanged(); - return this; - } - /** - * string ip_address = 2; - * @param value The bytes for ipAddress to set. - * @return This builder for chaining. - */ - public Builder setIpAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - ipAddress_ = value; - onChanged(); - return this; - } - - private int port_ ; - /** - * uint32 port = 3; - * @return The port. - */ - @java.lang.Override - public int getPort() { - return port_; - } - /** - * uint32 port = 3; - * @param value The port to set. - * @return This builder for chaining. - */ - public Builder setPort(int value) { - - port_ = value; - onChanged(); - return this; - } - /** - * uint32 port = 3; - * @return This builder for chaining. - */ - public Builder clearPort() { - - port_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.TeraFlowController) - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_SLA_Availability_fieldAccessorTable; - // @@protoc_insertion_point(class_scope:context.TeraFlowController) - private static final context.ContextOuterClass.TeraFlowController DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.TeraFlowController(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_SLA_Isolation_level_descriptor; - public static context.ContextOuterClass.TeraFlowController getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_Exclusions_descriptor; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_Exclusions_fieldAccessorTable; - @java.lang.Override - public context.ContextOuterClass.TeraFlowController getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Constraint_descriptor; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Constraint_fieldAccessorTable; - public interface AuthenticationResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:context.AuthenticationResult) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_TeraFlowController_descriptor; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - boolean hasContextId(); - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - context.ContextOuterClass.ContextId getContextId(); - /** - * .context.ContextId context_id = 1; - */ - context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder(); + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_TeraFlowController_fieldAccessorTable; - /** - * bool authenticated = 2; - * @return The authenticated. - */ - boolean getAuthenticated(); - } - /** - * Protobuf type {@code context.AuthenticationResult} - */ - public static final class AuthenticationResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:context.AuthenticationResult) - AuthenticationResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuthenticationResult.newBuilder() to construct. - private AuthenticationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AuthenticationResult() { - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_AuthenticationResult_descriptor; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AuthenticationResult(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_AuthenticationResult_fieldAccessorTable; - @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; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalConfigId_descriptor; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalConfigId_fieldAccessorTable; - public static final int CONTEXT_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.ContextId contextId_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - @java.lang.Override - public boolean hasContextId() { - return contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - @java.lang.Override - public context.ContextOuterClass.ContextId getContextId() { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - /** - * .context.ContextId context_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalConfig_descriptor; - public static final int AUTHENTICATED_FIELD_NUMBER = 2; - private boolean authenticated_; - /** - * bool authenticated = 2; - * @return The authenticated. - */ - @java.lang.Override - public boolean getAuthenticated() { - return authenticated_; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalConfig_fieldAccessorTable; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalConfigList_descriptor; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalConfigList_fieldAccessorTable; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (contextId_ != null) { - output.writeMessage(1, getContextId()); - } - if (authenticated_ != false) { - output.writeBool(2, authenticated_); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkId_descriptor; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contextId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContextId()); - } - if (authenticated_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, authenticated_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkId_fieldAccessorTable; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof context.ContextOuterClass.AuthenticationResult)) { - return super.equals(obj); - } - context.ContextOuterClass.AuthenticationResult other = (context.ContextOuterClass.AuthenticationResult) obj; - - if (hasContextId() != other.hasContextId()) return false; - if (hasContextId()) { - if (!getContextId() - .equals(other.getContextId())) return false; - } - if (getAuthenticated() - != other.getAuthenticated()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_FiberId_descriptor; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContextId()) { - hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; - hash = (53 * hash) + getContextId().hashCode(); - } - hash = (37 * hash) + AUTHENTICATED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getAuthenticated()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_FiberId_fieldAccessorTable; - public static context.ContextOuterClass.AuthenticationResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static context.ContextOuterClass.AuthenticationResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static context.ContextOuterClass.AuthenticationResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_Fiber_descriptor; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(context.ContextOuterClass.AuthenticationResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Fiber_fieldAccessorTable; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code context.AuthenticationResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:context.AuthenticationResult) - context.ContextOuterClass.AuthenticationResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - context.ContextOuterClass.AuthenticationResult.class, context.ContextOuterClass.AuthenticationResult.Builder.class); - } - - // 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; - contextIdBuilder_ = null; - } - authenticated_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; - } - - @java.lang.Override - public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { - return context.ContextOuterClass.AuthenticationResult.getDefaultInstance(); - } - - @java.lang.Override - public context.ContextOuterClass.AuthenticationResult build() { - context.ContextOuterClass.AuthenticationResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof context.ContextOuterClass.AuthenticationResult) { - return mergeFrom((context.ContextOuterClass.AuthenticationResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(context.ContextOuterClass.AuthenticationResult other) { - if (other == context.ContextOuterClass.AuthenticationResult.getDefaultInstance()) return this; - if (other.hasContextId()) { - mergeContextId(other.getContextId()); - } - if (other.getAuthenticated() != false) { - setAuthenticated(other.getAuthenticated()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.AuthenticationResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.ContextId contextId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; - /** - * .context.ContextId context_id = 1; - * @return Whether the contextId field is set. - */ - public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; - } - /** - * .context.ContextId context_id = 1; - * @return The contextId. - */ - public context.ContextOuterClass.ContextId getContextId() { - if (contextIdBuilder_ == null) { - return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } else { - return contextIdBuilder_.getMessage(); - } - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - contextId_ = value; - onChanged(); - } else { - contextIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder setContextId( - context.ContextOuterClass.ContextId.Builder builderForValue) { - if (contextIdBuilder_ == null) { - contextId_ = builderForValue.build(); - onChanged(); - } else { - contextIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder mergeContextId(context.ContextOuterClass.ContextId value) { - if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = - context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); - } else { - contextId_ = value; - } - onChanged(); - } else { - contextIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; - contextIdBuilder_ = null; - } - - return this; - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { - - onChanged(); - return getContextIdFieldBuilder().getBuilder(); - } - /** - * .context.ContextId context_id = 1; - */ - public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - if (contextIdBuilder_ != null) { - return contextIdBuilder_.getMessageOrBuilder(); - } else { - return contextId_ == null ? - context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; - } - } - /** - * .context.ContextId context_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> - getContextIdFieldBuilder() { - if (contextIdBuilder_ == null) { - contextIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder>( - getContextId(), - getParentForChildren(), - isClean()); - contextId_ = null; - } - return contextIdBuilder_; - } - - private boolean authenticated_ ; - /** - * bool authenticated = 2; - * @return The authenticated. - */ - @java.lang.Override - public boolean getAuthenticated() { - return authenticated_; - } - /** - * bool authenticated = 2; - * @param value The authenticated to set. - * @return This builder for chaining. - */ - public Builder setAuthenticated(boolean value) { - - authenticated_ = value; - onChanged(); - return this; - } - /** - * bool authenticated = 2; - * @return This builder for chaining. - */ - public Builder clearAuthenticated() { - - authenticated_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:context.AuthenticationResult) - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLinkDetails_descriptor; - // @@protoc_insertion_point(class_scope:context.AuthenticationResult) - private static final context.ContextOuterClass.AuthenticationResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new context.ContextOuterClass.AuthenticationResult(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLinkDetails_fieldAccessorTable; - public static context.ContextOuterClass.AuthenticationResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_OpticalLink_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_OpticalLink_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - @java.lang.Override - public context.ContextOuterClass.AuthenticationResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Empty_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Empty_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Uuid_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Uuid_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Timestamp_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Timestamp_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Event_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Event_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ContextId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ContextId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Context_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Context_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ContextIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ContextIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ContextList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ContextList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ContextEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ContextEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_TopologyId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_TopologyId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Topology_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Topology_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_TopologyDetails_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_TopologyDetails_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_TopologyIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_TopologyIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_TopologyList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_TopologyList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_TopologyEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_TopologyEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_DeviceId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_DeviceId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Device_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Device_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Component_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Component_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Component_AttributesEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Component_AttributesEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_DeviceConfig_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_DeviceConfig_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_DeviceIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_DeviceIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_DeviceList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_DeviceList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_DeviceFilter_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_DeviceFilter_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_DeviceEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_DeviceEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_LinkId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_LinkId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Link_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Link_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_LinkIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_LinkIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_LinkList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_LinkList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_LinkEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_LinkEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Service_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Service_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceStatus_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceStatus_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceConfig_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceConfig_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceFilter_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceFilter_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ServiceEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ServiceEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Slice_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Slice_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceOwner_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceOwner_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceStatus_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceStatus_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceConfig_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceConfig_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceFilter_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceFilter_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_SliceEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_SliceEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionSettings_L0_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionSettings_L0_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionSettings_L2_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionSettings_L2_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionSettings_L3_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionSettings_L3_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionSettings_L4_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionSettings_L4_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionSettings_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionSettings_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Connection_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Connection_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConnectionEvent_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConnectionEvent_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_EndPointId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_EndPointId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_EndPoint_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_EndPoint_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_EndPointName_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_EndPointName_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_EndPointIdList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_EndPointIdList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_EndPointNameList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_EndPointNameList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConfigRule_Custom_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConfigRule_Custom_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConfigRule_ACL_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConfigRule_ACL_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_ConfigRule_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_ConfigRule_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_Custom_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_Custom_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_Schedule_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_Schedule_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_GPS_Position_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_GPS_Position_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Location_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Location_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_EndPointLocation_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_EndPointLocation_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_EndPointPriority_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_EndPointPriority_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_SLA_Latency_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_SLA_Latency_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_SLA_Capacity_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_SLA_Availability_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_SLA_Availability_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_SLA_Isolation_level_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_Exclusions_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_Exclusions_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_Constraint_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_Constraint_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_TeraFlowController_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_TeraFlowController_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_context_AuthenticationResult_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_context_AuthenticationResult_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - 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\"f\n\004Link" + - "\022 \n\007link_id\030\001 \001(\0132\017.context.LinkId\022\014\n\004na" + - "me\030\002 \001(\t\022.\n\021link_endpoint_ids\030\003 \003(\0132\023.co" + - "ntext.EndPointId\"/\n\nLinkIdList\022!\n\010link_i" + - "ds\030\001 \003(\0132\017.context.LinkId\"(\n\010LinkList\022\034\n" + - "\005links\030\001 \003(\0132\r.context.Link\"L\n\tLinkEvent" + - "\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\007" + - "Service\022&\n\nservice_id\030\001 \001(\0132\022.context.Se" + - "rviceId\022\014\n\004name\030\002 \001(\t\022.\n\014service_type\030\003 " + - "\001(\0162\030.context.ServiceTypeEnum\0221\n\024service" + - "_endpoint_ids\030\004 \003(\0132\023.context.EndPointId" + - "\0220\n\023service_constraints\030\005 \003(\0132\023.context." + - "Constraint\022.\n\016service_status\030\006 \001(\0132\026.con" + - "text.ServiceStatus\022.\n\016service_config\030\007 \001" + - "(\0132\026.context.ServiceConfig\022%\n\ttimestamp\030" + - "\010 \001(\0132\022.context.Timestamp\"C\n\rServiceStat" + - "us\0222\n\016service_status\030\001 \001(\0162\032.context.Ser" + - "viceStatusEnum\":\n\rServiceConfig\022)\n\014confi" + - "g_rules\030\001 \003(\0132\023.context.ConfigRule\"8\n\rSe" + - "rviceIdList\022\'\n\013service_ids\030\001 \003(\0132\022.conte" + - "xt.ServiceId\"1\n\013ServiceList\022\"\n\010services\030" + - "\001 \003(\0132\020.context.Service\"\225\001\n\rServiceFilte" + - "r\022+\n\013service_ids\030\001 \001(\0132\026.context.Service" + - "IdList\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n\023" + - "include_constraints\030\003 \001(\010\022\034\n\024include_con" + - "fig_rules\030\004 \001(\010\"U\n\014ServiceEvent\022\035\n\005event" + - "\030\001 \001(\0132\016.context.Event\022&\n\nservice_id\030\002 \001" + - "(\0132\022.context.ServiceId\"T\n\007SliceId\022&\n\ncon" + - "text_id\030\001 \001(\0132\022.context.ContextId\022!\n\nsli" + - "ce_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\004na" + - "me\030\002 \001(\t\022/\n\022slice_endpoint_ids\030\003 \003(\0132\023.c" + - "ontext.EndPointId\022.\n\021slice_constraints\030\004" + - " \003(\0132\023.context.Constraint\022-\n\021slice_servi" + - "ce_ids\030\005 \003(\0132\022.context.ServiceId\022,\n\022slic" + - "e_subslice_ids\030\006 \003(\0132\020.context.SliceId\022*" + - "\n\014slice_status\030\007 \001(\0132\024.context.SliceStat" + - "us\022*\n\014slice_config\030\010 \001(\0132\024.context.Slice" + - "Config\022(\n\013slice_owner\030\t \001(\0132\023.context.Sl" + - "iceOwner\022%\n\ttimestamp\030\n \001(\0132\022.context.Ti" + - "mestamp\"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.co" + - "ntext.SliceStatusEnum\"8\n\013SliceConfig\022)\n\014" + - "config_rules\030\001 \003(\0132\023.context.ConfigRule\"" + - "2\n\013SliceIdList\022#\n\tslice_ids\030\001 \003(\0132\020.cont" + - "ext.SliceId\"+\n\tSliceList\022\036\n\006slices\030\001 \003(\013" + - "2\016.context.Slice\"\312\001\n\013SliceFilter\022\'\n\tslic" + - "e_ids\030\001 \001(\0132\024.context.SliceIdList\022\034\n\024inc" + - "lude_endpoint_ids\030\002 \001(\010\022\033\n\023include_const" + - "raints\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\024inclu" + - "de_config_rules\030\006 \001(\010\"O\n\nSliceEvent\022\035\n\005e" + - "vent\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\017" + - "src_mac_address\030\001 \001(\t\022\027\n\017dst_mac_address" + - "\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\016" + - "src_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\003" + - "ttl\030\005 \001(\r\"[\n\025ConnectionSettings_L4\022\020\n\010sr" + - "c_port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(\r\022\021\n\ttcp_fl" + - "ags\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022ConnectionSet" + - "tings\022*\n\002l0\030\001 \001(\0132\036.context.ConnectionSe" + - "ttings_L0\022*\n\002l2\030\002 \001(\0132\036.context.Connecti" + - "onSettings_L2\022*\n\002l3\030\003 \001(\0132\036.context.Conn" + - "ectionSettings_L3\022*\n\002l4\030\004 \001(\0132\036.context." + - "ConnectionSettings_L4\"\363\001\n\nConnection\022,\n\r" + - "connection_id\030\001 \001(\0132\025.context.Connection" + - "Id\022&\n\nservice_id\030\002 \001(\0132\022.context.Service" + - "Id\0223\n\026path_hops_endpoint_ids\030\003 \003(\0132\023.con" + - "text.EndPointId\022+\n\017sub_service_ids\030\004 \003(\013" + - "2\022.context.ServiceId\022-\n\010settings\030\005 \001(\0132\033" + - ".context.ConnectionSettings\"A\n\020Connectio" + - "nIdList\022-\n\016connection_ids\030\001 \003(\0132\025.contex" + - "t.ConnectionId\":\n\016ConnectionList\022(\n\013conn" + - "ections\030\001 \003(\0132\023.context.Connection\"^\n\017Co" + - "nnectionEvent\022\035\n\005event\030\001 \001(\0132\016.context.E" + - "vent\022,\n\rconnection_id\030\002 \001(\0132\025.context.Co" + - "nnectionId\"\202\001\n\nEndPointId\022(\n\013topology_id" + - "\030\001 \001(\0132\023.context.TopologyId\022$\n\tdevice_id" + - "\030\002 \001(\0132\021.context.DeviceId\022$\n\rendpoint_uu" + - "id\030\003 \001(\0132\r.context.Uuid\"\302\001\n\010EndPoint\022(\n\013" + - "endpoint_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\020k" + - "pi_sample_types\030\004 \003(\0162\037.kpi_sample_types" + - ".KpiSampleType\022,\n\021endpoint_location\030\005 \001(" + - "\0132\021.context.Location\"{\n\014EndPointName\022(\n\013" + - "endpoint_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\016EndPointIdL" + - "ist\022)\n\014endpoint_ids\030\001 \003(\0132\023.context.EndP" + - "ointId\"A\n\020EndPointNameList\022-\n\016endpoint_n" + - "ames\030\001 \003(\0132\025.context.EndPointName\"A\n\021Con" + - "figRule_Custom\022\024\n\014resource_key\030\001 \001(\t\022\026\n\016" + - "resource_value\030\002 \001(\t\"]\n\016ConfigRule_ACL\022(" + - "\n\013endpoint_id\030\001 \001(\0132\023.context.EndPointId" + - "\022!\n\010rule_set\030\002 \001(\0132\017.acl.AclRuleSet\"\234\001\n\n" + - "ConfigRule\022)\n\006action\030\001 \001(\0162\031.context.Con" + - "figActionEnum\022,\n\006custom\030\002 \001(\0132\032.context." + - "ConfigRule_CustomH\000\022&\n\003acl\030\003 \001(\0132\027.conte" + - "xt.ConfigRule_ACLH\000B\r\n\013config_rule\"F\n\021Co" + - "nstraint_Custom\022\027\n\017constraint_type\030\001 \001(\t" + - "\022\030\n\020constraint_value\030\002 \001(\t\"E\n\023Constraint" + - "_Schedule\022\027\n\017start_timestamp\030\001 \001(\002\022\025\n\rdu" + - "ration_days\030\002 \001(\002\"3\n\014GPS_Position\022\020\n\010lat" + - "itude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(\002\"W\n\010Locati" + - "on\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\013endpoi" + - "nt_id\030\001 \001(\0132\023.context.EndPointId\022#\n\010loca" + - "tion\030\002 \001(\0132\021.context.Location\"Y\n\033Constra" + - "int_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_latenc" + - "y_ms\030\001 \001(\002\"0\n\027Constraint_SLA_Capacity\022\025\n" + - "\rcapacity_gbps\030\001 \001(\002\"c\n\033Constraint_SLA_A" + - "vailability\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\017i" + - "solation_level\030\001 \003(\0162\033.context.Isolation" + - "LevelEnum\"\242\001\n\025Constraint_Exclusions\022\024\n\014i" + - "s_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\006" + - "custom\030\002 \001(\0132\032.context.Constraint_Custom" + - "H\000\0220\n\010schedule\030\003 \001(\0132\034.context.Constrain" + - "t_ScheduleH\000\022A\n\021endpoint_location\030\004 \001(\0132" + - "$.context.Constraint_EndPointLocationH\000\022" + - "A\n\021endpoint_priority\030\005 \001(\0132$.context.Con" + - "straint_EndPointPriorityH\000\0228\n\014sla_capaci" + - "ty\030\006 \001(\0132 .context.Constraint_SLA_Capaci" + - "tyH\000\0226\n\013sla_latency\030\007 \001(\0132\037.context.Cons" + - "traint_SLA_LatencyH\000\022@\n\020sla_availability" + - "\030\010 \001(\0132$.context.Constraint_SLA_Availabi" + - "lityH\000\022@\n\rsla_isolation\030\t \001(\0132\'.context." + - "Constraint_SLA_Isolation_levelH\000\0224\n\nexcl" + - "usions\030\n \001(\0132\036.context.Constraint_Exclus" + - "ionsH\000B\014\n\nconstraint\"^\n\022TeraFlowControll" + - "er\022&\n\ncontext_id\030\001 \001(\0132\022.context.Context" + - "Id\022\022\n\nip_address\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n\024" + - "AuthenticationResult\022&\n\ncontext_id\030\001 \001(\013" + - "2\022.context.ContextId\022\025\n\rauthenticated\030\002 " + - "\001(\010*j\n\rEventTypeEnum\022\027\n\023EVENTTYPE_UNDEFI" + - "NED\020\000\022\024\n\020EVENTTYPE_CREATE\020\001\022\024\n\020EVENTTYPE" + - "_UPDATE\020\002\022\024\n\020EVENTTYPE_REMOVE\020\003*\231\002\n\020Devi" + - "ceDriverEnum\022\032\n\026DEVICEDRIVER_UNDEFINED\020\000" + - "\022\033\n\027DEVICEDRIVER_OPENCONFIG\020\001\022\036\n\032DEVICED" + - "RIVER_TRANSPORT_API\020\002\022\023\n\017DEVICEDRIVER_P4" + - "\020\003\022&\n\"DEVICEDRIVER_IETF_NETWORK_TOPOLOGY" + - "\020\004\022\033\n\027DEVICEDRIVER_ONF_TR_532\020\005\022\023\n\017DEVIC" + - "EDRIVER_XR\020\006\022\033\n\027DEVICEDRIVER_IETF_L2VPN\020" + - "\007\022 \n\034DEVICEDRIVER_GNMI_OPENCONFIG\020\010*\217\001\n\033" + - "DeviceOperationalStatusEnum\022%\n!DEVICEOPE" + - "RATIONALSTATUS_UNDEFINED\020\000\022$\n DEVICEOPER" + - "ATIONALSTATUS_DISABLED\020\001\022#\n\037DEVICEOPERAT" + - "IONALSTATUS_ENABLED\020\002*\225\001\n\017ServiceTypeEnu" + - "m\022\027\n\023SERVICETYPE_UNKNOWN\020\000\022\024\n\020SERVICETYP" + - "E_L3NM\020\001\022\024\n\020SERVICETYPE_L2NM\020\002\022)\n%SERVIC" + - "ETYPE_TAPI_CONNECTIVITY_SERVICE\020\003\022\022\n\016SER" + - "VICETYPE_TE\020\004*\304\001\n\021ServiceStatusEnum\022\033\n\027S" + - "ERVICESTATUS_UNDEFINED\020\000\022\031\n\025SERVICESTATU" + - "S_PLANNED\020\001\022\030\n\024SERVICESTATUS_ACTIVE\020\002\022\032\n" + - "\026SERVICESTATUS_UPDATING\020\003\022!\n\035SERVICESTAT" + - "US_PENDING_REMOVAL\020\004\022\036\n\032SERVICESTATUS_SL" + - "A_VIOLATED\020\005*\251\001\n\017SliceStatusEnum\022\031\n\025SLIC" + - "ESTATUS_UNDEFINED\020\000\022\027\n\023SLICESTATUS_PLANN" + - "ED\020\001\022\024\n\020SLICESTATUS_INIT\020\002\022\026\n\022SLICESTATU" + - "S_ACTIVE\020\003\022\026\n\022SLICESTATUS_DEINIT\020\004\022\034\n\030SL" + - "ICESTATUS_SLA_VIOLATED\020\005*]\n\020ConfigAction" + - "Enum\022\032\n\026CONFIGACTION_UNDEFINED\020\000\022\024\n\020CONF" + - "IGACTION_SET\020\001\022\027\n\023CONFIGACTION_DELETE\020\002*" + - "m\n\024ConstraintActionEnum\022\036\n\032CONSTRAINTACT" + - "ION_UNDEFINED\020\000\022\030\n\024CONSTRAINTACTION_SET\020" + - "\001\022\033\n\027CONSTRAINTACTION_DELETE\020\002*\203\002\n\022Isola" + - "tionLevelEnum\022\020\n\014NO_ISOLATION\020\000\022\026\n\022PHYSI" + - "CAL_ISOLATION\020\001\022\025\n\021LOGICAL_ISOLATION\020\002\022\025" + - "\n\021PROCESS_ISOLATION\020\003\022\035\n\031PHYSICAL_MEMORY" + - "_ISOLATION\020\004\022\036\n\032PHYSICAL_NETWORK_ISOLATI" + - "ON\020\005\022\036\n\032VIRTUAL_RESOURCE_ISOLATION\020\006\022\037\n\033" + - "NETWORK_FUNCTIONS_ISOLATION\020\007\022\025\n\021SERVICE" + - "_ISOLATION\020\0102\245\026\n\016ContextService\022:\n\016ListC" + - "ontextIds\022\016.context.Empty\032\026.context.Cont" + - "extIdList\"\000\0226\n\014ListContexts\022\016.context.Em" + - "pty\032\024.context.ContextList\"\000\0224\n\nGetContex" + - "t\022\022.context.ContextId\032\020.context.Context\"" + - "\000\0224\n\nSetContext\022\020.context.Context\032\022.cont" + - "ext.ContextId\"\000\0225\n\rRemoveContext\022\022.conte" + - "xt.ContextId\032\016.context.Empty\"\000\022=\n\020GetCon" + - "textEvents\022\016.context.Empty\032\025.context.Con" + - "textEvent\"\0000\001\022@\n\017ListTopologyIds\022\022.conte" + - "xt.ContextId\032\027.context.TopologyIdList\"\000\022" + - "=\n\016ListTopologies\022\022.context.ContextId\032\025." + - "context.TopologyList\"\000\0227\n\013GetTopology\022\023." + - "context.TopologyId\032\021.context.Topology\"\000\022" + - "E\n\022GetTopologyDetails\022\023.context.Topology" + - "Id\032\030.context.TopologyDetails\"\000\0227\n\013SetTop" + - "ology\022\021.context.Topology\032\023.context.Topol" + - "ogyId\"\000\0227\n\016RemoveTopology\022\023.context.Topo" + - "logyId\032\016.context.Empty\"\000\022?\n\021GetTopologyE" + - "vents\022\016.context.Empty\032\026.context.Topology" + - "Event\"\0000\001\0228\n\rListDeviceIds\022\016.context.Emp" + - "ty\032\025.context.DeviceIdList\"\000\0224\n\013ListDevic" + - "es\022\016.context.Empty\032\023.context.DeviceList\"" + - "\000\0221\n\tGetDevice\022\021.context.DeviceId\032\017.cont" + - "ext.Device\"\000\0221\n\tSetDevice\022\017.context.Devi" + - "ce\032\021.context.DeviceId\"\000\0223\n\014RemoveDevice\022" + - "\021.context.DeviceId\032\016.context.Empty\"\000\022;\n\017" + - "GetDeviceEvents\022\016.context.Empty\032\024.contex" + - "t.DeviceEvent\"\0000\001\022<\n\014SelectDevice\022\025.cont" + - "ext.DeviceFilter\032\023.context.DeviceList\"\000\022" + - "I\n\021ListEndPointNames\022\027.context.EndPointI" + - "dList\032\031.context.EndPointNameList\"\000\0224\n\013Li" + - "stLinkIds\022\016.context.Empty\032\023.context.Link" + - "IdList\"\000\0220\n\tListLinks\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.con" + - "text.Link\032\017.context.LinkId\"\000\022/\n\nRemoveLi" + - "nk\022\017.context.LinkId\032\016.context.Empty\"\000\0227\n" + - "\rGetLinkEvents\022\016.context.Empty\032\022.context" + - ".LinkEvent\"\0000\001\022>\n\016ListServiceIds\022\022.conte" + - "xt.ContextId\032\026.context.ServiceIdList\"\000\022:" + - "\n\014ListServices\022\022.context.ContextId\032\024.con" + - "text.ServiceList\"\000\0224\n\nGetService\022\022.conte" + - "xt.ServiceId\032\020.context.Service\"\000\0224\n\nSetS" + - "ervice\022\020.context.Service\032\022.context.Servi" + - "ceId\"\000\0226\n\014UnsetService\022\020.context.Service" + - "\032\022.context.ServiceId\"\000\0225\n\rRemoveService\022" + - "\022.context.ServiceId\032\016.context.Empty\"\000\022=\n" + - "\020GetServiceEvents\022\016.context.Empty\032\025.cont" + - "ext.ServiceEvent\"\0000\001\022?\n\rSelectService\022\026." + - "context.ServiceFilter\032\024.context.ServiceL" + - "ist\"\000\022:\n\014ListSliceIds\022\022.context.ContextI" + - "d\032\024.context.SliceIdList\"\000\0226\n\nListSlices\022" + - "\022.context.ContextId\032\022.context.SliceList\"" + - "\000\022.\n\010GetSlice\022\020.context.SliceId\032\016.contex" + - "t.Slice\"\000\022.\n\010SetSlice\022\016.context.Slice\032\020." + - "context.SliceId\"\000\0220\n\nUnsetSlice\022\016.contex" + - "t.Slice\032\020.context.SliceId\"\000\0221\n\013RemoveSli" + - "ce\022\020.context.SliceId\032\016.context.Empty\"\000\0229" + - "\n\016GetSliceEvents\022\016.context.Empty\032\023.conte" + - "xt.SliceEvent\"\0000\001\0229\n\013SelectSlice\022\024.conte" + - "xt.SliceFilter\032\022.context.SliceList\"\000\022D\n\021" + - "ListConnectionIds\022\022.context.ServiceId\032\031." + - "context.ConnectionIdList\"\000\022@\n\017ListConnec" + - "tions\022\022.context.ServiceId\032\027.context.Conn" + - "ectionList\"\000\022=\n\rGetConnection\022\025.context." + - "ConnectionId\032\023.context.Connection\"\000\022=\n\rS" + - "etConnection\022\023.context.Connection\032\025.cont" + - "ext.ConnectionId\"\000\022;\n\020RemoveConnection\022\025" + - ".context.ConnectionId\032\016.context.Empty\"\000\022" + - "C\n\023GetConnectionEvents\022\016.context.Empty\032\030" + - ".context.ConnectionEvent\"\0000\001b\006proto3" - }; - 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[] { }); - internal_static_context_Uuid_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_context_Uuid_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Uuid_descriptor, - new java.lang.String[] { "Uuid", }); - internal_static_context_Timestamp_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_context_Timestamp_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Timestamp_descriptor, - new java.lang.String[] { "Timestamp", }); - internal_static_context_Event_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_context_Event_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Event_descriptor, - new java.lang.String[] { "Timestamp", "EventType", }); - internal_static_context_ContextId_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_context_ContextId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ContextId_descriptor, - new java.lang.String[] { "ContextUuid", }); - internal_static_context_Context_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_context_Context_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Context_descriptor, - new java.lang.String[] { "ContextId", "Name", "TopologyIds", "ServiceIds", "SliceIds", "Controller", }); - internal_static_context_ContextIdList_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_context_ContextIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ContextIdList_descriptor, - new java.lang.String[] { "ContextIds", }); - internal_static_context_ContextList_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_context_ContextList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ContextList_descriptor, - new java.lang.String[] { "Contexts", }); - internal_static_context_ContextEvent_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_context_ContextEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ContextEvent_descriptor, - new java.lang.String[] { "Event", "ContextId", }); - internal_static_context_TopologyId_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_context_TopologyId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_TopologyId_descriptor, - new java.lang.String[] { "ContextId", "TopologyUuid", }); - internal_static_context_Topology_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_context_Topology_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Topology_descriptor, - new java.lang.String[] { "TopologyId", "Name", "DeviceIds", "LinkIds", }); - internal_static_context_TopologyDetails_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_context_TopologyDetails_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_TopologyDetails_descriptor, - new java.lang.String[] { "TopologyId", "Name", "Devices", "Links", }); - internal_static_context_TopologyIdList_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_context_TopologyIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_TopologyIdList_descriptor, - new java.lang.String[] { "TopologyIds", }); - internal_static_context_TopologyList_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_context_TopologyList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_TopologyList_descriptor, - new java.lang.String[] { "Topologies", }); - internal_static_context_TopologyEvent_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_context_TopologyEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_TopologyEvent_descriptor, - new java.lang.String[] { "Event", "TopologyId", }); - internal_static_context_DeviceId_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_context_DeviceId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_DeviceId_descriptor, - new java.lang.String[] { "DeviceUuid", }); - internal_static_context_Device_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_context_Device_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Device_descriptor, - new java.lang.String[] { "DeviceId", "Name", "DeviceType", "DeviceConfig", "DeviceOperationalStatus", "DeviceDrivers", "DeviceEndpoints", "Components", "ControllerId", }); - internal_static_context_Component_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_context_Component_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Component_descriptor, - new java.lang.String[] { "ComponentUuid", "Name", "Type", "Attributes", "Parent", }); - internal_static_context_Component_AttributesEntry_descriptor = - internal_static_context_Component_descriptor.getNestedTypes().get(0); - internal_static_context_Component_AttributesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Component_AttributesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_context_DeviceConfig_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_context_DeviceConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_DeviceConfig_descriptor, - new java.lang.String[] { "ConfigRules", }); - internal_static_context_DeviceIdList_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_context_DeviceIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_DeviceIdList_descriptor, - new java.lang.String[] { "DeviceIds", }); - internal_static_context_DeviceList_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_context_DeviceList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_DeviceList_descriptor, - new java.lang.String[] { "Devices", }); - internal_static_context_DeviceFilter_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_context_DeviceFilter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_DeviceFilter_descriptor, - new java.lang.String[] { "DeviceIds", "IncludeEndpoints", "IncludeConfigRules", "IncludeComponents", }); - internal_static_context_DeviceEvent_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_context_DeviceEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_DeviceEvent_descriptor, - new java.lang.String[] { "Event", "DeviceId", "DeviceConfig", }); - internal_static_context_LinkId_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_context_LinkId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_LinkId_descriptor, - new java.lang.String[] { "LinkUuid", }); - internal_static_context_Link_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_context_Link_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Link_descriptor, - new java.lang.String[] { "LinkId", "Name", "LinkEndpointIds", }); - internal_static_context_LinkIdList_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_context_LinkIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_LinkIdList_descriptor, - new java.lang.String[] { "LinkIds", }); - internal_static_context_LinkList_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_context_LinkList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_LinkList_descriptor, - new java.lang.String[] { "Links", }); - internal_static_context_LinkEvent_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_context_LinkEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_LinkEvent_descriptor, - new java.lang.String[] { "Event", "LinkId", }); - internal_static_context_ServiceId_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_context_ServiceId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceId_descriptor, - new java.lang.String[] { "ContextId", "ServiceUuid", }); - internal_static_context_Service_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_context_Service_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Service_descriptor, - new java.lang.String[] { "ServiceId", "Name", "ServiceType", "ServiceEndpointIds", "ServiceConstraints", "ServiceStatus", "ServiceConfig", "Timestamp", }); - internal_static_context_ServiceStatus_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_context_ServiceStatus_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceStatus_descriptor, - new java.lang.String[] { "ServiceStatus", }); - internal_static_context_ServiceConfig_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_context_ServiceConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceConfig_descriptor, - new java.lang.String[] { "ConfigRules", }); - internal_static_context_ServiceIdList_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_context_ServiceIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceIdList_descriptor, - new java.lang.String[] { "ServiceIds", }); - internal_static_context_ServiceList_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_context_ServiceList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceList_descriptor, - new java.lang.String[] { "Services", }); - internal_static_context_ServiceFilter_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_context_ServiceFilter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceFilter_descriptor, - new java.lang.String[] { "ServiceIds", "IncludeEndpointIds", "IncludeConstraints", "IncludeConfigRules", }); - internal_static_context_ServiceEvent_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_context_ServiceEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ServiceEvent_descriptor, - new java.lang.String[] { "Event", "ServiceId", }); - internal_static_context_SliceId_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_context_SliceId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceId_descriptor, - new java.lang.String[] { "ContextId", "SliceUuid", }); - internal_static_context_Slice_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_context_Slice_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Slice_descriptor, - new java.lang.String[] { "SliceId", "Name", "SliceEndpointIds", "SliceConstraints", "SliceServiceIds", "SliceSubsliceIds", "SliceStatus", "SliceConfig", "SliceOwner", "Timestamp", }); - internal_static_context_SliceOwner_descriptor = - getDescriptor().getMessageTypes().get(38); - internal_static_context_SliceOwner_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceOwner_descriptor, - new java.lang.String[] { "OwnerUuid", "OwnerString", }); - internal_static_context_SliceStatus_descriptor = - getDescriptor().getMessageTypes().get(39); - internal_static_context_SliceStatus_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceStatus_descriptor, - new java.lang.String[] { "SliceStatus", }); - internal_static_context_SliceConfig_descriptor = - getDescriptor().getMessageTypes().get(40); - internal_static_context_SliceConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceConfig_descriptor, - new java.lang.String[] { "ConfigRules", }); - internal_static_context_SliceIdList_descriptor = - getDescriptor().getMessageTypes().get(41); - internal_static_context_SliceIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceIdList_descriptor, - new java.lang.String[] { "SliceIds", }); - internal_static_context_SliceList_descriptor = - getDescriptor().getMessageTypes().get(42); - internal_static_context_SliceList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceList_descriptor, - new java.lang.String[] { "Slices", }); - internal_static_context_SliceFilter_descriptor = - getDescriptor().getMessageTypes().get(43); - internal_static_context_SliceFilter_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceFilter_descriptor, - new java.lang.String[] { "SliceIds", "IncludeEndpointIds", "IncludeConstraints", "IncludeServiceIds", "IncludeSubsliceIds", "IncludeConfigRules", }); - internal_static_context_SliceEvent_descriptor = - getDescriptor().getMessageTypes().get(44); - internal_static_context_SliceEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_SliceEvent_descriptor, - new java.lang.String[] { "Event", "SliceId", }); - internal_static_context_ConnectionId_descriptor = - getDescriptor().getMessageTypes().get(45); - internal_static_context_ConnectionId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionId_descriptor, - new java.lang.String[] { "ConnectionUuid", }); - internal_static_context_ConnectionSettings_L0_descriptor = - getDescriptor().getMessageTypes().get(46); - internal_static_context_ConnectionSettings_L0_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionSettings_L0_descriptor, - new java.lang.String[] { "LspSymbolicName", }); - internal_static_context_ConnectionSettings_L2_descriptor = - getDescriptor().getMessageTypes().get(47); - internal_static_context_ConnectionSettings_L2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionSettings_L2_descriptor, - new java.lang.String[] { "SrcMacAddress", "DstMacAddress", "EtherType", "VlanId", "MplsLabel", "MplsTrafficClass", }); - internal_static_context_ConnectionSettings_L3_descriptor = - getDescriptor().getMessageTypes().get(48); - internal_static_context_ConnectionSettings_L3_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionSettings_L3_descriptor, - new java.lang.String[] { "SrcIpAddress", "DstIpAddress", "Dscp", "Protocol", "Ttl", }); - internal_static_context_ConnectionSettings_L4_descriptor = - getDescriptor().getMessageTypes().get(49); - internal_static_context_ConnectionSettings_L4_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionSettings_L4_descriptor, - new java.lang.String[] { "SrcPort", "DstPort", "TcpFlags", "Ttl", }); - internal_static_context_ConnectionSettings_descriptor = - getDescriptor().getMessageTypes().get(50); - internal_static_context_ConnectionSettings_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionSettings_descriptor, - new java.lang.String[] { "L0", "L2", "L3", "L4", }); - internal_static_context_Connection_descriptor = - getDescriptor().getMessageTypes().get(51); - internal_static_context_Connection_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Connection_descriptor, - new java.lang.String[] { "ConnectionId", "ServiceId", "PathHopsEndpointIds", "SubServiceIds", "Settings", }); - internal_static_context_ConnectionIdList_descriptor = - getDescriptor().getMessageTypes().get(52); - internal_static_context_ConnectionIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionIdList_descriptor, - new java.lang.String[] { "ConnectionIds", }); - internal_static_context_ConnectionList_descriptor = - getDescriptor().getMessageTypes().get(53); - internal_static_context_ConnectionList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionList_descriptor, - new java.lang.String[] { "Connections", }); - internal_static_context_ConnectionEvent_descriptor = - getDescriptor().getMessageTypes().get(54); - internal_static_context_ConnectionEvent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConnectionEvent_descriptor, - new java.lang.String[] { "Event", "ConnectionId", }); - internal_static_context_EndPointId_descriptor = - getDescriptor().getMessageTypes().get(55); - internal_static_context_EndPointId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_EndPointId_descriptor, - new java.lang.String[] { "TopologyId", "DeviceId", "EndpointUuid", }); - internal_static_context_EndPoint_descriptor = - getDescriptor().getMessageTypes().get(56); - internal_static_context_EndPoint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_EndPoint_descriptor, - new java.lang.String[] { "EndpointId", "Name", "EndpointType", "KpiSampleTypes", "EndpointLocation", }); - internal_static_context_EndPointName_descriptor = - getDescriptor().getMessageTypes().get(57); - internal_static_context_EndPointName_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_EndPointName_descriptor, - new java.lang.String[] { "EndpointId", "DeviceName", "EndpointName", "EndpointType", }); - internal_static_context_EndPointIdList_descriptor = - getDescriptor().getMessageTypes().get(58); - internal_static_context_EndPointIdList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_EndPointIdList_descriptor, - new java.lang.String[] { "EndpointIds", }); - internal_static_context_EndPointNameList_descriptor = - getDescriptor().getMessageTypes().get(59); - internal_static_context_EndPointNameList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_EndPointNameList_descriptor, - new java.lang.String[] { "EndpointNames", }); - internal_static_context_ConfigRule_Custom_descriptor = - getDescriptor().getMessageTypes().get(60); - internal_static_context_ConfigRule_Custom_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConfigRule_Custom_descriptor, - new java.lang.String[] { "ResourceKey", "ResourceValue", }); - internal_static_context_ConfigRule_ACL_descriptor = - getDescriptor().getMessageTypes().get(61); - internal_static_context_ConfigRule_ACL_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConfigRule_ACL_descriptor, - new java.lang.String[] { "EndpointId", "RuleSet", }); - internal_static_context_ConfigRule_descriptor = - getDescriptor().getMessageTypes().get(62); - internal_static_context_ConfigRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_ConfigRule_descriptor, - new java.lang.String[] { "Action", "Custom", "Acl", "ConfigRule", }); - internal_static_context_Constraint_Custom_descriptor = - getDescriptor().getMessageTypes().get(63); - internal_static_context_Constraint_Custom_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_Custom_descriptor, - new java.lang.String[] { "ConstraintType", "ConstraintValue", }); - internal_static_context_Constraint_Schedule_descriptor = - getDescriptor().getMessageTypes().get(64); - internal_static_context_Constraint_Schedule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_Schedule_descriptor, - new java.lang.String[] { "StartTimestamp", "DurationDays", }); - internal_static_context_GPS_Position_descriptor = - getDescriptor().getMessageTypes().get(65); - internal_static_context_GPS_Position_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_GPS_Position_descriptor, - new java.lang.String[] { "Latitude", "Longitude", }); - internal_static_context_Location_descriptor = - getDescriptor().getMessageTypes().get(66); - internal_static_context_Location_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Location_descriptor, - new java.lang.String[] { "Region", "GpsPosition", "Location", }); - internal_static_context_Constraint_EndPointLocation_descriptor = - getDescriptor().getMessageTypes().get(67); - internal_static_context_Constraint_EndPointLocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_EndPointLocation_descriptor, - new java.lang.String[] { "EndpointId", "Location", }); - internal_static_context_Constraint_EndPointPriority_descriptor = - getDescriptor().getMessageTypes().get(68); - internal_static_context_Constraint_EndPointPriority_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_EndPointPriority_descriptor, - new java.lang.String[] { "EndpointId", "Priority", }); - internal_static_context_Constraint_SLA_Latency_descriptor = - getDescriptor().getMessageTypes().get(69); - internal_static_context_Constraint_SLA_Latency_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_SLA_Latency_descriptor, - new java.lang.String[] { "E2ELatencyMs", }); - internal_static_context_Constraint_SLA_Capacity_descriptor = - getDescriptor().getMessageTypes().get(70); - internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_SLA_Capacity_descriptor, - new java.lang.String[] { "CapacityGbps", }); - internal_static_context_Constraint_SLA_Availability_descriptor = - getDescriptor().getMessageTypes().get(71); - internal_static_context_Constraint_SLA_Availability_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_SLA_Availability_descriptor, - new java.lang.String[] { "NumDisjointPaths", "AllActive", "Availability", }); - internal_static_context_Constraint_SLA_Isolation_level_descriptor = - getDescriptor().getMessageTypes().get(72); - internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_SLA_Isolation_level_descriptor, - new java.lang.String[] { "IsolationLevel", }); - internal_static_context_Constraint_Exclusions_descriptor = - getDescriptor().getMessageTypes().get(73); - internal_static_context_Constraint_Exclusions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_Exclusions_descriptor, - new java.lang.String[] { "IsPermanent", "DeviceIds", "EndpointIds", "LinkIds", }); - internal_static_context_Constraint_descriptor = - getDescriptor().getMessageTypes().get(74); - internal_static_context_Constraint_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_Constraint_descriptor, - new java.lang.String[] { "Action", "Custom", "Schedule", "EndpointLocation", "EndpointPriority", "SlaCapacity", "SlaLatency", "SlaAvailability", "SlaIsolation", "Exclusions", "Constraint", }); - internal_static_context_TeraFlowController_descriptor = - getDescriptor().getMessageTypes().get(75); - internal_static_context_TeraFlowController_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_TeraFlowController_descriptor, - new java.lang.String[] { "ContextId", "IpAddress", "Port", }); - internal_static_context_AuthenticationResult_descriptor = - getDescriptor().getMessageTypes().get(76); - internal_static_context_AuthenticationResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_context_AuthenticationResult_descriptor, - new java.lang.String[] { "ContextId", "Authenticated", }); - acl.Acl.getDescriptor(); - kpi_sample_types.KpiSampleTypes.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) + 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" }; + 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[] {}); + internal_static_context_Uuid_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_context_Uuid_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Uuid_descriptor, new java.lang.String[] { "Uuid" }); + internal_static_context_Timestamp_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_context_Timestamp_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Timestamp_descriptor, new java.lang.String[] { "Timestamp" }); + internal_static_context_Event_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_context_Event_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Event_descriptor, new java.lang.String[] { "Timestamp", "EventType" }); + internal_static_context_ContextId_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_context_ContextId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ContextId_descriptor, new java.lang.String[] { "ContextUuid" }); + internal_static_context_Context_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_context_Context_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Context_descriptor, new java.lang.String[] { "ContextId", "Name", "TopologyIds", "ServiceIds", "SliceIds", "Controller" }); + internal_static_context_ContextIdList_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_context_ContextIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ContextIdList_descriptor, new java.lang.String[] { "ContextIds" }); + internal_static_context_ContextList_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_context_ContextList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ContextList_descriptor, new java.lang.String[] { "Contexts" }); + internal_static_context_ContextEvent_descriptor = getDescriptor().getMessageTypes().get(8); + internal_static_context_ContextEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ContextEvent_descriptor, new java.lang.String[] { "Event", "ContextId" }); + internal_static_context_TopologyId_descriptor = getDescriptor().getMessageTypes().get(9); + internal_static_context_TopologyId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyId_descriptor, new java.lang.String[] { "ContextId", "TopologyUuid" }); + internal_static_context_Topology_descriptor = getDescriptor().getMessageTypes().get(10); + internal_static_context_Topology_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Topology_descriptor, new java.lang.String[] { "TopologyId", "Name", "DeviceIds", "LinkIds" }); + internal_static_context_TopologyDetails_descriptor = getDescriptor().getMessageTypes().get(11); + internal_static_context_TopologyDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyDetails_descriptor, new java.lang.String[] { "TopologyId", "Name", "Devices", "Links" }); + internal_static_context_TopologyIdList_descriptor = getDescriptor().getMessageTypes().get(12); + internal_static_context_TopologyIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyIdList_descriptor, new java.lang.String[] { "TopologyIds" }); + internal_static_context_TopologyList_descriptor = getDescriptor().getMessageTypes().get(13); + internal_static_context_TopologyList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyList_descriptor, new java.lang.String[] { "Topologies" }); + internal_static_context_TopologyEvent_descriptor = getDescriptor().getMessageTypes().get(14); + internal_static_context_TopologyEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TopologyEvent_descriptor, new java.lang.String[] { "Event", "TopologyId" }); + internal_static_context_DeviceId_descriptor = getDescriptor().getMessageTypes().get(15); + internal_static_context_DeviceId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_DeviceId_descriptor, new java.lang.String[] { "DeviceUuid" }); + internal_static_context_Device_descriptor = getDescriptor().getMessageTypes().get(16); + internal_static_context_Device_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Device_descriptor, new java.lang.String[] { "DeviceId", "Name", "DeviceType", "DeviceConfig", "DeviceOperationalStatus", "DeviceDrivers", "DeviceEndpoints", "Components", "ControllerId" }); + internal_static_context_Component_descriptor = getDescriptor().getMessageTypes().get(17); + internal_static_context_Component_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Component_descriptor, new java.lang.String[] { "ComponentUuid", "Name", "Type", "Attributes", "Parent" }); + internal_static_context_Component_AttributesEntry_descriptor = internal_static_context_Component_descriptor.getNestedTypes().get(0); + internal_static_context_Component_AttributesEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Component_AttributesEntry_descriptor, new java.lang.String[] { "Key", "Value" }); + internal_static_context_DeviceConfig_descriptor = getDescriptor().getMessageTypes().get(18); + internal_static_context_DeviceConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_DeviceConfig_descriptor, new java.lang.String[] { "ConfigRules" }); + internal_static_context_DeviceIdList_descriptor = getDescriptor().getMessageTypes().get(19); + internal_static_context_DeviceIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_DeviceIdList_descriptor, new java.lang.String[] { "DeviceIds" }); + internal_static_context_DeviceList_descriptor = getDescriptor().getMessageTypes().get(20); + internal_static_context_DeviceList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_DeviceList_descriptor, new java.lang.String[] { "Devices" }); + internal_static_context_DeviceFilter_descriptor = getDescriptor().getMessageTypes().get(21); + internal_static_context_DeviceFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_DeviceFilter_descriptor, new java.lang.String[] { "DeviceIds", "IncludeEndpoints", "IncludeConfigRules", "IncludeComponents" }); + internal_static_context_DeviceEvent_descriptor = getDescriptor().getMessageTypes().get(22); + internal_static_context_DeviceEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_DeviceEvent_descriptor, new java.lang.String[] { "Event", "DeviceId", "DeviceConfig" }); + internal_static_context_LinkId_descriptor = getDescriptor().getMessageTypes().get(23); + internal_static_context_LinkId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkId_descriptor, new java.lang.String[] { "LinkUuid" }); + internal_static_context_LinkAttributes_descriptor = getDescriptor().getMessageTypes().get(24); + internal_static_context_LinkAttributes_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkAttributes_descriptor, new java.lang.String[] { "TotalCapacityGbps", "UsedCapacityGbps" }); + internal_static_context_Link_descriptor = getDescriptor().getMessageTypes().get(25); + internal_static_context_Link_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Link_descriptor, new java.lang.String[] { "LinkId", "Name", "LinkEndpointIds", "Attributes" }); + internal_static_context_LinkIdList_descriptor = getDescriptor().getMessageTypes().get(26); + internal_static_context_LinkIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkIdList_descriptor, new java.lang.String[] { "LinkIds" }); + internal_static_context_LinkList_descriptor = getDescriptor().getMessageTypes().get(27); + internal_static_context_LinkList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkList_descriptor, new java.lang.String[] { "Links" }); + internal_static_context_LinkEvent_descriptor = getDescriptor().getMessageTypes().get(28); + internal_static_context_LinkEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_LinkEvent_descriptor, new java.lang.String[] { "Event", "LinkId" }); + internal_static_context_ServiceId_descriptor = getDescriptor().getMessageTypes().get(29); + internal_static_context_ServiceId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceId_descriptor, new java.lang.String[] { "ContextId", "ServiceUuid" }); + internal_static_context_Service_descriptor = getDescriptor().getMessageTypes().get(30); + internal_static_context_Service_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Service_descriptor, new java.lang.String[] { "ServiceId", "Name", "ServiceType", "ServiceEndpointIds", "ServiceConstraints", "ServiceStatus", "ServiceConfig", "Timestamp" }); + internal_static_context_ServiceStatus_descriptor = getDescriptor().getMessageTypes().get(31); + internal_static_context_ServiceStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceStatus_descriptor, new java.lang.String[] { "ServiceStatus" }); + internal_static_context_ServiceConfig_descriptor = getDescriptor().getMessageTypes().get(32); + internal_static_context_ServiceConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceConfig_descriptor, new java.lang.String[] { "ConfigRules" }); + internal_static_context_ServiceIdList_descriptor = getDescriptor().getMessageTypes().get(33); + internal_static_context_ServiceIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceIdList_descriptor, new java.lang.String[] { "ServiceIds" }); + internal_static_context_ServiceList_descriptor = getDescriptor().getMessageTypes().get(34); + internal_static_context_ServiceList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceList_descriptor, new java.lang.String[] { "Services" }); + internal_static_context_ServiceFilter_descriptor = getDescriptor().getMessageTypes().get(35); + internal_static_context_ServiceFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceFilter_descriptor, new java.lang.String[] { "ServiceIds", "IncludeEndpointIds", "IncludeConstraints", "IncludeConfigRules" }); + internal_static_context_ServiceEvent_descriptor = getDescriptor().getMessageTypes().get(36); + internal_static_context_ServiceEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ServiceEvent_descriptor, new java.lang.String[] { "Event", "ServiceId" }); + internal_static_context_SliceId_descriptor = getDescriptor().getMessageTypes().get(37); + internal_static_context_SliceId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceId_descriptor, new java.lang.String[] { "ContextId", "SliceUuid" }); + internal_static_context_Slice_descriptor = getDescriptor().getMessageTypes().get(38); + internal_static_context_Slice_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Slice_descriptor, new java.lang.String[] { "SliceId", "Name", "SliceEndpointIds", "SliceConstraints", "SliceServiceIds", "SliceSubsliceIds", "SliceStatus", "SliceConfig", "SliceOwner", "Timestamp" }); + internal_static_context_SliceOwner_descriptor = getDescriptor().getMessageTypes().get(39); + internal_static_context_SliceOwner_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceOwner_descriptor, new java.lang.String[] { "OwnerUuid", "OwnerString" }); + internal_static_context_SliceStatus_descriptor = getDescriptor().getMessageTypes().get(40); + internal_static_context_SliceStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceStatus_descriptor, new java.lang.String[] { "SliceStatus" }); + internal_static_context_SliceConfig_descriptor = getDescriptor().getMessageTypes().get(41); + internal_static_context_SliceConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceConfig_descriptor, new java.lang.String[] { "ConfigRules" }); + internal_static_context_SliceIdList_descriptor = getDescriptor().getMessageTypes().get(42); + internal_static_context_SliceIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceIdList_descriptor, new java.lang.String[] { "SliceIds" }); + internal_static_context_SliceList_descriptor = getDescriptor().getMessageTypes().get(43); + internal_static_context_SliceList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceList_descriptor, new java.lang.String[] { "Slices" }); + internal_static_context_SliceFilter_descriptor = getDescriptor().getMessageTypes().get(44); + internal_static_context_SliceFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceFilter_descriptor, new java.lang.String[] { "SliceIds", "IncludeEndpointIds", "IncludeConstraints", "IncludeServiceIds", "IncludeSubsliceIds", "IncludeConfigRules" }); + internal_static_context_SliceEvent_descriptor = getDescriptor().getMessageTypes().get(45); + internal_static_context_SliceEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_SliceEvent_descriptor, new java.lang.String[] { "Event", "SliceId" }); + internal_static_context_ConnectionId_descriptor = getDescriptor().getMessageTypes().get(46); + internal_static_context_ConnectionId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionId_descriptor, new java.lang.String[] { "ConnectionUuid" }); + internal_static_context_ConnectionSettings_L0_descriptor = getDescriptor().getMessageTypes().get(47); + internal_static_context_ConnectionSettings_L0_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionSettings_L0_descriptor, new java.lang.String[] { "LspSymbolicName" }); + internal_static_context_ConnectionSettings_L2_descriptor = getDescriptor().getMessageTypes().get(48); + internal_static_context_ConnectionSettings_L2_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionSettings_L2_descriptor, new java.lang.String[] { "SrcMacAddress", "DstMacAddress", "EtherType", "VlanId", "MplsLabel", "MplsTrafficClass" }); + internal_static_context_ConnectionSettings_L3_descriptor = getDescriptor().getMessageTypes().get(49); + internal_static_context_ConnectionSettings_L3_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionSettings_L3_descriptor, new java.lang.String[] { "SrcIpAddress", "DstIpAddress", "Dscp", "Protocol", "Ttl" }); + internal_static_context_ConnectionSettings_L4_descriptor = getDescriptor().getMessageTypes().get(50); + internal_static_context_ConnectionSettings_L4_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionSettings_L4_descriptor, new java.lang.String[] { "SrcPort", "DstPort", "TcpFlags", "Ttl" }); + internal_static_context_ConnectionSettings_descriptor = getDescriptor().getMessageTypes().get(51); + internal_static_context_ConnectionSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionSettings_descriptor, new java.lang.String[] { "L0", "L2", "L3", "L4" }); + internal_static_context_Connection_descriptor = getDescriptor().getMessageTypes().get(52); + internal_static_context_Connection_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Connection_descriptor, new java.lang.String[] { "ConnectionId", "ServiceId", "PathHopsEndpointIds", "SubServiceIds", "Settings" }); + internal_static_context_ConnectionIdList_descriptor = getDescriptor().getMessageTypes().get(53); + internal_static_context_ConnectionIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionIdList_descriptor, new java.lang.String[] { "ConnectionIds" }); + internal_static_context_ConnectionList_descriptor = getDescriptor().getMessageTypes().get(54); + internal_static_context_ConnectionList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionList_descriptor, new java.lang.String[] { "Connections" }); + internal_static_context_ConnectionEvent_descriptor = getDescriptor().getMessageTypes().get(55); + internal_static_context_ConnectionEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConnectionEvent_descriptor, new java.lang.String[] { "Event", "ConnectionId" }); + internal_static_context_EndPointId_descriptor = getDescriptor().getMessageTypes().get(56); + internal_static_context_EndPointId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPointId_descriptor, new java.lang.String[] { "TopologyId", "DeviceId", "EndpointUuid" }); + internal_static_context_EndPoint_descriptor = getDescriptor().getMessageTypes().get(57); + internal_static_context_EndPoint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPoint_descriptor, new java.lang.String[] { "EndpointId", "Name", "EndpointType", "KpiSampleTypes", "EndpointLocation" }); + internal_static_context_EndPointName_descriptor = getDescriptor().getMessageTypes().get(58); + internal_static_context_EndPointName_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPointName_descriptor, new java.lang.String[] { "EndpointId", "DeviceName", "EndpointName", "EndpointType" }); + internal_static_context_EndPointIdList_descriptor = getDescriptor().getMessageTypes().get(59); + internal_static_context_EndPointIdList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPointIdList_descriptor, new java.lang.String[] { "EndpointIds" }); + internal_static_context_EndPointNameList_descriptor = getDescriptor().getMessageTypes().get(60); + internal_static_context_EndPointNameList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_EndPointNameList_descriptor, new java.lang.String[] { "EndpointNames" }); + internal_static_context_ConfigRule_Custom_descriptor = getDescriptor().getMessageTypes().get(61); + internal_static_context_ConfigRule_Custom_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConfigRule_Custom_descriptor, new java.lang.String[] { "ResourceKey", "ResourceValue" }); + internal_static_context_ConfigRule_ACL_descriptor = getDescriptor().getMessageTypes().get(62); + internal_static_context_ConfigRule_ACL_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConfigRule_ACL_descriptor, new java.lang.String[] { "EndpointId", "RuleSet" }); + internal_static_context_ConfigRule_descriptor = getDescriptor().getMessageTypes().get(63); + internal_static_context_ConfigRule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_ConfigRule_descriptor, new java.lang.String[] { "Action", "Custom", "Acl", "ConfigRule" }); + internal_static_context_Constraint_Custom_descriptor = getDescriptor().getMessageTypes().get(64); + internal_static_context_Constraint_Custom_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_Custom_descriptor, new java.lang.String[] { "ConstraintType", "ConstraintValue" }); + internal_static_context_Constraint_Schedule_descriptor = getDescriptor().getMessageTypes().get(65); + internal_static_context_Constraint_Schedule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_Schedule_descriptor, new java.lang.String[] { "StartTimestamp", "DurationDays" }); + internal_static_context_GPS_Position_descriptor = getDescriptor().getMessageTypes().get(66); + internal_static_context_GPS_Position_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_GPS_Position_descriptor, new java.lang.String[] { "Latitude", "Longitude" }); + internal_static_context_Location_descriptor = getDescriptor().getMessageTypes().get(67); + internal_static_context_Location_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Location_descriptor, new java.lang.String[] { "Region", "GpsPosition", "Location" }); + internal_static_context_Constraint_EndPointLocation_descriptor = getDescriptor().getMessageTypes().get(68); + internal_static_context_Constraint_EndPointLocation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_EndPointLocation_descriptor, new java.lang.String[] { "EndpointId", "Location" }); + internal_static_context_Constraint_EndPointPriority_descriptor = getDescriptor().getMessageTypes().get(69); + internal_static_context_Constraint_EndPointPriority_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_EndPointPriority_descriptor, new java.lang.String[] { "EndpointId", "Priority" }); + internal_static_context_Constraint_SLA_Latency_descriptor = getDescriptor().getMessageTypes().get(70); + internal_static_context_Constraint_SLA_Latency_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_SLA_Latency_descriptor, new java.lang.String[] { "E2ELatencyMs" }); + internal_static_context_Constraint_SLA_Capacity_descriptor = getDescriptor().getMessageTypes().get(71); + internal_static_context_Constraint_SLA_Capacity_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_SLA_Capacity_descriptor, new java.lang.String[] { "CapacityGbps" }); + internal_static_context_Constraint_SLA_Availability_descriptor = getDescriptor().getMessageTypes().get(72); + internal_static_context_Constraint_SLA_Availability_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_SLA_Availability_descriptor, new java.lang.String[] { "NumDisjointPaths", "AllActive", "Availability" }); + internal_static_context_Constraint_SLA_Isolation_level_descriptor = getDescriptor().getMessageTypes().get(73); + internal_static_context_Constraint_SLA_Isolation_level_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_SLA_Isolation_level_descriptor, new java.lang.String[] { "IsolationLevel" }); + internal_static_context_Constraint_Exclusions_descriptor = getDescriptor().getMessageTypes().get(74); + internal_static_context_Constraint_Exclusions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_Exclusions_descriptor, new java.lang.String[] { "IsPermanent", "DeviceIds", "EndpointIds", "LinkIds" }); + internal_static_context_Constraint_descriptor = getDescriptor().getMessageTypes().get(75); + internal_static_context_Constraint_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Constraint_descriptor, new java.lang.String[] { "Action", "Custom", "Schedule", "EndpointLocation", "EndpointPriority", "SlaCapacity", "SlaLatency", "SlaAvailability", "SlaIsolation", "Exclusions", "Constraint" }); + internal_static_context_TeraFlowController_descriptor = getDescriptor().getMessageTypes().get(76); + internal_static_context_TeraFlowController_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_TeraFlowController_descriptor, new java.lang.String[] { "ContextId", "IpAddress", "Port" }); + internal_static_context_AuthenticationResult_descriptor = getDescriptor().getMessageTypes().get(77); + internal_static_context_AuthenticationResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_AuthenticationResult_descriptor, new java.lang.String[] { "ContextId", "Authenticated" }); + internal_static_context_OpticalConfigId_descriptor = getDescriptor().getMessageTypes().get(78); + internal_static_context_OpticalConfigId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfigId_descriptor, new java.lang.String[] { "OpticalconfigUuid" }); + internal_static_context_OpticalConfig_descriptor = getDescriptor().getMessageTypes().get(79); + internal_static_context_OpticalConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfig_descriptor, new java.lang.String[] { "OpticalconfigId", "Config" }); + internal_static_context_OpticalConfigList_descriptor = getDescriptor().getMessageTypes().get(80); + internal_static_context_OpticalConfigList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalConfigList_descriptor, new java.lang.String[] { "Opticalconfigs" }); + internal_static_context_OpticalLinkId_descriptor = getDescriptor().getMessageTypes().get(81); + internal_static_context_OpticalLinkId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkId_descriptor, new java.lang.String[] { "OpticalLinkUuid" }); + internal_static_context_FiberId_descriptor = getDescriptor().getMessageTypes().get(82); + internal_static_context_FiberId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_FiberId_descriptor, new java.lang.String[] { "FiberUuid" }); + internal_static_context_Fiber_descriptor = getDescriptor().getMessageTypes().get(83); + internal_static_context_Fiber_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Fiber_descriptor, new java.lang.String[] { "ID", "SrcPort", "DstPort", "LocalPeerPort", "RemotePeerPort", "CSlots", "LSlots", "SSlots", "Length", "Used", "FiberUuid" }); + internal_static_context_OpticalLinkDetails_descriptor = getDescriptor().getMessageTypes().get(84); + internal_static_context_OpticalLinkDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLinkDetails_descriptor, new java.lang.String[] { "Length", "Source", "Target", "Fibers" }); + internal_static_context_OpticalLink_descriptor = getDescriptor().getMessageTypes().get(85); + internal_static_context_OpticalLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_OpticalLink_descriptor, new java.lang.String[] { "Name", "Details", "OpticalLinkUuid" }); + acl.Acl.getDescriptor(); + kpi_sample_types.KpiSampleTypes.getDescriptor(); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/ztp/target/generated-sources/grpc/context/ContextService.java b/src/ztp/target/generated-sources/grpc/context/ContextService.java index b356bac75e24f5f412c51de5450d284ea340ce12..32544e6beba009b31b06dcd583893933c15eb1fe 100644 --- a/src/ztp/target/generated-sources/grpc/context/ContextService.java +++ b/src/ztp/target/generated-sources/grpc/context/ContextService.java @@ -1,112 +1,122 @@ package context; -import io.quarkus.grpc.runtime.MutinyService; +import io.quarkus.grpc.MutinyService; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: context.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: context.proto") public interface ContextService extends MutinyService { - io.smallrye.mutiny.Uni listContextIds(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni listContexts(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni getContext(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni setContext(context.ContextOuterClass.Context request); - + io.smallrye.mutiny.Uni removeContext(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni listTopologyIds(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni listTopologies(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni getTopology(context.ContextOuterClass.TopologyId request); - + io.smallrye.mutiny.Uni getTopologyDetails(context.ContextOuterClass.TopologyId request); - + io.smallrye.mutiny.Uni setTopology(context.ContextOuterClass.Topology request); - + io.smallrye.mutiny.Uni removeTopology(context.ContextOuterClass.TopologyId request); - + io.smallrye.mutiny.Uni listDeviceIds(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni listDevices(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni getDevice(context.ContextOuterClass.DeviceId request); - + io.smallrye.mutiny.Uni setDevice(context.ContextOuterClass.Device request); - + io.smallrye.mutiny.Uni removeDevice(context.ContextOuterClass.DeviceId request); - + io.smallrye.mutiny.Uni selectDevice(context.ContextOuterClass.DeviceFilter request); - + io.smallrye.mutiny.Uni listEndPointNames(context.ContextOuterClass.EndPointIdList request); - + io.smallrye.mutiny.Uni listLinkIds(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni listLinks(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni getLink(context.ContextOuterClass.LinkId request); - + io.smallrye.mutiny.Uni setLink(context.ContextOuterClass.Link request); - + io.smallrye.mutiny.Uni removeLink(context.ContextOuterClass.LinkId request); - + io.smallrye.mutiny.Uni listServiceIds(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni listServices(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni getService(context.ContextOuterClass.ServiceId request); - + io.smallrye.mutiny.Uni setService(context.ContextOuterClass.Service request); - + io.smallrye.mutiny.Uni unsetService(context.ContextOuterClass.Service request); - + io.smallrye.mutiny.Uni removeService(context.ContextOuterClass.ServiceId request); - + io.smallrye.mutiny.Uni selectService(context.ContextOuterClass.ServiceFilter request); - + io.smallrye.mutiny.Uni listSliceIds(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni listSlices(context.ContextOuterClass.ContextId request); - + io.smallrye.mutiny.Uni getSlice(context.ContextOuterClass.SliceId request); - + io.smallrye.mutiny.Uni setSlice(context.ContextOuterClass.Slice request); - + io.smallrye.mutiny.Uni unsetSlice(context.ContextOuterClass.Slice request); - + io.smallrye.mutiny.Uni removeSlice(context.ContextOuterClass.SliceId request); - + io.smallrye.mutiny.Uni selectSlice(context.ContextOuterClass.SliceFilter request); - + io.smallrye.mutiny.Uni listConnectionIds(context.ContextOuterClass.ServiceId request); - + io.smallrye.mutiny.Uni listConnections(context.ContextOuterClass.ServiceId request); - + io.smallrye.mutiny.Uni getConnection(context.ContextOuterClass.ConnectionId request); - + io.smallrye.mutiny.Uni setConnection(context.ContextOuterClass.Connection request); - + io.smallrye.mutiny.Uni removeConnection(context.ContextOuterClass.ConnectionId request); - - + + /** + *
+     *  ------------------------------ Experimental -----------------------------
+     * 
+ */ + io.smallrye.mutiny.Uni getOpticalConfig(context.ContextOuterClass.Empty request); + + io.smallrye.mutiny.Uni setOpticalConfig(context.ContextOuterClass.OpticalConfig request); + + io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request); + + io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request); + + io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request); + + io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request); + io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Multi getTopologyEvents(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Multi getDeviceEvents(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Multi getLinkEvents(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Multi getServiceEvents(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Multi getSliceEvents(context.ContextOuterClass.Empty request); - - io.smallrye.mutiny.Multi getConnectionEvents(context.ContextOuterClass.Empty request); - - -} \ No newline at end of file + io.smallrye.mutiny.Multi getConnectionEvents(context.ContextOuterClass.Empty request); +} diff --git a/src/ztp/target/generated-sources/grpc/context/ContextServiceBean.java b/src/ztp/target/generated-sources/grpc/context/ContextServiceBean.java index 45a7959c4425a981fcbdaba6b06c22cd2fe769ac..d3c1b628573bf328f51de68a68d21690c2ff7045 100644 --- a/src/ztp/target/generated-sources/grpc/context/ContextServiceBean.java +++ b/src/ztp/target/generated-sources/grpc/context/ContextServiceBean.java @@ -2,417 +2,509 @@ package context; import io.grpc.BindableService; import io.quarkus.grpc.GrpcService; -import io.quarkus.grpc.runtime.MutinyBean; +import io.quarkus.grpc.MutinyBean; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: context.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: context.proto") public class ContextServiceBean extends MutinyContextServiceGrpc.ContextServiceImplBase implements BindableService, MutinyBean { private final ContextService delegate; ContextServiceBean(@GrpcService ContextService delegate) { - this.delegate = delegate; + this.delegate = delegate; } @Override public io.smallrye.mutiny.Uni listContextIds(context.ContextOuterClass.Empty request) { - try { - return delegate.listContextIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listContextIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listContexts(context.ContextOuterClass.Empty request) { - try { - return delegate.listContexts(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listContexts(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getContext(context.ContextOuterClass.ContextId request) { - try { - return delegate.getContext(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getContext(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setContext(context.ContextOuterClass.Context request) { - try { - return delegate.setContext(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setContext(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeContext(context.ContextOuterClass.ContextId request) { - try { - return delegate.removeContext(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeContext(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listTopologyIds(context.ContextOuterClass.ContextId request) { - try { - return delegate.listTopologyIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listTopologyIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listTopologies(context.ContextOuterClass.ContextId request) { - try { - return delegate.listTopologies(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listTopologies(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getTopology(context.ContextOuterClass.TopologyId request) { - try { - return delegate.getTopology(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getTopology(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getTopologyDetails(context.ContextOuterClass.TopologyId request) { - try { - return delegate.getTopologyDetails(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getTopologyDetails(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setTopology(context.ContextOuterClass.Topology request) { - try { - return delegate.setTopology(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setTopology(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeTopology(context.ContextOuterClass.TopologyId request) { - try { - return delegate.removeTopology(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeTopology(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listDeviceIds(context.ContextOuterClass.Empty request) { - try { - return delegate.listDeviceIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listDeviceIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listDevices(context.ContextOuterClass.Empty request) { - try { - return delegate.listDevices(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listDevices(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getDevice(context.ContextOuterClass.DeviceId request) { - try { - return delegate.getDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setDevice(context.ContextOuterClass.Device request) { - try { - return delegate.setDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeDevice(context.ContextOuterClass.DeviceId request) { - try { - return delegate.removeDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni selectDevice(context.ContextOuterClass.DeviceFilter request) { - try { - return delegate.selectDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.selectDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listEndPointNames(context.ContextOuterClass.EndPointIdList request) { - try { - return delegate.listEndPointNames(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listEndPointNames(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listLinkIds(context.ContextOuterClass.Empty request) { - try { - return delegate.listLinkIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listLinkIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listLinks(context.ContextOuterClass.Empty request) { - try { - return delegate.listLinks(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listLinks(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getLink(context.ContextOuterClass.LinkId request) { - try { - return delegate.getLink(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getLink(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setLink(context.ContextOuterClass.Link request) { - try { - return delegate.setLink(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setLink(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeLink(context.ContextOuterClass.LinkId request) { - try { - return delegate.removeLink(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeLink(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listServiceIds(context.ContextOuterClass.ContextId request) { - try { - return delegate.listServiceIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listServiceIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listServices(context.ContextOuterClass.ContextId request) { - try { - return delegate.listServices(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listServices(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getService(context.ContextOuterClass.ServiceId request) { - try { - return delegate.getService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setService(context.ContextOuterClass.Service request) { - try { - return delegate.setService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni unsetService(context.ContextOuterClass.Service request) { - try { - return delegate.unsetService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.unsetService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeService(context.ContextOuterClass.ServiceId request) { - try { - return delegate.removeService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni selectService(context.ContextOuterClass.ServiceFilter request) { - try { - return delegate.selectService(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.selectService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listSliceIds(context.ContextOuterClass.ContextId request) { - try { - return delegate.listSliceIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listSliceIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listSlices(context.ContextOuterClass.ContextId request) { - try { - return delegate.listSlices(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listSlices(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getSlice(context.ContextOuterClass.SliceId request) { - try { - return delegate.getSlice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getSlice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setSlice(context.ContextOuterClass.Slice request) { - try { - return delegate.setSlice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setSlice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni unsetSlice(context.ContextOuterClass.Slice request) { - try { - return delegate.unsetSlice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.unsetSlice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeSlice(context.ContextOuterClass.SliceId request) { - try { - return delegate.removeSlice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeSlice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni selectSlice(context.ContextOuterClass.SliceFilter request) { - try { - return delegate.selectSlice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.selectSlice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listConnectionIds(context.ContextOuterClass.ServiceId request) { - try { - return delegate.listConnectionIds(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listConnectionIds(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni listConnections(context.ContextOuterClass.ServiceId request) { - try { - return delegate.listConnections(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.listConnections(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getConnection(context.ContextOuterClass.ConnectionId request) { - try { - return delegate.getConnection(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getConnection(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setConnection(context.ContextOuterClass.Connection request) { - try { - return delegate.setConnection(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setConnection(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni removeConnection(context.ContextOuterClass.ConnectionId request) { - try { - return delegate.removeConnection(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.removeConnection(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni getOpticalConfig(context.ContextOuterClass.Empty request) { + try { + return delegate.getOpticalConfig(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni setOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + try { + return delegate.setOpticalConfig(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + try { + return delegate.selectOpticalConfig(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { + try { + return delegate.setOpticalLink(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + try { + return delegate.getOpticalLink(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + + @Override + public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { + try { + return delegate.getFiber(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getContextEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getContextEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getTopologyEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getTopologyEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getTopologyEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getDeviceEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getDeviceEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getDeviceEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getLinkEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getLinkEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getLinkEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getServiceEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getServiceEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getServiceEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getSliceEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getSliceEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getSliceEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getConnectionEvents(context.ContextOuterClass.Empty request) { - try { - return delegate.getConnectionEvents(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getConnectionEvents(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } - -} \ No newline at end of file +} diff --git a/src/ztp/target/generated-sources/grpc/context/ContextServiceClient.java b/src/ztp/target/generated-sources/grpc/context/ContextServiceClient.java index 0b0e9f83f74d1ce33ba6d609544dabb590024758..b1773578d3448de901839bf6e70e855ff58ad9e5 100644 --- a/src/ztp/target/generated-sources/grpc/context/ContextServiceClient.java +++ b/src/ztp/target/generated-sources/grpc/context/ContextServiceClient.java @@ -1,227 +1,302 @@ package context; import java.util.function.BiFunction; +import io.quarkus.grpc.MutinyClient; -import io.quarkus.grpc.runtime.MutinyClient; - -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: context.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: context.proto") public class ContextServiceClient implements ContextService, MutinyClient { private final MutinyContextServiceGrpc.MutinyContextServiceStub stub; public ContextServiceClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) { - this.stub = stubConfigurator.apply(name,MutinyContextServiceGrpc.newMutinyStub(channel)); + this.stub = stubConfigurator.apply(name, MutinyContextServiceGrpc.newMutinyStub(channel)); + } + + private ContextServiceClient(MutinyContextServiceGrpc.MutinyContextServiceStub stub) { + this.stub = stub; + } + + public ContextServiceClient newInstanceWithStub(MutinyContextServiceGrpc.MutinyContextServiceStub stub) { + return new ContextServiceClient(stub); } @Override public MutinyContextServiceGrpc.MutinyContextServiceStub getStub() { - return stub; + return stub; } @Override public io.smallrye.mutiny.Uni listContextIds(context.ContextOuterClass.Empty request) { - return stub.listContextIds(request); + return stub.listContextIds(request); } + @Override public io.smallrye.mutiny.Uni listContexts(context.ContextOuterClass.Empty request) { - return stub.listContexts(request); + return stub.listContexts(request); } + @Override public io.smallrye.mutiny.Uni getContext(context.ContextOuterClass.ContextId request) { - return stub.getContext(request); + return stub.getContext(request); } + @Override public io.smallrye.mutiny.Uni setContext(context.ContextOuterClass.Context request) { - return stub.setContext(request); + return stub.setContext(request); } + @Override public io.smallrye.mutiny.Uni removeContext(context.ContextOuterClass.ContextId request) { - return stub.removeContext(request); + return stub.removeContext(request); } + @Override public io.smallrye.mutiny.Uni listTopologyIds(context.ContextOuterClass.ContextId request) { - return stub.listTopologyIds(request); + return stub.listTopologyIds(request); } + @Override public io.smallrye.mutiny.Uni listTopologies(context.ContextOuterClass.ContextId request) { - return stub.listTopologies(request); + return stub.listTopologies(request); } + @Override public io.smallrye.mutiny.Uni getTopology(context.ContextOuterClass.TopologyId request) { - return stub.getTopology(request); + return stub.getTopology(request); } + @Override public io.smallrye.mutiny.Uni getTopologyDetails(context.ContextOuterClass.TopologyId request) { - return stub.getTopologyDetails(request); + return stub.getTopologyDetails(request); } + @Override public io.smallrye.mutiny.Uni setTopology(context.ContextOuterClass.Topology request) { - return stub.setTopology(request); + return stub.setTopology(request); } + @Override public io.smallrye.mutiny.Uni removeTopology(context.ContextOuterClass.TopologyId request) { - return stub.removeTopology(request); + return stub.removeTopology(request); } + @Override public io.smallrye.mutiny.Uni listDeviceIds(context.ContextOuterClass.Empty request) { - return stub.listDeviceIds(request); + return stub.listDeviceIds(request); } + @Override public io.smallrye.mutiny.Uni listDevices(context.ContextOuterClass.Empty request) { - return stub.listDevices(request); + return stub.listDevices(request); } + @Override public io.smallrye.mutiny.Uni getDevice(context.ContextOuterClass.DeviceId request) { - return stub.getDevice(request); + return stub.getDevice(request); } + @Override public io.smallrye.mutiny.Uni setDevice(context.ContextOuterClass.Device request) { - return stub.setDevice(request); + return stub.setDevice(request); } + @Override public io.smallrye.mutiny.Uni removeDevice(context.ContextOuterClass.DeviceId request) { - return stub.removeDevice(request); + return stub.removeDevice(request); } + @Override public io.smallrye.mutiny.Uni selectDevice(context.ContextOuterClass.DeviceFilter request) { - return stub.selectDevice(request); + return stub.selectDevice(request); } + @Override public io.smallrye.mutiny.Uni listEndPointNames(context.ContextOuterClass.EndPointIdList request) { - return stub.listEndPointNames(request); + return stub.listEndPointNames(request); } + @Override public io.smallrye.mutiny.Uni listLinkIds(context.ContextOuterClass.Empty request) { - return stub.listLinkIds(request); + return stub.listLinkIds(request); } + @Override public io.smallrye.mutiny.Uni listLinks(context.ContextOuterClass.Empty request) { - return stub.listLinks(request); + return stub.listLinks(request); } + @Override public io.smallrye.mutiny.Uni getLink(context.ContextOuterClass.LinkId request) { - return stub.getLink(request); + return stub.getLink(request); } + @Override public io.smallrye.mutiny.Uni setLink(context.ContextOuterClass.Link request) { - return stub.setLink(request); + return stub.setLink(request); } + @Override public io.smallrye.mutiny.Uni removeLink(context.ContextOuterClass.LinkId request) { - return stub.removeLink(request); + return stub.removeLink(request); } + @Override public io.smallrye.mutiny.Uni listServiceIds(context.ContextOuterClass.ContextId request) { - return stub.listServiceIds(request); + return stub.listServiceIds(request); } + @Override public io.smallrye.mutiny.Uni listServices(context.ContextOuterClass.ContextId request) { - return stub.listServices(request); + return stub.listServices(request); } + @Override public io.smallrye.mutiny.Uni getService(context.ContextOuterClass.ServiceId request) { - return stub.getService(request); + return stub.getService(request); } + @Override public io.smallrye.mutiny.Uni setService(context.ContextOuterClass.Service request) { - return stub.setService(request); + return stub.setService(request); } + @Override public io.smallrye.mutiny.Uni unsetService(context.ContextOuterClass.Service request) { - return stub.unsetService(request); + return stub.unsetService(request); } + @Override public io.smallrye.mutiny.Uni removeService(context.ContextOuterClass.ServiceId request) { - return stub.removeService(request); + return stub.removeService(request); } + @Override public io.smallrye.mutiny.Uni selectService(context.ContextOuterClass.ServiceFilter request) { - return stub.selectService(request); + return stub.selectService(request); } + @Override public io.smallrye.mutiny.Uni listSliceIds(context.ContextOuterClass.ContextId request) { - return stub.listSliceIds(request); + return stub.listSliceIds(request); } + @Override public io.smallrye.mutiny.Uni listSlices(context.ContextOuterClass.ContextId request) { - return stub.listSlices(request); + return stub.listSlices(request); } + @Override public io.smallrye.mutiny.Uni getSlice(context.ContextOuterClass.SliceId request) { - return stub.getSlice(request); + return stub.getSlice(request); } + @Override public io.smallrye.mutiny.Uni setSlice(context.ContextOuterClass.Slice request) { - return stub.setSlice(request); + return stub.setSlice(request); } + @Override public io.smallrye.mutiny.Uni unsetSlice(context.ContextOuterClass.Slice request) { - return stub.unsetSlice(request); + return stub.unsetSlice(request); } + @Override public io.smallrye.mutiny.Uni removeSlice(context.ContextOuterClass.SliceId request) { - return stub.removeSlice(request); + return stub.removeSlice(request); } + @Override public io.smallrye.mutiny.Uni selectSlice(context.ContextOuterClass.SliceFilter request) { - return stub.selectSlice(request); + return stub.selectSlice(request); } + @Override public io.smallrye.mutiny.Uni listConnectionIds(context.ContextOuterClass.ServiceId request) { - return stub.listConnectionIds(request); + return stub.listConnectionIds(request); } + @Override public io.smallrye.mutiny.Uni listConnections(context.ContextOuterClass.ServiceId request) { - return stub.listConnections(request); + return stub.listConnections(request); } + @Override public io.smallrye.mutiny.Uni getConnection(context.ContextOuterClass.ConnectionId request) { - return stub.getConnection(request); + return stub.getConnection(request); } + @Override public io.smallrye.mutiny.Uni setConnection(context.ContextOuterClass.Connection request) { - return stub.setConnection(request); + return stub.setConnection(request); } + @Override public io.smallrye.mutiny.Uni removeConnection(context.ContextOuterClass.ConnectionId request) { - return stub.removeConnection(request); + return stub.removeConnection(request); + } + + @Override + public io.smallrye.mutiny.Uni getOpticalConfig(context.ContextOuterClass.Empty request) { + return stub.getOpticalConfig(request); + } + + @Override + public io.smallrye.mutiny.Uni setOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return stub.setOpticalConfig(request); + } + + @Override + public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return stub.selectOpticalConfig(request); + } + + @Override + public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { + return stub.setOpticalLink(request); + } + + @Override + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + return stub.getOpticalLink(request); + } + + @Override + public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { + return stub.getFiber(request); } @Override public io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request) { - return stub.getContextEvents(request); + return stub.getContextEvents(request); } @Override public io.smallrye.mutiny.Multi getTopologyEvents(context.ContextOuterClass.Empty request) { - return stub.getTopologyEvents(request); + return stub.getTopologyEvents(request); } @Override public io.smallrye.mutiny.Multi getDeviceEvents(context.ContextOuterClass.Empty request) { - return stub.getDeviceEvents(request); + return stub.getDeviceEvents(request); } @Override public io.smallrye.mutiny.Multi getLinkEvents(context.ContextOuterClass.Empty request) { - return stub.getLinkEvents(request); + return stub.getLinkEvents(request); } @Override public io.smallrye.mutiny.Multi getServiceEvents(context.ContextOuterClass.Empty request) { - return stub.getServiceEvents(request); + return stub.getServiceEvents(request); } @Override public io.smallrye.mutiny.Multi getSliceEvents(context.ContextOuterClass.Empty request) { - return stub.getSliceEvents(request); + return stub.getSliceEvents(request); } @Override public io.smallrye.mutiny.Multi getConnectionEvents(context.ContextOuterClass.Empty request) { - return stub.getConnectionEvents(request); + return stub.getConnectionEvents(request); } - -} \ No newline at end of file +} diff --git a/src/ztp/target/generated-sources/grpc/context/ContextServiceGrpc.java b/src/ztp/target/generated-sources/grpc/context/ContextServiceGrpc.java index 27c73f5424bcf2d6739b5884f4946ced1515398c..a03f7e9491a695b715ef6bcadcf82150bdc3a231 100644 --- a/src/ztp/target/generated-sources/grpc/context/ContextServiceGrpc.java +++ b/src/ztp/target/generated-sources/grpc/context/ContextServiceGrpc.java @@ -4,3775 +4,2577 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@javax.annotation.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.38.1)", comments = "Source: context.proto") public final class ContextServiceGrpc { - private ContextServiceGrpc() {} + private ContextServiceGrpc() { + } - public static final String SERVICE_NAME = "context.ContextService"; + public static final String SERVICE_NAME = "context.ContextService"; - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getListContextIdsMethod; + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getListContextIdsMethod; - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListContextIds", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.ContextIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListContextIdsMethod() { - io.grpc.MethodDescriptor getListContextIdsMethod; - if ((getListContextIdsMethod = ContextServiceGrpc.getListContextIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListContextIds", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.ContextIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListContextIdsMethod() { + io.grpc.MethodDescriptor getListContextIdsMethod; if ((getListContextIdsMethod = ContextServiceGrpc.getListContextIdsMethod) == null) { - ContextServiceGrpc.getListContextIdsMethod = getListContextIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListContextIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListContextIds")) - .build(); - } - } - } - return getListContextIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListContextsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListContexts", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.ContextList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListContextsMethod() { - io.grpc.MethodDescriptor getListContextsMethod; - if ((getListContextsMethod = ContextServiceGrpc.getListContextsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListContextIdsMethod = ContextServiceGrpc.getListContextIdsMethod) == null) { + ContextServiceGrpc.getListContextIdsMethod = getListContextIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListContextIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListContextIds")).build(); + } + } + } + return getListContextIdsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListContextsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListContexts", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.ContextList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListContextsMethod() { + io.grpc.MethodDescriptor getListContextsMethod; if ((getListContextsMethod = ContextServiceGrpc.getListContextsMethod) == null) { - ContextServiceGrpc.getListContextsMethod = getListContextsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListContexts")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListContexts")) - .build(); - } - } - } - return getListContextsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetContextMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetContext", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.Context.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetContextMethod() { - io.grpc.MethodDescriptor getGetContextMethod; - if ((getGetContextMethod = ContextServiceGrpc.getGetContextMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListContextsMethod = ContextServiceGrpc.getListContextsMethod) == null) { + ContextServiceGrpc.getListContextsMethod = getListContextsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListContexts")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListContexts")).build(); + } + } + } + return getListContextsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetContextMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetContext", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.Context.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetContextMethod() { + io.grpc.MethodDescriptor getGetContextMethod; if ((getGetContextMethod = ContextServiceGrpc.getGetContextMethod) == null) { - ContextServiceGrpc.getGetContextMethod = getGetContextMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetContext")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Context.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetContext")) - .build(); - } - } - } - return getGetContextMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetContextMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetContext", - requestType = context.ContextOuterClass.Context.class, - responseType = context.ContextOuterClass.ContextId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetContextMethod() { - io.grpc.MethodDescriptor getSetContextMethod; - if ((getSetContextMethod = ContextServiceGrpc.getSetContextMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetContextMethod = ContextServiceGrpc.getGetContextMethod) == null) { + ContextServiceGrpc.getGetContextMethod = getGetContextMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetContext")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Context.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetContext")).build(); + } + } + } + return getGetContextMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetContextMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetContext", requestType = context.ContextOuterClass.Context.class, responseType = context.ContextOuterClass.ContextId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetContextMethod() { + io.grpc.MethodDescriptor getSetContextMethod; if ((getSetContextMethod = ContextServiceGrpc.getSetContextMethod) == null) { - ContextServiceGrpc.getSetContextMethod = getSetContextMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetContext")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Context.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetContext")) - .build(); - } - } - } - return getSetContextMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveContextMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveContext", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveContextMethod() { - io.grpc.MethodDescriptor getRemoveContextMethod; - if ((getRemoveContextMethod = ContextServiceGrpc.getRemoveContextMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getSetContextMethod = ContextServiceGrpc.getSetContextMethod) == null) { + ContextServiceGrpc.getSetContextMethod = getSetContextMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetContext")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Context.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetContext")).build(); + } + } + } + return getSetContextMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveContextMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveContext", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveContextMethod() { + io.grpc.MethodDescriptor getRemoveContextMethod; if ((getRemoveContextMethod = ContextServiceGrpc.getRemoveContextMethod) == null) { - ContextServiceGrpc.getRemoveContextMethod = getRemoveContextMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveContext")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveContext")) - .build(); - } - } - } - return getRemoveContextMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetContextEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetContextEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.ContextEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetContextEventsMethod() { - io.grpc.MethodDescriptor getGetContextEventsMethod; - if ((getGetContextEventsMethod = ContextServiceGrpc.getGetContextEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getRemoveContextMethod = ContextServiceGrpc.getRemoveContextMethod) == null) { + ContextServiceGrpc.getRemoveContextMethod = getRemoveContextMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveContext")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveContext")).build(); + } + } + } + return getRemoveContextMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetContextEventsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetContextEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.ContextEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetContextEventsMethod() { + io.grpc.MethodDescriptor getGetContextEventsMethod; if ((getGetContextEventsMethod = ContextServiceGrpc.getGetContextEventsMethod) == null) { - ContextServiceGrpc.getGetContextEventsMethod = getGetContextEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetContextEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetContextEvents")) - .build(); - } - } - } - return getGetContextEventsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListTopologyIdsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListTopologyIds", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.TopologyIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListTopologyIdsMethod() { - io.grpc.MethodDescriptor getListTopologyIdsMethod; - if ((getListTopologyIdsMethod = ContextServiceGrpc.getListTopologyIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetContextEventsMethod = ContextServiceGrpc.getGetContextEventsMethod) == null) { + ContextServiceGrpc.getGetContextEventsMethod = getGetContextEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetContextEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetContextEvents")).build(); + } + } + } + return getGetContextEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListTopologyIdsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListTopologyIds", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.TopologyIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListTopologyIdsMethod() { + io.grpc.MethodDescriptor getListTopologyIdsMethod; if ((getListTopologyIdsMethod = ContextServiceGrpc.getListTopologyIdsMethod) == null) { - ContextServiceGrpc.getListTopologyIdsMethod = getListTopologyIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopologyIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListTopologyIds")) - .build(); - } - } - } - return getListTopologyIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListTopologiesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListTopologies", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.TopologyList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListTopologiesMethod() { - io.grpc.MethodDescriptor getListTopologiesMethod; - if ((getListTopologiesMethod = ContextServiceGrpc.getListTopologiesMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListTopologyIdsMethod = ContextServiceGrpc.getListTopologyIdsMethod) == null) { + ContextServiceGrpc.getListTopologyIdsMethod = getListTopologyIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopologyIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListTopologyIds")).build(); + } + } + } + return getListTopologyIdsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListTopologiesMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListTopologies", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.TopologyList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListTopologiesMethod() { + io.grpc.MethodDescriptor getListTopologiesMethod; if ((getListTopologiesMethod = ContextServiceGrpc.getListTopologiesMethod) == null) { - ContextServiceGrpc.getListTopologiesMethod = getListTopologiesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopologies")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListTopologies")) - .build(); - } - } - } - return getListTopologiesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetTopologyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetTopology", - requestType = context.ContextOuterClass.TopologyId.class, - responseType = context.ContextOuterClass.Topology.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetTopologyMethod() { - io.grpc.MethodDescriptor getGetTopologyMethod; - if ((getGetTopologyMethod = ContextServiceGrpc.getGetTopologyMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListTopologiesMethod = ContextServiceGrpc.getListTopologiesMethod) == null) { + ContextServiceGrpc.getListTopologiesMethod = getListTopologiesMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTopologies")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListTopologies")).build(); + } + } + } + return getListTopologiesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTopologyMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetTopology", requestType = context.ContextOuterClass.TopologyId.class, responseType = context.ContextOuterClass.Topology.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTopologyMethod() { + io.grpc.MethodDescriptor getGetTopologyMethod; if ((getGetTopologyMethod = ContextServiceGrpc.getGetTopologyMethod) == null) { - ContextServiceGrpc.getGetTopologyMethod = getGetTopologyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopology")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Topology.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetTopology")) - .build(); - } - } - } - return getGetTopologyMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetTopologyDetailsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetTopologyDetails", - requestType = context.ContextOuterClass.TopologyId.class, - responseType = context.ContextOuterClass.TopologyDetails.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetTopologyDetailsMethod() { - io.grpc.MethodDescriptor getGetTopologyDetailsMethod; - if ((getGetTopologyDetailsMethod = ContextServiceGrpc.getGetTopologyDetailsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetTopologyMethod = ContextServiceGrpc.getGetTopologyMethod) == null) { + ContextServiceGrpc.getGetTopologyMethod = getGetTopologyMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopology")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Topology.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetTopology")).build(); + } + } + } + return getGetTopologyMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTopologyDetailsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetTopologyDetails", requestType = context.ContextOuterClass.TopologyId.class, responseType = context.ContextOuterClass.TopologyDetails.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTopologyDetailsMethod() { + io.grpc.MethodDescriptor getGetTopologyDetailsMethod; if ((getGetTopologyDetailsMethod = ContextServiceGrpc.getGetTopologyDetailsMethod) == null) { - ContextServiceGrpc.getGetTopologyDetailsMethod = getGetTopologyDetailsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopologyDetails")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyDetails.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetTopologyDetails")) - .build(); - } - } - } - return getGetTopologyDetailsMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetTopologyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetTopology", - requestType = context.ContextOuterClass.Topology.class, - responseType = context.ContextOuterClass.TopologyId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetTopologyMethod() { - io.grpc.MethodDescriptor getSetTopologyMethod; - if ((getSetTopologyMethod = ContextServiceGrpc.getSetTopologyMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetTopologyDetailsMethod = ContextServiceGrpc.getGetTopologyDetailsMethod) == null) { + ContextServiceGrpc.getGetTopologyDetailsMethod = getGetTopologyDetailsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopologyDetails")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyDetails.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetTopologyDetails")).build(); + } + } + } + return getGetTopologyDetailsMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetTopologyMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetTopology", requestType = context.ContextOuterClass.Topology.class, responseType = context.ContextOuterClass.TopologyId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetTopologyMethod() { + io.grpc.MethodDescriptor getSetTopologyMethod; if ((getSetTopologyMethod = ContextServiceGrpc.getSetTopologyMethod) == null) { - ContextServiceGrpc.getSetTopologyMethod = getSetTopologyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetTopology")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Topology.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetTopology")) - .build(); - } - } - } - return getSetTopologyMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveTopologyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveTopology", - requestType = context.ContextOuterClass.TopologyId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveTopologyMethod() { - io.grpc.MethodDescriptor getRemoveTopologyMethod; - if ((getRemoveTopologyMethod = ContextServiceGrpc.getRemoveTopologyMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getSetTopologyMethod = ContextServiceGrpc.getSetTopologyMethod) == null) { + ContextServiceGrpc.getSetTopologyMethod = getSetTopologyMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetTopology")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Topology.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetTopology")).build(); + } + } + } + return getSetTopologyMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveTopologyMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveTopology", requestType = context.ContextOuterClass.TopologyId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveTopologyMethod() { + io.grpc.MethodDescriptor getRemoveTopologyMethod; if ((getRemoveTopologyMethod = ContextServiceGrpc.getRemoveTopologyMethod) == null) { - ContextServiceGrpc.getRemoveTopologyMethod = getRemoveTopologyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveTopology")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveTopology")) - .build(); - } - } - } - return getRemoveTopologyMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetTopologyEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetTopologyEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.TopologyEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetTopologyEventsMethod() { - io.grpc.MethodDescriptor getGetTopologyEventsMethod; - if ((getGetTopologyEventsMethod = ContextServiceGrpc.getGetTopologyEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getRemoveTopologyMethod = ContextServiceGrpc.getRemoveTopologyMethod) == null) { + ContextServiceGrpc.getRemoveTopologyMethod = getRemoveTopologyMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveTopology")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveTopology")).build(); + } + } + } + return getRemoveTopologyMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTopologyEventsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetTopologyEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.TopologyEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetTopologyEventsMethod() { + io.grpc.MethodDescriptor getGetTopologyEventsMethod; if ((getGetTopologyEventsMethod = ContextServiceGrpc.getGetTopologyEventsMethod) == null) { - ContextServiceGrpc.getGetTopologyEventsMethod = getGetTopologyEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopologyEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.TopologyEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetTopologyEvents")) - .build(); - } - } - } - return getGetTopologyEventsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListDeviceIdsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListDeviceIds", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.DeviceIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListDeviceIdsMethod() { - io.grpc.MethodDescriptor getListDeviceIdsMethod; - if ((getListDeviceIdsMethod = ContextServiceGrpc.getListDeviceIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetTopologyEventsMethod = ContextServiceGrpc.getGetTopologyEventsMethod) == null) { + ContextServiceGrpc.getGetTopologyEventsMethod = getGetTopologyEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTopologyEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.TopologyEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetTopologyEvents")).build(); + } + } + } + return getGetTopologyEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListDeviceIdsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListDeviceIds", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.DeviceIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListDeviceIdsMethod() { + io.grpc.MethodDescriptor getListDeviceIdsMethod; if ((getListDeviceIdsMethod = ContextServiceGrpc.getListDeviceIdsMethod) == null) { - ContextServiceGrpc.getListDeviceIdsMethod = getListDeviceIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDeviceIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListDeviceIds")) - .build(); - } - } - } - return getListDeviceIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListDevicesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListDevices", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.DeviceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListDevicesMethod() { - io.grpc.MethodDescriptor getListDevicesMethod; - if ((getListDevicesMethod = ContextServiceGrpc.getListDevicesMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListDeviceIdsMethod = ContextServiceGrpc.getListDeviceIdsMethod) == null) { + ContextServiceGrpc.getListDeviceIdsMethod = getListDeviceIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDeviceIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListDeviceIds")).build(); + } + } + } + return getListDeviceIdsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListDevicesMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListDevices", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.DeviceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListDevicesMethod() { + io.grpc.MethodDescriptor getListDevicesMethod; if ((getListDevicesMethod = ContextServiceGrpc.getListDevicesMethod) == null) { - ContextServiceGrpc.getListDevicesMethod = getListDevicesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDevices")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListDevices")) - .build(); - } - } - } - return getListDevicesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetDevice", - requestType = context.ContextOuterClass.DeviceId.class, - responseType = context.ContextOuterClass.Device.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetDeviceMethod() { - io.grpc.MethodDescriptor getGetDeviceMethod; - if ((getGetDeviceMethod = ContextServiceGrpc.getGetDeviceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListDevicesMethod = ContextServiceGrpc.getListDevicesMethod) == null) { + ContextServiceGrpc.getListDevicesMethod = getListDevicesMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDevices")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListDevices")).build(); + } + } + } + return getListDevicesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetDevice", requestType = context.ContextOuterClass.DeviceId.class, responseType = context.ContextOuterClass.Device.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetDeviceMethod() { + io.grpc.MethodDescriptor getGetDeviceMethod; if ((getGetDeviceMethod = ContextServiceGrpc.getGetDeviceMethod) == null) { - ContextServiceGrpc.getGetDeviceMethod = getGetDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Device.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetDevice")) - .build(); - } - } - } - return getGetDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetDevice", - requestType = context.ContextOuterClass.Device.class, - responseType = context.ContextOuterClass.DeviceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetDeviceMethod() { - io.grpc.MethodDescriptor getSetDeviceMethod; - if ((getSetDeviceMethod = ContextServiceGrpc.getSetDeviceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetDeviceMethod = ContextServiceGrpc.getGetDeviceMethod) == null) { + ContextServiceGrpc.getGetDeviceMethod = getGetDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Device.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetDevice")).build(); + } + } + } + return getGetDeviceMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetDevice", requestType = context.ContextOuterClass.Device.class, responseType = context.ContextOuterClass.DeviceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetDeviceMethod() { + io.grpc.MethodDescriptor getSetDeviceMethod; if ((getSetDeviceMethod = ContextServiceGrpc.getSetDeviceMethod) == null) { - ContextServiceGrpc.getSetDeviceMethod = getSetDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Device.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetDevice")) - .build(); - } - } - } - return getSetDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveDevice", - requestType = context.ContextOuterClass.DeviceId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveDeviceMethod() { - io.grpc.MethodDescriptor getRemoveDeviceMethod; - if ((getRemoveDeviceMethod = ContextServiceGrpc.getRemoveDeviceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getSetDeviceMethod = ContextServiceGrpc.getSetDeviceMethod) == null) { + ContextServiceGrpc.getSetDeviceMethod = getSetDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Device.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetDevice")).build(); + } + } + } + return getSetDeviceMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveDevice", requestType = context.ContextOuterClass.DeviceId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveDeviceMethod() { + io.grpc.MethodDescriptor getRemoveDeviceMethod; if ((getRemoveDeviceMethod = ContextServiceGrpc.getRemoveDeviceMethod) == null) { - ContextServiceGrpc.getRemoveDeviceMethod = getRemoveDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveDevice")) - .build(); - } - } - } - return getRemoveDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetDeviceEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetDeviceEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.DeviceEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetDeviceEventsMethod() { - io.grpc.MethodDescriptor getGetDeviceEventsMethod; - if ((getGetDeviceEventsMethod = ContextServiceGrpc.getGetDeviceEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getRemoveDeviceMethod = ContextServiceGrpc.getRemoveDeviceMethod) == null) { + ContextServiceGrpc.getRemoveDeviceMethod = getRemoveDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveDevice")).build(); + } + } + } + return getRemoveDeviceMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetDeviceEventsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetDeviceEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.DeviceEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetDeviceEventsMethod() { + io.grpc.MethodDescriptor getGetDeviceEventsMethod; if ((getGetDeviceEventsMethod = ContextServiceGrpc.getGetDeviceEventsMethod) == null) { - ContextServiceGrpc.getGetDeviceEventsMethod = getGetDeviceEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDeviceEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetDeviceEvents")) - .build(); - } - } - } - return getGetDeviceEventsMethod; - } - - private static volatile io.grpc.MethodDescriptor getSelectDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SelectDevice", - requestType = context.ContextOuterClass.DeviceFilter.class, - responseType = context.ContextOuterClass.DeviceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSelectDeviceMethod() { - io.grpc.MethodDescriptor getSelectDeviceMethod; - if ((getSelectDeviceMethod = ContextServiceGrpc.getSelectDeviceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetDeviceEventsMethod = ContextServiceGrpc.getGetDeviceEventsMethod) == null) { + ContextServiceGrpc.getGetDeviceEventsMethod = getGetDeviceEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDeviceEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetDeviceEvents")).build(); + } + } + } + return getGetDeviceEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor getSelectDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SelectDevice", requestType = context.ContextOuterClass.DeviceFilter.class, responseType = context.ContextOuterClass.DeviceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSelectDeviceMethod() { + io.grpc.MethodDescriptor getSelectDeviceMethod; if ((getSelectDeviceMethod = ContextServiceGrpc.getSelectDeviceMethod) == null) { - ContextServiceGrpc.getSelectDeviceMethod = getSelectDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceFilter.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectDevice")) - .build(); - } - } - } - return getSelectDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getListEndPointNamesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListEndPointNames", - requestType = context.ContextOuterClass.EndPointIdList.class, - responseType = context.ContextOuterClass.EndPointNameList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListEndPointNamesMethod() { - io.grpc.MethodDescriptor getListEndPointNamesMethod; - if ((getListEndPointNamesMethod = ContextServiceGrpc.getListEndPointNamesMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getSelectDeviceMethod = ContextServiceGrpc.getSelectDeviceMethod) == null) { + ContextServiceGrpc.getSelectDeviceMethod = getSelectDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceFilter.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectDevice")).build(); + } + } + } + return getSelectDeviceMethod; + } + + private static volatile io.grpc.MethodDescriptor getListEndPointNamesMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListEndPointNames", requestType = context.ContextOuterClass.EndPointIdList.class, responseType = context.ContextOuterClass.EndPointNameList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListEndPointNamesMethod() { + io.grpc.MethodDescriptor getListEndPointNamesMethod; if ((getListEndPointNamesMethod = ContextServiceGrpc.getListEndPointNamesMethod) == null) { - ContextServiceGrpc.getListEndPointNamesMethod = getListEndPointNamesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEndPointNames")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.EndPointIdList.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.EndPointNameList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListEndPointNames")) - .build(); - } - } - } - return getListEndPointNamesMethod; - } - - private static volatile io.grpc.MethodDescriptor getListLinkIdsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListLinkIds", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.LinkIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListLinkIdsMethod() { - io.grpc.MethodDescriptor getListLinkIdsMethod; - if ((getListLinkIdsMethod = ContextServiceGrpc.getListLinkIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListEndPointNamesMethod = ContextServiceGrpc.getListEndPointNamesMethod) == null) { + ContextServiceGrpc.getListEndPointNamesMethod = getListEndPointNamesMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEndPointNames")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.EndPointIdList.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.EndPointNameList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListEndPointNames")).build(); + } + } + } + return getListEndPointNamesMethod; + } + + private static volatile io.grpc.MethodDescriptor getListLinkIdsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListLinkIds", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.LinkIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListLinkIdsMethod() { + io.grpc.MethodDescriptor getListLinkIdsMethod; if ((getListLinkIdsMethod = ContextServiceGrpc.getListLinkIdsMethod) == null) { - ContextServiceGrpc.getListLinkIdsMethod = getListLinkIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLinkIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.LinkIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListLinkIds")) - .build(); - } - } - } - return getListLinkIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListLinksMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListLinks", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.LinkList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListLinksMethod() { - io.grpc.MethodDescriptor getListLinksMethod; - if ((getListLinksMethod = ContextServiceGrpc.getListLinksMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListLinkIdsMethod = ContextServiceGrpc.getListLinkIdsMethod) == null) { + ContextServiceGrpc.getListLinkIdsMethod = getListLinkIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLinkIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListLinkIds")).build(); + } + } + } + return getListLinkIdsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListLinksMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListLinks", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.LinkList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListLinksMethod() { + io.grpc.MethodDescriptor getListLinksMethod; if ((getListLinksMethod = ContextServiceGrpc.getListLinksMethod) == null) { - ContextServiceGrpc.getListLinksMethod = getListLinksMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLinks")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.LinkList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListLinks")) - .build(); - } - } - } - return getListLinksMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetLinkMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetLink", - requestType = context.ContextOuterClass.LinkId.class, - responseType = context.ContextOuterClass.Link.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetLinkMethod() { - io.grpc.MethodDescriptor getGetLinkMethod; - if ((getGetLinkMethod = ContextServiceGrpc.getGetLinkMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListLinksMethod = ContextServiceGrpc.getListLinksMethod) == null) { + ContextServiceGrpc.getListLinksMethod = getListLinksMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLinks")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListLinks")).build(); + } + } + } + return getListLinksMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetLinkMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetLink", requestType = context.ContextOuterClass.LinkId.class, responseType = context.ContextOuterClass.Link.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetLinkMethod() { + io.grpc.MethodDescriptor getGetLinkMethod; if ((getGetLinkMethod = ContextServiceGrpc.getGetLinkMethod) == null) { - ContextServiceGrpc.getGetLinkMethod = getGetLinkMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLink")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.LinkId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Link.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetLink")) - .build(); - } - } - } - return getGetLinkMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetLinkMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetLink", - requestType = context.ContextOuterClass.Link.class, - responseType = context.ContextOuterClass.LinkId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetLinkMethod() { - io.grpc.MethodDescriptor getSetLinkMethod; - if ((getSetLinkMethod = ContextServiceGrpc.getSetLinkMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetLinkMethod = ContextServiceGrpc.getGetLinkMethod) == null) { + ContextServiceGrpc.getGetLinkMethod = getGetLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Link.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetLink")).build(); + } + } + } + return getGetLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetLinkMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetLink", requestType = context.ContextOuterClass.Link.class, responseType = context.ContextOuterClass.LinkId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetLinkMethod() { + io.grpc.MethodDescriptor getSetLinkMethod; if ((getSetLinkMethod = ContextServiceGrpc.getSetLinkMethod) == null) { - ContextServiceGrpc.getSetLinkMethod = getSetLinkMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetLink")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Link.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.LinkId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetLink")) - .build(); - } - } - } - return getSetLinkMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveLinkMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveLink", - requestType = context.ContextOuterClass.LinkId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveLinkMethod() { - io.grpc.MethodDescriptor getRemoveLinkMethod; - if ((getRemoveLinkMethod = ContextServiceGrpc.getRemoveLinkMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getSetLinkMethod = ContextServiceGrpc.getSetLinkMethod) == null) { + ContextServiceGrpc.getSetLinkMethod = getSetLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Link.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetLink")).build(); + } + } + } + return getSetLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveLinkMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveLink", requestType = context.ContextOuterClass.LinkId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveLinkMethod() { + io.grpc.MethodDescriptor getRemoveLinkMethod; if ((getRemoveLinkMethod = ContextServiceGrpc.getRemoveLinkMethod) == null) { - ContextServiceGrpc.getRemoveLinkMethod = getRemoveLinkMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveLink")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.LinkId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveLink")) - .build(); - } - } - } - return getRemoveLinkMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetLinkEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetLinkEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.LinkEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetLinkEventsMethod() { - io.grpc.MethodDescriptor getGetLinkEventsMethod; - if ((getGetLinkEventsMethod = ContextServiceGrpc.getGetLinkEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getRemoveLinkMethod = ContextServiceGrpc.getRemoveLinkMethod) == null) { + ContextServiceGrpc.getRemoveLinkMethod = getRemoveLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveLink")).build(); + } + } + } + return getRemoveLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetLinkEventsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetLinkEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.LinkEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetLinkEventsMethod() { + io.grpc.MethodDescriptor getGetLinkEventsMethod; if ((getGetLinkEventsMethod = ContextServiceGrpc.getGetLinkEventsMethod) == null) { - ContextServiceGrpc.getGetLinkEventsMethod = getGetLinkEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLinkEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.LinkEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetLinkEvents")) - .build(); - } - } - } - return getGetLinkEventsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListServiceIdsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListServiceIds", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.ServiceIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListServiceIdsMethod() { - io.grpc.MethodDescriptor getListServiceIdsMethod; - if ((getListServiceIdsMethod = ContextServiceGrpc.getListServiceIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetLinkEventsMethod = ContextServiceGrpc.getGetLinkEventsMethod) == null) { + ContextServiceGrpc.getGetLinkEventsMethod = getGetLinkEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLinkEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.LinkEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetLinkEvents")).build(); + } + } + } + return getGetLinkEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListServiceIdsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListServiceIds", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.ServiceIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListServiceIdsMethod() { + io.grpc.MethodDescriptor getListServiceIdsMethod; if ((getListServiceIdsMethod = ContextServiceGrpc.getListServiceIdsMethod) == null) { - ContextServiceGrpc.getListServiceIdsMethod = getListServiceIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServiceIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListServiceIds")) - .build(); - } - } - } - return getListServiceIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListServicesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListServices", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.ServiceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListServicesMethod() { - io.grpc.MethodDescriptor getListServicesMethod; - if ((getListServicesMethod = ContextServiceGrpc.getListServicesMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListServiceIdsMethod = ContextServiceGrpc.getListServiceIdsMethod) == null) { + ContextServiceGrpc.getListServiceIdsMethod = getListServiceIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServiceIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListServiceIds")).build(); + } + } + } + return getListServiceIdsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListServicesMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListServices", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.ServiceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListServicesMethod() { + io.grpc.MethodDescriptor getListServicesMethod; if ((getListServicesMethod = ContextServiceGrpc.getListServicesMethod) == null) { - ContextServiceGrpc.getListServicesMethod = getListServicesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListServices")) - .build(); - } - } - } - return getListServicesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetService", - requestType = context.ContextOuterClass.ServiceId.class, - responseType = context.ContextOuterClass.Service.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetServiceMethod() { - io.grpc.MethodDescriptor getGetServiceMethod; - if ((getGetServiceMethod = ContextServiceGrpc.getGetServiceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getListServicesMethod = ContextServiceGrpc.getListServicesMethod) == null) { + ContextServiceGrpc.getListServicesMethod = getListServicesMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListServices")).build(); + } + } + } + return getListServicesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetService", requestType = context.ContextOuterClass.ServiceId.class, responseType = context.ContextOuterClass.Service.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetServiceMethod() { + io.grpc.MethodDescriptor getGetServiceMethod; if ((getGetServiceMethod = ContextServiceGrpc.getGetServiceMethod) == null) { - ContextServiceGrpc.getGetServiceMethod = getGetServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Service.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetService")) - .build(); - } - } - } - return getGetServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetService", - requestType = context.ContextOuterClass.Service.class, - responseType = context.ContextOuterClass.ServiceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetServiceMethod() { - io.grpc.MethodDescriptor getSetServiceMethod; - if ((getSetServiceMethod = ContextServiceGrpc.getSetServiceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getGetServiceMethod = ContextServiceGrpc.getGetServiceMethod) == null) { + ContextServiceGrpc.getGetServiceMethod = getGetServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Service.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetService")).build(); + } + } + } + return getGetServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetService", requestType = context.ContextOuterClass.Service.class, responseType = context.ContextOuterClass.ServiceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetServiceMethod() { + io.grpc.MethodDescriptor getSetServiceMethod; if ((getSetServiceMethod = ContextServiceGrpc.getSetServiceMethod) == null) { - ContextServiceGrpc.getSetServiceMethod = getSetServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Service.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetService")) - .build(); - } - } - } - return getSetServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getUnsetServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UnsetService", - requestType = context.ContextOuterClass.Service.class, - responseType = context.ContextOuterClass.ServiceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUnsetServiceMethod() { - io.grpc.MethodDescriptor getUnsetServiceMethod; - if ((getUnsetServiceMethod = ContextServiceGrpc.getUnsetServiceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getSetServiceMethod = ContextServiceGrpc.getSetServiceMethod) == null) { + ContextServiceGrpc.getSetServiceMethod = getSetServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Service.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetService")).build(); + } + } + } + return getSetServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getUnsetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "UnsetService", requestType = context.ContextOuterClass.Service.class, responseType = context.ContextOuterClass.ServiceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnsetServiceMethod() { + io.grpc.MethodDescriptor getUnsetServiceMethod; if ((getUnsetServiceMethod = ContextServiceGrpc.getUnsetServiceMethod) == null) { - ContextServiceGrpc.getUnsetServiceMethod = getUnsetServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnsetService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Service.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("UnsetService")) - .build(); - } - } - } - return getUnsetServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveService", - requestType = context.ContextOuterClass.ServiceId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveServiceMethod() { - io.grpc.MethodDescriptor getRemoveServiceMethod; - if ((getRemoveServiceMethod = ContextServiceGrpc.getRemoveServiceMethod) == null) { - synchronized (ContextServiceGrpc.class) { + synchronized (ContextServiceGrpc.class) { + if ((getUnsetServiceMethod = ContextServiceGrpc.getUnsetServiceMethod) == null) { + ContextServiceGrpc.getUnsetServiceMethod = getUnsetServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnsetService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Service.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("UnsetService")).build(); + } + } + } + return getUnsetServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor getRemoveServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveService", requestType = context.ContextOuterClass.ServiceId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveServiceMethod() { + io.grpc.MethodDescriptor getRemoveServiceMethod; if ((getRemoveServiceMethod = ContextServiceGrpc.getRemoveServiceMethod) == null) { - ContextServiceGrpc.getRemoveServiceMethod = getRemoveServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveService")) - .build(); - } - } - } - return getRemoveServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetServiceEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetServiceEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.ServiceEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetServiceEventsMethod() { - io.grpc.MethodDescriptor getGetServiceEventsMethod; - if ((getGetServiceEventsMethod = ContextServiceGrpc.getGetServiceEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getGetServiceEventsMethod = ContextServiceGrpc.getGetServiceEventsMethod) == null) { - ContextServiceGrpc.getGetServiceEventsMethod = getGetServiceEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetServiceEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetServiceEvents")) - .build(); - } - } - } - return getGetServiceEventsMethod; - } - - private static volatile io.grpc.MethodDescriptor getSelectServiceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SelectService", - requestType = context.ContextOuterClass.ServiceFilter.class, - responseType = context.ContextOuterClass.ServiceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSelectServiceMethod() { - io.grpc.MethodDescriptor getSelectServiceMethod; - if ((getSelectServiceMethod = ContextServiceGrpc.getSelectServiceMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getSelectServiceMethod = ContextServiceGrpc.getSelectServiceMethod) == null) { - ContextServiceGrpc.getSelectServiceMethod = getSelectServiceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectService")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceFilter.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectService")) - .build(); - } - } - } - return getSelectServiceMethod; - } - - private static volatile io.grpc.MethodDescriptor getListSliceIdsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListSliceIds", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.SliceIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListSliceIdsMethod() { - io.grpc.MethodDescriptor getListSliceIdsMethod; - if ((getListSliceIdsMethod = ContextServiceGrpc.getListSliceIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getListSliceIdsMethod = ContextServiceGrpc.getListSliceIdsMethod) == null) { - ContextServiceGrpc.getListSliceIdsMethod = getListSliceIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSliceIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListSliceIds")) - .build(); - } - } - } - return getListSliceIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListSlicesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListSlices", - requestType = context.ContextOuterClass.ContextId.class, - responseType = context.ContextOuterClass.SliceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListSlicesMethod() { - io.grpc.MethodDescriptor getListSlicesMethod; - if ((getListSlicesMethod = ContextServiceGrpc.getListSlicesMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getListSlicesMethod = ContextServiceGrpc.getListSlicesMethod) == null) { - ContextServiceGrpc.getListSlicesMethod = getListSlicesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSlices")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ContextId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListSlices")) - .build(); - } - } - } - return getListSlicesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetSliceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSlice", - requestType = context.ContextOuterClass.SliceId.class, - responseType = context.ContextOuterClass.Slice.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetSliceMethod() { - io.grpc.MethodDescriptor getGetSliceMethod; - if ((getGetSliceMethod = ContextServiceGrpc.getGetSliceMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getGetSliceMethod = ContextServiceGrpc.getGetSliceMethod) == null) { - ContextServiceGrpc.getGetSliceMethod = getGetSliceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSlice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Slice.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetSlice")) - .build(); - } - } - } - return getGetSliceMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetSliceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetSlice", - requestType = context.ContextOuterClass.Slice.class, - responseType = context.ContextOuterClass.SliceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetSliceMethod() { - io.grpc.MethodDescriptor getSetSliceMethod; - if ((getSetSliceMethod = ContextServiceGrpc.getSetSliceMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getSetSliceMethod = ContextServiceGrpc.getSetSliceMethod) == null) { - ContextServiceGrpc.getSetSliceMethod = getSetSliceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetSlice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Slice.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetSlice")) - .build(); - } - } - } - return getSetSliceMethod; - } - - private static volatile io.grpc.MethodDescriptor getUnsetSliceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UnsetSlice", - requestType = context.ContextOuterClass.Slice.class, - responseType = context.ContextOuterClass.SliceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUnsetSliceMethod() { - io.grpc.MethodDescriptor getUnsetSliceMethod; - if ((getUnsetSliceMethod = ContextServiceGrpc.getUnsetSliceMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getUnsetSliceMethod = ContextServiceGrpc.getUnsetSliceMethod) == null) { - ContextServiceGrpc.getUnsetSliceMethod = getUnsetSliceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnsetSlice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Slice.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("UnsetSlice")) - .build(); - } - } - } - return getUnsetSliceMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveSliceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveSlice", - requestType = context.ContextOuterClass.SliceId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveSliceMethod() { - io.grpc.MethodDescriptor getRemoveSliceMethod; - if ((getRemoveSliceMethod = ContextServiceGrpc.getRemoveSliceMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getRemoveSliceMethod = ContextServiceGrpc.getRemoveSliceMethod) == null) { - ContextServiceGrpc.getRemoveSliceMethod = getRemoveSliceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveSlice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveSlice")) - .build(); - } - } - } - return getRemoveSliceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetSliceEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSliceEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.SliceEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetSliceEventsMethod() { - io.grpc.MethodDescriptor getGetSliceEventsMethod; - if ((getGetSliceEventsMethod = ContextServiceGrpc.getGetSliceEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getGetSliceEventsMethod = ContextServiceGrpc.getGetSliceEventsMethod) == null) { - ContextServiceGrpc.getGetSliceEventsMethod = getGetSliceEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSliceEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetSliceEvents")) - .build(); - } - } - } - return getGetSliceEventsMethod; - } - - private static volatile io.grpc.MethodDescriptor getSelectSliceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SelectSlice", - requestType = context.ContextOuterClass.SliceFilter.class, - responseType = context.ContextOuterClass.SliceList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSelectSliceMethod() { - io.grpc.MethodDescriptor getSelectSliceMethod; - if ((getSelectSliceMethod = ContextServiceGrpc.getSelectSliceMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getSelectSliceMethod = ContextServiceGrpc.getSelectSliceMethod) == null) { - ContextServiceGrpc.getSelectSliceMethod = getSelectSliceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectSlice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceFilter.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.SliceList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectSlice")) - .build(); - } - } - } - return getSelectSliceMethod; - } - - private static volatile io.grpc.MethodDescriptor getListConnectionIdsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListConnectionIds", - requestType = context.ContextOuterClass.ServiceId.class, - responseType = context.ContextOuterClass.ConnectionIdList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListConnectionIdsMethod() { - io.grpc.MethodDescriptor getListConnectionIdsMethod; - if ((getListConnectionIdsMethod = ContextServiceGrpc.getListConnectionIdsMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getListConnectionIdsMethod = ContextServiceGrpc.getListConnectionIdsMethod) == null) { - ContextServiceGrpc.getListConnectionIdsMethod = getListConnectionIdsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListConnectionIds")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ConnectionIdList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListConnectionIds")) - .build(); - } - } - } - return getListConnectionIdsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListConnectionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListConnections", - requestType = context.ContextOuterClass.ServiceId.class, - responseType = context.ContextOuterClass.ConnectionList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListConnectionsMethod() { - io.grpc.MethodDescriptor getListConnectionsMethod; - if ((getListConnectionsMethod = ContextServiceGrpc.getListConnectionsMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getListConnectionsMethod = ContextServiceGrpc.getListConnectionsMethod) == null) { - ContextServiceGrpc.getListConnectionsMethod = getListConnectionsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListConnections")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ServiceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ConnectionList.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListConnections")) - .build(); - } - } - } - return getListConnectionsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetConnectionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetConnection", - requestType = context.ContextOuterClass.ConnectionId.class, - responseType = context.ContextOuterClass.Connection.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetConnectionMethod() { - io.grpc.MethodDescriptor getGetConnectionMethod; - if ((getGetConnectionMethod = ContextServiceGrpc.getGetConnectionMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getGetConnectionMethod = ContextServiceGrpc.getGetConnectionMethod) == null) { - ContextServiceGrpc.getGetConnectionMethod = getGetConnectionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConnection")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ConnectionId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Connection.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetConnection")) - .build(); - } - } - } - return getGetConnectionMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetConnectionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetConnection", - requestType = context.ContextOuterClass.Connection.class, - responseType = context.ContextOuterClass.ConnectionId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetConnectionMethod() { - io.grpc.MethodDescriptor getSetConnectionMethod; - if ((getSetConnectionMethod = ContextServiceGrpc.getSetConnectionMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getSetConnectionMethod = ContextServiceGrpc.getSetConnectionMethod) == null) { - ContextServiceGrpc.getSetConnectionMethod = getSetConnectionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetConnection")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Connection.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ConnectionId.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetConnection")) - .build(); - } - } - } - return getSetConnectionMethod; - } - - private static volatile io.grpc.MethodDescriptor getRemoveConnectionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RemoveConnection", - requestType = context.ContextOuterClass.ConnectionId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRemoveConnectionMethod() { - io.grpc.MethodDescriptor getRemoveConnectionMethod; - if ((getRemoveConnectionMethod = ContextServiceGrpc.getRemoveConnectionMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getRemoveConnectionMethod = ContextServiceGrpc.getRemoveConnectionMethod) == null) { - ContextServiceGrpc.getRemoveConnectionMethod = getRemoveConnectionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveConnection")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ConnectionId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveConnection")) - .build(); - } - } - } - return getRemoveConnectionMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetConnectionEventsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetConnectionEvents", - requestType = context.ContextOuterClass.Empty.class, - responseType = context.ContextOuterClass.ConnectionEvent.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetConnectionEventsMethod() { - io.grpc.MethodDescriptor getGetConnectionEventsMethod; - if ((getGetConnectionEventsMethod = ContextServiceGrpc.getGetConnectionEventsMethod) == null) { - synchronized (ContextServiceGrpc.class) { - if ((getGetConnectionEventsMethod = ContextServiceGrpc.getGetConnectionEventsMethod) == null) { - ContextServiceGrpc.getGetConnectionEventsMethod = getGetConnectionEventsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConnectionEvents")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.ConnectionEvent.getDefaultInstance())) - .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetConnectionEvents")) - .build(); - } - } - } - return getGetConnectionEventsMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ContextServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ContextServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextServiceStub(channel, callOptions); - } - }; - return ContextServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ContextServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ContextServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextServiceBlockingStub(channel, callOptions); - } - }; - return ContextServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ContextServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ContextServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextServiceFutureStub(channel, callOptions); + synchronized (ContextServiceGrpc.class) { + if ((getRemoveServiceMethod = ContextServiceGrpc.getRemoveServiceMethod) == null) { + ContextServiceGrpc.getRemoveServiceMethod = getRemoveServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveService")).build(); + } + } } - }; - return ContextServiceFutureStub.newStub(factory, channel); - } + return getRemoveServiceMethod; + } - /** - */ - public static abstract class ContextServiceImplBase implements io.grpc.BindableService { + private static volatile io.grpc.MethodDescriptor getGetServiceEventsMethod; - /** - */ - public void listContextIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListContextIdsMethod(), responseObserver); + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetServiceEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.ServiceEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetServiceEventsMethod() { + io.grpc.MethodDescriptor getGetServiceEventsMethod; + if ((getGetServiceEventsMethod = ContextServiceGrpc.getGetServiceEventsMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetServiceEventsMethod = ContextServiceGrpc.getGetServiceEventsMethod) == null) { + ContextServiceGrpc.getGetServiceEventsMethod = getGetServiceEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetServiceEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetServiceEvents")).build(); + } + } + } + return getGetServiceEventsMethod; } - /** - */ - public void listContexts(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListContextsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSelectServiceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SelectService", requestType = context.ContextOuterClass.ServiceFilter.class, responseType = context.ContextOuterClass.ServiceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSelectServiceMethod() { + io.grpc.MethodDescriptor getSelectServiceMethod; + if ((getSelectServiceMethod = ContextServiceGrpc.getSelectServiceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSelectServiceMethod = ContextServiceGrpc.getSelectServiceMethod) == null) { + ContextServiceGrpc.getSelectServiceMethod = getSelectServiceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectService")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceFilter.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectService")).build(); + } + } + } + return getSelectServiceMethod; } - /** - */ - public void getContext(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getListSliceIdsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListSliceIds", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.SliceIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListSliceIdsMethod() { + io.grpc.MethodDescriptor getListSliceIdsMethod; + if ((getListSliceIdsMethod = ContextServiceGrpc.getListSliceIdsMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getListSliceIdsMethod = ContextServiceGrpc.getListSliceIdsMethod) == null) { + ContextServiceGrpc.getListSliceIdsMethod = getListSliceIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSliceIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListSliceIds")).build(); + } + } + } + return getListSliceIdsMethod; } - /** - */ - public void setContext(context.ContextOuterClass.Context request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetContextMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getListSlicesMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListSlices", requestType = context.ContextOuterClass.ContextId.class, responseType = context.ContextOuterClass.SliceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListSlicesMethod() { + io.grpc.MethodDescriptor getListSlicesMethod; + if ((getListSlicesMethod = ContextServiceGrpc.getListSlicesMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getListSlicesMethod = ContextServiceGrpc.getListSlicesMethod) == null) { + ContextServiceGrpc.getListSlicesMethod = getListSlicesMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSlices")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ContextId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListSlices")).build(); + } + } + } + return getListSlicesMethod; } - /** - */ - public void removeContext(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveContextMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetSliceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetSlice", requestType = context.ContextOuterClass.SliceId.class, responseType = context.ContextOuterClass.Slice.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetSliceMethod() { + io.grpc.MethodDescriptor getGetSliceMethod; + if ((getGetSliceMethod = ContextServiceGrpc.getGetSliceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetSliceMethod = ContextServiceGrpc.getGetSliceMethod) == null) { + ContextServiceGrpc.getGetSliceMethod = getGetSliceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSlice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Slice.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetSlice")).build(); + } + } + } + return getGetSliceMethod; } - /** - */ - public void getContextEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextEventsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSetSliceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetSlice", requestType = context.ContextOuterClass.Slice.class, responseType = context.ContextOuterClass.SliceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetSliceMethod() { + io.grpc.MethodDescriptor getSetSliceMethod; + if ((getSetSliceMethod = ContextServiceGrpc.getSetSliceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSetSliceMethod = ContextServiceGrpc.getSetSliceMethod) == null) { + ContextServiceGrpc.getSetSliceMethod = getSetSliceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetSlice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Slice.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetSlice")).build(); + } + } + } + return getSetSliceMethod; } - /** - */ - public void listTopologyIds(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopologyIdsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getUnsetSliceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "UnsetSlice", requestType = context.ContextOuterClass.Slice.class, responseType = context.ContextOuterClass.SliceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnsetSliceMethod() { + io.grpc.MethodDescriptor getUnsetSliceMethod; + if ((getUnsetSliceMethod = ContextServiceGrpc.getUnsetSliceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getUnsetSliceMethod = ContextServiceGrpc.getUnsetSliceMethod) == null) { + ContextServiceGrpc.getUnsetSliceMethod = getUnsetSliceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnsetSlice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Slice.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("UnsetSlice")).build(); + } + } + } + return getUnsetSliceMethod; } - /** - */ - public void listTopologies(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopologiesMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getRemoveSliceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveSlice", requestType = context.ContextOuterClass.SliceId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveSliceMethod() { + io.grpc.MethodDescriptor getRemoveSliceMethod; + if ((getRemoveSliceMethod = ContextServiceGrpc.getRemoveSliceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getRemoveSliceMethod = ContextServiceGrpc.getRemoveSliceMethod) == null) { + ContextServiceGrpc.getRemoveSliceMethod = getRemoveSliceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveSlice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveSlice")).build(); + } + } + } + return getRemoveSliceMethod; } - /** - */ - public void getTopology(context.ContextOuterClass.TopologyId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetSliceEventsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetSliceEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.SliceEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetSliceEventsMethod() { + io.grpc.MethodDescriptor getGetSliceEventsMethod; + if ((getGetSliceEventsMethod = ContextServiceGrpc.getGetSliceEventsMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetSliceEventsMethod = ContextServiceGrpc.getGetSliceEventsMethod) == null) { + ContextServiceGrpc.getGetSliceEventsMethod = getGetSliceEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSliceEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetSliceEvents")).build(); + } + } + } + return getGetSliceEventsMethod; } - /** - */ - public void getTopologyDetails(context.ContextOuterClass.TopologyId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyDetailsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSelectSliceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SelectSlice", requestType = context.ContextOuterClass.SliceFilter.class, responseType = context.ContextOuterClass.SliceList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSelectSliceMethod() { + io.grpc.MethodDescriptor getSelectSliceMethod; + if ((getSelectSliceMethod = ContextServiceGrpc.getSelectSliceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSelectSliceMethod = ContextServiceGrpc.getSelectSliceMethod) == null) { + ContextServiceGrpc.getSelectSliceMethod = getSelectSliceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectSlice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceFilter.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.SliceList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectSlice")).build(); + } + } + } + return getSelectSliceMethod; } - /** - */ - public void setTopology(context.ContextOuterClass.Topology request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetTopologyMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getListConnectionIdsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListConnectionIds", requestType = context.ContextOuterClass.ServiceId.class, responseType = context.ContextOuterClass.ConnectionIdList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListConnectionIdsMethod() { + io.grpc.MethodDescriptor getListConnectionIdsMethod; + if ((getListConnectionIdsMethod = ContextServiceGrpc.getListConnectionIdsMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getListConnectionIdsMethod = ContextServiceGrpc.getListConnectionIdsMethod) == null) { + ContextServiceGrpc.getListConnectionIdsMethod = getListConnectionIdsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListConnectionIds")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ConnectionIdList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListConnectionIds")).build(); + } + } + } + return getListConnectionIdsMethod; } - /** - */ - public void removeTopology(context.ContextOuterClass.TopologyId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveTopologyMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getListConnectionsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ListConnections", requestType = context.ContextOuterClass.ServiceId.class, responseType = context.ContextOuterClass.ConnectionList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListConnectionsMethod() { + io.grpc.MethodDescriptor getListConnectionsMethod; + if ((getListConnectionsMethod = ContextServiceGrpc.getListConnectionsMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getListConnectionsMethod = ContextServiceGrpc.getListConnectionsMethod) == null) { + ContextServiceGrpc.getListConnectionsMethod = getListConnectionsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListConnections")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ServiceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ConnectionList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("ListConnections")).build(); + } + } + } + return getListConnectionsMethod; } - /** - */ - public void getTopologyEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyEventsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetConnectionMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetConnection", requestType = context.ContextOuterClass.ConnectionId.class, responseType = context.ContextOuterClass.Connection.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetConnectionMethod() { + io.grpc.MethodDescriptor getGetConnectionMethod; + if ((getGetConnectionMethod = ContextServiceGrpc.getGetConnectionMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetConnectionMethod = ContextServiceGrpc.getGetConnectionMethod) == null) { + ContextServiceGrpc.getGetConnectionMethod = getGetConnectionMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConnection")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ConnectionId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Connection.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetConnection")).build(); + } + } + } + return getGetConnectionMethod; } - /** - */ - public void listDeviceIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDeviceIdsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSetConnectionMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetConnection", requestType = context.ContextOuterClass.Connection.class, responseType = context.ContextOuterClass.ConnectionId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetConnectionMethod() { + io.grpc.MethodDescriptor getSetConnectionMethod; + if ((getSetConnectionMethod = ContextServiceGrpc.getSetConnectionMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSetConnectionMethod = ContextServiceGrpc.getSetConnectionMethod) == null) { + ContextServiceGrpc.getSetConnectionMethod = getSetConnectionMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetConnection")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Connection.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ConnectionId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetConnection")).build(); + } + } + } + return getSetConnectionMethod; } - /** - */ - public void listDevices(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDevicesMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getRemoveConnectionMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "RemoveConnection", requestType = context.ContextOuterClass.ConnectionId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRemoveConnectionMethod() { + io.grpc.MethodDescriptor getRemoveConnectionMethod; + if ((getRemoveConnectionMethod = ContextServiceGrpc.getRemoveConnectionMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getRemoveConnectionMethod = ContextServiceGrpc.getRemoveConnectionMethod) == null) { + ContextServiceGrpc.getRemoveConnectionMethod = getRemoveConnectionMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveConnection")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ConnectionId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("RemoveConnection")).build(); + } + } + } + return getRemoveConnectionMethod; } - /** - */ - public void getDevice(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeviceMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetConnectionEventsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetConnectionEvents", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.ConnectionEvent.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetConnectionEventsMethod() { + io.grpc.MethodDescriptor getGetConnectionEventsMethod; + if ((getGetConnectionEventsMethod = ContextServiceGrpc.getGetConnectionEventsMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetConnectionEventsMethod = ContextServiceGrpc.getGetConnectionEventsMethod) == null) { + ContextServiceGrpc.getGetConnectionEventsMethod = getGetConnectionEventsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConnectionEvents")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.ConnectionEvent.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetConnectionEvents")).build(); + } + } + } + return getGetConnectionEventsMethod; } - /** - */ - public void setDevice(context.ContextOuterClass.Device request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetDeviceMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetOpticalConfigMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetOpticalConfig", requestType = context.ContextOuterClass.Empty.class, responseType = context.ContextOuterClass.OpticalConfigList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetOpticalConfigMethod() { + io.grpc.MethodDescriptor getGetOpticalConfigMethod; + if ((getGetOpticalConfigMethod = ContextServiceGrpc.getGetOpticalConfigMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetOpticalConfigMethod = ContextServiceGrpc.getGetOpticalConfigMethod) == null) { + ContextServiceGrpc.getGetOpticalConfigMethod = getGetOpticalConfigMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOpticalConfig")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfigList.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetOpticalConfig")).build(); + } + } + } + return getGetOpticalConfigMethod; } - /** - */ - public void removeDevice(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveDeviceMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSetOpticalConfigMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetOpticalConfig", requestType = context.ContextOuterClass.OpticalConfig.class, responseType = context.ContextOuterClass.OpticalConfigId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetOpticalConfigMethod() { + io.grpc.MethodDescriptor getSetOpticalConfigMethod; + if ((getSetOpticalConfigMethod = ContextServiceGrpc.getSetOpticalConfigMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSetOpticalConfigMethod = ContextServiceGrpc.getSetOpticalConfigMethod) == null) { + ContextServiceGrpc.getSetOpticalConfigMethod = getSetOpticalConfigMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetOpticalConfig")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfig.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfigId.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetOpticalConfig")).build(); + } + } + } + return getSetOpticalConfigMethod; } - /** - */ - public void getDeviceEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeviceEventsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSelectOpticalConfigMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SelectOpticalConfig", requestType = context.ContextOuterClass.OpticalConfigId.class, responseType = context.ContextOuterClass.OpticalConfig.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSelectOpticalConfigMethod() { + io.grpc.MethodDescriptor getSelectOpticalConfigMethod; + if ((getSelectOpticalConfigMethod = ContextServiceGrpc.getSelectOpticalConfigMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSelectOpticalConfigMethod = ContextServiceGrpc.getSelectOpticalConfigMethod) == null) { + ContextServiceGrpc.getSelectOpticalConfigMethod = getSelectOpticalConfigMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SelectOpticalConfig")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfigId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalConfig.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SelectOpticalConfig")).build(); + } + } + } + return getSelectOpticalConfigMethod; } - /** - */ - public void selectDevice(context.ContextOuterClass.DeviceFilter request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectDeviceMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getSetOpticalLinkMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetOpticalLink", requestType = context.ContextOuterClass.OpticalLink.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetOpticalLinkMethod() { + io.grpc.MethodDescriptor getSetOpticalLinkMethod; + if ((getSetOpticalLinkMethod = ContextServiceGrpc.getSetOpticalLinkMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getSetOpticalLinkMethod = ContextServiceGrpc.getSetOpticalLinkMethod) == null) { + ContextServiceGrpc.getSetOpticalLinkMethod = getSetOpticalLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetOpticalLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLink.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("SetOpticalLink")).build(); + } + } + } + return getSetOpticalLinkMethod; } - /** - */ - public void listEndPointNames(context.ContextOuterClass.EndPointIdList request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListEndPointNamesMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetOpticalLinkMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetOpticalLink", requestType = context.ContextOuterClass.OpticalLinkId.class, responseType = context.ContextOuterClass.OpticalLink.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetOpticalLinkMethod() { + io.grpc.MethodDescriptor getGetOpticalLinkMethod; + if ((getGetOpticalLinkMethod = ContextServiceGrpc.getGetOpticalLinkMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetOpticalLinkMethod = ContextServiceGrpc.getGetOpticalLinkMethod) == null) { + ContextServiceGrpc.getGetOpticalLinkMethod = getGetOpticalLinkMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOpticalLink")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLinkId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.OpticalLink.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetOpticalLink")).build(); + } + } + } + return getGetOpticalLinkMethod; } - /** - */ - public void listLinkIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinkIdsMethod(), responseObserver); + private static volatile io.grpc.MethodDescriptor getGetFiberMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetFiber", requestType = context.ContextOuterClass.FiberId.class, responseType = context.ContextOuterClass.Fiber.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetFiberMethod() { + io.grpc.MethodDescriptor getGetFiberMethod; + if ((getGetFiberMethod = ContextServiceGrpc.getGetFiberMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getGetFiberMethod = ContextServiceGrpc.getGetFiberMethod) == null) { + ContextServiceGrpc.getGetFiberMethod = getGetFiberMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetFiber")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.FiberId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Fiber.getDefaultInstance())).setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("GetFiber")).build(); + } + } + } + return getGetFiberMethod; } /** + * Creates a new async stub that supports all call types for the service */ - public void listLinks(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinksMethod(), responseObserver); + public static ContextServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ContextServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextServiceStub(channel, callOptions); + } + }; + return ContextServiceStub.newStub(factory, channel); } /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public void getLink(context.ContextOuterClass.LinkId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkMethod(), responseObserver); + public static ContextServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ContextServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextServiceBlockingStub(channel, callOptions); + } + }; + return ContextServiceBlockingStub.newStub(factory, channel); } /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public void setLink(context.ContextOuterClass.Link request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetLinkMethod(), responseObserver); + public static ContextServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ContextServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextServiceFutureStub(channel, callOptions); + } + }; + return ContextServiceFutureStub.newStub(factory, channel); } /** */ - public void removeLink(context.ContextOuterClass.LinkId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveLinkMethod(), responseObserver); - } + public static abstract class ContextServiceImplBase implements io.grpc.BindableService { - /** - */ - public void getLinkEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkEventsMethod(), responseObserver); - } + /** + */ + public void listContextIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListContextIdsMethod(), responseObserver); + } - /** - */ - public void listServiceIds(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServiceIdsMethod(), responseObserver); - } + /** + */ + public void listContexts(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListContextsMethod(), responseObserver); + } - /** - */ - public void listServices(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServicesMethod(), responseObserver); - } + /** + */ + public void getContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextMethod(), responseObserver); + } - /** - */ - public void getService(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); - } + /** + */ + public void setContext(context.ContextOuterClass.Context request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetContextMethod(), responseObserver); + } - /** - */ - public void setService(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetServiceMethod(), responseObserver); - } + /** + */ + public void removeContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveContextMethod(), responseObserver); + } - /** - */ - public void unsetService(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetServiceMethod(), responseObserver); - } + /** + */ + public void getContextEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextEventsMethod(), responseObserver); + } - /** - */ - public void removeService(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveServiceMethod(), responseObserver); - } + /** + */ + public void listTopologyIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopologyIdsMethod(), responseObserver); + } - /** - */ - public void getServiceEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceEventsMethod(), responseObserver); - } + /** + */ + public void listTopologies(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopologiesMethod(), responseObserver); + } - /** - */ - public void selectService(context.ContextOuterClass.ServiceFilter request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectServiceMethod(), responseObserver); - } + /** + */ + public void getTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyMethod(), responseObserver); + } - /** - */ - public void listSliceIds(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSliceIdsMethod(), responseObserver); - } + /** + */ + public void getTopologyDetails(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyDetailsMethod(), responseObserver); + } - /** - */ - public void listSlices(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSlicesMethod(), responseObserver); - } + /** + */ + public void setTopology(context.ContextOuterClass.Topology request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetTopologyMethod(), responseObserver); + } - /** - */ - public void getSlice(context.ContextOuterClass.SliceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSliceMethod(), responseObserver); - } + /** + */ + public void removeTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveTopologyMethod(), responseObserver); + } - /** - */ - public void setSlice(context.ContextOuterClass.Slice request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetSliceMethod(), responseObserver); - } + /** + */ + public void getTopologyEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyEventsMethod(), responseObserver); + } - /** - */ - public void unsetSlice(context.ContextOuterClass.Slice request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetSliceMethod(), responseObserver); - } + /** + */ + public void listDeviceIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDeviceIdsMethod(), responseObserver); + } - /** - */ - public void removeSlice(context.ContextOuterClass.SliceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveSliceMethod(), responseObserver); - } + /** + */ + public void listDevices(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDevicesMethod(), responseObserver); + } - /** - */ - public void getSliceEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSliceEventsMethod(), responseObserver); - } + /** + */ + public void getDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeviceMethod(), responseObserver); + } - /** - */ - public void selectSlice(context.ContextOuterClass.SliceFilter request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectSliceMethod(), responseObserver); - } + /** + */ + public void setDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetDeviceMethod(), responseObserver); + } - /** - */ - public void listConnectionIds(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListConnectionIdsMethod(), responseObserver); - } + /** + */ + public void removeDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveDeviceMethod(), responseObserver); + } - /** - */ - public void listConnections(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListConnectionsMethod(), responseObserver); + /** + */ + public void getDeviceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeviceEventsMethod(), responseObserver); + } + + /** + */ + public void selectDevice(context.ContextOuterClass.DeviceFilter request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectDeviceMethod(), responseObserver); + } + + /** + */ + public void listEndPointNames(context.ContextOuterClass.EndPointIdList request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListEndPointNamesMethod(), responseObserver); + } + + /** + */ + public void listLinkIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinkIdsMethod(), responseObserver); + } + + /** + */ + public void listLinks(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinksMethod(), responseObserver); + } + + /** + */ + public void getLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkMethod(), responseObserver); + } + + /** + */ + public void setLink(context.ContextOuterClass.Link request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetLinkMethod(), responseObserver); + } + + /** + */ + public void removeLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveLinkMethod(), responseObserver); + } + + /** + */ + public void getLinkEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkEventsMethod(), responseObserver); + } + + /** + */ + public void listServiceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServiceIdsMethod(), responseObserver); + } + + /** + */ + public void listServices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServicesMethod(), responseObserver); + } + + /** + */ + public void getService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); + } + + /** + */ + public void setService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetServiceMethod(), responseObserver); + } + + /** + */ + public void unsetService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetServiceMethod(), responseObserver); + } + + /** + */ + public void removeService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveServiceMethod(), responseObserver); + } + + /** + */ + public void getServiceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceEventsMethod(), responseObserver); + } + + /** + */ + public void selectService(context.ContextOuterClass.ServiceFilter request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectServiceMethod(), responseObserver); + } + + /** + */ + public void listSliceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSliceIdsMethod(), responseObserver); + } + + /** + */ + public void listSlices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSlicesMethod(), responseObserver); + } + + /** + */ + public void getSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSliceMethod(), responseObserver); + } + + /** + */ + public void setSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetSliceMethod(), responseObserver); + } + + /** + */ + public void unsetSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetSliceMethod(), responseObserver); + } + + /** + */ + public void removeSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveSliceMethod(), responseObserver); + } + + /** + */ + public void getSliceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSliceEventsMethod(), responseObserver); + } + + /** + */ + public void selectSlice(context.ContextOuterClass.SliceFilter request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectSliceMethod(), responseObserver); + } + + /** + */ + public void listConnectionIds(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListConnectionIdsMethod(), responseObserver); + } + + /** + */ + public void listConnections(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListConnectionsMethod(), responseObserver); + } + + /** + */ + public void getConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectionMethod(), responseObserver); + } + + /** + */ + public void setConnection(context.ContextOuterClass.Connection request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetConnectionMethod(), responseObserver); + } + + /** + */ + public void removeConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveConnectionMethod(), responseObserver); + } + + /** + */ + public void getConnectionEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectionEventsMethod(), responseObserver); + } + + /** + *
+         * ------------------------------ Experimental -----------------------------
+         * 
+ */ + public void getOpticalConfig(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOpticalConfigMethod(), responseObserver); + } + + /** + */ + public void setOpticalConfig(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetOpticalConfigMethod(), responseObserver); + } + + /** + */ + public void selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectOpticalConfigMethod(), responseObserver); + } + + /** + */ + public void setOpticalLink(context.ContextOuterClass.OpticalLink request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetOpticalLinkMethod(), responseObserver); + } + + /** + */ + public void getOpticalLink(context.ContextOuterClass.OpticalLinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOpticalLinkMethod(), responseObserver); + } + + /** + */ + public void getFiber(context.ContextOuterClass.FiberId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFiberMethod(), responseObserver); + } + + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getListContextIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXT_IDS))).addMethod(getListContextsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXTS))).addMethod(getGetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONTEXT))).addMethod(getSetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONTEXT))).addMethod(getRemoveContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONTEXT))).addMethod(getGetContextEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONTEXT_EVENTS))).addMethod(getListTopologyIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGY_IDS))).addMethod(getListTopologiesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGIES))).addMethod(getGetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY))).addMethod(getGetTopologyDetailsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_DETAILS))).addMethod(getSetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_TOPOLOGY))).addMethod(getRemoveTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_TOPOLOGY))).addMethod(getGetTopologyEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_EVENTS))).addMethod(getListDeviceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICE_IDS))).addMethod(getListDevicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICES))).addMethod(getGetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_DEVICE))).addMethod(getSetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_DEVICE))).addMethod(getRemoveDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_DEVICE))).addMethod(getGetDeviceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_DEVICE_EVENTS))).addMethod(getSelectDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_DEVICE))).addMethod(getListEndPointNamesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_END_POINT_NAMES))).addMethod(getListLinkIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINK_IDS))).addMethod(getListLinksMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINKS))).addMethod(getGetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_LINK))).addMethod(getSetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_LINK))).addMethod(getRemoveLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_LINK))).addMethod(getGetLinkEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_LINK_EVENTS))).addMethod(getListServiceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICE_IDS))).addMethod(getListServicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICES))).addMethod(getGetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SERVICE))).addMethod(getSetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SERVICE))).addMethod(getUnsetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SERVICE))).addMethod(getRemoveServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SERVICE))).addMethod(getGetServiceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SERVICE_EVENTS))).addMethod(getSelectServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SERVICE))).addMethod(getListSliceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICE_IDS))).addMethod(getListSlicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICES))).addMethod(getGetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SLICE))).addMethod(getSetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SLICE))).addMethod(getUnsetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SLICE))).addMethod(getRemoveSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SLICE))).addMethod(getGetSliceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SLICE_EVENTS))).addMethod(getSelectSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SLICE))).addMethod(getListConnectionIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTION_IDS))).addMethod(getListConnectionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTIONS))).addMethod(getGetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONNECTION))).addMethod(getSetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONNECTION))).addMethod(getRemoveConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONNECTION))).addMethod(getGetConnectionEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONNECTION_EVENTS))).addMethod(getGetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_CONFIG))).addMethod(getSetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_CONFIG))).addMethod(getSelectOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_OPTICAL_CONFIG))).addMethod(getSetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_LINK))).addMethod(getGetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_LINK))).addMethod(getGetFiberMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_FIBER))).build(); + } } /** */ - public void getConnection(context.ContextOuterClass.ConnectionId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectionMethod(), responseObserver); + public static class ContextServiceStub extends io.grpc.stub.AbstractAsyncStub { + + private ContextServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ContextServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextServiceStub(channel, callOptions); + } + + /** + */ + public void listContextIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListContextIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listContexts(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListContextsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetContextMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setContext(context.ContextOuterClass.Context request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetContextMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveContextMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getContextEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetContextEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listTopologyIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListTopologyIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listTopologies(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListTopologiesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetTopologyMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getTopologyDetails(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetTopologyDetailsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setTopology(context.ContextOuterClass.Topology request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetTopologyMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveTopologyMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getTopologyEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetTopologyEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listDeviceIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListDeviceIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listDevices(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListDevicesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetDeviceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetDeviceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveDeviceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getDeviceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetDeviceEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void selectDevice(context.ContextOuterClass.DeviceFilter request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSelectDeviceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listEndPointNames(context.ContextOuterClass.EndPointIdList request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListEndPointNamesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listLinkIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListLinkIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listLinks(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListLinksMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setLink(context.ContextOuterClass.Link request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getLinkEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetLinkEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listServiceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListServiceIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listServices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListServicesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void unsetService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getUnsetServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getServiceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetServiceEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void selectService(context.ContextOuterClass.ServiceFilter request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSelectServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listSliceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListSliceIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listSlices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListSlicesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetSliceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetSliceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void unsetSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getUnsetSliceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveSliceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getSliceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetSliceEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void selectSlice(context.ContextOuterClass.SliceFilter request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSelectSliceMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listConnectionIds(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListConnectionIdsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listConnections(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getListConnectionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetConnectionMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setConnection(context.ContextOuterClass.Connection request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetConnectionMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void removeConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getRemoveConnectionMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getConnectionEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetConnectionEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+         * ------------------------------ Experimental -----------------------------
+         * 
+ */ + public void getOpticalConfig(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetOpticalConfigMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setOpticalConfig(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetOpticalConfigMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSelectOpticalConfigMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void setOpticalLink(context.ContextOuterClass.OpticalLink request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetOpticalLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getOpticalLink(context.ContextOuterClass.OpticalLinkId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetOpticalLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getFiber(context.ContextOuterClass.FiberId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetFiberMethod(), getCallOptions()), request, responseObserver); + } } /** */ - public void setConnection(context.ContextOuterClass.Connection request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetConnectionMethod(), responseObserver); - } + public static class ContextServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { + + private ContextServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ContextServiceBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextServiceBlockingStub(channel, callOptions); + } + + /** + */ + public context.ContextOuterClass.ContextIdList listContextIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListContextIdsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ContextList listContexts(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListContextsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Context getContext(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetContextMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ContextId setContext(context.ContextOuterClass.Context request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetContextMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty removeContext(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveContextMethod(), getCallOptions(), request); + } + + /** + */ + public java.util.Iterator getContextEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetContextEventsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.TopologyIdList listTopologyIds(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListTopologyIdsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.TopologyList listTopologies(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListTopologiesMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Topology getTopology(context.ContextOuterClass.TopologyId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetTopologyMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.TopologyDetails getTopologyDetails(context.ContextOuterClass.TopologyId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetTopologyDetailsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.TopologyId setTopology(context.ContextOuterClass.Topology request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetTopologyMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty removeTopology(context.ContextOuterClass.TopologyId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveTopologyMethod(), getCallOptions(), request); + } + + /** + */ + public java.util.Iterator getTopologyEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetTopologyEventsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.DeviceIdList listDeviceIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListDeviceIdsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.DeviceList listDevices(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListDevicesMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Device getDevice(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.DeviceId setDevice(context.ContextOuterClass.Device request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty removeDevice(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public java.util.Iterator getDeviceEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetDeviceEventsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.DeviceList selectDevice(context.ContextOuterClass.DeviceFilter request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSelectDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.EndPointNameList listEndPointNames(context.ContextOuterClass.EndPointIdList request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListEndPointNamesMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.LinkIdList listLinkIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListLinkIdsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.LinkList listLinks(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListLinksMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Link getLink(context.ContextOuterClass.LinkId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetLinkMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.LinkId setLink(context.ContextOuterClass.Link request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetLinkMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty removeLink(context.ContextOuterClass.LinkId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveLinkMethod(), getCallOptions(), request); + } + + /** + */ + public java.util.Iterator getLinkEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetLinkEventsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ServiceIdList listServiceIds(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListServiceIdsMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ServiceList listServices(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListServicesMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Service getService(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetServiceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ServiceId setService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetServiceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.ServiceId unsetService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getUnsetServiceMethod(), getCallOptions(), request); + } - /** - */ - public void removeConnection(context.ContextOuterClass.ConnectionId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveConnectionMethod(), responseObserver); - } + /** + */ + public context.ContextOuterClass.Empty removeService(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveServiceMethod(), getCallOptions(), request); + } - /** - */ - public void getConnectionEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectionEventsMethod(), responseObserver); - } - - @java.lang.Override public final 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))) - .build(); - } - } - - /** - */ - public static final class ContextServiceStub extends io.grpc.stub.AbstractAsyncStub { - private ContextServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ContextServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextServiceStub(channel, callOptions); - } + /** + */ + public java.util.Iterator getServiceEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetServiceEventsMethod(), getCallOptions(), request); + } - /** - */ - public void listContextIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListContextIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.ServiceList selectService(context.ContextOuterClass.ServiceFilter request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSelectServiceMethod(), getCallOptions(), request); + } - /** - */ - public void listContexts(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListContextsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.SliceIdList listSliceIds(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListSliceIdsMethod(), getCallOptions(), request); + } - /** - */ - public void getContext(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetContextMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.SliceList listSlices(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListSlicesMethod(), getCallOptions(), request); + } - /** - */ - public void setContext(context.ContextOuterClass.Context request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetContextMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.Slice getSlice(context.ContextOuterClass.SliceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetSliceMethod(), getCallOptions(), request); + } - /** - */ - public void removeContext(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveContextMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.SliceId setSlice(context.ContextOuterClass.Slice request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetSliceMethod(), getCallOptions(), request); + } - /** - */ - public void getContextEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetContextEventsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.SliceId unsetSlice(context.ContextOuterClass.Slice request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getUnsetSliceMethod(), getCallOptions(), request); + } - /** - */ - public void listTopologyIds(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListTopologyIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.Empty removeSlice(context.ContextOuterClass.SliceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveSliceMethod(), getCallOptions(), request); + } - /** - */ - public void listTopologies(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListTopologiesMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public java.util.Iterator getSliceEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetSliceEventsMethod(), getCallOptions(), request); + } - /** - */ - public void getTopology(context.ContextOuterClass.TopologyId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetTopologyMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.SliceList selectSlice(context.ContextOuterClass.SliceFilter request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSelectSliceMethod(), getCallOptions(), request); + } - /** - */ - public void getTopologyDetails(context.ContextOuterClass.TopologyId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetTopologyDetailsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.ConnectionIdList listConnectionIds(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListConnectionIdsMethod(), getCallOptions(), request); + } - /** - */ - public void setTopology(context.ContextOuterClass.Topology request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetTopologyMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.ConnectionList listConnections(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getListConnectionsMethod(), getCallOptions(), request); + } - /** - */ - public void removeTopology(context.ContextOuterClass.TopologyId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveTopologyMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.Connection getConnection(context.ContextOuterClass.ConnectionId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetConnectionMethod(), getCallOptions(), request); + } - /** - */ - public void getTopologyEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetTopologyEventsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.ConnectionId setConnection(context.ContextOuterClass.Connection request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetConnectionMethod(), getCallOptions(), request); + } - /** - */ - public void listDeviceIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListDeviceIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.Empty removeConnection(context.ContextOuterClass.ConnectionId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getRemoveConnectionMethod(), getCallOptions(), request); + } - /** - */ - public void listDevices(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListDevicesMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public java.util.Iterator getConnectionEvents(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetConnectionEventsMethod(), getCallOptions(), request); + } - /** - */ - public void getDevice(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + *
+         * ------------------------------ Experimental -----------------------------
+         * 
+ */ + public context.ContextOuterClass.OpticalConfigList getOpticalConfig(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetOpticalConfigMethod(), getCallOptions(), request); + } - /** - */ - public void setDevice(context.ContextOuterClass.Device request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.OpticalConfigId setOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetOpticalConfigMethod(), getCallOptions(), request); + } - /** - */ - public void removeDevice(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.OpticalConfig selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSelectOpticalConfigMethod(), getCallOptions(), request); + } - /** - */ - public void getDeviceEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetDeviceEventsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.Empty setOpticalLink(context.ContextOuterClass.OpticalLink request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetOpticalLinkMethod(), getCallOptions(), request); + } - /** - */ - public void selectDevice(context.ContextOuterClass.DeviceFilter request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSelectDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public context.ContextOuterClass.OpticalLink getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetOpticalLinkMethod(), getCallOptions(), request); + } - /** - */ - public void listEndPointNames(context.ContextOuterClass.EndPointIdList request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListEndPointNamesMethod(), getCallOptions()), request, responseObserver); + /** + */ + public context.ContextOuterClass.Fiber getFiber(context.ContextOuterClass.FiberId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetFiberMethod(), getCallOptions(), request); + } } /** */ - public void listLinkIds(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListLinkIdsMethod(), getCallOptions()), request, responseObserver); - } + public static class ContextServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - /** - */ - public void listLinks(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListLinksMethod(), getCallOptions()), request, responseObserver); - } + private ContextServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public void getLink(context.ContextOuterClass.LinkId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetLinkMethod(), getCallOptions()), request, responseObserver); - } + @java.lang.Override + protected ContextServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ContextServiceFutureStub(channel, callOptions); + } - /** - */ - public void setLink(context.ContextOuterClass.Link request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetLinkMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listContextIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListContextIdsMethod(), getCallOptions()), request); + } - /** - */ - public void removeLink(context.ContextOuterClass.LinkId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveLinkMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listContexts(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListContextsMethod(), getCallOptions()), request); + } - /** - */ - public void getLinkEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetLinkEventsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getContext(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetContextMethod(), getCallOptions()), request); + } - /** - */ - public void listServiceIds(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListServiceIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setContext(context.ContextOuterClass.Context request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetContextMethod(), getCallOptions()), request); + } - /** - */ - public void listServices(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListServicesMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeContext(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveContextMethod(), getCallOptions()), request); + } - /** - */ - public void getService(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listTopologyIds(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListTopologyIdsMethod(), getCallOptions()), request); + } - /** - */ - public void setService(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listTopologies(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListTopologiesMethod(), getCallOptions()), request); + } - /** - */ - public void unsetService(context.ContextOuterClass.Service request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUnsetServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getTopology(context.ContextOuterClass.TopologyId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetTopologyMethod(), getCallOptions()), request); + } - /** - */ - public void removeService(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getTopologyDetails(context.ContextOuterClass.TopologyId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetTopologyDetailsMethod(), getCallOptions()), request); + } - /** - */ - public void getServiceEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetServiceEventsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setTopology(context.ContextOuterClass.Topology request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetTopologyMethod(), getCallOptions()), request); + } - /** - */ - public void selectService(context.ContextOuterClass.ServiceFilter request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSelectServiceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeTopology(context.ContextOuterClass.TopologyId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveTopologyMethod(), getCallOptions()), request); + } - /** - */ - public void listSliceIds(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListSliceIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listDeviceIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListDeviceIdsMethod(), getCallOptions()), request); + } - /** - */ - public void listSlices(context.ContextOuterClass.ContextId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListSlicesMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listDevices(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListDevicesMethod(), getCallOptions()), request); + } - /** - */ - public void getSlice(context.ContextOuterClass.SliceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSliceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getDevice(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetDeviceMethod(), getCallOptions()), request); + } - /** - */ - public void setSlice(context.ContextOuterClass.Slice request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetSliceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setDevice(context.ContextOuterClass.Device request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetDeviceMethod(), getCallOptions()), request); + } - /** - */ - public void unsetSlice(context.ContextOuterClass.Slice request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUnsetSliceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeDevice(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveDeviceMethod(), getCallOptions()), request); + } - /** - */ - public void removeSlice(context.ContextOuterClass.SliceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveSliceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture selectDevice(context.ContextOuterClass.DeviceFilter request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSelectDeviceMethod(), getCallOptions()), request); + } - /** - */ - public void getSliceEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetSliceEventsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listEndPointNames(context.ContextOuterClass.EndPointIdList request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListEndPointNamesMethod(), getCallOptions()), request); + } - /** - */ - public void selectSlice(context.ContextOuterClass.SliceFilter request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSelectSliceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listLinkIds(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListLinkIdsMethod(), getCallOptions()), request); + } - /** - */ - public void listConnectionIds(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListConnectionIdsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listLinks(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListLinksMethod(), getCallOptions()), request); + } - /** - */ - public void listConnections(context.ContextOuterClass.ServiceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListConnectionsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getLink(context.ContextOuterClass.LinkId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetLinkMethod(), getCallOptions()), request); + } - /** - */ - public void getConnection(context.ContextOuterClass.ConnectionId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetConnectionMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setLink(context.ContextOuterClass.Link request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetLinkMethod(), getCallOptions()), request); + } - /** - */ - public void setConnection(context.ContextOuterClass.Connection request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetConnectionMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeLink(context.ContextOuterClass.LinkId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveLinkMethod(), getCallOptions()), request); + } - /** - */ - public void removeConnection(context.ContextOuterClass.ConnectionId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRemoveConnectionMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listServiceIds(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListServiceIdsMethod(), getCallOptions()), request); + } - /** - */ - public void getConnectionEvents(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetConnectionEventsMethod(), getCallOptions()), request, responseObserver); - } - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listServices(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListServicesMethod(), getCallOptions()), request); + } - /** - */ - public static final class ContextServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ContextServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getService(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); + } - @java.lang.Override - protected ContextServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextServiceBlockingStub(channel, callOptions); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetServiceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.ContextIdList listContextIds(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListContextIdsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture unsetService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getUnsetServiceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.ContextList listContexts(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListContextsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeService(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveServiceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.Context getContext(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetContextMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture selectService(context.ContextOuterClass.ServiceFilter request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSelectServiceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.ContextId setContext(context.ContextOuterClass.Context request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetContextMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listSliceIds(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListSliceIdsMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.Empty removeContext(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveContextMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listSlices(context.ContextOuterClass.ContextId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListSlicesMethod(), getCallOptions()), request); + } - /** - */ - public java.util.Iterator getContextEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetContextEventsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getSlice(context.ContextOuterClass.SliceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetSliceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.TopologyIdList listTopologyIds(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListTopologyIdsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setSlice(context.ContextOuterClass.Slice request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetSliceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.TopologyList listTopologies(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListTopologiesMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture unsetSlice(context.ContextOuterClass.Slice request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getUnsetSliceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.Topology getTopology(context.ContextOuterClass.TopologyId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetTopologyMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeSlice(context.ContextOuterClass.SliceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveSliceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.TopologyDetails getTopologyDetails(context.ContextOuterClass.TopologyId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetTopologyDetailsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture selectSlice(context.ContextOuterClass.SliceFilter request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSelectSliceMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.TopologyId setTopology(context.ContextOuterClass.Topology request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetTopologyMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listConnectionIds(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListConnectionIdsMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.Empty removeTopology(context.ContextOuterClass.TopologyId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveTopologyMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture listConnections(context.ContextOuterClass.ServiceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getListConnectionsMethod(), getCallOptions()), request); + } - /** - */ - public java.util.Iterator getTopologyEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetTopologyEventsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getConnection(context.ContextOuterClass.ConnectionId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetConnectionMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.DeviceIdList listDeviceIds(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListDeviceIdsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setConnection(context.ContextOuterClass.Connection request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetConnectionMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.DeviceList listDevices(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListDevicesMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture removeConnection(context.ContextOuterClass.ConnectionId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getRemoveConnectionMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.Device getDevice(context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetDeviceMethod(), getCallOptions(), request); - } + /** + *
+         * ------------------------------ Experimental -----------------------------
+         * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getOpticalConfig(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetOpticalConfigMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.DeviceId setDevice(context.ContextOuterClass.Device request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetDeviceMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetOpticalConfigMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.Empty removeDevice(context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveDeviceMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSelectOpticalConfigMethod(), getCallOptions()), request); + } - /** - */ - public java.util.Iterator getDeviceEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetDeviceEventsMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setOpticalLink(context.ContextOuterClass.OpticalLink request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetOpticalLinkMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.DeviceList selectDevice(context.ContextOuterClass.DeviceFilter request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSelectDeviceMethod(), getCallOptions(), request); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetOpticalLinkMethod(), getCallOptions()), request); + } - /** - */ - public context.ContextOuterClass.EndPointNameList listEndPointNames(context.ContextOuterClass.EndPointIdList request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListEndPointNamesMethod(), getCallOptions(), request); + /** + */ + public com.google.common.util.concurrent.ListenableFuture getFiber(context.ContextOuterClass.FiberId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetFiberMethod(), getCallOptions()), request); + } } - /** - */ - public context.ContextOuterClass.LinkIdList listLinkIds(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListLinkIdsMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_CONTEXT_IDS = 0; - /** - */ - public context.ContextOuterClass.LinkList listLinks(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListLinksMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_CONTEXTS = 1; - /** - */ - public context.ContextOuterClass.Link getLink(context.ContextOuterClass.LinkId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetLinkMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_CONTEXT = 2; - /** - */ - public context.ContextOuterClass.LinkId setLink(context.ContextOuterClass.Link request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetLinkMethod(), getCallOptions(), request); - } + private static final int METHODID_SET_CONTEXT = 3; - /** - */ - public context.ContextOuterClass.Empty removeLink(context.ContextOuterClass.LinkId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveLinkMethod(), getCallOptions(), request); - } + private static final int METHODID_REMOVE_CONTEXT = 4; - /** - */ - public java.util.Iterator getLinkEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetLinkEventsMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_CONTEXT_EVENTS = 5; - /** - */ - public context.ContextOuterClass.ServiceIdList listServiceIds(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListServiceIdsMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_TOPOLOGY_IDS = 6; - /** - */ - public context.ContextOuterClass.ServiceList listServices(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListServicesMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_TOPOLOGIES = 7; - /** - */ - public context.ContextOuterClass.Service getService(context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetServiceMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_TOPOLOGY = 8; - /** - */ - public context.ContextOuterClass.ServiceId setService(context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetServiceMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_TOPOLOGY_DETAILS = 9; - /** - */ - public context.ContextOuterClass.ServiceId unsetService(context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUnsetServiceMethod(), getCallOptions(), request); - } + private static final int METHODID_SET_TOPOLOGY = 10; - /** - */ - public context.ContextOuterClass.Empty removeService(context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveServiceMethod(), getCallOptions(), request); - } + private static final int METHODID_REMOVE_TOPOLOGY = 11; - /** - */ - public java.util.Iterator getServiceEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetServiceEventsMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_TOPOLOGY_EVENTS = 12; - /** - */ - public context.ContextOuterClass.ServiceList selectService(context.ContextOuterClass.ServiceFilter request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSelectServiceMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_DEVICE_IDS = 13; - /** - */ - public context.ContextOuterClass.SliceIdList listSliceIds(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListSliceIdsMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_DEVICES = 14; - /** - */ - public context.ContextOuterClass.SliceList listSlices(context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListSlicesMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_DEVICE = 15; - /** - */ - public context.ContextOuterClass.Slice getSlice(context.ContextOuterClass.SliceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSliceMethod(), getCallOptions(), request); - } + private static final int METHODID_SET_DEVICE = 16; - /** - */ - public context.ContextOuterClass.SliceId setSlice(context.ContextOuterClass.Slice request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetSliceMethod(), getCallOptions(), request); - } + private static final int METHODID_REMOVE_DEVICE = 17; - /** - */ - public context.ContextOuterClass.SliceId unsetSlice(context.ContextOuterClass.Slice request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUnsetSliceMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_DEVICE_EVENTS = 18; - /** - */ - public context.ContextOuterClass.Empty removeSlice(context.ContextOuterClass.SliceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveSliceMethod(), getCallOptions(), request); - } + private static final int METHODID_SELECT_DEVICE = 19; - /** - */ - public java.util.Iterator getSliceEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetSliceEventsMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_END_POINT_NAMES = 20; - /** - */ - public context.ContextOuterClass.SliceList selectSlice(context.ContextOuterClass.SliceFilter request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSelectSliceMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_LINK_IDS = 21; - /** - */ - public context.ContextOuterClass.ConnectionIdList listConnectionIds(context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListConnectionIdsMethod(), getCallOptions(), request); - } + private static final int METHODID_LIST_LINKS = 22; - /** - */ - public context.ContextOuterClass.ConnectionList listConnections(context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListConnectionsMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_LINK = 23; - /** - */ - public context.ContextOuterClass.Connection getConnection(context.ContextOuterClass.ConnectionId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetConnectionMethod(), getCallOptions(), request); - } + private static final int METHODID_SET_LINK = 24; - /** - */ - public context.ContextOuterClass.ConnectionId setConnection(context.ContextOuterClass.Connection request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetConnectionMethod(), getCallOptions(), request); - } + private static final int METHODID_REMOVE_LINK = 25; - /** - */ - public context.ContextOuterClass.Empty removeConnection(context.ContextOuterClass.ConnectionId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRemoveConnectionMethod(), getCallOptions(), request); - } + private static final int METHODID_GET_LINK_EVENTS = 26; - /** - */ - public java.util.Iterator getConnectionEvents( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetConnectionEventsMethod(), getCallOptions(), request); - } - } + private static final int METHODID_LIST_SERVICE_IDS = 27; - /** - */ - public static final class ContextServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private ContextServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + private static final int METHODID_LIST_SERVICES = 28; - @java.lang.Override - protected ContextServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ContextServiceFutureStub(channel, callOptions); - } + private static final int METHODID_GET_SERVICE = 29; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listContextIds( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListContextIdsMethod(), getCallOptions()), request); - } + private static final int METHODID_SET_SERVICE = 30; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listContexts( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListContextsMethod(), getCallOptions()), request); - } + private static final int METHODID_UNSET_SERVICE = 31; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getContext( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetContextMethod(), getCallOptions()), request); - } + private static final int METHODID_REMOVE_SERVICE = 32; - /** - */ - public com.google.common.util.concurrent.ListenableFuture setContext( - context.ContextOuterClass.Context request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetContextMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_SERVICE_EVENTS = 33; - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeContext( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveContextMethod(), getCallOptions()), request); - } + private static final int METHODID_SELECT_SERVICE = 34; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listTopologyIds( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListTopologyIdsMethod(), getCallOptions()), request); - } + private static final int METHODID_LIST_SLICE_IDS = 35; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listTopologies( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListTopologiesMethod(), getCallOptions()), request); - } + private static final int METHODID_LIST_SLICES = 36; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getTopology( - context.ContextOuterClass.TopologyId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetTopologyMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_SLICE = 37; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getTopologyDetails( - context.ContextOuterClass.TopologyId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetTopologyDetailsMethod(), getCallOptions()), request); - } + private static final int METHODID_SET_SLICE = 38; - /** - */ - public com.google.common.util.concurrent.ListenableFuture setTopology( - context.ContextOuterClass.Topology request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetTopologyMethod(), getCallOptions()), request); - } + private static final int METHODID_UNSET_SLICE = 39; - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeTopology( - context.ContextOuterClass.TopologyId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveTopologyMethod(), getCallOptions()), request); - } + private static final int METHODID_REMOVE_SLICE = 40; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listDeviceIds( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListDeviceIdsMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_SLICE_EVENTS = 41; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listDevices( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListDevicesMethod(), getCallOptions()), request); - } + private static final int METHODID_SELECT_SLICE = 42; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getDevice( - context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetDeviceMethod(), getCallOptions()), request); - } + private static final int METHODID_LIST_CONNECTION_IDS = 43; - /** - */ - public com.google.common.util.concurrent.ListenableFuture setDevice( - context.ContextOuterClass.Device request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetDeviceMethod(), getCallOptions()), request); - } + private static final int METHODID_LIST_CONNECTIONS = 44; - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeDevice( - context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveDeviceMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_CONNECTION = 45; - /** - */ - public com.google.common.util.concurrent.ListenableFuture selectDevice( - context.ContextOuterClass.DeviceFilter request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSelectDeviceMethod(), getCallOptions()), request); - } + private static final int METHODID_SET_CONNECTION = 46; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listEndPointNames( - context.ContextOuterClass.EndPointIdList request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListEndPointNamesMethod(), getCallOptions()), request); - } + private static final int METHODID_REMOVE_CONNECTION = 47; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listLinkIds( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListLinkIdsMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_CONNECTION_EVENTS = 48; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listLinks( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListLinksMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_OPTICAL_CONFIG = 49; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getLink( - context.ContextOuterClass.LinkId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetLinkMethod(), getCallOptions()), request); - } + private static final int METHODID_SET_OPTICAL_CONFIG = 50; - /** - */ - public com.google.common.util.concurrent.ListenableFuture setLink( - context.ContextOuterClass.Link request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetLinkMethod(), getCallOptions()), request); - } + private static final int METHODID_SELECT_OPTICAL_CONFIG = 51; - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeLink( - context.ContextOuterClass.LinkId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveLinkMethod(), getCallOptions()), request); - } + private static final int METHODID_SET_OPTICAL_LINK = 52; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listServiceIds( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListServiceIdsMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_OPTICAL_LINK = 53; - /** - */ - public com.google.common.util.concurrent.ListenableFuture listServices( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListServicesMethod(), getCallOptions()), request); - } + private static final int METHODID_GET_FIBER = 54; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getService( - context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); - } + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - /** - */ - public com.google.common.util.concurrent.ListenableFuture setService( - context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetServiceMethod(), getCallOptions()), request); - } + private final ContextServiceImplBase serviceImpl; - /** - */ - public com.google.common.util.concurrent.ListenableFuture unsetService( - context.ContextOuterClass.Service request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUnsetServiceMethod(), getCallOptions()), request); - } + private final int methodId; - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeService( - context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveServiceMethod(), getCallOptions()), request); - } + MethodHandlers(ContextServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture selectService( - context.ContextOuterClass.ServiceFilter request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSelectServiceMethod(), getCallOptions()), request); - } + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + case METHODID_LIST_CONTEXT_IDS: + serviceImpl.listContextIds((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CONTEXTS: + serviceImpl.listContexts((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CONTEXT: + serviceImpl.getContext((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_CONTEXT: + serviceImpl.setContext((context.ContextOuterClass.Context) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_CONTEXT: + serviceImpl.removeContext((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CONTEXT_EVENTS: + serviceImpl.getContextEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TOPOLOGY_IDS: + serviceImpl.listTopologyIds((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TOPOLOGIES: + serviceImpl.listTopologies((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TOPOLOGY: + serviceImpl.getTopology((context.ContextOuterClass.TopologyId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TOPOLOGY_DETAILS: + serviceImpl.getTopologyDetails((context.ContextOuterClass.TopologyId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_TOPOLOGY: + serviceImpl.setTopology((context.ContextOuterClass.Topology) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_TOPOLOGY: + serviceImpl.removeTopology((context.ContextOuterClass.TopologyId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TOPOLOGY_EVENTS: + serviceImpl.getTopologyEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DEVICE_IDS: + serviceImpl.listDeviceIds((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DEVICES: + serviceImpl.listDevices((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DEVICE: + serviceImpl.getDevice((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_DEVICE: + serviceImpl.setDevice((context.ContextOuterClass.Device) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_DEVICE: + serviceImpl.removeDevice((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DEVICE_EVENTS: + serviceImpl.getDeviceEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SELECT_DEVICE: + serviceImpl.selectDevice((context.ContextOuterClass.DeviceFilter) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_END_POINT_NAMES: + serviceImpl.listEndPointNames((context.ContextOuterClass.EndPointIdList) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_LINK_IDS: + serviceImpl.listLinkIds((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_LINKS: + serviceImpl.listLinks((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_LINK: + serviceImpl.getLink((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_LINK: + serviceImpl.setLink((context.ContextOuterClass.Link) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_LINK: + serviceImpl.removeLink((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_LINK_EVENTS: + serviceImpl.getLinkEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SERVICE_IDS: + serviceImpl.listServiceIds((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SERVICES: + serviceImpl.listServices((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SERVICE: + serviceImpl.getService((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_SERVICE: + serviceImpl.setService((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNSET_SERVICE: + serviceImpl.unsetService((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_SERVICE: + serviceImpl.removeService((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SERVICE_EVENTS: + serviceImpl.getServiceEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SELECT_SERVICE: + serviceImpl.selectService((context.ContextOuterClass.ServiceFilter) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SLICE_IDS: + serviceImpl.listSliceIds((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SLICES: + serviceImpl.listSlices((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SLICE: + serviceImpl.getSlice((context.ContextOuterClass.SliceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_SLICE: + serviceImpl.setSlice((context.ContextOuterClass.Slice) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNSET_SLICE: + serviceImpl.unsetSlice((context.ContextOuterClass.Slice) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_SLICE: + serviceImpl.removeSlice((context.ContextOuterClass.SliceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SLICE_EVENTS: + serviceImpl.getSliceEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SELECT_SLICE: + serviceImpl.selectSlice((context.ContextOuterClass.SliceFilter) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CONNECTION_IDS: + serviceImpl.listConnectionIds((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CONNECTIONS: + serviceImpl.listConnections((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CONNECTION: + serviceImpl.getConnection((context.ContextOuterClass.ConnectionId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_CONNECTION: + serviceImpl.setConnection((context.ContextOuterClass.Connection) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_CONNECTION: + serviceImpl.removeConnection((context.ContextOuterClass.ConnectionId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CONNECTION_EVENTS: + serviceImpl.getConnectionEvents((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_OPTICAL_CONFIG: + serviceImpl.getOpticalConfig((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_OPTICAL_CONFIG: + serviceImpl.setOpticalConfig((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SELECT_OPTICAL_CONFIG: + serviceImpl.selectOpticalConfig((context.ContextOuterClass.OpticalConfigId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_OPTICAL_LINK: + serviceImpl.setOpticalLink((context.ContextOuterClass.OpticalLink) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_OPTICAL_LINK: + serviceImpl.getOpticalLink((context.ContextOuterClass.OpticalLinkId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_FIBER: + serviceImpl.getFiber((context.ContextOuterClass.FiberId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture listSliceIds( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListSliceIdsMethod(), getCallOptions()), request); + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + default: + throw new AssertionError(); + } + } } - /** - */ - public com.google.common.util.concurrent.ListenableFuture listSlices( - context.ContextOuterClass.ContextId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListSlicesMethod(), getCallOptions()), request); - } + private static abstract class ContextServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - /** - */ - public com.google.common.util.concurrent.ListenableFuture getSlice( - context.ContextOuterClass.SliceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSliceMethod(), getCallOptions()), request); - } + ContextServiceBaseDescriptorSupplier() { + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture setSlice( - context.ContextOuterClass.Slice request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetSliceMethod(), getCallOptions()), request); - } + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return context.ContextOuterClass.getDescriptor(); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture unsetSlice( - context.ContextOuterClass.Slice request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUnsetSliceMethod(), getCallOptions()), request); + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ContextService"); + } } - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeSlice( - context.ContextOuterClass.SliceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveSliceMethod(), getCallOptions()), request); - } + private static final class ContextServiceFileDescriptorSupplier extends ContextServiceBaseDescriptorSupplier { - /** - */ - public com.google.common.util.concurrent.ListenableFuture selectSlice( - context.ContextOuterClass.SliceFilter request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSelectSliceMethod(), getCallOptions()), request); + ContextServiceFileDescriptorSupplier() { + } } - /** - */ - public com.google.common.util.concurrent.ListenableFuture listConnectionIds( - context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListConnectionIdsMethod(), getCallOptions()), request); - } + private static final class ContextServiceMethodDescriptorSupplier extends ContextServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - /** - */ - public com.google.common.util.concurrent.ListenableFuture listConnections( - context.ContextOuterClass.ServiceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListConnectionsMethod(), getCallOptions()), request); - } + private final String methodName; - /** - */ - public com.google.common.util.concurrent.ListenableFuture getConnection( - context.ContextOuterClass.ConnectionId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetConnectionMethod(), getCallOptions()), request); - } + ContextServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture setConnection( - context.ContextOuterClass.Connection request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetConnectionMethod(), getCallOptions()), request); + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } } - /** - */ - public com.google.common.util.concurrent.ListenableFuture removeConnection( - context.ContextOuterClass.ConnectionId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRemoveConnectionMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_CONTEXT_IDS = 0; - private static final int METHODID_LIST_CONTEXTS = 1; - private static final int METHODID_GET_CONTEXT = 2; - private static final int METHODID_SET_CONTEXT = 3; - private static final int METHODID_REMOVE_CONTEXT = 4; - private static final int METHODID_GET_CONTEXT_EVENTS = 5; - private static final int METHODID_LIST_TOPOLOGY_IDS = 6; - private static final int METHODID_LIST_TOPOLOGIES = 7; - private static final int METHODID_GET_TOPOLOGY = 8; - private static final int METHODID_GET_TOPOLOGY_DETAILS = 9; - private static final int METHODID_SET_TOPOLOGY = 10; - private static final int METHODID_REMOVE_TOPOLOGY = 11; - private static final int METHODID_GET_TOPOLOGY_EVENTS = 12; - private static final int METHODID_LIST_DEVICE_IDS = 13; - private static final int METHODID_LIST_DEVICES = 14; - private static final int METHODID_GET_DEVICE = 15; - private static final int METHODID_SET_DEVICE = 16; - private static final int METHODID_REMOVE_DEVICE = 17; - private static final int METHODID_GET_DEVICE_EVENTS = 18; - private static final int METHODID_SELECT_DEVICE = 19; - private static final int METHODID_LIST_END_POINT_NAMES = 20; - private static final int METHODID_LIST_LINK_IDS = 21; - private static final int METHODID_LIST_LINKS = 22; - private static final int METHODID_GET_LINK = 23; - private static final int METHODID_SET_LINK = 24; - private static final int METHODID_REMOVE_LINK = 25; - private static final int METHODID_GET_LINK_EVENTS = 26; - private static final int METHODID_LIST_SERVICE_IDS = 27; - private static final int METHODID_LIST_SERVICES = 28; - private static final int METHODID_GET_SERVICE = 29; - private static final int METHODID_SET_SERVICE = 30; - private static final int METHODID_UNSET_SERVICE = 31; - private static final int METHODID_REMOVE_SERVICE = 32; - private static final int METHODID_GET_SERVICE_EVENTS = 33; - private static final int METHODID_SELECT_SERVICE = 34; - private static final int METHODID_LIST_SLICE_IDS = 35; - private static final int METHODID_LIST_SLICES = 36; - private static final int METHODID_GET_SLICE = 37; - private static final int METHODID_SET_SLICE = 38; - private static final int METHODID_UNSET_SLICE = 39; - private static final int METHODID_REMOVE_SLICE = 40; - private static final int METHODID_GET_SLICE_EVENTS = 41; - private static final int METHODID_SELECT_SLICE = 42; - private static final int METHODID_LIST_CONNECTION_IDS = 43; - private static final int METHODID_LIST_CONNECTIONS = 44; - private static final int METHODID_GET_CONNECTION = 45; - private static final int METHODID_SET_CONNECTION = 46; - private static final int METHODID_REMOVE_CONNECTION = 47; - private static final int METHODID_GET_CONNECTION_EVENTS = 48; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ContextServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ContextServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_LIST_CONTEXT_IDS: - serviceImpl.listContextIds((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_CONTEXTS: - serviceImpl.listContexts((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_CONTEXT: - serviceImpl.getContext((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_CONTEXT: - serviceImpl.setContext((context.ContextOuterClass.Context) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_CONTEXT: - serviceImpl.removeContext((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_CONTEXT_EVENTS: - serviceImpl.getContextEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_TOPOLOGY_IDS: - serviceImpl.listTopologyIds((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_TOPOLOGIES: - serviceImpl.listTopologies((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_TOPOLOGY: - serviceImpl.getTopology((context.ContextOuterClass.TopologyId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_TOPOLOGY_DETAILS: - serviceImpl.getTopologyDetails((context.ContextOuterClass.TopologyId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_TOPOLOGY: - serviceImpl.setTopology((context.ContextOuterClass.Topology) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_TOPOLOGY: - serviceImpl.removeTopology((context.ContextOuterClass.TopologyId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_TOPOLOGY_EVENTS: - serviceImpl.getTopologyEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_DEVICE_IDS: - serviceImpl.listDeviceIds((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_DEVICES: - serviceImpl.listDevices((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_DEVICE: - serviceImpl.getDevice((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_DEVICE: - serviceImpl.setDevice((context.ContextOuterClass.Device) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_DEVICE: - serviceImpl.removeDevice((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_DEVICE_EVENTS: - serviceImpl.getDeviceEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SELECT_DEVICE: - serviceImpl.selectDevice((context.ContextOuterClass.DeviceFilter) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_END_POINT_NAMES: - serviceImpl.listEndPointNames((context.ContextOuterClass.EndPointIdList) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_LINK_IDS: - serviceImpl.listLinkIds((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_LINKS: - serviceImpl.listLinks((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_LINK: - serviceImpl.getLink((context.ContextOuterClass.LinkId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_LINK: - serviceImpl.setLink((context.ContextOuterClass.Link) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_LINK: - serviceImpl.removeLink((context.ContextOuterClass.LinkId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_LINK_EVENTS: - serviceImpl.getLinkEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_SERVICE_IDS: - serviceImpl.listServiceIds((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_SERVICES: - serviceImpl.listServices((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SERVICE: - serviceImpl.getService((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_SERVICE: - serviceImpl.setService((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UNSET_SERVICE: - serviceImpl.unsetService((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_SERVICE: - serviceImpl.removeService((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SERVICE_EVENTS: - serviceImpl.getServiceEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SELECT_SERVICE: - serviceImpl.selectService((context.ContextOuterClass.ServiceFilter) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_SLICE_IDS: - serviceImpl.listSliceIds((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_SLICES: - serviceImpl.listSlices((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SLICE: - serviceImpl.getSlice((context.ContextOuterClass.SliceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_SLICE: - serviceImpl.setSlice((context.ContextOuterClass.Slice) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UNSET_SLICE: - serviceImpl.unsetSlice((context.ContextOuterClass.Slice) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_SLICE: - serviceImpl.removeSlice((context.ContextOuterClass.SliceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SLICE_EVENTS: - serviceImpl.getSliceEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SELECT_SLICE: - serviceImpl.selectSlice((context.ContextOuterClass.SliceFilter) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_CONNECTION_IDS: - serviceImpl.listConnectionIds((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_CONNECTIONS: - serviceImpl.listConnections((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_CONNECTION: - serviceImpl.getConnection((context.ContextOuterClass.ConnectionId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_CONNECTION: - serviceImpl.setConnection((context.ContextOuterClass.Connection) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REMOVE_CONNECTION: - serviceImpl.removeConnection((context.ContextOuterClass.ConnectionId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_CONNECTION_EVENTS: - serviceImpl.getConnectionEvents((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class ContextServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ContextServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return context.ContextOuterClass.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ContextService"); - } - } - - private static final class ContextServiceFileDescriptorSupplier - extends ContextServiceBaseDescriptorSupplier { - ContextServiceFileDescriptorSupplier() {} - } - - private static final class ContextServiceMethodDescriptorSupplier - extends ContextServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ContextServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ContextServiceGrpc.class) { - result = serviceDescriptor; + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ContextServiceFileDescriptorSupplier()) - .addMethod(getListContextIdsMethod()) - .addMethod(getListContextsMethod()) - .addMethod(getGetContextMethod()) - .addMethod(getSetContextMethod()) - .addMethod(getRemoveContextMethod()) - .addMethod(getGetContextEventsMethod()) - .addMethod(getListTopologyIdsMethod()) - .addMethod(getListTopologiesMethod()) - .addMethod(getGetTopologyMethod()) - .addMethod(getGetTopologyDetailsMethod()) - .addMethod(getSetTopologyMethod()) - .addMethod(getRemoveTopologyMethod()) - .addMethod(getGetTopologyEventsMethod()) - .addMethod(getListDeviceIdsMethod()) - .addMethod(getListDevicesMethod()) - .addMethod(getGetDeviceMethod()) - .addMethod(getSetDeviceMethod()) - .addMethod(getRemoveDeviceMethod()) - .addMethod(getGetDeviceEventsMethod()) - .addMethod(getSelectDeviceMethod()) - .addMethod(getListEndPointNamesMethod()) - .addMethod(getListLinkIdsMethod()) - .addMethod(getListLinksMethod()) - .addMethod(getGetLinkMethod()) - .addMethod(getSetLinkMethod()) - .addMethod(getRemoveLinkMethod()) - .addMethod(getGetLinkEventsMethod()) - .addMethod(getListServiceIdsMethod()) - .addMethod(getListServicesMethod()) - .addMethod(getGetServiceMethod()) - .addMethod(getSetServiceMethod()) - .addMethod(getUnsetServiceMethod()) - .addMethod(getRemoveServiceMethod()) - .addMethod(getGetServiceEventsMethod()) - .addMethod(getSelectServiceMethod()) - .addMethod(getListSliceIdsMethod()) - .addMethod(getListSlicesMethod()) - .addMethod(getGetSliceMethod()) - .addMethod(getSetSliceMethod()) - .addMethod(getUnsetSliceMethod()) - .addMethod(getRemoveSliceMethod()) - .addMethod(getGetSliceEventsMethod()) - .addMethod(getSelectSliceMethod()) - .addMethod(getListConnectionIdsMethod()) - .addMethod(getListConnectionsMethod()) - .addMethod(getGetConnectionMethod()) - .addMethod(getSetConnectionMethod()) - .addMethod(getRemoveConnectionMethod()) - .addMethod(getGetConnectionEventsMethod()) - .build(); - } - } - } - return result; - } + synchronized (ContextServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new ContextServiceFileDescriptorSupplier()).addMethod(getListContextIdsMethod()).addMethod(getListContextsMethod()).addMethod(getGetContextMethod()).addMethod(getSetContextMethod()).addMethod(getRemoveContextMethod()).addMethod(getGetContextEventsMethod()).addMethod(getListTopologyIdsMethod()).addMethod(getListTopologiesMethod()).addMethod(getGetTopologyMethod()).addMethod(getGetTopologyDetailsMethod()).addMethod(getSetTopologyMethod()).addMethod(getRemoveTopologyMethod()).addMethod(getGetTopologyEventsMethod()).addMethod(getListDeviceIdsMethod()).addMethod(getListDevicesMethod()).addMethod(getGetDeviceMethod()).addMethod(getSetDeviceMethod()).addMethod(getRemoveDeviceMethod()).addMethod(getGetDeviceEventsMethod()).addMethod(getSelectDeviceMethod()).addMethod(getListEndPointNamesMethod()).addMethod(getListLinkIdsMethod()).addMethod(getListLinksMethod()).addMethod(getGetLinkMethod()).addMethod(getSetLinkMethod()).addMethod(getRemoveLinkMethod()).addMethod(getGetLinkEventsMethod()).addMethod(getListServiceIdsMethod()).addMethod(getListServicesMethod()).addMethod(getGetServiceMethod()).addMethod(getSetServiceMethod()).addMethod(getUnsetServiceMethod()).addMethod(getRemoveServiceMethod()).addMethod(getGetServiceEventsMethod()).addMethod(getSelectServiceMethod()).addMethod(getListSliceIdsMethod()).addMethod(getListSlicesMethod()).addMethod(getGetSliceMethod()).addMethod(getSetSliceMethod()).addMethod(getUnsetSliceMethod()).addMethod(getRemoveSliceMethod()).addMethod(getGetSliceEventsMethod()).addMethod(getSelectSliceMethod()).addMethod(getListConnectionIdsMethod()).addMethod(getListConnectionsMethod()).addMethod(getGetConnectionMethod()).addMethod(getSetConnectionMethod()).addMethod(getRemoveConnectionMethod()).addMethod(getGetConnectionEventsMethod()).addMethod(getGetOpticalConfigMethod()).addMethod(getSetOpticalConfigMethod()).addMethod(getSelectOpticalConfigMethod()).addMethod(getSetOpticalLinkMethod()).addMethod(getGetOpticalLinkMethod()).addMethod(getGetFiberMethod()).build(); + } + } + } + return result; + } } diff --git a/src/ztp/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java b/src/ztp/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java index 45d853aa7771c71679f1b7a67051a478b3f73be8..c6dbb1e92554dea8ee8d25b01bf87dd2cfa32551 100644 --- a/src/ztp/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java +++ b/src/ztp/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java @@ -6,18 +6,18 @@ import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: context.proto") -public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc { - private MutinyContextServiceGrpc() {} +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: context.proto") +public final class MutinyContextServiceGrpc implements io.quarkus.grpc.MutinyGrpc { + + private MutinyContextServiceGrpc() { + } public static MutinyContextServiceStub newMutinyStub(io.grpc.Channel channel) { return new MutinyContextServiceStub(channel); } - - public static final class MutinyContextServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub { + public static class MutinyContextServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.MutinyStub { + private ContextServiceGrpc.ContextServiceStub delegateStub; private MutinyContextServiceStub(io.grpc.Channel channel) { @@ -35,919 +35,593 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M return new MutinyContextServiceStub(channel, callOptions); } - public io.smallrye.mutiny.Uni listContextIds(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listContextIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listContextIds); } - public io.smallrye.mutiny.Uni listContexts(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listContexts); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listContexts); } - public io.smallrye.mutiny.Uni getContext(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getContext); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getContext); } - public io.smallrye.mutiny.Uni setContext(context.ContextOuterClass.Context request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setContext); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setContext); } - public io.smallrye.mutiny.Uni removeContext(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeContext); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeContext); } - public io.smallrye.mutiny.Uni listTopologyIds(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listTopologyIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listTopologyIds); } - public io.smallrye.mutiny.Uni listTopologies(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listTopologies); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listTopologies); } - public io.smallrye.mutiny.Uni getTopology(context.ContextOuterClass.TopologyId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getTopology); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getTopology); } - public io.smallrye.mutiny.Uni getTopologyDetails(context.ContextOuterClass.TopologyId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getTopologyDetails); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getTopologyDetails); } - public io.smallrye.mutiny.Uni setTopology(context.ContextOuterClass.Topology request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setTopology); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setTopology); } - public io.smallrye.mutiny.Uni removeTopology(context.ContextOuterClass.TopologyId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeTopology); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeTopology); } - public io.smallrye.mutiny.Uni listDeviceIds(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listDeviceIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listDeviceIds); } - public io.smallrye.mutiny.Uni listDevices(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listDevices); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listDevices); } - public io.smallrye.mutiny.Uni getDevice(context.ContextOuterClass.DeviceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getDevice); } - public io.smallrye.mutiny.Uni setDevice(context.ContextOuterClass.Device request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setDevice); } - public io.smallrye.mutiny.Uni removeDevice(context.ContextOuterClass.DeviceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeDevice); } - public io.smallrye.mutiny.Uni selectDevice(context.ContextOuterClass.DeviceFilter request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::selectDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::selectDevice); } - public io.smallrye.mutiny.Uni listEndPointNames(context.ContextOuterClass.EndPointIdList request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listEndPointNames); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listEndPointNames); } - public io.smallrye.mutiny.Uni listLinkIds(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listLinkIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listLinkIds); } - public io.smallrye.mutiny.Uni listLinks(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listLinks); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listLinks); } - public io.smallrye.mutiny.Uni getLink(context.ContextOuterClass.LinkId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getLink); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getLink); } - public io.smallrye.mutiny.Uni setLink(context.ContextOuterClass.Link request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setLink); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setLink); } - public io.smallrye.mutiny.Uni removeLink(context.ContextOuterClass.LinkId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeLink); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeLink); } - public io.smallrye.mutiny.Uni listServiceIds(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listServiceIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listServiceIds); } - public io.smallrye.mutiny.Uni listServices(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listServices); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listServices); } - public io.smallrye.mutiny.Uni getService(context.ContextOuterClass.ServiceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getService); } - public io.smallrye.mutiny.Uni setService(context.ContextOuterClass.Service request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setService); } - public io.smallrye.mutiny.Uni unsetService(context.ContextOuterClass.Service request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::unsetService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::unsetService); } - public io.smallrye.mutiny.Uni removeService(context.ContextOuterClass.ServiceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeService); } - public io.smallrye.mutiny.Uni selectService(context.ContextOuterClass.ServiceFilter request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::selectService); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::selectService); } - public io.smallrye.mutiny.Uni listSliceIds(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listSliceIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listSliceIds); } - public io.smallrye.mutiny.Uni listSlices(context.ContextOuterClass.ContextId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listSlices); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listSlices); } - public io.smallrye.mutiny.Uni getSlice(context.ContextOuterClass.SliceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getSlice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getSlice); } - public io.smallrye.mutiny.Uni setSlice(context.ContextOuterClass.Slice request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setSlice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setSlice); } - public io.smallrye.mutiny.Uni unsetSlice(context.ContextOuterClass.Slice request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::unsetSlice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::unsetSlice); } - public io.smallrye.mutiny.Uni removeSlice(context.ContextOuterClass.SliceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeSlice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeSlice); } - public io.smallrye.mutiny.Uni selectSlice(context.ContextOuterClass.SliceFilter request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::selectSlice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::selectSlice); } - public io.smallrye.mutiny.Uni listConnectionIds(context.ContextOuterClass.ServiceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listConnectionIds); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listConnectionIds); } - public io.smallrye.mutiny.Uni listConnections(context.ContextOuterClass.ServiceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::listConnections); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::listConnections); } - public io.smallrye.mutiny.Uni getConnection(context.ContextOuterClass.ConnectionId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getConnection); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getConnection); } - public io.smallrye.mutiny.Uni setConnection(context.ContextOuterClass.Connection request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setConnection); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setConnection); } - public io.smallrye.mutiny.Uni removeConnection(context.ContextOuterClass.ConnectionId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeConnection); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::removeConnection); + } + + /** + *
+         *  ------------------------------ Experimental -----------------------------
+         * 
+ */ + public io.smallrye.mutiny.Uni getOpticalConfig(context.ContextOuterClass.Empty request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getOpticalConfig); + } + + public io.smallrye.mutiny.Uni setOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setOpticalConfig); + } + + public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::selectOpticalConfig); + } + + public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setOpticalLink); + } + + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getOpticalLink); + } + + public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getFiber); } - public io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getContextEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getContextEvents); } - public io.smallrye.mutiny.Multi getTopologyEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getTopologyEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getTopologyEvents); } - public io.smallrye.mutiny.Multi getDeviceEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getDeviceEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getDeviceEvents); } - public io.smallrye.mutiny.Multi getLinkEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getLinkEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getLinkEvents); } - public io.smallrye.mutiny.Multi getServiceEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getServiceEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getServiceEvents); } - public io.smallrye.mutiny.Multi getSliceEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getSliceEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getSliceEvents); } - public io.smallrye.mutiny.Multi getConnectionEvents(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getConnectionEvents); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getConnectionEvents); } - } - public static abstract class ContextServiceImplBase implements io.grpc.BindableService { private String compression; + /** - * Set whether the server will try to use a compressed response. - * - * @param compression the compression, e.g {@code gzip} - */ + * Set whether the server will try to use a compressed response. + * + * @param compression the compression, e.g {@code gzip} + */ public ContextServiceImplBase withCompression(String compression) { - this.compression = compression; - return this; + this.compression = compression; + return this; } - - public io.smallrye.mutiny.Uni listContextIds(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listContexts(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getContext(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setContext(context.ContextOuterClass.Context request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeContext(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listTopologyIds(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listTopologies(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getTopology(context.ContextOuterClass.TopologyId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getTopologyDetails(context.ContextOuterClass.TopologyId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setTopology(context.ContextOuterClass.Topology request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeTopology(context.ContextOuterClass.TopologyId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listDeviceIds(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listDevices(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getDevice(context.ContextOuterClass.DeviceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setDevice(context.ContextOuterClass.Device request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeDevice(context.ContextOuterClass.DeviceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni selectDevice(context.ContextOuterClass.DeviceFilter request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listEndPointNames(context.ContextOuterClass.EndPointIdList request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listLinkIds(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listLinks(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getLink(context.ContextOuterClass.LinkId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setLink(context.ContextOuterClass.Link request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeLink(context.ContextOuterClass.LinkId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listServiceIds(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listServices(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getService(context.ContextOuterClass.ServiceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setService(context.ContextOuterClass.Service request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni unsetService(context.ContextOuterClass.Service request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeService(context.ContextOuterClass.ServiceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni selectService(context.ContextOuterClass.ServiceFilter request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listSliceIds(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listSlices(context.ContextOuterClass.ContextId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getSlice(context.ContextOuterClass.SliceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setSlice(context.ContextOuterClass.Slice request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni unsetSlice(context.ContextOuterClass.Slice request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeSlice(context.ContextOuterClass.SliceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni selectSlice(context.ContextOuterClass.SliceFilter request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listConnectionIds(context.ContextOuterClass.ServiceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni listConnections(context.ContextOuterClass.ServiceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getConnection(context.ContextOuterClass.ConnectionId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setConnection(context.ContextOuterClass.Connection request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni removeConnection(context.ContextOuterClass.ConnectionId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - + /** + *
+         *  ------------------------------ Experimental -----------------------------
+         * 
+ */ + public io.smallrye.mutiny.Uni getOpticalConfig(context.ContextOuterClass.Empty request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni setOpticalConfig(context.ContextOuterClass.OpticalConfig request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni setOpticalLink(context.ContextOuterClass.OpticalLink request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni getOpticalLink(context.ContextOuterClass.OpticalLinkId request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni getFiber(context.ContextOuterClass.FiberId request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + public io.smallrye.mutiny.Multi getContextEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getTopologyEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getDeviceEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getLinkEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getServiceEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getSliceEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getConnectionEvents(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - context.ContextServiceGrpc.getListContextIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.ContextIdList>( - this, METHODID_LIST_CONTEXT_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListContextsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.ContextList>( - this, METHODID_LIST_CONTEXTS, compression))) - .addMethod( - context.ContextServiceGrpc.getGetContextMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.Context>( - this, METHODID_GET_CONTEXT, compression))) - .addMethod( - context.ContextServiceGrpc.getSetContextMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Context, - context.ContextOuterClass.ContextId>( - this, METHODID_SET_CONTEXT, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveContextMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_CONTEXT, compression))) - .addMethod( - context.ContextServiceGrpc.getGetContextEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.ContextEvent>( - this, METHODID_GET_CONTEXT_EVENTS, compression))) - .addMethod( - context.ContextServiceGrpc.getListTopologyIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.TopologyIdList>( - this, METHODID_LIST_TOPOLOGY_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListTopologiesMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.TopologyList>( - this, METHODID_LIST_TOPOLOGIES, compression))) - .addMethod( - context.ContextServiceGrpc.getGetTopologyMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.TopologyId, - context.ContextOuterClass.Topology>( - this, METHODID_GET_TOPOLOGY, compression))) - .addMethod( - context.ContextServiceGrpc.getGetTopologyDetailsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.TopologyId, - context.ContextOuterClass.TopologyDetails>( - this, METHODID_GET_TOPOLOGY_DETAILS, compression))) - .addMethod( - context.ContextServiceGrpc.getSetTopologyMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Topology, - context.ContextOuterClass.TopologyId>( - this, METHODID_SET_TOPOLOGY, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveTopologyMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.TopologyId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_TOPOLOGY, compression))) - .addMethod( - context.ContextServiceGrpc.getGetTopologyEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.TopologyEvent>( - this, METHODID_GET_TOPOLOGY_EVENTS, compression))) - .addMethod( - context.ContextServiceGrpc.getListDeviceIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.DeviceIdList>( - this, METHODID_LIST_DEVICE_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListDevicesMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.DeviceList>( - this, METHODID_LIST_DEVICES, compression))) - .addMethod( - context.ContextServiceGrpc.getGetDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceId, - context.ContextOuterClass.Device>( - this, METHODID_GET_DEVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getSetDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Device, - context.ContextOuterClass.DeviceId>( - this, METHODID_SET_DEVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_DEVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getGetDeviceEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.DeviceEvent>( - this, METHODID_GET_DEVICE_EVENTS, compression))) - .addMethod( - context.ContextServiceGrpc.getSelectDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceFilter, - context.ContextOuterClass.DeviceList>( - this, METHODID_SELECT_DEVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getListEndPointNamesMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.EndPointIdList, - context.ContextOuterClass.EndPointNameList>( - this, METHODID_LIST_END_POINT_NAMES, compression))) - .addMethod( - context.ContextServiceGrpc.getListLinkIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.LinkIdList>( - this, METHODID_LIST_LINK_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListLinksMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.LinkList>( - this, METHODID_LIST_LINKS, compression))) - .addMethod( - context.ContextServiceGrpc.getGetLinkMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.LinkId, - context.ContextOuterClass.Link>( - this, METHODID_GET_LINK, compression))) - .addMethod( - context.ContextServiceGrpc.getSetLinkMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Link, - context.ContextOuterClass.LinkId>( - this, METHODID_SET_LINK, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveLinkMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.LinkId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_LINK, compression))) - .addMethod( - context.ContextServiceGrpc.getGetLinkEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.LinkEvent>( - this, METHODID_GET_LINK_EVENTS, compression))) - .addMethod( - context.ContextServiceGrpc.getListServiceIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.ServiceIdList>( - this, METHODID_LIST_SERVICE_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListServicesMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.ServiceList>( - this, METHODID_LIST_SERVICES, compression))) - .addMethod( - context.ContextServiceGrpc.getGetServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ServiceId, - context.ContextOuterClass.Service>( - this, METHODID_GET_SERVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getSetServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Service, - context.ContextOuterClass.ServiceId>( - this, METHODID_SET_SERVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getUnsetServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Service, - context.ContextOuterClass.ServiceId>( - this, METHODID_UNSET_SERVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ServiceId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_SERVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getGetServiceEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.ServiceEvent>( - this, METHODID_GET_SERVICE_EVENTS, compression))) - .addMethod( - context.ContextServiceGrpc.getSelectServiceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ServiceFilter, - context.ContextOuterClass.ServiceList>( - this, METHODID_SELECT_SERVICE, compression))) - .addMethod( - context.ContextServiceGrpc.getListSliceIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.SliceIdList>( - this, METHODID_LIST_SLICE_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListSlicesMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ContextId, - context.ContextOuterClass.SliceList>( - this, METHODID_LIST_SLICES, compression))) - .addMethod( - context.ContextServiceGrpc.getGetSliceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.SliceId, - context.ContextOuterClass.Slice>( - this, METHODID_GET_SLICE, compression))) - .addMethod( - context.ContextServiceGrpc.getSetSliceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Slice, - context.ContextOuterClass.SliceId>( - this, METHODID_SET_SLICE, compression))) - .addMethod( - context.ContextServiceGrpc.getUnsetSliceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Slice, - context.ContextOuterClass.SliceId>( - this, METHODID_UNSET_SLICE, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveSliceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.SliceId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_SLICE, compression))) - .addMethod( - context.ContextServiceGrpc.getGetSliceEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.SliceEvent>( - this, METHODID_GET_SLICE_EVENTS, compression))) - .addMethod( - context.ContextServiceGrpc.getSelectSliceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.SliceFilter, - context.ContextOuterClass.SliceList>( - this, METHODID_SELECT_SLICE, compression))) - .addMethod( - context.ContextServiceGrpc.getListConnectionIdsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ServiceId, - context.ContextOuterClass.ConnectionIdList>( - this, METHODID_LIST_CONNECTION_IDS, compression))) - .addMethod( - context.ContextServiceGrpc.getListConnectionsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ServiceId, - context.ContextOuterClass.ConnectionList>( - this, METHODID_LIST_CONNECTIONS, compression))) - .addMethod( - context.ContextServiceGrpc.getGetConnectionMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ConnectionId, - context.ContextOuterClass.Connection>( - this, METHODID_GET_CONNECTION, compression))) - .addMethod( - context.ContextServiceGrpc.getSetConnectionMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Connection, - context.ContextOuterClass.ConnectionId>( - this, METHODID_SET_CONNECTION, compression))) - .addMethod( - context.ContextServiceGrpc.getRemoveConnectionMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.ConnectionId, - context.ContextOuterClass.Empty>( - this, METHODID_REMOVE_CONNECTION, compression))) - .addMethod( - context.ContextServiceGrpc.getGetConnectionEventsMethod(), - asyncServerStreamingCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - context.ContextOuterClass.ConnectionEvent>( - this, METHODID_GET_CONNECTION_EVENTS, compression))) - .build(); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(context.ContextServiceGrpc.getListContextIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXT_IDS, compression))).addMethod(context.ContextServiceGrpc.getListContextsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONTEXTS, compression))).addMethod(context.ContextServiceGrpc.getGetContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getSetContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getRemoveContextMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONTEXT, compression))).addMethod(context.ContextServiceGrpc.getGetContextEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONTEXT_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListTopologyIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGY_IDS, compression))).addMethod(context.ContextServiceGrpc.getListTopologiesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_TOPOLOGIES, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyDetailsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_DETAILS, compression))).addMethod(context.ContextServiceGrpc.getSetTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getRemoveTopologyMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_TOPOLOGY, compression))).addMethod(context.ContextServiceGrpc.getGetTopologyEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_TOPOLOGY_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListDeviceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListDevicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_DEVICES, compression))).addMethod(context.ContextServiceGrpc.getGetDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getSetDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getGetDeviceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_DEVICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_DEVICE, compression))).addMethod(context.ContextServiceGrpc.getListEndPointNamesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_END_POINT_NAMES, compression))).addMethod(context.ContextServiceGrpc.getListLinkIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINK_IDS, compression))).addMethod(context.ContextServiceGrpc.getListLinksMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_LINKS, compression))).addMethod(context.ContextServiceGrpc.getGetLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_LINK, compression))).addMethod(context.ContextServiceGrpc.getSetLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_LINK, compression))).addMethod(context.ContextServiceGrpc.getRemoveLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetLinkEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_LINK_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getListServiceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListServicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SERVICES, compression))).addMethod(context.ContextServiceGrpc.getGetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getSetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getUnsetServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getGetServiceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SERVICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectServiceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SERVICE, compression))).addMethod(context.ContextServiceGrpc.getListSliceIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICE_IDS, compression))).addMethod(context.ContextServiceGrpc.getListSlicesMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_SLICES, compression))).addMethod(context.ContextServiceGrpc.getGetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getSetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getUnsetSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_UNSET_SLICE, compression))).addMethod(context.ContextServiceGrpc.getRemoveSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_SLICE, compression))).addMethod(context.ContextServiceGrpc.getGetSliceEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_SLICE_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getSelectSliceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_SLICE, compression))).addMethod(context.ContextServiceGrpc.getListConnectionIdsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTION_IDS, compression))).addMethod(context.ContextServiceGrpc.getListConnectionsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_LIST_CONNECTIONS, compression))).addMethod(context.ContextServiceGrpc.getGetConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getSetConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getRemoveConnectionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_REMOVE_CONNECTION, compression))).addMethod(context.ContextServiceGrpc.getGetConnectionEventsMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_CONNECTION_EVENTS, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSetOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSelectOpticalConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SELECT_OPTICAL_CONFIG, compression))).addMethod(context.ContextServiceGrpc.getSetOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetOpticalLinkMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_OPTICAL_LINK, compression))).addMethod(context.ContextServiceGrpc.getGetFiberMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_FIBER, compression))).build(); } } private static final int METHODID_LIST_CONTEXT_IDS = 0; + private static final int METHODID_LIST_CONTEXTS = 1; + private static final int METHODID_GET_CONTEXT = 2; + private static final int METHODID_SET_CONTEXT = 3; + private static final int METHODID_REMOVE_CONTEXT = 4; + private static final int METHODID_GET_CONTEXT_EVENTS = 5; + private static final int METHODID_LIST_TOPOLOGY_IDS = 6; + private static final int METHODID_LIST_TOPOLOGIES = 7; + private static final int METHODID_GET_TOPOLOGY = 8; + private static final int METHODID_GET_TOPOLOGY_DETAILS = 9; + private static final int METHODID_SET_TOPOLOGY = 10; + private static final int METHODID_REMOVE_TOPOLOGY = 11; + private static final int METHODID_GET_TOPOLOGY_EVENTS = 12; + private static final int METHODID_LIST_DEVICE_IDS = 13; + private static final int METHODID_LIST_DEVICES = 14; + private static final int METHODID_GET_DEVICE = 15; + private static final int METHODID_SET_DEVICE = 16; + private static final int METHODID_REMOVE_DEVICE = 17; + private static final int METHODID_GET_DEVICE_EVENTS = 18; + private static final int METHODID_SELECT_DEVICE = 19; + private static final int METHODID_LIST_END_POINT_NAMES = 20; + private static final int METHODID_LIST_LINK_IDS = 21; + private static final int METHODID_LIST_LINKS = 22; + private static final int METHODID_GET_LINK = 23; + private static final int METHODID_SET_LINK = 24; + private static final int METHODID_REMOVE_LINK = 25; + private static final int METHODID_GET_LINK_EVENTS = 26; + private static final int METHODID_LIST_SERVICE_IDS = 27; + private static final int METHODID_LIST_SERVICES = 28; + private static final int METHODID_GET_SERVICE = 29; + private static final int METHODID_SET_SERVICE = 30; + private static final int METHODID_UNSET_SERVICE = 31; + private static final int METHODID_REMOVE_SERVICE = 32; + private static final int METHODID_GET_SERVICE_EVENTS = 33; + private static final int METHODID_SELECT_SERVICE = 34; + private static final int METHODID_LIST_SLICE_IDS = 35; + private static final int METHODID_LIST_SLICES = 36; + private static final int METHODID_GET_SLICE = 37; + private static final int METHODID_SET_SLICE = 38; + private static final int METHODID_UNSET_SLICE = 39; + private static final int METHODID_REMOVE_SLICE = 40; + private static final int METHODID_GET_SLICE_EVENTS = 41; + private static final int METHODID_SELECT_SLICE = 42; + private static final int METHODID_LIST_CONNECTION_IDS = 43; + private static final int METHODID_LIST_CONNECTIONS = 44; + private static final int METHODID_GET_CONNECTION = 45; + private static final int METHODID_SET_CONNECTION = 46; + private static final int METHODID_REMOVE_CONNECTION = 47; + private static final int METHODID_GET_CONNECTION_EVENTS = 48; - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final int METHODID_GET_OPTICAL_CONFIG = 49; + + private static final int METHODID_SET_OPTICAL_CONFIG = 50; + + private static final int METHODID_SELECT_OPTICAL_CONFIG = 51; + + private static final int METHODID_SET_OPTICAL_LINK = 52; + + private static final int METHODID_GET_OPTICAL_LINK = 53; + + private static final int METHODID_GET_FIBER = 54; + + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ContextServiceImplBase serviceImpl; + private final int methodId; + private final String compression; MethodHandlers(ContextServiceImplBase serviceImpl, int methodId, String compression) { @@ -959,300 +633,171 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { case METHODID_LIST_CONTEXT_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listContextIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listContextIds); break; case METHODID_LIST_CONTEXTS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listContexts); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listContexts); break; case METHODID_GET_CONTEXT: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getContext); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getContext); break; case METHODID_SET_CONTEXT: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Context) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setContext); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Context) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setContext); break; case METHODID_REMOVE_CONTEXT: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeContext); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeContext); break; case METHODID_GET_CONTEXT_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getContextEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getContextEvents); break; case METHODID_LIST_TOPOLOGY_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listTopologyIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listTopologyIds); break; case METHODID_LIST_TOPOLOGIES: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listTopologies); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listTopologies); break; case METHODID_GET_TOPOLOGY: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.TopologyId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getTopology); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.TopologyId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getTopology); break; case METHODID_GET_TOPOLOGY_DETAILS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.TopologyId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getTopologyDetails); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.TopologyId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getTopologyDetails); break; case METHODID_SET_TOPOLOGY: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Topology) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setTopology); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Topology) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setTopology); break; case METHODID_REMOVE_TOPOLOGY: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.TopologyId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeTopology); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.TopologyId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeTopology); break; case METHODID_GET_TOPOLOGY_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getTopologyEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getTopologyEvents); break; case METHODID_LIST_DEVICE_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listDeviceIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listDeviceIds); break; case METHODID_LIST_DEVICES: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listDevices); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listDevices); break; case METHODID_GET_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getDevice); break; case METHODID_SET_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Device) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Device) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setDevice); break; case METHODID_REMOVE_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeDevice); break; case METHODID_GET_DEVICE_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getDeviceEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getDeviceEvents); break; case METHODID_SELECT_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceFilter) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::selectDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.DeviceFilter) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::selectDevice); break; case METHODID_LIST_END_POINT_NAMES: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.EndPointIdList) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listEndPointNames); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.EndPointIdList) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listEndPointNames); break; case METHODID_LIST_LINK_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listLinkIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listLinkIds); break; case METHODID_LIST_LINKS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listLinks); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listLinks); break; case METHODID_GET_LINK: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.LinkId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getLink); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getLink); break; case METHODID_SET_LINK: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Link) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setLink); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Link) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setLink); break; case METHODID_REMOVE_LINK: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.LinkId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeLink); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.LinkId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeLink); break; case METHODID_GET_LINK_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getLinkEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getLinkEvents); break; case METHODID_LIST_SERVICE_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listServiceIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listServiceIds); break; case METHODID_LIST_SERVICES: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listServices); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listServices); break; case METHODID_GET_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getService); break; case METHODID_SET_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setService); break; case METHODID_UNSET_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::unsetService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::unsetService); break; case METHODID_REMOVE_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeService); break; case METHODID_GET_SERVICE_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getServiceEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getServiceEvents); break; case METHODID_SELECT_SERVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceFilter) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::selectService); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceFilter) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::selectService); break; case METHODID_LIST_SLICE_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listSliceIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listSliceIds); break; case METHODID_LIST_SLICES: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listSlices); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ContextId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listSlices); break; case METHODID_GET_SLICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.SliceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getSlice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.SliceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getSlice); break; case METHODID_SET_SLICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Slice) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setSlice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Slice) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setSlice); break; case METHODID_UNSET_SLICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Slice) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::unsetSlice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Slice) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::unsetSlice); break; case METHODID_REMOVE_SLICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.SliceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeSlice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.SliceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeSlice); break; case METHODID_GET_SLICE_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getSliceEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getSliceEvents); break; case METHODID_SELECT_SLICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.SliceFilter) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::selectSlice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.SliceFilter) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::selectSlice); break; case METHODID_LIST_CONNECTION_IDS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listConnectionIds); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listConnectionIds); break; case METHODID_LIST_CONNECTIONS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::listConnections); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::listConnections); break; case METHODID_GET_CONNECTION: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ConnectionId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getConnection); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ConnectionId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getConnection); break; case METHODID_SET_CONNECTION: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Connection) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setConnection); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Connection) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setConnection); break; case METHODID_REMOVE_CONNECTION: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ConnectionId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::removeConnection); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.ConnectionId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::removeConnection); break; case METHODID_GET_CONNECTION_EVENTS: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getConnectionEvents); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getConnectionEvents); + break; + case METHODID_GET_OPTICAL_CONFIG: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getOpticalConfig); + break; + case METHODID_SET_OPTICAL_CONFIG: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfig) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setOpticalConfig); + break; + case METHODID_SELECT_OPTICAL_CONFIG: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalConfigId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::selectOpticalConfig); + break; + case METHODID_SET_OPTICAL_LINK: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalLink) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setOpticalLink); + break; + case METHODID_GET_OPTICAL_LINK: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.OpticalLinkId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getOpticalLink); + break; + case METHODID_GET_FIBER: + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.FiberId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getFiber); break; default: throw new java.lang.AssertionError(); @@ -1262,11 +807,10 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { default: throw new java.lang.AssertionError(); } } } - -} \ No newline at end of file +} diff --git a/src/ztp/target/generated-sources/grpc/device/Device.java b/src/ztp/target/generated-sources/grpc/device/Device.java index bc57d19cae53bf0540a402e9771bc87c1ecf49c5..93bd490405da36c7ee2f26121e5abd94c3ec13a5 100644 --- a/src/ztp/target/generated-sources/grpc/device/Device.java +++ b/src/ztp/target/generated-sources/grpc/device/Device.java @@ -1,1031 +1,963 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: device.proto - package device; public final class Device { - private Device() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface MonitoringSettingsOrBuilder extends - // @@protoc_insertion_point(interface_extends:device.MonitoringSettings) - com.google.protobuf.MessageOrBuilder { - - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - * @return Whether the kpiDescriptor field is set. - */ - boolean hasKpiDescriptor(); - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - * @return The kpiDescriptor. - */ - monitoring.Monitoring.KpiDescriptor getKpiDescriptor(); - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder(); - - /** - * float sampling_duration_s = 3; - * @return The samplingDurationS. - */ - float getSamplingDurationS(); - - /** - * float sampling_interval_s = 4; - * @return The samplingIntervalS. - */ - float getSamplingIntervalS(); - } - /** - * Protobuf type {@code device.MonitoringSettings} - */ - public static final class MonitoringSettings extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:device.MonitoringSettings) - MonitoringSettingsOrBuilder { - private static final long serialVersionUID = 0L; - // Use MonitoringSettings.newBuilder() to construct. - private MonitoringSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MonitoringSettings() { + private Device() { } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MonitoringSettings(); + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { } - @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; + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return device.Device.internal_static_device_MonitoringSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - device.Device.MonitoringSettings.class, device.Device.MonitoringSettings.Builder.class); - } + public interface MonitoringSettingsOrBuilder extends // @@protoc_insertion_point(interface_extends:device.MonitoringSettings) + com.google.protobuf.MessageOrBuilder { - public static final int KPI_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); - public static final int KPI_DESCRIPTOR_FIELD_NUMBER = 2; - private monitoring.Monitoring.KpiDescriptor kpiDescriptor_; - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - * @return Whether the kpiDescriptor field is set. - */ - @java.lang.Override - public boolean hasKpiDescriptor() { - return kpiDescriptor_ != null; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - * @return The kpiDescriptor. - */ - @java.lang.Override - public monitoring.Monitoring.KpiDescriptor getKpiDescriptor() { - return kpiDescriptor_ == null ? monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - @java.lang.Override - public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder() { - return getKpiDescriptor(); - } + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); - public static final int SAMPLING_DURATION_S_FIELD_NUMBER = 3; - private float samplingDurationS_; - /** - * float sampling_duration_s = 3; - * @return The samplingDurationS. - */ - @java.lang.Override - public float getSamplingDurationS() { - return samplingDurationS_; + /** + * .monitoring.KpiId kpi_id = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + * @return Whether the kpiDescriptor field is set. + */ + boolean hasKpiDescriptor(); + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + * @return The kpiDescriptor. + */ + monitoring.Monitoring.KpiDescriptor getKpiDescriptor(); + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder(); + + /** + * float sampling_duration_s = 3; + * @return The samplingDurationS. + */ + float getSamplingDurationS(); + + /** + * float sampling_interval_s = 4; + * @return The samplingIntervalS. + */ + float getSamplingIntervalS(); } - public static final int SAMPLING_INTERVAL_S_FIELD_NUMBER = 4; - private float samplingIntervalS_; /** - * float sampling_interval_s = 4; - * @return The samplingIntervalS. + * Protobuf type {@code device.MonitoringSettings} */ - @java.lang.Override - public float getSamplingIntervalS() { - return samplingIntervalS_; - } + public static final class MonitoringSettings extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:device.MonitoringSettings) + MonitoringSettingsOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use MonitoringSettings.newBuilder() to construct. + private MonitoringSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - if (kpiDescriptor_ != null) { - output.writeMessage(2, getKpiDescriptor()); - } - if (samplingDurationS_ != 0F) { - output.writeFloat(3, samplingDurationS_); - } - if (samplingIntervalS_ != 0F) { - output.writeFloat(4, samplingIntervalS_); - } - unknownFields.writeTo(output); - } + private MonitoringSettings() { + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - if (kpiDescriptor_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getKpiDescriptor()); - } - if (samplingDurationS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, samplingDurationS_); - } - if (samplingIntervalS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, samplingIntervalS_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MonitoringSettings(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof device.Device.MonitoringSettings)) { - return super.equals(obj); - } - device.Device.MonitoringSettings other = (device.Device.MonitoringSettings) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (hasKpiDescriptor() != other.hasKpiDescriptor()) return false; - if (hasKpiDescriptor()) { - if (!getKpiDescriptor() - .equals(other.getKpiDescriptor())) return false; - } - if (java.lang.Float.floatToIntBits(getSamplingDurationS()) - != java.lang.Float.floatToIntBits( - other.getSamplingDurationS())) return false; - if (java.lang.Float.floatToIntBits(getSamplingIntervalS()) - != java.lang.Float.floatToIntBits( - other.getSamplingIntervalS())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - if (hasKpiDescriptor()) { - hash = (37 * hash) + KPI_DESCRIPTOR_FIELD_NUMBER; - hash = (53 * hash) + getKpiDescriptor().hashCode(); - } - hash = (37 * hash) + SAMPLING_DURATION_S_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + 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 device.Device.MonitoringSettings parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static device.Device.MonitoringSettings parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static device.Device.MonitoringSettings parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static device.Device.MonitoringSettings parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static device.Device.MonitoringSettings parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static device.Device.MonitoringSettings parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static device.Device.MonitoringSettings parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static device.Device.MonitoringSettings parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static device.Device.MonitoringSettings parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static device.Device.MonitoringSettings parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static device.Device.MonitoringSettings parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static device.Device.MonitoringSettings parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return device.Device.internal_static_device_MonitoringSettings_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(device.Device.MonitoringSettings prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return device.Device.internal_static_device_MonitoringSettings_fieldAccessorTable.ensureFieldAccessorsInitialized(device.Device.MonitoringSettings.class, device.Device.MonitoringSettings.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code device.MonitoringSettings} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:device.MonitoringSettings) - device.Device.MonitoringSettingsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return device.Device.internal_static_device_MonitoringSettings_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return device.Device.internal_static_device_MonitoringSettings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - device.Device.MonitoringSettings.class, device.Device.MonitoringSettings.Builder.class); - } - - // 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) { + public static final int KPI_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.KpiId kpiId_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int KPI_DESCRIPTOR_FIELD_NUMBER = 2; + + private monitoring.Monitoring.KpiDescriptor kpiDescriptor_; + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + * @return Whether the kpiDescriptor field is set. + */ + @java.lang.Override + public boolean hasKpiDescriptor() { + return kpiDescriptor_ != null; + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + * @return The kpiDescriptor. + */ + @java.lang.Override + public monitoring.Monitoring.KpiDescriptor getKpiDescriptor() { + return kpiDescriptor_ == null ? monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; - kpiIdBuilder_ = null; + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + @java.lang.Override + public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder() { + return getKpiDescriptor(); } - if (kpiDescriptorBuilder_ == null) { - kpiDescriptor_ = null; - } else { - kpiDescriptor_ = null; - kpiDescriptorBuilder_ = null; + + public static final int SAMPLING_DURATION_S_FIELD_NUMBER = 3; + + private float samplingDurationS_; + + /** + * float sampling_duration_s = 3; + * @return The samplingDurationS. + */ + @java.lang.Override + public float getSamplingDurationS() { + return samplingDurationS_; } - samplingDurationS_ = 0F; - samplingIntervalS_ = 0F; + public static final int SAMPLING_INTERVAL_S_FIELD_NUMBER = 4; - return this; - } + private float samplingIntervalS_; - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return device.Device.internal_static_device_MonitoringSettings_descriptor; - } + /** + * float sampling_interval_s = 4; + * @return The samplingIntervalS. + */ + @java.lang.Override + public float getSamplingIntervalS() { + return samplingIntervalS_; + } - @java.lang.Override - public device.Device.MonitoringSettings getDefaultInstanceForType() { - return device.Device.MonitoringSettings.getDefaultInstance(); - } + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public device.Device.MonitoringSettings build() { - device.Device.MonitoringSettings result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + if (kpiDescriptor_ != null) { + output.writeMessage(2, getKpiDescriptor()); + } + if (samplingDurationS_ != 0F) { + output.writeFloat(3, samplingDurationS_); + } + if (samplingIntervalS_ != 0F) { + output.writeFloat(4, samplingIntervalS_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + if (kpiDescriptor_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiDescriptor()); + } + if (samplingDurationS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, samplingDurationS_); + } + if (samplingIntervalS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, samplingIntervalS_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof device.Device.MonitoringSettings)) { + return super.equals(obj); + } + device.Device.MonitoringSettings other = (device.Device.MonitoringSettings) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (hasKpiDescriptor() != other.hasKpiDescriptor()) + return false; + if (hasKpiDescriptor()) { + if (!getKpiDescriptor().equals(other.getKpiDescriptor())) + return false; + } + if (java.lang.Float.floatToIntBits(getSamplingDurationS()) != java.lang.Float.floatToIntBits(other.getSamplingDurationS())) + return false; + if (java.lang.Float.floatToIntBits(getSamplingIntervalS()) != java.lang.Float.floatToIntBits(other.getSamplingIntervalS())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + if (hasKpiDescriptor()) { + hash = (37 * hash) + KPI_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getKpiDescriptor().hashCode(); + } + hash = (37 * hash) + SAMPLING_DURATION_S_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; } - return result; - } - - @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(); + + public static device.Device.MonitoringSettings parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - if (kpiDescriptorBuilder_ == null) { - result.kpiDescriptor_ = kpiDescriptor_; - } else { - result.kpiDescriptor_ = kpiDescriptorBuilder_.build(); + + public static device.Device.MonitoringSettings parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof device.Device.MonitoringSettings) { - return mergeFrom((device.Device.MonitoringSettings)other); - } else { - super.mergeFrom(other); - return this; + + public static device.Device.MonitoringSettings parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - } - public Builder mergeFrom(device.Device.MonitoringSettings other) { - if (other == device.Device.MonitoringSettings.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); + public static device.Device.MonitoringSettings parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - if (other.hasKpiDescriptor()) { - mergeKpiDescriptor(other.getKpiDescriptor()); + + public static device.Device.MonitoringSettings parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - if (other.getSamplingDurationS() != 0F) { - setSamplingDurationS(other.getSamplingDurationS()); + + public static device.Device.MonitoringSettings parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - if (other.getSamplingIntervalS() != 0F) { - setSamplingIntervalS(other.getSamplingIntervalS()); + + public static device.Device.MonitoringSettings parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (device.Device.MonitoringSettings) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + + public static device.Device.MonitoringSettings parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - return this; - } - - private monitoring.Monitoring.KpiId kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); + + public static device.Device.MonitoringSettings parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); + + public static device.Device.MonitoringSettings parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); + public static device.Device.MonitoringSettings parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); + public static device.Device.MonitoringSettings parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); } - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; + + public static Builder newBuilder(device.Device.MonitoringSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - return kpiIdBuilder_; - } - - private monitoring.Monitoring.KpiDescriptor kpiDescriptor_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder> kpiDescriptorBuilder_; - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - * @return Whether the kpiDescriptor field is set. - */ - public boolean hasKpiDescriptor() { - return kpiDescriptorBuilder_ != null || kpiDescriptor_ != null; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - * @return The kpiDescriptor. - */ - public monitoring.Monitoring.KpiDescriptor getKpiDescriptor() { - if (kpiDescriptorBuilder_ == null) { - return kpiDescriptor_ == null ? monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; - } else { - return kpiDescriptorBuilder_.getMessage(); + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - public Builder setKpiDescriptor(monitoring.Monitoring.KpiDescriptor value) { - if (kpiDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiDescriptor_ = value; - onChanged(); - } else { - kpiDescriptorBuilder_.setMessage(value); + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - return this; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - public Builder setKpiDescriptor( - monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { - if (kpiDescriptorBuilder_ == null) { - kpiDescriptor_ = builderForValue.build(); - onChanged(); - } else { - kpiDescriptorBuilder_.setMessage(builderForValue.build()); + /** + * Protobuf type {@code device.MonitoringSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:device.MonitoringSettings) + device.Device.MonitoringSettingsOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return device.Device.internal_static_device_MonitoringSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return device.Device.internal_static_device_MonitoringSettings_fieldAccessorTable.ensureFieldAccessorsInitialized(device.Device.MonitoringSettings.class, device.Device.MonitoringSettings.Builder.class); + } + + // 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; + kpiIdBuilder_ = null; + } + if (kpiDescriptorBuilder_ == null) { + kpiDescriptor_ = null; + } else { + kpiDescriptor_ = null; + kpiDescriptorBuilder_ = null; + } + samplingDurationS_ = 0F; + samplingIntervalS_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return device.Device.internal_static_device_MonitoringSettings_descriptor; + } + + @java.lang.Override + public device.Device.MonitoringSettings getDefaultInstanceForType() { + return device.Device.MonitoringSettings.getDefaultInstance(); + } + + @java.lang.Override + public device.Device.MonitoringSettings build() { + device.Device.MonitoringSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof device.Device.MonitoringSettings) { + return mergeFrom((device.Device.MonitoringSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(device.Device.MonitoringSettings other) { + if (other == device.Device.MonitoringSettings.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (other.hasKpiDescriptor()) { + mergeKpiDescriptor(other.getKpiDescriptor()); + } + if (other.getSamplingDurationS() != 0F) { + setSamplingDurationS(other.getSamplingDurationS()); + } + if (other.getSamplingIntervalS() != 0F) { + setSamplingIntervalS(other.getSamplingIntervalS()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (device.Device.MonitoringSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private monitoring.Monitoring.KpiDescriptor kpiDescriptor_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiDescriptorBuilder_; + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + * @return Whether the kpiDescriptor field is set. + */ + public boolean hasKpiDescriptor() { + return kpiDescriptorBuilder_ != null || kpiDescriptor_ != null; + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + * @return The kpiDescriptor. + */ + public monitoring.Monitoring.KpiDescriptor getKpiDescriptor() { + if (kpiDescriptorBuilder_ == null) { + return kpiDescriptor_ == null ? monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; + } else { + return kpiDescriptorBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + public Builder setKpiDescriptor(monitoring.Monitoring.KpiDescriptor value) { + if (kpiDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiDescriptor_ = value; + onChanged(); + } else { + kpiDescriptorBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + public Builder setKpiDescriptor(monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { + if (kpiDescriptorBuilder_ == null) { + kpiDescriptor_ = builderForValue.build(); + onChanged(); + } else { + kpiDescriptorBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + public Builder mergeKpiDescriptor(monitoring.Monitoring.KpiDescriptor value) { + if (kpiDescriptorBuilder_ == null) { + if (kpiDescriptor_ != null) { + kpiDescriptor_ = monitoring.Monitoring.KpiDescriptor.newBuilder(kpiDescriptor_).mergeFrom(value).buildPartial(); + } else { + kpiDescriptor_ = value; + } + onChanged(); + } else { + kpiDescriptorBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + public Builder clearKpiDescriptor() { + if (kpiDescriptorBuilder_ == null) { + kpiDescriptor_ = null; + onChanged(); + } else { + kpiDescriptor_ = null; + kpiDescriptorBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + public monitoring.Monitoring.KpiDescriptor.Builder getKpiDescriptorBuilder() { + onChanged(); + return getKpiDescriptorFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder() { + if (kpiDescriptorBuilder_ != null) { + return kpiDescriptorBuilder_.getMessageOrBuilder(); + } else { + return kpiDescriptor_ == null ? monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; + } + } + + /** + * .monitoring.KpiDescriptor kpi_descriptor = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiDescriptorFieldBuilder() { + if (kpiDescriptorBuilder_ == null) { + kpiDescriptorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiDescriptor(), getParentForChildren(), isClean()); + kpiDescriptor_ = null; + } + return kpiDescriptorBuilder_; + } + + private float samplingDurationS_; + + /** + * float sampling_duration_s = 3; + * @return The samplingDurationS. + */ + @java.lang.Override + public float getSamplingDurationS() { + return samplingDurationS_; + } + + /** + * float sampling_duration_s = 3; + * @param value The samplingDurationS to set. + * @return This builder for chaining. + */ + public Builder setSamplingDurationS(float value) { + samplingDurationS_ = value; + onChanged(); + return this; + } + + /** + * float sampling_duration_s = 3; + * @return This builder for chaining. + */ + public Builder clearSamplingDurationS() { + samplingDurationS_ = 0F; + onChanged(); + return this; + } + + private float samplingIntervalS_; + + /** + * float sampling_interval_s = 4; + * @return The samplingIntervalS. + */ + @java.lang.Override + public float getSamplingIntervalS() { + return samplingIntervalS_; + } + + /** + * float sampling_interval_s = 4; + * @param value The samplingIntervalS to set. + * @return This builder for chaining. + */ + public Builder setSamplingIntervalS(float value) { + samplingIntervalS_ = value; + onChanged(); + return this; + } + + /** + * float sampling_interval_s = 4; + * @return This builder for chaining. + */ + public Builder clearSamplingIntervalS() { + samplingIntervalS_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:device.MonitoringSettings) } - return this; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - public Builder mergeKpiDescriptor(monitoring.Monitoring.KpiDescriptor value) { - if (kpiDescriptorBuilder_ == null) { - if (kpiDescriptor_ != null) { - kpiDescriptor_ = - monitoring.Monitoring.KpiDescriptor.newBuilder(kpiDescriptor_).mergeFrom(value).buildPartial(); - } else { - kpiDescriptor_ = value; - } - onChanged(); - } else { - kpiDescriptorBuilder_.mergeFrom(value); + // @@protoc_insertion_point(class_scope:device.MonitoringSettings) + private static final device.Device.MonitoringSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new device.Device.MonitoringSettings(); } - return this; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - public Builder clearKpiDescriptor() { - if (kpiDescriptorBuilder_ == null) { - kpiDescriptor_ = null; - onChanged(); - } else { - kpiDescriptor_ = null; - kpiDescriptorBuilder_ = null; + public static device.Device.MonitoringSettings getDefaultInstance() { + return DEFAULT_INSTANCE; } - return this; - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - public monitoring.Monitoring.KpiDescriptor.Builder getKpiDescriptorBuilder() { - - onChanged(); - return getKpiDescriptorFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder() { - if (kpiDescriptorBuilder_ != null) { - return kpiDescriptorBuilder_.getMessageOrBuilder(); - } else { - return kpiDescriptor_ == null ? - monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; } - } - /** - * .monitoring.KpiDescriptor kpi_descriptor = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder> - getKpiDescriptorFieldBuilder() { - if (kpiDescriptorBuilder_ == null) { - kpiDescriptorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder>( - getKpiDescriptor(), - getParentForChildren(), - isClean()); - kpiDescriptor_ = null; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - return kpiDescriptorBuilder_; - } - - private float samplingDurationS_ ; - /** - * float sampling_duration_s = 3; - * @return The samplingDurationS. - */ - @java.lang.Override - public float getSamplingDurationS() { - return samplingDurationS_; - } - /** - * float sampling_duration_s = 3; - * @param value The samplingDurationS to set. - * @return This builder for chaining. - */ - public Builder setSamplingDurationS(float value) { - - samplingDurationS_ = value; - onChanged(); - return this; - } - /** - * float sampling_duration_s = 3; - * @return This builder for chaining. - */ - public Builder clearSamplingDurationS() { - - samplingDurationS_ = 0F; - onChanged(); - return this; - } - - private float samplingIntervalS_ ; - /** - * float sampling_interval_s = 4; - * @return The samplingIntervalS. - */ - @java.lang.Override - public float getSamplingIntervalS() { - return samplingIntervalS_; - } - /** - * float sampling_interval_s = 4; - * @param value The samplingIntervalS to set. - * @return This builder for chaining. - */ - public Builder setSamplingIntervalS(float value) { - - samplingIntervalS_ = value; - onChanged(); - return this; - } - /** - * float sampling_interval_s = 4; - * @return This builder for chaining. - */ - public Builder clearSamplingIntervalS() { - - samplingIntervalS_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:device.MonitoringSettings) - } - // @@protoc_insertion_point(class_scope:device.MonitoringSettings) - private static final device.Device.MonitoringSettings DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new device.Device.MonitoringSettings(); + @java.lang.Override + public device.Device.MonitoringSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static device.Device.MonitoringSettings getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_device_MonitoringSettings_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_device_MonitoringSettings_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - @java.lang.Override - public device.Device.MonitoringSettings getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_device_MonitoringSettings_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_device_MonitoringSettings_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\014device.proto\022\006device\032\rcontext.proto\032\020m" + - "onitoring.proto\"\244\001\n\022MonitoringSettings\022!" + - "\n\006kpi_id\030\001 \001(\0132\021.monitoring.KpiId\0221\n\016kpi" + - "_descriptor\030\002 \001(\0132\031.monitoring.KpiDescri" + - "ptor\022\033\n\023sampling_duration_s\030\003 \001(\002\022\033\n\023sam" + - "pling_interval_s\030\004 \001(\0022\262\002\n\rDeviceService" + - "\0221\n\tAddDevice\022\017.context.Device\032\021.context" + - ".DeviceId\"\000\0227\n\017ConfigureDevice\022\017.context" + - ".Device\032\021.context.DeviceId\"\000\0223\n\014DeleteDe" + - "vice\022\021.context.DeviceId\032\016.context.Empty\"" + - "\000\022>\n\020GetInitialConfig\022\021.context.DeviceId" + - "\032\025.context.DeviceConfig\"\000\022@\n\020MonitorDevi" + - "ceKpi\022\032.device.MonitoringSettings\032\016.cont" + - "ext.Empty\"\000b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - context.ContextOuterClass.getDescriptor(), - monitoring.Monitoring.getDescriptor(), - }); - internal_static_device_MonitoringSettings_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_device_MonitoringSettings_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_device_MonitoringSettings_descriptor, - new java.lang.String[] { "KpiId", "KpiDescriptor", "SamplingDurationS", "SamplingIntervalS", }); - context.ContextOuterClass.getDescriptor(); - monitoring.Monitoring.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) + static { + java.lang.String[] descriptorData = { "\n\014device.proto\022\006device\032\rcontext.proto\032\020m" + "onitoring.proto\"\244\001\n\022MonitoringSettings\022!" + "\n\006kpi_id\030\001 \001(\0132\021.monitoring.KpiId\0221\n\016kpi" + "_descriptor\030\002 \001(\0132\031.monitoring.KpiDescri" + "ptor\022\033\n\023sampling_duration_s\030\003 \001(\002\022\033\n\023sam" + "pling_interval_s\030\004 \001(\0022\262\002\n\rDeviceService" + "\0221\n\tAddDevice\022\017.context.Device\032\021.context" + ".DeviceId\"\000\0227\n\017ConfigureDevice\022\017.context" + ".Device\032\021.context.DeviceId\"\000\0223\n\014DeleteDe" + "vice\022\021.context.DeviceId\032\016.context.Empty\"" + "\000\022>\n\020GetInitialConfig\022\021.context.DeviceId" + "\032\025.context.DeviceConfig\"\000\022@\n\020MonitorDevi" + "ceKpi\022\032.device.MonitoringSettings\032\016.cont" + "ext.Empty\"\000b\006proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { context.ContextOuterClass.getDescriptor(), monitoring.Monitoring.getDescriptor() }); + internal_static_device_MonitoringSettings_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_device_MonitoringSettings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_device_MonitoringSettings_descriptor, new java.lang.String[] { "KpiId", "KpiDescriptor", "SamplingDurationS", "SamplingIntervalS" }); + context.ContextOuterClass.getDescriptor(); + monitoring.Monitoring.getDescriptor(); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/ztp/target/generated-sources/grpc/device/DeviceService.java b/src/ztp/target/generated-sources/grpc/device/DeviceService.java index 1768f9911b9d05a7c61e70d8f75e397f9a3341a4..e68e59d1ce0f85cb3ba865e031221ad42a536f38 100644 --- a/src/ztp/target/generated-sources/grpc/device/DeviceService.java +++ b/src/ztp/target/generated-sources/grpc/device/DeviceService.java @@ -1,24 +1,17 @@ package device; -import io.quarkus.grpc.runtime.MutinyService; +import io.quarkus.grpc.MutinyService; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: device.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: device.proto") public interface DeviceService extends MutinyService { - io.smallrye.mutiny.Uni addDevice(context.ContextOuterClass.Device request); - + io.smallrye.mutiny.Uni configureDevice(context.ContextOuterClass.Device request); - + io.smallrye.mutiny.Uni deleteDevice(context.ContextOuterClass.DeviceId request); - + io.smallrye.mutiny.Uni getInitialConfig(context.ContextOuterClass.DeviceId request); - - io.smallrye.mutiny.Uni monitorDeviceKpi(device.Device.MonitoringSettings request); - - - -} \ No newline at end of file + io.smallrye.mutiny.Uni monitorDeviceKpi(device.Device.MonitoringSettings request); +} diff --git a/src/ztp/target/generated-sources/grpc/device/DeviceServiceBean.java b/src/ztp/target/generated-sources/grpc/device/DeviceServiceBean.java index c7e767237abc22ff273cc454f1433e5f811382fc..45df139991757cf6314ade0bb985605da95a4618 100644 --- a/src/ztp/target/generated-sources/grpc/device/DeviceServiceBean.java +++ b/src/ztp/target/generated-sources/grpc/device/DeviceServiceBean.java @@ -2,58 +2,59 @@ package device; import io.grpc.BindableService; import io.quarkus.grpc.GrpcService; -import io.quarkus.grpc.runtime.MutinyBean; +import io.quarkus.grpc.MutinyBean; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: device.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: device.proto") public class DeviceServiceBean extends MutinyDeviceServiceGrpc.DeviceServiceImplBase implements BindableService, MutinyBean { private final DeviceService delegate; DeviceServiceBean(@GrpcService DeviceService delegate) { - this.delegate = delegate; + this.delegate = delegate; } @Override public io.smallrye.mutiny.Uni addDevice(context.ContextOuterClass.Device request) { - try { - return delegate.addDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.addDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni configureDevice(context.ContextOuterClass.Device request) { - try { - return delegate.configureDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.configureDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni deleteDevice(context.ContextOuterClass.DeviceId request) { - try { - return delegate.deleteDevice(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.deleteDevice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getInitialConfig(context.ContextOuterClass.DeviceId request) { - try { - return delegate.getInitialConfig(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getInitialConfig(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni monitorDeviceKpi(device.Device.MonitoringSettings request) { - try { - return delegate.monitorDeviceKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.monitorDeviceKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } - -} \ No newline at end of file +} diff --git a/src/ztp/target/generated-sources/grpc/device/DeviceServiceClient.java b/src/ztp/target/generated-sources/grpc/device/DeviceServiceClient.java index 2445752a6392c3f6f9df0b0ef439d789e6a8d925..d832820b2fe861621cf0e0361e203c71be57485a 100644 --- a/src/ztp/target/generated-sources/grpc/device/DeviceServiceClient.java +++ b/src/ztp/target/generated-sources/grpc/device/DeviceServiceClient.java @@ -1,44 +1,52 @@ package device; import java.util.function.BiFunction; +import io.quarkus.grpc.MutinyClient; -import io.quarkus.grpc.runtime.MutinyClient; - -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: device.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: device.proto") public class DeviceServiceClient implements DeviceService, MutinyClient { private final MutinyDeviceServiceGrpc.MutinyDeviceServiceStub stub; public DeviceServiceClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) { - this.stub = stubConfigurator.apply(name,MutinyDeviceServiceGrpc.newMutinyStub(channel)); + this.stub = stubConfigurator.apply(name, MutinyDeviceServiceGrpc.newMutinyStub(channel)); + } + + private DeviceServiceClient(MutinyDeviceServiceGrpc.MutinyDeviceServiceStub stub) { + this.stub = stub; + } + + public DeviceServiceClient newInstanceWithStub(MutinyDeviceServiceGrpc.MutinyDeviceServiceStub stub) { + return new DeviceServiceClient(stub); } @Override public MutinyDeviceServiceGrpc.MutinyDeviceServiceStub getStub() { - return stub; + return stub; } @Override public io.smallrye.mutiny.Uni addDevice(context.ContextOuterClass.Device request) { - return stub.addDevice(request); + return stub.addDevice(request); } + @Override public io.smallrye.mutiny.Uni configureDevice(context.ContextOuterClass.Device request) { - return stub.configureDevice(request); + return stub.configureDevice(request); } + @Override public io.smallrye.mutiny.Uni deleteDevice(context.ContextOuterClass.DeviceId request) { - return stub.deleteDevice(request); + return stub.deleteDevice(request); } + @Override public io.smallrye.mutiny.Uni getInitialConfig(context.ContextOuterClass.DeviceId request) { - return stub.getInitialConfig(request); + return stub.getInitialConfig(request); } + @Override public io.smallrye.mutiny.Uni monitorDeviceKpi(device.Device.MonitoringSettings request) { - return stub.monitorDeviceKpi(request); + return stub.monitorDeviceKpi(request); } - -} \ No newline at end of file +} diff --git a/src/ztp/target/generated-sources/grpc/device/DeviceServiceGrpc.java b/src/ztp/target/generated-sources/grpc/device/DeviceServiceGrpc.java index 9c2e379d311a58ca51c9208feba359120c086c0e..a6886d8d620182790146164fbfef36762cf4368b 100644 --- a/src/ztp/target/generated-sources/grpc/device/DeviceServiceGrpc.java +++ b/src/ztp/target/generated-sources/grpc/device/DeviceServiceGrpc.java @@ -4,568 +4,407 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@javax.annotation.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.38.1)", comments = "Source: device.proto") public final class DeviceServiceGrpc { - private DeviceServiceGrpc() {} + private DeviceServiceGrpc() { + } - public static final String SERVICE_NAME = "device.DeviceService"; + public static final String SERVICE_NAME = "device.DeviceService"; - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getAddDeviceMethod; + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getAddDeviceMethod; - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AddDevice", - requestType = context.ContextOuterClass.Device.class, - responseType = context.ContextOuterClass.DeviceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAddDeviceMethod() { - io.grpc.MethodDescriptor getAddDeviceMethod; - if ((getAddDeviceMethod = DeviceServiceGrpc.getAddDeviceMethod) == null) { - synchronized (DeviceServiceGrpc.class) { + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "AddDevice", requestType = context.ContextOuterClass.Device.class, responseType = context.ContextOuterClass.DeviceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAddDeviceMethod() { + io.grpc.MethodDescriptor getAddDeviceMethod; if ((getAddDeviceMethod = DeviceServiceGrpc.getAddDeviceMethod) == null) { - DeviceServiceGrpc.getAddDeviceMethod = getAddDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Device.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("AddDevice")) - .build(); - } - } + synchronized (DeviceServiceGrpc.class) { + if ((getAddDeviceMethod = DeviceServiceGrpc.getAddDeviceMethod) == null) { + DeviceServiceGrpc.getAddDeviceMethod = getAddDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Device.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("AddDevice")).build(); + } + } + } + return getAddDeviceMethod; } - return getAddDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getConfigureDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ConfigureDevice", - requestType = context.ContextOuterClass.Device.class, - responseType = context.ContextOuterClass.DeviceId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getConfigureDeviceMethod() { - io.grpc.MethodDescriptor getConfigureDeviceMethod; - if ((getConfigureDeviceMethod = DeviceServiceGrpc.getConfigureDeviceMethod) == null) { - synchronized (DeviceServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getConfigureDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ConfigureDevice", requestType = context.ContextOuterClass.Device.class, responseType = context.ContextOuterClass.DeviceId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getConfigureDeviceMethod() { + io.grpc.MethodDescriptor getConfigureDeviceMethod; if ((getConfigureDeviceMethod = DeviceServiceGrpc.getConfigureDeviceMethod) == null) { - DeviceServiceGrpc.getConfigureDeviceMethod = getConfigureDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ConfigureDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Device.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("ConfigureDevice")) - .build(); - } - } + synchronized (DeviceServiceGrpc.class) { + if ((getConfigureDeviceMethod = DeviceServiceGrpc.getConfigureDeviceMethod) == null) { + DeviceServiceGrpc.getConfigureDeviceMethod = getConfigureDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ConfigureDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Device.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("ConfigureDevice")).build(); + } + } + } + return getConfigureDeviceMethod; } - return getConfigureDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteDeviceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteDevice", - requestType = context.ContextOuterClass.DeviceId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteDeviceMethod() { - io.grpc.MethodDescriptor getDeleteDeviceMethod; - if ((getDeleteDeviceMethod = DeviceServiceGrpc.getDeleteDeviceMethod) == null) { - synchronized (DeviceServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getDeleteDeviceMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteDevice", requestType = context.ContextOuterClass.DeviceId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteDeviceMethod() { + io.grpc.MethodDescriptor getDeleteDeviceMethod; if ((getDeleteDeviceMethod = DeviceServiceGrpc.getDeleteDeviceMethod) == null) { - DeviceServiceGrpc.getDeleteDeviceMethod = getDeleteDeviceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDevice")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("DeleteDevice")) - .build(); - } - } + synchronized (DeviceServiceGrpc.class) { + if ((getDeleteDeviceMethod = DeviceServiceGrpc.getDeleteDeviceMethod) == null) { + DeviceServiceGrpc.getDeleteDeviceMethod = getDeleteDeviceMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDevice")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("DeleteDevice")).build(); + } + } + } + return getDeleteDeviceMethod; } - return getDeleteDeviceMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetInitialConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetInitialConfig", - requestType = context.ContextOuterClass.DeviceId.class, - responseType = context.ContextOuterClass.DeviceConfig.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetInitialConfigMethod() { - io.grpc.MethodDescriptor getGetInitialConfigMethod; - if ((getGetInitialConfigMethod = DeviceServiceGrpc.getGetInitialConfigMethod) == null) { - synchronized (DeviceServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetInitialConfigMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetInitialConfig", requestType = context.ContextOuterClass.DeviceId.class, responseType = context.ContextOuterClass.DeviceConfig.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetInitialConfigMethod() { + io.grpc.MethodDescriptor getGetInitialConfigMethod; if ((getGetInitialConfigMethod = DeviceServiceGrpc.getGetInitialConfigMethod) == null) { - DeviceServiceGrpc.getGetInitialConfigMethod = getGetInitialConfigMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInitialConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceConfig.getDefaultInstance())) - .setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("GetInitialConfig")) - .build(); - } - } - } - return getGetInitialConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor getMonitorDeviceKpiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "MonitorDeviceKpi", - requestType = device.Device.MonitoringSettings.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getMonitorDeviceKpiMethod() { - io.grpc.MethodDescriptor getMonitorDeviceKpiMethod; - if ((getMonitorDeviceKpiMethod = DeviceServiceGrpc.getMonitorDeviceKpiMethod) == null) { - synchronized (DeviceServiceGrpc.class) { - if ((getMonitorDeviceKpiMethod = DeviceServiceGrpc.getMonitorDeviceKpiMethod) == null) { - DeviceServiceGrpc.getMonitorDeviceKpiMethod = getMonitorDeviceKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MonitorDeviceKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - device.Device.MonitoringSettings.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("MonitorDeviceKpi")) - .build(); - } - } - } - return getMonitorDeviceKpiMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static DeviceServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DeviceServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DeviceServiceStub(channel, callOptions); - } - }; - return DeviceServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static DeviceServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DeviceServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DeviceServiceBlockingStub(channel, callOptions); - } - }; - return DeviceServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static DeviceServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DeviceServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DeviceServiceFutureStub(channel, callOptions); + synchronized (DeviceServiceGrpc.class) { + if ((getGetInitialConfigMethod = DeviceServiceGrpc.getGetInitialConfigMethod) == null) { + DeviceServiceGrpc.getGetInitialConfigMethod = getGetInitialConfigMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInitialConfig")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceConfig.getDefaultInstance())).setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("GetInitialConfig")).build(); + } + } } - }; - return DeviceServiceFutureStub.newStub(factory, channel); - } + return getGetInitialConfigMethod; + } - /** - */ - public static abstract class DeviceServiceImplBase implements io.grpc.BindableService { + private static volatile io.grpc.MethodDescriptor getMonitorDeviceKpiMethod; - /** - */ - public void addDevice(context.ContextOuterClass.Device request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddDeviceMethod(), responseObserver); + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "MonitorDeviceKpi", requestType = device.Device.MonitoringSettings.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getMonitorDeviceKpiMethod() { + io.grpc.MethodDescriptor getMonitorDeviceKpiMethod; + if ((getMonitorDeviceKpiMethod = DeviceServiceGrpc.getMonitorDeviceKpiMethod) == null) { + synchronized (DeviceServiceGrpc.class) { + if ((getMonitorDeviceKpiMethod = DeviceServiceGrpc.getMonitorDeviceKpiMethod) == null) { + DeviceServiceGrpc.getMonitorDeviceKpiMethod = getMonitorDeviceKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "MonitorDeviceKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(device.Device.MonitoringSettings.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new DeviceServiceMethodDescriptorSupplier("MonitorDeviceKpi")).build(); + } + } + } + return getMonitorDeviceKpiMethod; } /** + * Creates a new async stub that supports all call types for the service */ - public void configureDevice(context.ContextOuterClass.Device request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getConfigureDeviceMethod(), responseObserver); + public static DeviceServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public DeviceServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeviceServiceStub(channel, callOptions); + } + }; + return DeviceServiceStub.newStub(factory, channel); } /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public void deleteDevice(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteDeviceMethod(), responseObserver); + public static DeviceServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public DeviceServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeviceServiceBlockingStub(channel, callOptions); + } + }; + return DeviceServiceBlockingStub.newStub(factory, channel); } /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public void getInitialConfig(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInitialConfigMethod(), responseObserver); + public static DeviceServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public DeviceServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeviceServiceFutureStub(channel, callOptions); + } + }; + return DeviceServiceFutureStub.newStub(factory, channel); } /** */ - public void monitorDeviceKpi(device.Device.MonitoringSettings request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorDeviceKpiMethod(), responseObserver); - } + public static abstract class DeviceServiceImplBase implements io.grpc.BindableService { - @java.lang.Override public final 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(); - } - } - - /** - */ - public static final class DeviceServiceStub extends io.grpc.stub.AbstractAsyncStub { - private DeviceServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void addDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddDeviceMethod(), responseObserver); + } - @java.lang.Override - protected DeviceServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DeviceServiceStub(channel, callOptions); - } + /** + */ + public void configureDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getConfigureDeviceMethod(), responseObserver); + } - /** - */ - public void addDevice(context.ContextOuterClass.Device request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAddDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void deleteDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteDeviceMethod(), responseObserver); + } - /** - */ - public void configureDevice(context.ContextOuterClass.Device request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getConfigureDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getInitialConfig(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInitialConfigMethod(), responseObserver); + } - /** - */ - public void deleteDevice(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteDeviceMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void monitorDeviceKpi(device.Device.MonitoringSettings request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorDeviceKpiMethod(), responseObserver); + } - /** - */ - public void getInitialConfig(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetInitialConfigMethod(), getCallOptions()), request, responseObserver); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getAddDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ADD_DEVICE))).addMethod(getConfigureDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_CONFIGURE_DEVICE))).addMethod(getDeleteDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_DEVICE))).addMethod(getGetInitialConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_INITIAL_CONFIG))).addMethod(getMonitorDeviceKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_MONITOR_DEVICE_KPI))).build(); + } } /** */ - public void monitorDeviceKpi(device.Device.MonitoringSettings request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getMonitorDeviceKpiMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - */ - public static final class DeviceServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private DeviceServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + public static class DeviceServiceStub extends io.grpc.stub.AbstractAsyncStub { - @java.lang.Override - protected DeviceServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DeviceServiceBlockingStub(channel, callOptions); - } + private DeviceServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public context.ContextOuterClass.DeviceId addDevice(context.ContextOuterClass.Device request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getAddDeviceMethod(), getCallOptions(), request); - } + @java.lang.Override + protected DeviceServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeviceServiceStub(channel, callOptions); + } - /** - */ - public context.ContextOuterClass.DeviceId configureDevice(context.ContextOuterClass.Device request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getConfigureDeviceMethod(), getCallOptions(), request); - } + /** + */ + public void addDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getAddDeviceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty deleteDevice(context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteDeviceMethod(), getCallOptions(), request); - } + /** + */ + public void configureDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getConfigureDeviceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.DeviceConfig getInitialConfig(context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetInitialConfigMethod(), getCallOptions(), request); - } + /** + */ + public void deleteDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteDeviceMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty monitorDeviceKpi(device.Device.MonitoringSettings request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getMonitorDeviceKpiMethod(), getCallOptions(), request); - } - } - - /** - */ - public static final class DeviceServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private DeviceServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void getInitialConfig(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetInitialConfigMethod(), getCallOptions()), request, responseObserver); + } - @java.lang.Override - protected DeviceServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DeviceServiceFutureStub(channel, callOptions); + /** + */ + public void monitorDeviceKpi(device.Device.MonitoringSettings request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getMonitorDeviceKpiMethod(), getCallOptions()), request, responseObserver); + } } /** */ - public com.google.common.util.concurrent.ListenableFuture addDevice( - context.ContextOuterClass.Device request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getAddDeviceMethod(), getCallOptions()), request); - } + public static class DeviceServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - /** - */ - public com.google.common.util.concurrent.ListenableFuture configureDevice( - context.ContextOuterClass.Device request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getConfigureDeviceMethod(), getCallOptions()), request); - } + private DeviceServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture deleteDevice( - context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteDeviceMethod(), getCallOptions()), request); - } + @java.lang.Override + protected DeviceServiceBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeviceServiceBlockingStub(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getInitialConfig( - context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetInitialConfigMethod(), getCallOptions()), request); + /** + */ + public context.ContextOuterClass.DeviceId addDevice(context.ContextOuterClass.Device request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getAddDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.DeviceId configureDevice(context.ContextOuterClass.Device request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getConfigureDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty deleteDevice(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteDeviceMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.DeviceConfig getInitialConfig(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetInitialConfigMethod(), getCallOptions(), request); + } + + /** + */ + public context.ContextOuterClass.Empty monitorDeviceKpi(device.Device.MonitoringSettings request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getMonitorDeviceKpiMethod(), getCallOptions(), request); + } } /** */ - public com.google.common.util.concurrent.ListenableFuture monitorDeviceKpi( - device.Device.MonitoringSettings request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getMonitorDeviceKpiMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_ADD_DEVICE = 0; - private static final int METHODID_CONFIGURE_DEVICE = 1; - private static final int METHODID_DELETE_DEVICE = 2; - private static final int METHODID_GET_INITIAL_CONFIG = 3; - private static final int METHODID_MONITOR_DEVICE_KPI = 4; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final DeviceServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(DeviceServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } + public static class DeviceServiceFutureStub extends io.grpc.stub.AbstractFutureStub { + + private DeviceServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeviceServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeviceServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture addDevice(context.ContextOuterClass.Device request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getAddDeviceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture configureDevice(context.ContextOuterClass.Device request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getConfigureDeviceMethod(), getCallOptions()), request); + } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_ADD_DEVICE: - serviceImpl.addDevice((context.ContextOuterClass.Device) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CONFIGURE_DEVICE: - serviceImpl.configureDevice((context.ContextOuterClass.Device) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_DEVICE: - serviceImpl.deleteDevice((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_INITIAL_CONFIG: - serviceImpl.getInitialConfig((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_MONITOR_DEVICE_KPI: - serviceImpl.monitorDeviceKpi((device.Device.MonitoringSettings) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteDevice(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteDeviceMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getInitialConfig(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetInitialConfigMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture monitorDeviceKpi(device.Device.MonitoringSettings request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getMonitorDeviceKpiMethod(), getCallOptions()), request); + } } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } + private static final int METHODID_ADD_DEVICE = 0; + + private static final int METHODID_CONFIGURE_DEVICE = 1; + + private static final int METHODID_DELETE_DEVICE = 2; + + private static final int METHODID_GET_INITIAL_CONFIG = 3; + + private static final int METHODID_MONITOR_DEVICE_KPI = 4; + + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + + private final DeviceServiceImplBase serviceImpl; + + private final int methodId; + + MethodHandlers(DeviceServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + case METHODID_ADD_DEVICE: + serviceImpl.addDevice((context.ContextOuterClass.Device) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CONFIGURE_DEVICE: + serviceImpl.configureDevice((context.ContextOuterClass.Device) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DEVICE: + serviceImpl.deleteDevice((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_INITIAL_CONFIG: + serviceImpl.getInitialConfig((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_MONITOR_DEVICE_KPI: + serviceImpl.monitorDeviceKpi((device.Device.MonitoringSettings) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + default: + throw new AssertionError(); + } + } } - } - private static abstract class DeviceServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - DeviceServiceBaseDescriptorSupplier() {} + private static abstract class DeviceServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + + DeviceServiceBaseDescriptorSupplier() { + } - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return device.Device.getDescriptor(); + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return device.Device.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DeviceService"); + } } - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("DeviceService"); + private static final class DeviceServiceFileDescriptorSupplier extends DeviceServiceBaseDescriptorSupplier { + + DeviceServiceFileDescriptorSupplier() { + } } - } - private static final class DeviceServiceFileDescriptorSupplier - extends DeviceServiceBaseDescriptorSupplier { - DeviceServiceFileDescriptorSupplier() {} - } + private static final class DeviceServiceMethodDescriptorSupplier extends DeviceServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private static final class DeviceServiceMethodDescriptorSupplier - extends DeviceServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final String methodName; - DeviceServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } + DeviceServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } } - } - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (DeviceServiceGrpc.class) { - result = serviceDescriptor; + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new DeviceServiceFileDescriptorSupplier()) - .addMethod(getAddDeviceMethod()) - .addMethod(getConfigureDeviceMethod()) - .addMethod(getDeleteDeviceMethod()) - .addMethod(getGetInitialConfigMethod()) - .addMethod(getMonitorDeviceKpiMethod()) - .build(); - } - } + synchronized (DeviceServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new DeviceServiceFileDescriptorSupplier()).addMethod(getAddDeviceMethod()).addMethod(getConfigureDeviceMethod()).addMethod(getDeleteDeviceMethod()).addMethod(getGetInitialConfigMethod()).addMethod(getMonitorDeviceKpiMethod()).build(); + } + } + } + return result; } - return result; - } } diff --git a/src/ztp/target/generated-sources/grpc/device/MutinyDeviceServiceGrpc.java b/src/ztp/target/generated-sources/grpc/device/MutinyDeviceServiceGrpc.java index 096784b5a39fa66afbe2ff5402b8beec6c294730..e59fc5ae262a6bc85d6cdd64b981cce3a138fb63 100644 --- a/src/ztp/target/generated-sources/grpc/device/MutinyDeviceServiceGrpc.java +++ b/src/ztp/target/generated-sources/grpc/device/MutinyDeviceServiceGrpc.java @@ -6,18 +6,18 @@ import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: device.proto") -public final class MutinyDeviceServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc { - private MutinyDeviceServiceGrpc() {} +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: device.proto") +public final class MutinyDeviceServiceGrpc implements io.quarkus.grpc.MutinyGrpc { + + private MutinyDeviceServiceGrpc() { + } public static MutinyDeviceServiceStub newMutinyStub(io.grpc.Channel channel) { return new MutinyDeviceServiceStub(channel); } - - public static final class MutinyDeviceServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub { + public static class MutinyDeviceServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.MutinyStub { + private DeviceServiceGrpc.DeviceServiceStub delegateStub; private MutinyDeviceServiceStub(io.grpc.Channel channel) { @@ -35,127 +35,83 @@ public final class MutinyDeviceServiceGrpc implements io.quarkus.grpc.runtime.Mu return new MutinyDeviceServiceStub(channel, callOptions); } - public io.smallrye.mutiny.Uni addDevice(context.ContextOuterClass.Device request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::addDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::addDevice); } - public io.smallrye.mutiny.Uni configureDevice(context.ContextOuterClass.Device request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::configureDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::configureDevice); } - public io.smallrye.mutiny.Uni deleteDevice(context.ContextOuterClass.DeviceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::deleteDevice); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteDevice); } - public io.smallrye.mutiny.Uni getInitialConfig(context.ContextOuterClass.DeviceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getInitialConfig); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getInitialConfig); } - public io.smallrye.mutiny.Uni monitorDeviceKpi(device.Device.MonitoringSettings request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::monitorDeviceKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::monitorDeviceKpi); } - } - public static abstract class DeviceServiceImplBase implements io.grpc.BindableService { private String compression; + /** - * Set whether the server will try to use a compressed response. - * - * @param compression the compression, e.g {@code gzip} - */ + * Set whether the server will try to use a compressed response. + * + * @param compression the compression, e.g {@code gzip} + */ public DeviceServiceImplBase withCompression(String compression) { - this.compression = compression; - return this; + this.compression = compression; + return this; } - - public io.smallrye.mutiny.Uni addDevice(context.ContextOuterClass.Device request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni configureDevice(context.ContextOuterClass.Device request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni deleteDevice(context.ContextOuterClass.DeviceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getInitialConfig(context.ContextOuterClass.DeviceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni monitorDeviceKpi(device.Device.MonitoringSettings request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - device.DeviceServiceGrpc.getAddDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Device, - context.ContextOuterClass.DeviceId>( - this, METHODID_ADD_DEVICE, compression))) - .addMethod( - device.DeviceServiceGrpc.getConfigureDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Device, - context.ContextOuterClass.DeviceId>( - this, METHODID_CONFIGURE_DEVICE, compression))) - .addMethod( - device.DeviceServiceGrpc.getDeleteDeviceMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceId, - context.ContextOuterClass.Empty>( - this, METHODID_DELETE_DEVICE, compression))) - .addMethod( - device.DeviceServiceGrpc.getGetInitialConfigMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceId, - context.ContextOuterClass.DeviceConfig>( - this, METHODID_GET_INITIAL_CONFIG, compression))) - .addMethod( - device.DeviceServiceGrpc.getMonitorDeviceKpiMethod(), - asyncUnaryCall( - new MethodHandlers< - device.Device.MonitoringSettings, - context.ContextOuterClass.Empty>( - this, METHODID_MONITOR_DEVICE_KPI, compression))) - .build(); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(device.DeviceServiceGrpc.getAddDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_ADD_DEVICE, compression))).addMethod(device.DeviceServiceGrpc.getConfigureDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_CONFIGURE_DEVICE, compression))).addMethod(device.DeviceServiceGrpc.getDeleteDeviceMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_DEVICE, compression))).addMethod(device.DeviceServiceGrpc.getGetInitialConfigMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_INITIAL_CONFIG, compression))).addMethod(device.DeviceServiceGrpc.getMonitorDeviceKpiMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_MONITOR_DEVICE_KPI, compression))).build(); } } private static final int METHODID_ADD_DEVICE = 0; + private static final int METHODID_CONFIGURE_DEVICE = 1; + private static final int METHODID_DELETE_DEVICE = 2; + private static final int METHODID_GET_INITIAL_CONFIG = 3; + private static final int METHODID_MONITOR_DEVICE_KPI = 4; - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final DeviceServiceImplBase serviceImpl; + private final int methodId; + private final String compression; MethodHandlers(DeviceServiceImplBase serviceImpl, int methodId, String compression) { @@ -167,36 +123,21 @@ public final class MutinyDeviceServiceGrpc implements io.quarkus.grpc.runtime.Mu @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { case METHODID_ADD_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Device) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::addDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Device) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::addDevice); break; case METHODID_CONFIGURE_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Device) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::configureDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Device) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::configureDevice); break; case METHODID_DELETE_DEVICE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::deleteDevice); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteDevice); break; case METHODID_GET_INITIAL_CONFIG: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getInitialConfig); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getInitialConfig); break; case METHODID_MONITOR_DEVICE_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((device.Device.MonitoringSettings) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::monitorDeviceKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((device.Device.MonitoringSettings) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::monitorDeviceKpi); break; default: throw new java.lang.AssertionError(); @@ -206,11 +147,10 @@ public final class MutinyDeviceServiceGrpc implements io.quarkus.grpc.runtime.Mu @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { default: throw new java.lang.AssertionError(); } } } - -} \ No newline at end of file +} diff --git a/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java b/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java index 98bdbbd2c364953df27694a839eff3e8f0e1c114..9621efb4beed8543be18a4bd369de73f52b2e076 100644 --- a/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java +++ b/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java @@ -1,310 +1,311 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: kpi_sample_types.proto - package kpi_sample_types; public final class KpiSampleTypes { - private KpiSampleTypes() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * Protobuf enum {@code kpi_sample_types.KpiSampleType} - */ - public enum KpiSampleType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * KPISAMPLETYPE_UNKNOWN = 0; - */ - KPISAMPLETYPE_UNKNOWN(0), - /** - * KPISAMPLETYPE_PACKETS_TRANSMITTED = 101; - */ - KPISAMPLETYPE_PACKETS_TRANSMITTED(101), - /** - * KPISAMPLETYPE_PACKETS_RECEIVED = 102; - */ - KPISAMPLETYPE_PACKETS_RECEIVED(102), - /** - * KPISAMPLETYPE_PACKETS_DROPPED = 103; - */ - KPISAMPLETYPE_PACKETS_DROPPED(103), - /** - * KPISAMPLETYPE_BYTES_TRANSMITTED = 201; - */ - KPISAMPLETYPE_BYTES_TRANSMITTED(201), - /** - * KPISAMPLETYPE_BYTES_RECEIVED = 202; - */ - KPISAMPLETYPE_BYTES_RECEIVED(202), - /** - * KPISAMPLETYPE_BYTES_DROPPED = 203; - */ - KPISAMPLETYPE_BYTES_DROPPED(203), - /** - * KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301; - */ - KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS(301), - /** - * KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302; - */ - KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS(302), - /** - *
-     *. can be used by both optical and L3 without any issue
-     * 
- * - * KPISAMPLETYPE_ML_CONFIDENCE = 401; - */ - KPISAMPLETYPE_ML_CONFIDENCE(401), - /** - *
-     *. can be used by both optical and L3 without any issue
-     * 
- * - * KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501; - */ - KPISAMPLETYPE_OPTICAL_SECURITY_STATUS(501), - /** - * KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601; - */ - KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS(601), - /** - * KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602; - */ - KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS(602), - /** - * KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603; - */ - KPISAMPLETYPE_L3_UNIQUE_ATTACKERS(603), - /** - * KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604; - */ - KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS(604), - /** - * KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; - */ - KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO(605), - /** - * KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; - */ - KPISAMPLETYPE_SERVICE_LATENCY_MS(701), - UNRECOGNIZED(-1), - ; - - /** - * KPISAMPLETYPE_UNKNOWN = 0; - */ - public static final int KPISAMPLETYPE_UNKNOWN_VALUE = 0; - /** - * KPISAMPLETYPE_PACKETS_TRANSMITTED = 101; - */ - public static final int KPISAMPLETYPE_PACKETS_TRANSMITTED_VALUE = 101; - /** - * KPISAMPLETYPE_PACKETS_RECEIVED = 102; - */ - public static final int KPISAMPLETYPE_PACKETS_RECEIVED_VALUE = 102; - /** - * KPISAMPLETYPE_PACKETS_DROPPED = 103; - */ - public static final int KPISAMPLETYPE_PACKETS_DROPPED_VALUE = 103; - /** - * KPISAMPLETYPE_BYTES_TRANSMITTED = 201; - */ - public static final int KPISAMPLETYPE_BYTES_TRANSMITTED_VALUE = 201; - /** - * KPISAMPLETYPE_BYTES_RECEIVED = 202; - */ - public static final int KPISAMPLETYPE_BYTES_RECEIVED_VALUE = 202; - /** - * KPISAMPLETYPE_BYTES_DROPPED = 203; - */ - public static final int KPISAMPLETYPE_BYTES_DROPPED_VALUE = 203; - /** - * KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301; - */ - public static final int KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS_VALUE = 301; - /** - * KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302; - */ - public static final int KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS_VALUE = 302; - /** - *
-     *. can be used by both optical and L3 without any issue
-     * 
- * - * KPISAMPLETYPE_ML_CONFIDENCE = 401; - */ - public static final int KPISAMPLETYPE_ML_CONFIDENCE_VALUE = 401; - /** - *
-     *. can be used by both optical and L3 without any issue
-     * 
- * - * KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501; - */ - public static final int KPISAMPLETYPE_OPTICAL_SECURITY_STATUS_VALUE = 501; - /** - * KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601; - */ - public static final int KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS_VALUE = 601; - /** - * KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602; - */ - public static final int KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS_VALUE = 602; - /** - * KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603; - */ - public static final int KPISAMPLETYPE_L3_UNIQUE_ATTACKERS_VALUE = 603; - /** - * KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604; - */ - public static final int KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS_VALUE = 604; - /** - * KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; - */ - public static final int KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO_VALUE = 605; - /** - * KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; - */ - public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_VALUE = 701; + private KpiSampleTypes() { + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static KpiSampleType valueOf(int value) { - return forNumber(value); + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code kpi_sample_types.KpiSampleType} */ - public static KpiSampleType forNumber(int value) { - switch (value) { - case 0: return KPISAMPLETYPE_UNKNOWN; - case 101: return KPISAMPLETYPE_PACKETS_TRANSMITTED; - case 102: return KPISAMPLETYPE_PACKETS_RECEIVED; - case 103: return KPISAMPLETYPE_PACKETS_DROPPED; - case 201: return KPISAMPLETYPE_BYTES_TRANSMITTED; - case 202: return KPISAMPLETYPE_BYTES_RECEIVED; - case 203: return KPISAMPLETYPE_BYTES_DROPPED; - case 301: return KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS; - case 302: return KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS; - case 401: return KPISAMPLETYPE_ML_CONFIDENCE; - case 501: return KPISAMPLETYPE_OPTICAL_SECURITY_STATUS; - case 601: return KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS; - case 602: return KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS; - case 603: return KPISAMPLETYPE_L3_UNIQUE_ATTACKERS; - case 604: return KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS; - case 605: return KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO; - case 701: return KPISAMPLETYPE_SERVICE_LATENCY_MS; - default: return null; - } - } + public enum KpiSampleType implements com.google.protobuf.ProtocolMessageEnum { + + /** + * KPISAMPLETYPE_UNKNOWN = 0; + */ + KPISAMPLETYPE_UNKNOWN(0), + /** + * KPISAMPLETYPE_PACKETS_TRANSMITTED = 101; + */ + KPISAMPLETYPE_PACKETS_TRANSMITTED(101), + /** + * KPISAMPLETYPE_PACKETS_RECEIVED = 102; + */ + KPISAMPLETYPE_PACKETS_RECEIVED(102), + /** + * KPISAMPLETYPE_PACKETS_DROPPED = 103; + */ + KPISAMPLETYPE_PACKETS_DROPPED(103), + /** + * KPISAMPLETYPE_BYTES_TRANSMITTED = 201; + */ + KPISAMPLETYPE_BYTES_TRANSMITTED(201), + /** + * KPISAMPLETYPE_BYTES_RECEIVED = 202; + */ + KPISAMPLETYPE_BYTES_RECEIVED(202), + /** + * KPISAMPLETYPE_BYTES_DROPPED = 203; + */ + KPISAMPLETYPE_BYTES_DROPPED(203), + /** + * KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301; + */ + KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS(301), + /** + * KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302; + */ + KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS(302), + /** + *
+         * . can be used by both optical and L3 without any issue
+         *  
+ * + * KPISAMPLETYPE_ML_CONFIDENCE = 401; + */ + KPISAMPLETYPE_ML_CONFIDENCE(401), + /** + *
+         * . can be used by both optical and L3 without any issue
+         *  
+ * + * KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501; + */ + KPISAMPLETYPE_OPTICAL_SECURITY_STATUS(501), + /** + * KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601; + */ + KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS(601), + /** + * KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602; + */ + KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS(602), + /** + * KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603; + */ + KPISAMPLETYPE_L3_UNIQUE_ATTACKERS(603), + /** + * KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604; + */ + KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS(604), + /** + * KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; + */ + KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO(605), + /** + * KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; + */ + KPISAMPLETYPE_SERVICE_LATENCY_MS(701), + UNRECOGNIZED(-1); + + /** + * KPISAMPLETYPE_UNKNOWN = 0; + */ + public static final int KPISAMPLETYPE_UNKNOWN_VALUE = 0; + + /** + * KPISAMPLETYPE_PACKETS_TRANSMITTED = 101; + */ + public static final int KPISAMPLETYPE_PACKETS_TRANSMITTED_VALUE = 101; + + /** + * KPISAMPLETYPE_PACKETS_RECEIVED = 102; + */ + public static final int KPISAMPLETYPE_PACKETS_RECEIVED_VALUE = 102; + + /** + * KPISAMPLETYPE_PACKETS_DROPPED = 103; + */ + public static final int KPISAMPLETYPE_PACKETS_DROPPED_VALUE = 103; + + /** + * KPISAMPLETYPE_BYTES_TRANSMITTED = 201; + */ + public static final int KPISAMPLETYPE_BYTES_TRANSMITTED_VALUE = 201; + + /** + * KPISAMPLETYPE_BYTES_RECEIVED = 202; + */ + public static final int KPISAMPLETYPE_BYTES_RECEIVED_VALUE = 202; + + /** + * KPISAMPLETYPE_BYTES_DROPPED = 203; + */ + public static final int KPISAMPLETYPE_BYTES_DROPPED_VALUE = 203; + + /** + * KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301; + */ + public static final int KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS_VALUE = 301; + + /** + * KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302; + */ + public static final int KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS_VALUE = 302; + + /** + *
+         * . can be used by both optical and L3 without any issue
+         *  
+ * + * KPISAMPLETYPE_ML_CONFIDENCE = 401; + */ + public static final int KPISAMPLETYPE_ML_CONFIDENCE_VALUE = 401; + + /** + *
+         * . can be used by both optical and L3 without any issue
+         *  
+ * + * KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501; + */ + public static final int KPISAMPLETYPE_OPTICAL_SECURITY_STATUS_VALUE = 501; + + /** + * KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601; + */ + public static final int KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS_VALUE = 601; + + /** + * KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602; + */ + public static final int KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS_VALUE = 602; + + /** + * KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603; + */ + public static final int KPISAMPLETYPE_L3_UNIQUE_ATTACKERS_VALUE = 603; + + /** + * KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604; + */ + public static final int KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS_VALUE = 604; + + /** + * KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605; + */ + public static final int KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO_VALUE = 605; + + /** + * KPISAMPLETYPE_SERVICE_LATENCY_MS = 701; + */ + public static final int KPISAMPLETYPE_SERVICE_LATENCY_MS_VALUE = 701; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KpiSampleType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static KpiSampleType forNumber(int value) { + switch(value) { + case 0: + return KPISAMPLETYPE_UNKNOWN; + case 101: + return KPISAMPLETYPE_PACKETS_TRANSMITTED; + case 102: + return KPISAMPLETYPE_PACKETS_RECEIVED; + case 103: + return KPISAMPLETYPE_PACKETS_DROPPED; + case 201: + return KPISAMPLETYPE_BYTES_TRANSMITTED; + case 202: + return KPISAMPLETYPE_BYTES_RECEIVED; + case 203: + return KPISAMPLETYPE_BYTES_DROPPED; + case 301: + return KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS; + case 302: + return KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS; + case 401: + return KPISAMPLETYPE_ML_CONFIDENCE; + case 501: + return KPISAMPLETYPE_OPTICAL_SECURITY_STATUS; + case 601: + return KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS; + case 602: + return KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS; + case 603: + return KPISAMPLETYPE_L3_UNIQUE_ATTACKERS; + case 604: + return KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS; + case 605: + return KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO; + case 701: + return KPISAMPLETYPE_SERVICE_LATENCY_MS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - KpiSampleType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { public KpiSampleType findValueByNumber(int number) { - return KpiSampleType.forNumber(number); + return KpiSampleType.forNumber(number); } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return kpi_sample_types.KpiSampleTypes.getDescriptor().getEnumTypes().get(0); + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return kpi_sample_types.KpiSampleTypes.getDescriptor().getEnumTypes().get(0); + } + + private static final KpiSampleType[] VALUES = values(); + + public static KpiSampleType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private KpiSampleType(int value) { + this.value = value; + } } - private static final KpiSampleType[] VALUES = values(); - - public static KpiSampleType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - private final int value; + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - private KpiSampleType(int value) { - this.value = value; + static { + java.lang.String[] descriptorData = { "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + "es*\260\005\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + "PLETYPE_BYTES_DROPPED\020\313\001\022+\n&KPISAMPLETYP" + "E_LINK_TOTAL_CAPACITY_GBPS\020\255\002\022*\n%KPISAMP" + "LETYPE_LINK_USED_CAPACITY_GBPS\020\256\002\022 \n\033KPI" + "SAMPLETYPE_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLE" + "TYPE_OPTICAL_SECURITY_STATUS\020\365\003\022)\n$KPISA" + "MPLETYPE_L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KP" + "ISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&" + "\n!KPISAMPLETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220" + "\n+KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CL" + "IENTS\020\334\004\022,\n\'KPISAMPLETYPE_L3_SECURITY_ST" + "ATUS_CRYPTO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_" + "LATENCY_MS\020\275\005b\006proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); } - - // @@protoc_insertion_point(enum_scope:kpi_sample_types.KpiSampleType) - } - - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\026kpi_sample_types.proto\022\020kpi_sample_typ" + - "es*\327\004\n\rKpiSampleType\022\031\n\025KPISAMPLETYPE_UN" + - "KNOWN\020\000\022%\n!KPISAMPLETYPE_PACKETS_TRANSMI" + - "TTED\020e\022\"\n\036KPISAMPLETYPE_PACKETS_RECEIVED" + - "\020f\022!\n\035KPISAMPLETYPE_PACKETS_DROPPED\020g\022$\n" + - "\037KPISAMPLETYPE_BYTES_TRANSMITTED\020\311\001\022!\n\034K" + - "PISAMPLETYPE_BYTES_RECEIVED\020\312\001\022 \n\033KPISAM" + - "PLETYPE_BYTES_DROPPED\020\313\001\022 \n\033KPISAMPLETYP" + - "E_ML_CONFIDENCE\020\221\003\022*\n%KPISAMPLETYPE_OPTI" + - "CAL_SECURITY_STATUS\020\365\003\022)\n$KPISAMPLETYPE_" + - "L3_UNIQUE_ATTACK_CONNS\020\331\004\022*\n%KPISAMPLETY" + - "PE_L3_TOTAL_DROPPED_PACKTS\020\332\004\022&\n!KPISAMP" + - "LETYPE_L3_UNIQUE_ATTACKERS\020\333\004\0220\n+KPISAMP" + - "LETYPE_L3_UNIQUE_COMPROMISED_CLIENTS\020\334\004\022" + - ",\n\'KPISAMPLETYPE_L3_SECURITY_STATUS_CRYP" + - "TO\020\335\004\022%\n KPISAMPLETYPE_SERVICE_LATENCY_M" + - "S\020\275\005b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - } - - // @@protoc_insertion_point(outer_class_scope) + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/ztp/target/generated-sources/grpc/monitoring/Monitoring.java b/src/ztp/target/generated-sources/grpc/monitoring/Monitoring.java index 38f026eb1ac730e8f825e460916dc57469f0d312..4c80f4a06fe9c1d408fe41a05056c76612a9c61e 100644 --- a/src/ztp/target/generated-sources/grpc/monitoring/Monitoring.java +++ b/src/ztp/target/generated-sources/grpc/monitoring/Monitoring.java @@ -1,21597 +1,20782 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: monitoring.proto - package monitoring; public final class Monitoring { - private Monitoring() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface KpiDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiDescriptor) - com.google.protobuf.MessageOrBuilder { - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + private Monitoring() { + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public interface KpiDescriptorOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * string kpi_description = 2; + * @return The kpiDescription. + */ + java.lang.String getKpiDescription(); + + /** + * string kpi_description = 2; + * @return The bytes for kpiDescription. + */ + com.google.protobuf.ByteString getKpiDescriptionBytes(); + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + java.util.List getKpiIdListList(); + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + monitoring.Monitoring.KpiId getKpiIdList(int index); + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + int getKpiIdListCount(); + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + java.util.List getKpiIdListOrBuilderList(); + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdListOrBuilder(int index); + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return The enum numeric value on the wire for kpiSampleType. + */ + int getKpiSampleTypeValue(); + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return The kpiSampleType. + */ + kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleType(); + + /** + * .context.DeviceId device_id = 5; + * @return Whether the deviceId field is set. + */ + boolean hasDeviceId(); + + /** + * .context.DeviceId device_id = 5; + * @return The deviceId. + */ + context.ContextOuterClass.DeviceId getDeviceId(); + + /** + * .context.DeviceId device_id = 5; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + + /** + * .context.EndPointId endpoint_id = 6; + * @return Whether the endpointId field is set. + */ + boolean hasEndpointId(); + + /** + * .context.EndPointId endpoint_id = 6; + * @return The endpointId. + */ + context.ContextOuterClass.EndPointId getEndpointId(); + + /** + * .context.EndPointId endpoint_id = 6; + */ + context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + + /** + * .context.ServiceId service_id = 7; + * @return Whether the serviceId field is set. + */ + boolean hasServiceId(); + + /** + * .context.ServiceId service_id = 7; + * @return The serviceId. + */ + context.ContextOuterClass.ServiceId getServiceId(); + + /** + * .context.ServiceId service_id = 7; + */ + context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + + /** + * .context.SliceId slice_id = 8; + * @return Whether the sliceId field is set. + */ + boolean hasSliceId(); + + /** + * .context.SliceId slice_id = 8; + * @return The sliceId. + */ + context.ContextOuterClass.SliceId getSliceId(); + + /** + * .context.SliceId slice_id = 8; + */ + context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); + + /** + * .context.ConnectionId connection_id = 9; + * @return Whether the connectionId field is set. + */ + boolean hasConnectionId(); + + /** + * .context.ConnectionId connection_id = 9; + * @return The connectionId. + */ + context.ContextOuterClass.ConnectionId getConnectionId(); + + /** + * .context.ConnectionId connection_id = 9; + */ + context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); + + /** + * .context.LinkId link_id = 10; + * @return Whether the linkId field is set. + */ + boolean hasLinkId(); + + /** + * .context.LinkId link_id = 10; + * @return The linkId. + */ + context.ContextOuterClass.LinkId getLinkId(); + + /** + * .context.LinkId link_id = 10; + */ + context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder(); + } /** - * string kpi_description = 2; - * @return The kpiDescription. - */ - java.lang.String getKpiDescription(); - /** - * string kpi_description = 2; - * @return The bytes for kpiDescription. + * Protobuf type {@code monitoring.KpiDescriptor} */ - com.google.protobuf.ByteString - getKpiDescriptionBytes(); + public static final class KpiDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiDescriptor) + KpiDescriptorOrBuilder { - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - java.util.List - getKpiIdListList(); - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - monitoring.Monitoring.KpiId getKpiIdList(int index); - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - int getKpiIdListCount(); - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - java.util.List - getKpiIdListOrBuilderList(); - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdListOrBuilder( - int index); + private static final long serialVersionUID = 0L; - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return The enum numeric value on the wire for kpiSampleType. - */ - int getKpiSampleTypeValue(); - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return The kpiSampleType. - */ - kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleType(); + // Use KpiDescriptor.newBuilder() to construct. + private KpiDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - /** - * .context.DeviceId device_id = 5; - * @return Whether the deviceId field is set. - */ - boolean hasDeviceId(); - /** - * .context.DeviceId device_id = 5; - * @return The deviceId. - */ - context.ContextOuterClass.DeviceId getDeviceId(); - /** - * .context.DeviceId device_id = 5; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + private KpiDescriptor() { + kpiDescription_ = ""; + kpiIdList_ = java.util.Collections.emptyList(); + kpiSampleType_ = 0; + } - /** - * .context.EndPointId endpoint_id = 6; - * @return Whether the endpointId field is set. - */ - boolean hasEndpointId(); - /** - * .context.EndPointId endpoint_id = 6; - * @return The endpointId. - */ - context.ContextOuterClass.EndPointId getEndpointId(); - /** - * .context.EndPointId endpoint_id = 6; - */ - context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder(); + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new KpiDescriptor(); + } - /** - * .context.ServiceId service_id = 7; - * @return Whether the serviceId field is set. - */ - boolean hasServiceId(); - /** - * .context.ServiceId service_id = 7; - * @return The serviceId. - */ - context.ContextOuterClass.ServiceId getServiceId(); - /** - * .context.ServiceId service_id = 7; - */ - context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder(); + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - /** - * .context.SliceId slice_id = 8; - * @return Whether the sliceId field is set. - */ - boolean hasSliceId(); - /** - * .context.SliceId slice_id = 8; - * @return The sliceId. - */ - context.ContextOuterClass.SliceId getSliceId(); - /** - * .context.SliceId slice_id = 8; - */ - context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder(); + 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(); + 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(); + } + } - /** - * .context.ConnectionId connection_id = 9; - * @return Whether the connectionId field is set. - */ - boolean hasConnectionId(); - /** - * .context.ConnectionId connection_id = 9; - * @return The connectionId. - */ - context.ContextOuterClass.ConnectionId getConnectionId(); - /** - * .context.ConnectionId connection_id = 9; - */ - context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder(); - } - /** - * Protobuf type {@code monitoring.KpiDescriptor} - */ - public static final class KpiDescriptor extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiDescriptor) - KpiDescriptorOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiDescriptor.newBuilder() to construct. - private KpiDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiDescriptor() { - kpiDescription_ = ""; - kpiIdList_ = java.util.Collections.emptyList(); - kpiSampleType_ = 0; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_descriptor; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiDescriptor(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiDescriptor.class, monitoring.Monitoring.KpiDescriptor.Builder.class); + } - @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(); - 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; - } - 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; - } + public static final int KPI_ID_FIELD_NUMBER = 1; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiDescriptor.class, monitoring.Monitoring.KpiDescriptor.Builder.class); - } + private monitoring.Monitoring.KpiId kpiId_; - public static final int KPI_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } - public static final int KPI_DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object kpiDescription_; - /** - * string kpi_description = 2; - * @return The kpiDescription. - */ - @java.lang.Override - public java.lang.String getKpiDescription() { - java.lang.Object ref = kpiDescription_; - 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(); - kpiDescription_ = s; - return s; - } - } - /** - * string kpi_description = 2; - * @return The bytes for kpiDescription. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getKpiDescriptionBytes() { - java.lang.Object ref = kpiDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - kpiDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } - public static final int KPI_ID_LIST_FIELD_NUMBER = 3; - private java.util.List kpiIdList_; - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - @java.lang.Override - public java.util.List getKpiIdListList() { - return kpiIdList_; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - @java.lang.Override - public java.util.List - getKpiIdListOrBuilderList() { - return kpiIdList_; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - @java.lang.Override - public int getKpiIdListCount() { - return kpiIdList_.size(); - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiIdList(int index) { - return kpiIdList_.get(index); - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdListOrBuilder( - int index) { - return kpiIdList_.get(index); - } + /** + * .monitoring.KpiId kpi_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } - public static final int KPI_SAMPLE_TYPE_FIELD_NUMBER = 4; - private int kpiSampleType_; - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return The enum numeric value on the wire for kpiSampleType. - */ - @java.lang.Override public int getKpiSampleTypeValue() { - return kpiSampleType_; - } - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return The kpiSampleType. - */ - @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_); - return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; - } + public static final int KPI_DESCRIPTION_FIELD_NUMBER = 2; - public static final int DEVICE_ID_FIELD_NUMBER = 5; - private context.ContextOuterClass.DeviceId deviceId_; - /** - * .context.DeviceId device_id = 5; - * @return Whether the deviceId field is set. - */ - @java.lang.Override - public boolean hasDeviceId() { - return deviceId_ != null; - } - /** - * .context.DeviceId device_id = 5; - * @return The deviceId. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDeviceId() { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - /** - * .context.DeviceId device_id = 5; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); - } + private volatile java.lang.Object kpiDescription_; - public static final int ENDPOINT_ID_FIELD_NUMBER = 6; - private context.ContextOuterClass.EndPointId endpointId_; - /** - * .context.EndPointId endpoint_id = 6; - * @return Whether the endpointId field is set. - */ - @java.lang.Override - public boolean hasEndpointId() { - return endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 6; - * @return The endpointId. - */ - @java.lang.Override - public context.ContextOuterClass.EndPointId getEndpointId() { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - /** - * .context.EndPointId endpoint_id = 6; - */ - @java.lang.Override - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); - } + /** + * string kpi_description = 2; + * @return The kpiDescription. + */ + @java.lang.Override + public java.lang.String getKpiDescription() { + java.lang.Object ref = kpiDescription_; + 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(); + kpiDescription_ = s; + return s; + } + } - public static final int SERVICE_ID_FIELD_NUMBER = 7; - private context.ContextOuterClass.ServiceId serviceId_; - /** - * .context.ServiceId service_id = 7; - * @return Whether the serviceId field is set. - */ - @java.lang.Override - public boolean hasServiceId() { - return serviceId_ != null; - } - /** - * .context.ServiceId service_id = 7; - * @return The serviceId. - */ - @java.lang.Override - public context.ContextOuterClass.ServiceId getServiceId() { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - /** - * .context.ServiceId service_id = 7; - */ - @java.lang.Override - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); - } + /** + * string kpi_description = 2; + * @return The bytes for kpiDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKpiDescriptionBytes() { + java.lang.Object ref = kpiDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kpiDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static final int SLICE_ID_FIELD_NUMBER = 8; - private context.ContextOuterClass.SliceId sliceId_; - /** - * .context.SliceId slice_id = 8; - * @return Whether the sliceId field is set. - */ - @java.lang.Override - public boolean hasSliceId() { - return sliceId_ != null; - } - /** - * .context.SliceId slice_id = 8; - * @return The sliceId. - */ - @java.lang.Override - public context.ContextOuterClass.SliceId getSliceId() { - return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } - /** - * .context.SliceId slice_id = 8; - */ - @java.lang.Override - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - return getSliceId(); - } + public static final int KPI_ID_LIST_FIELD_NUMBER = 3; - public static final int CONNECTION_ID_FIELD_NUMBER = 9; - private context.ContextOuterClass.ConnectionId connectionId_; - /** - * .context.ConnectionId connection_id = 9; - * @return Whether the connectionId field is set. - */ - @java.lang.Override - public boolean hasConnectionId() { - return connectionId_ != null; - } - /** - * .context.ConnectionId connection_id = 9; - * @return The connectionId. - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionId getConnectionId() { - return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } - /** - * .context.ConnectionId connection_id = 9; - */ - @java.lang.Override - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - return getConnectionId(); - } + private java.util.List kpiIdList_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + @java.lang.Override + public java.util.List getKpiIdListList() { + return kpiIdList_; + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + @java.lang.Override + public java.util.List getKpiIdListOrBuilderList() { + return kpiIdList_; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - if (!getKpiDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kpiDescription_); - } - for (int i = 0; i < kpiIdList_.size(); i++) { - output.writeMessage(3, kpiIdList_.get(i)); - } - if (kpiSampleType_ != kpi_sample_types.KpiSampleTypes.KpiSampleType.KPISAMPLETYPE_UNKNOWN.getNumber()) { - output.writeEnum(4, kpiSampleType_); - } - if (deviceId_ != null) { - output.writeMessage(5, getDeviceId()); - } - if (endpointId_ != null) { - output.writeMessage(6, getEndpointId()); - } - if (serviceId_ != null) { - output.writeMessage(7, getServiceId()); - } - if (sliceId_ != null) { - output.writeMessage(8, getSliceId()); - } - if (connectionId_ != null) { - output.writeMessage(9, getConnectionId()); - } - unknownFields.writeTo(output); - } + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + @java.lang.Override + public int getKpiIdListCount() { + return kpiIdList_.size(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - if (!getKpiDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kpiDescription_); - } - for (int i = 0; i < kpiIdList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, kpiIdList_.get(i)); - } - if (kpiSampleType_ != kpi_sample_types.KpiSampleTypes.KpiSampleType.KPISAMPLETYPE_UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, kpiSampleType_); - } - if (deviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getDeviceId()); - } - if (endpointId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getEndpointId()); - } - if (serviceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getServiceId()); - } - if (sliceId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getSliceId()); - } - if (connectionId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getConnectionId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiIdList(int index) { + return kpiIdList_.get(index); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiDescriptor)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiDescriptor other = (monitoring.Monitoring.KpiDescriptor) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (!getKpiDescription() - .equals(other.getKpiDescription())) return false; - if (!getKpiIdListList() - .equals(other.getKpiIdListList())) return false; - if (kpiSampleType_ != other.kpiSampleType_) return false; - if (hasDeviceId() != other.hasDeviceId()) return false; - if (hasDeviceId()) { - if (!getDeviceId() - .equals(other.getDeviceId())) return false; - } - if (hasEndpointId() != other.hasEndpointId()) return false; - if (hasEndpointId()) { - if (!getEndpointId() - .equals(other.getEndpointId())) return false; - } - if (hasServiceId() != other.hasServiceId()) return false; - if (hasServiceId()) { - if (!getServiceId() - .equals(other.getServiceId())) return false; - } - if (hasSliceId() != other.hasSliceId()) return false; - if (hasSliceId()) { - if (!getSliceId() - .equals(other.getSliceId())) return false; - } - if (hasConnectionId() != other.hasConnectionId()) return false; - if (hasConnectionId()) { - if (!getConnectionId() - .equals(other.getConnectionId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdListOrBuilder(int index) { + return kpiIdList_.get(index); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - hash = (37 * hash) + KPI_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getKpiDescription().hashCode(); - if (getKpiIdListCount() > 0) { - hash = (37 * hash) + KPI_ID_LIST_FIELD_NUMBER; - hash = (53 * hash) + getKpiIdListList().hashCode(); - } - hash = (37 * hash) + KPI_SAMPLE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + kpiSampleType_; - if (hasDeviceId()) { - hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getDeviceId().hashCode(); - } - if (hasEndpointId()) { - hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; - hash = (53 * hash) + getEndpointId().hashCode(); - } - if (hasServiceId()) { - hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getServiceId().hashCode(); - } - if (hasSliceId()) { - hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; - hash = (53 * hash) + getSliceId().hashCode(); - } - if (hasConnectionId()) { - hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; - hash = (53 * hash) + getConnectionId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static final int KPI_SAMPLE_TYPE_FIELD_NUMBER = 4; - public static monitoring.Monitoring.KpiDescriptor parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiDescriptor parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiDescriptor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private int kpiSampleType_; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiDescriptor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return The enum numeric value on the wire for kpiSampleType. + */ + @java.lang.Override + public int getKpiSampleTypeValue() { + return kpiSampleType_; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiDescriptor} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiDescriptor) - monitoring.Monitoring.KpiDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiDescriptor.class, monitoring.Monitoring.KpiDescriptor.Builder.class); - } - - // 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; - kpiIdBuilder_ = null; - } - kpiDescription_ = ""; - - if (kpiIdListBuilder_ == null) { - kpiIdList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - kpiIdListBuilder_.clear(); - } - kpiSampleType_ = 0; - - if (deviceIdBuilder_ == null) { - deviceId_ = null; - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - if (endpointIdBuilder_ == null) { - endpointId_ = null; - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - if (sliceIdBuilder_ == null) { - sliceId_ = null; - } else { - sliceId_ = null; - sliceIdBuilder_ = null; - } - if (connectionIdBuilder_ == null) { - connectionId_ = null; - } else { - connectionId_ = null; - connectionIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiDescriptor getDefaultInstanceForType() { - return monitoring.Monitoring.KpiDescriptor.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiDescriptor build() { - monitoring.Monitoring.KpiDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - result.kpiDescription_ = kpiDescription_; - if (kpiIdListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpiIdList_ = java.util.Collections.unmodifiableList(kpiIdList_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.kpiIdList_ = kpiIdList_; - } else { - result.kpiIdList_ = kpiIdListBuilder_.build(); - } - result.kpiSampleType_ = kpiSampleType_; - if (deviceIdBuilder_ == null) { - result.deviceId_ = deviceId_; - } else { - result.deviceId_ = deviceIdBuilder_.build(); - } - if (endpointIdBuilder_ == null) { - result.endpointId_ = endpointId_; - } else { - result.endpointId_ = endpointIdBuilder_.build(); - } - if (serviceIdBuilder_ == null) { - result.serviceId_ = serviceId_; - } else { - result.serviceId_ = serviceIdBuilder_.build(); - } - if (sliceIdBuilder_ == null) { - result.sliceId_ = sliceId_; - } else { - result.sliceId_ = sliceIdBuilder_.build(); - } - if (connectionIdBuilder_ == null) { - result.connectionId_ = connectionId_; - } else { - result.connectionId_ = connectionIdBuilder_.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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiDescriptor) { - return mergeFrom((monitoring.Monitoring.KpiDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiDescriptor other) { - if (other == monitoring.Monitoring.KpiDescriptor.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - if (!other.getKpiDescription().isEmpty()) { - kpiDescription_ = other.kpiDescription_; - onChanged(); - } - if (kpiIdListBuilder_ == null) { - if (!other.kpiIdList_.isEmpty()) { - if (kpiIdList_.isEmpty()) { - kpiIdList_ = other.kpiIdList_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiIdListIsMutable(); - kpiIdList_.addAll(other.kpiIdList_); - } - onChanged(); - } - } else { - if (!other.kpiIdList_.isEmpty()) { - if (kpiIdListBuilder_.isEmpty()) { - kpiIdListBuilder_.dispose(); - kpiIdListBuilder_ = null; - kpiIdList_ = other.kpiIdList_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiIdListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiIdListFieldBuilder() : null; - } else { - kpiIdListBuilder_.addAllMessages(other.kpiIdList_); - } - } - } - if (other.kpiSampleType_ != 0) { - setKpiSampleTypeValue(other.getKpiSampleTypeValue()); - } - if (other.hasDeviceId()) { - mergeDeviceId(other.getDeviceId()); - } - if (other.hasEndpointId()) { - mergeEndpointId(other.getEndpointId()); - } - if (other.hasServiceId()) { - mergeServiceId(other.getServiceId()); - } - if (other.hasSliceId()) { - mergeSliceId(other.getSliceId()); - } - if (other.hasConnectionId()) { - mergeConnectionId(other.getConnectionId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiDescriptor) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - - private java.lang.Object kpiDescription_ = ""; - /** - * string kpi_description = 2; - * @return The kpiDescription. - */ - public java.lang.String getKpiDescription() { - java.lang.Object ref = kpiDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kpiDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string kpi_description = 2; - * @return The bytes for kpiDescription. - */ - public com.google.protobuf.ByteString - getKpiDescriptionBytes() { - java.lang.Object ref = kpiDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - kpiDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string kpi_description = 2; - * @param value The kpiDescription to set. - * @return This builder for chaining. - */ - public Builder setKpiDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - kpiDescription_ = value; - onChanged(); - return this; - } - /** - * string kpi_description = 2; - * @return This builder for chaining. - */ - public Builder clearKpiDescription() { - - kpiDescription_ = getDefaultInstance().getKpiDescription(); - onChanged(); - return this; - } - /** - * string kpi_description = 2; - * @param value The bytes for kpiDescription to set. - * @return This builder for chaining. - */ - public Builder setKpiDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - kpiDescription_ = value; - onChanged(); - return this; - } - - private java.util.List kpiIdList_ = - java.util.Collections.emptyList(); - private void ensureKpiIdListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiIdList_ = new java.util.ArrayList(kpiIdList_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdListBuilder_; - - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public java.util.List getKpiIdListList() { - if (kpiIdListBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiIdList_); - } else { - return kpiIdListBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public int getKpiIdListCount() { - if (kpiIdListBuilder_ == null) { - return kpiIdList_.size(); - } else { - return kpiIdListBuilder_.getCount(); - } - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public monitoring.Monitoring.KpiId getKpiIdList(int index) { - if (kpiIdListBuilder_ == null) { - return kpiIdList_.get(index); - } else { - return kpiIdListBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder setKpiIdList( - int index, monitoring.Monitoring.KpiId value) { - if (kpiIdListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdListIsMutable(); - kpiIdList_.set(index, value); - onChanged(); - } else { - kpiIdListBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder setKpiIdList( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdListBuilder_ == null) { - ensureKpiIdListIsMutable(); - kpiIdList_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiIdListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder addKpiIdList(monitoring.Monitoring.KpiId value) { - if (kpiIdListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdListIsMutable(); - kpiIdList_.add(value); - onChanged(); - } else { - kpiIdListBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder addKpiIdList( - int index, monitoring.Monitoring.KpiId value) { - if (kpiIdListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdListIsMutable(); - kpiIdList_.add(index, value); - onChanged(); - } else { - kpiIdListBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder addKpiIdList( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdListBuilder_ == null) { - ensureKpiIdListIsMutable(); - kpiIdList_.add(builderForValue.build()); - onChanged(); - } else { - kpiIdListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder addKpiIdList( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdListBuilder_ == null) { - ensureKpiIdListIsMutable(); - kpiIdList_.add(index, builderForValue.build()); - onChanged(); - } else { - kpiIdListBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder addAllKpiIdList( - java.lang.Iterable values) { - if (kpiIdListBuilder_ == null) { - ensureKpiIdListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiIdList_); - onChanged(); - } else { - kpiIdListBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder clearKpiIdList() { - if (kpiIdListBuilder_ == null) { - kpiIdList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiIdListBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public Builder removeKpiIdList(int index) { - if (kpiIdListBuilder_ == null) { - ensureKpiIdListIsMutable(); - kpiIdList_.remove(index); - onChanged(); - } else { - kpiIdListBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdListBuilder( - int index) { - return getKpiIdListFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdListOrBuilder( - int index) { - if (kpiIdListBuilder_ == null) { - return kpiIdList_.get(index); } else { - return kpiIdListBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public java.util.List - getKpiIdListOrBuilderList() { - if (kpiIdListBuilder_ != null) { - return kpiIdListBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(kpiIdList_); - } - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdListBuilder() { - return getKpiIdListFieldBuilder().addBuilder( - monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdListBuilder( - int index) { - return getKpiIdListFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiId kpi_id_list = 3; - */ - public java.util.List - getKpiIdListBuilderList() { - return getKpiIdListFieldBuilder().getBuilderList(); - } - 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()); - kpiIdList_ = null; - } - return kpiIdListBuilder_; - } - - private int kpiSampleType_ = 0; - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return The enum numeric value on the wire for kpiSampleType. - */ - @java.lang.Override public int getKpiSampleTypeValue() { - return kpiSampleType_; - } - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @param value The enum numeric value on the wire for kpiSampleType to set. - * @return This builder for chaining. - */ - public Builder setKpiSampleTypeValue(int value) { - - kpiSampleType_ = value; - onChanged(); - return this; - } - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return The kpiSampleType. - */ - @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_); - return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; - } - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @param value The kpiSampleType to set. - * @return This builder for chaining. - */ - public Builder setKpiSampleType(kpi_sample_types.KpiSampleTypes.KpiSampleType value) { - if (value == null) { - throw new NullPointerException(); - } - - kpiSampleType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; - * @return This builder for chaining. - */ - public Builder clearKpiSampleType() { - - kpiSampleType_ = 0; - onChanged(); - return this; - } - - private context.ContextOuterClass.DeviceId deviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> deviceIdBuilder_; - /** - * .context.DeviceId device_id = 5; - * @return Whether the deviceId field is set. - */ - public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; - } - /** - * .context.DeviceId device_id = 5; - * @return The deviceId. - */ - public context.ContextOuterClass.DeviceId getDeviceId() { - if (deviceIdBuilder_ == null) { - return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } else { - return deviceIdBuilder_.getMessage(); - } - } - /** - * .context.DeviceId device_id = 5; - */ - public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deviceId_ = value; - onChanged(); - } else { - deviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 5; - */ - public Builder setDeviceId( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (deviceIdBuilder_ == null) { - deviceId_ = builderForValue.build(); - onChanged(); - } else { - deviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceId device_id = 5; - */ - public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { - if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = - context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); - } else { - deviceId_ = value; - } - onChanged(); - } else { - deviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceId device_id = 5; - */ - public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; - deviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceId device_id = 5; - */ - public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { - - onChanged(); - return getDeviceIdFieldBuilder().getBuilder(); - } - /** - * .context.DeviceId device_id = 5; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - if (deviceIdBuilder_ != null) { - return deviceIdBuilder_.getMessageOrBuilder(); - } else { - return deviceId_ == null ? - context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; - } - } - /** - * .context.DeviceId device_id = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> - getDeviceIdFieldBuilder() { - if (deviceIdBuilder_ == null) { - deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( - getDeviceId(), - getParentForChildren(), - isClean()); - deviceId_ = null; - } - return deviceIdBuilder_; - } - - private context.ContextOuterClass.EndPointId endpointId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; - /** - * .context.EndPointId endpoint_id = 6; - * @return Whether the endpointId field is set. - */ - public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; - } - /** - * .context.EndPointId endpoint_id = 6; - * @return The endpointId. - */ - public context.ContextOuterClass.EndPointId getEndpointId() { - if (endpointIdBuilder_ == null) { - return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } else { - return endpointIdBuilder_.getMessage(); - } - } - /** - * .context.EndPointId endpoint_id = 6; - */ - public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endpointId_ = value; - onChanged(); - } else { - endpointIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 6; - */ - public Builder setEndpointId( - context.ContextOuterClass.EndPointId.Builder builderForValue) { - if (endpointIdBuilder_ == null) { - endpointId_ = builderForValue.build(); - onChanged(); - } else { - endpointIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 6; - */ - public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { - if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = - context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); - } else { - endpointId_ = value; - } - onChanged(); - } else { - endpointIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 6; - */ - public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; - endpointIdBuilder_ = null; - } - - return this; - } - /** - * .context.EndPointId endpoint_id = 6; - */ - public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { - - onChanged(); - return getEndpointIdFieldBuilder().getBuilder(); - } - /** - * .context.EndPointId endpoint_id = 6; - */ - public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - if (endpointIdBuilder_ != null) { - return endpointIdBuilder_.getMessageOrBuilder(); - } else { - return endpointId_ == null ? - context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; - } - } - /** - * .context.EndPointId endpoint_id = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> - getEndpointIdFieldBuilder() { - if (endpointIdBuilder_ == null) { - endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>( - getEndpointId(), - getParentForChildren(), - isClean()); - endpointId_ = null; - } - return endpointIdBuilder_; - } - - private context.ContextOuterClass.ServiceId serviceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> serviceIdBuilder_; - /** - * .context.ServiceId service_id = 7; - * @return Whether the serviceId field is set. - */ - public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; - } - /** - * .context.ServiceId service_id = 7; - * @return The serviceId. - */ - public context.ContextOuterClass.ServiceId getServiceId() { - if (serviceIdBuilder_ == null) { - return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } else { - return serviceIdBuilder_.getMessage(); - } - } - /** - * .context.ServiceId service_id = 7; - */ - public Builder setServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - serviceId_ = value; - onChanged(); - } else { - serviceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 7; - */ - public Builder setServiceId( - context.ContextOuterClass.ServiceId.Builder builderForValue) { - if (serviceIdBuilder_ == null) { - serviceId_ = builderForValue.build(); - onChanged(); - } else { - serviceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ServiceId service_id = 7; - */ - public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { - if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = - context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); - } else { - serviceId_ = value; - } - onChanged(); - } else { - serviceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ServiceId service_id = 7; - */ - public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; - serviceIdBuilder_ = null; - } - - return this; - } - /** - * .context.ServiceId service_id = 7; - */ - public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { - - onChanged(); - return getServiceIdFieldBuilder().getBuilder(); - } - /** - * .context.ServiceId service_id = 7; - */ - public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - if (serviceIdBuilder_ != null) { - return serviceIdBuilder_.getMessageOrBuilder(); - } else { - return serviceId_ == null ? - context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; - } - } - /** - * .context.ServiceId service_id = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> - getServiceIdFieldBuilder() { - if (serviceIdBuilder_ == null) { - serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>( - getServiceId(), - getParentForChildren(), - isClean()); - serviceId_ = null; - } - return serviceIdBuilder_; - } - - private context.ContextOuterClass.SliceId sliceId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> sliceIdBuilder_; - /** - * .context.SliceId slice_id = 8; - * @return Whether the sliceId field is set. - */ - public boolean hasSliceId() { - return sliceIdBuilder_ != null || sliceId_ != null; - } - /** - * .context.SliceId slice_id = 8; - * @return The sliceId. - */ - public context.ContextOuterClass.SliceId getSliceId() { - if (sliceIdBuilder_ == null) { - return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } else { - return sliceIdBuilder_.getMessage(); - } - } - /** - * .context.SliceId slice_id = 8; - */ - public Builder setSliceId(context.ContextOuterClass.SliceId value) { - if (sliceIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sliceId_ = value; - onChanged(); - } else { - sliceIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.SliceId slice_id = 8; - */ - public Builder setSliceId( - context.ContextOuterClass.SliceId.Builder builderForValue) { - if (sliceIdBuilder_ == null) { - sliceId_ = builderForValue.build(); - onChanged(); - } else { - sliceIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.SliceId slice_id = 8; - */ - public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { - if (sliceIdBuilder_ == null) { - if (sliceId_ != null) { - sliceId_ = - context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); - } else { - sliceId_ = value; - } - onChanged(); - } else { - sliceIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.SliceId slice_id = 8; - */ - public Builder clearSliceId() { - if (sliceIdBuilder_ == null) { - sliceId_ = null; - onChanged(); - } else { - sliceId_ = null; - sliceIdBuilder_ = null; - } - - return this; - } - /** - * .context.SliceId slice_id = 8; - */ - public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { - - onChanged(); - return getSliceIdFieldBuilder().getBuilder(); - } - /** - * .context.SliceId slice_id = 8; - */ - public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - if (sliceIdBuilder_ != null) { - return sliceIdBuilder_.getMessageOrBuilder(); - } else { - return sliceId_ == null ? - context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; - } - } - /** - * .context.SliceId slice_id = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> - getSliceIdFieldBuilder() { - if (sliceIdBuilder_ == null) { - sliceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder>( - getSliceId(), - getParentForChildren(), - isClean()); - sliceId_ = null; - } - return sliceIdBuilder_; - } - - private context.ContextOuterClass.ConnectionId connectionId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> connectionIdBuilder_; - /** - * .context.ConnectionId connection_id = 9; - * @return Whether the connectionId field is set. - */ - public boolean hasConnectionId() { - return connectionIdBuilder_ != null || connectionId_ != null; - } - /** - * .context.ConnectionId connection_id = 9; - * @return The connectionId. - */ - public context.ContextOuterClass.ConnectionId getConnectionId() { - if (connectionIdBuilder_ == null) { - return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } else { - return connectionIdBuilder_.getMessage(); - } - } - /** - * .context.ConnectionId connection_id = 9; - */ - public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { - if (connectionIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - connectionId_ = value; - onChanged(); - } else { - connectionIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 9; - */ - public Builder setConnectionId( - context.ContextOuterClass.ConnectionId.Builder builderForValue) { - if (connectionIdBuilder_ == null) { - connectionId_ = builderForValue.build(); - onChanged(); - } else { - connectionIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 9; - */ - public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { - if (connectionIdBuilder_ == null) { - if (connectionId_ != null) { - connectionId_ = - context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); - } else { - connectionId_ = value; - } - onChanged(); - } else { - connectionIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.ConnectionId connection_id = 9; - */ - public Builder clearConnectionId() { - if (connectionIdBuilder_ == null) { - connectionId_ = null; - onChanged(); - } else { - connectionId_ = null; - connectionIdBuilder_ = null; - } - - return this; - } - /** - * .context.ConnectionId connection_id = 9; - */ - public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { - - onChanged(); - return getConnectionIdFieldBuilder().getBuilder(); - } - /** - * .context.ConnectionId connection_id = 9; - */ - public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - if (connectionIdBuilder_ != null) { - return connectionIdBuilder_.getMessageOrBuilder(); - } else { - return connectionId_ == null ? - context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; - } - } - /** - * .context.ConnectionId connection_id = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder> - getConnectionIdFieldBuilder() { - if (connectionIdBuilder_ == null) { - connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.ConnectionId, context.ContextOuterClass.ConnectionId.Builder, context.ContextOuterClass.ConnectionIdOrBuilder>( - getConnectionId(), - getParentForChildren(), - isClean()); - connectionId_ = null; - } - return connectionIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiDescriptor) - } + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return The kpiSampleType. + */ + @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_); + return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; + } - // @@protoc_insertion_point(class_scope:monitoring.KpiDescriptor) - private static final monitoring.Monitoring.KpiDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiDescriptor(); - } + public static final int DEVICE_ID_FIELD_NUMBER = 5; - public static monitoring.Monitoring.KpiDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private context.ContextOuterClass.DeviceId deviceId_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.DeviceId device_id = 5; + * @return Whether the deviceId field is set. + */ + @java.lang.Override + public boolean hasDeviceId() { + return deviceId_ != null; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .context.DeviceId device_id = 5; + * @return The deviceId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDeviceId() { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } - @java.lang.Override - public monitoring.Monitoring.KpiDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .context.DeviceId device_id = 5; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + return getDeviceId(); + } - } + public static final int ENDPOINT_ID_FIELD_NUMBER = 6; - public interface MonitorKpiRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.MonitorKpiRequest) - com.google.protobuf.MessageOrBuilder { + private context.ContextOuterClass.EndPointId endpointId_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + /** + * .context.EndPointId endpoint_id = 6; + * @return Whether the endpointId field is set. + */ + @java.lang.Override + public boolean hasEndpointId() { + return endpointId_ != null; + } - /** - * float monitoring_window_s = 2; - * @return The monitoringWindowS. - */ - float getMonitoringWindowS(); + /** + * .context.EndPointId endpoint_id = 6; + * @return The endpointId. + */ + @java.lang.Override + public context.ContextOuterClass.EndPointId getEndpointId() { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } - /** - *
-     * Pending add field to reflect Available Device Protocols
-     * 
- * - * float sampling_rate_s = 3; - * @return The samplingRateS. - */ - float getSamplingRateS(); - } - /** - * Protobuf type {@code monitoring.MonitorKpiRequest} - */ - public static final class MonitorKpiRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.MonitorKpiRequest) - MonitorKpiRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use MonitorKpiRequest.newBuilder() to construct. - private MonitorKpiRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MonitorKpiRequest() { - } + /** + * .context.EndPointId endpoint_id = 6; + */ + @java.lang.Override + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + return getEndpointId(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MonitorKpiRequest(); - } + public static final int SERVICE_ID_FIELD_NUMBER = 7; - @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; - } + private context.ContextOuterClass.ServiceId serviceId_; - @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); - } + /** + * .context.ServiceId service_id = 7; + * @return Whether the serviceId field is set. + */ + @java.lang.Override + public boolean hasServiceId() { + return serviceId_ != null; + } - public static final int KPI_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + /** + * .context.ServiceId service_id = 7; + * @return The serviceId. + */ + @java.lang.Override + public context.ContextOuterClass.ServiceId getServiceId() { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } - public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; - private float monitoringWindowS_; - /** - * float monitoring_window_s = 2; - * @return The monitoringWindowS. - */ - @java.lang.Override - public float getMonitoringWindowS() { - return monitoringWindowS_; - } + /** + * .context.ServiceId service_id = 7; + */ + @java.lang.Override + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + return getServiceId(); + } - public static final int SAMPLING_RATE_S_FIELD_NUMBER = 3; - private float samplingRateS_; - /** - *
-     * Pending add field to reflect Available Device Protocols
-     * 
- * - * float sampling_rate_s = 3; - * @return The samplingRateS. - */ - @java.lang.Override - public float getSamplingRateS() { - return samplingRateS_; - } + public static final int SLICE_ID_FIELD_NUMBER = 8; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private context.ContextOuterClass.SliceId sliceId_; - memoizedIsInitialized = 1; - return true; - } + /** + * .context.SliceId slice_id = 8; + * @return Whether the sliceId field is set. + */ + @java.lang.Override + public boolean hasSliceId() { + return sliceId_ != null; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - if (monitoringWindowS_ != 0F) { - output.writeFloat(2, monitoringWindowS_); - } - if (samplingRateS_ != 0F) { - output.writeFloat(3, samplingRateS_); - } - unknownFields.writeTo(output); - } + /** + * .context.SliceId slice_id = 8; + * @return The sliceId. + */ + @java.lang.Override + public context.ContextOuterClass.SliceId getSliceId() { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - if (monitoringWindowS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, monitoringWindowS_); - } - if (samplingRateS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, samplingRateS_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.SliceId slice_id = 8; + */ + @java.lang.Override + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { + return getSliceId(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.MonitorKpiRequest)) { - return super.equals(obj); - } - monitoring.Monitoring.MonitorKpiRequest other = (monitoring.Monitoring.MonitorKpiRequest) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (java.lang.Float.floatToIntBits(getMonitoringWindowS()) - != java.lang.Float.floatToIntBits( - other.getMonitoringWindowS())) return false; - if (java.lang.Float.floatToIntBits(getSamplingRateS()) - != java.lang.Float.floatToIntBits( - other.getSamplingRateS())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static final int CONNECTION_ID_FIELD_NUMBER = 9; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - hash = (37 * hash) + MONITORING_WINDOW_S_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; + private context.ContextOuterClass.ConnectionId connectionId_; + + /** + * .context.ConnectionId connection_id = 9; + * @return Whether the connectionId field is set. + */ + @java.lang.Override + public boolean hasConnectionId() { + return connectionId_ != null; + } + + /** + * .context.ConnectionId connection_id = 9; + * @return The connectionId. + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionId getConnectionId() { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + + /** + * .context.ConnectionId connection_id = 9; + */ + @java.lang.Override + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + return getConnectionId(); + } + + public static final int LINK_ID_FIELD_NUMBER = 10; + + private context.ContextOuterClass.LinkId linkId_; + + /** + * .context.LinkId link_id = 10; + * @return Whether the linkId field is set. + */ + @java.lang.Override + public boolean hasLinkId() { + return linkId_ != null; + } + + /** + * .context.LinkId link_id = 10; + * @return The linkId. + */ + @java.lang.Override + public context.ContextOuterClass.LinkId getLinkId() { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + + /** + * .context.LinkId link_id = 10; + */ + @java.lang.Override + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + return getLinkId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + if (!getKpiDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kpiDescription_); + } + for (int i = 0; i < kpiIdList_.size(); i++) { + output.writeMessage(3, kpiIdList_.get(i)); + } + if (kpiSampleType_ != kpi_sample_types.KpiSampleTypes.KpiSampleType.KPISAMPLETYPE_UNKNOWN.getNumber()) { + output.writeEnum(4, kpiSampleType_); + } + if (deviceId_ != null) { + output.writeMessage(5, getDeviceId()); + } + if (endpointId_ != null) { + output.writeMessage(6, getEndpointId()); + } + if (serviceId_ != null) { + output.writeMessage(7, getServiceId()); + } + if (sliceId_ != null) { + output.writeMessage(8, getSliceId()); + } + if (connectionId_ != null) { + output.writeMessage(9, getConnectionId()); + } + if (linkId_ != null) { + output.writeMessage(10, getLinkId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + if (!getKpiDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kpiDescription_); + } + for (int i = 0; i < kpiIdList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, kpiIdList_.get(i)); + } + if (kpiSampleType_ != kpi_sample_types.KpiSampleTypes.KpiSampleType.KPISAMPLETYPE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, kpiSampleType_); + } + if (deviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDeviceId()); + } + if (endpointId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndpointId()); + } + if (serviceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getServiceId()); + } + if (sliceId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSliceId()); + } + if (connectionId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getConnectionId()); + } + if (linkId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLinkId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiDescriptor)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiDescriptor other = (monitoring.Monitoring.KpiDescriptor) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (!getKpiDescription().equals(other.getKpiDescription())) + return false; + if (!getKpiIdListList().equals(other.getKpiIdListList())) + return false; + if (kpiSampleType_ != other.kpiSampleType_) + return false; + if (hasDeviceId() != other.hasDeviceId()) + return false; + if (hasDeviceId()) { + if (!getDeviceId().equals(other.getDeviceId())) + return false; + } + if (hasEndpointId() != other.hasEndpointId()) + return false; + if (hasEndpointId()) { + if (!getEndpointId().equals(other.getEndpointId())) + return false; + } + if (hasServiceId() != other.hasServiceId()) + return false; + if (hasServiceId()) { + if (!getServiceId().equals(other.getServiceId())) + return false; + } + if (hasSliceId() != other.hasSliceId()) + return false; + if (hasSliceId()) { + if (!getSliceId().equals(other.getSliceId())) + return false; + } + if (hasConnectionId() != other.hasConnectionId()) + return false; + if (hasConnectionId()) { + if (!getConnectionId().equals(other.getConnectionId())) + return false; + } + if (hasLinkId() != other.hasLinkId()) + return false; + if (hasLinkId()) { + if (!getLinkId().equals(other.getLinkId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + hash = (37 * hash) + KPI_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getKpiDescription().hashCode(); + if (getKpiIdListCount() > 0) { + hash = (37 * hash) + KPI_ID_LIST_FIELD_NUMBER; + hash = (53 * hash) + getKpiIdListList().hashCode(); + } + hash = (37 * hash) + KPI_SAMPLE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + kpiSampleType_; + if (hasDeviceId()) { + hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + } + if (hasEndpointId()) { + hash = (37 * hash) + ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEndpointId().hashCode(); + } + if (hasServiceId()) { + hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getServiceId().hashCode(); + } + if (hasSliceId()) { + hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSliceId().hashCode(); + } + if (hasConnectionId()) { + hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getConnectionId().hashCode(); + } + if (hasLinkId()) { + hash = (37 * hash) + LINK_ID_FIELD_NUMBER; + hash = (53 * hash) + getLinkId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiDescriptor parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiDescriptor parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiDescriptor prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiDescriptor) + monitoring.Monitoring.KpiDescriptorOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiDescriptor.class, monitoring.Monitoring.KpiDescriptor.Builder.class); + } + + // 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; + kpiIdBuilder_ = null; + } + kpiDescription_ = ""; + if (kpiIdListBuilder_ == null) { + kpiIdList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + kpiIdListBuilder_.clear(); + } + kpiSampleType_ = 0; + if (deviceIdBuilder_ == null) { + deviceId_ = null; + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + if (endpointIdBuilder_ == null) { + endpointId_ = null; + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + if (serviceIdBuilder_ == null) { + serviceId_ = null; + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + if (sliceIdBuilder_ == null) { + sliceId_ = null; + } else { + sliceId_ = null; + sliceIdBuilder_ = null; + } + if (connectionIdBuilder_ == null) { + connectionId_ = null; + } else { + connectionId_ = null; + connectionIdBuilder_ = null; + } + if (linkIdBuilder_ == null) { + linkId_ = null; + } else { + linkId_ = null; + linkIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptor getDefaultInstanceForType() { + return monitoring.Monitoring.KpiDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptor build() { + monitoring.Monitoring.KpiDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + result.kpiDescription_ = kpiDescription_; + if (kpiIdListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + kpiIdList_ = java.util.Collections.unmodifiableList(kpiIdList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.kpiIdList_ = kpiIdList_; + } else { + result.kpiIdList_ = kpiIdListBuilder_.build(); + } + result.kpiSampleType_ = kpiSampleType_; + if (deviceIdBuilder_ == null) { + result.deviceId_ = deviceId_; + } else { + result.deviceId_ = deviceIdBuilder_.build(); + } + if (endpointIdBuilder_ == null) { + result.endpointId_ = endpointId_; + } else { + result.endpointId_ = endpointIdBuilder_.build(); + } + if (serviceIdBuilder_ == null) { + result.serviceId_ = serviceId_; + } else { + result.serviceId_ = serviceIdBuilder_.build(); + } + if (sliceIdBuilder_ == null) { + result.sliceId_ = sliceId_; + } else { + result.sliceId_ = sliceIdBuilder_.build(); + } + if (connectionIdBuilder_ == null) { + result.connectionId_ = connectionId_; + } else { + result.connectionId_ = connectionIdBuilder_.build(); + } + if (linkIdBuilder_ == null) { + result.linkId_ = linkId_; + } else { + result.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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiDescriptor) { + return mergeFrom((monitoring.Monitoring.KpiDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiDescriptor other) { + if (other == monitoring.Monitoring.KpiDescriptor.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (!other.getKpiDescription().isEmpty()) { + kpiDescription_ = other.kpiDescription_; + onChanged(); + } + if (kpiIdListBuilder_ == null) { + if (!other.kpiIdList_.isEmpty()) { + if (kpiIdList_.isEmpty()) { + kpiIdList_ = other.kpiIdList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKpiIdListIsMutable(); + kpiIdList_.addAll(other.kpiIdList_); + } + onChanged(); + } + } else { + if (!other.kpiIdList_.isEmpty()) { + if (kpiIdListBuilder_.isEmpty()) { + kpiIdListBuilder_.dispose(); + kpiIdListBuilder_ = null; + kpiIdList_ = other.kpiIdList_; + bitField0_ = (bitField0_ & ~0x00000001); + kpiIdListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKpiIdListFieldBuilder() : null; + } else { + kpiIdListBuilder_.addAllMessages(other.kpiIdList_); + } + } + } + if (other.kpiSampleType_ != 0) { + setKpiSampleTypeValue(other.getKpiSampleTypeValue()); + } + if (other.hasDeviceId()) { + mergeDeviceId(other.getDeviceId()); + } + if (other.hasEndpointId()) { + mergeEndpointId(other.getEndpointId()); + } + if (other.hasServiceId()) { + mergeServiceId(other.getServiceId()); + } + if (other.hasSliceId()) { + mergeSliceId(other.getSliceId()); + } + if (other.hasConnectionId()) { + mergeConnectionId(other.getConnectionId()); + } + if (other.hasLinkId()) { + mergeLinkId(other.getLinkId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiDescriptor) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private java.lang.Object kpiDescription_ = ""; + + /** + * string kpi_description = 2; + * @return The kpiDescription. + */ + public java.lang.String getKpiDescription() { + java.lang.Object ref = kpiDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kpiDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string kpi_description = 2; + * @return The bytes for kpiDescription. + */ + public com.google.protobuf.ByteString getKpiDescriptionBytes() { + java.lang.Object ref = kpiDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kpiDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string kpi_description = 2; + * @param value The kpiDescription to set. + * @return This builder for chaining. + */ + public Builder setKpiDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kpiDescription_ = value; + onChanged(); + return this; + } + + /** + * string kpi_description = 2; + * @return This builder for chaining. + */ + public Builder clearKpiDescription() { + kpiDescription_ = getDefaultInstance().getKpiDescription(); + onChanged(); + return this; + } + + /** + * string kpi_description = 2; + * @param value The bytes for kpiDescription to set. + * @return This builder for chaining. + */ + public Builder setKpiDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kpiDescription_ = value; + onChanged(); + return this; + } + + private java.util.List kpiIdList_ = java.util.Collections.emptyList(); + + private void ensureKpiIdListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + kpiIdList_ = new java.util.ArrayList(kpiIdList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 kpiIdListBuilder_; + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public java.util.List getKpiIdListList() { + if (kpiIdListBuilder_ == null) { + return java.util.Collections.unmodifiableList(kpiIdList_); + } else { + return kpiIdListBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public int getKpiIdListCount() { + if (kpiIdListBuilder_ == null) { + return kpiIdList_.size(); + } else { + return kpiIdListBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public monitoring.Monitoring.KpiId getKpiIdList(int index) { + if (kpiIdListBuilder_ == null) { + return kpiIdList_.get(index); + } else { + return kpiIdListBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder setKpiIdList(int index, monitoring.Monitoring.KpiId value) { + if (kpiIdListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIdListIsMutable(); + kpiIdList_.set(index, value); + onChanged(); + } else { + kpiIdListBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder setKpiIdList(int index, monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdListBuilder_ == null) { + ensureKpiIdListIsMutable(); + kpiIdList_.set(index, builderForValue.build()); + onChanged(); + } else { + kpiIdListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder addKpiIdList(monitoring.Monitoring.KpiId value) { + if (kpiIdListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIdListIsMutable(); + kpiIdList_.add(value); + onChanged(); + } else { + kpiIdListBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder addKpiIdList(int index, monitoring.Monitoring.KpiId value) { + if (kpiIdListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIdListIsMutable(); + kpiIdList_.add(index, value); + onChanged(); + } else { + kpiIdListBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder addKpiIdList(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdListBuilder_ == null) { + ensureKpiIdListIsMutable(); + kpiIdList_.add(builderForValue.build()); + onChanged(); + } else { + kpiIdListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder addKpiIdList(int index, monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdListBuilder_ == null) { + ensureKpiIdListIsMutable(); + kpiIdList_.add(index, builderForValue.build()); + onChanged(); + } else { + kpiIdListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder addAllKpiIdList(java.lang.Iterable values) { + if (kpiIdListBuilder_ == null) { + ensureKpiIdListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kpiIdList_); + onChanged(); + } else { + kpiIdListBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder clearKpiIdList() { + if (kpiIdListBuilder_ == null) { + kpiIdList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + kpiIdListBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public Builder removeKpiIdList(int index) { + if (kpiIdListBuilder_ == null) { + ensureKpiIdListIsMutable(); + kpiIdList_.remove(index); + onChanged(); + } else { + kpiIdListBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdListBuilder(int index) { + return getKpiIdListFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdListOrBuilder(int index) { + if (kpiIdListBuilder_ == null) { + return kpiIdList_.get(index); + } else { + return kpiIdListBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public java.util.List getKpiIdListOrBuilderList() { + if (kpiIdListBuilder_ != null) { + return kpiIdListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(kpiIdList_); + } + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public monitoring.Monitoring.KpiId.Builder addKpiIdListBuilder() { + return getKpiIdListFieldBuilder().addBuilder(monitoring.Monitoring.KpiId.getDefaultInstance()); + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public monitoring.Monitoring.KpiId.Builder addKpiIdListBuilder(int index) { + return getKpiIdListFieldBuilder().addBuilder(index, monitoring.Monitoring.KpiId.getDefaultInstance()); + } + + /** + * repeated .monitoring.KpiId kpi_id_list = 3; + */ + public java.util.List getKpiIdListBuilderList() { + return getKpiIdListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getKpiIdListFieldBuilder() { + if (kpiIdListBuilder_ == null) { + kpiIdListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(kpiIdList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + kpiIdList_ = null; + } + return kpiIdListBuilder_; + } + + private int kpiSampleType_ = 0; + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return The enum numeric value on the wire for kpiSampleType. + */ + @java.lang.Override + public int getKpiSampleTypeValue() { + return kpiSampleType_; + } + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @param value The enum numeric value on the wire for kpiSampleType to set. + * @return This builder for chaining. + */ + public Builder setKpiSampleTypeValue(int value) { + kpiSampleType_ = value; + onChanged(); + return this; + } + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return The kpiSampleType. + */ + @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_); + return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; + } + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @param value The kpiSampleType to set. + * @return This builder for chaining. + */ + public Builder setKpiSampleType(kpi_sample_types.KpiSampleTypes.KpiSampleType value) { + if (value == null) { + throw new NullPointerException(); + } + kpiSampleType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .kpi_sample_types.KpiSampleType kpi_sample_type = 4; + * @return This builder for chaining. + */ + public Builder clearKpiSampleType() { + kpiSampleType_ = 0; + onChanged(); + return this; + } + + private context.ContextOuterClass.DeviceId deviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 deviceIdBuilder_; + + /** + * .context.DeviceId device_id = 5; + * @return Whether the deviceId field is set. + */ + public boolean hasDeviceId() { + return deviceIdBuilder_ != null || deviceId_ != null; + } + + /** + * .context.DeviceId device_id = 5; + * @return The deviceId. + */ + public context.ContextOuterClass.DeviceId getDeviceId() { + if (deviceIdBuilder_ == null) { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } else { + return deviceIdBuilder_.getMessage(); + } + } + + /** + * .context.DeviceId device_id = 5; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceId_ = value; + onChanged(); + } else { + deviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 5; + */ + public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (deviceIdBuilder_ == null) { + deviceId_ = builderForValue.build(); + onChanged(); + } else { + deviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceId device_id = 5; + */ + public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { + if (deviceIdBuilder_ == null) { + if (deviceId_ != null) { + deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + } else { + deviceId_ = value; + } + onChanged(); + } else { + deviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceId device_id = 5; + */ + public Builder clearDeviceId() { + if (deviceIdBuilder_ == null) { + deviceId_ = null; + onChanged(); + } else { + deviceId_ = null; + deviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceId device_id = 5; + */ + public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + onChanged(); + return getDeviceIdFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceId device_id = 5; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { + if (deviceIdBuilder_ != null) { + return deviceIdBuilder_.getMessageOrBuilder(); + } else { + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; + } + } + + /** + * .context.DeviceId device_id = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDeviceIdFieldBuilder() { + if (deviceIdBuilder_ == null) { + deviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDeviceId(), getParentForChildren(), isClean()); + deviceId_ = null; + } + return deviceIdBuilder_; + } + + private context.ContextOuterClass.EndPointId endpointId_; + + private com.google.protobuf.SingleFieldBuilderV3 endpointIdBuilder_; + + /** + * .context.EndPointId endpoint_id = 6; + * @return Whether the endpointId field is set. + */ + public boolean hasEndpointId() { + return endpointIdBuilder_ != null || endpointId_ != null; + } + + /** + * .context.EndPointId endpoint_id = 6; + * @return The endpointId. + */ + public context.ContextOuterClass.EndPointId getEndpointId() { + if (endpointIdBuilder_ == null) { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } else { + return endpointIdBuilder_.getMessage(); + } + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endpointId_ = value; + onChanged(); + } else { + endpointIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { + if (endpointIdBuilder_ == null) { + endpointId_ = builderForValue.build(); + onChanged(); + } else { + endpointIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { + if (endpointIdBuilder_ == null) { + if (endpointId_ != null) { + endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + } else { + endpointId_ = value; + } + onChanged(); + } else { + endpointIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + public Builder clearEndpointId() { + if (endpointIdBuilder_ == null) { + endpointId_ = null; + onChanged(); + } else { + endpointId_ = null; + endpointIdBuilder_ = null; + } + return this; + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + onChanged(); + return getEndpointIdFieldBuilder().getBuilder(); + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { + if (endpointIdBuilder_ != null) { + return endpointIdBuilder_.getMessageOrBuilder(); + } else { + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; + } + } + + /** + * .context.EndPointId endpoint_id = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndpointIdFieldBuilder() { + if (endpointIdBuilder_ == null) { + endpointIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndpointId(), getParentForChildren(), isClean()); + endpointId_ = null; + } + return endpointIdBuilder_; + } + + private context.ContextOuterClass.ServiceId serviceId_; + + private com.google.protobuf.SingleFieldBuilderV3 serviceIdBuilder_; + + /** + * .context.ServiceId service_id = 7; + * @return Whether the serviceId field is set. + */ + public boolean hasServiceId() { + return serviceIdBuilder_ != null || serviceId_ != null; + } + + /** + * .context.ServiceId service_id = 7; + * @return The serviceId. + */ + public context.ContextOuterClass.ServiceId getServiceId() { + if (serviceIdBuilder_ == null) { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } else { + return serviceIdBuilder_.getMessage(); + } + } + + /** + * .context.ServiceId service_id = 7; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceId_ = value; + onChanged(); + } else { + serviceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 7; + */ + public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { + if (serviceIdBuilder_ == null) { + serviceId_ = builderForValue.build(); + onChanged(); + } else { + serviceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ServiceId service_id = 7; + */ + public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { + if (serviceIdBuilder_ == null) { + if (serviceId_ != null) { + serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + } else { + serviceId_ = value; + } + onChanged(); + } else { + serviceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ServiceId service_id = 7; + */ + public Builder clearServiceId() { + if (serviceIdBuilder_ == null) { + serviceId_ = null; + onChanged(); + } else { + serviceId_ = null; + serviceIdBuilder_ = null; + } + return this; + } + + /** + * .context.ServiceId service_id = 7; + */ + public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + onChanged(); + return getServiceIdFieldBuilder().getBuilder(); + } + + /** + * .context.ServiceId service_id = 7; + */ + public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { + if (serviceIdBuilder_ != null) { + return serviceIdBuilder_.getMessageOrBuilder(); + } else { + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; + } + } + + /** + * .context.ServiceId service_id = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3 getServiceIdFieldBuilder() { + if (serviceIdBuilder_ == null) { + serviceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getServiceId(), getParentForChildren(), isClean()); + serviceId_ = null; + } + return serviceIdBuilder_; + } + + private context.ContextOuterClass.SliceId sliceId_; + + private com.google.protobuf.SingleFieldBuilderV3 sliceIdBuilder_; + + /** + * .context.SliceId slice_id = 8; + * @return Whether the sliceId field is set. + */ + public boolean hasSliceId() { + return sliceIdBuilder_ != null || sliceId_ != null; + } + + /** + * .context.SliceId slice_id = 8; + * @return The sliceId. + */ + public context.ContextOuterClass.SliceId getSliceId() { + if (sliceIdBuilder_ == null) { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } else { + return sliceIdBuilder_.getMessage(); + } + } + + /** + * .context.SliceId slice_id = 8; + */ + public Builder setSliceId(context.ContextOuterClass.SliceId value) { + if (sliceIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sliceId_ = value; + onChanged(); + } else { + sliceIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.SliceId slice_id = 8; + */ + public Builder setSliceId(context.ContextOuterClass.SliceId.Builder builderForValue) { + if (sliceIdBuilder_ == null) { + sliceId_ = builderForValue.build(); + onChanged(); + } else { + sliceIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.SliceId slice_id = 8; + */ + public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { + if (sliceIdBuilder_ == null) { + if (sliceId_ != null) { + sliceId_ = context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); + } else { + sliceId_ = value; + } + onChanged(); + } else { + sliceIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.SliceId slice_id = 8; + */ + public Builder clearSliceId() { + if (sliceIdBuilder_ == null) { + sliceId_ = null; + onChanged(); + } else { + sliceId_ = null; + sliceIdBuilder_ = null; + } + return this; + } + + /** + * .context.SliceId slice_id = 8; + */ + public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { + onChanged(); + return getSliceIdFieldBuilder().getBuilder(); + } + + /** + * .context.SliceId slice_id = 8; + */ + public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { + if (sliceIdBuilder_ != null) { + return sliceIdBuilder_.getMessageOrBuilder(); + } else { + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; + } + } + + /** + * .context.SliceId slice_id = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSliceIdFieldBuilder() { + if (sliceIdBuilder_ == null) { + sliceIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSliceId(), getParentForChildren(), isClean()); + sliceId_ = null; + } + return sliceIdBuilder_; + } + + private context.ContextOuterClass.ConnectionId connectionId_; + + private com.google.protobuf.SingleFieldBuilderV3 connectionIdBuilder_; + + /** + * .context.ConnectionId connection_id = 9; + * @return Whether the connectionId field is set. + */ + public boolean hasConnectionId() { + return connectionIdBuilder_ != null || connectionId_ != null; + } + + /** + * .context.ConnectionId connection_id = 9; + * @return The connectionId. + */ + public context.ContextOuterClass.ConnectionId getConnectionId() { + if (connectionIdBuilder_ == null) { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } else { + return connectionIdBuilder_.getMessage(); + } + } + + /** + * .context.ConnectionId connection_id = 9; + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionId_ = value; + onChanged(); + } else { + connectionIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 9; + */ + public Builder setConnectionId(context.ContextOuterClass.ConnectionId.Builder builderForValue) { + if (connectionIdBuilder_ == null) { + connectionId_ = builderForValue.build(); + onChanged(); + } else { + connectionIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 9; + */ + public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { + if (connectionIdBuilder_ == null) { + if (connectionId_ != null) { + connectionId_ = context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); + } else { + connectionId_ = value; + } + onChanged(); + } else { + connectionIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.ConnectionId connection_id = 9; + */ + public Builder clearConnectionId() { + if (connectionIdBuilder_ == null) { + connectionId_ = null; + onChanged(); + } else { + connectionId_ = null; + connectionIdBuilder_ = null; + } + return this; + } + + /** + * .context.ConnectionId connection_id = 9; + */ + public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { + onChanged(); + return getConnectionIdFieldBuilder().getBuilder(); + } + + /** + * .context.ConnectionId connection_id = 9; + */ + public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { + if (connectionIdBuilder_ != null) { + return connectionIdBuilder_.getMessageOrBuilder(); + } else { + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; + } + } + + /** + * .context.ConnectionId connection_id = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3 getConnectionIdFieldBuilder() { + if (connectionIdBuilder_ == null) { + connectionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getConnectionId(), getParentForChildren(), isClean()); + connectionId_ = null; + } + return connectionIdBuilder_; + } + + private context.ContextOuterClass.LinkId linkId_; + + private com.google.protobuf.SingleFieldBuilderV3 linkIdBuilder_; + + /** + * .context.LinkId link_id = 10; + * @return Whether the linkId field is set. + */ + public boolean hasLinkId() { + return linkIdBuilder_ != null || linkId_ != null; + } + + /** + * .context.LinkId link_id = 10; + * @return The linkId. + */ + public context.ContextOuterClass.LinkId getLinkId() { + if (linkIdBuilder_ == null) { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } else { + return linkIdBuilder_.getMessage(); + } + } + + /** + * .context.LinkId link_id = 10; + */ + public Builder setLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkId_ = value; + onChanged(); + } else { + linkIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.LinkId link_id = 10; + */ + public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) { + if (linkIdBuilder_ == null) { + linkId_ = builderForValue.build(); + onChanged(); + } else { + linkIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.LinkId link_id = 10; + */ + public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { + if (linkIdBuilder_ == null) { + if (linkId_ != null) { + linkId_ = context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); + } else { + linkId_ = value; + } + onChanged(); + } else { + linkIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.LinkId link_id = 10; + */ + public Builder clearLinkId() { + if (linkIdBuilder_ == null) { + linkId_ = null; + onChanged(); + } else { + linkId_ = null; + linkIdBuilder_ = null; + } + return this; + } + + /** + * .context.LinkId link_id = 10; + */ + public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { + onChanged(); + return getLinkIdFieldBuilder().getBuilder(); + } + + /** + * .context.LinkId link_id = 10; + */ + public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { + if (linkIdBuilder_ != null) { + return linkIdBuilder_.getMessageOrBuilder(); + } else { + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; + } + } + + /** + * .context.LinkId link_id = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3 getLinkIdFieldBuilder() { + if (linkIdBuilder_ == null) { + linkIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getLinkId(), getParentForChildren(), isClean()); + linkId_ = null; + } + return linkIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiDescriptor) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiDescriptor) + private static final monitoring.Monitoring.KpiDescriptor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiDescriptor(); + } + + public static monitoring.Monitoring.KpiDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MonitorKpiRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.MonitorKpiRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * float monitoring_window_s = 2; + * @return The monitoringWindowS. + */ + float getMonitoringWindowS(); + + /** + *
+         * Pending add field to reflect Available Device Protocols
+         * 
+ * + * float sampling_rate_s = 3; + * @return The samplingRateS. + */ + float getSamplingRateS(); + } + + /** + * Protobuf type {@code monitoring.MonitorKpiRequest} + */ + public static final class MonitorKpiRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.MonitorKpiRequest) + MonitorKpiRequestOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use MonitorKpiRequest.newBuilder() to construct. + private MonitorKpiRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MonitorKpiRequest() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MonitorKpiRequest(); + } + + @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); + } + + public static final int KPI_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.KpiId kpiId_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; + + private float monitoringWindowS_; + + /** + * float monitoring_window_s = 2; + * @return The monitoringWindowS. + */ + @java.lang.Override + public float getMonitoringWindowS() { + return monitoringWindowS_; + } + + public static final int SAMPLING_RATE_S_FIELD_NUMBER = 3; + + private float samplingRateS_; + + /** + *
+         * Pending add field to reflect Available Device Protocols
+         * 
+ * + * float sampling_rate_s = 3; + * @return The samplingRateS. + */ + @java.lang.Override + public float getSamplingRateS() { + return samplingRateS_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + if (monitoringWindowS_ != 0F) { + output.writeFloat(2, monitoringWindowS_); + } + if (samplingRateS_ != 0F) { + output.writeFloat(3, samplingRateS_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + if (monitoringWindowS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, monitoringWindowS_); + } + if (samplingRateS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, samplingRateS_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.MonitorKpiRequest)) { + return super.equals(obj); + } + monitoring.Monitoring.MonitorKpiRequest other = (monitoring.Monitoring.MonitorKpiRequest) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (java.lang.Float.floatToIntBits(getMonitoringWindowS()) != java.lang.Float.floatToIntBits(other.getMonitoringWindowS())) + return false; + if (java.lang.Float.floatToIntBits(getSamplingRateS()) != java.lang.Float.floatToIntBits(other.getSamplingRateS())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + hash = (37 * hash) + MONITORING_WINDOW_S_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.MonitorKpiRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.MonitorKpiRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.MonitorKpiRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.MonitorKpiRequest) + monitoring.Monitoring.MonitorKpiRequestOrBuilder { + + 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); + } + + // 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; + kpiIdBuilder_ = null; + } + monitoringWindowS_ = 0F; + samplingRateS_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_MonitorKpiRequest_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.MonitorKpiRequest getDefaultInstanceForType() { + return monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.MonitorKpiRequest build() { + monitoring.Monitoring.MonitorKpiRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.MonitorKpiRequest) { + return mergeFrom((monitoring.Monitoring.MonitorKpiRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.MonitorKpiRequest other) { + if (other == monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (other.getMonitoringWindowS() != 0F) { + setMonitoringWindowS(other.getMonitoringWindowS()); + } + if (other.getSamplingRateS() != 0F) { + setSamplingRateS(other.getSamplingRateS()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.MonitorKpiRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private float monitoringWindowS_; + + /** + * float monitoring_window_s = 2; + * @return The monitoringWindowS. + */ + @java.lang.Override + public float getMonitoringWindowS() { + return monitoringWindowS_; + } + + /** + * float monitoring_window_s = 2; + * @param value The monitoringWindowS to set. + * @return This builder for chaining. + */ + public Builder setMonitoringWindowS(float value) { + monitoringWindowS_ = value; + onChanged(); + return this; + } + + /** + * float monitoring_window_s = 2; + * @return This builder for chaining. + */ + public Builder clearMonitoringWindowS() { + monitoringWindowS_ = 0F; + onChanged(); + return this; + } + + private float samplingRateS_; + + /** + *
+             * Pending add field to reflect Available Device Protocols
+             * 
+ * + * float sampling_rate_s = 3; + * @return The samplingRateS. + */ + @java.lang.Override + public float getSamplingRateS() { + return samplingRateS_; + } + + /** + *
+             * Pending add field to reflect Available Device Protocols
+             * 
+ * + * float sampling_rate_s = 3; + * @param value The samplingRateS to set. + * @return This builder for chaining. + */ + public Builder setSamplingRateS(float value) { + samplingRateS_ = value; + onChanged(); + return this; + } + + /** + *
+             * Pending add field to reflect Available Device Protocols
+             * 
+ * + * float sampling_rate_s = 3; + * @return This builder for chaining. + */ + public Builder clearSamplingRateS() { + samplingRateS_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.MonitorKpiRequest) + } + + // @@protoc_insertion_point(class_scope:monitoring.MonitorKpiRequest) + private static final monitoring.Monitoring.MonitorKpiRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.MonitorKpiRequest(); + } + + public static monitoring.Monitoring.MonitorKpiRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.MonitorKpiRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiQueryOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + java.util.List getKpiIdsList(); + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + monitoring.Monitoring.KpiId getKpiIds(int index); + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + int getKpiIdsCount(); + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + java.util.List getKpiIdsOrBuilderList(); + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder(int index); + + /** + * float monitoring_window_s = 2; + * @return The monitoringWindowS. + */ + float getMonitoringWindowS(); + + /** + *
+         * used when you want something like "get the last N many samples
+         * 
+ * + * uint32 last_n_samples = 3; + * @return The lastNSamples. + */ + int getLastNSamples(); + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 4; + * @return Whether the startTimestamp field is set. + */ + boolean hasStartTimestamp(); + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 4; + * @return The startTimestamp. + */ + context.ContextOuterClass.Timestamp getStartTimestamp(); + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder(); + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 5; + * @return Whether the endTimestamp field is set. + */ + boolean hasEndTimestamp(); + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 5; + * @return The endTimestamp. + */ + context.ContextOuterClass.Timestamp getEndTimestamp(); + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder(); + } + + /** + * Protobuf type {@code monitoring.KpiQuery} + */ + public static final class KpiQuery extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiQuery) + KpiQueryOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use KpiQuery.newBuilder() to construct. + private KpiQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KpiQuery() { + kpiIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiQuery_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiQuery.class, monitoring.Monitoring.KpiQuery.Builder.class); + } + + public static final int KPI_IDS_FIELD_NUMBER = 1; + + private java.util.List kpiIds_; + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + @java.lang.Override + public java.util.List getKpiIdsList() { + return kpiIds_; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + @java.lang.Override + public java.util.List getKpiIdsOrBuilderList() { + return kpiIds_; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + @java.lang.Override + public int getKpiIdsCount() { + return kpiIds_.size(); + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiIds(int index) { + return kpiIds_.get(index); + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder(int index) { + return kpiIds_.get(index); + } + + public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; + + private float monitoringWindowS_; + + /** + * float monitoring_window_s = 2; + * @return The monitoringWindowS. + */ + @java.lang.Override + public float getMonitoringWindowS() { + return monitoringWindowS_; + } + + public static final int LAST_N_SAMPLES_FIELD_NUMBER = 3; + + private int lastNSamples_; + + /** + *
+         * used when you want something like "get the last N many samples
+         * 
+ * + * uint32 last_n_samples = 3; + * @return The lastNSamples. + */ + @java.lang.Override + public int getLastNSamples() { + return lastNSamples_; + } + + public static final int START_TIMESTAMP_FIELD_NUMBER = 4; + + private context.ContextOuterClass.Timestamp startTimestamp_; + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 4; + * @return Whether the startTimestamp field is set. + */ + @java.lang.Override + public boolean hasStartTimestamp() { + return startTimestamp_ != null; + } + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 4; + * @return The startTimestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getStartTimestamp() { + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; + } + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { + return getStartTimestamp(); + } + + public static final int END_TIMESTAMP_FIELD_NUMBER = 5; + + private context.ContextOuterClass.Timestamp endTimestamp_; + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 5; + * @return Whether the endTimestamp field is set. + */ + @java.lang.Override + public boolean hasEndTimestamp() { + return endTimestamp_ != null; + } + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 5; + * @return The endTimestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getEndTimestamp() { + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; + } + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { + return getEndTimestamp(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < kpiIds_.size(); i++) { + output.writeMessage(1, kpiIds_.get(i)); + } + if (monitoringWindowS_ != 0F) { + output.writeFloat(2, monitoringWindowS_); + } + if (lastNSamples_ != 0) { + output.writeUInt32(3, lastNSamples_); + } + if (startTimestamp_ != null) { + output.writeMessage(4, getStartTimestamp()); + } + if (endTimestamp_ != null) { + output.writeMessage(5, getEndTimestamp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < kpiIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, kpiIds_.get(i)); + } + if (monitoringWindowS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, monitoringWindowS_); + } + if (lastNSamples_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, lastNSamples_); + } + if (startTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStartTimestamp()); + } + if (endTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndTimestamp()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiQuery)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiQuery other = (monitoring.Monitoring.KpiQuery) obj; + if (!getKpiIdsList().equals(other.getKpiIdsList())) + return false; + if (java.lang.Float.floatToIntBits(getMonitoringWindowS()) != java.lang.Float.floatToIntBits(other.getMonitoringWindowS())) + return false; + if (getLastNSamples() != other.getLastNSamples()) + return false; + if (hasStartTimestamp() != other.hasStartTimestamp()) + return false; + if (hasStartTimestamp()) { + if (!getStartTimestamp().equals(other.getStartTimestamp())) + return false; + } + if (hasEndTimestamp() != other.hasEndTimestamp()) + return false; + if (hasEndTimestamp()) { + if (!getEndTimestamp().equals(other.getEndTimestamp())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getKpiIdsCount() > 0) { + hash = (37 * hash) + KPI_IDS_FIELD_NUMBER; + hash = (53 * hash) + getKpiIdsList().hashCode(); + } + hash = (37 * hash) + MONITORING_WINDOW_S_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getMonitoringWindowS()); + hash = (37 * hash) + LAST_N_SAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getLastNSamples(); + if (hasStartTimestamp()) { + hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getStartTimestamp().hashCode(); + } + if (hasEndTimestamp()) { + hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getEndTimestamp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiQuery parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiQuery parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiQuery parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiQuery parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiQuery prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiQuery) + monitoring.Monitoring.KpiQueryOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiQuery_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiQuery.class, monitoring.Monitoring.KpiQuery.Builder.class); + } + + // 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(); + if (kpiIdsBuilder_ == null) { + kpiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + kpiIdsBuilder_.clear(); + } + monitoringWindowS_ = 0F; + lastNSamples_ = 0; + if (startTimestampBuilder_ == null) { + startTimestamp_ = null; + } else { + startTimestamp_ = null; + startTimestampBuilder_ = null; + } + if (endTimestampBuilder_ == null) { + endTimestamp_ = null; + } else { + endTimestamp_ = null; + endTimestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiQuery_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiQuery getDefaultInstanceForType() { + return monitoring.Monitoring.KpiQuery.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiQuery build() { + monitoring.Monitoring.KpiQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.KpiQuery buildPartial() { + monitoring.Monitoring.KpiQuery result = new monitoring.Monitoring.KpiQuery(this); + int from_bitField0_ = bitField0_; + if (kpiIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + kpiIds_ = java.util.Collections.unmodifiableList(kpiIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.kpiIds_ = kpiIds_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiQuery) { + return mergeFrom((monitoring.Monitoring.KpiQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiQuery other) { + if (other == monitoring.Monitoring.KpiQuery.getDefaultInstance()) + return this; + if (kpiIdsBuilder_ == null) { + if (!other.kpiIds_.isEmpty()) { + if (kpiIds_.isEmpty()) { + kpiIds_ = other.kpiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKpiIdsIsMutable(); + kpiIds_.addAll(other.kpiIds_); + } + onChanged(); + } + } else { + if (!other.kpiIds_.isEmpty()) { + if (kpiIdsBuilder_.isEmpty()) { + kpiIdsBuilder_.dispose(); + kpiIdsBuilder_ = null; + kpiIds_ = other.kpiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + kpiIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKpiIdsFieldBuilder() : null; + } else { + kpiIdsBuilder_.addAllMessages(other.kpiIds_); + } + } + } + if (other.getMonitoringWindowS() != 0F) { + setMonitoringWindowS(other.getMonitoringWindowS()); + } + if (other.getLastNSamples() != 0) { + setLastNSamples(other.getLastNSamples()); + } + if (other.hasStartTimestamp()) { + mergeStartTimestamp(other.getStartTimestamp()); + } + if (other.hasEndTimestamp()) { + mergeEndTimestamp(other.getEndTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiQuery) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List kpiIds_ = java.util.Collections.emptyList(); + + private void ensureKpiIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + kpiIds_ = new java.util.ArrayList(kpiIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 kpiIdsBuilder_; + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public java.util.List getKpiIdsList() { + if (kpiIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(kpiIds_); + } else { + return kpiIdsBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public int getKpiIdsCount() { + if (kpiIdsBuilder_ == null) { + return kpiIds_.size(); + } else { + return kpiIdsBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public monitoring.Monitoring.KpiId getKpiIds(int index) { + if (kpiIdsBuilder_ == null) { + return kpiIds_.get(index); + } else { + return kpiIdsBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder setKpiIds(int index, monitoring.Monitoring.KpiId value) { + if (kpiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIdsIsMutable(); + kpiIds_.set(index, value); + onChanged(); + } else { + kpiIdsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder setKpiIds(int index, monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.set(index, builderForValue.build()); + onChanged(); + } else { + kpiIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder addKpiIds(monitoring.Monitoring.KpiId value) { + if (kpiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIdsIsMutable(); + kpiIds_.add(value); + onChanged(); + } else { + kpiIdsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder addKpiIds(int index, monitoring.Monitoring.KpiId value) { + if (kpiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIdsIsMutable(); + kpiIds_.add(index, value); + onChanged(); + } else { + kpiIdsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder addKpiIds(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.add(builderForValue.build()); + onChanged(); + } else { + kpiIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder addKpiIds(int index, monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.add(index, builderForValue.build()); + onChanged(); + } else { + kpiIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder addAllKpiIds(java.lang.Iterable values) { + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kpiIds_); + onChanged(); + } else { + kpiIdsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder clearKpiIds() { + if (kpiIdsBuilder_ == null) { + kpiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + kpiIdsBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public Builder removeKpiIds(int index) { + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.remove(index); + onChanged(); + } else { + kpiIdsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdsBuilder(int index) { + return getKpiIdsFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder(int index) { + if (kpiIdsBuilder_ == null) { + return kpiIds_.get(index); + } else { + return kpiIdsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public java.util.List getKpiIdsOrBuilderList() { + if (kpiIdsBuilder_ != null) { + return kpiIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(kpiIds_); + } + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public monitoring.Monitoring.KpiId.Builder addKpiIdsBuilder() { + return getKpiIdsFieldBuilder().addBuilder(monitoring.Monitoring.KpiId.getDefaultInstance()); + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public monitoring.Monitoring.KpiId.Builder addKpiIdsBuilder(int index) { + return getKpiIdsFieldBuilder().addBuilder(index, monitoring.Monitoring.KpiId.getDefaultInstance()); + } + + /** + * repeated .monitoring.KpiId kpi_ids = 1; + */ + public java.util.List getKpiIdsBuilderList() { + return getKpiIdsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getKpiIdsFieldBuilder() { + if (kpiIdsBuilder_ == null) { + kpiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(kpiIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + kpiIds_ = null; + } + return kpiIdsBuilder_; + } + + private float monitoringWindowS_; + + /** + * float monitoring_window_s = 2; + * @return The monitoringWindowS. + */ + @java.lang.Override + public float getMonitoringWindowS() { + return monitoringWindowS_; + } + + /** + * float monitoring_window_s = 2; + * @param value The monitoringWindowS to set. + * @return This builder for chaining. + */ + public Builder setMonitoringWindowS(float value) { + monitoringWindowS_ = value; + onChanged(); + return this; + } + + /** + * float monitoring_window_s = 2; + * @return This builder for chaining. + */ + public Builder clearMonitoringWindowS() { + monitoringWindowS_ = 0F; + onChanged(); + return this; + } + + private int lastNSamples_; + + /** + *
+             * used when you want something like "get the last N many samples
+             * 
+ * + * uint32 last_n_samples = 3; + * @return The lastNSamples. + */ + @java.lang.Override + public int getLastNSamples() { + return lastNSamples_; + } + + /** + *
+             * used when you want something like "get the last N many samples
+             * 
+ * + * uint32 last_n_samples = 3; + * @param value The lastNSamples to set. + * @return This builder for chaining. + */ + public Builder setLastNSamples(int value) { + lastNSamples_ = value; + onChanged(); + return this; + } + + /** + *
+             * used when you want something like "get the last N many samples
+             * 
+ * + * uint32 last_n_samples = 3; + * @return This builder for chaining. + */ + public Builder clearLastNSamples() { + lastNSamples_ = 0; + onChanged(); + return this; + } + + private context.ContextOuterClass.Timestamp startTimestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 startTimestampBuilder_; + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + * @return Whether the startTimestamp field is set. + */ + public boolean hasStartTimestamp() { + return startTimestampBuilder_ != null || startTimestamp_ != null; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + * @return The startTimestamp. + */ + public context.ContextOuterClass.Timestamp getStartTimestamp() { + if (startTimestampBuilder_ == null) { + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; + } else { + return startTimestampBuilder_.getMessage(); + } + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + public Builder setStartTimestamp(context.ContextOuterClass.Timestamp value) { + if (startTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTimestamp_ = value; + onChanged(); + } else { + startTimestampBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + public Builder setStartTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (startTimestampBuilder_ == null) { + startTimestamp_ = builderForValue.build(); + onChanged(); + } else { + startTimestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) { + if (startTimestampBuilder_ == null) { + if (startTimestamp_ != null) { + startTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(startTimestamp_).mergeFrom(value).buildPartial(); + } else { + startTimestamp_ = value; + } + onChanged(); + } else { + startTimestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + public Builder clearStartTimestamp() { + if (startTimestampBuilder_ == null) { + startTimestamp_ = null; + onChanged(); + } else { + startTimestamp_ = null; + startTimestampBuilder_ = null; + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() { + onChanged(); + return getStartTimestampFieldBuilder().getBuilder(); + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { + if (startTimestampBuilder_ != null) { + return startTimestampBuilder_.getMessageOrBuilder(); + } else { + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; + } + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getStartTimestampFieldBuilder() { + if (startTimestampBuilder_ == null) { + startTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getStartTimestamp(), getParentForChildren(), isClean()); + startTimestamp_ = null; + } + return startTimestampBuilder_; + } + + private context.ContextOuterClass.Timestamp endTimestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 endTimestampBuilder_; + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + * @return Whether the endTimestamp field is set. + */ + public boolean hasEndTimestamp() { + return endTimestampBuilder_ != null || endTimestamp_ != null; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + * @return The endTimestamp. + */ + public context.ContextOuterClass.Timestamp getEndTimestamp() { + if (endTimestampBuilder_ == null) { + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; + } else { + return endTimestampBuilder_.getMessage(); + } + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + public Builder setEndTimestamp(context.ContextOuterClass.Timestamp value) { + if (endTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTimestamp_ = value; + onChanged(); + } else { + endTimestampBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + public Builder setEndTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (endTimestampBuilder_ == null) { + endTimestamp_ = builderForValue.build(); + onChanged(); + } else { + endTimestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) { + if (endTimestampBuilder_ == null) { + if (endTimestamp_ != null) { + endTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(endTimestamp_).mergeFrom(value).buildPartial(); + } else { + endTimestamp_ = value; + } + onChanged(); + } else { + endTimestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + public Builder clearEndTimestamp() { + if (endTimestampBuilder_ == null) { + endTimestamp_ = null; + onChanged(); + } else { + endTimestamp_ = null; + endTimestampBuilder_ = null; + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() { + onChanged(); + return getEndTimestampFieldBuilder().getBuilder(); + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { + if (endTimestampBuilder_ != null) { + return endTimestampBuilder_.getMessageOrBuilder(); + } else { + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; + } + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndTimestampFieldBuilder() { + if (endTimestampBuilder_ == null) { + endTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndTimestamp(), getParentForChildren(), isClean()); + endTimestamp_ = null; + } + return endTimestampBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiQuery) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiQuery) + private static final monitoring.Monitoring.KpiQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiQuery(); + } + + public static monitoring.Monitoring.KpiQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RawKpiOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.RawKpi) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + + /** + * .context.Timestamp timestamp = 1; + * @return The timestamp. + */ + context.ContextOuterClass.Timestamp getTimestamp(); + + /** + * .context.Timestamp timestamp = 1; + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + + /** + * .monitoring.KpiValue kpi_value = 2; + * @return Whether the kpiValue field is set. + */ + boolean hasKpiValue(); + + /** + * .monitoring.KpiValue kpi_value = 2; + * @return The kpiValue. + */ + monitoring.Monitoring.KpiValue getKpiValue(); + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); + } + + /** + *
+     * cell
+     * 
+ * + * Protobuf type {@code monitoring.RawKpi} + */ + public static final class RawKpi extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.RawKpi) + RawKpiOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use RawKpi.newBuilder() to construct. + private RawKpi(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RawKpi() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.RawKpi.class, monitoring.Monitoring.RawKpi.Builder.class); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Timestamp timestamp_; + + /** + * .context.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + + /** + * .context.Timestamp timestamp = 1; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + public static final int KPI_VALUE_FIELD_NUMBER = 2; + + private monitoring.Monitoring.KpiValue kpiValue_; + + /** + * .monitoring.KpiValue kpi_value = 2; + * @return Whether the kpiValue field is set. + */ + @java.lang.Override + public boolean hasKpiValue() { + return kpiValue_ != null; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + * @return The kpiValue. + */ + @java.lang.Override + public monitoring.Monitoring.KpiValue getKpiValue() { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { + return getKpiValue(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (timestamp_ != null) { + output.writeMessage(1, getTimestamp()); + } + if (kpiValue_ != null) { + output.writeMessage(2, getKpiValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimestamp()); + } + if (kpiValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.RawKpi)) { + return super.equals(obj); + } + monitoring.Monitoring.RawKpi other = (monitoring.Monitoring.RawKpi) obj; + if (hasTimestamp() != other.hasTimestamp()) + return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) + return false; + } + if (hasKpiValue() != other.hasKpiValue()) + return false; + if (hasKpiValue()) { + if (!getKpiValue().equals(other.getKpiValue())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + if (hasKpiValue()) { + hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getKpiValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.RawKpi parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpi parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpi parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpi parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpi parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpi parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpi parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpi parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpi parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpi parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpi parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpi parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.RawKpi prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * cell
+         * 
+ * + * Protobuf type {@code monitoring.RawKpi} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.RawKpi) + monitoring.Monitoring.RawKpiOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.RawKpi.class, monitoring.Monitoring.RawKpi.Builder.class); + } + + // 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; + timestampBuilder_ = null; + } + if (kpiValueBuilder_ == null) { + kpiValue_ = null; + } else { + kpiValue_ = null; + kpiValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpi getDefaultInstanceForType() { + return monitoring.Monitoring.RawKpi.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.RawKpi build() { + monitoring.Monitoring.RawKpi result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.RawKpi) { + return mergeFrom((monitoring.Monitoring.RawKpi) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.RawKpi other) { + if (other == monitoring.Monitoring.RawKpi.getDefaultInstance()) + return this; + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (other.hasKpiValue()) { + mergeKpiValue(other.getKpiValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + 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); + } + } + return this; + } + + private context.ContextOuterClass.Timestamp timestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; + + /** + * .context.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 1; + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * .context.Timestamp timestamp = 1; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 1; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Timestamp timestamp = 1; + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 1; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + /** + * .context.Timestamp timestamp = 1; + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + + /** + * .context.Timestamp timestamp = 1; + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } + + /** + * .context.Timestamp timestamp = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private monitoring.Monitoring.KpiValue kpiValue_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiValueBuilder_; + + /** + * .monitoring.KpiValue kpi_value = 2; + * @return Whether the kpiValue field is set. + */ + public boolean hasKpiValue() { + return kpiValueBuilder_ != null || kpiValue_ != null; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + * @return The kpiValue. + */ + public monitoring.Monitoring.KpiValue getKpiValue() { + if (kpiValueBuilder_ == null) { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } else { + return kpiValueBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { + if (kpiValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiValue_ = value; + onChanged(); + } else { + kpiValueBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + public Builder setKpiValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { + if (kpiValueBuilder_ == null) { + kpiValue_ = builderForValue.build(); + onChanged(); + } else { + kpiValueBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { + if (kpiValueBuilder_ == null) { + if (kpiValue_ != null) { + kpiValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); + } else { + kpiValue_ = value; + } + onChanged(); + } else { + kpiValueBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + public Builder clearKpiValue() { + if (kpiValueBuilder_ == null) { + kpiValue_ = null; + onChanged(); + } else { + kpiValue_ = null; + kpiValueBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { + onChanged(); + return getKpiValueFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { + if (kpiValueBuilder_ != null) { + return kpiValueBuilder_.getMessageOrBuilder(); + } else { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } + } + + /** + * .monitoring.KpiValue kpi_value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiValueFieldBuilder() { + if (kpiValueBuilder_ == null) { + kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiValue(), getParentForChildren(), isClean()); + kpiValue_ = null; + } + return kpiValueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.RawKpi) + } + + // @@protoc_insertion_point(class_scope:monitoring.RawKpi) + private static final monitoring.Monitoring.RawKpi DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpi(); + } + + public static monitoring.Monitoring.RawKpi getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpi getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RawKpiListOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.RawKpiList) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + java.util.List getRawKpisList(); + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + monitoring.Monitoring.RawKpi getRawKpis(int index); + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + int getRawKpisCount(); + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + java.util.List getRawKpisOrBuilderList(); + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder(int index); + } + + /** + *
+     * column
+     * 
+ * + * Protobuf type {@code monitoring.RawKpiList} + */ + public static final class RawKpiList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.RawKpiList) + RawKpiListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use RawKpiList.newBuilder() to construct. + private RawKpiList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RawKpiList() { + rawKpis_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.RawKpiList.class, monitoring.Monitoring.RawKpiList.Builder.class); + } + + public static final int KPI_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.KpiId kpiId_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int RAW_KPIS_FIELD_NUMBER = 2; + + private java.util.List rawKpis_; + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + @java.lang.Override + public java.util.List getRawKpisList() { + return rawKpis_; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + @java.lang.Override + public java.util.List getRawKpisOrBuilderList() { + return rawKpis_; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + @java.lang.Override + public int getRawKpisCount() { + return rawKpis_.size(); + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + @java.lang.Override + public monitoring.Monitoring.RawKpi getRawKpis(int index) { + return rawKpis_.get(index); + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + @java.lang.Override + public monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder(int index) { + return rawKpis_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + for (int i = 0; i < rawKpis_.size(); i++) { + output.writeMessage(2, rawKpis_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + for (int i = 0; i < rawKpis_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, rawKpis_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.RawKpiList)) { + return super.equals(obj); + } + monitoring.Monitoring.RawKpiList other = (monitoring.Monitoring.RawKpiList) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (!getRawKpisList().equals(other.getRawKpisList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + if (getRawKpisCount() > 0) { + hash = (37 * hash) + RAW_KPIS_FIELD_NUMBER; + hash = (53 * hash) + getRawKpisList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.RawKpiList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpiList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpiList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.RawKpiList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * column
+         * 
+ * + * Protobuf type {@code monitoring.RawKpiList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.RawKpiList) + monitoring.Monitoring.RawKpiListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.RawKpiList.class, monitoring.Monitoring.RawKpiList.Builder.class); + } + + // 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; + kpiIdBuilder_ = null; + } + if (rawKpisBuilder_ == null) { + rawKpis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rawKpisBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiList getDefaultInstanceForType() { + return monitoring.Monitoring.RawKpiList.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiList build() { + monitoring.Monitoring.RawKpiList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + if (rawKpisBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rawKpis_ = java.util.Collections.unmodifiableList(rawKpis_); + bitField0_ = (bitField0_ & ~0x00000001); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.RawKpiList) { + return mergeFrom((monitoring.Monitoring.RawKpiList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.RawKpiList other) { + if (other == monitoring.Monitoring.RawKpiList.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (rawKpisBuilder_ == null) { + if (!other.rawKpis_.isEmpty()) { + if (rawKpis_.isEmpty()) { + rawKpis_ = other.rawKpis_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRawKpisIsMutable(); + rawKpis_.addAll(other.rawKpis_); + } + onChanged(); + } + } else { + if (!other.rawKpis_.isEmpty()) { + if (rawKpisBuilder_.isEmpty()) { + rawKpisBuilder_.dispose(); + rawKpisBuilder_ = null; + rawKpis_ = other.rawKpis_; + bitField0_ = (bitField0_ & ~0x00000001); + rawKpisBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRawKpisFieldBuilder() : null; + } else { + rawKpisBuilder_.addAllMessages(other.rawKpis_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.RawKpiList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private java.util.List rawKpis_ = java.util.Collections.emptyList(); + + private void ensureRawKpisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rawKpis_ = new java.util.ArrayList(rawKpis_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 rawKpisBuilder_; + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public java.util.List getRawKpisList() { + if (rawKpisBuilder_ == null) { + return java.util.Collections.unmodifiableList(rawKpis_); + } else { + return rawKpisBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public int getRawKpisCount() { + if (rawKpisBuilder_ == null) { + return rawKpis_.size(); + } else { + return rawKpisBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public monitoring.Monitoring.RawKpi getRawKpis(int index) { + if (rawKpisBuilder_ == null) { + return rawKpis_.get(index); + } else { + return rawKpisBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder setRawKpis(int index, monitoring.Monitoring.RawKpi value) { + if (rawKpisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpisIsMutable(); + rawKpis_.set(index, value); + onChanged(); + } else { + rawKpisBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder setRawKpis(int index, monitoring.Monitoring.RawKpi.Builder builderForValue) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.set(index, builderForValue.build()); + onChanged(); + } else { + rawKpisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder addRawKpis(monitoring.Monitoring.RawKpi value) { + if (rawKpisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpisIsMutable(); + rawKpis_.add(value); + onChanged(); + } else { + rawKpisBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder addRawKpis(int index, monitoring.Monitoring.RawKpi value) { + if (rawKpisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpisIsMutable(); + rawKpis_.add(index, value); + onChanged(); + } else { + rawKpisBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder addRawKpis(monitoring.Monitoring.RawKpi.Builder builderForValue) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.add(builderForValue.build()); + onChanged(); + } else { + rawKpisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder addRawKpis(int index, monitoring.Monitoring.RawKpi.Builder builderForValue) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.add(index, builderForValue.build()); + onChanged(); + } else { + rawKpisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder addAllRawKpis(java.lang.Iterable values) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rawKpis_); + onChanged(); + } else { + rawKpisBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder clearRawKpis() { + if (rawKpisBuilder_ == null) { + rawKpis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rawKpisBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public Builder removeRawKpis(int index) { + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.remove(index); + onChanged(); + } else { + rawKpisBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public monitoring.Monitoring.RawKpi.Builder getRawKpisBuilder(int index) { + return getRawKpisFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder(int index) { + if (rawKpisBuilder_ == null) { + return rawKpis_.get(index); + } else { + return rawKpisBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public java.util.List getRawKpisOrBuilderList() { + if (rawKpisBuilder_ != null) { + return rawKpisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rawKpis_); + } + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public monitoring.Monitoring.RawKpi.Builder addRawKpisBuilder() { + return getRawKpisFieldBuilder().addBuilder(monitoring.Monitoring.RawKpi.getDefaultInstance()); + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public monitoring.Monitoring.RawKpi.Builder addRawKpisBuilder(int index) { + return getRawKpisFieldBuilder().addBuilder(index, monitoring.Monitoring.RawKpi.getDefaultInstance()); + } + + /** + * repeated .monitoring.RawKpi raw_kpis = 2; + */ + public java.util.List getRawKpisBuilderList() { + return getRawKpisFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getRawKpisFieldBuilder() { + if (rawKpisBuilder_ == null) { + rawKpisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(rawKpis_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rawKpis_ = null; + } + return rawKpisBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.RawKpiList) + } + + // @@protoc_insertion_point(class_scope:monitoring.RawKpiList) + private static final monitoring.Monitoring.RawKpiList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpiList(); + } + + public static monitoring.Monitoring.RawKpiList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RawKpiTableOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.RawKpiTable) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + java.util.List getRawKpiListsList(); + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + monitoring.Monitoring.RawKpiList getRawKpiLists(int index); + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + int getRawKpiListsCount(); + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + java.util.List getRawKpiListsOrBuilderList(); + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder(int index); + } + + /** + *
+     * table
+     * 
+ * + * Protobuf type {@code monitoring.RawKpiTable} + */ + public static final class RawKpiTable extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.RawKpiTable) + RawKpiTableOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use RawKpiTable.newBuilder() to construct. + private RawKpiTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RawKpiTable() { + rawKpiLists_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.RawKpiTable.class, monitoring.Monitoring.RawKpiTable.Builder.class); + } + + public static final int RAW_KPI_LISTS_FIELD_NUMBER = 1; + + private java.util.List rawKpiLists_; + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + @java.lang.Override + public java.util.List getRawKpiListsList() { + return rawKpiLists_; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + @java.lang.Override + public java.util.List getRawKpiListsOrBuilderList() { + return rawKpiLists_; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + @java.lang.Override + public int getRawKpiListsCount() { + return rawKpiLists_.size(); + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + @java.lang.Override + public monitoring.Monitoring.RawKpiList getRawKpiLists(int index) { + return rawKpiLists_.get(index); + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + @java.lang.Override + public monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder(int index) { + return rawKpiLists_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < rawKpiLists_.size(); i++) { + output.writeMessage(1, rawKpiLists_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < rawKpiLists_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rawKpiLists_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.RawKpiTable)) { + return super.equals(obj); + } + monitoring.Monitoring.RawKpiTable other = (monitoring.Monitoring.RawKpiTable) obj; + if (!getRawKpiListsList().equals(other.getRawKpiListsList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRawKpiListsCount() > 0) { + hash = (37 * hash) + RAW_KPI_LISTS_FIELD_NUMBER; + hash = (53 * hash) + getRawKpiListsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiTable parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpiTable parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.RawKpiTable parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.RawKpiTable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + *
+         * table
+         * 
+ * + * Protobuf type {@code monitoring.RawKpiTable} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.RawKpiTable) + monitoring.Monitoring.RawKpiTableOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.RawKpiTable.class, monitoring.Monitoring.RawKpiTable.Builder.class); + } + + // 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(); + if (rawKpiListsBuilder_ == null) { + rawKpiLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rawKpiListsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiTable getDefaultInstanceForType() { + return monitoring.Monitoring.RawKpiTable.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiTable build() { + monitoring.Monitoring.RawKpiTable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiTable buildPartial() { + monitoring.Monitoring.RawKpiTable result = new monitoring.Monitoring.RawKpiTable(this); + int from_bitField0_ = bitField0_; + if (rawKpiListsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rawKpiLists_ = java.util.Collections.unmodifiableList(rawKpiLists_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rawKpiLists_ = rawKpiLists_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.RawKpiTable) { + return mergeFrom((monitoring.Monitoring.RawKpiTable) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.RawKpiTable other) { + if (other == monitoring.Monitoring.RawKpiTable.getDefaultInstance()) + return this; + if (rawKpiListsBuilder_ == null) { + if (!other.rawKpiLists_.isEmpty()) { + if (rawKpiLists_.isEmpty()) { + rawKpiLists_ = other.rawKpiLists_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRawKpiListsIsMutable(); + rawKpiLists_.addAll(other.rawKpiLists_); + } + onChanged(); + } + } else { + if (!other.rawKpiLists_.isEmpty()) { + if (rawKpiListsBuilder_.isEmpty()) { + rawKpiListsBuilder_.dispose(); + rawKpiListsBuilder_ = null; + rawKpiLists_ = other.rawKpiLists_; + bitField0_ = (bitField0_ & ~0x00000001); + rawKpiListsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRawKpiListsFieldBuilder() : null; + } else { + rawKpiListsBuilder_.addAllMessages(other.rawKpiLists_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.RawKpiTable) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List rawKpiLists_ = java.util.Collections.emptyList(); + + private void ensureRawKpiListsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rawKpiLists_ = new java.util.ArrayList(rawKpiLists_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 rawKpiListsBuilder_; + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public java.util.List getRawKpiListsList() { + if (rawKpiListsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rawKpiLists_); + } else { + return rawKpiListsBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public int getRawKpiListsCount() { + if (rawKpiListsBuilder_ == null) { + return rawKpiLists_.size(); + } else { + return rawKpiListsBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public monitoring.Monitoring.RawKpiList getRawKpiLists(int index) { + if (rawKpiListsBuilder_ == null) { + return rawKpiLists_.get(index); + } else { + return rawKpiListsBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder setRawKpiLists(int index, monitoring.Monitoring.RawKpiList value) { + if (rawKpiListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpiListsIsMutable(); + rawKpiLists_.set(index, value); + onChanged(); + } else { + rawKpiListsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder setRawKpiLists(int index, monitoring.Monitoring.RawKpiList.Builder builderForValue) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.set(index, builderForValue.build()); + onChanged(); + } else { + rawKpiListsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder addRawKpiLists(monitoring.Monitoring.RawKpiList value) { + if (rawKpiListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(value); + onChanged(); + } else { + rawKpiListsBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder addRawKpiLists(int index, monitoring.Monitoring.RawKpiList value) { + if (rawKpiListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(index, value); + onChanged(); + } else { + rawKpiListsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder addRawKpiLists(monitoring.Monitoring.RawKpiList.Builder builderForValue) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(builderForValue.build()); + onChanged(); + } else { + rawKpiListsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder addRawKpiLists(int index, monitoring.Monitoring.RawKpiList.Builder builderForValue) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(index, builderForValue.build()); + onChanged(); + } else { + rawKpiListsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder addAllRawKpiLists(java.lang.Iterable values) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rawKpiLists_); + onChanged(); + } else { + rawKpiListsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder clearRawKpiLists() { + if (rawKpiListsBuilder_ == null) { + rawKpiLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rawKpiListsBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public Builder removeRawKpiLists(int index) { + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.remove(index); + onChanged(); + } else { + rawKpiListsBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public monitoring.Monitoring.RawKpiList.Builder getRawKpiListsBuilder(int index) { + return getRawKpiListsFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder(int index) { + if (rawKpiListsBuilder_ == null) { + return rawKpiLists_.get(index); + } else { + return rawKpiListsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public java.util.List getRawKpiListsOrBuilderList() { + if (rawKpiListsBuilder_ != null) { + return rawKpiListsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rawKpiLists_); + } + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public monitoring.Monitoring.RawKpiList.Builder addRawKpiListsBuilder() { + return getRawKpiListsFieldBuilder().addBuilder(monitoring.Monitoring.RawKpiList.getDefaultInstance()); + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public monitoring.Monitoring.RawKpiList.Builder addRawKpiListsBuilder(int index) { + return getRawKpiListsFieldBuilder().addBuilder(index, monitoring.Monitoring.RawKpiList.getDefaultInstance()); + } + + /** + * repeated .monitoring.RawKpiList raw_kpi_lists = 1; + */ + public java.util.List getRawKpiListsBuilderList() { + return getRawKpiListsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getRawKpiListsFieldBuilder() { + if (rawKpiListsBuilder_ == null) { + rawKpiListsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(rawKpiLists_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rawKpiLists_ = null; + } + return rawKpiListsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.RawKpiTable) + } + + // @@protoc_insertion_point(class_scope:monitoring.RawKpiTable) + private static final monitoring.Monitoring.RawKpiTable DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpiTable(); + } + + public static monitoring.Monitoring.RawKpiTable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.RawKpiTable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiIdOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiId) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid kpi_id = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .context.Uuid kpi_id = 1; + * @return The kpiId. + */ + context.ContextOuterClass.Uuid getKpiId(); + + /** + * .context.Uuid kpi_id = 1; + */ + context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder(); + } + + /** + * Protobuf type {@code monitoring.KpiId} + */ + public static final class KpiId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiId) + KpiIdOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use KpiId.newBuilder() to construct. + private KpiId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KpiId() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiId_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiId.class, monitoring.Monitoring.KpiId.Builder.class); + } + + public static final int KPI_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid kpiId_; + + /** + * .context.Uuid kpi_id = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .context.Uuid kpi_id = 1; + * @return The kpiId. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getKpiId() { + return kpiId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; + } + + /** + * .context.Uuid kpi_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiId)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiId other = (monitoring.Monitoring.KpiId) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiId) + monitoring.Monitoring.KpiIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiId_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiId.class, monitoring.Monitoring.KpiId.Builder.class); + } + + // 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; + kpiIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiId_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiId getDefaultInstanceForType() { + return monitoring.Monitoring.KpiId.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiId build() { + monitoring.Monitoring.KpiId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiId) { + return mergeFrom((monitoring.Monitoring.KpiId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiId other) { + if (other == monitoring.Monitoring.KpiId.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .context.Uuid kpi_id = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .context.Uuid kpi_id = 1; + * @return The kpiId. + */ + public context.ContextOuterClass.Uuid getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .context.Uuid kpi_id = 1; + */ + public Builder setKpiId(context.ContextOuterClass.Uuid value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid kpi_id = 1; + */ + public Builder setKpiId(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid kpi_id = 1; + */ + public Builder mergeKpiId(context.ContextOuterClass.Uuid value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = context.ContextOuterClass.Uuid.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid kpi_id = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid kpi_id = 1; + */ + public context.ContextOuterClass.Uuid.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid kpi_id = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; + } + } + + /** + * .context.Uuid kpi_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiId) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiId) + private static final monitoring.Monitoring.KpiId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiId(); + } + + public static monitoring.Monitoring.KpiId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.Kpi) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpi_id = 1; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * .context.Timestamp timestamp = 2; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + + /** + * .context.Timestamp timestamp = 2; + * @return The timestamp. + */ + context.ContextOuterClass.Timestamp getTimestamp(); + + /** + * .context.Timestamp timestamp = 2; + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + + /** + * .monitoring.KpiValue kpi_value = 3; + * @return Whether the kpiValue field is set. + */ + boolean hasKpiValue(); + + /** + * .monitoring.KpiValue kpi_value = 3; + * @return The kpiValue. + */ + monitoring.Monitoring.KpiValue getKpiValue(); + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); + } + + /** + * Protobuf type {@code monitoring.Kpi} + */ + public static final class Kpi extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.Kpi) + KpiOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use Kpi.newBuilder() to construct. + private Kpi(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Kpi() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_Kpi_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.Kpi.class, monitoring.Monitoring.Kpi.Builder.class); + } + + public static final int KPI_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.KpiId kpiId_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 2; + + private context.ContextOuterClass.Timestamp timestamp_; + + /** + * .context.Timestamp timestamp = 2; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 2; + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + + /** + * .context.Timestamp timestamp = 2; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + public static final int KPI_VALUE_FIELD_NUMBER = 3; + + private monitoring.Monitoring.KpiValue kpiValue_; + + /** + * .monitoring.KpiValue kpi_value = 3; + * @return Whether the kpiValue field is set. + */ + @java.lang.Override + public boolean hasKpiValue() { + return kpiValue_ != null; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + * @return The kpiValue. + */ + @java.lang.Override + public monitoring.Monitoring.KpiValue getKpiValue() { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { + return getKpiValue(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiId_ != null) { + output.writeMessage(1, getKpiId()); + } + if (timestamp_ != null) { + output.writeMessage(2, getTimestamp()); + } + if (kpiValue_ != null) { + output.writeMessage(3, getKpiValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); + } + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTimestamp()); + } + if (kpiValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKpiValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.Kpi)) { + return super.equals(obj); + } + monitoring.Monitoring.Kpi other = (monitoring.Monitoring.Kpi) obj; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (hasTimestamp() != other.hasTimestamp()) + return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) + return false; + } + if (hasKpiValue() != other.hasKpiValue()) + return false; + if (hasKpiValue()) { + if (!getKpiValue().equals(other.getKpiValue())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + if (hasKpiValue()) { + hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getKpiValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.Kpi parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.Kpi parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.Kpi parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.Kpi parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.Kpi parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.Kpi parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.Kpi parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.Kpi parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.Kpi parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.Kpi parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.Kpi parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.Kpi parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.Kpi prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.Kpi} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.Kpi) + monitoring.Monitoring.KpiOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_Kpi_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_Kpi_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.Kpi.class, monitoring.Monitoring.Kpi.Builder.class); + } + + // 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; + kpiIdBuilder_ = null; + } + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + if (kpiValueBuilder_ == null) { + kpiValue_ = null; + } else { + kpiValue_ = null; + kpiValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_Kpi_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.Kpi getDefaultInstanceForType() { + return monitoring.Monitoring.Kpi.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.Kpi build() { + monitoring.Monitoring.Kpi result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.Kpi) { + return mergeFrom((monitoring.Monitoring.Kpi) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.Kpi other) { + if (other == monitoring.Monitoring.Kpi.getDefaultInstance()) + return this; + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (other.hasKpiValue()) { + mergeKpiValue(other.getKpiValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.Kpi) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpi_id = 1; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 1; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpi_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private context.ContextOuterClass.Timestamp timestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; + + /** + * .context.Timestamp timestamp = 2; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 2; + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * .context.Timestamp timestamp = 2; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 2; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Timestamp timestamp = 2; + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 2; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + /** + * .context.Timestamp timestamp = 2; + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + + /** + * .context.Timestamp timestamp = 2; + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } + + /** + * .context.Timestamp timestamp = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private monitoring.Monitoring.KpiValue kpiValue_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiValueBuilder_; + + /** + * .monitoring.KpiValue kpi_value = 3; + * @return Whether the kpiValue field is set. + */ + public boolean hasKpiValue() { + return kpiValueBuilder_ != null || kpiValue_ != null; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + * @return The kpiValue. + */ + public monitoring.Monitoring.KpiValue getKpiValue() { + if (kpiValueBuilder_ == null) { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } else { + return kpiValueBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { + if (kpiValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiValue_ = value; + onChanged(); + } else { + kpiValueBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + public Builder setKpiValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { + if (kpiValueBuilder_ == null) { + kpiValue_ = builderForValue.build(); + onChanged(); + } else { + kpiValueBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { + if (kpiValueBuilder_ == null) { + if (kpiValue_ != null) { + kpiValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); + } else { + kpiValue_ = value; + } + onChanged(); + } else { + kpiValueBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + public Builder clearKpiValue() { + if (kpiValueBuilder_ == null) { + kpiValue_ = null; + onChanged(); + } else { + kpiValue_ = null; + kpiValueBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { + onChanged(); + return getKpiValueFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { + if (kpiValueBuilder_ != null) { + return kpiValueBuilder_.getMessageOrBuilder(); + } else { + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; + } + } + + /** + * .monitoring.KpiValue kpi_value = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiValueFieldBuilder() { + if (kpiValueBuilder_ == null) { + kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiValue(), getParentForChildren(), isClean()); + kpiValue_ = null; + } + return kpiValueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.Kpi) + } + + // @@protoc_insertion_point(class_scope:monitoring.Kpi) + private static final monitoring.Monitoring.Kpi DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.Kpi(); + } + + public static monitoring.Monitoring.Kpi getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.Kpi getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiValueRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiValueRange) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.KpiValue kpiMinValue = 1; + * @return Whether the kpiMinValue field is set. + */ + boolean hasKpiMinValue(); + + /** + * .monitoring.KpiValue kpiMinValue = 1; + * @return The kpiMinValue. + */ + monitoring.Monitoring.KpiValue getKpiMinValue(); + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder(); + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + * @return Whether the kpiMaxValue field is set. + */ + boolean hasKpiMaxValue(); + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + * @return The kpiMaxValue. + */ + monitoring.Monitoring.KpiValue getKpiMaxValue(); + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder(); + + /** + *
+         * by default True
+         * 
+ * + * bool inRange = 3; + * @return The inRange. + */ + boolean getInRange(); + + /** + *
+         * False is outside the interval
+         * 
+ * + * bool includeMinValue = 4; + * @return The includeMinValue. + */ + boolean getIncludeMinValue(); + + /** + *
+         * False is outside the interval
+         * 
+ * + * bool includeMaxValue = 5; + * @return The includeMaxValue. + */ + boolean getIncludeMaxValue(); + } + + /** + * Protobuf type {@code monitoring.KpiValueRange} + */ + public static final class KpiValueRange extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiValueRange) + KpiValueRangeOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use KpiValueRange.newBuilder() to construct. + private KpiValueRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KpiValueRange() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiValueRange.class, monitoring.Monitoring.KpiValueRange.Builder.class); + } + + public static final int KPIMINVALUE_FIELD_NUMBER = 1; + + private monitoring.Monitoring.KpiValue kpiMinValue_; + + /** + * .monitoring.KpiValue kpiMinValue = 1; + * @return Whether the kpiMinValue field is set. + */ + @java.lang.Override + public boolean hasKpiMinValue() { + return kpiMinValue_ != null; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + * @return The kpiMinValue. + */ + @java.lang.Override + public monitoring.Monitoring.KpiValue getKpiMinValue() { + return kpiMinValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder() { + return getKpiMinValue(); + } + + public static final int KPIMAXVALUE_FIELD_NUMBER = 2; + + private monitoring.Monitoring.KpiValue kpiMaxValue_; + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + * @return Whether the kpiMaxValue field is set. + */ + @java.lang.Override + public boolean hasKpiMaxValue() { + return kpiMaxValue_ != null; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + * @return The kpiMaxValue. + */ + @java.lang.Override + public monitoring.Monitoring.KpiValue getKpiMaxValue() { + return kpiMaxValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder() { + return getKpiMaxValue(); + } + + public static final int INRANGE_FIELD_NUMBER = 3; + + private boolean inRange_; + + /** + *
+         * by default True
+         * 
+ * + * bool inRange = 3; + * @return The inRange. + */ + @java.lang.Override + public boolean getInRange() { + return inRange_; + } + + public static final int INCLUDEMINVALUE_FIELD_NUMBER = 4; + + private boolean includeMinValue_; + + /** + *
+         * False is outside the interval
+         * 
+ * + * bool includeMinValue = 4; + * @return The includeMinValue. + */ + @java.lang.Override + public boolean getIncludeMinValue() { + return includeMinValue_; + } + + public static final int INCLUDEMAXVALUE_FIELD_NUMBER = 5; + + private boolean includeMaxValue_; + + /** + *
+         * False is outside the interval
+         * 
+ * + * bool includeMaxValue = 5; + * @return The includeMaxValue. + */ + @java.lang.Override + public boolean getIncludeMaxValue() { + return includeMaxValue_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kpiMinValue_ != null) { + output.writeMessage(1, getKpiMinValue()); + } + if (kpiMaxValue_ != null) { + output.writeMessage(2, getKpiMaxValue()); + } + if (inRange_ != false) { + output.writeBool(3, inRange_); + } + if (includeMinValue_ != false) { + output.writeBool(4, includeMinValue_); + } + if (includeMaxValue_ != false) { + output.writeBool(5, includeMaxValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (kpiMinValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiMinValue()); + } + if (kpiMaxValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiMaxValue()); + } + if (inRange_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, inRange_); + } + if (includeMinValue_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeMinValue_); + } + if (includeMaxValue_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, includeMaxValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiValueRange)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiValueRange other = (monitoring.Monitoring.KpiValueRange) obj; + if (hasKpiMinValue() != other.hasKpiMinValue()) + return false; + if (hasKpiMinValue()) { + if (!getKpiMinValue().equals(other.getKpiMinValue())) + return false; + } + if (hasKpiMaxValue() != other.hasKpiMaxValue()) + return false; + if (hasKpiMaxValue()) { + if (!getKpiMaxValue().equals(other.getKpiMaxValue())) + return false; + } + if (getInRange() != other.getInRange()) + return false; + if (getIncludeMinValue() != other.getIncludeMinValue()) + return false; + if (getIncludeMaxValue() != other.getIncludeMaxValue()) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKpiMinValue()) { + hash = (37 * hash) + KPIMINVALUE_FIELD_NUMBER; + hash = (53 * hash) + getKpiMinValue().hashCode(); + } + if (hasKpiMaxValue()) { + hash = (37 * hash) + KPIMAXVALUE_FIELD_NUMBER; + hash = (53 * hash) + getKpiMaxValue().hashCode(); + } + hash = (37 * hash) + INRANGE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInRange()); + hash = (37 * hash) + INCLUDEMINVALUE_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValueRange parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiValueRange parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiValueRange parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiValueRange prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiValueRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiValueRange) + monitoring.Monitoring.KpiValueRangeOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiValueRange.class, monitoring.Monitoring.KpiValueRange.Builder.class); + } + + // 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; + kpiMinValueBuilder_ = null; + } + if (kpiMaxValueBuilder_ == null) { + kpiMaxValue_ = null; + } else { + kpiMaxValue_ = null; + kpiMaxValueBuilder_ = null; + } + inRange_ = false; + includeMinValue_ = false; + includeMaxValue_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiValueRange getDefaultInstanceForType() { + return monitoring.Monitoring.KpiValueRange.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiValueRange build() { + monitoring.Monitoring.KpiValueRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiValueRange) { + return mergeFrom((monitoring.Monitoring.KpiValueRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiValueRange other) { + if (other == monitoring.Monitoring.KpiValueRange.getDefaultInstance()) + return this; + if (other.hasKpiMinValue()) { + mergeKpiMinValue(other.getKpiMinValue()); + } + if (other.hasKpiMaxValue()) { + mergeKpiMaxValue(other.getKpiMaxValue()); + } + if (other.getInRange() != false) { + setInRange(other.getInRange()); + } + if (other.getIncludeMinValue() != false) { + setIncludeMinValue(other.getIncludeMinValue()); + } + if (other.getIncludeMaxValue() != false) { + setIncludeMaxValue(other.getIncludeMaxValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiValueRange) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.KpiValue kpiMinValue_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiMinValueBuilder_; + + /** + * .monitoring.KpiValue kpiMinValue = 1; + * @return Whether the kpiMinValue field is set. + */ + public boolean hasKpiMinValue() { + return kpiMinValueBuilder_ != null || kpiMinValue_ != null; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + * @return The kpiMinValue. + */ + public monitoring.Monitoring.KpiValue getKpiMinValue() { + if (kpiMinValueBuilder_ == null) { + return kpiMinValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; + } else { + return kpiMinValueBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + public Builder setKpiMinValue(monitoring.Monitoring.KpiValue value) { + if (kpiMinValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiMinValue_ = value; + onChanged(); + } else { + kpiMinValueBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + public Builder setKpiMinValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { + if (kpiMinValueBuilder_ == null) { + kpiMinValue_ = builderForValue.build(); + onChanged(); + } else { + kpiMinValueBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + public Builder mergeKpiMinValue(monitoring.Monitoring.KpiValue value) { + if (kpiMinValueBuilder_ == null) { + if (kpiMinValue_ != null) { + kpiMinValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiMinValue_).mergeFrom(value).buildPartial(); + } else { + kpiMinValue_ = value; + } + onChanged(); + } else { + kpiMinValueBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + public Builder clearKpiMinValue() { + if (kpiMinValueBuilder_ == null) { + kpiMinValue_ = null; + onChanged(); + } else { + kpiMinValue_ = null; + kpiMinValueBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + public monitoring.Monitoring.KpiValue.Builder getKpiMinValueBuilder() { + onChanged(); + return getKpiMinValueFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + public monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder() { + if (kpiMinValueBuilder_ != null) { + return kpiMinValueBuilder_.getMessageOrBuilder(); + } else { + return kpiMinValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; + } + } + + /** + * .monitoring.KpiValue kpiMinValue = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiMinValueFieldBuilder() { + if (kpiMinValueBuilder_ == null) { + kpiMinValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiMinValue(), getParentForChildren(), isClean()); + kpiMinValue_ = null; + } + return kpiMinValueBuilder_; + } + + private monitoring.Monitoring.KpiValue kpiMaxValue_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiMaxValueBuilder_; + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + * @return Whether the kpiMaxValue field is set. + */ + public boolean hasKpiMaxValue() { + return kpiMaxValueBuilder_ != null || kpiMaxValue_ != null; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + * @return The kpiMaxValue. + */ + public monitoring.Monitoring.KpiValue getKpiMaxValue() { + if (kpiMaxValueBuilder_ == null) { + return kpiMaxValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; + } else { + return kpiMaxValueBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + public Builder setKpiMaxValue(monitoring.Monitoring.KpiValue value) { + if (kpiMaxValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiMaxValue_ = value; + onChanged(); + } else { + kpiMaxValueBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + public Builder setKpiMaxValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { + if (kpiMaxValueBuilder_ == null) { + kpiMaxValue_ = builderForValue.build(); + onChanged(); + } else { + kpiMaxValueBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + public Builder mergeKpiMaxValue(monitoring.Monitoring.KpiValue value) { + if (kpiMaxValueBuilder_ == null) { + if (kpiMaxValue_ != null) { + kpiMaxValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiMaxValue_).mergeFrom(value).buildPartial(); + } else { + kpiMaxValue_ = value; + } + onChanged(); + } else { + kpiMaxValueBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + public Builder clearKpiMaxValue() { + if (kpiMaxValueBuilder_ == null) { + kpiMaxValue_ = null; + onChanged(); + } else { + kpiMaxValue_ = null; + kpiMaxValueBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + public monitoring.Monitoring.KpiValue.Builder getKpiMaxValueBuilder() { + onChanged(); + return getKpiMaxValueFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + public monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder() { + if (kpiMaxValueBuilder_ != null) { + return kpiMaxValueBuilder_.getMessageOrBuilder(); + } else { + return kpiMaxValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; + } + } + + /** + * .monitoring.KpiValue kpiMaxValue = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiMaxValueFieldBuilder() { + if (kpiMaxValueBuilder_ == null) { + kpiMaxValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiMaxValue(), getParentForChildren(), isClean()); + kpiMaxValue_ = null; + } + return kpiMaxValueBuilder_; + } + + private boolean inRange_; + + /** + *
+             * by default True
+             * 
+ * + * bool inRange = 3; + * @return The inRange. + */ + @java.lang.Override + public boolean getInRange() { + return inRange_; + } + + /** + *
+             * by default True
+             * 
+ * + * bool inRange = 3; + * @param value The inRange to set. + * @return This builder for chaining. + */ + public Builder setInRange(boolean value) { + inRange_ = value; + onChanged(); + return this; + } + + /** + *
+             * by default True
+             * 
+ * + * bool inRange = 3; + * @return This builder for chaining. + */ + public Builder clearInRange() { + inRange_ = false; + onChanged(); + return this; + } + + private boolean includeMinValue_; + + /** + *
+             * False is outside the interval
+             * 
+ * + * bool includeMinValue = 4; + * @return The includeMinValue. + */ + @java.lang.Override + public boolean getIncludeMinValue() { + return includeMinValue_; + } + + /** + *
+             * False is outside the interval
+             * 
+ * + * bool includeMinValue = 4; + * @param value The includeMinValue to set. + * @return This builder for chaining. + */ + public Builder setIncludeMinValue(boolean value) { + includeMinValue_ = value; + onChanged(); + return this; + } + + /** + *
+             * False is outside the interval
+             * 
+ * + * bool includeMinValue = 4; + * @return This builder for chaining. + */ + public Builder clearIncludeMinValue() { + includeMinValue_ = false; + onChanged(); + return this; + } + + private boolean includeMaxValue_; + + /** + *
+             * False is outside the interval
+             * 
+ * + * bool includeMaxValue = 5; + * @return The includeMaxValue. + */ + @java.lang.Override + public boolean getIncludeMaxValue() { + return includeMaxValue_; + } + + /** + *
+             * False is outside the interval
+             * 
+ * + * bool includeMaxValue = 5; + * @param value The includeMaxValue to set. + * @return This builder for chaining. + */ + public Builder setIncludeMaxValue(boolean value) { + includeMaxValue_ = value; + onChanged(); + return this; + } + + /** + *
+             * False is outside the interval
+             * 
+ * + * bool includeMaxValue = 5; + * @return This builder for chaining. + */ + public Builder clearIncludeMaxValue() { + includeMaxValue_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiValueRange) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiValueRange) + private static final monitoring.Monitoring.KpiValueRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiValueRange(); + } + + public static monitoring.Monitoring.KpiValueRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiValueRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiValueOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiValue) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 int32Val = 1; + * @return Whether the int32Val field is set. + */ + boolean hasInt32Val(); + + /** + * int32 int32Val = 1; + * @return The int32Val. + */ + int getInt32Val(); + + /** + * uint32 uint32Val = 2; + * @return Whether the uint32Val field is set. + */ + boolean hasUint32Val(); + + /** + * uint32 uint32Val = 2; + * @return The uint32Val. + */ + int getUint32Val(); + + /** + * int64 int64Val = 3; + * @return Whether the int64Val field is set. + */ + boolean hasInt64Val(); + + /** + * int64 int64Val = 3; + * @return The int64Val. + */ + long getInt64Val(); + + /** + * uint64 uint64Val = 4; + * @return Whether the uint64Val field is set. + */ + boolean hasUint64Val(); + + /** + * uint64 uint64Val = 4; + * @return The uint64Val. + */ + long getUint64Val(); + + /** + * float floatVal = 5; + * @return Whether the floatVal field is set. + */ + boolean hasFloatVal(); + + /** + * float floatVal = 5; + * @return The floatVal. + */ + float getFloatVal(); + + /** + * string stringVal = 6; + * @return Whether the stringVal field is set. + */ + boolean hasStringVal(); + + /** + * string stringVal = 6; + * @return The stringVal. + */ + java.lang.String getStringVal(); + + /** + * string stringVal = 6; + * @return The bytes for stringVal. + */ + com.google.protobuf.ByteString getStringValBytes(); + + /** + * bool boolVal = 7; + * @return Whether the boolVal field is set. + */ + boolean hasBoolVal(); + + /** + * bool boolVal = 7; + * @return The boolVal. + */ + boolean getBoolVal(); + + public monitoring.Monitoring.KpiValue.ValueCase getValueCase(); + } + + /** + * Protobuf type {@code monitoring.KpiValue} + */ + public static final class KpiValue extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiValue) + KpiValueOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use KpiValue.newBuilder() to construct. + private KpiValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KpiValue() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiValue_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiValue.class, monitoring.Monitoring.KpiValue.Builder.class); + } + + private int valueCase_ = 0; + + private java.lang.Object value_; + + public enum ValueCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { + + INT32VAL(1), + UINT32VAL(2), + INT64VAL(3), + UINT64VAL(4), + FLOATVAL(5), + STRINGVAL(6), + BOOLVAL(7), + VALUE_NOT_SET(0); + + private final int value; + + private ValueCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch(value) { + case 1: + return INT32VAL; + case 2: + return UINT32VAL; + case 3: + return INT64VAL; + case 4: + return UINT64VAL; + case 5: + return FLOATVAL; + case 6: + return STRINGVAL; + case 7: + return BOOLVAL; + case 0: + return VALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + } + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public static final int INT32VAL_FIELD_NUMBER = 1; + + /** + * int32 int32Val = 1; + * @return Whether the int32Val field is set. + */ + @java.lang.Override + public boolean hasInt32Val() { + return valueCase_ == 1; + } + + /** + * int32 int32Val = 1; + * @return The int32Val. + */ + @java.lang.Override + public int getInt32Val() { + if (valueCase_ == 1) { + return (java.lang.Integer) value_; + } + return 0; + } + + public static final int UINT32VAL_FIELD_NUMBER = 2; + + /** + * uint32 uint32Val = 2; + * @return Whether the uint32Val field is set. + */ + @java.lang.Override + public boolean hasUint32Val() { + return valueCase_ == 2; + } + + /** + * uint32 uint32Val = 2; + * @return The uint32Val. + */ + @java.lang.Override + public int getUint32Val() { + if (valueCase_ == 2) { + return (java.lang.Integer) value_; + } + return 0; + } + + public static final int INT64VAL_FIELD_NUMBER = 3; + + /** + * int64 int64Val = 3; + * @return Whether the int64Val field is set. + */ + @java.lang.Override + public boolean hasInt64Val() { + return valueCase_ == 3; + } + + /** + * int64 int64Val = 3; + * @return The int64Val. + */ + @java.lang.Override + public long getInt64Val() { + if (valueCase_ == 3) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int UINT64VAL_FIELD_NUMBER = 4; + + /** + * uint64 uint64Val = 4; + * @return Whether the uint64Val field is set. + */ + @java.lang.Override + public boolean hasUint64Val() { + return valueCase_ == 4; + } + + /** + * uint64 uint64Val = 4; + * @return The uint64Val. + */ + @java.lang.Override + public long getUint64Val() { + if (valueCase_ == 4) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int FLOATVAL_FIELD_NUMBER = 5; + + /** + * float floatVal = 5; + * @return Whether the floatVal field is set. + */ + @java.lang.Override + public boolean hasFloatVal() { + return valueCase_ == 5; + } + + /** + * float floatVal = 5; + * @return The floatVal. + */ + @java.lang.Override + public float getFloatVal() { + if (valueCase_ == 5) { + return (java.lang.Float) value_; + } + return 0F; + } + + public static final int STRINGVAL_FIELD_NUMBER = 6; + + /** + * string stringVal = 6; + * @return Whether the stringVal field is set. + */ + public boolean hasStringVal() { + return valueCase_ == 6; + } + + /** + * string stringVal = 6; + * @return The stringVal. + */ + public java.lang.String getStringVal() { + java.lang.Object ref = ""; + if (valueCase_ == 6) { + ref = value_; + } + 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(); + if (valueCase_ == 6) { + value_ = s; + } + return s; + } + } + + /** + * string stringVal = 6; + * @return The bytes for stringVal. + */ + public com.google.protobuf.ByteString getStringValBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 6) { + ref = value_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueCase_ == 6) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOLVAL_FIELD_NUMBER = 7; + + /** + * bool boolVal = 7; + * @return Whether the boolVal field is set. + */ + @java.lang.Override + public boolean hasBoolVal() { + return valueCase_ == 7; + } + + /** + * bool boolVal = 7; + * @return The boolVal. + */ + @java.lang.Override + public boolean getBoolVal() { + if (valueCase_ == 7) { + return (java.lang.Boolean) value_; + } + return false; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (valueCase_ == 1) { + output.writeInt32(1, (int) ((java.lang.Integer) value_)); + } + if (valueCase_ == 2) { + output.writeUInt32(2, (int) ((java.lang.Integer) value_)); + } + if (valueCase_ == 3) { + output.writeInt64(3, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 4) { + output.writeUInt64(4, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 5) { + output.writeFloat(5, (float) ((java.lang.Float) value_)); + } + if (valueCase_ == 6) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, value_); + } + if (valueCase_ == 7) { + output.writeBool(7, (boolean) ((java.lang.Boolean) value_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (valueCase_ == 1) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, (int) ((java.lang.Integer) value_)); + } + if (valueCase_ == 2) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, (int) ((java.lang.Integer) value_)); + } + if (valueCase_ == 3) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 4) { + size += com.google.protobuf.CodedOutputStream.computeUInt64Size(4, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 5) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, (float) ((java.lang.Float) value_)); + } + if (valueCase_ == 6) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, value_); + } + if (valueCase_ == 7) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, (boolean) ((java.lang.Boolean) value_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiValue)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiValue other = (monitoring.Monitoring.KpiValue) obj; + if (!getValueCase().equals(other.getValueCase())) + return false; + switch(valueCase_) { + case 1: + if (getInt32Val() != other.getInt32Val()) + return false; + break; + case 2: + if (getUint32Val() != other.getUint32Val()) + return false; + break; + case 3: + if (getInt64Val() != other.getInt64Val()) + return false; + break; + case 4: + if (getUint64Val() != other.getUint64Val()) + return false; + break; + case 5: + if (java.lang.Float.floatToIntBits(getFloatVal()) != java.lang.Float.floatToIntBits(other.getFloatVal())) + return false; + break; + case 6: + if (!getStringVal().equals(other.getStringVal())) + return false; + break; + case 7: + if (getBoolVal() != other.getBoolVal()) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch(valueCase_) { + case 1: + hash = (37 * hash) + INT32VAL_FIELD_NUMBER; + hash = (53 * hash) + getInt32Val(); + break; + case 2: + hash = (37 * hash) + UINT32VAL_FIELD_NUMBER; + hash = (53 * hash) + getUint32Val(); + break; + case 3: + hash = (37 * hash) + INT64VAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getInt64Val()); + break; + case 4: + hash = (37 * hash) + UINT64VAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUint64Val()); + break; + case 5: + hash = (37 * hash) + FLOATVAL_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getFloatVal()); + break; + case 6: + hash = (37 * hash) + STRINGVAL_FIELD_NUMBER; + hash = (53 * hash) + getStringVal().hashCode(); + break; + case 7: + hash = (37 * hash) + BOOLVAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoolVal()); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiValue parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiValue parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValue parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiValue parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValue parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiValue parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValue parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiValue parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiValue parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiValue parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiValue parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiValue) + monitoring.Monitoring.KpiValueOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiValue_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiValue.class, monitoring.Monitoring.KpiValue.Builder.class); + } + + // 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(); + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiValue_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiValue getDefaultInstanceForType() { + return monitoring.Monitoring.KpiValue.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiValue build() { + monitoring.Monitoring.KpiValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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 (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_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiValue) { + return mergeFrom((monitoring.Monitoring.KpiValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiValue other) { + if (other == monitoring.Monitoring.KpiValue.getDefaultInstance()) + return this; + switch(other.getValueCase()) { + case INT32VAL: + { + setInt32Val(other.getInt32Val()); + break; + } + case UINT32VAL: + { + setUint32Val(other.getUint32Val()); + break; + } + case INT64VAL: + { + setInt64Val(other.getInt64Val()); + break; + } + case UINT64VAL: + { + setUint64Val(other.getUint64Val()); + break; + } + case FLOATVAL: + { + setFloatVal(other.getFloatVal()); + break; + } + case STRINGVAL: + { + valueCase_ = 6; + value_ = other.value_; + onChanged(); + break; + } + case BOOLVAL: + { + setBoolVal(other.getBoolVal()); + break; + } + case VALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int valueCase_ = 0; + + private java.lang.Object value_; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + /** + * int32 int32Val = 1; + * @return Whether the int32Val field is set. + */ + public boolean hasInt32Val() { + return valueCase_ == 1; + } + + /** + * int32 int32Val = 1; + * @return The int32Val. + */ + public int getInt32Val() { + if (valueCase_ == 1) { + return (java.lang.Integer) value_; + } + return 0; + } + + /** + * int32 int32Val = 1; + * @param value The int32Val to set. + * @return This builder for chaining. + */ + public Builder setInt32Val(int value) { + valueCase_ = 1; + value_ = value; + onChanged(); + return this; + } + + /** + * int32 int32Val = 1; + * @return This builder for chaining. + */ + public Builder clearInt32Val() { + if (valueCase_ == 1) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * uint32 uint32Val = 2; + * @return Whether the uint32Val field is set. + */ + public boolean hasUint32Val() { + return valueCase_ == 2; + } + + /** + * uint32 uint32Val = 2; + * @return The uint32Val. + */ + public int getUint32Val() { + if (valueCase_ == 2) { + return (java.lang.Integer) value_; + } + return 0; + } + + /** + * uint32 uint32Val = 2; + * @param value The uint32Val to set. + * @return This builder for chaining. + */ + public Builder setUint32Val(int value) { + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + + /** + * uint32 uint32Val = 2; + * @return This builder for chaining. + */ + public Builder clearUint32Val() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * int64 int64Val = 3; + * @return Whether the int64Val field is set. + */ + public boolean hasInt64Val() { + return valueCase_ == 3; + } + + /** + * int64 int64Val = 3; + * @return The int64Val. + */ + public long getInt64Val() { + if (valueCase_ == 3) { + return (java.lang.Long) value_; + } + return 0L; + } + + /** + * int64 int64Val = 3; + * @param value The int64Val to set. + * @return This builder for chaining. + */ + public Builder setInt64Val(long value) { + valueCase_ = 3; + value_ = value; + onChanged(); + return this; + } + + /** + * int64 int64Val = 3; + * @return This builder for chaining. + */ + public Builder clearInt64Val() { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * uint64 uint64Val = 4; + * @return Whether the uint64Val field is set. + */ + public boolean hasUint64Val() { + return valueCase_ == 4; + } + + /** + * uint64 uint64Val = 4; + * @return The uint64Val. + */ + public long getUint64Val() { + if (valueCase_ == 4) { + return (java.lang.Long) value_; + } + return 0L; + } + + /** + * uint64 uint64Val = 4; + * @param value The uint64Val to set. + * @return This builder for chaining. + */ + public Builder setUint64Val(long value) { + valueCase_ = 4; + value_ = value; + onChanged(); + return this; + } + + /** + * uint64 uint64Val = 4; + * @return This builder for chaining. + */ + public Builder clearUint64Val() { + if (valueCase_ == 4) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * float floatVal = 5; + * @return Whether the floatVal field is set. + */ + public boolean hasFloatVal() { + return valueCase_ == 5; + } + + /** + * float floatVal = 5; + * @return The floatVal. + */ + public float getFloatVal() { + if (valueCase_ == 5) { + return (java.lang.Float) value_; + } + return 0F; + } + + /** + * float floatVal = 5; + * @param value The floatVal to set. + * @return This builder for chaining. + */ + public Builder setFloatVal(float value) { + valueCase_ = 5; + value_ = value; + onChanged(); + return this; + } + + /** + * float floatVal = 5; + * @return This builder for chaining. + */ + public Builder clearFloatVal() { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * string stringVal = 6; + * @return Whether the stringVal field is set. + */ + @java.lang.Override + public boolean hasStringVal() { + return valueCase_ == 6; + } + + /** + * string stringVal = 6; + * @return The stringVal. + */ + @java.lang.Override + public java.lang.String getStringVal() { + java.lang.Object ref = ""; + if (valueCase_ == 6) { + ref = value_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 6) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string stringVal = 6; + * @return The bytes for stringVal. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStringValBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 6) { + ref = value_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueCase_ == 6) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string stringVal = 6; + * @param value The stringVal to set. + * @return This builder for chaining. + */ + public Builder setStringVal(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 6; + value_ = value; + onChanged(); + return this; + } + + /** + * string stringVal = 6; + * @return This builder for chaining. + */ + public Builder clearStringVal() { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * string stringVal = 6; + * @param value The bytes for stringVal to set. + * @return This builder for chaining. + */ + public Builder setStringValBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueCase_ = 6; + value_ = value; + onChanged(); + return this; + } + + /** + * bool boolVal = 7; + * @return Whether the boolVal field is set. + */ + public boolean hasBoolVal() { + return valueCase_ == 7; + } + + /** + * bool boolVal = 7; + * @return The boolVal. + */ + public boolean getBoolVal() { + if (valueCase_ == 7) { + return (java.lang.Boolean) value_; + } + return false; + } + + /** + * bool boolVal = 7; + * @param value The boolVal to set. + * @return This builder for chaining. + */ + public Builder setBoolVal(boolean value) { + valueCase_ = 7; + value_ = value; + onChanged(); + return this; + } + + /** + * bool boolVal = 7; + * @return This builder for chaining. + */ + public Builder clearBoolVal() { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiValue) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiValue) + private static final monitoring.Monitoring.KpiValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiValue(); + } + + public static monitoring.Monitoring.KpiValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiListOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + java.util.List getKpiList(); + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + monitoring.Monitoring.Kpi getKpi(int index); + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + int getKpiCount(); + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + java.util.List getKpiOrBuilderList(); + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder(int index); + } + + /** + * Protobuf type {@code monitoring.KpiList} + */ + public static final class KpiList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiList) + KpiListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use KpiList.newBuilder() to construct. + private KpiList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KpiList() { + kpi_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiList.class, monitoring.Monitoring.KpiList.Builder.class); + } + + public static final int KPI_FIELD_NUMBER = 1; + + private java.util.List kpi_; + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + @java.lang.Override + public java.util.List getKpiList() { + return kpi_; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + @java.lang.Override + public java.util.List getKpiOrBuilderList() { + return kpi_; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + @java.lang.Override + public int getKpiCount() { + return kpi_.size(); + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + @java.lang.Override + public monitoring.Monitoring.Kpi getKpi(int index) { + return kpi_.get(index); + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder(int index) { + return kpi_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < kpi_.size(); i++) { + output.writeMessage(1, kpi_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < kpi_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, kpi_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiList)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiList other = (monitoring.Monitoring.KpiList) obj; + if (!getKpiList().equals(other.getKpiList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getKpiCount() > 0) { + hash = (37 * hash) + KPI_FIELD_NUMBER; + hash = (53 * hash) + getKpiList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiList) + monitoring.Monitoring.KpiListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiList.class, monitoring.Monitoring.KpiList.Builder.class); + } + + // 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(); + if (kpiBuilder_ == null) { + kpi_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + kpiBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiList_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiList getDefaultInstanceForType() { + return monitoring.Monitoring.KpiList.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiList build() { + monitoring.Monitoring.KpiList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.KpiList buildPartial() { + monitoring.Monitoring.KpiList result = new monitoring.Monitoring.KpiList(this); + int from_bitField0_ = bitField0_; + if (kpiBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + kpi_ = java.util.Collections.unmodifiableList(kpi_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.kpi_ = kpi_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiList) { + return mergeFrom((monitoring.Monitoring.KpiList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiList other) { + if (other == monitoring.Monitoring.KpiList.getDefaultInstance()) + return this; + if (kpiBuilder_ == null) { + if (!other.kpi_.isEmpty()) { + if (kpi_.isEmpty()) { + kpi_ = other.kpi_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKpiIsMutable(); + kpi_.addAll(other.kpi_); + } + onChanged(); + } + } else { + if (!other.kpi_.isEmpty()) { + if (kpiBuilder_.isEmpty()) { + kpiBuilder_.dispose(); + kpiBuilder_ = null; + kpi_ = other.kpi_; + bitField0_ = (bitField0_ & ~0x00000001); + kpiBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKpiFieldBuilder() : null; + } else { + kpiBuilder_.addAllMessages(other.kpi_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List kpi_ = java.util.Collections.emptyList(); + + private void ensureKpiIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + kpi_ = new java.util.ArrayList(kpi_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 kpiBuilder_; + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public java.util.List getKpiList() { + if (kpiBuilder_ == null) { + return java.util.Collections.unmodifiableList(kpi_); + } else { + return kpiBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public int getKpiCount() { + if (kpiBuilder_ == null) { + return kpi_.size(); + } else { + return kpiBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public monitoring.Monitoring.Kpi getKpi(int index) { + if (kpiBuilder_ == null) { + return kpi_.get(index); + } else { + return kpiBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder setKpi(int index, monitoring.Monitoring.Kpi value) { + if (kpiBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIsMutable(); + kpi_.set(index, value); + onChanged(); + } else { + kpiBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder setKpi(int index, monitoring.Monitoring.Kpi.Builder builderForValue) { + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.set(index, builderForValue.build()); + onChanged(); + } else { + kpiBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder addKpi(monitoring.Monitoring.Kpi value) { + if (kpiBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIsMutable(); + kpi_.add(value); + onChanged(); + } else { + kpiBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder addKpi(int index, monitoring.Monitoring.Kpi value) { + if (kpiBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiIsMutable(); + kpi_.add(index, value); + onChanged(); + } else { + kpiBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder addKpi(monitoring.Monitoring.Kpi.Builder builderForValue) { + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.add(builderForValue.build()); + onChanged(); + } else { + kpiBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder addKpi(int index, monitoring.Monitoring.Kpi.Builder builderForValue) { + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.add(index, builderForValue.build()); + onChanged(); + } else { + kpiBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder addAllKpi(java.lang.Iterable values) { + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kpi_); + onChanged(); + } else { + kpiBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder clearKpi() { + if (kpiBuilder_ == null) { + kpi_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + kpiBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public Builder removeKpi(int index) { + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.remove(index); + onChanged(); + } else { + kpiBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public monitoring.Monitoring.Kpi.Builder getKpiBuilder(int index) { + return getKpiFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder(int index) { + if (kpiBuilder_ == null) { + return kpi_.get(index); + } else { + return kpiBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public java.util.List getKpiOrBuilderList() { + if (kpiBuilder_ != null) { + return kpiBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(kpi_); + } + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public monitoring.Monitoring.Kpi.Builder addKpiBuilder() { + return getKpiFieldBuilder().addBuilder(monitoring.Monitoring.Kpi.getDefaultInstance()); + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public monitoring.Monitoring.Kpi.Builder addKpiBuilder(int index) { + return getKpiFieldBuilder().addBuilder(index, monitoring.Monitoring.Kpi.getDefaultInstance()); + } + + /** + * repeated .monitoring.Kpi kpi = 1; + */ + public java.util.List getKpiBuilderList() { + return getKpiFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getKpiFieldBuilder() { + if (kpiBuilder_ == null) { + kpiBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(kpi_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + kpi_ = null; + } + return kpiBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiList) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiList) + private static final monitoring.Monitoring.KpiList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiList(); + } + + public static monitoring.Monitoring.KpiList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KpiDescriptorListOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.KpiDescriptorList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + java.util.List getKpiDescriptorListList(); + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + monitoring.Monitoring.KpiDescriptor getKpiDescriptorList(int index); + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + int getKpiDescriptorListCount(); + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + java.util.List getKpiDescriptorListOrBuilderList(); + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorListOrBuilder(int index); + } + + /** + * Protobuf type {@code monitoring.KpiDescriptorList} + */ + public static final class KpiDescriptorList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.KpiDescriptorList) + KpiDescriptorListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use KpiDescriptorList.newBuilder() to construct. + private KpiDescriptorList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private KpiDescriptorList() { + kpiDescriptorList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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(); + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiDescriptorList.class, monitoring.Monitoring.KpiDescriptorList.Builder.class); + } + + public static final int KPI_DESCRIPTOR_LIST_FIELD_NUMBER = 1; + + private java.util.List kpiDescriptorList_; + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + @java.lang.Override + public java.util.List getKpiDescriptorListList() { + return kpiDescriptorList_; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + @java.lang.Override + public java.util.List getKpiDescriptorListOrBuilderList() { + return kpiDescriptorList_; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + @java.lang.Override + public int getKpiDescriptorListCount() { + return kpiDescriptorList_.size(); + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiDescriptor getKpiDescriptorList(int index) { + return kpiDescriptorList_.get(index); + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + @java.lang.Override + public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorListOrBuilder(int index) { + return kpiDescriptorList_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < kpiDescriptorList_.size(); i++) { + output.writeMessage(1, kpiDescriptorList_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < kpiDescriptorList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, kpiDescriptorList_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.KpiDescriptorList)) { + return super.equals(obj); + } + monitoring.Monitoring.KpiDescriptorList other = (monitoring.Monitoring.KpiDescriptorList) obj; + if (!getKpiDescriptorListList().equals(other.getKpiDescriptorListList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getKpiDescriptorListCount() > 0) { + hash = (37 * hash) + KPI_DESCRIPTOR_LIST_FIELD_NUMBER; + hash = (53 * hash) + getKpiDescriptorListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptorList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiDescriptorList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.KpiDescriptorList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.KpiDescriptorList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.KpiDescriptorList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.KpiDescriptorList) + monitoring.Monitoring.KpiDescriptorListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.KpiDescriptorList.class, monitoring.Monitoring.KpiDescriptorList.Builder.class); + } + + // 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(); + if (kpiDescriptorListBuilder_ == null) { + kpiDescriptorList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + kpiDescriptorListBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptorList getDefaultInstanceForType() { + return monitoring.Monitoring.KpiDescriptorList.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptorList build() { + monitoring.Monitoring.KpiDescriptorList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptorList buildPartial() { + monitoring.Monitoring.KpiDescriptorList result = new monitoring.Monitoring.KpiDescriptorList(this); + int from_bitField0_ = bitField0_; + if (kpiDescriptorListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + kpiDescriptorList_ = java.util.Collections.unmodifiableList(kpiDescriptorList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.kpiDescriptorList_ = kpiDescriptorList_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.KpiDescriptorList) { + return mergeFrom((monitoring.Monitoring.KpiDescriptorList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.KpiDescriptorList other) { + if (other == monitoring.Monitoring.KpiDescriptorList.getDefaultInstance()) + return this; + if (kpiDescriptorListBuilder_ == null) { + if (!other.kpiDescriptorList_.isEmpty()) { + if (kpiDescriptorList_.isEmpty()) { + kpiDescriptorList_ = other.kpiDescriptorList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.addAll(other.kpiDescriptorList_); + } + onChanged(); + } + } else { + if (!other.kpiDescriptorList_.isEmpty()) { + if (kpiDescriptorListBuilder_.isEmpty()) { + kpiDescriptorListBuilder_.dispose(); + kpiDescriptorListBuilder_ = null; + kpiDescriptorList_ = other.kpiDescriptorList_; + bitField0_ = (bitField0_ & ~0x00000001); + kpiDescriptorListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKpiDescriptorListFieldBuilder() : null; + } else { + kpiDescriptorListBuilder_.addAllMessages(other.kpiDescriptorList_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.KpiDescriptorList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List kpiDescriptorList_ = java.util.Collections.emptyList(); + + private void ensureKpiDescriptorListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + kpiDescriptorList_ = new java.util.ArrayList(kpiDescriptorList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 kpiDescriptorListBuilder_; + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public java.util.List getKpiDescriptorListList() { + if (kpiDescriptorListBuilder_ == null) { + return java.util.Collections.unmodifiableList(kpiDescriptorList_); + } else { + return kpiDescriptorListBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public int getKpiDescriptorListCount() { + if (kpiDescriptorListBuilder_ == null) { + return kpiDescriptorList_.size(); + } else { + return kpiDescriptorListBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public monitoring.Monitoring.KpiDescriptor getKpiDescriptorList(int index) { + if (kpiDescriptorListBuilder_ == null) { + return kpiDescriptorList_.get(index); + } else { + return kpiDescriptorListBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder setKpiDescriptorList(int index, monitoring.Monitoring.KpiDescriptor value) { + if (kpiDescriptorListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.set(index, value); + onChanged(); + } else { + kpiDescriptorListBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder setKpiDescriptorList(int index, monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { + if (kpiDescriptorListBuilder_ == null) { + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.set(index, builderForValue.build()); + onChanged(); + } else { + kpiDescriptorListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder addKpiDescriptorList(monitoring.Monitoring.KpiDescriptor value) { + if (kpiDescriptorListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.add(value); + onChanged(); + } else { + kpiDescriptorListBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder addKpiDescriptorList(int index, monitoring.Monitoring.KpiDescriptor value) { + if (kpiDescriptorListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.add(index, value); + onChanged(); + } else { + kpiDescriptorListBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder addKpiDescriptorList(monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { + if (kpiDescriptorListBuilder_ == null) { + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.add(builderForValue.build()); + onChanged(); + } else { + kpiDescriptorListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder addKpiDescriptorList(int index, monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { + if (kpiDescriptorListBuilder_ == null) { + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.add(index, builderForValue.build()); + onChanged(); + } else { + kpiDescriptorListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder addAllKpiDescriptorList(java.lang.Iterable values) { + if (kpiDescriptorListBuilder_ == null) { + ensureKpiDescriptorListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kpiDescriptorList_); + onChanged(); + } else { + kpiDescriptorListBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder clearKpiDescriptorList() { + if (kpiDescriptorListBuilder_ == null) { + kpiDescriptorList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + kpiDescriptorListBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public Builder removeKpiDescriptorList(int index) { + if (kpiDescriptorListBuilder_ == null) { + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.remove(index); + onChanged(); + } else { + kpiDescriptorListBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public monitoring.Monitoring.KpiDescriptor.Builder getKpiDescriptorListBuilder(int index) { + return getKpiDescriptorListFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorListOrBuilder(int index) { + if (kpiDescriptorListBuilder_ == null) { + return kpiDescriptorList_.get(index); + } else { + return kpiDescriptorListBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public java.util.List getKpiDescriptorListOrBuilderList() { + if (kpiDescriptorListBuilder_ != null) { + return kpiDescriptorListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(kpiDescriptorList_); + } + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public monitoring.Monitoring.KpiDescriptor.Builder addKpiDescriptorListBuilder() { + return getKpiDescriptorListFieldBuilder().addBuilder(monitoring.Monitoring.KpiDescriptor.getDefaultInstance()); + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public monitoring.Monitoring.KpiDescriptor.Builder addKpiDescriptorListBuilder(int index) { + return getKpiDescriptorListFieldBuilder().addBuilder(index, monitoring.Monitoring.KpiDescriptor.getDefaultInstance()); + } + + /** + * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + */ + public java.util.List getKpiDescriptorListBuilderList() { + return getKpiDescriptorListFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getKpiDescriptorListFieldBuilder() { + if (kpiDescriptorListBuilder_ == null) { + kpiDescriptorListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(kpiDescriptorList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + kpiDescriptorList_ = null; + } + return kpiDescriptorListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.KpiDescriptorList) + } + + // @@protoc_insertion_point(class_scope:monitoring.KpiDescriptorList) + private static final monitoring.Monitoring.KpiDescriptorList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.KpiDescriptorList(); + } + + public static monitoring.Monitoring.KpiDescriptorList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.KpiDescriptorList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SubsDescriptorOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.SubsDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return Whether the subsId field is set. + */ + boolean hasSubsId(); + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return The subsId. + */ + monitoring.Monitoring.SubscriptionID getSubsId(); + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder(); + + /** + * .monitoring.KpiId kpi_id = 2; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpi_id = 2; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpi_id = 2; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * float sampling_duration_s = 3; + * @return The samplingDurationS. + */ + float getSamplingDurationS(); + + /** + * float sampling_interval_s = 4; + * @return The samplingIntervalS. + */ + float getSamplingIntervalS(); + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 5; + * @return Whether the startTimestamp field is set. + */ + boolean hasStartTimestamp(); + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 5; + * @return The startTimestamp. + */ + context.ContextOuterClass.Timestamp getStartTimestamp(); + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder(); + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 6; + * @return Whether the endTimestamp field is set. + */ + boolean hasEndTimestamp(); + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 6; + * @return The endTimestamp. + */ + context.ContextOuterClass.Timestamp getEndTimestamp(); + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder(); + } + + /** + * Protobuf type {@code monitoring.SubsDescriptor} + */ + public static final class SubsDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.SubsDescriptor) + SubsDescriptorOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SubsDescriptor.newBuilder() to construct. + private SubsDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubsDescriptor() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubsDescriptor.class, monitoring.Monitoring.SubsDescriptor.Builder.class); + } + + public static final int SUBS_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.SubscriptionID subsId_; + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return Whether the subsId field is set. + */ + @java.lang.Override + public boolean hasSubsId() { + return subsId_ != null; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return The subsId. + */ + @java.lang.Override + public monitoring.Monitoring.SubscriptionID getSubsId() { + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { + return getSubsId(); + } + + public static final int KPI_ID_FIELD_NUMBER = 2; + + private monitoring.Monitoring.KpiId kpiId_; + + /** + * .monitoring.KpiId kpi_id = 2; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 2; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int SAMPLING_DURATION_S_FIELD_NUMBER = 3; + + private float samplingDurationS_; + + /** + * float sampling_duration_s = 3; + * @return The samplingDurationS. + */ + @java.lang.Override + public float getSamplingDurationS() { + return samplingDurationS_; + } + + public static final int SAMPLING_INTERVAL_S_FIELD_NUMBER = 4; + + private float samplingIntervalS_; + + /** + * float sampling_interval_s = 4; + * @return The samplingIntervalS. + */ + @java.lang.Override + public float getSamplingIntervalS() { + return samplingIntervalS_; + } + + public static final int START_TIMESTAMP_FIELD_NUMBER = 5; + + private context.ContextOuterClass.Timestamp startTimestamp_; + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 5; + * @return Whether the startTimestamp field is set. + */ + @java.lang.Override + public boolean hasStartTimestamp() { + return startTimestamp_ != null; + } + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 5; + * @return The startTimestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getStartTimestamp() { + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; + } + + /** + *
+         * used when you want something like "get the samples since X date/time"
+         * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { + return getStartTimestamp(); + } + + public static final int END_TIMESTAMP_FIELD_NUMBER = 6; + + private context.ContextOuterClass.Timestamp endTimestamp_; + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 6; + * @return Whether the endTimestamp field is set. + */ + @java.lang.Override + public boolean hasEndTimestamp() { + return endTimestamp_ != null; + } + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 6; + * @return The endTimestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getEndTimestamp() { + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; + } + + /** + *
+         * used when you want something like "get the samples until X date/time"
+         * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { + return getEndTimestamp(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (subsId_ != null) { + output.writeMessage(1, getSubsId()); + } + if (kpiId_ != null) { + output.writeMessage(2, getKpiId()); + } + if (samplingDurationS_ != 0F) { + output.writeFloat(3, samplingDurationS_); + } + if (samplingIntervalS_ != 0F) { + output.writeFloat(4, samplingIntervalS_); + } + if (startTimestamp_ != null) { + output.writeMessage(5, getStartTimestamp()); + } + if (endTimestamp_ != null) { + output.writeMessage(6, getEndTimestamp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (subsId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubsId()); + } + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiId()); + } + if (samplingDurationS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, samplingDurationS_); + } + if (samplingIntervalS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, samplingIntervalS_); + } + if (startTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStartTimestamp()); + } + if (endTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndTimestamp()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.SubsDescriptor)) { + return super.equals(obj); + } + monitoring.Monitoring.SubsDescriptor other = (monitoring.Monitoring.SubsDescriptor) obj; + if (hasSubsId() != other.hasSubsId()) + return false; + if (hasSubsId()) { + if (!getSubsId().equals(other.getSubsId())) + return false; + } + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (java.lang.Float.floatToIntBits(getSamplingDurationS()) != java.lang.Float.floatToIntBits(other.getSamplingDurationS())) + return false; + if (java.lang.Float.floatToIntBits(getSamplingIntervalS()) != java.lang.Float.floatToIntBits(other.getSamplingIntervalS())) + return false; + if (hasStartTimestamp() != other.hasStartTimestamp()) + return false; + if (hasStartTimestamp()) { + if (!getStartTimestamp().equals(other.getStartTimestamp())) + return false; + } + if (hasEndTimestamp() != other.hasEndTimestamp()) + return false; + if (hasEndTimestamp()) { + if (!getEndTimestamp().equals(other.getEndTimestamp())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubsId()) { + hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubsId().hashCode(); + } + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + hash = (37 * hash) + SAMPLING_DURATION_S_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingDurationS()); + hash = (37 * hash) + SAMPLING_INTERVAL_S_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingIntervalS()); + if (hasStartTimestamp()) { + hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getStartTimestamp().hashCode(); + } + if (hasEndTimestamp()) { + hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getEndTimestamp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubsDescriptor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsDescriptor parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsDescriptor parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.SubsDescriptor prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.SubsDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.SubsDescriptor) + monitoring.Monitoring.SubsDescriptorOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubsDescriptor.class, monitoring.Monitoring.SubsDescriptor.Builder.class); + } + + // 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; + subsIdBuilder_ = null; + } + if (kpiIdBuilder_ == null) { + kpiId_ = null; + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + samplingDurationS_ = 0F; + samplingIntervalS_ = 0F; + if (startTimestampBuilder_ == null) { + startTimestamp_ = null; + } else { + startTimestamp_ = null; + startTimestampBuilder_ = null; + } + if (endTimestampBuilder_ == null) { + endTimestamp_ = null; + } else { + endTimestamp_ = null; + endTimestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.SubsDescriptor getDefaultInstanceForType() { + return monitoring.Monitoring.SubsDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.SubsDescriptor build() { + monitoring.Monitoring.SubsDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.SubsDescriptor) { + return mergeFrom((monitoring.Monitoring.SubsDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.SubsDescriptor other) { + if (other == monitoring.Monitoring.SubsDescriptor.getDefaultInstance()) + return this; + if (other.hasSubsId()) { + mergeSubsId(other.getSubsId()); + } + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (other.getSamplingDurationS() != 0F) { + setSamplingDurationS(other.getSamplingDurationS()); + } + if (other.getSamplingIntervalS() != 0F) { + setSamplingIntervalS(other.getSamplingIntervalS()); + } + if (other.hasStartTimestamp()) { + mergeStartTimestamp(other.getStartTimestamp()); + } + if (other.hasEndTimestamp()) { + mergeEndTimestamp(other.getEndTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.SubsDescriptor) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.SubscriptionID subsId_; + + private com.google.protobuf.SingleFieldBuilderV3 subsIdBuilder_; + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return Whether the subsId field is set. + */ + public boolean hasSubsId() { + return subsIdBuilder_ != null || subsId_ != null; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return The subsId. + */ + public monitoring.Monitoring.SubscriptionID getSubsId() { + if (subsIdBuilder_ == null) { + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; + } else { + return subsIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder setSubsId(monitoring.Monitoring.SubscriptionID value) { + if (subsIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subsId_ = value; + onChanged(); + } else { + subsIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder setSubsId(monitoring.Monitoring.SubscriptionID.Builder builderForValue) { + if (subsIdBuilder_ == null) { + subsId_ = builderForValue.build(); + onChanged(); + } else { + subsIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder mergeSubsId(monitoring.Monitoring.SubscriptionID value) { + if (subsIdBuilder_ == null) { + if (subsId_ != null) { + subsId_ = monitoring.Monitoring.SubscriptionID.newBuilder(subsId_).mergeFrom(value).buildPartial(); + } else { + subsId_ = value; + } + onChanged(); + } else { + subsIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder clearSubsId() { + if (subsIdBuilder_ == null) { + subsId_ = null; + onChanged(); + } else { + subsId_ = null; + subsIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public monitoring.Monitoring.SubscriptionID.Builder getSubsIdBuilder() { + onChanged(); + return getSubsIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { + if (subsIdBuilder_ != null) { + return subsIdBuilder_.getMessageOrBuilder(); + } else { + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; + } + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSubsIdFieldBuilder() { + if (subsIdBuilder_ == null) { + subsIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSubsId(), getParentForChildren(), isClean()); + subsId_ = null; + } + return subsIdBuilder_; + } + + private monitoring.Monitoring.KpiId kpiId_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; + + /** + * .monitoring.KpiId kpi_id = 2; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 2; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } + + /** + * .monitoring.KpiId kpi_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } + + private float samplingDurationS_; + + /** + * float sampling_duration_s = 3; + * @return The samplingDurationS. + */ + @java.lang.Override + public float getSamplingDurationS() { + return samplingDurationS_; + } + + /** + * float sampling_duration_s = 3; + * @param value The samplingDurationS to set. + * @return This builder for chaining. + */ + public Builder setSamplingDurationS(float value) { + samplingDurationS_ = value; + onChanged(); + return this; + } + + /** + * float sampling_duration_s = 3; + * @return This builder for chaining. + */ + public Builder clearSamplingDurationS() { + samplingDurationS_ = 0F; + onChanged(); + return this; + } + + private float samplingIntervalS_; + + /** + * float sampling_interval_s = 4; + * @return The samplingIntervalS. + */ + @java.lang.Override + public float getSamplingIntervalS() { + return samplingIntervalS_; + } + + /** + * float sampling_interval_s = 4; + * @param value The samplingIntervalS to set. + * @return This builder for chaining. + */ + public Builder setSamplingIntervalS(float value) { + samplingIntervalS_ = value; + onChanged(); + return this; + } + + /** + * float sampling_interval_s = 4; + * @return This builder for chaining. + */ + public Builder clearSamplingIntervalS() { + samplingIntervalS_ = 0F; + onChanged(); + return this; + } + + private context.ContextOuterClass.Timestamp startTimestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 startTimestampBuilder_; + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + * @return Whether the startTimestamp field is set. + */ + public boolean hasStartTimestamp() { + return startTimestampBuilder_ != null || startTimestamp_ != null; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + * @return The startTimestamp. + */ + public context.ContextOuterClass.Timestamp getStartTimestamp() { + if (startTimestampBuilder_ == null) { + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; + } else { + return startTimestampBuilder_.getMessage(); + } + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + public Builder setStartTimestamp(context.ContextOuterClass.Timestamp value) { + if (startTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTimestamp_ = value; + onChanged(); + } else { + startTimestampBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + public Builder setStartTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (startTimestampBuilder_ == null) { + startTimestamp_ = builderForValue.build(); + onChanged(); + } else { + startTimestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) { + if (startTimestampBuilder_ == null) { + if (startTimestamp_ != null) { + startTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(startTimestamp_).mergeFrom(value).buildPartial(); + } else { + startTimestamp_ = value; + } + onChanged(); + } else { + startTimestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + public Builder clearStartTimestamp() { + if (startTimestampBuilder_ == null) { + startTimestamp_ = null; + onChanged(); + } else { + startTimestamp_ = null; + startTimestampBuilder_ = null; + } + return this; + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() { + onChanged(); + return getStartTimestampFieldBuilder().getBuilder(); + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { + if (startTimestampBuilder_ != null) { + return startTimestampBuilder_.getMessageOrBuilder(); + } else { + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; + } + } + + /** + *
+             * used when you want something like "get the samples since X date/time"
+             * 
+ * + * .context.Timestamp start_timestamp = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getStartTimestampFieldBuilder() { + if (startTimestampBuilder_ == null) { + startTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getStartTimestamp(), getParentForChildren(), isClean()); + startTimestamp_ = null; + } + return startTimestampBuilder_; + } + + private context.ContextOuterClass.Timestamp endTimestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 endTimestampBuilder_; + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + * @return Whether the endTimestamp field is set. + */ + public boolean hasEndTimestamp() { + return endTimestampBuilder_ != null || endTimestamp_ != null; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + * @return The endTimestamp. + */ + public context.ContextOuterClass.Timestamp getEndTimestamp() { + if (endTimestampBuilder_ == null) { + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; + } else { + return endTimestampBuilder_.getMessage(); + } + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + public Builder setEndTimestamp(context.ContextOuterClass.Timestamp value) { + if (endTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTimestamp_ = value; + onChanged(); + } else { + endTimestampBuilder_.setMessage(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + public Builder setEndTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (endTimestampBuilder_ == null) { + endTimestamp_ = builderForValue.build(); + onChanged(); + } else { + endTimestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) { + if (endTimestampBuilder_ == null) { + if (endTimestamp_ != null) { + endTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(endTimestamp_).mergeFrom(value).buildPartial(); + } else { + endTimestamp_ = value; + } + onChanged(); + } else { + endTimestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + public Builder clearEndTimestamp() { + if (endTimestampBuilder_ == null) { + endTimestamp_ = null; + onChanged(); + } else { + endTimestamp_ = null; + endTimestampBuilder_ = null; + } + return this; + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() { + onChanged(); + return getEndTimestampFieldBuilder().getBuilder(); + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { + if (endTimestampBuilder_ != null) { + return endTimestampBuilder_.getMessageOrBuilder(); + } else { + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; + } + } + + /** + *
+             * used when you want something like "get the samples until X date/time"
+             * 
+ * + * .context.Timestamp end_timestamp = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3 getEndTimestampFieldBuilder() { + if (endTimestampBuilder_ == null) { + endTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getEndTimestamp(), getParentForChildren(), isClean()); + endTimestamp_ = null; + } + return endTimestampBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.SubsDescriptor) + } + + // @@protoc_insertion_point(class_scope:monitoring.SubsDescriptor) + private static final monitoring.Monitoring.SubsDescriptor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.SubsDescriptor(); + } + + public static monitoring.Monitoring.SubsDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.SubsDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SubscriptionIDOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.SubscriptionID) + com.google.protobuf.MessageOrBuilder { + + /** + * .context.Uuid subs_id = 1; + * @return Whether the subsId field is set. + */ + boolean hasSubsId(); + + /** + * .context.Uuid subs_id = 1; + * @return The subsId. + */ + context.ContextOuterClass.Uuid getSubsId(); + + /** + * .context.Uuid subs_id = 1; + */ + context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder(); + } + + /** + * Protobuf type {@code monitoring.SubscriptionID} + */ + public static final class SubscriptionID extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.SubscriptionID) + SubscriptionIDOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SubscriptionID.newBuilder() to construct. + private SubscriptionID(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubscriptionID() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubscriptionID.class, monitoring.Monitoring.SubscriptionID.Builder.class); + } + + public static final int SUBS_ID_FIELD_NUMBER = 1; + + private context.ContextOuterClass.Uuid subsId_; + + /** + * .context.Uuid subs_id = 1; + * @return Whether the subsId field is set. + */ + @java.lang.Override + public boolean hasSubsId() { + return subsId_ != null; + } + + /** + * .context.Uuid subs_id = 1; + * @return The subsId. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getSubsId() { + return subsId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; + } + + /** + * .context.Uuid subs_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder() { + return getSubsId(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (subsId_ != null) { + output.writeMessage(1, getSubsId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (subsId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubsId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.SubscriptionID)) { + return super.equals(obj); + } + monitoring.Monitoring.SubscriptionID other = (monitoring.Monitoring.SubscriptionID) obj; + if (hasSubsId() != other.hasSubsId()) + return false; + if (hasSubsId()) { + if (!getSubsId().equals(other.getSubsId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubsId()) { + hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubsId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubscriptionID parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubscriptionID parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubscriptionID parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.SubscriptionID prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.SubscriptionID} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.SubscriptionID) + monitoring.Monitoring.SubscriptionIDOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubscriptionID.class, monitoring.Monitoring.SubscriptionID.Builder.class); + } + + // 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; + subsIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.SubscriptionID getDefaultInstanceForType() { + return monitoring.Monitoring.SubscriptionID.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.SubscriptionID build() { + monitoring.Monitoring.SubscriptionID result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.SubscriptionID) { + return mergeFrom((monitoring.Monitoring.SubscriptionID) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.SubscriptionID other) { + if (other == monitoring.Monitoring.SubscriptionID.getDefaultInstance()) + return this; + if (other.hasSubsId()) { + mergeSubsId(other.getSubsId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.SubscriptionID) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid subsId_; + + private com.google.protobuf.SingleFieldBuilderV3 subsIdBuilder_; + + /** + * .context.Uuid subs_id = 1; + * @return Whether the subsId field is set. + */ + public boolean hasSubsId() { + return subsIdBuilder_ != null || subsId_ != null; + } + + /** + * .context.Uuid subs_id = 1; + * @return The subsId. + */ + public context.ContextOuterClass.Uuid getSubsId() { + if (subsIdBuilder_ == null) { + return subsId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; + } else { + return subsIdBuilder_.getMessage(); + } + } + + /** + * .context.Uuid subs_id = 1; + */ + public Builder setSubsId(context.ContextOuterClass.Uuid value) { + if (subsIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subsId_ = value; + onChanged(); + } else { + subsIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid subs_id = 1; + */ + public Builder setSubsId(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (subsIdBuilder_ == null) { + subsId_ = builderForValue.build(); + onChanged(); + } else { + subsIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid subs_id = 1; + */ + public Builder mergeSubsId(context.ContextOuterClass.Uuid value) { + if (subsIdBuilder_ == null) { + if (subsId_ != null) { + subsId_ = context.ContextOuterClass.Uuid.newBuilder(subsId_).mergeFrom(value).buildPartial(); + } else { + subsId_ = value; + } + onChanged(); + } else { + subsIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid subs_id = 1; + */ + public Builder clearSubsId() { + if (subsIdBuilder_ == null) { + subsId_ = null; + onChanged(); + } else { + subsId_ = null; + subsIdBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid subs_id = 1; + */ + public context.ContextOuterClass.Uuid.Builder getSubsIdBuilder() { + onChanged(); + return getSubsIdFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid subs_id = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder() { + if (subsIdBuilder_ != null) { + return subsIdBuilder_.getMessageOrBuilder(); + } else { + return subsId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; + } + } + + /** + * .context.Uuid subs_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSubsIdFieldBuilder() { + if (subsIdBuilder_ == null) { + subsIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSubsId(), getParentForChildren(), isClean()); + subsId_ = null; + } + return subsIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.SubscriptionID) + } + + // @@protoc_insertion_point(class_scope:monitoring.SubscriptionID) + private static final monitoring.Monitoring.SubscriptionID DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.SubscriptionID(); + } + + public static monitoring.Monitoring.SubscriptionID getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.SubscriptionID getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SubsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.SubsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return Whether the subsId field is set. + */ + boolean hasSubsId(); + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return The subsId. + */ + monitoring.Monitoring.SubscriptionID getSubsId(); + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder(); + + /** + * .monitoring.KpiList kpi_list = 2; + * @return Whether the kpiList field is set. + */ + boolean hasKpiList(); + + /** + * .monitoring.KpiList kpi_list = 2; + * @return The kpiList. + */ + monitoring.Monitoring.KpiList getKpiList(); + + /** + * .monitoring.KpiList kpi_list = 2; + */ + monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder(); + } + + /** + * Protobuf type {@code monitoring.SubsResponse} + */ + public static final class SubsResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.SubsResponse) + SubsResponseOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use SubsResponse.newBuilder() to construct. + private SubsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubsResponse() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubsResponse_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubsResponse.class, monitoring.Monitoring.SubsResponse.Builder.class); + } + + public static final int SUBS_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.SubscriptionID subsId_; + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return Whether the subsId field is set. + */ + @java.lang.Override + public boolean hasSubsId() { + return subsId_ != null; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return The subsId. + */ + @java.lang.Override + public monitoring.Monitoring.SubscriptionID getSubsId() { + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { + return getSubsId(); + } + + public static final int KPI_LIST_FIELD_NUMBER = 2; + + private monitoring.Monitoring.KpiList kpiList_; + + /** + * .monitoring.KpiList kpi_list = 2; + * @return Whether the kpiList field is set. + */ + @java.lang.Override + public boolean hasKpiList() { + return kpiList_ != null; + } + + /** + * .monitoring.KpiList kpi_list = 2; + * @return The kpiList. + */ + @java.lang.Override + public monitoring.Monitoring.KpiList getKpiList() { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + @java.lang.Override + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + return getKpiList(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (subsId_ != null) { + output.writeMessage(1, getSubsId()); + } + if (kpiList_ != null) { + output.writeMessage(2, getKpiList()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (subsId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubsId()); + } + if (kpiList_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiList()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.SubsResponse)) { + return super.equals(obj); + } + monitoring.Monitoring.SubsResponse other = (monitoring.Monitoring.SubsResponse) obj; + if (hasSubsId() != other.hasSubsId()) + return false; + if (hasSubsId()) { + if (!getSubsId().equals(other.getSubsId())) + return false; + } + if (hasKpiList() != other.hasKpiList()) + return false; + if (hasKpiList()) { + if (!getKpiList().equals(other.getKpiList())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSubsId()) { + hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubsId().hashCode(); + } + if (hasKpiList()) { + hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; + hash = (53 * hash) + getKpiList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.SubsResponse parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubsResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.SubsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.SubsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.SubsResponse) + monitoring.Monitoring.SubsResponseOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_SubsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubsResponse_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubsResponse.class, monitoring.Monitoring.SubsResponse.Builder.class); + } + + // 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; + subsIdBuilder_ = null; + } + if (kpiListBuilder_ == null) { + kpiList_ = null; + } else { + kpiList_ = null; + kpiListBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_SubsResponse_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.SubsResponse getDefaultInstanceForType() { + return monitoring.Monitoring.SubsResponse.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.SubsResponse build() { + monitoring.Monitoring.SubsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.SubsResponse) { + return mergeFrom((monitoring.Monitoring.SubsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.SubsResponse other) { + if (other == monitoring.Monitoring.SubsResponse.getDefaultInstance()) + return this; + if (other.hasSubsId()) { + mergeSubsId(other.getSubsId()); + } + if (other.hasKpiList()) { + mergeKpiList(other.getKpiList()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.SubsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.SubscriptionID subsId_; + + private com.google.protobuf.SingleFieldBuilderV3 subsIdBuilder_; + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return Whether the subsId field is set. + */ + public boolean hasSubsId() { + return subsIdBuilder_ != null || subsId_ != null; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + * @return The subsId. + */ + public monitoring.Monitoring.SubscriptionID getSubsId() { + if (subsIdBuilder_ == null) { + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; + } else { + return subsIdBuilder_.getMessage(); + } + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder setSubsId(monitoring.Monitoring.SubscriptionID value) { + if (subsIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subsId_ = value; + onChanged(); + } else { + subsIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder setSubsId(monitoring.Monitoring.SubscriptionID.Builder builderForValue) { + if (subsIdBuilder_ == null) { + subsId_ = builderForValue.build(); + onChanged(); + } else { + subsIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder mergeSubsId(monitoring.Monitoring.SubscriptionID value) { + if (subsIdBuilder_ == null) { + if (subsId_ != null) { + subsId_ = monitoring.Monitoring.SubscriptionID.newBuilder(subsId_).mergeFrom(value).buildPartial(); + } else { + subsId_ = value; + } + onChanged(); + } else { + subsIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public Builder clearSubsId() { + if (subsIdBuilder_ == null) { + subsId_ = null; + onChanged(); + } else { + subsId_ = null; + subsIdBuilder_ = null; + } + return this; + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public monitoring.Monitoring.SubscriptionID.Builder getSubsIdBuilder() { + onChanged(); + return getSubsIdFieldBuilder().getBuilder(); + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { + if (subsIdBuilder_ != null) { + return subsIdBuilder_.getMessageOrBuilder(); + } else { + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; + } + } + + /** + * .monitoring.SubscriptionID subs_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getSubsIdFieldBuilder() { + if (subsIdBuilder_ == null) { + subsIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getSubsId(), getParentForChildren(), isClean()); + subsId_ = null; + } + return subsIdBuilder_; + } + + private monitoring.Monitoring.KpiList kpiList_; + + private com.google.protobuf.SingleFieldBuilderV3 kpiListBuilder_; + + /** + * .monitoring.KpiList kpi_list = 2; + * @return Whether the kpiList field is set. + */ + public boolean hasKpiList() { + return kpiListBuilder_ != null || kpiList_ != null; + } + + /** + * .monitoring.KpiList kpi_list = 2; + * @return The kpiList. + */ + public monitoring.Monitoring.KpiList getKpiList() { + if (kpiListBuilder_ == null) { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; + } else { + return kpiListBuilder_.getMessage(); + } + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + public Builder setKpiList(monitoring.Monitoring.KpiList value) { + if (kpiListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiList_ = value; + onChanged(); + } else { + kpiListBuilder_.setMessage(value); + } + return this; + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + public Builder setKpiList(monitoring.Monitoring.KpiList.Builder builderForValue) { + if (kpiListBuilder_ == null) { + kpiList_ = builderForValue.build(); + onChanged(); + } else { + kpiListBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { + if (kpiListBuilder_ == null) { + if (kpiList_ != null) { + kpiList_ = monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); + } else { + kpiList_ = value; + } + onChanged(); + } else { + kpiListBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + public Builder clearKpiList() { + if (kpiListBuilder_ == null) { + kpiList_ = null; + onChanged(); + } else { + kpiList_ = null; + kpiListBuilder_ = null; + } + return this; + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { + onChanged(); + return getKpiListFieldBuilder().getBuilder(); + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + if (kpiListBuilder_ != null) { + return kpiListBuilder_.getMessageOrBuilder(); + } else { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; + } + } + + /** + * .monitoring.KpiList kpi_list = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiListFieldBuilder() { + if (kpiListBuilder_ == null) { + kpiListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiList(), getParentForChildren(), isClean()); + kpiList_ = null; + } + return kpiListBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.SubsResponse) + } + + // @@protoc_insertion_point(class_scope:monitoring.SubsResponse) + private static final monitoring.Monitoring.SubsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.SubsResponse(); + } + + public static monitoring.Monitoring.SubsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.SubsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SubsListOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.SubsList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + java.util.List getSubsDescriptorList(); + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index); + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + int getSubsDescriptorCount(); + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + java.util.List getSubsDescriptorOrBuilderList(); + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder(int index); + } + + /** + * Protobuf type {@code monitoring.SubsList} + */ + public static final class SubsList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.SubsList) + SubsListOrBuilder { + + 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(); + 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(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubsList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubsList.class, monitoring.Monitoring.SubsList.Builder.class); + } + + public static final int SUBS_DESCRIPTOR_FIELD_NUMBER = 1; + + private java.util.List subsDescriptor_; + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + @java.lang.Override + public java.util.List getSubsDescriptorList() { + return subsDescriptor_; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + @java.lang.Override + public java.util.List getSubsDescriptorOrBuilderList() { + return subsDescriptor_; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + @java.lang.Override + public int getSubsDescriptorCount() { + return subsDescriptor_.size(); + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + @java.lang.Override + public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index) { + return subsDescriptor_.get(index); + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + @java.lang.Override + public monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder(int index) { + return subsDescriptor_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < subsDescriptor_.size(); i++) { + output.writeMessage(1, subsDescriptor_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < subsDescriptor_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, subsDescriptor_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.SubsList)) { + return super.equals(obj); + } + monitoring.Monitoring.SubsList other = (monitoring.Monitoring.SubsList) obj; + if (!getSubsDescriptorList().equals(other.getSubsDescriptorList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSubsDescriptorCount() > 0) { + hash = (37 * hash) + SUBS_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getSubsDescriptorList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.SubsList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.SubsList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.SubsList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubsList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.SubsList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.SubsList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.SubsList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.SubsList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.SubsList) + monitoring.Monitoring.SubsListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_SubsList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.SubsList.class, monitoring.Monitoring.SubsList.Builder.class); + } + + // 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(); + if (subsDescriptorBuilder_ == null) { + subsDescriptor_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + subsDescriptorBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.SubsList getDefaultInstanceForType() { + return monitoring.Monitoring.SubsList.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.SubsList build() { + monitoring.Monitoring.SubsList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public monitoring.Monitoring.SubsList buildPartial() { + monitoring.Monitoring.SubsList result = new monitoring.Monitoring.SubsList(this); + int from_bitField0_ = bitField0_; + if (subsDescriptorBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subsDescriptor_ = java.util.Collections.unmodifiableList(subsDescriptor_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subsDescriptor_ = subsDescriptor_; + } 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); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.SubsList) { + return mergeFrom((monitoring.Monitoring.SubsList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.SubsList other) { + if (other == monitoring.Monitoring.SubsList.getDefaultInstance()) + return this; + if (subsDescriptorBuilder_ == null) { + if (!other.subsDescriptor_.isEmpty()) { + if (subsDescriptor_.isEmpty()) { + subsDescriptor_ = other.subsDescriptor_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.addAll(other.subsDescriptor_); + } + onChanged(); + } + } else { + if (!other.subsDescriptor_.isEmpty()) { + if (subsDescriptorBuilder_.isEmpty()) { + subsDescriptorBuilder_.dispose(); + subsDescriptorBuilder_ = null; + subsDescriptor_ = other.subsDescriptor_; + bitField0_ = (bitField0_ & ~0x00000001); + subsDescriptorBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSubsDescriptorFieldBuilder() : null; + } else { + subsDescriptorBuilder_.addAllMessages(other.subsDescriptor_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.SubsList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List subsDescriptor_ = java.util.Collections.emptyList(); + + private void ensureSubsDescriptorIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subsDescriptor_ = new java.util.ArrayList(subsDescriptor_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 subsDescriptorBuilder_; + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public java.util.List getSubsDescriptorList() { + if (subsDescriptorBuilder_ == null) { + return java.util.Collections.unmodifiableList(subsDescriptor_); + } else { + return subsDescriptorBuilder_.getMessageList(); + } + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public int getSubsDescriptorCount() { + if (subsDescriptorBuilder_ == null) { + return subsDescriptor_.size(); + } else { + return subsDescriptorBuilder_.getCount(); + } + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index) { + if (subsDescriptorBuilder_ == null) { + return subsDescriptor_.get(index); + } else { + return subsDescriptorBuilder_.getMessage(index); + } + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder setSubsDescriptor(int index, monitoring.Monitoring.SubsDescriptor value) { + if (subsDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubsDescriptorIsMutable(); + subsDescriptor_.set(index, value); + onChanged(); + } else { + subsDescriptorBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder setSubsDescriptor(int index, monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.set(index, builderForValue.build()); + onChanged(); + } else { + subsDescriptorBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder addSubsDescriptor(monitoring.Monitoring.SubsDescriptor value) { + if (subsDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(value); + onChanged(); + } else { + subsDescriptorBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder addSubsDescriptor(int index, monitoring.Monitoring.SubsDescriptor value) { + if (subsDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(index, value); + onChanged(); + } else { + subsDescriptorBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder addSubsDescriptor(monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(builderForValue.build()); + onChanged(); + } else { + subsDescriptorBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder addSubsDescriptor(int index, monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(index, builderForValue.build()); + onChanged(); + } else { + subsDescriptorBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder addAllSubsDescriptor(java.lang.Iterable values) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, subsDescriptor_); + onChanged(); + } else { + subsDescriptorBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder clearSubsDescriptor() { + if (subsDescriptorBuilder_ == null) { + subsDescriptor_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subsDescriptorBuilder_.clear(); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public Builder removeSubsDescriptor(int index) { + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.remove(index); + onChanged(); + } else { + subsDescriptorBuilder_.remove(index); + } + return this; + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public monitoring.Monitoring.SubsDescriptor.Builder getSubsDescriptorBuilder(int index) { + return getSubsDescriptorFieldBuilder().getBuilder(index); + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder(int index) { + if (subsDescriptorBuilder_ == null) { + return subsDescriptor_.get(index); + } else { + return subsDescriptorBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public java.util.List getSubsDescriptorOrBuilderList() { + if (subsDescriptorBuilder_ != null) { + return subsDescriptorBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subsDescriptor_); + } + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public monitoring.Monitoring.SubsDescriptor.Builder addSubsDescriptorBuilder() { + return getSubsDescriptorFieldBuilder().addBuilder(monitoring.Monitoring.SubsDescriptor.getDefaultInstance()); + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public monitoring.Monitoring.SubsDescriptor.Builder addSubsDescriptorBuilder(int index) { + return getSubsDescriptorFieldBuilder().addBuilder(index, monitoring.Monitoring.SubsDescriptor.getDefaultInstance()); + } + + /** + * repeated .monitoring.SubsDescriptor subs_descriptor = 1; + */ + public java.util.List getSubsDescriptorBuilderList() { + return getSubsDescriptorFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getSubsDescriptorFieldBuilder() { + if (subsDescriptorBuilder_ == null) { + subsDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(subsDescriptor_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + subsDescriptor_ = null; + } + return subsDescriptorBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.SubsList) + } + + // @@protoc_insertion_point(class_scope:monitoring.SubsList) + private static final monitoring.Monitoring.SubsList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.SubsList(); + } + + public static monitoring.Monitoring.SubsList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public monitoring.Monitoring.SubsList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AlarmDescriptorOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.AlarmDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + boolean hasAlarmId(); + + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + monitoring.Monitoring.AlarmID getAlarmId(); + + /** + * .monitoring.AlarmID alarm_id = 1; + */ + monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); + + /** + * string alarm_description = 2; + * @return The alarmDescription. + */ + java.lang.String getAlarmDescription(); + + /** + * string alarm_description = 2; + * @return The bytes for alarmDescription. + */ + com.google.protobuf.ByteString getAlarmDescriptionBytes(); + + /** + * string name = 3; + * @return The name. + */ + java.lang.String getName(); + + /** + * string name = 3; + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * .monitoring.KpiId kpi_id = 4; + * @return Whether the kpiId field is set. + */ + boolean hasKpiId(); + + /** + * .monitoring.KpiId kpi_id = 4; + * @return The kpiId. + */ + monitoring.Monitoring.KpiId getKpiId(); + + /** + * .monitoring.KpiId kpi_id = 4; + */ + monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return Whether the kpiValueRange field is set. + */ + boolean hasKpiValueRange(); + + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return The kpiValueRange. + */ + monitoring.Monitoring.KpiValueRange getKpiValueRange(); + + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder(); + + /** + * .context.Timestamp timestamp = 6; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + + /** + * .context.Timestamp timestamp = 6; + * @return The timestamp. + */ + context.ContextOuterClass.Timestamp getTimestamp(); + + /** + * .context.Timestamp timestamp = 6; + */ + context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.MonitorKpiRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.MonitorKpiRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.MonitorKpiRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * Protobuf type {@code monitoring.AlarmDescriptor} + */ + public static final class AlarmDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.AlarmDescriptor) + AlarmDescriptorOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use AlarmDescriptor.newBuilder() to construct. + private AlarmDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AlarmDescriptor() { + alarmDescription_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmDescriptor.class, monitoring.Monitoring.AlarmDescriptor.Builder.class); + } + + public static final int ALARM_ID_FIELD_NUMBER = 1; + + private monitoring.Monitoring.AlarmID alarmId_; + + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + @java.lang.Override + public boolean hasAlarmId() { + return alarmId_ != null; + } + + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + @java.lang.Override + public monitoring.Monitoring.AlarmID getAlarmId() { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } + + /** + * .monitoring.AlarmID alarm_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + return getAlarmId(); + } + + public static final int ALARM_DESCRIPTION_FIELD_NUMBER = 2; + + private volatile java.lang.Object alarmDescription_; + + /** + * string alarm_description = 2; + * @return The alarmDescription. + */ + @java.lang.Override + public java.lang.String getAlarmDescription() { + java.lang.Object ref = alarmDescription_; + 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(); + alarmDescription_ = s; + return s; + } + } + + /** + * string alarm_description = 2; + * @return The bytes for alarmDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAlarmDescriptionBytes() { + java.lang.Object ref = alarmDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + alarmDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + + private volatile java.lang.Object name_; + + /** + * string name = 3; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * string name = 3; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KPI_ID_FIELD_NUMBER = 4; + + private monitoring.Monitoring.KpiId kpiId_; + + /** + * .monitoring.KpiId kpi_id = 4; + * @return Whether the kpiId field is set. + */ + @java.lang.Override + public boolean hasKpiId() { + return kpiId_ != null; + } + + /** + * .monitoring.KpiId kpi_id = 4; + * @return The kpiId. + */ + @java.lang.Override + public monitoring.Monitoring.KpiId getKpiId() { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + + /** + * .monitoring.KpiId kpi_id = 4; + */ + @java.lang.Override + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + return getKpiId(); + } + + public static final int KPI_VALUE_RANGE_FIELD_NUMBER = 5; + + private monitoring.Monitoring.KpiValueRange kpiValueRange_; + + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return Whether the kpiValueRange field is set. + */ + @java.lang.Override + public boolean hasKpiValueRange() { + return kpiValueRange_ != null; + } + + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return The kpiValueRange. + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueRange getKpiValueRange() { + return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; + } + + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + @java.lang.Override + public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { + return getKpiValueRange(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 6; + + private context.ContextOuterClass.Timestamp timestamp_; + + /** + * .context.Timestamp timestamp = 6; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 6; + * @return The timestamp. + */ + @java.lang.Override + public context.ContextOuterClass.Timestamp getTimestamp() { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + + /** + * .context.Timestamp timestamp = 6; + */ + @java.lang.Override + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (alarmId_ != null) { + output.writeMessage(1, getAlarmId()); + } + if (!getAlarmDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, alarmDescription_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (kpiId_ != null) { + output.writeMessage(4, getKpiId()); + } + if (kpiValueRange_ != null) { + output.writeMessage(5, getKpiValueRange()); + } + if (timestamp_ != null) { + output.writeMessage(6, getTimestamp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (alarmId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId()); + } + if (!getAlarmDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, alarmDescription_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (kpiId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getKpiId()); + } + if (kpiValueRange_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getKpiValueRange()); + } + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTimestamp()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.AlarmDescriptor)) { + return super.equals(obj); + } + monitoring.Monitoring.AlarmDescriptor other = (monitoring.Monitoring.AlarmDescriptor) obj; + if (hasAlarmId() != other.hasAlarmId()) + return false; + if (hasAlarmId()) { + if (!getAlarmId().equals(other.getAlarmId())) + return false; + } + if (!getAlarmDescription().equals(other.getAlarmDescription())) + return false; + if (!getName().equals(other.getName())) + return false; + if (hasKpiId() != other.hasKpiId()) + return false; + if (hasKpiId()) { + if (!getKpiId().equals(other.getKpiId())) + return false; + } + if (hasKpiValueRange() != other.hasKpiValueRange()) + return false; + if (hasKpiValueRange()) { + if (!getKpiValueRange().equals(other.getKpiValueRange())) + return false; + } + if (hasTimestamp() != other.hasTimestamp()) + return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAlarmId()) { + hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; + hash = (53 * hash) + getAlarmId().hashCode(); + } + hash = (37 * hash) + ALARM_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getAlarmDescription().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasKpiId()) { + hash = (37 * hash) + KPI_ID_FIELD_NUMBER; + hash = (53 * hash) + getKpiId().hashCode(); + } + if (hasKpiValueRange()) { + hash = (37 * hash) + KPI_VALUE_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getKpiValueRange().hashCode(); + } + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.AlarmDescriptor parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.AlarmDescriptor parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static monitoring.Monitoring.AlarmDescriptor parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(monitoring.Monitoring.AlarmDescriptor prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code monitoring.AlarmDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.AlarmDescriptor) + monitoring.Monitoring.AlarmDescriptorOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmDescriptor.class, monitoring.Monitoring.AlarmDescriptor.Builder.class); + } + + // 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; + alarmIdBuilder_ = null; + } + alarmDescription_ = ""; + name_ = ""; + if (kpiIdBuilder_ == null) { + kpiId_ = null; + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + if (kpiValueRangeBuilder_ == null) { + kpiValueRange_ = null; + } else { + kpiValueRange_ = null; + kpiValueRangeBuilder_ = null; + } + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_descriptor; + } + + @java.lang.Override + public monitoring.Monitoring.AlarmDescriptor getDefaultInstanceForType() { + return monitoring.Monitoring.AlarmDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public monitoring.Monitoring.AlarmDescriptor build() { + monitoring.Monitoring.AlarmDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @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(); + } + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.AlarmDescriptor) { + return mergeFrom((monitoring.Monitoring.AlarmDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(monitoring.Monitoring.AlarmDescriptor other) { + if (other == monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()) + return this; + if (other.hasAlarmId()) { + mergeAlarmId(other.getAlarmId()); + } + if (!other.getAlarmDescription().isEmpty()) { + alarmDescription_ = other.alarmDescription_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasKpiId()) { + mergeKpiId(other.getKpiId()); + } + if (other.hasKpiValueRange()) { + mergeKpiValueRange(other.getKpiValueRange()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.AlarmDescriptor) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private monitoring.Monitoring.AlarmID alarmId_; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.MonitorKpiRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private com.google.protobuf.SingleFieldBuilderV3 alarmIdBuilder_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.MonitorKpiRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.MonitorKpiRequest) - monitoring.Monitoring.MonitorKpiRequestOrBuilder { - 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); - } - - // 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; - kpiIdBuilder_ = null; - } - monitoringWindowS_ = 0F; - - samplingRateS_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_MonitorKpiRequest_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.MonitorKpiRequest getDefaultInstanceForType() { - return monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.MonitorKpiRequest build() { - monitoring.Monitoring.MonitorKpiRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.MonitorKpiRequest) { - return mergeFrom((monitoring.Monitoring.MonitorKpiRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.MonitorKpiRequest other) { - if (other == monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - if (other.getMonitoringWindowS() != 0F) { - setMonitoringWindowS(other.getMonitoringWindowS()); - } - if (other.getSamplingRateS() != 0F) { - setSamplingRateS(other.getSamplingRateS()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.MonitorKpiRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.KpiId kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - - private float monitoringWindowS_ ; - /** - * float monitoring_window_s = 2; - * @return The monitoringWindowS. - */ - @java.lang.Override - public float getMonitoringWindowS() { - return monitoringWindowS_; - } - /** - * float monitoring_window_s = 2; - * @param value The monitoringWindowS to set. - * @return This builder for chaining. - */ - public Builder setMonitoringWindowS(float value) { - - monitoringWindowS_ = value; - onChanged(); - return this; - } - /** - * float monitoring_window_s = 2; - * @return This builder for chaining. - */ - public Builder clearMonitoringWindowS() { - - monitoringWindowS_ = 0F; - onChanged(); - return this; - } - - private float samplingRateS_ ; - /** - *
-       * Pending add field to reflect Available Device Protocols
-       * 
- * - * float sampling_rate_s = 3; - * @return The samplingRateS. - */ - @java.lang.Override - public float getSamplingRateS() { - return samplingRateS_; - } - /** - *
-       * Pending add field to reflect Available Device Protocols
-       * 
- * - * float sampling_rate_s = 3; - * @param value The samplingRateS to set. - * @return This builder for chaining. - */ - public Builder setSamplingRateS(float value) { - - samplingRateS_ = value; - onChanged(); - return this; - } - /** - *
-       * Pending add field to reflect Available Device Protocols
-       * 
- * - * float sampling_rate_s = 3; - * @return This builder for chaining. - */ - public Builder clearSamplingRateS() { - - samplingRateS_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.MonitorKpiRequest) - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + public boolean hasAlarmId() { + return alarmIdBuilder_ != null || alarmId_ != null; + } - // @@protoc_insertion_point(class_scope:monitoring.MonitorKpiRequest) - private static final monitoring.Monitoring.MonitorKpiRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.MonitorKpiRequest(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + public monitoring.Monitoring.AlarmID getAlarmId() { + if (alarmIdBuilder_ == null) { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } else { + return alarmIdBuilder_.getMessage(); + } + } - public static monitoring.Monitoring.MonitorKpiRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + alarmId_ = value; + onChanged(); + } else { + alarmIdBuilder_.setMessage(value); + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder setAlarmId(monitoring.Monitoring.AlarmID.Builder builderForValue) { + if (alarmIdBuilder_ == null) { + alarmId_ = builderForValue.build(); + onChanged(); + } else { + alarmIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (alarmId_ != null) { + alarmId_ = monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); + } else { + alarmId_ = value; + } + onChanged(); + } else { + alarmIdBuilder_.mergeFrom(value); + } + return this; + } - @java.lang.Override - public monitoring.Monitoring.MonitorKpiRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder clearAlarmId() { + if (alarmIdBuilder_ == null) { + alarmId_ = null; + onChanged(); + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + return this; + } - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { + onChanged(); + return getAlarmIdFieldBuilder().getBuilder(); + } - public interface KpiQueryOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiQuery) - com.google.protobuf.MessageOrBuilder { + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + if (alarmIdBuilder_ != null) { + return alarmIdBuilder_.getMessageOrBuilder(); + } else { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } + } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - java.util.List - getKpiIdsList(); - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - monitoring.Monitoring.KpiId getKpiIds(int index); - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - int getKpiIdsCount(); - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - java.util.List - getKpiIdsOrBuilderList(); - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder( - int index); + /** + * .monitoring.AlarmID alarm_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getAlarmIdFieldBuilder() { + if (alarmIdBuilder_ == null) { + alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getAlarmId(), getParentForChildren(), isClean()); + alarmId_ = null; + } + return alarmIdBuilder_; + } - /** - * float monitoring_window_s = 2; - * @return The monitoringWindowS. - */ - float getMonitoringWindowS(); + private java.lang.Object alarmDescription_ = ""; + + /** + * string alarm_description = 2; + * @return The alarmDescription. + */ + public java.lang.String getAlarmDescription() { + java.lang.Object ref = alarmDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alarmDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - *
-     * used when you want something like "get the last N many samples
-     * 
- * - * uint32 last_n_samples = 3; - * @return The lastNSamples. - */ - int getLastNSamples(); + /** + * string alarm_description = 2; + * @return The bytes for alarmDescription. + */ + public com.google.protobuf.ByteString getAlarmDescriptionBytes() { + java.lang.Object ref = alarmDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + alarmDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 4; - * @return Whether the startTimestamp field is set. - */ - boolean hasStartTimestamp(); - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 4; - * @return The startTimestamp. - */ - context.ContextOuterClass.Timestamp getStartTimestamp(); - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 4; - */ - context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder(); + /** + * string alarm_description = 2; + * @param value The alarmDescription to set. + * @return This builder for chaining. + */ + public Builder setAlarmDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + alarmDescription_ = value; + onChanged(); + return this; + } - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 5; - * @return Whether the endTimestamp field is set. - */ - boolean hasEndTimestamp(); - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 5; - * @return The endTimestamp. - */ - context.ContextOuterClass.Timestamp getEndTimestamp(); - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 5; - */ - context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder(); - } - /** - * Protobuf type {@code monitoring.KpiQuery} - */ - public static final class KpiQuery extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiQuery) - KpiQueryOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiQuery.newBuilder() to construct. - private KpiQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiQuery() { - kpiIds_ = java.util.Collections.emptyList(); - } + /** + * string alarm_description = 2; + * @return This builder for chaining. + */ + public Builder clearAlarmDescription() { + alarmDescription_ = getDefaultInstance().getAlarmDescription(); + onChanged(); + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiQuery(); - } + /** + * string alarm_description = 2; + * @param value The bytes for alarmDescription to set. + * @return This builder for chaining. + */ + public Builder setAlarmDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + alarmDescription_ = value; + onChanged(); + return this; + } - @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(); - 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; - } + private java.lang.Object name_ = ""; + + /** + * string name = 3; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiQuery_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiQuery.class, monitoring.Monitoring.KpiQuery.Builder.class); - } + /** + * string name = 3; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static final int KPI_IDS_FIELD_NUMBER = 1; - private java.util.List kpiIds_; - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - @java.lang.Override - public java.util.List getKpiIdsList() { - return kpiIds_; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - @java.lang.Override - public java.util.List - getKpiIdsOrBuilderList() { - return kpiIds_; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - @java.lang.Override - public int getKpiIdsCount() { - return kpiIds_.size(); - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiIds(int index) { - return kpiIds_.get(index); - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder( - int index) { - return kpiIds_.get(index); - } + /** + * string name = 3; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + onChanged(); + return this; + } - public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; - private float monitoringWindowS_; - /** - * float monitoring_window_s = 2; - * @return The monitoringWindowS. - */ - @java.lang.Override - public float getMonitoringWindowS() { - return monitoringWindowS_; - } + /** + * string name = 3; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } - public static final int LAST_N_SAMPLES_FIELD_NUMBER = 3; - private int lastNSamples_; - /** - *
-     * used when you want something like "get the last N many samples
-     * 
- * - * uint32 last_n_samples = 3; - * @return The lastNSamples. - */ - @java.lang.Override - public int getLastNSamples() { - return lastNSamples_; - } + /** + * string name = 3; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + onChanged(); + return this; + } - public static final int START_TIMESTAMP_FIELD_NUMBER = 4; - private context.ContextOuterClass.Timestamp startTimestamp_; - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 4; - * @return Whether the startTimestamp field is set. - */ - @java.lang.Override - public boolean hasStartTimestamp() { - return startTimestamp_ != null; - } - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 4; - * @return The startTimestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getStartTimestamp() { - return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; - } - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 4; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { - return getStartTimestamp(); - } + private monitoring.Monitoring.KpiId kpiId_; - public static final int END_TIMESTAMP_FIELD_NUMBER = 5; - private context.ContextOuterClass.Timestamp endTimestamp_; - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 5; - * @return Whether the endTimestamp field is set. - */ - @java.lang.Override - public boolean hasEndTimestamp() { - return endTimestamp_ != null; - } - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 5; - * @return The endTimestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getEndTimestamp() { - return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; - } - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 5; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { - return getEndTimestamp(); - } + private com.google.protobuf.SingleFieldBuilderV3 kpiIdBuilder_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .monitoring.KpiId kpi_id = 4; + * @return Whether the kpiId field is set. + */ + public boolean hasKpiId() { + return kpiIdBuilder_ != null || kpiId_ != null; + } - memoizedIsInitialized = 1; - return true; - } + /** + * .monitoring.KpiId kpi_id = 4; + * @return The kpiId. + */ + public monitoring.Monitoring.KpiId getKpiId() { + if (kpiIdBuilder_ == null) { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } else { + return kpiIdBuilder_.getMessage(); + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < kpiIds_.size(); i++) { - output.writeMessage(1, kpiIds_.get(i)); - } - if (monitoringWindowS_ != 0F) { - output.writeFloat(2, monitoringWindowS_); - } - if (lastNSamples_ != 0) { - output.writeUInt32(3, lastNSamples_); - } - if (startTimestamp_ != null) { - output.writeMessage(4, getStartTimestamp()); - } - if (endTimestamp_ != null) { - output.writeMessage(5, getEndTimestamp()); - } - unknownFields.writeTo(output); - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiId_ = value; + onChanged(); + } else { + kpiIdBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < kpiIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, kpiIds_.get(i)); - } - if (monitoringWindowS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, monitoringWindowS_); - } - if (lastNSamples_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, lastNSamples_); - } - if (startTimestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getStartTimestamp()); - } - if (endTimestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getEndTimestamp()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { + if (kpiIdBuilder_ == null) { + kpiId_ = builderForValue.build(); + onChanged(); + } else { + kpiIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiQuery)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiQuery other = (monitoring.Monitoring.KpiQuery) obj; - - if (!getKpiIdsList() - .equals(other.getKpiIdsList())) return false; - if (java.lang.Float.floatToIntBits(getMonitoringWindowS()) - != java.lang.Float.floatToIntBits( - other.getMonitoringWindowS())) return false; - if (getLastNSamples() - != other.getLastNSamples()) return false; - if (hasStartTimestamp() != other.hasStartTimestamp()) return false; - if (hasStartTimestamp()) { - if (!getStartTimestamp() - .equals(other.getStartTimestamp())) return false; - } - if (hasEndTimestamp() != other.hasEndTimestamp()) return false; - if (hasEndTimestamp()) { - if (!getEndTimestamp() - .equals(other.getEndTimestamp())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { + if (kpiIdBuilder_ == null) { + if (kpiId_ != null) { + kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + } else { + kpiId_ = value; + } + onChanged(); + } else { + kpiIdBuilder_.mergeFrom(value); + } + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getKpiIdsCount() > 0) { - hash = (37 * hash) + KPI_IDS_FIELD_NUMBER; - hash = (53 * hash) + getKpiIdsList().hashCode(); - } - hash = (37 * hash) + MONITORING_WINDOW_S_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getMonitoringWindowS()); - hash = (37 * hash) + LAST_N_SAMPLES_FIELD_NUMBER; - hash = (53 * hash) + getLastNSamples(); - if (hasStartTimestamp()) { - hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getStartTimestamp().hashCode(); - } - if (hasEndTimestamp()) { - hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getEndTimestamp().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + public Builder clearKpiId() { + if (kpiIdBuilder_ == null) { + kpiId_ = null; + onChanged(); + } else { + kpiId_ = null; + kpiIdBuilder_ = null; + } + return this; + } - public static monitoring.Monitoring.KpiQuery parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiQuery parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiQuery parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiQuery parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiQuery parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiQuery parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + onChanged(); + return getKpiIdFieldBuilder().getBuilder(); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiQuery prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { + if (kpiIdBuilder_ != null) { + return kpiIdBuilder_.getMessageOrBuilder(); + } else { + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiQuery} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiQuery) - monitoring.Monitoring.KpiQueryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiQuery_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiQuery_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiQuery.class, monitoring.Monitoring.KpiQuery.Builder.class); - } - - // 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(); - if (kpiIdsBuilder_ == null) { - kpiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - kpiIdsBuilder_.clear(); - } - monitoringWindowS_ = 0F; - - lastNSamples_ = 0; - - if (startTimestampBuilder_ == null) { - startTimestamp_ = null; - } else { - startTimestamp_ = null; - startTimestampBuilder_ = null; - } - if (endTimestampBuilder_ == null) { - endTimestamp_ = null; - } else { - endTimestamp_ = null; - endTimestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiQuery_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiQuery getDefaultInstanceForType() { - return monitoring.Monitoring.KpiQuery.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiQuery build() { - monitoring.Monitoring.KpiQuery result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public monitoring.Monitoring.KpiQuery buildPartial() { - monitoring.Monitoring.KpiQuery result = new monitoring.Monitoring.KpiQuery(this); - int from_bitField0_ = bitField0_; - if (kpiIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpiIds_ = java.util.Collections.unmodifiableList(kpiIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.kpiIds_ = kpiIds_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiQuery) { - return mergeFrom((monitoring.Monitoring.KpiQuery)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiQuery other) { - if (other == monitoring.Monitoring.KpiQuery.getDefaultInstance()) return this; - if (kpiIdsBuilder_ == null) { - if (!other.kpiIds_.isEmpty()) { - if (kpiIds_.isEmpty()) { - kpiIds_ = other.kpiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiIdsIsMutable(); - kpiIds_.addAll(other.kpiIds_); - } - onChanged(); - } - } else { - if (!other.kpiIds_.isEmpty()) { - if (kpiIdsBuilder_.isEmpty()) { - kpiIdsBuilder_.dispose(); - kpiIdsBuilder_ = null; - kpiIds_ = other.kpiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiIdsFieldBuilder() : null; - } else { - kpiIdsBuilder_.addAllMessages(other.kpiIds_); - } - } - } - if (other.getMonitoringWindowS() != 0F) { - setMonitoringWindowS(other.getMonitoringWindowS()); - } - if (other.getLastNSamples() != 0) { - setLastNSamples(other.getLastNSamples()); - } - if (other.hasStartTimestamp()) { - mergeStartTimestamp(other.getStartTimestamp()); - } - if (other.hasEndTimestamp()) { - mergeEndTimestamp(other.getEndTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiQuery) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List kpiIds_ = - java.util.Collections.emptyList(); - private void ensureKpiIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiIds_ = new java.util.ArrayList(kpiIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdsBuilder_; - - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public java.util.List getKpiIdsList() { - if (kpiIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiIds_); - } else { - return kpiIdsBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public int getKpiIdsCount() { - if (kpiIdsBuilder_ == null) { - return kpiIds_.size(); - } else { - return kpiIdsBuilder_.getCount(); - } - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public monitoring.Monitoring.KpiId getKpiIds(int index) { - if (kpiIdsBuilder_ == null) { - return kpiIds_.get(index); - } else { - return kpiIdsBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder setKpiIds( - int index, monitoring.Monitoring.KpiId value) { - if (kpiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdsIsMutable(); - kpiIds_.set(index, value); - onChanged(); - } else { - kpiIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder setKpiIds( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdsBuilder_ == null) { - ensureKpiIdsIsMutable(); - kpiIds_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder addKpiIds(monitoring.Monitoring.KpiId value) { - if (kpiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdsIsMutable(); - kpiIds_.add(value); - onChanged(); - } else { - kpiIdsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder addKpiIds( - int index, monitoring.Monitoring.KpiId value) { - if (kpiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIdsIsMutable(); - kpiIds_.add(index, value); - onChanged(); - } else { - kpiIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder addKpiIds( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdsBuilder_ == null) { - ensureKpiIdsIsMutable(); - kpiIds_.add(builderForValue.build()); - onChanged(); - } else { - kpiIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder addKpiIds( - int index, monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdsBuilder_ == null) { - ensureKpiIdsIsMutable(); - kpiIds_.add(index, builderForValue.build()); - onChanged(); - } else { - kpiIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder addAllKpiIds( - java.lang.Iterable values) { - if (kpiIdsBuilder_ == null) { - ensureKpiIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiIds_); - onChanged(); - } else { - kpiIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder clearKpiIds() { - if (kpiIdsBuilder_ == null) { - kpiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiIdsBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public Builder removeKpiIds(int index) { - if (kpiIdsBuilder_ == null) { - ensureKpiIdsIsMutable(); - kpiIds_.remove(index); - onChanged(); - } else { - kpiIdsBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdsBuilder( - int index) { - return getKpiIdsFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdsOrBuilder( - int index) { - if (kpiIdsBuilder_ == null) { - return kpiIds_.get(index); } else { - return kpiIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public java.util.List - getKpiIdsOrBuilderList() { - if (kpiIdsBuilder_ != null) { - return kpiIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(kpiIds_); - } - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdsBuilder() { - return getKpiIdsFieldBuilder().addBuilder( - monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public monitoring.Monitoring.KpiId.Builder addKpiIdsBuilder( - int index) { - return getKpiIdsFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiId.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiId kpi_ids = 1; - */ - public java.util.List - getKpiIdsBuilderList() { - return getKpiIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdsFieldBuilder() { - if (kpiIdsBuilder_ == null) { - kpiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - kpiIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - kpiIds_ = null; - } - return kpiIdsBuilder_; - } - - private float monitoringWindowS_ ; - /** - * float monitoring_window_s = 2; - * @return The monitoringWindowS. - */ - @java.lang.Override - public float getMonitoringWindowS() { - return monitoringWindowS_; - } - /** - * float monitoring_window_s = 2; - * @param value The monitoringWindowS to set. - * @return This builder for chaining. - */ - public Builder setMonitoringWindowS(float value) { - - monitoringWindowS_ = value; - onChanged(); - return this; - } - /** - * float monitoring_window_s = 2; - * @return This builder for chaining. - */ - public Builder clearMonitoringWindowS() { - - monitoringWindowS_ = 0F; - onChanged(); - return this; - } - - private int lastNSamples_ ; - /** - *
-       * used when you want something like "get the last N many samples
-       * 
- * - * uint32 last_n_samples = 3; - * @return The lastNSamples. - */ - @java.lang.Override - public int getLastNSamples() { - return lastNSamples_; - } - /** - *
-       * used when you want something like "get the last N many samples
-       * 
- * - * uint32 last_n_samples = 3; - * @param value The lastNSamples to set. - * @return This builder for chaining. - */ - public Builder setLastNSamples(int value) { - - lastNSamples_ = value; - onChanged(); - return this; - } - /** - *
-       * used when you want something like "get the last N many samples
-       * 
- * - * uint32 last_n_samples = 3; - * @return This builder for chaining. - */ - public Builder clearLastNSamples() { - - lastNSamples_ = 0; - onChanged(); - return this; - } - - private context.ContextOuterClass.Timestamp startTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> startTimestampBuilder_; - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - * @return Whether the startTimestamp field is set. - */ - public boolean hasStartTimestamp() { - return startTimestampBuilder_ != null || startTimestamp_ != null; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - * @return The startTimestamp. - */ - public context.ContextOuterClass.Timestamp getStartTimestamp() { - if (startTimestampBuilder_ == null) { - return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; - } else { - return startTimestampBuilder_.getMessage(); - } - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - public Builder setStartTimestamp(context.ContextOuterClass.Timestamp value) { - if (startTimestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTimestamp_ = value; - onChanged(); - } else { - startTimestampBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - public Builder setStartTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (startTimestampBuilder_ == null) { - startTimestamp_ = builderForValue.build(); - onChanged(); - } else { - startTimestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) { - if (startTimestampBuilder_ == null) { - if (startTimestamp_ != null) { - startTimestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(startTimestamp_).mergeFrom(value).buildPartial(); - } else { - startTimestamp_ = value; - } - onChanged(); - } else { - startTimestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - public Builder clearStartTimestamp() { - if (startTimestampBuilder_ == null) { - startTimestamp_ = null; - onChanged(); - } else { - startTimestamp_ = null; - startTimestampBuilder_ = null; - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() { - - onChanged(); - return getStartTimestampFieldBuilder().getBuilder(); - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { - if (startTimestampBuilder_ != null) { - return startTimestampBuilder_.getMessageOrBuilder(); - } else { - return startTimestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; - } - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getStartTimestampFieldBuilder() { - if (startTimestampBuilder_ == null) { - startTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getStartTimestamp(), - getParentForChildren(), - isClean()); - startTimestamp_ = null; - } - return startTimestampBuilder_; - } - - private context.ContextOuterClass.Timestamp endTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> endTimestampBuilder_; - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - * @return Whether the endTimestamp field is set. - */ - public boolean hasEndTimestamp() { - return endTimestampBuilder_ != null || endTimestamp_ != null; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - * @return The endTimestamp. - */ - public context.ContextOuterClass.Timestamp getEndTimestamp() { - if (endTimestampBuilder_ == null) { - return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; - } else { - return endTimestampBuilder_.getMessage(); - } - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - public Builder setEndTimestamp(context.ContextOuterClass.Timestamp value) { - if (endTimestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTimestamp_ = value; - onChanged(); - } else { - endTimestampBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - public Builder setEndTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (endTimestampBuilder_ == null) { - endTimestamp_ = builderForValue.build(); - onChanged(); - } else { - endTimestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) { - if (endTimestampBuilder_ == null) { - if (endTimestamp_ != null) { - endTimestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(endTimestamp_).mergeFrom(value).buildPartial(); - } else { - endTimestamp_ = value; - } - onChanged(); - } else { - endTimestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - public Builder clearEndTimestamp() { - if (endTimestampBuilder_ == null) { - endTimestamp_ = null; - onChanged(); - } else { - endTimestamp_ = null; - endTimestampBuilder_ = null; - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() { - - onChanged(); - return getEndTimestampFieldBuilder().getBuilder(); - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { - if (endTimestampBuilder_ != null) { - return endTimestampBuilder_.getMessageOrBuilder(); - } else { - return endTimestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; - } - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getEndTimestampFieldBuilder() { - if (endTimestampBuilder_ == null) { - endTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getEndTimestamp(), - getParentForChildren(), - isClean()); - endTimestamp_ = null; - } - return endTimestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiQuery) - } + /** + * .monitoring.KpiId kpi_id = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiIdFieldBuilder() { + if (kpiIdBuilder_ == null) { + kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiId(), getParentForChildren(), isClean()); + kpiId_ = null; + } + return kpiIdBuilder_; + } - // @@protoc_insertion_point(class_scope:monitoring.KpiQuery) - private static final monitoring.Monitoring.KpiQuery DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiQuery(); - } + private monitoring.Monitoring.KpiValueRange kpiValueRange_; - public static monitoring.Monitoring.KpiQuery getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.SingleFieldBuilderV3 kpiValueRangeBuilder_; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return Whether the kpiValueRange field is set. + */ + public boolean hasKpiValueRange() { + return kpiValueRangeBuilder_ != null || kpiValueRange_ != null; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + * @return The kpiValueRange. + */ + public monitoring.Monitoring.KpiValueRange getKpiValueRange() { + if (kpiValueRangeBuilder_ == null) { + return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; + } else { + return kpiValueRangeBuilder_.getMessage(); + } + } - @java.lang.Override - public monitoring.Monitoring.KpiQuery getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + public Builder setKpiValueRange(monitoring.Monitoring.KpiValueRange value) { + if (kpiValueRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiValueRange_ = value; + onChanged(); + } else { + kpiValueRangeBuilder_.setMessage(value); + } + return this; + } - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + public Builder setKpiValueRange(monitoring.Monitoring.KpiValueRange.Builder builderForValue) { + if (kpiValueRangeBuilder_ == null) { + kpiValueRange_ = builderForValue.build(); + onChanged(); + } else { + kpiValueRangeBuilder_.setMessage(builderForValue.build()); + } + return this; + } - public interface RawKpiOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.RawKpi) - com.google.protobuf.MessageOrBuilder { + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + public Builder mergeKpiValueRange(monitoring.Monitoring.KpiValueRange value) { + if (kpiValueRangeBuilder_ == null) { + if (kpiValueRange_ != null) { + kpiValueRange_ = monitoring.Monitoring.KpiValueRange.newBuilder(kpiValueRange_).mergeFrom(value).buildPartial(); + } else { + kpiValueRange_ = value; + } + onChanged(); + } else { + kpiValueRangeBuilder_.mergeFrom(value); + } + return this; + } - /** - * .context.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 1; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 1; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + public Builder clearKpiValueRange() { + if (kpiValueRangeBuilder_ == null) { + kpiValueRange_ = null; + onChanged(); + } else { + kpiValueRange_ = null; + kpiValueRangeBuilder_ = null; + } + return this; + } - /** - * .monitoring.KpiValue kpi_value = 2; - * @return Whether the kpiValue field is set. - */ - boolean hasKpiValue(); - /** - * .monitoring.KpiValue kpi_value = 2; - * @return The kpiValue. - */ - monitoring.Monitoring.KpiValue getKpiValue(); - /** - * .monitoring.KpiValue kpi_value = 2; - */ - monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); - } - /** - *
-   * cell
-   * 
- * - * Protobuf type {@code monitoring.RawKpi} - */ - public static final class RawKpi extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.RawKpi) - RawKpiOrBuilder { - private static final long serialVersionUID = 0L; - // Use RawKpi.newBuilder() to construct. - private RawKpi(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RawKpi() { - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + public monitoring.Monitoring.KpiValueRange.Builder getKpiValueRangeBuilder() { + onChanged(); + return getKpiValueRangeFieldBuilder().getBuilder(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RawKpi(); - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { + if (kpiValueRangeBuilder_ != null) { + return kpiValueRangeBuilder_.getMessageOrBuilder(); + } else { + return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; + } + } - @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; - } + /** + * .monitoring.KpiValueRange kpi_value_range = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiValueRangeFieldBuilder() { + if (kpiValueRangeBuilder_ == null) { + kpiValueRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiValueRange(), getParentForChildren(), isClean()); + kpiValueRange_ = null; + } + return kpiValueRangeBuilder_; + } + + private context.ContextOuterClass.Timestamp timestamp_; + + private com.google.protobuf.SingleFieldBuilderV3 timestampBuilder_; + + /** + * .context.Timestamp timestamp = 6; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + + /** + * .context.Timestamp timestamp = 6; + * @return The timestamp. + */ + public context.ContextOuterClass.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * .context.Timestamp timestamp = 6; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 6; + */ + public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Timestamp timestamp = 6; + */ + public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Timestamp timestamp = 6; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + /** + * .context.Timestamp timestamp = 6; + */ + public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + + /** + * .context.Timestamp timestamp = 6; + */ + public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; + } + } + + /** + * .context.Timestamp timestamp = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3 getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.AlarmDescriptor) + } + + // @@protoc_insertion_point(class_scope:monitoring.AlarmDescriptor) + private static final monitoring.Monitoring.AlarmDescriptor DEFAULT_INSTANCE; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_RawKpi_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.RawKpi.class, monitoring.Monitoring.RawKpi.Builder.class); - } + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmDescriptor(); + } - public static final int TIMESTAMP_FIELD_NUMBER = 1; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 1; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .context.Timestamp timestamp = 1; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } + public static monitoring.Monitoring.AlarmDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static final int KPI_VALUE_FIELD_NUMBER = 2; - private monitoring.Monitoring.KpiValue kpiValue_; - /** - * .monitoring.KpiValue kpi_value = 2; - * @return Whether the kpiValue field is set. - */ - @java.lang.Override - public boolean hasKpiValue() { - return kpiValue_ != null; - } - /** - * .monitoring.KpiValue kpi_value = 2; - * @return The kpiValue. - */ - @java.lang.Override - public monitoring.Monitoring.KpiValue getKpiValue() { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - return getKpiValue(); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @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); + } + }; - memoizedIsInitialized = 1; - return true; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (timestamp_ != null) { - output.writeMessage(1, getTimestamp()); - } - if (kpiValue_ != null) { - output.writeMessage(2, getKpiValue()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTimestamp()); - } - if (kpiValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getKpiValue()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; + @java.lang.Override + public monitoring.Monitoring.AlarmDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.RawKpi)) { - return super.equals(obj); - } - monitoring.Monitoring.RawKpi other = (monitoring.Monitoring.RawKpi) obj; - - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (hasKpiValue() != other.hasKpiValue()) return false; - if (hasKpiValue()) { - if (!getKpiValue() - .equals(other.getKpiValue())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public interface AlarmIDOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.AlarmID) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - if (hasKpiValue()) { - hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getKpiValue().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Uuid alarm_id = 1; + * @return Whether the alarmId field is set. + */ + boolean hasAlarmId(); - public static monitoring.Monitoring.RawKpi parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpi parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpi parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpi parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpi parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpi parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpi parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpi parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.RawKpi parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpi parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.RawKpi parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpi parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Uuid alarm_id = 1; + * @return The alarmId. + */ + context.ContextOuterClass.Uuid getAlarmId(); - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.RawKpi prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * .context.Uuid alarm_id = 1; + */ + context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder(); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** - *
-     * cell
-     * 
- * - * Protobuf type {@code monitoring.RawKpi} + * Protobuf type {@code monitoring.AlarmID} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.RawKpi) - monitoring.Monitoring.RawKpiOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_RawKpi_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.RawKpi.class, monitoring.Monitoring.RawKpi.Builder.class); - } - - // 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; - timestampBuilder_ = null; - } - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.RawKpi getDefaultInstanceForType() { - return monitoring.Monitoring.RawKpi.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.RawKpi build() { - monitoring.Monitoring.RawKpi result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.RawKpi) { - return mergeFrom((monitoring.Monitoring.RawKpi)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.RawKpi other) { - if (other == monitoring.Monitoring.RawKpi.getDefaultInstance()) return this; - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - if (other.hasKpiValue()) { - mergeKpiValue(other.getKpiValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - 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); - } - } - return this; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; - /** - * .context.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 1; - * @return The timestamp. - */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - * .context.Timestamp timestamp = 1; - */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .context.Timestamp timestamp = 1; - */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - * .context.Timestamp timestamp = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - - private monitoring.Monitoring.KpiValue kpiValue_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiValueBuilder_; - /** - * .monitoring.KpiValue kpi_value = 2; - * @return Whether the kpiValue field is set. - */ - public boolean hasKpiValue() { - return kpiValueBuilder_ != null || kpiValue_ != null; - } - /** - * .monitoring.KpiValue kpi_value = 2; - * @return The kpiValue. - */ - public monitoring.Monitoring.KpiValue getKpiValue() { - if (kpiValueBuilder_ == null) { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } else { - return kpiValueBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiValue_ = value; - onChanged(); - } else { - kpiValueBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - public Builder setKpiValue( - monitoring.Monitoring.KpiValue.Builder builderForValue) { - if (kpiValueBuilder_ == null) { - kpiValue_ = builderForValue.build(); - onChanged(); - } else { - kpiValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (kpiValue_ != null) { - kpiValue_ = - monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); - } else { - kpiValue_ = value; - } - onChanged(); - } else { - kpiValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - public Builder clearKpiValue() { - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - onChanged(); - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { - - onChanged(); - return getKpiValueFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - if (kpiValueBuilder_ != null) { - return kpiValueBuilder_.getMessageOrBuilder(); - } else { - return kpiValue_ == null ? - monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } - } - /** - * .monitoring.KpiValue kpi_value = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> - getKpiValueFieldBuilder() { - if (kpiValueBuilder_ == null) { - kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder>( - getKpiValue(), - getParentForChildren(), - isClean()); - kpiValue_ = null; - } - return kpiValueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.RawKpi) - } + public static final class AlarmID extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.AlarmID) + AlarmIDOrBuilder { - // @@protoc_insertion_point(class_scope:monitoring.RawKpi) - private static final monitoring.Monitoring.RawKpi DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpi(); - } + private static final long serialVersionUID = 0L; - public static monitoring.Monitoring.RawKpi getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Use AlarmID.newBuilder() to construct. + private AlarmID(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private AlarmID() { + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AlarmID(); + } - @java.lang.Override - public monitoring.Monitoring.RawKpi getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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 interface RawKpiListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.RawKpiList) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmID_descriptor; + } - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmID_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmID.class, monitoring.Monitoring.AlarmID.Builder.class); + } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - java.util.List - getRawKpisList(); - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - monitoring.Monitoring.RawKpi getRawKpis(int index); - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - int getRawKpisCount(); - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - java.util.List - getRawKpisOrBuilderList(); - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder( - int index); - } - /** - *
-   * column
-   * 
- * - * Protobuf type {@code monitoring.RawKpiList} - */ - public static final class RawKpiList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.RawKpiList) - RawKpiListOrBuilder { - private static final long serialVersionUID = 0L; - // Use RawKpiList.newBuilder() to construct. - private RawKpiList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RawKpiList() { - rawKpis_ = java.util.Collections.emptyList(); - } + public static final int ALARM_ID_FIELD_NUMBER = 1; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RawKpiList(); - } + private context.ContextOuterClass.Uuid alarmId_; - @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(); - 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; - } + /** + * .context.Uuid alarm_id = 1; + * @return Whether the alarmId field is set. + */ + @java.lang.Override + public boolean hasAlarmId() { + return alarmId_ != null; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.RawKpiList.class, monitoring.Monitoring.RawKpiList.Builder.class); - } + /** + * .context.Uuid alarm_id = 1; + * @return The alarmId. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getAlarmId() { + return alarmId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; + } - public static final int KPI_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + /** + * .context.Uuid alarm_id = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder() { + return getAlarmId(); + } - public static final int RAW_KPIS_FIELD_NUMBER = 2; - private java.util.List rawKpis_; - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - @java.lang.Override - public java.util.List getRawKpisList() { - return rawKpis_; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - @java.lang.Override - public java.util.List - getRawKpisOrBuilderList() { - return rawKpis_; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - @java.lang.Override - public int getRawKpisCount() { - return rawKpis_.size(); - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - @java.lang.Override - public monitoring.Monitoring.RawKpi getRawKpis(int index) { - return rawKpis_.get(index); - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - @java.lang.Override - public monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder( - int index) { - return rawKpis_.get(index); - } + private byte memoizedIsInitialized = -1; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (alarmId_ != null) { + output.writeMessage(1, getAlarmId()); + } + unknownFields.writeTo(output); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - for (int i = 0; i < rawKpis_.size(); i++) { - output.writeMessage(2, rawKpis_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (alarmId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - for (int i = 0; i < rawKpis_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, rawKpis_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.AlarmID)) { + return super.equals(obj); + } + monitoring.Monitoring.AlarmID other = (monitoring.Monitoring.AlarmID) obj; + if (hasAlarmId() != other.hasAlarmId()) + return false; + if (hasAlarmId()) { + if (!getAlarmId().equals(other.getAlarmId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.RawKpiList)) { - return super.equals(obj); - } - monitoring.Monitoring.RawKpiList other = (monitoring.Monitoring.RawKpiList) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (!getRawKpisList() - .equals(other.getRawKpisList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAlarmId()) { + hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; + hash = (53 * hash) + getAlarmId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - if (getRawKpisCount() > 0) { - hash = (37 * hash) + RAW_KPIS_FIELD_NUMBER; - hash = (53 * hash) + getRawKpisList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static monitoring.Monitoring.AlarmID parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static monitoring.Monitoring.RawKpiList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpiList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpiList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static monitoring.Monitoring.AlarmID parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.RawKpiList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static monitoring.Monitoring.AlarmID parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * column
-     * 
- * - * Protobuf type {@code monitoring.RawKpiList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.RawKpiList) - monitoring.Monitoring.RawKpiListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.RawKpiList.class, monitoring.Monitoring.RawKpiList.Builder.class); - } - - // 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; - kpiIdBuilder_ = null; - } - if (rawKpisBuilder_ == null) { - rawKpis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - rawKpisBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.RawKpiList getDefaultInstanceForType() { - return monitoring.Monitoring.RawKpiList.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.RawKpiList build() { - monitoring.Monitoring.RawKpiList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - if (rawKpisBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - rawKpis_ = java.util.Collections.unmodifiableList(rawKpis_); - bitField0_ = (bitField0_ & ~0x00000001); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.RawKpiList) { - return mergeFrom((monitoring.Monitoring.RawKpiList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.RawKpiList other) { - if (other == monitoring.Monitoring.RawKpiList.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - if (rawKpisBuilder_ == null) { - if (!other.rawKpis_.isEmpty()) { - if (rawKpis_.isEmpty()) { - rawKpis_ = other.rawKpis_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRawKpisIsMutable(); - rawKpis_.addAll(other.rawKpis_); - } - onChanged(); - } - } else { - if (!other.rawKpis_.isEmpty()) { - if (rawKpisBuilder_.isEmpty()) { - rawKpisBuilder_.dispose(); - rawKpisBuilder_ = null; - rawKpis_ = other.rawKpis_; - bitField0_ = (bitField0_ & ~0x00000001); - rawKpisBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRawKpisFieldBuilder() : null; - } else { - rawKpisBuilder_.addAllMessages(other.rawKpis_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.RawKpiList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - 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_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - - private java.util.List rawKpis_ = - java.util.Collections.emptyList(); - private void ensureRawKpisIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - rawKpis_ = new java.util.ArrayList(rawKpis_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.RawKpi, monitoring.Monitoring.RawKpi.Builder, monitoring.Monitoring.RawKpiOrBuilder> rawKpisBuilder_; - - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public java.util.List getRawKpisList() { - if (rawKpisBuilder_ == null) { - return java.util.Collections.unmodifiableList(rawKpis_); - } else { - return rawKpisBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public int getRawKpisCount() { - if (rawKpisBuilder_ == null) { - return rawKpis_.size(); - } else { - return rawKpisBuilder_.getCount(); - } - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public monitoring.Monitoring.RawKpi getRawKpis(int index) { - if (rawKpisBuilder_ == null) { - return rawKpis_.get(index); - } else { - return rawKpisBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder setRawKpis( - int index, monitoring.Monitoring.RawKpi value) { - if (rawKpisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRawKpisIsMutable(); - rawKpis_.set(index, value); - onChanged(); - } else { - rawKpisBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder setRawKpis( - int index, monitoring.Monitoring.RawKpi.Builder builderForValue) { - if (rawKpisBuilder_ == null) { - ensureRawKpisIsMutable(); - rawKpis_.set(index, builderForValue.build()); - onChanged(); - } else { - rawKpisBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder addRawKpis(monitoring.Monitoring.RawKpi value) { - if (rawKpisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRawKpisIsMutable(); - rawKpis_.add(value); - onChanged(); - } else { - rawKpisBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder addRawKpis( - int index, monitoring.Monitoring.RawKpi value) { - if (rawKpisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRawKpisIsMutable(); - rawKpis_.add(index, value); - onChanged(); - } else { - rawKpisBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder addRawKpis( - monitoring.Monitoring.RawKpi.Builder builderForValue) { - if (rawKpisBuilder_ == null) { - ensureRawKpisIsMutable(); - rawKpis_.add(builderForValue.build()); - onChanged(); - } else { - rawKpisBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder addRawKpis( - int index, monitoring.Monitoring.RawKpi.Builder builderForValue) { - if (rawKpisBuilder_ == null) { - ensureRawKpisIsMutable(); - rawKpis_.add(index, builderForValue.build()); - onChanged(); - } else { - rawKpisBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder addAllRawKpis( - java.lang.Iterable values) { - if (rawKpisBuilder_ == null) { - ensureRawKpisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rawKpis_); - onChanged(); - } else { - rawKpisBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder clearRawKpis() { - if (rawKpisBuilder_ == null) { - rawKpis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - rawKpisBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public Builder removeRawKpis(int index) { - if (rawKpisBuilder_ == null) { - ensureRawKpisIsMutable(); - rawKpis_.remove(index); - onChanged(); - } else { - rawKpisBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public monitoring.Monitoring.RawKpi.Builder getRawKpisBuilder( - int index) { - return getRawKpisFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public monitoring.Monitoring.RawKpiOrBuilder getRawKpisOrBuilder( - int index) { - if (rawKpisBuilder_ == null) { - return rawKpis_.get(index); } else { - return rawKpisBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public java.util.List - getRawKpisOrBuilderList() { - if (rawKpisBuilder_ != null) { - return rawKpisBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rawKpis_); - } - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public monitoring.Monitoring.RawKpi.Builder addRawKpisBuilder() { - return getRawKpisFieldBuilder().addBuilder( - monitoring.Monitoring.RawKpi.getDefaultInstance()); - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public monitoring.Monitoring.RawKpi.Builder addRawKpisBuilder( - int index) { - return getRawKpisFieldBuilder().addBuilder( - index, monitoring.Monitoring.RawKpi.getDefaultInstance()); - } - /** - * repeated .monitoring.RawKpi raw_kpis = 2; - */ - public java.util.List - getRawKpisBuilderList() { - return getRawKpisFieldBuilder().getBuilderList(); - } - 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()); - rawKpis_ = null; - } - return rawKpisBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.RawKpiList) - } + public static monitoring.Monitoring.AlarmID parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:monitoring.RawKpiList) - private static final monitoring.Monitoring.RawKpiList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpiList(); - } + public static monitoring.Monitoring.AlarmID parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static monitoring.Monitoring.RawKpiList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static monitoring.Monitoring.AlarmID parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static monitoring.Monitoring.AlarmID parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static monitoring.Monitoring.AlarmID parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public monitoring.Monitoring.RawKpiList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static monitoring.Monitoring.AlarmID parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - } + public static monitoring.Monitoring.AlarmID parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - public interface RawKpiTableOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.RawKpiTable) - com.google.protobuf.MessageOrBuilder { + public static monitoring.Monitoring.AlarmID parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - java.util.List - getRawKpiListsList(); - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - monitoring.Monitoring.RawKpiList getRawKpiLists(int index); - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - int getRawKpiListsCount(); - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - java.util.List - getRawKpiListsOrBuilderList(); - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder( - int index); - } - /** - *
-   * table
-   * 
- * - * Protobuf type {@code monitoring.RawKpiTable} - */ - public static final class RawKpiTable extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.RawKpiTable) - RawKpiTableOrBuilder { - private static final long serialVersionUID = 0L; - // Use RawKpiTable.newBuilder() to construct. - private RawKpiTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RawKpiTable() { - rawKpiLists_ = java.util.Collections.emptyList(); - } + public static monitoring.Monitoring.AlarmID parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RawKpiTable(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @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(); - 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; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.RawKpiTable.class, monitoring.Monitoring.RawKpiTable.Builder.class); - } + public static Builder newBuilder(monitoring.Monitoring.AlarmID prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static final int RAW_KPI_LISTS_FIELD_NUMBER = 1; - private java.util.List rawKpiLists_; - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - @java.lang.Override - public java.util.List getRawKpiListsList() { - return rawKpiLists_; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - @java.lang.Override - public java.util.List - getRawKpiListsOrBuilderList() { - return rawKpiLists_; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - @java.lang.Override - public int getRawKpiListsCount() { - return rawKpiLists_.size(); - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - @java.lang.Override - public monitoring.Monitoring.RawKpiList getRawKpiLists(int index) { - return rawKpiLists_.get(index); - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - @java.lang.Override - public monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder( - int index) { - return rawKpiLists_.get(index); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - memoizedIsInitialized = 1; - return true; - } + /** + * Protobuf type {@code monitoring.AlarmID} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.AlarmID) + monitoring.Monitoring.AlarmIDOrBuilder { - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < rawKpiLists_.size(); i++) { - output.writeMessage(1, rawKpiLists_.get(i)); - } - unknownFields.writeTo(output); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmID_descriptor; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < rawKpiLists_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, rawKpiLists_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmID_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmID.class, monitoring.Monitoring.AlarmID.Builder.class); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.RawKpiTable)) { - return super.equals(obj); - } - monitoring.Monitoring.RawKpiTable other = (monitoring.Monitoring.RawKpiTable) obj; - - if (!getRawKpiListsList() - .equals(other.getRawKpiListsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + // Construct using monitoring.Monitoring.AlarmID.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRawKpiListsCount() > 0) { - hash = (37 * hash) + RAW_KPI_LISTS_FIELD_NUMBER; - hash = (53 * hash) + getRawKpiListsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public static monitoring.Monitoring.RawKpiTable parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiTable parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiTable parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiTable parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpiTable parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.RawKpiTable parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.RawKpiTable prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (alarmIdBuilder_ == null) { + alarmId_ = null; + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * table
-     * 
- * - * Protobuf type {@code monitoring.RawKpiTable} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.RawKpiTable) - monitoring.Monitoring.RawKpiTableOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.RawKpiTable.class, monitoring.Monitoring.RawKpiTable.Builder.class); - } - - // 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(); - if (rawKpiListsBuilder_ == null) { - rawKpiLists_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - rawKpiListsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.RawKpiTable getDefaultInstanceForType() { - return monitoring.Monitoring.RawKpiTable.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.RawKpiTable build() { - monitoring.Monitoring.RawKpiTable result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public monitoring.Monitoring.RawKpiTable buildPartial() { - monitoring.Monitoring.RawKpiTable result = new monitoring.Monitoring.RawKpiTable(this); - int from_bitField0_ = bitField0_; - if (rawKpiListsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - rawKpiLists_ = java.util.Collections.unmodifiableList(rawKpiLists_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.rawKpiLists_ = rawKpiLists_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.RawKpiTable) { - return mergeFrom((monitoring.Monitoring.RawKpiTable)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.RawKpiTable other) { - if (other == monitoring.Monitoring.RawKpiTable.getDefaultInstance()) return this; - if (rawKpiListsBuilder_ == null) { - if (!other.rawKpiLists_.isEmpty()) { - if (rawKpiLists_.isEmpty()) { - rawKpiLists_ = other.rawKpiLists_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRawKpiListsIsMutable(); - rawKpiLists_.addAll(other.rawKpiLists_); - } - onChanged(); - } - } else { - if (!other.rawKpiLists_.isEmpty()) { - if (rawKpiListsBuilder_.isEmpty()) { - rawKpiListsBuilder_.dispose(); - rawKpiListsBuilder_ = null; - rawKpiLists_ = other.rawKpiLists_; - bitField0_ = (bitField0_ & ~0x00000001); - rawKpiListsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRawKpiListsFieldBuilder() : null; - } else { - rawKpiListsBuilder_.addAllMessages(other.rawKpiLists_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.RawKpiTable) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List rawKpiLists_ = - java.util.Collections.emptyList(); - private void ensureRawKpiListsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - rawKpiLists_ = new java.util.ArrayList(rawKpiLists_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.RawKpiList, monitoring.Monitoring.RawKpiList.Builder, monitoring.Monitoring.RawKpiListOrBuilder> rawKpiListsBuilder_; - - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public java.util.List getRawKpiListsList() { - if (rawKpiListsBuilder_ == null) { - return java.util.Collections.unmodifiableList(rawKpiLists_); - } else { - return rawKpiListsBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public int getRawKpiListsCount() { - if (rawKpiListsBuilder_ == null) { - return rawKpiLists_.size(); - } else { - return rawKpiListsBuilder_.getCount(); - } - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public monitoring.Monitoring.RawKpiList getRawKpiLists(int index) { - if (rawKpiListsBuilder_ == null) { - return rawKpiLists_.get(index); - } else { - return rawKpiListsBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder setRawKpiLists( - int index, monitoring.Monitoring.RawKpiList value) { - if (rawKpiListsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRawKpiListsIsMutable(); - rawKpiLists_.set(index, value); - onChanged(); - } else { - rawKpiListsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder setRawKpiLists( - int index, monitoring.Monitoring.RawKpiList.Builder builderForValue) { - if (rawKpiListsBuilder_ == null) { - ensureRawKpiListsIsMutable(); - rawKpiLists_.set(index, builderForValue.build()); - onChanged(); - } else { - rawKpiListsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder addRawKpiLists(monitoring.Monitoring.RawKpiList value) { - if (rawKpiListsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRawKpiListsIsMutable(); - rawKpiLists_.add(value); - onChanged(); - } else { - rawKpiListsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder addRawKpiLists( - int index, monitoring.Monitoring.RawKpiList value) { - if (rawKpiListsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRawKpiListsIsMutable(); - rawKpiLists_.add(index, value); - onChanged(); - } else { - rawKpiListsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder addRawKpiLists( - monitoring.Monitoring.RawKpiList.Builder builderForValue) { - if (rawKpiListsBuilder_ == null) { - ensureRawKpiListsIsMutable(); - rawKpiLists_.add(builderForValue.build()); - onChanged(); - } else { - rawKpiListsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder addRawKpiLists( - int index, monitoring.Monitoring.RawKpiList.Builder builderForValue) { - if (rawKpiListsBuilder_ == null) { - ensureRawKpiListsIsMutable(); - rawKpiLists_.add(index, builderForValue.build()); - onChanged(); - } else { - rawKpiListsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder addAllRawKpiLists( - java.lang.Iterable values) { - if (rawKpiListsBuilder_ == null) { - ensureRawKpiListsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rawKpiLists_); - onChanged(); - } else { - rawKpiListsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder clearRawKpiLists() { - if (rawKpiListsBuilder_ == null) { - rawKpiLists_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - rawKpiListsBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public Builder removeRawKpiLists(int index) { - if (rawKpiListsBuilder_ == null) { - ensureRawKpiListsIsMutable(); - rawKpiLists_.remove(index); - onChanged(); - } else { - rawKpiListsBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public monitoring.Monitoring.RawKpiList.Builder getRawKpiListsBuilder( - int index) { - return getRawKpiListsFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public monitoring.Monitoring.RawKpiListOrBuilder getRawKpiListsOrBuilder( - int index) { - if (rawKpiListsBuilder_ == null) { - return rawKpiLists_.get(index); } else { - return rawKpiListsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public java.util.List - getRawKpiListsOrBuilderList() { - if (rawKpiListsBuilder_ != null) { - return rawKpiListsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rawKpiLists_); - } - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public monitoring.Monitoring.RawKpiList.Builder addRawKpiListsBuilder() { - return getRawKpiListsFieldBuilder().addBuilder( - monitoring.Monitoring.RawKpiList.getDefaultInstance()); - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public monitoring.Monitoring.RawKpiList.Builder addRawKpiListsBuilder( - int index) { - return getRawKpiListsFieldBuilder().addBuilder( - index, monitoring.Monitoring.RawKpiList.getDefaultInstance()); - } - /** - * repeated .monitoring.RawKpiList raw_kpi_lists = 1; - */ - public java.util.List - getRawKpiListsBuilderList() { - return getRawKpiListsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.RawKpiList, monitoring.Monitoring.RawKpiList.Builder, monitoring.Monitoring.RawKpiListOrBuilder> - getRawKpiListsFieldBuilder() { - if (rawKpiListsBuilder_ == null) { - rawKpiListsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.RawKpiList, monitoring.Monitoring.RawKpiList.Builder, monitoring.Monitoring.RawKpiListOrBuilder>( - rawKpiLists_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - rawKpiLists_ = null; - } - return rawKpiListsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.RawKpiTable) - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_AlarmID_descriptor; + } - // @@protoc_insertion_point(class_scope:monitoring.RawKpiTable) - private static final monitoring.Monitoring.RawKpiTable DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.RawKpiTable(); - } + @java.lang.Override + public monitoring.Monitoring.AlarmID getDefaultInstanceForType() { + return monitoring.Monitoring.AlarmID.getDefaultInstance(); + } - public static monitoring.Monitoring.RawKpiTable getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public monitoring.Monitoring.AlarmID build() { + monitoring.Monitoring.AlarmID result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @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(); + } + onBuilt(); + return result; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public monitoring.Monitoring.RawKpiTable getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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); + } - public interface KpiIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiId) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - /** - * .context.Uuid kpi_id = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .context.Uuid kpi_id = 1; - * @return The kpiId. - */ - context.ContextOuterClass.Uuid getKpiId(); - /** - * .context.Uuid kpi_id = 1; - */ - context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder(); - } - /** - * Protobuf type {@code monitoring.KpiId} - */ - public static final class KpiId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiId) - KpiIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiId.newBuilder() to construct. - private KpiId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiId() { - } + @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 - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiId(); - } + @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 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; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.AlarmID) { + return mergeFrom((monitoring.Monitoring.AlarmID) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiId.class, monitoring.Monitoring.KpiId.Builder.class); - } + public Builder mergeFrom(monitoring.Monitoring.AlarmID other) { + if (other == monitoring.Monitoring.AlarmID.getDefaultInstance()) + return this; + if (other.hasAlarmId()) { + mergeAlarmId(other.getAlarmId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - public static final int KPI_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid kpiId_; - /** - * .context.Uuid kpi_id = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .context.Uuid kpi_id = 1; - * @return The kpiId. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getKpiId() { - return kpiId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; - } - /** - * .context.Uuid kpi_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.AlarmID) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - memoizedIsInitialized = 1; - return true; - } + private context.ContextOuterClass.Uuid alarmId_; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - unknownFields.writeTo(output); - } + private com.google.protobuf.SingleFieldBuilderV3 alarmIdBuilder_; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Uuid alarm_id = 1; + * @return Whether the alarmId field is set. + */ + public boolean hasAlarmId() { + return alarmIdBuilder_ != null || alarmId_ != null; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiId)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiId other = (monitoring.Monitoring.KpiId) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Uuid alarm_id = 1; + * @return The alarmId. + */ + public context.ContextOuterClass.Uuid getAlarmId() { + if (alarmIdBuilder_ == null) { + return alarmId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; + } else { + return alarmIdBuilder_.getMessage(); + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.Uuid alarm_id = 1; + */ + public Builder setAlarmId(context.ContextOuterClass.Uuid value) { + if (alarmIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + alarmId_ = value; + onChanged(); + } else { + alarmIdBuilder_.setMessage(value); + } + return this; + } - public static monitoring.Monitoring.KpiId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.Uuid alarm_id = 1; + */ + public Builder setAlarmId(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (alarmIdBuilder_ == null) { + alarmId_ = builderForValue.build(); + onChanged(); + } else { + alarmIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .context.Uuid alarm_id = 1; + */ + public Builder mergeAlarmId(context.ContextOuterClass.Uuid value) { + if (alarmIdBuilder_ == null) { + if (alarmId_ != null) { + alarmId_ = context.ContextOuterClass.Uuid.newBuilder(alarmId_).mergeFrom(value).buildPartial(); + } else { + alarmId_ = value; + } + onChanged(); + } else { + alarmIdBuilder_.mergeFrom(value); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiId) - monitoring.Monitoring.KpiIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiId.class, monitoring.Monitoring.KpiId.Builder.class); - } - - // 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; - kpiIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiId_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiId getDefaultInstanceForType() { - return monitoring.Monitoring.KpiId.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiId build() { - monitoring.Monitoring.KpiId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiId) { - return mergeFrom((monitoring.Monitoring.KpiId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiId other) { - if (other == monitoring.Monitoring.KpiId.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> kpiIdBuilder_; - /** - * .context.Uuid kpi_id = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .context.Uuid kpi_id = 1; - * @return The kpiId. - */ - public context.ContextOuterClass.Uuid getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .context.Uuid kpi_id = 1; - */ - public Builder setKpiId(context.ContextOuterClass.Uuid value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid kpi_id = 1; - */ - public Builder setKpiId( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid kpi_id = 1; - */ - public Builder mergeKpiId(context.ContextOuterClass.Uuid value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - context.ContextOuterClass.Uuid.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid kpi_id = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid kpi_id = 1; - */ - public context.ContextOuterClass.Uuid.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .context.Uuid kpi_id = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; - } - } - /** - * .context.Uuid kpi_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiId) - } + /** + * .context.Uuid alarm_id = 1; + */ + public Builder clearAlarmId() { + if (alarmIdBuilder_ == null) { + alarmId_ = null; + onChanged(); + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + return this; + } - // @@protoc_insertion_point(class_scope:monitoring.KpiId) - private static final monitoring.Monitoring.KpiId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiId(); - } + /** + * .context.Uuid alarm_id = 1; + */ + public context.ContextOuterClass.Uuid.Builder getAlarmIdBuilder() { + onChanged(); + return getAlarmIdFieldBuilder().getBuilder(); + } - public static monitoring.Monitoring.KpiId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .context.Uuid alarm_id = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder() { + if (alarmIdBuilder_ != null) { + return alarmIdBuilder_.getMessageOrBuilder(); + } else { + return alarmId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .context.Uuid alarm_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getAlarmIdFieldBuilder() { + if (alarmIdBuilder_ == null) { + alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getAlarmId(), getParentForChildren(), isClean()); + alarmId_ = null; + } + return alarmIdBuilder_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public monitoring.Monitoring.KpiId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.AlarmID) + } - } + // @@protoc_insertion_point(class_scope:monitoring.AlarmID) + private static final monitoring.Monitoring.AlarmID DEFAULT_INSTANCE; - public interface KpiOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.Kpi) - com.google.protobuf.MessageOrBuilder { + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmID(); + } - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 1; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + public static monitoring.Monitoring.AlarmID getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * .context.Timestamp timestamp = 2; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 2; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 2; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - /** - * .monitoring.KpiValue kpi_value = 3; - * @return Whether the kpiValue field is set. - */ - boolean hasKpiValue(); - /** - * .monitoring.KpiValue kpi_value = 3; - * @return The kpiValue. - */ - monitoring.Monitoring.KpiValue getKpiValue(); - /** - * .monitoring.KpiValue kpi_value = 3; - */ - monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder(); - } - /** - * Protobuf type {@code monitoring.Kpi} - */ - public static final class Kpi extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.Kpi) - KpiOrBuilder { - private static final long serialVersionUID = 0L; - // Use Kpi.newBuilder() to construct. - private Kpi(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Kpi() { - } + @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); + } + }; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Kpi(); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @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; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_Kpi_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.Kpi.class, monitoring.Monitoring.Kpi.Builder.class); + @java.lang.Override + public monitoring.Monitoring.AlarmID getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static final int KPI_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + public interface AlarmSubscriptionOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.AlarmSubscription) + com.google.protobuf.MessageOrBuilder { - public static final int TIMESTAMP_FIELD_NUMBER = 2; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 2; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 2; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .context.Timestamp timestamp = 2; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + boolean hasAlarmId(); - public static final int KPI_VALUE_FIELD_NUMBER = 3; - private monitoring.Monitoring.KpiValue kpiValue_; - /** - * .monitoring.KpiValue kpi_value = 3; - * @return Whether the kpiValue field is set. - */ - @java.lang.Override - public boolean hasKpiValue() { - return kpiValue_ != null; - } - /** - * .monitoring.KpiValue kpi_value = 3; - * @return The kpiValue. - */ - @java.lang.Override - public monitoring.Monitoring.KpiValue getKpiValue() { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - return getKpiValue(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + monitoring.Monitoring.AlarmID getAlarmId(); - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .monitoring.AlarmID alarm_id = 1; + */ + monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); - memoizedIsInitialized = 1; - return true; - } + /** + * float subscription_timeout_s = 2; + * @return The subscriptionTimeoutS. + */ + float getSubscriptionTimeoutS(); - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiId_ != null) { - output.writeMessage(1, getKpiId()); - } - if (timestamp_ != null) { - output.writeMessage(2, getTimestamp()); - } - if (kpiValue_ != null) { - output.writeMessage(3, getKpiValue()); - } - unknownFields.writeTo(output); + /** + * float subscription_frequency_ms = 3; + * @return The subscriptionFrequencyMs. + */ + float getSubscriptionFrequencyMs(); } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiId()); - } - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getTimestamp()); - } - if (kpiValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getKpiValue()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * Protobuf type {@code monitoring.AlarmSubscription} + */ + public static final class AlarmSubscription extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.AlarmSubscription) + AlarmSubscriptionOrBuilder { - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.Kpi)) { - return super.equals(obj); - } - monitoring.Monitoring.Kpi other = (monitoring.Monitoring.Kpi) obj; - - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (hasKpiValue() != other.hasKpiValue()) return false; - if (hasKpiValue()) { - if (!getKpiValue() - .equals(other.getKpiValue())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final long serialVersionUID = 0L; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - if (hasKpiValue()) { - hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getKpiValue().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + // Use AlarmSubscription.newBuilder() to construct. + private AlarmSubscription(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - public static monitoring.Monitoring.Kpi parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.Kpi parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.Kpi parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.Kpi parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.Kpi parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.Kpi parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.Kpi parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.Kpi parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.Kpi parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.Kpi parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.Kpi parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.Kpi parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private AlarmSubscription() { + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.Kpi prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AlarmSubscription(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.Kpi} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.Kpi) - monitoring.Monitoring.KpiOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_Kpi_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_Kpi_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.Kpi.class, monitoring.Monitoring.Kpi.Builder.class); - } - - // 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; - kpiIdBuilder_ = null; - } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_Kpi_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.Kpi getDefaultInstanceForType() { - return monitoring.Monitoring.Kpi.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.Kpi build() { - monitoring.Monitoring.Kpi result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.Kpi) { - return mergeFrom((monitoring.Monitoring.Kpi)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.Kpi other) { - if (other == monitoring.Monitoring.Kpi.getDefaultInstance()) return this; - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - if (other.hasKpiValue()) { - mergeKpiValue(other.getKpiValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.Kpi) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.KpiId kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - /** - * .monitoring.KpiId kpi_id = 1; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 1; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - } - /** - * .monitoring.KpiId kpi_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; - /** - * .context.Timestamp timestamp = 2; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 2; - * @return The timestamp. - */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - * .context.Timestamp timestamp = 2; - */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 2; - */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Timestamp timestamp = 2; - */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 2; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - * .context.Timestamp timestamp = 2; - */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .context.Timestamp timestamp = 2; - */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - * .context.Timestamp timestamp = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - - private monitoring.Monitoring.KpiValue kpiValue_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiValueBuilder_; - /** - * .monitoring.KpiValue kpi_value = 3; - * @return Whether the kpiValue field is set. - */ - public boolean hasKpiValue() { - return kpiValueBuilder_ != null || kpiValue_ != null; - } - /** - * .monitoring.KpiValue kpi_value = 3; - * @return The kpiValue. - */ - public monitoring.Monitoring.KpiValue getKpiValue() { - if (kpiValueBuilder_ == null) { - return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } else { - return kpiValueBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public Builder setKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiValue_ = value; - onChanged(); - } else { - kpiValueBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public Builder setKpiValue( - monitoring.Monitoring.KpiValue.Builder builderForValue) { - if (kpiValueBuilder_ == null) { - kpiValue_ = builderForValue.build(); - onChanged(); - } else { - kpiValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { - if (kpiValueBuilder_ == null) { - if (kpiValue_ != null) { - kpiValue_ = - monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); - } else { - kpiValue_ = value; - } - onChanged(); - } else { - kpiValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public Builder clearKpiValue() { - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - onChanged(); - } else { - kpiValue_ = null; - kpiValueBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { - - onChanged(); - return getKpiValueFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - if (kpiValueBuilder_ != null) { - return kpiValueBuilder_.getMessageOrBuilder(); - } else { - return kpiValue_ == null ? - monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; - } - } - /** - * .monitoring.KpiValue kpi_value = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> - getKpiValueFieldBuilder() { - if (kpiValueBuilder_ == null) { - kpiValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder>( - getKpiValue(), - getParentForChildren(), - isClean()); - kpiValue_ = null; - } - return kpiValueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.Kpi) - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - // @@protoc_insertion_point(class_scope:monitoring.Kpi) - private static final monitoring.Monitoring.Kpi DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.Kpi(); - } + 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 monitoring.Monitoring.Kpi getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_descriptor; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmSubscription.class, monitoring.Monitoring.AlarmSubscription.Builder.class); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static final int ALARM_ID_FIELD_NUMBER = 1; - @java.lang.Override - public monitoring.Monitoring.Kpi getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private monitoring.Monitoring.AlarmID alarmId_; - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + @java.lang.Override + public boolean hasAlarmId() { + return alarmId_ != null; + } - public interface KpiValueRangeOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiValueRange) - com.google.protobuf.MessageOrBuilder { + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + @java.lang.Override + public monitoring.Monitoring.AlarmID getAlarmId() { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } - /** - * .monitoring.KpiValue kpiMinValue = 1; - * @return Whether the kpiMinValue field is set. - */ - boolean hasKpiMinValue(); - /** - * .monitoring.KpiValue kpiMinValue = 1; - * @return The kpiMinValue. - */ - monitoring.Monitoring.KpiValue getKpiMinValue(); - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder(); + /** + * .monitoring.AlarmID alarm_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + return getAlarmId(); + } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - * @return Whether the kpiMaxValue field is set. - */ - boolean hasKpiMaxValue(); - /** - * .monitoring.KpiValue kpiMaxValue = 2; - * @return The kpiMaxValue. - */ - monitoring.Monitoring.KpiValue getKpiMaxValue(); - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder(); + public static final int SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER = 2; - /** - *
-     * by default True
-     * 
- * - * bool inRange = 3; - * @return The inRange. - */ - boolean getInRange(); + private float subscriptionTimeoutS_; - /** - *
-     * False is outside the interval
-     * 
- * - * bool includeMinValue = 4; - * @return The includeMinValue. - */ - boolean getIncludeMinValue(); + /** + * float subscription_timeout_s = 2; + * @return The subscriptionTimeoutS. + */ + @java.lang.Override + public float getSubscriptionTimeoutS() { + return subscriptionTimeoutS_; + } - /** - *
-     * False is outside the interval
-     * 
- * - * bool includeMaxValue = 5; - * @return The includeMaxValue. - */ - boolean getIncludeMaxValue(); - } - /** - * Protobuf type {@code monitoring.KpiValueRange} - */ - public static final class KpiValueRange extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiValueRange) - KpiValueRangeOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiValueRange.newBuilder() to construct. - private KpiValueRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiValueRange() { - } + public static final int SUBSCRIPTION_FREQUENCY_MS_FIELD_NUMBER = 3; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiValueRange(); - } + private float subscriptionFrequencyMs_; - @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; - } + /** + * float subscription_frequency_ms = 3; + * @return The subscriptionFrequencyMs. + */ + @java.lang.Override + public float getSubscriptionFrequencyMs() { + return subscriptionFrequencyMs_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiValueRange.class, monitoring.Monitoring.KpiValueRange.Builder.class); - } + private byte memoizedIsInitialized = -1; - public static final int KPIMINVALUE_FIELD_NUMBER = 1; - private monitoring.Monitoring.KpiValue kpiMinValue_; - /** - * .monitoring.KpiValue kpiMinValue = 1; - * @return Whether the kpiMinValue field is set. - */ - @java.lang.Override - public boolean hasKpiMinValue() { - return kpiMinValue_ != null; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - * @return The kpiMinValue. - */ - @java.lang.Override - public monitoring.Monitoring.KpiValue getKpiMinValue() { - return kpiMinValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder() { - return getKpiMinValue(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - public static final int KPIMAXVALUE_FIELD_NUMBER = 2; - private monitoring.Monitoring.KpiValue kpiMaxValue_; - /** - * .monitoring.KpiValue kpiMaxValue = 2; - * @return Whether the kpiMaxValue field is set. - */ - @java.lang.Override - public boolean hasKpiMaxValue() { - return kpiMaxValue_ != null; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - * @return The kpiMaxValue. - */ - @java.lang.Override - public monitoring.Monitoring.KpiValue getKpiMaxValue() { - return kpiMaxValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder() { - return getKpiMaxValue(); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (alarmId_ != null) { + output.writeMessage(1, getAlarmId()); + } + if (subscriptionTimeoutS_ != 0F) { + output.writeFloat(2, subscriptionTimeoutS_); + } + if (subscriptionFrequencyMs_ != 0F) { + output.writeFloat(3, subscriptionFrequencyMs_); + } + unknownFields.writeTo(output); + } - public static final int INRANGE_FIELD_NUMBER = 3; - private boolean inRange_; - /** - *
-     * by default True
-     * 
- * - * bool inRange = 3; - * @return The inRange. - */ - @java.lang.Override - public boolean getInRange() { - return inRange_; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (alarmId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId()); + } + if (subscriptionTimeoutS_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, subscriptionTimeoutS_); + } + if (subscriptionFrequencyMs_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, subscriptionFrequencyMs_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static final int INCLUDEMINVALUE_FIELD_NUMBER = 4; - private boolean includeMinValue_; - /** - *
-     * False is outside the interval
-     * 
- * - * bool includeMinValue = 4; - * @return The includeMinValue. - */ - @java.lang.Override - public boolean getIncludeMinValue() { - return includeMinValue_; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.AlarmSubscription)) { + return super.equals(obj); + } + monitoring.Monitoring.AlarmSubscription other = (monitoring.Monitoring.AlarmSubscription) obj; + if (hasAlarmId() != other.hasAlarmId()) + return false; + if (hasAlarmId()) { + if (!getAlarmId().equals(other.getAlarmId())) + return false; + } + if (java.lang.Float.floatToIntBits(getSubscriptionTimeoutS()) != java.lang.Float.floatToIntBits(other.getSubscriptionTimeoutS())) + return false; + if (java.lang.Float.floatToIntBits(getSubscriptionFrequencyMs()) != java.lang.Float.floatToIntBits(other.getSubscriptionFrequencyMs())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAlarmId()) { + hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; + hash = (53 * hash) + getAlarmId().hashCode(); + } + hash = (37 * hash) + SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } - public static final int INCLUDEMAXVALUE_FIELD_NUMBER = 5; - private boolean includeMaxValue_; - /** - *
-     * False is outside the interval
-     * 
- * - * bool includeMaxValue = 5; - * @return The includeMaxValue. - */ - @java.lang.Override - public boolean getIncludeMaxValue() { - return includeMaxValue_; - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static monitoring.Monitoring.AlarmSubscription parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (kpiMinValue_ != null) { - output.writeMessage(1, getKpiMinValue()); - } - if (kpiMaxValue_ != null) { - output.writeMessage(2, getKpiMaxValue()); - } - if (inRange_ != false) { - output.writeBool(3, inRange_); - } - if (includeMinValue_ != false) { - output.writeBool(4, includeMinValue_); - } - if (includeMaxValue_ != false) { - output.writeBool(5, includeMaxValue_); - } - unknownFields.writeTo(output); - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (kpiMinValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getKpiMinValue()); - } - if (kpiMaxValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getKpiMaxValue()); - } - if (inRange_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, inRange_); - } - if (includeMinValue_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, includeMinValue_); - } - if (includeMaxValue_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, includeMaxValue_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiValueRange)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiValueRange other = (monitoring.Monitoring.KpiValueRange) obj; - - if (hasKpiMinValue() != other.hasKpiMinValue()) return false; - if (hasKpiMinValue()) { - if (!getKpiMinValue() - .equals(other.getKpiMinValue())) return false; - } - if (hasKpiMaxValue() != other.hasKpiMaxValue()) return false; - if (hasKpiMaxValue()) { - if (!getKpiMaxValue() - .equals(other.getKpiMaxValue())) return false; - } - if (getInRange() - != other.getInRange()) return false; - if (getIncludeMinValue() - != other.getIncludeMinValue()) return false; - if (getIncludeMaxValue() - != other.getIncludeMaxValue()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasKpiMinValue()) { - hash = (37 * hash) + KPIMINVALUE_FIELD_NUMBER; - hash = (53 * hash) + getKpiMinValue().hashCode(); - } - if (hasKpiMaxValue()) { - hash = (37 * hash) + KPIMAXVALUE_FIELD_NUMBER; - hash = (53 * hash) + getKpiMaxValue().hashCode(); - } - hash = (37 * hash) + INRANGE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getInRange()); - hash = (37 * hash) + INCLUDEMINVALUE_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static monitoring.Monitoring.KpiValueRange parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiValueRange parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiValueRange parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiValueRange parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiValueRange parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiValueRange parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiValueRange prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static monitoring.Monitoring.AlarmSubscription parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiValueRange} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiValueRange) - monitoring.Monitoring.KpiValueRangeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiValueRange.class, monitoring.Monitoring.KpiValueRange.Builder.class); - } - - // 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; - kpiMinValueBuilder_ = null; - } - if (kpiMaxValueBuilder_ == null) { - kpiMaxValue_ = null; - } else { - kpiMaxValue_ = null; - kpiMaxValueBuilder_ = null; - } - inRange_ = false; - - includeMinValue_ = false; - - includeMaxValue_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiValueRange getDefaultInstanceForType() { - return monitoring.Monitoring.KpiValueRange.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiValueRange build() { - monitoring.Monitoring.KpiValueRange result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiValueRange) { - return mergeFrom((monitoring.Monitoring.KpiValueRange)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiValueRange other) { - if (other == monitoring.Monitoring.KpiValueRange.getDefaultInstance()) return this; - if (other.hasKpiMinValue()) { - mergeKpiMinValue(other.getKpiMinValue()); - } - if (other.hasKpiMaxValue()) { - mergeKpiMaxValue(other.getKpiMaxValue()); - } - if (other.getInRange() != false) { - setInRange(other.getInRange()); - } - if (other.getIncludeMinValue() != false) { - setIncludeMinValue(other.getIncludeMinValue()); - } - if (other.getIncludeMaxValue() != false) { - setIncludeMaxValue(other.getIncludeMaxValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiValueRange) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.KpiValue kpiMinValue_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiMinValueBuilder_; - /** - * .monitoring.KpiValue kpiMinValue = 1; - * @return Whether the kpiMinValue field is set. - */ - public boolean hasKpiMinValue() { - return kpiMinValueBuilder_ != null || kpiMinValue_ != null; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - * @return The kpiMinValue. - */ - public monitoring.Monitoring.KpiValue getKpiMinValue() { - if (kpiMinValueBuilder_ == null) { - return kpiMinValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; - } else { - return kpiMinValueBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - public Builder setKpiMinValue(monitoring.Monitoring.KpiValue value) { - if (kpiMinValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiMinValue_ = value; - onChanged(); - } else { - kpiMinValueBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - public Builder setKpiMinValue( - monitoring.Monitoring.KpiValue.Builder builderForValue) { - if (kpiMinValueBuilder_ == null) { - kpiMinValue_ = builderForValue.build(); - onChanged(); - } else { - kpiMinValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - public Builder mergeKpiMinValue(monitoring.Monitoring.KpiValue value) { - if (kpiMinValueBuilder_ == null) { - if (kpiMinValue_ != null) { - kpiMinValue_ = - monitoring.Monitoring.KpiValue.newBuilder(kpiMinValue_).mergeFrom(value).buildPartial(); - } else { - kpiMinValue_ = value; - } - onChanged(); - } else { - kpiMinValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - public Builder clearKpiMinValue() { - if (kpiMinValueBuilder_ == null) { - kpiMinValue_ = null; - onChanged(); - } else { - kpiMinValue_ = null; - kpiMinValueBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - public monitoring.Monitoring.KpiValue.Builder getKpiMinValueBuilder() { - - onChanged(); - return getKpiMinValueFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - public monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder() { - if (kpiMinValueBuilder_ != null) { - return kpiMinValueBuilder_.getMessageOrBuilder(); - } else { - return kpiMinValue_ == null ? - monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; - } - } - /** - * .monitoring.KpiValue kpiMinValue = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> - getKpiMinValueFieldBuilder() { - if (kpiMinValueBuilder_ == null) { - kpiMinValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder>( - getKpiMinValue(), - getParentForChildren(), - isClean()); - kpiMinValue_ = null; - } - return kpiMinValueBuilder_; - } - - private monitoring.Monitoring.KpiValue kpiMaxValue_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiMaxValueBuilder_; - /** - * .monitoring.KpiValue kpiMaxValue = 2; - * @return Whether the kpiMaxValue field is set. - */ - public boolean hasKpiMaxValue() { - return kpiMaxValueBuilder_ != null || kpiMaxValue_ != null; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - * @return The kpiMaxValue. - */ - public monitoring.Monitoring.KpiValue getKpiMaxValue() { - if (kpiMaxValueBuilder_ == null) { - return kpiMaxValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; - } else { - return kpiMaxValueBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - public Builder setKpiMaxValue(monitoring.Monitoring.KpiValue value) { - if (kpiMaxValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiMaxValue_ = value; - onChanged(); - } else { - kpiMaxValueBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - public Builder setKpiMaxValue( - monitoring.Monitoring.KpiValue.Builder builderForValue) { - if (kpiMaxValueBuilder_ == null) { - kpiMaxValue_ = builderForValue.build(); - onChanged(); - } else { - kpiMaxValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - public Builder mergeKpiMaxValue(monitoring.Monitoring.KpiValue value) { - if (kpiMaxValueBuilder_ == null) { - if (kpiMaxValue_ != null) { - kpiMaxValue_ = - monitoring.Monitoring.KpiValue.newBuilder(kpiMaxValue_).mergeFrom(value).buildPartial(); - } else { - kpiMaxValue_ = value; - } - onChanged(); - } else { - kpiMaxValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - public Builder clearKpiMaxValue() { - if (kpiMaxValueBuilder_ == null) { - kpiMaxValue_ = null; - onChanged(); - } else { - kpiMaxValue_ = null; - kpiMaxValueBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - public monitoring.Monitoring.KpiValue.Builder getKpiMaxValueBuilder() { - - onChanged(); - return getKpiMaxValueFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - public monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder() { - if (kpiMaxValueBuilder_ != null) { - return kpiMaxValueBuilder_.getMessageOrBuilder(); - } else { - return kpiMaxValue_ == null ? - monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; - } - } - /** - * .monitoring.KpiValue kpiMaxValue = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> - getKpiMaxValueFieldBuilder() { - if (kpiMaxValueBuilder_ == null) { - kpiMaxValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder>( - getKpiMaxValue(), - getParentForChildren(), - isClean()); - kpiMaxValue_ = null; - } - return kpiMaxValueBuilder_; - } - - private boolean inRange_ ; - /** - *
-       * by default True
-       * 
- * - * bool inRange = 3; - * @return The inRange. - */ - @java.lang.Override - public boolean getInRange() { - return inRange_; - } - /** - *
-       * by default True
-       * 
- * - * bool inRange = 3; - * @param value The inRange to set. - * @return This builder for chaining. - */ - public Builder setInRange(boolean value) { - - inRange_ = value; - onChanged(); - return this; - } - /** - *
-       * by default True
-       * 
- * - * bool inRange = 3; - * @return This builder for chaining. - */ - public Builder clearInRange() { - - inRange_ = false; - onChanged(); - return this; - } - - private boolean includeMinValue_ ; - /** - *
-       * False is outside the interval
-       * 
- * - * bool includeMinValue = 4; - * @return The includeMinValue. - */ - @java.lang.Override - public boolean getIncludeMinValue() { - return includeMinValue_; - } - /** - *
-       * False is outside the interval
-       * 
- * - * bool includeMinValue = 4; - * @param value The includeMinValue to set. - * @return This builder for chaining. - */ - public Builder setIncludeMinValue(boolean value) { - - includeMinValue_ = value; - onChanged(); - return this; - } - /** - *
-       * False is outside the interval
-       * 
- * - * bool includeMinValue = 4; - * @return This builder for chaining. - */ - public Builder clearIncludeMinValue() { - - includeMinValue_ = false; - onChanged(); - return this; - } - - private boolean includeMaxValue_ ; - /** - *
-       * False is outside the interval
-       * 
- * - * bool includeMaxValue = 5; - * @return The includeMaxValue. - */ - @java.lang.Override - public boolean getIncludeMaxValue() { - return includeMaxValue_; - } - /** - *
-       * False is outside the interval
-       * 
- * - * bool includeMaxValue = 5; - * @param value The includeMaxValue to set. - * @return This builder for chaining. - */ - public Builder setIncludeMaxValue(boolean value) { - - includeMaxValue_ = value; - onChanged(); - return this; - } - /** - *
-       * False is outside the interval
-       * 
- * - * bool includeMaxValue = 5; - * @return This builder for chaining. - */ - public Builder clearIncludeMaxValue() { - - includeMaxValue_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiValueRange) - } + public static monitoring.Monitoring.AlarmSubscription parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:monitoring.KpiValueRange) - private static final monitoring.Monitoring.KpiValueRange DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiValueRange(); - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - public static monitoring.Monitoring.KpiValueRange getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static monitoring.Monitoring.AlarmSubscription parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public monitoring.Monitoring.KpiValueRange getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static Builder newBuilder(monitoring.Monitoring.AlarmSubscription prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public interface KpiValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiValue) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * int32 int32Val = 1; - * @return Whether the int32Val field is set. - */ - boolean hasInt32Val(); - /** - * int32 int32Val = 1; - * @return The int32Val. - */ - int getInt32Val(); + /** + * Protobuf type {@code monitoring.AlarmSubscription} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.AlarmSubscription) + monitoring.Monitoring.AlarmSubscriptionOrBuilder { - /** - * uint32 uint32Val = 2; - * @return Whether the uint32Val field is set. - */ - boolean hasUint32Val(); - /** - * uint32 uint32Val = 2; - * @return The uint32Val. - */ - int getUint32Val(); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_descriptor; + } - /** - * int64 int64Val = 3; - * @return Whether the int64Val field is set. - */ - boolean hasInt64Val(); - /** - * int64 int64Val = 3; - * @return The int64Val. - */ - long getInt64Val(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmSubscription.class, monitoring.Monitoring.AlarmSubscription.Builder.class); + } - /** - * uint64 uint64Val = 4; - * @return Whether the uint64Val field is set. - */ - boolean hasUint64Val(); - /** - * uint64 uint64Val = 4; - * @return The uint64Val. - */ - long getUint64Val(); + // Construct using monitoring.Monitoring.AlarmSubscription.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - /** - * float floatVal = 5; - * @return Whether the floatVal field is set. - */ - boolean hasFloatVal(); - /** - * float floatVal = 5; - * @return The floatVal. - */ - float getFloatVal(); + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - /** - * string stringVal = 6; - * @return Whether the stringVal field is set. - */ - boolean hasStringVal(); - /** - * string stringVal = 6; - * @return The stringVal. - */ - java.lang.String getStringVal(); - /** - * string stringVal = 6; - * @return The bytes for stringVal. - */ - com.google.protobuf.ByteString - getStringValBytes(); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - /** - * bool boolVal = 7; - * @return Whether the boolVal field is set. - */ - boolean hasBoolVal(); - /** - * bool boolVal = 7; - * @return The boolVal. - */ - boolean getBoolVal(); - - public monitoring.Monitoring.KpiValue.ValueCase getValueCase(); - } - /** - * Protobuf type {@code monitoring.KpiValue} - */ - public static final class KpiValue extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiValue) - KpiValueOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiValue.newBuilder() to construct. - private KpiValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiValue() { - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (alarmIdBuilder_ == null) { + alarmId_ = null; + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + subscriptionTimeoutS_ = 0F; + subscriptionFrequencyMs_ = 0F; + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiValue(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_descriptor; + } - @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; - } + @java.lang.Override + public monitoring.Monitoring.AlarmSubscription getDefaultInstanceForType() { + return monitoring.Monitoring.AlarmSubscription.getDefaultInstance(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiValue.class, monitoring.Monitoring.KpiValue.Builder.class); - } + @java.lang.Override + public monitoring.Monitoring.AlarmSubscription build() { + monitoring.Monitoring.AlarmSubscription result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private int valueCase_ = 0; - private java.lang.Object value_; - public enum ValueCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - INT32VAL(1), - UINT32VAL(2), - INT64VAL(3), - UINT64VAL(4), - FLOATVAL(5), - STRINGVAL(6), - BOOLVAL(7), - VALUE_NOT_SET(0); - private final int value; - private ValueCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValueCase valueOf(int value) { - return forNumber(value); - } - - public static ValueCase forNumber(int value) { - switch (value) { - case 1: return INT32VAL; - case 2: return UINT32VAL; - case 3: return INT64VAL; - case 4: return UINT64VAL; - case 5: return FLOATVAL; - case 6: return STRINGVAL; - case 7: return BOOLVAL; - case 0: return VALUE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ValueCase - getValueCase() { - return ValueCase.forNumber( - valueCase_); - } + @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(); + } + result.subscriptionTimeoutS_ = subscriptionTimeoutS_; + result.subscriptionFrequencyMs_ = subscriptionFrequencyMs_; + onBuilt(); + return result; + } - public static final int INT32VAL_FIELD_NUMBER = 1; - /** - * int32 int32Val = 1; - * @return Whether the int32Val field is set. - */ - @java.lang.Override - public boolean hasInt32Val() { - return valueCase_ == 1; - } - /** - * int32 int32Val = 1; - * @return The int32Val. - */ - @java.lang.Override - public int getInt32Val() { - if (valueCase_ == 1) { - return (java.lang.Integer) value_; - } - return 0; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public static final int UINT32VAL_FIELD_NUMBER = 2; - /** - * uint32 uint32Val = 2; - * @return Whether the uint32Val field is set. - */ - @java.lang.Override - public boolean hasUint32Val() { - return valueCase_ == 2; - } - /** - * uint32 uint32Val = 2; - * @return The uint32Val. - */ - @java.lang.Override - public int getUint32Val() { - if (valueCase_ == 2) { - return (java.lang.Integer) value_; - } - return 0; - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static final int INT64VAL_FIELD_NUMBER = 3; - /** - * int64 int64Val = 3; - * @return Whether the int64Val field is set. - */ - @java.lang.Override - public boolean hasInt64Val() { - return valueCase_ == 3; - } - /** - * int64 int64Val = 3; - * @return The int64Val. - */ - @java.lang.Override - public long getInt64Val() { - if (valueCase_ == 3) { - return (java.lang.Long) value_; - } - return 0L; - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static final int UINT64VAL_FIELD_NUMBER = 4; - /** - * uint64 uint64Val = 4; - * @return Whether the uint64Val field is set. - */ - @java.lang.Override - public boolean hasUint64Val() { - return valueCase_ == 4; - } - /** - * uint64 uint64Val = 4; - * @return The uint64Val. - */ - @java.lang.Override - public long getUint64Val() { - if (valueCase_ == 4) { - return (java.lang.Long) value_; - } - return 0L; - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - public static final int FLOATVAL_FIELD_NUMBER = 5; - /** - * float floatVal = 5; - * @return Whether the floatVal field is set. - */ - @java.lang.Override - public boolean hasFloatVal() { - return valueCase_ == 5; - } - /** - * float floatVal = 5; - * @return The floatVal. - */ - @java.lang.Override - public float getFloatVal() { - if (valueCase_ == 5) { - return (java.lang.Float) value_; - } - return 0F; - } + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - public static final int STRINGVAL_FIELD_NUMBER = 6; - /** - * string stringVal = 6; - * @return Whether the stringVal field is set. - */ - public boolean hasStringVal() { - return valueCase_ == 6; - } - /** - * string stringVal = 6; - * @return The stringVal. - */ - public java.lang.String getStringVal() { - java.lang.Object ref = ""; - if (valueCase_ == 6) { - ref = value_; - } - 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(); - if (valueCase_ == 6) { - value_ = s; - } - return s; - } - } - /** - * string stringVal = 6; - * @return The bytes for stringVal. - */ - public com.google.protobuf.ByteString - getStringValBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 6) { - ref = value_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valueCase_ == 6) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - public static final int BOOLVAL_FIELD_NUMBER = 7; - /** - * bool boolVal = 7; - * @return Whether the boolVal field is set. - */ - @java.lang.Override - public boolean hasBoolVal() { - return valueCase_ == 7; - } - /** - * bool boolVal = 7; - * @return The boolVal. - */ - @java.lang.Override - public boolean getBoolVal() { - if (valueCase_ == 7) { - return (java.lang.Boolean) value_; - } - return false; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.AlarmSubscription) { + return mergeFrom((monitoring.Monitoring.AlarmSubscription) other); + } else { + super.mergeFrom(other); + return this; + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public Builder mergeFrom(monitoring.Monitoring.AlarmSubscription other) { + if (other == monitoring.Monitoring.AlarmSubscription.getDefaultInstance()) + return this; + if (other.hasAlarmId()) { + mergeAlarmId(other.getAlarmId()); + } + if (other.getSubscriptionTimeoutS() != 0F) { + setSubscriptionTimeoutS(other.getSubscriptionTimeoutS()); + } + if (other.getSubscriptionFrequencyMs() != 0F) { + setSubscriptionFrequencyMs(other.getSubscriptionFrequencyMs()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (valueCase_ == 1) { - output.writeInt32( - 1, (int)((java.lang.Integer) value_)); - } - if (valueCase_ == 2) { - output.writeUInt32( - 2, (int)((java.lang.Integer) value_)); - } - if (valueCase_ == 3) { - output.writeInt64( - 3, (long)((java.lang.Long) value_)); - } - if (valueCase_ == 4) { - output.writeUInt64( - 4, (long)((java.lang.Long) value_)); - } - if (valueCase_ == 5) { - output.writeFloat( - 5, (float)((java.lang.Float) value_)); - } - if (valueCase_ == 6) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, value_); - } - if (valueCase_ == 7) { - output.writeBool( - 7, (boolean)((java.lang.Boolean) value_)); - } - unknownFields.writeTo(output); - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.AlarmSubscription) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (valueCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 1, (int)((java.lang.Integer) value_)); - } - if (valueCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size( - 2, (int)((java.lang.Integer) value_)); - } - if (valueCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size( - 3, (long)((java.lang.Long) value_)); - } - if (valueCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size( - 4, (long)((java.lang.Long) value_)); - } - if (valueCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize( - 5, (float)((java.lang.Float) value_)); - } - if (valueCase_ == 6) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, value_); - } - if (valueCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 7, (boolean)((java.lang.Boolean) value_)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private monitoring.Monitoring.AlarmID alarmId_; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiValue)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiValue other = (monitoring.Monitoring.KpiValue) obj; - - if (!getValueCase().equals(other.getValueCase())) return false; - switch (valueCase_) { - case 1: - if (getInt32Val() - != other.getInt32Val()) return false; - break; - case 2: - if (getUint32Val() - != other.getUint32Val()) return false; - break; - case 3: - if (getInt64Val() - != other.getInt64Val()) return false; - break; - case 4: - if (getUint64Val() - != other.getUint64Val()) return false; - break; - case 5: - if (java.lang.Float.floatToIntBits(getFloatVal()) - != java.lang.Float.floatToIntBits( - other.getFloatVal())) return false; - break; - case 6: - if (!getStringVal() - .equals(other.getStringVal())) return false; - break; - case 7: - if (getBoolVal() - != other.getBoolVal()) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private com.google.protobuf.SingleFieldBuilderV3 alarmIdBuilder_; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (valueCase_) { - case 1: - hash = (37 * hash) + INT32VAL_FIELD_NUMBER; - hash = (53 * hash) + getInt32Val(); - break; - case 2: - hash = (37 * hash) + UINT32VAL_FIELD_NUMBER; - hash = (53 * hash) + getUint32Val(); - break; - case 3: - hash = (37 * hash) + INT64VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getInt64Val()); - break; - case 4: - hash = (37 * hash) + UINT64VAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getUint64Val()); - break; - case 5: - hash = (37 * hash) + FLOATVAL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getFloatVal()); - break; - case 6: - hash = (37 * hash) + STRINGVAL_FIELD_NUMBER; - hash = (53 * hash) + getStringVal().hashCode(); - break; - case 7: - hash = (37 * hash) + BOOLVAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getBoolVal()); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + public boolean hasAlarmId() { + return alarmIdBuilder_ != null || alarmId_ != null; + } - public static monitoring.Monitoring.KpiValue parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiValue parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiValue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiValue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiValue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiValue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiValue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiValue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiValue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiValue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiValue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiValue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + public monitoring.Monitoring.AlarmID getAlarmId() { + if (alarmIdBuilder_ == null) { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } else { + return alarmIdBuilder_.getMessage(); + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiValue prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + alarmId_ = value; + onChanged(); + } else { + alarmIdBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiValue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiValue) - monitoring.Monitoring.KpiValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiValue_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiValue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiValue.class, monitoring.Monitoring.KpiValue.Builder.class); - } - - // 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(); - valueCase_ = 0; - value_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiValue_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiValue getDefaultInstanceForType() { - return monitoring.Monitoring.KpiValue.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiValue build() { - monitoring.Monitoring.KpiValue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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 (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_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiValue) { - return mergeFrom((monitoring.Monitoring.KpiValue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiValue other) { - if (other == monitoring.Monitoring.KpiValue.getDefaultInstance()) return this; - switch (other.getValueCase()) { - case INT32VAL: { - setInt32Val(other.getInt32Val()); - break; - } - case UINT32VAL: { - setUint32Val(other.getUint32Val()); - break; - } - case INT64VAL: { - setInt64Val(other.getInt64Val()); - break; - } - case UINT64VAL: { - setUint64Val(other.getUint64Val()); - break; - } - case FLOATVAL: { - setFloatVal(other.getFloatVal()); - break; - } - case STRINGVAL: { - valueCase_ = 6; - value_ = other.value_; - onChanged(); - break; - } - case BOOLVAL: { - setBoolVal(other.getBoolVal()); - break; - } - case VALUE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiValue) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int valueCase_ = 0; - private java.lang.Object value_; - public ValueCase - getValueCase() { - return ValueCase.forNumber( - valueCase_); - } - - public Builder clearValue() { - valueCase_ = 0; - value_ = null; - onChanged(); - return this; - } - - - /** - * int32 int32Val = 1; - * @return Whether the int32Val field is set. - */ - public boolean hasInt32Val() { - return valueCase_ == 1; - } - /** - * int32 int32Val = 1; - * @return The int32Val. - */ - public int getInt32Val() { - if (valueCase_ == 1) { - return (java.lang.Integer) value_; - } - return 0; - } - /** - * int32 int32Val = 1; - * @param value The int32Val to set. - * @return This builder for chaining. - */ - public Builder setInt32Val(int value) { - valueCase_ = 1; - value_ = value; - onChanged(); - return this; - } - /** - * int32 int32Val = 1; - * @return This builder for chaining. - */ - public Builder clearInt32Val() { - if (valueCase_ == 1) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * uint32 uint32Val = 2; - * @return Whether the uint32Val field is set. - */ - public boolean hasUint32Val() { - return valueCase_ == 2; - } - /** - * uint32 uint32Val = 2; - * @return The uint32Val. - */ - public int getUint32Val() { - if (valueCase_ == 2) { - return (java.lang.Integer) value_; - } - return 0; - } - /** - * uint32 uint32Val = 2; - * @param value The uint32Val to set. - * @return This builder for chaining. - */ - public Builder setUint32Val(int value) { - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - /** - * uint32 uint32Val = 2; - * @return This builder for chaining. - */ - public Builder clearUint32Val() { - if (valueCase_ == 2) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * int64 int64Val = 3; - * @return Whether the int64Val field is set. - */ - public boolean hasInt64Val() { - return valueCase_ == 3; - } - /** - * int64 int64Val = 3; - * @return The int64Val. - */ - public long getInt64Val() { - if (valueCase_ == 3) { - return (java.lang.Long) value_; - } - return 0L; - } - /** - * int64 int64Val = 3; - * @param value The int64Val to set. - * @return This builder for chaining. - */ - public Builder setInt64Val(long value) { - valueCase_ = 3; - value_ = value; - onChanged(); - return this; - } - /** - * int64 int64Val = 3; - * @return This builder for chaining. - */ - public Builder clearInt64Val() { - if (valueCase_ == 3) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * uint64 uint64Val = 4; - * @return Whether the uint64Val field is set. - */ - public boolean hasUint64Val() { - return valueCase_ == 4; - } - /** - * uint64 uint64Val = 4; - * @return The uint64Val. - */ - public long getUint64Val() { - if (valueCase_ == 4) { - return (java.lang.Long) value_; - } - return 0L; - } - /** - * uint64 uint64Val = 4; - * @param value The uint64Val to set. - * @return This builder for chaining. - */ - public Builder setUint64Val(long value) { - valueCase_ = 4; - value_ = value; - onChanged(); - return this; - } - /** - * uint64 uint64Val = 4; - * @return This builder for chaining. - */ - public Builder clearUint64Val() { - if (valueCase_ == 4) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * float floatVal = 5; - * @return Whether the floatVal field is set. - */ - public boolean hasFloatVal() { - return valueCase_ == 5; - } - /** - * float floatVal = 5; - * @return The floatVal. - */ - public float getFloatVal() { - if (valueCase_ == 5) { - return (java.lang.Float) value_; - } - return 0F; - } - /** - * float floatVal = 5; - * @param value The floatVal to set. - * @return This builder for chaining. - */ - public Builder setFloatVal(float value) { - valueCase_ = 5; - value_ = value; - onChanged(); - return this; - } - /** - * float floatVal = 5; - * @return This builder for chaining. - */ - public Builder clearFloatVal() { - if (valueCase_ == 5) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - * string stringVal = 6; - * @return Whether the stringVal field is set. - */ - @java.lang.Override - public boolean hasStringVal() { - return valueCase_ == 6; - } - /** - * string stringVal = 6; - * @return The stringVal. - */ - @java.lang.Override - public java.lang.String getStringVal() { - java.lang.Object ref = ""; - if (valueCase_ == 6) { - ref = value_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (valueCase_ == 6) { - value_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string stringVal = 6; - * @return The bytes for stringVal. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStringValBytes() { - java.lang.Object ref = ""; - if (valueCase_ == 6) { - ref = value_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (valueCase_ == 6) { - value_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string stringVal = 6; - * @param value The stringVal to set. - * @return This builder for chaining. - */ - public Builder setStringVal( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - valueCase_ = 6; - value_ = value; - onChanged(); - return this; - } - /** - * string stringVal = 6; - * @return This builder for chaining. - */ - public Builder clearStringVal() { - if (valueCase_ == 6) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - /** - * string stringVal = 6; - * @param value The bytes for stringVal to set. - * @return This builder for chaining. - */ - public Builder setStringValBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - valueCase_ = 6; - value_ = value; - onChanged(); - return this; - } - - /** - * bool boolVal = 7; - * @return Whether the boolVal field is set. - */ - public boolean hasBoolVal() { - return valueCase_ == 7; - } - /** - * bool boolVal = 7; - * @return The boolVal. - */ - public boolean getBoolVal() { - if (valueCase_ == 7) { - return (java.lang.Boolean) value_; - } - return false; - } - /** - * bool boolVal = 7; - * @param value The boolVal to set. - * @return This builder for chaining. - */ - public Builder setBoolVal(boolean value) { - valueCase_ = 7; - value_ = value; - onChanged(); - return this; - } - /** - * bool boolVal = 7; - * @return This builder for chaining. - */ - public Builder clearBoolVal() { - if (valueCase_ == 7) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiValue) - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder setAlarmId(monitoring.Monitoring.AlarmID.Builder builderForValue) { + if (alarmIdBuilder_ == null) { + alarmId_ = builderForValue.build(); + onChanged(); + } else { + alarmIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - // @@protoc_insertion_point(class_scope:monitoring.KpiValue) - private static final monitoring.Monitoring.KpiValue DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiValue(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (alarmId_ != null) { + alarmId_ = monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); + } else { + alarmId_ = value; + } + onChanged(); + } else { + alarmIdBuilder_.mergeFrom(value); + } + return this; + } - public static monitoring.Monitoring.KpiValue getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder clearAlarmId() { + if (alarmIdBuilder_ == null) { + alarmId_ = null; + onChanged(); + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { + onChanged(); + return getAlarmIdFieldBuilder().getBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + if (alarmIdBuilder_ != null) { + return alarmIdBuilder_.getMessageOrBuilder(); + } else { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } + } - @java.lang.Override - public monitoring.Monitoring.KpiValue getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getAlarmIdFieldBuilder() { + if (alarmIdBuilder_ == null) { + alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getAlarmId(), getParentForChildren(), isClean()); + alarmId_ = null; + } + return alarmIdBuilder_; + } - } + private float subscriptionTimeoutS_; - public interface KpiListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiList) - com.google.protobuf.MessageOrBuilder { + /** + * float subscription_timeout_s = 2; + * @return The subscriptionTimeoutS. + */ + @java.lang.Override + public float getSubscriptionTimeoutS() { + return subscriptionTimeoutS_; + } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - java.util.List - getKpiList(); - /** - * repeated .monitoring.Kpi kpi = 1; - */ - monitoring.Monitoring.Kpi getKpi(int index); - /** - * repeated .monitoring.Kpi kpi = 1; - */ - int getKpiCount(); - /** - * repeated .monitoring.Kpi kpi = 1; - */ - java.util.List - getKpiOrBuilderList(); - /** - * repeated .monitoring.Kpi kpi = 1; - */ - monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder( - int index); - } - /** - * Protobuf type {@code monitoring.KpiList} - */ - public static final class KpiList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiList) - KpiListOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiList.newBuilder() to construct. - private KpiList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiList() { - kpi_ = java.util.Collections.emptyList(); - } + /** + * float subscription_timeout_s = 2; + * @param value The subscriptionTimeoutS to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionTimeoutS(float value) { + subscriptionTimeoutS_ = value; + onChanged(); + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiList(); - } + /** + * float subscription_timeout_s = 2; + * @return This builder for chaining. + */ + public Builder clearSubscriptionTimeoutS() { + subscriptionTimeoutS_ = 0F; + onChanged(); + return this; + } - @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(); - 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; - } + private float subscriptionFrequencyMs_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiList.class, monitoring.Monitoring.KpiList.Builder.class); - } + /** + * float subscription_frequency_ms = 3; + * @return The subscriptionFrequencyMs. + */ + @java.lang.Override + public float getSubscriptionFrequencyMs() { + return subscriptionFrequencyMs_; + } - public static final int KPI_FIELD_NUMBER = 1; - private java.util.List kpi_; - /** - * repeated .monitoring.Kpi kpi = 1; - */ - @java.lang.Override - public java.util.List getKpiList() { - return kpi_; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - @java.lang.Override - public java.util.List - getKpiOrBuilderList() { - return kpi_; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - @java.lang.Override - public int getKpiCount() { - return kpi_.size(); - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - @java.lang.Override - public monitoring.Monitoring.Kpi getKpi(int index) { - return kpi_.get(index); - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder( - int index) { - return kpi_.get(index); - } + /** + * float subscription_frequency_ms = 3; + * @param value The subscriptionFrequencyMs to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionFrequencyMs(float value) { + subscriptionFrequencyMs_ = value; + onChanged(); + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * float subscription_frequency_ms = 3; + * @return This builder for chaining. + */ + public Builder clearSubscriptionFrequencyMs() { + subscriptionFrequencyMs_ = 0F; + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < kpi_.size(); i++) { - output.writeMessage(1, kpi_.get(i)); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.AlarmSubscription) + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < kpi_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, kpi_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + // @@protoc_insertion_point(class_scope:monitoring.AlarmSubscription) + private static final monitoring.Monitoring.AlarmSubscription DEFAULT_INSTANCE; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiList)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiList other = (monitoring.Monitoring.KpiList) obj; - - if (!getKpiList() - .equals(other.getKpiList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmSubscription(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getKpiCount() > 0) { - hash = (37 * hash) + KPI_FIELD_NUMBER; - hash = (53 * hash) + getKpiList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static monitoring.Monitoring.AlarmSubscription getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static monitoring.Monitoring.KpiList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @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); + } + }; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiList) - monitoring.Monitoring.KpiListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiList.class, monitoring.Monitoring.KpiList.Builder.class); - } - - // 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(); - if (kpiBuilder_ == null) { - kpi_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - kpiBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiList_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiList getDefaultInstanceForType() { - return monitoring.Monitoring.KpiList.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiList build() { - monitoring.Monitoring.KpiList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public monitoring.Monitoring.KpiList buildPartial() { - monitoring.Monitoring.KpiList result = new monitoring.Monitoring.KpiList(this); - int from_bitField0_ = bitField0_; - if (kpiBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpi_ = java.util.Collections.unmodifiableList(kpi_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.kpi_ = kpi_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiList) { - return mergeFrom((monitoring.Monitoring.KpiList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiList other) { - if (other == monitoring.Monitoring.KpiList.getDefaultInstance()) return this; - if (kpiBuilder_ == null) { - if (!other.kpi_.isEmpty()) { - if (kpi_.isEmpty()) { - kpi_ = other.kpi_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiIsMutable(); - kpi_.addAll(other.kpi_); - } - onChanged(); - } - } else { - if (!other.kpi_.isEmpty()) { - if (kpiBuilder_.isEmpty()) { - kpiBuilder_.dispose(); - kpiBuilder_ = null; - kpi_ = other.kpi_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiFieldBuilder() : null; - } else { - kpiBuilder_.addAllMessages(other.kpi_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List kpi_ = - java.util.Collections.emptyList(); - private void ensureKpiIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpi_ = new java.util.ArrayList(kpi_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder> kpiBuilder_; - - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public java.util.List getKpiList() { - if (kpiBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpi_); - } else { - return kpiBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public int getKpiCount() { - if (kpiBuilder_ == null) { - return kpi_.size(); - } else { - return kpiBuilder_.getCount(); - } - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public monitoring.Monitoring.Kpi getKpi(int index) { - if (kpiBuilder_ == null) { - return kpi_.get(index); - } else { - return kpiBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder setKpi( - int index, monitoring.Monitoring.Kpi value) { - if (kpiBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIsMutable(); - kpi_.set(index, value); - onChanged(); - } else { - kpiBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder setKpi( - int index, monitoring.Monitoring.Kpi.Builder builderForValue) { - if (kpiBuilder_ == null) { - ensureKpiIsMutable(); - kpi_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder addKpi(monitoring.Monitoring.Kpi value) { - if (kpiBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIsMutable(); - kpi_.add(value); - onChanged(); - } else { - kpiBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder addKpi( - int index, monitoring.Monitoring.Kpi value) { - if (kpiBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiIsMutable(); - kpi_.add(index, value); - onChanged(); - } else { - kpiBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder addKpi( - monitoring.Monitoring.Kpi.Builder builderForValue) { - if (kpiBuilder_ == null) { - ensureKpiIsMutable(); - kpi_.add(builderForValue.build()); - onChanged(); - } else { - kpiBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder addKpi( - int index, monitoring.Monitoring.Kpi.Builder builderForValue) { - if (kpiBuilder_ == null) { - ensureKpiIsMutable(); - kpi_.add(index, builderForValue.build()); - onChanged(); - } else { - kpiBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder addAllKpi( - java.lang.Iterable values) { - if (kpiBuilder_ == null) { - ensureKpiIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpi_); - onChanged(); - } else { - kpiBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder clearKpi() { - if (kpiBuilder_ == null) { - kpi_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public Builder removeKpi(int index) { - if (kpiBuilder_ == null) { - ensureKpiIsMutable(); - kpi_.remove(index); - onChanged(); - } else { - kpiBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public monitoring.Monitoring.Kpi.Builder getKpiBuilder( - int index) { - return getKpiFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public monitoring.Monitoring.KpiOrBuilder getKpiOrBuilder( - int index) { - if (kpiBuilder_ == null) { - return kpi_.get(index); } else { - return kpiBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public java.util.List - getKpiOrBuilderList() { - if (kpiBuilder_ != null) { - return kpiBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(kpi_); - } - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public monitoring.Monitoring.Kpi.Builder addKpiBuilder() { - return getKpiFieldBuilder().addBuilder( - monitoring.Monitoring.Kpi.getDefaultInstance()); - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public monitoring.Monitoring.Kpi.Builder addKpiBuilder( - int index) { - return getKpiFieldBuilder().addBuilder( - index, monitoring.Monitoring.Kpi.getDefaultInstance()); - } - /** - * repeated .monitoring.Kpi kpi = 1; - */ - public java.util.List - getKpiBuilderList() { - return getKpiFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder> - getKpiFieldBuilder() { - if (kpiBuilder_ == null) { - kpiBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.Kpi, monitoring.Monitoring.Kpi.Builder, monitoring.Monitoring.KpiOrBuilder>( - kpi_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - kpi_ = null; - } - return kpiBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiList) - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - // @@protoc_insertion_point(class_scope:monitoring.KpiList) - private static final monitoring.Monitoring.KpiList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiList(); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static monitoring.Monitoring.KpiList getDefaultInstance() { - return DEFAULT_INSTANCE; + @java.lang.Override + public monitoring.Monitoring.AlarmSubscription getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public interface AlarmResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.AlarmResponse) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + boolean hasAlarmId(); - @java.lang.Override - public monitoring.Monitoring.KpiList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + monitoring.Monitoring.AlarmID getAlarmId(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); - public interface KpiDescriptorListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.KpiDescriptorList) - com.google.protobuf.MessageOrBuilder { + /** + * string text = 2; + * @return The text. + */ + java.lang.String getText(); - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - java.util.List - getKpiDescriptorListList(); - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - monitoring.Monitoring.KpiDescriptor getKpiDescriptorList(int index); - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - int getKpiDescriptorListCount(); - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - java.util.List - getKpiDescriptorListOrBuilderList(); - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorListOrBuilder( - int index); - } - /** - * Protobuf type {@code monitoring.KpiDescriptorList} - */ - public static final class KpiDescriptorList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.KpiDescriptorList) - KpiDescriptorListOrBuilder { - private static final long serialVersionUID = 0L; - // Use KpiDescriptorList.newBuilder() to construct. - private KpiDescriptorList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KpiDescriptorList() { - kpiDescriptorList_ = java.util.Collections.emptyList(); - } + /** + * string text = 2; + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KpiDescriptorList(); - } + /** + * .monitoring.KpiList kpi_list = 3; + * @return Whether the kpiList field is set. + */ + boolean hasKpiList(); - @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(); - 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; - } + /** + * .monitoring.KpiList kpi_list = 3; + * @return The kpiList. + */ + monitoring.Monitoring.KpiList getKpiList(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiDescriptorList.class, monitoring.Monitoring.KpiDescriptorList.Builder.class); + /** + * .monitoring.KpiList kpi_list = 3; + */ + monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder(); } - public static final int KPI_DESCRIPTOR_LIST_FIELD_NUMBER = 1; - private java.util.List kpiDescriptorList_; - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - @java.lang.Override - public java.util.List getKpiDescriptorListList() { - return kpiDescriptorList_; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - @java.lang.Override - public java.util.List - getKpiDescriptorListOrBuilderList() { - return kpiDescriptorList_; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - @java.lang.Override - public int getKpiDescriptorListCount() { - return kpiDescriptorList_.size(); - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - @java.lang.Override - public monitoring.Monitoring.KpiDescriptor getKpiDescriptorList(int index) { - return kpiDescriptorList_.get(index); - } /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; + * Protobuf type {@code monitoring.AlarmResponse} */ - @java.lang.Override - public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorListOrBuilder( - int index) { - return kpiDescriptorList_.get(index); - } + public static final class AlarmResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.AlarmResponse) + AlarmResponseOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use AlarmResponse.newBuilder() to construct. + private AlarmResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < kpiDescriptorList_.size(); i++) { - output.writeMessage(1, kpiDescriptorList_.get(i)); - } - unknownFields.writeTo(output); - } + private AlarmResponse() { + text_ = ""; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < kpiDescriptorList_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, kpiDescriptorList_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AlarmResponse(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.KpiDescriptorList)) { - return super.equals(obj); - } - monitoring.Monitoring.KpiDescriptorList other = (monitoring.Monitoring.KpiDescriptorList) obj; - - if (!getKpiDescriptorListList() - .equals(other.getKpiDescriptorListList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getKpiDescriptorListCount() > 0) { - hash = (37 * hash) + KPI_DESCRIPTOR_LIST_FIELD_NUMBER; - hash = (53 * hash) + getKpiDescriptorListList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + 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 monitoring.Monitoring.KpiDescriptorList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptorList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiDescriptorList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.KpiDescriptorList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.KpiDescriptorList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmResponse.class, monitoring.Monitoring.AlarmResponse.Builder.class); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.KpiDescriptorList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.KpiDescriptorList) - monitoring.Monitoring.KpiDescriptorListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.KpiDescriptorList.class, monitoring.Monitoring.KpiDescriptorList.Builder.class); - } - - // 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(); - if (kpiDescriptorListBuilder_ == null) { - kpiDescriptorList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - kpiDescriptorListBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.KpiDescriptorList getDefaultInstanceForType() { - return monitoring.Monitoring.KpiDescriptorList.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.KpiDescriptorList build() { - monitoring.Monitoring.KpiDescriptorList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public monitoring.Monitoring.KpiDescriptorList buildPartial() { - monitoring.Monitoring.KpiDescriptorList result = new monitoring.Monitoring.KpiDescriptorList(this); - int from_bitField0_ = bitField0_; - if (kpiDescriptorListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kpiDescriptorList_ = java.util.Collections.unmodifiableList(kpiDescriptorList_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.kpiDescriptorList_ = kpiDescriptorList_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.KpiDescriptorList) { - return mergeFrom((monitoring.Monitoring.KpiDescriptorList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.KpiDescriptorList other) { - if (other == monitoring.Monitoring.KpiDescriptorList.getDefaultInstance()) return this; - if (kpiDescriptorListBuilder_ == null) { - if (!other.kpiDescriptorList_.isEmpty()) { - if (kpiDescriptorList_.isEmpty()) { - kpiDescriptorList_ = other.kpiDescriptorList_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.addAll(other.kpiDescriptorList_); - } - onChanged(); - } - } else { - if (!other.kpiDescriptorList_.isEmpty()) { - if (kpiDescriptorListBuilder_.isEmpty()) { - kpiDescriptorListBuilder_.dispose(); - kpiDescriptorListBuilder_ = null; - kpiDescriptorList_ = other.kpiDescriptorList_; - bitField0_ = (bitField0_ & ~0x00000001); - kpiDescriptorListBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKpiDescriptorListFieldBuilder() : null; - } else { - kpiDescriptorListBuilder_.addAllMessages(other.kpiDescriptorList_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiDescriptorList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List kpiDescriptorList_ = - java.util.Collections.emptyList(); - private void ensureKpiDescriptorListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kpiDescriptorList_ = new java.util.ArrayList(kpiDescriptorList_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder> kpiDescriptorListBuilder_; - - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public java.util.List getKpiDescriptorListList() { - if (kpiDescriptorListBuilder_ == null) { - return java.util.Collections.unmodifiableList(kpiDescriptorList_); - } else { - return kpiDescriptorListBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public int getKpiDescriptorListCount() { - if (kpiDescriptorListBuilder_ == null) { - return kpiDescriptorList_.size(); - } else { - return kpiDescriptorListBuilder_.getCount(); - } - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public monitoring.Monitoring.KpiDescriptor getKpiDescriptorList(int index) { - if (kpiDescriptorListBuilder_ == null) { - return kpiDescriptorList_.get(index); - } else { - return kpiDescriptorListBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder setKpiDescriptorList( - int index, monitoring.Monitoring.KpiDescriptor value) { - if (kpiDescriptorListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.set(index, value); - onChanged(); - } else { - kpiDescriptorListBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder setKpiDescriptorList( - int index, monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { - if (kpiDescriptorListBuilder_ == null) { - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.set(index, builderForValue.build()); - onChanged(); - } else { - kpiDescriptorListBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder addKpiDescriptorList(monitoring.Monitoring.KpiDescriptor value) { - if (kpiDescriptorListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.add(value); - onChanged(); - } else { - kpiDescriptorListBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder addKpiDescriptorList( - int index, monitoring.Monitoring.KpiDescriptor value) { - if (kpiDescriptorListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.add(index, value); - onChanged(); - } else { - kpiDescriptorListBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder addKpiDescriptorList( - monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { - if (kpiDescriptorListBuilder_ == null) { - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.add(builderForValue.build()); - onChanged(); - } else { - kpiDescriptorListBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder addKpiDescriptorList( - int index, monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { - if (kpiDescriptorListBuilder_ == null) { - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.add(index, builderForValue.build()); - onChanged(); - } else { - kpiDescriptorListBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder addAllKpiDescriptorList( - java.lang.Iterable values) { - if (kpiDescriptorListBuilder_ == null) { - ensureKpiDescriptorListIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kpiDescriptorList_); - onChanged(); - } else { - kpiDescriptorListBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder clearKpiDescriptorList() { - if (kpiDescriptorListBuilder_ == null) { - kpiDescriptorList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kpiDescriptorListBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public Builder removeKpiDescriptorList(int index) { - if (kpiDescriptorListBuilder_ == null) { - ensureKpiDescriptorListIsMutable(); - kpiDescriptorList_.remove(index); - onChanged(); - } else { - kpiDescriptorListBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public monitoring.Monitoring.KpiDescriptor.Builder getKpiDescriptorListBuilder( - int index) { - return getKpiDescriptorListFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorListOrBuilder( - int index) { - if (kpiDescriptorListBuilder_ == null) { - return kpiDescriptorList_.get(index); } else { - return kpiDescriptorListBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public java.util.List - getKpiDescriptorListOrBuilderList() { - if (kpiDescriptorListBuilder_ != null) { - return kpiDescriptorListBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(kpiDescriptorList_); - } - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public monitoring.Monitoring.KpiDescriptor.Builder addKpiDescriptorListBuilder() { - return getKpiDescriptorListFieldBuilder().addBuilder( - monitoring.Monitoring.KpiDescriptor.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public monitoring.Monitoring.KpiDescriptor.Builder addKpiDescriptorListBuilder( - int index) { - return getKpiDescriptorListFieldBuilder().addBuilder( - index, monitoring.Monitoring.KpiDescriptor.getDefaultInstance()); - } - /** - * repeated .monitoring.KpiDescriptor kpi_descriptor_list = 1; - */ - public java.util.List - getKpiDescriptorListBuilderList() { - return getKpiDescriptorListFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder> - getKpiDescriptorListFieldBuilder() { - if (kpiDescriptorListBuilder_ == null) { - kpiDescriptorListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder>( - kpiDescriptorList_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - kpiDescriptorList_ = null; - } - return kpiDescriptorListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.KpiDescriptorList) - } + public static final int ALARM_ID_FIELD_NUMBER = 1; - // @@protoc_insertion_point(class_scope:monitoring.KpiDescriptorList) - private static final monitoring.Monitoring.KpiDescriptorList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.KpiDescriptorList(); - } + private monitoring.Monitoring.AlarmID alarmId_; - public static monitoring.Monitoring.KpiDescriptorList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + @java.lang.Override + public boolean hasAlarmId() { + return alarmId_ != null; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + @java.lang.Override + public monitoring.Monitoring.AlarmID getAlarmId() { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + @java.lang.Override + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + return getAlarmId(); + } - @java.lang.Override - public monitoring.Monitoring.KpiDescriptorList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static final int TEXT_FIELD_NUMBER = 2; - } + private volatile java.lang.Object text_; - public interface SubsDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.SubsDescriptor) - com.google.protobuf.MessageOrBuilder { + /** + * string text = 2; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + 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(); + text_ = s; + return s; + } + } - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return Whether the subsId field is set. - */ - boolean hasSubsId(); - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return The subsId. - */ - monitoring.Monitoring.SubscriptionID getSubsId(); - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder(); + /** + * string text = 2; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * .monitoring.KpiId kpi_id = 2; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 2; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 2; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + public static final int KPI_LIST_FIELD_NUMBER = 3; - /** - * float sampling_duration_s = 3; - * @return The samplingDurationS. - */ - float getSamplingDurationS(); + private monitoring.Monitoring.KpiList kpiList_; - /** - * float sampling_interval_s = 4; - * @return The samplingIntervalS. - */ - float getSamplingIntervalS(); + /** + * .monitoring.KpiList kpi_list = 3; + * @return Whether the kpiList field is set. + */ + @java.lang.Override + public boolean hasKpiList() { + return kpiList_ != null; + } - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 5; - * @return Whether the startTimestamp field is set. - */ - boolean hasStartTimestamp(); - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 5; - * @return The startTimestamp. - */ - context.ContextOuterClass.Timestamp getStartTimestamp(); - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 5; - */ - context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder(); + /** + * .monitoring.KpiList kpi_list = 3; + * @return The kpiList. + */ + @java.lang.Override + public monitoring.Monitoring.KpiList getKpiList() { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; + } - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 6; - * @return Whether the endTimestamp field is set. - */ - boolean hasEndTimestamp(); - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 6; - * @return The endTimestamp. - */ - context.ContextOuterClass.Timestamp getEndTimestamp(); - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 6; - */ - context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder(); - } - /** - * Protobuf type {@code monitoring.SubsDescriptor} - */ - public static final class SubsDescriptor extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.SubsDescriptor) - SubsDescriptorOrBuilder { - private static final long serialVersionUID = 0L; - // Use SubsDescriptor.newBuilder() to construct. - private SubsDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubsDescriptor() { - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + @java.lang.Override + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + return getKpiList(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubsDescriptor(); - } + private byte memoizedIsInitialized = -1; - @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; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsDescriptor.class, monitoring.Monitoring.SubsDescriptor.Builder.class); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (alarmId_ != null) { + output.writeMessage(1, getAlarmId()); + } + if (!getTextBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); + } + if (kpiList_ != null) { + output.writeMessage(3, getKpiList()); + } + unknownFields.writeTo(output); + } - public static final int SUBS_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.SubscriptionID subsId_; - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return Whether the subsId field is set. - */ - @java.lang.Override - public boolean hasSubsId() { - return subsId_ != null; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return The subsId. - */ - @java.lang.Override - public monitoring.Monitoring.SubscriptionID getSubsId() { - return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { - return getSubsId(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (alarmId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId()); + } + if (!getTextBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); + } + if (kpiList_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKpiList()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static final int KPI_ID_FIELD_NUMBER = 2; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 2; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 2; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.AlarmResponse)) { + return super.equals(obj); + } + monitoring.Monitoring.AlarmResponse other = (monitoring.Monitoring.AlarmResponse) obj; + if (hasAlarmId() != other.hasAlarmId()) + return false; + if (hasAlarmId()) { + if (!getAlarmId().equals(other.getAlarmId())) + return false; + } + if (!getText().equals(other.getText())) + return false; + if (hasKpiList() != other.hasKpiList()) + return false; + if (hasKpiList()) { + if (!getKpiList().equals(other.getKpiList())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - public static final int SAMPLING_DURATION_S_FIELD_NUMBER = 3; - private float samplingDurationS_; - /** - * float sampling_duration_s = 3; - * @return The samplingDurationS. - */ - @java.lang.Override - public float getSamplingDurationS() { - return samplingDurationS_; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAlarmId()) { + hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; + hash = (53 * hash) + getAlarmId().hashCode(); + } + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + if (hasKpiList()) { + hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; + hash = (53 * hash) + getKpiList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - public static final int SAMPLING_INTERVAL_S_FIELD_NUMBER = 4; - private float samplingIntervalS_; - /** - * float sampling_interval_s = 4; - * @return The samplingIntervalS. - */ - @java.lang.Override - public float getSamplingIntervalS() { - return samplingIntervalS_; - } + public static monitoring.Monitoring.AlarmResponse parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int START_TIMESTAMP_FIELD_NUMBER = 5; - private context.ContextOuterClass.Timestamp startTimestamp_; - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 5; - * @return Whether the startTimestamp field is set. - */ - @java.lang.Override - public boolean hasStartTimestamp() { - return startTimestamp_ != null; - } - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 5; - * @return The startTimestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getStartTimestamp() { - return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; - } - /** - *
-     * used when you want something like "get the samples since X date/time"
-     * 
- * - * .context.Timestamp start_timestamp = 5; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { - return getStartTimestamp(); - } + public static monitoring.Monitoring.AlarmResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int END_TIMESTAMP_FIELD_NUMBER = 6; - private context.ContextOuterClass.Timestamp endTimestamp_; - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 6; - * @return Whether the endTimestamp field is set. - */ - @java.lang.Override - public boolean hasEndTimestamp() { - return endTimestamp_ != null; - } - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 6; - * @return The endTimestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getEndTimestamp() { - return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; - } - /** - *
-     * used when you want something like "get the samples until X date/time"
-     * 
- * - * .context.Timestamp end_timestamp = 6; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { - return getEndTimestamp(); - } + public static monitoring.Monitoring.AlarmResponse parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static monitoring.Monitoring.AlarmResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static monitoring.Monitoring.AlarmResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (subsId_ != null) { - output.writeMessage(1, getSubsId()); - } - if (kpiId_ != null) { - output.writeMessage(2, getKpiId()); - } - if (samplingDurationS_ != 0F) { - output.writeFloat(3, samplingDurationS_); - } - if (samplingIntervalS_ != 0F) { - output.writeFloat(4, samplingIntervalS_); - } - if (startTimestamp_ != null) { - output.writeMessage(5, getStartTimestamp()); - } - if (endTimestamp_ != null) { - output.writeMessage(6, getEndTimestamp()); - } - unknownFields.writeTo(output); - } + public static monitoring.Monitoring.AlarmResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (subsId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubsId()); - } - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getKpiId()); - } - if (samplingDurationS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, samplingDurationS_); - } - if (samplingIntervalS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, samplingIntervalS_); - } - if (startTimestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getStartTimestamp()); - } - if (endTimestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getEndTimestamp()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static monitoring.Monitoring.AlarmResponse parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.SubsDescriptor)) { - return super.equals(obj); - } - monitoring.Monitoring.SubsDescriptor other = (monitoring.Monitoring.SubsDescriptor) obj; - - if (hasSubsId() != other.hasSubsId()) return false; - if (hasSubsId()) { - if (!getSubsId() - .equals(other.getSubsId())) return false; - } - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (java.lang.Float.floatToIntBits(getSamplingDurationS()) - != java.lang.Float.floatToIntBits( - other.getSamplingDurationS())) return false; - if (java.lang.Float.floatToIntBits(getSamplingIntervalS()) - != java.lang.Float.floatToIntBits( - other.getSamplingIntervalS())) return false; - if (hasStartTimestamp() != other.hasStartTimestamp()) return false; - if (hasStartTimestamp()) { - if (!getStartTimestamp() - .equals(other.getStartTimestamp())) return false; - } - if (hasEndTimestamp() != other.hasEndTimestamp()) return false; - if (hasEndTimestamp()) { - if (!getEndTimestamp() - .equals(other.getEndTimestamp())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static monitoring.Monitoring.AlarmResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubsId()) { - hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; - hash = (53 * hash) + getSubsId().hashCode(); - } - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - hash = (37 * hash) + SAMPLING_DURATION_S_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getSamplingDurationS()); - hash = (37 * hash) + SAMPLING_INTERVAL_S_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getSamplingIntervalS()); - if (hasStartTimestamp()) { - hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getStartTimestamp().hashCode(); - } - if (hasEndTimestamp()) { - hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getEndTimestamp().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static monitoring.Monitoring.AlarmResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubsDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsDescriptor parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsDescriptor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static monitoring.Monitoring.AlarmResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.SubsDescriptor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static monitoring.Monitoring.AlarmResponse parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.SubsDescriptor} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.SubsDescriptor) - monitoring.Monitoring.SubsDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsDescriptor.class, monitoring.Monitoring.SubsDescriptor.Builder.class); - } - - // 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; - subsIdBuilder_ = null; - } - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - samplingDurationS_ = 0F; - - samplingIntervalS_ = 0F; - - if (startTimestampBuilder_ == null) { - startTimestamp_ = null; - } else { - startTimestamp_ = null; - startTimestampBuilder_ = null; - } - if (endTimestampBuilder_ == null) { - endTimestamp_ = null; - } else { - endTimestamp_ = null; - endTimestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.SubsDescriptor getDefaultInstanceForType() { - return monitoring.Monitoring.SubsDescriptor.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.SubsDescriptor build() { - monitoring.Monitoring.SubsDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.SubsDescriptor) { - return mergeFrom((monitoring.Monitoring.SubsDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.SubsDescriptor other) { - if (other == monitoring.Monitoring.SubsDescriptor.getDefaultInstance()) return this; - if (other.hasSubsId()) { - mergeSubsId(other.getSubsId()); - } - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - if (other.getSamplingDurationS() != 0F) { - setSamplingDurationS(other.getSamplingDurationS()); - } - if (other.getSamplingIntervalS() != 0F) { - setSamplingIntervalS(other.getSamplingIntervalS()); - } - if (other.hasStartTimestamp()) { - mergeStartTimestamp(other.getStartTimestamp()); - } - if (other.hasEndTimestamp()) { - mergeEndTimestamp(other.getEndTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubsDescriptor) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.SubscriptionID subsId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> subsIdBuilder_; - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return Whether the subsId field is set. - */ - public boolean hasSubsId() { - return subsIdBuilder_ != null || subsId_ != null; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return The subsId. - */ - public monitoring.Monitoring.SubscriptionID getSubsId() { - if (subsIdBuilder_ == null) { - return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; - } else { - return subsIdBuilder_.getMessage(); - } - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder setSubsId(monitoring.Monitoring.SubscriptionID value) { - if (subsIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subsId_ = value; - onChanged(); - } else { - subsIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder setSubsId( - monitoring.Monitoring.SubscriptionID.Builder builderForValue) { - if (subsIdBuilder_ == null) { - subsId_ = builderForValue.build(); - onChanged(); - } else { - subsIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder mergeSubsId(monitoring.Monitoring.SubscriptionID value) { - if (subsIdBuilder_ == null) { - if (subsId_ != null) { - subsId_ = - monitoring.Monitoring.SubscriptionID.newBuilder(subsId_).mergeFrom(value).buildPartial(); - } else { - subsId_ = value; - } - onChanged(); - } else { - subsIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder clearSubsId() { - if (subsIdBuilder_ == null) { - subsId_ = null; - onChanged(); - } else { - subsId_ = null; - subsIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public monitoring.Monitoring.SubscriptionID.Builder getSubsIdBuilder() { - - onChanged(); - return getSubsIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { - if (subsIdBuilder_ != null) { - return subsIdBuilder_.getMessageOrBuilder(); - } else { - return subsId_ == null ? - monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; - } - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> - getSubsIdFieldBuilder() { - if (subsIdBuilder_ == null) { - subsIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder>( - getSubsId(), - getParentForChildren(), - isClean()); - subsId_ = null; - } - return subsIdBuilder_; - } - - private monitoring.Monitoring.KpiId kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - /** - * .monitoring.KpiId kpi_id = 2; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 2; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - } - /** - * .monitoring.KpiId kpi_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - - private float samplingDurationS_ ; - /** - * float sampling_duration_s = 3; - * @return The samplingDurationS. - */ - @java.lang.Override - public float getSamplingDurationS() { - return samplingDurationS_; - } - /** - * float sampling_duration_s = 3; - * @param value The samplingDurationS to set. - * @return This builder for chaining. - */ - public Builder setSamplingDurationS(float value) { - - samplingDurationS_ = value; - onChanged(); - return this; - } - /** - * float sampling_duration_s = 3; - * @return This builder for chaining. - */ - public Builder clearSamplingDurationS() { - - samplingDurationS_ = 0F; - onChanged(); - return this; - } - - private float samplingIntervalS_ ; - /** - * float sampling_interval_s = 4; - * @return The samplingIntervalS. - */ - @java.lang.Override - public float getSamplingIntervalS() { - return samplingIntervalS_; - } - /** - * float sampling_interval_s = 4; - * @param value The samplingIntervalS to set. - * @return This builder for chaining. - */ - public Builder setSamplingIntervalS(float value) { - - samplingIntervalS_ = value; - onChanged(); - return this; - } - /** - * float sampling_interval_s = 4; - * @return This builder for chaining. - */ - public Builder clearSamplingIntervalS() { - - samplingIntervalS_ = 0F; - onChanged(); - return this; - } - - private context.ContextOuterClass.Timestamp startTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> startTimestampBuilder_; - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - * @return Whether the startTimestamp field is set. - */ - public boolean hasStartTimestamp() { - return startTimestampBuilder_ != null || startTimestamp_ != null; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - * @return The startTimestamp. - */ - public context.ContextOuterClass.Timestamp getStartTimestamp() { - if (startTimestampBuilder_ == null) { - return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; - } else { - return startTimestampBuilder_.getMessage(); - } - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - public Builder setStartTimestamp(context.ContextOuterClass.Timestamp value) { - if (startTimestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTimestamp_ = value; - onChanged(); - } else { - startTimestampBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - public Builder setStartTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (startTimestampBuilder_ == null) { - startTimestamp_ = builderForValue.build(); - onChanged(); - } else { - startTimestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) { - if (startTimestampBuilder_ == null) { - if (startTimestamp_ != null) { - startTimestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(startTimestamp_).mergeFrom(value).buildPartial(); - } else { - startTimestamp_ = value; - } - onChanged(); - } else { - startTimestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - public Builder clearStartTimestamp() { - if (startTimestampBuilder_ == null) { - startTimestamp_ = null; - onChanged(); - } else { - startTimestamp_ = null; - startTimestampBuilder_ = null; - } - - return this; - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() { - - onChanged(); - return getStartTimestampFieldBuilder().getBuilder(); - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { - if (startTimestampBuilder_ != null) { - return startTimestampBuilder_.getMessageOrBuilder(); - } else { - return startTimestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; - } - } - /** - *
-       * used when you want something like "get the samples since X date/time"
-       * 
- * - * .context.Timestamp start_timestamp = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getStartTimestampFieldBuilder() { - if (startTimestampBuilder_ == null) { - startTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getStartTimestamp(), - getParentForChildren(), - isClean()); - startTimestamp_ = null; - } - return startTimestampBuilder_; - } - - private context.ContextOuterClass.Timestamp endTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> endTimestampBuilder_; - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - * @return Whether the endTimestamp field is set. - */ - public boolean hasEndTimestamp() { - return endTimestampBuilder_ != null || endTimestamp_ != null; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - * @return The endTimestamp. - */ - public context.ContextOuterClass.Timestamp getEndTimestamp() { - if (endTimestampBuilder_ == null) { - return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; - } else { - return endTimestampBuilder_.getMessage(); - } - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - public Builder setEndTimestamp(context.ContextOuterClass.Timestamp value) { - if (endTimestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTimestamp_ = value; - onChanged(); - } else { - endTimestampBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - public Builder setEndTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (endTimestampBuilder_ == null) { - endTimestamp_ = builderForValue.build(); - onChanged(); - } else { - endTimestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) { - if (endTimestampBuilder_ == null) { - if (endTimestamp_ != null) { - endTimestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(endTimestamp_).mergeFrom(value).buildPartial(); - } else { - endTimestamp_ = value; - } - onChanged(); - } else { - endTimestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - public Builder clearEndTimestamp() { - if (endTimestampBuilder_ == null) { - endTimestamp_ = null; - onChanged(); - } else { - endTimestamp_ = null; - endTimestampBuilder_ = null; - } - - return this; - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() { - - onChanged(); - return getEndTimestampFieldBuilder().getBuilder(); - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { - if (endTimestampBuilder_ != null) { - return endTimestampBuilder_.getMessageOrBuilder(); - } else { - return endTimestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; - } - } - /** - *
-       * used when you want something like "get the samples until X date/time"
-       * 
- * - * .context.Timestamp end_timestamp = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getEndTimestampFieldBuilder() { - if (endTimestampBuilder_ == null) { - endTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getEndTimestamp(), - getParentForChildren(), - isClean()); - endTimestamp_ = null; - } - return endTimestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.SubsDescriptor) - } + public static monitoring.Monitoring.AlarmResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:monitoring.SubsDescriptor) - private static final monitoring.Monitoring.SubsDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.SubsDescriptor(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static monitoring.Monitoring.SubsDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static Builder newBuilder(monitoring.Monitoring.AlarmResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public monitoring.Monitoring.SubsDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - } + /** + * Protobuf type {@code monitoring.AlarmResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.AlarmResponse) + monitoring.Monitoring.AlarmResponseOrBuilder { - public interface SubscriptionIDOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.SubscriptionID) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_descriptor; + } - /** - * .context.Uuid subs_id = 1; - * @return Whether the subsId field is set. - */ - boolean hasSubsId(); - /** - * .context.Uuid subs_id = 1; - * @return The subsId. - */ - context.ContextOuterClass.Uuid getSubsId(); - /** - * .context.Uuid subs_id = 1; - */ - context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder(); - } - /** - * Protobuf type {@code monitoring.SubscriptionID} - */ - public static final class SubscriptionID extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.SubscriptionID) - SubscriptionIDOrBuilder { - private static final long serialVersionUID = 0L; - // Use SubscriptionID.newBuilder() to construct. - private SubscriptionID(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubscriptionID() { - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmResponse.class, monitoring.Monitoring.AlarmResponse.Builder.class); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubscriptionID(); - } + // Construct using monitoring.Monitoring.AlarmResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @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; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubscriptionID.class, monitoring.Monitoring.SubscriptionID.Builder.class); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - public static final int SUBS_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid subsId_; - /** - * .context.Uuid subs_id = 1; - * @return Whether the subsId field is set. - */ - @java.lang.Override - public boolean hasSubsId() { - return subsId_ != null; - } - /** - * .context.Uuid subs_id = 1; - * @return The subsId. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getSubsId() { - return subsId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; - } - /** - * .context.Uuid subs_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder() { - return getSubsId(); - } + @java.lang.Override + public Builder clear() { + super.clear(); + if (alarmIdBuilder_ == null) { + alarmId_ = null; + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + text_ = ""; + if (kpiListBuilder_ == null) { + kpiList_ = null; + } else { + kpiList_ = null; + kpiListBuilder_ = null; + } + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_descriptor; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public monitoring.Monitoring.AlarmResponse getDefaultInstanceForType() { + return monitoring.Monitoring.AlarmResponse.getDefaultInstance(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (subsId_ != null) { - output.writeMessage(1, getSubsId()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public monitoring.Monitoring.AlarmResponse build() { + monitoring.Monitoring.AlarmResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (subsId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubsId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @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(); + } + onBuilt(); + return result; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.SubscriptionID)) { - return super.equals(obj); - } - monitoring.Monitoring.SubscriptionID other = (monitoring.Monitoring.SubscriptionID) obj; - - if (hasSubsId() != other.hasSubsId()) return false; - if (hasSubsId()) { - if (!getSubsId() - .equals(other.getSubsId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubsId()) { - hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; - hash = (53 * hash) + getSubsId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static monitoring.Monitoring.SubscriptionID parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubscriptionID parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubscriptionID parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubscriptionID parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubscriptionID parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubscriptionID parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.SubscriptionID prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.SubscriptionID} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.SubscriptionID) - monitoring.Monitoring.SubscriptionIDOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubscriptionID.class, monitoring.Monitoring.SubscriptionID.Builder.class); - } - - // 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; - subsIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.SubscriptionID getDefaultInstanceForType() { - return monitoring.Monitoring.SubscriptionID.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.SubscriptionID build() { - monitoring.Monitoring.SubscriptionID result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.SubscriptionID) { - return mergeFrom((monitoring.Monitoring.SubscriptionID)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.SubscriptionID other) { - if (other == monitoring.Monitoring.SubscriptionID.getDefaultInstance()) return this; - if (other.hasSubsId()) { - mergeSubsId(other.getSubsId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubscriptionID) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid subsId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> subsIdBuilder_; - /** - * .context.Uuid subs_id = 1; - * @return Whether the subsId field is set. - */ - public boolean hasSubsId() { - return subsIdBuilder_ != null || subsId_ != null; - } - /** - * .context.Uuid subs_id = 1; - * @return The subsId. - */ - public context.ContextOuterClass.Uuid getSubsId() { - if (subsIdBuilder_ == null) { - return subsId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; - } else { - return subsIdBuilder_.getMessage(); - } - } - /** - * .context.Uuid subs_id = 1; - */ - public Builder setSubsId(context.ContextOuterClass.Uuid value) { - if (subsIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subsId_ = value; - onChanged(); - } else { - subsIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid subs_id = 1; - */ - public Builder setSubsId( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (subsIdBuilder_ == null) { - subsId_ = builderForValue.build(); - onChanged(); - } else { - subsIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid subs_id = 1; - */ - public Builder mergeSubsId(context.ContextOuterClass.Uuid value) { - if (subsIdBuilder_ == null) { - if (subsId_ != null) { - subsId_ = - context.ContextOuterClass.Uuid.newBuilder(subsId_).mergeFrom(value).buildPartial(); - } else { - subsId_ = value; - } - onChanged(); - } else { - subsIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid subs_id = 1; - */ - public Builder clearSubsId() { - if (subsIdBuilder_ == null) { - subsId_ = null; - onChanged(); - } else { - subsId_ = null; - subsIdBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid subs_id = 1; - */ - public context.ContextOuterClass.Uuid.Builder getSubsIdBuilder() { - - onChanged(); - return getSubsIdFieldBuilder().getBuilder(); - } - /** - * .context.Uuid subs_id = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder() { - if (subsIdBuilder_ != null) { - return subsIdBuilder_.getMessageOrBuilder(); - } else { - return subsId_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; - } - } - /** - * .context.Uuid subs_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getSubsIdFieldBuilder() { - if (subsIdBuilder_ == null) { - subsIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getSubsId(), - getParentForChildren(), - isClean()); - subsId_ = null; - } - return subsIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.SubscriptionID) - } + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - // @@protoc_insertion_point(class_scope:monitoring.SubscriptionID) - private static final monitoring.Monitoring.SubscriptionID DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.SubscriptionID(); - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - public static monitoring.Monitoring.SubscriptionID getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.AlarmResponse) { + return mergeFrom((monitoring.Monitoring.AlarmResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public Builder mergeFrom(monitoring.Monitoring.AlarmResponse other) { + if (other == monitoring.Monitoring.AlarmResponse.getDefaultInstance()) + return this; + if (other.hasAlarmId()) { + mergeAlarmId(other.getAlarmId()); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + if (other.hasKpiList()) { + mergeKpiList(other.getKpiList()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public monitoring.Monitoring.SubscriptionID getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.AlarmResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - } + private monitoring.Monitoring.AlarmID alarmId_; - public interface SubsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.SubsResponse) - com.google.protobuf.MessageOrBuilder { + private com.google.protobuf.SingleFieldBuilderV3 alarmIdBuilder_; - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return Whether the subsId field is set. - */ - boolean hasSubsId(); - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return The subsId. - */ - monitoring.Monitoring.SubscriptionID getSubsId(); - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder(); + /** + * .monitoring.AlarmID alarm_id = 1; + * @return Whether the alarmId field is set. + */ + public boolean hasAlarmId() { + return alarmIdBuilder_ != null || alarmId_ != null; + } - /** - * .monitoring.KpiList kpi_list = 2; - * @return Whether the kpiList field is set. - */ - boolean hasKpiList(); - /** - * .monitoring.KpiList kpi_list = 2; - * @return The kpiList. - */ - monitoring.Monitoring.KpiList getKpiList(); - /** - * .monitoring.KpiList kpi_list = 2; - */ - monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder(); - } - /** - * Protobuf type {@code monitoring.SubsResponse} - */ - public static final class SubsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.SubsResponse) - SubsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use SubsResponse.newBuilder() to construct. - private SubsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubsResponse() { - } + /** + * .monitoring.AlarmID alarm_id = 1; + * @return The alarmId. + */ + public monitoring.Monitoring.AlarmID getAlarmId() { + if (alarmIdBuilder_ == null) { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } else { + return alarmIdBuilder_.getMessage(); + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubsResponse(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + alarmId_ = value; + onChanged(); + } else { + alarmIdBuilder_.setMessage(value); + } + return this; + } - @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; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder setAlarmId(monitoring.Monitoring.AlarmID.Builder builderForValue) { + if (alarmIdBuilder_ == null) { + alarmId_ = builderForValue.build(); + onChanged(); + } else { + alarmIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsResponse.class, monitoring.Monitoring.SubsResponse.Builder.class); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { + if (alarmIdBuilder_ == null) { + if (alarmId_ != null) { + alarmId_ = monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); + } else { + alarmId_ = value; + } + onChanged(); + } else { + alarmIdBuilder_.mergeFrom(value); + } + return this; + } - public static final int SUBS_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.SubscriptionID subsId_; - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return Whether the subsId field is set. - */ - @java.lang.Override - public boolean hasSubsId() { - return subsId_ != null; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return The subsId. - */ - @java.lang.Override - public monitoring.Monitoring.SubscriptionID getSubsId() { - return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { - return getSubsId(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public Builder clearAlarmId() { + if (alarmIdBuilder_ == null) { + alarmId_ = null; + onChanged(); + } else { + alarmId_ = null; + alarmIdBuilder_ = null; + } + return this; + } - public static final int KPI_LIST_FIELD_NUMBER = 2; - private monitoring.Monitoring.KpiList kpiList_; - /** - * .monitoring.KpiList kpi_list = 2; - * @return Whether the kpiList field is set. - */ - @java.lang.Override - public boolean hasKpiList() { - return kpiList_ != null; - } - /** - * .monitoring.KpiList kpi_list = 2; - * @return The kpiList. - */ - @java.lang.Override - public monitoring.Monitoring.KpiList getKpiList() { - return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - @java.lang.Override - public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { - return getKpiList(); - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { + onChanged(); + return getAlarmIdFieldBuilder().getBuilder(); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * .monitoring.AlarmID alarm_id = 1; + */ + public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { + if (alarmIdBuilder_ != null) { + return alarmIdBuilder_.getMessageOrBuilder(); + } else { + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; + } + } - memoizedIsInitialized = 1; - return true; - } + /** + * .monitoring.AlarmID alarm_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getAlarmIdFieldBuilder() { + if (alarmIdBuilder_ == null) { + alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getAlarmId(), getParentForChildren(), isClean()); + alarmId_ = null; + } + return alarmIdBuilder_; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (subsId_ != null) { - output.writeMessage(1, getSubsId()); - } - if (kpiList_ != null) { - output.writeMessage(2, getKpiList()); - } - unknownFields.writeTo(output); - } + private java.lang.Object text_ = ""; + + /** + * string text = 2; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (subsId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubsId()); - } - if (kpiList_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getKpiList()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * string text = 2; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.SubsResponse)) { - return super.equals(obj); - } - monitoring.Monitoring.SubsResponse other = (monitoring.Monitoring.SubsResponse) obj; - - if (hasSubsId() != other.hasSubsId()) return false; - if (hasSubsId()) { - if (!getSubsId() - .equals(other.getSubsId())) return false; - } - if (hasKpiList() != other.hasKpiList()) return false; - if (hasKpiList()) { - if (!getKpiList() - .equals(other.getKpiList())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * string text = 2; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubsId()) { - hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; - hash = (53 * hash) + getSubsId().hashCode(); - } - if (hasKpiList()) { - hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; - hash = (53 * hash) + getKpiList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * string text = 2; + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } - public static monitoring.Monitoring.SubsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * string text = 2; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.SubsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private monitoring.Monitoring.KpiList kpiList_; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.SubsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.SubsResponse) - monitoring.Monitoring.SubsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsResponse.class, monitoring.Monitoring.SubsResponse.Builder.class); - } - - // 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; - subsIdBuilder_ = null; - } - if (kpiListBuilder_ == null) { - kpiList_ = null; - } else { - kpiList_ = null; - kpiListBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_SubsResponse_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.SubsResponse getDefaultInstanceForType() { - return monitoring.Monitoring.SubsResponse.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.SubsResponse build() { - monitoring.Monitoring.SubsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.SubsResponse) { - return mergeFrom((monitoring.Monitoring.SubsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.SubsResponse other) { - if (other == monitoring.Monitoring.SubsResponse.getDefaultInstance()) return this; - if (other.hasSubsId()) { - mergeSubsId(other.getSubsId()); - } - if (other.hasKpiList()) { - mergeKpiList(other.getKpiList()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.SubscriptionID subsId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> subsIdBuilder_; - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return Whether the subsId field is set. - */ - public boolean hasSubsId() { - return subsIdBuilder_ != null || subsId_ != null; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - * @return The subsId. - */ - public monitoring.Monitoring.SubscriptionID getSubsId() { - if (subsIdBuilder_ == null) { - return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; - } else { - return subsIdBuilder_.getMessage(); - } - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder setSubsId(monitoring.Monitoring.SubscriptionID value) { - if (subsIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subsId_ = value; - onChanged(); - } else { - subsIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder setSubsId( - monitoring.Monitoring.SubscriptionID.Builder builderForValue) { - if (subsIdBuilder_ == null) { - subsId_ = builderForValue.build(); - onChanged(); - } else { - subsIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder mergeSubsId(monitoring.Monitoring.SubscriptionID value) { - if (subsIdBuilder_ == null) { - if (subsId_ != null) { - subsId_ = - monitoring.Monitoring.SubscriptionID.newBuilder(subsId_).mergeFrom(value).buildPartial(); - } else { - subsId_ = value; - } - onChanged(); - } else { - subsIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public Builder clearSubsId() { - if (subsIdBuilder_ == null) { - subsId_ = null; - onChanged(); - } else { - subsId_ = null; - subsIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public monitoring.Monitoring.SubscriptionID.Builder getSubsIdBuilder() { - - onChanged(); - return getSubsIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { - if (subsIdBuilder_ != null) { - return subsIdBuilder_.getMessageOrBuilder(); - } else { - return subsId_ == null ? - monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; - } - } - /** - * .monitoring.SubscriptionID subs_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> - getSubsIdFieldBuilder() { - if (subsIdBuilder_ == null) { - subsIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder>( - getSubsId(), - getParentForChildren(), - isClean()); - subsId_ = null; - } - return subsIdBuilder_; - } - - private monitoring.Monitoring.KpiList kpiList_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> kpiListBuilder_; - /** - * .monitoring.KpiList kpi_list = 2; - * @return Whether the kpiList field is set. - */ - public boolean hasKpiList() { - return kpiListBuilder_ != null || kpiList_ != null; - } - /** - * .monitoring.KpiList kpi_list = 2; - * @return The kpiList. - */ - public monitoring.Monitoring.KpiList getKpiList() { - if (kpiListBuilder_ == null) { - return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; - } else { - return kpiListBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - public Builder setKpiList(monitoring.Monitoring.KpiList value) { - if (kpiListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiList_ = value; - onChanged(); - } else { - kpiListBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - public Builder setKpiList( - monitoring.Monitoring.KpiList.Builder builderForValue) { - if (kpiListBuilder_ == null) { - kpiList_ = builderForValue.build(); - onChanged(); - } else { - kpiListBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { - if (kpiListBuilder_ == null) { - if (kpiList_ != null) { - kpiList_ = - monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); - } else { - kpiList_ = value; - } - onChanged(); - } else { - kpiListBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - public Builder clearKpiList() { - if (kpiListBuilder_ == null) { - kpiList_ = null; - onChanged(); - } else { - kpiList_ = null; - kpiListBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { - - onChanged(); - return getKpiListFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { - if (kpiListBuilder_ != null) { - return kpiListBuilder_.getMessageOrBuilder(); - } else { - return kpiList_ == null ? - monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; - } - } - /** - * .monitoring.KpiList kpi_list = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> - getKpiListFieldBuilder() { - if (kpiListBuilder_ == null) { - kpiListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder>( - getKpiList(), - getParentForChildren(), - isClean()); - kpiList_ = null; - } - return kpiListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.SubsResponse) - } + private com.google.protobuf.SingleFieldBuilderV3 kpiListBuilder_; - // @@protoc_insertion_point(class_scope:monitoring.SubsResponse) - private static final monitoring.Monitoring.SubsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.SubsResponse(); - } + /** + * .monitoring.KpiList kpi_list = 3; + * @return Whether the kpiList field is set. + */ + public boolean hasKpiList() { + return kpiListBuilder_ != null || kpiList_ != null; + } - public static monitoring.Monitoring.SubsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.KpiList kpi_list = 3; + * @return The kpiList. + */ + public monitoring.Monitoring.KpiList getKpiList() { + if (kpiListBuilder_ == null) { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; + } else { + return kpiListBuilder_.getMessage(); + } + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + public Builder setKpiList(monitoring.Monitoring.KpiList value) { + if (kpiListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kpiList_ = value; + onChanged(); + } else { + kpiListBuilder_.setMessage(value); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + public Builder setKpiList(monitoring.Monitoring.KpiList.Builder builderForValue) { + if (kpiListBuilder_ == null) { + kpiList_ = builderForValue.build(); + onChanged(); + } else { + kpiListBuilder_.setMessage(builderForValue.build()); + } + return this; + } - @java.lang.Override - public monitoring.Monitoring.SubsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { + if (kpiListBuilder_ == null) { + if (kpiList_ != null) { + kpiList_ = monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); + } else { + kpiList_ = value; + } + onChanged(); + } else { + kpiListBuilder_.mergeFrom(value); + } + return this; + } - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + public Builder clearKpiList() { + if (kpiListBuilder_ == null) { + kpiList_ = null; + onChanged(); + } else { + kpiList_ = null; + kpiListBuilder_ = null; + } + return this; + } - public interface SubsListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.SubsList) - com.google.protobuf.MessageOrBuilder { + /** + * .monitoring.KpiList kpi_list = 3; + */ + public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { + onChanged(); + return getKpiListFieldBuilder().getBuilder(); + } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - java.util.List - getSubsDescriptorList(); - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index); - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - int getSubsDescriptorCount(); - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - java.util.List - getSubsDescriptorOrBuilderList(); - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder( - int index); - } - /** - * Protobuf type {@code monitoring.SubsList} - */ - public static final class SubsList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.SubsList) - SubsListOrBuilder { - 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(); - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { + if (kpiListBuilder_ != null) { + return kpiListBuilder_.getMessageOrBuilder(); + } else { + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubsList(); - } + /** + * .monitoring.KpiList kpi_list = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3 getKpiListFieldBuilder() { + if (kpiListBuilder_ == null) { + kpiListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getKpiList(), getParentForChildren(), isClean()); + kpiList_ = null; + } + return kpiListBuilder_; + } - @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(); - 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(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsList.class, monitoring.Monitoring.SubsList.Builder.class); - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.AlarmResponse) + } - public static final int SUBS_DESCRIPTOR_FIELD_NUMBER = 1; - private java.util.List subsDescriptor_; - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - @java.lang.Override - public java.util.List getSubsDescriptorList() { - return subsDescriptor_; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - @java.lang.Override - public java.util.List - getSubsDescriptorOrBuilderList() { - return subsDescriptor_; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - @java.lang.Override - public int getSubsDescriptorCount() { - return subsDescriptor_.size(); - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - @java.lang.Override - public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index) { - return subsDescriptor_.get(index); - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - @java.lang.Override - public monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder( - int index) { - return subsDescriptor_.get(index); - } + // @@protoc_insertion_point(class_scope:monitoring.AlarmResponse) + private static final monitoring.Monitoring.AlarmResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmResponse(); + } + + public static monitoring.Monitoring.AlarmResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - memoizedIsInitialized = 1; - return true; + @java.lang.Override + public monitoring.Monitoring.AlarmResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < subsDescriptor_.size(); i++) { - output.writeMessage(1, subsDescriptor_.get(i)); - } - unknownFields.writeTo(output); - } + public interface AlarmListOrBuilder extends // @@protoc_insertion_point(interface_extends:monitoring.AlarmList) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < subsDescriptor_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, subsDescriptor_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + java.util.List getAlarmDescriptorList(); - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.SubsList)) { - return super.equals(obj); - } - monitoring.Monitoring.SubsList other = (monitoring.Monitoring.SubsList) obj; - - if (!getSubsDescriptorList() - .equals(other.getSubsDescriptorList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSubsDescriptorCount() > 0) { - hash = (37 * hash) + SUBS_DESCRIPTOR_FIELD_NUMBER; - hash = (53 * hash) + getSubsDescriptorList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + int getAlarmDescriptorCount(); - public static monitoring.Monitoring.SubsList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.SubsList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.SubsList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubsList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.SubsList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.SubsList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + java.util.List getAlarmDescriptorOrBuilderList(); - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.SubsList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder(int index); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** - * Protobuf type {@code monitoring.SubsList} + * Protobuf type {@code monitoring.AlarmList} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.SubsList) - monitoring.Monitoring.SubsListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_SubsList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.SubsList.class, monitoring.Monitoring.SubsList.Builder.class); - } - - // 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(); - if (subsDescriptorBuilder_ == null) { - subsDescriptor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - subsDescriptorBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_SubsList_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.SubsList getDefaultInstanceForType() { - return monitoring.Monitoring.SubsList.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.SubsList build() { - monitoring.Monitoring.SubsList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public monitoring.Monitoring.SubsList buildPartial() { - monitoring.Monitoring.SubsList result = new monitoring.Monitoring.SubsList(this); - int from_bitField0_ = bitField0_; - if (subsDescriptorBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - subsDescriptor_ = java.util.Collections.unmodifiableList(subsDescriptor_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.subsDescriptor_ = subsDescriptor_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.SubsList) { - return mergeFrom((monitoring.Monitoring.SubsList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.SubsList other) { - if (other == monitoring.Monitoring.SubsList.getDefaultInstance()) return this; - if (subsDescriptorBuilder_ == null) { - if (!other.subsDescriptor_.isEmpty()) { - if (subsDescriptor_.isEmpty()) { - subsDescriptor_ = other.subsDescriptor_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSubsDescriptorIsMutable(); - subsDescriptor_.addAll(other.subsDescriptor_); - } - onChanged(); - } - } else { - if (!other.subsDescriptor_.isEmpty()) { - if (subsDescriptorBuilder_.isEmpty()) { - subsDescriptorBuilder_.dispose(); - subsDescriptorBuilder_ = null; - subsDescriptor_ = other.subsDescriptor_; - bitField0_ = (bitField0_ & ~0x00000001); - subsDescriptorBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubsDescriptorFieldBuilder() : null; - } else { - subsDescriptorBuilder_.addAllMessages(other.subsDescriptor_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubsList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List subsDescriptor_ = - java.util.Collections.emptyList(); - private void ensureSubsDescriptorIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - subsDescriptor_ = new java.util.ArrayList(subsDescriptor_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsDescriptor.Builder, monitoring.Monitoring.SubsDescriptorOrBuilder> subsDescriptorBuilder_; - - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public java.util.List getSubsDescriptorList() { - if (subsDescriptorBuilder_ == null) { - return java.util.Collections.unmodifiableList(subsDescriptor_); - } else { - return subsDescriptorBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public int getSubsDescriptorCount() { - if (subsDescriptorBuilder_ == null) { - return subsDescriptor_.size(); - } else { - return subsDescriptorBuilder_.getCount(); - } - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(int index) { - if (subsDescriptorBuilder_ == null) { - return subsDescriptor_.get(index); - } else { - return subsDescriptorBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder setSubsDescriptor( - int index, monitoring.Monitoring.SubsDescriptor value) { - if (subsDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubsDescriptorIsMutable(); - subsDescriptor_.set(index, value); - onChanged(); - } else { - subsDescriptorBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder setSubsDescriptor( - int index, monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { - if (subsDescriptorBuilder_ == null) { - ensureSubsDescriptorIsMutable(); - subsDescriptor_.set(index, builderForValue.build()); - onChanged(); - } else { - subsDescriptorBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder addSubsDescriptor(monitoring.Monitoring.SubsDescriptor value) { - if (subsDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubsDescriptorIsMutable(); - subsDescriptor_.add(value); - onChanged(); - } else { - subsDescriptorBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder addSubsDescriptor( - int index, monitoring.Monitoring.SubsDescriptor value) { - if (subsDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubsDescriptorIsMutable(); - subsDescriptor_.add(index, value); - onChanged(); - } else { - subsDescriptorBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder addSubsDescriptor( - monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { - if (subsDescriptorBuilder_ == null) { - ensureSubsDescriptorIsMutable(); - subsDescriptor_.add(builderForValue.build()); - onChanged(); - } else { - subsDescriptorBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder addSubsDescriptor( - int index, monitoring.Monitoring.SubsDescriptor.Builder builderForValue) { - if (subsDescriptorBuilder_ == null) { - ensureSubsDescriptorIsMutable(); - subsDescriptor_.add(index, builderForValue.build()); - onChanged(); - } else { - subsDescriptorBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder addAllSubsDescriptor( - java.lang.Iterable values) { - if (subsDescriptorBuilder_ == null) { - ensureSubsDescriptorIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subsDescriptor_); - onChanged(); - } else { - subsDescriptorBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder clearSubsDescriptor() { - if (subsDescriptorBuilder_ == null) { - subsDescriptor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - subsDescriptorBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public Builder removeSubsDescriptor(int index) { - if (subsDescriptorBuilder_ == null) { - ensureSubsDescriptorIsMutable(); - subsDescriptor_.remove(index); - onChanged(); - } else { - subsDescriptorBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public monitoring.Monitoring.SubsDescriptor.Builder getSubsDescriptorBuilder( - int index) { - return getSubsDescriptorFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public monitoring.Monitoring.SubsDescriptorOrBuilder getSubsDescriptorOrBuilder( - int index) { - if (subsDescriptorBuilder_ == null) { - return subsDescriptor_.get(index); } else { - return subsDescriptorBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public java.util.List - getSubsDescriptorOrBuilderList() { - if (subsDescriptorBuilder_ != null) { - return subsDescriptorBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subsDescriptor_); - } - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public monitoring.Monitoring.SubsDescriptor.Builder addSubsDescriptorBuilder() { - return getSubsDescriptorFieldBuilder().addBuilder( - monitoring.Monitoring.SubsDescriptor.getDefaultInstance()); - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public monitoring.Monitoring.SubsDescriptor.Builder addSubsDescriptorBuilder( - int index) { - return getSubsDescriptorFieldBuilder().addBuilder( - index, monitoring.Monitoring.SubsDescriptor.getDefaultInstance()); - } - /** - * repeated .monitoring.SubsDescriptor subs_descriptor = 1; - */ - public java.util.List - getSubsDescriptorBuilderList() { - return getSubsDescriptorFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsDescriptor.Builder, monitoring.Monitoring.SubsDescriptorOrBuilder> - getSubsDescriptorFieldBuilder() { - if (subsDescriptorBuilder_ == null) { - subsDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsDescriptor.Builder, monitoring.Monitoring.SubsDescriptorOrBuilder>( - subsDescriptor_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - subsDescriptor_ = null; - } - return subsDescriptorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.SubsList) - } + public static final class AlarmList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:monitoring.AlarmList) + AlarmListOrBuilder { - // @@protoc_insertion_point(class_scope:monitoring.SubsList) - private static final monitoring.Monitoring.SubsList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.SubsList(); - } + private static final long serialVersionUID = 0L; - public static monitoring.Monitoring.SubsList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Use AlarmList.newBuilder() to construct. + private AlarmList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private AlarmList() { + alarmDescriptor_ = java.util.Collections.emptyList(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AlarmList(); + } - @java.lang.Override - public monitoring.Monitoring.SubsList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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(); + 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 interface AlarmDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.AlarmDescriptor) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; + } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - boolean hasAlarmId(); - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - monitoring.Monitoring.AlarmID getAlarmId(); - /** - * .monitoring.AlarmID alarm_id = 1; - */ - monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmList.class, monitoring.Monitoring.AlarmList.Builder.class); + } - /** - * string alarm_description = 2; - * @return The alarmDescription. - */ - java.lang.String getAlarmDescription(); - /** - * string alarm_description = 2; - * @return The bytes for alarmDescription. - */ - com.google.protobuf.ByteString - getAlarmDescriptionBytes(); + public static final int ALARM_DESCRIPTOR_FIELD_NUMBER = 1; - /** - * string name = 3; - * @return The name. - */ - java.lang.String getName(); - /** - * string name = 3; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); + private java.util.List alarmDescriptor_; - /** - * .monitoring.KpiId kpi_id = 4; - * @return Whether the kpiId field is set. - */ - boolean hasKpiId(); - /** - * .monitoring.KpiId kpi_id = 4; - * @return The kpiId. - */ - monitoring.Monitoring.KpiId getKpiId(); - /** - * .monitoring.KpiId kpi_id = 4; - */ - monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + @java.lang.Override + public java.util.List getAlarmDescriptorList() { + return alarmDescriptor_; + } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - * @return Whether the kpiValueRange field is set. - */ - boolean hasKpiValueRange(); - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - * @return The kpiValueRange. - */ - monitoring.Monitoring.KpiValueRange getKpiValueRange(); - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder(); + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + @java.lang.Override + public java.util.List getAlarmDescriptorOrBuilderList() { + return alarmDescriptor_; + } - /** - * .context.Timestamp timestamp = 6; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .context.Timestamp timestamp = 6; - * @return The timestamp. - */ - context.ContextOuterClass.Timestamp getTimestamp(); - /** - * .context.Timestamp timestamp = 6; - */ - context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder(); - } - /** - * Protobuf type {@code monitoring.AlarmDescriptor} - */ - public static final class AlarmDescriptor extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.AlarmDescriptor) - AlarmDescriptorOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlarmDescriptor.newBuilder() to construct. - private AlarmDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AlarmDescriptor() { - alarmDescription_ = ""; - name_ = ""; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + @java.lang.Override + public int getAlarmDescriptorCount() { + return alarmDescriptor_.size(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AlarmDescriptor(); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + @java.lang.Override + public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index) { + return alarmDescriptor_.get(index); + } - @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; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + @java.lang.Override + public monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder(int index) { + return alarmDescriptor_.get(index); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmDescriptor.class, monitoring.Monitoring.AlarmDescriptor.Builder.class); - } + private byte memoizedIsInitialized = -1; - public static final int ALARM_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.AlarmID alarmId_; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - @java.lang.Override - public boolean hasAlarmId() { - return alarmId_ != null; - } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - @java.lang.Override - public monitoring.Monitoring.AlarmID getAlarmId() { - return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - return getAlarmId(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - public static final int ALARM_DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object alarmDescription_; - /** - * string alarm_description = 2; - * @return The alarmDescription. - */ - @java.lang.Override - public java.lang.String getAlarmDescription() { - java.lang.Object ref = alarmDescription_; - 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(); - alarmDescription_ = s; - return s; - } - } - /** - * string alarm_description = 2; - * @return The bytes for alarmDescription. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAlarmDescriptionBytes() { - java.lang.Object ref = alarmDescription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - alarmDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < alarmDescriptor_.size(); i++) { + output.writeMessage(1, alarmDescriptor_.get(i)); + } + unknownFields.writeTo(output); + } - public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; - /** - * string name = 3; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - * string name = 3; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < alarmDescriptor_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, alarmDescriptor_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - public static final int KPI_ID_FIELD_NUMBER = 4; - private monitoring.Monitoring.KpiId kpiId_; - /** - * .monitoring.KpiId kpi_id = 4; - * @return Whether the kpiId field is set. - */ - @java.lang.Override - public boolean hasKpiId() { - return kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 4; - * @return The kpiId. - */ - @java.lang.Override - public monitoring.Monitoring.KpiId getKpiId() { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - @java.lang.Override - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof monitoring.Monitoring.AlarmList)) { + return super.equals(obj); + } + monitoring.Monitoring.AlarmList other = (monitoring.Monitoring.AlarmList) obj; + if (!getAlarmDescriptorList().equals(other.getAlarmDescriptorList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAlarmDescriptorCount() > 0) { + hash = (37 * hash) + ALARM_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getAlarmDescriptorList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - public static final int KPI_VALUE_RANGE_FIELD_NUMBER = 5; - private monitoring.Monitoring.KpiValueRange kpiValueRange_; - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - * @return Whether the kpiValueRange field is set. - */ - @java.lang.Override - public boolean hasKpiValueRange() { - return kpiValueRange_ != null; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - * @return The kpiValueRange. - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueRange getKpiValueRange() { - return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - @java.lang.Override - public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { - return getKpiValueRange(); - } + public static monitoring.Monitoring.AlarmList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int TIMESTAMP_FIELD_NUMBER = 6; - private context.ContextOuterClass.Timestamp timestamp_; - /** - * .context.Timestamp timestamp = 6; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 6; - * @return The timestamp. - */ - @java.lang.Override - public context.ContextOuterClass.Timestamp getTimestamp() { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .context.Timestamp timestamp = 6; - */ - @java.lang.Override - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } + public static monitoring.Monitoring.AlarmList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static monitoring.Monitoring.AlarmList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - memoizedIsInitialized = 1; - return true; - } + public static monitoring.Monitoring.AlarmList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (alarmId_ != null) { - output.writeMessage(1, getAlarmId()); - } - if (!getAlarmDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, alarmDescription_); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); - } - if (kpiId_ != null) { - output.writeMessage(4, getKpiId()); - } - if (kpiValueRange_ != null) { - output.writeMessage(5, getKpiValueRange()); - } - if (timestamp_ != null) { - output.writeMessage(6, getTimestamp()); - } - unknownFields.writeTo(output); - } + public static monitoring.Monitoring.AlarmList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (alarmId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAlarmId()); - } - if (!getAlarmDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, alarmDescription_); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); - } - if (kpiId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getKpiId()); - } - if (kpiValueRange_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getKpiValueRange()); - } - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getTimestamp()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + public static monitoring.Monitoring.AlarmList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.AlarmDescriptor)) { - return super.equals(obj); - } - monitoring.Monitoring.AlarmDescriptor other = (monitoring.Monitoring.AlarmDescriptor) obj; - - if (hasAlarmId() != other.hasAlarmId()) return false; - if (hasAlarmId()) { - if (!getAlarmId() - .equals(other.getAlarmId())) return false; - } - if (!getAlarmDescription() - .equals(other.getAlarmDescription())) return false; - if (!getName() - .equals(other.getName())) return false; - if (hasKpiId() != other.hasKpiId()) return false; - if (hasKpiId()) { - if (!getKpiId() - .equals(other.getKpiId())) return false; - } - if (hasKpiValueRange() != other.hasKpiValueRange()) return false; - if (hasKpiValueRange()) { - if (!getKpiValueRange() - .equals(other.getKpiValueRange())) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static monitoring.Monitoring.AlarmList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAlarmId()) { - hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; - hash = (53 * hash) + getAlarmId().hashCode(); - } - hash = (37 * hash) + ALARM_DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getAlarmDescription().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasKpiId()) { - hash = (37 * hash) + KPI_ID_FIELD_NUMBER; - hash = (53 * hash) + getKpiId().hashCode(); - } - if (hasKpiValueRange()) { - hash = (37 * hash) + KPI_VALUE_RANGE_FIELD_NUMBER; - hash = (53 * hash) + getKpiValueRange().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + public static monitoring.Monitoring.AlarmList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmDescriptor parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmDescriptor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static monitoring.Monitoring.AlarmList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.AlarmDescriptor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static monitoring.Monitoring.AlarmList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.AlarmDescriptor} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.AlarmDescriptor) - monitoring.Monitoring.AlarmDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmDescriptor.class, monitoring.Monitoring.AlarmDescriptor.Builder.class); - } - - // 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; - alarmIdBuilder_ = null; - } - alarmDescription_ = ""; - - name_ = ""; - - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - if (kpiValueRangeBuilder_ == null) { - kpiValueRange_ = null; - } else { - kpiValueRange_ = null; - kpiValueRangeBuilder_ = null; - } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.AlarmDescriptor getDefaultInstanceForType() { - return monitoring.Monitoring.AlarmDescriptor.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.AlarmDescriptor build() { - monitoring.Monitoring.AlarmDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.AlarmDescriptor) { - return mergeFrom((monitoring.Monitoring.AlarmDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.AlarmDescriptor other) { - if (other == monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()) return this; - if (other.hasAlarmId()) { - mergeAlarmId(other.getAlarmId()); - } - if (!other.getAlarmDescription().isEmpty()) { - alarmDescription_ = other.alarmDescription_; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasKpiId()) { - mergeKpiId(other.getKpiId()); - } - if (other.hasKpiValueRange()) { - mergeKpiValueRange(other.getKpiValueRange()); - } - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmDescriptor) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.AlarmID alarmId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIdBuilder_; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - public boolean hasAlarmId() { - return alarmIdBuilder_ != null || alarmId_ != null; - } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - public monitoring.Monitoring.AlarmID getAlarmId() { - if (alarmIdBuilder_ == null) { - return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } else { - return alarmIdBuilder_.getMessage(); - } - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { - if (alarmIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - alarmId_ = value; - onChanged(); - } else { - alarmIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder setAlarmId( - monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmIdBuilder_ == null) { - alarmId_ = builderForValue.build(); - onChanged(); - } else { - alarmIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { - if (alarmIdBuilder_ == null) { - if (alarmId_ != null) { - alarmId_ = - monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); - } else { - alarmId_ = value; - } - onChanged(); - } else { - alarmIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder clearAlarmId() { - if (alarmIdBuilder_ == null) { - alarmId_ = null; - onChanged(); - } else { - alarmId_ = null; - alarmIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { - - onChanged(); - return getAlarmIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - if (alarmIdBuilder_ != null) { - return alarmIdBuilder_.getMessageOrBuilder(); - } else { - return alarmId_ == null ? - monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmIdFieldBuilder() { - if (alarmIdBuilder_ == null) { - alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder>( - getAlarmId(), - getParentForChildren(), - isClean()); - alarmId_ = null; - } - return alarmIdBuilder_; - } - - private java.lang.Object alarmDescription_ = ""; - /** - * string alarm_description = 2; - * @return The alarmDescription. - */ - public java.lang.String getAlarmDescription() { - java.lang.Object ref = alarmDescription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - alarmDescription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string alarm_description = 2; - * @return The bytes for alarmDescription. - */ - public com.google.protobuf.ByteString - getAlarmDescriptionBytes() { - java.lang.Object ref = alarmDescription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - alarmDescription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string alarm_description = 2; - * @param value The alarmDescription to set. - * @return This builder for chaining. - */ - public Builder setAlarmDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - alarmDescription_ = value; - onChanged(); - return this; - } - /** - * string alarm_description = 2; - * @return This builder for chaining. - */ - public Builder clearAlarmDescription() { - - alarmDescription_ = getDefaultInstance().getAlarmDescription(); - onChanged(); - return this; - } - /** - * string alarm_description = 2; - * @param value The bytes for alarmDescription to set. - * @return This builder for chaining. - */ - public Builder setAlarmDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - alarmDescription_ = value; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - * string name = 3; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string name = 3; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string name = 3; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string name = 3; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string name = 3; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private monitoring.Monitoring.KpiId kpiId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; - /** - * .monitoring.KpiId kpi_id = 4; - * @return Whether the kpiId field is set. - */ - public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; - } - /** - * .monitoring.KpiId kpi_id = 4; - * @return The kpiId. - */ - public monitoring.Monitoring.KpiId getKpiId() { - if (kpiIdBuilder_ == null) { - return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } else { - return kpiIdBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - public Builder setKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiId_ = value; - onChanged(); - } else { - kpiIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - public Builder setKpiId( - monitoring.Monitoring.KpiId.Builder builderForValue) { - if (kpiIdBuilder_ == null) { - kpiId_ = builderForValue.build(); - onChanged(); - } else { - kpiIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { - if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = - monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); - } else { - kpiId_ = value; - } - onChanged(); - } else { - kpiIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; - kpiIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { - - onChanged(); - return getKpiIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - if (kpiIdBuilder_ != null) { - return kpiIdBuilder_.getMessageOrBuilder(); - } else { - return kpiId_ == null ? - monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; - } - } - /** - * .monitoring.KpiId kpi_id = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> - getKpiIdFieldBuilder() { - if (kpiIdBuilder_ == null) { - kpiIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>( - getKpiId(), - getParentForChildren(), - isClean()); - kpiId_ = null; - } - return kpiIdBuilder_; - } - - private monitoring.Monitoring.KpiValueRange kpiValueRange_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder> kpiValueRangeBuilder_; - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - * @return Whether the kpiValueRange field is set. - */ - public boolean hasKpiValueRange() { - return kpiValueRangeBuilder_ != null || kpiValueRange_ != null; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - * @return The kpiValueRange. - */ - public monitoring.Monitoring.KpiValueRange getKpiValueRange() { - if (kpiValueRangeBuilder_ == null) { - return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; - } else { - return kpiValueRangeBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder setKpiValueRange(monitoring.Monitoring.KpiValueRange value) { - if (kpiValueRangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiValueRange_ = value; - onChanged(); - } else { - kpiValueRangeBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder setKpiValueRange( - monitoring.Monitoring.KpiValueRange.Builder builderForValue) { - if (kpiValueRangeBuilder_ == null) { - kpiValueRange_ = builderForValue.build(); - onChanged(); - } else { - kpiValueRangeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder mergeKpiValueRange(monitoring.Monitoring.KpiValueRange value) { - if (kpiValueRangeBuilder_ == null) { - if (kpiValueRange_ != null) { - kpiValueRange_ = - monitoring.Monitoring.KpiValueRange.newBuilder(kpiValueRange_).mergeFrom(value).buildPartial(); - } else { - kpiValueRange_ = value; - } - onChanged(); - } else { - kpiValueRangeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - public Builder clearKpiValueRange() { - if (kpiValueRangeBuilder_ == null) { - kpiValueRange_ = null; - onChanged(); - } else { - kpiValueRange_ = null; - kpiValueRangeBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - public monitoring.Monitoring.KpiValueRange.Builder getKpiValueRangeBuilder() { - - onChanged(); - return getKpiValueRangeFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { - if (kpiValueRangeBuilder_ != null) { - return kpiValueRangeBuilder_.getMessageOrBuilder(); - } else { - return kpiValueRange_ == null ? - monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; - } - } - /** - * .monitoring.KpiValueRange kpi_value_range = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder> - getKpiValueRangeFieldBuilder() { - if (kpiValueRangeBuilder_ == null) { - kpiValueRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiValueRange, monitoring.Monitoring.KpiValueRange.Builder, monitoring.Monitoring.KpiValueRangeOrBuilder>( - getKpiValueRange(), - getParentForChildren(), - isClean()); - kpiValueRange_ = null; - } - return kpiValueRangeBuilder_; - } - - private context.ContextOuterClass.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; - /** - * .context.Timestamp timestamp = 6; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - * .context.Timestamp timestamp = 6; - * @return The timestamp. - */ - public context.ContextOuterClass.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - * .context.Timestamp timestamp = 6; - */ - public Builder setTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 6; - */ - public Builder setTimestamp( - context.ContextOuterClass.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Timestamp timestamp = 6; - */ - public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Timestamp timestamp = 6; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - * .context.Timestamp timestamp = 6; - */ - public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - * .context.Timestamp timestamp = 6; - */ - public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - * .context.Timestamp timestamp = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.AlarmDescriptor) - } + public static monitoring.Monitoring.AlarmList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - // @@protoc_insertion_point(class_scope:monitoring.AlarmDescriptor) - private static final monitoring.Monitoring.AlarmDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmDescriptor(); - } + public static monitoring.Monitoring.AlarmList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - public static monitoring.Monitoring.AlarmDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static Builder newBuilder(monitoring.Monitoring.AlarmList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - public monitoring.Monitoring.AlarmDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public interface AlarmIDOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.AlarmID) - com.google.protobuf.MessageOrBuilder { + /** + * Protobuf type {@code monitoring.AlarmList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:monitoring.AlarmList) + monitoring.Monitoring.AlarmListOrBuilder { - /** - * .context.Uuid alarm_id = 1; - * @return Whether the alarmId field is set. - */ - boolean hasAlarmId(); - /** - * .context.Uuid alarm_id = 1; - * @return The alarmId. - */ - context.ContextOuterClass.Uuid getAlarmId(); - /** - * .context.Uuid alarm_id = 1; - */ - context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder(); - } - /** - * Protobuf type {@code monitoring.AlarmID} - */ - public static final class AlarmID extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.AlarmID) - AlarmIDOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlarmID.newBuilder() to construct. - private AlarmID(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AlarmID() { - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AlarmID(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_AlarmList_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.AlarmList.class, monitoring.Monitoring.AlarmList.Builder.class); + } - @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; - } + // Construct using monitoring.Monitoring.AlarmList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmID.class, monitoring.Monitoring.AlarmID.Builder.class); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public static final int ALARM_ID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid alarmId_; - /** - * .context.Uuid alarm_id = 1; - * @return Whether the alarmId field is set. - */ - @java.lang.Override - public boolean hasAlarmId() { - return alarmId_ != null; - } - /** - * .context.Uuid alarm_id = 1; - * @return The alarmId. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getAlarmId() { - return alarmId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; - } - /** - * .context.Uuid alarm_id = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder() { - return getAlarmId(); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAlarmDescriptorFieldBuilder(); + } + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder clear() { + super.clear(); + if (alarmDescriptorBuilder_ == null) { + alarmDescriptor_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + alarmDescriptorBuilder_.clear(); + } + return this; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (alarmId_ != null) { - output.writeMessage(1, getAlarmId()); - } - unknownFields.writeTo(output); - } + @java.lang.Override + public monitoring.Monitoring.AlarmList getDefaultInstanceForType() { + return monitoring.Monitoring.AlarmList.getDefaultInstance(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (alarmId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAlarmId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public monitoring.Monitoring.AlarmList build() { + monitoring.Monitoring.AlarmList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.AlarmID)) { - return super.equals(obj); - } - monitoring.Monitoring.AlarmID other = (monitoring.Monitoring.AlarmID) obj; - - if (hasAlarmId() != other.hasAlarmId()) return false; - if (hasAlarmId()) { - if (!getAlarmId() - .equals(other.getAlarmId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public monitoring.Monitoring.AlarmList buildPartial() { + monitoring.Monitoring.AlarmList result = new monitoring.Monitoring.AlarmList(this); + int from_bitField0_ = bitField0_; + if (alarmDescriptorBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + alarmDescriptor_ = java.util.Collections.unmodifiableList(alarmDescriptor_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.alarmDescriptor_ = alarmDescriptor_; + } else { + result.alarmDescriptor_ = alarmDescriptorBuilder_.build(); + } + onBuilt(); + return result; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAlarmId()) { - hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; - hash = (53 * hash) + getAlarmId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public static monitoring.Monitoring.AlarmID parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmID parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmID parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmID parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmID parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmID parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmID parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmID parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmID parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmID parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmID parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmID parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @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 newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.AlarmID prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @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 - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.AlarmID} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.AlarmID) - monitoring.Monitoring.AlarmIDOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmID_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmID_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmID.class, monitoring.Monitoring.AlarmID.Builder.class); - } - - // 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; - alarmIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_AlarmID_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.AlarmID getDefaultInstanceForType() { - return monitoring.Monitoring.AlarmID.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.AlarmID build() { - monitoring.Monitoring.AlarmID result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.AlarmID) { - return mergeFrom((monitoring.Monitoring.AlarmID)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.AlarmID other) { - if (other == monitoring.Monitoring.AlarmID.getDefaultInstance()) return this; - if (other.hasAlarmId()) { - mergeAlarmId(other.getAlarmId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmID) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid alarmId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> alarmIdBuilder_; - /** - * .context.Uuid alarm_id = 1; - * @return Whether the alarmId field is set. - */ - public boolean hasAlarmId() { - return alarmIdBuilder_ != null || alarmId_ != null; - } - /** - * .context.Uuid alarm_id = 1; - * @return The alarmId. - */ - public context.ContextOuterClass.Uuid getAlarmId() { - if (alarmIdBuilder_ == null) { - return alarmId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; - } else { - return alarmIdBuilder_.getMessage(); - } - } - /** - * .context.Uuid alarm_id = 1; - */ - public Builder setAlarmId(context.ContextOuterClass.Uuid value) { - if (alarmIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - alarmId_ = value; - onChanged(); - } else { - alarmIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid alarm_id = 1; - */ - public Builder setAlarmId( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (alarmIdBuilder_ == null) { - alarmId_ = builderForValue.build(); - onChanged(); - } else { - alarmIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid alarm_id = 1; - */ - public Builder mergeAlarmId(context.ContextOuterClass.Uuid value) { - if (alarmIdBuilder_ == null) { - if (alarmId_ != null) { - alarmId_ = - context.ContextOuterClass.Uuid.newBuilder(alarmId_).mergeFrom(value).buildPartial(); - } else { - alarmId_ = value; - } - onChanged(); - } else { - alarmIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid alarm_id = 1; - */ - public Builder clearAlarmId() { - if (alarmIdBuilder_ == null) { - alarmId_ = null; - onChanged(); - } else { - alarmId_ = null; - alarmIdBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid alarm_id = 1; - */ - public context.ContextOuterClass.Uuid.Builder getAlarmIdBuilder() { - - onChanged(); - return getAlarmIdFieldBuilder().getBuilder(); - } - /** - * .context.Uuid alarm_id = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder() { - if (alarmIdBuilder_ != null) { - return alarmIdBuilder_.getMessageOrBuilder(); - } else { - return alarmId_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; - } - } - /** - * .context.Uuid alarm_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getAlarmIdFieldBuilder() { - if (alarmIdBuilder_ == null) { - alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getAlarmId(), - getParentForChildren(), - isClean()); - alarmId_ = null; - } - return alarmIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.AlarmID) - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof monitoring.Monitoring.AlarmList) { + return mergeFrom((monitoring.Monitoring.AlarmList) other); + } else { + super.mergeFrom(other); + return this; + } + } - // @@protoc_insertion_point(class_scope:monitoring.AlarmID) - private static final monitoring.Monitoring.AlarmID DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmID(); - } + public Builder mergeFrom(monitoring.Monitoring.AlarmList other) { + if (other == monitoring.Monitoring.AlarmList.getDefaultInstance()) + return this; + if (alarmDescriptorBuilder_ == null) { + if (!other.alarmDescriptor_.isEmpty()) { + if (alarmDescriptor_.isEmpty()) { + alarmDescriptor_ = other.alarmDescriptor_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.addAll(other.alarmDescriptor_); + } + onChanged(); + } + } else { + if (!other.alarmDescriptor_.isEmpty()) { + if (alarmDescriptorBuilder_.isEmpty()) { + alarmDescriptorBuilder_.dispose(); + alarmDescriptorBuilder_ = null; + alarmDescriptor_ = other.alarmDescriptor_; + bitField0_ = (bitField0_ & ~0x00000001); + alarmDescriptorBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getAlarmDescriptorFieldBuilder() : null; + } else { + alarmDescriptorBuilder_.addAllMessages(other.alarmDescriptor_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - public static monitoring.Monitoring.AlarmID getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @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; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (monitoring.Monitoring.AlarmList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private int bitField0_; - @java.lang.Override - public monitoring.Monitoring.AlarmID getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private java.util.List alarmDescriptor_ = java.util.Collections.emptyList(); - } + private void ensureAlarmDescriptorIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + alarmDescriptor_ = new java.util.ArrayList(alarmDescriptor_); + bitField0_ |= 0x00000001; + } + } - public interface AlarmSubscriptionOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.AlarmSubscription) - com.google.protobuf.MessageOrBuilder { + private com.google.protobuf.RepeatedFieldBuilderV3 alarmDescriptorBuilder_; + + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public java.util.List getAlarmDescriptorList() { + if (alarmDescriptorBuilder_ == null) { + return java.util.Collections.unmodifiableList(alarmDescriptor_); + } else { + return alarmDescriptorBuilder_.getMessageList(); + } + } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - boolean hasAlarmId(); - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - monitoring.Monitoring.AlarmID getAlarmId(); - /** - * .monitoring.AlarmID alarm_id = 1; - */ - monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public int getAlarmDescriptorCount() { + if (alarmDescriptorBuilder_ == null) { + return alarmDescriptor_.size(); + } else { + return alarmDescriptorBuilder_.getCount(); + } + } - /** - * float subscription_timeout_s = 2; - * @return The subscriptionTimeoutS. - */ - float getSubscriptionTimeoutS(); + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index) { + if (alarmDescriptorBuilder_ == null) { + return alarmDescriptor_.get(index); + } else { + return alarmDescriptorBuilder_.getMessage(index); + } + } - /** - * float subscription_frequency_ms = 3; - * @return The subscriptionFrequencyMs. - */ - float getSubscriptionFrequencyMs(); - } - /** - * Protobuf type {@code monitoring.AlarmSubscription} - */ - public static final class AlarmSubscription extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.AlarmSubscription) - AlarmSubscriptionOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlarmSubscription.newBuilder() to construct. - private AlarmSubscription(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AlarmSubscription() { - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder setAlarmDescriptor(int index, monitoring.Monitoring.AlarmDescriptor value) { + if (alarmDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.set(index, value); + onChanged(); + } else { + alarmDescriptorBuilder_.setMessage(index, value); + } + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AlarmSubscription(); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder setAlarmDescriptor(int index, monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.set(index, builderForValue.build()); + onChanged(); + } else { + alarmDescriptorBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - @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; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder addAlarmDescriptor(monitoring.Monitoring.AlarmDescriptor value) { + if (alarmDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(value); + onChanged(); + } else { + alarmDescriptorBuilder_.addMessage(value); + } + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmSubscription.class, monitoring.Monitoring.AlarmSubscription.Builder.class); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder addAlarmDescriptor(int index, monitoring.Monitoring.AlarmDescriptor value) { + if (alarmDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(index, value); + onChanged(); + } else { + alarmDescriptorBuilder_.addMessage(index, value); + } + return this; + } - public static final int ALARM_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.AlarmID alarmId_; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - @java.lang.Override - public boolean hasAlarmId() { - return alarmId_ != null; - } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - @java.lang.Override - public monitoring.Monitoring.AlarmID getAlarmId() { - return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - return getAlarmId(); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder addAlarmDescriptor(monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(builderForValue.build()); + onChanged(); + } else { + alarmDescriptorBuilder_.addMessage(builderForValue.build()); + } + return this; + } - public static final int SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER = 2; - private float subscriptionTimeoutS_; - /** - * float subscription_timeout_s = 2; - * @return The subscriptionTimeoutS. - */ - @java.lang.Override - public float getSubscriptionTimeoutS() { - return subscriptionTimeoutS_; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder addAlarmDescriptor(int index, monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(index, builderForValue.build()); + onChanged(); + } else { + alarmDescriptorBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - public static final int SUBSCRIPTION_FREQUENCY_MS_FIELD_NUMBER = 3; - private float subscriptionFrequencyMs_; - /** - * float subscription_frequency_ms = 3; - * @return The subscriptionFrequencyMs. - */ - @java.lang.Override - public float getSubscriptionFrequencyMs() { - return subscriptionFrequencyMs_; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder addAllAlarmDescriptor(java.lang.Iterable values) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, alarmDescriptor_); + onChanged(); + } else { + alarmDescriptorBuilder_.addAllMessages(values); + } + return this; + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder clearAlarmDescriptor() { + if (alarmDescriptorBuilder_ == null) { + alarmDescriptor_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + alarmDescriptorBuilder_.clear(); + } + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public Builder removeAlarmDescriptor(int index) { + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.remove(index); + onChanged(); + } else { + alarmDescriptorBuilder_.remove(index); + } + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (alarmId_ != null) { - output.writeMessage(1, getAlarmId()); - } - if (subscriptionTimeoutS_ != 0F) { - output.writeFloat(2, subscriptionTimeoutS_); - } - if (subscriptionFrequencyMs_ != 0F) { - output.writeFloat(3, subscriptionFrequencyMs_); - } - unknownFields.writeTo(output); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public monitoring.Monitoring.AlarmDescriptor.Builder getAlarmDescriptorBuilder(int index) { + return getAlarmDescriptorFieldBuilder().getBuilder(index); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (alarmId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAlarmId()); - } - if (subscriptionTimeoutS_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, subscriptionTimeoutS_); - } - if (subscriptionFrequencyMs_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, subscriptionFrequencyMs_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder(int index) { + if (alarmDescriptorBuilder_ == null) { + return alarmDescriptor_.get(index); + } else { + return alarmDescriptorBuilder_.getMessageOrBuilder(index); + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.AlarmSubscription)) { - return super.equals(obj); - } - monitoring.Monitoring.AlarmSubscription other = (monitoring.Monitoring.AlarmSubscription) obj; - - if (hasAlarmId() != other.hasAlarmId()) return false; - if (hasAlarmId()) { - if (!getAlarmId() - .equals(other.getAlarmId())) return false; - } - if (java.lang.Float.floatToIntBits(getSubscriptionTimeoutS()) - != java.lang.Float.floatToIntBits( - other.getSubscriptionTimeoutS())) return false; - if (java.lang.Float.floatToIntBits(getSubscriptionFrequencyMs()) - != java.lang.Float.floatToIntBits( - other.getSubscriptionFrequencyMs())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public java.util.List getAlarmDescriptorOrBuilderList() { + if (alarmDescriptorBuilder_ != null) { + return alarmDescriptorBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(alarmDescriptor_); + } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAlarmId()) { - hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; - hash = (53 * hash) + getAlarmId().hashCode(); - } - hash = (37 * hash) + SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER; - 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(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public monitoring.Monitoring.AlarmDescriptor.Builder addAlarmDescriptorBuilder() { + return getAlarmDescriptorFieldBuilder().addBuilder(monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()); + } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmSubscription parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmSubscription parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmSubscription parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public monitoring.Monitoring.AlarmDescriptor.Builder addAlarmDescriptorBuilder(int index) { + return getAlarmDescriptorFieldBuilder().addBuilder(index, monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.AlarmSubscription prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; + */ + public java.util.List getAlarmDescriptorBuilderList() { + return getAlarmDescriptorFieldBuilder().getBuilderList(); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.AlarmSubscription} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.AlarmSubscription) - monitoring.Monitoring.AlarmSubscriptionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmSubscription.class, monitoring.Monitoring.AlarmSubscription.Builder.class); - } - - // 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; - alarmIdBuilder_ = null; - } - subscriptionTimeoutS_ = 0F; - - subscriptionFrequencyMs_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.AlarmSubscription getDefaultInstanceForType() { - return monitoring.Monitoring.AlarmSubscription.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.AlarmSubscription build() { - monitoring.Monitoring.AlarmSubscription result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.AlarmSubscription) { - return mergeFrom((monitoring.Monitoring.AlarmSubscription)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.AlarmSubscription other) { - if (other == monitoring.Monitoring.AlarmSubscription.getDefaultInstance()) return this; - if (other.hasAlarmId()) { - mergeAlarmId(other.getAlarmId()); - } - if (other.getSubscriptionTimeoutS() != 0F) { - setSubscriptionTimeoutS(other.getSubscriptionTimeoutS()); - } - if (other.getSubscriptionFrequencyMs() != 0F) { - setSubscriptionFrequencyMs(other.getSubscriptionFrequencyMs()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmSubscription) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.AlarmID alarmId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIdBuilder_; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - public boolean hasAlarmId() { - return alarmIdBuilder_ != null || alarmId_ != null; - } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - public monitoring.Monitoring.AlarmID getAlarmId() { - if (alarmIdBuilder_ == null) { - return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } else { - return alarmIdBuilder_.getMessage(); - } - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { - if (alarmIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - alarmId_ = value; - onChanged(); - } else { - alarmIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder setAlarmId( - monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmIdBuilder_ == null) { - alarmId_ = builderForValue.build(); - onChanged(); - } else { - alarmIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { - if (alarmIdBuilder_ == null) { - if (alarmId_ != null) { - alarmId_ = - monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); - } else { - alarmId_ = value; - } - onChanged(); - } else { - alarmIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder clearAlarmId() { - if (alarmIdBuilder_ == null) { - alarmId_ = null; - onChanged(); - } else { - alarmId_ = null; - alarmIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { - - onChanged(); - return getAlarmIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - if (alarmIdBuilder_ != null) { - return alarmIdBuilder_.getMessageOrBuilder(); - } else { - return alarmId_ == null ? - monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmIdFieldBuilder() { - if (alarmIdBuilder_ == null) { - alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder>( - getAlarmId(), - getParentForChildren(), - isClean()); - alarmId_ = null; - } - return alarmIdBuilder_; - } - - private float subscriptionTimeoutS_ ; - /** - * float subscription_timeout_s = 2; - * @return The subscriptionTimeoutS. - */ - @java.lang.Override - public float getSubscriptionTimeoutS() { - return subscriptionTimeoutS_; - } - /** - * float subscription_timeout_s = 2; - * @param value The subscriptionTimeoutS to set. - * @return This builder for chaining. - */ - public Builder setSubscriptionTimeoutS(float value) { - - subscriptionTimeoutS_ = value; - onChanged(); - return this; - } - /** - * float subscription_timeout_s = 2; - * @return This builder for chaining. - */ - public Builder clearSubscriptionTimeoutS() { - - subscriptionTimeoutS_ = 0F; - onChanged(); - return this; - } - - private float subscriptionFrequencyMs_ ; - /** - * float subscription_frequency_ms = 3; - * @return The subscriptionFrequencyMs. - */ - @java.lang.Override - public float getSubscriptionFrequencyMs() { - return subscriptionFrequencyMs_; - } - /** - * float subscription_frequency_ms = 3; - * @param value The subscriptionFrequencyMs to set. - * @return This builder for chaining. - */ - public Builder setSubscriptionFrequencyMs(float value) { - - subscriptionFrequencyMs_ = value; - onChanged(); - return this; - } - /** - * float subscription_frequency_ms = 3; - * @return This builder for chaining. - */ - public Builder clearSubscriptionFrequencyMs() { - - subscriptionFrequencyMs_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.AlarmSubscription) - } + private com.google.protobuf.RepeatedFieldBuilderV3 getAlarmDescriptorFieldBuilder() { + if (alarmDescriptorBuilder_ == null) { + alarmDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(alarmDescriptor_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + alarmDescriptor_ = null; + } + return alarmDescriptorBuilder_; + } - // @@protoc_insertion_point(class_scope:monitoring.AlarmSubscription) - private static final monitoring.Monitoring.AlarmSubscription DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmSubscription(); - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - public static monitoring.Monitoring.AlarmSubscription getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:monitoring.AlarmList) + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + // @@protoc_insertion_point(class_scope:monitoring.AlarmList) + private static final monitoring.Monitoring.AlarmList DEFAULT_INSTANCE; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + static { + DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmList(); + } - @java.lang.Override - public monitoring.Monitoring.AlarmSubscription getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static monitoring.Monitoring.AlarmList getDefaultInstance() { + return DEFAULT_INSTANCE; + } - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public interface AlarmResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.AlarmResponse) - com.google.protobuf.MessageOrBuilder { + @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); + } + }; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - boolean hasAlarmId(); - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - monitoring.Monitoring.AlarmID getAlarmId(); - /** - * .monitoring.AlarmID alarm_id = 1; - */ - monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder(); + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * string text = 2; - * @return The text. - */ - java.lang.String getText(); - /** - * string text = 2; - * @return The bytes for text. - */ - com.google.protobuf.ByteString - getTextBytes(); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * .monitoring.KpiList kpi_list = 3; - * @return Whether the kpiList field is set. - */ - boolean hasKpiList(); - /** - * .monitoring.KpiList kpi_list = 3; - * @return The kpiList. - */ - monitoring.Monitoring.KpiList getKpiList(); - /** - * .monitoring.KpiList kpi_list = 3; - */ - monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder(); - } - /** - * Protobuf type {@code monitoring.AlarmResponse} - */ - public static final class AlarmResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.AlarmResponse) - AlarmResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlarmResponse.newBuilder() to construct. - private AlarmResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AlarmResponse() { - text_ = ""; + @java.lang.Override + public monitoring.Monitoring.AlarmList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AlarmResponse(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiDescriptor_descriptor; - @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; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiDescriptor_fieldAccessorTable; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmResponse.class, monitoring.Monitoring.AlarmResponse.Builder.class); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_MonitorKpiRequest_descriptor; - public static final int ALARM_ID_FIELD_NUMBER = 1; - private monitoring.Monitoring.AlarmID alarmId_; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - @java.lang.Override - public boolean hasAlarmId() { - return alarmId_ != null; - } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - @java.lang.Override - public monitoring.Monitoring.AlarmID getAlarmId() { - return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - @java.lang.Override - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - return getAlarmId(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable; - public static final int TEXT_FIELD_NUMBER = 2; - private volatile java.lang.Object text_; - /** - * string text = 2; - * @return The text. - */ - @java.lang.Override - public java.lang.String getText() { - java.lang.Object ref = text_; - 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(); - text_ = s; - return s; - } - } - /** - * string text = 2; - * @return The bytes for text. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiQuery_descriptor; - public static final int KPI_LIST_FIELD_NUMBER = 3; - private monitoring.Monitoring.KpiList kpiList_; - /** - * .monitoring.KpiList kpi_list = 3; - * @return Whether the kpiList field is set. - */ - @java.lang.Override - public boolean hasKpiList() { - return kpiList_ != null; - } - /** - * .monitoring.KpiList kpi_list = 3; - * @return The kpiList. - */ - @java.lang.Override - public monitoring.Monitoring.KpiList getKpiList() { - return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - @java.lang.Override - public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { - return getKpiList(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiQuery_fieldAccessorTable; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_RawKpi_descriptor; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_RawKpi_fieldAccessorTable; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (alarmId_ != null) { - output.writeMessage(1, getAlarmId()); - } - if (!getTextBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); - } - if (kpiList_ != null) { - output.writeMessage(3, getKpiList()); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_RawKpiList_descriptor; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (alarmId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAlarmId()); - } - if (!getTextBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); - } - if (kpiList_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getKpiList()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_RawKpiList_fieldAccessorTable; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.AlarmResponse)) { - return super.equals(obj); - } - monitoring.Monitoring.AlarmResponse other = (monitoring.Monitoring.AlarmResponse) obj; - - if (hasAlarmId() != other.hasAlarmId()) return false; - if (hasAlarmId()) { - if (!getAlarmId() - .equals(other.getAlarmId())) return false; - } - if (!getText() - .equals(other.getText())) return false; - if (hasKpiList() != other.hasKpiList()) return false; - if (hasKpiList()) { - if (!getKpiList() - .equals(other.getKpiList())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_RawKpiTable_descriptor; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAlarmId()) { - hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; - hash = (53 * hash) + getAlarmId().hashCode(); - } - hash = (37 * hash) + TEXT_FIELD_NUMBER; - hash = (53 * hash) + getText().hashCode(); - if (hasKpiList()) { - hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; - hash = (53 * hash) + getKpiList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_RawKpiTable_fieldAccessorTable; - public static monitoring.Monitoring.AlarmResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiId_descriptor; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.AlarmResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiId_fieldAccessorTable; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.AlarmResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.AlarmResponse) - monitoring.Monitoring.AlarmResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmResponse.class, monitoring.Monitoring.AlarmResponse.Builder.class); - } - - // 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; - alarmIdBuilder_ = null; - } - text_ = ""; - - if (kpiListBuilder_ == null) { - kpiList_ = null; - } else { - kpiList_ = null; - kpiListBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.AlarmResponse getDefaultInstanceForType() { - return monitoring.Monitoring.AlarmResponse.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.AlarmResponse build() { - monitoring.Monitoring.AlarmResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @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(); - } - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.AlarmResponse) { - return mergeFrom((monitoring.Monitoring.AlarmResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.AlarmResponse other) { - if (other == monitoring.Monitoring.AlarmResponse.getDefaultInstance()) return this; - if (other.hasAlarmId()) { - mergeAlarmId(other.getAlarmId()); - } - if (!other.getText().isEmpty()) { - text_ = other.text_; - onChanged(); - } - if (other.hasKpiList()) { - mergeKpiList(other.getKpiList()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private monitoring.Monitoring.AlarmID alarmId_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIdBuilder_; - /** - * .monitoring.AlarmID alarm_id = 1; - * @return Whether the alarmId field is set. - */ - public boolean hasAlarmId() { - return alarmIdBuilder_ != null || alarmId_ != null; - } - /** - * .monitoring.AlarmID alarm_id = 1; - * @return The alarmId. - */ - public monitoring.Monitoring.AlarmID getAlarmId() { - if (alarmIdBuilder_ == null) { - return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } else { - return alarmIdBuilder_.getMessage(); - } - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder setAlarmId(monitoring.Monitoring.AlarmID value) { - if (alarmIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - alarmId_ = value; - onChanged(); - } else { - alarmIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder setAlarmId( - monitoring.Monitoring.AlarmID.Builder builderForValue) { - if (alarmIdBuilder_ == null) { - alarmId_ = builderForValue.build(); - onChanged(); - } else { - alarmIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { - if (alarmIdBuilder_ == null) { - if (alarmId_ != null) { - alarmId_ = - monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); - } else { - alarmId_ = value; - } - onChanged(); - } else { - alarmIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public Builder clearAlarmId() { - if (alarmIdBuilder_ == null) { - alarmId_ = null; - onChanged(); - } else { - alarmId_ = null; - alarmIdBuilder_ = null; - } - - return this; - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { - - onChanged(); - return getAlarmIdFieldBuilder().getBuilder(); - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - if (alarmIdBuilder_ != null) { - return alarmIdBuilder_.getMessageOrBuilder(); - } else { - return alarmId_ == null ? - monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; - } - } - /** - * .monitoring.AlarmID alarm_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> - getAlarmIdFieldBuilder() { - if (alarmIdBuilder_ == null) { - alarmIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder>( - getAlarmId(), - getParentForChildren(), - isClean()); - alarmId_ = null; - } - return alarmIdBuilder_; - } - - private java.lang.Object text_ = ""; - /** - * string text = 2; - * @return The text. - */ - public java.lang.String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - text_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string text = 2; - * @return The bytes for text. - */ - public com.google.protobuf.ByteString - getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string text = 2; - * @param value The text to set. - * @return This builder for chaining. - */ - public Builder setText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - text_ = value; - onChanged(); - return this; - } - /** - * string text = 2; - * @return This builder for chaining. - */ - public Builder clearText() { - - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - /** - * string text = 2; - * @param value The bytes for text to set. - * @return This builder for chaining. - */ - public Builder setTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - text_ = value; - onChanged(); - return this; - } - - private monitoring.Monitoring.KpiList kpiList_; - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> kpiListBuilder_; - /** - * .monitoring.KpiList kpi_list = 3; - * @return Whether the kpiList field is set. - */ - public boolean hasKpiList() { - return kpiListBuilder_ != null || kpiList_ != null; - } - /** - * .monitoring.KpiList kpi_list = 3; - * @return The kpiList. - */ - public monitoring.Monitoring.KpiList getKpiList() { - if (kpiListBuilder_ == null) { - return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; - } else { - return kpiListBuilder_.getMessage(); - } - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - public Builder setKpiList(monitoring.Monitoring.KpiList value) { - if (kpiListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kpiList_ = value; - onChanged(); - } else { - kpiListBuilder_.setMessage(value); - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - public Builder setKpiList( - monitoring.Monitoring.KpiList.Builder builderForValue) { - if (kpiListBuilder_ == null) { - kpiList_ = builderForValue.build(); - onChanged(); - } else { - kpiListBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { - if (kpiListBuilder_ == null) { - if (kpiList_ != null) { - kpiList_ = - monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); - } else { - kpiList_ = value; - } - onChanged(); - } else { - kpiListBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - public Builder clearKpiList() { - if (kpiListBuilder_ == null) { - kpiList_ = null; - onChanged(); - } else { - kpiList_ = null; - kpiListBuilder_ = null; - } - - return this; - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { - - onChanged(); - return getKpiListFieldBuilder().getBuilder(); - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { - if (kpiListBuilder_ != null) { - return kpiListBuilder_.getMessageOrBuilder(); - } else { - return kpiList_ == null ? - monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; - } - } - /** - * .monitoring.KpiList kpi_list = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder> - getKpiListFieldBuilder() { - if (kpiListBuilder_ == null) { - kpiListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - monitoring.Monitoring.KpiList, monitoring.Monitoring.KpiList.Builder, monitoring.Monitoring.KpiListOrBuilder>( - getKpiList(), - getParentForChildren(), - isClean()); - kpiList_ = null; - } - return kpiListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.AlarmResponse) - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_Kpi_descriptor; - // @@protoc_insertion_point(class_scope:monitoring.AlarmResponse) - private static final monitoring.Monitoring.AlarmResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmResponse(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_Kpi_fieldAccessorTable; - public static monitoring.Monitoring.AlarmResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiValueRange_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiValueRange_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiValue_descriptor; - @java.lang.Override - public monitoring.Monitoring.AlarmResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiValue_fieldAccessorTable; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiList_descriptor; - public interface AlarmListOrBuilder extends - // @@protoc_insertion_point(interface_extends:monitoring.AlarmList) - com.google.protobuf.MessageOrBuilder { + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiList_fieldAccessorTable; - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - java.util.List - getAlarmDescriptorList(); - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index); - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - int getAlarmDescriptorCount(); - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - java.util.List - getAlarmDescriptorOrBuilderList(); - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder( - int index); - } - /** - * Protobuf type {@code monitoring.AlarmList} - */ - public static final class AlarmList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:monitoring.AlarmList) - AlarmListOrBuilder { - private static final long serialVersionUID = 0L; - // Use AlarmList.newBuilder() to construct. - private AlarmList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AlarmList() { - alarmDescriptor_ = java.util.Collections.emptyList(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_KpiDescriptorList_descriptor; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AlarmList(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_KpiDescriptorList_fieldAccessorTable; - @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(); - 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; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_SubsDescriptor_descriptor; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmList.class, monitoring.Monitoring.AlarmList.Builder.class); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_SubsDescriptor_fieldAccessorTable; - public static final int ALARM_DESCRIPTOR_FIELD_NUMBER = 1; - private java.util.List alarmDescriptor_; - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - @java.lang.Override - public java.util.List getAlarmDescriptorList() { - return alarmDescriptor_; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - @java.lang.Override - public java.util.List - getAlarmDescriptorOrBuilderList() { - return alarmDescriptor_; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - @java.lang.Override - public int getAlarmDescriptorCount() { - return alarmDescriptor_.size(); - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - @java.lang.Override - public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index) { - return alarmDescriptor_.get(index); - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - @java.lang.Override - public monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder( - int index) { - return alarmDescriptor_.get(index); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_SubscriptionID_descriptor; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_SubscriptionID_fieldAccessorTable; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_SubsResponse_descriptor; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < alarmDescriptor_.size(); i++) { - output.writeMessage(1, alarmDescriptor_.get(i)); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_SubsResponse_fieldAccessorTable; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < alarmDescriptor_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, alarmDescriptor_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_SubsList_descriptor; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof monitoring.Monitoring.AlarmList)) { - return super.equals(obj); - } - monitoring.Monitoring.AlarmList other = (monitoring.Monitoring.AlarmList) obj; - - if (!getAlarmDescriptorList() - .equals(other.getAlarmDescriptorList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_SubsList_fieldAccessorTable; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAlarmDescriptorCount() > 0) { - hash = (37 * hash) + ALARM_DESCRIPTOR_FIELD_NUMBER; - hash = (53 * hash) + getAlarmDescriptorList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_AlarmDescriptor_descriptor; - public static monitoring.Monitoring.AlarmList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static monitoring.Monitoring.AlarmList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static monitoring.Monitoring.AlarmList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static monitoring.Monitoring.AlarmList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static monitoring.Monitoring.AlarmList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_AlarmDescriptor_fieldAccessorTable; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(monitoring.Monitoring.AlarmList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_AlarmID_descriptor; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code monitoring.AlarmList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:monitoring.AlarmList) - monitoring.Monitoring.AlarmListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_AlarmList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - monitoring.Monitoring.AlarmList.class, monitoring.Monitoring.AlarmList.Builder.class); - } - - // 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(); - if (alarmDescriptorBuilder_ == null) { - alarmDescriptor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - alarmDescriptorBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; - } - - @java.lang.Override - public monitoring.Monitoring.AlarmList getDefaultInstanceForType() { - return monitoring.Monitoring.AlarmList.getDefaultInstance(); - } - - @java.lang.Override - public monitoring.Monitoring.AlarmList build() { - monitoring.Monitoring.AlarmList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public monitoring.Monitoring.AlarmList buildPartial() { - monitoring.Monitoring.AlarmList result = new monitoring.Monitoring.AlarmList(this); - int from_bitField0_ = bitField0_; - if (alarmDescriptorBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - alarmDescriptor_ = java.util.Collections.unmodifiableList(alarmDescriptor_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.alarmDescriptor_ = alarmDescriptor_; - } 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); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof monitoring.Monitoring.AlarmList) { - return mergeFrom((monitoring.Monitoring.AlarmList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(monitoring.Monitoring.AlarmList other) { - if (other == monitoring.Monitoring.AlarmList.getDefaultInstance()) return this; - if (alarmDescriptorBuilder_ == null) { - if (!other.alarmDescriptor_.isEmpty()) { - if (alarmDescriptor_.isEmpty()) { - alarmDescriptor_ = other.alarmDescriptor_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.addAll(other.alarmDescriptor_); - } - onChanged(); - } - } else { - if (!other.alarmDescriptor_.isEmpty()) { - if (alarmDescriptorBuilder_.isEmpty()) { - alarmDescriptorBuilder_.dispose(); - alarmDescriptorBuilder_ = null; - alarmDescriptor_ = other.alarmDescriptor_; - bitField0_ = (bitField0_ & ~0x00000001); - alarmDescriptorBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAlarmDescriptorFieldBuilder() : null; - } else { - alarmDescriptorBuilder_.addAllMessages(other.alarmDescriptor_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @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; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List alarmDescriptor_ = - java.util.Collections.emptyList(); - private void ensureAlarmDescriptorIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - alarmDescriptor_ = new java.util.ArrayList(alarmDescriptor_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmDescriptor.Builder, monitoring.Monitoring.AlarmDescriptorOrBuilder> alarmDescriptorBuilder_; - - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public java.util.List getAlarmDescriptorList() { - if (alarmDescriptorBuilder_ == null) { - return java.util.Collections.unmodifiableList(alarmDescriptor_); - } else { - return alarmDescriptorBuilder_.getMessageList(); - } - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public int getAlarmDescriptorCount() { - if (alarmDescriptorBuilder_ == null) { - return alarmDescriptor_.size(); - } else { - return alarmDescriptorBuilder_.getCount(); - } - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(int index) { - if (alarmDescriptorBuilder_ == null) { - return alarmDescriptor_.get(index); - } else { - return alarmDescriptorBuilder_.getMessage(index); - } - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder setAlarmDescriptor( - int index, monitoring.Monitoring.AlarmDescriptor value) { - if (alarmDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.set(index, value); - onChanged(); - } else { - alarmDescriptorBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder setAlarmDescriptor( - int index, monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { - if (alarmDescriptorBuilder_ == null) { - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.set(index, builderForValue.build()); - onChanged(); - } else { - alarmDescriptorBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder addAlarmDescriptor(monitoring.Monitoring.AlarmDescriptor value) { - if (alarmDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.add(value); - onChanged(); - } else { - alarmDescriptorBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder addAlarmDescriptor( - int index, monitoring.Monitoring.AlarmDescriptor value) { - if (alarmDescriptorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.add(index, value); - onChanged(); - } else { - alarmDescriptorBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder addAlarmDescriptor( - monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { - if (alarmDescriptorBuilder_ == null) { - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.add(builderForValue.build()); - onChanged(); - } else { - alarmDescriptorBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder addAlarmDescriptor( - int index, monitoring.Monitoring.AlarmDescriptor.Builder builderForValue) { - if (alarmDescriptorBuilder_ == null) { - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.add(index, builderForValue.build()); - onChanged(); - } else { - alarmDescriptorBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder addAllAlarmDescriptor( - java.lang.Iterable values) { - if (alarmDescriptorBuilder_ == null) { - ensureAlarmDescriptorIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, alarmDescriptor_); - onChanged(); - } else { - alarmDescriptorBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder clearAlarmDescriptor() { - if (alarmDescriptorBuilder_ == null) { - alarmDescriptor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - alarmDescriptorBuilder_.clear(); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public Builder removeAlarmDescriptor(int index) { - if (alarmDescriptorBuilder_ == null) { - ensureAlarmDescriptorIsMutable(); - alarmDescriptor_.remove(index); - onChanged(); - } else { - alarmDescriptorBuilder_.remove(index); - } - return this; - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public monitoring.Monitoring.AlarmDescriptor.Builder getAlarmDescriptorBuilder( - int index) { - return getAlarmDescriptorFieldBuilder().getBuilder(index); - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public monitoring.Monitoring.AlarmDescriptorOrBuilder getAlarmDescriptorOrBuilder( - int index) { - if (alarmDescriptorBuilder_ == null) { - return alarmDescriptor_.get(index); } else { - return alarmDescriptorBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public java.util.List - getAlarmDescriptorOrBuilderList() { - if (alarmDescriptorBuilder_ != null) { - return alarmDescriptorBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(alarmDescriptor_); - } - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public monitoring.Monitoring.AlarmDescriptor.Builder addAlarmDescriptorBuilder() { - return getAlarmDescriptorFieldBuilder().addBuilder( - monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()); - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public monitoring.Monitoring.AlarmDescriptor.Builder addAlarmDescriptorBuilder( - int index) { - return getAlarmDescriptorFieldBuilder().addBuilder( - index, monitoring.Monitoring.AlarmDescriptor.getDefaultInstance()); - } - /** - * repeated .monitoring.AlarmDescriptor alarm_descriptor = 1; - */ - public java.util.List - getAlarmDescriptorBuilderList() { - return getAlarmDescriptorFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmDescriptor.Builder, monitoring.Monitoring.AlarmDescriptorOrBuilder> - getAlarmDescriptorFieldBuilder() { - if (alarmDescriptorBuilder_ == null) { - alarmDescriptorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmDescriptor.Builder, monitoring.Monitoring.AlarmDescriptorOrBuilder>( - alarmDescriptor_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - alarmDescriptor_ = null; - } - return alarmDescriptorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:monitoring.AlarmList) - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_AlarmID_fieldAccessorTable; - // @@protoc_insertion_point(class_scope:monitoring.AlarmList) - private static final monitoring.Monitoring.AlarmList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new monitoring.Monitoring.AlarmList(); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_AlarmSubscription_descriptor; - public static monitoring.Monitoring.AlarmList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_AlarmSubscription_fieldAccessorTable; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @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); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_AlarmResponse_descriptor; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_AlarmResponse_fieldAccessorTable; - @java.lang.Override - public monitoring.Monitoring.AlarmList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_monitoring_AlarmList_descriptor; + + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_monitoring_AlarmList_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiDescriptor_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiDescriptor_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_MonitorKpiRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiQuery_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiQuery_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_RawKpi_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_RawKpi_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_RawKpiList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_RawKpiList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_RawKpiTable_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_RawKpiTable_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_Kpi_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_Kpi_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiValueRange_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiValueRange_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiValue_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiValue_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_KpiDescriptorList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_KpiDescriptorList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_SubsDescriptor_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_SubsDescriptor_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_SubscriptionID_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_SubscriptionID_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_SubsResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_SubsResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_SubsList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_SubsList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_AlarmDescriptor_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_AlarmDescriptor_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_AlarmID_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_AlarmID_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_AlarmSubscription_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_AlarmSubscription_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_AlarmResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_AlarmResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_monitoring_AlarmList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_monitoring_AlarmList_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\020monitoring.proto\022\nmonitoring\032\rcontext." + - "proto\032\026kpi_sample_types.proto\"\367\002\n\rKpiDes" + - "criptor\022!\n\006kpi_id\030\001 \001(\0132\021.monitoring.Kpi" + - "Id\022\027\n\017kpi_description\030\002 \001(\t\022&\n\013kpi_id_li" + - "st\030\003 \003(\0132\021.monitoring.KpiId\0228\n\017kpi_sampl" + - "e_type\030\004 \001(\0162\037.kpi_sample_types.KpiSampl" + - "eType\022$\n\tdevice_id\030\005 \001(\0132\021.context.Devic" + - "eId\022(\n\013endpoint_id\030\006 \001(\0132\023.context.EndPo" + - "intId\022&\n\nservice_id\030\007 \001(\0132\022.context.Serv" + - "iceId\022\"\n\010slice_id\030\010 \001(\0132\020.context.SliceI" + - "d\022,\n\rconnection_id\030\t \001(\0132\025.context.Conne" + - "ctionId\"l\n\021MonitorKpiRequest\022!\n\006kpi_id\030\001" + - " \001(\0132\021.monitoring.KpiId\022\033\n\023monitoring_wi" + - "ndow_s\030\002 \001(\002\022\027\n\017sampling_rate_s\030\003 \001(\002\"\273\001" + - "\n\010KpiQuery\022\"\n\007kpi_ids\030\001 \003(\0132\021.monitoring" + - ".KpiId\022\033\n\023monitoring_window_s\030\002 \001(\002\022\026\n\016l" + - "ast_n_samples\030\003 \001(\r\022+\n\017start_timestamp\030\004" + - " \001(\0132\022.context.Timestamp\022)\n\rend_timestam" + - "p\030\005 \001(\0132\022.context.Timestamp\"X\n\006RawKpi\022%\n" + - "\ttimestamp\030\001 \001(\0132\022.context.Timestamp\022\'\n\t" + - "kpi_value\030\002 \001(\0132\024.monitoring.KpiValue\"U\n" + - "\nRawKpiList\022!\n\006kpi_id\030\001 \001(\0132\021.monitoring" + - ".KpiId\022$\n\010raw_kpis\030\002 \003(\0132\022.monitoring.Ra" + - "wKpi\"<\n\013RawKpiTable\022-\n\rraw_kpi_lists\030\001 \003" + - "(\0132\026.monitoring.RawKpiList\"&\n\005KpiId\022\035\n\006k" + - "pi_id\030\001 \001(\0132\r.context.Uuid\"x\n\003Kpi\022!\n\006kpi" + - "_id\030\001 \001(\0132\021.monitoring.KpiId\022%\n\ttimestam" + - "p\030\002 \001(\0132\022.context.Timestamp\022\'\n\tkpi_value" + - "\030\003 \001(\0132\024.monitoring.KpiValue\"\250\001\n\rKpiValu" + - "eRange\022)\n\013kpiMinValue\030\001 \001(\0132\024.monitoring" + - ".KpiValue\022)\n\013kpiMaxValue\030\002 \001(\0132\024.monitor" + - "ing.KpiValue\022\017\n\007inRange\030\003 \001(\010\022\027\n\017include" + - "MinValue\030\004 \001(\010\022\027\n\017includeMaxValue\030\005 \001(\010\"" + - "\241\001\n\010KpiValue\022\022\n\010int32Val\030\001 \001(\005H\000\022\023\n\tuint" + - "32Val\030\002 \001(\rH\000\022\022\n\010int64Val\030\003 \001(\003H\000\022\023\n\tuin" + - "t64Val\030\004 \001(\004H\000\022\022\n\010floatVal\030\005 \001(\002H\000\022\023\n\tst" + - "ringVal\030\006 \001(\tH\000\022\021\n\007boolVal\030\007 \001(\010H\000B\007\n\005va" + - "lue\"\'\n\007KpiList\022\034\n\003kpi\030\001 \003(\0132\017.monitoring" + - ".Kpi\"K\n\021KpiDescriptorList\0226\n\023kpi_descrip" + - "tor_list\030\001 \003(\0132\031.monitoring.KpiDescripto" + - "r\"\362\001\n\016SubsDescriptor\022+\n\007subs_id\030\001 \001(\0132\032." + - "monitoring.SubscriptionID\022!\n\006kpi_id\030\002 \001(" + - "\0132\021.monitoring.KpiId\022\033\n\023sampling_duratio" + - "n_s\030\003 \001(\002\022\033\n\023sampling_interval_s\030\004 \001(\002\022+" + - "\n\017start_timestamp\030\005 \001(\0132\022.context.Timest" + - "amp\022)\n\rend_timestamp\030\006 \001(\0132\022.context.Tim" + - "estamp\"0\n\016SubscriptionID\022\036\n\007subs_id\030\001 \001(" + - "\0132\r.context.Uuid\"b\n\014SubsResponse\022+\n\007subs" + - "_id\030\001 \001(\0132\032.monitoring.SubscriptionID\022%\n" + - "\010kpi_list\030\002 \001(\0132\023.monitoring.KpiList\"?\n\010" + - "SubsList\0223\n\017subs_descriptor\030\001 \003(\0132\032.moni" + - "toring.SubsDescriptor\"\337\001\n\017AlarmDescripto" + - "r\022%\n\010alarm_id\030\001 \001(\0132\023.monitoring.AlarmID" + - "\022\031\n\021alarm_description\030\002 \001(\t\022\014\n\004name\030\003 \001(" + - "\t\022!\n\006kpi_id\030\004 \001(\0132\021.monitoring.KpiId\0222\n\017" + - "kpi_value_range\030\005 \001(\0132\031.monitoring.KpiVa" + - "lueRange\022%\n\ttimestamp\030\006 \001(\0132\022.context.Ti" + - "mestamp\"*\n\007AlarmID\022\037\n\010alarm_id\030\001 \001(\0132\r.c" + - "ontext.Uuid\"}\n\021AlarmSubscription\022%\n\010alar" + - "m_id\030\001 \001(\0132\023.monitoring.AlarmID\022\036\n\026subsc" + - "ription_timeout_s\030\002 \001(\002\022!\n\031subscription_" + - "frequency_ms\030\003 \001(\002\"k\n\rAlarmResponse\022%\n\010a" + - "larm_id\030\001 \001(\0132\023.monitoring.AlarmID\022\014\n\004te" + - "xt\030\002 \001(\t\022%\n\010kpi_list\030\003 \001(\0132\023.monitoring." + - "KpiList\"B\n\tAlarmList\0225\n\020alarm_descriptor" + - "\030\001 \003(\0132\033.monitoring.AlarmDescriptor2\234\t\n\021" + - "MonitoringService\0228\n\006SetKpi\022\031.monitoring" + - ".KpiDescriptor\032\021.monitoring.KpiId\"\000\0220\n\tD" + - "eleteKpi\022\021.monitoring.KpiId\032\016.context.Em" + - "pty\"\000\022B\n\020GetKpiDescriptor\022\021.monitoring.K" + - "piId\032\031.monitoring.KpiDescriptor\"\000\022G\n\024Get" + - "KpiDescriptorList\022\016.context.Empty\032\035.moni" + - "toring.KpiDescriptorList\"\000\022/\n\nIncludeKpi" + - "\022\017.monitoring.Kpi\032\016.context.Empty\"\000\022=\n\nM" + - "onitorKpi\022\035.monitoring.MonitorKpiRequest" + - "\032\016.context.Empty\"\000\022?\n\014QueryKpiData\022\024.mon" + - "itoring.KpiQuery\032\027.monitoring.RawKpiTabl" + - "e\"\000\022N\n\022SetKpiSubscription\022\032.monitoring.S" + - "ubsDescriptor\032\030.monitoring.SubsResponse\"" + - "\0000\001\022M\n\021GetSubsDescriptor\022\032.monitoring.Su" + - "bscriptionID\032\032.monitoring.SubsDescriptor" + - "\"\000\022:\n\020GetSubscriptions\022\016.context.Empty\032\024" + - ".monitoring.SubsList\"\000\022B\n\022DeleteSubscrip" + - "tion\022\032.monitoring.SubscriptionID\032\016.conte" + - "xt.Empty\"\000\022A\n\013SetKpiAlarm\022\033.monitoring.A" + - "larmDescriptor\032\023.monitoring.AlarmID\"\000\0224\n" + - "\tGetAlarms\022\016.context.Empty\032\025.monitoring." + - "AlarmList\"\000\022H\n\022GetAlarmDescriptor\022\023.moni" + - "toring.AlarmID\032\033.monitoring.AlarmDescrip" + - "tor\"\000\022V\n\026GetAlarmResponseStream\022\035.monito" + - "ring.AlarmSubscription\032\031.monitoring.Alar" + - "mResponse\"\0000\001\0224\n\013DeleteAlarm\022\023.monitorin" + - "g.AlarmID\032\016.context.Empty\"\000\0226\n\014GetStream" + - "Kpi\022\021.monitoring.KpiId\032\017.monitoring.Kpi\"" + - "\0000\001\0225\n\rGetInstantKpi\022\021.monitoring.KpiId\032" + - "\017.monitoring.Kpi\"\000b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - context.ContextOuterClass.getDescriptor(), - kpi_sample_types.KpiSampleTypes.getDescriptor(), - }); - internal_static_monitoring_KpiDescriptor_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_monitoring_KpiDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiDescriptor_descriptor, - new java.lang.String[] { "KpiId", "KpiDescription", "KpiIdList", "KpiSampleType", "DeviceId", "EndpointId", "ServiceId", "SliceId", "ConnectionId", }); - internal_static_monitoring_MonitorKpiRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_MonitorKpiRequest_descriptor, - new java.lang.String[] { "KpiId", "MonitoringWindowS", "SamplingRateS", }); - internal_static_monitoring_KpiQuery_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_monitoring_KpiQuery_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiQuery_descriptor, - new java.lang.String[] { "KpiIds", "MonitoringWindowS", "LastNSamples", "StartTimestamp", "EndTimestamp", }); - internal_static_monitoring_RawKpi_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_monitoring_RawKpi_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_RawKpi_descriptor, - new java.lang.String[] { "Timestamp", "KpiValue", }); - internal_static_monitoring_RawKpiList_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_monitoring_RawKpiList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_RawKpiList_descriptor, - new java.lang.String[] { "KpiId", "RawKpis", }); - internal_static_monitoring_RawKpiTable_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_monitoring_RawKpiTable_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_RawKpiTable_descriptor, - new java.lang.String[] { "RawKpiLists", }); - internal_static_monitoring_KpiId_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_monitoring_KpiId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiId_descriptor, - new java.lang.String[] { "KpiId", }); - internal_static_monitoring_Kpi_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_monitoring_Kpi_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_Kpi_descriptor, - new java.lang.String[] { "KpiId", "Timestamp", "KpiValue", }); - internal_static_monitoring_KpiValueRange_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_monitoring_KpiValueRange_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiValueRange_descriptor, - new java.lang.String[] { "KpiMinValue", "KpiMaxValue", "InRange", "IncludeMinValue", "IncludeMaxValue", }); - internal_static_monitoring_KpiValue_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_monitoring_KpiValue_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiValue_descriptor, - new java.lang.String[] { "Int32Val", "Uint32Val", "Int64Val", "Uint64Val", "FloatVal", "StringVal", "BoolVal", "Value", }); - internal_static_monitoring_KpiList_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_monitoring_KpiList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiList_descriptor, - new java.lang.String[] { "Kpi", }); - internal_static_monitoring_KpiDescriptorList_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_monitoring_KpiDescriptorList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_KpiDescriptorList_descriptor, - new java.lang.String[] { "KpiDescriptorList", }); - internal_static_monitoring_SubsDescriptor_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_monitoring_SubsDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_SubsDescriptor_descriptor, - new java.lang.String[] { "SubsId", "KpiId", "SamplingDurationS", "SamplingIntervalS", "StartTimestamp", "EndTimestamp", }); - internal_static_monitoring_SubscriptionID_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_monitoring_SubscriptionID_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_SubscriptionID_descriptor, - new java.lang.String[] { "SubsId", }); - internal_static_monitoring_SubsResponse_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_monitoring_SubsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_SubsResponse_descriptor, - new java.lang.String[] { "SubsId", "KpiList", }); - internal_static_monitoring_SubsList_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_monitoring_SubsList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_SubsList_descriptor, - new java.lang.String[] { "SubsDescriptor", }); - internal_static_monitoring_AlarmDescriptor_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_monitoring_AlarmDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_AlarmDescriptor_descriptor, - new java.lang.String[] { "AlarmId", "AlarmDescription", "Name", "KpiId", "KpiValueRange", "Timestamp", }); - internal_static_monitoring_AlarmID_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_monitoring_AlarmID_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_AlarmID_descriptor, - new java.lang.String[] { "AlarmId", }); - internal_static_monitoring_AlarmSubscription_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_monitoring_AlarmSubscription_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_AlarmSubscription_descriptor, - new java.lang.String[] { "AlarmId", "SubscriptionTimeoutS", "SubscriptionFrequencyMs", }); - internal_static_monitoring_AlarmResponse_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_monitoring_AlarmResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_AlarmResponse_descriptor, - new java.lang.String[] { "AlarmId", "Text", "KpiList", }); - internal_static_monitoring_AlarmList_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_monitoring_AlarmList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_monitoring_AlarmList_descriptor, - new java.lang.String[] { "AlarmDescriptor", }); - context.ContextOuterClass.getDescriptor(); - kpi_sample_types.KpiSampleTypes.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { "\n\020monitoring.proto\022\nmonitoring\032\rcontext." + "proto\032\026kpi_sample_types.proto\"\231\003\n\rKpiDes" + "criptor\022!\n\006kpi_id\030\001 \001(\0132\021.monitoring.Kpi" + "Id\022\027\n\017kpi_description\030\002 \001(\t\022&\n\013kpi_id_li" + "st\030\003 \003(\0132\021.monitoring.KpiId\0228\n\017kpi_sampl" + "e_type\030\004 \001(\0162\037.kpi_sample_types.KpiSampl" + "eType\022$\n\tdevice_id\030\005 \001(\0132\021.context.Devic" + "eId\022(\n\013endpoint_id\030\006 \001(\0132\023.context.EndPo" + "intId\022&\n\nservice_id\030\007 \001(\0132\022.context.Serv" + "iceId\022\"\n\010slice_id\030\010 \001(\0132\020.context.SliceI" + "d\022,\n\rconnection_id\030\t \001(\0132\025.context.Conne" + "ctionId\022 \n\007link_id\030\n \001(\0132\017.context.LinkI" + "d\"l\n\021MonitorKpiRequest\022!\n\006kpi_id\030\001 \001(\0132\021" + ".monitoring.KpiId\022\033\n\023monitoring_window_s" + "\030\002 \001(\002\022\027\n\017sampling_rate_s\030\003 \001(\002\"\273\001\n\010KpiQ" + "uery\022\"\n\007kpi_ids\030\001 \003(\0132\021.monitoring.KpiId" + "\022\033\n\023monitoring_window_s\030\002 \001(\002\022\026\n\016last_n_" + "samples\030\003 \001(\r\022+\n\017start_timestamp\030\004 \001(\0132\022" + ".context.Timestamp\022)\n\rend_timestamp\030\005 \001(" + "\0132\022.context.Timestamp\"X\n\006RawKpi\022%\n\ttimes" + "tamp\030\001 \001(\0132\022.context.Timestamp\022\'\n\tkpi_va" + "lue\030\002 \001(\0132\024.monitoring.KpiValue\"U\n\nRawKp" + "iList\022!\n\006kpi_id\030\001 \001(\0132\021.monitoring.KpiId" + "\022$\n\010raw_kpis\030\002 \003(\0132\022.monitoring.RawKpi\"<" + "\n\013RawKpiTable\022-\n\rraw_kpi_lists\030\001 \003(\0132\026.m" + "onitoring.RawKpiList\"&\n\005KpiId\022\035\n\006kpi_id\030" + "\001 \001(\0132\r.context.Uuid\"x\n\003Kpi\022!\n\006kpi_id\030\001 " + "\001(\0132\021.monitoring.KpiId\022%\n\ttimestamp\030\002 \001(" + "\0132\022.context.Timestamp\022\'\n\tkpi_value\030\003 \001(\013" + "2\024.monitoring.KpiValue\"\250\001\n\rKpiValueRange" + "\022)\n\013kpiMinValue\030\001 \001(\0132\024.monitoring.KpiVa" + "lue\022)\n\013kpiMaxValue\030\002 \001(\0132\024.monitoring.Kp" + "iValue\022\017\n\007inRange\030\003 \001(\010\022\027\n\017includeMinVal" + "ue\030\004 \001(\010\022\027\n\017includeMaxValue\030\005 \001(\010\"\241\001\n\010Kp" + "iValue\022\022\n\010int32Val\030\001 \001(\005H\000\022\023\n\tuint32Val\030" + "\002 \001(\rH\000\022\022\n\010int64Val\030\003 \001(\003H\000\022\023\n\tuint64Val" + "\030\004 \001(\004H\000\022\022\n\010floatVal\030\005 \001(\002H\000\022\023\n\tstringVa" + "l\030\006 \001(\tH\000\022\021\n\007boolVal\030\007 \001(\010H\000B\007\n\005value\"\'\n" + "\007KpiList\022\034\n\003kpi\030\001 \003(\0132\017.monitoring.Kpi\"K" + "\n\021KpiDescriptorList\0226\n\023kpi_descriptor_li" + "st\030\001 \003(\0132\031.monitoring.KpiDescriptor\"\362\001\n\016" + "SubsDescriptor\022+\n\007subs_id\030\001 \001(\0132\032.monito" + "ring.SubscriptionID\022!\n\006kpi_id\030\002 \001(\0132\021.mo" + "nitoring.KpiId\022\033\n\023sampling_duration_s\030\003 " + "\001(\002\022\033\n\023sampling_interval_s\030\004 \001(\002\022+\n\017star" + "t_timestamp\030\005 \001(\0132\022.context.Timestamp\022)\n" + "\rend_timestamp\030\006 \001(\0132\022.context.Timestamp" + "\"0\n\016SubscriptionID\022\036\n\007subs_id\030\001 \001(\0132\r.co" + "ntext.Uuid\"b\n\014SubsResponse\022+\n\007subs_id\030\001 " + "\001(\0132\032.monitoring.SubscriptionID\022%\n\010kpi_l" + "ist\030\002 \001(\0132\023.monitoring.KpiList\"?\n\010SubsLi" + "st\0223\n\017subs_descriptor\030\001 \003(\0132\032.monitoring" + ".SubsDescriptor\"\337\001\n\017AlarmDescriptor\022%\n\010a" + "larm_id\030\001 \001(\0132\023.monitoring.AlarmID\022\031\n\021al" + "arm_description\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022!\n\006k" + "pi_id\030\004 \001(\0132\021.monitoring.KpiId\0222\n\017kpi_va" + "lue_range\030\005 \001(\0132\031.monitoring.KpiValueRan" + "ge\022%\n\ttimestamp\030\006 \001(\0132\022.context.Timestam" + "p\"*\n\007AlarmID\022\037\n\010alarm_id\030\001 \001(\0132\r.context" + ".Uuid\"}\n\021AlarmSubscription\022%\n\010alarm_id\030\001" + " \001(\0132\023.monitoring.AlarmID\022\036\n\026subscriptio" + "n_timeout_s\030\002 \001(\002\022!\n\031subscription_freque" + "ncy_ms\030\003 \001(\002\"k\n\rAlarmResponse\022%\n\010alarm_i" + "d\030\001 \001(\0132\023.monitoring.AlarmID\022\014\n\004text\030\002 \001" + "(\t\022%\n\010kpi_list\030\003 \001(\0132\023.monitoring.KpiLis" + "t\"B\n\tAlarmList\0225\n\020alarm_descriptor\030\001 \003(\013" + "2\033.monitoring.AlarmDescriptor2\234\t\n\021Monito" + "ringService\0228\n\006SetKpi\022\031.monitoring.KpiDe" + "scriptor\032\021.monitoring.KpiId\"\000\0220\n\tDeleteK" + "pi\022\021.monitoring.KpiId\032\016.context.Empty\"\000\022" + "B\n\020GetKpiDescriptor\022\021.monitoring.KpiId\032\031" + ".monitoring.KpiDescriptor\"\000\022G\n\024GetKpiDes" + "criptorList\022\016.context.Empty\032\035.monitoring" + ".KpiDescriptorList\"\000\022/\n\nIncludeKpi\022\017.mon" + "itoring.Kpi\032\016.context.Empty\"\000\022=\n\nMonitor" + "Kpi\022\035.monitoring.MonitorKpiRequest\032\016.con" + "text.Empty\"\000\022?\n\014QueryKpiData\022\024.monitorin" + "g.KpiQuery\032\027.monitoring.RawKpiTable\"\000\022N\n" + "\022SetKpiSubscription\022\032.monitoring.SubsDes" + "criptor\032\030.monitoring.SubsResponse\"\0000\001\022M\n" + "\021GetSubsDescriptor\022\032.monitoring.Subscrip" + "tionID\032\032.monitoring.SubsDescriptor\"\000\022:\n\020" + "GetSubscriptions\022\016.context.Empty\032\024.monit" + "oring.SubsList\"\000\022B\n\022DeleteSubscription\022\032" + ".monitoring.SubscriptionID\032\016.context.Emp" + "ty\"\000\022A\n\013SetKpiAlarm\022\033.monitoring.AlarmDe" + "scriptor\032\023.monitoring.AlarmID\"\000\0224\n\tGetAl" + "arms\022\016.context.Empty\032\025.monitoring.AlarmL" + "ist\"\000\022H\n\022GetAlarmDescriptor\022\023.monitoring" + ".AlarmID\032\033.monitoring.AlarmDescriptor\"\000\022" + "V\n\026GetAlarmResponseStream\022\035.monitoring.A" + "larmSubscription\032\031.monitoring.AlarmRespo" + "nse\"\0000\001\0224\n\013DeleteAlarm\022\023.monitoring.Alar" + "mID\032\016.context.Empty\"\000\0226\n\014GetStreamKpi\022\021." + "monitoring.KpiId\032\017.monitoring.Kpi\"\0000\001\0225\n" + "\rGetInstantKpi\022\021.monitoring.KpiId\032\017.moni" + "toring.Kpi\"\000b\006proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { context.ContextOuterClass.getDescriptor(), kpi_sample_types.KpiSampleTypes.getDescriptor() }); + internal_static_monitoring_KpiDescriptor_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_monitoring_KpiDescriptor_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiDescriptor_descriptor, new java.lang.String[] { "KpiId", "KpiDescription", "KpiIdList", "KpiSampleType", "DeviceId", "EndpointId", "ServiceId", "SliceId", "ConnectionId", "LinkId" }); + internal_static_monitoring_MonitorKpiRequest_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_MonitorKpiRequest_descriptor, new java.lang.String[] { "KpiId", "MonitoringWindowS", "SamplingRateS" }); + internal_static_monitoring_KpiQuery_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_monitoring_KpiQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiQuery_descriptor, new java.lang.String[] { "KpiIds", "MonitoringWindowS", "LastNSamples", "StartTimestamp", "EndTimestamp" }); + internal_static_monitoring_RawKpi_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_monitoring_RawKpi_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_RawKpi_descriptor, new java.lang.String[] { "Timestamp", "KpiValue" }); + internal_static_monitoring_RawKpiList_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_monitoring_RawKpiList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_RawKpiList_descriptor, new java.lang.String[] { "KpiId", "RawKpis" }); + internal_static_monitoring_RawKpiTable_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_monitoring_RawKpiTable_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_RawKpiTable_descriptor, new java.lang.String[] { "RawKpiLists" }); + internal_static_monitoring_KpiId_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_monitoring_KpiId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiId_descriptor, new java.lang.String[] { "KpiId" }); + internal_static_monitoring_Kpi_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_monitoring_Kpi_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_Kpi_descriptor, new java.lang.String[] { "KpiId", "Timestamp", "KpiValue" }); + internal_static_monitoring_KpiValueRange_descriptor = getDescriptor().getMessageTypes().get(8); + internal_static_monitoring_KpiValueRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiValueRange_descriptor, new java.lang.String[] { "KpiMinValue", "KpiMaxValue", "InRange", "IncludeMinValue", "IncludeMaxValue" }); + internal_static_monitoring_KpiValue_descriptor = getDescriptor().getMessageTypes().get(9); + internal_static_monitoring_KpiValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiValue_descriptor, new java.lang.String[] { "Int32Val", "Uint32Val", "Int64Val", "Uint64Val", "FloatVal", "StringVal", "BoolVal", "Value" }); + internal_static_monitoring_KpiList_descriptor = getDescriptor().getMessageTypes().get(10); + internal_static_monitoring_KpiList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiList_descriptor, new java.lang.String[] { "Kpi" }); + internal_static_monitoring_KpiDescriptorList_descriptor = getDescriptor().getMessageTypes().get(11); + internal_static_monitoring_KpiDescriptorList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_KpiDescriptorList_descriptor, new java.lang.String[] { "KpiDescriptorList" }); + internal_static_monitoring_SubsDescriptor_descriptor = getDescriptor().getMessageTypes().get(12); + internal_static_monitoring_SubsDescriptor_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_SubsDescriptor_descriptor, new java.lang.String[] { "SubsId", "KpiId", "SamplingDurationS", "SamplingIntervalS", "StartTimestamp", "EndTimestamp" }); + internal_static_monitoring_SubscriptionID_descriptor = getDescriptor().getMessageTypes().get(13); + internal_static_monitoring_SubscriptionID_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_SubscriptionID_descriptor, new java.lang.String[] { "SubsId" }); + internal_static_monitoring_SubsResponse_descriptor = getDescriptor().getMessageTypes().get(14); + internal_static_monitoring_SubsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_SubsResponse_descriptor, new java.lang.String[] { "SubsId", "KpiList" }); + internal_static_monitoring_SubsList_descriptor = getDescriptor().getMessageTypes().get(15); + internal_static_monitoring_SubsList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_SubsList_descriptor, new java.lang.String[] { "SubsDescriptor" }); + internal_static_monitoring_AlarmDescriptor_descriptor = getDescriptor().getMessageTypes().get(16); + internal_static_monitoring_AlarmDescriptor_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_AlarmDescriptor_descriptor, new java.lang.String[] { "AlarmId", "AlarmDescription", "Name", "KpiId", "KpiValueRange", "Timestamp" }); + internal_static_monitoring_AlarmID_descriptor = getDescriptor().getMessageTypes().get(17); + internal_static_monitoring_AlarmID_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_AlarmID_descriptor, new java.lang.String[] { "AlarmId" }); + internal_static_monitoring_AlarmSubscription_descriptor = getDescriptor().getMessageTypes().get(18); + internal_static_monitoring_AlarmSubscription_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_AlarmSubscription_descriptor, new java.lang.String[] { "AlarmId", "SubscriptionTimeoutS", "SubscriptionFrequencyMs" }); + internal_static_monitoring_AlarmResponse_descriptor = getDescriptor().getMessageTypes().get(19); + internal_static_monitoring_AlarmResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_AlarmResponse_descriptor, new java.lang.String[] { "AlarmId", "Text", "KpiList" }); + internal_static_monitoring_AlarmList_descriptor = getDescriptor().getMessageTypes().get(20); + internal_static_monitoring_AlarmList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_monitoring_AlarmList_descriptor, new java.lang.String[] { "AlarmDescriptor" }); + context.ContextOuterClass.getDescriptor(); + kpi_sample_types.KpiSampleTypes.getDescriptor(); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/ztp/target/generated-sources/grpc/monitoring/MonitoringService.java b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringService.java index 0ce30559b2c0a1bb6236431482d6b99b82cf0842..69f4d6c684168616461957869134bc154c70a018 100644 --- a/src/ztp/target/generated-sources/grpc/monitoring/MonitoringService.java +++ b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringService.java @@ -1,50 +1,43 @@ package monitoring; -import io.quarkus.grpc.runtime.MutinyService; +import io.quarkus.grpc.MutinyService; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: monitoring.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: monitoring.proto") public interface MonitoringService extends MutinyService { - io.smallrye.mutiny.Uni setKpi(monitoring.Monitoring.KpiDescriptor request); - + io.smallrye.mutiny.Uni deleteKpi(monitoring.Monitoring.KpiId request); - + io.smallrye.mutiny.Uni getKpiDescriptor(monitoring.Monitoring.KpiId request); - + io.smallrye.mutiny.Uni getKpiDescriptorList(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni includeKpi(monitoring.Monitoring.Kpi request); - + io.smallrye.mutiny.Uni monitorKpi(monitoring.Monitoring.MonitorKpiRequest request); - + io.smallrye.mutiny.Uni queryKpiData(monitoring.Monitoring.KpiQuery request); - + io.smallrye.mutiny.Uni getSubsDescriptor(monitoring.Monitoring.SubscriptionID request); - + io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni deleteSubscription(monitoring.Monitoring.SubscriptionID request); - + io.smallrye.mutiny.Uni setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request); - + io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request); - + io.smallrye.mutiny.Uni getAlarmDescriptor(monitoring.Monitoring.AlarmID request); - + io.smallrye.mutiny.Uni deleteAlarm(monitoring.Monitoring.AlarmID request); - + io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request); - - + io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request); - + io.smallrye.mutiny.Multi getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request); - - io.smallrye.mutiny.Multi getStreamKpi(monitoring.Monitoring.KpiId request); - - -} \ No newline at end of file + io.smallrye.mutiny.Multi getStreamKpi(monitoring.Monitoring.KpiId request); +} diff --git a/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java index cbc984e7132bdbf22c9b99a510106c5c6f4cbda7..d1278aa92d910fc83219363c19ee19546156b467 100644 --- a/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java +++ b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java @@ -2,165 +2,176 @@ package monitoring; import io.grpc.BindableService; import io.quarkus.grpc.GrpcService; -import io.quarkus.grpc.runtime.MutinyBean; +import io.quarkus.grpc.MutinyBean; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: monitoring.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: monitoring.proto") public class MonitoringServiceBean extends MutinyMonitoringServiceGrpc.MonitoringServiceImplBase implements BindableService, MutinyBean { private final MonitoringService delegate; MonitoringServiceBean(@GrpcService MonitoringService delegate) { - this.delegate = delegate; + this.delegate = delegate; } @Override public io.smallrye.mutiny.Uni setKpi(monitoring.Monitoring.KpiDescriptor request) { - try { - return delegate.setKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni deleteKpi(monitoring.Monitoring.KpiId request) { - try { - return delegate.deleteKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.deleteKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getKpiDescriptor(monitoring.Monitoring.KpiId request) { - try { - return delegate.getKpiDescriptor(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getKpiDescriptor(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getKpiDescriptorList(context.ContextOuterClass.Empty request) { - try { - return delegate.getKpiDescriptorList(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getKpiDescriptorList(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni includeKpi(monitoring.Monitoring.Kpi request) { - try { - return delegate.includeKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.includeKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { - try { - return delegate.monitorKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.monitorKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni queryKpiData(monitoring.Monitoring.KpiQuery request) { - try { - return delegate.queryKpiData(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.queryKpiData(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { - try { - return delegate.getSubsDescriptor(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getSubsDescriptor(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { - try { - return delegate.getSubscriptions(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getSubscriptions(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni deleteSubscription(monitoring.Monitoring.SubscriptionID request) { - try { - return delegate.deleteSubscription(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.deleteSubscription(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { - try { - return delegate.setKpiAlarm(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setKpiAlarm(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { - try { - return delegate.getAlarms(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getAlarms(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { - try { - return delegate.getAlarmDescriptor(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getAlarmDescriptor(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni deleteAlarm(monitoring.Monitoring.AlarmID request) { - try { - return delegate.deleteAlarm(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.deleteAlarm(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { - try { - return delegate.getInstantKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getInstantKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { - try { - return delegate.setKpiSubscription(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.setKpiSubscription(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request) { - try { - return delegate.getAlarmResponseStream(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getAlarmResponseStream(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } @Override public io.smallrye.mutiny.Multi getStreamKpi(monitoring.Monitoring.KpiId request) { - try { - return delegate.getStreamKpi(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.getStreamKpi(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } - -} \ No newline at end of file +} diff --git a/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java index 0e8ff5d1b8929694b49548984cd7d53f9c8f68a4..3e7a9cc26a91fecbbce3aa3ceecb05dde89aaaa7 100644 --- a/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java +++ b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java @@ -1,99 +1,117 @@ package monitoring; import java.util.function.BiFunction; +import io.quarkus.grpc.MutinyClient; -import io.quarkus.grpc.runtime.MutinyClient; - -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: monitoring.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: monitoring.proto") public class MonitoringServiceClient implements MonitoringService, MutinyClient { private final MutinyMonitoringServiceGrpc.MutinyMonitoringServiceStub stub; public MonitoringServiceClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) { - this.stub = stubConfigurator.apply(name,MutinyMonitoringServiceGrpc.newMutinyStub(channel)); + this.stub = stubConfigurator.apply(name, MutinyMonitoringServiceGrpc.newMutinyStub(channel)); + } + + private MonitoringServiceClient(MutinyMonitoringServiceGrpc.MutinyMonitoringServiceStub stub) { + this.stub = stub; + } + + public MonitoringServiceClient newInstanceWithStub(MutinyMonitoringServiceGrpc.MutinyMonitoringServiceStub stub) { + return new MonitoringServiceClient(stub); } @Override public MutinyMonitoringServiceGrpc.MutinyMonitoringServiceStub getStub() { - return stub; + return stub; } @Override public io.smallrye.mutiny.Uni setKpi(monitoring.Monitoring.KpiDescriptor request) { - return stub.setKpi(request); + return stub.setKpi(request); } + @Override public io.smallrye.mutiny.Uni deleteKpi(monitoring.Monitoring.KpiId request) { - return stub.deleteKpi(request); + return stub.deleteKpi(request); } + @Override public io.smallrye.mutiny.Uni getKpiDescriptor(monitoring.Monitoring.KpiId request) { - return stub.getKpiDescriptor(request); + return stub.getKpiDescriptor(request); } + @Override public io.smallrye.mutiny.Uni getKpiDescriptorList(context.ContextOuterClass.Empty request) { - return stub.getKpiDescriptorList(request); + return stub.getKpiDescriptorList(request); } + @Override public io.smallrye.mutiny.Uni includeKpi(monitoring.Monitoring.Kpi request) { - return stub.includeKpi(request); + return stub.includeKpi(request); } + @Override public io.smallrye.mutiny.Uni monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { - return stub.monitorKpi(request); + return stub.monitorKpi(request); } + @Override public io.smallrye.mutiny.Uni queryKpiData(monitoring.Monitoring.KpiQuery request) { - return stub.queryKpiData(request); + return stub.queryKpiData(request); } + @Override public io.smallrye.mutiny.Uni getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { - return stub.getSubsDescriptor(request); + return stub.getSubsDescriptor(request); } + @Override public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { - return stub.getSubscriptions(request); + return stub.getSubscriptions(request); } + @Override public io.smallrye.mutiny.Uni deleteSubscription(monitoring.Monitoring.SubscriptionID request) { - return stub.deleteSubscription(request); + return stub.deleteSubscription(request); } + @Override public io.smallrye.mutiny.Uni setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { - return stub.setKpiAlarm(request); + return stub.setKpiAlarm(request); } + @Override public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { - return stub.getAlarms(request); + return stub.getAlarms(request); } + @Override public io.smallrye.mutiny.Uni getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { - return stub.getAlarmDescriptor(request); + return stub.getAlarmDescriptor(request); } + @Override public io.smallrye.mutiny.Uni deleteAlarm(monitoring.Monitoring.AlarmID request) { - return stub.deleteAlarm(request); + return stub.deleteAlarm(request); } + @Override public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { - return stub.getInstantKpi(request); + return stub.getInstantKpi(request); } @Override public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { - return stub.setKpiSubscription(request); + return stub.setKpiSubscription(request); } @Override public io.smallrye.mutiny.Multi getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request) { - return stub.getAlarmResponseStream(request); + return stub.getAlarmResponseStream(request); } @Override public io.smallrye.mutiny.Multi getStreamKpi(monitoring.Monitoring.KpiId request) { - return stub.getStreamKpi(request); + return stub.getStreamKpi(request); } - -} \ No newline at end of file +} diff --git a/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java index c5f55b3b44c03ea8f5377ce11e3c3e547da5ef06..83dffd6257d5685ee7d49c45258bbf1d68d3a817 100644 --- a/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java +++ b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java @@ -4,1509 +4,961 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@javax.annotation.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.38.1)", comments = "Source: monitoring.proto") public final class MonitoringServiceGrpc { - private MonitoringServiceGrpc() {} + private MonitoringServiceGrpc() { + } - public static final String SERVICE_NAME = "monitoring.MonitoringService"; + public static final String SERVICE_NAME = "monitoring.MonitoringService"; - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getSetKpiMethod; + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getSetKpiMethod; - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetKpi", - requestType = monitoring.Monitoring.KpiDescriptor.class, - responseType = monitoring.Monitoring.KpiId.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetKpiMethod() { - io.grpc.MethodDescriptor getSetKpiMethod; - if ((getSetKpiMethod = MonitoringServiceGrpc.getSetKpiMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetKpi", requestType = monitoring.Monitoring.KpiDescriptor.class, responseType = monitoring.Monitoring.KpiId.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetKpiMethod() { + io.grpc.MethodDescriptor getSetKpiMethod; if ((getSetKpiMethod = MonitoringServiceGrpc.getSetKpiMethod) == null) { - MonitoringServiceGrpc.getSetKpiMethod = getSetKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiDescriptor.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiId.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpi")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getSetKpiMethod = MonitoringServiceGrpc.getSetKpiMethod) == null) { + MonitoringServiceGrpc.getSetKpiMethod = getSetKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiDescriptor.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiId.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpi")).build(); + } + } + } + return getSetKpiMethod; } - return getSetKpiMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteKpiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteKpi", - requestType = monitoring.Monitoring.KpiId.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteKpiMethod() { - io.grpc.MethodDescriptor getDeleteKpiMethod; - if ((getDeleteKpiMethod = MonitoringServiceGrpc.getDeleteKpiMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getDeleteKpiMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteKpi", requestType = monitoring.Monitoring.KpiId.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteKpiMethod() { + io.grpc.MethodDescriptor getDeleteKpiMethod; if ((getDeleteKpiMethod = MonitoringServiceGrpc.getDeleteKpiMethod) == null) { - MonitoringServiceGrpc.getDeleteKpiMethod = getDeleteKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteKpi")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getDeleteKpiMethod = MonitoringServiceGrpc.getDeleteKpiMethod) == null) { + MonitoringServiceGrpc.getDeleteKpiMethod = getDeleteKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteKpi")).build(); + } + } + } + return getDeleteKpiMethod; } - return getDeleteKpiMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetKpiDescriptorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetKpiDescriptor", - requestType = monitoring.Monitoring.KpiId.class, - responseType = monitoring.Monitoring.KpiDescriptor.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetKpiDescriptorMethod() { - io.grpc.MethodDescriptor getGetKpiDescriptorMethod; - if ((getGetKpiDescriptorMethod = MonitoringServiceGrpc.getGetKpiDescriptorMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetKpiDescriptorMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetKpiDescriptor", requestType = monitoring.Monitoring.KpiId.class, responseType = monitoring.Monitoring.KpiDescriptor.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetKpiDescriptorMethod() { + io.grpc.MethodDescriptor getGetKpiDescriptorMethod; if ((getGetKpiDescriptorMethod = MonitoringServiceGrpc.getGetKpiDescriptorMethod) == null) { - MonitoringServiceGrpc.getGetKpiDescriptorMethod = getGetKpiDescriptorMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKpiDescriptor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiDescriptor.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetKpiDescriptor")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetKpiDescriptorMethod = MonitoringServiceGrpc.getGetKpiDescriptorMethod) == null) { + MonitoringServiceGrpc.getGetKpiDescriptorMethod = getGetKpiDescriptorMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKpiDescriptor")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiDescriptor.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetKpiDescriptor")).build(); + } + } + } + return getGetKpiDescriptorMethod; } - return getGetKpiDescriptorMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetKpiDescriptorListMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetKpiDescriptorList", - requestType = context.ContextOuterClass.Empty.class, - responseType = monitoring.Monitoring.KpiDescriptorList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetKpiDescriptorListMethod() { - io.grpc.MethodDescriptor getGetKpiDescriptorListMethod; - if ((getGetKpiDescriptorListMethod = MonitoringServiceGrpc.getGetKpiDescriptorListMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetKpiDescriptorListMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetKpiDescriptorList", requestType = context.ContextOuterClass.Empty.class, responseType = monitoring.Monitoring.KpiDescriptorList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetKpiDescriptorListMethod() { + io.grpc.MethodDescriptor getGetKpiDescriptorListMethod; if ((getGetKpiDescriptorListMethod = MonitoringServiceGrpc.getGetKpiDescriptorListMethod) == null) { - MonitoringServiceGrpc.getGetKpiDescriptorListMethod = getGetKpiDescriptorListMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKpiDescriptorList")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiDescriptorList.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetKpiDescriptorList")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetKpiDescriptorListMethod = MonitoringServiceGrpc.getGetKpiDescriptorListMethod) == null) { + MonitoringServiceGrpc.getGetKpiDescriptorListMethod = getGetKpiDescriptorListMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKpiDescriptorList")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiDescriptorList.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetKpiDescriptorList")).build(); + } + } + } + return getGetKpiDescriptorListMethod; } - return getGetKpiDescriptorListMethod; - } - - private static volatile io.grpc.MethodDescriptor getIncludeKpiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "IncludeKpi", - requestType = monitoring.Monitoring.Kpi.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getIncludeKpiMethod() { - io.grpc.MethodDescriptor getIncludeKpiMethod; - if ((getIncludeKpiMethod = MonitoringServiceGrpc.getIncludeKpiMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getIncludeKpiMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "IncludeKpi", requestType = monitoring.Monitoring.Kpi.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getIncludeKpiMethod() { + io.grpc.MethodDescriptor getIncludeKpiMethod; if ((getIncludeKpiMethod = MonitoringServiceGrpc.getIncludeKpiMethod) == null) { - MonitoringServiceGrpc.getIncludeKpiMethod = getIncludeKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "IncludeKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.Kpi.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("IncludeKpi")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getIncludeKpiMethod = MonitoringServiceGrpc.getIncludeKpiMethod) == null) { + MonitoringServiceGrpc.getIncludeKpiMethod = getIncludeKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "IncludeKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.Kpi.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("IncludeKpi")).build(); + } + } + } + return getIncludeKpiMethod; } - return getIncludeKpiMethod; - } - - private static volatile io.grpc.MethodDescriptor getMonitorKpiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "MonitorKpi", - requestType = monitoring.Monitoring.MonitorKpiRequest.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getMonitorKpiMethod() { - io.grpc.MethodDescriptor getMonitorKpiMethod; - if ((getMonitorKpiMethod = MonitoringServiceGrpc.getMonitorKpiMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getMonitorKpiMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "MonitorKpi", requestType = monitoring.Monitoring.MonitorKpiRequest.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getMonitorKpiMethod() { + io.grpc.MethodDescriptor getMonitorKpiMethod; if ((getMonitorKpiMethod = MonitoringServiceGrpc.getMonitorKpiMethod) == null) { - MonitoringServiceGrpc.getMonitorKpiMethod = getMonitorKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MonitorKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("MonitorKpi")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getMonitorKpiMethod = MonitoringServiceGrpc.getMonitorKpiMethod) == null) { + MonitoringServiceGrpc.getMonitorKpiMethod = getMonitorKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "MonitorKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.MonitorKpiRequest.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("MonitorKpi")).build(); + } + } + } + return getMonitorKpiMethod; } - return getMonitorKpiMethod; - } - - private static volatile io.grpc.MethodDescriptor getQueryKpiDataMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "QueryKpiData", - requestType = monitoring.Monitoring.KpiQuery.class, - responseType = monitoring.Monitoring.RawKpiTable.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getQueryKpiDataMethod() { - io.grpc.MethodDescriptor getQueryKpiDataMethod; - if ((getQueryKpiDataMethod = MonitoringServiceGrpc.getQueryKpiDataMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getQueryKpiDataMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "QueryKpiData", requestType = monitoring.Monitoring.KpiQuery.class, responseType = monitoring.Monitoring.RawKpiTable.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getQueryKpiDataMethod() { + io.grpc.MethodDescriptor getQueryKpiDataMethod; if ((getQueryKpiDataMethod = MonitoringServiceGrpc.getQueryKpiDataMethod) == null) { - MonitoringServiceGrpc.getQueryKpiDataMethod = getQueryKpiDataMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryKpiData")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiQuery.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.RawKpiTable.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("QueryKpiData")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getQueryKpiDataMethod = MonitoringServiceGrpc.getQueryKpiDataMethod) == null) { + MonitoringServiceGrpc.getQueryKpiDataMethod = getQueryKpiDataMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryKpiData")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiQuery.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.RawKpiTable.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("QueryKpiData")).build(); + } + } + } + return getQueryKpiDataMethod; } - return getQueryKpiDataMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetKpiSubscriptionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetKpiSubscription", - requestType = monitoring.Monitoring.SubsDescriptor.class, - responseType = monitoring.Monitoring.SubsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getSetKpiSubscriptionMethod() { - io.grpc.MethodDescriptor getSetKpiSubscriptionMethod; - if ((getSetKpiSubscriptionMethod = MonitoringServiceGrpc.getSetKpiSubscriptionMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getSetKpiSubscriptionMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetKpiSubscription", requestType = monitoring.Monitoring.SubsDescriptor.class, responseType = monitoring.Monitoring.SubsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getSetKpiSubscriptionMethod() { + io.grpc.MethodDescriptor getSetKpiSubscriptionMethod; if ((getSetKpiSubscriptionMethod = MonitoringServiceGrpc.getSetKpiSubscriptionMethod) == null) { - MonitoringServiceGrpc.getSetKpiSubscriptionMethod = getSetKpiSubscriptionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpiSubscription")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubsDescriptor.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubsResponse.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpiSubscription")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getSetKpiSubscriptionMethod = MonitoringServiceGrpc.getSetKpiSubscriptionMethod) == null) { + MonitoringServiceGrpc.getSetKpiSubscriptionMethod = getSetKpiSubscriptionMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpiSubscription")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.SubsDescriptor.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.SubsResponse.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpiSubscription")).build(); + } + } + } + return getSetKpiSubscriptionMethod; } - return getSetKpiSubscriptionMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetSubsDescriptorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSubsDescriptor", - requestType = monitoring.Monitoring.SubscriptionID.class, - responseType = monitoring.Monitoring.SubsDescriptor.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetSubsDescriptorMethod() { - io.grpc.MethodDescriptor getGetSubsDescriptorMethod; - if ((getGetSubsDescriptorMethod = MonitoringServiceGrpc.getGetSubsDescriptorMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetSubsDescriptorMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetSubsDescriptor", requestType = monitoring.Monitoring.SubscriptionID.class, responseType = monitoring.Monitoring.SubsDescriptor.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetSubsDescriptorMethod() { + io.grpc.MethodDescriptor getGetSubsDescriptorMethod; if ((getGetSubsDescriptorMethod = MonitoringServiceGrpc.getGetSubsDescriptorMethod) == null) { - MonitoringServiceGrpc.getGetSubsDescriptorMethod = getGetSubsDescriptorMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubsDescriptor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubscriptionID.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubsDescriptor.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetSubsDescriptor")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetSubsDescriptorMethod = MonitoringServiceGrpc.getGetSubsDescriptorMethod) == null) { + MonitoringServiceGrpc.getGetSubsDescriptorMethod = getGetSubsDescriptorMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubsDescriptor")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.SubscriptionID.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.SubsDescriptor.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetSubsDescriptor")).build(); + } + } + } + return getGetSubsDescriptorMethod; } - return getGetSubsDescriptorMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetSubscriptionsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSubscriptions", - requestType = context.ContextOuterClass.Empty.class, - responseType = monitoring.Monitoring.SubsList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetSubscriptionsMethod() { - io.grpc.MethodDescriptor getGetSubscriptionsMethod; - if ((getGetSubscriptionsMethod = MonitoringServiceGrpc.getGetSubscriptionsMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetSubscriptionsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetSubscriptions", requestType = context.ContextOuterClass.Empty.class, responseType = monitoring.Monitoring.SubsList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetSubscriptionsMethod() { + io.grpc.MethodDescriptor getGetSubscriptionsMethod; if ((getGetSubscriptionsMethod = MonitoringServiceGrpc.getGetSubscriptionsMethod) == null) { - MonitoringServiceGrpc.getGetSubscriptionsMethod = getGetSubscriptionsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubscriptions")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubsList.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetSubscriptions")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetSubscriptionsMethod = MonitoringServiceGrpc.getGetSubscriptionsMethod) == null) { + MonitoringServiceGrpc.getGetSubscriptionsMethod = getGetSubscriptionsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubscriptions")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.SubsList.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetSubscriptions")).build(); + } + } + } + return getGetSubscriptionsMethod; } - return getGetSubscriptionsMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteSubscriptionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteSubscription", - requestType = monitoring.Monitoring.SubscriptionID.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteSubscriptionMethod() { - io.grpc.MethodDescriptor getDeleteSubscriptionMethod; - if ((getDeleteSubscriptionMethod = MonitoringServiceGrpc.getDeleteSubscriptionMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getDeleteSubscriptionMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteSubscription", requestType = monitoring.Monitoring.SubscriptionID.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteSubscriptionMethod() { + io.grpc.MethodDescriptor getDeleteSubscriptionMethod; if ((getDeleteSubscriptionMethod = MonitoringServiceGrpc.getDeleteSubscriptionMethod) == null) { - MonitoringServiceGrpc.getDeleteSubscriptionMethod = getDeleteSubscriptionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSubscription")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.SubscriptionID.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteSubscription")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getDeleteSubscriptionMethod = MonitoringServiceGrpc.getDeleteSubscriptionMethod) == null) { + MonitoringServiceGrpc.getDeleteSubscriptionMethod = getDeleteSubscriptionMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSubscription")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.SubscriptionID.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteSubscription")).build(); + } + } + } + return getDeleteSubscriptionMethod; } - return getDeleteSubscriptionMethod; - } - - private static volatile io.grpc.MethodDescriptor getSetKpiAlarmMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SetKpiAlarm", - requestType = monitoring.Monitoring.AlarmDescriptor.class, - responseType = monitoring.Monitoring.AlarmID.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSetKpiAlarmMethod() { - io.grpc.MethodDescriptor getSetKpiAlarmMethod; - if ((getSetKpiAlarmMethod = MonitoringServiceGrpc.getSetKpiAlarmMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getSetKpiAlarmMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "SetKpiAlarm", requestType = monitoring.Monitoring.AlarmDescriptor.class, responseType = monitoring.Monitoring.AlarmID.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetKpiAlarmMethod() { + io.grpc.MethodDescriptor getSetKpiAlarmMethod; if ((getSetKpiAlarmMethod = MonitoringServiceGrpc.getSetKpiAlarmMethod) == null) { - MonitoringServiceGrpc.getSetKpiAlarmMethod = getSetKpiAlarmMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpiAlarm")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmDescriptor.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmID.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpiAlarm")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getSetKpiAlarmMethod = MonitoringServiceGrpc.getSetKpiAlarmMethod) == null) { + MonitoringServiceGrpc.getSetKpiAlarmMethod = getSetKpiAlarmMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetKpiAlarm")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmDescriptor.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmID.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("SetKpiAlarm")).build(); + } + } + } + return getSetKpiAlarmMethod; } - return getSetKpiAlarmMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetAlarmsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAlarms", - requestType = context.ContextOuterClass.Empty.class, - responseType = monitoring.Monitoring.AlarmList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetAlarmsMethod() { - io.grpc.MethodDescriptor getGetAlarmsMethod; - if ((getGetAlarmsMethod = MonitoringServiceGrpc.getGetAlarmsMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetAlarmsMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetAlarms", requestType = context.ContextOuterClass.Empty.class, responseType = monitoring.Monitoring.AlarmList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAlarmsMethod() { + io.grpc.MethodDescriptor getGetAlarmsMethod; if ((getGetAlarmsMethod = MonitoringServiceGrpc.getGetAlarmsMethod) == null) { - MonitoringServiceGrpc.getGetAlarmsMethod = getGetAlarmsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarms")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmList.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarms")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetAlarmsMethod = MonitoringServiceGrpc.getGetAlarmsMethod) == null) { + MonitoringServiceGrpc.getGetAlarmsMethod = getGetAlarmsMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarms")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmList.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarms")).build(); + } + } + } + return getGetAlarmsMethod; } - return getGetAlarmsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetAlarmDescriptorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAlarmDescriptor", - requestType = monitoring.Monitoring.AlarmID.class, - responseType = monitoring.Monitoring.AlarmDescriptor.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetAlarmDescriptorMethod() { - io.grpc.MethodDescriptor getGetAlarmDescriptorMethod; - if ((getGetAlarmDescriptorMethod = MonitoringServiceGrpc.getGetAlarmDescriptorMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetAlarmDescriptorMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetAlarmDescriptor", requestType = monitoring.Monitoring.AlarmID.class, responseType = monitoring.Monitoring.AlarmDescriptor.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAlarmDescriptorMethod() { + io.grpc.MethodDescriptor getGetAlarmDescriptorMethod; if ((getGetAlarmDescriptorMethod = MonitoringServiceGrpc.getGetAlarmDescriptorMethod) == null) { - MonitoringServiceGrpc.getGetAlarmDescriptorMethod = getGetAlarmDescriptorMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarmDescriptor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmID.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmDescriptor.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarmDescriptor")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetAlarmDescriptorMethod = MonitoringServiceGrpc.getGetAlarmDescriptorMethod) == null) { + MonitoringServiceGrpc.getGetAlarmDescriptorMethod = getGetAlarmDescriptorMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarmDescriptor")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmID.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmDescriptor.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarmDescriptor")).build(); + } + } + } + return getGetAlarmDescriptorMethod; } - return getGetAlarmDescriptorMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetAlarmResponseStreamMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAlarmResponseStream", - requestType = monitoring.Monitoring.AlarmSubscription.class, - responseType = monitoring.Monitoring.AlarmResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetAlarmResponseStreamMethod() { - io.grpc.MethodDescriptor getGetAlarmResponseStreamMethod; - if ((getGetAlarmResponseStreamMethod = MonitoringServiceGrpc.getGetAlarmResponseStreamMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetAlarmResponseStreamMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetAlarmResponseStream", requestType = monitoring.Monitoring.AlarmSubscription.class, responseType = monitoring.Monitoring.AlarmResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetAlarmResponseStreamMethod() { + io.grpc.MethodDescriptor getGetAlarmResponseStreamMethod; if ((getGetAlarmResponseStreamMethod = MonitoringServiceGrpc.getGetAlarmResponseStreamMethod) == null) { - MonitoringServiceGrpc.getGetAlarmResponseStreamMethod = getGetAlarmResponseStreamMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarmResponseStream")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmSubscription.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmResponse.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarmResponseStream")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getGetAlarmResponseStreamMethod = MonitoringServiceGrpc.getGetAlarmResponseStreamMethod) == null) { + MonitoringServiceGrpc.getGetAlarmResponseStreamMethod = getGetAlarmResponseStreamMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAlarmResponseStream")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmSubscription.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmResponse.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetAlarmResponseStream")).build(); + } + } + } + return getGetAlarmResponseStreamMethod; } - return getGetAlarmResponseStreamMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteAlarmMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteAlarm", - requestType = monitoring.Monitoring.AlarmID.class, - responseType = context.ContextOuterClass.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteAlarmMethod() { - io.grpc.MethodDescriptor getDeleteAlarmMethod; - if ((getDeleteAlarmMethod = MonitoringServiceGrpc.getDeleteAlarmMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getDeleteAlarmMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "DeleteAlarm", requestType = monitoring.Monitoring.AlarmID.class, responseType = context.ContextOuterClass.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteAlarmMethod() { + io.grpc.MethodDescriptor getDeleteAlarmMethod; if ((getDeleteAlarmMethod = MonitoringServiceGrpc.getDeleteAlarmMethod) == null) { - MonitoringServiceGrpc.getDeleteAlarmMethod = getDeleteAlarmMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAlarm")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.AlarmID.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteAlarm")) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + if ((getDeleteAlarmMethod = MonitoringServiceGrpc.getDeleteAlarmMethod) == null) { + MonitoringServiceGrpc.getDeleteAlarmMethod = getDeleteAlarmMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAlarm")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.AlarmID.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("DeleteAlarm")).build(); + } + } + } + return getDeleteAlarmMethod; } - return getDeleteAlarmMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetStreamKpiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetStreamKpi", - requestType = monitoring.Monitoring.KpiId.class, - responseType = monitoring.Monitoring.Kpi.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getGetStreamKpiMethod() { - io.grpc.MethodDescriptor getGetStreamKpiMethod; - if ((getGetStreamKpiMethod = MonitoringServiceGrpc.getGetStreamKpiMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getGetStreamKpiMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetStreamKpi", requestType = monitoring.Monitoring.KpiId.class, responseType = monitoring.Monitoring.Kpi.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getGetStreamKpiMethod() { + io.grpc.MethodDescriptor getGetStreamKpiMethod; if ((getGetStreamKpiMethod = MonitoringServiceGrpc.getGetStreamKpiMethod) == null) { - MonitoringServiceGrpc.getGetStreamKpiMethod = getGetStreamKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStreamKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.Kpi.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetStreamKpi")) - .build(); - } - } - } - return getGetStreamKpiMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetInstantKpiMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetInstantKpi", - requestType = monitoring.Monitoring.KpiId.class, - responseType = monitoring.Monitoring.Kpi.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetInstantKpiMethod() { - io.grpc.MethodDescriptor getGetInstantKpiMethod; - if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) { - synchronized (MonitoringServiceGrpc.class) { - if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) { - MonitoringServiceGrpc.getGetInstantKpiMethod = getGetInstantKpiMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstantKpi")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.KpiId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - monitoring.Monitoring.Kpi.getDefaultInstance())) - .setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetInstantKpi")) - .build(); - } - } - } - return getGetInstantKpiMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static MonitoringServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public MonitoringServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MonitoringServiceStub(channel, callOptions); - } - }; - return MonitoringServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static MonitoringServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public MonitoringServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MonitoringServiceBlockingStub(channel, callOptions); - } - }; - return MonitoringServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static MonitoringServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public MonitoringServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MonitoringServiceFutureStub(channel, callOptions); + synchronized (MonitoringServiceGrpc.class) { + if ((getGetStreamKpiMethod = MonitoringServiceGrpc.getGetStreamKpiMethod) == null) { + MonitoringServiceGrpc.getGetStreamKpiMethod = getGetStreamKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStreamKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.Kpi.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetStreamKpi")).build(); + } + } } - }; - return MonitoringServiceFutureStub.newStub(factory, channel); - } + return getGetStreamKpiMethod; + } - /** - */ - public static abstract class MonitoringServiceImplBase implements io.grpc.BindableService { + private static volatile io.grpc.MethodDescriptor getGetInstantKpiMethod; - /** - */ - public void setKpi(monitoring.Monitoring.KpiDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiMethod(), responseObserver); + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "GetInstantKpi", requestType = monitoring.Monitoring.KpiId.class, responseType = monitoring.Monitoring.Kpi.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetInstantKpiMethod() { + io.grpc.MethodDescriptor getGetInstantKpiMethod; + if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) { + synchronized (MonitoringServiceGrpc.class) { + if ((getGetInstantKpiMethod = MonitoringServiceGrpc.getGetInstantKpiMethod) == null) { + MonitoringServiceGrpc.getGetInstantKpiMethod = getGetInstantKpiMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstantKpi")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.KpiId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(monitoring.Monitoring.Kpi.getDefaultInstance())).setSchemaDescriptor(new MonitoringServiceMethodDescriptorSupplier("GetInstantKpi")).build(); + } + } + } + return getGetInstantKpiMethod; } /** + * Creates a new async stub that supports all call types for the service */ - public void deleteKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteKpiMethod(), responseObserver); - } + public static MonitoringServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { - /** - */ - public void getKpiDescriptor(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorMethod(), responseObserver); + @java.lang.Override + public MonitoringServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MonitoringServiceStub(channel, callOptions); + } + }; + return MonitoringServiceStub.newStub(factory, channel); } /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public void getKpiDescriptorList(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorListMethod(), responseObserver); - } + public static MonitoringServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { - /** - */ - public void includeKpi(monitoring.Monitoring.Kpi request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIncludeKpiMethod(), responseObserver); + @java.lang.Override + public MonitoringServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MonitoringServiceBlockingStub(channel, callOptions); + } + }; + return MonitoringServiceBlockingStub.newStub(factory, channel); } /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorKpiMethod(), responseObserver); - } + public static MonitoringServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { - /** - */ - public void queryKpiData(monitoring.Monitoring.KpiQuery request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryKpiDataMethod(), responseObserver); + @java.lang.Override + public MonitoringServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MonitoringServiceFutureStub(channel, callOptions); + } + }; + return MonitoringServiceFutureStub.newStub(factory, channel); } /** */ - public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiSubscriptionMethod(), responseObserver); - } + public static abstract class MonitoringServiceImplBase implements io.grpc.BindableService { - /** - */ - public void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubsDescriptorMethod(), responseObserver); - } + /** + */ + public void setKpi(monitoring.Monitoring.KpiDescriptor request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiMethod(), responseObserver); + } - /** - */ - public void getSubscriptions(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubscriptionsMethod(), responseObserver); - } + /** + */ + public void deleteKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteKpiMethod(), responseObserver); + } - /** - */ - public void deleteSubscription(monitoring.Monitoring.SubscriptionID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubscriptionMethod(), responseObserver); - } + /** + */ + public void getKpiDescriptor(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorMethod(), responseObserver); + } - /** - */ - public void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiAlarmMethod(), responseObserver); - } + /** + */ + public void getKpiDescriptorList(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorListMethod(), responseObserver); + } - /** - */ - public void getAlarms(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmsMethod(), responseObserver); - } + /** + */ + public void includeKpi(monitoring.Monitoring.Kpi request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIncludeKpiMethod(), responseObserver); + } - /** - */ - public void getAlarmDescriptor(monitoring.Monitoring.AlarmID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmDescriptorMethod(), responseObserver); - } + /** + */ + public void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorKpiMethod(), responseObserver); + } - /** - */ - public void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmResponseStreamMethod(), responseObserver); - } + /** + */ + public void queryKpiData(monitoring.Monitoring.KpiQuery request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryKpiDataMethod(), responseObserver); + } - /** - */ - public void deleteAlarm(monitoring.Monitoring.AlarmID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteAlarmMethod(), responseObserver); - } + /** + */ + public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiSubscriptionMethod(), responseObserver); + } - /** - */ - public void getStreamKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStreamKpiMethod(), responseObserver); - } + /** + */ + public void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubsDescriptorMethod(), responseObserver); + } - /** - */ - public void getInstantKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstantKpiMethod(), responseObserver); - } + /** + */ + public void getSubscriptions(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubscriptionsMethod(), responseObserver); + } - @java.lang.Override public final 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(); - } - } - - /** - */ - public static final class MonitoringServiceStub extends io.grpc.stub.AbstractAsyncStub { - private MonitoringServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void deleteSubscription(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubscriptionMethod(), responseObserver); + } - @java.lang.Override - protected MonitoringServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MonitoringServiceStub(channel, callOptions); - } + /** + */ + public void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiAlarmMethod(), responseObserver); + } - /** - */ - public void setKpi(monitoring.Monitoring.KpiDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetKpiMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getAlarms(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmsMethod(), responseObserver); + } - /** - */ - public void deleteKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteKpiMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getAlarmDescriptor(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmDescriptorMethod(), responseObserver); + } - /** - */ - public void getKpiDescriptor(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetKpiDescriptorMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmResponseStreamMethod(), responseObserver); + } - /** - */ - public void getKpiDescriptorList(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetKpiDescriptorListMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void deleteAlarm(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteAlarmMethod(), responseObserver); + } - /** - */ - public void includeKpi(monitoring.Monitoring.Kpi request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getIncludeKpiMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getStreamKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStreamKpiMethod(), responseObserver); + } - /** - */ - public void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getMonitorKpiMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getInstantKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstantKpiMethod(), responseObserver); + } - /** - */ - public void queryKpiData(monitoring.Monitoring.KpiQuery request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getQueryKpiDataMethod(), getCallOptions()), request, responseObserver); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getSetKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_KPI))).addMethod(getDeleteKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_KPI))).addMethod(getGetKpiDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_KPI_DESCRIPTOR))).addMethod(getGetKpiDescriptorListMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_KPI_DESCRIPTOR_LIST))).addMethod(getIncludeKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_INCLUDE_KPI))).addMethod(getMonitorKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_MONITOR_KPI))).addMethod(getQueryKpiDataMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_QUERY_KPI_DATA))).addMethod(getSetKpiSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_SET_KPI_SUBSCRIPTION))).addMethod(getGetSubsDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SUBS_DESCRIPTOR))).addMethod(getGetSubscriptionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SUBSCRIPTIONS))).addMethod(getDeleteSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_SUBSCRIPTION))).addMethod(getSetKpiAlarmMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_SET_KPI_ALARM))).addMethod(getGetAlarmsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_ALARMS))).addMethod(getGetAlarmDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_ALARM_DESCRIPTOR))).addMethod(getGetAlarmResponseStreamMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_ALARM_RESPONSE_STREAM))).addMethod(getDeleteAlarmMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_ALARM))).addMethod(getGetStreamKpiMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_STREAM_KPI))).addMethod(getGetInstantKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_GET_INSTANT_KPI))).build(); + } } /** */ - public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getSetKpiSubscriptionMethod(), getCallOptions()), request, responseObserver); - } + public static class MonitoringServiceStub extends io.grpc.stub.AbstractAsyncStub { - /** - */ - public void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSubsDescriptorMethod(), getCallOptions()), request, responseObserver); - } + private MonitoringServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public void getSubscriptions(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request, responseObserver); - } + @java.lang.Override + protected MonitoringServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MonitoringServiceStub(channel, callOptions); + } - /** - */ - public void deleteSubscription(monitoring.Monitoring.SubscriptionID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteSubscriptionMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void setKpi(monitoring.Monitoring.KpiDescriptor request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetKpiMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetKpiAlarmMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void deleteKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteKpiMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void getAlarms(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getKpiDescriptor(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetKpiDescriptorMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void getAlarmDescriptor(monitoring.Monitoring.AlarmID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAlarmDescriptorMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void getKpiDescriptorList(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetKpiDescriptorListMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetAlarmResponseStreamMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void includeKpi(monitoring.Monitoring.Kpi request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getIncludeKpiMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void deleteAlarm(monitoring.Monitoring.AlarmID request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteAlarmMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getMonitorKpiMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void getStreamKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGetStreamKpiMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void queryKpiData(monitoring.Monitoring.KpiQuery request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getQueryKpiDataMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public void getInstantKpi(monitoring.Monitoring.KpiId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - */ - public static final class MonitoringServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private MonitoringServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getSetKpiSubscriptionMethod(), getCallOptions()), request, responseObserver); + } - @java.lang.Override - protected MonitoringServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MonitoringServiceBlockingStub(channel, callOptions); - } + /** + */ + public void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetSubsDescriptorMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public monitoring.Monitoring.KpiId setKpi(monitoring.Monitoring.KpiDescriptor request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetKpiMethod(), getCallOptions(), request); - } + /** + */ + public void getSubscriptions(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty deleteKpi(monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteKpiMethod(), getCallOptions(), request); - } + /** + */ + public void deleteSubscription(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteSubscriptionMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public monitoring.Monitoring.KpiDescriptor getKpiDescriptor(monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetKpiDescriptorMethod(), getCallOptions(), request); - } + /** + */ + public void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getSetKpiAlarmMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public monitoring.Monitoring.KpiDescriptorList getKpiDescriptorList(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetKpiDescriptorListMethod(), getCallOptions(), request); - } + /** + */ + public void getAlarms(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty includeKpi(monitoring.Monitoring.Kpi request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getIncludeKpiMethod(), getCallOptions(), request); - } + /** + */ + public void getAlarmDescriptor(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetAlarmDescriptorMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public context.ContextOuterClass.Empty monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getMonitorKpiMethod(), getCallOptions(), request); - } + /** + */ + public void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetAlarmResponseStreamMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public monitoring.Monitoring.RawKpiTable queryKpiData(monitoring.Monitoring.KpiQuery request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getQueryKpiDataMethod(), getCallOptions(), request); - } + /** + */ + public void deleteAlarm(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getDeleteAlarmMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public java.util.Iterator setKpiSubscription( - monitoring.Monitoring.SubsDescriptor request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getSetKpiSubscriptionMethod(), getCallOptions(), request); - } + /** + */ + public void getStreamKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall(getChannel().newCall(getGetStreamKpiMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSubsDescriptorMethod(), getCallOptions(), request); + /** + */ + public void getInstantKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request, responseObserver); + } } /** */ - public monitoring.Monitoring.SubsList getSubscriptions(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSubscriptionsMethod(), getCallOptions(), request); - } + public static class MonitoringServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - /** - */ - public context.ContextOuterClass.Empty deleteSubscription(monitoring.Monitoring.SubscriptionID request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteSubscriptionMethod(), getCallOptions(), request); - } + private MonitoringServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public monitoring.Monitoring.AlarmID setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetKpiAlarmMethod(), getCallOptions(), request); - } + @java.lang.Override + protected MonitoringServiceBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MonitoringServiceBlockingStub(channel, callOptions); + } - /** - */ - public monitoring.Monitoring.AlarmList getAlarms(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAlarmsMethod(), getCallOptions(), request); - } + /** + */ + public monitoring.Monitoring.KpiId setKpi(monitoring.Monitoring.KpiDescriptor request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetKpiMethod(), getCallOptions(), request); + } - /** - */ - public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAlarmDescriptorMethod(), getCallOptions(), request); - } + /** + */ + public context.ContextOuterClass.Empty deleteKpi(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteKpiMethod(), getCallOptions(), request); + } - /** - */ - public java.util.Iterator getAlarmResponseStream( - monitoring.Monitoring.AlarmSubscription request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetAlarmResponseStreamMethod(), getCallOptions(), request); - } + /** + */ + public monitoring.Monitoring.KpiDescriptor getKpiDescriptor(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetKpiDescriptorMethod(), getCallOptions(), request); + } - /** - */ - public context.ContextOuterClass.Empty deleteAlarm(monitoring.Monitoring.AlarmID request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteAlarmMethod(), getCallOptions(), request); - } + /** + */ + public monitoring.Monitoring.KpiDescriptorList getKpiDescriptorList(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetKpiDescriptorListMethod(), getCallOptions(), request); + } - /** - */ - public java.util.Iterator getStreamKpi( - monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getGetStreamKpiMethod(), getCallOptions(), request); - } + /** + */ + public context.ContextOuterClass.Empty includeKpi(monitoring.Monitoring.Kpi request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getIncludeKpiMethod(), getCallOptions(), request); + } - /** - */ - public monitoring.Monitoring.Kpi getInstantKpi(monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetInstantKpiMethod(), getCallOptions(), request); - } - } - - /** - */ - public static final class MonitoringServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private MonitoringServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public context.ContextOuterClass.Empty monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getMonitorKpiMethod(), getCallOptions(), request); + } - @java.lang.Override - protected MonitoringServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MonitoringServiceFutureStub(channel, callOptions); - } + /** + */ + public monitoring.Monitoring.RawKpiTable queryKpiData(monitoring.Monitoring.KpiQuery request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getQueryKpiDataMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture setKpi( - monitoring.Monitoring.KpiDescriptor request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetKpiMethod(), getCallOptions()), request); - } + /** + */ + public java.util.Iterator setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getSetKpiSubscriptionMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture deleteKpi( - monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteKpiMethod(), getCallOptions()), request); - } + /** + */ + public monitoring.Monitoring.SubsDescriptor getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetSubsDescriptorMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getKpiDescriptor( - monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetKpiDescriptorMethod(), getCallOptions()), request); - } + /** + */ + public monitoring.Monitoring.SubsList getSubscriptions(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetSubscriptionsMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getKpiDescriptorList( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetKpiDescriptorListMethod(), getCallOptions()), request); - } + /** + */ + public context.ContextOuterClass.Empty deleteSubscription(monitoring.Monitoring.SubscriptionID request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteSubscriptionMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture includeKpi( - monitoring.Monitoring.Kpi request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getIncludeKpiMethod(), getCallOptions()), request); - } + /** + */ + public monitoring.Monitoring.AlarmID setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getSetKpiAlarmMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture monitorKpi( - monitoring.Monitoring.MonitorKpiRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getMonitorKpiMethod(), getCallOptions()), request); - } + /** + */ + public monitoring.Monitoring.AlarmList getAlarms(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetAlarmsMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture queryKpiData( - monitoring.Monitoring.KpiQuery request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getQueryKpiDataMethod(), getCallOptions()), request); - } + /** + */ + public monitoring.Monitoring.AlarmDescriptor getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetAlarmDescriptorMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getSubsDescriptor( - monitoring.Monitoring.SubscriptionID request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSubsDescriptorMethod(), getCallOptions()), request); - } + /** + */ + public java.util.Iterator getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetAlarmResponseStreamMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getSubscriptions( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request); - } + /** + */ + public context.ContextOuterClass.Empty deleteAlarm(monitoring.Monitoring.AlarmID request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getDeleteAlarmMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture deleteSubscription( - monitoring.Monitoring.SubscriptionID request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteSubscriptionMethod(), getCallOptions()), request); - } + /** + */ + public java.util.Iterator getStreamKpi(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall(getChannel(), getGetStreamKpiMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture setKpiAlarm( - monitoring.Monitoring.AlarmDescriptor request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSetKpiAlarmMethod(), getCallOptions()), request); + /** + */ + public monitoring.Monitoring.Kpi getInstantKpi(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getGetInstantKpiMethod(), getCallOptions(), request); + } } /** */ - public com.google.common.util.concurrent.ListenableFuture getAlarms( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request); - } + public static class MonitoringServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - /** - */ - public com.google.common.util.concurrent.ListenableFuture getAlarmDescriptor( - monitoring.Monitoring.AlarmID request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAlarmDescriptorMethod(), getCallOptions()), request); - } + private MonitoringServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture deleteAlarm( - monitoring.Monitoring.AlarmID request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteAlarmMethod(), getCallOptions()), request); - } + @java.lang.Override + protected MonitoringServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MonitoringServiceFutureStub(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture getInstantKpi( - monitoring.Monitoring.KpiId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_SET_KPI = 0; - private static final int METHODID_DELETE_KPI = 1; - private static final int METHODID_GET_KPI_DESCRIPTOR = 2; - private static final int METHODID_GET_KPI_DESCRIPTOR_LIST = 3; - private static final int METHODID_INCLUDE_KPI = 4; - private static final int METHODID_MONITOR_KPI = 5; - private static final int METHODID_QUERY_KPI_DATA = 6; - private static final int METHODID_SET_KPI_SUBSCRIPTION = 7; - private static final int METHODID_GET_SUBS_DESCRIPTOR = 8; - private static final int METHODID_GET_SUBSCRIPTIONS = 9; - private static final int METHODID_DELETE_SUBSCRIPTION = 10; - private static final int METHODID_SET_KPI_ALARM = 11; - private static final int METHODID_GET_ALARMS = 12; - private static final int METHODID_GET_ALARM_DESCRIPTOR = 13; - private static final int METHODID_GET_ALARM_RESPONSE_STREAM = 14; - private static final int METHODID_DELETE_ALARM = 15; - private static final int METHODID_GET_STREAM_KPI = 16; - private static final int METHODID_GET_INSTANT_KPI = 17; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final MonitoringServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(MonitoringServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture setKpi(monitoring.Monitoring.KpiDescriptor request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetKpiMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteKpi(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteKpiMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getKpiDescriptor(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetKpiDescriptorMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getKpiDescriptorList(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetKpiDescriptorListMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture includeKpi(monitoring.Monitoring.Kpi request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getIncludeKpiMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getMonitorKpiMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture queryKpiData(monitoring.Monitoring.KpiQuery request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getQueryKpiDataMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetSubsDescriptorMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getSubscriptions(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetSubscriptionsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteSubscription(monitoring.Monitoring.SubscriptionID request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteSubscriptionMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getSetKpiAlarmMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getAlarms(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetAlarmsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetAlarmDescriptorMethod(), getCallOptions()), request); + } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_SET_KPI: - serviceImpl.setKpi((monitoring.Monitoring.KpiDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_KPI: - serviceImpl.deleteKpi((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_KPI_DESCRIPTOR: - serviceImpl.getKpiDescriptor((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_KPI_DESCRIPTOR_LIST: - serviceImpl.getKpiDescriptorList((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_INCLUDE_KPI: - serviceImpl.includeKpi((monitoring.Monitoring.Kpi) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_MONITOR_KPI: - serviceImpl.monitorKpi((monitoring.Monitoring.MonitorKpiRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_QUERY_KPI_DATA: - serviceImpl.queryKpiData((monitoring.Monitoring.KpiQuery) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_KPI_SUBSCRIPTION: - serviceImpl.setKpiSubscription((monitoring.Monitoring.SubsDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SUBS_DESCRIPTOR: - serviceImpl.getSubsDescriptor((monitoring.Monitoring.SubscriptionID) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SUBSCRIPTIONS: - serviceImpl.getSubscriptions((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_SUBSCRIPTION: - serviceImpl.deleteSubscription((monitoring.Monitoring.SubscriptionID) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SET_KPI_ALARM: - serviceImpl.setKpiAlarm((monitoring.Monitoring.AlarmDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ALARMS: - serviceImpl.getAlarms((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ALARM_DESCRIPTOR: - serviceImpl.getAlarmDescriptor((monitoring.Monitoring.AlarmID) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ALARM_RESPONSE_STREAM: - serviceImpl.getAlarmResponseStream((monitoring.Monitoring.AlarmSubscription) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_ALARM: - serviceImpl.deleteAlarm((monitoring.Monitoring.AlarmID) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_STREAM_KPI: - serviceImpl.getStreamKpi((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_INSTANT_KPI: - serviceImpl.getInstantKpi((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteAlarm(monitoring.Monitoring.AlarmID request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getDeleteAlarmMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getInstantKpi(monitoring.Monitoring.KpiId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getGetInstantKpiMethod(), getCallOptions()), request); + } } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } + private static final int METHODID_SET_KPI = 0; + + private static final int METHODID_DELETE_KPI = 1; + + private static final int METHODID_GET_KPI_DESCRIPTOR = 2; + + private static final int METHODID_GET_KPI_DESCRIPTOR_LIST = 3; + + private static final int METHODID_INCLUDE_KPI = 4; + + private static final int METHODID_MONITOR_KPI = 5; + + private static final int METHODID_QUERY_KPI_DATA = 6; + + private static final int METHODID_SET_KPI_SUBSCRIPTION = 7; + + private static final int METHODID_GET_SUBS_DESCRIPTOR = 8; + + private static final int METHODID_GET_SUBSCRIPTIONS = 9; + + private static final int METHODID_DELETE_SUBSCRIPTION = 10; + + private static final int METHODID_SET_KPI_ALARM = 11; + + private static final int METHODID_GET_ALARMS = 12; + + private static final int METHODID_GET_ALARM_DESCRIPTOR = 13; + + private static final int METHODID_GET_ALARM_RESPONSE_STREAM = 14; + + private static final int METHODID_DELETE_ALARM = 15; + + private static final int METHODID_GET_STREAM_KPI = 16; + + private static final int METHODID_GET_INSTANT_KPI = 17; + + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + + private final MonitoringServiceImplBase serviceImpl; + + private final int methodId; + + MethodHandlers(MonitoringServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + case METHODID_SET_KPI: + serviceImpl.setKpi((monitoring.Monitoring.KpiDescriptor) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_KPI: + serviceImpl.deleteKpi((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_KPI_DESCRIPTOR: + serviceImpl.getKpiDescriptor((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_KPI_DESCRIPTOR_LIST: + serviceImpl.getKpiDescriptorList((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_INCLUDE_KPI: + serviceImpl.includeKpi((monitoring.Monitoring.Kpi) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_MONITOR_KPI: + serviceImpl.monitorKpi((monitoring.Monitoring.MonitorKpiRequest) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_QUERY_KPI_DATA: + serviceImpl.queryKpiData((monitoring.Monitoring.KpiQuery) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_KPI_SUBSCRIPTION: + serviceImpl.setKpiSubscription((monitoring.Monitoring.SubsDescriptor) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SUBS_DESCRIPTOR: + serviceImpl.getSubsDescriptor((monitoring.Monitoring.SubscriptionID) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SUBSCRIPTIONS: + serviceImpl.getSubscriptions((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SUBSCRIPTION: + serviceImpl.deleteSubscription((monitoring.Monitoring.SubscriptionID) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_KPI_ALARM: + serviceImpl.setKpiAlarm((monitoring.Monitoring.AlarmDescriptor) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ALARMS: + serviceImpl.getAlarms((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ALARM_DESCRIPTOR: + serviceImpl.getAlarmDescriptor((monitoring.Monitoring.AlarmID) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ALARM_RESPONSE_STREAM: + serviceImpl.getAlarmResponseStream((monitoring.Monitoring.AlarmSubscription) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ALARM: + serviceImpl.deleteAlarm((monitoring.Monitoring.AlarmID) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_STREAM_KPI: + serviceImpl.getStreamKpi((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_INSTANT_KPI: + serviceImpl.getInstantKpi((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + default: + throw new AssertionError(); + } + } } - } - private static abstract class MonitoringServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - MonitoringServiceBaseDescriptorSupplier() {} + private static abstract class MonitoringServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + + MonitoringServiceBaseDescriptorSupplier() { + } + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return monitoring.Monitoring.getDescriptor(); + } - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return monitoring.Monitoring.getDescriptor(); + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("MonitoringService"); + } } - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("MonitoringService"); + private static final class MonitoringServiceFileDescriptorSupplier extends MonitoringServiceBaseDescriptorSupplier { + + MonitoringServiceFileDescriptorSupplier() { + } } - } - private static final class MonitoringServiceFileDescriptorSupplier - extends MonitoringServiceBaseDescriptorSupplier { - MonitoringServiceFileDescriptorSupplier() {} - } + private static final class MonitoringServiceMethodDescriptorSupplier extends MonitoringServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private static final class MonitoringServiceMethodDescriptorSupplier - extends MonitoringServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final String methodName; - MonitoringServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } + MonitoringServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } } - } - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (MonitoringServiceGrpc.class) { - result = serviceDescriptor; + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new MonitoringServiceFileDescriptorSupplier()) - .addMethod(getSetKpiMethod()) - .addMethod(getDeleteKpiMethod()) - .addMethod(getGetKpiDescriptorMethod()) - .addMethod(getGetKpiDescriptorListMethod()) - .addMethod(getIncludeKpiMethod()) - .addMethod(getMonitorKpiMethod()) - .addMethod(getQueryKpiDataMethod()) - .addMethod(getSetKpiSubscriptionMethod()) - .addMethod(getGetSubsDescriptorMethod()) - .addMethod(getGetSubscriptionsMethod()) - .addMethod(getDeleteSubscriptionMethod()) - .addMethod(getSetKpiAlarmMethod()) - .addMethod(getGetAlarmsMethod()) - .addMethod(getGetAlarmDescriptorMethod()) - .addMethod(getGetAlarmResponseStreamMethod()) - .addMethod(getDeleteAlarmMethod()) - .addMethod(getGetStreamKpiMethod()) - .addMethod(getGetInstantKpiMethod()) - .build(); - } - } + synchronized (MonitoringServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new MonitoringServiceFileDescriptorSupplier()).addMethod(getSetKpiMethod()).addMethod(getDeleteKpiMethod()).addMethod(getGetKpiDescriptorMethod()).addMethod(getGetKpiDescriptorListMethod()).addMethod(getIncludeKpiMethod()).addMethod(getMonitorKpiMethod()).addMethod(getQueryKpiDataMethod()).addMethod(getSetKpiSubscriptionMethod()).addMethod(getGetSubsDescriptorMethod()).addMethod(getGetSubscriptionsMethod()).addMethod(getDeleteSubscriptionMethod()).addMethod(getSetKpiAlarmMethod()).addMethod(getGetAlarmsMethod()).addMethod(getGetAlarmDescriptorMethod()).addMethod(getGetAlarmResponseStreamMethod()).addMethod(getDeleteAlarmMethod()).addMethod(getGetStreamKpiMethod()).addMethod(getGetInstantKpiMethod()).build(); + } + } + } + return result; } - return result; - } } diff --git a/src/ztp/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java b/src/ztp/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java index f045ecc7ed434ba90bdfda065f18e0d839850a76..b4aaeb338610eee182a8132056f00ea99e180891 100644 --- a/src/ztp/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java +++ b/src/ztp/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java @@ -6,18 +6,18 @@ import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: monitoring.proto") -public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc { - private MutinyMonitoringServiceGrpc() {} +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: monitoring.proto") +public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.MutinyGrpc { + + private MutinyMonitoringServiceGrpc() { + } public static MutinyMonitoringServiceStub newMutinyStub(io.grpc.Channel channel) { return new MutinyMonitoringServiceStub(channel); } - - public static final class MutinyMonitoringServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub { + public static class MutinyMonitoringServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.MutinyStub { + private MonitoringServiceGrpc.MonitoringServiceStub delegateStub; private MutinyMonitoringServiceStub(io.grpc.Channel channel) { @@ -35,361 +35,213 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim return new MutinyMonitoringServiceStub(channel, callOptions); } - public io.smallrye.mutiny.Uni setKpi(monitoring.Monitoring.KpiDescriptor request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setKpi); } - public io.smallrye.mutiny.Uni deleteKpi(monitoring.Monitoring.KpiId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::deleteKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteKpi); } - public io.smallrye.mutiny.Uni getKpiDescriptor(monitoring.Monitoring.KpiId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getKpiDescriptor); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getKpiDescriptor); } - public io.smallrye.mutiny.Uni getKpiDescriptorList(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getKpiDescriptorList); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getKpiDescriptorList); } - public io.smallrye.mutiny.Uni includeKpi(monitoring.Monitoring.Kpi request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::includeKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::includeKpi); } - public io.smallrye.mutiny.Uni monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::monitorKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::monitorKpi); } - public io.smallrye.mutiny.Uni queryKpiData(monitoring.Monitoring.KpiQuery request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::queryKpiData); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::queryKpiData); } - public io.smallrye.mutiny.Uni getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getSubsDescriptor); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getSubsDescriptor); } - public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getSubscriptions); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getSubscriptions); } - public io.smallrye.mutiny.Uni deleteSubscription(monitoring.Monitoring.SubscriptionID request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::deleteSubscription); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteSubscription); } - public io.smallrye.mutiny.Uni setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::setKpiAlarm); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::setKpiAlarm); } - public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getAlarms); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getAlarms); } - public io.smallrye.mutiny.Uni getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getAlarmDescriptor); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getAlarmDescriptor); } - public io.smallrye.mutiny.Uni deleteAlarm(monitoring.Monitoring.AlarmID request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::deleteAlarm); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::deleteAlarm); } - public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::getInstantKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::getInstantKpi); } - public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::setKpiSubscription); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::setKpiSubscription); } - public io.smallrye.mutiny.Multi getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getAlarmResponseStream); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getAlarmResponseStream); } - public io.smallrye.mutiny.Multi getStreamKpi(monitoring.Monitoring.KpiId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToMany(request, delegateStub::getStreamKpi); + return io.quarkus.grpc.stubs.ClientCalls.oneToMany(request, delegateStub::getStreamKpi); } - } - public static abstract class MonitoringServiceImplBase implements io.grpc.BindableService { private String compression; + /** - * Set whether the server will try to use a compressed response. - * - * @param compression the compression, e.g {@code gzip} - */ + * Set whether the server will try to use a compressed response. + * + * @param compression the compression, e.g {@code gzip} + */ public MonitoringServiceImplBase withCompression(String compression) { - this.compression = compression; - return this; + this.compression = compression; + return this; } - - public io.smallrye.mutiny.Uni setKpi(monitoring.Monitoring.KpiDescriptor request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni deleteKpi(monitoring.Monitoring.KpiId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getKpiDescriptor(monitoring.Monitoring.KpiId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getKpiDescriptorList(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni includeKpi(monitoring.Monitoring.Kpi request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni monitorKpi(monitoring.Monitoring.MonitorKpiRequest request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni queryKpiData(monitoring.Monitoring.KpiQuery request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getSubsDescriptor(monitoring.Monitoring.SubscriptionID request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getSubscriptions(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni deleteSubscription(monitoring.Monitoring.SubscriptionID request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getAlarms(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getAlarmDescriptor(monitoring.Monitoring.AlarmID request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni deleteAlarm(monitoring.Monitoring.AlarmID request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni getInstantKpi(monitoring.Monitoring.KpiId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi setKpiSubscription(monitoring.Monitoring.SubsDescriptor request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Multi getStreamKpi(monitoring.Monitoring.KpiId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - monitoring.MonitoringServiceGrpc.getSetKpiMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.KpiDescriptor, - monitoring.Monitoring.KpiId>( - this, METHODID_SET_KPI, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getDeleteKpiMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.KpiId, - context.ContextOuterClass.Empty>( - this, METHODID_DELETE_KPI, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetKpiDescriptorMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.KpiId, - monitoring.Monitoring.KpiDescriptor>( - this, METHODID_GET_KPI_DESCRIPTOR, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetKpiDescriptorListMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - monitoring.Monitoring.KpiDescriptorList>( - this, METHODID_GET_KPI_DESCRIPTOR_LIST, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getIncludeKpiMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.Kpi, - context.ContextOuterClass.Empty>( - this, METHODID_INCLUDE_KPI, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getMonitorKpiMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.MonitorKpiRequest, - context.ContextOuterClass.Empty>( - this, METHODID_MONITOR_KPI, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getQueryKpiDataMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.KpiQuery, - monitoring.Monitoring.RawKpiTable>( - this, METHODID_QUERY_KPI_DATA, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getSetKpiSubscriptionMethod(), - asyncServerStreamingCall( - new MethodHandlers< - monitoring.Monitoring.SubsDescriptor, - monitoring.Monitoring.SubsResponse>( - this, METHODID_SET_KPI_SUBSCRIPTION, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetSubsDescriptorMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.SubscriptionID, - monitoring.Monitoring.SubsDescriptor>( - this, METHODID_GET_SUBS_DESCRIPTOR, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetSubscriptionsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - monitoring.Monitoring.SubsList>( - this, METHODID_GET_SUBSCRIPTIONS, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getDeleteSubscriptionMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.SubscriptionID, - context.ContextOuterClass.Empty>( - this, METHODID_DELETE_SUBSCRIPTION, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getSetKpiAlarmMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.AlarmDescriptor, - monitoring.Monitoring.AlarmID>( - this, METHODID_SET_KPI_ALARM, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetAlarmsMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - monitoring.Monitoring.AlarmList>( - this, METHODID_GET_ALARMS, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetAlarmDescriptorMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.AlarmID, - monitoring.Monitoring.AlarmDescriptor>( - this, METHODID_GET_ALARM_DESCRIPTOR, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetAlarmResponseStreamMethod(), - asyncServerStreamingCall( - new MethodHandlers< - monitoring.Monitoring.AlarmSubscription, - monitoring.Monitoring.AlarmResponse>( - this, METHODID_GET_ALARM_RESPONSE_STREAM, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getDeleteAlarmMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.AlarmID, - context.ContextOuterClass.Empty>( - this, METHODID_DELETE_ALARM, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetStreamKpiMethod(), - asyncServerStreamingCall( - new MethodHandlers< - monitoring.Monitoring.KpiId, - monitoring.Monitoring.Kpi>( - this, METHODID_GET_STREAM_KPI, compression))) - .addMethod( - monitoring.MonitoringServiceGrpc.getGetInstantKpiMethod(), - asyncUnaryCall( - new MethodHandlers< - monitoring.Monitoring.KpiId, - monitoring.Monitoring.Kpi>( - this, METHODID_GET_INSTANT_KPI, compression))) - .build(); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(monitoring.MonitoringServiceGrpc.getSetKpiMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_KPI, compression))).addMethod(monitoring.MonitoringServiceGrpc.getDeleteKpiMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_KPI, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetKpiDescriptorMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_KPI_DESCRIPTOR, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetKpiDescriptorListMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_KPI_DESCRIPTOR_LIST, compression))).addMethod(monitoring.MonitoringServiceGrpc.getIncludeKpiMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_INCLUDE_KPI, compression))).addMethod(monitoring.MonitoringServiceGrpc.getMonitorKpiMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_MONITOR_KPI, compression))).addMethod(monitoring.MonitoringServiceGrpc.getQueryKpiDataMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_QUERY_KPI_DATA, compression))).addMethod(monitoring.MonitoringServiceGrpc.getSetKpiSubscriptionMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_SET_KPI_SUBSCRIPTION, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetSubsDescriptorMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SUBS_DESCRIPTOR, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetSubscriptionsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_SUBSCRIPTIONS, compression))).addMethod(monitoring.MonitoringServiceGrpc.getDeleteSubscriptionMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_SUBSCRIPTION, compression))).addMethod(monitoring.MonitoringServiceGrpc.getSetKpiAlarmMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_SET_KPI_ALARM, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetAlarmsMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_ALARMS, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetAlarmDescriptorMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_ALARM_DESCRIPTOR, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetAlarmResponseStreamMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_ALARM_RESPONSE_STREAM, compression))).addMethod(monitoring.MonitoringServiceGrpc.getDeleteAlarmMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_DELETE_ALARM, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetStreamKpiMethod(), asyncServerStreamingCall(new MethodHandlers(this, METHODID_GET_STREAM_KPI, compression))).addMethod(monitoring.MonitoringServiceGrpc.getGetInstantKpiMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_GET_INSTANT_KPI, compression))).build(); } } private static final int METHODID_SET_KPI = 0; + private static final int METHODID_DELETE_KPI = 1; + private static final int METHODID_GET_KPI_DESCRIPTOR = 2; + private static final int METHODID_GET_KPI_DESCRIPTOR_LIST = 3; + private static final int METHODID_INCLUDE_KPI = 4; + private static final int METHODID_MONITOR_KPI = 5; + private static final int METHODID_QUERY_KPI_DATA = 6; + private static final int METHODID_SET_KPI_SUBSCRIPTION = 7; + private static final int METHODID_GET_SUBS_DESCRIPTOR = 8; + private static final int METHODID_GET_SUBSCRIPTIONS = 9; + private static final int METHODID_DELETE_SUBSCRIPTION = 10; + private static final int METHODID_SET_KPI_ALARM = 11; + private static final int METHODID_GET_ALARMS = 12; + private static final int METHODID_GET_ALARM_DESCRIPTOR = 13; + private static final int METHODID_GET_ALARM_RESPONSE_STREAM = 14; + private static final int METHODID_DELETE_ALARM = 15; + private static final int METHODID_GET_STREAM_KPI = 16; + private static final int METHODID_GET_INSTANT_KPI = 17; - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final MonitoringServiceImplBase serviceImpl; + private final int methodId; + private final String compression; MethodHandlers(MonitoringServiceImplBase serviceImpl, int methodId, String compression) { @@ -401,114 +253,60 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { case METHODID_SET_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.KpiDescriptor) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setKpi); break; case METHODID_DELETE_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::deleteKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteKpi); break; case METHODID_GET_KPI_DESCRIPTOR: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getKpiDescriptor); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getKpiDescriptor); break; case METHODID_GET_KPI_DESCRIPTOR_LIST: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getKpiDescriptorList); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getKpiDescriptorList); break; case METHODID_INCLUDE_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.Kpi) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::includeKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.Kpi) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::includeKpi); break; case METHODID_MONITOR_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.MonitorKpiRequest) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::monitorKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.MonitorKpiRequest) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::monitorKpi); break; case METHODID_QUERY_KPI_DATA: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiQuery) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::queryKpiData); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.KpiQuery) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::queryKpiData); break; case METHODID_SET_KPI_SUBSCRIPTION: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((monitoring.Monitoring.SubsDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setKpiSubscription); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((monitoring.Monitoring.SubsDescriptor) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setKpiSubscription); break; case METHODID_GET_SUBS_DESCRIPTOR: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.SubscriptionID) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getSubsDescriptor); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.SubscriptionID) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getSubsDescriptor); break; case METHODID_GET_SUBSCRIPTIONS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getSubscriptions); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getSubscriptions); break; case METHODID_DELETE_SUBSCRIPTION: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.SubscriptionID) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::deleteSubscription); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.SubscriptionID) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteSubscription); break; case METHODID_SET_KPI_ALARM: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.AlarmDescriptor) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::setKpiAlarm); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.AlarmDescriptor) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::setKpiAlarm); break; case METHODID_GET_ALARMS: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getAlarms); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getAlarms); break; case METHODID_GET_ALARM_DESCRIPTOR: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.AlarmID) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getAlarmDescriptor); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.AlarmID) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getAlarmDescriptor); break; case METHODID_GET_ALARM_RESPONSE_STREAM: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((monitoring.Monitoring.AlarmSubscription) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getAlarmResponseStream); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((monitoring.Monitoring.AlarmSubscription) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getAlarmResponseStream); break; case METHODID_DELETE_ALARM: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.AlarmID) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::deleteAlarm); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.AlarmID) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::deleteAlarm); break; case METHODID_GET_STREAM_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToMany((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getStreamKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToMany((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getStreamKpi); break; case METHODID_GET_INSTANT_KPI: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::getInstantKpi); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((monitoring.Monitoring.KpiId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::getInstantKpi); break; default: throw new java.lang.AssertionError(); @@ -518,11 +316,10 @@ public final class MutinyMonitoringServiceGrpc implements io.quarkus.grpc.runtim @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { default: throw new java.lang.AssertionError(); } } } - -} \ No newline at end of file +} diff --git a/src/ztp/target/generated-sources/grpc/ztp/MutinyZtpServiceGrpc.java b/src/ztp/target/generated-sources/grpc/ztp/MutinyZtpServiceGrpc.java index d46fdffb7b88f34ad648053139920d23dc2ab9d1..e048450a193d5275f81ce0c9f69e3289308fc42c 100644 --- a/src/ztp/target/generated-sources/grpc/ztp/MutinyZtpServiceGrpc.java +++ b/src/ztp/target/generated-sources/grpc/ztp/MutinyZtpServiceGrpc.java @@ -6,18 +6,18 @@ import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: ztp.proto") -public final class MutinyZtpServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc { - private MutinyZtpServiceGrpc() {} +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: ztp.proto") +public final class MutinyZtpServiceGrpc implements io.quarkus.grpc.MutinyGrpc { + + private MutinyZtpServiceGrpc() { + } public static MutinyZtpServiceStub newMutinyStub(io.grpc.Channel channel) { return new MutinyZtpServiceStub(channel); } - - public static final class MutinyZtpServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub { + public static class MutinyZtpServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.MutinyStub { + private ZtpServiceGrpc.ZtpServiceStub delegateStub; private MutinyZtpServiceStub(io.grpc.Channel channel) { @@ -35,145 +35,93 @@ public final class MutinyZtpServiceGrpc implements io.quarkus.grpc.runtime.Mutin return new MutinyZtpServiceStub(channel, callOptions); } - public io.smallrye.mutiny.Uni ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpGetDeviceRole); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::ztpGetDeviceRole); } - public io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpGetDeviceRolesByDeviceId); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::ztpGetDeviceRolesByDeviceId); } - public io.smallrye.mutiny.Uni ztpAdd(ztp.Ztp.DeviceRole request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpAdd); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::ztpAdd); } - public io.smallrye.mutiny.Uni ztpUpdate(ztp.Ztp.DeviceRoleConfig request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpUpdate); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::ztpUpdate); } - public io.smallrye.mutiny.Uni ztpDelete(ztp.Ztp.DeviceRole request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpDelete); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::ztpDelete); } - public io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request) { - return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpDeleteAll); + return io.quarkus.grpc.stubs.ClientCalls.oneToOne(request, delegateStub::ztpDeleteAll); } - } - public static abstract class ZtpServiceImplBase implements io.grpc.BindableService { private String compression; + /** - * Set whether the server will try to use a compressed response. - * - * @param compression the compression, e.g {@code gzip} - */ + * Set whether the server will try to use a compressed response. + * + * @param compression the compression, e.g {@code gzip} + */ public ZtpServiceImplBase withCompression(String compression) { - this.compression = compression; - return this; + this.compression = compression; + return this; } - - public io.smallrye.mutiny.Uni ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni ztpAdd(ztp.Ztp.DeviceRole request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni ztpUpdate(ztp.Ztp.DeviceRoleConfig request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni ztpDelete(ztp.Ztp.DeviceRole request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - ztp.ZtpServiceGrpc.getZtpGetDeviceRoleMethod(), - asyncUnaryCall( - new MethodHandlers< - ztp.Ztp.DeviceRoleId, - ztp.Ztp.DeviceRole>( - this, METHODID_ZTP_GET_DEVICE_ROLE, compression))) - .addMethod( - ztp.ZtpServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceId, - ztp.Ztp.DeviceRoleList>( - this, METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID, compression))) - .addMethod( - ztp.ZtpServiceGrpc.getZtpAddMethod(), - asyncUnaryCall( - new MethodHandlers< - ztp.Ztp.DeviceRole, - ztp.Ztp.DeviceRoleState>( - this, METHODID_ZTP_ADD, compression))) - .addMethod( - ztp.ZtpServiceGrpc.getZtpUpdateMethod(), - asyncUnaryCall( - new MethodHandlers< - ztp.Ztp.DeviceRoleConfig, - ztp.Ztp.DeviceRoleState>( - this, METHODID_ZTP_UPDATE, compression))) - .addMethod( - ztp.ZtpServiceGrpc.getZtpDeleteMethod(), - asyncUnaryCall( - new MethodHandlers< - ztp.Ztp.DeviceRole, - ztp.Ztp.DeviceRoleState>( - this, METHODID_ZTP_DELETE, compression))) - .addMethod( - ztp.ZtpServiceGrpc.getZtpDeleteAllMethod(), - asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - ztp.Ztp.DeviceDeletionResult>( - this, METHODID_ZTP_DELETE_ALL, compression))) - .build(); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(ztp.ZtpServiceGrpc.getZtpGetDeviceRoleMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_GET_DEVICE_ROLE, compression))).addMethod(ztp.ZtpServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID, compression))).addMethod(ztp.ZtpServiceGrpc.getZtpAddMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_ADD, compression))).addMethod(ztp.ZtpServiceGrpc.getZtpUpdateMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_UPDATE, compression))).addMethod(ztp.ZtpServiceGrpc.getZtpDeleteMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_DELETE, compression))).addMethod(ztp.ZtpServiceGrpc.getZtpDeleteAllMethod(), asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_DELETE_ALL, compression))).build(); } } private static final int METHODID_ZTP_GET_DEVICE_ROLE = 0; + private static final int METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID = 1; + private static final int METHODID_ZTP_ADD = 2; + private static final int METHODID_ZTP_UPDATE = 3; + private static final int METHODID_ZTP_DELETE = 4; + private static final int METHODID_ZTP_DELETE_ALL = 5; - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ZtpServiceImplBase serviceImpl; + private final int methodId; + private final String compression; MethodHandlers(ZtpServiceImplBase serviceImpl, int methodId, String compression) { @@ -185,42 +133,24 @@ public final class MutinyZtpServiceGrpc implements io.quarkus.grpc.runtime.Mutin @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { case METHODID_ZTP_GET_DEVICE_ROLE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((ztp.Ztp.DeviceRoleId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::ztpGetDeviceRole); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((ztp.Ztp.DeviceRoleId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::ztpGetDeviceRole); break; case METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::ztpGetDeviceRolesByDeviceId); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::ztpGetDeviceRolesByDeviceId); break; case METHODID_ZTP_ADD: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((ztp.Ztp.DeviceRole) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::ztpAdd); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((ztp.Ztp.DeviceRole) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::ztpAdd); break; case METHODID_ZTP_UPDATE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((ztp.Ztp.DeviceRoleConfig) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::ztpUpdate); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((ztp.Ztp.DeviceRoleConfig) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::ztpUpdate); break; case METHODID_ZTP_DELETE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((ztp.Ztp.DeviceRole) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::ztpDelete); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((ztp.Ztp.DeviceRole) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::ztpDelete); break; case METHODID_ZTP_DELETE_ALL: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, - compression, - serviceImpl::ztpDeleteAll); + io.quarkus.grpc.stubs.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::ztpDeleteAll); break; default: throw new java.lang.AssertionError(); @@ -230,11 +160,10 @@ public final class MutinyZtpServiceGrpc implements io.quarkus.grpc.runtime.Mutin @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { + switch(methodId) { default: throw new java.lang.AssertionError(); } } } - -} \ No newline at end of file +} diff --git a/src/ztp/target/generated-sources/grpc/ztp/Ztp.java b/src/ztp/target/generated-sources/grpc/ztp/Ztp.java index c9ff87a276b87ab9448b93a9f3c2e0bb8b1f2586..bef889c0db021ad9741d228548ffb434bdd75b9b 100644 --- a/src/ztp/target/generated-sources/grpc/ztp/Ztp.java +++ b/src/ztp/target/generated-sources/grpc/ztp/Ztp.java @@ -1,4916 +1,4633 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: ztp.proto - package ztp; public final class Ztp { - private Ztp() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * Protobuf enum {@code ztp.DeviceRoleType} - */ - public enum DeviceRoleType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * NONE = 0; - */ - NONE(0), - /** - * DEV_OPS = 1; - */ - DEV_OPS(1), - /** - * DEV_CONF = 2; - */ - DEV_CONF(2), - /** - * PIPELINE_CONF = 3; - */ - PIPELINE_CONF(3), - UNRECOGNIZED(-1), - ; - - /** - * NONE = 0; - */ - public static final int NONE_VALUE = 0; - /** - * DEV_OPS = 1; - */ - public static final int DEV_OPS_VALUE = 1; - /** - * DEV_CONF = 2; - */ - public static final int DEV_CONF_VALUE = 2; - /** - * PIPELINE_CONF = 3; - */ - public static final int PIPELINE_CONF_VALUE = 3; + private Ztp() { + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DeviceRoleType valueOf(int value) { - return forNumber(value); + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code ztp.DeviceRoleType} */ - public static DeviceRoleType forNumber(int value) { - switch (value) { - case 0: return NONE; - case 1: return DEV_OPS; - case 2: return DEV_CONF; - case 3: return PIPELINE_CONF; - default: return null; - } - } + public enum DeviceRoleType implements com.google.protobuf.ProtocolMessageEnum { + + /** + * NONE = 0; + */ + NONE(0), + /** + * DEV_OPS = 1; + */ + DEV_OPS(1), + /** + * DEV_CONF = 2; + */ + DEV_CONF(2), + /** + * PIPELINE_CONF = 3; + */ + PIPELINE_CONF(3), + UNRECOGNIZED(-1); + + /** + * NONE = 0; + */ + public static final int NONE_VALUE = 0; + + /** + * DEV_OPS = 1; + */ + public static final int DEV_OPS_VALUE = 1; + + /** + * DEV_CONF = 2; + */ + public static final int DEV_CONF_VALUE = 2; + + /** + * PIPELINE_CONF = 3; + */ + public static final int PIPELINE_CONF_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DeviceRoleType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DeviceRoleType findValueByNumber(int number) { - return DeviceRoleType.forNumber(number); + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DeviceRoleType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DeviceRoleType forNumber(int value) { + switch(value) { + case 0: + return NONE; + case 1: + return DEV_OPS; + case 2: + return DEV_CONF; + case 3: + return PIPELINE_CONF; + default: + return null; } - }; + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return ztp.Ztp.getDescriptor().getEnumTypes().get(0); - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - private static final DeviceRoleType[] VALUES = values(); - - public static DeviceRoleType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - private final int value; + public DeviceRoleType findValueByNumber(int number) { + return DeviceRoleType.forNumber(number); + } + }; - private DeviceRoleType(int value) { - this.value = value; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - // @@protoc_insertion_point(enum_scope:ztp.DeviceRoleType) - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * Protobuf enum {@code ztp.ZtpDeviceState} - */ - public enum ZtpDeviceState - implements com.google.protobuf.ProtocolMessageEnum { - /** - * ZTP_DEV_STATE_UNDEFINED = 0; - */ - ZTP_DEV_STATE_UNDEFINED(0), - /** - * ZTP_DEV_STATE_CREATED = 1; - */ - ZTP_DEV_STATE_CREATED(1), - /** - * ZTP_DEV_STATE_UPDATED = 2; - */ - ZTP_DEV_STATE_UPDATED(2), - /** - * ZTP_DEV_STATE_DELETED = 3; - */ - ZTP_DEV_STATE_DELETED(3), - UNRECOGNIZED(-1), - ; + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return ztp.Ztp.getDescriptor().getEnumTypes().get(0); + } - /** - * ZTP_DEV_STATE_UNDEFINED = 0; - */ - public static final int ZTP_DEV_STATE_UNDEFINED_VALUE = 0; - /** - * ZTP_DEV_STATE_CREATED = 1; - */ - public static final int ZTP_DEV_STATE_CREATED_VALUE = 1; - /** - * ZTP_DEV_STATE_UPDATED = 2; - */ - public static final int ZTP_DEV_STATE_UPDATED_VALUE = 2; - /** - * ZTP_DEV_STATE_DELETED = 3; - */ - public static final int ZTP_DEV_STATE_DELETED_VALUE = 3; + private static final DeviceRoleType[] VALUES = values(); + public static DeviceRoleType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + private final int value; - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ZtpDeviceState valueOf(int value) { - return forNumber(value); + private DeviceRoleType(int value) { + this.value = value; + } } /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. + * Protobuf enum {@code ztp.ZtpDeviceState} */ - public static ZtpDeviceState forNumber(int value) { - switch (value) { - case 0: return ZTP_DEV_STATE_UNDEFINED; - case 1: return ZTP_DEV_STATE_CREATED; - case 2: return ZTP_DEV_STATE_UPDATED; - case 3: return ZTP_DEV_STATE_DELETED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ZtpDeviceState> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ZtpDeviceState findValueByNumber(int number) { - return ZtpDeviceState.forNumber(number); + public enum ZtpDeviceState implements com.google.protobuf.ProtocolMessageEnum { + + /** + * ZTP_DEV_STATE_UNDEFINED = 0; + */ + ZTP_DEV_STATE_UNDEFINED(0), + /** + * ZTP_DEV_STATE_CREATED = 1; + */ + ZTP_DEV_STATE_CREATED(1), + /** + * ZTP_DEV_STATE_UPDATED = 2; + */ + ZTP_DEV_STATE_UPDATED(2), + /** + * ZTP_DEV_STATE_DELETED = 3; + */ + ZTP_DEV_STATE_DELETED(3), + UNRECOGNIZED(-1); + + /** + * ZTP_DEV_STATE_UNDEFINED = 0; + */ + public static final int ZTP_DEV_STATE_UNDEFINED_VALUE = 0; + + /** + * ZTP_DEV_STATE_CREATED = 1; + */ + public static final int ZTP_DEV_STATE_CREATED_VALUE = 1; + + /** + * ZTP_DEV_STATE_UPDATED = 2; + */ + public static final int ZTP_DEV_STATE_UPDATED_VALUE = 2; + + /** + * ZTP_DEV_STATE_DELETED = 3; + */ + public static final int ZTP_DEV_STATE_DELETED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return ztp.Ztp.getDescriptor().getEnumTypes().get(1); - } + return value; + } - private static final ZtpDeviceState[] VALUES = values(); - - public static ZtpDeviceState valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ZtpDeviceState valueOf(int value) { + return forNumber(value); + } - private final int value; + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ZtpDeviceState forNumber(int value) { + switch(value) { + case 0: + return ZTP_DEV_STATE_UNDEFINED; + case 1: + return ZTP_DEV_STATE_CREATED; + case 2: + return ZTP_DEV_STATE_UPDATED; + case 3: + return ZTP_DEV_STATE_DELETED; + default: + return null; + } + } - private ZtpDeviceState(int value) { - this.value = value; - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - // @@protoc_insertion_point(enum_scope:ztp.ZtpDeviceState) - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - public interface DeviceRoleIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:ztp.DeviceRoleId) - com.google.protobuf.MessageOrBuilder { + public ZtpDeviceState findValueByNumber(int number) { + return ZtpDeviceState.forNumber(number); + } + }; - /** - * .context.Uuid devRoleId = 1; - * @return Whether the devRoleId field is set. - */ - boolean hasDevRoleId(); - /** - * .context.Uuid devRoleId = 1; - * @return The devRoleId. - */ - context.ContextOuterClass.Uuid getDevRoleId(); - /** - * .context.Uuid devRoleId = 1; - */ - context.ContextOuterClass.UuidOrBuilder getDevRoleIdOrBuilder(); + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - /** - * .context.DeviceId devId = 2; - * @return Whether the devId field is set. - */ - boolean hasDevId(); - /** - * .context.DeviceId devId = 2; - * @return The devId. - */ - context.ContextOuterClass.DeviceId getDevId(); - /** - * .context.DeviceId devId = 2; - */ - context.ContextOuterClass.DeviceIdOrBuilder getDevIdOrBuilder(); - } - /** - * Protobuf type {@code ztp.DeviceRoleId} - */ - public static final class DeviceRoleId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:ztp.DeviceRoleId) - DeviceRoleIdOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceRoleId.newBuilder() to construct. - private DeviceRoleId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceRoleId() { - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceRoleId(); - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return ztp.Ztp.getDescriptor().getEnumTypes().get(1); + } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeviceRoleId( - 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 (devRoleId_ != null) { - subBuilder = devRoleId_.toBuilder(); - } - devRoleId_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(devRoleId_); - devRoleId_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - context.ContextOuterClass.DeviceId.Builder subBuilder = null; - if (devId_ != null) { - subBuilder = devId_.toBuilder(); - } - devId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(devId_); - devId_ = 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 ztp.Ztp.internal_static_ztp_DeviceRoleId_descriptor; - } + private static final ZtpDeviceState[] VALUES = values(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return ztp.Ztp.internal_static_ztp_DeviceRoleId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ztp.Ztp.DeviceRoleId.class, ztp.Ztp.DeviceRoleId.Builder.class); - } + public static ZtpDeviceState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public static final int DEVROLEID_FIELD_NUMBER = 1; - private context.ContextOuterClass.Uuid devRoleId_; - /** - * .context.Uuid devRoleId = 1; - * @return Whether the devRoleId field is set. - */ - @java.lang.Override - public boolean hasDevRoleId() { - return devRoleId_ != null; - } - /** - * .context.Uuid devRoleId = 1; - * @return The devRoleId. - */ - @java.lang.Override - public context.ContextOuterClass.Uuid getDevRoleId() { - return devRoleId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : devRoleId_; - } - /** - * .context.Uuid devRoleId = 1; - */ - @java.lang.Override - public context.ContextOuterClass.UuidOrBuilder getDevRoleIdOrBuilder() { - return getDevRoleId(); - } + private final int value; - public static final int DEVID_FIELD_NUMBER = 2; - private context.ContextOuterClass.DeviceId devId_; - /** - * .context.DeviceId devId = 2; - * @return Whether the devId field is set. - */ - @java.lang.Override - public boolean hasDevId() { - return devId_ != null; - } - /** - * .context.DeviceId devId = 2; - * @return The devId. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceId getDevId() { - return devId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : devId_; - } - /** - * .context.DeviceId devId = 2; - */ - @java.lang.Override - public context.ContextOuterClass.DeviceIdOrBuilder getDevIdOrBuilder() { - return getDevId(); + private ZtpDeviceState(int value) { + this.value = value; + } } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } + public interface DeviceRoleIdOrBuilder extends // @@protoc_insertion_point(interface_extends:ztp.DeviceRoleId) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (devRoleId_ != null) { - output.writeMessage(1, getDevRoleId()); - } - if (devId_ != null) { - output.writeMessage(2, getDevId()); - } - unknownFields.writeTo(output); - } + /** + * .context.Uuid devRoleId = 1; + * @return Whether the devRoleId field is set. + */ + boolean hasDevRoleId(); - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (devRoleId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDevRoleId()); - } - if (devId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDevId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.Uuid devRoleId = 1; + * @return The devRoleId. + */ + context.ContextOuterClass.Uuid getDevRoleId(); - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof ztp.Ztp.DeviceRoleId)) { - return super.equals(obj); - } - ztp.Ztp.DeviceRoleId other = (ztp.Ztp.DeviceRoleId) obj; - - if (hasDevRoleId() != other.hasDevRoleId()) return false; - if (hasDevRoleId()) { - if (!getDevRoleId() - .equals(other.getDevRoleId())) return false; - } - if (hasDevId() != other.hasDevId()) return false; - if (hasDevId()) { - if (!getDevId() - .equals(other.getDevId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * .context.Uuid devRoleId = 1; + */ + context.ContextOuterClass.UuidOrBuilder getDevRoleIdOrBuilder(); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDevRoleId()) { - hash = (37 * hash) + DEVROLEID_FIELD_NUMBER; - hash = (53 * hash) + getDevRoleId().hashCode(); - } - if (hasDevId()) { - hash = (37 * hash) + DEVID_FIELD_NUMBER; - hash = (53 * hash) + getDevId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * .context.DeviceId devId = 2; + * @return Whether the devId field is set. + */ + boolean hasDevId(); - public static ztp.Ztp.DeviceRoleId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRoleId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRoleId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRoleId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRoleId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRoleId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRoleId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * .context.DeviceId devId = 2; + * @return The devId. + */ + context.ContextOuterClass.DeviceId getDevId(); - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(ztp.Ztp.DeviceRoleId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + /** + * .context.DeviceId devId = 2; + */ + context.ContextOuterClass.DeviceIdOrBuilder getDevIdOrBuilder(); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * Protobuf type {@code ztp.DeviceRoleId} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:ztp.DeviceRoleId) - ztp.Ztp.DeviceRoleIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return ztp.Ztp.internal_static_ztp_DeviceRoleId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return ztp.Ztp.internal_static_ztp_DeviceRoleId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ztp.Ztp.DeviceRoleId.class, ztp.Ztp.DeviceRoleId.Builder.class); - } - - // Construct using ztp.Ztp.DeviceRoleId.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 (devRoleIdBuilder_ == null) { - devRoleId_ = null; - } else { - devRoleId_ = null; - devRoleIdBuilder_ = null; - } - if (devIdBuilder_ == null) { - devId_ = null; - } else { - devId_ = null; - devIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return ztp.Ztp.internal_static_ztp_DeviceRoleId_descriptor; - } - - @java.lang.Override - public ztp.Ztp.DeviceRoleId getDefaultInstanceForType() { - return ztp.Ztp.DeviceRoleId.getDefaultInstance(); - } - - @java.lang.Override - public ztp.Ztp.DeviceRoleId build() { - ztp.Ztp.DeviceRoleId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public ztp.Ztp.DeviceRoleId buildPartial() { - ztp.Ztp.DeviceRoleId result = new ztp.Ztp.DeviceRoleId(this); - if (devRoleIdBuilder_ == null) { - result.devRoleId_ = devRoleId_; - } else { - result.devRoleId_ = devRoleIdBuilder_.build(); - } - if (devIdBuilder_ == null) { - result.devId_ = devId_; - } else { - result.devId_ = devIdBuilder_.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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ztp.Ztp.DeviceRoleId) { - return mergeFrom((ztp.Ztp.DeviceRoleId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(ztp.Ztp.DeviceRoleId other) { - if (other == ztp.Ztp.DeviceRoleId.getDefaultInstance()) return this; - if (other.hasDevRoleId()) { - mergeDevRoleId(other.getDevRoleId()); - } - if (other.hasDevId()) { - mergeDevId(other.getDevId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - ztp.Ztp.DeviceRoleId parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ztp.Ztp.DeviceRoleId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private context.ContextOuterClass.Uuid devRoleId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> devRoleIdBuilder_; - /** - * .context.Uuid devRoleId = 1; - * @return Whether the devRoleId field is set. - */ - public boolean hasDevRoleId() { - return devRoleIdBuilder_ != null || devRoleId_ != null; - } - /** - * .context.Uuid devRoleId = 1; - * @return The devRoleId. - */ - public context.ContextOuterClass.Uuid getDevRoleId() { - if (devRoleIdBuilder_ == null) { - return devRoleId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : devRoleId_; - } else { - return devRoleIdBuilder_.getMessage(); - } - } - /** - * .context.Uuid devRoleId = 1; - */ - public Builder setDevRoleId(context.ContextOuterClass.Uuid value) { - if (devRoleIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - devRoleId_ = value; - onChanged(); - } else { - devRoleIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.Uuid devRoleId = 1; - */ - public Builder setDevRoleId( - context.ContextOuterClass.Uuid.Builder builderForValue) { - if (devRoleIdBuilder_ == null) { - devRoleId_ = builderForValue.build(); - onChanged(); - } else { - devRoleIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.Uuid devRoleId = 1; - */ - public Builder mergeDevRoleId(context.ContextOuterClass.Uuid value) { - if (devRoleIdBuilder_ == null) { - if (devRoleId_ != null) { - devRoleId_ = - context.ContextOuterClass.Uuid.newBuilder(devRoleId_).mergeFrom(value).buildPartial(); - } else { - devRoleId_ = value; - } - onChanged(); - } else { - devRoleIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.Uuid devRoleId = 1; - */ - public Builder clearDevRoleId() { - if (devRoleIdBuilder_ == null) { - devRoleId_ = null; - onChanged(); - } else { - devRoleId_ = null; - devRoleIdBuilder_ = null; - } - - return this; - } - /** - * .context.Uuid devRoleId = 1; - */ - public context.ContextOuterClass.Uuid.Builder getDevRoleIdBuilder() { - - onChanged(); - return getDevRoleIdFieldBuilder().getBuilder(); - } - /** - * .context.Uuid devRoleId = 1; - */ - public context.ContextOuterClass.UuidOrBuilder getDevRoleIdOrBuilder() { - if (devRoleIdBuilder_ != null) { - return devRoleIdBuilder_.getMessageOrBuilder(); - } else { - return devRoleId_ == null ? - context.ContextOuterClass.Uuid.getDefaultInstance() : devRoleId_; - } - } - /** - * .context.Uuid devRoleId = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> - getDevRoleIdFieldBuilder() { - if (devRoleIdBuilder_ == null) { - devRoleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( - getDevRoleId(), - getParentForChildren(), - isClean()); - devRoleId_ = null; - } - return devRoleIdBuilder_; - } - - private context.ContextOuterClass.DeviceId devId_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> devIdBuilder_; - /** - * .context.DeviceId devId = 2; - * @return Whether the devId field is set. - */ - public boolean hasDevId() { - return devIdBuilder_ != null || devId_ != null; - } - /** - * .context.DeviceId devId = 2; - * @return The devId. - */ - public context.ContextOuterClass.DeviceId getDevId() { - if (devIdBuilder_ == null) { - return devId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : devId_; - } else { - return devIdBuilder_.getMessage(); - } - } - /** - * .context.DeviceId devId = 2; - */ - public Builder setDevId(context.ContextOuterClass.DeviceId value) { - if (devIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - devId_ = value; - onChanged(); - } else { - devIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceId devId = 2; - */ - public Builder setDevId( - context.ContextOuterClass.DeviceId.Builder builderForValue) { - if (devIdBuilder_ == null) { - devId_ = builderForValue.build(); - onChanged(); - } else { - devIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceId devId = 2; - */ - public Builder mergeDevId(context.ContextOuterClass.DeviceId value) { - if (devIdBuilder_ == null) { - if (devId_ != null) { - devId_ = - context.ContextOuterClass.DeviceId.newBuilder(devId_).mergeFrom(value).buildPartial(); - } else { - devId_ = value; - } - onChanged(); - } else { - devIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceId devId = 2; - */ - public Builder clearDevId() { - if (devIdBuilder_ == null) { - devId_ = null; - onChanged(); - } else { - devId_ = null; - devIdBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceId devId = 2; - */ - public context.ContextOuterClass.DeviceId.Builder getDevIdBuilder() { - - onChanged(); - return getDevIdFieldBuilder().getBuilder(); - } - /** - * .context.DeviceId devId = 2; - */ - public context.ContextOuterClass.DeviceIdOrBuilder getDevIdOrBuilder() { - if (devIdBuilder_ != null) { - return devIdBuilder_.getMessageOrBuilder(); - } else { - return devId_ == null ? - context.ContextOuterClass.DeviceId.getDefaultInstance() : devId_; - } - } - /** - * .context.DeviceId devId = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> - getDevIdFieldBuilder() { - if (devIdBuilder_ == null) { - devIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>( - getDevId(), - getParentForChildren(), - isClean()); - devId_ = null; - } - return devIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:ztp.DeviceRoleId) - } + public static final class DeviceRoleId extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ztp.DeviceRoleId) + DeviceRoleIdOrBuilder { - // @@protoc_insertion_point(class_scope:ztp.DeviceRoleId) - private static final ztp.Ztp.DeviceRoleId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new ztp.Ztp.DeviceRoleId(); - } + private static final long serialVersionUID = 0L; - public static ztp.Ztp.DeviceRoleId getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Use DeviceRoleId.newBuilder() to construct. + private DeviceRoleId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeviceRoleId parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceRoleId(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private DeviceRoleId() { + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeviceRoleId(); + } - @java.lang.Override - public ztp.Ztp.DeviceRoleId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - } + private DeviceRoleId(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 (devRoleId_ != null) { + subBuilder = devRoleId_.toBuilder(); + } + devRoleId_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(devRoleId_); + devRoleId_ = subBuilder.buildPartial(); + } + break; + } + case 18: + { + context.ContextOuterClass.DeviceId.Builder subBuilder = null; + if (devId_ != null) { + subBuilder = devId_.toBuilder(); + } + devId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(devId_); + devId_ = 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 interface DeviceRoleOrBuilder extends - // @@protoc_insertion_point(interface_extends:ztp.DeviceRole) - com.google.protobuf.MessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return ztp.Ztp.internal_static_ztp_DeviceRoleId_descriptor; + } - /** - * .ztp.DeviceRoleId devRoleId = 1; - * @return Whether the devRoleId field is set. - */ - boolean hasDevRoleId(); - /** - * .ztp.DeviceRoleId devRoleId = 1; - * @return The devRoleId. - */ - ztp.Ztp.DeviceRoleId getDevRoleId(); - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return ztp.Ztp.internal_static_ztp_DeviceRoleId_fieldAccessorTable.ensureFieldAccessorsInitialized(ztp.Ztp.DeviceRoleId.class, ztp.Ztp.DeviceRoleId.Builder.class); + } - /** - * .ztp.DeviceRoleType devRoleType = 2; - * @return The enum numeric value on the wire for devRoleType. - */ - int getDevRoleTypeValue(); - /** - * .ztp.DeviceRoleType devRoleType = 2; - * @return The devRoleType. - */ - ztp.Ztp.DeviceRoleType getDevRoleType(); - } - /** - * Protobuf type {@code ztp.DeviceRole} - */ - public static final class DeviceRole extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:ztp.DeviceRole) - DeviceRoleOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceRole.newBuilder() to construct. - private DeviceRole(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceRole() { - devRoleType_ = 0; - } + public static final int DEVROLEID_FIELD_NUMBER = 1; - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceRole(); - } + private context.ContextOuterClass.Uuid devRoleId_; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeviceRole( - 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: { - ztp.Ztp.DeviceRoleId.Builder subBuilder = null; - if (devRoleId_ != null) { - subBuilder = devRoleId_.toBuilder(); - } - devRoleId_ = input.readMessage(ztp.Ztp.DeviceRoleId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(devRoleId_); - devRoleId_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - int rawValue = input.readEnum(); - - devRoleType_ = 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 ztp.Ztp.internal_static_ztp_DeviceRole_descriptor; - } + /** + * .context.Uuid devRoleId = 1; + * @return Whether the devRoleId field is set. + */ + @java.lang.Override + public boolean hasDevRoleId() { + return devRoleId_ != null; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return ztp.Ztp.internal_static_ztp_DeviceRole_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ztp.Ztp.DeviceRole.class, ztp.Ztp.DeviceRole.Builder.class); - } + /** + * .context.Uuid devRoleId = 1; + * @return The devRoleId. + */ + @java.lang.Override + public context.ContextOuterClass.Uuid getDevRoleId() { + return devRoleId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : devRoleId_; + } - public static final int DEVROLEID_FIELD_NUMBER = 1; - private ztp.Ztp.DeviceRoleId devRoleId_; - /** - * .ztp.DeviceRoleId devRoleId = 1; - * @return Whether the devRoleId field is set. - */ - @java.lang.Override - public boolean hasDevRoleId() { - return devRoleId_ != null; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - * @return The devRoleId. - */ - @java.lang.Override - public ztp.Ztp.DeviceRoleId getDevRoleId() { - return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - @java.lang.Override - public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { - return getDevRoleId(); - } + /** + * .context.Uuid devRoleId = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getDevRoleIdOrBuilder() { + return getDevRoleId(); + } - public static final int DEVROLETYPE_FIELD_NUMBER = 2; - private int devRoleType_; - /** - * .ztp.DeviceRoleType devRoleType = 2; - * @return The enum numeric value on the wire for devRoleType. - */ - @java.lang.Override public int getDevRoleTypeValue() { - return devRoleType_; - } - /** - * .ztp.DeviceRoleType devRoleType = 2; - * @return The devRoleType. - */ - @java.lang.Override public ztp.Ztp.DeviceRoleType getDevRoleType() { - @SuppressWarnings("deprecation") - ztp.Ztp.DeviceRoleType result = ztp.Ztp.DeviceRoleType.valueOf(devRoleType_); - return result == null ? ztp.Ztp.DeviceRoleType.UNRECOGNIZED : result; - } + public static final int DEVID_FIELD_NUMBER = 2; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private context.ContextOuterClass.DeviceId devId_; - memoizedIsInitialized = 1; - return true; - } + /** + * .context.DeviceId devId = 2; + * @return Whether the devId field is set. + */ + @java.lang.Override + public boolean hasDevId() { + return devId_ != null; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (devRoleId_ != null) { - output.writeMessage(1, getDevRoleId()); - } - if (devRoleType_ != ztp.Ztp.DeviceRoleType.NONE.getNumber()) { - output.writeEnum(2, devRoleType_); - } - unknownFields.writeTo(output); - } + /** + * .context.DeviceId devId = 2; + * @return The devId. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceId getDevId() { + return devId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : devId_; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (devRoleId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDevRoleId()); - } - if (devRoleType_ != ztp.Ztp.DeviceRoleType.NONE.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, devRoleType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * .context.DeviceId devId = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceIdOrBuilder getDevIdOrBuilder() { + return getDevId(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof ztp.Ztp.DeviceRole)) { - return super.equals(obj); - } - ztp.Ztp.DeviceRole other = (ztp.Ztp.DeviceRole) obj; - - if (hasDevRoleId() != other.hasDevRoleId()) return false; - if (hasDevRoleId()) { - if (!getDevRoleId() - .equals(other.getDevRoleId())) return false; - } - if (devRoleType_ != other.devRoleType_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDevRoleId()) { - hash = (37 * hash) + DEVROLEID_FIELD_NUMBER; - hash = (53 * hash) + getDevRoleId().hashCode(); - } - hash = (37 * hash) + DEVROLETYPE_FIELD_NUMBER; - hash = (53 * hash) + devRoleType_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (devRoleId_ != null) { + output.writeMessage(1, getDevRoleId()); + } + if (devId_ != null) { + output.writeMessage(2, getDevId()); + } + unknownFields.writeTo(output); + } - public static ztp.Ztp.DeviceRole parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRole parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRole parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRole parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRole parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRole parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRole parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRole parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static ztp.Ztp.DeviceRole parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRole parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static ztp.Ztp.DeviceRole parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRole parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (devRoleId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDevRoleId()); + } + if (devId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDevId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(ztp.Ztp.DeviceRole prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof ztp.Ztp.DeviceRoleId)) { + return super.equals(obj); + } + ztp.Ztp.DeviceRoleId other = (ztp.Ztp.DeviceRoleId) obj; + if (hasDevRoleId() != other.hasDevRoleId()) + return false; + if (hasDevRoleId()) { + if (!getDevRoleId().equals(other.getDevRoleId())) + return false; + } + if (hasDevId() != other.hasDevId()) + return false; + if (hasDevId()) { + if (!getDevId().equals(other.getDevId())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code ztp.DeviceRole} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:ztp.DeviceRole) - ztp.Ztp.DeviceRoleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return ztp.Ztp.internal_static_ztp_DeviceRole_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return ztp.Ztp.internal_static_ztp_DeviceRole_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ztp.Ztp.DeviceRole.class, ztp.Ztp.DeviceRole.Builder.class); - } - - // Construct using ztp.Ztp.DeviceRole.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 (devRoleIdBuilder_ == null) { - devRoleId_ = null; - } else { - devRoleId_ = null; - devRoleIdBuilder_ = null; - } - devRoleType_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return ztp.Ztp.internal_static_ztp_DeviceRole_descriptor; - } - - @java.lang.Override - public ztp.Ztp.DeviceRole getDefaultInstanceForType() { - return ztp.Ztp.DeviceRole.getDefaultInstance(); - } - - @java.lang.Override - public ztp.Ztp.DeviceRole build() { - ztp.Ztp.DeviceRole result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public ztp.Ztp.DeviceRole buildPartial() { - ztp.Ztp.DeviceRole result = new ztp.Ztp.DeviceRole(this); - if (devRoleIdBuilder_ == null) { - result.devRoleId_ = devRoleId_; - } else { - result.devRoleId_ = devRoleIdBuilder_.build(); - } - result.devRoleType_ = devRoleType_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ztp.Ztp.DeviceRole) { - return mergeFrom((ztp.Ztp.DeviceRole)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(ztp.Ztp.DeviceRole other) { - if (other == ztp.Ztp.DeviceRole.getDefaultInstance()) return this; - if (other.hasDevRoleId()) { - mergeDevRoleId(other.getDevRoleId()); - } - if (other.devRoleType_ != 0) { - setDevRoleTypeValue(other.getDevRoleTypeValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - ztp.Ztp.DeviceRole parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ztp.Ztp.DeviceRole) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private ztp.Ztp.DeviceRoleId devRoleId_; - private com.google.protobuf.SingleFieldBuilderV3< - ztp.Ztp.DeviceRoleId, ztp.Ztp.DeviceRoleId.Builder, ztp.Ztp.DeviceRoleIdOrBuilder> devRoleIdBuilder_; - /** - * .ztp.DeviceRoleId devRoleId = 1; - * @return Whether the devRoleId field is set. - */ - public boolean hasDevRoleId() { - return devRoleIdBuilder_ != null || devRoleId_ != null; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - * @return The devRoleId. - */ - public ztp.Ztp.DeviceRoleId getDevRoleId() { - if (devRoleIdBuilder_ == null) { - return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; - } else { - return devRoleIdBuilder_.getMessage(); - } - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - public Builder setDevRoleId(ztp.Ztp.DeviceRoleId value) { - if (devRoleIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - devRoleId_ = value; - onChanged(); - } else { - devRoleIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - public Builder setDevRoleId( - ztp.Ztp.DeviceRoleId.Builder builderForValue) { - if (devRoleIdBuilder_ == null) { - devRoleId_ = builderForValue.build(); - onChanged(); - } else { - devRoleIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - public Builder mergeDevRoleId(ztp.Ztp.DeviceRoleId value) { - if (devRoleIdBuilder_ == null) { - if (devRoleId_ != null) { - devRoleId_ = - ztp.Ztp.DeviceRoleId.newBuilder(devRoleId_).mergeFrom(value).buildPartial(); - } else { - devRoleId_ = value; - } - onChanged(); - } else { - devRoleIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - public Builder clearDevRoleId() { - if (devRoleIdBuilder_ == null) { - devRoleId_ = null; - onChanged(); - } else { - devRoleId_ = null; - devRoleIdBuilder_ = null; - } - - return this; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - public ztp.Ztp.DeviceRoleId.Builder getDevRoleIdBuilder() { - - onChanged(); - return getDevRoleIdFieldBuilder().getBuilder(); - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { - if (devRoleIdBuilder_ != null) { - return devRoleIdBuilder_.getMessageOrBuilder(); - } else { - return devRoleId_ == null ? - ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; - } - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - ztp.Ztp.DeviceRoleId, ztp.Ztp.DeviceRoleId.Builder, ztp.Ztp.DeviceRoleIdOrBuilder> - getDevRoleIdFieldBuilder() { - if (devRoleIdBuilder_ == null) { - devRoleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - ztp.Ztp.DeviceRoleId, ztp.Ztp.DeviceRoleId.Builder, ztp.Ztp.DeviceRoleIdOrBuilder>( - getDevRoleId(), - getParentForChildren(), - isClean()); - devRoleId_ = null; - } - return devRoleIdBuilder_; - } - - private int devRoleType_ = 0; - /** - * .ztp.DeviceRoleType devRoleType = 2; - * @return The enum numeric value on the wire for devRoleType. - */ - @java.lang.Override public int getDevRoleTypeValue() { - return devRoleType_; - } - /** - * .ztp.DeviceRoleType devRoleType = 2; - * @param value The enum numeric value on the wire for devRoleType to set. - * @return This builder for chaining. - */ - public Builder setDevRoleTypeValue(int value) { - - devRoleType_ = value; - onChanged(); - return this; - } - /** - * .ztp.DeviceRoleType devRoleType = 2; - * @return The devRoleType. - */ - @java.lang.Override - public ztp.Ztp.DeviceRoleType getDevRoleType() { - @SuppressWarnings("deprecation") - ztp.Ztp.DeviceRoleType result = ztp.Ztp.DeviceRoleType.valueOf(devRoleType_); - return result == null ? ztp.Ztp.DeviceRoleType.UNRECOGNIZED : result; - } - /** - * .ztp.DeviceRoleType devRoleType = 2; - * @param value The devRoleType to set. - * @return This builder for chaining. - */ - public Builder setDevRoleType(ztp.Ztp.DeviceRoleType value) { - if (value == null) { - throw new NullPointerException(); - } - - devRoleType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .ztp.DeviceRoleType devRoleType = 2; - * @return This builder for chaining. - */ - public Builder clearDevRoleType() { - - devRoleType_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:ztp.DeviceRole) - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDevRoleId()) { + hash = (37 * hash) + DEVROLEID_FIELD_NUMBER; + hash = (53 * hash) + getDevRoleId().hashCode(); + } + if (hasDevId()) { + hash = (37 * hash) + DEVID_FIELD_NUMBER; + hash = (53 * hash) + getDevId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } - // @@protoc_insertion_point(class_scope:ztp.DeviceRole) - private static final ztp.Ztp.DeviceRole DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new ztp.Ztp.DeviceRole(); - } + public static ztp.Ztp.DeviceRoleId parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static ztp.Ztp.DeviceRole getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static ztp.Ztp.DeviceRoleId parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeviceRole parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceRole(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static ztp.Ztp.DeviceRoleId parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static ztp.Ztp.DeviceRoleId parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public ztp.Ztp.DeviceRole getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static ztp.Ztp.DeviceRoleId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - } + public static ztp.Ztp.DeviceRoleId parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public interface DeviceRoleConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:ztp.DeviceRoleConfig) - com.google.protobuf.MessageOrBuilder { + public static ztp.Ztp.DeviceRoleId parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRoleId parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRoleId parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleId parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRoleId parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ztp.Ztp.DeviceRoleId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code ztp.DeviceRoleId} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:ztp.DeviceRoleId) + ztp.Ztp.DeviceRoleIdOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return ztp.Ztp.internal_static_ztp_DeviceRoleId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return ztp.Ztp.internal_static_ztp_DeviceRoleId_fieldAccessorTable.ensureFieldAccessorsInitialized(ztp.Ztp.DeviceRoleId.class, ztp.Ztp.DeviceRoleId.Builder.class); + } + + // Construct using ztp.Ztp.DeviceRoleId.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 (devRoleIdBuilder_ == null) { + devRoleId_ = null; + } else { + devRoleId_ = null; + devRoleIdBuilder_ = null; + } + if (devIdBuilder_ == null) { + devId_ = null; + } else { + devId_ = null; + devIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return ztp.Ztp.internal_static_ztp_DeviceRoleId_descriptor; + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleId getDefaultInstanceForType() { + return ztp.Ztp.DeviceRoleId.getDefaultInstance(); + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleId build() { + ztp.Ztp.DeviceRoleId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleId buildPartial() { + ztp.Ztp.DeviceRoleId result = new ztp.Ztp.DeviceRoleId(this); + if (devRoleIdBuilder_ == null) { + result.devRoleId_ = devRoleId_; + } else { + result.devRoleId_ = devRoleIdBuilder_.build(); + } + if (devIdBuilder_ == null) { + result.devId_ = devId_; + } else { + result.devId_ = devIdBuilder_.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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ztp.Ztp.DeviceRoleId) { + return mergeFrom((ztp.Ztp.DeviceRoleId) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ztp.Ztp.DeviceRoleId other) { + if (other == ztp.Ztp.DeviceRoleId.getDefaultInstance()) + return this; + if (other.hasDevRoleId()) { + mergeDevRoleId(other.getDevRoleId()); + } + if (other.hasDevId()) { + mergeDevId(other.getDevId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + ztp.Ztp.DeviceRoleId parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ztp.Ztp.DeviceRoleId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private context.ContextOuterClass.Uuid devRoleId_; + + private com.google.protobuf.SingleFieldBuilderV3 devRoleIdBuilder_; + + /** + * .context.Uuid devRoleId = 1; + * @return Whether the devRoleId field is set. + */ + public boolean hasDevRoleId() { + return devRoleIdBuilder_ != null || devRoleId_ != null; + } + + /** + * .context.Uuid devRoleId = 1; + * @return The devRoleId. + */ + public context.ContextOuterClass.Uuid getDevRoleId() { + if (devRoleIdBuilder_ == null) { + return devRoleId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : devRoleId_; + } else { + return devRoleIdBuilder_.getMessage(); + } + } + + /** + * .context.Uuid devRoleId = 1; + */ + public Builder setDevRoleId(context.ContextOuterClass.Uuid value) { + if (devRoleIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + devRoleId_ = value; + onChanged(); + } else { + devRoleIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.Uuid devRoleId = 1; + */ + public Builder setDevRoleId(context.ContextOuterClass.Uuid.Builder builderForValue) { + if (devRoleIdBuilder_ == null) { + devRoleId_ = builderForValue.build(); + onChanged(); + } else { + devRoleIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.Uuid devRoleId = 1; + */ + public Builder mergeDevRoleId(context.ContextOuterClass.Uuid value) { + if (devRoleIdBuilder_ == null) { + if (devRoleId_ != null) { + devRoleId_ = context.ContextOuterClass.Uuid.newBuilder(devRoleId_).mergeFrom(value).buildPartial(); + } else { + devRoleId_ = value; + } + onChanged(); + } else { + devRoleIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.Uuid devRoleId = 1; + */ + public Builder clearDevRoleId() { + if (devRoleIdBuilder_ == null) { + devRoleId_ = null; + onChanged(); + } else { + devRoleId_ = null; + devRoleIdBuilder_ = null; + } + return this; + } + + /** + * .context.Uuid devRoleId = 1; + */ + public context.ContextOuterClass.Uuid.Builder getDevRoleIdBuilder() { + onChanged(); + return getDevRoleIdFieldBuilder().getBuilder(); + } + + /** + * .context.Uuid devRoleId = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getDevRoleIdOrBuilder() { + if (devRoleIdBuilder_ != null) { + return devRoleIdBuilder_.getMessageOrBuilder(); + } else { + return devRoleId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : devRoleId_; + } + } + + /** + * .context.Uuid devRoleId = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDevRoleIdFieldBuilder() { + if (devRoleIdBuilder_ == null) { + devRoleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDevRoleId(), getParentForChildren(), isClean()); + devRoleId_ = null; + } + return devRoleIdBuilder_; + } + + private context.ContextOuterClass.DeviceId devId_; + + private com.google.protobuf.SingleFieldBuilderV3 devIdBuilder_; + + /** + * .context.DeviceId devId = 2; + * @return Whether the devId field is set. + */ + public boolean hasDevId() { + return devIdBuilder_ != null || devId_ != null; + } + + /** + * .context.DeviceId devId = 2; + * @return The devId. + */ + public context.ContextOuterClass.DeviceId getDevId() { + if (devIdBuilder_ == null) { + return devId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : devId_; + } else { + return devIdBuilder_.getMessage(); + } + } + + /** + * .context.DeviceId devId = 2; + */ + public Builder setDevId(context.ContextOuterClass.DeviceId value) { + if (devIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + devId_ = value; + onChanged(); + } else { + devIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceId devId = 2; + */ + public Builder setDevId(context.ContextOuterClass.DeviceId.Builder builderForValue) { + if (devIdBuilder_ == null) { + devId_ = builderForValue.build(); + onChanged(); + } else { + devIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceId devId = 2; + */ + public Builder mergeDevId(context.ContextOuterClass.DeviceId value) { + if (devIdBuilder_ == null) { + if (devId_ != null) { + devId_ = context.ContextOuterClass.DeviceId.newBuilder(devId_).mergeFrom(value).buildPartial(); + } else { + devId_ = value; + } + onChanged(); + } else { + devIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceId devId = 2; + */ + public Builder clearDevId() { + if (devIdBuilder_ == null) { + devId_ = null; + onChanged(); + } else { + devId_ = null; + devIdBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceId devId = 2; + */ + public context.ContextOuterClass.DeviceId.Builder getDevIdBuilder() { + onChanged(); + return getDevIdFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceId devId = 2; + */ + public context.ContextOuterClass.DeviceIdOrBuilder getDevIdOrBuilder() { + if (devIdBuilder_ != null) { + return devIdBuilder_.getMessageOrBuilder(); + } else { + return devId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : devId_; + } + } + + /** + * .context.DeviceId devId = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDevIdFieldBuilder() { + if (devIdBuilder_ == null) { + devIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDevId(), getParentForChildren(), isClean()); + devId_ = null; + } + return devIdBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:ztp.DeviceRoleId) + } + + // @@protoc_insertion_point(class_scope:ztp.DeviceRoleId) + private static final ztp.Ztp.DeviceRoleId DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ztp.Ztp.DeviceRoleId(); + } + + public static ztp.Ztp.DeviceRoleId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @java.lang.Override + public DeviceRoleId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceRoleId(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceRoleOrBuilder extends // @@protoc_insertion_point(interface_extends:ztp.DeviceRole) + com.google.protobuf.MessageOrBuilder { + + /** + * .ztp.DeviceRoleId devRoleId = 1; + * @return Whether the devRoleId field is set. + */ + boolean hasDevRoleId(); + + /** + * .ztp.DeviceRoleId devRoleId = 1; + * @return The devRoleId. + */ + ztp.Ztp.DeviceRoleId getDevRoleId(); + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder(); + + /** + * .ztp.DeviceRoleType devRoleType = 2; + * @return The enum numeric value on the wire for devRoleType. + */ + int getDevRoleTypeValue(); + + /** + * .ztp.DeviceRoleType devRoleType = 2; + * @return The devRoleType. + */ + ztp.Ztp.DeviceRoleType getDevRoleType(); + } /** - * .ztp.DeviceRole devRole = 1; - * @return Whether the devRole field is set. - */ - boolean hasDevRole(); - /** - * .ztp.DeviceRole devRole = 1; - * @return The devRole. + * Protobuf type {@code ztp.DeviceRole} */ - ztp.Ztp.DeviceRole getDevRole(); + public static final class DeviceRole extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ztp.DeviceRole) + DeviceRoleOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceRole.newBuilder() to construct. + private DeviceRole(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceRole() { + devRoleType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeviceRole(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeviceRole(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: + { + ztp.Ztp.DeviceRoleId.Builder subBuilder = null; + if (devRoleId_ != null) { + subBuilder = devRoleId_.toBuilder(); + } + devRoleId_ = input.readMessage(ztp.Ztp.DeviceRoleId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(devRoleId_); + devRoleId_ = subBuilder.buildPartial(); + } + break; + } + case 16: + { + int rawValue = input.readEnum(); + devRoleType_ = 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 ztp.Ztp.internal_static_ztp_DeviceRole_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return ztp.Ztp.internal_static_ztp_DeviceRole_fieldAccessorTable.ensureFieldAccessorsInitialized(ztp.Ztp.DeviceRole.class, ztp.Ztp.DeviceRole.Builder.class); + } + + public static final int DEVROLEID_FIELD_NUMBER = 1; + + private ztp.Ztp.DeviceRoleId devRoleId_; + + /** + * .ztp.DeviceRoleId devRoleId = 1; + * @return Whether the devRoleId field is set. + */ + @java.lang.Override + public boolean hasDevRoleId() { + return devRoleId_ != null; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + * @return The devRoleId. + */ + @java.lang.Override + public ztp.Ztp.DeviceRoleId getDevRoleId() { + return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + @java.lang.Override + public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { + return getDevRoleId(); + } + + public static final int DEVROLETYPE_FIELD_NUMBER = 2; + + private int devRoleType_; + + /** + * .ztp.DeviceRoleType devRoleType = 2; + * @return The enum numeric value on the wire for devRoleType. + */ + @java.lang.Override + public int getDevRoleTypeValue() { + return devRoleType_; + } + + /** + * .ztp.DeviceRoleType devRoleType = 2; + * @return The devRoleType. + */ + @java.lang.Override + public ztp.Ztp.DeviceRoleType getDevRoleType() { + @SuppressWarnings("deprecation") + ztp.Ztp.DeviceRoleType result = ztp.Ztp.DeviceRoleType.valueOf(devRoleType_); + return result == null ? ztp.Ztp.DeviceRoleType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (devRoleId_ != null) { + output.writeMessage(1, getDevRoleId()); + } + if (devRoleType_ != ztp.Ztp.DeviceRoleType.NONE.getNumber()) { + output.writeEnum(2, devRoleType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (devRoleId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDevRoleId()); + } + if (devRoleType_ != ztp.Ztp.DeviceRoleType.NONE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, devRoleType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof ztp.Ztp.DeviceRole)) { + return super.equals(obj); + } + ztp.Ztp.DeviceRole other = (ztp.Ztp.DeviceRole) obj; + if (hasDevRoleId() != other.hasDevRoleId()) + return false; + if (hasDevRoleId()) { + if (!getDevRoleId().equals(other.getDevRoleId())) + return false; + } + if (devRoleType_ != other.devRoleType_) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDevRoleId()) { + hash = (37 * hash) + DEVROLEID_FIELD_NUMBER; + hash = (53 * hash) + getDevRoleId().hashCode(); + } + hash = (37 * hash) + DEVROLETYPE_FIELD_NUMBER; + hash = (53 * hash) + devRoleType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static ztp.Ztp.DeviceRole parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceRole parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ztp.Ztp.DeviceRole parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceRole parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ztp.Ztp.DeviceRole parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceRole parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ztp.Ztp.DeviceRole parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRole parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static ztp.Ztp.DeviceRole parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRole parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static ztp.Ztp.DeviceRole parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRole parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ztp.Ztp.DeviceRole prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code ztp.DeviceRole} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:ztp.DeviceRole) + ztp.Ztp.DeviceRoleOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return ztp.Ztp.internal_static_ztp_DeviceRole_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return ztp.Ztp.internal_static_ztp_DeviceRole_fieldAccessorTable.ensureFieldAccessorsInitialized(ztp.Ztp.DeviceRole.class, ztp.Ztp.DeviceRole.Builder.class); + } + + // Construct using ztp.Ztp.DeviceRole.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 (devRoleIdBuilder_ == null) { + devRoleId_ = null; + } else { + devRoleId_ = null; + devRoleIdBuilder_ = null; + } + devRoleType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return ztp.Ztp.internal_static_ztp_DeviceRole_descriptor; + } + + @java.lang.Override + public ztp.Ztp.DeviceRole getDefaultInstanceForType() { + return ztp.Ztp.DeviceRole.getDefaultInstance(); + } + + @java.lang.Override + public ztp.Ztp.DeviceRole build() { + ztp.Ztp.DeviceRole result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public ztp.Ztp.DeviceRole buildPartial() { + ztp.Ztp.DeviceRole result = new ztp.Ztp.DeviceRole(this); + if (devRoleIdBuilder_ == null) { + result.devRoleId_ = devRoleId_; + } else { + result.devRoleId_ = devRoleIdBuilder_.build(); + } + result.devRoleType_ = devRoleType_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ztp.Ztp.DeviceRole) { + return mergeFrom((ztp.Ztp.DeviceRole) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ztp.Ztp.DeviceRole other) { + if (other == ztp.Ztp.DeviceRole.getDefaultInstance()) + return this; + if (other.hasDevRoleId()) { + mergeDevRoleId(other.getDevRoleId()); + } + if (other.devRoleType_ != 0) { + setDevRoleTypeValue(other.getDevRoleTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + ztp.Ztp.DeviceRole parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ztp.Ztp.DeviceRole) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private ztp.Ztp.DeviceRoleId devRoleId_; + + private com.google.protobuf.SingleFieldBuilderV3 devRoleIdBuilder_; + + /** + * .ztp.DeviceRoleId devRoleId = 1; + * @return Whether the devRoleId field is set. + */ + public boolean hasDevRoleId() { + return devRoleIdBuilder_ != null || devRoleId_ != null; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + * @return The devRoleId. + */ + public ztp.Ztp.DeviceRoleId getDevRoleId() { + if (devRoleIdBuilder_ == null) { + return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; + } else { + return devRoleIdBuilder_.getMessage(); + } + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + public Builder setDevRoleId(ztp.Ztp.DeviceRoleId value) { + if (devRoleIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + devRoleId_ = value; + onChanged(); + } else { + devRoleIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + public Builder setDevRoleId(ztp.Ztp.DeviceRoleId.Builder builderForValue) { + if (devRoleIdBuilder_ == null) { + devRoleId_ = builderForValue.build(); + onChanged(); + } else { + devRoleIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + public Builder mergeDevRoleId(ztp.Ztp.DeviceRoleId value) { + if (devRoleIdBuilder_ == null) { + if (devRoleId_ != null) { + devRoleId_ = ztp.Ztp.DeviceRoleId.newBuilder(devRoleId_).mergeFrom(value).buildPartial(); + } else { + devRoleId_ = value; + } + onChanged(); + } else { + devRoleIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + public Builder clearDevRoleId() { + if (devRoleIdBuilder_ == null) { + devRoleId_ = null; + onChanged(); + } else { + devRoleId_ = null; + devRoleIdBuilder_ = null; + } + return this; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + public ztp.Ztp.DeviceRoleId.Builder getDevRoleIdBuilder() { + onChanged(); + return getDevRoleIdFieldBuilder().getBuilder(); + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { + if (devRoleIdBuilder_ != null) { + return devRoleIdBuilder_.getMessageOrBuilder(); + } else { + return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; + } + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDevRoleIdFieldBuilder() { + if (devRoleIdBuilder_ == null) { + devRoleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDevRoleId(), getParentForChildren(), isClean()); + devRoleId_ = null; + } + return devRoleIdBuilder_; + } + + private int devRoleType_ = 0; + + /** + * .ztp.DeviceRoleType devRoleType = 2; + * @return The enum numeric value on the wire for devRoleType. + */ + @java.lang.Override + public int getDevRoleTypeValue() { + return devRoleType_; + } + + /** + * .ztp.DeviceRoleType devRoleType = 2; + * @param value The enum numeric value on the wire for devRoleType to set. + * @return This builder for chaining. + */ + public Builder setDevRoleTypeValue(int value) { + devRoleType_ = value; + onChanged(); + return this; + } + + /** + * .ztp.DeviceRoleType devRoleType = 2; + * @return The devRoleType. + */ + @java.lang.Override + public ztp.Ztp.DeviceRoleType getDevRoleType() { + @SuppressWarnings("deprecation") + ztp.Ztp.DeviceRoleType result = ztp.Ztp.DeviceRoleType.valueOf(devRoleType_); + return result == null ? ztp.Ztp.DeviceRoleType.UNRECOGNIZED : result; + } + + /** + * .ztp.DeviceRoleType devRoleType = 2; + * @param value The devRoleType to set. + * @return This builder for chaining. + */ + public Builder setDevRoleType(ztp.Ztp.DeviceRoleType value) { + if (value == null) { + throw new NullPointerException(); + } + devRoleType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .ztp.DeviceRoleType devRoleType = 2; + * @return This builder for chaining. + */ + public Builder clearDevRoleType() { + devRoleType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:ztp.DeviceRole) + } + + // @@protoc_insertion_point(class_scope:ztp.DeviceRole) + private static final ztp.Ztp.DeviceRole DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ztp.Ztp.DeviceRole(); + } + + public static ztp.Ztp.DeviceRole getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @java.lang.Override + public DeviceRole parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceRole(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public ztp.Ztp.DeviceRole getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceRoleConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:ztp.DeviceRoleConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * .ztp.DeviceRole devRole = 1; + * @return Whether the devRole field is set. + */ + boolean hasDevRole(); + + /** + * .ztp.DeviceRole devRole = 1; + * @return The devRole. + */ + ztp.Ztp.DeviceRole getDevRole(); + + /** + * .ztp.DeviceRole devRole = 1; + */ + ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder(); + + /** + * .context.DeviceConfig devConfig = 2; + * @return Whether the devConfig field is set. + */ + boolean hasDevConfig(); + + /** + * .context.DeviceConfig devConfig = 2; + * @return The devConfig. + */ + context.ContextOuterClass.DeviceConfig getDevConfig(); + + /** + * .context.DeviceConfig devConfig = 2; + */ + context.ContextOuterClass.DeviceConfigOrBuilder getDevConfigOrBuilder(); + } + /** - * .ztp.DeviceRole devRole = 1; + * Protobuf type {@code ztp.DeviceRoleConfig} */ - ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder(); + public static final class DeviceRoleConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ztp.DeviceRoleConfig) + DeviceRoleConfigOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceRoleConfig.newBuilder() to construct. + private DeviceRoleConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceRoleConfig() { + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeviceRoleConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeviceRoleConfig(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: + { + ztp.Ztp.DeviceRole.Builder subBuilder = null; + if (devRole_ != null) { + subBuilder = devRole_.toBuilder(); + } + devRole_ = input.readMessage(ztp.Ztp.DeviceRole.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(devRole_); + devRole_ = subBuilder.buildPartial(); + } + break; + } + case 18: + { + context.ContextOuterClass.DeviceConfig.Builder subBuilder = null; + if (devConfig_ != null) { + subBuilder = devConfig_.toBuilder(); + } + devConfig_ = input.readMessage(context.ContextOuterClass.DeviceConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(devConfig_); + devConfig_ = 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 ztp.Ztp.internal_static_ztp_DeviceRoleConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(ztp.Ztp.DeviceRoleConfig.class, ztp.Ztp.DeviceRoleConfig.Builder.class); + } + + public static final int DEVROLE_FIELD_NUMBER = 1; + + private ztp.Ztp.DeviceRole devRole_; + + /** + * .ztp.DeviceRole devRole = 1; + * @return Whether the devRole field is set. + */ + @java.lang.Override + public boolean hasDevRole() { + return devRole_ != null; + } + + /** + * .ztp.DeviceRole devRole = 1; + * @return The devRole. + */ + @java.lang.Override + public ztp.Ztp.DeviceRole getDevRole() { + return devRole_ == null ? ztp.Ztp.DeviceRole.getDefaultInstance() : devRole_; + } + + /** + * .ztp.DeviceRole devRole = 1; + */ + @java.lang.Override + public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder() { + return getDevRole(); + } + + public static final int DEVCONFIG_FIELD_NUMBER = 2; + + private context.ContextOuterClass.DeviceConfig devConfig_; + + /** + * .context.DeviceConfig devConfig = 2; + * @return Whether the devConfig field is set. + */ + @java.lang.Override + public boolean hasDevConfig() { + return devConfig_ != null; + } + + /** + * .context.DeviceConfig devConfig = 2; + * @return The devConfig. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceConfig getDevConfig() { + return devConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : devConfig_; + } + + /** + * .context.DeviceConfig devConfig = 2; + */ + @java.lang.Override + public context.ContextOuterClass.DeviceConfigOrBuilder getDevConfigOrBuilder() { + return getDevConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (devRole_ != null) { + output.writeMessage(1, getDevRole()); + } + if (devConfig_ != null) { + output.writeMessage(2, getDevConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (devRole_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDevRole()); + } + if (devConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDevConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof ztp.Ztp.DeviceRoleConfig)) { + return super.equals(obj); + } + ztp.Ztp.DeviceRoleConfig other = (ztp.Ztp.DeviceRoleConfig) obj; + if (hasDevRole() != other.hasDevRole()) + return false; + if (hasDevRole()) { + if (!getDevRole().equals(other.getDevRole())) + return false; + } + if (hasDevConfig() != other.hasDevConfig()) + return false; + if (hasDevConfig()) { + if (!getDevConfig().equals(other.getDevConfig())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDevRole()) { + hash = (37 * hash) + DEVROLE_FIELD_NUMBER; + hash = (53 * hash) + getDevRole().hashCode(); + } + if (hasDevConfig()) { + hash = (37 * hash) + DEVCONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDevConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static ztp.Ztp.DeviceRoleConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceRoleConfig parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceRoleConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceRoleConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleConfig parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRoleConfig parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRoleConfig parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleConfig parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRoleConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ztp.Ztp.DeviceRoleConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code ztp.DeviceRoleConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:ztp.DeviceRoleConfig) + ztp.Ztp.DeviceRoleConfigOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_fieldAccessorTable.ensureFieldAccessorsInitialized(ztp.Ztp.DeviceRoleConfig.class, ztp.Ztp.DeviceRoleConfig.Builder.class); + } + + // Construct using ztp.Ztp.DeviceRoleConfig.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 (devRoleBuilder_ == null) { + devRole_ = null; + } else { + devRole_ = null; + devRoleBuilder_ = null; + } + if (devConfigBuilder_ == null) { + devConfig_ = null; + } else { + devConfig_ = null; + devConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_descriptor; + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleConfig getDefaultInstanceForType() { + return ztp.Ztp.DeviceRoleConfig.getDefaultInstance(); + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleConfig build() { + ztp.Ztp.DeviceRoleConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleConfig buildPartial() { + ztp.Ztp.DeviceRoleConfig result = new ztp.Ztp.DeviceRoleConfig(this); + if (devRoleBuilder_ == null) { + result.devRole_ = devRole_; + } else { + result.devRole_ = devRoleBuilder_.build(); + } + if (devConfigBuilder_ == null) { + result.devConfig_ = devConfig_; + } else { + result.devConfig_ = devConfigBuilder_.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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ztp.Ztp.DeviceRoleConfig) { + return mergeFrom((ztp.Ztp.DeviceRoleConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ztp.Ztp.DeviceRoleConfig other) { + if (other == ztp.Ztp.DeviceRoleConfig.getDefaultInstance()) + return this; + if (other.hasDevRole()) { + mergeDevRole(other.getDevRole()); + } + if (other.hasDevConfig()) { + mergeDevConfig(other.getDevConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + ztp.Ztp.DeviceRoleConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ztp.Ztp.DeviceRoleConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private ztp.Ztp.DeviceRole devRole_; + + private com.google.protobuf.SingleFieldBuilderV3 devRoleBuilder_; + + /** + * .ztp.DeviceRole devRole = 1; + * @return Whether the devRole field is set. + */ + public boolean hasDevRole() { + return devRoleBuilder_ != null || devRole_ != null; + } + + /** + * .ztp.DeviceRole devRole = 1; + * @return The devRole. + */ + public ztp.Ztp.DeviceRole getDevRole() { + if (devRoleBuilder_ == null) { + return devRole_ == null ? ztp.Ztp.DeviceRole.getDefaultInstance() : devRole_; + } else { + return devRoleBuilder_.getMessage(); + } + } + + /** + * .ztp.DeviceRole devRole = 1; + */ + public Builder setDevRole(ztp.Ztp.DeviceRole value) { + if (devRoleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + devRole_ = value; + onChanged(); + } else { + devRoleBuilder_.setMessage(value); + } + return this; + } + + /** + * .ztp.DeviceRole devRole = 1; + */ + public Builder setDevRole(ztp.Ztp.DeviceRole.Builder builderForValue) { + if (devRoleBuilder_ == null) { + devRole_ = builderForValue.build(); + onChanged(); + } else { + devRoleBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .ztp.DeviceRole devRole = 1; + */ + public Builder mergeDevRole(ztp.Ztp.DeviceRole value) { + if (devRoleBuilder_ == null) { + if (devRole_ != null) { + devRole_ = ztp.Ztp.DeviceRole.newBuilder(devRole_).mergeFrom(value).buildPartial(); + } else { + devRole_ = value; + } + onChanged(); + } else { + devRoleBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .ztp.DeviceRole devRole = 1; + */ + public Builder clearDevRole() { + if (devRoleBuilder_ == null) { + devRole_ = null; + onChanged(); + } else { + devRole_ = null; + devRoleBuilder_ = null; + } + return this; + } + + /** + * .ztp.DeviceRole devRole = 1; + */ + public ztp.Ztp.DeviceRole.Builder getDevRoleBuilder() { + onChanged(); + return getDevRoleFieldBuilder().getBuilder(); + } + + /** + * .ztp.DeviceRole devRole = 1; + */ + public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder() { + if (devRoleBuilder_ != null) { + return devRoleBuilder_.getMessageOrBuilder(); + } else { + return devRole_ == null ? ztp.Ztp.DeviceRole.getDefaultInstance() : devRole_; + } + } + + /** + * .ztp.DeviceRole devRole = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDevRoleFieldBuilder() { + if (devRoleBuilder_ == null) { + devRoleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDevRole(), getParentForChildren(), isClean()); + devRole_ = null; + } + return devRoleBuilder_; + } + + private context.ContextOuterClass.DeviceConfig devConfig_; + + private com.google.protobuf.SingleFieldBuilderV3 devConfigBuilder_; + + /** + * .context.DeviceConfig devConfig = 2; + * @return Whether the devConfig field is set. + */ + public boolean hasDevConfig() { + return devConfigBuilder_ != null || devConfig_ != null; + } + + /** + * .context.DeviceConfig devConfig = 2; + * @return The devConfig. + */ + public context.ContextOuterClass.DeviceConfig getDevConfig() { + if (devConfigBuilder_ == null) { + return devConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : devConfig_; + } else { + return devConfigBuilder_.getMessage(); + } + } + + /** + * .context.DeviceConfig devConfig = 2; + */ + public Builder setDevConfig(context.ContextOuterClass.DeviceConfig value) { + if (devConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + devConfig_ = value; + onChanged(); + } else { + devConfigBuilder_.setMessage(value); + } + return this; + } + + /** + * .context.DeviceConfig devConfig = 2; + */ + public Builder setDevConfig(context.ContextOuterClass.DeviceConfig.Builder builderForValue) { + if (devConfigBuilder_ == null) { + devConfig_ = builderForValue.build(); + onChanged(); + } else { + devConfigBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .context.DeviceConfig devConfig = 2; + */ + public Builder mergeDevConfig(context.ContextOuterClass.DeviceConfig value) { + if (devConfigBuilder_ == null) { + if (devConfig_ != null) { + devConfig_ = context.ContextOuterClass.DeviceConfig.newBuilder(devConfig_).mergeFrom(value).buildPartial(); + } else { + devConfig_ = value; + } + onChanged(); + } else { + devConfigBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .context.DeviceConfig devConfig = 2; + */ + public Builder clearDevConfig() { + if (devConfigBuilder_ == null) { + devConfig_ = null; + onChanged(); + } else { + devConfig_ = null; + devConfigBuilder_ = null; + } + return this; + } + + /** + * .context.DeviceConfig devConfig = 2; + */ + public context.ContextOuterClass.DeviceConfig.Builder getDevConfigBuilder() { + onChanged(); + return getDevConfigFieldBuilder().getBuilder(); + } + + /** + * .context.DeviceConfig devConfig = 2; + */ + public context.ContextOuterClass.DeviceConfigOrBuilder getDevConfigOrBuilder() { + if (devConfigBuilder_ != null) { + return devConfigBuilder_.getMessageOrBuilder(); + } else { + return devConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : devConfig_; + } + } + + /** + * .context.DeviceConfig devConfig = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDevConfigFieldBuilder() { + if (devConfigBuilder_ == null) { + devConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDevConfig(), getParentForChildren(), isClean()); + devConfig_ = null; + } + return devConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:ztp.DeviceRoleConfig) + } + + // @@protoc_insertion_point(class_scope:ztp.DeviceRoleConfig) + private static final ztp.Ztp.DeviceRoleConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ztp.Ztp.DeviceRoleConfig(); + } + + public static ztp.Ztp.DeviceRoleConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @java.lang.Override + public DeviceRoleConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceRoleConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeviceRoleListOrBuilder extends // @@protoc_insertion_point(interface_extends:ztp.DeviceRoleList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + java.util.List getDevRoleList(); + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + ztp.Ztp.DeviceRole getDevRole(int index); + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + int getDevRoleCount(); + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + java.util.List getDevRoleOrBuilderList(); + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder(int index); + } /** - * .context.DeviceConfig devConfig = 2; - * @return Whether the devConfig field is set. - */ - boolean hasDevConfig(); - /** - * .context.DeviceConfig devConfig = 2; - * @return The devConfig. - */ - context.ContextOuterClass.DeviceConfig getDevConfig(); - /** - * .context.DeviceConfig devConfig = 2; + * Protobuf type {@code ztp.DeviceRoleList} */ - context.ContextOuterClass.DeviceConfigOrBuilder getDevConfigOrBuilder(); - } - /** - * Protobuf type {@code ztp.DeviceRoleConfig} - */ - public static final class DeviceRoleConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:ztp.DeviceRoleConfig) - DeviceRoleConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceRoleConfig.newBuilder() to construct. - private DeviceRoleConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceRoleConfig() { + public static final class DeviceRoleList extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ztp.DeviceRoleList) + DeviceRoleListOrBuilder { + + private static final long serialVersionUID = 0L; + + // Use DeviceRoleList.newBuilder() to construct. + private DeviceRoleList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceRoleList() { + devRole_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeviceRoleList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeviceRoleList(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)) { + devRole_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + devRole_.add(input.readMessage(ztp.Ztp.DeviceRole.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)) { + devRole_ = java.util.Collections.unmodifiableList(devRole_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return ztp.Ztp.internal_static_ztp_DeviceRoleList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return ztp.Ztp.internal_static_ztp_DeviceRoleList_fieldAccessorTable.ensureFieldAccessorsInitialized(ztp.Ztp.DeviceRoleList.class, ztp.Ztp.DeviceRoleList.Builder.class); + } + + public static final int DEVROLE_FIELD_NUMBER = 1; + + private java.util.List devRole_; + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + @java.lang.Override + public java.util.List getDevRoleList() { + return devRole_; + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + @java.lang.Override + public java.util.List getDevRoleOrBuilderList() { + return devRole_; + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + @java.lang.Override + public int getDevRoleCount() { + return devRole_.size(); + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + @java.lang.Override + public ztp.Ztp.DeviceRole getDevRole(int index) { + return devRole_.get(index); + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + @java.lang.Override + public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder(int index) { + return devRole_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < devRole_.size(); i++) { + output.writeMessage(1, devRole_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + for (int i = 0; i < devRole_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, devRole_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof ztp.Ztp.DeviceRoleList)) { + return super.equals(obj); + } + ztp.Ztp.DeviceRoleList other = (ztp.Ztp.DeviceRoleList) obj; + if (!getDevRoleList().equals(other.getDevRoleList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDevRoleCount() > 0) { + hash = (37 * hash) + DEVROLE_FIELD_NUMBER; + hash = (53 * hash) + getDevRoleList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static ztp.Ztp.DeviceRoleList parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceRoleList parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceRoleList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceRoleList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleList parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRoleList parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRoleList parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleList parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRoleList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ztp.Ztp.DeviceRoleList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code ztp.DeviceRoleList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:ztp.DeviceRoleList) + ztp.Ztp.DeviceRoleListOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return ztp.Ztp.internal_static_ztp_DeviceRoleList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return ztp.Ztp.internal_static_ztp_DeviceRoleList_fieldAccessorTable.ensureFieldAccessorsInitialized(ztp.Ztp.DeviceRoleList.class, ztp.Ztp.DeviceRoleList.Builder.class); + } + + // Construct using ztp.Ztp.DeviceRoleList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDevRoleFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (devRoleBuilder_ == null) { + devRole_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + devRoleBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return ztp.Ztp.internal_static_ztp_DeviceRoleList_descriptor; + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleList getDefaultInstanceForType() { + return ztp.Ztp.DeviceRoleList.getDefaultInstance(); + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleList build() { + ztp.Ztp.DeviceRoleList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleList buildPartial() { + ztp.Ztp.DeviceRoleList result = new ztp.Ztp.DeviceRoleList(this); + int from_bitField0_ = bitField0_; + if (devRoleBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + devRole_ = java.util.Collections.unmodifiableList(devRole_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.devRole_ = devRole_; + } else { + result.devRole_ = devRoleBuilder_.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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ztp.Ztp.DeviceRoleList) { + return mergeFrom((ztp.Ztp.DeviceRoleList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ztp.Ztp.DeviceRoleList other) { + if (other == ztp.Ztp.DeviceRoleList.getDefaultInstance()) + return this; + if (devRoleBuilder_ == null) { + if (!other.devRole_.isEmpty()) { + if (devRole_.isEmpty()) { + devRole_ = other.devRole_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDevRoleIsMutable(); + devRole_.addAll(other.devRole_); + } + onChanged(); + } + } else { + if (!other.devRole_.isEmpty()) { + if (devRoleBuilder_.isEmpty()) { + devRoleBuilder_.dispose(); + devRoleBuilder_ = null; + devRole_ = other.devRole_; + bitField0_ = (bitField0_ & ~0x00000001); + devRoleBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDevRoleFieldBuilder() : null; + } else { + devRoleBuilder_.addAllMessages(other.devRole_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + ztp.Ztp.DeviceRoleList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ztp.Ztp.DeviceRoleList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List devRole_ = java.util.Collections.emptyList(); + + private void ensureDevRoleIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + devRole_ = new java.util.ArrayList(devRole_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3 devRoleBuilder_; + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public java.util.List getDevRoleList() { + if (devRoleBuilder_ == null) { + return java.util.Collections.unmodifiableList(devRole_); + } else { + return devRoleBuilder_.getMessageList(); + } + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public int getDevRoleCount() { + if (devRoleBuilder_ == null) { + return devRole_.size(); + } else { + return devRoleBuilder_.getCount(); + } + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public ztp.Ztp.DeviceRole getDevRole(int index) { + if (devRoleBuilder_ == null) { + return devRole_.get(index); + } else { + return devRoleBuilder_.getMessage(index); + } + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public Builder setDevRole(int index, ztp.Ztp.DeviceRole value) { + if (devRoleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevRoleIsMutable(); + devRole_.set(index, value); + onChanged(); + } else { + devRoleBuilder_.setMessage(index, value); + } + return this; + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public Builder setDevRole(int index, ztp.Ztp.DeviceRole.Builder builderForValue) { + if (devRoleBuilder_ == null) { + ensureDevRoleIsMutable(); + devRole_.set(index, builderForValue.build()); + onChanged(); + } else { + devRoleBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public Builder addDevRole(ztp.Ztp.DeviceRole value) { + if (devRoleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevRoleIsMutable(); + devRole_.add(value); + onChanged(); + } else { + devRoleBuilder_.addMessage(value); + } + return this; + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public Builder addDevRole(int index, ztp.Ztp.DeviceRole value) { + if (devRoleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDevRoleIsMutable(); + devRole_.add(index, value); + onChanged(); + } else { + devRoleBuilder_.addMessage(index, value); + } + return this; + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public Builder addDevRole(ztp.Ztp.DeviceRole.Builder builderForValue) { + if (devRoleBuilder_ == null) { + ensureDevRoleIsMutable(); + devRole_.add(builderForValue.build()); + onChanged(); + } else { + devRoleBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public Builder addDevRole(int index, ztp.Ztp.DeviceRole.Builder builderForValue) { + if (devRoleBuilder_ == null) { + ensureDevRoleIsMutable(); + devRole_.add(index, builderForValue.build()); + onChanged(); + } else { + devRoleBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public Builder addAllDevRole(java.lang.Iterable values) { + if (devRoleBuilder_ == null) { + ensureDevRoleIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, devRole_); + onChanged(); + } else { + devRoleBuilder_.addAllMessages(values); + } + return this; + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public Builder clearDevRole() { + if (devRoleBuilder_ == null) { + devRole_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + devRoleBuilder_.clear(); + } + return this; + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public Builder removeDevRole(int index) { + if (devRoleBuilder_ == null) { + ensureDevRoleIsMutable(); + devRole_.remove(index); + onChanged(); + } else { + devRoleBuilder_.remove(index); + } + return this; + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public ztp.Ztp.DeviceRole.Builder getDevRoleBuilder(int index) { + return getDevRoleFieldBuilder().getBuilder(index); + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder(int index) { + if (devRoleBuilder_ == null) { + return devRole_.get(index); + } else { + return devRoleBuilder_.getMessageOrBuilder(index); + } + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public java.util.List getDevRoleOrBuilderList() { + if (devRoleBuilder_ != null) { + return devRoleBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(devRole_); + } + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public ztp.Ztp.DeviceRole.Builder addDevRoleBuilder() { + return getDevRoleFieldBuilder().addBuilder(ztp.Ztp.DeviceRole.getDefaultInstance()); + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public ztp.Ztp.DeviceRole.Builder addDevRoleBuilder(int index) { + return getDevRoleFieldBuilder().addBuilder(index, ztp.Ztp.DeviceRole.getDefaultInstance()); + } + + /** + * repeated .ztp.DeviceRole devRole = 1; + */ + public java.util.List getDevRoleBuilderList() { + return getDevRoleFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3 getDevRoleFieldBuilder() { + if (devRoleBuilder_ == null) { + devRoleBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3(devRole_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + devRole_ = null; + } + return devRoleBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:ztp.DeviceRoleList) + } + + // @@protoc_insertion_point(class_scope:ztp.DeviceRoleList) + private static final ztp.Ztp.DeviceRoleList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ztp.Ztp.DeviceRoleList(); + } + + public static ztp.Ztp.DeviceRoleList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @java.lang.Override + public DeviceRoleList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceRoleList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceRoleConfig(); - } + public interface DeviceRoleStateOrBuilder extends // @@protoc_insertion_point(interface_extends:ztp.DeviceRoleState) + com.google.protobuf.MessageOrBuilder { + + /** + * .ztp.DeviceRoleId devRoleId = 1; + * @return Whether the devRoleId field is set. + */ + boolean hasDevRoleId(); + + /** + * .ztp.DeviceRoleId devRoleId = 1; + * @return The devRoleId. + */ + ztp.Ztp.DeviceRoleId getDevRoleId(); + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder(); - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeviceRoleConfig( - 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: { - ztp.Ztp.DeviceRole.Builder subBuilder = null; - if (devRole_ != null) { - subBuilder = devRole_.toBuilder(); - } - devRole_ = input.readMessage(ztp.Ztp.DeviceRole.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(devRole_); - devRole_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - context.ContextOuterClass.DeviceConfig.Builder subBuilder = null; - if (devConfig_ != null) { - subBuilder = devConfig_.toBuilder(); - } - devConfig_ = input.readMessage(context.ContextOuterClass.DeviceConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(devConfig_); - devConfig_ = 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 ztp.Ztp.internal_static_ztp_DeviceRoleConfig_descriptor; - } + /** + * .ztp.ZtpDeviceState devRoleState = 2; + * @return The enum numeric value on the wire for devRoleState. + */ + int getDevRoleStateValue(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ztp.Ztp.DeviceRoleConfig.class, ztp.Ztp.DeviceRoleConfig.Builder.class); + /** + * .ztp.ZtpDeviceState devRoleState = 2; + * @return The devRoleState. + */ + ztp.Ztp.ZtpDeviceState getDevRoleState(); } - public static final int DEVROLE_FIELD_NUMBER = 1; - private ztp.Ztp.DeviceRole devRole_; - /** - * .ztp.DeviceRole devRole = 1; - * @return Whether the devRole field is set. - */ - @java.lang.Override - public boolean hasDevRole() { - return devRole_ != null; - } - /** - * .ztp.DeviceRole devRole = 1; - * @return The devRole. - */ - @java.lang.Override - public ztp.Ztp.DeviceRole getDevRole() { - return devRole_ == null ? ztp.Ztp.DeviceRole.getDefaultInstance() : devRole_; - } /** - * .ztp.DeviceRole devRole = 1; + * Protobuf type {@code ztp.DeviceRoleState} */ - @java.lang.Override - public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder() { - return getDevRole(); - } + public static final class DeviceRoleState extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ztp.DeviceRoleState) + DeviceRoleStateOrBuilder { - public static final int DEVCONFIG_FIELD_NUMBER = 2; - private context.ContextOuterClass.DeviceConfig devConfig_; - /** - * .context.DeviceConfig devConfig = 2; - * @return Whether the devConfig field is set. - */ - @java.lang.Override - public boolean hasDevConfig() { - return devConfig_ != null; + private static final long serialVersionUID = 0L; + + // Use DeviceRoleState.newBuilder() to construct. + private DeviceRoleState(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeviceRoleState() { + devRoleState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeviceRoleState(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeviceRoleState(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: + { + ztp.Ztp.DeviceRoleId.Builder subBuilder = null; + if (devRoleId_ != null) { + subBuilder = devRoleId_.toBuilder(); + } + devRoleId_ = input.readMessage(ztp.Ztp.DeviceRoleId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(devRoleId_); + devRoleId_ = subBuilder.buildPartial(); + } + break; + } + case 16: + { + int rawValue = input.readEnum(); + devRoleState_ = 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 ztp.Ztp.internal_static_ztp_DeviceRoleState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return ztp.Ztp.internal_static_ztp_DeviceRoleState_fieldAccessorTable.ensureFieldAccessorsInitialized(ztp.Ztp.DeviceRoleState.class, ztp.Ztp.DeviceRoleState.Builder.class); + } + + public static final int DEVROLEID_FIELD_NUMBER = 1; + + private ztp.Ztp.DeviceRoleId devRoleId_; + + /** + * .ztp.DeviceRoleId devRoleId = 1; + * @return Whether the devRoleId field is set. + */ + @java.lang.Override + public boolean hasDevRoleId() { + return devRoleId_ != null; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + * @return The devRoleId. + */ + @java.lang.Override + public ztp.Ztp.DeviceRoleId getDevRoleId() { + return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + @java.lang.Override + public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { + return getDevRoleId(); + } + + public static final int DEVROLESTATE_FIELD_NUMBER = 2; + + private int devRoleState_; + + /** + * .ztp.ZtpDeviceState devRoleState = 2; + * @return The enum numeric value on the wire for devRoleState. + */ + @java.lang.Override + public int getDevRoleStateValue() { + return devRoleState_; + } + + /** + * .ztp.ZtpDeviceState devRoleState = 2; + * @return The devRoleState. + */ + @java.lang.Override + public ztp.Ztp.ZtpDeviceState getDevRoleState() { + @SuppressWarnings("deprecation") + ztp.Ztp.ZtpDeviceState result = ztp.Ztp.ZtpDeviceState.valueOf(devRoleState_); + return result == null ? ztp.Ztp.ZtpDeviceState.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (devRoleId_ != null) { + output.writeMessage(1, getDevRoleId()); + } + if (devRoleState_ != ztp.Ztp.ZtpDeviceState.ZTP_DEV_STATE_UNDEFINED.getNumber()) { + output.writeEnum(2, devRoleState_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + if (devRoleId_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDevRoleId()); + } + if (devRoleState_ != ztp.Ztp.ZtpDeviceState.ZTP_DEV_STATE_UNDEFINED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, devRoleState_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof ztp.Ztp.DeviceRoleState)) { + return super.equals(obj); + } + ztp.Ztp.DeviceRoleState other = (ztp.Ztp.DeviceRoleState) obj; + if (hasDevRoleId() != other.hasDevRoleId()) + return false; + if (hasDevRoleId()) { + if (!getDevRoleId().equals(other.getDevRoleId())) + return false; + } + if (devRoleState_ != other.devRoleState_) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDevRoleId()) { + hash = (37 * hash) + DEVROLEID_FIELD_NUMBER; + hash = (53 * hash) + getDevRoleId().hashCode(); + } + hash = (37 * hash) + DEVROLESTATE_FIELD_NUMBER; + hash = (53 * hash) + devRoleState_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static ztp.Ztp.DeviceRoleState parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceRoleState parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleState parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceRoleState parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleState parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceRoleState parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleState parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRoleState parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleState parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRoleState parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + + public static ztp.Ztp.DeviceRoleState parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ztp.Ztp.DeviceRoleState parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ztp.Ztp.DeviceRoleState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code ztp.DeviceRoleState} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:ztp.DeviceRoleState) + ztp.Ztp.DeviceRoleStateOrBuilder { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return ztp.Ztp.internal_static_ztp_DeviceRoleState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return ztp.Ztp.internal_static_ztp_DeviceRoleState_fieldAccessorTable.ensureFieldAccessorsInitialized(ztp.Ztp.DeviceRoleState.class, ztp.Ztp.DeviceRoleState.Builder.class); + } + + // Construct using ztp.Ztp.DeviceRoleState.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 (devRoleIdBuilder_ == null) { + devRoleId_ = null; + } else { + devRoleId_ = null; + devRoleIdBuilder_ = null; + } + devRoleState_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return ztp.Ztp.internal_static_ztp_DeviceRoleState_descriptor; + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleState getDefaultInstanceForType() { + return ztp.Ztp.DeviceRoleState.getDefaultInstance(); + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleState build() { + ztp.Ztp.DeviceRoleState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleState buildPartial() { + ztp.Ztp.DeviceRoleState result = new ztp.Ztp.DeviceRoleState(this); + if (devRoleIdBuilder_ == null) { + result.devRoleId_ = devRoleId_; + } else { + result.devRoleId_ = devRoleIdBuilder_.build(); + } + result.devRoleState_ = devRoleState_; + 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 + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ztp.Ztp.DeviceRoleState) { + return mergeFrom((ztp.Ztp.DeviceRoleState) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ztp.Ztp.DeviceRoleState other) { + if (other == ztp.Ztp.DeviceRoleState.getDefaultInstance()) + return this; + if (other.hasDevRoleId()) { + mergeDevRoleId(other.getDevRoleId()); + } + if (other.devRoleState_ != 0) { + setDevRoleStateValue(other.getDevRoleStateValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + ztp.Ztp.DeviceRoleState parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ztp.Ztp.DeviceRoleState) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private ztp.Ztp.DeviceRoleId devRoleId_; + + private com.google.protobuf.SingleFieldBuilderV3 devRoleIdBuilder_; + + /** + * .ztp.DeviceRoleId devRoleId = 1; + * @return Whether the devRoleId field is set. + */ + public boolean hasDevRoleId() { + return devRoleIdBuilder_ != null || devRoleId_ != null; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + * @return The devRoleId. + */ + public ztp.Ztp.DeviceRoleId getDevRoleId() { + if (devRoleIdBuilder_ == null) { + return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; + } else { + return devRoleIdBuilder_.getMessage(); + } + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + public Builder setDevRoleId(ztp.Ztp.DeviceRoleId value) { + if (devRoleIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + devRoleId_ = value; + onChanged(); + } else { + devRoleIdBuilder_.setMessage(value); + } + return this; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + public Builder setDevRoleId(ztp.Ztp.DeviceRoleId.Builder builderForValue) { + if (devRoleIdBuilder_ == null) { + devRoleId_ = builderForValue.build(); + onChanged(); + } else { + devRoleIdBuilder_.setMessage(builderForValue.build()); + } + return this; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + public Builder mergeDevRoleId(ztp.Ztp.DeviceRoleId value) { + if (devRoleIdBuilder_ == null) { + if (devRoleId_ != null) { + devRoleId_ = ztp.Ztp.DeviceRoleId.newBuilder(devRoleId_).mergeFrom(value).buildPartial(); + } else { + devRoleId_ = value; + } + onChanged(); + } else { + devRoleIdBuilder_.mergeFrom(value); + } + return this; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + public Builder clearDevRoleId() { + if (devRoleIdBuilder_ == null) { + devRoleId_ = null; + onChanged(); + } else { + devRoleId_ = null; + devRoleIdBuilder_ = null; + } + return this; + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + public ztp.Ztp.DeviceRoleId.Builder getDevRoleIdBuilder() { + onChanged(); + return getDevRoleIdFieldBuilder().getBuilder(); + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { + if (devRoleIdBuilder_ != null) { + return devRoleIdBuilder_.getMessageOrBuilder(); + } else { + return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; + } + } + + /** + * .ztp.DeviceRoleId devRoleId = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 getDevRoleIdFieldBuilder() { + if (devRoleIdBuilder_ == null) { + devRoleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3(getDevRoleId(), getParentForChildren(), isClean()); + devRoleId_ = null; + } + return devRoleIdBuilder_; + } + + private int devRoleState_ = 0; + + /** + * .ztp.ZtpDeviceState devRoleState = 2; + * @return The enum numeric value on the wire for devRoleState. + */ + @java.lang.Override + public int getDevRoleStateValue() { + return devRoleState_; + } + + /** + * .ztp.ZtpDeviceState devRoleState = 2; + * @param value The enum numeric value on the wire for devRoleState to set. + * @return This builder for chaining. + */ + public Builder setDevRoleStateValue(int value) { + devRoleState_ = value; + onChanged(); + return this; + } + + /** + * .ztp.ZtpDeviceState devRoleState = 2; + * @return The devRoleState. + */ + @java.lang.Override + public ztp.Ztp.ZtpDeviceState getDevRoleState() { + @SuppressWarnings("deprecation") + ztp.Ztp.ZtpDeviceState result = ztp.Ztp.ZtpDeviceState.valueOf(devRoleState_); + return result == null ? ztp.Ztp.ZtpDeviceState.UNRECOGNIZED : result; + } + + /** + * .ztp.ZtpDeviceState devRoleState = 2; + * @param value The devRoleState to set. + * @return This builder for chaining. + */ + public Builder setDevRoleState(ztp.Ztp.ZtpDeviceState value) { + if (value == null) { + throw new NullPointerException(); + } + devRoleState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .ztp.ZtpDeviceState devRoleState = 2; + * @return This builder for chaining. + */ + public Builder clearDevRoleState() { + devRoleState_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:ztp.DeviceRoleState) + } + + // @@protoc_insertion_point(class_scope:ztp.DeviceRoleState) + private static final ztp.Ztp.DeviceRoleState DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ztp.Ztp.DeviceRoleState(); + } + + public static ztp.Ztp.DeviceRoleState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + + @java.lang.Override + public DeviceRoleState parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceRoleState(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public ztp.Ztp.DeviceRoleState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - /** - * .context.DeviceConfig devConfig = 2; - * @return The devConfig. - */ - @java.lang.Override - public context.ContextOuterClass.DeviceConfig getDevConfig() { - return devConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : devConfig_; + + public interface DeviceDeletionResultOrBuilder extends // @@protoc_insertion_point(interface_extends:ztp.DeviceDeletionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string deleted = 1; + * @return A list containing the deleted. + */ + java.util.List getDeletedList(); + + /** + * repeated string deleted = 1; + * @return The count of deleted. + */ + int getDeletedCount(); + + /** + * repeated string deleted = 1; + * @param index The index of the element to return. + * @return The deleted at the given index. + */ + java.lang.String getDeleted(int index); + + /** + * repeated string deleted = 1; + * @param index The index of the value to return. + * @return The bytes of the deleted at the given index. + */ + com.google.protobuf.ByteString getDeletedBytes(int index); } + /** - * .context.DeviceConfig devConfig = 2; + * Protobuf type {@code ztp.DeviceDeletionResult} */ - @java.lang.Override - public context.ContextOuterClass.DeviceConfigOrBuilder getDevConfigOrBuilder() { - return getDevConfig(); - } + public static final class DeviceDeletionResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ztp.DeviceDeletionResult) + DeviceDeletionResultOrBuilder { - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + // Use DeviceDeletionResult.newBuilder() to construct. + private DeviceDeletionResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (devRole_ != null) { - output.writeMessage(1, getDevRole()); - } - if (devConfig_ != null) { - output.writeMessage(2, getDevConfig()); - } - unknownFields.writeTo(output); - } + private DeviceDeletionResult() { + deleted_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (devRole_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDevRole()); - } - if (devConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDevConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeviceDeletionResult(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof ztp.Ztp.DeviceRoleConfig)) { - return super.equals(obj); - } - ztp.Ztp.DeviceRoleConfig other = (ztp.Ztp.DeviceRoleConfig) obj; - - if (hasDevRole() != other.hasDevRole()) return false; - if (hasDevRole()) { - if (!getDevRole() - .equals(other.getDevRole())) return false; - } - if (hasDevConfig() != other.hasDevConfig()) return false; - if (hasDevConfig()) { - if (!getDevConfig() - .equals(other.getDevConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDevRole()) { - hash = (37 * hash) + DEVROLE_FIELD_NUMBER; - hash = (53 * hash) + getDevRole().hashCode(); - } - if (hasDevConfig()) { - hash = (37 * hash) + DEVCONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDevConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private DeviceDeletionResult(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(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deleted_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + deleted_.add(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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + deleted_ = deleted_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } - public static ztp.Ztp.DeviceRoleConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRoleConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRoleConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRoleConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRoleConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRoleConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRoleConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_fieldAccessorTable.ensureFieldAccessorsInitialized(ztp.Ztp.DeviceDeletionResult.class, ztp.Ztp.DeviceDeletionResult.Builder.class); + } + + public static final int DELETED_FIELD_NUMBER = 1; + + private com.google.protobuf.LazyStringList deleted_; + + /** + * repeated string deleted = 1; + * @return A list containing the deleted. + */ + public com.google.protobuf.ProtocolStringList getDeletedList() { + return deleted_; + } + + /** + * repeated string deleted = 1; + * @return The count of deleted. + */ + public int getDeletedCount() { + return deleted_.size(); + } + + /** + * repeated string deleted = 1; + * @param index The index of the element to return. + * @return The deleted at the given index. + */ + public java.lang.String getDeleted(int index) { + return deleted_.get(index); + } + + /** + * repeated string deleted = 1; + * @param index The index of the value to return. + * @return The bytes of the deleted at the given index. + */ + public com.google.protobuf.ByteString getDeletedBytes(int index) { + return deleted_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) + return true; + if (isInitialized == 0) + return false; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < deleted_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deleted_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) + return size; + size = 0; + { + int dataSize = 0; + for (int i = 0; i < deleted_.size(); i++) { + dataSize += computeStringSizeNoTag(deleted_.getRaw(i)); + } + size += dataSize; + size += 1 * getDeletedList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof ztp.Ztp.DeviceDeletionResult)) { + return super.equals(obj); + } + ztp.Ztp.DeviceDeletionResult other = (ztp.Ztp.DeviceDeletionResult) obj; + if (!getDeletedList().equals(other.getDeletedList())) + return false; + if (!unknownFields.equals(other.unknownFields)) + return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeletedCount() > 0) { + hash = (37 * hash) + DELETED_FIELD_NUMBER; + hash = (53 * hash) + getDeletedList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static ztp.Ztp.DeviceDeletionResult parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ztp.Ztp.DeviceDeletionResult parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(ztp.Ztp.DeviceRoleConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + public static ztp.Ztp.DeviceDeletionResult parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code ztp.DeviceRoleConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:ztp.DeviceRoleConfig) - ztp.Ztp.DeviceRoleConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ztp.Ztp.DeviceRoleConfig.class, ztp.Ztp.DeviceRoleConfig.Builder.class); - } - - // Construct using ztp.Ztp.DeviceRoleConfig.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 (devRoleBuilder_ == null) { - devRole_ = null; - } else { - devRole_ = null; - devRoleBuilder_ = null; - } - if (devConfigBuilder_ == null) { - devConfig_ = null; - } else { - devConfig_ = null; - devConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_descriptor; - } - - @java.lang.Override - public ztp.Ztp.DeviceRoleConfig getDefaultInstanceForType() { - return ztp.Ztp.DeviceRoleConfig.getDefaultInstance(); - } - - @java.lang.Override - public ztp.Ztp.DeviceRoleConfig build() { - ztp.Ztp.DeviceRoleConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public ztp.Ztp.DeviceRoleConfig buildPartial() { - ztp.Ztp.DeviceRoleConfig result = new ztp.Ztp.DeviceRoleConfig(this); - if (devRoleBuilder_ == null) { - result.devRole_ = devRole_; - } else { - result.devRole_ = devRoleBuilder_.build(); - } - if (devConfigBuilder_ == null) { - result.devConfig_ = devConfig_; - } else { - result.devConfig_ = devConfigBuilder_.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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ztp.Ztp.DeviceRoleConfig) { - return mergeFrom((ztp.Ztp.DeviceRoleConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(ztp.Ztp.DeviceRoleConfig other) { - if (other == ztp.Ztp.DeviceRoleConfig.getDefaultInstance()) return this; - if (other.hasDevRole()) { - mergeDevRole(other.getDevRole()); - } - if (other.hasDevConfig()) { - mergeDevConfig(other.getDevConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - ztp.Ztp.DeviceRoleConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ztp.Ztp.DeviceRoleConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private ztp.Ztp.DeviceRole devRole_; - private com.google.protobuf.SingleFieldBuilderV3< - ztp.Ztp.DeviceRole, ztp.Ztp.DeviceRole.Builder, ztp.Ztp.DeviceRoleOrBuilder> devRoleBuilder_; - /** - * .ztp.DeviceRole devRole = 1; - * @return Whether the devRole field is set. - */ - public boolean hasDevRole() { - return devRoleBuilder_ != null || devRole_ != null; - } - /** - * .ztp.DeviceRole devRole = 1; - * @return The devRole. - */ - public ztp.Ztp.DeviceRole getDevRole() { - if (devRoleBuilder_ == null) { - return devRole_ == null ? ztp.Ztp.DeviceRole.getDefaultInstance() : devRole_; - } else { - return devRoleBuilder_.getMessage(); - } - } - /** - * .ztp.DeviceRole devRole = 1; - */ - public Builder setDevRole(ztp.Ztp.DeviceRole value) { - if (devRoleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - devRole_ = value; - onChanged(); - } else { - devRoleBuilder_.setMessage(value); - } - - return this; - } - /** - * .ztp.DeviceRole devRole = 1; - */ - public Builder setDevRole( - ztp.Ztp.DeviceRole.Builder builderForValue) { - if (devRoleBuilder_ == null) { - devRole_ = builderForValue.build(); - onChanged(); - } else { - devRoleBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .ztp.DeviceRole devRole = 1; - */ - public Builder mergeDevRole(ztp.Ztp.DeviceRole value) { - if (devRoleBuilder_ == null) { - if (devRole_ != null) { - devRole_ = - ztp.Ztp.DeviceRole.newBuilder(devRole_).mergeFrom(value).buildPartial(); - } else { - devRole_ = value; - } - onChanged(); - } else { - devRoleBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .ztp.DeviceRole devRole = 1; - */ - public Builder clearDevRole() { - if (devRoleBuilder_ == null) { - devRole_ = null; - onChanged(); - } else { - devRole_ = null; - devRoleBuilder_ = null; - } - - return this; - } - /** - * .ztp.DeviceRole devRole = 1; - */ - public ztp.Ztp.DeviceRole.Builder getDevRoleBuilder() { - - onChanged(); - return getDevRoleFieldBuilder().getBuilder(); - } - /** - * .ztp.DeviceRole devRole = 1; - */ - public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder() { - if (devRoleBuilder_ != null) { - return devRoleBuilder_.getMessageOrBuilder(); - } else { - return devRole_ == null ? - ztp.Ztp.DeviceRole.getDefaultInstance() : devRole_; - } - } - /** - * .ztp.DeviceRole devRole = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - ztp.Ztp.DeviceRole, ztp.Ztp.DeviceRole.Builder, ztp.Ztp.DeviceRoleOrBuilder> - getDevRoleFieldBuilder() { - if (devRoleBuilder_ == null) { - devRoleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - ztp.Ztp.DeviceRole, ztp.Ztp.DeviceRole.Builder, ztp.Ztp.DeviceRoleOrBuilder>( - getDevRole(), - getParentForChildren(), - isClean()); - devRole_ = null; - } - return devRoleBuilder_; - } - - private context.ContextOuterClass.DeviceConfig devConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder> devConfigBuilder_; - /** - * .context.DeviceConfig devConfig = 2; - * @return Whether the devConfig field is set. - */ - public boolean hasDevConfig() { - return devConfigBuilder_ != null || devConfig_ != null; - } - /** - * .context.DeviceConfig devConfig = 2; - * @return The devConfig. - */ - public context.ContextOuterClass.DeviceConfig getDevConfig() { - if (devConfigBuilder_ == null) { - return devConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : devConfig_; - } else { - return devConfigBuilder_.getMessage(); - } - } - /** - * .context.DeviceConfig devConfig = 2; - */ - public Builder setDevConfig(context.ContextOuterClass.DeviceConfig value) { - if (devConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - devConfig_ = value; - onChanged(); - } else { - devConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * .context.DeviceConfig devConfig = 2; - */ - public Builder setDevConfig( - context.ContextOuterClass.DeviceConfig.Builder builderForValue) { - if (devConfigBuilder_ == null) { - devConfig_ = builderForValue.build(); - onChanged(); - } else { - devConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .context.DeviceConfig devConfig = 2; - */ - public Builder mergeDevConfig(context.ContextOuterClass.DeviceConfig value) { - if (devConfigBuilder_ == null) { - if (devConfig_ != null) { - devConfig_ = - context.ContextOuterClass.DeviceConfig.newBuilder(devConfig_).mergeFrom(value).buildPartial(); - } else { - devConfig_ = value; - } - onChanged(); - } else { - devConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .context.DeviceConfig devConfig = 2; - */ - public Builder clearDevConfig() { - if (devConfigBuilder_ == null) { - devConfig_ = null; - onChanged(); - } else { - devConfig_ = null; - devConfigBuilder_ = null; - } - - return this; - } - /** - * .context.DeviceConfig devConfig = 2; - */ - public context.ContextOuterClass.DeviceConfig.Builder getDevConfigBuilder() { - - onChanged(); - return getDevConfigFieldBuilder().getBuilder(); - } - /** - * .context.DeviceConfig devConfig = 2; - */ - public context.ContextOuterClass.DeviceConfigOrBuilder getDevConfigOrBuilder() { - if (devConfigBuilder_ != null) { - return devConfigBuilder_.getMessageOrBuilder(); - } else { - return devConfig_ == null ? - context.ContextOuterClass.DeviceConfig.getDefaultInstance() : devConfig_; - } - } - /** - * .context.DeviceConfig devConfig = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder> - getDevConfigFieldBuilder() { - if (devConfigBuilder_ == null) { - devConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder>( - getDevConfig(), - getParentForChildren(), - isClean()); - devConfig_ = null; - } - return devConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:ztp.DeviceRoleConfig) - } + public static ztp.Ztp.DeviceDeletionResult parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - // @@protoc_insertion_point(class_scope:ztp.DeviceRoleConfig) - private static final ztp.Ztp.DeviceRoleConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new ztp.Ztp.DeviceRoleConfig(); - } + public static ztp.Ztp.DeviceDeletionResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static ztp.Ztp.DeviceRoleConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static ztp.Ztp.DeviceDeletionResult parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeviceRoleConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceRoleConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static ztp.Ztp.DeviceDeletionResult parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static ztp.Ztp.DeviceDeletionResult parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - public ztp.Ztp.DeviceRoleConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static ztp.Ztp.DeviceDeletionResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } - } + public static ztp.Ztp.DeviceDeletionResult parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } - public interface DeviceRoleListOrBuilder extends - // @@protoc_insertion_point(interface_extends:ztp.DeviceRoleList) - com.google.protobuf.MessageOrBuilder { + public static ztp.Ztp.DeviceDeletionResult parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - java.util.List - getDevRoleList(); - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - ztp.Ztp.DeviceRole getDevRole(int index); - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - int getDevRoleCount(); - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - java.util.List - getDevRoleOrBuilderList(); - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder( - int index); - } - /** - * Protobuf type {@code ztp.DeviceRoleList} - */ - public static final class DeviceRoleList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:ztp.DeviceRoleList) - DeviceRoleListOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceRoleList.newBuilder() to construct. - private DeviceRoleList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceRoleList() { - devRole_ = java.util.Collections.emptyList(); - } + public static ztp.Ztp.DeviceDeletionResult parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceRoleList(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeviceRoleList( - 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)) { - devRole_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - devRole_.add( - input.readMessage(ztp.Ztp.DeviceRole.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)) { - devRole_ = java.util.Collections.unmodifiableList(devRole_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return ztp.Ztp.internal_static_ztp_DeviceRoleList_descriptor; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return ztp.Ztp.internal_static_ztp_DeviceRoleList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ztp.Ztp.DeviceRoleList.class, ztp.Ztp.DeviceRoleList.Builder.class); - } + public static Builder newBuilder(ztp.Ztp.DeviceDeletionResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static final int DEVROLE_FIELD_NUMBER = 1; - private java.util.List devRole_; - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - @java.lang.Override - public java.util.List getDevRoleList() { - return devRole_; - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - @java.lang.Override - public java.util.List - getDevRoleOrBuilderList() { - return devRole_; - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - @java.lang.Override - public int getDevRoleCount() { - return devRole_.size(); - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - @java.lang.Override - public ztp.Ztp.DeviceRole getDevRole(int index) { - return devRole_.get(index); - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - @java.lang.Override - public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder( - int index) { - return devRole_.get(index); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - memoizedIsInitialized = 1; - return true; - } + /** + * Protobuf type {@code ztp.DeviceDeletionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:ztp.DeviceDeletionResult) + ztp.Ztp.DeviceDeletionResultOrBuilder { - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < devRole_.size(); i++) { - output.writeMessage(1, devRole_.get(i)); - } - unknownFields.writeTo(output); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_descriptor; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < devRole_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, devRole_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_fieldAccessorTable.ensureFieldAccessorsInitialized(ztp.Ztp.DeviceDeletionResult.class, ztp.Ztp.DeviceDeletionResult.Builder.class); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof ztp.Ztp.DeviceRoleList)) { - return super.equals(obj); - } - ztp.Ztp.DeviceRoleList other = (ztp.Ztp.DeviceRoleList) obj; - - if (!getDevRoleList() - .equals(other.getDevRoleList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + // Construct using ztp.Ztp.DeviceDeletionResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDevRoleCount() > 0) { - hash = (37 * hash) + DEVROLE_FIELD_NUMBER; - hash = (53 * hash) + getDevRoleList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public static ztp.Ztp.DeviceRoleList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRoleList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRoleList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRoleList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRoleList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRoleList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRoleList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + } + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(ztp.Ztp.DeviceRoleList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public Builder clear() { + super.clear(); + deleted_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code ztp.DeviceRoleList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:ztp.DeviceRoleList) - ztp.Ztp.DeviceRoleListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return ztp.Ztp.internal_static_ztp_DeviceRoleList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return ztp.Ztp.internal_static_ztp_DeviceRoleList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ztp.Ztp.DeviceRoleList.class, ztp.Ztp.DeviceRoleList.Builder.class); - } - - // Construct using ztp.Ztp.DeviceRoleList.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDevRoleFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (devRoleBuilder_ == null) { - devRole_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - devRoleBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return ztp.Ztp.internal_static_ztp_DeviceRoleList_descriptor; - } - - @java.lang.Override - public ztp.Ztp.DeviceRoleList getDefaultInstanceForType() { - return ztp.Ztp.DeviceRoleList.getDefaultInstance(); - } - - @java.lang.Override - public ztp.Ztp.DeviceRoleList build() { - ztp.Ztp.DeviceRoleList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public ztp.Ztp.DeviceRoleList buildPartial() { - ztp.Ztp.DeviceRoleList result = new ztp.Ztp.DeviceRoleList(this); - int from_bitField0_ = bitField0_; - if (devRoleBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - devRole_ = java.util.Collections.unmodifiableList(devRole_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.devRole_ = devRole_; - } else { - result.devRole_ = devRoleBuilder_.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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ztp.Ztp.DeviceRoleList) { - return mergeFrom((ztp.Ztp.DeviceRoleList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(ztp.Ztp.DeviceRoleList other) { - if (other == ztp.Ztp.DeviceRoleList.getDefaultInstance()) return this; - if (devRoleBuilder_ == null) { - if (!other.devRole_.isEmpty()) { - if (devRole_.isEmpty()) { - devRole_ = other.devRole_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDevRoleIsMutable(); - devRole_.addAll(other.devRole_); - } - onChanged(); - } - } else { - if (!other.devRole_.isEmpty()) { - if (devRoleBuilder_.isEmpty()) { - devRoleBuilder_.dispose(); - devRoleBuilder_ = null; - devRole_ = other.devRole_; - bitField0_ = (bitField0_ & ~0x00000001); - devRoleBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDevRoleFieldBuilder() : null; - } else { - devRoleBuilder_.addAllMessages(other.devRole_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - ztp.Ztp.DeviceRoleList parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ztp.Ztp.DeviceRoleList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List devRole_ = - java.util.Collections.emptyList(); - private void ensureDevRoleIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - devRole_ = new java.util.ArrayList(devRole_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - ztp.Ztp.DeviceRole, ztp.Ztp.DeviceRole.Builder, ztp.Ztp.DeviceRoleOrBuilder> devRoleBuilder_; - - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public java.util.List getDevRoleList() { - if (devRoleBuilder_ == null) { - return java.util.Collections.unmodifiableList(devRole_); - } else { - return devRoleBuilder_.getMessageList(); - } - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public int getDevRoleCount() { - if (devRoleBuilder_ == null) { - return devRole_.size(); - } else { - return devRoleBuilder_.getCount(); - } - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public ztp.Ztp.DeviceRole getDevRole(int index) { - if (devRoleBuilder_ == null) { - return devRole_.get(index); - } else { - return devRoleBuilder_.getMessage(index); - } - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public Builder setDevRole( - int index, ztp.Ztp.DeviceRole value) { - if (devRoleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevRoleIsMutable(); - devRole_.set(index, value); - onChanged(); - } else { - devRoleBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public Builder setDevRole( - int index, ztp.Ztp.DeviceRole.Builder builderForValue) { - if (devRoleBuilder_ == null) { - ensureDevRoleIsMutable(); - devRole_.set(index, builderForValue.build()); - onChanged(); - } else { - devRoleBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public Builder addDevRole(ztp.Ztp.DeviceRole value) { - if (devRoleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevRoleIsMutable(); - devRole_.add(value); - onChanged(); - } else { - devRoleBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public Builder addDevRole( - int index, ztp.Ztp.DeviceRole value) { - if (devRoleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDevRoleIsMutable(); - devRole_.add(index, value); - onChanged(); - } else { - devRoleBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public Builder addDevRole( - ztp.Ztp.DeviceRole.Builder builderForValue) { - if (devRoleBuilder_ == null) { - ensureDevRoleIsMutable(); - devRole_.add(builderForValue.build()); - onChanged(); - } else { - devRoleBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public Builder addDevRole( - int index, ztp.Ztp.DeviceRole.Builder builderForValue) { - if (devRoleBuilder_ == null) { - ensureDevRoleIsMutable(); - devRole_.add(index, builderForValue.build()); - onChanged(); - } else { - devRoleBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public Builder addAllDevRole( - java.lang.Iterable values) { - if (devRoleBuilder_ == null) { - ensureDevRoleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, devRole_); - onChanged(); - } else { - devRoleBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public Builder clearDevRole() { - if (devRoleBuilder_ == null) { - devRole_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - devRoleBuilder_.clear(); - } - return this; - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public Builder removeDevRole(int index) { - if (devRoleBuilder_ == null) { - ensureDevRoleIsMutable(); - devRole_.remove(index); - onChanged(); - } else { - devRoleBuilder_.remove(index); - } - return this; - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public ztp.Ztp.DeviceRole.Builder getDevRoleBuilder( - int index) { - return getDevRoleFieldBuilder().getBuilder(index); - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder( - int index) { - if (devRoleBuilder_ == null) { - return devRole_.get(index); } else { - return devRoleBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public java.util.List - getDevRoleOrBuilderList() { - if (devRoleBuilder_ != null) { - return devRoleBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(devRole_); - } - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public ztp.Ztp.DeviceRole.Builder addDevRoleBuilder() { - return getDevRoleFieldBuilder().addBuilder( - ztp.Ztp.DeviceRole.getDefaultInstance()); - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public ztp.Ztp.DeviceRole.Builder addDevRoleBuilder( - int index) { - return getDevRoleFieldBuilder().addBuilder( - index, ztp.Ztp.DeviceRole.getDefaultInstance()); - } - /** - * repeated .ztp.DeviceRole devRole = 1; - */ - public java.util.List - getDevRoleBuilderList() { - return getDevRoleFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - ztp.Ztp.DeviceRole, ztp.Ztp.DeviceRole.Builder, ztp.Ztp.DeviceRoleOrBuilder> - getDevRoleFieldBuilder() { - if (devRoleBuilder_ == null) { - devRoleBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - ztp.Ztp.DeviceRole, ztp.Ztp.DeviceRole.Builder, ztp.Ztp.DeviceRoleOrBuilder>( - devRole_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - devRole_ = null; - } - return devRoleBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:ztp.DeviceRoleList) - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_descriptor; + } - // @@protoc_insertion_point(class_scope:ztp.DeviceRoleList) - private static final ztp.Ztp.DeviceRoleList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new ztp.Ztp.DeviceRoleList(); - } + @java.lang.Override + public ztp.Ztp.DeviceDeletionResult getDefaultInstanceForType() { + return ztp.Ztp.DeviceDeletionResult.getDefaultInstance(); + } - public static ztp.Ztp.DeviceRoleList getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public ztp.Ztp.DeviceDeletionResult build() { + ztp.Ztp.DeviceDeletionResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeviceRoleList parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceRoleList(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public ztp.Ztp.DeviceDeletionResult buildPartial() { + ztp.Ztp.DeviceDeletionResult result = new ztp.Ztp.DeviceDeletionResult(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + deleted_ = deleted_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deleted_ = deleted_; + onBuilt(); + return result; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - @java.lang.Override - public ztp.Ztp.DeviceRoleList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @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); + } - public interface DeviceRoleStateOrBuilder extends - // @@protoc_insertion_point(interface_extends:ztp.DeviceRoleState) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - /** - * .ztp.DeviceRoleId devRoleId = 1; - * @return Whether the devRoleId field is set. - */ - boolean hasDevRoleId(); - /** - * .ztp.DeviceRoleId devRoleId = 1; - * @return The devRoleId. - */ - ztp.Ztp.DeviceRoleId getDevRoleId(); - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder(); + @java.lang.Override + public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - /** - * .ztp.ZtpDeviceState devRoleState = 2; - * @return The enum numeric value on the wire for devRoleState. - */ - int getDevRoleStateValue(); - /** - * .ztp.ZtpDeviceState devRoleState = 2; - * @return The devRoleState. - */ - ztp.Ztp.ZtpDeviceState getDevRoleState(); - } - /** - * Protobuf type {@code ztp.DeviceRoleState} - */ - public static final class DeviceRoleState extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:ztp.DeviceRoleState) - DeviceRoleStateOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceRoleState.newBuilder() to construct. - private DeviceRoleState(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceRoleState() { - devRoleState_ = 0; - } + @java.lang.Override + public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceRoleState(); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ztp.Ztp.DeviceDeletionResult) { + return mergeFrom((ztp.Ztp.DeviceDeletionResult) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeviceRoleState( - 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: { - ztp.Ztp.DeviceRoleId.Builder subBuilder = null; - if (devRoleId_ != null) { - subBuilder = devRoleId_.toBuilder(); - } - devRoleId_ = input.readMessage(ztp.Ztp.DeviceRoleId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(devRoleId_); - devRoleId_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - int rawValue = input.readEnum(); - - devRoleState_ = 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 ztp.Ztp.internal_static_ztp_DeviceRoleState_descriptor; - } + public Builder mergeFrom(ztp.Ztp.DeviceDeletionResult other) { + if (other == ztp.Ztp.DeviceDeletionResult.getDefaultInstance()) + return this; + if (!other.deleted_.isEmpty()) { + if (deleted_.isEmpty()) { + deleted_ = other.deleted_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeletedIsMutable(); + deleted_.addAll(other.deleted_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return ztp.Ztp.internal_static_ztp_DeviceRoleState_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ztp.Ztp.DeviceRoleState.class, ztp.Ztp.DeviceRoleState.Builder.class); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static final int DEVROLEID_FIELD_NUMBER = 1; - private ztp.Ztp.DeviceRoleId devRoleId_; - /** - * .ztp.DeviceRoleId devRoleId = 1; - * @return Whether the devRoleId field is set. - */ - @java.lang.Override - public boolean hasDevRoleId() { - return devRoleId_ != null; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - * @return The devRoleId. - */ - @java.lang.Override - public ztp.Ztp.DeviceRoleId getDevRoleId() { - return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - @java.lang.Override - public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { - return getDevRoleId(); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { + ztp.Ztp.DeviceDeletionResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ztp.Ztp.DeviceDeletionResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } - public static final int DEVROLESTATE_FIELD_NUMBER = 2; - private int devRoleState_; - /** - * .ztp.ZtpDeviceState devRoleState = 2; - * @return The enum numeric value on the wire for devRoleState. - */ - @java.lang.Override public int getDevRoleStateValue() { - return devRoleState_; - } - /** - * .ztp.ZtpDeviceState devRoleState = 2; - * @return The devRoleState. - */ - @java.lang.Override public ztp.Ztp.ZtpDeviceState getDevRoleState() { - @SuppressWarnings("deprecation") - ztp.Ztp.ZtpDeviceState result = ztp.Ztp.ZtpDeviceState.valueOf(devRoleState_); - return result == null ? ztp.Ztp.ZtpDeviceState.UNRECOGNIZED : result; - } + private int bitField0_; - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private com.google.protobuf.LazyStringList deleted_ = com.google.protobuf.LazyStringArrayList.EMPTY; - memoizedIsInitialized = 1; - return true; - } + private void ensureDeletedIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deleted_ = new com.google.protobuf.LazyStringArrayList(deleted_); + bitField0_ |= 0x00000001; + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (devRoleId_ != null) { - output.writeMessage(1, getDevRoleId()); - } - if (devRoleState_ != ztp.Ztp.ZtpDeviceState.ZTP_DEV_STATE_UNDEFINED.getNumber()) { - output.writeEnum(2, devRoleState_); - } - unknownFields.writeTo(output); - } + /** + * repeated string deleted = 1; + * @return A list containing the deleted. + */ + public com.google.protobuf.ProtocolStringList getDeletedList() { + return deleted_.getUnmodifiableView(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (devRoleId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDevRoleId()); - } - if (devRoleState_ != ztp.Ztp.ZtpDeviceState.ZTP_DEV_STATE_UNDEFINED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, devRoleState_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * repeated string deleted = 1; + * @return The count of deleted. + */ + public int getDeletedCount() { + return deleted_.size(); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof ztp.Ztp.DeviceRoleState)) { - return super.equals(obj); - } - ztp.Ztp.DeviceRoleState other = (ztp.Ztp.DeviceRoleState) obj; - - if (hasDevRoleId() != other.hasDevRoleId()) return false; - if (hasDevRoleId()) { - if (!getDevRoleId() - .equals(other.getDevRoleId())) return false; - } - if (devRoleState_ != other.devRoleState_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + /** + * repeated string deleted = 1; + * @param index The index of the element to return. + * @return The deleted at the given index. + */ + public java.lang.String getDeleted(int index) { + return deleted_.get(index); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDevRoleId()) { - hash = (37 * hash) + DEVROLEID_FIELD_NUMBER; - hash = (53 * hash) + getDevRoleId().hashCode(); - } - hash = (37 * hash) + DEVROLESTATE_FIELD_NUMBER; - hash = (53 * hash) + devRoleState_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * repeated string deleted = 1; + * @param index The index of the value to return. + * @return The bytes of the deleted at the given index. + */ + public com.google.protobuf.ByteString getDeletedBytes(int index) { + return deleted_.getByteString(index); + } - public static ztp.Ztp.DeviceRoleState parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRoleState parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleState parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRoleState parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleState parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceRoleState parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleState parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRoleState parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleState parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRoleState parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static ztp.Ztp.DeviceRoleState parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceRoleState parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + /** + * repeated string deleted = 1; + * @param index The index to set the value at. + * @param value The deleted to set. + * @return This builder for chaining. + */ + public Builder setDeleted(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeletedIsMutable(); + deleted_.set(index, value); + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(ztp.Ztp.DeviceRoleState prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + /** + * repeated string deleted = 1; + * @param value The deleted to add. + * @return This builder for chaining. + */ + public Builder addDeleted(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeletedIsMutable(); + deleted_.add(value); + onChanged(); + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code ztp.DeviceRoleState} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:ztp.DeviceRoleState) - ztp.Ztp.DeviceRoleStateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return ztp.Ztp.internal_static_ztp_DeviceRoleState_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return ztp.Ztp.internal_static_ztp_DeviceRoleState_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ztp.Ztp.DeviceRoleState.class, ztp.Ztp.DeviceRoleState.Builder.class); - } - - // Construct using ztp.Ztp.DeviceRoleState.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 (devRoleIdBuilder_ == null) { - devRoleId_ = null; - } else { - devRoleId_ = null; - devRoleIdBuilder_ = null; - } - devRoleState_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return ztp.Ztp.internal_static_ztp_DeviceRoleState_descriptor; - } - - @java.lang.Override - public ztp.Ztp.DeviceRoleState getDefaultInstanceForType() { - return ztp.Ztp.DeviceRoleState.getDefaultInstance(); - } - - @java.lang.Override - public ztp.Ztp.DeviceRoleState build() { - ztp.Ztp.DeviceRoleState result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public ztp.Ztp.DeviceRoleState buildPartial() { - ztp.Ztp.DeviceRoleState result = new ztp.Ztp.DeviceRoleState(this); - if (devRoleIdBuilder_ == null) { - result.devRoleId_ = devRoleId_; - } else { - result.devRoleId_ = devRoleIdBuilder_.build(); - } - result.devRoleState_ = devRoleState_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ztp.Ztp.DeviceRoleState) { - return mergeFrom((ztp.Ztp.DeviceRoleState)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(ztp.Ztp.DeviceRoleState other) { - if (other == ztp.Ztp.DeviceRoleState.getDefaultInstance()) return this; - if (other.hasDevRoleId()) { - mergeDevRoleId(other.getDevRoleId()); - } - if (other.devRoleState_ != 0) { - setDevRoleStateValue(other.getDevRoleStateValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - ztp.Ztp.DeviceRoleState parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ztp.Ztp.DeviceRoleState) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private ztp.Ztp.DeviceRoleId devRoleId_; - private com.google.protobuf.SingleFieldBuilderV3< - ztp.Ztp.DeviceRoleId, ztp.Ztp.DeviceRoleId.Builder, ztp.Ztp.DeviceRoleIdOrBuilder> devRoleIdBuilder_; - /** - * .ztp.DeviceRoleId devRoleId = 1; - * @return Whether the devRoleId field is set. - */ - public boolean hasDevRoleId() { - return devRoleIdBuilder_ != null || devRoleId_ != null; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - * @return The devRoleId. - */ - public ztp.Ztp.DeviceRoleId getDevRoleId() { - if (devRoleIdBuilder_ == null) { - return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; - } else { - return devRoleIdBuilder_.getMessage(); - } - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - public Builder setDevRoleId(ztp.Ztp.DeviceRoleId value) { - if (devRoleIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - devRoleId_ = value; - onChanged(); - } else { - devRoleIdBuilder_.setMessage(value); - } - - return this; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - public Builder setDevRoleId( - ztp.Ztp.DeviceRoleId.Builder builderForValue) { - if (devRoleIdBuilder_ == null) { - devRoleId_ = builderForValue.build(); - onChanged(); - } else { - devRoleIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - public Builder mergeDevRoleId(ztp.Ztp.DeviceRoleId value) { - if (devRoleIdBuilder_ == null) { - if (devRoleId_ != null) { - devRoleId_ = - ztp.Ztp.DeviceRoleId.newBuilder(devRoleId_).mergeFrom(value).buildPartial(); - } else { - devRoleId_ = value; - } - onChanged(); - } else { - devRoleIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - public Builder clearDevRoleId() { - if (devRoleIdBuilder_ == null) { - devRoleId_ = null; - onChanged(); - } else { - devRoleId_ = null; - devRoleIdBuilder_ = null; - } - - return this; - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - public ztp.Ztp.DeviceRoleId.Builder getDevRoleIdBuilder() { - - onChanged(); - return getDevRoleIdFieldBuilder().getBuilder(); - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { - if (devRoleIdBuilder_ != null) { - return devRoleIdBuilder_.getMessageOrBuilder(); - } else { - return devRoleId_ == null ? - ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; - } - } - /** - * .ztp.DeviceRoleId devRoleId = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - ztp.Ztp.DeviceRoleId, ztp.Ztp.DeviceRoleId.Builder, ztp.Ztp.DeviceRoleIdOrBuilder> - getDevRoleIdFieldBuilder() { - if (devRoleIdBuilder_ == null) { - devRoleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - ztp.Ztp.DeviceRoleId, ztp.Ztp.DeviceRoleId.Builder, ztp.Ztp.DeviceRoleIdOrBuilder>( - getDevRoleId(), - getParentForChildren(), - isClean()); - devRoleId_ = null; - } - return devRoleIdBuilder_; - } - - private int devRoleState_ = 0; - /** - * .ztp.ZtpDeviceState devRoleState = 2; - * @return The enum numeric value on the wire for devRoleState. - */ - @java.lang.Override public int getDevRoleStateValue() { - return devRoleState_; - } - /** - * .ztp.ZtpDeviceState devRoleState = 2; - * @param value The enum numeric value on the wire for devRoleState to set. - * @return This builder for chaining. - */ - public Builder setDevRoleStateValue(int value) { - - devRoleState_ = value; - onChanged(); - return this; - } - /** - * .ztp.ZtpDeviceState devRoleState = 2; - * @return The devRoleState. - */ - @java.lang.Override - public ztp.Ztp.ZtpDeviceState getDevRoleState() { - @SuppressWarnings("deprecation") - ztp.Ztp.ZtpDeviceState result = ztp.Ztp.ZtpDeviceState.valueOf(devRoleState_); - return result == null ? ztp.Ztp.ZtpDeviceState.UNRECOGNIZED : result; - } - /** - * .ztp.ZtpDeviceState devRoleState = 2; - * @param value The devRoleState to set. - * @return This builder for chaining. - */ - public Builder setDevRoleState(ztp.Ztp.ZtpDeviceState value) { - if (value == null) { - throw new NullPointerException(); - } - - devRoleState_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .ztp.ZtpDeviceState devRoleState = 2; - * @return This builder for chaining. - */ - public Builder clearDevRoleState() { - - devRoleState_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:ztp.DeviceRoleState) - } + /** + * repeated string deleted = 1; + * @param values The deleted to add. + * @return This builder for chaining. + */ + public Builder addAllDeleted(java.lang.Iterable values) { + ensureDeletedIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deleted_); + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:ztp.DeviceRoleState) - private static final ztp.Ztp.DeviceRoleState DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new ztp.Ztp.DeviceRoleState(); - } + /** + * repeated string deleted = 1; + * @return This builder for chaining. + */ + public Builder clearDeleted() { + deleted_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - public static ztp.Ztp.DeviceRoleState getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * repeated string deleted = 1; + * @param value The bytes of the deleted to add. + * @return This builder for chaining. + */ + public Builder addDeletedBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDeletedIsMutable(); + deleted_.add(value); + onChanged(); + return this; + } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeviceRoleState parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceRoleState(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + // @@protoc_insertion_point(builder_scope:ztp.DeviceDeletionResult) + } - @java.lang.Override - public ztp.Ztp.DeviceRoleState getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + // @@protoc_insertion_point(class_scope:ztp.DeviceDeletionResult) + private static final ztp.Ztp.DeviceDeletionResult DEFAULT_INSTANCE; - } + static { + DEFAULT_INSTANCE = new ztp.Ztp.DeviceDeletionResult(); + } - public interface DeviceDeletionResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:ztp.DeviceDeletionResult) - com.google.protobuf.MessageOrBuilder { + public static ztp.Ztp.DeviceDeletionResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * repeated string deleted = 1; - * @return A list containing the deleted. - */ - java.util.List - getDeletedList(); - /** - * repeated string deleted = 1; - * @return The count of deleted. - */ - int getDeletedCount(); - /** - * repeated string deleted = 1; - * @param index The index of the element to return. - * @return The deleted at the given index. - */ - java.lang.String getDeleted(int index); - /** - * repeated string deleted = 1; - * @param index The index of the value to return. - * @return The bytes of the deleted at the given index. - */ - com.google.protobuf.ByteString - getDeletedBytes(int index); - } - /** - * Protobuf type {@code ztp.DeviceDeletionResult} - */ - public static final class DeviceDeletionResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:ztp.DeviceDeletionResult) - DeviceDeletionResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeviceDeletionResult.newBuilder() to construct. - private DeviceDeletionResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeviceDeletionResult() { - deleted_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } + private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeviceDeletionResult(); - } + @java.lang.Override + public DeviceDeletionResult parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { + return new DeviceDeletionResult(input, extensionRegistry); + } + }; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeviceDeletionResult( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deleted_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - deleted_.add(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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deleted_ = deleted_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_descriptor; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ztp.Ztp.DeviceDeletionResult.class, ztp.Ztp.DeviceDeletionResult.Builder.class); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static final int DELETED_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList deleted_; - /** - * repeated string deleted = 1; - * @return A list containing the deleted. - */ - public com.google.protobuf.ProtocolStringList - getDeletedList() { - return deleted_; - } - /** - * repeated string deleted = 1; - * @return The count of deleted. - */ - public int getDeletedCount() { - return deleted_.size(); - } - /** - * repeated string deleted = 1; - * @param index The index of the element to return. - * @return The deleted at the given index. - */ - public java.lang.String getDeleted(int index) { - return deleted_.get(index); - } - /** - * repeated string deleted = 1; - * @param index The index of the value to return. - * @return The bytes of the deleted at the given index. - */ - public com.google.protobuf.ByteString - getDeletedBytes(int index) { - return deleted_.getByteString(index); + @java.lang.Override + public ztp.Ztp.DeviceDeletionResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_ztp_DeviceRoleId_descriptor; - memoizedIsInitialized = 1; - return true; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_ztp_DeviceRoleId_fieldAccessorTable; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < deleted_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deleted_.getRaw(i)); - } - unknownFields.writeTo(output); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_ztp_DeviceRole_descriptor; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < deleted_.size(); i++) { - dataSize += computeStringSizeNoTag(deleted_.getRaw(i)); - } - size += dataSize; - size += 1 * getDeletedList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_ztp_DeviceRole_fieldAccessorTable; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof ztp.Ztp.DeviceDeletionResult)) { - return super.equals(obj); - } - ztp.Ztp.DeviceDeletionResult other = (ztp.Ztp.DeviceDeletionResult) obj; - - if (!getDeletedList() - .equals(other.getDeletedList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_ztp_DeviceRoleConfig_descriptor; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDeletedCount() > 0) { - hash = (37 * hash) + DELETED_FIELD_NUMBER; - hash = (53 * hash) + getDeletedList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_ztp_DeviceRoleConfig_fieldAccessorTable; - public static ztp.Ztp.DeviceDeletionResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceDeletionResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceDeletionResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceDeletionResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceDeletionResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static ztp.Ztp.DeviceDeletionResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static ztp.Ztp.DeviceDeletionResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceDeletionResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static ztp.Ztp.DeviceDeletionResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceDeletionResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static ztp.Ztp.DeviceDeletionResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static ztp.Ztp.DeviceDeletionResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_ztp_DeviceRoleList_descriptor; - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(ztp.Ztp.DeviceDeletionResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_ztp_DeviceRoleList_fieldAccessorTable; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code ztp.DeviceDeletionResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:ztp.DeviceDeletionResult) - ztp.Ztp.DeviceDeletionResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - ztp.Ztp.DeviceDeletionResult.class, ztp.Ztp.DeviceDeletionResult.Builder.class); - } - - // Construct using ztp.Ztp.DeviceDeletionResult.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(); - deleted_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_descriptor; - } - - @java.lang.Override - public ztp.Ztp.DeviceDeletionResult getDefaultInstanceForType() { - return ztp.Ztp.DeviceDeletionResult.getDefaultInstance(); - } - - @java.lang.Override - public ztp.Ztp.DeviceDeletionResult build() { - ztp.Ztp.DeviceDeletionResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public ztp.Ztp.DeviceDeletionResult buildPartial() { - ztp.Ztp.DeviceDeletionResult result = new ztp.Ztp.DeviceDeletionResult(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - deleted_ = deleted_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deleted_ = deleted_; - 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 - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ztp.Ztp.DeviceDeletionResult) { - return mergeFrom((ztp.Ztp.DeviceDeletionResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(ztp.Ztp.DeviceDeletionResult other) { - if (other == ztp.Ztp.DeviceDeletionResult.getDefaultInstance()) return this; - if (!other.deleted_.isEmpty()) { - if (deleted_.isEmpty()) { - deleted_ = other.deleted_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeletedIsMutable(); - deleted_.addAll(other.deleted_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - ztp.Ztp.DeviceDeletionResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ztp.Ztp.DeviceDeletionResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList deleted_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureDeletedIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deleted_ = new com.google.protobuf.LazyStringArrayList(deleted_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated string deleted = 1; - * @return A list containing the deleted. - */ - public com.google.protobuf.ProtocolStringList - getDeletedList() { - return deleted_.getUnmodifiableView(); - } - /** - * repeated string deleted = 1; - * @return The count of deleted. - */ - public int getDeletedCount() { - return deleted_.size(); - } - /** - * repeated string deleted = 1; - * @param index The index of the element to return. - * @return The deleted at the given index. - */ - public java.lang.String getDeleted(int index) { - return deleted_.get(index); - } - /** - * repeated string deleted = 1; - * @param index The index of the value to return. - * @return The bytes of the deleted at the given index. - */ - public com.google.protobuf.ByteString - getDeletedBytes(int index) { - return deleted_.getByteString(index); - } - /** - * repeated string deleted = 1; - * @param index The index to set the value at. - * @param value The deleted to set. - * @return This builder for chaining. - */ - public Builder setDeleted( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeletedIsMutable(); - deleted_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string deleted = 1; - * @param value The deleted to add. - * @return This builder for chaining. - */ - public Builder addDeleted( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeletedIsMutable(); - deleted_.add(value); - onChanged(); - return this; - } - /** - * repeated string deleted = 1; - * @param values The deleted to add. - * @return This builder for chaining. - */ - public Builder addAllDeleted( - java.lang.Iterable values) { - ensureDeletedIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deleted_); - onChanged(); - return this; - } - /** - * repeated string deleted = 1; - * @return This builder for chaining. - */ - public Builder clearDeleted() { - deleted_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated string deleted = 1; - * @param value The bytes of the deleted to add. - * @return This builder for chaining. - */ - public Builder addDeletedBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDeletedIsMutable(); - deleted_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:ztp.DeviceDeletionResult) - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_ztp_DeviceRoleState_descriptor; - // @@protoc_insertion_point(class_scope:ztp.DeviceDeletionResult) - private static final ztp.Ztp.DeviceDeletionResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new ztp.Ztp.DeviceDeletionResult(); - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_ztp_DeviceRoleState_fieldAccessorTable; - public static ztp.Ztp.DeviceDeletionResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_ztp_DeviceDeletionResult_descriptor; - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeviceDeletionResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceDeletionResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_ztp_DeviceDeletionResult_fieldAccessorTable; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; } - @java.lang.Override - public ztp.Ztp.DeviceDeletionResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_ztp_DeviceRoleId_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_ztp_DeviceRoleId_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_ztp_DeviceRole_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_ztp_DeviceRole_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_ztp_DeviceRoleConfig_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_ztp_DeviceRoleConfig_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_ztp_DeviceRoleList_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_ztp_DeviceRoleList_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_ztp_DeviceRoleState_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_ztp_DeviceRoleState_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_ztp_DeviceDeletionResult_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_ztp_DeviceDeletionResult_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\tztp.proto\022\003ztp\032\rcontext.proto\"R\n\014Devic" + - "eRoleId\022 \n\tdevRoleId\030\001 \001(\0132\r.context.Uui" + - "d\022 \n\005devId\030\002 \001(\0132\021.context.DeviceId\"\\\n\nD" + - "eviceRole\022$\n\tdevRoleId\030\001 \001(\0132\021.ztp.Devic" + - "eRoleId\022(\n\013devRoleType\030\002 \001(\0162\023.ztp.Devic" + - "eRoleType\"^\n\020DeviceRoleConfig\022 \n\007devRole" + - "\030\001 \001(\0132\017.ztp.DeviceRole\022(\n\tdevConfig\030\002 \001" + - "(\0132\025.context.DeviceConfig\"2\n\016DeviceRoleL" + - "ist\022 \n\007devRole\030\001 \003(\0132\017.ztp.DeviceRole\"b\n" + - "\017DeviceRoleState\022$\n\tdevRoleId\030\001 \001(\0132\021.zt" + - "p.DeviceRoleId\022)\n\014devRoleState\030\002 \001(\0162\023.z" + - "tp.ZtpDeviceState\"\'\n\024DeviceDeletionResul" + - "t\022\017\n\007deleted\030\001 \003(\t*H\n\016DeviceRoleType\022\010\n\004" + - "NONE\020\000\022\013\n\007DEV_OPS\020\001\022\014\n\010DEV_CONF\020\002\022\021\n\rPIP" + - "ELINE_CONF\020\003*~\n\016ZtpDeviceState\022\033\n\027ZTP_DE" + - "V_STATE_UNDEFINED\020\000\022\031\n\025ZTP_DEV_STATE_CRE" + - "ATED\020\001\022\031\n\025ZTP_DEV_STATE_UPDATED\020\002\022\031\n\025ZTP" + - "_DEV_STATE_DELETED\020\0032\361\002\n\nZtpService\0228\n\020Z" + - "tpGetDeviceRole\022\021.ztp.DeviceRoleId\032\017.ztp" + - ".DeviceRole\"\000\022G\n\033ZtpGetDeviceRolesByDevi" + - "ceId\022\021.context.DeviceId\032\023.ztp.DeviceRole" + - "List\"\000\0221\n\006ZtpAdd\022\017.ztp.DeviceRole\032\024.ztp." + - "DeviceRoleState\"\000\022:\n\tZtpUpdate\022\025.ztp.Dev" + - "iceRoleConfig\032\024.ztp.DeviceRoleState\"\000\0224\n" + - "\tZtpDelete\022\017.ztp.DeviceRole\032\024.ztp.Device" + - "RoleState\"\000\022;\n\014ZtpDeleteAll\022\016.context.Em" + - "pty\032\031.ztp.DeviceDeletionResult\"\000b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - context.ContextOuterClass.getDescriptor(), - }); - internal_static_ztp_DeviceRoleId_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_ztp_DeviceRoleId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_ztp_DeviceRoleId_descriptor, - new java.lang.String[] { "DevRoleId", "DevId", }); - internal_static_ztp_DeviceRole_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_ztp_DeviceRole_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_ztp_DeviceRole_descriptor, - new java.lang.String[] { "DevRoleId", "DevRoleType", }); - internal_static_ztp_DeviceRoleConfig_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_ztp_DeviceRoleConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_ztp_DeviceRoleConfig_descriptor, - new java.lang.String[] { "DevRole", "DevConfig", }); - internal_static_ztp_DeviceRoleList_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_ztp_DeviceRoleList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_ztp_DeviceRoleList_descriptor, - new java.lang.String[] { "DevRole", }); - internal_static_ztp_DeviceRoleState_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_ztp_DeviceRoleState_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_ztp_DeviceRoleState_descriptor, - new java.lang.String[] { "DevRoleId", "DevRoleState", }); - internal_static_ztp_DeviceDeletionResult_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_ztp_DeviceDeletionResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_ztp_DeviceDeletionResult_descriptor, - new java.lang.String[] { "Deleted", }); - context.ContextOuterClass.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) + static { + java.lang.String[] descriptorData = { "\n\tztp.proto\022\003ztp\032\rcontext.proto\"R\n\014Devic" + "eRoleId\022 \n\tdevRoleId\030\001 \001(\0132\r.context.Uui" + "d\022 \n\005devId\030\002 \001(\0132\021.context.DeviceId\"\\\n\nD" + "eviceRole\022$\n\tdevRoleId\030\001 \001(\0132\021.ztp.Devic" + "eRoleId\022(\n\013devRoleType\030\002 \001(\0162\023.ztp.Devic" + "eRoleType\"^\n\020DeviceRoleConfig\022 \n\007devRole" + "\030\001 \001(\0132\017.ztp.DeviceRole\022(\n\tdevConfig\030\002 \001" + "(\0132\025.context.DeviceConfig\"2\n\016DeviceRoleL" + "ist\022 \n\007devRole\030\001 \003(\0132\017.ztp.DeviceRole\"b\n" + "\017DeviceRoleState\022$\n\tdevRoleId\030\001 \001(\0132\021.zt" + "p.DeviceRoleId\022)\n\014devRoleState\030\002 \001(\0162\023.z" + "tp.ZtpDeviceState\"\'\n\024DeviceDeletionResul" + "t\022\017\n\007deleted\030\001 \003(\t*H\n\016DeviceRoleType\022\010\n\004" + "NONE\020\000\022\013\n\007DEV_OPS\020\001\022\014\n\010DEV_CONF\020\002\022\021\n\rPIP" + "ELINE_CONF\020\003*~\n\016ZtpDeviceState\022\033\n\027ZTP_DE" + "V_STATE_UNDEFINED\020\000\022\031\n\025ZTP_DEV_STATE_CRE" + "ATED\020\001\022\031\n\025ZTP_DEV_STATE_UPDATED\020\002\022\031\n\025ZTP" + "_DEV_STATE_DELETED\020\0032\361\002\n\nZtpService\0228\n\020Z" + "tpGetDeviceRole\022\021.ztp.DeviceRoleId\032\017.ztp" + ".DeviceRole\"\000\022G\n\033ZtpGetDeviceRolesByDevi" + "ceId\022\021.context.DeviceId\032\023.ztp.DeviceRole" + "List\"\000\0221\n\006ZtpAdd\022\017.ztp.DeviceRole\032\024.ztp." + "DeviceRoleState\"\000\022:\n\tZtpUpdate\022\025.ztp.Dev" + "iceRoleConfig\032\024.ztp.DeviceRoleState\"\000\0224\n" + "\tZtpDelete\022\017.ztp.DeviceRole\032\024.ztp.Device" + "RoleState\"\000\022;\n\014ZtpDeleteAll\022\016.context.Em" + "pty\032\031.ztp.DeviceDeletionResult\"\000b\006proto3" }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { context.ContextOuterClass.getDescriptor() }); + internal_static_ztp_DeviceRoleId_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_ztp_DeviceRoleId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_ztp_DeviceRoleId_descriptor, new java.lang.String[] { "DevRoleId", "DevId" }); + internal_static_ztp_DeviceRole_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_ztp_DeviceRole_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_ztp_DeviceRole_descriptor, new java.lang.String[] { "DevRoleId", "DevRoleType" }); + internal_static_ztp_DeviceRoleConfig_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_ztp_DeviceRoleConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_ztp_DeviceRoleConfig_descriptor, new java.lang.String[] { "DevRole", "DevConfig" }); + internal_static_ztp_DeviceRoleList_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_ztp_DeviceRoleList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_ztp_DeviceRoleList_descriptor, new java.lang.String[] { "DevRole" }); + internal_static_ztp_DeviceRoleState_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_ztp_DeviceRoleState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_ztp_DeviceRoleState_descriptor, new java.lang.String[] { "DevRoleId", "DevRoleState" }); + internal_static_ztp_DeviceDeletionResult_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_ztp_DeviceDeletionResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_ztp_DeviceDeletionResult_descriptor, new java.lang.String[] { "Deleted" }); + context.ContextOuterClass.getDescriptor(); + } + // @@protoc_insertion_point(outer_class_scope) } diff --git a/src/ztp/target/generated-sources/grpc/ztp/ZtpService.java b/src/ztp/target/generated-sources/grpc/ztp/ZtpService.java index 6afcf457f919db71fa465a903a7afc52900c2ad0..ff4fd1461db2913cf7b69ce85cdf3052addeccd1 100644 --- a/src/ztp/target/generated-sources/grpc/ztp/ZtpService.java +++ b/src/ztp/target/generated-sources/grpc/ztp/ZtpService.java @@ -1,26 +1,19 @@ package ztp; -import io.quarkus.grpc.runtime.MutinyService; +import io.quarkus.grpc.MutinyService; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: ztp.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: ztp.proto") public interface ZtpService extends MutinyService { - io.smallrye.mutiny.Uni ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request); - + io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request); - + io.smallrye.mutiny.Uni ztpAdd(ztp.Ztp.DeviceRole request); - + io.smallrye.mutiny.Uni ztpUpdate(ztp.Ztp.DeviceRoleConfig request); - + io.smallrye.mutiny.Uni ztpDelete(ztp.Ztp.DeviceRole request); - - io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request); - - - -} \ No newline at end of file + io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request); +} diff --git a/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceBean.java b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceBean.java index bc15903127c9ee837e991f9b75a389b684ec568c..9b55f0111ed82c2ffaafe8ce80062a19227e0067 100644 --- a/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceBean.java +++ b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceBean.java @@ -2,66 +2,68 @@ package ztp; import io.grpc.BindableService; import io.quarkus.grpc.GrpcService; -import io.quarkus.grpc.runtime.MutinyBean; +import io.quarkus.grpc.MutinyBean; -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: ztp.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: ztp.proto") public class ZtpServiceBean extends MutinyZtpServiceGrpc.ZtpServiceImplBase implements BindableService, MutinyBean { private final ZtpService delegate; ZtpServiceBean(@GrpcService ZtpService delegate) { - this.delegate = delegate; + this.delegate = delegate; } @Override public io.smallrye.mutiny.Uni ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request) { - try { - return delegate.ztpGetDeviceRole(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.ztpGetDeviceRole(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { - try { - return delegate.ztpGetDeviceRolesByDeviceId(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.ztpGetDeviceRolesByDeviceId(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni ztpAdd(ztp.Ztp.DeviceRole request) { - try { - return delegate.ztpAdd(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.ztpAdd(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni ztpUpdate(ztp.Ztp.DeviceRoleConfig request) { - try { - return delegate.ztpUpdate(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.ztpUpdate(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni ztpDelete(ztp.Ztp.DeviceRole request) { - try { - return delegate.ztpDelete(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.ztpDelete(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } + @Override public io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request) { - try { - return delegate.ztpDeleteAll(request); - } catch (UnsupportedOperationException e) { - throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); - } + try { + return delegate.ztpDeleteAll(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } } - -} \ No newline at end of file +} diff --git a/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceClient.java b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceClient.java index 00abbc181d46f0df5588023c8da29786a73ae965..409949ba6322286500b837cbec807986ee333a96 100644 --- a/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceClient.java +++ b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceClient.java @@ -1,48 +1,57 @@ package ztp; import java.util.function.BiFunction; +import io.quarkus.grpc.MutinyClient; -import io.quarkus.grpc.runtime.MutinyClient; - -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: ztp.proto") +@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: ztp.proto") public class ZtpServiceClient implements ZtpService, MutinyClient { private final MutinyZtpServiceGrpc.MutinyZtpServiceStub stub; public ZtpServiceClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) { - this.stub = stubConfigurator.apply(name,MutinyZtpServiceGrpc.newMutinyStub(channel)); + this.stub = stubConfigurator.apply(name, MutinyZtpServiceGrpc.newMutinyStub(channel)); + } + + private ZtpServiceClient(MutinyZtpServiceGrpc.MutinyZtpServiceStub stub) { + this.stub = stub; + } + + public ZtpServiceClient newInstanceWithStub(MutinyZtpServiceGrpc.MutinyZtpServiceStub stub) { + return new ZtpServiceClient(stub); } @Override public MutinyZtpServiceGrpc.MutinyZtpServiceStub getStub() { - return stub; + return stub; } @Override public io.smallrye.mutiny.Uni ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request) { - return stub.ztpGetDeviceRole(request); + return stub.ztpGetDeviceRole(request); } + @Override public io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { - return stub.ztpGetDeviceRolesByDeviceId(request); + return stub.ztpGetDeviceRolesByDeviceId(request); } + @Override public io.smallrye.mutiny.Uni ztpAdd(ztp.Ztp.DeviceRole request) { - return stub.ztpAdd(request); + return stub.ztpAdd(request); } + @Override public io.smallrye.mutiny.Uni ztpUpdate(ztp.Ztp.DeviceRoleConfig request) { - return stub.ztpUpdate(request); + return stub.ztpUpdate(request); } + @Override public io.smallrye.mutiny.Uni ztpDelete(ztp.Ztp.DeviceRole request) { - return stub.ztpDelete(request); + return stub.ztpDelete(request); } + @Override public io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request) { - return stub.ztpDeleteAll(request); + return stub.ztpDeleteAll(request); } - -} \ No newline at end of file +} diff --git a/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceGrpc.java b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceGrpc.java index ece33078b8058c2d63ddca4060b1b095d21dd8be..796e4bcee7c43597555f826e21f430bc4c324706 100644 --- a/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceGrpc.java +++ b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceGrpc.java @@ -4,642 +4,451 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.38.1)", - comments = "Source: ztp.proto") +@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.38.1)", comments = "Source: ztp.proto") public final class ZtpServiceGrpc { - private ZtpServiceGrpc() {} + private ZtpServiceGrpc() { + } - public static final String SERVICE_NAME = "ztp.ZtpService"; + public static final String SERVICE_NAME = "ztp.ZtpService"; - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getZtpGetDeviceRoleMethod; + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getZtpGetDeviceRoleMethod; - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ZtpGetDeviceRole", - requestType = ztp.Ztp.DeviceRoleId.class, - responseType = ztp.Ztp.DeviceRole.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getZtpGetDeviceRoleMethod() { - io.grpc.MethodDescriptor getZtpGetDeviceRoleMethod; - if ((getZtpGetDeviceRoleMethod = ZtpServiceGrpc.getZtpGetDeviceRoleMethod) == null) { - synchronized (ZtpServiceGrpc.class) { + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ZtpGetDeviceRole", requestType = ztp.Ztp.DeviceRoleId.class, responseType = ztp.Ztp.DeviceRole.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getZtpGetDeviceRoleMethod() { + io.grpc.MethodDescriptor getZtpGetDeviceRoleMethod; if ((getZtpGetDeviceRoleMethod = ZtpServiceGrpc.getZtpGetDeviceRoleMethod) == null) { - ZtpServiceGrpc.getZtpGetDeviceRoleMethod = getZtpGetDeviceRoleMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpGetDeviceRole")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - ztp.Ztp.DeviceRoleId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - ztp.Ztp.DeviceRole.getDefaultInstance())) - .setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpGetDeviceRole")) - .build(); - } - } + synchronized (ZtpServiceGrpc.class) { + if ((getZtpGetDeviceRoleMethod = ZtpServiceGrpc.getZtpGetDeviceRoleMethod) == null) { + ZtpServiceGrpc.getZtpGetDeviceRoleMethod = getZtpGetDeviceRoleMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpGetDeviceRole")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(ztp.Ztp.DeviceRoleId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(ztp.Ztp.DeviceRole.getDefaultInstance())).setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpGetDeviceRole")).build(); + } + } + } + return getZtpGetDeviceRoleMethod; } - return getZtpGetDeviceRoleMethod; - } - - private static volatile io.grpc.MethodDescriptor getZtpGetDeviceRolesByDeviceIdMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ZtpGetDeviceRolesByDeviceId", - requestType = context.ContextOuterClass.DeviceId.class, - responseType = ztp.Ztp.DeviceRoleList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getZtpGetDeviceRolesByDeviceIdMethod() { - io.grpc.MethodDescriptor getZtpGetDeviceRolesByDeviceIdMethod; - if ((getZtpGetDeviceRolesByDeviceIdMethod = ZtpServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod) == null) { - synchronized (ZtpServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getZtpGetDeviceRolesByDeviceIdMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ZtpGetDeviceRolesByDeviceId", requestType = context.ContextOuterClass.DeviceId.class, responseType = ztp.Ztp.DeviceRoleList.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getZtpGetDeviceRolesByDeviceIdMethod() { + io.grpc.MethodDescriptor getZtpGetDeviceRolesByDeviceIdMethod; if ((getZtpGetDeviceRolesByDeviceIdMethod = ZtpServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod) == null) { - ZtpServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod = getZtpGetDeviceRolesByDeviceIdMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpGetDeviceRolesByDeviceId")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - ztp.Ztp.DeviceRoleList.getDefaultInstance())) - .setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpGetDeviceRolesByDeviceId")) - .build(); - } - } + synchronized (ZtpServiceGrpc.class) { + if ((getZtpGetDeviceRolesByDeviceIdMethod = ZtpServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod) == null) { + ZtpServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod = getZtpGetDeviceRolesByDeviceIdMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpGetDeviceRolesByDeviceId")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.DeviceId.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(ztp.Ztp.DeviceRoleList.getDefaultInstance())).setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpGetDeviceRolesByDeviceId")).build(); + } + } + } + return getZtpGetDeviceRolesByDeviceIdMethod; } - return getZtpGetDeviceRolesByDeviceIdMethod; - } - - private static volatile io.grpc.MethodDescriptor getZtpAddMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ZtpAdd", - requestType = ztp.Ztp.DeviceRole.class, - responseType = ztp.Ztp.DeviceRoleState.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getZtpAddMethod() { - io.grpc.MethodDescriptor getZtpAddMethod; - if ((getZtpAddMethod = ZtpServiceGrpc.getZtpAddMethod) == null) { - synchronized (ZtpServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getZtpAddMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ZtpAdd", requestType = ztp.Ztp.DeviceRole.class, responseType = ztp.Ztp.DeviceRoleState.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getZtpAddMethod() { + io.grpc.MethodDescriptor getZtpAddMethod; if ((getZtpAddMethod = ZtpServiceGrpc.getZtpAddMethod) == null) { - ZtpServiceGrpc.getZtpAddMethod = getZtpAddMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpAdd")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - ztp.Ztp.DeviceRole.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - ztp.Ztp.DeviceRoleState.getDefaultInstance())) - .setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpAdd")) - .build(); - } - } + synchronized (ZtpServiceGrpc.class) { + if ((getZtpAddMethod = ZtpServiceGrpc.getZtpAddMethod) == null) { + ZtpServiceGrpc.getZtpAddMethod = getZtpAddMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpAdd")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(ztp.Ztp.DeviceRole.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(ztp.Ztp.DeviceRoleState.getDefaultInstance())).setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpAdd")).build(); + } + } + } + return getZtpAddMethod; } - return getZtpAddMethod; - } - - private static volatile io.grpc.MethodDescriptor getZtpUpdateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ZtpUpdate", - requestType = ztp.Ztp.DeviceRoleConfig.class, - responseType = ztp.Ztp.DeviceRoleState.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getZtpUpdateMethod() { - io.grpc.MethodDescriptor getZtpUpdateMethod; - if ((getZtpUpdateMethod = ZtpServiceGrpc.getZtpUpdateMethod) == null) { - synchronized (ZtpServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getZtpUpdateMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ZtpUpdate", requestType = ztp.Ztp.DeviceRoleConfig.class, responseType = ztp.Ztp.DeviceRoleState.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getZtpUpdateMethod() { + io.grpc.MethodDescriptor getZtpUpdateMethod; if ((getZtpUpdateMethod = ZtpServiceGrpc.getZtpUpdateMethod) == null) { - ZtpServiceGrpc.getZtpUpdateMethod = getZtpUpdateMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpUpdate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - ztp.Ztp.DeviceRoleConfig.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - ztp.Ztp.DeviceRoleState.getDefaultInstance())) - .setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpUpdate")) - .build(); - } - } + synchronized (ZtpServiceGrpc.class) { + if ((getZtpUpdateMethod = ZtpServiceGrpc.getZtpUpdateMethod) == null) { + ZtpServiceGrpc.getZtpUpdateMethod = getZtpUpdateMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpUpdate")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(ztp.Ztp.DeviceRoleConfig.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(ztp.Ztp.DeviceRoleState.getDefaultInstance())).setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpUpdate")).build(); + } + } + } + return getZtpUpdateMethod; } - return getZtpUpdateMethod; - } - - private static volatile io.grpc.MethodDescriptor getZtpDeleteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ZtpDelete", - requestType = ztp.Ztp.DeviceRole.class, - responseType = ztp.Ztp.DeviceRoleState.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getZtpDeleteMethod() { - io.grpc.MethodDescriptor getZtpDeleteMethod; - if ((getZtpDeleteMethod = ZtpServiceGrpc.getZtpDeleteMethod) == null) { - synchronized (ZtpServiceGrpc.class) { + + private static volatile io.grpc.MethodDescriptor getZtpDeleteMethod; + + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ZtpDelete", requestType = ztp.Ztp.DeviceRole.class, responseType = ztp.Ztp.DeviceRoleState.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getZtpDeleteMethod() { + io.grpc.MethodDescriptor getZtpDeleteMethod; if ((getZtpDeleteMethod = ZtpServiceGrpc.getZtpDeleteMethod) == null) { - ZtpServiceGrpc.getZtpDeleteMethod = getZtpDeleteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpDelete")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - ztp.Ztp.DeviceRole.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - ztp.Ztp.DeviceRoleState.getDefaultInstance())) - .setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpDelete")) - .build(); - } - } - } - return getZtpDeleteMethod; - } - - private static volatile io.grpc.MethodDescriptor getZtpDeleteAllMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ZtpDeleteAll", - requestType = context.ContextOuterClass.Empty.class, - responseType = ztp.Ztp.DeviceDeletionResult.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getZtpDeleteAllMethod() { - io.grpc.MethodDescriptor getZtpDeleteAllMethod; - if ((getZtpDeleteAllMethod = ZtpServiceGrpc.getZtpDeleteAllMethod) == null) { - synchronized (ZtpServiceGrpc.class) { - if ((getZtpDeleteAllMethod = ZtpServiceGrpc.getZtpDeleteAllMethod) == null) { - ZtpServiceGrpc.getZtpDeleteAllMethod = getZtpDeleteAllMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpDeleteAll")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - ztp.Ztp.DeviceDeletionResult.getDefaultInstance())) - .setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpDeleteAll")) - .build(); - } - } - } - return getZtpDeleteAllMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static ZtpServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ZtpServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ZtpServiceStub(channel, callOptions); - } - }; - return ZtpServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ZtpServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ZtpServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ZtpServiceBlockingStub(channel, callOptions); - } - }; - return ZtpServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static ZtpServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ZtpServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ZtpServiceFutureStub(channel, callOptions); + synchronized (ZtpServiceGrpc.class) { + if ((getZtpDeleteMethod = ZtpServiceGrpc.getZtpDeleteMethod) == null) { + ZtpServiceGrpc.getZtpDeleteMethod = getZtpDeleteMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpDelete")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(ztp.Ztp.DeviceRole.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(ztp.Ztp.DeviceRoleState.getDefaultInstance())).setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpDelete")).build(); + } + } } - }; - return ZtpServiceFutureStub.newStub(factory, channel); - } + return getZtpDeleteMethod; + } - /** - */ - public static abstract class ZtpServiceImplBase implements io.grpc.BindableService { + private static volatile io.grpc.MethodDescriptor getZtpDeleteAllMethod; - /** - */ - public void ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpGetDeviceRoleMethod(), responseObserver); + @io.grpc.stub.annotations.RpcMethod(fullMethodName = SERVICE_NAME + '/' + "ZtpDeleteAll", requestType = context.ContextOuterClass.Empty.class, responseType = ztp.Ztp.DeviceDeletionResult.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getZtpDeleteAllMethod() { + io.grpc.MethodDescriptor getZtpDeleteAllMethod; + if ((getZtpDeleteAllMethod = ZtpServiceGrpc.getZtpDeleteAllMethod) == null) { + synchronized (ZtpServiceGrpc.class) { + if ((getZtpDeleteAllMethod = ZtpServiceGrpc.getZtpDeleteAllMethod) == null) { + ZtpServiceGrpc.getZtpDeleteAllMethod = getZtpDeleteAllMethod = io.grpc.MethodDescriptor.newBuilder().setType(io.grpc.MethodDescriptor.MethodType.UNARY).setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpDeleteAll")).setSampledToLocalTracing(true).setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(context.ContextOuterClass.Empty.getDefaultInstance())).setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(ztp.Ztp.DeviceDeletionResult.getDefaultInstance())).setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpDeleteAll")).build(); + } + } + } + return getZtpDeleteAllMethod; } /** + * Creates a new async stub that supports all call types for the service */ - public void ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpGetDeviceRolesByDeviceIdMethod(), responseObserver); - } + public static ZtpServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { - /** - */ - public void ztpAdd(ztp.Ztp.DeviceRole request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpAddMethod(), responseObserver); + @java.lang.Override + public ZtpServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ZtpServiceStub(channel, callOptions); + } + }; + return ZtpServiceStub.newStub(factory, channel); } /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ - public void ztpUpdate(ztp.Ztp.DeviceRoleConfig request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpUpdateMethod(), responseObserver); + public static ZtpServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ZtpServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ZtpServiceBlockingStub(channel, callOptions); + } + }; + return ZtpServiceBlockingStub.newStub(factory, channel); } /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public void ztpDelete(ztp.Ztp.DeviceRole request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpDeleteMethod(), responseObserver); + public static ZtpServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { + + @java.lang.Override + public ZtpServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ZtpServiceFutureStub(channel, callOptions); + } + }; + return ZtpServiceFutureStub.newStub(factory, channel); } /** */ - public void ztpDeleteAll(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpDeleteAllMethod(), responseObserver); - } + public static abstract class ZtpServiceImplBase implements io.grpc.BindableService { - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getZtpGetDeviceRoleMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - ztp.Ztp.DeviceRoleId, - ztp.Ztp.DeviceRole>( - this, METHODID_ZTP_GET_DEVICE_ROLE))) - .addMethod( - getZtpGetDeviceRolesByDeviceIdMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceId, - ztp.Ztp.DeviceRoleList>( - this, METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID))) - .addMethod( - getZtpAddMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - ztp.Ztp.DeviceRole, - ztp.Ztp.DeviceRoleState>( - this, METHODID_ZTP_ADD))) - .addMethod( - getZtpUpdateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - ztp.Ztp.DeviceRoleConfig, - ztp.Ztp.DeviceRoleState>( - this, METHODID_ZTP_UPDATE))) - .addMethod( - getZtpDeleteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - ztp.Ztp.DeviceRole, - ztp.Ztp.DeviceRoleState>( - this, METHODID_ZTP_DELETE))) - .addMethod( - getZtpDeleteAllMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - ztp.Ztp.DeviceDeletionResult>( - this, METHODID_ZTP_DELETE_ALL))) - .build(); - } - } - - /** - */ - public static final class ZtpServiceStub extends io.grpc.stub.AbstractAsyncStub { - private ZtpServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpGetDeviceRoleMethod(), responseObserver); + } - @java.lang.Override - protected ZtpServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ZtpServiceStub(channel, callOptions); - } + /** + */ + public void ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpGetDeviceRolesByDeviceIdMethod(), responseObserver); + } - /** - */ - public void ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getZtpGetDeviceRoleMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void ztpAdd(ztp.Ztp.DeviceRole request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpAddMethod(), responseObserver); + } - /** - */ - public void ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getZtpGetDeviceRolesByDeviceIdMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void ztpUpdate(ztp.Ztp.DeviceRoleConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpUpdateMethod(), responseObserver); + } - /** - */ - public void ztpAdd(ztp.Ztp.DeviceRole request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getZtpAddMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void ztpDelete(ztp.Ztp.DeviceRole request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpDeleteMethod(), responseObserver); + } - /** - */ - public void ztpUpdate(ztp.Ztp.DeviceRoleConfig request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getZtpUpdateMethod(), getCallOptions()), request, responseObserver); - } + /** + */ + public void ztpDeleteAll(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpDeleteAllMethod(), responseObserver); + } - /** - */ - public void ztpDelete(ztp.Ztp.DeviceRole request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getZtpDeleteMethod(), getCallOptions()), request, responseObserver); + @java.lang.Override + public io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getZtpGetDeviceRoleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_GET_DEVICE_ROLE))).addMethod(getZtpGetDeviceRolesByDeviceIdMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID))).addMethod(getZtpAddMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_ADD))).addMethod(getZtpUpdateMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_UPDATE))).addMethod(getZtpDeleteMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_DELETE))).addMethod(getZtpDeleteAllMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers(this, METHODID_ZTP_DELETE_ALL))).build(); + } } /** */ - public void ztpDeleteAll(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getZtpDeleteAllMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - */ - public static final class ZtpServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private ZtpServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + public static class ZtpServiceStub extends io.grpc.stub.AbstractAsyncStub { - @java.lang.Override - protected ZtpServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ZtpServiceBlockingStub(channel, callOptions); - } + private ZtpServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public ztp.Ztp.DeviceRole ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getZtpGetDeviceRoleMethod(), getCallOptions(), request); - } + @java.lang.Override + protected ZtpServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ZtpServiceStub(channel, callOptions); + } - /** - */ - public ztp.Ztp.DeviceRoleList ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getZtpGetDeviceRolesByDeviceIdMethod(), getCallOptions(), request); - } + /** + */ + public void ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getZtpGetDeviceRoleMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public ztp.Ztp.DeviceRoleState ztpAdd(ztp.Ztp.DeviceRole request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getZtpAddMethod(), getCallOptions(), request); - } + /** + */ + public void ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getZtpGetDeviceRolesByDeviceIdMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public ztp.Ztp.DeviceRoleState ztpUpdate(ztp.Ztp.DeviceRoleConfig request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getZtpUpdateMethod(), getCallOptions(), request); - } + /** + */ + public void ztpAdd(ztp.Ztp.DeviceRole request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getZtpAddMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public ztp.Ztp.DeviceRoleState ztpDelete(ztp.Ztp.DeviceRole request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getZtpDeleteMethod(), getCallOptions(), request); - } + /** + */ + public void ztpUpdate(ztp.Ztp.DeviceRoleConfig request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getZtpUpdateMethod(), getCallOptions()), request, responseObserver); + } - /** - */ - public ztp.Ztp.DeviceDeletionResult ztpDeleteAll(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getZtpDeleteAllMethod(), getCallOptions(), request); - } - } - - /** - */ - public static final class ZtpServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private ZtpServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } + /** + */ + public void ztpDelete(ztp.Ztp.DeviceRole request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getZtpDeleteMethod(), getCallOptions()), request, responseObserver); + } - @java.lang.Override - protected ZtpServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ZtpServiceFutureStub(channel, callOptions); + /** + */ + public void ztpDeleteAll(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall(getChannel().newCall(getZtpDeleteAllMethod(), getCallOptions()), request, responseObserver); + } } /** */ - public com.google.common.util.concurrent.ListenableFuture ztpGetDeviceRole( - ztp.Ztp.DeviceRoleId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getZtpGetDeviceRoleMethod(), getCallOptions()), request); - } + public static class ZtpServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - /** - */ - public com.google.common.util.concurrent.ListenableFuture ztpGetDeviceRolesByDeviceId( - context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getZtpGetDeviceRolesByDeviceIdMethod(), getCallOptions()), request); - } + private ZtpServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture ztpAdd( - ztp.Ztp.DeviceRole request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getZtpAddMethod(), getCallOptions()), request); - } + @java.lang.Override + protected ZtpServiceBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ZtpServiceBlockingStub(channel, callOptions); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture ztpUpdate( - ztp.Ztp.DeviceRoleConfig request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getZtpUpdateMethod(), getCallOptions()), request); - } + /** + */ + public ztp.Ztp.DeviceRole ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getZtpGetDeviceRoleMethod(), getCallOptions(), request); + } - /** - */ - public com.google.common.util.concurrent.ListenableFuture ztpDelete( - ztp.Ztp.DeviceRole request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getZtpDeleteMethod(), getCallOptions()), request); + /** + */ + public ztp.Ztp.DeviceRoleList ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getZtpGetDeviceRolesByDeviceIdMethod(), getCallOptions(), request); + } + + /** + */ + public ztp.Ztp.DeviceRoleState ztpAdd(ztp.Ztp.DeviceRole request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getZtpAddMethod(), getCallOptions(), request); + } + + /** + */ + public ztp.Ztp.DeviceRoleState ztpUpdate(ztp.Ztp.DeviceRoleConfig request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getZtpUpdateMethod(), getCallOptions(), request); + } + + /** + */ + public ztp.Ztp.DeviceRoleState ztpDelete(ztp.Ztp.DeviceRole request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getZtpDeleteMethod(), getCallOptions(), request); + } + + /** + */ + public ztp.Ztp.DeviceDeletionResult ztpDeleteAll(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall(getChannel(), getZtpDeleteAllMethod(), getCallOptions(), request); + } } /** */ - public com.google.common.util.concurrent.ListenableFuture ztpDeleteAll( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getZtpDeleteAllMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_ZTP_GET_DEVICE_ROLE = 0; - private static final int METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID = 1; - private static final int METHODID_ZTP_ADD = 2; - private static final int METHODID_ZTP_UPDATE = 3; - private static final int METHODID_ZTP_DELETE = 4; - private static final int METHODID_ZTP_DELETE_ALL = 5; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ZtpServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ZtpServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } + public static class ZtpServiceFutureStub extends io.grpc.stub.AbstractFutureStub { + + private ZtpServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ZtpServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ZtpServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getZtpGetDeviceRoleMethod(), getCallOptions()), request); + } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_ZTP_GET_DEVICE_ROLE: - serviceImpl.ztpGetDeviceRole((ztp.Ztp.DeviceRoleId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID: - serviceImpl.ztpGetDeviceRolesByDeviceId((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ZTP_ADD: - serviceImpl.ztpAdd((ztp.Ztp.DeviceRole) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ZTP_UPDATE: - serviceImpl.ztpUpdate((ztp.Ztp.DeviceRoleConfig) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ZTP_DELETE: - serviceImpl.ztpDelete((ztp.Ztp.DeviceRole) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ZTP_DELETE_ALL: - serviceImpl.ztpDeleteAll((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } + /** + */ + public com.google.common.util.concurrent.ListenableFuture ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getZtpGetDeviceRolesByDeviceIdMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture ztpAdd(ztp.Ztp.DeviceRole request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getZtpAddMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture ztpUpdate(ztp.Ztp.DeviceRoleConfig request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getZtpUpdateMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture ztpDelete(ztp.Ztp.DeviceRole request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getZtpDeleteMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture ztpDeleteAll(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall(getChannel().newCall(getZtpDeleteAllMethod(), getCallOptions()), request); + } } - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } + private static final int METHODID_ZTP_GET_DEVICE_ROLE = 0; + + private static final int METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID = 1; + + private static final int METHODID_ZTP_ADD = 2; + + private static final int METHODID_ZTP_UPDATE = 3; + + private static final int METHODID_ZTP_DELETE = 4; + + private static final int METHODID_ZTP_DELETE_ALL = 5; + + private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { + + private final ZtpServiceImplBase serviceImpl; + + private final int methodId; + + MethodHandlers(ZtpServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + case METHODID_ZTP_GET_DEVICE_ROLE: + serviceImpl.ztpGetDeviceRole((ztp.Ztp.DeviceRoleId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID: + serviceImpl.ztpGetDeviceRolesByDeviceId((context.ContextOuterClass.DeviceId) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ZTP_ADD: + serviceImpl.ztpAdd((ztp.Ztp.DeviceRole) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ZTP_UPDATE: + serviceImpl.ztpUpdate((ztp.Ztp.DeviceRoleConfig) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ZTP_DELETE: + serviceImpl.ztpDelete((ztp.Ztp.DeviceRole) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ZTP_DELETE_ALL: + serviceImpl.ztpDeleteAll((context.ContextOuterClass.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { + switch(methodId) { + default: + throw new AssertionError(); + } + } } - } - private static abstract class ZtpServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ZtpServiceBaseDescriptorSupplier() {} + private static abstract class ZtpServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + + ZtpServiceBaseDescriptorSupplier() { + } + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return ztp.Ztp.getDescriptor(); + } - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return ztp.Ztp.getDescriptor(); + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ZtpService"); + } } - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ZtpService"); + private static final class ZtpServiceFileDescriptorSupplier extends ZtpServiceBaseDescriptorSupplier { + + ZtpServiceFileDescriptorSupplier() { + } } - } - private static final class ZtpServiceFileDescriptorSupplier - extends ZtpServiceBaseDescriptorSupplier { - ZtpServiceFileDescriptorSupplier() {} - } + private static final class ZtpServiceMethodDescriptorSupplier extends ZtpServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private static final class ZtpServiceMethodDescriptorSupplier - extends ZtpServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final String methodName; - ZtpServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } + ZtpServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } } - } - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (ZtpServiceGrpc.class) { - result = serviceDescriptor; + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ZtpServiceFileDescriptorSupplier()) - .addMethod(getZtpGetDeviceRoleMethod()) - .addMethod(getZtpGetDeviceRolesByDeviceIdMethod()) - .addMethod(getZtpAddMethod()) - .addMethod(getZtpUpdateMethod()) - .addMethod(getZtpDeleteMethod()) - .addMethod(getZtpDeleteAllMethod()) - .build(); - } - } + synchronized (ZtpServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME).setSchemaDescriptor(new ZtpServiceFileDescriptorSupplier()).addMethod(getZtpGetDeviceRoleMethod()).addMethod(getZtpGetDeviceRolesByDeviceIdMethod()).addMethod(getZtpAddMethod()).addMethod(getZtpUpdateMethod()).addMethod(getZtpDeleteMethod()).addMethod(getZtpDeleteAllMethod()).build(); + } + } + } + return result; } - return result; - } } diff --git a/src/ztp/target/kubernetes/kubernetes.yml b/src/ztp/target/kubernetes/kubernetes.yml index e3f3633657e236716fa9feaaca4c8f4af6d61a9c..95eca6ae29b9dd5f03ec73f9d9057f40b2fecfdf 100644 --- a/src/ztp/target/kubernetes/kubernetes.yml +++ b/src/ztp/target/kubernetes/kubernetes.yml @@ -3,24 +3,32 @@ apiVersion: v1 kind: Service metadata: annotations: - app.quarkus.io/commit-id: 9d36a29ba5ef1fb46f7b51a5c477bdc4410ba548 - app.quarkus.io/build-timestamp: 2023-11-08 - 11:15:43 +0000 + app.quarkus.io/commit-id: 1fd284c73cf7d419152c8bc99644d0ed8955b355 + app.quarkus.io/build-timestamp: 2024-04-08 - 17:36:46 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8080" prometheus.io/scheme: http labels: app.kubernetes.io/name: ztpservice + app.kubernetes.io/version: 0.2.0 app: ztpservice + app.kubernetes.io/managed-by: quarkus name: ztpservice spec: ports: - - name: grpc-server - port: 5050 - targetPort: 5050 - name: http port: 9192 + protocol: TCP targetPort: 8080 + - name: https + port: 443 + protocol: TCP + targetPort: 8443 + - name: grpc + port: 5050 + protocol: TCP + targetPort: 5050 selector: app.kubernetes.io/name: ztpservice type: ClusterIP @@ -29,15 +37,17 @@ apiVersion: apps/v1 kind: Deployment metadata: annotations: - app.quarkus.io/commit-id: 9d36a29ba5ef1fb46f7b51a5c477bdc4410ba548 - app.quarkus.io/build-timestamp: 2023-11-08 - 11:15:43 +0000 + app.quarkus.io/commit-id: 1fd284c73cf7d419152c8bc99644d0ed8955b355 + app.quarkus.io/build-timestamp: 2024-04-08 - 17:36:46 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8080" prometheus.io/scheme: http labels: app: ztpservice + app.kubernetes.io/managed-by: quarkus app.kubernetes.io/name: ztpservice + app.kubernetes.io/version: 0.2.0 name: ztpservice spec: replicas: 1 @@ -47,15 +57,17 @@ spec: template: metadata: annotations: - app.quarkus.io/commit-id: 9d36a29ba5ef1fb46f7b51a5c477bdc4410ba548 - app.quarkus.io/build-timestamp: 2023-11-08 - 11:15:43 +0000 + app.quarkus.io/commit-id: 1fd284c73cf7d419152c8bc99644d0ed8955b355 + app.quarkus.io/build-timestamp: 2024-04-08 - 17:36:46 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8080" prometheus.io/scheme: http labels: app: ztpservice + app.kubernetes.io/managed-by: quarkus app.kubernetes.io/name: ztpservice + app.kubernetes.io/version: 0.2.0 spec: containers: - env: @@ -63,10 +75,10 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: CONTEXT_SERVICE_HOST - value: contextservice - name: DEVICE_SERVICE_HOST value: deviceservice + - name: CONTEXT_SERVICE_HOST + value: contextservice image: labs.etsi.org:5050/tfs/controller/ztp:0.2.0 imagePullPolicy: Always livenessProbe: @@ -81,12 +93,15 @@ spec: timeoutSeconds: 10 name: ztpservice ports: - - containerPort: 5050 - name: grpc-server - protocol: TCP - containerPort: 8080 name: http protocol: TCP + - containerPort: 8443 + name: https + protocol: TCP + - containerPort: 5050 + name: grpc + protocol: TCP readinessProbe: failureThreshold: 3 httpGet: @@ -104,3 +119,13 @@ spec: 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/ztp/util/set_version.sh b/src/ztp/util/set_version.sh index f4b6b09ade8643c9e407588d057b847078c320cd..90c6d6e8a72c4e8507b1bc067d3fd83fc3d31384 100755 --- a/src/ztp/util/set_version.sh +++ b/src/ztp/util/set_version.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/update_tfs_runtime_env_vars.sh b/update_tfs_runtime_env_vars.sh index 8745ceab20cde8c1c3d389a7d9f5db7afb9943cd..b485740000fd0e66e00b6e66a36da09480789a09 100755 --- a/update_tfs_runtime_env_vars.sh +++ b/update_tfs_runtime_env_vars.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.